Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdisk
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdisk
提交
3f8b248e
提交
3f8b248e
编写于
6月 03, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
ccb352c0
变更
11
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
143 行增加
和
8 行删除
+143
-8
environment.ts
app_web/src/environments/environment.ts
+2
-0
index.ts
app_web/src/store/index.ts
+2
-2
actions.ts
app_web/src/store/modules/auth-resource/actions.ts
+17
-0
getters.ts
app_web/src/store/modules/auth-resource/getters.ts
+52
-0
index.ts
app_web/src/store/modules/auth-resource/index.ts
+16
-0
mutations.ts
app_web/src/store/modules/auth-resource/mutations.ts
+35
-0
state.ts
app_web/src/store/modules/auth-resource/state.ts
+11
-0
auth-guard.ts
app_web/src/utils/auth-guard/auth-guard.ts
+1
-1
sdindex-view-appmenu-base.vue
...ts/app/sdindex-view-appmenu/sdindex-view-appmenu-base.vue
+5
-4
sdindex-view-appmenu-model.ts
...ts/app/sdindex-view-appmenu/sdindex-view-appmenu-model.ts
+1
-0
ibzdisk-provider-api.yaml
...sk-provider-api/src/main/docker/ibzdisk-provider-api.yaml
+1
-1
未找到文件。
app_web/src/environments/environment.ts
浏览文件 @
3f8b248e
...
...
@@ -21,6 +21,8 @@ export const Environment = {
uniteAddress
:
"http://172.16.100.202:8114"
,
// 是否为开发模式
devMode
:
true
,
// 是否开启权限认证
enablePermissionValid
:
false
,
// 项目模板地址
ProjectUrl
:
"http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7"
,
// 配置平台地址
...
...
app_web/src/store/index.ts
浏览文件 @
3f8b248e
...
...
@@ -7,7 +7,7 @@ import * as mutations from './mutations';
import
*
as
getters
from
'./getters'
;
import
viewaction
from
'./modules/view-action'
import
unifiedresource
from
'./modules/unified
-resource'
import
authresource
from
'./modules/auth
-resource'
const
state
=
{
...
rootstate
...
...
@@ -22,7 +22,7 @@ const store = new Vuex.Store({
getters
,
modules
:
{
viewaction
,
unified
resource
auth
resource
},
});
...
...
app_web/src/store/modules/auth-resource/actions.ts
0 → 100644
浏览文件 @
3f8b248e
/**
* 提交统一资源数据
*
* @param param0
* @param data
*/
export
const
commitAuthData
=
({
commit
,
state
}:
{
commit
:
any
,
state
:
any
},
{
unires
,
appmenu
,
enablepermissionvalid
}:
{
unires
:
Array
<
any
>
,
appmenu
:
Array
<
any
>
,
enablepermissionvalid
:
boolean
})
=>
{
if
(
unires
&&
unires
.
length
>
0
){
commit
(
'setResourceData'
,
unires
);
}
if
(
appmenu
&&
appmenu
.
length
>
0
){
commit
(
'setMenuData'
,
appmenu
);
}
if
(
enablepermissionvalid
){
commit
(
'setEnablePermissionValid'
,
enablepermissionvalid
);
}
}
\ No newline at end of file
app_web/src/store/modules/auth-resource/getters.ts
0 → 100644
浏览文件 @
3f8b248e
/**
* 判断指定统一资源是否存在
*
* @param state
*/
export
const
getResourceData
=
(
state
:
any
)
=>
(
resourcetag
:
string
)
=>
{
let
itemIndex
:
any
=
state
.
resourceData
.
findIndex
((
unirescode
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
unirescode
,
resourcetag
);
})
return
itemIndex
===
-
1
?
false
:
true
;
}
/**
* 判断指定菜单权限是否存在
*
* @param state
*/
export
const
getMenuData
=
(
state
:
any
)
=>
(
menutag
:
string
)
=>
{
let
itemIndex
:
any
=
state
.
menuData
.
findIndex
((
menucode
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
menucode
,
menutag
);
})
return
itemIndex
===
-
1
?
false
:
true
;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export
const
getEnablePermissionValid
=
(
state
:
any
)
=>
{
return
state
.
enablePermissionValid
;
}
/**
* 判断指定菜单是否显示
*
* @param state
*/
export
const
getAuthMenu
=
(
state
:
any
)
=>
(
menu
:
any
)
=>
{
// 存在权限
let
resourceIndex
:
any
;
let
menuIndex
:
any
;
if
(
state
.
enablePermissionValid
){
resourceIndex
=
state
.
resourceData
.
findIndex
((
resourcetag
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
menu
.
resourcetag
,
resourcetag
);
})
}
menuIndex
=
state
.
menuData
.
findIndex
((
menutag
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
menu
.
authtag
,
menutag
);
})
return
(
resourceIndex
!==
-
1
||
menuIndex
!==
-
1
)?
true
:
false
;
}
\ No newline at end of file
app_web/src/store/modules/auth-resource/index.ts
0 → 100644
浏览文件 @
3f8b248e
import
{
resourcestate
}
from
'./state'
;
import
*
as
actions
from
'./actions'
;
import
*
as
mutations
from
'./mutations'
;
import
*
as
getters
from
'./getters'
;
const
state
=
{
...
resourcestate
}
export
default
{
namespaced
:
true
,
state
,
getters
,
actions
,
mutations
}
\ No newline at end of file
app_web/src/store/modules/auth-resource/mutations.ts
0 → 100644
浏览文件 @
3f8b248e
/**
* 设置统一资源数据
*
* @param state
* @param resourceArray
*/
export
const
setResourceData
=
(
state
:
any
,
resourceArray
:
Array
<
any
>
)
=>
{
if
(
resourceArray
&&
resourceArray
.
length
===
0
){
return
;
}
state
.
resourceData
=
resourceArray
;
}
/**
* 设置菜单数据
*
* @param state
* @param resourceArray
*/
export
const
setMenuData
=
(
state
:
any
,
menuArray
:
Array
<
any
>
)
=>
{
if
(
menuArray
&&
menuArray
.
length
===
0
){
return
;
}
state
.
menuData
=
menuArray
;
}
/**
* 设置是否开启权限认证
*
* @param state
* @param resourceArray
*/
export
const
setEnablePermissionValid
=
(
state
:
any
,
enablepermissionvalid
:
boolean
)
=>
{
state
.
enablePermissionValid
=
enablepermissionvalid
;
}
app_web/src/store/modules/auth-resource/state.ts
0 → 100644
浏览文件 @
3f8b248e
/**
* 所有资源状态
*/
export
const
resourcestate
:
any
=
{
// 统一资源数据
resourceData
:
[],
// 菜单数据
menuData
:[],
// 是否开启权限认证
enablePermissionValid
:
false
}
\ No newline at end of file
app_web/src/utils/auth-guard/auth-guard.ts
浏览文件 @
3f8b248e
...
...
@@ -67,7 +67,7 @@ export class AuthGuard {
}
router
.
app
.
$store
.
commit
(
'addAppData'
,
data
);
// 提交统一资源数据
router
.
app
.
$store
.
dispatch
(
'
unifiedresource/commitResource
Data'
,
data
);
router
.
app
.
$store
.
dispatch
(
'
authresource/commitAuth
Data'
,
data
);
}
}
resolve
(
true
);
...
...
app_web/src/widgets/app/sdindex-view-appmenu/sdindex-view-appmenu-base.vue
浏览文件 @
3f8b248e
...
...
@@ -126,6 +126,7 @@ import { UIActionTool,Util } from '@/utils';
import
SDIndexViewService
from
'./sdindex-view-appmenu-service'
;
import
SDIndexViewModel
from
'./sdindex-view-appmenu-model'
;
import
{
Environment
}
from
'@/environments/environment'
;
@
Component
({
...
...
@@ -603,11 +604,11 @@ export default class SDIndexViewBase extends Vue implements ControlInterface {
* @memberof SDIndexView
*/
public
handleMenusResource
(
inputMenus
:
Array
<
any
>
){
if
(
this
.
$store
.
getters
[
'unifiedresource/getEnablePermissionValid'
]
){
if
(
Environment
.
enablePermissionValid
){
this
.
computedEffectiveMenus
(
inputMenus
);
}
this
.
dataProcess
(
this
.
menuMode
.
getAppMenuItems
()
);
this
.
menus
=
this
.
menuMode
.
getAppMenuItems
()
;
this
.
dataProcess
(
inputMenus
);
this
.
menus
=
inputMenus
;
this
.
doMenuSelect
();
}
...
...
@@ -619,7 +620,7 @@ export default class SDIndexViewBase extends Vue implements ControlInterface {
*/
public
computedEffectiveMenus
(
inputMenus
:
Array
<
any
>
){
inputMenus
.
forEach
((
_item
:
any
)
=>
{
if
(
_item
.
resourcetag
&&
!
this
.
$store
.
getters
[
'unifiedresource/getResourceData'
](
_item
.
resourcetag
)){
if
(
!
this
.
$store
.
getters
[
'authresource/getAuthMenu'
](
_item
)){
_item
.
hidden
=
true
;
if
(
_item
.
items
&&
_item
.
items
.
length
>
0
)
{
this
.
computedEffectiveMenus
(
_item
.
items
);
...
...
app_web/src/widgets/app/sdindex-view-appmenu/sdindex-view-appmenu-model.ts
浏览文件 @
3f8b248e
...
...
@@ -31,6 +31,7 @@ export default class SDIndexViewModel {
textcls
:
''
,
appfunctag
:
'_2'
,
resourcetag
:
''
,
authtag
:
'web-SDIndexView-menuitem1'
,
},
];
...
...
ibzdisk-provider/ibzdisk-provider-api/src/main/docker/ibzdisk-provider-api.yaml
浏览文件 @
3f8b248e
...
...
@@ -9,7 +9,7 @@ services:
deploy
:
resources
:
limits
:
memory
:
1024
M
memory
:
4048
M
reservations
:
memory
:
400M
mode
:
replicated
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录