Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
de248393
提交
de248393
编写于
7月 14, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong@lab.ibiz5.com 部署微服务应用
上级
9ebc3b62
变更
59
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
59 个修改的文件
包含
561 行增加
和
1730 行删除
+561
-1730
CHANGELOG.md
app_web/CHANGELOG.md
+44
-2
app-form-druipart.vue
...eb/src/components/app-form-druipart/app-form-druipart.vue
+3
-2
app-picker.vue
app_web/src/components/app-picker/app-picker.vue
+1
-1
app-span.vue
app_web/src/components/app-span/app-span.vue
+73
-2
sys-app-service-base.ts
app_web/src/service/sys-app/sys-app-service-base.ts
+8
-177
sys-auth-log-service-base.ts
...web/src/service/sys-auth-log/sys-auth-log-service-base.ts
+8
-177
sys-permission-service-base.ts
...src/service/sys-permission/sys-permission-service-base.ts
+8
-227
sys-role-permission-service-base.ts
...e/sys-role-permission/sys-role-permission-service-base.ts
+8
-277
sys-role-service-base.ts
app_web/src/service/sys-role/sys-role-service-base.ts
+8
-277
sys-user-role-service-base.ts
...b/src/service/sys-user-role/sys-user-role-service-base.ts
+8
-277
sys-user-service-base.ts
app_web/src/service/sys-user/sys-user-service-base.ts
+8
-227
default-searchform-base.vue
...ts/sys-app/default-searchform/default-searchform-base.vue
+1
-0
default-searchform-service.ts
.../sys-app/default-searchform/default-searchform-service.ts
+0
-1
main-form-base.vue
app_web/src/widgets/sys-app/main-form/main-form-base.vue
+9
-3
main-form-service.ts
app_web/src/widgets/sys-app/main-form/main-form-service.ts
+1
-2
main-grid-base.vue
app_web/src/widgets/sys-app/main-grid/main-grid-base.vue
+17
-9
main-grid-model.ts
app_web/src/widgets/sys-app/main-grid/main-grid-model.ts
+10
-0
main-grid-service.ts
app_web/src/widgets/sys-app/main-grid/main-grid-service.ts
+40
-4
default-searchform-base.vue
...s-auth-log/default-searchform/default-searchform-base.vue
+6
-0
default-searchform-service.ts
...auth-log/default-searchform/default-searchform-service.ts
+0
-1
main-grid-base.vue
...web/src/widgets/sys-auth-log/main-grid/main-grid-base.vue
+2
-2
main-grid-model.ts
...web/src/widgets/sys-auth-log/main-grid/main-grid-model.ts
+1
-0
main-grid-service.ts
...b/src/widgets/sys-auth-log/main-grid/main-grid-service.ts
+40
-4
default-searchform-service.ts
...rmission/default-searchform/default-searchform-service.ts
+0
-1
main-form-base.vue
...b/src/widgets/sys-permission/main-form/main-form-base.vue
+1
-3
main-form-service.ts
...src/widgets/sys-permission/main-form/main-form-service.ts
+0
-1
main-grid-base.vue
...b/src/widgets/sys-permission/main-grid/main-grid-base.vue
+2
-2
main-grid-model.ts
...b/src/widgets/sys-permission/main-grid/main-grid-model.ts
+1
-0
main-grid-service.ts
...src/widgets/sys-permission/main-grid/main-grid-service.ts
+40
-4
default-searchform-service.ts
...rmission/default-searchform/default-searchform-service.ts
+0
-1
main-form-base.vue
.../widgets/sys-role-permission/main-form/main-form-base.vue
+0
-3
main-form-service.ts
...idgets/sys-role-permission/main-form/main-form-service.ts
+0
-1
main-grid-base.vue
.../widgets/sys-role-permission/main-grid/main-grid-base.vue
+2
-2
main-grid-model.ts
.../widgets/sys-role-permission/main-grid/main-grid-model.ts
+1
-0
main-grid-service.ts
...idgets/sys-role-permission/main-grid/main-grid-service.ts
+40
-4
default-searchform-base.vue
...s/sys-role/default-searchform/default-searchform-base.vue
+1
-0
default-searchform-service.ts
...sys-role/default-searchform/default-searchform-service.ts
+0
-1
main-form-base.vue
app_web/src/widgets/sys-role/main-form/main-form-base.vue
+2
-3
main-form-service.ts
app_web/src/widgets/sys-role/main-form/main-form-service.ts
+0
-1
main-grid-base.vue
app_web/src/widgets/sys-role/main-grid/main-grid-base.vue
+2
-2
main-grid-model.ts
app_web/src/widgets/sys-role/main-grid/main-grid-model.ts
+1
-0
main-grid-service.ts
app_web/src/widgets/sys-role/main-grid/main-grid-service.ts
+40
-4
default-searchform-base.vue
...-user-role/default-searchform/default-searchform-base.vue
+1
-0
default-searchform-service.ts
...ser-role/default-searchform/default-searchform-service.ts
+0
-1
main-form-base.vue
...eb/src/widgets/sys-user-role/main-form/main-form-base.vue
+3
-3
main-form-service.ts
.../src/widgets/sys-user-role/main-form/main-form-service.ts
+1
-2
main-grid-base.vue
...eb/src/widgets/sys-user-role/main-grid/main-grid-base.vue
+2
-2
main-grid-model.ts
...eb/src/widgets/sys-user-role/main-grid/main-grid-model.ts
+1
-0
main-grid-service.ts
.../src/widgets/sys-user-role/main-grid/main-grid-service.ts
+40
-4
default-searchform-base.vue
...s/sys-user/default-searchform/default-searchform-base.vue
+4
-0
default-searchform-service.ts
...sys-user/default-searchform/default-searchform-service.ts
+0
-1
main-form-base.vue
app_web/src/widgets/sys-user/main-form/main-form-base.vue
+7
-3
main-form-service.ts
app_web/src/widgets/sys-user/main-form/main-form-service.ts
+0
-1
main-grid-base.vue
app_web/src/widgets/sys-user/main-grid/main-grid-base.vue
+2
-2
main-grid-model.ts
app_web/src/widgets/sys-user/main-grid/main-grid-model.ts
+1
-0
main-grid-service.ts
app_web/src/widgets/sys-user/main-grid/main-grid-service.ts
+40
-4
config.xml
config.xml
+5
-0
Dockerfile
ibzuaa-app/ibzuaa-app-web/src/main/docker/Dockerfile
+1
-1
ibzuaa-app-web.yaml
...aa-app/ibzuaa-app-web/src/main/docker/ibzuaa-app-web.yaml
+16
-1
未找到文件。
app_web/CHANGELOG.md
浏览文件 @
de248393
## v7.0.0-alpha.13 [2020-7-12]
### Bug修复
修复表格设置更新默认值不生效
修复行编辑中文本字段修改数据保存无法生效
修复行编辑时的错误提示
修复表格开关部件保存异常问题
修复表单可以修改数据主键问题
修复表格操作列问题
#### 基础文件
优化关系界面逻辑
## v7.0.0-alpha.12 [2020-7-2]
### Bug修复
...
...
@@ -14,6 +34,14 @@
修复多行输入十行 高度问题
修复调整实体处理逻辑(参数name转化为codeName)
修复表单项更新值规则校验
修复单位部门选择器禁用功能
修复修复去掉某个子菜单后,主菜单不显示
### 功能新增及优化
#### 模板
...
...
@@ -24,14 +52,28 @@
新增状态向导面板(658)
优化门户操作栏
新增门户操作栏图标(654)
新增首页空白模式支持
新增表格支持列拖动
优化应用级数据状态同步功能
新增主状态操作标识权限逻辑
新增工具栏、表格操作列、表单分组主状态操作标识判断
优化应用级数据状态同步功能(654)
优化应用国际化部分
#### 基础文件
新增修改密码功能(654)
优化无权限错误信息友好提示
优化应用国际化部分
## v7.0.0-alpha.11 [2020-6-21]
### Bug修复
...
...
app_web/src/components/app-form-druipart/app-form-druipart.vue
浏览文件 @
de248393
...
...
@@ -271,6 +271,7 @@ export default class AppFormDRUIPart extends Vue {
//设置顶层视图唯一标识
Object
.
assign
(
tempContext
,
this
.
context
);
Object
.
assign
(
tempContext
,{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
});
Object
.
assign
(
tempParam
,{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
});
// 设置局部上下文
if
(
this
.
localContext
&&
Object
.
keys
(
this
.
localContext
).
length
>
0
){
let
_context
:
any
=
this
.
$util
.
computedNavData
(
formData
,
tempContext
,
this
.
viewparams
,
this
.
localContext
);
...
...
@@ -292,9 +293,9 @@ export default class AppFormDRUIPart extends Vue {
}
}
if
(
!
this
.
isForbidLoad
){
this
.
$nextTick
(()
=>
{
setTimeout
(()
=>
{
this
.
formDruipart
.
next
({
action
:
'load'
,
data
:{
srfparentdename
:
this
.
parentName
,
srfparentkey
:
_paramitem
}});
});
}
,
0
);
}
}
...
...
app_web/src/components/app-picker/app-picker.vue
浏览文件 @
de248393
...
...
@@ -242,7 +242,7 @@ export default class AppPicker extends Vue {
* @param {*} oldVal
* @memberof AppPicker
*/
@
Watch
(
'value'
)
@
Watch
(
'value'
,{
immediate
:
true
}
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
curvalue
=
newVal
;
if
(
Object
.
is
(
this
.
editortype
,
'dropdown'
)
&&
this
.
valueitem
)
{
...
...
app_web/src/components/app-span/app-span.vue
浏览文件 @
de248393
...
...
@@ -6,7 +6,7 @@
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Watch
,
Model
}
from
'vue-property-decorator'
;
import
moment
from
"moment"
;
@
Component
({})
export
default
class
AppSpan
extends
Vue
{
...
...
@@ -18,6 +18,38 @@ export default class AppSpan extends Vue {
*/
@
Prop
()
public
value
?:
any
;
/**
* 数据类型
*
* @type {string}
* @memberof AppSpan
*/
@
Prop
()
public
dataType
?:
string
;
/**
* 单位名称
*
* @type {string}
* @memberof AppSpan
*/
@
Prop
()
public
unitName
?:
string
;
/**
* 精度
*
* @type {string}
* @memberof AppFormatData
*/
@
Prop
({
default
:
'2'
})
public
precision
?:
string
;
/**
* 日期值格式化
*
* @type {string}
* @memberof AppSpan
*/
@
Prop
()
public
valueFormat
?:
string
;
/**
* 当前表单项名称
*
...
...
@@ -158,12 +190,51 @@ export default class AppSpan extends Vue {
}
else
{
if
(
this
.
$util
.
isEmpty
(
this
.
value
)){
this
.
text
=
''
;
}
else
if
(
this
.
dataType
){
this
.
currencyFormat
();
}
else
if
(
this
.
valueFormat
){
this
.
dateFormat
();
}
else
{
this
.
text
=
this
.
value
;
}
}
}
/**
* 货币格式化
*
* @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
;
}
else
if
(
Object
.
is
(
this
.
dataType
,
"FLOAT"
)
||
Object
.
is
(
this
.
dataType
,
"DECIMAL"
)){
this
.
text
=
number
.
toFixed
(
_precision
);
}
else
{
this
.
text
=
this
.
value
;
}
}
/**
* 日期格式化
*
* @memberof AppSpan
*/
public
dateFormat
(){
if
(
this
.
valueFormat
){
if
(
this
.
valueFormat
.
indexOf
(
'%1$t'
)
!==
-
1
){
this
.
text
=
moment
(
this
.
data
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
else
if
(
this
.
valueFormat
.
indexOf
(
'%1$s'
)
==
-
1
){
this
.
text
=
moment
(
this
.
data
).
format
(
this
.
valueFormat
);
}
else
{
this
.
text
=
this
.
value
;
}
}
}
}
</
script
>
...
...
app_web/src/service/sys-app/sys-app-service-base.ts
浏览文件 @
de248393
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 应用服务对象基类
*
* @export
* @class SysAppServiceBase
* @extends {EntityServie}
*/
export
default
class
SysAppServiceBase
extends
EntityService
{
/**
* Creates an instance of SysAppServiceBase.
*
* @param {*} [opts={}]
* @memberof SysAppServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysAppServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'sysapp'
;
this
.
APPDEKEY
=
'id'
;
this
.
APPDENAME
=
'sysapps'
;
this
.
APPDETEXT
=
'label'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/sysapps/
${
context
.
sysapp
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps`
,
data
,
isloading
);
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysapps/
${
context
.
sysapp
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
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
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/sysapps/fetchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
app_web/src/service/sys-auth-log/sys-auth-log-service-base.ts
浏览文件 @
de248393
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 认证日志服务对象基类
*
* @export
* @class SysAuthLogServiceBase
* @extends {EntityServie}
*/
export
default
class
SysAuthLogServiceBase
extends
EntityService
{
/**
* Creates an instance of SysAuthLogServiceBase.
*
* @param {*} [opts={}]
* @memberof SysAuthLogServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysAuthLogServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'sysauthlog'
;
this
.
APPDEKEY
=
'logid'
;
this
.
APPDENAME
=
'sysauthlogs'
;
this
.
APPDETEXT
=
'username'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysauthlogs`
,
data
,
isloading
);
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
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
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/sysauthlogs/fetchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
app_web/src/service/sys-permission/sys-permission-service-base.ts
浏览文件 @
de248393
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 权限/资源服务对象基类
*
* @export
* @class SysPermissionServiceBase
* @extends {EntityServie}
*/
export
default
class
SysPermissionServiceBase
extends
EntityService
{
/**
* Creates an instance of SysPermissionServiceBase.
*
* @param {*} [opts={}]
* @memberof SysPermissionServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysPermissionServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'syspermission'
;
this
.
APPDEKEY
=
'permissionid'
;
this
.
APPDENAME
=
'syspermissions'
;
this
.
APPDETEXT
=
'permissionname'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
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
));
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/syspermissions/
${
context
.
syspermission
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/syspermissions/
${
context
.
syspermission
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
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
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/syspermissions/fetchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
app_web/src/service/sys-role-permission/sys-role-permission-service-base.ts
浏览文件 @
de248393
此差异已折叠。
点击以展开。
app_web/src/service/sys-role/sys-role-service-base.ts
浏览文件 @
de248393
此差异已折叠。
点击以展开。
app_web/src/service/sys-user-role/sys-user-role-service-base.ts
浏览文件 @
de248393
此差异已折叠。
点击以展开。
app_web/src/service/sys-user/sys-user-service-base.ts
浏览文件 @
de248393
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 系统用户服务对象基类
*
* @export
* @class SysUserServiceBase
* @extends {EntityServie}
*/
export
default
class
SysUserServiceBase
extends
EntityService
{
/**
* Creates an instance of SysUserServiceBase.
*
* @param {*} [opts={}]
* @memberof SysUserServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysUserServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'sysuser'
;
this
.
APPDEKEY
=
'userid'
;
this
.
APPDENAME
=
'sysusers'
;
this
.
APPDETEXT
=
'personname'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
sysuserrolesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
sysuserrolesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
)
as
any
);
if
(
sysuserrolesData
&&
sysuserrolesData
.
length
&&
sysuserrolesData
.
length
>
0
){
sysuserrolesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
userroleid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
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
));
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
sysuserrolesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
sysuserrolesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
)
as
any
);
if
(
sysuserrolesData
&&
sysuserrolesData
.
length
&&
sysuserrolesData
.
length
>
0
){
sysuserrolesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
userroleid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysusers/
${
context
.
sysuser
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/sysusers/
${
context
.
sysuser
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
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
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
sysuserrolesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
sysuserrolesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
)
as
any
);
if
(
sysuserrolesData
&&
sysuserrolesData
.
length
&&
sysuserrolesData
.
length
>
0
){
sysuserrolesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
userroleid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/sysusers/fetchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
app_web/src/widgets/sys-app/default-searchform/default-searchform-base.vue
浏览文件 @
de248393
...
...
@@ -7,6 +7,7 @@
<i-col
v-show=
"detailsModel.n_appname_like.visible"
:style=
"
{}" :sm="{ span: 12, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item
name=
'n_appname_like'
:itemRules=
"this.rules.n_appname_like"
class=
''
:caption=
"$t('entities.sysapp.default_searchform.details.n_appname_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_appname_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_appname_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_appname_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
...
...
app_web/src/widgets/sys-app/default-searchform/default-searchform-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-app/main-form/main-form-base.vue
浏览文件 @
de248393
...
...
@@ -9,12 +9,14 @@
<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"
>
<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"
>
<input-box
v-model=
"data.appname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.appname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
...
...
@@ -33,36 +35,42 @@
codelistType='STATIC'
placeholder='请选择...' style="">
</dropdown-list>
</app-form-item>
</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"
>
<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"
>
<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"
>
<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-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"
>
<input-box
v-model=
"data.addr"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.addr.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
...
...
@@ -1309,11 +1317,9 @@ export default class MainBase extends Vue implements ControlInterface {
}
const
data
=
response
.
data
;
if
(
data
.
sysapp
){
Object
.
assign
(
this
.
context
,{
sysapp
:
data
.
sysapp
})
}
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
,
'loadDraft'
);
this
.
data
.
appid
=
null
;
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
...
...
app_web/src/widgets/sys-app/main-form/main-form-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
...
...
@@ -164,7 +163,7 @@ export default class MainService extends ControlService {
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
Object
.
assign
(
Data
,{
id
:
data
.
id
,
srffrontuf
:
'1'
});
Object
.
assign
(
Data
,{
id
:
data
.
app
id
,
srffrontuf
:
'1'
});
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
...
...
app_web/src/widgets/sys-app/main-grid/main-grid-base.vue
浏览文件 @
de248393
...
...
@@ -40,10 +40,11 @@
@
change=
"($event)=>
{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</
template
>
<
template
v-if=
"!actualIsOpenEdit"
>
<app-span
name=
'pssystemid'
editorType=
"HIDDEN"
:value=
"row.pssystemid"
></app-span>
<app-span
name=
'pssystemid'
editorType=
"HIDDEN"
:value=
"row.pssystemid"
dataType=
"PICKUP"
precision=
"0"
></app-span>
</
template
>
</template>
</el-table-column>
...
...
@@ -67,10 +68,11 @@
@
change=
"($event)=>
{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</
template
>
<
template
v-if=
"!actualIsOpenEdit"
>
<app-span
name=
'appid'
editorType=
"TEXTBOX"
:value=
"row.appid"
></app-span>
<app-span
name=
'appid'
editorType=
"TEXTBOX"
:value=
"row.appid"
dataType=
"TEXT"
precision=
"0"
></app-span>
</
template
>
</template>
</el-table-column>
...
...
@@ -94,10 +96,11 @@
@
change=
"($event)=>
{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</
template
>
<
template
v-if=
"!actualIsOpenEdit"
>
<app-span
name=
'appname'
editorType=
"TEXTBOX"
:value=
"row.appname"
></app-span>
<app-span
name=
'appname'
editorType=
"TEXTBOX"
:value=
"row.appname"
dataType=
"TEXT"
precision=
"0"
></app-span>
</
template
>
</template>
</el-table-column>
...
...
@@ -121,10 +124,11 @@
@
change=
"($event)=>
{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</
template
>
<
template
v-if=
"!actualIsOpenEdit"
>
<app-span
name=
'appgroup'
editorType=
"TEXTBOX"
:value=
"row.appgroup"
></app-span>
<app-span
name=
'appgroup'
editorType=
"TEXTBOX"
:value=
"row.appgroup"
dataType=
"TEXT"
precision=
"0"
></app-span>
</
template
>
</template>
</el-table-column>
...
...
@@ -182,10 +186,11 @@
@
change=
"($event)=>
{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</
template
>
<
template
v-if=
"!actualIsOpenEdit"
>
<app-span
name=
'fullname'
editorType=
"TEXTBOX"
:value=
"row.fullname"
></app-span>
<app-span
name=
'fullname'
editorType=
"TEXTBOX"
:value=
"row.fullname"
dataType=
"TEXT"
precision=
"0"
></app-span>
</
template
>
</template>
</el-table-column>
...
...
@@ -209,10 +214,11 @@
@
change=
"($event)=>
{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</
template
>
<
template
v-if=
"!actualIsOpenEdit"
>
<app-span
name=
'icon'
editorType=
"TEXTBOX"
:value=
"row.icon"
></app-span>
<app-span
name=
'icon'
editorType=
"TEXTBOX"
:value=
"row.icon"
dataType=
"TEXT"
precision=
"0"
></app-span>
</
template
>
</template>
</el-table-column>
...
...
@@ -236,10 +242,11 @@
@
change=
"($event)=>
{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</
template
>
<
template
v-if=
"!actualIsOpenEdit"
>
<app-span
name=
'addr'
editorType=
"TEXTBOX"
:value=
"row.addr"
></app-span>
<app-span
name=
'addr'
editorType=
"TEXTBOX"
:value=
"row.addr"
dataType=
"TEXT"
precision=
"0"
></app-span>
</
template
>
</template>
</el-table-column>
...
...
@@ -255,6 +262,7 @@
<template
v-if=
"actualIsOpenEdit"
>
<app-form-item
:error=
"gridItemsModel[$index][column.property].error"
>
<app-switch
name=
'visabled'
:value=
"row[column.property]"
@
change=
"($event)=>
{row[column.property] = $event;gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (3
&
2) !== 2 : (3
&
1) !== 1" style="">
</app-switch>
</app-form-item>
</
template
>
<
template
v-if=
"!actualIsOpenEdit"
>
...
...
@@ -692,7 +700,7 @@ export default class MainBase extends Vue implements ControlInterface {
*
* @memberof MainBase
*/
public
defaultUpdateItems
:
Array
<
any
>
=
[
'icon'
,
'visabled'
,
'appname'
,
'appid'
,
'pssystemid'
,
'addr'
,
'apptype'
,
'srfkey'
,
'fullname'
,
'appgroup'
];
public
defaultUpdateItems
:
Array
<
any
>
=
[
,,,,,,,,,
];
/**
* 选中行数据
...
...
@@ -1757,7 +1765,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
wrong'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
});
console
.
error
(
errorMessage
[
index
]);
});
}
...
...
app_web/src/widgets/sys-app/main-grid/main-grid-model.ts
浏览文件 @
de248393
...
...
@@ -30,36 +30,43 @@ export default class MainModel {
name
:
'icon'
,
prop
:
'icon'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'visabled'
,
prop
:
'visabled'
,
dataType
:
'YESNO'
,
isEditable
:
true
},
{
name
:
'appname'
,
prop
:
'label'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'appid'
,
prop
:
'id'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'pssystemid'
,
prop
:
'systemid'
,
dataType
:
'PICKUP'
,
isEditable
:
true
},
{
name
:
'addr'
,
prop
:
'addr'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'apptype'
,
prop
:
'type'
,
dataType
:
'SSCODELIST'
,
isEditable
:
true
},
{
name
:
'srfmajortext'
,
...
...
@@ -75,16 +82,19 @@ export default class MainModel {
name
:
'srfkey'
,
prop
:
'id'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'fullname'
,
prop
:
'fullname'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'appgroup'
,
prop
:
'group'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'sysapp'
,
...
...
app_web/src/widgets/sys-app/main-grid/main-grid-service.ts
浏览文件 @
de248393
...
...
@@ -99,7 +99,7 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
...
...
@@ -158,14 +158,14 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
...
...
@@ -305,5 +305,41 @@ export default class MainService extends ControlService {
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public
handleRequestDataWithUpdate
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
isEditable
&&
item
.
prop
&&
item
.
name
&&
(
data
[
item
.
name
]
||
Object
.
is
(
data
[
item
.
name
],
0
))
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_web/src/widgets/sys-auth-log/default-searchform/default-searchform-base.vue
浏览文件 @
de248393
...
...
@@ -7,12 +7,14 @@
<i-col
v-show=
"detailsModel.n_username_like.visible"
:style=
"
{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item
name=
'n_username_like'
:itemRules=
"this.rules.n_username_like"
class=
''
:caption=
"$t('entities.sysauthlog.default_searchform.details.n_username_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_username_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_username_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_username_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.n_personname_like.visible"
:style=
"
{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item
name=
'n_personname_like'
:itemRules=
"this.rules.n_personname_like"
class=
''
:caption=
"$t('entities.sysauthlog.default_searchform.details.n_personname_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_personname_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_personname_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_personname_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
...
...
@@ -31,24 +33,28 @@
codelistType='STATIC'
placeholder='请选择...' style="width:100px;">
</dropdown-list>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.n_authtime_gtandeq.visible"
:style=
"
{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item
name=
'n_authtime_gtandeq'
:itemRules=
"this.rules.n_authtime_gtandeq"
class=
''
:caption=
"$t('entities.sysauthlog.default_searchform.details.n_authtime_gtandeq')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_authtime_gtandeq.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<date-picker
type=
"datetime"
:transfer=
"true"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择时间..."
:value=
"data.n_authtime_gtandeq"
:disabled=
"detailsModel.n_authtime_gtandeq.disabled"
style=
"min-width: 150px; width:100px;"
@
on-change=
"(val1, val2) =>
{ this.data.n_authtime_gtandeq = val1 }">
</date-picker>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.n_authtime_ltandeq.visible"
:style=
"
{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item
name=
'n_authtime_ltandeq'
:itemRules=
"this.rules.n_authtime_ltandeq"
class=
''
:caption=
"$t('entities.sysauthlog.default_searchform.details.n_authtime_ltandeq')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_authtime_ltandeq.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<date-picker
type=
"datetime"
:transfer=
"true"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择时间..."
:value=
"data.n_authtime_ltandeq"
:disabled=
"detailsModel.n_authtime_ltandeq.disabled"
style=
"min-width: 150px; width:100px;"
@
on-change=
"(val1, val2) =>
{ this.data.n_authtime_ltandeq = val1 }">
</date-picker>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.n_domain_like.visible"
:style=
"
{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 8, offset: 0 }">
<app-form-item
name=
'n_domain_like'
:itemRules=
"this.rules.n_domain_like"
class=
''
:caption=
"$t('entities.sysauthlog.default_searchform.details.n_domain_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_domain_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_domain_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_domain_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
...
...
app_web/src/widgets/sys-auth-log/default-searchform/default-searchform-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-auth-log/main-grid/main-grid-base.vue
浏览文件 @
de248393
...
...
@@ -581,7 +581,7 @@ export default class MainBase extends Vue implements ControlInterface {
*
* @memberof MainBase
*/
public
defaultUpdateItems
:
Array
<
any
>
=
[
'srfkey'
];
public
defaultUpdateItems
:
Array
<
any
>
=
[];
/**
* 选中行数据
...
...
@@ -1585,7 +1585,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
wrong'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
});
console
.
error
(
errorMessage
[
index
]);
});
}
...
...
app_web/src/widgets/sys-auth-log/main-grid/main-grid-model.ts
浏览文件 @
de248393
...
...
@@ -80,6 +80,7 @@ export default class MainModel {
name
:
'srfkey'
,
prop
:
'logid'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'sysauthlog'
,
...
...
app_web/src/widgets/sys-auth-log/main-grid/main-grid-service.ts
浏览文件 @
de248393
...
...
@@ -99,7 +99,7 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
...
...
@@ -158,14 +158,14 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
...
...
@@ -305,5 +305,41 @@ export default class MainService extends ControlService {
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public
handleRequestDataWithUpdate
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
isEditable
&&
item
.
prop
&&
item
.
name
&&
(
data
[
item
.
name
]
||
Object
.
is
(
data
[
item
.
name
],
0
))
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_web/src/widgets/sys-permission/default-searchform/default-searchform-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-permission/main-form/main-form-base.vue
浏览文件 @
de248393
...
...
@@ -6,6 +6,7 @@
<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"
>
<input-box
v-model=
"data.sys_permissionname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.sys_permissionname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
...
...
@@ -1112,9 +1113,6 @@ export default class MainBase extends Vue implements ControlInterface {
}
const
data
=
response
.
data
;
if
(
data
.
syspermission
){
Object
.
assign
(
this
.
context
,{
syspermission
:
data
.
syspermission
})
}
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
,
'loadDraft'
);
this
.
$emit
(
'load'
,
data
);
...
...
app_web/src/widgets/sys-permission/main-form/main-form-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-permission/main-grid/main-grid-base.vue
浏览文件 @
de248393
...
...
@@ -493,7 +493,7 @@ export default class MainBase extends Vue implements ControlInterface {
*
* @memberof MainBase
*/
public
defaultUpdateItems
:
Array
<
any
>
=
[
'srfkey'
];
public
defaultUpdateItems
:
Array
<
any
>
=
[];
/**
* 选中行数据
...
...
@@ -1441,7 +1441,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
wrong'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
});
console
.
error
(
errorMessage
[
index
]);
});
}
...
...
app_web/src/widgets/sys-permission/main-grid/main-grid-model.ts
浏览文件 @
de248393
...
...
@@ -45,6 +45,7 @@ export default class MainModel {
name
:
'srfkey'
,
prop
:
'permissionid'
,
dataType
:
'GUID'
,
isEditable
:
true
},
{
name
:
'sys_permissionname'
,
...
...
app_web/src/widgets/sys-permission/main-grid/main-grid-service.ts
浏览文件 @
de248393
...
...
@@ -99,7 +99,7 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
...
...
@@ -158,14 +158,14 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
...
...
@@ -305,5 +305,41 @@ export default class MainService extends ControlService {
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public
handleRequestDataWithUpdate
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
isEditable
&&
item
.
prop
&&
item
.
name
&&
(
data
[
item
.
name
]
||
Object
.
is
(
data
[
item
.
name
],
0
))
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_web/src/widgets/sys-role-permission/default-searchform/default-searchform-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-role-permission/main-form/main-form-base.vue
浏览文件 @
de248393
...
...
@@ -1237,9 +1237,6 @@ export default class MainBase extends Vue implements ControlInterface {
}
const
data
=
response
.
data
;
if
(
data
.
sysrolepermission
){
Object
.
assign
(
this
.
context
,{
sysrolepermission
:
data
.
sysrolepermission
})
}
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
,
'loadDraft'
);
this
.
$emit
(
'load'
,
data
);
...
...
app_web/src/widgets/sys-role-permission/main-form/main-form-service.ts
浏览文件 @
de248393
...
...
@@ -174,7 +174,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-role-permission/main-grid/main-grid-base.vue
浏览文件 @
de248393
...
...
@@ -519,7 +519,7 @@ export default class MainBase extends Vue implements ControlInterface {
*
* @memberof MainBase
*/
public
defaultUpdateItems
:
Array
<
any
>
=
[
'srfkey'
];
public
defaultUpdateItems
:
Array
<
any
>
=
[];
/**
* 选中行数据
...
...
@@ -1475,7 +1475,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
wrong'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
});
console
.
error
(
errorMessage
[
index
]);
});
}
...
...
app_web/src/widgets/sys-role-permission/main-grid/main-grid-model.ts
浏览文件 @
de248393
...
...
@@ -60,6 +60,7 @@ export default class MainModel {
name
:
'srfkey'
,
prop
:
'rolepermissionid'
,
dataType
:
'GUID'
,
isEditable
:
true
},
{
name
:
'sys_permissionname'
,
...
...
app_web/src/widgets/sys-role-permission/main-grid/main-grid-service.ts
浏览文件 @
de248393
...
...
@@ -99,7 +99,7 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
...
...
@@ -158,14 +158,14 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
...
...
@@ -305,5 +305,41 @@ export default class MainService extends ControlService {
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public
handleRequestDataWithUpdate
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
isEditable
&&
item
.
prop
&&
item
.
name
&&
(
data
[
item
.
name
]
||
Object
.
is
(
data
[
item
.
name
],
0
))
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_web/src/widgets/sys-role/default-searchform/default-searchform-base.vue
浏览文件 @
de248393
...
...
@@ -7,6 +7,7 @@
<i-col
v-show=
"detailsModel.n_sys_rolename_like.visible"
:style=
"
{}" :lg="{ span: 8, offset: 0 }">
<app-form-item
name=
'n_sys_rolename_like'
:itemRules=
"this.rules.n_sys_rolename_like"
class=
''
:caption=
"$t('entities.sysrole.default_searchform.details.n_sys_rolename_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_sys_rolename_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_sys_rolename_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_sys_rolename_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
...
...
app_web/src/widgets/sys-role/default-searchform/default-searchform-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-role/main-form/main-form-base.vue
浏览文件 @
de248393
...
...
@@ -9,12 +9,14 @@
<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"
>
<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"
>
<input-box
v-model=
"data.memo"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.memo.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
...
...
@@ -1247,9 +1249,6 @@ export default class MainBase extends Vue implements ControlInterface {
}
const
data
=
response
.
data
;
if
(
data
.
sysrole
){
Object
.
assign
(
this
.
context
,{
sysrole
:
data
.
sysrole
})
}
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
,
'loadDraft'
);
this
.
$emit
(
'load'
,
data
);
...
...
app_web/src/widgets/sys-role/main-form/main-form-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-role/main-grid/main-grid-base.vue
浏览文件 @
de248393
...
...
@@ -531,7 +531,7 @@ export default class MainBase extends Vue implements ControlInterface {
*
* @memberof MainBase
*/
public
defaultUpdateItems
:
Array
<
any
>
=
[
'srfkey'
];
public
defaultUpdateItems
:
Array
<
any
>
=
[];
/**
* 选中行数据
...
...
@@ -1495,7 +1495,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
wrong'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
});
console
.
error
(
errorMessage
[
index
]);
});
}
...
...
app_web/src/widgets/sys-role/main-grid/main-grid-model.ts
浏览文件 @
de248393
...
...
@@ -60,6 +60,7 @@ export default class MainModel {
name
:
'srfkey'
,
prop
:
'roleid'
,
dataType
:
'GUID'
,
isEditable
:
true
},
{
name
:
'sysrole'
,
...
...
app_web/src/widgets/sys-role/main-grid/main-grid-service.ts
浏览文件 @
de248393
...
...
@@ -99,7 +99,7 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
...
...
@@ -158,14 +158,14 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
...
...
@@ -305,5 +305,41 @@ export default class MainService extends ControlService {
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public
handleRequestDataWithUpdate
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
isEditable
&&
item
.
prop
&&
item
.
name
&&
(
data
[
item
.
name
]
||
Object
.
is
(
data
[
item
.
name
],
0
))
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_web/src/widgets/sys-user-role/default-searchform/default-searchform-base.vue
浏览文件 @
de248393
...
...
@@ -7,6 +7,7 @@
<i-col
v-show=
"detailsModel.n_sys_username_like.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'n_sys_username_like'
:itemRules=
"this.rules.n_sys_username_like"
class=
''
:caption=
"$t('entities.sysuserrole.default_searchform.details.n_sys_username_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_sys_username_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_sys_username_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_sys_username_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
...
...
app_web/src/widgets/sys-user-role/default-searchform/default-searchform-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-user-role/main-form/main-form-base.vue
浏览文件 @
de248393
...
...
@@ -9,6 +9,7 @@
<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"
>
<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>
...
...
@@ -16,6 +17,7 @@
<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-form-item>
</i-col>
...
...
@@ -1250,11 +1252,9 @@ export default class MainBase extends Vue implements ControlInterface {
}
const
data
=
response
.
data
;
if
(
data
.
sysuserrole
){
Object
.
assign
(
this
.
context
,{
sysuserrole
:
data
.
sysuserrole
})
}
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
,
'loadDraft'
);
this
.
data
.
sys_user_roleid
=
null
;
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
...
...
app_web/src/widgets/sys-user-role/main-form/main-form-service.ts
浏览文件 @
de248393
...
...
@@ -174,7 +174,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
...
...
@@ -188,7 +187,7 @@ export default class MainService extends ControlService {
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
Object
.
assign
(
Data
,{
userroleid
:
data
.
user
roleid
,
srffrontuf
:
'1'
});
Object
.
assign
(
Data
,{
userroleid
:
data
.
sys_user_
roleid
,
srffrontuf
:
'1'
});
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
...
...
app_web/src/widgets/sys-user-role/main-grid/main-grid-base.vue
浏览文件 @
de248393
...
...
@@ -557,7 +557,7 @@ export default class MainBase extends Vue implements ControlInterface {
*
* @memberof MainBase
*/
public
defaultUpdateItems
:
Array
<
any
>
=
[
'srfkey'
];
public
defaultUpdateItems
:
Array
<
any
>
=
[];
/**
* 选中行数据
...
...
@@ -1529,7 +1529,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
wrong'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
});
console
.
error
(
errorMessage
[
index
]);
});
}
...
...
app_web/src/widgets/sys-user-role/main-grid/main-grid-model.ts
浏览文件 @
de248393
...
...
@@ -70,6 +70,7 @@ export default class MainModel {
name
:
'srfkey'
,
prop
:
'userroleid'
,
dataType
:
'GUID'
,
isEditable
:
true
},
{
name
:
'sys_userid'
,
...
...
app_web/src/widgets/sys-user-role/main-grid/main-grid-service.ts
浏览文件 @
de248393
...
...
@@ -99,7 +99,7 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
...
...
@@ -158,14 +158,14 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
...
...
@@ -305,5 +305,41 @@ export default class MainService extends ControlService {
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public
handleRequestDataWithUpdate
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
isEditable
&&
item
.
prop
&&
item
.
name
&&
(
data
[
item
.
name
]
||
Object
.
is
(
data
[
item
.
name
],
0
))
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
app_web/src/widgets/sys-user/default-searchform/default-searchform-base.vue
浏览文件 @
de248393
...
...
@@ -7,24 +7,28 @@
<i-col
v-show=
"detailsModel.n_personname_like.visible"
:style=
"
{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item
name=
'n_personname_like'
:itemRules=
"this.rules.n_personname_like"
class=
''
:caption=
"$t('entities.sysuser.default_searchform.details.n_personname_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_personname_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_personname_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_personname_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.n_loginname_like.visible"
:style=
"
{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item
name=
'n_loginname_like'
:itemRules=
"this.rules.n_loginname_like"
class=
''
:caption=
"$t('entities.sysuser.default_searchform.details.n_loginname_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_loginname_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_loginname_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_loginname_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.n_mdeptname_like.visible"
:style=
"
{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item
name=
'n_mdeptname_like'
:itemRules=
"this.rules.n_mdeptname_like"
class=
''
:caption=
"$t('entities.sysuser.default_searchform.details.n_mdeptname_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_mdeptname_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_mdeptname_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_mdeptname_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.n_orgname_like.visible"
:style=
"
{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 12, offset: 0 }" :lg="{ span: 8, offset: 0 }" :xl="{ span: 6, offset: 0 }">
<app-form-item
name=
'n_orgname_like'
:itemRules=
"this.rules.n_orgname_like"
class=
''
:caption=
"$t('entities.sysuser.default_searchform.details.n_orgname_like')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.n_orgname_like.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.n_orgname_like"
@
enter=
"onEnter($event)"
:disabled=
"detailsModel.n_orgname_like.disabled"
type=
'text'
style=
"width:100px;"
></input-box>
</app-form-item>
</i-col>
...
...
app_web/src/widgets/sys-user/default-searchform/default-searchform-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class DefaultService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-user/main-form/main-form-base.vue
浏览文件 @
de248393
...
...
@@ -6,36 +6,42 @@
<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"
>
<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"
>
<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"
>
<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"
>
<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"
>
<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"
>
<input-box
v-model=
"data.mdeptname"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.mdeptname.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
...
...
@@ -1237,11 +1243,9 @@ export default class MainBase extends Vue implements ControlInterface {
}
const
data
=
response
.
data
;
if
(
data
.
sysuser
){
Object
.
assign
(
this
.
context
,{
sysuser
:
data
.
sysuser
})
}
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
,
'loadDraft'
);
this
.
data
.
userid
=
null
;
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
...
...
app_web/src/widgets/sys-user/main-form/main-form-service.ts
浏览文件 @
de248393
...
...
@@ -150,7 +150,6 @@ export default class MainService extends ControlService {
});
}
/**
* 添加数据
*
...
...
app_web/src/widgets/sys-user/main-grid/main-grid-base.vue
浏览文件 @
de248393
...
...
@@ -555,7 +555,7 @@ export default class MainBase extends Vue implements ControlInterface {
*
* @memberof MainBase
*/
public
defaultUpdateItems
:
Array
<
any
>
=
[
'srfkey'
];
public
defaultUpdateItems
:
Array
<
any
>
=
[];
/**
* 选中行数据
...
...
@@ -1535,7 +1535,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
saveFailed'
)
as
string
),
desc
:
item
.
majorentityname
+
(
this
.
$t
(
'app.commonWords.saveFailed'
)
as
string
)
+
'!'
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.
wrong'
)
as
string
),
desc
:
errorMessage
[
index
].
data
.
message
});
console
.
error
(
errorMessage
[
index
]);
});
}
...
...
app_web/src/widgets/sys-user/main-grid/main-grid-model.ts
浏览文件 @
de248393
...
...
@@ -70,6 +70,7 @@ export default class MainModel {
name
:
'srfkey'
,
prop
:
'userid'
,
dataType
:
'TEXT'
,
isEditable
:
true
},
{
name
:
'sysuser'
,
...
...
app_web/src/widgets/sys-user/main-grid/main-grid-service.ts
浏览文件 @
de248393
...
...
@@ -99,7 +99,7 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
...
...
@@ -158,14 +158,14 @@ export default class MainService extends ControlService {
*/
@
Errorlog
public
update
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
WithUpdate
(
action
,
context
,
data
,
true
);
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
_appEntityService
:
any
=
this
.
appEntityService
;
let
result
:
Promise
<
any
>
;
if
(
_appEntityService
[
action
]
&&
_appEntityService
[
action
]
instanceof
Function
)
{
result
=
_appEntityService
[
action
](
Data
,
Context
,
isloading
);
result
=
_appEntityService
[
action
](
Context
,
Data
,
isloading
);
}
else
{
result
=
_appEntityService
.
Update
(
Data
,
Context
,
isloading
);
result
=
_appEntityService
.
Update
(
Context
,
Data
,
isloading
);
}
result
.
then
((
response
)
=>
{
this
.
handleResponse
(
action
,
response
);
...
...
@@ -305,5 +305,41 @@ export default class MainService extends ControlService {
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof MainService
*/
public
handleRequestDataWithUpdate
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isMerge
:
boolean
=
false
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
dataItems
:
any
[]
=
model
.
getDataItems
();
let
requestData
:
any
=
{};
if
(
isMerge
&&
(
data
&&
data
.
viewparams
)){
Object
.
assign
(
requestData
,
data
.
viewparams
);
}
dataItems
.
forEach
((
item
:
any
)
=>
{
if
(
item
&&
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
'FONTKEY'
)){
if
(
item
&&
item
.
prop
&&
item
.
name
){
requestData
[
item
.
prop
]
=
context
[
item
.
name
];
}
}
else
{
if
(
item
&&
item
.
isEditable
&&
item
.
prop
&&
item
.
name
&&
(
data
[
item
.
name
]
||
Object
.
is
(
data
[
item
.
name
],
0
))
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
}
});
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
if
(
tempContext
&&
tempContext
.
srfsessionid
){
tempContext
.
srfsessionkey
=
tempContext
.
srfsessionid
;
delete
tempContext
.
srfsessionid
;
}
return
{
context
:
tempContext
,
data
:
requestData
};
}
}
\ No newline at end of file
config.xml
浏览文件 @
de248393
...
...
@@ -37,6 +37,11 @@
git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/
mvn clean package -Pweb
cd ibzuaa-app/ibzuaa-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzuaa-app/ibzuaa-app-web/src/main/docker/Dockerfile
浏览文件 @
de248393
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-app-web.jar
EXPOSE
8080
EXPOSE
30002
ADD
ibzuaa-app-web.jar /ibzuaa-app-web.jar
ibzuaa-app/ibzuaa-app-web/src/main/docker/ibzuaa-app-web.yaml
浏览文件 @
de248393
...
...
@@ -3,9 +3,24 @@ services:
ibzuaa-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-app-web:latest
ports
:
-
"
8080:8080
"
-
"
30002:30002
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=30002
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
ABC=1
-
DEC=2
-
NACOS=172.16.102.211:8848
deploy
:
resources
:
limits
:
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录