Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
5d5560d9
提交
5d5560d9
编写于
7月 08, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
工具栏操作标识权限
上级
43ffbe34
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
70 行增加
和
59 行删除
+70
-59
edit-view-engine.ts
src/engine/view/edit-view-engine.ts
+16
-56
list-view-engine.ts
src/engine/view/list-view-engine.ts
+3
-3
md-view-engine.ts
src/engine/view/md-view-engine.ts
+18
-0
view-engine.ts
src/engine/view/view-engine.ts
+33
-0
未找到文件。
src/engine/view/edit-view-engine.ts
浏览文件 @
5d5560d9
...
@@ -106,6 +106,7 @@ export default class EditViewEngine extends ViewEngine {
...
@@ -106,6 +106,7 @@ export default class EditViewEngine extends ViewEngine {
this
.
setTabCaption
(
this
.
view
.
model
.
dataInfo
,
Object
.
is
(
arg
.
srfuf
,
'0'
));
this
.
setTabCaption
(
this
.
view
.
model
.
dataInfo
,
Object
.
is
(
arg
.
srfuf
,
'0'
));
const
newdata
:
boolean
=
!
Object
.
is
(
arg
.
srfuf
,
'1'
);
const
newdata
:
boolean
=
!
Object
.
is
(
arg
.
srfuf
,
'1'
);
this
.
calcToolbarItemState
(
newdata
);
this
.
calcToolbarItemState
(
newdata
);
this
.
calcToolbarItemAuthState
(
this
.
transformData
(
arg
));
}
}
/**
/**
...
@@ -120,6 +121,7 @@ export default class EditViewEngine extends ViewEngine {
...
@@ -120,6 +121,7 @@ export default class EditViewEngine extends ViewEngine {
this
.
setTabCaption
(
this
.
view
.
model
.
dataInfo
,
Object
.
is
(
arg
.
srfuf
,
'0'
));
this
.
setTabCaption
(
this
.
view
.
model
.
dataInfo
,
Object
.
is
(
arg
.
srfuf
,
'0'
));
const
newdata
:
boolean
=
!
Object
.
is
(
arg
.
srfuf
,
'1'
);
const
newdata
:
boolean
=
!
Object
.
is
(
arg
.
srfuf
,
'1'
);
this
.
calcToolbarItemState
(
newdata
);
this
.
calcToolbarItemState
(
newdata
);
this
.
calcToolbarItemAuthState
(
this
.
transformData
(
arg
));
this
.
view
.
$emit
(
'save'
,
arg
);
this
.
view
.
$emit
(
'save'
,
arg
);
this
.
view
.
$emit
(
'viewdataschange'
,
JSON
.
stringify
({
action
:
'save'
,
status
:
'success'
,
data
:
arg
}));
this
.
view
.
$emit
(
'viewdataschange'
,
JSON
.
stringify
({
action
:
'save'
,
status
:
'success'
,
data
:
arg
}));
}
}
...
@@ -144,66 +146,10 @@ export default class EditViewEngine extends ViewEngine {
...
@@ -144,66 +146,10 @@ export default class EditViewEngine extends ViewEngine {
* @memberof EditViewEngine
* @memberof EditViewEngine
*/
*/
public
doSysUIAction
(
tag
:
string
,
actionmode
?:
string
):
void
{
public
doSysUIAction
(
tag
:
string
,
actionmode
?:
string
):
void
{
// if (Object.is(tag, 'Help')) {
// this.doHelp();
// return;
// }
// if (Object.is(tag, 'SaveAndStart')) {
// this.doSaveAndStart();
// return;
// }
// if (Object.is(tag, 'SaveAndExit')) {
// this.doSaveAndExit();
// return;
// }
// if (Object.is(tag, 'SaveAndNew')) {
// this.doSaveAndNew();
// return;
// }
if
(
Object
.
is
(
tag
,
'Save'
))
{
if
(
Object
.
is
(
tag
,
'Save'
))
{
this
.
doSave
();
this
.
doSave
();
return
;
return
;
}
}
// if (Object.is(tag, 'Print')) {
// this.doPrint();
// return;
// }
// if (Object.is(tag, 'Copy')) {
// this.doCopy();
// return;
// }
// if (Object.is(tag, 'RemoveAndExit')) {
// this.doRemoveAndExit();
// return;
// }
// if (Object.is(tag, 'Refresh')) {
// this.doRefresh();
// return;
// }
// if (Object.is(tag, 'New')) {
// this.doNew();
// return;
// }
// if (Object.is(tag, 'FirstRecord')) {
// this.doMoveToRecord('first');
// return;
// }
// if (Object.is(tag, 'PrevRecord')) {
// this.doMoveToRecord('prev');
// return;
// }
// if (Object.is(tag, 'NextRecord')) {
// this.doMoveToRecord('next');
// return;
// }
// if (Object.is(tag, 'LastRecord')) {
// this.doMoveToRecord('last');
// return;
// }
// if (Object.is(tag, 'Exit') || Object.is(tag, 'Close')) {
// this.doExit();
// return;
// }
super
.
doSysUIAction
(
tag
,
actionmode
);
super
.
doSysUIAction
(
tag
,
actionmode
);
}
}
...
@@ -263,4 +209,18 @@ export default class EditViewEngine extends ViewEngine {
...
@@ -263,4 +209,18 @@ export default class EditViewEngine extends ViewEngine {
}
}
}
}
/**
* 转化数据
*
* @memberof EditViewEngine
*/
public
transformData
(
arg
:
any
){
if
(
!
this
.
getForm
()
||
!
(
this
.
getForm
().
transformData
instanceof
Function
)){
return
null
;
}
let
targetData
:
any
=
{};
this
.
getForm
().
transformData
(
arg
,
targetData
);
return
targetData
;
}
}
}
\ No newline at end of file
src/engine/view/list-view-engine.ts
浏览文件 @
5d5560d9
...
@@ -150,9 +150,9 @@ export default class ListViewEngine extends MDViewEngine {
...
@@ -150,9 +150,9 @@ export default class ListViewEngine extends MDViewEngine {
arg
.
srfkeys
=
keys
;
arg
.
srfkeys
=
keys
;
}
}
const
grid
:
any
=
this
.
getMDCtrl
();
const
list
:
any
=
this
.
getMDCtrl
();
if
(
grid
)
{
if
(
list
)
{
grid
.
remove
(
arg
);
list
.
remove
(
arg
);
}
}
}
}
...
...
src/engine/view/md-view-engine.ts
浏览文件 @
5d5560d9
...
@@ -358,6 +358,9 @@ export default class MDViewEngine extends ViewEngine {
...
@@ -358,6 +358,9 @@ export default class MDViewEngine extends ViewEngine {
}
}
const
state
=
args
.
length
>
0
&&
!
Object
.
is
(
args
[
0
].
srfkey
,
''
)
?
false
:
true
;
const
state
=
args
.
length
>
0
&&
!
Object
.
is
(
args
[
0
].
srfkey
,
''
)
?
false
:
true
;
this
.
calcToolbarItemState
(
state
);
this
.
calcToolbarItemState
(
state
);
if
(
args
&&
args
.
length
>
0
){
this
.
calcToolbarItemAuthState
(
this
.
transformData
(
args
[
0
]));
}
}
}
/**
/**
...
@@ -436,4 +439,19 @@ export default class MDViewEngine extends ViewEngine {
...
@@ -436,4 +439,19 @@ export default class MDViewEngine extends ViewEngine {
return
this
.
propertypanel
;
return
this
.
propertypanel
;
}
}
/**
* 转化数据
*
* @memberof EditViewEngine
*/
public
transformData
(
arg
:
any
){
if
(
!
this
.
getMDCtrl
()
||
!
(
this
.
getMDCtrl
().
transformData
instanceof
Function
)){
return
null
;
}
let
targetData
:
any
=
{};
this
.
getMDCtrl
().
transformData
(
arg
,
targetData
);
return
targetData
;
}
}
}
\ No newline at end of file
src/engine/view/view-engine.ts
浏览文件 @
5d5560d9
...
@@ -169,7 +169,40 @@ export default class ViewEngine {
...
@@ -169,7 +169,40 @@ export default class ViewEngine {
if
(
_item
.
uiaction
&&
(
Object
.
is
(
_item
.
uiaction
.
target
,
'SINGLEKEY'
)
||
Object
.
is
(
_item
.
uiaction
.
target
,
'MULTIKEY'
)))
{
if
(
_item
.
uiaction
&&
(
Object
.
is
(
_item
.
uiaction
.
target
,
'SINGLEKEY'
)
||
Object
.
is
(
_item
.
uiaction
.
target
,
'MULTIKEY'
)))
{
_item
.
disabled
=
state
;
_item
.
disabled
=
state
;
}
}
if
(
_item
.
noprivdisplaymode
&&
_item
.
noprivdisplaymode
===
6
){
_item
.
visabled
=
false
;
}
}
}
}
}
/**
* 计算工具栏权限状态
*
* @param {boolean} state
* @param {*} [dataaccaction]
* @memberof ViewEngine
*/
public
calcToolbarItemAuthState
(
data
:
any
){
const
_this
:
any
=
this
;
for
(
const
key
in
_this
.
view
.
toolBarModels
)
{
if
(
!
_this
.
view
.
toolBarModels
.
hasOwnProperty
(
key
))
{
return
;
}
const
_item
=
_this
.
view
.
toolBarModels
[
key
];
if
(
_item
&&
_item
[
'dataaccaction'
]
&&
_this
.
view
.
appAuthService
){
let
dataActionResult
:
any
=
_this
.
view
.
appAuthService
.
getOPPrivs
(
data
)[
'dataaccaction'
];
// 无权限:0;有权限:1
if
(
!
dataActionResult
){
// 禁用:1;隐藏:2;隐藏且默认隐藏:6
if
(
_item
.
noprivdisplaymode
===
1
){
_item
.
disabled
=
false
;
}
if
((
_item
.
noprivdisplaymode
===
2
)
||
(
_item
.
noprivdisplaymode
===
6
)){
_item
.
visabled
=
false
;
}
}
}
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录