Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
0fed418c
提交
0fed418c
编写于
7月 17, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
6d2e2ea2
变更
43
隐藏空白字符变更
内嵌
并排
正在显示
43 个修改的文件
包含
769 行增加
和
286 行删除
+769
-286
CHANGELOG.md
app_web/CHANGELOG.md
+38
-0
app-actionbar.vue
app_web/src/components/app-actionbar/app-actionbar.vue
+3
-2
app-form-group.vue
app_web/src/components/app-form-group/app-form-group.vue
+3
-2
app-menu-item.vue
app_web/src/components/app-menu-item/app-menu-item.vue
+4
-4
app-span.vue
app_web/src/components/app-span/app-span.vue
+16
-15
input-box.vue
app_web/src/components/input-box/input-box.vue
+1
-24
view-engine.ts
app_web/src/engine/view/view-engine.ts
+4
-2
sys-app-service-base.ts
app_web/src/service/sys-app/sys-app-service-base.ts
+6
-20
sys-auth-log-service-base.ts
...web/src/service/sys-auth-log/sys-auth-log-service-base.ts
+6
-20
sys-permission-service-base.ts
...src/service/sys-permission/sys-permission-service-base.ts
+7
-21
sys-role-permission-service-base.ts
...e/sys-role-permission/sys-role-permission-service-base.ts
+20
-42
sys-role-service-base.ts
app_web/src/service/sys-role/sys-role-service-base.ts
+8
-22
sys-user-role-service-base.ts
...b/src/service/sys-user-role/sys-user-role-service-base.ts
+20
-42
sys-user-service-base.ts
app_web/src/service/sys-user/sys-user-service-base.ts
+7
-21
sys-app-ui-service-base.ts
app_web/src/uiservice/sys-app/sys-app-ui-service-base.ts
+1
-1
sys-auth-log-ui-service-base.ts
...rc/uiservice/sys-auth-log/sys-auth-log-ui-service-base.ts
+1
-1
sys-permission-ui-service-base.ts
...iservice/sys-permission/sys-permission-ui-service-base.ts
+1
-1
sys-role-permission-ui-service-base.ts
...ys-role-permission/sys-role-permission-ui-service-base.ts
+1
-1
sys-role-ui-service-base.ts
app_web/src/uiservice/sys-role/sys-role-ui-service-base.ts
+1
-1
sys-user-role-ui-service-base.ts
.../uiservice/sys-user-role/sys-user-role-ui-service-base.ts
+1
-1
sys-user-ui-service-base.ts
app_web/src/uiservice/sys-user/sys-user-ui-service-base.ts
+1
-1
errorlog.ts
app_web/src/utils/decorators/errorlog.ts
+1
-4
view-tool.ts
app_web/src/utils/view-tool/view-tool.ts
+3
-2
default-searchform-service.ts
.../sys-app/default-searchform/default-searchform-service.ts
+21
-0
main-form-base.vue
app_web/src/widgets/sys-app/main-form/main-form-base.vue
+56
-10
main-form-service.ts
app_web/src/widgets/sys-app/main-form/main-form-service.ts
+21
-0
default-searchform-service.ts
...auth-log/default-searchform/default-searchform-service.ts
+21
-0
default-searchform-service.ts
...rmission/default-searchform/default-searchform-service.ts
+21
-0
main-form-base.vue
...b/src/widgets/sys-permission/main-form/main-form-base.vue
+49
-3
main-form-service.ts
...src/widgets/sys-permission/main-form/main-form-service.ts
+21
-0
default-searchform-service.ts
...rmission/default-searchform/default-searchform-service.ts
+21
-0
main-form-base.vue
.../widgets/sys-role-permission/main-form/main-form-base.vue
+50
-4
main-form-service.ts
...idgets/sys-role-permission/main-form/main-form-service.ts
+21
-0
default-searchform-service.ts
...sys-role/default-searchform/default-searchform-service.ts
+21
-0
main-form-base.vue
app_web/src/widgets/sys-role/main-form/main-form-base.vue
+50
-4
main-form-service.ts
app_web/src/widgets/sys-role/main-form/main-form-service.ts
+21
-0
default-searchform-service.ts
...ser-role/default-searchform/default-searchform-service.ts
+21
-0
main-form-base.vue
...eb/src/widgets/sys-user-role/main-form/main-form-base.vue
+55
-7
main-form-service.ts
.../src/widgets/sys-user-role/main-form/main-form-service.ts
+21
-0
default-searchform-service.ts
...sys-user/default-searchform/default-searchform-service.ts
+21
-0
main-form-base.vue
app_web/src/widgets/sys-user/main-form/main-form-base.vue
+54
-8
main-form-service.ts
app_web/src/widgets/sys-user/main-form/main-form-service.ts
+21
-0
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+28
-0
未找到文件。
app_web/CHANGELOG.md
浏览文件 @
0fed418c
## v7.0.0-alpha.14 [2020-7-18]
### Bug修复
修复表格列千分位格式化
修复标签值格式化
修复表格转化数据错误问题
修复嵌套关系无数据时设置数据为空数组
### 功能新增及优化
#### 模板
新增编辑器插件
新增数据服务增加临时模式判断
新增支持实体行为定义检查方法
新增实体行为执行前、后逻辑
新增操作栏主状态无权限模式
优化开发环境错误提示友好性
优化应用菜单多层嵌套问题
#### 基础文件
优化popover组件
实体数据服务基类增加saveBatch方法
优化应用菜单多层嵌套问题
## v7.0.0-alpha.13 [2020-7-12]
### Bug修复
...
...
app_web/src/components/app-actionbar/app-actionbar.vue
浏览文件 @
0fed418c
...
...
@@ -93,7 +93,7 @@ export default class AppActionBar extends Vue {
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
&&
data
&&
Object
.
keys
(
data
).
length
>
0
){
let
dataActionResult
:
any
=
UIService
.
getAllOPPrivs
(
data
)[
_item
[
'dataaccaction'
]];
// 无权限:0;有权限:1
if
(
!
dataActionResult
){
if
(
dataActionResult
===
0
){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if
(
_item
.
noprivdisplaymode
===
1
){
_item
.
disabled
=
true
;
...
...
@@ -103,7 +103,8 @@ export default class AppActionBar extends Vue {
}
else
{
_item
.
visabled
=
true
;
}
}
else
{
}
if
(
dataActionResult
===
1
){
_item
.
visabled
=
true
;
_item
.
disabled
=
false
;
}
...
...
app_web/src/components/app-form-group/app-form-group.vue
浏览文件 @
0fed418c
...
...
@@ -165,7 +165,7 @@ export default class AppFormGroup extends Vue {
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
&&
data
&&
Object
.
keys
(
data
).
length
>
0
){
let
dataActionResult
:
any
=
UIService
.
getAllOPPrivs
(
data
)[
_item
[
'dataaccaction'
]];
// 无权限:0;有权限:1
if
(
!
dataActionResult
){
if
(
dataActionResult
===
0
){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if
(
_item
.
noprivdisplaymode
===
1
){
_item
.
disabled
=
true
;
...
...
@@ -175,7 +175,8 @@ export default class AppFormGroup extends Vue {
}
else
{
_item
.
visabled
=
true
;
}
}
else
{
}
if
(
dataActionResult
===
1
){
_item
.
visabled
=
true
;
_item
.
disabled
=
false
;
}
...
...
app_web/src/components/app-menu-item/app-menu-item.vue
浏览文件 @
0fed418c
...
...
@@ -10,8 +10,8 @@
<
template
v-else-if=
"item.iconcls && item.iconcls != ''"
>
<i
:class=
"[item.iconcls, 'app-menu-icon']"
></i>
</
template
>
<
template
v-else
-if=
"isFirst"
>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
<
template
v-else
>
<i
v-if=
"isFirst"
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
<span
class=
'text'
:title=
"$t(`app.menus.${ctrlName}.${item.name}`)"
>
{{$t(`app.menus.${ctrlName}.${item.name}`)}}
</span>
</template>
...
...
@@ -27,8 +27,8 @@
<
template
v-else-if=
"item.iconcls && item.iconcls != ''"
>
<i
:class=
"[item.iconcls, 'app-menu-icon']"
></i>
</
template
>
<
template
v-else
-if=
"isFirst"
>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
<
template
v-else
>
<i
v-if=
"isFirst"
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t(`app.menus.$
{ctrlName}.${item.name}`)">
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
...
...
app_web/src/components/app-span/app-span.vue
浏览文件 @
0fed418c
...
...
@@ -32,15 +32,15 @@ export default class AppSpan extends Vue {
* @type {string}
* @memberof AppSpan
*/
@
Prop
()
public
unitName
?:
string
;
@
Prop
(
{
default
:
''
}
)
public
unitName
?:
string
;
/**
* 精度
*
* @type {
string
}
* @memberof App
FormatData
* @type {
number
}
* @memberof App
Span
*/
@
Prop
({
default
:
'2'
})
public
precision
?:
string
;
@
Prop
({
default
:
'2'
})
public
precision
?:
number
;
/**
* 日期值格式化
...
...
@@ -191,9 +191,7 @@ export default class AppSpan extends Vue {
if
(
this
.
$util
.
isEmpty
(
this
.
value
)){
this
.
text
=
''
;
}
else
if
(
this
.
dataType
){
this
.
currencyFormat
();
}
else
if
(
this
.
valueFormat
){
this
.
dateFormat
();
this
.
dataFormat
();
}
else
{
this
.
text
=
this
.
value
;
}
...
...
@@ -202,18 +200,21 @@ export default class AppSpan extends Vue {
}
/**
*
货币
格式化
*
数据
格式化
*
* @memberof AppSpan
*/
public
currencyFormat
(){
let
number
:
any
=
Number
(
this
.
value
);
let
_unitName
=
this
.
unitName
?
this
.
unitName
:
''
;
let
_precision
=
Number
(
this
.
precision
);
if
(
Object
.
is
(
this
.
dataType
,
"CURRENCY"
)){
this
.
text
=
Number
(
number
.
toFixed
(
_precision
)).
toLocaleString
(
'en-US'
)
+
' '
+
_unitName
;
public
dataFormat
(){
if
(
this
.
valueFormat
){
this
.
dateFormat
()
;
return
;
}
if
(
Object
.
is
(
this
.
dataType
,
"CURRENCY"
)){
let
number
:
any
=
Number
(
this
.
value
);
this
.
text
=
Number
(
number
.
toFixed
(
this
.
precision
)).
toLocaleString
(
'en-US'
)
+
' '
+
this
.
unitName
;
}
else
if
(
Object
.
is
(
this
.
dataType
,
"FLOAT"
)
||
Object
.
is
(
this
.
dataType
,
"DECIMAL"
)){
this
.
text
=
number
.
toFixed
(
_precision
);
let
number
:
any
=
Number
(
this
.
value
);
this
.
text
=
number
.
toFixed
(
this
.
precision
);
}
else
{
this
.
text
=
this
.
value
;
}
...
...
app_web/src/components/input-box/input-box.vue
浏览文件 @
0fed418c
...
...
@@ -7,8 +7,7 @@
:precision=
"precision"
v-model=
"CurrentVal"
:disabled=
"disabled ? true : false"
:formatter=
"formatter"
:parser=
"parser"
:active-change=
"false"
></InputNumber>
<i-input
v-else
:placeholder=
"placeholder"
...
...
@@ -188,29 +187,7 @@ export default class InputBox extends Vue {
}
}
/**
* 指定输入框展示值的格式
*/
public
formatter
(
value
:
any
){
if
(
this
.
precision
===
0
)
return
this
.
CurrentVal
;
if
(
value
.
indexOf
(
'.'
)
!==-
1
){
let
arr
:
Array
<
any
>
=
value
.
split
(
'.'
);
if
(
arr
[
1
]
===
'00'
){
return
arr
[
0
];
}
if
(
parseInt
(
arr
[
1
])
%
10
===
0
){
return
arr
[
0
]
+
'.'
+
parseInt
(
arr
[
1
])
/
10
;
}
}
return
value
;
}
/**
* 指定从 formatter 里转换回数字的方式
*/
public
parser
(
value
:
any
){
return
value
;
}
}
</
script
>
...
...
app_web/src/engine/view/view-engine.ts
浏览文件 @
0fed418c
...
...
@@ -193,7 +193,7 @@ export default class ViewEngine {
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
_this
.
view
.
appUIService
&&
data
&&
Object
.
keys
(
data
).
length
>
0
){
let
dataActionResult
:
any
=
_this
.
view
.
appUIService
.
getAllOPPrivs
(
data
)[
_item
[
'dataaccaction'
]];
// 无权限:0;有权限:1
if
(
!
dataActionResult
){
if
(
dataActionResult
===
0
){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if
(
_item
.
noprivdisplaymode
===
1
){
_this
.
view
.
toolBarModels
[
key
].
disabled
=
true
;
...
...
@@ -203,8 +203,10 @@ export default class ViewEngine {
}
else
{
_this
.
view
.
toolBarModels
[
key
].
visabled
=
true
;
}
}
else
{
}
if
(
dataActionResult
===
1
){
_this
.
view
.
toolBarModels
[
key
].
visabled
=
true
;
_this
.
view
.
toolBarModels
[
key
].
disabled
=
false
;
}
}
}
...
...
app_web/src/service/sys-app/sys-app-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -49,7 +49,7 @@ export default class SysAppServiceBase extends EntityService {
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysapps/
${
context
.
sysapp
}
/select`
,
isloading
);
return
res
;
}
...
...
@@ -73,7 +73,7 @@ export default class SysAppServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -90,7 +90,7 @@ export default class SysAppServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysapps/
${
context
.
sysapp
}
`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -119,7 +119,7 @@ export default class SysAppServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
return
res
;
}
...
...
@@ -135,7 +135,7 @@ export default class SysAppServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/getdraft`
,
isloading
);
res
.
data
.
sysapp
=
data
.
sysapp
;
return
res
;
}
...
...
@@ -166,7 +166,7 @@ export default class SysAppServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -184,18 +184,4 @@ export default class SysAppServiceBase extends EntityService {
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysapps/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysapps/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-auth-log/sys-auth-log-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -49,7 +49,7 @@ export default class SysAuthLogServiceBase extends EntityService {
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/select`
,
isloading
);
return
res
;
}
...
...
@@ -73,7 +73,7 @@ export default class SysAuthLogServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysauthlogs`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -90,7 +90,7 @@ export default class SysAuthLogServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -119,7 +119,7 @@ export default class SysAuthLogServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
isloading
);
return
res
;
}
...
...
@@ -135,7 +135,7 @@ export default class SysAuthLogServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/getdraft`
,
isloading
);
res
.
data
.
sysauthlog
=
data
.
sysauthlog
;
return
res
;
}
...
...
@@ -166,7 +166,7 @@ export default class SysAuthLogServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -184,18 +184,4 @@ export default class SysAuthLogServiceBase extends EntityService {
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysauthlogs/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysauthlogs/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-permission/sys-permission-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -49,7 +49,7 @@ export default class SysPermissionServiceBase extends EntityService {
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/select`
,
isloading
);
return
res
;
}
...
...
@@ -73,8 +73,8 @@ export default class SysPermissionServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
?
res
.
data
.
sysrolepermissions
:[]
));
return
res
;
}
...
...
@@ -91,7 +91,7 @@ export default class SysPermissionServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/syspermissions/
${
context
.
syspermission
}
`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -120,7 +120,7 @@ export default class SysPermissionServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
`
,
isloading
);
return
res
;
}
...
...
@@ -136,7 +136,7 @@ export default class SysPermissionServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/getdraft`
,
isloading
);
res
.
data
.
syspermission
=
data
.
syspermission
;
return
res
;
}
...
...
@@ -167,7 +167,7 @@ export default class SysPermissionServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -185,18 +185,4 @@ export default class SysPermissionServiceBase extends EntityService {
let
res
:
any
=
Http
.
getInstance
().
get
(
`/syspermissions/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/syspermissions/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-role-permission/sys-role-permission-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -50,16 +50,16 @@ export default class SysRolePermissionServiceBase extends EntityService {
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysrole
&&
context
.
sysrolepermission
){
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
/select`
,
isloading
);
return
res
;
}
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
let
res
:
any
=
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
/select`
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
/select`
,
isloading
);
return
res
;
}
...
...
@@ -84,7 +84,7 @@ export default class SysRolePermissionServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
syspermission
&&
true
){
...
...
@@ -98,7 +98,7 @@ export default class SysRolePermissionServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -111,7 +111,7 @@ export default class SysRolePermissionServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysrolepermissions`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -129,20 +129,20 @@ export default class SysRolePermissionServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -180,16 +180,16 @@ export default class SysRolePermissionServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysrole
&&
context
.
sysrolepermission
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
return
res
;
}
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
return
res
;
}
...
...
@@ -206,18 +206,18 @@ export default class SysRolePermissionServiceBase extends EntityService {
if
(
context
.
sysrole
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/getdraft`
,
isloading
);
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
return
res
;
}
if
(
context
.
syspermission
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/getdraft`
,
isloading
);
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysrolepermissions/getdraft`
,
isloading
);
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
return
res
;
}
...
...
@@ -235,14 +235,14 @@ export default class SysRolePermissionServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
post
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -263,20 +263,20 @@ export default class SysRolePermissionServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
/save`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
/save`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -304,26 +304,4 @@ export default class SysRolePermissionServiceBase extends EntityService {
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysrolepermissions/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRolePermissionServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysrole
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/searchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
syspermission
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/searchdefault`
,
tempData
,
isloading
);
}
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysrolepermissions/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-role/sys-role-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -49,7 +49,7 @@ export default class SysRoleServiceBase extends EntityService {
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/select`
,
isloading
);
return
res
;
}
...
...
@@ -73,9 +73,9 @@ export default class SysRoleServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
?
res
.
data
.
sysrolepermissions
:[]
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
?
res
.
data
.
sysuserroles
:[]
));
return
res
;
}
...
...
@@ -92,7 +92,7 @@ export default class SysRoleServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysroles/
${
context
.
sysrole
}
`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -121,7 +121,7 @@ export default class SysRoleServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
`
,
isloading
);
return
res
;
}
...
...
@@ -137,7 +137,7 @@ export default class SysRoleServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/getdraft`
,
isloading
);
res
.
data
.
sysrole
=
data
.
sysrole
;
return
res
;
}
...
...
@@ -168,7 +168,7 @@ export default class SysRoleServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -186,18 +186,4 @@ export default class SysRoleServiceBase extends EntityService {
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysroles/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysroles/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-user-role/sys-user-role-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -50,16 +50,16 @@ export default class SysUserRoleServiceBase extends EntityService {
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysuser
&&
context
.
sysuserrole
){
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
/select`
,
isloading
);
return
res
;
}
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
/select`
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysuserroles/
${
context
.
sysuserrole
}
/select`
,
isloading
);
return
res
;
}
...
...
@@ -84,7 +84,7 @@ export default class SysUserRoleServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
sysrole
&&
true
){
...
...
@@ -98,7 +98,7 @@ export default class SysUserRoleServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -111,7 +111,7 @@ export default class SysUserRoleServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysuserroles`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -129,20 +129,20 @@ export default class SysUserRoleServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysuserroles/
${
context
.
sysuserrole
}
`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -180,16 +180,16 @@ export default class SysUserRoleServiceBase extends EntityService {
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysuser
&&
context
.
sysuserrole
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
);
return
res
;
}
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
);
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
);
return
res
;
}
...
...
@@ -206,18 +206,18 @@ export default class SysUserRoleServiceBase extends EntityService {
if
(
context
.
sysuser
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/getdraft`
,
isloading
);
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
return
res
;
}
if
(
context
.
sysrole
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/getdraft`
,
isloading
);
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysuserroles/getdraft`
,
isloading
);
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
return
res
;
}
...
...
@@ -235,14 +235,14 @@ export default class SysUserRoleServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
post
(
`/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -263,20 +263,20 @@ export default class SysUserRoleServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
/save`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
/save`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysuserroles/
${
context
.
sysuserrole
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -304,26 +304,4 @@ export default class SysUserRoleServiceBase extends EntityService {
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysuserroles/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysuser
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/searchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
sysrole
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/searchdefault`
,
tempData
,
isloading
);
}
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysuserroles/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-user/sys-user-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -49,7 +49,7 @@ export default class SysUserServiceBase extends EntityService {
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/select`
,
isloading
);
return
res
;
}
...
...
@@ -73,8 +73,8 @@ export default class SysUserServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
?
res
.
data
.
sysuserroles
:[]
));
return
res
;
}
...
...
@@ -91,7 +91,7 @@ export default class SysUserServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysusers/
${
context
.
sysuser
}
`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -120,7 +120,7 @@ export default class SysUserServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
`
,
isloading
);
return
res
;
}
...
...
@@ -136,7 +136,7 @@ export default class SysUserServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/getdraft`
,
isloading
);
res
.
data
.
sysuser
=
data
.
sysuser
;
return
res
;
}
...
...
@@ -167,7 +167,7 @@ export default class SysUserServiceBase extends EntityService {
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -185,18 +185,4 @@ export default class SysUserServiceBase extends EntityService {
let
res
:
any
=
Http
.
getInstance
().
get
(
`/sysusers/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysusers/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/uiservice/sys-app/sys-app-ui-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -200,7 +200,7 @@ export default class SysAppUIServiceBase extends UIService {
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField
,可能会发生错误`
);
console
.
warn
(
`当前数据对象不包含属性
${
singleMainField
}
,可能会发生错误`
);
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
...
...
app_web/src/uiservice/sys-auth-log/sys-auth-log-ui-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -199,7 +199,7 @@ export default class SysAuthLogUIServiceBase extends UIService {
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField
,可能会发生错误`
);
console
.
warn
(
`当前数据对象不包含属性
${
singleMainField
}
,可能会发生错误`
);
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
...
...
app_web/src/uiservice/sys-permission/sys-permission-ui-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -205,7 +205,7 @@ export default class SysPermissionUIServiceBase extends UIService {
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField
,可能会发生错误`
);
console
.
warn
(
`当前数据对象不包含属性
${
singleMainField
}
,可能会发生错误`
);
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
...
...
app_web/src/uiservice/sys-role-permission/sys-role-permission-ui-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -206,7 +206,7 @@ export default class SysRolePermissionUIServiceBase extends UIService {
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField
,可能会发生错误`
);
console
.
warn
(
`当前数据对象不包含属性
${
singleMainField
}
,可能会发生错误`
);
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
...
...
app_web/src/uiservice/sys-role/sys-role-ui-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -205,7 +205,7 @@ export default class SysRoleUIServiceBase extends UIService {
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField
,可能会发生错误`
);
console
.
warn
(
`当前数据对象不包含属性
${
singleMainField
}
,可能会发生错误`
);
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
...
...
app_web/src/uiservice/sys-user-role/sys-user-role-ui-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -205,7 +205,7 @@ export default class SysUserRoleUIServiceBase extends UIService {
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField
,可能会发生错误`
);
console
.
warn
(
`当前数据对象不包含属性
${
singleMainField
}
,可能会发生错误`
);
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
...
...
app_web/src/uiservice/sys-user/sys-user-ui-service-base.ts
浏览文件 @
0fed418c
...
...
@@ -205,7 +205,7 @@ export default class SysUserUIServiceBase extends UIService {
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField
,可能会发生错误`
);
console
.
warn
(
`当前数据对象不包含属性
${
singleMainField
}
,可能会发生错误`
);
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
...
...
app_web/src/utils/decorators/errorlog.ts
浏览文件 @
0fed418c
import
{
Notice
}
from
'view-design'
;
export
function
Errorlog
(
target
:
Object
,
propertyKey
:
string
,
descriptor
:
TypedPropertyDescriptor
<
any
>
){
let
origin
=
descriptor
.
value
;
let
$Notice
:
any
=
Notice
;
descriptor
.
value
=
function
(...
args
:
any
[]){
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
// 原方法调用方法
...
...
@@ -12,7 +9,7 @@ export function Errorlog(target: Object, propertyKey: string, descriptor: TypedP
}).
catch
((
error
:
any
)
=>
{
// 开发模式下页面报错
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
$Notice
.
error
({
title
:
'错误'
,
desc
:
target
.
constructor
.
name
+
'类'
+
propertyKey
+
'方法产生异常'
}
);
console
.
error
(
target
.
constructor
.
name
+
'类'
+
propertyKey
+
'方法产生异常'
);
}
// 控制台报错
console
.
error
(
error
);
...
...
app_web/src/utils/view-tool/view-tool.ts
浏览文件 @
0fed418c
...
...
@@ -260,7 +260,7 @@ export class ViewTool {
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
UIService
&&
data
&&
Object
.
keys
(
data
).
length
>
0
){
let
dataActionResult
:
any
=
UIService
.
getAllOPPrivs
(
data
)[
_item
[
'dataaccaction'
]];
// 无权限:0;有权限:1
if
(
!
dataActionResult
){
if
(
dataActionResult
===
0
){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if
(
_item
.
noprivdisplaymode
===
1
){
_item
.
disabled
=
true
;
...
...
@@ -270,7 +270,8 @@ export class ViewTool {
}
else
{
_item
.
visabled
=
true
;
}
}
else
{
}
if
(
dataActionResult
===
1
){
_item
.
visabled
=
true
;
_item
.
disabled
=
false
;
}
...
...
app_web/src/widgets/sys-app/default-searchform/default-searchform-service.ts
浏览文件 @
0fed418c
...
...
@@ -364,4 +364,25 @@ export default class DefaultService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-app/main-form/main-form-base.vue
浏览文件 @
0fed418c
...
...
@@ -7,21 +7,21 @@
<app-form-group
:uiService=
"appUIService"
:data=
"transformData(data)"
:manageContainerStatus=
"detailsModel.group1.manageContainerStatus"
:isManageContainer=
"detailsModel.group1.isManageContainer"
@
managecontainerclick=
"manageContainerClick('group1')"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.sysapp.main_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.appid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'appid'
:itemRules=
"this.rules.appid"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.appid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.appid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'appid'
:itemRules=
"this.rules
()
.appid"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.appid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.appid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.appid"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.appid.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.appname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'appname'
:itemRules=
"this.rules.appname"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.appname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.appname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'appname'
:itemRules=
"this.rules
()
.appname"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.appname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.appname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.appname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.appname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.apptype.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'apptype'
:itemRules=
"this.rules.apptype"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.apptype')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.apptype.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'apptype'
:itemRules=
"this.rules
()
.apptype"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.apptype')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.apptype.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<dropdown-list
v-model=
"data.apptype"
...
...
@@ -40,35 +40,35 @@
</i-col>
<i-col
v-show=
"detailsModel.appgroup.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'appgroup'
:itemRules=
"this.rules.appgroup"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.appgroup')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.appgroup.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'appgroup'
:itemRules=
"this.rules
()
.appgroup"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.appgroup')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.appgroup.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.appgroup"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.appgroup.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.fullname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'fullname'
:itemRules=
"this.rules.fullname"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.fullname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.fullname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'fullname'
:itemRules=
"this.rules
()
.fullname"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.fullname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.fullname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.fullname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.fullname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.icon.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'icon'
:itemRules=
"this.rules.icon"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.icon')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.icon.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'icon'
:itemRules=
"this.rules
()
.icon"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.icon')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.icon.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.icon"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.icon.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.visabled.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'visabled'
:itemRules=
"this.rules.visabled"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.visabled')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.visabled.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'visabled'
:itemRules=
"this.rules
()
.visabled"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.visabled')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.visabled.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-switch
name=
'visabled'
:value=
"this.data.visabled"
@
change=
"($event)=>
{this.data.visabled = $event} " :disabled="detailsModel.visabled.disabled" style="">
</app-switch>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.addr.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'addr'
:itemRules=
"this.rules.addr"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.addr')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.addr.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'addr'
:itemRules=
"this.rules
()
.addr"
class=
''
:caption=
"$t('entities.sysapp.main_form.details.addr')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.addr.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.addr"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.addr.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
...
...
@@ -467,7 +467,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public
rules
:
any
=
{
public
rules
()
:
any
{
return
{
srforikey
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
...
...
@@ -564,6 +565,51 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
'地址 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'地址 值不能为空'
,
trigger
:
'blur'
},
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public
deRules
:
any
=
{
};
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof MainBase
*/
public
verifyDeRules
(
name
:
string
,
rule
:
any
=
this
.
deRules
)
:{
isPast
:
boolean
,
infoMessage
:
string
}{
let
falg
=
{
isPast
:
true
,
infoMessage
:
""
};
if
(
!
rule
[
name
]){
return
falg
;
}
rule
[
name
].
forEach
((
item
:
any
)
=>
{
if
(
item
.
type
==
'SIMPLE'
&&
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]
!=
item
.
paramValue
){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'REGEX'
&&
(
item
.
isNotMode
?
item
.
RegExCode
.
test
(
this
.
data
[
name
])
:
!
item
.
RegExCode
.
test
(
this
.
data
[
name
]))){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'STRINGLENGTH'
){
let
valueLength
:
number
=
this
.
data
[
name
]?
this
.
data
[
name
].
length
:
0
;
if
(
item
.
isNotMode
?
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
:
!
(
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
)){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
}
if
(
item
.
type
==
'GROUP'
){
falg
=
this
.
verifyDeRules
(
'group'
,
item
)
}
});
return
falg
;
}
/**
...
...
@@ -886,7 +932,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
checkItem
(
name
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
validator
=
new
schema
({[
name
]:
this
.
rules
[
name
]});
var
validator
=
new
schema
({[
name
]:
this
.
rules
()
[
name
]});
validator
.
validate
({[
name
]:
this
.
data
[
name
]}).
then
(()
=>
{
resolve
(
true
);
})
...
...
app_web/src/widgets/sys-app/main-form/main-form-service.ts
浏览文件 @
0fed418c
...
...
@@ -370,4 +370,25 @@ export default class MainService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-auth-log/default-searchform/default-searchform-service.ts
浏览文件 @
0fed418c
...
...
@@ -364,4 +364,25 @@ export default class DefaultService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-permission/default-searchform/default-searchform-service.ts
浏览文件 @
0fed418c
...
...
@@ -364,4 +364,25 @@ export default class DefaultService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-permission/main-form/main-form-base.vue
浏览文件 @
0fed418c
...
...
@@ -4,7 +4,7 @@
<row
>
<i-col
v-show=
"detailsModel.sys_permissionname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_permissionname'
:itemRules=
"this.rules.sys_permissionname"
class=
''
:caption=
"$t('entities.syspermission.main_form.details.sys_permissionname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_permissionname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_permissionname'
:itemRules=
"this.rules
()
.sys_permissionname"
class=
''
:caption=
"$t('entities.syspermission.main_form.details.sys_permissionname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_permissionname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.sys_permissionname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.sys_permissionname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
...
...
@@ -392,7 +392,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public
rules
:
any
=
{
public
rules
()
:
any
{
return
{
srfupdatedate
:
[
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'blur'
},
...
...
@@ -453,6 +454,51 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
'资源标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'资源标识 值不能为空'
,
trigger
:
'blur'
},
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public
deRules
:
any
=
{
};
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof MainBase
*/
public
verifyDeRules
(
name
:
string
,
rule
:
any
=
this
.
deRules
)
:{
isPast
:
boolean
,
infoMessage
:
string
}{
let
falg
=
{
isPast
:
true
,
infoMessage
:
""
};
if
(
!
rule
[
name
]){
return
falg
;
}
rule
[
name
].
forEach
((
item
:
any
)
=>
{
if
(
item
.
type
==
'SIMPLE'
&&
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]
!=
item
.
paramValue
){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'REGEX'
&&
(
item
.
isNotMode
?
item
.
RegExCode
.
test
(
this
.
data
[
name
])
:
!
item
.
RegExCode
.
test
(
this
.
data
[
name
]))){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'STRINGLENGTH'
){
let
valueLength
:
number
=
this
.
data
[
name
]?
this
.
data
[
name
].
length
:
0
;
if
(
item
.
isNotMode
?
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
:
!
(
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
)){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
}
if
(
item
.
type
==
'GROUP'
){
falg
=
this
.
verifyDeRules
(
'group'
,
item
)
}
});
return
falg
;
}
/**
...
...
@@ -682,7 +728,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
checkItem
(
name
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
validator
=
new
schema
({[
name
]:
this
.
rules
[
name
]});
var
validator
=
new
schema
({[
name
]:
this
.
rules
()
[
name
]});
validator
.
validate
({[
name
]:
this
.
data
[
name
]}).
then
(()
=>
{
resolve
(
true
);
})
...
...
app_web/src/widgets/sys-permission/main-form/main-form-service.ts
浏览文件 @
0fed418c
...
...
@@ -369,4 +369,25 @@ export default class MainService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-role-permission/default-searchform/default-searchform-service.ts
浏览文件 @
0fed418c
...
...
@@ -364,4 +364,25 @@ export default class DefaultService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-role-permission/main-form/main-form-base.vue
浏览文件 @
0fed418c
...
...
@@ -7,7 +7,7 @@
<app-form-group
:uiService=
"appUIService"
:data=
"transformData(data)"
:manageContainerStatus=
"detailsModel.group1.manageContainerStatus"
:isManageContainer=
"detailsModel.group1.isManageContainer"
@
managecontainerclick=
"manageContainerClick('group1')"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.sysrolepermission.main_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.sys_rolename.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_rolename'
:itemRules=
"this.rules.sys_rolename"
class=
''
:caption=
"$t('entities.sysrolepermission.main_form.details.sys_rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_rolename'
:itemRules=
"this.rules
()
.sys_rolename"
class=
''
:caption=
"$t('entities.sysrolepermission.main_form.details.sys_rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
...
...
@@ -34,7 +34,7 @@
</i-col>
<i-col
v-show=
"detailsModel.sys_permissionname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_permissionname'
:itemRules=
"this.rules.sys_permissionname"
class=
''
:caption=
"$t('entities.sysrolepermission.main_form.details.sys_permissionname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_permissionname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_permissionname'
:itemRules=
"this.rules
()
.sys_permissionname"
class=
''
:caption=
"$t('entities.sysrolepermission.main_form.details.sys_permissionname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_permissionname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
...
...
@@ -450,7 +450,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public
rules
:
any
=
{
public
rules
()
:
any
{
return
{
srfupdatedate
:
[
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'blur'
},
...
...
@@ -529,6 +530,51 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
'角色权限关系表标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'角色权限关系表标识 值不能为空'
,
trigger
:
'blur'
},
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public
deRules
:
any
=
{
};
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof MainBase
*/
public
verifyDeRules
(
name
:
string
,
rule
:
any
=
this
.
deRules
)
:{
isPast
:
boolean
,
infoMessage
:
string
}{
let
falg
=
{
isPast
:
true
,
infoMessage
:
""
};
if
(
!
rule
[
name
]){
return
falg
;
}
rule
[
name
].
forEach
((
item
:
any
)
=>
{
if
(
item
.
type
==
'SIMPLE'
&&
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]
!=
item
.
paramValue
){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'REGEX'
&&
(
item
.
isNotMode
?
item
.
RegExCode
.
test
(
this
.
data
[
name
])
:
!
item
.
RegExCode
.
test
(
this
.
data
[
name
]))){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'STRINGLENGTH'
){
let
valueLength
:
number
=
this
.
data
[
name
]?
this
.
data
[
name
].
length
:
0
;
if
(
item
.
isNotMode
?
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
:
!
(
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
)){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
}
if
(
item
.
type
==
'GROUP'
){
falg
=
this
.
verifyDeRules
(
'group'
,
item
)
}
});
return
falg
;
}
/**
...
...
@@ -806,7 +852,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
checkItem
(
name
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
validator
=
new
schema
({[
name
]:
this
.
rules
[
name
]});
var
validator
=
new
schema
({[
name
]:
this
.
rules
()
[
name
]});
validator
.
validate
({[
name
]:
this
.
data
[
name
]}).
then
(()
=>
{
resolve
(
true
);
})
...
...
app_web/src/widgets/sys-role-permission/main-form/main-form-service.ts
浏览文件 @
0fed418c
...
...
@@ -393,4 +393,25 @@ export default class MainService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-role/default-searchform/default-searchform-service.ts
浏览文件 @
0fed418c
...
...
@@ -364,4 +364,25 @@ export default class DefaultService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-role/main-form/main-form-base.vue
浏览文件 @
0fed418c
...
...
@@ -7,14 +7,14 @@
<app-form-group
:uiService=
"appUIService"
:data=
"transformData(data)"
:manageContainerStatus=
"detailsModel.group1.manageContainerStatus"
:isManageContainer=
"detailsModel.group1.isManageContainer"
@
managecontainerclick=
"manageContainerClick('group1')"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.sysrole.main_form.details.group1')"
:isShowCaption=
"false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.sys_rolename.visible"
:style=
"
{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item
name=
'sys_rolename'
:itemRules=
"this.rules.sys_rolename"
class=
''
:caption=
"$t('entities.sysrole.main_form.details.sys_rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_rolename'
:itemRules=
"this.rules
()
.sys_rolename"
class=
''
:caption=
"$t('entities.sysrole.main_form.details.sys_rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.sys_rolename"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.sys_rolename.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.memo.visible"
:style=
"
{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item
name=
'memo'
:itemRules=
"this.rules.memo"
class=
''
:caption=
"$t('entities.sysrole.main_form.details.memo')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.memo.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'memo'
:itemRules=
"this.rules
()
.memo"
class=
''
:caption=
"$t('entities.sysrole.main_form.details.memo')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.memo.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.memo"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.memo.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
...
...
@@ -489,7 +489,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public
rules
:
any
=
{
public
rules
()
:
any
{
return
{
srfupdatedate
:
[
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'blur'
},
...
...
@@ -556,6 +557,51 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
'角色标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'角色标识 值不能为空'
,
trigger
:
'blur'
},
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public
deRules
:
any
=
{
};
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof MainBase
*/
public
verifyDeRules
(
name
:
string
,
rule
:
any
=
this
.
deRules
)
:{
isPast
:
boolean
,
infoMessage
:
string
}{
let
falg
=
{
isPast
:
true
,
infoMessage
:
""
};
if
(
!
rule
[
name
]){
return
falg
;
}
rule
[
name
].
forEach
((
item
:
any
)
=>
{
if
(
item
.
type
==
'SIMPLE'
&&
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]
!=
item
.
paramValue
){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'REGEX'
&&
(
item
.
isNotMode
?
item
.
RegExCode
.
test
(
this
.
data
[
name
])
:
!
item
.
RegExCode
.
test
(
this
.
data
[
name
]))){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'STRINGLENGTH'
){
let
valueLength
:
number
=
this
.
data
[
name
]?
this
.
data
[
name
].
length
:
0
;
if
(
item
.
isNotMode
?
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
:
!
(
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
)){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
}
if
(
item
.
type
==
'GROUP'
){
falg
=
this
.
verifyDeRules
(
'group'
,
item
)
}
});
return
falg
;
}
/**
...
...
@@ -818,7 +864,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
checkItem
(
name
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
validator
=
new
schema
({[
name
]:
this
.
rules
[
name
]});
var
validator
=
new
schema
({[
name
]:
this
.
rules
()
[
name
]});
validator
.
validate
({[
name
]:
this
.
data
[
name
]}).
then
(()
=>
{
resolve
(
true
);
})
...
...
app_web/src/widgets/sys-role/main-form/main-form-service.ts
浏览文件 @
0fed418c
...
...
@@ -369,4 +369,25 @@ export default class MainService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-user-role/default-searchform/default-searchform-service.ts
浏览文件 @
0fed418c
...
...
@@ -364,4 +364,25 @@ export default class DefaultService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-user-role/main-form/main-form-base.vue
浏览文件 @
0fed418c
...
...
@@ -7,22 +7,24 @@
<app-form-group
:uiService=
"appUIService"
:data=
"transformData(data)"
:manageContainerStatus=
"detailsModel.group1.manageContainerStatus"
:isManageContainer=
"detailsModel.group1.isManageContainer"
@
managecontainerclick=
"manageContainerClick('group1')"
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.sysuserrole.main_form.details.group1')"
:isShowCaption=
"true"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.sys_roleid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_roleid'
:itemRules=
"this.rules.sys_roleid"
class=
''
:caption=
"$t('entities.sysuserrole.main_form.details.sys_roleid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_roleid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_roleid'
:itemRules=
"this.rules
()
.sys_roleid"
class=
''
:caption=
"$t('entities.sysuserrole.main_form.details.sys_roleid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_roleid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.sys_roleid"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.sys_roleid.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.sys_user_roleid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_user_roleid'
:itemRules=
"this.rules.sys_user_roleid"
class=
''
:caption=
"$t('entities.sysuserrole.main_form.details.sys_user_roleid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_user_roleid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_user_roleid'
:itemRules=
"this.rules
()
.sys_user_roleid"
class=
''
:caption=
"$t('entities.sysuserrole.main_form.details.sys_user_roleid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_user_roleid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'sys_user_roleid'
:value=
"data.sys_user_roleid"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
<app-span
name=
'sys_user_roleid'
:value=
"data.sys_user_roleid"
dataType=
"GUID"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.sys_rolename.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_rolename'
:itemRules=
"this.rules.sys_rolename"
class=
''
:caption=
"$t('entities.sysuserrole.main_form.details.sys_rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_rolename'
:itemRules=
"this.rules
()
.sys_rolename"
class=
''
:caption=
"$t('entities.sysuserrole.main_form.details.sys_rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
...
...
@@ -49,7 +51,7 @@
</i-col>
<i-col
v-show=
"detailsModel.sys_username.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_username'
:itemRules=
"this.rules.sys_username"
class=
''
:caption=
"$t('entities.sysuserrole.main_form.details.sys_username')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_username.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_username'
:itemRules=
"this.rules
()
.sys_username"
class=
''
:caption=
"$t('entities.sysuserrole.main_form.details.sys_username')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_username.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-picker
:formState=
"formState"
...
...
@@ -465,7 +467,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public
rules
:
any
=
{
public
rules
()
:
any
{
return
{
srfupdatedate
:
[
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'更新时间 值必须为字符串类型'
,
trigger
:
'blur'
},
...
...
@@ -544,6 +547,51 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
'用户标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'用户标识 值不能为空'
,
trigger
:
'blur'
},
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public
deRules
:
any
=
{
};
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof MainBase
*/
public
verifyDeRules
(
name
:
string
,
rule
:
any
=
this
.
deRules
)
:{
isPast
:
boolean
,
infoMessage
:
string
}{
let
falg
=
{
isPast
:
true
,
infoMessage
:
""
};
if
(
!
rule
[
name
]){
return
falg
;
}
rule
[
name
].
forEach
((
item
:
any
)
=>
{
if
(
item
.
type
==
'SIMPLE'
&&
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]
!=
item
.
paramValue
){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'REGEX'
&&
(
item
.
isNotMode
?
item
.
RegExCode
.
test
(
this
.
data
[
name
])
:
!
item
.
RegExCode
.
test
(
this
.
data
[
name
]))){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'STRINGLENGTH'
){
let
valueLength
:
number
=
this
.
data
[
name
]?
this
.
data
[
name
].
length
:
0
;
if
(
item
.
isNotMode
?
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
:
!
(
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
)){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
}
if
(
item
.
type
==
'GROUP'
){
falg
=
this
.
verifyDeRules
(
'group'
,
item
)
}
});
return
falg
;
}
/**
...
...
@@ -821,7 +869,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
checkItem
(
name
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
validator
=
new
schema
({[
name
]:
this
.
rules
[
name
]});
var
validator
=
new
schema
({[
name
]:
this
.
rules
()
[
name
]});
validator
.
validate
({[
name
]:
this
.
data
[
name
]}).
then
(()
=>
{
resolve
(
true
);
})
...
...
app_web/src/widgets/sys-user-role/main-form/main-form-service.ts
浏览文件 @
0fed418c
...
...
@@ -394,4 +394,25 @@ export default class MainService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-user/default-searchform/default-searchform-service.ts
浏览文件 @
0fed418c
...
...
@@ -364,4 +364,25 @@ export default class DefaultService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof DefaultService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
app_web/src/widgets/sys-user/main-form/main-form-base.vue
浏览文件 @
0fed418c
...
...
@@ -4,42 +4,42 @@
<row
>
<i-col
v-show=
"detailsModel.userid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'userid'
:itemRules=
"this.rules.userid"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.userid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.userid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'userid'
:itemRules=
"this.rules
()
.userid"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.userid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.userid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.userid"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.userid.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.username.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'username'
:itemRules=
"this.rules.username"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.username')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.username.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'username'
:itemRules=
"this.rules
()
.username"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.username')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.username.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.username"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.username.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.personname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'personname'
:itemRules=
"this.rules.personname"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.personname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.personname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'personname'
:itemRules=
"this.rules
()
.personname"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.personname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.personname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.personname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.personname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.loginname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'loginname'
:itemRules=
"this.rules.loginname"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.loginname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.loginname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'loginname'
:itemRules=
"this.rules
()
.loginname"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.loginname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.loginname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.loginname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.loginname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.orgname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'orgname'
:itemRules=
"this.rules.orgname"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.orgname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.orgname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'orgname'
:itemRules=
"this.rules
()
.orgname"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.orgname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.orgname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.orgname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.orgname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.mdeptname.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'mdeptname'
:itemRules=
"this.rules.mdeptname"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.mdeptname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.mdeptname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'mdeptname'
:itemRules=
"this.rules
()
.mdeptname"
class=
''
:caption=
"$t('entities.sysuser.main_form.details.mdeptname')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.mdeptname.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.mdeptname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.mdeptname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
...
...
@@ -456,7 +456,8 @@ export default class MainBase extends Vue implements ControlInterface {
* @type {*}
* @memberof MainBase
*/
public
rules
:
any
=
{
public
rules
()
:
any
{
return
{
srforikey
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'blur'
},
...
...
@@ -535,6 +536,51 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
'主部门名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'主部门名称 值不能为空'
,
trigger
:
'blur'
},
],
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof MainBase
*/
public
deRules
:
any
=
{
};
/**
* 校验属性值规则
*
* @public
* @param {{ name: string }} { name }
* @memberof MainBase
*/
public
verifyDeRules
(
name
:
string
,
rule
:
any
=
this
.
deRules
)
:{
isPast
:
boolean
,
infoMessage
:
string
}{
let
falg
=
{
isPast
:
true
,
infoMessage
:
""
};
if
(
!
rule
[
name
]){
return
falg
;
}
rule
[
name
].
forEach
((
item
:
any
)
=>
{
if
(
item
.
type
==
'SIMPLE'
&&
this
.
data
[
this
.
service
.
getItemNameByDeName
(
item
.
deName
)]
!=
item
.
paramValue
){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'REGEX'
&&
(
item
.
isNotMode
?
item
.
RegExCode
.
test
(
this
.
data
[
name
])
:
!
item
.
RegExCode
.
test
(
this
.
data
[
name
]))){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
if
(
item
.
type
==
'STRINGLENGTH'
){
let
valueLength
:
number
=
this
.
data
[
name
]?
this
.
data
[
name
].
length
:
0
;
if
(
item
.
isNotMode
?
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
:
!
(
valueLength
>
item
.
minValue
&&
valueLength
<
item
.
maxValue
)){
falg
.
isPast
=
false
;
falg
.
infoMessage
=
item
.
ruleInfo
;
}
}
if
(
item
.
type
==
'GROUP'
){
falg
=
this
.
verifyDeRules
(
'group'
,
item
)
}
});
return
falg
;
}
/**
...
...
@@ -812,7 +858,7 @@ export default class MainBase extends Vue implements ControlInterface {
*/
public
checkItem
(
name
:
string
):
Promise
<
any
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
validator
=
new
schema
({[
name
]:
this
.
rules
[
name
]});
var
validator
=
new
schema
({[
name
]:
this
.
rules
()
[
name
]});
validator
.
validate
({[
name
]:
this
.
data
[
name
]}).
then
(()
=>
{
resolve
(
true
);
})
...
...
app_web/src/widgets/sys-user/main-form/main-form-service.ts
浏览文件 @
0fed418c
...
...
@@ -370,4 +370,25 @@ export default class MainService extends ControlService {
return
{
context
:
tempContext
,
data
:
requestData
};
}
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof MainService
*/
public
getItemNameByDeName
(
name
:
string
)
:
string
{
let
itemName
=
name
;
let
mode
:
any
=
this
.
getMode
();
if
(
!
mode
&&
mode
.
getDataItems
instanceof
Function
)
{
return
name
;
}
let
formItemItems
:
any
[]
=
mode
.
getDataItems
();
formItemItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
prop
===
name
){
itemName
=
item
.
name
;
}
});
return
itemName
.
trim
();
}
}
\ No newline at end of file
ibzuaa-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
0fed418c
...
...
@@ -65,6 +65,10 @@ public class AuthenticationUser implements UserDetails
@JsonIgnore
private
Map
<
String
,
Object
>
userSessionParam
;
//用户自定义session值
private
Map
<
String
,
Set
<
String
>>
orgInfo
;
//上下级组织信息
private
String
porg
;
private
String
sorg
;
private
String
pdept
;
private
String
sdept
;
@JsonIgnore
...
...
@@ -133,6 +137,10 @@ public class AuthenticationUser implements UserDetails
sessionParams
.
put
(
"srflocale"
,
this
.
getLang
());
sessionParams
.
put
(
"srftimezone"
,
""
);
sessionParams
.
put
(
"srfusercode"
,
this
.
getUsercode
());
sessionParams
.
put
(
"srfporg"
,
this
.
getPorg
());
sessionParams
.
put
(
"srfsorg"
,
this
.
getSorg
());
sessionParams
.
put
(
"srfpdept"
,
this
.
getPdept
());
sessionParams
.
put
(
"srfsdept"
,
this
.
getSdept
());
}
return
this
.
sessionParams
;
}
...
...
@@ -143,6 +151,26 @@ public class AuthenticationUser implements UserDetails
return
new
HashMap
<>();
}
public
void
setOrgInfo
(
Map
<
String
,
Set
<
String
>>
orgInfo
)
{
this
.
orgInfo
=
orgInfo
;
if
(!
ObjectUtils
.
isEmpty
(
orgInfo
)
&&
!
ObjectUtils
.
isEmpty
(
orgInfo
.
get
(
"parentorg"
))){
porg
=(
String
.
format
(
"'%s'"
,
String
.
join
(
"','"
,
orgInfo
.
get
(
"parentorg"
))));
this
.
getSessionParams
().
put
(
"srfporg"
,
porg
);
}
if
(!
ObjectUtils
.
isEmpty
(
orgInfo
)
&&
!
ObjectUtils
.
isEmpty
(
orgInfo
.
get
(
"suborg"
))
){
sorg
=(
String
.
format
(
"'%s'"
,
String
.
join
(
"','"
,
orgInfo
.
get
(
"suborg"
))));
this
.
getSessionParams
().
put
(
"srfsorg"
,
sorg
);
}
if
(!
ObjectUtils
.
isEmpty
(
orgInfo
)
&&
!
ObjectUtils
.
isEmpty
(
orgInfo
.
get
(
"parentdept"
))){
pdept
=(
String
.
format
(
"'%s'"
,
String
.
join
(
"','"
,
orgInfo
.
get
(
"parentdept"
))));
this
.
getSessionParams
().
put
(
"srfpdept"
,
pdept
);
}
if
(!
ObjectUtils
.
isEmpty
(
orgInfo
)
&&
!
ObjectUtils
.
isEmpty
(
orgInfo
.
get
(
"subdept"
))){
sdept
=(
String
.
format
(
"'%s'"
,
String
.
join
(
"','"
,
orgInfo
.
get
(
"subdept"
))));
this
.
getSessionParams
().
put
(
"srfsdept"
,
sdept
);
}
}
public
void
setPermissionList
(
JSONObject
permissionList
)
{
this
.
permissionList
=
permissionList
;
if
(
authorities
==
null
&&
permissionList
!=
null
){
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录