Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
dd51a217
提交
dd51a217
编写于
12月 11, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zoo457790531 发布系统代码 [ibiz-uaa,UAA鉴权]
上级
9b4a6db6
变更
43
显示空白字符变更
内嵌
并排
正在显示
43 个修改的文件
包含
7877 行增加
和
4566 行删除
+7877
-4566
package.json
app_web/package.json
+0
-2
view-config.json
app_web/public/assets/json/view-config.json
+16
-0
app-color-span.vue
app_web/src/components/app-color-span/app-color-span.vue
+11
-11
dropdown-list.vue
app_web/src/components/dropdown-list/dropdown-list.vue
+54
-22
components_en_US.ts
app_web/src/locale/lanres/components/components_en_US.ts
+1
-1
components_zh_CN.ts
app_web/src/locale/lanres/components/components_zh_CN.ts
+1
-1
sys-role_en_US.ts
...web/src/locale/lanres/entities/sys-role/sys-role_en_US.ts
+8
-0
sys-role_zh_CN.ts
...web/src/locale/lanres/entities/sys-role/sys-role_zh_CN.ts
+8
-0
sys-roles.ts
app_web/src/mock/entity/sys-roles/sys-roles.ts
+44
-0
viewconfig.ts
app_web/src/mock/viewconfig/viewconfig.ts
+16
-0
page-register.ts
app_web/src/pages/uaa/index/page-register.ts
+2
-0
router.ts
app_web/src/pages/uaa/index/router.ts
+54
-0
sys-role-pickup-grid-view-norepeat-base.vue
...view-norepeat/sys-role-pickup-grid-view-norepeat-base.vue
+786
-0
sys-role-pickup-grid-view-norepeat.less
...rid-view-norepeat/sys-role-pickup-grid-view-norepeat.less
+8
-0
sys-role-pickup-grid-view-norepeat.vue
...grid-view-norepeat/sys-role-pickup-grid-view-norepeat.vue
+24
-0
sys-role-pickup-view-norepeat-base.vue
...ckup-view-norepeat/sys-role-pickup-view-norepeat-base.vue
+720
-0
sys-role-pickup-view-norepeat.less
...e-pickup-view-norepeat/sys-role-pickup-view-norepeat.less
+17
-0
sys-role-pickup-view-norepeat.vue
...le-pickup-view-norepeat/sys-role-pickup-view-norepeat.vue
+22
-0
sys-role-service-base.ts
app_web/src/service/sys-role/sys-role-service-base.ts
+29
-0
state.ts
app_web/src/store/modules/view-action/state.ts
+21
-2
sys-role-ui-service-base.ts
app_web/src/uiservice/sys-role/sys-role-ui-service-base.ts
+2
-0
main-grid-base.vue
app_web/src/widgets/sys-app/main-grid/main-grid-base.vue
+13
-24
main-grid-base.vue
...web/src/widgets/sys-auth-log/main-grid/main-grid-base.vue
+13
-24
main-grid-base.vue
.../src/widgets/sys-open-access/main-grid/main-grid-base.vue
+13
-24
main-grid-base.vue
...b/src/widgets/sys-permission/main-grid/main-grid-base.vue
+13
-24
main-grid-base.vue
.../widgets/sys-role-permission/main-grid/main-grid-base.vue
+13
-24
main-form-service.ts
app_web/src/widgets/sys-role/main-form/main-form-service.ts
+2
-2
main-grid-base.vue
app_web/src/widgets/sys-role/main-grid/main-grid-base.vue
+13
-24
pickup-view-norepeatpickupviewpanel-pickupviewpanel-base.vue
...kup-view-norepeatpickupviewpanel-pickupviewpanel-base.vue
+362
-0
pickup-view-norepeatpickupviewpanel-pickupviewpanel-model.ts
...kup-view-norepeatpickupviewpanel-pickupviewpanel-model.ts
+49
-0
pickup-view-norepeatpickupviewpanel-pickupviewpanel-service.ts
...p-view-norepeatpickupviewpanel-pickupviewpanel-service.ts
+11
-0
pickup-view-norepeatpickupviewpanel-pickupviewpanel.less
.../pickup-view-norepeatpickupviewpanel-pickupviewpanel.less
+4
-0
pickup-view-norepeatpickupviewpanel-pickupviewpanel.vue
...l/pickup-view-norepeatpickupviewpanel-pickupviewpanel.vue
+14
-0
main-grid-base.vue
...eb/src/widgets/sys-user-role/main-grid/main-grid-base.vue
+13
-24
main-grid-base.vue
app_web/src/widgets/sys-user/main-grid/main-grid-base.vue
+13
-24
yarn.lock
app_web/yarn.lock
+5418
-4321
SysRoleMapper.java
...c/main/java/cn/ibizlab/core/uaa/mapper/SysRoleMapper.java
+1
-0
ISysRoleService.java
...ain/java/cn/ibizlab/core/uaa/service/ISysRoleService.java
+1
-0
SysRoleServiceImpl.java
.../cn/ibizlab/core/uaa/service/impl/SysRoleServiceImpl.java
+9
-0
h2_table.xml
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
+11
-11
SysRoleMapper.xml
...e/src/main/resources/mapper/uaa/sysrole/SysRoleMapper.xml
+24
-0
systemResource.json
...aa-core/src/main/resources/permission/systemResource.json
+1
-1
SysRoleResource.java
...pi/src/main/java/cn/ibizlab/api/rest/SysRoleResource.java
+22
-0
未找到文件。
app_web/package.json
浏览文件 @
dd51a217
...
@@ -53,10 +53,8 @@
...
@@ -53,10 +53,8 @@
"@types/mockjs"
:
"^1.0.2"
,
"@types/mockjs"
:
"^1.0.2"
,
"@types/qs"
:
"^6.9.0"
,
"@types/qs"
:
"^6.9.0"
,
"@vue/cli-plugin-babel"
:
"^4.1.0"
,
"@vue/cli-plugin-babel"
:
"^4.1.0"
,
"@vue/cli-plugin-e2e-cypress"
:
"^4.1.0"
,
"@vue/cli-plugin-router"
:
"^4.1.0"
,
"@vue/cli-plugin-router"
:
"^4.1.0"
,
"@vue/cli-plugin-typescript"
:
"^4.1.0"
,
"@vue/cli-plugin-typescript"
:
"^4.1.0"
,
"@vue/cli-plugin-unit-jest"
:
"^4.1.0"
,
"@vue/cli-plugin-vuex"
:
"^4.1.0"
,
"@vue/cli-plugin-vuex"
:
"^4.1.0"
,
"@vue/cli-service"
:
"^4.1.0"
,
"@vue/cli-service"
:
"^4.1.0"
,
"@vue/test-utils"
:
"1.0.0-beta.29"
,
"@vue/test-utils"
:
"1.0.0-beta.29"
,
...
...
app_web/public/assets/json/view-config.json
浏览文件 @
dd51a217
...
@@ -103,6 +103,14 @@
...
@@ -103,6 +103,14 @@
"viewname"
:
"SYS_USERPickupView"
,
"viewname"
:
"SYS_USERPickupView"
,
"viewtag"
:
"32fe9ab4a9e1b8d62b9ee802e4746965"
"viewtag"
:
"32fe9ab4a9e1b8d62b9ee802e4746965"
},
},
"sysrolepickupgridview_norepeat"
:
{
"title"
:
"角色选择表格视图"
,
"caption"
:
"系统角色"
,
"viewtype"
:
"DEPICKUPGRIDVIEW"
,
"viewmodule"
:
"uaa"
,
"viewname"
:
"SysRolePickupGridView_norepeat"
,
"viewtag"
:
"33f07a06a447590e710527a19d5f02c7"
},
"sysopenaccesseditview"
:
{
"sysopenaccesseditview"
:
{
"title"
:
"第三方认证平台"
,
"title"
:
"第三方认证平台"
,
"caption"
:
"第三方认证平台"
,
"caption"
:
"第三方认证平台"
,
...
@@ -287,6 +295,14 @@
...
@@ -287,6 +295,14 @@
"viewname"
:
"SYS_ROLE_PERMISSIONEditView"
,
"viewname"
:
"SYS_ROLE_PERMISSIONEditView"
,
"viewtag"
:
"a93a129850b81c3c921aa1911ec9eb8c"
"viewtag"
:
"a93a129850b81c3c921aa1911ec9eb8c"
},
},
"sysrolepickupview_norepeat"
:
{
"title"
:
"角色数据选择视图"
,
"caption"
:
"系统角色"
,
"viewtype"
:
"DEPICKUPVIEW"
,
"viewmodule"
:
"uaa"
,
"viewname"
:
"SysRolePickupView_norepeat"
,
"viewtag"
:
"ba8e31e716b14bba81cdf1281fc76197"
},
"sys_permissionredirectview"
:
{
"sys_permissionredirectview"
:
{
"title"
:
"权限表数据重定向视图"
,
"title"
:
"权限表数据重定向视图"
,
"caption"
:
"权限/资源"
,
"caption"
:
"权限/资源"
,
...
...
app_web/src/components/app-color-span/app-color-span.vue
浏览文件 @
dd51a217
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<span
v-if=
"color"
:style=
"
{ color:textColor }">
{{
text
?
text
:
'---'
}}
</span>
<span
v-if=
"color"
:style=
"
{ color:textColor }">
{{
text
?
text
:
'---'
}}
</span>
<template
v-else
>
<template
v-else
>
<template
v-if=
"dataValue && dataValue.length > 0"
>
<template
v-if=
"dataValue && dataValue.length > 0"
>
<span
v-for=
"(textItem,index) of dataValue"
:key=
"index"
class=
"text-color"
:style=
"
{ backgroundColor:
textItem.color
}">
<span
v-for=
"(textItem,index) of dataValue"
:key=
"index"
class=
"text-color"
:style=
"
{ backgroundColor:
textItem.color, borderColor: textItem.color
}">
{{
textItem
.
srfmajortext
?
textItem
.
srfmajortext
:
'---'
}}
{{
textItem
.
srfmajortext
?
textItem
.
srfmajortext
:
'---'
}}
</span>
</span>
</
template
>
</
template
>
...
@@ -58,7 +58,7 @@ export default class AppColorSpan extends Vue {
...
@@ -58,7 +58,7 @@ export default class AppColorSpan extends Vue {
* @type {any}
* @type {any}
* @memberof AppColorSpan
* @memberof AppColorSpan
*/
*/
@
Prop
()
public
localContext
!
:
any
;
@
Prop
()
public
localContext
?
:
any
;
/**
/**
* 局部导航参数
* 局部导航参数
...
@@ -66,7 +66,7 @@ export default class AppColorSpan extends Vue {
...
@@ -66,7 +66,7 @@ export default class AppColorSpan extends Vue {
* @type {any}
* @type {any}
* @memberof AppColorSpan
* @memberof AppColorSpan
*/
*/
@
Prop
()
public
localParam
!
:
any
;
@
Prop
()
public
localParam
?
:
any
;
/**
/**
* 视图上下文
* 视图上下文
...
@@ -74,7 +74,7 @@ export default class AppColorSpan extends Vue {
...
@@ -74,7 +74,7 @@ export default class AppColorSpan extends Vue {
* @type {*}
* @type {*}
* @memberof AppColorSpan
* @memberof AppColorSpan
*/
*/
@
Prop
()
public
context
!
:
any
;
@
Prop
()
public
context
?
:
any
;
/**
/**
* 视图参数
* 视图参数
...
@@ -82,8 +82,7 @@ export default class AppColorSpan extends Vue {
...
@@ -82,8 +82,7 @@ export default class AppColorSpan extends Vue {
* @type {*}
* @type {*}
* @memberof AppColorSpan
* @memberof AppColorSpan
*/
*/
@
Prop
()
public
viewparams
!
:
any
;
@
Prop
()
public
viewparams
?:
any
;
/**
/**
* 颜色标识
* 颜色标识
...
@@ -91,8 +90,7 @@ export default class AppColorSpan extends Vue {
...
@@ -91,8 +90,7 @@ export default class AppColorSpan extends Vue {
* @type {*}
* @type {*}
* @memberof AppColorSpan
* @memberof AppColorSpan
*/
*/
@
Prop
()
color
:
any
;
@
Prop
()
color
?:
any
;
/**
/**
* 颜色
* 颜色
...
@@ -156,8 +154,10 @@ export default class AppColorSpan extends Vue {
...
@@ -156,8 +154,10 @@ export default class AppColorSpan extends Vue {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.text-color{
.text-color{
padding: 2px;
padding: 2px 8px;
margin: 6px;
margin: 6px 6px 6px 0px;
border-radius: 4px;
border-radius: 12px;
font-size: 13px;
border: 2px solid rgb(170, 167, 167);
}
}
</
style
>
</
style
>
\ No newline at end of file
app_web/src/components/dropdown-list/dropdown-list.vue
浏览文件 @
dd51a217
...
@@ -170,10 +170,20 @@ export default class DropDownList extends Vue {
...
@@ -170,10 +170,20 @@ export default class DropDownList extends Vue {
/**
/**
* 属性类型
* 属性类型
* @type {string}
*
* @type {'string' | 'number'}
* @memberof DropDownList
* @memberof DropDownList
*/
*/
@
Prop
()
public
valueType
?:
string
;
@
Prop
({
default
:
'string'
})
public
valueType
!
:
'string'
|
'number'
;
/**
* 选择实际值
*
* @type {*}
* @memberof DropDownList
*/
public
value
:
any
=
null
;
/**
/**
* 计算属性(当前值)
* 计算属性(当前值)
...
@@ -204,7 +214,7 @@ export default class DropDownList extends Vue {
...
@@ -204,7 +214,7 @@ export default class DropDownList extends Vue {
})
})
return
JSON
.
stringify
([
result
]);
return
JSON
.
stringify
([
result
]);
}
}
return
this
.
itemV
alue
;
return
this
.
v
alue
;
}
}
/**
/**
...
@@ -263,10 +273,12 @@ export default class DropDownList extends Vue {
...
@@ -263,10 +273,12 @@ export default class DropDownList extends Vue {
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
type
,
data
})
=>
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
type
,
data
})
=>
{
if
(
Object
.
is
(
'load'
,
type
))
{
if
(
Object
.
is
(
'load'
,
type
))
{
this
.
loadData
();
this
.
loadData
();
this
.
readyValue
();
}
}
});
});
}
}
this
.
loadData
();
this
.
loadData
();
this
.
readyValue
();
}
}
/**
/**
...
@@ -299,6 +311,29 @@ export default class DropDownList extends Vue {
...
@@ -299,6 +311,29 @@ export default class DropDownList extends Vue {
}
}
}
}
/**
* 准备值
*
* @memberof DropDownList
*/
public
readyValue
()
{
if
(
this
.
itemValue
==
null
)
{
this
.
value
=
null
;
return
;
}
if
(
this
.
$util
.
typeOf
(
this
.
itemValue
)
===
this
.
valueType
)
{
this
.
value
=
this
.
itemValue
;
}
else
if
(
this
.
valueType
===
'number'
)
{
if
(
this
.
itemValue
.
indexOf
(
'.'
)
===
-
1
)
{
this
.
value
=
parseInt
(
this
.
itemValue
);
}
else
{
this
.
value
=
parseFloat
(
this
.
itemValue
);
}
}
else
{
this
.
value
=
this
.
itemValue
.
toString
();
}
}
/**
/**
* 下拉点击事件
* 下拉点击事件
*
*
...
@@ -331,15 +366,14 @@ export default class DropDownList extends Vue {
...
@@ -331,15 +366,14 @@ export default class DropDownList extends Vue {
* @memberof DropDownList
* @memberof DropDownList
*/
*/
public
formatCodeList
(
items
:
Array
<
any
>
){
public
formatCodeList
(
items
:
Array
<
any
>
){
let
matching
:
boolean
=
tru
e
;
let
matching
:
boolean
=
fals
e
;
this
.
items
=
[];
this
.
items
=
[];
try
{
try
{
if
(
this
.
valueType
){
items
.
forEach
((
item
:
any
)
=>
{
items
.
forEach
((
item
:
any
)
=>
{
const
type
=
this
.
$util
.
typeOf
(
item
.
value
);
const
type
=
this
.
$util
.
typeOf
(
item
.
value
);
if
(
type
!=
this
.
valueType
){
if
(
type
!=
this
.
valueType
){
matching
=
fals
e
;
matching
=
tru
e
;
if
(
type
==
'number'
){
if
(
type
=
==
'number'
){
item
.
value
=
item
.
value
.
toString
();
item
.
value
=
item
.
value
.
toString
();
}
else
{
}
else
{
if
(
item
.
value
.
indexOf
(
'.'
)
==
-
1
){
if
(
item
.
value
.
indexOf
(
'.'
)
==
-
1
){
...
@@ -351,12 +385,10 @@ export default class DropDownList extends Vue {
...
@@ -351,12 +385,10 @@ export default class DropDownList extends Vue {
}
}
this
.
items
.
push
(
item
);
this
.
items
.
push
(
item
);
});
});
if
(
!
matching
){
if
(
matching
){
console
.
warn
(
`代码表
${
this
.
tag
}
值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`
);
console
.
warn
(
`代码表
${
this
.
tag
}
值类型和属性类型不匹配,已自动强制转换,请修正代码表值类型和属性类型匹配`
);
}
}
}
else
{
this
.
items
=
items
;
}
}
catch
(
error
){
}
catch
(
error
){
console
.
warn
(
'代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配'
);
console
.
warn
(
'代码表值类型和属性类型不匹配,自动强制转换异常,请修正代码表值类型和属性类型匹配'
);
}
}
...
...
app_web/src/locale/lanres/components/components_en_US.ts
浏览文件 @
dd51a217
app_web/src/locale/lanres/components/components_zh_CN.ts
浏览文件 @
dd51a217
app_web/src/locale/lanres/entities/sys-role/sys-role_en_US.ts
浏览文件 @
dd51a217
...
@@ -20,6 +20,10 @@ export default {
...
@@ -20,6 +20,10 @@ export default {
caption
:
"系统角色"
,
caption
:
"系统角色"
,
title
:
"角色数据选择视图"
,
title
:
"角色数据选择视图"
,
},
},
pickupgridview_norepeat
:
{
caption
:
"系统角色"
,
title
:
"角色选择表格视图"
,
},
redirectview
:
{
redirectview
:
{
caption
:
"系统角色"
,
caption
:
"系统角色"
,
title
:
"角色数据重定向视图"
,
title
:
"角色数据重定向视图"
,
...
@@ -40,6 +44,10 @@ export default {
...
@@ -40,6 +44,10 @@ export default {
caption
:
"系统角色"
,
caption
:
"系统角色"
,
title
:
"角色数据多项选择视图"
,
title
:
"角色数据多项选择视图"
,
},
},
pickupview_norepeat
:
{
caption
:
"系统角色"
,
title
:
"角色数据选择视图"
,
},
},
},
main_form
:
{
main_form
:
{
details
:
{
details
:
{
...
...
app_web/src/locale/lanres/entities/sys-role/sys-role_zh_CN.ts
浏览文件 @
dd51a217
...
@@ -19,6 +19,10 @@ export default {
...
@@ -19,6 +19,10 @@ export default {
caption
:
"系统角色"
,
caption
:
"系统角色"
,
title
:
"角色数据选择视图"
,
title
:
"角色数据选择视图"
,
},
},
pickupgridview_norepeat
:
{
caption
:
"系统角色"
,
title
:
"角色选择表格视图"
,
},
redirectview
:
{
redirectview
:
{
caption
:
"系统角色"
,
caption
:
"系统角色"
,
title
:
"角色数据重定向视图"
,
title
:
"角色数据重定向视图"
,
...
@@ -39,6 +43,10 @@ export default {
...
@@ -39,6 +43,10 @@ export default {
caption
:
"系统角色"
,
caption
:
"系统角色"
,
title
:
"角色数据多项选择视图"
,
title
:
"角色数据多项选择视图"
,
},
},
pickupview_norepeat
:
{
caption
:
"系统角色"
,
title
:
"角色数据选择视图"
,
},
},
},
main_form
:
{
main_form
:
{
details
:
{
details
:
{
...
...
app_web/src/mock/entity/sys-roles/sys-roles.ts
浏览文件 @
dd51a217
...
@@ -314,6 +314,50 @@ mock.onGet(new RegExp(/^\/sysroles\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
...
@@ -314,6 +314,50 @@ mock.onGet(new RegExp(/^\/sysroles\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
return
[
status
,
records
?
records
:
[]];
});
});
// FetchNoRepeat
mock
.
onGet
(
new
RegExp
(
/^
\/
sysroles
\/
fetchnorepeat$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法: FetchNoRepeat"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
?
mockDatas
:
[]];
});
// FetchNoRepeat
mock
.
onGet
(
new
RegExp
(
/^
\/
sysroles
\/
fetchnorepeat
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法: FetchNoRepeat"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
let
url
=
config
.
url
.
split
(
'?'
)[
1
];
let
params
=
qs
.
parse
(
url
);
Object
.
assign
(
config
,
params
);
}
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
let
total
=
mockDatas
.
length
;
let
records
:
Array
<
any
>
=
[];
if
(
!
config
.
page
||
!
config
.
size
){
records
=
mockDatas
;
}
else
{
if
((
config
.
page
-
1
)
*
config
.
size
<
total
){
records
=
mockDatas
.
slice
(
config
.
page
,
config
.
size
);
}
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
records
?
records
:
[]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
...
...
app_web/src/mock/viewconfig/viewconfig.ts
浏览文件 @
dd51a217
...
@@ -111,6 +111,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
...
@@ -111,6 +111,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"SYS_USERPickupView"
,
"viewname"
:
"SYS_USERPickupView"
,
"viewtag"
:
"32fe9ab4a9e1b8d62b9ee802e4746965"
"viewtag"
:
"32fe9ab4a9e1b8d62b9ee802e4746965"
},
},
"sysrolepickupgridview_norepeat"
:
{
"title"
:
"角色选择表格视图"
,
"caption"
:
"系统角色"
,
"viewtype"
:
"DEPICKUPGRIDVIEW"
,
"viewmodule"
:
"uaa"
,
"viewname"
:
"SysRolePickupGridView_norepeat"
,
"viewtag"
:
"33f07a06a447590e710527a19d5f02c7"
},
"sysopenaccesseditview"
:
{
"sysopenaccesseditview"
:
{
"title"
:
"第三方认证平台"
,
"title"
:
"第三方认证平台"
,
"caption"
:
"第三方认证平台"
,
"caption"
:
"第三方认证平台"
,
...
@@ -295,6 +303,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
...
@@ -295,6 +303,14 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewname"
:
"SYS_ROLE_PERMISSIONEditView"
,
"viewname"
:
"SYS_ROLE_PERMISSIONEditView"
,
"viewtag"
:
"a93a129850b81c3c921aa1911ec9eb8c"
"viewtag"
:
"a93a129850b81c3c921aa1911ec9eb8c"
},
},
"sysrolepickupview_norepeat"
:
{
"title"
:
"角色数据选择视图"
,
"caption"
:
"系统角色"
,
"viewtype"
:
"DEPICKUPVIEW"
,
"viewmodule"
:
"uaa"
,
"viewname"
:
"SysRolePickupView_norepeat"
,
"viewtag"
:
"ba8e31e716b14bba81cdf1281fc76197"
},
"sys_permissionredirectview"
:
{
"sys_permissionredirectview"
:
{
"title"
:
"权限表数据重定向视图"
,
"title"
:
"权限表数据重定向视图"
,
"caption"
:
"权限/资源"
,
"caption"
:
"权限/资源"
,
...
...
app_web/src/pages/uaa/index/page-register.ts
浏览文件 @
dd51a217
...
@@ -13,6 +13,8 @@ export const PageComponents = {
...
@@ -13,6 +13,8 @@ export const PageComponents = {
Vue
.
component
(
'sys-usermpickup-view'
,
()
=>
import
(
'@pages/uaa/sys-usermpickup-view/sys-usermpickup-view.vue'
));
Vue
.
component
(
'sys-usermpickup-view'
,
()
=>
import
(
'@pages/uaa/sys-usermpickup-view/sys-usermpickup-view.vue'
));
Vue
.
component
(
'sys-open-access-edit-view'
,
()
=>
import
(
'@pages/uaa/sys-open-access-edit-view/sys-open-access-edit-view.vue'
));
Vue
.
component
(
'sys-open-access-edit-view'
,
()
=>
import
(
'@pages/uaa/sys-open-access-edit-view/sys-open-access-edit-view.vue'
));
Vue
.
component
(
'sys-user-rolegrid-view'
,
()
=>
import
(
'@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue'
));
Vue
.
component
(
'sys-user-rolegrid-view'
,
()
=>
import
(
'@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue'
));
Vue
.
component
(
'sys-role-pickup-grid-view-norepeat'
,
()
=>
import
(
'@pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat.vue'
));
Vue
.
component
(
'sys-role-pickup-view-norepeat'
,
()
=>
import
(
'@pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat.vue'
));
Vue
.
component
(
'sys-rolepickup-view'
,
()
=>
import
(
'@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue'
));
Vue
.
component
(
'sys-rolepickup-view'
,
()
=>
import
(
'@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue'
));
Vue
.
component
(
'sys-role-grid-view'
,
()
=>
import
(
'@pages/uaa/sys-role-grid-view/sys-role-grid-view.vue'
));
Vue
.
component
(
'sys-role-grid-view'
,
()
=>
import
(
'@pages/uaa/sys-role-grid-view/sys-role-grid-view.vue'
));
Vue
.
component
(
'sys-app-edit-view'
,
()
=>
import
(
'@pages/uaa/sys-app-edit-view/sys-app-edit-view.vue'
));
Vue
.
component
(
'sys-app-edit-view'
,
()
=>
import
(
'@pages/uaa/sys-app-edit-view/sys-app-edit-view.vue'
));
...
...
app_web/src/pages/uaa/index/router.ts
浏览文件 @
dd51a217
...
@@ -307,6 +307,34 @@ const router = new Router({
...
@@ -307,6 +307,34 @@ const router = new Router({
},
},
component
:
()
=>
import
(
'@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue'
),
component
:
()
=>
import
(
'@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue'
),
},
},
{
path
:
'sysroles/:sysrole?/pickupgridview_norepeat/:pickupgridview_norepeat?'
,
meta
:
{
caption
:
'entities.sysrole.views.pickupgridview_norepeat.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'sysroles'
,
parameterName
:
'sysrole'
},
{
pathName
:
'pickupgridview_norepeat'
,
parameterName
:
'pickupgridview_norepeat'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat.vue'
),
},
{
path
:
'sysroles/:sysrole?/pickupview_norepeat/:pickupview_norepeat?'
,
meta
:
{
caption
:
'entities.sysrole.views.pickupview_norepeat.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'sysroles'
,
parameterName
:
'sysrole'
},
{
pathName
:
'pickupview_norepeat'
,
parameterName
:
'pickupview_norepeat'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat.vue'
),
},
{
{
path
:
'sysroles/:sysrole?/pickupview/:pickupview?'
,
path
:
'sysroles/:sysrole?/pickupview/:pickupview?'
,
meta
:
{
meta
:
{
...
@@ -559,6 +587,19 @@ const router = new Router({
...
@@ -559,6 +587,19 @@ const router = new Router({
},
},
component
:
()
=>
import
(
'@pages/uaa/sys-userpickup-view/sys-userpickup-view.vue'
),
component
:
()
=>
import
(
'@pages/uaa/sys-userpickup-view/sys-userpickup-view.vue'
),
},
},
{
path
:
'/sysroles/:sysrole?/pickupgridview_norepeat/:pickupgridview_norepeat?'
,
meta
:
{
caption
:
'entities.sysrole.views.pickupgridview_norepeat.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'sysroles'
,
parameterName
:
'sysrole'
},
{
pathName
:
'pickupgridview_norepeat'
,
parameterName
:
'pickupgridview_norepeat'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat.vue'
),
},
{
{
path
:
'/sysopenaccesses/:sysopenaccess?/editview/:editview?'
,
path
:
'/sysopenaccesses/:sysopenaccess?/editview/:editview?'
,
meta
:
{
meta
:
{
...
@@ -732,6 +773,19 @@ const router = new Router({
...
@@ -732,6 +773,19 @@ const router = new Router({
},
},
component
:
()
=>
import
(
'@pages/uaa/sys-rolempickup-view/sys-rolempickup-view.vue'
),
component
:
()
=>
import
(
'@pages/uaa/sys-rolempickup-view/sys-rolempickup-view.vue'
),
},
},
{
path
:
'/sysroles/:sysrole?/pickupview_norepeat/:pickupview_norepeat?'
,
meta
:
{
caption
:
'entities.sysrole.views.pickupview_norepeat.caption'
,
info
:
''
,
parameters
:
[
{
pathName
:
'sysroles'
,
parameterName
:
'sysrole'
},
{
pathName
:
'pickupview_norepeat'
,
parameterName
:
'pickupview_norepeat'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat.vue'
),
},
{
{
path
:
'/sysusers/:sysuser?/sysuserroles/:sysuserrole?/editview/:editview?'
,
path
:
'/sysusers/:sysuser?/sysuserroles/:sysuserrole?/editview/:editview?'
,
meta
:
{
meta
:
{
...
...
app_web/src/pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat-base.vue
0 → 100644
浏览文件 @
dd51a217
<
template
>
<div
class=
'view-container depickupgridview sys-role-pickup-grid-view-norepeat'
>
<app-studioaction
:viewTitle=
"$t(model.srfCaption)"
viewName=
"sysrolepickupgridview_norepeat"
></app-studioaction>
<card
class=
'view-card view-no-caption view-no-toolbar'
:dis-hover=
"true"
:bordered=
"false"
>
<div
class=
'view-top-messages'
>
</div>
<div
class=
'content-container pickup-grid-view'
>
<view
_searchform
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:showBusyIndicator=
"true"
v-show=
"isExpandSearchForm"
loaddraftAction=
"FilterGetDraft"
loadAction=
"FilterGet"
name=
"searchform"
ref=
'searchform'
@
save=
"searchform_save($event)"
@
search=
"searchform_search($event)"
@
load=
"searchform_load($event)"
@
closeview=
"closeView($event)"
>
</view
_searchform
>
<div
class=
'view-body-messages'
>
</div>
<view
_grid
:viewState=
"viewState"
:viewparams=
"viewparams"
:context=
"context"
:isSingleSelect=
"isSingleSelect"
:selectedData=
"selectedData"
:showBusyIndicator=
"true"
updateAction=
""
removeAction=
"Remove"
loaddraftAction=
""
loadAction=
""
createAction=
""
fetchAction=
"FetchNoRepeat"
name=
"grid"
ref=
'grid'
@
selectionchange=
"grid_selectionchange($event)"
@
beforeload=
"grid_beforeload($event)"
@
rowdblclick=
"grid_rowdblclick($event)"
@
load=
"grid_load($event)"
@
closeview=
"closeView($event)"
>
</view
_grid
>
</div>
<div
class=
'view-bottom-messages'
>
</div>
</card>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Inject
}
from
'vue-property-decorator'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
SysRoleService
from
'@/service/sys-role/sys-role-service'
;
import
SysRoleAuthService
from
'@/authservice/sys-role/sys-role-auth-service'
;
import
PickupGridViewEngine
from
'@engine/view/pickup-grid-view-engine'
;
import
SysRoleUIService
from
'@/uiservice/sys-role/sys-role-ui-service'
;
@
Component
({
components
:
{
},
})
export
default
class
SysRolePickupGridView_norepeatBase
extends
Vue
{
/**
* 实体服务对象
*
* @type {SysRoleService}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
appEntityService
:
SysRoleService
=
new
SysRoleService
;
/**
* 实体UI服务对象
*
* @type SysRoleUIService
* @memberof SysRolePickupGridView_norepeatBase
*/
public
appUIService
:
SysRoleUIService
=
new
SysRoleUIService
(
this
.
$store
);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Emit
()
public
viewDatasChange
(
val
:
any
):
any
{
return
val
;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Prop
()
public
viewdata
!
:
string
;
/**
* 传入视图参数
*
* @type {string}
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Prop
()
public
viewparam
!
:
string
;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Prop
({
default
:
true
})
public
viewDefaultUsage
!
:
boolean
;
/**
* 视图默认使用
*
* @type {string}
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
viewtag
:
string
=
'33f07a06a447590e710527a19d5f02c7'
;
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
customViewNavContexts
:
any
=
{
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
customViewParams
:
any
=
{
};
/**
* 视图模型数据
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
model
:
any
=
{
srfCaption
:
'entities.sysrole.views.pickupgridview_norepeat.caption'
,
srfTitle
:
'entities.sysrole.views.pickupgridview_norepeat.title'
,
srfSubTitle
:
'entities.sysrole.views.pickupgridview_norepeat.subtitle'
,
dataInfo
:
''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
if
(
typeof
newVal
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
else
{
this
.
viewparams
=
Util
.
deepCopy
(
this
.
viewparam
);
}
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Watch
(
'viewdata'
)
onViewData
(
newVal
:
any
,
oldVal
:
any
)
{
const
_this
:
any
=
this
;
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
engine
)
{
this
.
$nextTick
(()
=>
{
_this
.
parseViewParam
();
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
containerModel
:
any
=
{
view_grid
:
{
name
:
'grid'
,
type
:
'GRID'
},
view_searchform
:
{
name
:
'searchform'
,
type
:
'SEARCHFORM'
},
};
/**
* 视图刷新
*
* @param {*} args
* @memberof SysRolePickupGridView_norepeatBase
*/
public
refresh
(
args
?:
any
):
void
{
const
refs
:
any
=
this
.
$refs
;
if
(
refs
&&
refs
.
grid
)
{
refs
.
grid
.
refresh
();
}
}
/**
* 计数器刷新
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
viewState
:
Subject
<
ViewState
>
=
new
Subject
();
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
engine
:
PickupGridViewEngine
=
new
PickupGridViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof SysRolePickupGridView_norepeatBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
grid
:
this
.
$refs
.
grid
,
searchform
:
this
.
$refs
.
searchform
,
keyPSDEField
:
'sysrole'
,
majorPSDEField
:
'rolename'
,
isLoadDefault
:
true
,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
navDataService
=
NavDataService
.
getInstance
(
this
.
$store
);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
* 应用上下文
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
context
:
any
=
{};
/**
* 视图参数
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
viewparams
:
any
=
{};
/**
* 视图缓存数据
*
* @type {*}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
viewCacheData
:
any
;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 解析视图参数
*
* @public
* @memberof SysRolePickupGridView_norepeatBase
*/
public
parseViewParam
(
inputvalue
:
any
=
null
):
void
{
for
(
let
key
in
this
.
context
){
delete
this
.
context
[
key
];
}
if
(
this
.
$store
.
getters
.
getAppData
()
&&
this
.
$store
.
getters
.
getAppData
().
context
){
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
if
(
this
.
context
&&
this
.
context
.
srfparentkey
){
Object
.
assign
(
this
.
viewparams
,{
srfparentkey
:
this
.
context
.
srfparentkey
});
}
this
.
handleCustomViewData
();
return
;
}
const
path
=
(
this
.
$route
.
matched
[
this
.
$route
.
matched
.
length
-
1
]).
path
;
const
keys
:
Array
<
any
>
=
[];
const
curReg
=
this
.
$pathToRegExp
.
pathToRegexp
(
path
,
keys
);
const
matchArray
=
curReg
.
exec
(
this
.
$route
.
path
);
let
tempValue
:
Object
=
{};
keys
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
.
name
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
this
.
$viewTool
.
formatRouteParams
(
tempValue
,
this
.
$route
,
this
.
context
,
this
.
viewparams
);
if
(
inputvalue
){
Object
.
assign
(
this
.
context
,{
'sysrole'
:
inputvalue
});
}
//初始化视图唯一标识
Object
.
assign
(
this
.
context
,{
srfsessionid
:
this
.
$util
.
createUUID
()});
this
.
handleCustomViewData
();
//初始化导航数据
this
.
initNavDataWithRoute
();
}
/**
* 处理自定义视图数据
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
handleCustomViewData
(){
if
(
Object
.
keys
(
this
.
customViewNavContexts
).
length
>
0
){
Object
.
keys
(
this
.
customViewNavContexts
).
forEach
((
item
:
any
)
=>
{
let
tempContext
:
any
=
{};
let
curNavContext
:
any
=
this
.
customViewNavContexts
[
item
];
this
.
handleCustomDataLogic
(
curNavContext
,
tempContext
,
item
);
Object
.
assign
(
this
.
context
,
tempContext
);
})
}
if
(
Object
.
keys
(
this
.
customViewParams
).
length
>
0
){
Object
.
keys
(
this
.
customViewParams
).
forEach
((
item
:
any
)
=>
{
let
tempParam
:
any
=
{};
let
curNavParam
:
any
=
this
.
customViewParams
[
item
];
this
.
handleCustomDataLogic
(
curNavParam
,
tempParam
,
item
);
Object
.
assign
(
this
.
viewparams
,
tempParam
);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
handleCustomDataLogic
(
curNavData
:
any
,
tempData
:
any
,
item
:
string
){
// 直接值直接赋值
if
(
curNavData
.
isRawValue
){
if
(
Object
.
is
(
curNavData
.
value
,
"null"
)
||
Object
.
is
(
curNavData
.
value
,
""
)){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
curNavData
.
value
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
else
{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if
(
this
.
context
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
context
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
if
(
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
initNavDataWithRoute
(
data
:
any
=
null
,
isNew
:
boolean
=
false
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavData
({
id
:
'sys-role-pickup-grid-view-norepeat'
,
tag
:
this
.
viewtag
,
srfkey
:
isNew
?
null
:
this
.
context
.
sysrole
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
initNavDataWithTab
(
data
:
any
=
null
,
isOnlyAdd
:
boolean
=
true
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
!
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavDataByOnly
({
id
:
'sys-role-pickup-grid-view-norepeat'
,
tag
:
this
.
viewtag
,
srfkey
:
this
.
context
.
sysrole
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
},
isOnlyAdd
);
}
}
/**
* Vue声明周期
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
afterCreated
(){
let
_this
:
any
=
this
;
const
secondtag
=
_this
.
$util
.
createUUID
();
_this
.
$store
.
commit
(
'viewaction/createdView'
,
{
viewtag
:
_this
.
viewtag
,
secondtag
:
secondtag
});
_this
.
viewtag
=
secondtag
;
_this
.
parseViewParam
();
_this
.
serviceStateEvent
=
_this
.
navDataService
.
serviceState
.
subscribe
(({
action
,
name
,
data
}:{
action
:
string
,
name
:
any
,
data
:
any
})
=>
{
if
(
!
Object
.
is
(
name
,
'sys-role-pickup-grid-view-norepeat'
)){
return
;
}
if
(
Object
.
is
(
action
,
'viewrefresh'
))
{
_this
.
$nextTick
(()
=>
{
_this
.
parseViewParam
(
data
);
if
(
_this
.
engine
){
_this
.
engine
.
load
();
}
});
}
});
if
(
_this
.
portletState
){
_this
.
portletStateEvent
=
_this
.
portletState
.
subscribe
((
res
:
any
)
=>
{
if
(
!
Object
.
is
(
res
.
name
,
'SysRolePickupGridView_norepeat'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
}
/**
* 销毁之前
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
beforeDestroy
()
{
this
.
$store
.
commit
(
'viewaction/removeView'
,
this
.
viewtag
);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
afterMounted
(){
const
_this
:
any
=
this
;
_this
.
engineInit
();
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
}
/**
* grid 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupGridView_norepeatBase
*/
public
grid_selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'selectionchange'
,
$event
);
}
/**
* grid 部件 beforeload 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupGridView_norepeatBase
*/
public
grid_beforeload
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'beforeload'
,
$event
);
}
/**
* grid 部件 rowdblclick 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupGridView_norepeatBase
*/
public
grid_rowdblclick
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'rowdblclick'
,
$event
);
}
/**
* grid 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupGridView_norepeatBase
*/
public
grid_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'grid'
,
'load'
,
$event
);
}
/**
* searchform 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupGridView_norepeatBase
*/
public
searchform_save
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'save'
,
$event
);
}
/**
* searchform 部件 search 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupGridView_norepeatBase
*/
public
searchform_search
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'search'
,
$event
);
}
/**
* searchform 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupGridView_norepeatBase
*/
public
searchform_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'searchform'
,
'load'
,
$event
);
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof SysRolePickupGridView_norepeatBase
*/
public
closeView
(
args
:
any
[]):
void
{
let
_view
:
any
=
this
;
if
(
_view
.
viewdata
)
{
_view
.
$emit
(
'viewdataschange'
,
[
args
]);
_view
.
$emit
(
'close'
,
[
args
]);
}
else
if
(
_view
.
$tabPageExp
)
{
_view
.
$tabPageExp
.
onClose
(
_view
.
$route
.
fullPath
);
}
}
/**
* 销毁视图回调
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
destroyed
(){
this
.
afterDestroyed
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof SysRolePickupGridView_norepeatBase
*/
public
afterDestroyed
(){
if
(
this
.
viewDefaultUsage
){
let
localStoreLength
=
Object
.
keys
(
localStorage
);
if
(
localStoreLength
.
length
>
0
){
localStoreLength
.
forEach
((
item
:
string
)
=>
{
if
(
item
.
startsWith
(
this
.
context
.
srfsessionid
)){
localStorage
.
removeItem
(
item
);
}
})
}
if
(
Object
.
is
(
this
.
navModel
,
"tab"
)){
this
.
navDataService
.
removeNavDataByTag
(
this
.
viewtag
);
}
if
(
this
.
serviceStateEvent
)
{
this
.
serviceStateEvent
.
unsubscribe
();
}
}
// 销毁计数器定时器
if
(
this
.
counterServiceArray
&&
this
.
counterServiceArray
.
length
>
0
){
this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
destroyCounter
&&
item
.
destroyCounter
instanceof
Function
){
item
.
destroyCounter
();
}
})
}
if
(
this
.
portletStateEvent
){
this
.
portletStateEvent
.
unsubscribe
();
}
}
/**
* 选中数据字符串
*
* @type {string}
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Prop
()
public
selectedData
?:
string
;
/**
* 是否单选
*
* @type {boolean}
* @memberof SysRolePickupGridView_norepeatBase
*/
@
Prop
()
public
isSingleSelect
?:
boolean
;
/**
* 搜索值
*
* @type {string}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
query
:
string
=
''
;
/**
* 是否展开搜索表单
*
* @type {boolean}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
isExpandSearchForm
:
boolean
=
true
;
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof SysRolePickupGridView_norepeatBase
*/
public
gridRowActiveMode
:
number
|
0
|
1
|
2
=
2
;
/**
* 快速搜索
*
* @param {*} $event
* @memberof SysRolePickupGridView_norepeatBase
*/
public
onSearch
(
$event
:
any
):
void
{
const
refs
:
any
=
this
.
$refs
;
if
(
refs
.
grid
)
{
refs
.
grid
.
load
({});
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './sys-role-pickup-grid-view-norepeat.less';
</
style
>
\ No newline at end of file
app_web/src/pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat.less
0 → 100644
浏览文件 @
dd51a217
.sys-role-pickup-grid-view-norepeat{
position: relative;
}
.sys-role-pickup-grid-view-norepeat{
display: block;
}
\ No newline at end of file
app_web/src/pages/uaa/sys-role-pickup-grid-view-norepeat/sys-role-pickup-grid-view-norepeat.vue
0 → 100644
浏览文件 @
dd51a217
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
SysRolePickupGridView_norepeatBase
from
'./sys-role-pickup-grid-view-norepeat-base.vue'
;
import
view_grid
from
'@widgets/sys-role/main-grid/main-grid.vue'
;
import
view_searchform
from
'@widgets/sys-role/default-searchform/default-searchform.vue'
;
@
Component
({
components
:
{
view_grid
,
view_searchform
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
if
(
!
Object
.
is
(
vm
.
navModel
,
"route"
)){
vm
.
initNavDataWithTab
(
vm
.
viewCacheData
);
}
vm
.
$store
.
commit
(
'addCurPageViewtag'
,
{
fullPath
:
to
.
fullPath
,
viewtag
:
vm
.
viewtag
});
});
},
})
export
default
class
SysRolePickupGridView_norepeat
extends
SysRolePickupGridView_norepeatBase
{
}
</
script
>
\ No newline at end of file
app_web/src/pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat-base.vue
0 → 100644
浏览文件 @
dd51a217
<
template
>
<div
class=
"view-container depickupview sys-role-pickup-view-norepeat"
>
<app-studioaction
:viewTitle=
"$t(model.srfCaption)"
viewName=
"sysrolepickupview_norepeat"
></app-studioaction>
<card
class=
'view-card view-no-caption view-no-toolbar'
:dis-hover=
"true"
:padding=
"0"
:bordered=
"false"
>
<div
class=
'view-top-messages'
>
</div>
<div
class=
"content-container pickup-view"
>
<div
class=
'view-body-messages'
>
</div>
<view
_pickupviewpanel
:viewState=
"viewState"
:viewparams=
"JSON.parse(JSON.stringify(viewparams))"
:context=
"JSON.parse(JSON.stringify(context))"
:isSingleSelect=
"isSingleSelect"
:selectedData=
"selectedData"
:isShowButton=
"isShowButton"
name=
"pickupviewpanel"
ref=
'pickupviewpanel'
@
selectionchange=
"pickupviewpanel_selectionchange($event)"
@
activated=
"pickupviewpanel_activated($event)"
@
load=
"pickupviewpanel_load($event)"
@
closeview=
"closeView($event)"
>
</view
_pickupviewpanel
>
<card
v-if=
"isShowButton"
:dis-hover=
"true"
:bordered=
"false"
class=
"footer"
>
<row
:style=
"
{ textAlign: 'right' }">
<i-button
type=
"primary"
:disabled=
"this.viewSelections.length > 0 ? false : true"
@
click=
"onClickOk"
>
{{
this
.
containerModel
.
view_okbtn
.
text
}}
</i-button>
<i-button
@
click=
"onClickCancel"
>
{{
this
.
containerModel
.
view_cancelbtn
.
text
}}
</i-button>
</row>
</card>
</div>
<div
class=
'view-bottom-messages'
>
</div>
</card>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Inject
}
from
'vue-property-decorator'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
SysRoleService
from
'@/service/sys-role/sys-role-service'
;
import
SysRoleAuthService
from
'@/authservice/sys-role/sys-role-auth-service'
;
import
PickupViewEngine
from
'@engine/view/pickup-view-engine'
;
import
SysRoleUIService
from
'@/uiservice/sys-role/sys-role-ui-service'
;
@
Component
({
components
:
{
},
})
export
default
class
SysRolePickupView_norepeatBase
extends
Vue
{
/**
* 实体服务对象
*
* @type {SysRoleService}
* @memberof SysRolePickupView_norepeatBase
*/
public
appEntityService
:
SysRoleService
=
new
SysRoleService
;
/**
* 实体UI服务对象
*
* @type SysRoleUIService
* @memberof SysRolePickupView_norepeatBase
*/
public
appUIService
:
SysRoleUIService
=
new
SysRoleUIService
(
this
.
$store
);
/**
* 数据变化
*
* @param {*} val
* @returns {*}
* @memberof SysRolePickupView_norepeatBase
*/
@
Emit
()
public
viewDatasChange
(
val
:
any
):
any
{
return
val
;
}
/**
* 传入视图上下文
*
* @type {string}
* @memberof SysRolePickupView_norepeatBase
*/
@
Prop
()
public
viewdata
!
:
string
;
/**
* 传入视图参数
*
* @type {string}
* @memberof SysRolePickupView_norepeatBase
*/
@
Prop
()
public
viewparam
!
:
string
;
/**
* 视图默认使用
*
* @type {boolean}
* @memberof SysRolePickupView_norepeatBase
*/
@
Prop
({
default
:
true
})
public
viewDefaultUsage
!
:
boolean
;
/**
* 视图默认使用
*
* @type {string}
* @memberof SysRolePickupView_norepeatBase
*/
@
Inject
({
from
:
'navModel'
,
default
:
'tab'
})
public
navModel
!
:
string
;
/**
* 视图标识
*
* @type {string}
* @memberof SysRolePickupView_norepeatBase
*/
public
viewtag
:
string
=
'ba8e31e716b14bba81cdf1281fc76197'
;
/**
* 自定义视图导航上下文集合
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
public
customViewNavContexts
:
any
=
{
};
/**
* 自定义视图导航参数集合
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
public
customViewParams
:
any
=
{
};
/**
* 视图模型数据
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
public
model
:
any
=
{
srfCaption
:
'entities.sysrole.views.pickupview_norepeat.caption'
,
srfTitle
:
'entities.sysrole.views.pickupview_norepeat.title'
,
srfSubTitle
:
'entities.sysrole.views.pickupview_norepeat.subtitle'
,
dataInfo
:
''
}
/**
* 视图参数变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof SysRolePickupView_norepeatBase
*/
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
this
.
viewparams
=
{};
if
(
typeof
newVal
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
else
{
this
.
viewparams
=
Util
.
deepCopy
(
this
.
viewparam
);
}
if
(
this
.
viewparams
.
selectedData
){
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewparams
.
selectedData
);
}
}
}
/**
* 处理应用上下文变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof SysRolePickupView_norepeatBase
*/
@
Watch
(
'viewdata'
)
onViewData
(
newVal
:
any
,
oldVal
:
any
)
{
const
_this
:
any
=
this
;
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
engine
)
{
this
.
$nextTick
(()
=>
{
_this
.
parseViewParam
();
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
/**
* 容器模型
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
public
containerModel
:
any
=
{
view_pickupviewpanel
:
{
name
:
'pickupviewpanel'
,
type
:
'PICKUPVIEWPANEL'
},
view_okbtn
:
{
name
:
'okbtn'
,
type
:
'button'
,
text
:
'确定'
,
disabled
:
true
},
view_cancelbtn
:
{
name
:
'cancelbtn'
,
type
:
'button'
,
text
:
'取消'
,
disabled
:
false
},
view_leftbtn
:
{
name
:
'leftbtn'
,
type
:
'button'
,
text
:
'左移'
,
disabled
:
true
},
view_rightbtn
:
{
name
:
'rightbtn'
,
type
:
'button'
,
text
:
'右移'
,
disabled
:
true
},
view_allleftbtn
:
{
name
:
'allleftbtn'
,
type
:
'button'
,
text
:
'全部左移'
,
disabled
:
true
},
view_allrightbtn
:
{
name
:
'allrightbtn'
,
type
:
'button'
,
text
:
'全部右移'
,
disabled
:
true
},
};
/**
* 计数器刷新
*
* @memberof SysRolePickupView_norepeatBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof SysRolePickupView_norepeatBase
*/
public
viewState
:
Subject
<
ViewState
>
=
new
Subject
();
/**
* 视图引擎
*
* @public
* @type {Engine}
* @memberof SysRolePickupView_norepeatBase
*/
public
engine
:
PickupViewEngine
=
new
PickupViewEngine
();
/**
* 引擎初始化
*
* @public
* @memberof SysRolePickupView_norepeatBase
*/
public
engineInit
():
void
{
this
.
engine
.
init
({
view
:
this
,
pickupviewpanel
:
this
.
$refs
.
pickupviewpanel
,
keyPSDEField
:
'sysrole'
,
majorPSDEField
:
'rolename'
,
isLoadDefault
:
true
,
});
}
/**
* 应用导航服务
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
public
navDataService
=
NavDataService
.
getInstance
(
this
.
$store
);
/**
* 导航服务事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SysRolePickupView_norepeatBase
*/
public
serviceStateEvent
:
Subscription
|
undefined
;
/**
* 门户部件状态对象
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
@
Prop
()
public
portletState
?:
any
;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof SysRolePickupView_norepeatBase
*/
public
portletStateEvent
:
Subscription
|
undefined
;
/**
* 应用上下文
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
public
context
:
any
=
{};
/**
* 视图参数
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
public
viewparams
:
any
=
{};
/**
* 视图缓存数据
*
* @type {*}
* @memberof SysRolePickupView_norepeatBase
*/
public
viewCacheData
:
any
;
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof SysRolePickupView_norepeatBase
*/
public
counterServiceArray
:
Array
<
any
>
=
[];
/**
* 解析视图参数
*
* @public
* @memberof SysRolePickupView_norepeatBase
*/
public
parseViewParam
(
inputvalue
:
any
=
null
):
void
{
for
(
let
key
in
this
.
context
){
delete
this
.
context
[
key
];
}
if
(
this
.
$store
.
getters
.
getAppData
()
&&
this
.
$store
.
getters
.
getAppData
().
context
){
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
if
(
this
.
context
&&
this
.
context
.
srfparentkey
){
Object
.
assign
(
this
.
viewparams
,{
srfparentkey
:
this
.
context
.
srfparentkey
});
}
this
.
handleCustomViewData
();
return
;
}
const
path
=
(
this
.
$route
.
matched
[
this
.
$route
.
matched
.
length
-
1
]).
path
;
const
keys
:
Array
<
any
>
=
[];
const
curReg
=
this
.
$pathToRegExp
.
pathToRegexp
(
path
,
keys
);
const
matchArray
=
curReg
.
exec
(
this
.
$route
.
path
);
let
tempValue
:
Object
=
{};
keys
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
.
name
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
this
.
$viewTool
.
formatRouteParams
(
tempValue
,
this
.
$route
,
this
.
context
,
this
.
viewparams
);
if
(
inputvalue
){
Object
.
assign
(
this
.
context
,{
'sysrole'
:
inputvalue
});
}
//初始化视图唯一标识
Object
.
assign
(
this
.
context
,{
srfsessionid
:
this
.
$util
.
createUUID
()});
this
.
handleCustomViewData
();
//初始化导航数据
this
.
initNavDataWithRoute
();
}
/**
* 处理自定义视图数据
*
* @memberof SysRolePickupView_norepeatBase
*/
public
handleCustomViewData
(){
if
(
Object
.
keys
(
this
.
customViewNavContexts
).
length
>
0
){
Object
.
keys
(
this
.
customViewNavContexts
).
forEach
((
item
:
any
)
=>
{
let
tempContext
:
any
=
{};
let
curNavContext
:
any
=
this
.
customViewNavContexts
[
item
];
this
.
handleCustomDataLogic
(
curNavContext
,
tempContext
,
item
);
Object
.
assign
(
this
.
context
,
tempContext
);
})
}
if
(
Object
.
keys
(
this
.
customViewParams
).
length
>
0
){
Object
.
keys
(
this
.
customViewParams
).
forEach
((
item
:
any
)
=>
{
let
tempParam
:
any
=
{};
let
curNavParam
:
any
=
this
.
customViewParams
[
item
];
this
.
handleCustomDataLogic
(
curNavParam
,
tempParam
,
item
);
Object
.
assign
(
this
.
viewparams
,
tempParam
);
})
}
}
/**
* 处理自定义视图数据逻辑
*
* @memberof SysRolePickupView_norepeatBase
*/
public
handleCustomDataLogic
(
curNavData
:
any
,
tempData
:
any
,
item
:
string
){
// 直接值直接赋值
if
(
curNavData
.
isRawValue
){
if
(
Object
.
is
(
curNavData
.
value
,
"null"
)
||
Object
.
is
(
curNavData
.
value
,
""
)){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
curNavData
.
value
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
else
{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if
(
this
.
context
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
context
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
if
(
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()]
!=
null
){
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
this
.
viewparams
[(
curNavData
.
value
).
toLowerCase
()],
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
else
{
Object
.
defineProperty
(
tempData
,
item
.
toLowerCase
(),
{
value
:
null
,
writable
:
true
,
enumerable
:
true
,
configurable
:
true
});
}
}
}
}
/**
* 初始化导航数据(路由模式)
*
* @memberof SysRolePickupView_norepeatBase
*/
public
initNavDataWithRoute
(
data
:
any
=
null
,
isNew
:
boolean
=
false
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavData
({
id
:
'sys-role-pickup-view-norepeat'
,
tag
:
this
.
viewtag
,
srfkey
:
isNew
?
null
:
this
.
context
.
sysrole
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
});
}
}
/**
* 初始化导航数据(分页模式)
*
* @memberof SysRolePickupView_norepeatBase
*/
public
initNavDataWithTab
(
data
:
any
=
null
,
isOnlyAdd
:
boolean
=
true
,
isAlways
:
boolean
=
false
){
if
(
isAlways
||
(
this
.
viewDefaultUsage
&&
!
Object
.
is
(
this
.
navModel
,
"route"
))
){
this
.
navDataService
.
addNavDataByOnly
({
id
:
'sys-role-pickup-view-norepeat'
,
tag
:
this
.
viewtag
,
srfkey
:
this
.
context
.
sysrole
,
title
:
this
.
$t
(
this
.
model
.
srfCaption
),
data
:
data
,
context
:
this
.
context
,
viewparams
:
this
.
viewparams
,
path
:
this
.
$route
.
fullPath
},
isOnlyAdd
);
}
}
/**
* Vue声明周期
*
* @memberof SysRolePickupView_norepeatBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof SysRolePickupView_norepeatBase
*/
public
afterCreated
(){
let
_this
:
any
=
this
;
const
secondtag
=
_this
.
$util
.
createUUID
();
_this
.
$store
.
commit
(
'viewaction/createdView'
,
{
viewtag
:
_this
.
viewtag
,
secondtag
:
secondtag
});
_this
.
viewtag
=
secondtag
;
_this
.
parseViewParam
();
_this
.
serviceStateEvent
=
_this
.
navDataService
.
serviceState
.
subscribe
(({
action
,
name
,
data
}:{
action
:
string
,
name
:
any
,
data
:
any
})
=>
{
if
(
!
Object
.
is
(
name
,
'sys-role-pickup-view-norepeat'
)){
return
;
}
if
(
Object
.
is
(
action
,
'viewrefresh'
))
{
_this
.
$nextTick
(()
=>
{
_this
.
parseViewParam
(
data
);
if
(
_this
.
engine
){
_this
.
engine
.
load
();
}
});
}
});
if
(
_this
.
portletState
){
_this
.
portletStateEvent
=
_this
.
portletState
.
subscribe
((
res
:
any
)
=>
{
if
(
!
Object
.
is
(
res
.
name
,
'SysRolePickupView_norepeat'
)){
return
;
}
if
(
Object
.
is
(
res
.
action
,
'refresh'
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
){
_this
.
refresh
();
}
})
}
}
/**
* 销毁之前
*
* @memberof SysRolePickupView_norepeatBase
*/
public
beforeDestroy
()
{
this
.
$store
.
commit
(
'viewaction/removeView'
,
this
.
viewtag
);
}
/**
* Vue声明周期(组件初始化完毕)
*
* @memberof SysRolePickupView_norepeatBase
*/
public
mounted
()
{
this
.
afterMounted
();
}
/**
* 执行mounted后的逻辑
*
* @memberof SysRolePickupView_norepeatBase
*/
public
afterMounted
(){
const
_this
:
any
=
this
;
_this
.
engineInit
();
if
(
_this
.
loadModel
&&
_this
.
loadModel
instanceof
Function
)
{
_this
.
loadModel
();
}
if
(
this
.
viewparams
.
selectedData
){
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'selectionchange'
,
this
.
viewparams
.
selectedData
);
}
}
/**
* pickupviewpanel 部件 selectionchange 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupView_norepeatBase
*/
public
pickupviewpanel_selectionchange
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'selectionchange'
,
$event
);
}
/**
* pickupviewpanel 部件 activated 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupView_norepeatBase
*/
public
pickupviewpanel_activated
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'activated'
,
$event
);
}
/**
* pickupviewpanel 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof SysRolePickupView_norepeatBase
*/
public
pickupviewpanel_load
(
$event
:
any
,
$event2
?:
any
)
{
this
.
engine
.
onCtrlEvent
(
'pickupviewpanel'
,
'load'
,
$event
);
}
/**
* 关闭视图
*
* @param {any[]} args
* @memberof SysRolePickupView_norepeatBase
*/
public
closeView
(
args
:
any
[]):
void
{
let
_view
:
any
=
this
;
if
(
_view
.
viewdata
)
{
_view
.
$emit
(
'viewdataschange'
,
[
args
]);
_view
.
$emit
(
'close'
,
[
args
]);
}
else
if
(
_view
.
$tabPageExp
)
{
_view
.
$tabPageExp
.
onClose
(
_view
.
$route
.
fullPath
);
}
}
/**
* 销毁视图回调
*
* @memberof SysRolePickupView_norepeatBase
*/
public
destroyed
(){
this
.
afterDestroyed
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof SysRolePickupView_norepeatBase
*/
public
afterDestroyed
(){
if
(
this
.
viewDefaultUsage
){
let
localStoreLength
=
Object
.
keys
(
localStorage
);
if
(
localStoreLength
.
length
>
0
){
localStoreLength
.
forEach
((
item
:
string
)
=>
{
if
(
item
.
startsWith
(
this
.
context
.
srfsessionid
)){
localStorage
.
removeItem
(
item
);
}
})
}
if
(
Object
.
is
(
this
.
navModel
,
"tab"
)){
this
.
navDataService
.
removeNavDataByTag
(
this
.
viewtag
);
}
if
(
this
.
serviceStateEvent
)
{
this
.
serviceStateEvent
.
unsubscribe
();
}
}
// 销毁计数器定时器
if
(
this
.
counterServiceArray
&&
this
.
counterServiceArray
.
length
>
0
){
this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
destroyCounter
&&
item
.
destroyCounter
instanceof
Function
){
item
.
destroyCounter
();
}
})
}
if
(
this
.
portletStateEvent
){
this
.
portletStateEvent
.
unsubscribe
();
}
}
/**
* 选中数据的字符串
*
* @type {string}
* @memberof SysRolePickupView_norepeatBase
*/
public
selectedData
:
string
=
""
;
/**
* 视图选中数据
*
* @type {any[]}
* @memberof SysRolePickupView_norepeatBase
*/
public
viewSelections
:
any
[]
=
[];
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof SysRolePickupView_norepeatBase
*/
@
Prop
({
default
:
true
})
public
isShowButton
!
:
boolean
;
/**
* 是否单选
*
* @type {boolean}
* @memberof SysRolePickupView_norepeatBase
*/
public
isSingleSelect
:
boolean
=
true
;
/**
* 确定
*
* @memberof SysRolePickupView_norepeatBase
*/
public
onClickOk
():
void
{
this
.
$emit
(
'viewdataschange'
,
this
.
viewSelections
);
this
.
$emit
(
'close'
,
null
);
}
/**
* 取消
*
* @memberof SysRolePickupView_norepeatBase
*/
public
onClickCancel
():
void
{
this
.
$emit
(
'viewdataschange'
,
null
);
this
.
$emit
(
'close'
,
null
);
}
}
</
script
>
<
style
lang=
'less'
>
@import './sys-role-pickup-view-norepeat.less';
</
style
>
\ No newline at end of file
app_web/src/pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat.less
0 → 100644
浏览文件 @
dd51a217
.sys-role-pickup-view-norepeat{
position: relative;
}
.pickup-view {
>.pickupviewpanel {
flex-grow: 1;
display: flex;
justify-content: flex-end;
height: calc(100% - 64px);
}
>.footer {
height: 64px;
}
}
\ No newline at end of file
app_web/src/pages/uaa/sys-role-pickup-view-norepeat/sys-role-pickup-view-norepeat.vue
0 → 100644
浏览文件 @
dd51a217
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
SysRolePickupView_norepeatBase
from
'./sys-role-pickup-view-norepeat-base.vue'
;
import
view_pickupviewpanel
from
'@widgets/sys-role/pickup-view-norepeatpickupviewpanel-pickupviewpanel/pickup-view-norepeatpickupviewpanel-pickupviewpanel.vue'
;
@
Component
({
components
:
{
view_pickupviewpanel
,
},
beforeRouteEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
((
vm
:
any
)
=>
{
if
(
!
Object
.
is
(
vm
.
navModel
,
"route"
)){
vm
.
initNavDataWithTab
(
vm
.
viewCacheData
);
}
vm
.
$store
.
commit
(
'addCurPageViewtag'
,
{
fullPath
:
to
.
fullPath
,
viewtag
:
vm
.
viewtag
});
});
},
})
export
default
class
SysRolePickupView_norepeat
extends
SysRolePickupView_norepeatBase
{
}
</
script
>
\ No newline at end of file
app_web/src/service/sys-role/sys-role-service-base.ts
浏览文件 @
dd51a217
...
@@ -200,4 +200,33 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -200,4 +200,33 @@ export default class SysRoleServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/sysroles/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/sysroles/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* FetchNoRepeat接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
FetchNoRepeat
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysroles/fetchnorepeat`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchNoRepeat接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
searchNoRepeat
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/sysroles/searchnorepeat`
,
tempData
,
isloading
);
}
}
}
\ No newline at end of file
app_web/src/store/modules/view-action/state.ts
浏览文件 @
dd51a217
...
@@ -133,6 +133,15 @@ export const viewstate: any = {
...
@@ -133,6 +133,15 @@ export const viewstate: any = {
'6869875c7409bd1dddd3d0fc62c502db'
,
'6869875c7409bd1dddd3d0fc62c502db'
,
],
],
},
},
{
viewtag
:
'33f07a06a447590e710527a19d5f02c7'
,
viewmodule
:
'uaa'
,
viewname
:
'SysRolePickupGridView_norepeat'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
],
},
{
{
viewtag
:
'349cda61e4dc5e38045ef7c77321d1c7'
,
viewtag
:
'349cda61e4dc5e38045ef7c77321d1c7'
,
viewmodule
:
'uaa'
,
viewmodule
:
'uaa'
,
...
@@ -255,7 +264,7 @@ export const viewstate: any = {
...
@@ -255,7 +264,7 @@ export const viewstate: any = {
viewdatachange
:
false
,
viewdatachange
:
false
,
refviews
:
[
refviews
:
[
'6736591aca71edc23df760e278378566'
,
'6736591aca71edc23df760e278378566'
,
'
26cc2d5c69f1525eaa415b7de1a0d4a6
'
,
'
ba8e31e716b14bba81cdf1281fc76197
'
,
'983f3ae1533a5cd62619dedb79bb4b28'
,
'983f3ae1533a5cd62619dedb79bb4b28'
,
],
],
},
},
...
@@ -314,7 +323,7 @@ export const viewstate: any = {
...
@@ -314,7 +323,7 @@ export const viewstate: any = {
viewdatachange
:
false
,
viewdatachange
:
false
,
refviews
:
[
refviews
:
[
'6736591aca71edc23df760e278378566'
,
'6736591aca71edc23df760e278378566'
,
'
26cc2d5c69f1525eaa415b7de1a0d4a6
'
,
'
ba8e31e716b14bba81cdf1281fc76197
'
,
'983f3ae1533a5cd62619dedb79bb4b28'
,
'983f3ae1533a5cd62619dedb79bb4b28'
,
],
],
},
},
...
@@ -367,6 +376,16 @@ export const viewstate: any = {
...
@@ -367,6 +376,16 @@ export const viewstate: any = {
'53385c6effc6ba778dbccf82286fbe4f'
,
'53385c6effc6ba778dbccf82286fbe4f'
,
],
],
},
},
{
viewtag
:
'ba8e31e716b14bba81cdf1281fc76197'
,
viewmodule
:
'uaa'
,
viewname
:
'SysRolePickupView_norepeat'
,
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'33f07a06a447590e710527a19d5f02c7'
,
],
},
{
{
viewtag
:
'd818f976305327fde2c09de9064ebefb'
,
viewtag
:
'd818f976305327fde2c09de9064ebefb'
,
viewmodule
:
'uaa'
,
viewmodule
:
'uaa'
,
...
...
app_web/src/uiservice/sys-role/sys-role-ui-service-base.ts
浏览文件 @
dd51a217
...
@@ -98,11 +98,13 @@ export default class SysRoleUIServiceBase extends UIService {
...
@@ -98,11 +98,13 @@ export default class SysRoleUIServiceBase extends UIService {
public
initViewMap
(){
public
initViewMap
(){
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-grid-view'
});
this
.
allViewMap
.
set
(
'MDATAVIEW:'
,{
viewname
:
'gridview'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-grid-view'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'sysroles'
,
component
:
'sys-rolepickup-view'
});
this
.
allViewMap
.
set
(
'PICKUPVIEW:'
,{
viewname
:
'pickupview'
,
srfappde
:
'sysroles'
,
component
:
'sys-rolepickup-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'pickupgridview_norepeat'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-pickup-grid-view-norepeat'
});
this
.
allViewMap
.
set
(
'REDIRECTVIEW:'
,{
viewname
:
'redirectview'
,
srfappde
:
'sysroles'
,
component
:
'sys-roleredirect-view'
});
this
.
allViewMap
.
set
(
'REDIRECTVIEW:'
,{
viewname
:
'redirectview'
,
srfappde
:
'sysroles'
,
component
:
'sys-roleredirect-view'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-edit-view'
});
this
.
allViewMap
.
set
(
'EDITVIEW:'
,{
viewname
:
'editview'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-edit-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'pickupgridview'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-pickup-grid-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'pickupgridview'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-pickup-grid-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'editview2'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-edit-view2'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'editview2'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-edit-view2'
});
this
.
allViewMap
.
set
(
'MPICKUPVIEW:'
,{
viewname
:
'mpickupview'
,
srfappde
:
'sysroles'
,
component
:
'sys-rolempickup-view'
});
this
.
allViewMap
.
set
(
'MPICKUPVIEW:'
,{
viewname
:
'mpickupview'
,
srfappde
:
'sysroles'
,
component
:
'sys-rolempickup-view'
});
this
.
allViewMap
.
set
(
':'
,{
viewname
:
'pickupview_norepeat'
,
srfappde
:
'sysroles'
,
component
:
'sys-role-pickup-view-norepeat'
});
}
}
/**
/**
...
...
app_web/src/widgets/sys-app/main-grid/main-grid-base.vue
浏览文件 @
dd51a217
...
@@ -452,7 +452,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -452,7 +452,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @type {*}
* @memberof MainBase
* @memberof MainBase
*/
*/
public
A
ctionModel
:
any
=
{
public
a
ctionModel
:
any
=
{
};
};
/**
/**
...
@@ -948,7 +948,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -948,7 +948,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
* @memberof MainBase
*/
*/
public
getActionState
(
data
:
any
){
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
A
ctionModel
));
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
a
ctionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
return
tempActionModel
;
...
@@ -1550,6 +1550,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1550,6 +1550,10 @@ export default class MainBase extends Vue implements ControlInterface {
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
this
.
refresh
([
data
]);
this
.
refresh
([
data
]);
}
}
})
})
...
@@ -1668,6 +1672,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1668,6 +1672,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
return
codelist
;
return
codelist
;
}
}
/**
/**
* 根据分组代码表绘制分组列表
* 根据分组代码表绘制分组列表
*
*
...
@@ -1688,13 +1693,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1688,13 +1693,12 @@ export default class MainBase extends Vue implements ControlInterface {
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
if
(
Object
.
is
(
group
.
label
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
}
}
}
else
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
@@ -1720,10 +1724,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1720,10 +1724,9 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
arr
[
0
].
label
));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
}
if
(
i
<
0
){
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
...
@@ -1770,17 +1773,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1770,17 +1773,10 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
isEnableGroup
)
return
;
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
allGroup
.
push
(
arr
[
0
].
label
);
}
else
{
allGroup
.
push
(
item
[
this
.
groupAppField
]);
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
}
}
});
});
let
groupTree
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
allGroup
=
[...
new
Set
(
allGroup
)];
...
@@ -1791,14 +1787,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1791,14 +1787,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
...
app_web/src/widgets/sys-auth-log/main-grid/main-grid-base.vue
浏览文件 @
dd51a217
...
@@ -333,7 +333,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -333,7 +333,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @type {*}
* @memberof MainBase
* @memberof MainBase
*/
*/
public
A
ctionModel
:
any
=
{
public
a
ctionModel
:
any
=
{
};
};
/**
/**
...
@@ -820,7 +820,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -820,7 +820,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
* @memberof MainBase
*/
*/
public
getActionState
(
data
:
any
){
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
A
ctionModel
));
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
a
ctionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
return
tempActionModel
;
...
@@ -1369,6 +1369,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1369,6 +1369,10 @@ export default class MainBase extends Vue implements ControlInterface {
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
this
.
refresh
([
data
]);
this
.
refresh
([
data
]);
}
}
})
})
...
@@ -1487,6 +1491,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1487,6 +1491,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
return
codelist
;
return
codelist
;
}
}
/**
/**
* 根据分组代码表绘制分组列表
* 根据分组代码表绘制分组列表
*
*
...
@@ -1507,13 +1512,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1507,13 +1512,12 @@ export default class MainBase extends Vue implements ControlInterface {
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
if
(
Object
.
is
(
group
.
label
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
}
}
}
else
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
@@ -1538,10 +1542,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1538,10 +1542,9 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
arr
[
0
].
label
));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
}
if
(
i
<
0
){
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
...
@@ -1587,17 +1590,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1587,17 +1590,10 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
isEnableGroup
)
return
;
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
allGroup
.
push
(
arr
[
0
].
label
);
}
else
{
allGroup
.
push
(
item
[
this
.
groupAppField
]);
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
}
}
});
});
let
groupTree
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
allGroup
=
[...
new
Set
(
allGroup
)];
...
@@ -1608,14 +1604,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1608,14 +1604,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
...
app_web/src/widgets/sys-open-access/main-grid/main-grid-base.vue
浏览文件 @
dd51a217
...
@@ -323,7 +323,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -323,7 +323,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @type {*}
* @memberof MainBase
* @memberof MainBase
*/
*/
public
A
ctionModel
:
any
=
{
public
a
ctionModel
:
any
=
{
};
};
/**
/**
...
@@ -801,7 +801,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -801,7 +801,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
* @memberof MainBase
*/
*/
public
getActionState
(
data
:
any
){
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
A
ctionModel
));
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
a
ctionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
return
tempActionModel
;
...
@@ -1358,6 +1358,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1358,6 +1358,10 @@ export default class MainBase extends Vue implements ControlInterface {
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
this
.
refresh
([
data
]);
this
.
refresh
([
data
]);
}
}
})
})
...
@@ -1476,6 +1480,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1476,6 +1480,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
return
codelist
;
return
codelist
;
}
}
/**
/**
* 根据分组代码表绘制分组列表
* 根据分组代码表绘制分组列表
*
*
...
@@ -1496,13 +1501,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1496,13 +1501,12 @@ export default class MainBase extends Vue implements ControlInterface {
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
if
(
Object
.
is
(
group
.
label
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
}
}
}
else
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
@@ -1526,10 +1530,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1526,10 +1530,9 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
arr
[
0
].
label
));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
}
if
(
i
<
0
){
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
...
@@ -1574,17 +1577,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1574,17 +1577,10 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
isEnableGroup
)
return
;
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
allGroup
.
push
(
arr
[
0
].
label
);
}
else
{
allGroup
.
push
(
item
[
this
.
groupAppField
]);
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
}
}
});
});
let
groupTree
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
allGroup
=
[...
new
Set
(
allGroup
)];
...
@@ -1595,14 +1591,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1595,14 +1591,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
...
app_web/src/widgets/sys-permission/main-grid/main-grid-base.vue
浏览文件 @
dd51a217
...
@@ -259,7 +259,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -259,7 +259,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @type {*}
* @memberof MainBase
* @memberof MainBase
*/
*/
public
A
ctionModel
:
any
=
{
public
a
ctionModel
:
any
=
{
};
};
/**
/**
...
@@ -678,7 +678,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -678,7 +678,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
* @memberof MainBase
*/
*/
public
getActionState
(
data
:
any
){
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
A
ctionModel
));
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
a
ctionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
return
tempActionModel
;
...
@@ -1219,6 +1219,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1219,6 +1219,10 @@ export default class MainBase extends Vue implements ControlInterface {
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
this
.
refresh
([
data
]);
this
.
refresh
([
data
]);
}
}
})
})
...
@@ -1337,6 +1341,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1337,6 +1341,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
return
codelist
;
return
codelist
;
}
}
/**
/**
* 根据分组代码表绘制分组列表
* 根据分组代码表绘制分组列表
*
*
...
@@ -1357,13 +1362,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1357,13 +1362,12 @@ export default class MainBase extends Vue implements ControlInterface {
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
if
(
Object
.
is
(
group
.
label
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
}
}
}
else
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
@@ -1382,10 +1386,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1382,10 +1386,9 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
arr
[
0
].
label
));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
}
if
(
i
<
0
){
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
...
@@ -1425,17 +1428,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1425,17 +1428,10 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
isEnableGroup
)
return
;
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
allGroup
.
push
(
arr
[
0
].
label
);
}
else
{
allGroup
.
push
(
item
[
this
.
groupAppField
]);
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
}
}
});
});
let
groupTree
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
allGroup
=
[...
new
Set
(
allGroup
)];
...
@@ -1446,14 +1442,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1446,14 +1442,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
...
app_web/src/widgets/sys-role-permission/main-grid/main-grid-base.vue
浏览文件 @
dd51a217
...
@@ -285,7 +285,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -285,7 +285,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @type {*}
* @memberof MainBase
* @memberof MainBase
*/
*/
public
A
ctionModel
:
any
=
{
public
a
ctionModel
:
any
=
{
};
};
/**
/**
...
@@ -713,7 +713,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -713,7 +713,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
* @memberof MainBase
*/
*/
public
getActionState
(
data
:
any
){
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
A
ctionModel
));
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
a
ctionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
return
tempActionModel
;
...
@@ -1254,6 +1254,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1254,6 +1254,10 @@ export default class MainBase extends Vue implements ControlInterface {
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
this
.
refresh
([
data
]);
this
.
refresh
([
data
]);
}
}
})
})
...
@@ -1372,6 +1376,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1372,6 +1376,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
return
codelist
;
return
codelist
;
}
}
/**
/**
* 根据分组代码表绘制分组列表
* 根据分组代码表绘制分组列表
*
*
...
@@ -1392,13 +1397,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1392,13 +1397,12 @@ export default class MainBase extends Vue implements ControlInterface {
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
if
(
Object
.
is
(
group
.
label
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
}
}
}
else
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
@@ -1418,10 +1422,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1418,10 +1422,9 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
arr
[
0
].
label
));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
}
if
(
i
<
0
){
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
...
@@ -1462,17 +1465,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1462,17 +1465,10 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
isEnableGroup
)
return
;
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
allGroup
.
push
(
arr
[
0
].
label
);
}
else
{
allGroup
.
push
(
item
[
this
.
groupAppField
]);
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
}
}
});
});
let
groupTree
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
allGroup
=
[...
new
Set
(
allGroup
)];
...
@@ -1483,14 +1479,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1483,14 +1479,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
...
app_web/src/widgets/sys-role/main-form/main-form-service.ts
浏览文件 @
dd51a217
...
@@ -90,8 +90,8 @@ export default class MainService extends ControlService {
...
@@ -90,8 +90,8 @@ export default class MainService extends ControlService {
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
public
getItems
(
serviceName
:
string
,
interfaceName
:
string
,
context
:
any
=
{},
data
:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
data
.
page
=
data
.
page
?
data
.
page
:
0
;
data
.
page
=
data
.
page
?
data
.
page
:
0
;
data
.
size
=
data
.
size
?
data
.
size
:
1000
;
data
.
size
=
data
.
size
?
data
.
size
:
1000
;
if
(
Object
.
is
(
serviceName
,
'SysRoleService'
)
&&
Object
.
is
(
interfaceName
,
'Fetch
Defaul
t'
))
{
if
(
Object
.
is
(
serviceName
,
'SysRoleService'
)
&&
Object
.
is
(
interfaceName
,
'Fetch
NoRepea
t'
))
{
return
this
.
doItems
(
this
.
appEntityService
.
Fetch
Defaul
t
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'roleid'
,
'sysrole'
);
return
this
.
doItems
(
this
.
appEntityService
.
Fetch
NoRepea
t
(
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
,
isloading
),
'roleid'
,
'sysrole'
);
}
}
return
Promise
.
reject
([])
return
Promise
.
reject
([])
...
...
app_web/src/widgets/sys-role/main-grid/main-grid-base.vue
浏览文件 @
dd51a217
...
@@ -314,7 +314,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -314,7 +314,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @type {*}
* @memberof MainBase
* @memberof MainBase
*/
*/
public
A
ctionModel
:
any
=
{
public
a
ctionModel
:
any
=
{
};
};
/**
/**
...
@@ -769,7 +769,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -769,7 +769,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
* @memberof MainBase
*/
*/
public
getActionState
(
data
:
any
){
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
A
ctionModel
));
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
a
ctionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
return
tempActionModel
;
...
@@ -1310,6 +1310,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1310,6 +1310,10 @@ export default class MainBase extends Vue implements ControlInterface {
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
this
.
refresh
([
data
]);
this
.
refresh
([
data
]);
}
}
})
})
...
@@ -1428,6 +1432,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1428,6 +1432,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
return
codelist
;
return
codelist
;
}
}
/**
/**
* 根据分组代码表绘制分组列表
* 根据分组代码表绘制分组列表
*
*
...
@@ -1448,13 +1453,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1448,13 +1453,12 @@ export default class MainBase extends Vue implements ControlInterface {
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
if
(
Object
.
is
(
group
.
label
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
}
}
}
else
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
@@ -1477,10 +1481,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1477,10 +1481,9 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
arr
[
0
].
label
));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
}
if
(
i
<
0
){
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
...
@@ -1524,17 +1527,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1524,17 +1527,10 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
isEnableGroup
)
return
;
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
allGroup
.
push
(
arr
[
0
].
label
);
}
else
{
allGroup
.
push
(
item
[
this
.
groupAppField
]);
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
}
}
});
});
let
groupTree
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
allGroup
=
[...
new
Set
(
allGroup
)];
...
@@ -1545,14 +1541,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1545,14 +1541,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
...
app_web/src/widgets/sys-role/pickup-view-norepeatpickupviewpanel-pickupviewpanel/pickup-view-norepeatpickupviewpanel-pickupviewpanel-base.vue
0 → 100644
浏览文件 @
dd51a217
<
template
>
<div
class=
'pickupviewpanel'
>
<component
v-if=
"inited && view.viewname && !Object.is(view.viewname, '')"
:is=
"view.viewname"
class=
"viewcontainer3"
:viewdata=
"viewdata"
:viewparam=
"viewparam"
:viewDefaultUsage=
"false"
:isSingleSelect=
"isSingleSelect"
:selectedData=
"selectedData"
:isShowButton=
"isShowButton"
@
viewdataschange=
"onViewDatasChange"
@
viewdatasactivated=
"viewDatasActivated"
@
viewload=
"onViewLoad"
>
</component>
</div>
</
template
>
<
script
lang=
'tsx'
>
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
,
Model
,
Inject
}
from
'vue-property-decorator'
;
import
{
CreateElement
}
from
'vue'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
import
{
ControlInterface
}
from
'@/interface/control'
;
import
{
UIActionTool
,
Util
,
ViewTool
}
from
'@/utils'
;
import
NavDataService
from
'@/service/app/navdata-service'
;
import
AppCenterService
from
"@service/app/app-center-service"
;
import
SysRoleService
from
'@/service/sys-role/sys-role-service'
;
import
PickupView_norepeatpickupviewpanelService
from
'./pickup-view-norepeatpickupviewpanel-pickupviewpanel-service'
;
import
SysRoleUIService
from
'@/uiservice/sys-role/sys-role-ui-service'
;
import
PickupView_norepeatpickupviewpanelModel
from
'./pickup-view-norepeatpickupviewpanel-pickupviewpanel-model'
;
@
Component
({
components
:
{
}
})
export
default
class
PickupView_norepeatpickupviewpanelBase
extends
Vue
implements
ControlInterface
{
/**
* 名称
*
* @type {string}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@
Prop
()
public
name
?:
string
;
/**
* 视图通讯对象
*
* @type {Subject<ViewState>}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@
Prop
()
public
viewState
!
:
Subject
<
ViewState
>
;
/**
* 应用上下文
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@
Prop
()
public
context
!
:
any
;
/**
* 视图参数
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 视图状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
viewStateEvent
:
Subscription
|
undefined
;
/**
* 获取部件类型
*
* @returns {string}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
getControlType
():
string
{
return
'PICKUPVIEWPANEL'
}
/**
* 建构部件服务对象
*
* @type {PickupView_norepeatpickupviewpanelService}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
service
:
PickupView_norepeatpickupviewpanelService
=
new
PickupView_norepeatpickupviewpanelService
({
$store
:
this
.
$store
});
/**
* 实体服务对象
*
* @type {SysRoleService}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
appEntityService
:
SysRoleService
=
new
SysRoleService
({
$store
:
this
.
$store
});
/**
* 转化数据
*
* @param {any} args
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
transformData
(
args
:
any
)
{
let
_this
:
any
=
this
;
if
(
_this
.
service
&&
_this
.
service
.
handleRequestData
instanceof
Function
&&
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)){
return
_this
.
service
.
handleRequestData
(
'transform'
,
_this
.
context
,
args
)[
'data'
];
}
}
/**
* 关闭视图
*
* @param {any} args
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
closeView
(
args
:
any
):
void
{
let
_this
:
any
=
this
;
_this
.
$emit
(
'closeview'
,
[
args
]);
}
/**
* 计数器刷新
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
counterRefresh
(){
const
_this
:
any
=
this
;
if
(
_this
.
counterServiceArray
&&
_this
.
counterServiceArray
.
length
>
0
){
_this
.
counterServiceArray
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
refreshData
&&
item
.
refreshData
instanceof
Function
){
item
.
refreshData
();
}
})
}
}
/**
* 选中数据字符串
*
* @type {string}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@
Prop
()
public
selectedData
?:
string
;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
getDatas
():
any
[]
{
return
[];
}
/**
* 获取单项树
*
* @returns {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
getData
():
any
{
return
{};
}
/**
* 视图名称
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
view
:
any
=
{
viewname
:
'sys-role-pickup-grid-view-norepeat'
,
data
:
{},
}
/**
* 局部上下文
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
localContext
:
any
=
null
;
/**
* 局部视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public
localViewParam
:
any
=
null
;
/**
* 视图数据
*
* @type {*}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
viewdata
:
string
=
JSON
.
stringify
(
this
.
context
);
/**
* 视图参数
*
* @type {*}
* @memberof PickupViewpickupviewpanel
*/
public
viewparam
:
string
=
JSON
.
stringify
(
this
.
viewparams
);
/**
* 是否显示按钮
*
* @type {boolean}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@
Prop
({
default
:
true
})
public
isShowButton
!
:
boolean
;
/**
* 是否单选
*
* @type {boolean}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
@
Prop
()
public
isSingleSelect
?:
boolean
;
/**
* 初始化完成
*
* @type {boolean}
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
inited
:
boolean
=
false
;
/**
* 视图数据变化
*
* @param {*} $event
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
onViewDatasChange
(
$event
:
any
):
void
{
if
(
$event
.
length
>
0
){
$event
.
forEach
((
item
:
any
,
index
:
any
)
=>
{
let
srfmajortext
=
item
.
srfmajortext
?
item
.
srfmajortext
:
item
[
'rolename'
];
if
(
srfmajortext
){
Object
.
assign
(
$event
[
index
],{
srfmajortext
:
srfmajortext
});
}
});
}
this
.
$emit
(
'selectionchange'
,
$event
);
}
/**
* 视图数据被激活
*
* @param {*} $event
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
viewDatasActivated
(
$event
:
any
):
void
{
this
.
$emit
(
'activated'
,
$event
);
}
/**
* 视图加载完成
*
* @param {*} $event
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
onViewLoad
(
$event
:
any
):
void
{
this
.
$emit
(
'load'
,
$event
);
}
/**
* vue 生命周期
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
created
()
{
this
.
afterCreated
();
}
/**
* 执行created后的逻辑
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
afterCreated
(){
this
.
initNavParam
();
if
(
this
.
viewState
)
{
this
.
viewStateEvent
=
this
.
viewState
.
subscribe
(({
tag
,
action
,
data
})
=>
{
if
(
!
Object
.
is
(
tag
,
this
.
name
))
{
return
;
}
if
(
Object
.
is
(
'load'
,
action
))
{
this
.
viewdata
=
JSON
.
stringify
(
this
.
context
);
this
.
viewparam
=
JSON
.
stringify
(
Object
.
assign
(
data
,
this
.
viewparams
));
this
.
inited
=
true
;
}
});
}
}
/**
* 初始化导航参数
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
initNavParam
(){
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
){
let
_context
:
any
=
this
.
$util
.
computedNavData
({},
this
.
context
,
this
.
viewparams
,
this
.
localContext
);
Object
.
assign
(
this
.
context
,
_context
);
}
if
(
this
.
localViewParam
&&
Object
.
keys
(
this
.
localViewParam
).
length
>
0
){
let
_param
:
any
=
this
.
$util
.
computedNavData
({},
this
.
context
,
this
.
viewparams
,
this
.
localViewParam
);
Object
.
assign
(
this
.
viewparams
,
_param
);
}
this
.
viewdata
=
JSON
.
stringify
(
this
.
context
);
this
.
viewparam
=
JSON
.
stringify
(
this
.
viewparams
);
}
/**
* vue 生命周期
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
destroyed
()
{
this
.
afterDestroy
();
}
/**
* 执行destroyed后的逻辑
*
* @memberof PickupView_norepeatpickupviewpanelBase
*/
public
afterDestroy
()
{
if
(
this
.
viewStateEvent
)
{
this
.
viewStateEvent
.
unsubscribe
();
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './pickup-view-norepeatpickupviewpanel-pickupviewpanel.less';
</
style
>
\ No newline at end of file
app_web/src/widgets/sys-role/pickup-view-norepeatpickupviewpanel-pickupviewpanel/pickup-view-norepeatpickupviewpanel-pickupviewpanel-model.ts
0 → 100644
浏览文件 @
dd51a217
/**
* PickupView_norepeatpickupviewpanel 部件模型
*
* @export
* @class PickupView_norepeatpickupviewpanelModel
*/
export
default
class
PickupView_norepeatpickupviewpanelModel
{
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof PickupView_norepeatpickupviewpanelModel
*/
public
getDataItems
():
any
[]
{
return
[
{
name
:
'sysrole'
,
prop
:
'roleid'
,
},
{
name
:
'rolename'
,
},
{
name
:
'memo'
,
},
{
name
:
'proleid'
,
},
{
name
:
'prolename'
,
},
{
name
:
'createdate'
,
},
{
name
:
'updatedate'
,
},
{
name
:
'createman'
,
},
{
name
:
'updateman'
,
},
]
}
}
\ No newline at end of file
app_web/src/widgets/sys-role/pickup-view-norepeatpickupviewpanel-pickupviewpanel/pickup-view-norepeatpickupviewpanel-pickupviewpanel-service.ts
0 → 100644
浏览文件 @
dd51a217
import
{
Http
}
from
'@/utils'
;
import
ControlService
from
'@/widgets/control-service'
;
/**
* PickupView_norepeatpickupviewpanel 部件服务对象
*
* @export
* @class PickupView_norepeatpickupviewpanelService
*/
export
default
class
PickupView_norepeatpickupviewpanelService
extends
ControlService
{
}
\ No newline at end of file
app_web/src/widgets/sys-role/pickup-view-norepeatpickupviewpanel-pickupviewpanel/pickup-view-norepeatpickupviewpanel-pickupviewpanel.less
0 → 100644
浏览文件 @
dd51a217
// this is less
.pickupviewpanel{
width: 100%;
}
\ No newline at end of file
app_web/src/widgets/sys-role/pickup-view-norepeatpickupviewpanel-pickupviewpanel/pickup-view-norepeatpickupviewpanel-pickupviewpanel.vue
0 → 100644
浏览文件 @
dd51a217
<
script
lang=
'tsx'
>
import
{
Component
}
from
'vue-property-decorator'
;
import
PickupView_norepeatpickupviewpanelBase
from
'./pickup-view-norepeatpickupviewpanel-pickupviewpanel-base.vue'
;
@
Component
({
components
:
{
}
})
export
default
class
PickupView_norepeatpickupviewpanel
extends
PickupView_norepeatpickupviewpanelBase
{
}
</
script
>
\ No newline at end of file
app_web/src/widgets/sys-user-role/main-grid/main-grid-base.vue
浏览文件 @
dd51a217
...
@@ -309,7 +309,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -309,7 +309,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @type {*}
* @memberof MainBase
* @memberof MainBase
*/
*/
public
A
ctionModel
:
any
=
{
public
a
ctionModel
:
any
=
{
};
};
/**
/**
...
@@ -755,7 +755,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -755,7 +755,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
* @memberof MainBase
*/
*/
public
getActionState
(
data
:
any
){
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
A
ctionModel
));
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
a
ctionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
return
tempActionModel
;
...
@@ -1296,6 +1296,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1296,6 +1296,10 @@ export default class MainBase extends Vue implements ControlInterface {
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
this
.
refresh
([
data
]);
this
.
refresh
([
data
]);
}
}
})
})
...
@@ -1414,6 +1418,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1414,6 +1418,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
return
codelist
;
return
codelist
;
}
}
/**
/**
* 根据分组代码表绘制分组列表
* 根据分组代码表绘制分组列表
*
*
...
@@ -1434,13 +1439,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1434,13 +1439,12 @@ export default class MainBase extends Vue implements ControlInterface {
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
if
(
Object
.
is
(
group
.
label
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
}
}
}
else
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
@@ -1462,10 +1466,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1462,10 +1466,9 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
arr
[
0
].
label
));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
}
if
(
i
<
0
){
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
...
@@ -1508,17 +1511,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1508,17 +1511,10 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
isEnableGroup
)
return
;
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
allGroup
.
push
(
arr
[
0
].
label
);
}
else
{
allGroup
.
push
(
item
[
this
.
groupAppField
]);
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
}
}
});
});
let
groupTree
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
allGroup
=
[...
new
Set
(
allGroup
)];
...
@@ -1529,14 +1525,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1529,14 +1525,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
...
app_web/src/widgets/sys-user/main-grid/main-grid-base.vue
浏览文件 @
dd51a217
...
@@ -307,7 +307,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -307,7 +307,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @type {*}
* @memberof MainBase
* @memberof MainBase
*/
*/
public
A
ctionModel
:
any
=
{
public
a
ctionModel
:
any
=
{
};
};
/**
/**
...
@@ -762,7 +762,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -762,7 +762,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
* @memberof MainBase
*/
*/
public
getActionState
(
data
:
any
){
public
getActionState
(
data
:
any
){
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
A
ctionModel
));
let
tempActionModel
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
a
ctionModel
));
let
targetData
:
any
=
this
.
transformData
(
data
);
let
targetData
:
any
=
this
.
transformData
(
data
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
ViewTool
.
calcActionItemAuthState
(
targetData
,
tempActionModel
,
this
.
appUIService
);
return
tempActionModel
;
return
tempActionModel
;
...
@@ -1303,6 +1303,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1303,6 +1303,10 @@ export default class MainBase extends Vue implements ControlInterface {
return
;
return
;
}
}
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
Object
.
is
(
action
,
'appRefresh'
)){
if
(
this
.
selections
&&
this
.
selections
.
length
>
0
)
{
this
.
selections
=
[];
this
.
$emit
(
'selectionchange'
,
this
.
selections
);
}
this
.
refresh
([
data
]);
this
.
refresh
([
data
]);
}
}
})
})
...
@@ -1421,6 +1425,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1421,6 +1425,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
return
codelist
;
return
codelist
;
}
}
/**
/**
* 根据分组代码表绘制分组列表
* 根据分组代码表绘制分组列表
*
*
...
@@ -1441,13 +1446,12 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1441,13 +1446,12 @@ export default class MainBase extends Vue implements ControlInterface {
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
j
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
if
(
Object
.
is
(
group
.
label
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
}
}
}
else
if
(
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
])){
}
else
if
(
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
groupById
=
Number
((
i
+
1
)
*
100
+
(
j
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
@@ -1470,10 +1474,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1470,10 +1474,9 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
let
i
:
number
=
0
;
let
i
:
number
=
0
;
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
arr
[
0
].
label
));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
label
,
item
[
this
.
groupAppField
]));
}
else
{
i
=
allGroup
.
findIndex
((
group
:
any
)
=>
Object
.
is
(
group
.
value
,
item
[
this
.
groupAppField
]));
}
}
if
(
i
<
0
){
if
(
i
<
0
){
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
item
.
groupById
=
Number
((
allGroup
.
length
+
1
)
*
100
+
(
index
+
1
)
*
1
);
...
@@ -1517,17 +1520,10 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1517,17 +1520,10 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
!
this
.
isEnableGroup
)
return
;
if
(
!
this
.
isEnableGroup
)
return
;
// 分组
// 分组
let
allGroup
:
Array
<
any
>
=
[];
let
allGroup
:
Array
<
any
>
=
[];
let
allGroupField
:
Array
<
any
>
=
[];
allGroupField
=
this
.
getGroupCodelist
(
this
.
groupAppFieldCodelistType
,
this
.
groupAppFieldCodelistTag
);
this
.
items
.
forEach
((
item
:
any
)
=>
{
this
.
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
item
.
hasOwnProperty
(
this
.
groupAppField
)){
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
allGroup
.
push
(
arr
[
0
].
label
);
}
else
{
allGroup
.
push
(
item
[
this
.
groupAppField
]);
allGroup
.
push
(
item
[
this
.
groupAppField
]);
}
}
}
});
});
let
groupTree
:
Array
<
any
>
=
[];
let
groupTree
:
Array
<
any
>
=
[];
allGroup
=
[...
new
Set
(
allGroup
)];
allGroup
=
[...
new
Set
(
allGroup
)];
...
@@ -1538,14 +1534,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1538,14 +1534,7 @@ export default class MainBase extends Vue implements ControlInterface {
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
allGroup
.
forEach
((
group
:
any
,
groupIndex
:
number
)
=>
{
let
children
:
Array
<
any
>
=
[];
let
children
:
Array
<
any
>
=
[];
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
itemIndex
:
number
)
=>
{
if
(
allGroupField
&&
allGroupField
.
length
>
0
){
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
const
arr
:
Array
<
any
>
=
allGroupField
.
filter
((
field
:
any
)
=>
{
return
field
.
value
==
item
[
this
.
groupAppField
]});
if
(
Object
.
is
(
group
,
arr
[
0
].
label
)){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
children
.
push
(
item
);
}
}
else
if
(
Object
.
is
(
group
,
item
[
this
.
groupAppField
])){
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
groupById
=
Number
((
groupIndex
+
1
)
*
100
+
(
itemIndex
+
1
)
*
1
);
item
.
group
=
''
;
item
.
group
=
''
;
children
.
push
(
item
);
children
.
push
(
item
);
...
...
app_web/yarn.lock
浏览文件 @
dd51a217
因为 它太大了无法显示 源差异 。您可以改为
查看blob
。
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/mapper/SysRoleMapper.java
浏览文件 @
dd51a217
...
@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -20,6 +20,7 @@ import com.alibaba.fastjson.JSONObject;
public
interface
SysRoleMapper
extends
BaseMapper
<
SysRole
>
{
public
interface
SysRoleMapper
extends
BaseMapper
<
SysRole
>
{
Page
<
SysRole
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
SysRoleSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysRole
>
wrapper
);
Page
<
SysRole
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
SysRoleSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysRole
>
wrapper
);
Page
<
SysRole
>
searchNoRepeat
(
IPage
page
,
@Param
(
"srf"
)
SysRoleSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysRole
>
wrapper
);
@Override
@Override
@Cacheable
(
value
=
"sysrole"
,
key
=
"'row:'+#p0"
)
@Cacheable
(
value
=
"sysrole"
,
key
=
"'row:'+#p0"
)
SysRole
selectById
(
Serializable
id
);
SysRole
selectById
(
Serializable
id
);
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysRoleService.java
浏览文件 @
dd51a217
...
@@ -41,6 +41,7 @@ public interface ISysRoleService extends IService<SysRole> {
...
@@ -41,6 +41,7 @@ public interface ISysRoleService extends IService<SysRole> {
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
void
saveBatch
(
List
<
SysRole
>
list
);
void
saveBatch
(
List
<
SysRole
>
list
);
Page
<
SysRole
>
searchDefault
(
SysRoleSearchContext
context
);
Page
<
SysRole
>
searchDefault
(
SysRoleSearchContext
context
);
Page
<
SysRole
>
searchNoRepeat
(
SysRoleSearchContext
context
);
List
<
SysRole
>
selectByProleid
(
String
roleid
);
List
<
SysRole
>
selectByProleid
(
String
roleid
);
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
void
removeByProleid
(
String
roleid
);
void
removeByProleid
(
String
roleid
);
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysRoleServiceImpl.java
浏览文件 @
dd51a217
...
@@ -189,6 +189,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
...
@@ -189,6 +189,15 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
return
new
PageImpl
<
SysRole
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
SysRole
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
/**
* 查询集合 数据查询
*/
@Override
public
Page
<
SysRole
>
searchNoRepeat
(
SysRoleSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
SysRole
>
pages
=
baseMapper
.
searchNoRepeat
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
SysRole
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
/**
...
...
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
dd51a217
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<!--输出实体[SYS_AUTHLOG]数据结构 -->
<!--输出实体[SYS_AUTHLOG]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_authlog-1-1"
>
<changeSet
author=
"
root
"
id=
"tab-sys_authlog-1-1"
>
<createTable
tableName=
"IBZAUTHLOG"
>
<createTable
tableName=
"IBZAUTHLOG"
>
<column
name=
"LOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"LOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_AUTHLOG_LOGID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_AUTHLOG_LOGID"
/>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<!--输出实体[SYS_OPEN_ACCESS]数据结构 -->
<!--输出实体[SYS_OPEN_ACCESS]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_open_access-35-2"
>
<changeSet
author=
"
root
"
id=
"tab-sys_open_access-35-2"
>
<createTable
tableName=
"IBZOPENACCESS"
>
<createTable
tableName=
"IBZOPENACCESS"
>
<column
name=
"ACCESSID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ACCESSID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_OPEN_ACCESS_ACCESSID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_OPEN_ACCESS_ACCESSID"
/>
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_pssystem-1-3"
>
<changeSet
author=
"
root
"
id=
"tab-sys_pssystem-1-3"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSTEM_PSSYSTEMID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSTEM_PSSYSTEMID"
/>
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<!--输出实体[SYS_PERMISSION]数据结构 -->
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_permission-1-4"
>
<changeSet
author=
"
root
"
id=
"tab-sys_permission-1-4"
>
<createTable
tableName=
"IBZPERMISSION"
>
<createTable
tableName=
"IBZPERMISSION"
>
<column
name=
"SYS_PERMISSIONID"
remarks=
""
type=
"VARCHAR(200)"
>
<column
name=
"SYS_PERMISSIONID"
remarks=
""
type=
"VARCHAR(200)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PERMISSION_SYS_PERMISSI"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PERMISSION_SYS_PERMISSI"
/>
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
<!--输出实体[SYS_ROLE]数据结构 -->
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_role-4-5"
>
<changeSet
author=
"
root
"
id=
"tab-sys_role-4-5"
>
<createTable
tableName=
"IBZROLE"
>
<createTable
tableName=
"IBZROLE"
>
<column
name=
"SYS_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"SYS_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_SYS_ROLEID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_SYS_ROLEID"
/>
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_role_permission-3-6"
>
<changeSet
author=
"
root
"
id=
"tab-sys_role_permission-3-6"
>
<createTable
tableName=
"IBZROLE_PERMISSION"
>
<createTable
tableName=
"IBZROLE_PERMISSION"
>
<column
name=
"SYS_ROLE_PERMISSIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"SYS_ROLE_PERMISSIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_PERMISSION_SYS_ROL"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_PERMISSION_SYS_ROL"
/>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
<!--输出实体[SYS_USER_AUTH]数据结构 -->
<!--输出实体[SYS_USER_AUTH]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_user_auth-20-7"
>
<changeSet
author=
"
root
"
id=
"tab-sys_user_auth-20-7"
>
<createTable
tableName=
"IBZUSERAUTH"
>
<createTable
tableName=
"IBZUSERAUTH"
>
<column
name=
"AUTHID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"AUTHID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_AUTH_AUTHID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_AUTH_AUTHID"
/>
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_user_role-7-8"
>
<changeSet
author=
"
root
"
id=
"tab-sys_user_role-7-8"
>
<createTable
tableName=
"IBZUSER_ROLE"
>
<createTable
tableName=
"IBZUSER_ROLE"
>
<column
name=
"SYS_USER_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"SYS_USER_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_ROLE_SYS_USER_ROLE"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_ROLE_SYS_USER_ROLE"
/>
...
@@ -189,16 +189,16 @@
...
@@ -189,16 +189,16 @@
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[SYS_ROLE]外键关系 -->
<!--输出实体[SYS_ROLE]外键关系 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-sys_role-4-9"
>
<changeSet
author=
"
root
"
id=
"fk-sys_role-4-9"
>
<addForeignKeyConstraint
baseColumnNames=
"PROLEID"
baseTableName=
"IBZROLE"
constraintName=
"DER1N_SYS_ROLE_SYS_ROLE_PROLEI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PROLEID"
baseTableName=
"IBZROLE"
constraintName=
"DER1N_SYS_ROLE_SYS_ROLE_PROLEI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-sys_role_permission-3-10"
>
<changeSet
author=
"
root
"
id=
"fk-sys_role_permission-3-10"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_PERMISSIONID"
baseTableName=
"IBZROLE_PERMISSION"
constraintName=
"DER1N_SYS_ROLE_PERMISSION_SYS_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_PERMISSIONID"
referencedTableName=
"IBZPERMISSION"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SYS_PERMISSIONID"
baseTableName=
"IBZROLE_PERMISSION"
constraintName=
"DER1N_SYS_ROLE_PERMISSION_SYS_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_PERMISSIONID"
referencedTableName=
"IBZPERMISSION"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-sys_user_role-7-12"
>
<changeSet
author=
"
root
"
id=
"fk-sys_user_role-7-12"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_ROLEID"
baseTableName=
"IBZUSER_ROLE"
constraintName=
"DER1N_SYS_USER_ROLE_SYS_ROLE_S"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SYS_ROLEID"
baseTableName=
"IBZUSER_ROLE"
constraintName=
"DER1N_SYS_USER_ROLE_SYS_ROLE_S"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
</changeSet>
</changeSet>
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sysrole/SysRoleMapper.xml
浏览文件 @
dd51a217
...
@@ -42,6 +42,15 @@
...
@@ -42,6 +42,15 @@
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
</select>
<!--数据集合[NoRepeat]-->
<select
id=
"searchNoRepeat"
parameterType=
"cn.ibizlab.core.uaa.filter.SysRoleSearchContext"
resultMap=
"SysRoleResultMap"
>
select t1.* from (
<include
refid=
"NoRepeat"
/>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<!--数据查询[Default]-->
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PROLEID`, t11.`SYS_ROLENAME` AS `PROLENAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZROLE` t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PROLEID`, t11.`SYS_ROLENAME` AS `PROLENAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZROLE` t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
...
@@ -57,6 +66,21 @@
...
@@ -57,6 +66,21 @@
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.MEMO, t1.PROLEID, t11.SYS_ROLENAME AS PROLENAME, t1.SYS_ROLEID, t1.SYS_ROLENAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZROLE t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.MEMO, t1.PROLEID, t11.SYS_ROLENAME AS PROLENAME, t1.SYS_ROLEID, t1.SYS_ROLENAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZROLE t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
]]>
]]>
</sql>
</sql>
<!--数据查询[NoRepeat]-->
<sql
id=
"NoRepeat"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PROLEID`, t11.`SYS_ROLENAME` AS `PROLENAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZROLE` t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
]]>
</sql>
<!--数据查询[NoRepeat]-->
<sql
id=
"NoRepeat"
databaseId=
"oracle"
>
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.MEMO, t1.PROLEID, t11.SYS_ROLENAME AS PROLENAME, t1.SYS_ROLEID, t1.SYS_ROLENAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZROLE t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
]]>
</sql>
<!--数据查询[NoRepeat]-->
<sql
id=
"NoRepeat"
databaseId=
"postgresql"
>
<![CDATA[ SELECT t1.CREATEDATE, t1.CREATEMAN, t1.MEMO, t1.PROLEID, t11.SYS_ROLENAME AS PROLENAME, t1.SYS_ROLEID, t1.SYS_ROLENAME, t1.UPDATEDATE, t1.UPDATEMAN FROM IBZROLE t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
]]>
</sql>
<!--数据查询[View]-->
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PROLEID`, t11.`SYS_ROLENAME` AS `PROLENAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZROLE` t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`MEMO`, t1.`PROLEID`, t11.`SYS_ROLENAME` AS `PROLENAME`, t1.`SYS_ROLEID`, t1.`SYS_ROLENAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZROLE` t1 LEFT JOIN IBZROLE t11 ON t1.PROLEID = t11.SYS_ROLEID
...
...
ibzuaa-core/src/main/resources/permission/systemResource.json
浏览文件 @
dd51a217
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
"dename"
:
"SysRole"
,
"dename"
:
"SysRole"
,
"delogicname"
:
"系统角色"
,
"delogicname"
:
"系统角色"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}
,{
"id"
:
"NoRepeat"
,
"name"
:
"数据查询"
}
],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
}
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysRoleResource.java
浏览文件 @
dd51a217
...
@@ -158,6 +158,28 @@ public class SysRoleResource {
...
@@ -158,6 +158,28 @@ public class SysRoleResource {
.
body
(
new
PageImpl
(
sysroleMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
.
body
(
new
PageImpl
(
sysroleMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-searchNoRepeat-all') and hasPermission(#context,'ibzuaa-SysRole-Get')"
)
@ApiOperation
(
value
=
"获取数据查询"
,
tags
=
{
"系统角色"
}
,
notes
=
"获取数据查询"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysroles/fetchnorepeat"
)
public
ResponseEntity
<
List
<
SysRoleDTO
>>
fetchNoRepeat
(
SysRoleSearchContext
context
)
{
Page
<
SysRole
>
domains
=
sysroleService
.
searchNoRepeat
(
context
)
;
List
<
SysRoleDTO
>
list
=
sysroleMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-searchNoRepeat-all') and hasPermission(#context,'ibzuaa-SysRole-Get')"
)
@ApiOperation
(
value
=
"查询数据查询"
,
tags
=
{
"系统角色"
}
,
notes
=
"查询数据查询"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/searchnorepeat"
)
public
ResponseEntity
<
Page
<
SysRoleDTO
>>
searchNoRepeat
(
@RequestBody
SysRoleSearchContext
context
)
{
Page
<
SysRole
>
domains
=
sysroleService
.
searchNoRepeat
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
sysroleMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录