Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
f797cd88
提交
f797cd88
编写于
8月 11, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
补充表单按钮权限
上级
41670877
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
26 行增加
和
2 行删除
+26
-2
CONTROL-BASE.vue#DETAIL_BUTTON.ftl
@CONTROL/表单/CONTROL-BASE.vue#DETAIL_BUTTON.ftl
+1
-1
CONTROL-BASE.vue#DETAIL_MODEL.ftl
@CONTROL/表单/CONTROL-BASE.vue#DETAIL_MODEL.ftl
+1
-1
CONTROL-BASE.vue.ftl
@CONTROL/表单/CONTROL-BASE.vue.ftl
+24
-0
未找到文件。
@CONTROL/表单/CONTROL-BASE.vue#DETAIL_BUTTON.ftl
浏览文件 @
f797cd88
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
${item.render.code}
${item.render.code}
<#else>
<#else>
<@badge item>
<@badge item>
<i-button type="primary" @click="${item.getName()}_click($event)"<#if item.getPSSysCss?? && item.getPSSysCss()??> class="${item.getPSSysCss().getCssName()}"</#if>
<i-button type="primary"
:disabled="detailsModel.${item.getName()}.disabled"
@click="${item.getName()}_click($event)"<#if item.getPSSysCss?? && item.getPSSysCss()??> class="${item.getPSSysCss().getCssName()}"</#if>
style="<#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if>">
style="<#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if>">
<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)><i class="${img.getCssClass()}" style="margin-right: 2px;"></i></#if></#if>
<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)><i class="${img.getCssClass()}" style="margin-right: 2px;"></i></#if></#if>
<#if item.isShowCaption()><span ><#if item.getCaptionItemName()?? && item.getCaptionItemName()?length gt 0>{{data.${item.getCaptionItemName()}}}<#else><#if langbase??>{{$t('${langbase}.details.${item.name}')}}<#else>${item.getCaption()}</#if></#if></span></#if>
<#if item.isShowCaption()><span ><#if item.getCaptionItemName()?? && item.getCaptionItemName()?length gt 0>{{data.${item.getCaptionItemName()}}}<#else><#if langbase??>{{$t('${langbase}.details.${item.name}')}}<#else>${item.getCaption()}</#if></#if></span></#if>
...
...
@CONTROL/表单/CONTROL-BASE.vue#DETAIL_MODEL.ftl
浏览文件 @
f797cd88
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: <#if item.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, isShowCaption: ${item.isShowCaption()?c}, form: this, isControlledContent: <#if item.getShowMoreMode?? && item.getShowMoreMode()?? && item.getShowMoreMode() == 1>true<#else>false</#if> </#assign>
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: <#if item.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, isShowCaption: ${item.isShowCaption()?c}, form: this, isControlledContent: <#if item.getShowMoreMode?? && item.getShowMoreMode()?? && item.getShowMoreMode() == 1>true<#else>false</#if> </#assign>
<#if item.getDetailType() == 'BUTTON'>
<#if item.getDetailType() == 'BUTTON'>
new FormButtonModel({ ${detail},disabled: false<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}',
new FormButtonModel({ ${detail},disabled: false<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}',
tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>,
noprivdisplaymode:<#if uiaction.getNoPrivDisplayMode(view)??>${uiaction.getNoPrivDisplayMode(view)}</#if>,dataaccaction:'<#if uiaction.getDataAccessAction()??>${uiaction.getDataAccessAction()}</#if>', actiontarget: '${uiaction.getActionTarget()}'</#if>
}</#if> })
tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>,
actiontarget: '${uiaction.getActionTarget()}'</#if><#if uiaction.getNoPrivDisplayMode(view)??>,noprivdisplaymode:${uiaction.getNoPrivDisplayMode(view)}</#if><#if uiaction.getDataAccessAction()??>,dataaccaction:'${uiaction.getDataAccessAction()}'</#if>,visabled: true,disabled: false
}</#if> })
<#elseif item.getDetailType() == 'DRUIPART'>
<#elseif item.getDetailType() == 'DRUIPART'>
new FormDRUIPartModel({ ${detail} })
new FormDRUIPartModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMITEM'>
<#elseif item.getDetailType() == 'FORMITEM'>
...
...
@CONTROL/表单/CONTROL-BASE.vue.ftl
浏览文件 @
f797cd88
...
@@ -730,6 +730,26 @@ import schema from 'async-validator';
...
@@ -730,6 +730,26 @@ import schema from 'async-validator';
this.data[name] = value;
this.data[name] = value;
}
}
/**
* 计算表单按钮权限状态
*
* @param {*} [data] 传入数据
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
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;
}
})
}
}
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#list ctrl.getAllPSDEFormDetails() as formdetail>
<#if formdetail.getDetailType?? && formdetail.getDetailType() == 'BUTTON'>
<#if formdetail.getDetailType?? && formdetail.getDetailType() == 'BUTTON'>
<#if formdetail.getActionType?? && formdetail.getActionType()??>
<#if formdetail.getActionType?? && formdetail.getActionType()??>
...
@@ -1024,6 +1044,7 @@ import schema from 'async-validator';
...
@@ -1024,6 +1044,7 @@ import schema from 'async-validator';
const data = response.data;
const data = response.data;
this.onFormLoad(data,'load');
this.onFormLoad(data,'load');
this.$emit('load', data);
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
this.formState.next({ type: 'load', data: data });
});
});
...
@@ -1074,6 +1095,7 @@ import schema from 'async-validator';
...
@@ -1074,6 +1095,7 @@ import schema from 'async-validator';
</#list>
</#list>
data.${appde.getCodeName()?lower_case} = null;
data.${appde.getCodeName()?lower_case} = null;
this.$emit('load', data);
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
this.formState.next({ type: 'load', data: data });
});
});
...
@@ -1131,6 +1153,7 @@ import schema from 'async-validator';
...
@@ -1131,6 +1153,7 @@ import schema from 'async-validator';
const data = response.data;
const data = response.data;
this.onFormLoad(data,'autoSave');
this.onFormLoad(data,'autoSave');
this.$emit('save', data);
this.$emit('save', data);
this.computeButtonState(data);
<#if ctrl.getControlType() == 'FORM'>
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
</#if>
...
@@ -1217,6 +1240,7 @@ import schema from 'async-validator';
...
@@ -1217,6 +1240,7 @@ import schema from 'async-validator';
const data = response.data;
const data = response.data;
this.onFormLoad(data,'save');
this.onFormLoad(data,'save');
this.$emit('save', data);
this.$emit('save', data);
this.computeButtonState(data);
<#if ctrl.getControlType() == 'FORM'>
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
</#if>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录