提交 d434ac00 编写于 作者: Mosher's avatar Mosher

update:更新

上级 225f6fe1
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :disHover="true" :padding="0" :bordered="false"> <card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if> <#if !view.hasPSControl('toolbar')> view-no-toolbar</#if>' :disHover="true" :padding="0" :bordered="false">
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl ../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude> </#ibizinclude>
<div slot="extra"> <div slot="extra">
<div class='toolbar-container'> <div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600" v-for="(linkItem, index) in linkModel" :key="index"> <tooltip :transfer="true" :max-width="600" v-for="(linkItem, index) in linkModel" :key="index">
...@@ -14,5 +14,48 @@ ...@@ -14,5 +14,48 @@
</tooltip> </tooltip>
</div> </div>
</div> </div>
<div class="content-container">
<#if view.getPSControls?? && view.getPSControls()??>
<#list view.getPSControls() as singleControl>
<#if singleControl.getControlType?? && singleControl.getControlType()?? && singleControl.getControlType() == 'DRTAB'>
<tabs :animated="false" name="${singleControl.codeName?lower_case}" class="content-container__drtab">
<tab-pane tab="${singleControl.codeName?lower_case}" label="<#if singleControl.getEditItemCaption?? && singleControl.getEditItemCaption()??>${singleControl.getEditItemCaption()}<#else>activeForm.logicName</#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>
</tab-pane>
<#if singleControl.getPSDEDRTabPages?? && singleControl.getPSDEDRTabPages()??>
<#list singleControl.getPSDEDRTabPages() as tabPage>
<tab-pane tab="${singleControl.codeName?lower_case}" label="${tabPage.getCaption()}" name="${tabPage.name}">
TODO 视图
</tab-pane>
</#list>
</#if>
</tabs>
</#if>
</#list>
</#if>
</div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -19,13 +19,24 @@ ...@@ -19,13 +19,24 @@
* @memberof ${srfclassname('${view.codeName}')}Base * @memberof ${srfclassname('${view.codeName}')}Base
*/ */
public allForm: any = { public allForm: any = {
<#if view.getAllPSControls?? && view.getAllPSControls()??> <#if view.getAllPSControls?? && view.getAllPSControls()??>
<#list view.getAllPSControls() as singleControl> <#list view.getAllPSControls() as singleControl>
<#if singleControl.getControlType?? && singleControl.getControlType()?? && singleControl.getControlType() == "FORM"> <#if singleControl.getControlType?? && singleControl.getControlType()?? && singleControl.getControlType() == "FORM">
"${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> "${singleControl.getName()}": {
</#if> 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> </#list>
</#if> </#if>
}; };
/** /**
...@@ -34,16 +45,46 @@ ...@@ -34,16 +45,46 @@
* @memberof ${srfclassname('${view.codeName}')}Base * @memberof ${srfclassname('${view.codeName}')}Base
*/ */
public viewRefData:any = { public viewRefData:any = {
<#if view.getPSAppViewRefs?? && view.getPSAppViewRefs()??> <#if view.getPSAppViewRefs?? && view.getPSAppViewRefs()??>
<#list view.getPSAppViewRefs() as viewRef> <#list view.getPSAppViewRefs() as viewRef>
<#if viewRef.getName?? && viewRef.getName()?? && viewRef.getRefPSAppView?? && viewRef.getRefPSAppView()??> <#if viewRef.getName?? && viewRef.getName()?? && viewRef.getRefPSAppView?? && viewRef.getRefPSAppView()??>
<#assign refAppView = viewRef.getRefPSAppView() /> <#assign refAppView = viewRef.getRefPSAppView() />
"${viewRef.getName()}":{viewname:"${srffilepath2(refAppView.getCodeName())}",title:this.$t("<#if refAppView.getPSAppDataEntity()??>entities.${refAppView.getPSAppDataEntity().getCodeName()?lower_case}.views.${refAppView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${refAppView.getCodeName()?lower_case}.caption</#if>"), width: <#if refAppView.getWidth?? && refAppView.getWidth() gt 0>${refAppView.getWidth()?c}<#else>800</#if>, height: <#if refAppView.getHeight?? && refAppView.getHeight() gt 0>${refAppView.getHeight()?c}<#else>500</#if>}<#if viewRef_has_next>,</#if> "${viewRef.getName()}":{viewname:"${srffilepath2(refAppView.getCodeName())}",title:this.$t("<#if refAppView.getPSAppDataEntity()??>entities.${refAppView.getPSAppDataEntity().getCodeName()?lower_case}.views.${refAppView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${refAppView.getCodeName()?lower_case}.caption</#if>"), width: <#if refAppView.getWidth?? && refAppView.getWidth() gt 0>${refAppView.getWidth()?c}<#else>800</#if>, height: <#if refAppView.getHeight?? && refAppView.getHeight() gt 0>${refAppView.getHeight()?c}<#else>500</#if>}<#if viewRef_has_next>,</#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
}; };
/**
* form 部件 load 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public form_load($event: any, $event2?: any) {
}
/**
* form 部件 save 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public form_save($event: any, $event2?: any) {
}
/**
* form 部件 remove 事件
*
* @param {*} [args={}]
* @param {*} $event
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public form_remove($event: any, $event2?: any) {
}
/** /**
* 获取工具栏按钮 * 获取工具栏按钮
* *
...@@ -59,9 +100,9 @@ ...@@ -59,9 +100,9 @@
this.appEntityService.GetWFLink(JSON.parse(JSON.stringify(this.context)),datas,true).then((response:any) =>{ this.appEntityService.GetWFLink(JSON.parse(JSON.stringify(this.context)),datas,true).then((response:any) =>{
if (response && response.status === 200) { if (response && response.status === 200) {
this.linkModel = response.data; this.linkModel = response.data;
if(response.headers && response.headers['process-form']){ if (response.headers && response.headers['process-form']) {
this.computeActivedForm(response.headers['process-form']); this.computeActivedForm(response.headers['process-form']);
}else{ } else {
this.computeActivedForm(null); this.computeActivedForm(null);
} }
resolve(response.data); resolve(response.data);
...@@ -84,14 +125,14 @@ ...@@ -84,14 +125,14 @@
* *
* @memberof ${srfclassname('${view.codeName}')}Base * @memberof ${srfclassname('${view.codeName}')}Base
*/ */
public computeActivedForm(inputForm:any){ public computeActivedForm(inputForm:any) {
if(!inputForm){ if (!inputForm) {
this.activeForm = this.allForm && Object.values(this.allForm)[0]; this.activeForm = this.allForm && Object.values(this.allForm)[0];
return; return;
} }
if(this.allForm && Object.keys(this.allForm).length >0){ if (this.allForm && Object.keys(this.allForm).length > 0) {
Object.keys(this.allForm).forEach((name:string) =>{ Object.keys(this.allForm).forEach((name:string) =>{
<#noparse>if(Object.is(name,`wfform_${inputForm.toLowerCase()}`)){</#noparse> <#noparse>if (Object.is(name,`wfform_${inputForm.toLowerCase()}`)) {</#noparse>
this.activeForm = this.allForm[name]; this.activeForm = this.allForm[name];
} }
}) })
...@@ -103,7 +144,7 @@ ...@@ -103,7 +144,7 @@
* *
* @memberof ${srfclassname('${view.codeName}')}Base * @memberof ${srfclassname('${view.codeName}')}Base
*/ */
public dynamic_toolbar_click(linkItem:any, $event:any){ public dynamic_toolbar_click(linkItem:any, $event:any) {
let datas: any[] = []; let datas: any[] = [];
let xData: any = this.$refs.form; let xData: any = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) { if (xData.getDatas && xData.getDatas instanceof Function) {
...@@ -115,7 +156,6 @@ ...@@ -115,7 +156,6 @@
return; return;
} }
const { data: _data } = response; const { data: _data } = response;
if (this.viewdata) { if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]); this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close'); this.$emit('close');
...@@ -124,27 +164,30 @@ ...@@ -124,27 +164,30 @@
} }
}); });
} }
if(linkItem && linkItem.sequenceflowview && <#noparse>this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`]</#noparse>){ if (linkItem && linkItem.sequenceflowview && <#noparse>this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`]</#noparse>) {
let tempContext:any = Util.deepCopy(this.context); let tempContext:any = Util.deepCopy(this.context);
Object.assign(tempContext,{${appde.getCodeName()?lower_case}:datas && datas[0].srfkey}); Object.assign(tempContext,{${appde.getCodeName()?lower_case}:datas && datas[0].srfkey});
let tempViewParam:any = {actionView:linkItem.sequenceflowview,actionForm:linkItem.sequenceflowform}; let tempViewParam:any = {actionView:linkItem.sequenceflowview,actionForm:linkItem.sequenceflowform};
let targetView:any = <#noparse>this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`];</#noparse> 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), height: targetView.height, width: targetView.width}, tempContext,tempViewParam); const appmodal = this.$appmodal.openModal({ viewname: targetView.viewname, title: (this.$t(targetView.title) as string), height: targetView.height, width: targetView.width}, tempContext, tempViewParam);
appmodal.subscribe((result: any) => { appmodal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) { if (!result || !Object.is(result.ret, 'OK')) {
return; return;
} }
let tempSubmitData:any = Util.deepCopy(datas); let tempSubmitData:any = Util.deepCopy(datas);
tempSubmitData.forEach((element:any) => { tempSubmitData.forEach((element: any) => {
Object.assign(element,result.datas && result.datas[0]); Object.assign(element, result.datas && result.datas[0]);
}); });
submit(tempSubmitData,linkItem); submit(tempSubmitData, linkItem);
}); });
}else{ } else {
submit(datas,linkItem); submit(datas, linkItem);
} }
} }
</#assign>
<#assign mounted_block>
this.getWFLinkModel();
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/VIEW-BASE.vue.ftl ../@MACRO/VIEW-BASE.vue.ftl
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册