Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
5da9c8b2
提交
5da9c8b2
编写于
8月 13, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
61ac2692
变更
36
隐藏空白字符变更
内嵌
并排
正在显示
36 个修改的文件
包含
771 行增加
和
74 行删除
+771
-74
lock_login.png
app_web/public/assets/img/lock_login.png
+0
-0
app-register.ts
app_web/src/app-register.ts
+4
-0
lock_login.png
app_web/src/assets/img/lock_login.png
+0
-0
auth-service.ts
app_web/src/authservice/auth-service.ts
+44
-8
dict-catalog-auth-service-base.ts
...uthservice/dict-catalog/dict-catalog-auth-service-base.ts
+1
-1
dict-option-auth-service-base.ts
.../authservice/dict-option/dict-option-auth-service-base.ts
+1
-1
app-actionbar.vue
app_web/src/components/app-actionbar/app-actionbar.vue
+2
-2
app-embed-picker.vue
app_web/src/components/app-embed-picker/app-embed-picker.vue
+9
-7
app-form-group.vue
app_web/src/components/app-form-group/app-form-group.vue
+2
-2
app-full-scren.vue
app_web/src/components/app-full-scren/app-full-scren.vue
+96
-0
app-lock-scren.vue
app_web/src/components/app-lock-scren/app-lock-scren.vue
+99
-0
app-lock.less
app_web/src/components/app-lock/app-lock.less
+31
-0
app-lock.vue
app_web/src/components/app-lock/app-lock.vue
+121
-0
app-picker-select-view.vue
...ponents/app-picker-select-view/app-picker-select-view.vue
+44
-18
tree-grid-ex-view-engine.ts
app_web/src/engine/view/tree-grid-ex-view-engine.ts
+114
-0
components_en_US.ts
app_web/src/locale/lanres/components/components_en_US.ts
+12
-0
components_zh_CN.ts
app_web/src/locale/lanres/components/components_zh_CN.ts
+12
-0
appdata.ts
app_web/src/mock/appdata/appdata.ts
+1
-0
form-button.ts
app_web/src/model/form-detail/form-button.ts
+19
-0
app-index-view-base.vue
...web/src/pages/dict/app-index-view/app-index-view-base.vue
+2
-0
main.ts
app_web/src/pages/dict/app-index-view/main.ts
+7
-3
router.ts
app_web/src/pages/dict/app-index-view/router.ts
+14
-0
dict-catalog-grid-view-base.vue
...ct/dict-catalog-grid-view/dict-catalog-grid-view-base.vue
+1
-0
dict-option-grid-edit-view-base.vue
...option-grid-edit-view/dict-option-grid-edit-view-base.vue
+1
-0
dict-option-grid-view-base.vue
...dict/dict-option-grid-view/dict-option-grid-view-base.vue
+1
-0
default.less
app_web/src/styles/default.less
+5
-1
default-searchform-base.vue
...ct-catalog/default-searchform/default-searchform-base.vue
+16
-5
main-form-base.vue
...web/src/widgets/dict-catalog/main-form/main-form-base.vue
+24
-0
main-grid-base.vue
...web/src/widgets/dict-catalog/main-grid/main-grid-base.vue
+10
-2
main-grid.less
app_web/src/widgets/dict-catalog/main-grid/main-grid.less
+6
-5
default-searchform-base.vue
...ict-option/default-searchform/default-searchform-base.vue
+16
-5
main-form-base.vue
app_web/src/widgets/dict-option/main-form/main-form-base.vue
+24
-0
main-grid-base.vue
app_web/src/widgets/dict-option/main-grid/main-grid-base.vue
+10
-2
main-grid.less
app_web/src/widgets/dict-option/main-grid/main-grid.less
+6
-5
options-grid-base.vue
...rc/widgets/dict-option/options-grid/options-grid-base.vue
+10
-2
options-grid.less
...eb/src/widgets/dict-option/options-grid/options-grid.less
+6
-5
未找到文件。
app_web/public/assets/img/lock_login.png
0 → 100644
浏览文件 @
5da9c8b2
238.9 KB
app_web/src/app-register.ts
浏览文件 @
5da9c8b2
...
...
@@ -81,6 +81,8 @@ import AppDepartmentSelect from './components/app-department-select/app-departme
import
AppGroupSelect
from
'./components/app-group-select/app-group-select.vue'
import
UpdatePwd
from
'./components/app-update-password/app-update-password.vue'
import
AppMenuItem
from
'./components/app-menu-item/app-menu-item.vue'
import
AppFullScren
from
'./components/app-full-scren/app-full-scren.vue'
import
AppLockScren
from
'./components/app-lock-scren/app-lock-scren.vue'
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
// 全局挂载实体权限服务注册中心
...
...
@@ -105,6 +107,8 @@ export const AppComponents = {
v
.
prototype
.
$verify
=
Verify
;
v
.
prototype
.
$viewTool
=
ViewTool
;
v
.
prototype
.
$uiActionTool
=
UIActionTool
;
v
.
component
(
'app-full-scren'
,
AppFullScren
);
v
.
component
(
'app-lock-scren'
,
AppLockScren
);
v
.
component
(
'input-box'
,
InputBox
);
v
.
component
(
'app-keep-alive'
,
AppKeepAlive
);
v
.
component
(
'tab-page-exp'
,
TabPageExp
);
...
...
app_web/src/assets/img/lock_login.png
0 → 100644
浏览文件 @
5da9c8b2
238.9 KB
app_web/src/authservice/auth-service.ts
浏览文件 @
5da9c8b2
import
{
Store
}
from
'vuex'
;
import
store
from
'@/store'
;
/**
* 实体权限服务
*
...
...
@@ -15,7 +14,16 @@ export default class AuthService {
* @type {(any | null)}
* @memberof AuthService
*/
public
$store
:
Store
<
any
>
|
null
=
null
;
public
$store
:
any
;
/**
* 系统操作标识映射统一资源Map
*
* @public
* @type {Map<string,any>}
* @memberof AuthService
*/
public
sysOPPrivsMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* 默认操作标识
...
...
@@ -24,7 +32,7 @@ export default class AuthService {
* @type {(any)}
* @memberof AuthService
*/
public
defaultOPPrivs
:
any
=
{
UPDATE
:
1
,
CREATE
:
1
,
READ
:
1
,
DELETE
:
1
,
WFSTART
:
1
,
DENY
:
1
,
NONE
:
1
};
public
defaultOPPrivs
:
any
=
{
CREATE
:
1
,
DELETE
:
1
,
DENY
:
1
,
NONE
:
1
,
READ
:
1
,
UPDATE
:
1
,
WFSTART
:
1
};
/**
* Creates an instance of AuthService.
...
...
@@ -33,7 +41,8 @@ export default class AuthService {
* @memberof AuthService
*/
constructor
(
opts
:
any
=
{})
{
this
.
$store
=
opts
.
$store
;
this
.
$store
=
store
;
this
.
registerSysOPPrivs
();
}
/**
...
...
@@ -42,10 +51,27 @@ export default class AuthService {
* @returns {(any | null)}
* @memberof AuthService
*/
public
getStore
():
Store
<
any
>
|
null
{
public
getStore
():
any
{
return
this
.
$store
;
}
/**
* 获取计算统一资源之后的系统操作标识
*
* @returns {}
* @memberof AuthService
*/
public
getSysOPPrivs
(){
let
copySysOPPrivs
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
defaultOPPrivs
));
if
(
Object
.
keys
(
copySysOPPrivs
).
length
===
0
)
return
{};
Object
.
keys
(
copySysOPPrivs
).
forEach
((
name
:
any
)
=>
{
if
(
this
.
sysOPPrivsMap
.
get
(
name
)){
copySysOPPrivs
[
name
]
=
this
.
getResourcePermission
(
this
.
sysOPPrivsMap
.
get
(
name
))?
1
:
0
;
}
})
return
copySysOPPrivs
;
}
/**
* 获取实体权限服务
*
...
...
@@ -57,6 +83,16 @@ export default class AuthService {
return
(
window
as
any
)[
'authServiceRegister'
].
getService
(
name
);
}
/**
* 注册系统操作标识统一资源
*
* @param {string} name 实体名称
* @returns {Promise<any>}
* @memberof AuthService
*/
public
registerSysOPPrivs
(){
}
/**
* 根据当前数据获取实体操作标识
*
...
...
@@ -76,7 +112,7 @@ export default class AuthService {
* @memberof AuthService
*/
public
getMenusPermission
(
item
:
any
):
boolean
{
return
t
rue
;
return
t
his
.
$store
.
getters
[
'authresource/getAuthMenu'
](
item
)
;
}
/**
...
...
@@ -87,7 +123,7 @@ export default class AuthService {
* @memberof AuthService
*/
public
getResourcePermission
(
tag
:
any
):
boolean
{
return
t
rue
;
return
t
his
.
$store
.
getters
[
'authresource/getResourceData'
](
tag
)
;
}
}
\ No newline at end of file
app_web/src/authservice/dict-catalog/dict-catalog-auth-service-base.ts
浏览文件 @
5da9c8b2
...
...
@@ -27,7 +27,7 @@ export default class DictCatalogAuthServiceBase extends AuthService {
* @memberof DictCatalogAuthServiceBase
*/
public
getOPPrivs
(
mainSateOPPrivs
:
any
):
any
{
let
curDefaultOPPrivs
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
defaultOPPrivs
)
);
let
curDefaultOPPrivs
:
any
=
this
.
getSysOPPrivs
(
);
if
(
mainSateOPPrivs
){
Object
.
assign
(
curDefaultOPPrivs
,
mainSateOPPrivs
);
}
...
...
app_web/src/authservice/dict-option/dict-option-auth-service-base.ts
浏览文件 @
5da9c8b2
...
...
@@ -27,7 +27,7 @@ export default class DictOptionAuthServiceBase extends AuthService {
* @memberof DictOptionAuthServiceBase
*/
public
getOPPrivs
(
mainSateOPPrivs
:
any
):
any
{
let
curDefaultOPPrivs
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
defaultOPPrivs
)
);
let
curDefaultOPPrivs
:
any
=
this
.
getSysOPPrivs
(
);
if
(
mainSateOPPrivs
){
Object
.
assign
(
curDefaultOPPrivs
,
mainSateOPPrivs
);
}
...
...
app_web/src/components/app-actionbar/app-actionbar.vue
浏览文件 @
5da9c8b2
...
...
@@ -2,9 +2,9 @@
<div
class=
"app-actionbar"
>
<div
class=
"app-actionbar-item"
v-for=
"(item,index) in items"
:key=
"index"
>
<Badge
v-if=
"item.counterService&&item.counterService.counterData"
v-show=
"item.visabled"
:count=
"item.counterService.counterData[item.counterId]"
type=
"primary"
>
<i-button
:
style=
"
{'pointer-events':item.disabled?'none':'auto'}
" @click="handleClick(item, $event)">
<i
v-if=
"item.icon"
style=
"margin-right: 5px;"
:class=
"item.icon"
></i>
{{
item
.
actionName
}}
</i-button>
<i-button
:
disabled=
"item.disabled
"
@
click=
"handleClick(item, $event)"
><i
v-if=
"item.icon"
style=
"margin-right: 5px;"
:class=
"item.icon"
></i>
{{
item
.
actionName
}}
</i-button>
</Badge>
<i-button
v-show=
"item.visabled"
:
style=
"
{'pointer-events':item.disabled?'none':'auto'}
" v-else @click="handleClick(item, $event)">
{{
item
.
actionName
}}
</i-button>
<i-button
v-show=
"item.visabled"
:
disabled=
"item.disabled
"
v-else
@
click=
"handleClick(item, $event)"
>
{{
item
.
actionName
}}
</i-button>
</div>
</div>
</
template
>
...
...
app_web/src/components/app-embed-picker/app-embed-picker.vue
浏览文件 @
5da9c8b2
...
...
@@ -12,7 +12,7 @@
</div>
<template
v-if=
"placeholder"
>
<div
v-if=
"value"
class=
"app-embed-value"
>
<span
v-for=
"(item,index) in value"
:key=
"index"
>
<span
v-for=
"(item,index) in value
.split(',')
"
:key=
"index"
>
{{
item
}}
</span>
</div>
...
...
@@ -247,19 +247,21 @@ export default class AppEmbedPicker extends Vue {
* @memberof AppEmbedPicker
*/
public
setValue
(
item
:
any
)
{
let
s
electsrfkey
:
Array
<
any
>
=
[]
;
let
s
electsrfmajortext
:
Array
<
any
>
=
[]
;
let
s
rfkey
:
string
=
''
;
let
s
rfmajortext
:
string
=
''
;
if
(
item
&&
Array
.
isArray
(
item
)){
item
.
forEach
((
select
:
any
)
=>
{
s
electsrfkey
.
push
(
select
.
srfkey
)
;
s
electsrfmajortext
.
push
(
select
.
srfmajortext
)
;
s
rfkey
+=
select
.
srfkey
+
","
;
s
rfmajortext
+=
select
.
srfmajortext
+
','
;
})
srfkey
=
srfkey
.
substring
(
0
,
srfkey
.
length
-
1
);
srfmajortext
=
srfmajortext
.
substring
(
0
,
srfmajortext
.
length
-
1
);
if
(
this
.
valueItem
)
{
let
value
=
s
electsrfkey
.
length
>
0
?
selectsrfkey
:
''
;
let
value
=
s
rfkey
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
valueItem
,
value
:
value
});
}
if
(
this
.
name
)
{
let
value
=
s
electsrfmajortext
.
length
>
0
?
selectsrfmajortext
:
''
;
let
value
=
s
rfmajortext
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
value
});
}
}
...
...
app_web/src/components/app-form-group/app-form-group.vue
浏览文件 @
5da9c8b2
...
...
@@ -27,7 +27,7 @@
</a>
<dropdown-menu
slot=
'list'
v-if=
"uiActionGroup.details && Array.isArray(uiActionGroup.details)"
>
<dropdown-item
v-for=
"(detail,index) in (uiActionGroup.details)"
:key=
"index"
:name=
"detail.name"
>
<span
class=
'item'
v-show=
"detail.visabled"
:style=
"
{'pointer-events':detail.disabled?'none':'auto'}" @click="doUIAction($event, detail)">
<span
class=
'item'
v-show=
"detail.visabled"
:style=
"
{'pointer-events':detail.disabled?'none':'auto'
,'color':detail.disabled?'#7b7979':'#2d8cf0'
}" @click="doUIAction($event, detail)">
<template
v-if=
"detail.isShowIcon"
>
<template
v-if=
"detail.icon && !Object.is(detail.icon, '')"
>
<i
:class=
"detail.icon"
></i>
...
...
@@ -58,7 +58,7 @@
<
span
class
=
'item-extract-mode'
>
<
template
v
-
if
=
"uiActionGroup.details && Array.isArray(uiActionGroup.details)"
>
<
div
v
-
for
=
"(detail,index) in uiActionGroup.details"
:
key
=
"index"
>
<
span
v
-
show
=
"detail.visabled"
:
style
=
"{'pointer-events':detail.disabled?'none':'auto'
}
"
class
=
'item'
@
click
=
"doUIAction($event, detail)"
>
<
span
v
-
show
=
"detail.visabled"
:
style
=
"{'pointer-events':detail.disabled?'none':'auto'
,'color':detail.disabled?'#7b7979':'#2d8cf0'
}
"
class
=
'item'
@
click
=
"doUIAction($event, detail)"
>
<
template
v
-
if
=
"detail.isShowIcon"
>
<
template
v
-
if
=
"detail.icon && !Object.is(detail.icon, '')"
>
<
i
:
class
=
"detail.icon"
><
/i
>
...
...
app_web/src/components/app-full-scren/app-full-scren.vue
0 → 100644
浏览文件 @
5da9c8b2
<
template
>
<div
class=
"fullscren"
>
<Icon
:type=
"fullScren == true ? 'ios-contract' : 'ios-expand'"
color=
"#aaa"
size=
"22"
@
click=
"handleScreen"
/>
</div>
</
template
>
<
script
lang =
'ts'
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Watch
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppFullScren
extends
Vue
{
public
fullScren
:
boolean
=
false
;
public
handleScreen
(){
if
(
this
.
fullscreenEnable
()){
this
.
exitFullScreen
();
}
else
{
this
.
reqFullScreen
();
}
}
/**
* 监控全屏状态和键盘
*/
public
created
(){
let
_this
=
this
;
window
.
onresize
=
function
(){
if
(
_this
.
fullscreenEnable
()){
_this
.
fullScren
=
true
;
}
else
{
_this
.
fullScren
=
false
;
}
};
window
.
addEventListener
(
"keydown"
,
this
.
keyDown
,
true
);
}
/**
* 监控F11
*/
public
keyDown
(
$event
:
any
){
if
(
$event
.
keyCode
==
122
)
{
$event
.
returnValue
=
false
;
this
.
fullScren
=
!
this
.
fullScren
;
this
.
handleScreen
();
}
}
/**
* 浏览器判断是否全屏
*/
public
fullscreenEnable
(){
const
isFullscreen
=
(
document
as
any
).
isFullScreen
||
(
document
as
any
).
mozIsFullScreen
||
(
document
as
any
).
webkitIsFullScreen
;
return
isFullscreen
;
}
/**
* 浏览器全屏
*/
public
reqFullScreen
(){
if
((
document
as
any
).
documentElement
.
requestFullScreen
)
{
(
document
as
any
).
documentElement
.
requestFullScreen
();
}
else
if
((
document
as
any
).
documentElement
.
webkitRequestFullScreen
)
{
(
document
as
any
).
documentElement
.
webkitRequestFullScreen
();
}
else
if
((
document
as
any
).
documentElement
.
mozRequestFullScreen
)
{
(
document
as
any
).
documentElement
.
mozRequestFullScreen
();
}
};
/**
* 浏览器退出全屏
*/
public
exitFullScreen
(){
if
((
document
as
any
).
documentElement
.
requestFullScreen
)
{
(
document
as
any
).
exitFullScreen
();
}
else
if
((
document
as
any
).
documentElement
.
webkitRequestFullScreen
)
{
(
document
as
any
).
webkitCancelFullScreen
();
}
else
if
((
document
as
any
).
documentElement
.
mozRequestFullScreen
)
{
(
document
as
any
).
mozCancelFullScreen
();
}
}
}
</
script
>
<
style
lang=
'less'
>
.fullscren{
cursor:pointer;
padding: 0 5px;
}
.ivu-icon-ios-expand{
font-weight: bolder;
}
.ivu-icon-ios-contract{
font-weight: bolder;
}
</
style
>
\ No newline at end of file
app_web/src/components/app-lock-scren/app-lock-scren.vue
0 → 100644
浏览文件 @
5da9c8b2
<
template
>
<div
class=
"lockscren"
>
<span>
<Icon
type=
"md-lock"
size=
"22"
color=
"#aaa"
@
click=
"handleLock"
/>
<el-dialog
:title=
"this.$t('components.lockScren.title')"
:visible
.
sync=
"box"
width=
"30%"
append-to-body
>
<el-form
:model=
"form"
ref=
"form"
label-width=
"82px"
>
<el-form-item
:label=
"this.$t('components.lockScren.label')"
prop=
"passwd"
:rules=
"[
{ required: true, message: this.$t('components.lockScren.message')}]">
<el-input
v-model=
"form.passwd"
:placeholder=
"this.$t('components.lockScren.placeholder')"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSetLock"
>
{{
this
.
$t
(
'components.lockScren.confirmButtonText'
)
}}
</el-button>
</span>
</el-dialog>
</span>
</div>
</
template
>
<
script
lang =
'ts'
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Watch
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppLockScren
extends
Vue
{
/**
* 对话框状态
*/
public
box
:
boolean
=
false
;
/**
* 锁屏密码
*/
public
form
:
any
=
{
passwd
:
''
};
/**
* 用户名
*/
public
user
:
any
=
{
name
:
''
};
/**
* 点击锁屏图表展示对话框
*/
public
handleLock
(){
this
.
box
=
true
;
}
/**
* 锁屏确认
*/
public
handleSetLock
(){
(
this
.
$refs
[
"form"
]
as
any
).
validate
((
valid
:
any
)
=>
{
if
(
valid
)
{
const
username
=
this
.
user
.
name
==
''
?
'visitor'
:
this
.
user
.
name
;
const
password
=
window
.
btoa
(
this
.
form
.
passwd
);
const
routerPath
=
window
.
btoa
(
this
.
$route
.
path
);
sessionStorage
.
setItem
(
'lockPassword'
,
password
);
sessionStorage
.
setItem
(
'lockState'
,
'true'
);
sessionStorage
.
setItem
(
'userName'
,
username
);
sessionStorage
.
setItem
(
'routerPath'
,
routerPath
);
this
.
$router
.
push
({
path
:
"/lock"
});
}
});
}
/**
* 获取当前用户名
*
* @memberof AppUser
*/
public
mounted
()
{
let
_user
:
any
=
{};
if
(
this
.
$store
.
getters
.
getAppData
()
&&
this
.
$store
.
getters
.
getAppData
().
context
&&
this
.
$store
.
getters
.
getAppData
().
context
.
srfusername
){
_user
.
name
=
this
.
$store
.
getters
.
getAppData
().
context
.
srfusername
;
}
if
(
localStorage
.
getItem
(
"user"
)){
let
user
:
any
=
JSON
.
parse
(
localStorage
.
getItem
(
"user"
)
as
string
);
if
(
user
&&
user
.
personname
){
_user
.
name
=
user
.
personname
;
}
}
Object
.
assign
(
this
.
user
,
_user
);
}
}
</
script
>
<
style
lang=
'less'
>
.lockscren{
cursor:pointer;
padding: 0 5px;
}
</
style
>
\ No newline at end of file
app_web/src/components/app-lock/app-lock.less
0 → 100644
浏览文件 @
5da9c8b2
.lock-container {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.title {
margin-bottom: 8px;
color: #333;
}
.el-icon-unlock{
font-size: 20px;
}
.el-icon-switch-button{
font-size: 20px;
}
}
.lock-container::before {
z-index: -999;
content: "";
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: url("/assets/img/lock_login.png");
background-size: cover;
}
.lock-form {
width: 300px;
}
\ No newline at end of file
app_web/src/components/app-lock/app-lock.vue
0 → 100644
浏览文件 @
5da9c8b2
<
template
>
<div
class=
"lock-container"
>
<div
class=
"lock-form animated bounceInDown"
>
<div
class=
"animated"
>
<h3
class=
"title"
>
{{
username
}}
</h3>
<el-input
:placeholder=
"this.$t('components.lockScren.placeholder1')"
type=
"password"
class=
"input-with-select animated"
v-model=
"passwd"
>
<el-button
slot=
"append"
icon=
"el-icon-unlock"
size=
"25px"
@
click=
"handleLogin"
></el-button>
<el-button
slot=
"append"
icon=
"el-icon-switch-button"
size=
"25px"
@
click=
"handleLogout"
></el-button>
</el-input>
</div>
</div>
</div>
</
template
>
<
script
lang =
'ts'
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Watch
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppLockIndex
extends
Vue
{
/**
* 输入密码
*/
public
passwd
:
string
=
''
;
/**
* 保存的密码
*/
public
lockpasswd
:
string
=
''
;
/**
* 用户名
*/
public
username
:
string
=
''
;
/**
* 锁屏前的页面路由
*/
public
path
:
string
=
''
;
/**
* 获取锁屏相关信息
*
* @memberof AppLockIndex
*/
public
mounted
()
{
this
.
username
=
(
sessionStorage
.
getItem
(
'userName'
)
as
string
);
this
.
lockpasswd
=
window
.
atob
(
sessionStorage
.
getItem
(
'lockPassword'
)
as
string
);
this
.
path
=
window
.
atob
(
sessionStorage
.
getItem
(
'routerPath'
)
as
string
);
}
/**
* 解除锁屏
*
* @memberof AppLockIndex
*/
public
handleLogin
(){
if
(
this
.
lockpasswd
!=
this
.
passwd
){
this
.
passwd
=
''
;
this
.
$message
({
message
:
(
this
.
$t
(
'components.lockScren.message1'
)
as
string
),
type
:
"error"
});
return
;
}
this
.
clearSession
();
this
.
$router
.
push
({
path
:
this
.
path
});
}
/**
* 登出
*
* @memberof AppLockIndex
*/
public
handleLogout
(){
this
.
$confirm
((
this
.
$t
(
'components.lockScren.promptInformation'
)
as
string
),
(
this
.
$t
(
'components.lockScren.prompt'
)
as
string
),
{
confirmButtonText
:
(
this
.
$t
(
'components.lockScren.confirmButtonText'
)
as
string
),
cancelButtonText
:
(
this
.
$t
(
'components.lockScren.cancelButtonText'
)
as
string
),
type
:
"warning"
}).
then
(()
=>
{
this
.
clearSession
();
const
get
:
Promise
<
any
>
=
this
.
$http
.
get
(
'/v7/logout'
);
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
localStorage
.
removeItem
(
'user'
);
localStorage
.
removeItem
(
'token'
);
let
leftTime
=
new
Date
();
leftTime
.
setTime
(
leftTime
.
getSeconds
()
-
1
);
document
.
cookie
=
"ibzuaa-token=;expires="
+
leftTime
.
toUTCString
();
this
.
$router
.
push
({
name
:
'login'
});
}
}).
catch
((
error
:
any
)
=>
{
console
.
error
(
error
);
})
});
}
/**
* 清除锁屏时生成的session
*/
public
clearSession
(){
sessionStorage
.
removeItem
(
'lockPassword'
);
sessionStorage
.
removeItem
(
'lockState'
);
sessionStorage
.
removeItem
(
'userName'
);
sessionStorage
.
removeItem
(
'routerPath'
);
}
}
</
script
>
<
style
lang=
'less'
>
@import './app-lock.less';
</
style
>
\ No newline at end of file
app_web/src/components/app-picker-select-view/app-picker-select-view.vue
浏览文件 @
5da9c8b2
...
...
@@ -316,14 +316,22 @@ export default class AppPickerSelectView extends Vue {
this
.
keySet
=
[];
this
.
selectItems
=
[];
if
(
newVal
)
{
this
.
selectItems
=
JSON
.
parse
(
newVal
);
this
.
selectItems
.
forEach
((
item
:
any
)
=>
{
this
.
keySet
.
push
(
item
.
srfkey
);
let
index
=
this
.
items
.
findIndex
((
i
)
=>
Object
.
is
(
i
.
srfkey
,
item
.
srfkey
));
if
(
index
<
0
)
{
this
.
items
.
push
({
srfmajortext
:
item
.
srfmajortext
,
srfkey
:
item
.
srfkey
});
}
});
if
(
!
this
.
data
||
!
this
.
valueitem
||
!
this
.
data
[
this
.
valueitem
])
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'components.appPickerSelectView.error'
)
as
any
),
desc
:
(
this
.
$t
(
'components.appPickerSelectView.editor'
)
as
any
)
+
this
.
name
+
(
this
.
$t
(
'components.appPickerSelectView.valueitemException'
)
as
any
)
});
}
else
{
let
tempvalue
:
Array
<
any
>
=
this
.
data
[
this
.
valueitem
].
split
(
','
);
let
temptext
:
Array
<
any
>
=
newVal
.
split
(
','
);
tempvalue
.
forEach
((
srfkey
:
any
,
index
:
number
)
=>
{
this
.
selectItems
.
push
({
srfmajortext
:
temptext
[
index
],
srfkey
:
srfkey
});
});
this
.
selectItems
.
forEach
((
item
:
any
)
=>
{
this
.
keySet
.
push
(
item
.
srfkey
);
let
index
=
this
.
items
.
findIndex
((
i
)
=>
Object
.
is
(
i
.
srfkey
,
item
.
srfkey
));
if
(
index
<
0
)
{
this
.
items
.
push
({
srfmajortext
:
item
.
srfmajortext
,
srfkey
:
item
.
srfkey
});
}
});
}
}
let
_viewparam
=
JSON
.
parse
(
this
.
viewparam
);
_viewparam
.
selectedData
=
this
.
selectItems
;
...
...
@@ -376,23 +384,31 @@ export default class AppPickerSelectView extends Vue {
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
valueitem
,
value
:
tempvalue
});
}
if
(
this
.
name
)
{
let
temp
value
=
$event
[
0
][
this
.
deMajorField
]
?
$event
[
0
][
this
.
deMajorField
]
:
$event
[
0
].
srfmajortext
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
temp
value
});
let
temp
text
=
$event
[
0
][
this
.
deMajorField
]
?
$event
[
0
][
this
.
deMajorField
]
:
$event
[
0
].
srfmajortext
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
temp
text
});
}
}
else
{
let
selects
:
Array
<
any
>
=
[];
let
tempvalue
:
string
=
''
;
let
temptext
:
string
=
''
;
if
(
$event
&&
Array
.
isArray
(
$event
))
{
$event
.
forEach
((
select
:
any
)
=>
{
selects
.
push
({
srfkey
:
select
.
srfkey
,
srfmajortext
:
select
.
srfmajortext
});
let
index
=
this
.
items
.
findIndex
((
item
)
=>
Object
.
is
(
item
.
srfkey
,
select
.
srfkey
));
let
srfkey
=
select
[
this
.
deKeyField
]
?
select
[
this
.
deKeyField
]
:
select
.
srfkey
;
tempvalue
+=
srfkey
+
","
;
let
srfmajortext
=
select
[
this
.
deMajorField
]
?
select
[
this
.
deMajorField
]
:
select
.
srfmajortext
;
temptext
+=
srfmajortext
+
","
;
let
index
=
this
.
items
.
findIndex
((
item
)
=>
Object
.
is
(
item
.
srfkey
,
srfkey
));
if
(
index
<
0
)
{
this
.
items
.
push
({
srfmajortext
:
s
elect
.
srfmajortext
,
srfkey
:
select
.
srfkey
});
this
.
items
.
push
({
srfmajortext
:
s
rfmajortext
,
srfkey
:
srfkey
});
}
});
}
tempvalue
=
tempvalue
.
substring
(
0
,
tempvalue
.
length
-
1
);
temptext
=
temptext
.
substring
(
0
,
temptext
.
length
-
1
);
if
(
this
.
valueitem
){
this
.
$emit
(
'formitemvaluechange'
,{
name
:
this
.
valueitem
,
value
:
tempvalue
});
}
if
(
this
.
name
)
{
let
value
=
selects
.
length
>
0
?
JSON
.
stringify
(
selects
)
:
''
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
value
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
temptext
});
}
}
}
...
...
@@ -553,8 +569,18 @@ export default class AppPickerSelectView extends Vue {
}
});
}
let
value
=
val
.
length
>
0
?
JSON
.
stringify
(
val
)
:
''
;
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
value
});
let
tempvalue
:
string
=
''
;
let
temptext
:
string
=
''
;
val
.
forEach
((
select
:
any
)
=>
{
let
srfkey
=
select
[
this
.
deKeyField
]
?
select
[
this
.
deKeyField
]
:
select
.
srfkey
;
tempvalue
+=
srfkey
+
","
;
let
srfmajortext
=
select
[
this
.
deMajorField
]
?
select
[
this
.
deMajorField
]
:
select
.
srfmajortext
;
temptext
+=
srfmajortext
+
","
;
});
tempvalue
=
tempvalue
.
substring
(
0
,
tempvalue
.
length
-
1
);
temptext
=
temptext
.
substring
(
0
,
temptext
.
length
-
1
);
this
.
$emit
(
'formitemvaluechange'
,{
name
:
this
.
valueitem
,
value
:
tempvalue
});
this
.
$emit
(
'formitemvaluechange'
,
{
name
:
this
.
name
,
value
:
temptext
});
}
}
...
...
app_web/src/engine/view/tree-grid-ex-view-engine.ts
0 → 100644
浏览文件 @
5da9c8b2
import
MDViewEngine
from
'./md-view-engine'
;
/**
* 视图引擎基础
*
* @export
* @class TreeGridExViewEngine
* @extends {MDViewEngine}
*/
export
default
class
TreeGridExViewEngine
extends
MDViewEngine
{
/**
* 表格部件
*
* @type {*}
* @memberof TreeGridExViewEngine
*/
protected
treegridex
:
any
;
/**
* Creates an instance of TreeGridExViewEngine.
* @memberof TreeGridExViewEngine
*/
constructor
()
{
super
();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof TreeGridExViewEngine
*/
public
init
(
options
:
any
=
{}):
void
{
this
.
treegridex
=
options
.
treegridex
;
super
.
init
(
options
);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof TreeGridExViewEngine
*/
public
load
(
opts
:
any
=
{},
isnotify
:
boolean
=
false
):
void
{
if
(
!
this
.
view
.
isformDruipart
){
super
.
load
(
opts
);
}
else
{
if
(
isnotify
){
super
.
load
(
opts
);
}
}
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof TreeGridExViewEngine
*/
public
onCtrlEvent
(
ctrlName
:
string
,
eventName
:
string
,
args
:
any
):
void
{
if
(
Object
.
is
(
ctrlName
,
'treegridex'
))
{
this
.
MDCtrlEvent
(
eventName
,
args
);
}
super
.
onCtrlEvent
(
ctrlName
,
eventName
,
args
);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof TreeGridExViewEngine
*/
public
getMDCtrl
():
any
{
return
this
.
treegridex
;
}
/**
* 事件处理
*
* @param {string} eventName
* @param {*} args
* @memberof TreeGridExViewEngine
*/
public
MDCtrlEvent
(
eventName
:
string
,
args
:
any
):
void
{
if
(
Object
.
is
(
eventName
,
'rowdblclick'
)
&&
this
.
gridRowAllowActive
(
2
))
{
this
.
doEdit
(
args
);
return
;
}
if
(
Object
.
is
(
eventName
,
'selectionchange'
))
{
this
.
selectionChange
(
args
);
if
(
this
.
gridRowAllowActive
(
1
))
{
this
.
doEdit
(
args
);
}
return
;
}
super
.
MDCtrlEvent
(
eventName
,
args
);
}
/**
* 表格是否被允许激活
*
* @param {number} mode
* @returns {boolean}
* @memberof TreeGridExViewEngine
*/
public
gridRowAllowActive
(
mode
:
number
):
boolean
{
return
this
.
view
.
gridRowActiveMode
===
mode
?
true
:
false
;
}
}
\ No newline at end of file
app_web/src/locale/lanres/components/components_en_US.ts
浏览文件 @
5da9c8b2
...
...
@@ -246,6 +246,18 @@ export default {
localUpload
:
'Local upload'
,
or
:
'Or'
,
imgMsg1
:
'Select from stock'
},
lockScren
:{
title
:
'Set the password lock screen'
,
label
:
'password'
,
message
:
'The lock screen password cannot be empty'
,
placeholder
:
'Please enter the lock screen password'
,
placeholder1
:
'Please enter your login password'
,
message1
:
'The unlock password is wrong. Please reenter it'
,
promptInformation
:
'Do you want to quit the system? Do you want to continue?'
,
prompt
:
'prompt'
,
confirmButtonText
:
'determine'
,
cancelButtonText
:
'cancel'
,
}
};
\ No newline at end of file
app_web/src/locale/lanres/components/components_zh_CN.ts
浏览文件 @
5da9c8b2
...
...
@@ -247,5 +247,17 @@ export default {
localUpload
:
'本地上传'
,
or
:
'或'
,
imgMsg1
:
'从素材库选择'
},
lockScren
:{
title
:
'设置锁屏密码'
,
label
:
'锁屏密码'
,
message
:
'锁屏密码不能为空'
,
placeholder
:
'请输入锁屏密码'
,
placeholder1
:
'请输入登录密码'
,
message1
:
'解锁密码错误,请重新输入'
,
promptInformation
:
'是否退出系统, 是否继续?'
,
prompt
:
'提示'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
}
};
\ No newline at end of file
app_web/src/mock/appdata/appdata.ts
浏览文件 @
5da9c8b2
...
...
@@ -33,6 +33,7 @@ mock.onGet('/appdata').reply((config: any) => {
// 当前用户条线代码
srfsectorbc
:
""
},
unires
:[
"RESOURCE1"
,
"RESOURCE2"
],
//当前用户所有组织部门标识
srforgsections
:[{
"srforgsectorid"
:
"5bd1ecf4d3c31e31cb66373df56b852f"
,
"srforgsectorname"
:
"项目一部"
},{
"srforgsectorid"
:
"2ad1ecf4d3c31e31cb66373df56b852f"
,
"srforgsectorname"
:
"项目二部"
}]
}];
...
...
app_web/src/model/form-detail/form-button.ts
浏览文件 @
5da9c8b2
...
...
@@ -11,5 +11,24 @@ export class FormButtonModel extends FormDetailModel {
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
disabled
=
opts
.
disabled
;
this
.
uiaction
=
opts
.
uiaction
;
}
/**
* 是否禁用
*
* @type {boolean}
* @memberof FormButtonModel
*/
public
disabled
:
boolean
=
false
;
/**
* 按钮对应的界面行为
*
* @type {*}
* @memberof FormButtonModel
*/
public
uiaction
:
any
;
}
\ No newline at end of file
app_web/src/pages/dict/app-index-view/app-index-view-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -44,6 +44,8 @@
<app-lang
style=
'font-size: 15px;padding: 0 10px;'
></app-lang>
<app-orgsector></app-orgsector>
<app-user></app-user>
<app-lock-scren
/>
<app-full-scren
/>
<app-theme
style=
"width:45px;display: flex;justify-content: center;"
></app-theme>
</div>
</header>
...
...
app_web/src/pages/dict/app-index-view/main.ts
浏览文件 @
5da9c8b2
...
...
@@ -50,10 +50,14 @@ Vue.use(UserComponent);
Vue
.
use
(
PortletComponent
);
router
.
beforeEach
((
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
if
(
to
.
meta
&&
!
to
.
meta
.
ignoreAddPage
)
{
router
.
app
.
$store
.
commit
(
'addPage'
,
to
);
if
(
sessionStorage
.
getItem
(
'lockState'
)
&&
to
.
path
!=
'/lock'
){
next
({
path
:
'/lock'
});
}
else
{
if
(
to
.
meta
&&
!
to
.
meta
.
ignoreAddPage
)
{
router
.
app
.
$store
.
commit
(
'addPage'
,
to
);
}
next
();
}
next
();
});
Interceptors
.
getInstance
(
router
,
store
);
...
...
app_web/src/pages/dict/app-index-view/router.ts
浏览文件 @
5da9c8b2
...
...
@@ -330,6 +330,20 @@ const router = new Router({
},
component
:
()
=>
import
(
'@components/login/login.vue'
),
},
{
path
:
'/lock'
,
name
:
'lock'
,
meta
:
{
caption
:
'锁屏'
,
viewType
:
'lock'
,
requireAuth
:
false
,
ignoreAddPage
:
true
,
},
beforeEnter
:
(
to
:
any
,
from
:
any
,
next
:
any
)
=>
{
next
();
},
component
:
()
=>
import
(
'@components/app-lock/app-lock.vue'
),
},
{
path
:
'/404'
,
component
:
()
=>
import
(
'@components/404/404.vue'
)
...
...
app_web/src/pages/dict/dict-catalog-grid-view/dict-catalog-grid-view-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -112,6 +112,7 @@
:showBusyIndicator=
"true"
:isOpenEdit=
"false"
:gridRowActiveMode=
"gridRowActiveMode"
:isformDruipart=
"isformDruipart"
@
save=
"onSave"
updateAction=
""
removeAction=
"Remove"
...
...
app_web/src/pages/dict/dict-option-grid-edit-view/dict-option-grid-edit-view-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -99,6 +99,7 @@
:showBusyIndicator=
"true"
:isOpenEdit=
"true"
:gridRowActiveMode=
"gridRowActiveMode"
:isformDruipart=
"isformDruipart"
@
save=
"onSave"
updateAction=
"Update"
removeAction=
"Remove"
...
...
app_web/src/pages/dict/dict-option-grid-view/dict-option-grid-view-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -99,6 +99,7 @@
:showBusyIndicator=
"true"
:isOpenEdit=
"false"
:gridRowActiveMode=
"gridRowActiveMode"
:isformDruipart=
"isformDruipart"
@
save=
"onSave"
updateAction=
"Update"
removeAction=
"Remove"
...
...
app_web/src/styles/default.less
浏览文件 @
5da9c8b2
...
...
@@ -38,6 +38,10 @@
.el-table th {
padding: 5px 0;
}
.el-table th.gutter:last-of-type {
display: block !important;
width: 10px !important;
}
.grid .el-table__body-wrapper .el-table__row td{
border-left: 1px solid rgb(245,245,245);
border-top: 1px solid rgb(245,245,245);
...
...
@@ -116,7 +120,7 @@
> .ivu-card-body {
// height: 50%;
// flex-grow: 1;
height: calc(100% -
62
px);
height: calc(100% -
74
px);
padding: 0px;
> .content-container {
height: 100%;
...
...
app_web/src/widgets/dict-catalog/default-searchform/default-searchform-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -435,11 +435,12 @@ export default class DefaultBase extends Vue implements ControlInterface {
*
* @public
* @param {*} [data={}]
* @param {string} [action]
* @memberof DefaultBase
*/
public
onFormLoad
(
data
:
any
=
{}):
void
{
public
onFormLoad
(
data
:
any
=
{}
,
action
:
string
):
void
{
this
.
setFormEnableCond
(
data
);
this
.
fillForm
(
data
);
this
.
fillForm
(
data
,
action
);
this
.
formLogic
({
name
:
''
,
newVal
:
null
,
oldVal
:
null
});
}
...
...
@@ -447,15 +448,19 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 值填充
*
* @param {*} [_datas={}]
* @param {string} [action]
* @memberof DefaultBase
*/
public
fillForm
(
_datas
:
any
=
{}):
void
{
public
fillForm
(
_datas
:
any
=
{}
,
action
:
string
):
void
{
this
.
ignorefieldvaluechange
=
true
;
Object
.
keys
(
_datas
).
forEach
((
name
:
string
)
=>
{
if
(
this
.
data
.
hasOwnProperty
(
name
))
{
this
.
data
[
name
]
=
_datas
[
name
];
}
});
if
(
Object
.
is
(
action
,
'loadDraft'
)){
this
.
createDefault
();
}
this
.
$nextTick
(
function
()
{
this
.
ignorefieldvaluechange
=
false
;
})
...
...
@@ -478,6 +483,13 @@ export default class DefaultBase extends Vue implements ControlInterface {
});
}
/**
* 新建默认值
* @memberof DefaultBase
*/
public
createDefault
(){
}
/**
* 重置草稿表单状态
*
...
...
@@ -694,7 +706,6 @@ export default class DefaultBase extends Vue implements ControlInterface {
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
);
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
...
...
@@ -738,7 +749,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
const
data
=
response
.
data
;
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
);
this
.
onFormLoad
(
data
,
'loadDraft'
);
setTimeout
(()
=>
{
const
form
:
any
=
this
.
$refs
.
form
;
if
(
form
)
{
...
...
app_web/src/widgets/dict-catalog/main-form/main-form-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -1126,6 +1126,26 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
data
[
name
]
=
value
;
}
/**
* 计算表单按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof MainBase
*/
public
computeButtonState
(
data
:
any
){
let
targetData
:
any
=
this
.
transformData
(
data
);
if
(
this
.
detailsModel
&&
Object
.
keys
(
this
.
detailsModel
).
length
>
0
){
Object
.
keys
(
this
.
detailsModel
).
forEach
((
name
:
any
)
=>
{
if
(
this
.
detailsModel
[
name
]
&&
this
.
detailsModel
[
name
].
uiaction
&&
this
.
detailsModel
[
name
].
uiaction
.
dataaccaction
&&
Object
.
is
(
this
.
detailsModel
[
name
].
detailType
,
"BUTTON"
)){
let
tempUIAction
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
detailsModel
[
name
].
uiaction
));
ViewTool
.
calcActionItemAuthState
(
targetData
,[
tempUIAction
],
this
.
appUIService
);
this
.
detailsModel
[
name
].
visible
=
tempUIAction
.
visabled
;
this
.
detailsModel
[
name
].
disabled
=
tempUIAction
.
disabled
;
}
})
}
}
/**
...
...
@@ -1300,6 +1320,7 @@ export default class MainBase extends Vue implements ControlInterface {
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'load'
);
this
.
$emit
(
'load'
,
data
);
this
.
computeButtonState
(
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
});
...
...
@@ -1343,6 +1364,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
onFormLoad
(
data
,
'loadDraft'
);
data
.
dictcatalog
=
null
;
this
.
$emit
(
'load'
,
data
);
this
.
computeButtonState
(
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
});
...
...
@@ -1400,6 +1422,7 @@ export default class MainBase extends Vue implements ControlInterface {
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'autoSave'
);
this
.
$emit
(
'save'
,
data
);
this
.
computeButtonState
(
data
);
AppCenterService
.
notifyMessage
({
name
:
"DictCatalog"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
data
});
...
...
@@ -1478,6 +1501,7 @@ export default class MainBase extends Vue implements ControlInterface {
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'save'
);
this
.
$emit
(
'save'
,
data
);
this
.
computeButtonState
(
data
);
AppCenterService
.
notifyMessage
({
name
:
"DictCatalog"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
data
});
...
...
app_web/src/widgets/dict-catalog/main-grid/main-grid-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -8,7 +8,7 @@
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
:cell-class-name="getCellClassName"
:height="isEnablePagingBar
&&
items.length > 0 ? 'calc(100% -
50px)' : '100%'"
max-height="items.length > 0 ? 'calc(100%-
50px)' : '100%'"
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
...
...
@@ -332,6 +332,14 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
@
Prop
()
public
opendata
:
any
;
/**
* 是否嵌入关系界面
*
* @type {boolean}
* @memberof MainBase
*/
@
Prop
({
default
:
false
})
public
isformDruipart
?:
boolean
;
/**
* 显示处理提示
...
...
@@ -1517,7 +1525,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
this
.
$emit
(
'save'
,
successItems
);
this
.
refresh
([]);
if
(
errorItems
.
length
===
0
){
if
(
errorItems
.
length
===
0
&&
successItems
.
length
>
0
&&
!
this
.
isformDruipart
){
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
app_web/src/widgets/dict-catalog/main-grid/main-grid.less
浏览文件 @
5da9c8b2
...
...
@@ -67,13 +67,14 @@
}
}
.el-table__header-wrapper{
display: contents;
}
.el-table__body-wrapper{
height: auto !important;
min-height: 45px;
max-height: 100px;
height: auto;
}
.el-table__footer-wrapper{
display: contents;
min-height: 45px;
max-height: 100px;
height: auto;
}
}
.grid-pagination {
...
...
app_web/src/widgets/dict-option/default-searchform/default-searchform-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -435,11 +435,12 @@ export default class DefaultBase extends Vue implements ControlInterface {
*
* @public
* @param {*} [data={}]
* @param {string} [action]
* @memberof DefaultBase
*/
public
onFormLoad
(
data
:
any
=
{}):
void
{
public
onFormLoad
(
data
:
any
=
{}
,
action
:
string
):
void
{
this
.
setFormEnableCond
(
data
);
this
.
fillForm
(
data
);
this
.
fillForm
(
data
,
action
);
this
.
formLogic
({
name
:
''
,
newVal
:
null
,
oldVal
:
null
});
}
...
...
@@ -447,15 +448,19 @@ export default class DefaultBase extends Vue implements ControlInterface {
* 值填充
*
* @param {*} [_datas={}]
* @param {string} [action]
* @memberof DefaultBase
*/
public
fillForm
(
_datas
:
any
=
{}):
void
{
public
fillForm
(
_datas
:
any
=
{}
,
action
:
string
):
void
{
this
.
ignorefieldvaluechange
=
true
;
Object
.
keys
(
_datas
).
forEach
((
name
:
string
)
=>
{
if
(
this
.
data
.
hasOwnProperty
(
name
))
{
this
.
data
[
name
]
=
_datas
[
name
];
}
});
if
(
Object
.
is
(
action
,
'loadDraft'
)){
this
.
createDefault
();
}
this
.
$nextTick
(
function
()
{
this
.
ignorefieldvaluechange
=
false
;
})
...
...
@@ -478,6 +483,13 @@ export default class DefaultBase extends Vue implements ControlInterface {
});
}
/**
* 新建默认值
* @memberof DefaultBase
*/
public
createDefault
(){
}
/**
* 重置草稿表单状态
*
...
...
@@ -694,7 +706,6 @@ export default class DefaultBase extends Vue implements ControlInterface {
get
.
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
===
200
)
{
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
);
this
.
$emit
(
'load'
,
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
...
...
@@ -738,7 +749,7 @@ export default class DefaultBase extends Vue implements ControlInterface {
const
data
=
response
.
data
;
this
.
resetDraftFormStates
();
this
.
onFormLoad
(
data
);
this
.
onFormLoad
(
data
,
'loadDraft'
);
setTimeout
(()
=>
{
const
form
:
any
=
this
.
$refs
.
form
;
if
(
form
)
{
...
...
app_web/src/widgets/dict-option/main-form/main-form-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -1390,6 +1390,26 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
data
[
name
]
=
value
;
}
/**
* 计算表单按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof MainBase
*/
public
computeButtonState
(
data
:
any
){
let
targetData
:
any
=
this
.
transformData
(
data
);
if
(
this
.
detailsModel
&&
Object
.
keys
(
this
.
detailsModel
).
length
>
0
){
Object
.
keys
(
this
.
detailsModel
).
forEach
((
name
:
any
)
=>
{
if
(
this
.
detailsModel
[
name
]
&&
this
.
detailsModel
[
name
].
uiaction
&&
this
.
detailsModel
[
name
].
uiaction
.
dataaccaction
&&
Object
.
is
(
this
.
detailsModel
[
name
].
detailType
,
"BUTTON"
)){
let
tempUIAction
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
detailsModel
[
name
].
uiaction
));
ViewTool
.
calcActionItemAuthState
(
targetData
,[
tempUIAction
],
this
.
appUIService
);
this
.
detailsModel
[
name
].
visible
=
tempUIAction
.
visabled
;
this
.
detailsModel
[
name
].
disabled
=
tempUIAction
.
disabled
;
}
})
}
}
/**
...
...
@@ -1564,6 +1584,7 @@ export default class MainBase extends Vue implements ControlInterface {
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'load'
);
this
.
$emit
(
'load'
,
data
);
this
.
computeButtonState
(
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
});
...
...
@@ -1607,6 +1628,7 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
onFormLoad
(
data
,
'loadDraft'
);
data
.
dictoption
=
null
;
this
.
$emit
(
'load'
,
data
);
this
.
computeButtonState
(
data
);
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'load'
,
data
:
data
});
});
...
...
@@ -1664,6 +1686,7 @@ export default class MainBase extends Vue implements ControlInterface {
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'autoSave'
);
this
.
$emit
(
'save'
,
data
);
this
.
computeButtonState
(
data
);
AppCenterService
.
notifyMessage
({
name
:
"DictOption"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
data
});
...
...
@@ -1742,6 +1765,7 @@ export default class MainBase extends Vue implements ControlInterface {
const
data
=
response
.
data
;
this
.
onFormLoad
(
data
,
'save'
);
this
.
$emit
(
'save'
,
data
);
this
.
computeButtonState
(
data
);
AppCenterService
.
notifyMessage
({
name
:
"DictOption"
,
action
:
'appRefresh'
,
data
:
data
});
this
.
$nextTick
(()
=>
{
this
.
formState
.
next
({
type
:
'save'
,
data
:
data
});
...
...
app_web/src/widgets/dict-option/main-grid/main-grid-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -8,7 +8,7 @@
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
:cell-class-name="getCellClassName"
:height="isEnablePagingBar
&&
items.length > 0 ? 'calc(100% -
50px)' : '100%'"
max-height="items.length > 0 ? 'calc(100%-
50px)' : '100%'"
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
...
...
@@ -644,6 +644,14 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof MainBase
*/
@
Prop
()
public
opendata
:
any
;
/**
* 是否嵌入关系界面
*
* @type {boolean}
* @memberof MainBase
*/
@
Prop
({
default
:
false
})
public
isformDruipart
?:
boolean
;
/**
* 显示处理提示
...
...
@@ -1969,7 +1977,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
this
.
$emit
(
'save'
,
successItems
);
this
.
refresh
([]);
if
(
errorItems
.
length
===
0
){
if
(
errorItems
.
length
===
0
&&
successItems
.
length
>
0
&&
!
this
.
isformDruipart
){
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
app_web/src/widgets/dict-option/main-grid/main-grid.less
浏览文件 @
5da9c8b2
...
...
@@ -67,13 +67,14 @@
}
}
.el-table__header-wrapper{
display: contents;
}
.el-table__body-wrapper{
height: auto !important;
min-height: 45px;
max-height: 100px;
height: auto;
}
.el-table__footer-wrapper{
display: contents;
min-height: 45px;
max-height: 100px;
height: auto;
}
}
.grid-pagination {
...
...
app_web/src/widgets/dict-option/options-grid/options-grid-base.vue
浏览文件 @
5da9c8b2
...
...
@@ -8,7 +8,7 @@
:highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
:cell-class-name="getCellClassName"
:height="isEnablePagingBar
&&
items.length > 0 ? 'calc(100% -
50px)' : '100%'"
max-height="items.length > 0 ? 'calc(100%-
50px)' : '100%'"
@row-click="rowClick($event)"
@select-all="selectAll($event)"
@select="select($event)"
...
...
@@ -632,6 +632,14 @@ export default class OptionsBase extends Vue implements ControlInterface {
* @memberof OptionsBase
*/
@
Prop
()
public
opendata
:
any
;
/**
* 是否嵌入关系界面
*
* @type {boolean}
* @memberof OptionsBase
*/
@
Prop
({
default
:
false
})
public
isformDruipart
?:
boolean
;
/**
* 显示处理提示
...
...
@@ -1949,7 +1957,7 @@ export default class OptionsBase extends Vue implements ControlInterface {
}
this
.
$emit
(
'save'
,
successItems
);
this
.
refresh
([]);
if
(
errorItems
.
length
===
0
){
if
(
errorItems
.
length
===
0
&&
successItems
.
length
>
0
&&
!
this
.
isformDruipart
){
this
.
$Notice
.
success
({
title
:
''
,
desc
:
(
this
.
$t
(
'app.commonWords.saveSuccess'
)
as
string
)
});
}
else
{
errorItems
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
app_web/src/widgets/dict-option/options-grid/options-grid.less
浏览文件 @
5da9c8b2
...
...
@@ -67,13 +67,14 @@
}
}
.el-table__header-wrapper{
display: contents;
}
.el-table__body-wrapper{
height: auto !important;
min-height: 45px;
max-height: 100px;
height: auto;
}
.el-table__footer-wrapper{
display: contents;
min-height: 45px;
max-height: 100px;
height: auto;
}
}
.grid-pagination {
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录