Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibztask
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibztask
提交
988330ef
提交
988330ef
编写于
9月 22, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
1c9540b8
变更
93
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
93 个修改的文件
包含
2904 行增加
和
338 行删除
+2904
-338
avue.min.js
app_web/public/assets/js/avue.min.js
+8
-0
view-message-group.json
app_web/public/assets/json/view-message-group.json
+2
-0
index.css
app_web/public/assets/styles/index.css
+1
-0
app-register.ts
app_web/src/app-register.ts
+13
-2
codelist-service.ts
app_web/src/codelist/codelist-service.ts
+201
-0
app-alert-group.vue
app_web/src/components/app-alert-group/app-alert-group.vue
+84
-0
app-alert.less
app_web/src/components/app-alert/app-alert.less
+13
-0
app-alert.vue
app_web/src/components/app-alert/app-alert.vue
+201
-0
app-checkbox-list.vue
...eb/src/components/app-checkbox-list/app-checkbox-list.vue
+1
-1
app-data-upload.vue
app_web/src/components/app-data-upload/app-data-upload.vue
+1
-1
app-department-personnel.vue
...nts/app-department-personnel/app-department-personnel.vue
+1
-1
app-department-select.vue
...omponents/app-department-select/app-department-select.vue
+1
-1
app-form-druipart.vue
...eb/src/components/app-form-druipart/app-form-druipart.vue
+1
-1
app-form-part.less
app_web/src/components/app-form-part/app-form-part.less
+3
-0
app-form-part.vue
app_web/src/components/app-form-part/app-form-part.vue
+244
-0
app-group-select.vue
app_web/src/components/app-group-select/app-group-select.vue
+1
-1
app-message-popover.less
...c/components/app-message-popover/app-message-popover.less
+1
-1
app-message-popover.vue
...rc/components/app-message-popover/app-message-popover.vue
+1
-1
app-org-select.vue
app_web/src/components/app-org-select/app-org-select.vue
+1
-1
app-panel-button.vue
app_web/src/components/app-panel-button/app-panel-button.vue
+62
-0
app-radio-group.vue
app_web/src/components/app-radio-group/app-radio-group.vue
+1
-1
app-rawitem.vue
app_web/src/components/app-rawitem/app-rawitem.vue
+86
-0
app-transfer.vue
app_web/src/components/app-transfer/app-transfer.vue
+1
-1
avue-custom-form.vue
app_web/src/components/avue-custom-form/avue-custom-form.vue
+55
-43
codelist.vue
app_web/src/components/codelist/codelist.vue
+1
-1
dropdown-list-dynamic.vue
...omponents/dropdown-list-dynamic/dropdown-list-dynamic.vue
+1
-1
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+1
-1
dropdown-list.vue
app_web/src/components/dropdown-list/dropdown-list.vue
+47
-1
data-view9-engine.ts
app_web/src/engine/view/data-view9-engine.ts
+2
-2
grid-view-engine.ts
app_web/src/engine/view/grid-view-engine.ts
+2
-2
list-view9-engine.ts
app_web/src/engine/view/list-view9-engine.ts
+2
-2
md-view-engine.ts
app_web/src/engine/view/md-view-engine.ts
+3
-3
wfdyna-exp-grid-view-engine.ts
app_web/src/engine/view/wfdyna-exp-grid-view-engine.ts
+2
-2
index.d.ts
app_web/src/index.d.ts
+3
-1
message.ts
app_web/src/interface/message.ts
+103
-0
message-service-register.ts
app_web/src/message/message-service-register.ts
+79
-0
view-message-group-service.ts
app_web/src/message/view-message-group-service.ts
+87
-0
view-message-service.ts
app_web/src/message/view-message-service.ts
+308
-0
viewconfig.ts
app_web/src/mock/viewconfig/viewconfig.ts
+7
-0
form-item.ts
app_web/src/model/form-detail/form-item.ts
+9
-0
jobs-info-edit-view-base.vue
...ges/task/jobs-info-edit-view/jobs-info-edit-view-base.vue
+7
-3
jobs-info-grid-view-base.vue
...ges/task/jobs-info-grid-view/jobs-info-grid-view-base.vue
+8
-4
jobs-log-edit-view-base.vue
...pages/task/jobs-log-edit-view/jobs-log-edit-view-base.vue
+7
-3
jobs-log-grid-view-base.vue
...pages/task/jobs-log-grid-view/jobs-log-grid-view-base.vue
+8
-4
jobs-registry-edit-view-base.vue
.../jobs-registry-edit-view/jobs-registry-edit-view-base.vue
+7
-3
jobs-registry-grid-view-base.vue
.../jobs-registry-grid-view/jobs-registry-grid-view-base.vue
+8
-4
main.ts
app_web/src/pages/task/task-index-view/main.ts
+6
-0
task-index-view-base.vue
...b/src/pages/task/task-index-view/task-index-view-base.vue
+7
-3
entity-service.ts
app_web/src/service/entity-service.ts
+1
-1
getters.ts
app_web/src/store/getters.ts
+17
-1
mutations.ts
app_web/src/store/mutations.ts
+13
-1
state.ts
app_web/src/store/state.ts
+1
-0
default.less
app_web/src/styles/default.less
+1
-0
template.html
app_web/src/template.html
+1
-0
jobs-info-ui-service-base.ts
app_web/src/uiservice/jobs-info/jobs-info-ui-service-base.ts
+3
-3
jobs-lock-ui-service-base.ts
app_web/src/uiservice/jobs-lock/jobs-lock-ui-service-base.ts
+3
-3
jobs-log-ui-service-base.ts
app_web/src/uiservice/jobs-log/jobs-log-ui-service-base.ts
+3
-3
jobs-registry-ui-service-base.ts
.../uiservice/jobs-registry/jobs-registry-ui-service-base.ts
+3
-3
auth-guard.ts
app_web/src/utils/auth-guard/auth-guard.ts
+5
-1
task-index-view-appmenu-base.vue
.../task-index-view-appmenu/task-index-view-appmenu-base.vue
+11
-1
control-service.ts
app_web/src/widgets/control-service.ts
+1
-1
default-searchform-base.vue
.../jobs-info/default-searchform/default-searchform-base.vue
+24
-23
default-searchform-service.ts
...obs-info/default-searchform/default-searchform-service.ts
+40
-0
main-form-base.vue
app_web/src/widgets/jobs-info/main-form/main-form-base.vue
+76
-66
main-form-service.ts
app_web/src/widgets/jobs-info/main-form/main-form-service.ts
+40
-0
main-grid-base.vue
app_web/src/widgets/jobs-info/main-grid/main-grid-base.vue
+1
-1
default-searchform-base.vue
...s/jobs-log/default-searchform/default-searchform-base.vue
+23
-23
default-searchform-service.ts
...jobs-log/default-searchform/default-searchform-service.ts
+40
-0
main-form-base.vue
app_web/src/widgets/jobs-log/main-form/main-form-base.vue
+60
-51
main-form-service.ts
app_web/src/widgets/jobs-log/main-form/main-form-service.ts
+40
-0
main-grid-base.vue
app_web/src/widgets/jobs-log/main-grid/main-grid-base.vue
+1
-1
default-searchform-base.vue
...s-registry/default-searchform/default-searchform-base.vue
+20
-19
default-searchform-service.ts
...registry/default-searchform/default-searchform-service.ts
+40
-0
main-form-base.vue
...eb/src/widgets/jobs-registry/main-form/main-form-base.vue
+43
-33
main-form-service.ts
.../src/widgets/jobs-registry/main-form/main-form-service.ts
+40
-0
main-grid-base.vue
...eb/src/widgets/jobs-registry/main-grid/main-grid-base.vue
+1
-1
pom.xml
ibztask-app/ibztask-app-web/pom.xml
+20
-0
application-web-prod.yml
...ztask-app-web/src/main/resources/application-web-prod.yml
+5
-1
application-dev.yml
ibztask-boot/src/main/resources/application-dev.yml
+4
-0
JobsInfoServiceImpl.java
...n/ibizlab/core/task/service/impl/JobsInfoServiceImpl.java
+2
-2
MybatisConfiguration.java
...ava/cn/ibizlab/core/util/config/MybatisConfiguration.java
+1
-0
ibztask.json
ibztask-core/src/main/resources/sysmodel/ibztask.json
+498
-0
pom.xml
ibztask-provider/ibztask-provider-api/pom.xml
+20
-0
application-api-prod.yml
...-provider-api/src/main/resources/application-api-prod.yml
+1
-1
IBZLiteFallback.java
...src/main/java/cn/ibizlab/util/client/IBZLiteFallback.java
+13
-0
IBZLiteFeignClient.java
.../main/java/cn/ibizlab/util/client/IBZLiteFeignClient.java
+17
-0
EntityBase.java
...util/src/main/java/cn/ibizlab/util/domain/EntityBase.java
+30
-0
EntityClient.java
...il/src/main/java/cn/ibizlab/util/domain/EntityClient.java
+11
-0
EntityMP.java
...k-util/src/main/java/cn/ibizlab/util/domain/EntityMP.java
+10
-0
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+1
-0
PermissionSyncJob.java
.../src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
+18
-0
application-nacos.yml
ibztask-util/src/main/resources/application-nacos.yml
+1
-1
application-sys.yml
ibztask-util/src/main/resources/application-sys.yml
+1
-1
未找到文件。
app_web/public/assets/js/avue.min.js
0 → 100644
浏览文件 @
988330ef
因为 它太大了无法显示 源差异 。您可以改为
查看blob
。
app_web/public/assets/json/view-message-group.json
0 → 100644
浏览文件 @
988330ef
{
}
\ No newline at end of file
app_web/public/assets/styles/index.css
0 → 100644
浏览文件 @
988330ef
此差异已折叠。
点击以展开。
app_web/src/app-register.ts
浏览文件 @
988330ef
...
...
@@ -13,6 +13,7 @@ import { utilServiceRegister } from '@/utilservice/util-service-register';
import
{
entityServiceRegister
}
from
'@/service/entity-service-register'
;
import
{
counterServiceRegister
}
from
'@/counter/counter-service-register'
;
import
{
codeListRegister
}
from
'@codelist/codelist-register'
;
import
{
messageServiceRegister
}
from
'@/message/message-service-register'
;
import
InputBox
from
'./components/input-box/input-box.vue'
import
AppKeepAlive
from
'./components/app-keep-alive/app-keep-alive.vue'
...
...
@@ -87,11 +88,15 @@ import ActionTimeline from './components/action-timeline/action-timeline.vue'
import
CronEditor
from
'./components/cron-editor/cron-editor.vue'
import
AppMessagePopover
from
'./components/app-message-popover/app-message-popover.vue'
import
AppPanelField
from
'./components/app-panel-field/app-panel-field.vue'
import
AppPanel
Item
from
'./components/app-panel-item/app-panel-item
.vue'
import
AppPanel
Button
from
'./components/app-panel-button/app-panel-button
.vue'
import
AppDepartmentPersonnel
from
'./components/app-department-personnel/app-department-personnel.vue'
import
DiskFileUpload
from
'./components/disk-file-upload/disk-file-upload.vue'
import
AvueCustomForm
from
'./components/avue-custom-form/avue-custom-form.vue'
import
DiskImageUpload
from
'./components/disk-image-upload/disk-image-upload.vue'
import
AppFormPart
from
'./components/app-form-part/app-form-part.vue'
import
AppAlert
from
'./components/app-alert/app-alert.vue'
import
AppAlertGroup
from
'./components/app-alert-group/app-alert-group.vue'
import
AppRawItem
from
'./components/app-rawitem/app-rawitem.vue'
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
...
...
@@ -105,6 +110,8 @@ window['entityServiceRegister'] = entityServiceRegister;
window
[
'counterServiceRegister'
]
=
counterServiceRegister
;
// 全局挂载代码表服务注册中心
window
[
'codeListRegister'
]
=
codeListRegister
;
// 全局挂载视图消息服务注册中心
window
[
'messageServiceRegister'
]
=
messageServiceRegister
;
export
const
AppComponents
=
{
install
(
v
:
any
,
opt
:
any
)
{
...
...
@@ -118,7 +125,7 @@ export const AppComponents = {
v
.
prototype
.
$viewTool
=
ViewTool
;
v
.
prototype
.
$uiActionTool
=
UIActionTool
;
v
.
component
(
'app-department-personnel'
,
AppDepartmentPersonnel
);
v
.
component
(
'app-panel-
item'
,
AppPanelItem
);
v
.
component
(
'app-panel-
button'
,
AppPanelButton
);
v
.
component
(
'app-panel-field'
,
AppPanelField
);
v
.
component
(
'app-full-scren'
,
AppFullScren
);
v
.
component
(
'app-lock-scren'
,
AppLockScren
);
...
...
@@ -198,5 +205,9 @@ export const AppComponents = {
v
.
component
(
'disk-file-upload'
,
DiskFileUpload
);
v
.
component
(
'avue-custom-form'
,
AvueCustomForm
);
v
.
component
(
'disk-image-upload'
,
DiskImageUpload
);
v
.
component
(
'app-form-part'
,
AppFormPart
);
v
.
component
(
'app-alert'
,
AppAlert
);
v
.
component
(
'app-alert-group'
,
AppAlertGroup
);
v
.
component
(
'app-rawitem'
,
AppRawItem
);
},
};
\ No newline at end of file
app_web/src/codelist/codelist-service.ts
0 → 100644
浏览文件 @
988330ef
import
store
from
'@/store'
;
import
EntityService
from
'@/service/entity-service'
;
/**
* 动态代码表服务类
*
* @export
* @class CodeListService
*/
export
default
class
CodeListService
{
/**
* Vue 状态管理器
*
* @private
* @type {(any | null)}
* @memberof CodeListService
*/
private
$store
:
any
;
constructor
(
opts
:
any
=
{})
{
this
.
$store
=
store
;
}
/**
* 获取状态管理器
*
* @returns {(any | null)}
* @memberof CodeListService
*/
public
getStore
():
any
{
return
this
.
$store
;
}
/**
* 动态代码表缓存(加载中)
*
* @type {Map<string,any>}
* @memberof CodeListService
*/
public
static
codelistCache
:
Map
<
string
,
any
>
=
new
Map
();
/**
* 动态代码表缓存(已完成)
*
* @type {Map<string,any>}
* @memberof CodeListService
*/
public
static
codelistCached
:
Map
<
string
,
any
>
=
new
Map
();
/**
* 数据服务基类
*
* @type {Minorentity}
* @memberof CodeListService
*/
public
entityService
:
EntityService
=
new
EntityService
();
/**
* 获取代码表服务
*
* @protected
* @param {string} name 实体名称
* @returns {Promise<any>}
* @memberof EntityService
*/
public
getService
(
name
:
string
):
Promise
<
any
>
{
return
(
window
as
any
)[
'codeListRegister'
].
getService
(
name
);
}
/**
* 获取静态代码表
*
* @param {string} tag 代码表标识
* @returns {Promise<any[]>}
* @memberof CodeListService
*/
public
getStaticItems
(
tag
:
string
):
Promise
<
any
[]
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
const
codelist
=
this
.
$store
.
getters
.
getCodeList
(
tag
);
if
(
codelist
)
{
let
items
:
Array
<
any
>
=
[...
JSON
.
parse
(
JSON
.
stringify
(
codelist
.
items
))];
resolve
(
items
);
}
})
}
/**
* 获取预定义代码表
*
* @param {string} tag 代码表标识
* @returns {Promise<any[]>}
* @memberof CodeListService
*/
public
getPredefinedItems
(
tag
:
string
,
data
?:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
if
(
CodeListService
.
codelistCached
.
get
(
`
${
tag
}
`
)){
let
items
:
any
=
CodeListService
.
codelistCached
.
get
(
`
${
tag
}
`
).
items
;
if
(
items
.
length
>
0
)
resolve
(
items
);
}
const
callback
:
Function
=
(
tag
:
string
,
promise
:
Promise
<
any
>
)
=>
{
promise
.
then
((
res
:
any
)
=>
{
let
result
:
any
=
res
.
data
;
if
(
result
.
items
&&
result
.
items
.
length
>
0
){
CodeListService
.
codelistCached
.
set
(
`
${
tag
}
`
,{
items
:
result
.
items
});
return
resolve
(
result
.
items
);
}
else
{
return
resolve
([]);
}
}).
catch
((
result
:
any
)
=>
{
return
reject
(
result
);
})
}
// 加载中,UI又需要数据,解决连续加载同一代码表问题
if
(
CodeListService
.
codelistCache
.
get
(
`
${
tag
}
`
)){
callback
(
tag
,
CodeListService
.
codelistCache
.
get
(
`
${
tag
}
`
));
}
else
{
let
result
:
Promise
<
any
>
=
this
.
entityService
.
getPredefinedCodelist
(
tag
);
CodeListService
.
codelistCache
.
set
(
`
${
tag
}
`
,
result
);
callback
(
tag
,
result
);
}
})
}
/**
* 获取动态代码表
*
* @param {string} tag 代码表标识
* @param {string} context
* @returns {Promise<any[]>}
* @memberof CodeListService
*/
public
getItems
(
tag
:
string
,
context
:
any
=
{},
data
?:
any
,
isloading
?:
boolean
):
Promise
<
any
[]
>
{
let
_this
:
any
=
this
;
if
(
context
&&
context
.
srfsessionid
){
delete
context
.
srfsessionid
;
}
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
this
.
getService
(
tag
).
then
((
codelist
:
any
)
=>
{
if
(
Object
.
is
(
codelist
.
predefinedType
,
"RUNTIME"
)){
this
.
getPredefinedItems
(
tag
).
then
((
res
:
any
)
=>
{
resolve
(
res
);
})
return
;
}
let
isEnableCache
:
boolean
=
codelist
.
isEnableCache
;
let
cacheTimeout
:
any
=
codelist
.
cacheTimeout
;
// 启用缓存
if
(
isEnableCache
){
const
callback
:
Function
=
(
context
:
any
=
{},
data
:
any
=
{},
tag
:
string
,
promise
:
Promise
<
any
>
)
=>
{
promise
.
then
((
result
:
any
)
=>
{
if
(
result
.
length
>
0
){
CodeListService
.
codelistCached
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,{
items
:
result
});
CodeListService
.
codelistCache
.
delete
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
);
return
resolve
(
result
);
}
else
{
return
resolve
([]);
}
}).
catch
((
result
:
any
)
=>
{
return
reject
(
result
);
})
}
// 加载完成,从本地缓存获取
if
(
CodeListService
.
codelistCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
let
items
:
any
=
CodeListService
.
codelistCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
).
items
;
if
(
items
.
length
>
0
){
if
(
new
Date
().
getTime
()
<=
codelist
.
getExpirationTime
()){
return
resolve
(
items
);
}
}
}
if
(
codelist
)
{
// 加载中,UI又需要数据,解决连续加载同一代码表问题
if
(
CodeListService
.
codelistCache
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
callback
(
context
,
data
,
tag
,
CodeListService
.
codelistCache
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
));
}
else
{
let
result
:
Promise
<
any
>
=
codelist
.
getItems
(
context
,
data
,
isloading
);
CodeListService
.
codelistCache
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,
result
);
codelist
.
setExpirationTime
(
new
Date
().
getTime
()
+
cacheTimeout
);
callback
(
context
,
data
,
tag
,
result
);
}
}
}
else
{
if
(
codelist
)
{
codelist
.
getItems
(
context
,
data
,
isloading
).
then
((
result
:
any
)
=>
{
resolve
(
result
);
}).
catch
((
error
:
any
)
=>
{
Promise
.
reject
([]);
})
}
else
{
return
Promise
.
reject
([]);
}
}
}).
catch
((
error
:
any
)
=>
{
console
.
warn
(
"获取代码表异常"
);
return
Promise
.
reject
([]);
})
})
}
}
\ No newline at end of file
app_web/src/components/app-alert-group/app-alert-group.vue
0 → 100644
浏览文件 @
988330ef
<
template
>
<div
class=
"app-alert-group"
>
<template
v-for=
"(item, index) in items"
>
<app-alert
:key=
"index"
:tag=
"item.tag"
:position=
"item.position"
/>
</
template
>
</div>
</template>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
import
ViewMessageGroupService
from
'@/message/view-message-group-service'
;
@
Component
({})
export
default
class
AppAlertGroup
extends
Vue
{
/**
* 视图消息组服务
*
* @type {any}
* @memberof AppAlertGroup
*/
public
viewMessageGroupService
=
ViewMessageGroupService
.
getInstance
();
/**
* 视图消息组tag
*
* @type {any}
* @memberof AppAlertGroup
*/
@
Prop
()
infoGroup
:
any
;
/**
* 视图消息组显示位置
*
* @type {any}
* @memberof AppAlertGroup
*/
@
Prop
()
position
:
any
;
/**
* 当前位置视图消息集合
*
* @type {any}
* @memberof AppAlertGroup
*/
public
items
:
any
[]
=
[];
/**
* Vue生命周期
*
* @memberof AppAlertGroup
*/
public
created
()
{
if
(
this
.
infoGroup
)
{
this
.
getItems
();
}
}
/**
* 获取当前位置视图消息集合
*
* @memberof AppAlertGroup
*/
public
getItems
()
{
this
.
viewMessageGroupService
.
getViewMessageDetailsByTag
(
this
.
infoGroup
).
then
((
response
:
any
)
=>
{
if
(
response
)
{
response
.
forEach
((
data
:
any
)
=>
{
if
(
this
.
position
&&
Object
.
is
(
this
.
position
,
data
.
position
))
{
this
.
items
.
push
(
data
);
}
if
(
Object
.
is
(
'TOP'
,
this
.
position
)
&&
Object
.
is
(
'POPUP'
,
data
.
position
))
{
this
.
items
.
push
(
data
);
}
})
}
}).
catch
(
error
=>
{
console
.
log
(
error
);
});
}
}
</
script
>
\ No newline at end of file
app_web/src/components/app-alert/app-alert.less
0 → 100644
浏览文件 @
988330ef
.el-message {
.el-message__content {
.title {
padding-bottom: 10px;
}
}
}
.app-alert-group {
.el-alert {
margin: 5px 0px;
}
}
\ No newline at end of file
app_web/src/components/app-alert/app-alert.vue
0 → 100644
浏览文件 @
988330ef
<
template
>
<div
class=
"app-alert"
>
<template
v-if=
"items && items.length > 0"
>
<template
v-for=
"(item, index) in items"
>
<template
v-if=
"item.hasContent && !Object.is('POPUP', item.position)"
>
<el-alert
:key=
"index"
v-show=
"item.showState"
:title=
"item.title"
:type=
"item.type"
:closable=
"item.closable"
@
close=
"alertClose(item)"
>
<template
slot
>
<span
v-html=
"item.content"
></span>
</
template
>
</el-alert>
</template>
</template>
</template>
</div>
</template>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
import
ViewMessageService
from
'@/message/view-message-service'
;
@
Component
({})
export
default
class
AppAlert
extends
Vue
{
/**
* 视图消息标识
*
* @type {any}
* @memberof AppAlert
*/
@
Prop
()
tag
:
any
;
/**
* 显示位置
*
* @type {any}
* @memberof AppAlert
*/
@
Prop
()
position
:
any
;
/**
* 视图消息对象
*
* @type {any}
* @memberof AppAlert
*/
public
items
:
any
[]
=
[];
/**
* 视图消息服务
*
* @type {ViewMessageService}
* @memberof AppAlert
*/
public
viewMessageService
=
ViewMessageService
.
getInstance
();
/**
* Vue生命周期
*
* @memberof AppAlert
*/
public
created
()
{
this
.
getData
().
then
((
result
:
any
)
=>
{
if
(
!
this
.
items
)
{
return
;
}
})
}
/**
* 获取视图消息对象
*
* @memberof AppAlert
*/
public
async
getData
()
{
let
response
:
any
=
await
this
.
viewMessageService
.
getViewMessageByTag
(
this
.
tag
,
null
,
null
)
if
(
response
&&
response
.
length
>
0
)
{
response
.
forEach
((
item
:
any
)
=>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
if
(
!
tempData
.
type
)
{
tempData
.
type
=
"info"
;
}
// 判断是否存在内容
this
.
handleItemHasContent
(
tempData
);
tempData
.
closable
=
tempData
.
isEnableRemove
;
let
flag
=
this
.
handleItemCloseMode
(
tempData
);
this
.
handleItemPosition
(
tempData
,
flag
);
this
.
items
.
push
(
tempData
);
});
}
}
/**
* 处理数据项是否存在内容
*
* @memberof AppAlert
*/
public
handleItemHasContent
(
data
:
any
)
{
data
.
hasContent
=
true
;
if
(
!
data
.
title
&&
!
data
.
content
)
{
data
.
hasContent
=
false
;
}
}
/**
* 处理数据关闭模式
*
* @memberof AppAlert
*/
public
handleItemCloseMode
(
data
:
any
)
{
let
flag
=
true
;
data
.
showState
=
true
;
if
(
data
.
closeMode
||
data
.
closeMode
==
0
)
{
if
(
data
.
closeMode
==
1
)
{
const
id
=
this
.
$store
.
getters
.
getViewMessage
(
data
.
codename
);
if
(
id
)
{
data
.
showState
=
false
;
flag
=
false
;
}
}
if
(
data
.
closeMode
==
0
)
{
data
.
closable
=
false
;
}
}
return
flag
;
}
/**
* 处理数据显示位置
*
* @memberof AppAlert
*/
public
handleItemPosition
(
data
:
any
,
flag
:
boolean
)
{
if
(
data
.
position
)
{
if
(
flag
&&
Object
.
is
(
'POPUP'
,
data
.
position
))
{
const
h
=
this
.
$createElement
;
data
.
showState
=
false
;
if
(
Object
.
is
(
'HTML'
,
data
.
messageType
)
&&
data
.
hasMessageTemp
)
{
setTimeout
(()
=>
{
this
.
$message
({
customClass
:
data
.
codename
+
","
+
data
.
closeMode
,
message
:
h
(
'div'
,{},
[
h
(
'p'
,
data
.
title
),
h
(
'p'
,{
domProps
:{
innerHTML
:
data
.
content
}})
]),
type
:
data
.
type
,
showClose
:
data
.
closable
,
onClose
:
this
.
alertClose
,
})
},
0
)
}
else
{
setTimeout
(()
=>
{
this
.
$message
({
customClass
:
data
.
codename
+
","
+
data
.
closeMode
,
message
:
h
(
'div'
,{},
[
h
(
'p'
,
data
.
title
),
h
(
'p'
,
data
.
content
)
]),
type
:
data
.
type
,
showClose
:
data
.
closable
,
onClose
:
this
.
alertClose
,
})
},
0
)
}
}
}
}
/**
* 视图消息关闭
*
* @memberof AppAlert
*/
public
alertClose
(
data
:
any
)
{
if
(
data
.
customClass
)
{
let
tempArr
:
any
[]
=
data
.
customClass
.
toString
().
split
(
','
);
if
(
tempArr
&&
tempArr
.
length
>
0
)
{
if
(
Object
.
is
(
"1"
,
tempArr
[
1
]))
{
const
args
=
{
tag
:
tempArr
[
0
],
id
:
data
.
customClass
};
this
.
$store
.
commit
(
'addViewMessage'
,
args
);
}
}
}
if
(
data
.
closeMode
&&
data
.
closeMode
==
1
)
{
const
args
=
{
tag
:
data
.
codename
,
id
:
data
.
id
};
this
.
$store
.
commit
(
'addViewMessage'
,
args
);
}
}
}
</
script
>
<
style
lang=
"less"
>
@import './app-alert.less';
</
style
>
\ No newline at end of file
app_web/src/components/app-checkbox-list/app-checkbox-list.vue
浏览文件 @
988330ef
...
...
@@ -8,7 +8,7 @@
<
script
lang=
"ts"
>
import
{
Component
,
Vue
,
Prop
,
Model
,
Watch
}
from
'vue-property-decorator'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
@
Component
({
})
...
...
app_web/src/components/app-data-upload/app-data-upload.vue
浏览文件 @
988330ef
...
...
@@ -48,7 +48,7 @@
<
script
lang=
"ts"
>
import
XLSX
from
'xlsx'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
import
EntityService
from
'@/service/entity-service'
;
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
}
from
'vue-property-decorator'
;
import
{
Environment
}
from
'@/environments/environment'
;
...
...
app_web/src/components/app-department-personnel/app-department-personnel.vue
浏览文件 @
988330ef
...
...
@@ -13,7 +13,7 @@
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Subject
}
from
'rxjs'
;
import
{
Http
}
from
'../../utils'
;
import
CodeListService
from
'@/service/app/codelist-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
@
Component
({})
export
default
class
AppDepartmentPersonnel
extends
Vue
{
...
...
app_web/src/components/app-department-select/app-department-select.vue
浏览文件 @
988330ef
...
...
@@ -6,7 +6,7 @@
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Watch
,
Prop
,
Model
}
from
'vue-property-decorator'
;
import
CodeListService
from
'@/service/app/codelist-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
@
Component
({
})
export
default
class
AppDepartmentSelect
extends
Vue
{
...
...
app_web/src/components/app-form-druipart/app-form-druipart.vue
浏览文件 @
988330ef
...
...
@@ -370,7 +370,7 @@ export default class AppFormDRUIPart extends Vue {
}
}
});
this
.
refreshDRUIPart
();
//
this.refreshDRUIPart();
}
/**
...
...
app_web/src/components/app-form-part/app-form-part.less
0 → 100644
浏览文件 @
988330ef
.app-form-part {
display: block;
}
\ No newline at end of file
app_web/src/components/app-form-part/app-form-part.vue
0 → 100644
浏览文件 @
988330ef
<
template
>
<div
class=
'app-form-part'
v-if=
"loadState"
>
<avue-form
:option=
"formOption"
v-model=
"formVal"
></avue-form>
</div>
</
template
>
<
script
lang =
'ts'
>
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Subject
,
Subscription
}
from
"rxjs"
;
@
Component
({
})
export
default
class
AppFormPart
extends
Vue
{
/**
* 系统名称
*
* @type {string}
* @memberof AppFormPart
*/
@
Prop
()
public
systemCodeName
!
:
string
;
/**
* 应用名称
*
* @type {string}
* @memberof AppFormPart
*/
@
Prop
()
public
appCodeName
!
:
string
;
/**
* 实体名称
*
* @type {string}
* @memberof AppFormPart
*/
@
Prop
()
public
deCodeName
!
:
string
;
/**
* 表单代码标识
*
* @type {string}
* @memberof AppFormPart
*/
@
Prop
()
public
formCodeName
!
:
string
;
/**
* 表单成员标识
*
* @type {string}
* @memberof AppFormPart
*/
@
Prop
()
public
formDetailCodeName
!
:
string
;
/**
* 当前表单项名称
*
* @type {string}
* @memberof AppFormPart
*/
@
Prop
()
public
name
!
:
string
;
/**
* 导航上下文
*
* @type {string}
* @memberof AppFormPart
*/
@
Prop
()
public
context
!
:
any
;
/**
* 导航参数
*
* @type {string}
* @memberof AppFormPart
*/
@
Prop
()
public
viewparams
!
:
any
;
/**
* 表单数据
*
* @type {any}
* @memberof AppFormPart
*/
@
Prop
()
public
data
:
any
;
/**
* 表单状态对象
*
* @type {Subject<any>}
* @memberof AppFormPart
*/
@
Prop
()
public
formState
!
:
Subject
<
any
>
;
/**
* 订阅对象
*
* @protected
* @type {(Subscription | undefined)}
* @memberof AppFormPart
*/
public
formStateEvent
:
Subscription
|
undefined
;
/**
* 远程地址
*
* @protected
* @type {(Subscription | undefined)}
* @memberof AppFormPart
*/
public
remoteUrl
:
string
=
`/lite/
${
this
.
systemCodeName
.
toLowerCase
()}
-
${
this
.
appCodeName
.
toLowerCase
()}
/components/
${
this
.
formDetailCodeName
.
toLowerCase
()}
`
;
/**
* 动态表单配置对象
*
* @type {*}
* @memberof AppFormPart
*/
public
formOption
:
any
;
/**
* 当前动态表单绑定值
*
* @type {*}
* @memberof AppFormPart
*/
public
curFormValue
:
any
=
{};
/**
* 获取动态表单值对象
*
* @type {*}
* @memberof AppFormPart
*/
get
formVal
(){
return
this
.
curFormValue
;
}
/**
* 设置动态表单值对象
*
* @type {*}
* @memberof AppFormPart
*/
set
formVal
(
data
:
any
){
this
.
$emit
(
"change"
,{
name
:
this
.
name
,
value
:
data
});
}
/**
* 加载数据状态
*
* @type {*}
* @memberof AppFormPart
*/
public
loadState
:
boolean
=
false
;
/**
* 初始化组件(vue生命周期)
*
* @type {Subject<any>}
* @memberof AppFormPart
*/
public
created
(){
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
type
,
data
})
=>
{
if
(
Object
.
is
(
"load"
,
type
)){
this
.
loadRemoteFormModel
().
then
((
result
:
any
)
=>
{
this
.
initStateData
(
result
);
})
}
});
}
}
/**
* 初始化状态数据
*
* @type {Subject<any>}
* @memberof AppFormPart
*/
public
initStateData
(
modelData
:
any
){
this
.
computedFormVal
(
modelData
);
this
.
formOption
=
modelData
;
this
.
loadState
=
true
;
}
/**
* 计算动态表单绑定数据
*
* @type {Subject<any>}
* @memberof AppFormPart
*/
public
computedFormVal
(
modelData
:
any
){
this
.
curFormValue
=
{};
if
(
modelData
&&
modelData
.
column
&&
modelData
.
column
.
length
>
0
){
modelData
.
column
.
forEach
((
element
:
any
)
=>
{
Object
.
assign
(
this
.
curFormValue
,{[
element
.
prop
]:
null
});
});
}
if
(
Object
.
keys
(
this
.
curFormValue
).
length
>
0
){
Object
.
keys
(
this
.
curFormValue
).
forEach
((
item
:
any
)
=>
{
if
(
this
.
data
&&
this
.
data
[
item
]){
this
.
curFormValue
[
item
]
=
this
.
data
[
item
];
}
})
}
}
/**
* 加载动态表单数据模型
*
* @type {Subject<any>}
* @memberof AppFormPart
*/
public
loadRemoteFormModel
(){
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
this
.
$http
.
get
(
this
.
remoteUrl
).
then
((
res
:
any
)
=>
{
if
(
res
.
status
&&
res
.
status
==
200
){
let
result
:
any
=
res
.
data
;
resolve
(
result
);
}
else
{
console
.
warn
(
"加载动态表单模型数据异常"
);
}
}).
catch
((
error
:
any
)
=>
{
console
.
warn
(
"加载动态表单模型数据异常"
);
})
})
}
/**
* 销毁组件(vue生命周期)
*
* @type {Subject<any>}
* @memberof AppFormPart
*/
public
destroy
(){
if
(
this
.
formStateEvent
){
this
.
formStateEvent
.
unsubscribe
();
}
}
}
</
script
>
<
style
lang =
"less"
>
@import './app-form-part.less';
</
style
>
\ No newline at end of file
app_web/src/components/app-group-select/app-group-select.vue
浏览文件 @
988330ef
...
...
@@ -21,7 +21,7 @@
<
script
lang=
"ts"
>
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'vue-property-decorator'
;
import
{
Subject
}
from
'rxjs'
;
import
CodeListService
from
'@/service/app/codelist-service'
;
import
CodeListService
from
"@/codelist/codelist-service"
;
@
Component
({})
export
default
class
AppGroupSelect
extends
Vue
{
...
...
app_web/src/components/app-message-popover/app-message-popover.less
浏览文件 @
988330ef
.
item
{
.
app-message-popover
{
height: 24px;
line-height: 24px;
padding: 0 5px 0 0;
...
...
app_web/src/components/app-message-popover/app-message-popover.vue
浏览文件 @
988330ef
<
template
>
<!-- 消息弹出框绘制开始 -->
<el-badge
:is-dot=
"showIsDot"
class=
"
item
"
>
<el-badge
:is-dot=
"showIsDot"
class=
"
app-message-popover
"
>
<el-popover
placement=
"bottom"
trigger=
"click"
...
...
app_web/src/components/app-org-select/app-org-select.vue
浏览文件 @
988330ef
...
...
@@ -6,7 +6,7 @@
<
script
lang =
'ts'
>
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
"vue-property-decorator"
;
import
{
Http
}
from
'@/utils'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
import
{
observable
}
from
'rxjs'
;
@
Component
({})
export
default
class
AppOrgSelect
extends
Vue
{
...
...
app_web/src/components/app-panel-button/app-panel-button.vue
0 → 100644
浏览文件 @
988330ef
<
template
>
<div
class=
"app-panel-button"
>
<Button
type=
"primary"
long
@
click=
"onClick"
>
<i
v-if=
"icon"
:class=
"icon"
></i>
<span
v-if=
"showCaption"
:class=
"lableStyle"
>
{{
caption
?
caption
:
''
}}
</span>
</Button>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
"vue-property-decorator"
;
@
Component
({})
export
default
class
AppPanelButton
extends
Vue
{
/**
* 图标
*
* @type {string}
* @memberof AppPanelItem
*/
@
Prop
()
public
icon
?:
string
;
/**
* 标题
*
* @type {string}
* @memberof AppPanelItem
*/
@
Prop
()
public
caption
?:
string
;
/**
* 显示标题
*
* @type {boolean}
* @memberof AppPanelItem
*/
@
Prop
()
public
showCaption
?:
boolean
;
/**
* 标题样式
*
* @type {boolean}
* @memberof AppPanelItem
*/
@
Prop
()
public
lableStyle
?:
string
;
/**
* 点击按钮
*
* @param {*} $event
* @memberof AppPanelItem
*/
public
onClick
(
$event
:
any
){
this
.
$emit
(
'onClick'
,
$event
);
}
}
</
script
>
<
style
lang=
'less'
>
</
style
>
\ No newline at end of file
app_web/src/components/app-radio-group/app-radio-group.vue
浏览文件 @
988330ef
...
...
@@ -7,7 +7,7 @@
</
template
>
<
script
lang =
'ts'
>
import
{
Component
,
Vue
,
Prop
,
Model
,
Watch
}
from
'vue-property-decorator'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
@
Component
({})
export
default
class
AppRadioGroup
extends
Vue
{
...
...
app_web/src/components/app-rawitem/app-rawitem.vue
0 → 100644
浏览文件 @
988330ef
<
template
>
<div>
<span
v-if=
"caption"
>
{{
caption
}}
</span>
<div
:class=
"contentStyle"
:style=
"sizeStyle"
>
<template
v-if=
"Object.is(contentType,'RAW')"
>
{{
rawContent
?
rawContent
:
''
}}
</
template
>
<
template
v-else-if=
"Object.is(contentType,'HTML')"
>
{{
htmlContent
?
htmlContent
:
''
}}
</
template
>
<
template
v-else-if=
"Object.is(contentType,'IMAGE')"
>
<i
:class=
"imageClass ? imageClass : ''"
></i>
</
template
>
</div>
</div>
</template>
<
script
lang=
'ts'
>
import
{
Component
,
Vue
,
Prop
,
Model
,
Watch
}
from
"vue-property-decorator"
;
@
Component
({})
export
default
class
AppRawItem
extends
Vue
{
/**
* 内容类型
*
* @type {string}
* @memberof AppRawItem
*/
@
Prop
()
public
contentType
!
:
string
;
/**
* 直接内容
*
* @type {strin}
* @memberof AppRawItem
*/
@
Prop
()
public
rawContent
?:
string
;
/**
* html内容
*
* @type {strin}
* @memberof AppRawItem
*/
@
Prop
()
public
htmlContent
?:
string
;
/**
* html内容
*
* @type {strin}
* @memberof AppRawItem
*/
@
Prop
()
public
imageClass
?:
string
;
/**
* 标题
*
* @type {string}
* @memberof AppRawItem
*/
@
Prop
()
public
caption
?:
string
;
/**
* 内容样式
*
* @type {strin}
* @memberof AppRawItem
*/
@
Prop
()
public
contentStyle
!
:
string
;
/**
* 内容宽高
*
* @type {strin}
* @memberof AppRawItem
*/
@
Prop
()
public
sizeStyle
!
:
string
;
}
</
script
>
<
style
lang=
'less'
>
</
style
>
\ No newline at end of file
app_web/src/components/app-transfer/app-transfer.vue
浏览文件 @
988330ef
...
...
@@ -21,7 +21,7 @@
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Watch
,
Prop
,
Model
}
from
"vue-property-decorator"
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
import
{
ElSelect
}
from
"element-ui/types/select"
;
@
Component
({})
...
...
app_web/src/components/avue-custom-form/avue-custom-form.vue
浏览文件 @
988330ef
<
template
>
<div
v-if=
"formOption!=null"
class=
"app-custom-form"
>
<avue-form
:option=
"formOption"
v-model=
"form
value
"
></avue-form>
<avue-form
:option=
"formOption"
v-model=
"form
Val
"
></avue-form>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
,
Watch
,}
from
"vue-property-decorator"
;
import
{
Subject
,
Subscription
}
from
"rxjs"
;
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
,
Watch
,
}
from
"vue-property-decorator"
;
import
{
Subject
,
Subscription
}
from
"rxjs"
;
@
Component
({})
export
default
class
AvueCustomForm
extends
Vue
{
/**
...
...
@@ -16,8 +23,7 @@ export default class AvueCustomForm extends Vue {
* @type {any}
* @memberof AvueCustomForm
*/
@
Prop
()
public
options
?:
any
;
@
Prop
()
public
options
?:
any
;
/**
* 是否需要转换为string类型
...
...
@@ -25,8 +31,7 @@ export default class AvueCustomForm extends Vue {
* @type {boolean}
* @memberof AvueCustomForm
*/
@
Prop
()
public
isParseString
?:
boolean
;
@
Prop
()
public
isParseString
?:
boolean
;
/**
* 远端地址
...
...
@@ -42,7 +47,7 @@ export default class AvueCustomForm extends Vue {
* @type {any}
* @memberof AvueCustomForm
*/
@
Prop
(
)
public
value
:
any
;
@
Model
(
'change'
)
public
value
:
any
;
/**
* 是否将表单数据通过组件配置带入组件中
...
...
@@ -52,33 +57,13 @@ export default class AvueCustomForm extends Vue {
*/
@
Prop
()
public
isFormData
?:
boolean
;
/**
* 监听事件
*
* @param {*} newVal
* @param {*} oldVal
* @memberof AvueCustomForm
*/
@
Watch
(
"value"
)
public
onValueChange
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
)
{
let
obj
:
any
=
{};
if
(
newVal
&&
newVal
!=
null
)
{
if
(
this
.
isParseString
)
obj
=
JSON
.
parse
(
newVal
);
else
obj
=
newVal
;
}
if
(
obj
)
this
.
formvalue
=
JSON
.
parse
(
JSON
.
stringify
(
obj
));
}
}
/**
* 表单数据
*
* @type {any}
* @memberof AvueCustomForm
*/
@
Prop
()
public
formData
:
any
;
@
Prop
()
public
formData
:
any
;
/**
* 表单状态
...
...
@@ -89,29 +74,46 @@ export default class AvueCustomForm extends Vue {
@
Prop
()
public
formState
!
:
Subject
<
any
>
;
/**
*
视图状态事件
*
获取组件值
*
* @protected
* @type {(Subscription | undefined)}
* @return {any}
* @memberof AvueCustomForm
*/
protected
formStateEvent
:
Subscription
|
undefined
;
get
formVal
()
{
let
obj
:
any
=
{};
if
(
this
.
value
)
{
if
(
this
.
isParseString
)
obj
=
JSON
.
parse
(
this
.
value
);
else
obj
=
this
.
value
;
}
return
obj
;
}
/**
*
当前组件配置设置属性
*
设置组件值
*
* @
type {any}
* @
param value
* @memberof AvueCustomForm
*/
public
formOption
:
any
=
null
;
set
formVal
(
value
:
any
)
{
this
.
setValue
(
value
);
}
/**
* avue-form绑定值
* 订阅对象
*
* @protected
* @type {(Subscription | undefined)}
* @memberof AvueCustomForm
*/
protected
formStateEvent
:
Subscription
|
undefined
;
/**
* 当前组件配置设置属性
*
* @type {any}
* @memberof AvueCustomForm
*/
public
form
value
:
any
=
{}
;
public
form
Option
:
any
=
null
;
/**
* avue-form默认配置
...
...
@@ -189,10 +191,8 @@ export default class AvueCustomForm extends Vue {
if
(
this
.
url
&&
this
.
options
==
null
)
{
const
get
:
Promise
<
any
>
=
this
.
$http
.
get
(
this
.
url
);
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
data
&&
response
.
data
.
view_config
)
{
that
.
formOption
=
JSON
.
parse
(
response
.
data
.
view_config
)[
"formConfig"
];
if
(
response
&&
response
.
data
)
{
that
.
formOption
=
response
.
data
;
if
(
this
.
isFormData
)
that
.
getFormData
();
}
});
...
...
@@ -214,7 +214,7 @@ export default class AvueCustomForm extends Vue {
public
getFormData
()
{
let
that
:
any
=
this
;
let
obj
:
any
;
if
(
this
.
value
)
obj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
value
));
if
(
this
.
formVal
)
obj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
formVal
));
else
obj
=
{};
let
recursionOption
:
any
=
function
(
group
:
any
)
{
group
.
column
.
forEach
((
gItem
:
any
)
=>
{
...
...
@@ -242,5 +242,17 @@ export default class AvueCustomForm extends Vue {
if
(
this
.
isParseString
)
this
.
$emit
(
"change"
,
JSON
.
stringify
(
value
));
else
this
.
$emit
(
"change"
,
value
);
}
/**
* 销毁组件(vue生命周期)
*
* @type {Subject<any>}
* @memberof AvueCustomForm
*/
public
destroy
(){
if
(
this
.
formStateEvent
){
this
.
formStateEvent
.
unsubscribe
();
}
}
}
</
script
>
\ No newline at end of file
app_web/src/components/codelist/codelist.vue
浏览文件 @
988330ef
...
...
@@ -13,7 +13,7 @@
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Watch
}
from
'vue-property-decorator'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
@
Component
({})
export
default
class
CodeList
extends
Vue
{
...
...
app_web/src/components/dropdown-list-dynamic/dropdown-list-dynamic.vue
浏览文件 @
988330ef
...
...
@@ -14,7 +14,7 @@
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Watch
,
Prop
,
Model
}
from
'vue-property-decorator'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
@
Component
({
})
...
...
app_web/src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
988330ef
...
...
@@ -24,7 +24,7 @@
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
}
from
'vue-property-decorator'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
import
{
Util
}
from
'@/utils'
;
@
Component
({
})
...
...
app_web/src/components/dropdown-list/dropdown-list.vue
浏览文件 @
988330ef
...
...
@@ -17,8 +17,9 @@
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Watch
,
Prop
,
Model
}
from
'vue-property-decorator'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
import
{
Util
}
from
'@/utils'
;
import
{
Subject
,
Subscription
}
from
'rxjs'
;
@
Component
({
})
...
...
@@ -84,6 +85,23 @@ export default class DropDownList extends Vue {
*/
@
Prop
()
public
data
?:
any
;
/**
* 表单状态对象
*
* @type {Subject<any>}
* @memberof AppEmbedPicker
*/
@
Prop
()
public
formState
!
:
Subject
<
any
>
/**
* 订阅对象
*
* @protected
* @type {(Subscription | undefined)}
* @memberof SelectType
*/
protected
formStateEvent
:
Subscription
|
undefined
;
/**
* 监听表单数据
*
...
...
@@ -241,6 +259,23 @@ export default class DropDownList extends Vue {
* @memberof DropDownList
*/
public
created
()
{
if
(
this
.
formState
)
{
this
.
formStateEvent
=
this
.
formState
.
subscribe
(({
type
,
data
})
=>
{
if
(
Object
.
is
(
'load'
,
type
))
{
this
.
loadData
();
}
});
}
else
{
this
.
loadData
();
}
}
/**
* 加载数据
*
* @memberof DropDownList
*/
public
loadData
(){
if
(
this
.
tag
&&
Object
.
is
(
this
.
codelistType
,
"STATIC"
)){
const
codelist
=
this
.
$store
.
getters
.
getCodeList
(
this
.
tag
);
if
(
codelist
)
{
...
...
@@ -372,6 +407,17 @@ export default class DropDownList extends Vue {
}
})
}
/**
* vue 生命周期
*
* @memberof DropDownList
*/
public
destroyed
()
{
if
(
this
.
formStateEvent
)
{
this
.
formStateEvent
.
unsubscribe
();
}
}
}
</
script
>
...
...
app_web/src/engine/view/data-view9-engine.ts
浏览文件 @
988330ef
...
...
@@ -17,10 +17,10 @@ export default class DataView9Engine extends DataViewEngine {
*/
public
load
(
opts
:
any
=
{},
isnotify
:
boolean
=
false
):
void
{
if
(
!
this
.
view
.
isformDruipart
){
super
.
load
(
opts
);
super
.
load
(
opts
,
isnotify
);
}
else
{
if
(
isnotify
){
super
.
load
(
opts
);
super
.
load
(
opts
,
isnotify
);
}
}
}
...
...
app_web/src/engine/view/grid-view-engine.ts
浏览文件 @
988330ef
...
...
@@ -45,10 +45,10 @@ export default class GridViewEngine extends MDViewEngine {
*/
public
load
(
opts
:
any
=
{},
isnotify
:
boolean
=
false
):
void
{
if
(
!
this
.
view
.
isformDruipart
){
super
.
load
(
opts
);
super
.
load
(
opts
,
isnotify
);
}
else
{
if
(
isnotify
){
super
.
load
(
opts
);
super
.
load
(
opts
,
isnotify
);
}
}
}
...
...
app_web/src/engine/view/list-view9-engine.ts
浏览文件 @
988330ef
...
...
@@ -17,10 +17,10 @@ export default class ListView9Engine extends ListViewEngine {
*/
public
load
(
opts
:
any
=
{},
isnotify
:
boolean
=
false
):
void
{
if
(
!
this
.
view
.
isformDruipart
){
super
.
load
(
opts
);
super
.
load
(
opts
,
isnotify
);
}
else
{
if
(
isnotify
){
super
.
load
(
opts
);
super
.
load
(
opts
,
isnotify
);
}
}
...
...
app_web/src/engine/view/md-view-engine.ts
浏览文件 @
988330ef
...
...
@@ -78,12 +78,12 @@ export default class MDViewEngine extends ViewEngine {
* @param {*} [opts={}]
* @memberof MDViewEngine
*/
public
load
(
opts
:
any
=
{}):
void
{
public
load
(
opts
:
any
=
{}
,
isnotify
:
boolean
=
false
):
void
{
super
.
load
(
opts
);
if
(
this
.
getSearchForm
())
{
if
(
this
.
getSearchForm
()
&&
(
this
.
isLoadDefault
||
isnotify
)
)
{
const
tag
=
this
.
getSearchForm
().
name
;
this
.
setViewState2
({
tag
:
tag
,
action
:
'loaddraft'
,
viewdata
:
this
.
view
.
viewparams
});
}
else
if
(
this
.
getMDCtrl
()
&&
this
.
isLoadDefault
)
{
}
else
if
(
this
.
getMDCtrl
()
&&
(
this
.
isLoadDefault
||
isnotify
)
)
{
const
tag
=
this
.
getMDCtrl
().
name
;
this
.
setViewState2
({
tag
:
tag
,
action
:
'load'
,
viewdata
:
Object
.
assign
(
this
.
view
.
viewparams
,
opts
)
});
}
else
{
...
...
app_web/src/engine/view/wfdyna-exp-grid-view-engine.ts
浏览文件 @
988330ef
...
...
@@ -29,10 +29,10 @@ export default class WFDynaExpGridViewEngine extends GridViewEngine {
return
;
}
if
(
!
this
.
view
.
isformDruipart
){
super
.
load
(
opts
);
super
.
load
(
opts
,
isnotify
);
}
else
{
if
(
isnotify
){
super
.
load
(
opts
);
super
.
load
(
opts
,
isnotify
);
}
}
})
...
...
app_web/src/index.d.ts
浏览文件 @
988330ef
...
...
@@ -4,6 +4,7 @@ import { UtilServiceRegister } from '@/utilservice/util-service-register';
import
{
EntityServiceRegister
}
from
'@/service/entity-service-register'
;
import
{
CounterServiceRegister
}
from
'@/counter/counter-service-register'
;
import
{
CodeListRegister
}
from
'@codelist/codelist-register'
;
import
{
MessageServiceRegister
}
from
'@/message/message-service-register'
;
declare
global
{
interface
Window
{
uiServiceRegister
:
UIServiceRegister
,
...
...
@@ -11,6 +12,7 @@ declare global {
utilServiceRegister
:
UtilServiceRegister
,
entityServiceRegister
:
EntityServiceRegister
,
counterServiceRegister
:
CounterServiceRegister
,
codeListRegister
:
CodeListRegister
codeListRegister
:
CodeListRegister
,
messageServiceRegister
:
MessageServiceRegister
}
}
\ No newline at end of file
app_web/src/interface/message.ts
0 → 100644
浏览文件 @
988330ef
/**
* 视图消息
*
* @interface ViewMessage
*/
export
interface
ViewMessage
{
/**
* 视图消息标识
*
* @type {string}
* @memberof ViewMessage
*/
id
:
string
;
/**
* 视图消息名称
*
* @type {string}
* @memberof ViewMessage
*/
name
:
string
;
/**
* 视图消息代码名称
*
* @type {string}
* @memberof ViewMessage
*/
codename
:
string
;
/**
* 视图消息标题
*
* @type {string}
* @memberof ViewMessage
*/
title
:
string
;
/**
* 视图消息内容
*
* @type {string}
* @memberof ViewMessage
*/
content
:
string
;
/**
* 视图消息关闭模式
*
* @type {number}
* @memberof ViewMessage
*/
closeMode
:
number
;
/**
* 视图消息位置
*
* @type {string}
* @memberof ViewMessage
*/
position
:
string
;
/**
* 视图消息类型
*
* @type {string}
* @memberof ViewMessage
*/
type
:
string
;
/**
* 视图消息是否支持删除
*
* @type {boolean}
* @memberof ViewMessage
*/
isEnableRemove
:
boolean
;
/**
* 排序值
*
* @type {number}
* @memberof ViewMessage
*/
order
:
number
;
/**
* 动态模式
*
* @type {string}
* @memberof ViewMessage
*/
dynamicMode
:
string
;
/**
* 消息类型
*
* @type {string}
* @memberof ViewMessage
*/
messageType
:
string
;
}
\ No newline at end of file
app_web/src/message/message-service-register.ts
0 → 100644
浏览文件 @
988330ef
/**
* 视图消息服务注册中心
*
* @export
* @class MessageServiceRegister
*/
export
class
MessageServiceRegister
{
/**
* 所有视图消息服务Map
*
* @protected
* @type {*}
* @memberof MessageServiceRegister
*/
protected
allMessageService
:
Map
<
string
,
()
=>
Promise
<
any
>>
=
new
Map
();
/**
* 已加载视图消息服务Map缓存
*
* @protected
* @type {Map<string, any>}
* @memberof MessageServiceRegister
*/
protected
serviceCache
:
Map
<
string
,
any
>
=
new
Map
();
/**
* Creates an instance of MessageServiceRegister.
* @memberof MessageServiceRegister
*/
constructor
()
{
this
.
init
();
}
/**
* 初始化
*
* @protected
* @memberof MessageServiceRegister
*/
protected
init
():
void
{
}
/**
* 加载视图消息服务
*
* @protected
* @param {string} codeName
* @returns {Promise<any>}
* @memberof MessageServiceRegister
*/
protected
async
loadService
(
codeName
:
string
):
Promise
<
any
>
{
const
service
=
this
.
allMessageService
.
get
(
codeName
);
if
(
service
)
{
return
service
();
}
}
/**
* 获取视图消息服务
*
* @param {string} name
* @returns {Promise<any>}
* @memberof MessageServiceRegister
*/
public
async
getService
(
name
:
string
):
Promise
<
any
>
{
if
(
this
.
serviceCache
.
has
(
name
))
{
return
this
.
serviceCache
.
get
(
name
);
}
const
messageService
:
any
=
await
this
.
loadService
(
name
);
if
(
messageService
&&
messageService
.
default
)
{
const
instance
:
any
=
new
messageService
.
default
();
this
.
serviceCache
.
set
(
name
,
instance
);
return
instance
;
}
}
}
export
const
messageServiceRegister
:
MessageServiceRegister
=
new
MessageServiceRegister
();
\ No newline at end of file
app_web/src/message/view-message-group-service.ts
0 → 100644
浏览文件 @
988330ef
import
{
Http
}
from
'@/utils/http/http'
;
/**
* 视图消息组
*
* @export
* @class ViewMessageGroupService
*/
export
default
class
ViewMessageGroupService
{
/**
* 单例变量声明
*
* @private
* @static
* @type {ViewMessageGroupService}
* @memberof ViewMessageGroupService
*/
private
static
ViewMessageGroup
:
ViewMessageGroupService
;
/**
* 所有视图消息组对象
*
* @private
* @static
* @type {ViewMessageGroupService}
* @memberof ViewMessageGroupService
*/
private
static
allViewMessageGroup
:
any
;
/**
* 初始化实例
*
* @memberof ViewMessageGroupService
*/
constructor
(
opts
:
any
=
{}){}
/**
* 获取 ViewMessageGroupService 单例对象
*
* @static
* @returns {ViewMessageGroupService}
* @memberof ViewMessageGroupService
*/
public
static
getInstance
():
ViewMessageGroupService
{
if
(
!
ViewMessageGroupService
.
ViewMessageGroup
)
{
ViewMessageGroupService
.
ViewMessageGroup
=
new
ViewMessageGroupService
();
}
return
this
.
ViewMessageGroup
;
}
/**
* 获取视图消息组成员集合
*
* @returns {Promise<any></any>}
* @memberof ViewMessageGroupService
*/
public
async
getViewMessageDetailsByTag
(
tag
:
string
):
Promise
<
any
>
{
if
(
ViewMessageGroupService
.
allViewMessageGroup
){
return
ViewMessageGroupService
.
allViewMessageGroup
[
tag
]?
ViewMessageGroupService
.
allViewMessageGroup
[
tag
]:[];
}
else
{
let
result
:
any
=
await
this
.
loadAllViewMessageGroup
();
return
result
[
tag
]?
result
[
tag
]:[];
}
}
/**
* 加载应用所有视图消息组集合
*
* @returns {Promise<any></any>}
* @memberof ViewMessageGroupService
*/
public
loadAllViewMessageGroup
():
Promise
<
any
>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
Http
.
getInstance
().
get
(
'./assets/json/view-message-group.json'
).
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
&&
response
.
data
)
{
ViewMessageGroupService
.
allViewMessageGroup
=
response
.
data
;
resolve
(
response
.
data
);
}
}).
catch
((
error
:
any
)
=>
{
console
.
log
(
error
);
});
})
}
}
\ No newline at end of file
app_web/src/message/view-message-service.ts
0 → 100644
浏览文件 @
988330ef
import
{
ViewMessage
}
from
'@/interface/message'
;
import
EntityService
from
'@/service/entity-service'
;
/**
* 视图消息
*
* @export
* @class ViewMessage
*/
export
default
class
ViewMessageService
{
/**
* 单例变量声明
*
* @private
* @static
* @type {ViewMessageService}
* @memberof ViewMessageService
*/
private
static
ViewMessage
:
ViewMessageService
;
/**
* 实体数据服务对象
*
* @protected
* @type {EntityService}
* @memberof ViewMessageService
*/
protected
entityService
:
EntityService
=
new
EntityService
();
/**
* 视图消息标识
*
* @type {string}
* @memberof ViewMessageService
*/
public
id
:
string
=
""
;
/**
* 视图消息名称
*
* @type {string}
* @memberof ViewMessageService
*/
public
name
:
string
=
""
;
/**
* 视图消息代码名称
*
* @type {string}
* @memberof ViewMessageService
*/
public
codename
:
string
=
""
;
/**
* 视图消息标题
*
* @type {string}
* @memberof ViewMessageService
*/
public
title
:
string
=
""
;
/**
* 视图消息内容
*
* @type {string}
* @memberof ViewMessageService
*/
public
content
:
string
=
""
;
/**
* 视图消息关闭模式(0:无关闭,1:默认关闭,2:本次关闭)
*
* @type {number}
* @memberof ViewMessageService
*/
public
closeMode
:
number
=
0
;
/**
* 视图消息位置
*
* @type {string}
* @memberof ViewMessageService
*/
public
position
:
string
=
""
;
/**
* 视图消息类型
*
* @type {string}
* @memberof ViewMessageService
*/
public
type
:
string
=
"info"
;
/**
* 视图消息是否支持删除
*
* @type {boolean}
* @memberof ViewMessageService
*/
public
isEnableRemove
:
boolean
=
true
;
/**
* 视图消息排序值
*
* @type {boolean}
* @memberof ViewMessageService
*/
public
order
:
number
=
1
;
/**
* 动态模式
*
* @type {string}
* @memberof ViewMessageService
*/
public
dynamicMode
:
string
=
"STATIC"
;
/**
* 消息类型(可选值:TEXT/HTML)
*
* @type {string}
* @memberof ViewMessageService
*/
public
messageType
:
string
=
"TEXT"
;
/**
* 是否含有消息模板
*
* @type {boolean}
* @memberof ViewMessageService
*/
public
hasMessageTemp
:
boolean
=
false
;
/**
* 视图消息缓存(加载中)
*
* @type {Map<string,any>}
* @memberof ViewMessageService
*/
public
static
messageCache
:
Map
<
string
,
any
>
=
new
Map
();
/**
* 视图消息缓存(已完成)
*
* @type {Map<string,any>}
* @memberof ViewMessageService
*/
public
static
messageCached
:
Map
<
string
,
any
>
=
new
Map
();
/**
* 初始化实例
*
* @memberof ViewMessageService
*/
constructor
(
opts
:
any
=
{})
{
this
.
initBasicParam
();
}
/**
* 获取 ViewMessageService 单例对象
*
* @static
* @returns {ViewMessageService}
* @memberof ViewMessageService
*/
public
static
getInstance
():
ViewMessageService
{
if
(
!
ViewMessageService
.
ViewMessage
)
{
ViewMessageService
.
ViewMessage
=
new
ViewMessageService
();
}
return
this
.
ViewMessage
;
}
/**
* 初始化基础参数
*
* @memberof ViewMessageService
*/
public
initBasicParam
(){}
/**
* 获取视图消息服务
*
* @protected
* @param {string} name 视图消息codename
* @returns {Promise<any>}
* @memberof ViewMessageService
*/
public
getService
(
name
:
string
):
Promise
<
any
>
{
return
(
window
as
any
)[
'messageServiceRegister'
].
getService
(
name
);
}
/**
* 通过tag获取视图消息
*
* @param {tag:string} 视图消息标识
* @param {context:any} 导航上下文
* @param {viewparam:any} 导航参数
* @memberof ViewMessageService
*/
public
async
getViewMessageByTag
(
tag
:
string
,
context
:
any
=
{},
viewparam
:
any
=
{}){
let
messageService
:
any
=
await
this
.
getService
(
tag
);
if
(
messageService
.
dynamicMode
&&
Object
.
is
(
messageService
.
dynamicMode
,
"STATIC"
)){
return
messageService
.
getStaticViewMessage
();
}
else
{
return
messageService
.
getDynamicViewMessage
(
tag
,
messageService
,
context
,
viewparam
);
}
}
/**
* 转化消息模板标题和内容
*
* @memberof ViewMessageService
*/
public
translateMessageTemp
(
target
:
any
,
item
?:
any
){
}
/**
* 获取动态模式(静态)类型视图消息
*
* @memberof ViewMessageService
*/
public
getStaticViewMessage
():
Array
<
ViewMessage
>
{
let
returnViewMessage
:
ViewMessage
=
{
id
:
this
.
id
,
name
:
this
.
name
,
codename
:
this
.
codename
,
title
:
this
.
title
,
content
:
this
.
content
,
closeMode
:
this
.
closeMode
,
position
:
this
.
position
,
type
:
this
.
type
,
isEnableRemove
:
this
.
isEnableRemove
,
order
:
this
.
order
,
dynamicMode
:
this
.
dynamicMode
,
messageType
:
this
.
messageType
};
this
.
translateMessageTemp
(
returnViewMessage
);
return
[
returnViewMessage
];
}
/**
* 获取动态模式(实体数据集合)类型视图消息
*
* @param {any} tag 视图消息标识
* @param {any} messageService 消息服务
* @param {string} context
* @returns {Promise<any[]>}
* @memberof ViewMessageService
*/
public
getDynamicViewMessage
(
tag
:
string
,
messageService
:
any
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
[]
>
{
if
(
context
&&
context
.
srfsessionid
){
delete
context
.
srfsessionid
;
}
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
isEnableCache
:
boolean
=
messageService
.
isEnableCache
;
let
cacheTimeout
:
any
=
messageService
.
cacheTimeout
;
// 启用缓存
if
(
isEnableCache
){
const
callback
:
Function
=
(
context
:
any
=
{},
data
:
any
=
{},
tag
:
string
,
promise
:
Promise
<
any
>
)
=>
{
promise
.
then
((
result
:
any
)
=>
{
if
(
result
.
length
>
0
){
ViewMessageService
.
messageCached
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,{
items
:
result
});
ViewMessageService
.
messageCache
.
delete
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
);
return
resolve
(
result
);
}
else
{
return
resolve
([]);
}
}).
catch
((
result
:
any
)
=>
{
return
reject
(
result
);
})
}
// 加载完成,从本地缓存获取
if
(
ViewMessageService
.
messageCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
let
items
:
any
=
ViewMessageService
.
messageCached
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
).
items
;
if
(
items
.
length
>
0
){
if
(
new
Date
().
getTime
()
<=
messageService
.
getExpirationTime
()){
return
resolve
(
items
);
}
}
}
if
(
messageService
)
{
// 加载中,UI又需要数据,解决连续加载同一代码表问题
if
(
ViewMessageService
.
messageCache
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
)){
callback
(
context
,
data
,
tag
,
ViewMessageService
.
messageCache
.
get
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
));
}
else
{
let
result
:
Promise
<
any
>
=
messageService
.
getItems
(
context
,
data
,
isloading
);
ViewMessageService
.
messageCache
.
set
(
`
${
JSON
.
stringify
(
context
)}
-
${
JSON
.
stringify
(
data
)}
-
${
tag
}
`
,
result
);
messageService
.
setExpirationTime
(
new
Date
().
getTime
()
+
cacheTimeout
);
callback
(
context
,
data
,
tag
,
result
);
}
}
}
else
{
if
(
messageService
)
{
messageService
.
getItems
(
context
,
data
,
isloading
).
then
((
result
:
any
)
=>
{
resolve
(
result
);
}).
catch
((
error
:
any
)
=>
{
Promise
.
reject
([]);
})
}
else
{
return
Promise
.
reject
([]);
}
}
})
}
}
\ No newline at end of file
app_web/src/mock/viewconfig/viewconfig.ts
浏览文件 @
988330ef
...
...
@@ -64,4 +64,11 @@ mock.onGet('./assets/json/view-config.json').reply((config: any) => {
"viewtag"
:
"e4856779577562e9880855e6c66d63e5"
}
}];
});
// 获取视图消息分组信息
mock
.
onGet
(
'./assets/json/view-message-group.json'
).
reply
((
config
:
any
)
=>
{
let
status
=
MockAdapter
.
mockStatus
(
config
);
return
[
status
,{
}];
});
\ No newline at end of file
app_web/src/model/form-detail/form-item.ts
浏览文件 @
988330ef
...
...
@@ -38,6 +38,14 @@ export class FormItemModel extends FormDetailModel {
*/
public
enableCond
:
number
|
0
|
1
|
2
|
3
=
3
;
/**
* 是否必填
*
* @type {boolean}
* @memberof FormItemModel
*/
public
required
:
boolean
=
false
;
/**
* Creates an instance of FormItemModel.
* FormItemModel 实例
...
...
@@ -49,6 +57,7 @@ export class FormItemModel extends FormDetailModel {
super
(
opts
);
this
.
disabled
=
opts
.
disabled
?
true
:
false
;
this
.
enableCond
=
opts
.
enableCond
;
this
.
required
=
opts
.
required
;
}
/**
...
...
app_web/src/pages/task/jobs-info-edit-view/jobs-info-edit-view-base.vue
浏览文件 @
988330ef
...
...
@@ -187,7 +187,9 @@ export default class JobsInfoEditViewBase extends Vue {
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
}
...
...
@@ -208,7 +210,7 @@ export default class JobsInfoEditViewBase extends Vue {
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
()
&&
Object
.
is
(
_this
.
$util
.
typeOf
(
_this
.
refresh
()),
'function'
)
)
{
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
...
...
@@ -354,7 +356,9 @@ export default class JobsInfoEditViewBase extends Vue {
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
...
...
app_web/src/pages/task/jobs-info-grid-view/jobs-info-grid-view-base.vue
浏览文件 @
988330ef
...
...
@@ -127,7 +127,7 @@ import GridViewEngine from '@engine/view/grid-view-engine';
import
JobsInfoUIService
from
'@/uiservice/jobs-info/jobs-info-ui-service'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
@
Component
({
...
...
@@ -249,7 +249,9 @@ export default class JobsInfoGridViewBase extends Vue {
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
}
...
...
@@ -270,7 +272,7 @@ export default class JobsInfoGridViewBase extends Vue {
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
()
&&
Object
.
is
(
_this
.
$util
.
typeOf
(
_this
.
refresh
()),
'function'
)
)
{
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
...
...
@@ -434,7 +436,9 @@ export default class JobsInfoGridViewBase extends Vue {
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
...
...
app_web/src/pages/task/jobs-log-edit-view/jobs-log-edit-view-base.vue
浏览文件 @
988330ef
...
...
@@ -171,7 +171,9 @@ export default class JobsLogEditViewBase extends Vue {
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
}
...
...
@@ -192,7 +194,7 @@ export default class JobsLogEditViewBase extends Vue {
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
()
&&
Object
.
is
(
_this
.
$util
.
typeOf
(
_this
.
refresh
()),
'function'
)
)
{
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
...
...
@@ -324,7 +326,9 @@ export default class JobsLogEditViewBase extends Vue {
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
...
...
app_web/src/pages/task/jobs-log-grid-view/jobs-log-grid-view-base.vue
浏览文件 @
988330ef
...
...
@@ -76,7 +76,7 @@ import GridViewEngine from '@engine/view/grid-view-engine';
import
JobsLogUIService
from
'@/uiservice/jobs-log/jobs-log-ui-service'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
@
Component
({
...
...
@@ -198,7 +198,9 @@ export default class JobsLogGridViewBase extends Vue {
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
}
...
...
@@ -219,7 +221,7 @@ export default class JobsLogGridViewBase extends Vue {
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
()
&&
Object
.
is
(
_this
.
$util
.
typeOf
(
_this
.
refresh
()),
'function'
)
)
{
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
...
...
@@ -359,7 +361,9 @@ export default class JobsLogGridViewBase extends Vue {
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
...
...
app_web/src/pages/task/jobs-registry-edit-view/jobs-registry-edit-view-base.vue
浏览文件 @
988330ef
...
...
@@ -187,7 +187,9 @@ export default class JobsRegistryEditViewBase extends Vue {
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
}
...
...
@@ -208,7 +210,7 @@ export default class JobsRegistryEditViewBase extends Vue {
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
()
&&
Object
.
is
(
_this
.
$util
.
typeOf
(
_this
.
refresh
()),
'function'
)
)
{
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
...
...
@@ -354,7 +356,9 @@ export default class JobsRegistryEditViewBase extends Vue {
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
...
...
app_web/src/pages/task/jobs-registry-grid-view/jobs-registry-grid-view-base.vue
浏览文件 @
988330ef
...
...
@@ -106,7 +106,7 @@ import GridViewEngine from '@engine/view/grid-view-engine';
import
JobsRegistryUIService
from
'@/uiservice/jobs-registry/jobs-registry-ui-service'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
@
Component
({
...
...
@@ -228,7 +228,9 @@ export default class JobsRegistryGridViewBase extends Vue {
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
}
...
...
@@ -249,7 +251,7 @@ export default class JobsRegistryGridViewBase extends Vue {
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
()
&&
Object
.
is
(
_this
.
$util
.
typeOf
(
_this
.
refresh
()),
'function'
)
)
{
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
...
...
@@ -407,7 +409,9 @@ export default class JobsRegistryGridViewBase extends Vue {
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
...
...
app_web/src/pages/task/task-index-view/main.ts
浏览文件 @
988330ef
...
...
@@ -5,6 +5,7 @@ import App from '@/App.vue';
import
ElementUi
from
'element-ui'
;
import
ViewUI
from
'view-design'
;
import
ibizLab
from
'ibiz-vue-lib'
;
import
axios
from
"axios"
;
import
{
Interceptors
}
from
'@/utils'
;
import
{
Print
}
from
'@/utils/print'
;
import
i18n
from
'@/locale'
...
...
@@ -27,13 +28,18 @@ import { PortletComponent } from '@/portlet-register';
import
store
from
'@/store'
;
import
router
from
'./router'
;
const
win
:
any
=
window
;
win
.
axios
=
axios
;
Vue
.
config
.
errorHandler
=
function
(
err
:
any
,
vm
:
any
,
info
:
any
)
{
console
.
log
(
err
);
}
Vue
.
config
.
productionTip
=
false
;
Vue
.
use
(
Print
);
Vue
.
use
(
ibizLab
);
Vue
.
use
(
Vuex
);
Vue
.
use
(
win
.
AVUE
);
Vue
.
use
(
VueRouter
);;
Vue
.
use
(
ElementUi
,
{
i18n
:
(
key
:
any
,
value
:
any
)
=>
i18n
.
t
(
key
,
value
)
...
...
app_web/src/pages/task/task-index-view/task-index-view-base.vue
浏览文件 @
988330ef
...
...
@@ -170,7 +170,9 @@ export default class TaskIndexViewBase extends Vue {
for
(
let
key
in
this
.
viewparams
){
delete
this
.
viewparams
[
key
];
}
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
if
(
typeof
this
.
viewparams
==
'string'
)
{
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
}
...
...
@@ -191,7 +193,7 @@ export default class TaskIndexViewBase extends Vue {
_this
.
engine
.
load
();
});
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
()
&&
Object
.
is
(
_this
.
$util
.
typeOf
(
_this
.
refresh
()),
'function'
)
)
{
}
else
if
(
!
Object
.
is
(
newVal
,
oldVal
)
&&
_this
.
refresh
&&
_this
.
refresh
instanceof
Function
)
{
_this
.
refresh
();
}
}
...
...
@@ -307,7 +309,9 @@ export default class TaskIndexViewBase extends Vue {
Object
.
assign
(
this
.
context
,
this
.
$store
.
getters
.
getAppData
().
context
);
}
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
typeof
this
.
viewdata
==
'string'
)
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
}
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
Object
.
assign
(
this
.
viewparams
,{
srfparentdename
:
this
.
context
.
srfparentdename
});
}
...
...
app_web/src/service/entity-service.ts
浏览文件 @
988330ef
import
{
Http
}
from
'@/utils'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
/**
* 实体服务基类
...
...
app_web/src/store/getters.ts
浏览文件 @
988330ef
...
...
@@ -47,7 +47,13 @@ export const getLocalData = (state: any) => () => {
* @param state
*/
export
const
getAppData
=
(
state
:
any
)
=>
()
=>
{
return
state
.
appdata
;
let
result
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
state
.
appdata
));
if
(
state
.
localdata
&&
Object
.
keys
(
state
.
localdata
).
length
>
0
){
let
copyContext
:
any
=
result
.
context
?
result
.
context
:{};
Object
.
assign
(
copyContext
,
state
.
localdata
);
result
.
context
=
copyContext
;
}
return
result
;
}
/**
...
...
@@ -104,4 +110,14 @@ export const getOrgData = (state: any) => (srfkey: string) => {
export
const
getDepData
=
(
state
:
any
)
=>
(
srfkey
:
string
)
=>
{
let
depData
=
state
.
depDataMap
[
srfkey
];
return
depData
;
}
/**
* 获取视图信息
*
* @param state
*/
export
const
getViewMessage
=
(
state
:
any
)
=>
(
tag
:
string
)
=>
{
let
id
=
state
.
viewMessage
[
tag
];
return
id
;
}
\ No newline at end of file
app_web/src/store/mutations.ts
浏览文件 @
988330ef
...
...
@@ -29,8 +29,8 @@ export const addCodeLists = (state: any, codelists: any) => {
* @param localdata
*/
export
const
addLocalData
=
(
state
:
any
,
localdata
:
any
=
{})
=>
{
state
.
localdata
=
{};
Object
.
assign
(
state
.
localdata
,
localdata
);
localStorage
.
setItem
(
'localdata'
,
JSON
.
stringify
(
state
.
localdata
));
}
/**
...
...
@@ -291,4 +291,16 @@ export const addDepData = (state: any, args: {srfkey: string,depData: any}) => {
if
(
args
&&
args
.
srfkey
&&
args
.
depData
){
state
.
depDataMap
[
args
.
srfkey
]
=
JSON
.
parse
(
JSON
.
stringify
(
args
.
depData
));
}
}
/**
* 添加视图信息
*
* @param state
* @param args
*/
export
const
addViewMessage
=
(
state
:
any
,
args
:
{
tag
:
string
,
id
:
any
})
=>
{
if
(
args
&&
args
.
tag
&&
args
.
id
)
{
state
.
viewMessage
[
args
.
tag
]
=
args
.
id
;
}
}
\ No newline at end of file
app_web/src/store/state.ts
浏览文件 @
988330ef
...
...
@@ -16,4 +16,5 @@ export const rootstate: any = {
viewSplit
:
{},
orgDataMap
:{},
depDataMap
:{},
viewMessage
:
{},
}
\ No newline at end of file
app_web/src/styles/default.less
浏览文件 @
988330ef
@import '../../node_modules/font-awesome/less/font-awesome.less';
@import'/assets/styles/index.css';
@import '../theme/blue.theme.less';
@import '../theme/dark-blue.theme.less';
@import '../theme/default.theme.less';
...
...
app_web/src/template.html
浏览文件 @
988330ef
...
...
@@ -13,5 +13,6 @@
</noscript>
<div
id=
"app"
></div>
<script
src=
"./environments/environment.js"
></script>
<script
src=
"../assets/js/avue.min.js"
></script>
</body>
</html>
app_web/src/uiservice/jobs-info/jobs-info-ui-service-base.ts
浏览文件 @
988330ef
...
...
@@ -395,13 +395,13 @@ export default class JobsInfoUIServiceBase extends UIService {
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
curData
[
this
.
mainStateFields
[
0
]]
:
""
:
""
;
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
0
]]}
`
:
""
:
""
;
if
(
this
.
mainStateFields
.
length
>=
2
)
{
for
(
let
j
=
0
;
j
<=
1
;
j
++
)
{
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
curData
[
this
.
mainStateFields
[
1
]]
:
""
}
`
:
strTag
;
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
1
]]}
`
:
""
}
`
:
strTag
;
if
(
this
.
mainStateFields
.
length
>=
3
)
{
for
(
let
k
=
0
;
k
<=
1
;
k
++
)
{
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
curData
[
this
.
mainStateFields
[
2
]]
:
""
}
`
:
strTag2
;
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
2
]]}
`
:
""
}
`
:
strTag2
;
// 判断是否存在
return
this
.
allDeMainStateMap
.
get
(
strTag3
);
}
...
...
app_web/src/uiservice/jobs-lock/jobs-lock-ui-service-base.ts
浏览文件 @
988330ef
...
...
@@ -201,13 +201,13 @@ export default class JobsLockUIServiceBase extends UIService {
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
curData
[
this
.
mainStateFields
[
0
]]
:
""
:
""
;
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
0
]]}
`
:
""
:
""
;
if
(
this
.
mainStateFields
.
length
>=
2
)
{
for
(
let
j
=
0
;
j
<=
1
;
j
++
)
{
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
curData
[
this
.
mainStateFields
[
1
]]
:
""
}
`
:
strTag
;
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
1
]]}
`
:
""
}
`
:
strTag
;
if
(
this
.
mainStateFields
.
length
>=
3
)
{
for
(
let
k
=
0
;
k
<=
1
;
k
++
)
{
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
curData
[
this
.
mainStateFields
[
2
]]
:
""
}
`
:
strTag2
;
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
2
]]}
`
:
""
}
`
:
strTag2
;
// 判断是否存在
return
this
.
allDeMainStateMap
.
get
(
strTag3
);
}
...
...
app_web/src/uiservice/jobs-log/jobs-log-ui-service-base.ts
浏览文件 @
988330ef
...
...
@@ -203,13 +203,13 @@ export default class JobsLogUIServiceBase extends UIService {
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
curData
[
this
.
mainStateFields
[
0
]]
:
""
:
""
;
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
0
]]}
`
:
""
:
""
;
if
(
this
.
mainStateFields
.
length
>=
2
)
{
for
(
let
j
=
0
;
j
<=
1
;
j
++
)
{
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
curData
[
this
.
mainStateFields
[
1
]]
:
""
}
`
:
strTag
;
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
1
]]}
`
:
""
}
`
:
strTag
;
if
(
this
.
mainStateFields
.
length
>=
3
)
{
for
(
let
k
=
0
;
k
<=
1
;
k
++
)
{
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
curData
[
this
.
mainStateFields
[
2
]]
:
""
}
`
:
strTag2
;
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
2
]]}
`
:
""
}
`
:
strTag2
;
// 判断是否存在
return
this
.
allDeMainStateMap
.
get
(
strTag3
);
}
...
...
app_web/src/uiservice/jobs-registry/jobs-registry-ui-service-base.ts
浏览文件 @
988330ef
...
...
@@ -203,13 +203,13 @@ export default class JobsRegistryUIServiceBase extends UIService {
}
})
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
curData
[
this
.
mainStateFields
[
0
]]
:
""
:
""
;
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
0
]]}
`
:
""
:
""
;
if
(
this
.
mainStateFields
.
length
>=
2
)
{
for
(
let
j
=
0
;
j
<=
1
;
j
++
)
{
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
curData
[
this
.
mainStateFields
[
1
]]
:
""
}
`
:
strTag
;
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
1
]]}
`
:
""
}
`
:
strTag
;
if
(
this
.
mainStateFields
.
length
>=
3
)
{
for
(
let
k
=
0
;
k
<=
1
;
k
++
)
{
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
curData
[
this
.
mainStateFields
[
2
]]
:
""
}
`
:
strTag2
;
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
`
${
curData
[
this
.
mainStateFields
[
2
]]}
`
:
""
}
`
:
strTag2
;
// 判断是否存在
return
this
.
allDeMainStateMap
.
get
(
strTag3
);
}
...
...
app_web/src/utils/auth-guard/auth-guard.ts
浏览文件 @
988330ef
...
...
@@ -41,10 +41,11 @@ export class AuthGuard {
private
constructor
()
{
}
/**
*
post请求
*
获取应用数据
*
* @param {string} url url 请求路径
* @param {*} [params={}] 请求参数
* @param {*} [router] 路由对象
* @returns {Promise<any>} 请求相响应对象
* @memberof AuthGuard
*/
...
...
@@ -65,6 +66,9 @@ export class AuthGuard {
}
data
=
JSON
.
parse
(
JSON
.
stringify
(
localAppData
));
}
if
(
localStorage
.
getItem
(
'localdata'
)){
router
.
app
.
$store
.
commit
(
'addLocalData'
,
JSON
.
parse
(
localStorage
.
getItem
(
'localdata'
)
as
string
));
}
router
.
app
.
$store
.
commit
(
'addAppData'
,
data
);
// 提交统一资源数据
router
.
app
.
$store
.
dispatch
(
'authresource/commitAuthData'
,
data
);
...
...
app_web/src/widgets/app/task-index-view-appmenu/task-index-view-appmenu-base.vue
浏览文件 @
988330ef
...
...
@@ -122,6 +122,7 @@ import AppCenterService from "@service/app/app-center-service";
import
TaskIndexViewService
from
'./task-index-view-appmenu-service'
;
import
TaskIndexViewModel
from
'./task-index-view-appmenu-model'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
AuthService
from
'@/authservice/auth-service'
;
@
Component
({
...
...
@@ -386,6 +387,15 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface {
* @memberof TaskIndexViewBase
*/
public
counterdata
:
any
=
{};
/**
* 建构权限服务对象
*
* @type {AuthService}
* @memberof TaskIndexViewBase
*/
public
authService
:
AuthService
=
new
AuthService
({
$store
:
this
.
$store
});
/**
* vue 生命周期
*
...
...
@@ -701,7 +711,7 @@ export default class TaskIndexViewBase extends Vue implements ControlInterface {
*/
public
computedEffectiveMenus
(
inputMenus
:
Array
<
any
>
){
inputMenus
.
forEach
((
_item
:
any
)
=>
{
if
(
!
this
.
$store
.
getters
[
'authresource/getAuthMenu'
]
(
_item
)){
if
(
!
this
.
authService
.
getMenusPermission
(
_item
)){
_item
.
hidden
=
true
;
if
(
_item
.
items
&&
_item
.
items
.
length
>
0
)
{
this
.
computedEffectiveMenus
(
_item
.
items
);
...
...
app_web/src/widgets/control-service.ts
浏览文件 @
988330ef
import
{
Store
}
from
'vuex'
;
import
{
Util
}
from
'@/utils/util/util'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
/**
* 部件服务基类
...
...
app_web/src/widgets/jobs-info/default-searchform/default-searchform-base.vue
浏览文件 @
988330ef
...
...
@@ -40,6 +40,7 @@
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:formState=
"formState"
:localContext =
'
{ }'
:localParam ='{ }'
:disabled="detailsModel.n_status_eq.disabled"
...
...
@@ -313,6 +314,23 @@ export default class DefaultBase extends Vue implements ControlInterface {
n_status_eq
:
null
,
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
n_app_like
:
new
FormItemModel
({
caption
:
'服务名(文本包含(%))'
,
detailType
:
'FORMITEM'
,
name
:
'n_app_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
n_handler_like
:
new
FormItemModel
({
caption
:
'执行器任务HANDLER(文本包含(%))'
,
detailType
:
'FORMITEM'
,
name
:
'n_handler_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
n_status_eq
:
new
FormItemModel
({
caption
:
'状态(等于(=))'
,
detailType
:
'FORMITEM'
,
name
:
'n_status_eq'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 属性值规则
*
...
...
@@ -323,40 +341,23 @@ export default class DefaultBase extends Vue implements ControlInterface {
n_app_like
:
[
{
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
n_app_like
.
required
,
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
n_app_like
.
required
,
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值不能为空'
,
trigger
:
'blur'
},
],
n_handler_like
:
[
{
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
n_handler_like
.
required
,
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
n_handler_like
.
required
,
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值不能为空'
,
trigger
:
'blur'
},
],
n_status_eq
:
[
{
type
:
'number'
,
message
:
'状态(等于(=)) 值必须为数值类型'
,
trigger
:
'change'
},
{
type
:
'number'
,
message
:
'状态(等于(=)) 值必须为数值类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'number'
,
message
:
'状态(等于(=)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'number'
,
message
:
'状态(等于(=)) 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
n_status_eq
.
required
,
type
:
'number'
,
message
:
'状态(等于(=)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
n_status_eq
.
required
,
type
:
'number'
,
message
:
'状态(等于(=)) 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
n_app_like
:
new
FormItemModel
({
caption
:
'服务名(文本包含(%))'
,
detailType
:
'FORMITEM'
,
name
:
'n_app_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
n_handler_like
:
new
FormItemModel
({
caption
:
'执行器任务HANDLER(文本包含(%))'
,
detailType
:
'FORMITEM'
,
name
:
'n_handler_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
n_status_eq
:
new
FormItemModel
({
caption
:
'状态(等于(=))'
,
detailType
:
'FORMITEM'
,
name
:
'n_status_eq'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 监控表单属性 n_app_like 值
*
...
...
app_web/src/widgets/jobs-info/default-searchform/default-searchform-service.ts
浏览文件 @
988330ef
...
...
@@ -363,6 +363,10 @@ export default class DefaultService extends ControlService {
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
else
{
if
(
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
"FORMPART"
)){
Object
.
assign
(
requestData
,
data
[
item
.
name
]);
}
}
}
});
...
...
@@ -395,4 +399,40 @@ export default class DefaultService extends ControlService {
return
itemName
.
trim
();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof DefaultService
*/
public
handleResponseData
(
action
:
string
,
data
:
any
=
{},
isCreate
?:
boolean
,
codelistArray
?:
any
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
item
:
any
=
{};
let
dataItems
:
any
[]
=
model
.
getDataItems
();
dataItems
.
forEach
(
dataitem
=>
{
let
val
=
data
.
hasOwnProperty
(
dataitem
.
prop
)
?
data
[
dataitem
.
prop
]
:
null
;
if
(
val
===
null
)
{
val
=
data
.
hasOwnProperty
(
dataitem
.
name
)
?
data
[
dataitem
.
name
]
:
null
;
}
if
((
isCreate
===
undefined
||
isCreate
===
null
)
&&
Object
.
is
(
dataitem
.
dataType
,
'GUID'
)
&&
Object
.
is
(
dataitem
.
name
,
'srfkey'
)
&&
(
val
&&
!
Object
.
is
(
val
,
''
))){
isCreate
=
true
;
}
item
[
dataitem
.
name
]
=
val
;
// 转化代码表
if
(
codelistArray
&&
dataitem
.
codelist
){
if
(
codelistArray
.
get
(
dataitem
.
codelist
.
tag
)
&&
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
)){
item
[
dataitem
.
name
]
=
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
);
}
}
});
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
item
=
Object
.
assign
(
data
,
item
);
return
item
;
}
}
\ No newline at end of file
app_web/src/widgets/jobs-info/main-form/main-form-base.vue
浏览文件 @
988330ef
此差异已折叠。
点击以展开。
app_web/src/widgets/jobs-info/main-form/main-form-service.ts
浏览文件 @
988330ef
...
...
@@ -368,6 +368,10 @@ export default class MainService extends ControlService {
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
else
{
if
(
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
"FORMPART"
)){
Object
.
assign
(
requestData
,
data
[
item
.
name
]);
}
}
}
});
...
...
@@ -400,4 +404,40 @@ export default class MainService extends ControlService {
return
itemName
.
trim
();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof MainService
*/
public
handleResponseData
(
action
:
string
,
data
:
any
=
{},
isCreate
?:
boolean
,
codelistArray
?:
any
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
item
:
any
=
{};
let
dataItems
:
any
[]
=
model
.
getDataItems
();
dataItems
.
forEach
(
dataitem
=>
{
let
val
=
data
.
hasOwnProperty
(
dataitem
.
prop
)
?
data
[
dataitem
.
prop
]
:
null
;
if
(
val
===
null
)
{
val
=
data
.
hasOwnProperty
(
dataitem
.
name
)
?
data
[
dataitem
.
name
]
:
null
;
}
if
((
isCreate
===
undefined
||
isCreate
===
null
)
&&
Object
.
is
(
dataitem
.
dataType
,
'GUID'
)
&&
Object
.
is
(
dataitem
.
name
,
'srfkey'
)
&&
(
val
&&
!
Object
.
is
(
val
,
''
))){
isCreate
=
true
;
}
item
[
dataitem
.
name
]
=
val
;
// 转化代码表
if
(
codelistArray
&&
dataitem
.
codelist
){
if
(
codelistArray
.
get
(
dataitem
.
codelist
.
tag
)
&&
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
)){
item
[
dataitem
.
name
]
=
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
);
}
}
});
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
item
=
Object
.
assign
(
data
,
item
);
return
item
;
}
}
\ No newline at end of file
app_web/src/widgets/jobs-info/main-grid/main-grid-base.vue
浏览文件 @
988330ef
...
...
@@ -183,7 +183,7 @@ import AppCenterService from "@service/app/app-center-service";
import
JobsInfoService
from
'@/service/jobs-info/jobs-info-service'
;
import
MainService
from
'./main-grid-service'
;
import
JobsInfoUIService
from
'@/uiservice/jobs-info/jobs-info-ui-service'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
import
{
FormItemModel
}
from
'@/model/form-detail'
;
import
{
Environment
}
from
'@/environments/environment'
;
...
...
app_web/src/widgets/jobs-log/default-searchform/default-searchform-base.vue
浏览文件 @
988330ef
...
...
@@ -307,6 +307,23 @@ export default class DefaultBase extends Vue implements ControlInterface {
n_trigger_code_eq
:
null
,
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
n_job_id_eq
:
new
FormItemModel
({
caption
:
'任务ID(等于(=))'
,
detailType
:
'FORMITEM'
,
name
:
'n_job_id_eq'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
n_handler_like
:
new
FormItemModel
({
caption
:
'执行器任务HANDLER(文本包含(%))'
,
detailType
:
'FORMITEM'
,
name
:
'n_handler_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
n_trigger_code_eq
:
new
FormItemModel
({
caption
:
'触发器调度返回码(等于(=))'
,
detailType
:
'FORMITEM'
,
name
:
'n_trigger_code_eq'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 属性值规则
*
...
...
@@ -317,40 +334,23 @@ export default class DefaultBase extends Vue implements ControlInterface {
n_job_id_eq
:
[
{
type
:
'string'
,
message
:
'任务ID(等于(=)) 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'任务ID(等于(=)) 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'任务ID(等于(=)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'任务ID(等于(=)) 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
n_job_id_eq
.
required
,
type
:
'string'
,
message
:
'任务ID(等于(=)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
n_job_id_eq
.
required
,
type
:
'string'
,
message
:
'任务ID(等于(=)) 值不能为空'
,
trigger
:
'blur'
},
],
n_handler_like
:
[
{
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
n_handler_like
.
required
,
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
n_handler_like
.
required
,
type
:
'string'
,
message
:
'执行器任务HANDLER(文本包含(%)) 值不能为空'
,
trigger
:
'blur'
},
],
n_trigger_code_eq
:
[
{
type
:
'number'
,
message
:
'触发器调度返回码(等于(=)) 值必须为数值类型'
,
trigger
:
'change'
},
{
type
:
'number'
,
message
:
'触发器调度返回码(等于(=)) 值必须为数值类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'number'
,
message
:
'触发器调度返回码(等于(=)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'number'
,
message
:
'触发器调度返回码(等于(=)) 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
n_trigger_code_eq
.
required
,
type
:
'number'
,
message
:
'触发器调度返回码(等于(=)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
n_trigger_code_eq
.
required
,
type
:
'number'
,
message
:
'触发器调度返回码(等于(=)) 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
n_job_id_eq
:
new
FormItemModel
({
caption
:
'任务ID(等于(=))'
,
detailType
:
'FORMITEM'
,
name
:
'n_job_id_eq'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
n_handler_like
:
new
FormItemModel
({
caption
:
'执行器任务HANDLER(文本包含(%))'
,
detailType
:
'FORMITEM'
,
name
:
'n_handler_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
n_trigger_code_eq
:
new
FormItemModel
({
caption
:
'触发器调度返回码(等于(=))'
,
detailType
:
'FORMITEM'
,
name
:
'n_trigger_code_eq'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 监控表单属性 n_job_id_eq 值
*
...
...
app_web/src/widgets/jobs-log/default-searchform/default-searchform-service.ts
浏览文件 @
988330ef
...
...
@@ -363,6 +363,10 @@ export default class DefaultService extends ControlService {
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
else
{
if
(
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
"FORMPART"
)){
Object
.
assign
(
requestData
,
data
[
item
.
name
]);
}
}
}
});
...
...
@@ -395,4 +399,40 @@ export default class DefaultService extends ControlService {
return
itemName
.
trim
();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof DefaultService
*/
public
handleResponseData
(
action
:
string
,
data
:
any
=
{},
isCreate
?:
boolean
,
codelistArray
?:
any
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
item
:
any
=
{};
let
dataItems
:
any
[]
=
model
.
getDataItems
();
dataItems
.
forEach
(
dataitem
=>
{
let
val
=
data
.
hasOwnProperty
(
dataitem
.
prop
)
?
data
[
dataitem
.
prop
]
:
null
;
if
(
val
===
null
)
{
val
=
data
.
hasOwnProperty
(
dataitem
.
name
)
?
data
[
dataitem
.
name
]
:
null
;
}
if
((
isCreate
===
undefined
||
isCreate
===
null
)
&&
Object
.
is
(
dataitem
.
dataType
,
'GUID'
)
&&
Object
.
is
(
dataitem
.
name
,
'srfkey'
)
&&
(
val
&&
!
Object
.
is
(
val
,
''
))){
isCreate
=
true
;
}
item
[
dataitem
.
name
]
=
val
;
// 转化代码表
if
(
codelistArray
&&
dataitem
.
codelist
){
if
(
codelistArray
.
get
(
dataitem
.
codelist
.
tag
)
&&
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
)){
item
[
dataitem
.
name
]
=
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
);
}
}
});
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
item
=
Object
.
assign
(
data
,
item
);
return
item
;
}
}
\ No newline at end of file
app_web/src/widgets/jobs-log/main-form/main-form-base.vue
浏览文件 @
988330ef
此差异已折叠。
点击以展开。
app_web/src/widgets/jobs-log/main-form/main-form-service.ts
浏览文件 @
988330ef
...
...
@@ -368,6 +368,10 @@ export default class MainService extends ControlService {
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
else
{
if
(
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
"FORMPART"
)){
Object
.
assign
(
requestData
,
data
[
item
.
name
]);
}
}
}
});
...
...
@@ -400,4 +404,40 @@ export default class MainService extends ControlService {
return
itemName
.
trim
();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof MainService
*/
public
handleResponseData
(
action
:
string
,
data
:
any
=
{},
isCreate
?:
boolean
,
codelistArray
?:
any
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
item
:
any
=
{};
let
dataItems
:
any
[]
=
model
.
getDataItems
();
dataItems
.
forEach
(
dataitem
=>
{
let
val
=
data
.
hasOwnProperty
(
dataitem
.
prop
)
?
data
[
dataitem
.
prop
]
:
null
;
if
(
val
===
null
)
{
val
=
data
.
hasOwnProperty
(
dataitem
.
name
)
?
data
[
dataitem
.
name
]
:
null
;
}
if
((
isCreate
===
undefined
||
isCreate
===
null
)
&&
Object
.
is
(
dataitem
.
dataType
,
'GUID'
)
&&
Object
.
is
(
dataitem
.
name
,
'srfkey'
)
&&
(
val
&&
!
Object
.
is
(
val
,
''
))){
isCreate
=
true
;
}
item
[
dataitem
.
name
]
=
val
;
// 转化代码表
if
(
codelistArray
&&
dataitem
.
codelist
){
if
(
codelistArray
.
get
(
dataitem
.
codelist
.
tag
)
&&
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
)){
item
[
dataitem
.
name
]
=
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
);
}
}
});
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
item
=
Object
.
assign
(
data
,
item
);
return
item
;
}
}
\ No newline at end of file
app_web/src/widgets/jobs-log/main-grid/main-grid-base.vue
浏览文件 @
988330ef
...
...
@@ -169,7 +169,7 @@ import AppCenterService from "@service/app/app-center-service";
import
JobsLogService
from
'@/service/jobs-log/jobs-log-service'
;
import
MainService
from
'./main-grid-service'
;
import
JobsLogUIService
from
'@/uiservice/jobs-log/jobs-log-ui-service'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
import
{
FormItemModel
}
from
'@/model/form-detail'
;
import
{
Environment
}
from
'@/environments/environment'
;
...
...
app_web/src/widgets/jobs-registry/default-searchform/default-searchform-base.vue
浏览文件 @
988330ef
...
...
@@ -26,6 +26,7 @@
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:formState=
"formState"
:localContext =
'
{ }'
:localParam ='{ }'
:disabled="detailsModel.n_status_eq.disabled"
...
...
@@ -298,6 +299,21 @@ export default class DefaultBase extends Vue implements ControlInterface {
n_status_eq
:
null
,
};
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
n_app_like
:
new
FormItemModel
({
caption
:
'服务名(文本包含(%))'
,
detailType
:
'FORMITEM'
,
name
:
'n_app_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
n_status_eq
:
new
FormItemModel
({
caption
:
'状态(等于(=))'
,
detailType
:
'FORMITEM'
,
name
:
'n_status_eq'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
required
:
false
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 属性值规则
*
...
...
@@ -308,32 +324,17 @@ export default class DefaultBase extends Vue implements ControlInterface {
n_app_like
:
[
{
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
n_app_like
.
required
,
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
n_app_like
.
required
,
type
:
'string'
,
message
:
'服务名(文本包含(%)) 值不能为空'
,
trigger
:
'blur'
},
],
n_status_eq
:
[
{
type
:
'number'
,
message
:
'状态(等于(=)) 值必须为数值类型'
,
trigger
:
'change'
},
{
type
:
'number'
,
message
:
'状态(等于(=)) 值必须为数值类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'number'
,
message
:
'状态(等于(=)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'number'
,
message
:
'状态(等于(=)) 值不能为空'
,
trigger
:
'blur'
},
{
required
:
this
.
detailsModel
.
n_status_eq
.
required
,
type
:
'number'
,
message
:
'状态(等于(=)) 值不能为空'
,
trigger
:
'change'
},
{
required
:
this
.
detailsModel
.
n_status_eq
.
required
,
type
:
'number'
,
message
:
'状态(等于(=)) 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
* 详情模型集合
*
* @type {*}
* @memberof DefaultBase
*/
public
detailsModel
:
any
=
{
formpage1
:
new
FormPageModel
({
caption
:
'常规条件'
,
detailType
:
'FORMPAGE'
,
name
:
'formpage1'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
})
,
n_app_like
:
new
FormItemModel
({
caption
:
'服务名(文本包含(%))'
,
detailType
:
'FORMITEM'
,
name
:
'n_app_like'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
n_status_eq
:
new
FormItemModel
({
caption
:
'状态(等于(=))'
,
detailType
:
'FORMITEM'
,
name
:
'n_status_eq'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
};
/**
* 监控表单属性 n_app_like 值
*
...
...
app_web/src/widgets/jobs-registry/default-searchform/default-searchform-service.ts
浏览文件 @
988330ef
...
...
@@ -363,6 +363,10 @@ export default class DefaultService extends ControlService {
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
else
{
if
(
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
"FORMPART"
)){
Object
.
assign
(
requestData
,
data
[
item
.
name
]);
}
}
}
});
...
...
@@ -395,4 +399,40 @@ export default class DefaultService extends ControlService {
return
itemName
.
trim
();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof DefaultService
*/
public
handleResponseData
(
action
:
string
,
data
:
any
=
{},
isCreate
?:
boolean
,
codelistArray
?:
any
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
item
:
any
=
{};
let
dataItems
:
any
[]
=
model
.
getDataItems
();
dataItems
.
forEach
(
dataitem
=>
{
let
val
=
data
.
hasOwnProperty
(
dataitem
.
prop
)
?
data
[
dataitem
.
prop
]
:
null
;
if
(
val
===
null
)
{
val
=
data
.
hasOwnProperty
(
dataitem
.
name
)
?
data
[
dataitem
.
name
]
:
null
;
}
if
((
isCreate
===
undefined
||
isCreate
===
null
)
&&
Object
.
is
(
dataitem
.
dataType
,
'GUID'
)
&&
Object
.
is
(
dataitem
.
name
,
'srfkey'
)
&&
(
val
&&
!
Object
.
is
(
val
,
''
))){
isCreate
=
true
;
}
item
[
dataitem
.
name
]
=
val
;
// 转化代码表
if
(
codelistArray
&&
dataitem
.
codelist
){
if
(
codelistArray
.
get
(
dataitem
.
codelist
.
tag
)
&&
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
)){
item
[
dataitem
.
name
]
=
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
);
}
}
});
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
item
=
Object
.
assign
(
data
,
item
);
return
item
;
}
}
\ No newline at end of file
app_web/src/widgets/jobs-registry/main-form/main-form-base.vue
浏览文件 @
988330ef
此差异已折叠。
点击以展开。
app_web/src/widgets/jobs-registry/main-form/main-form-service.ts
浏览文件 @
988330ef
...
...
@@ -368,6 +368,10 @@ export default class MainService extends ControlService {
}
else
{
if
(
item
&&
item
.
prop
){
requestData
[
item
.
prop
]
=
data
[
item
.
name
];
}
else
{
if
(
item
.
dataType
&&
Object
.
is
(
item
.
dataType
,
"FORMPART"
)){
Object
.
assign
(
requestData
,
data
[
item
.
name
]);
}
}
}
});
...
...
@@ -400,4 +404,40 @@ export default class MainService extends ControlService {
return
itemName
.
trim
();
}
/**
* 重写处理返回数据
*
* @param {string} action
* @param {*} response
* @memberof MainService
*/
public
handleResponseData
(
action
:
string
,
data
:
any
=
{},
isCreate
?:
boolean
,
codelistArray
?:
any
){
let
model
:
any
=
this
.
getMode
();
if
(
!
model
&&
model
.
getDataItems
instanceof
Function
)
{
return
data
;
}
let
item
:
any
=
{};
let
dataItems
:
any
[]
=
model
.
getDataItems
();
dataItems
.
forEach
(
dataitem
=>
{
let
val
=
data
.
hasOwnProperty
(
dataitem
.
prop
)
?
data
[
dataitem
.
prop
]
:
null
;
if
(
val
===
null
)
{
val
=
data
.
hasOwnProperty
(
dataitem
.
name
)
?
data
[
dataitem
.
name
]
:
null
;
}
if
((
isCreate
===
undefined
||
isCreate
===
null
)
&&
Object
.
is
(
dataitem
.
dataType
,
'GUID'
)
&&
Object
.
is
(
dataitem
.
name
,
'srfkey'
)
&&
(
val
&&
!
Object
.
is
(
val
,
''
))){
isCreate
=
true
;
}
item
[
dataitem
.
name
]
=
val
;
// 转化代码表
if
(
codelistArray
&&
dataitem
.
codelist
){
if
(
codelistArray
.
get
(
dataitem
.
codelist
.
tag
)
&&
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
)){
item
[
dataitem
.
name
]
=
codelistArray
.
get
(
dataitem
.
codelist
.
tag
).
get
(
val
);
}
}
});
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
item
=
Object
.
assign
(
data
,
item
);
return
item
;
}
}
\ No newline at end of file
app_web/src/widgets/jobs-registry/main-grid/main-grid-base.vue
浏览文件 @
988330ef
...
...
@@ -123,7 +123,7 @@ import AppCenterService from "@service/app/app-center-service";
import
JobsRegistryService
from
'@/service/jobs-registry/jobs-registry-service'
;
import
MainService
from
'./main-grid-service'
;
import
JobsRegistryUIService
from
'@/uiservice/jobs-registry/jobs-registry-ui-service'
;
import
CodeListService
from
"@
service/app
/codelist-service"
;
import
CodeListService
from
"@
/codelist
/codelist-service"
;
import
{
FormItemModel
}
from
'@/model/form-detail'
;
import
{
Environment
}
from
'@/environments/environment'
;
...
...
ibztask-app/ibztask-app-web/pom.xml
浏览文件 @
988330ef
...
...
@@ -21,6 +21,9 @@
</dependency>
</dependencies>
<properties>
<docker.image.prefix>
registry.cn-shanghai.aliyuncs.com/ibizsys
</docker.image.prefix>
</properties>
<profiles>
...
...
@@ -95,6 +98,23 @@
</executions>
</plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<version>
0.4.13
</version>
<configuration>
<serverId>
ibiz-dev
</serverId>
<imageName>
${docker.image.prefix}/${project.artifactId}:latest
</imageName>
<dockerDirectory>
${project.basedir}/src/main/docker
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
../../
</directory>
<include>
${project.artifactId}.jar
</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
...
...
ibztask-app/ibztask-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
988330ef
server
:
port
:
8080
port
:
30005
#Log配置
logging
:
level
:
...
...
@@ -71,5 +71,9 @@ zuul:
path
:
/sysdepartments/**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
lite-core
:
path
:
/lite/**
serviceId
:
${ibiz.ref.service.lite:ibzlite-api}
stripPrefix
:
false
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
ibztask-boot/src/main/resources/application-dev.yml
浏览文件 @
988330ef
...
...
@@ -52,5 +52,9 @@ zuul:
path
:
/sysdepartments/**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
lite-core
:
path
:
/lite/**
serviceId
:
${ibiz.ref.service.lite:ibzlite-api}
stripPrefix
:
false
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
ibztask-core/src/main/java/cn/ibizlab/core/task/service/impl/JobsInfoServiceImpl.java
浏览文件 @
988330ef
...
...
@@ -157,17 +157,17 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i
@Override
@Transactional
public
JobsInfo
start
(
JobsInfo
et
)
{
et
.
set
(
"Last_time"
,
"0"
);
et
.
set
(
"Status"
,
"0"
);
et
.
set
(
"Last_time"
,
"0"
);
update
(
et
);
return
et
;
}
@Override
@Transactional
public
JobsInfo
stop
(
JobsInfo
et
)
{
et
.
set
(
"Last_time"
,
"0"
);
et
.
set
(
"Status"
,
"1"
);
et
.
set
(
"Next_time"
,
"0"
);
et
.
set
(
"Last_time"
,
"0"
);
update
(
et
);
return
et
;
}
...
...
ibztask-core/src/main/java/cn/ibizlab/core/util/config/MybatisConfiguration.java
浏览文件 @
988330ef
...
...
@@ -48,6 +48,7 @@ public class MybatisConfiguration {
// paginationInterceptor.setOverflow(false);
// 设置最大单页限制数量,默认 500 条,-1 不受限制
paginationInterceptor
.
setLimit
(-
1
);
// 开启 count 的 join 优化,只针对部分 left join
paginationInterceptor
.
setCountSqlParser
(
new
JsqlParserCountOptimize
(
true
));
return
paginationInterceptor
;
...
...
ibztask-core/src/main/resources/sysmodel/ibztask.json
0 → 100644
浏览文件 @
988330ef
此差异已折叠。
点击以展开。
ibztask-provider/ibztask-provider-api/pom.xml
浏览文件 @
988330ef
...
...
@@ -21,6 +21,9 @@
</dependency>
</dependencies>
<properties>
<docker.image.prefix>
registry.cn-shanghai.aliyuncs.com/ibizsys
</docker.image.prefix>
</properties>
<profiles>
<profile>
...
...
@@ -54,6 +57,23 @@
</executions>
</plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<version>
0.4.13
</version>
<configuration>
<serverId>
ibiz-dev
</serverId>
<imageName>
${docker.image.prefix}/${project.artifactId}:latest
</imageName>
<dockerDirectory>
${project.basedir}/src/main/docker
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
../../
</directory>
<include>
${project.artifactId}.jar
</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
...
...
ibztask-provider/ibztask-provider-api/src/main/resources/application-api-prod.yml
浏览文件 @
988330ef
server
:
port
:
8081
port
:
40005
#Log配置
logging
:
level
:
...
...
ibztask-util/src/main/java/cn/ibizlab/util/client/IBZLiteFallback.java
0 → 100644
浏览文件 @
988330ef
package
cn
.
ibizlab
.
util
.
client
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.stereotype.Component
;
@Component
public
class
IBZLiteFallback
implements
IBZLiteFeignClient
{
@Override
public
Boolean
syncSysModel
(
JSONObject
system
)
{
return
null
;
}
}
ibztask-util/src/main/java/cn/ibizlab/util/client/IBZLiteFeignClient.java
0 → 100644
浏览文件 @
988330ef
package
cn
.
ibizlab
.
util
.
client
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
@FeignClient
(
value
=
"${ibiz.ref.service.lite:ibzlite-api}"
,
contextId
=
"lite"
,
fallback
=
IBZLiteFallback
.
class
)
public
interface
IBZLiteFeignClient
{
/**
* 同步系统资模型到lite
* @param system 系统模型信息
* @return
*/
@PostMapping
(
"/lite/syncsysmodel"
)
Boolean
syncSysModel
(
@RequestBody
JSONObject
system
);
}
ibztask-util/src/main/java/cn/ibizlab/util/domain/EntityBase.java
浏览文件 @
988330ef
...
...
@@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
import
org.springframework.cglib.beans.BeanMap
;
import
org.springframework.data.annotation.Transient
;
import
org.springframework.util.AlternativeJdkIdGenerator
;
import
org.springframework.util.ObjectUtils
;
import
java.io.Serializable
;
import
java.lang.reflect.Field
;
import
org.springframework.util.StringUtils
;
import
java.util.*
;
...
...
@@ -96,4 +98,32 @@ public class EntityBase implements Serializable {
this
.
extensionparams
.
put
(
field
.
toLowerCase
(),
value
);
}
/**
* 复制当前对象数据到目标对象
* @param targetEntity 目标数据对象
* @param bIncEmpty 是否包括空值
* @param <T>
* @return
*/
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
){
if
(
targetEntity
instanceof
EntityBase
){
EntityBase
target
=
(
EntityBase
)
targetEntity
;
Hashtable
<
String
,
Field
>
sourceFields
=
DEFieldCacheMap
.
getFieldMap
(
this
.
getClass
());
for
(
String
field
:
sourceFields
.
keySet
()){
Object
value
=
this
.
get
(
field
);
if
(
!
ObjectUtils
.
isEmpty
(
value
)
||
ObjectUtils
.
isEmpty
(
value
)
&&
getFocusNull
().
contains
(
field
)
&&
bIncEmpty
){
target
.
set
(
field
,
value
);
}
}
}
return
targetEntity
;
}
/**
* 重置当前数据对象属性值
* @param field
*/
public
void
reset
(
String
field
){
}
}
\ No newline at end of file
ibztask-util/src/main/java/cn/ibizlab/util/domain/EntityClient.java
浏览文件 @
988330ef
package
cn
.
ibizlab
.
util
.
domain
;
import
org.springframework.util.StringUtils
;
public
class
EntityClient
extends
EntityBase
{
@Override
...
...
@@ -15,5 +17,14 @@ public class EntityClient extends EntityBase {
}
}
@Override
public
void
reset
(
String
field
)
{
if
(!
StringUtils
.
isEmpty
(
field
)){
String
resetField
=
field
.
toLowerCase
();
this
.
set
(
resetField
,
null
);
this
.
getFocusNull
().
remove
(
resetField
);
getExtensionparams
().
remove
(
resetField
+
"dirtyflag"
);
}
}
}
ibztask-util/src/main/java/cn/ibizlab/util/domain/EntityMP.java
浏览文件 @
988330ef
package
cn
.
ibizlab
.
util
.
domain
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
org.springframework.util.StringUtils
;
public
class
EntityMP
extends
EntityBase
{
...
...
@@ -24,5 +25,14 @@ public class EntityMP extends EntityBase {
this
.
getFocusNull
().
remove
(
field
.
toLowerCase
());
}
@Override
public
void
reset
(
String
field
){
if
(!
StringUtils
.
isEmpty
(
field
)){
String
resetField
=
field
.
toLowerCase
();
this
.
set
(
resetField
,
null
);
getFocusNull
().
remove
(
resetField
);
}
}
}
ibztask-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
988330ef
...
...
@@ -149,6 +149,7 @@ public class SearchContextBase implements ISearchContext{
* 获取用户上下文
* @return
*/
@JsonIgnore
public
Map
<
String
,
Object
>
getSessioncontext
()
{
return
AuthenticationUser
.
getAuthenticationUser
().
getSessionParams
();
}
...
...
ibztask-util/src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
浏览文件 @
988330ef
package
cn
.
ibizlab
.
util
.
job
;
import
cn.ibizlab.util.client.IBZUAAFeignClient
;
import
cn.ibizlab.util.client.IBZLiteFeignClient
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONArray
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -36,6 +37,10 @@ public class PermissionSyncJob implements ApplicationRunner {
@Autowired
@Lazy
IBZLiteFeignClient
liteFeignClient
;
@Override
public
void
run
(
ApplicationArguments
args
)
{
try
{
...
...
@@ -57,6 +62,19 @@ public class PermissionSyncJob implements ApplicationRunner {
log
.
error
(
String
.
format
(
"向[UAA]同步系统资源失败,请检查[UAA]服务是否正常! [%s]"
,
ex
));
}
try
{
InputStream
sysModel
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/ibztask.json"
);
//获取当前系统所有实体资源能力
String
strSysModel
=
IOUtils
.
toString
(
sysModel
,
"UTF-8"
);
if
(
liteFeignClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strSysModel
))){
log
.
info
(
"向[lite]同步系统模型成功"
);
}
else
{
log
.
error
(
"向[lite]同步系统模型失败"
);
}
}
catch
(
Exception
ex
)
{
log
.
error
(
String
.
format
(
"向[lite]同步系统模型失败,请检查[lite]服务是否正常! [%s]"
,
ex
));
}
}
}
\ No newline at end of file
ibztask-util/src/main/resources/application-nacos.yml
浏览文件 @
988330ef
...
...
@@ -3,7 +3,7 @@ spring:
cloud
:
nacos
:
discovery
:
server-addr
:
1
27.0.0.
1:8848
server-addr
:
1
72.16.102.21
1:8848
enabled
:
true
eureka
:
...
...
ibztask-util/src/main/resources/application-sys.yml
浏览文件 @
988330ef
...
...
@@ -7,7 +7,7 @@ spring:
caffeine
:
spec
:
initialCapacity=5,maximumSize=500,expireAfterWrite=3600s
redis
:
host
:
1
27.0.0.1
host
:
1
72.16.100.243
port
:
6379
password
:
database
:
0
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录