Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
9c892670
提交
9c892670
编写于
11月 12, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整实体工作流动态编辑视图逻辑
上级
91feb5aa
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
99 行增加
和
22 行删除
+99
-22
CONTROL-BASE.vue.ftl
@CONTROL/表单/CONTROL-BASE.vue.ftl
+11
-0
VIEW.vue.ftl
@CONTROL/视图布局面板/实体工作流动态编辑视图/VIEW.vue.ftl
+24
-5
VIEW-BASE.vue.ftl
@VIEW/实体工作流动态编辑视图/VIEW-BASE.vue.ftl
+64
-17
未找到文件。
@CONTROL/表单/CONTROL-BASE.vue.ftl
浏览文件 @
9c892670
...
...
@@ -40,6 +40,14 @@ import { Environment } from '@/environments/environment';
*/
public formKeyItemName: string = '<#list ctrl.getPSDEFormItems() as formitem><#if formitem.getPSAppDEField?? && formitem.getPSAppDEField()??><#if !formitem.isHidden() && formitem.getPSAppDEField().isKeyField()>${formitem.getName()}</#if></#if></#list>';
/**
* 是否自动加载
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop({default:false}) public isautoload?:boolean;
/**
* 界面UI服务对象
*
...
...
@@ -1001,6 +1009,9 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterCreated(){
if(this.isautoload){
this.autoLoad({srfkey:this.context.documentcenter});
}
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
...
...
@CONTROL/视图布局面板/实体工作流动态编辑视图/VIEW.vue.ftl
浏览文件 @
9c892670
...
...
@@ -15,11 +15,29 @@
</div>
</div>
<div class="content-container">
<#if view.hasPSControl('form')>
<@ibizindent blank=8>
${P.getCtrlCode('form', 'CONTROL.html').code}
</@ibizindent>
</#if>
<component
:is="activeForm.name"
:isautoload="true"
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="activeForm.showBusyIndicator"
:updateAction="activeForm.updateAction"
:removeAction="activeForm.removeAction"
:loaddraftAction="activeForm.loaddraftAction"
:loadAction="activeForm.loadAction"
:createAction="activeForm.createAction"
:WFSubmitAction="activeForm.WFSubmitAction"
:WFStartAction="activeForm.WFStartAction"
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</component>
</div>
</card>
</div>
\ No newline at end of file
@VIEW/实体工作流动态编辑视图/VIEW-BASE.vue.ftl
浏览文件 @
9c892670
...
...
@@ -6,6 +6,13 @@
*/
public linkModel:Array<any> = [];
/**
* 激活表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public activeForm:any = {};
/**
* 所有表单数据
*
...
...
@@ -15,7 +22,7 @@
<#if view.getAllPSControls?? && view.getAllPSControls()??>
<#list view.getAllPSControls() as singleControl>
<#if singleControl.getControlType?? && singleControl.getControlType()?? && singleControl.getControlType() != "TOOLBAR">
"${singleControl.getName()}":{name:"view_${singleControl.getName()}",
loadAction:"<#if singleControl.getGetPSControlAction()?? && singleControl.getGetPSControlAction().getPSAppDEMethod()??>${singleControl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",
autosave:"${singleControl.isEnableAutoSave()?c}",showBusyIndicator:"${singleControl.isShowBusyIndicator()?c}",updateAction:"<#if singleControl.getUpdatePSControlAction()?? && singleControl.getUpdatePSControlAction().getPSAppDEMethod()??>${singleControl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",removeAction:"<#if singleControl.getRemovePSControlAction()?? && singleControl.getRemovePSControlAction().getPSAppDEMethod()??>${singleControl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",loaddraftAction:"<#if singleControl.getGetDraftPSControlAction()?? && singleControl.getGetDraftPSControlAction().getPSAppDEMethod()??>${singleControl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",loadAction:"<#if singleControl.getGetPSControlAction()?? && singleControl.getGetPSControlAction().getPSAppDEMethod()??>${singleControl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",createAction:"<#if singleControl.getCreatePSControlAction()?? && singleControl.getCreatePSControlAction().getPSAppDEMethod()??>${singleControl.getCreatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",WFSubmitAction:"<#if singleControl.getWFSubmitPSControlAction()?? && singleControl.getWFSubmitPSControlAction().getPSAppDEMethod()??>${singleControl.getWFSubmitPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",WFStartAction:"<#if singleControl.getWFStartPSControlAction()?? && singleControl.getWFStartPSControlAction().getPSAppDEMethod()??>${singleControl.getWFStartPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"}<#if singleControl_has_next>,</#if>
"${singleControl.getName()}":{name:"view_${singleControl.getName()}",autosave:"${singleControl.isEnableAutoSave()?c}",showBusyIndicator:"${singleControl.isShowBusyIndicator()?c}",updateAction:"<#if singleControl.getUpdatePSControlAction()?? && singleControl.getUpdatePSControlAction().getPSAppDEMethod()??>${singleControl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",removeAction:"<#if singleControl.getRemovePSControlAction()?? && singleControl.getRemovePSControlAction().getPSAppDEMethod()??>${singleControl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",loaddraftAction:"<#if singleControl.getGetDraftPSControlAction()?? && singleControl.getGetDraftPSControlAction().getPSAppDEMethod()??>${singleControl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",loadAction:"<#if singleControl.getGetPSControlAction()?? && singleControl.getGetPSControlAction().getPSAppDEMethod()??>${singleControl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",createAction:"<#if singleControl.getCreatePSControlAction()?? && singleControl.getCreatePSControlAction().getPSAppDEMethod()??>${singleControl.getCreatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",WFSubmitAction:"<#if singleControl.getWFSubmitPSControlAction()?? && singleControl.getWFSubmitPSControlAction().getPSAppDEMethod()??>${singleControl.getWFSubmitPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",WFStartAction:"<#if singleControl.getWFStartPSControlAction()?? && singleControl.getWFStartPSControlAction().getPSAppDEMethod()??>${singleControl.getWFStartPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"}<#if singleControl_has_next>,</#if>
</#if>
</#list>
</#if>
...
...
@@ -45,16 +52,17 @@
public getWFLinkModel():Promise<any>{
return new Promise((resolve:any, reject:any) =>{
let datas: any[] = [];
let xData: any = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(Object.keys(this.viewparams).length > 0){
Object.assign(datas,{'taskDefinitionKey':this.viewparams.userTaskId});
}
this.appEntityService.GetWFLink(JSON.parse(JSON.stringify(this.context)),datas,true).then((response:any) =>{
if (response && response.status === 200) {
this.linkModel = response.data;
if(response.headers && response.headers['process-form']){
this.computeActivedForm(response.headers['process-form']);
}else{
this.computeActivedForm(null);
}
resolve(response.data);
}
}).catch((response: any) => {
...
...
@@ -70,6 +78,24 @@
});
}
/**
* 计算激活表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public computeActivedForm(inputForm:any){
if(!inputForm){
this.activeForm = this.allForm;
}
if(this.allForm && Object.keys(this.allForm).length >0){
Object.keys(this.allForm).forEach((name:string) =>{
if(Object.is(name,`wfform_${inputForm.toLowerCase()}`)){
this.activeForm = this.allForm[name];
}
})
}
}
/**
* 动态工具栏点击
*
...
...
@@ -81,19 +107,40 @@
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
xData.wfsubmit(datas,linkItem).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
const submit:Function = (submitData:any,linkItem:any) =>{
xData.wfsubmit(submitData,linkItem).then((response: any) => {
if (!response || response.status !== 200) {
return;
}
const { data: _data } = response;
if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close');
} else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close');
} else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
if(linkItem && linkItem.sequenceflowview && <#noparse>this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`]</#noparse>){
let tempContext:any = Util.deepCopy(this.context);
Object.assign(tempContext,{documentcenter:datas && datas[0].srfkey});
let tempViewParam:any = {actionView:linkItem.sequenceflowview,actionForm:linkItem.sequenceflowform};
let targetView:any = <#noparse>this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`];</#noparse>
const appmodal = this.$appmodal.openModal({viewname:targetView.viewname,title:(this.$t(targetView.title) as string)}, tempContext,tempViewParam);
appmodal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
let tempSubmitData:any = Util.deepCopy(datas);
tempSubmitData.forEach((element:any) => {
Object.assign(element,result.datas && result.datas[0]);
});
submit(tempSubmitData,linkItem);
});
}else{
submit(datas,linkItem);
}
}
</#assign>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录