提交 9871185b 编写于 作者: tony001's avatar tony001

基础班master 合并到 PLUS版dev

上级 fd960423
......@@ -98,20 +98,21 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
public wfstart(action: string,context: any = {},data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading);
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.Create(context,data, isloading);
result = this.appEntityService.WFStart(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
......@@ -129,20 +130,21 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {*} [localdata]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
public wfsubmit(action: string,context: any = {}, data: any = {}, isloading?: boolean,localdata?:any): Promise<any> {
data = this.handleWFData(data,true);
context = this.handleRequestData(action,context,data).context;
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](context,data, isloading);
result = _appEntityService[action](context,data, isloading,localdata);
} else {
result = this.appEntityService.Create(context,data, isloading);
result = this.appEntityService.WFSubmit(context,data, isloading,localdata);
}
result.then((response) => {
this.handleResponse(action, response);
......
......@@ -6,6 +6,24 @@
<tab-pane :index="${tabviewpanel_index}" name='${tabviewpanel.name}' tab='${ctrl.name}' class='<#if tabviewpanel.getPSSysCss?? && tabviewpanel.getPSSysCss()??>${tabviewpanel.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{
return h('div', [
<#if tabviewpanel.getPSSysImage()??>
<#assign sysimage = tabviewpanel.getPSSysImage()/>
<#if sysimage.getImagePath() == "">
h('i',{
class:'${sysimage.getCssClass()}',
style:{
'margin-right' : '2px'
}
}),
<#else>
h('img',{
src:'${sysimage.getImagePath()}',
style:{
'margin-right' : '2px'
}
}),
</#if>
</#if>
h('span', '${tabviewpanel.getCaption()}'),
h('Badge', {
props: {
......
......@@ -328,8 +328,9 @@
datas.forEach((data: any) => {
keys.push(data.srfkey);
});
let _removeAction = keys.length > 1 ? 'removeBatch' : this.removeAction ;
const context:any = JSON.parse(JSON.stringify(this.context));
const post: Promise<any> = this.service.delete(this.removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
const post: Promise<any> = this.service.delete(_removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
......
......@@ -450,8 +450,9 @@
_datas.forEach((data: any) => {
keys.push(data.srfkey);
});
let _removeAction = keys.length > 1 ? 'removeBatch' : this.removeAction ;
const context:any = JSON.parse(JSON.stringify(this.context));
const post: Promise<any> = this.service.delete(this.removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
const post: Promise<any> = this.service.delete(_removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
......
......@@ -4,8 +4,7 @@
<#if item.render??>
${item.render.code}
<#else>
<app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}">
<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)><i class="${img.getCssClass()}" style="margin-right: 2px;position: absolute;top: -51px;left: 60px;"></i></#if></#if>
<app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}" <#if item.getPSSysImage()??>:iconInfo="{<#assign img=item.getPSSysImage()><#if img.getImagePath() == "">'iconclass':'${img.getCssClass()}'<#else>'iconpath':'${img.getImagePath()}'</#if>}"</#if>>
<#assign content>
<#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())>
......
......@@ -62,7 +62,7 @@
<#-- BEGIN:数据列 -->
<el-table-column show-overflow-tooltip :prop="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}"</#if> :align="'${item.getAlign()?lower_case}'"<#if (!ctrl.isNoSort()) && item.isEnableSort()> :sortable="'custom'"</#if>>
<template v-slot="{row,column}">
<#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>
<#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()>
<#-- BEGIN:列绘制、前端绘制代码表、行编辑 -->
<#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>
<#-- BEGIN:行编辑 -->
......@@ -119,14 +119,14 @@
<app-column-link deKeyField='<#if dataview.isPSDEView()>${dataview.getPSAppDataEntity().getCodeName()?lower_case}</#if>' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{<#compress><#if appLinkView??>${appLinkView}</#if></#compress>}" valueitem="<#if item.getLinkValueItem()??>${item.getLinkValueItem()}</#if>">
<#-- BEGIN:常规显示 -->
<#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??>
<app-span editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :value="row.${item.getName()?lower_case}"></app-span>
<app-span name='${item.name}' editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :value="row.${item.getName()?lower_case}"></app-span>
<#else>
<span>{{row.${item.getName()?lower_case}}}</span>
</#if>
</app-column-link>
<#else>
<#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??>
<app-span editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :value="row.${item.getName()?lower_case}"></app-span>
<app-span name='${item.name}' editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :value="row.${item.getName()?lower_case}"></app-span>
<#else>
<#if item.getValueFormat()?? && item.getValueFormat() != "%1$s">
<app-format-data format="${item.getValueFormat()}" :data="row.${item.getName()?lower_case}"></app-format-data>
......
......@@ -585,8 +585,9 @@ import CodeListService from "@service/app/codelist-service";
_datas.forEach((data: any) => {
keys.push(data.srfkey);
});
let _removeAction = keys.length > 1 ? 'removeBatch' : this.removeAction ;
const context:any = JSON.parse(JSON.stringify(this.context));
const post: Promise<any> = this.service.delete(this.removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
const post: Promise<any> = this.service.delete(_removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
......
......@@ -582,8 +582,9 @@ import CodeListService from "@service/app/codelist-service";
_datas.forEach((data: any) => {
keys.push(data.srfkey);
});
let _removeAction = keys.length > 1 ? 'removeBatch' : this.removeAction ;
const context:any = JSON.parse(JSON.stringify(this.context));
const post: Promise<any> = this.service.delete(this.removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
const post: Promise<any> = this.service.delete(_removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator);
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
......
......@@ -8,4 +8,4 @@ ${P.getCtrlCode('grid', 'CONTROL.html').code}
</#assign>
<#ibizinclude>
./VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
<div class="view-container ${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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div>
\ No newline at end of file
......@@ -5,4 +5,4 @@
</#assign>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
......@@ -5,4 +5,4 @@
</#assign>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
<div class="view-container ${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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<div class="content-container">
......
<div class="view-container ${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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<div class="content-container">
......
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.ivu-split-horizontal{
.ivu-split-pane >div{
height: 100%;
overflow-y: auto;
.content-container{
height: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin: 0;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
}
}
\ No newline at end of file
<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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
<split id="${view.getCodeName()?lower_case}" v-model="split" mode="horizontal">
<div slot='left'>
<el-tree ref="tree" :data="wfStepModel" node-key="userTaskId" :highlight-current="true" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</div>
<div slot="right">
<div class="content-container">
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('grid')>
${P.getCtrlCode('grid', 'CONTROL.html').code}
</#if>
</div>
</div>
</split>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEWFDYNAEXPGRIDVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
<div slot="extra">
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600" v-for="(linkItem, index) in linkModel" :key="index">
<i-button @click="dynamic_toolbar_click(linkItem, $event)">
<span class='caption'>{{linkItem.sequenceFlowName}}</span>
</i-button>
<div slot='content'>{{linkItem.sequenceFlowName}}</div>
</tooltip>
</div>
</div>
<div class="content-container">
<#if view.hasPSControl('form')>
<@ibizindent blank=8>
${P.getCtrlCode('form', 'CONTROL.html').code}
</@ibizindent>
</#if>
</div>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEWFDYNAEDITVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' :disHover="true" :padding="0" :bordered="false">
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEWFDYNAEDITVIEW3
\ No newline at end of file
<div class="view-container ${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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card<#if !view.isShowCaptionBar()> view-no-caption</#if>' dis-hover :padding="0" :bordered="false">
<@ibizindent blank=8>
......
<div class="view-container ${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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
</div>
\ No newline at end of file
......@@ -5,4 +5,4 @@
</#assign>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
......@@ -7,4 +7,4 @@
</#assign>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
......@@ -9,4 +9,4 @@
</#assign>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
<div class='view-container ${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.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card' dis-hover :bordered="false">
<#ibizinclude>
......
<span v-html="data.${editor.name}"></span>
\ No newline at end of file
EDITORTYPE=HTMLEDITOR#INFO
\ No newline at end of file
<app-upload-file-info name='${editor.name}' :value="data.${editor.name}" style="${editor.getEditorCssStyle()}"></app-upload-file-info>
\ No newline at end of file
<app-upload-file-info name='${editor.name}' :value="row[column.property]" style="${editor.getEditorCssStyle()}"></app-upload-file-info>
\ No newline at end of file
<app-span <#t>
name='${editor.name}'
:value="data.${editor.name}" <#t>
<#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList() />
......
<app-span <#t>
name='${editor.name}'
:value="data.${editor.name}" <#t>
<#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList() />
......
<span v-html="data.${item.getViewFieldName()?lower_case}"></span>
\ No newline at end of file
......@@ -14,7 +14,18 @@
if (!xData || !(xData.wfstart instanceof Function)) {
return;
}
<#if view.getPSWorkflow()??>
<#assign curWorkflow = view.getPSWorkflow() />
<#-- 通过是否使用代理模式来区分流程启动的模式 -->
<#if curWorkflow.isUseWFProxyApp()>
xData.wfstart(args).then((response: any) => {
<#else>
let localdata:any = {processDefinitionKey:null};
xData.wfstart(args,localdata).then((response: any) => {
</#if>
<#else>
xData.wfstart(args).then((response: any) => {
</#if>
if (!response || response.status !== 200) {
return;
}
......@@ -25,6 +36,8 @@
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
\ No newline at end of file
<#ibizinclude>
../../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<#macro getres tempView>
<#compress>
<#if tempView.getPSAppDataEntity?? && tempView.getPSAppDataEntity()?? && tempView.getPSAppDataEntity().getMajorPSAppDERSs?? && tempView.getPSAppDataEntity().getMajorPSAppDERSs()??>
<#assign appDataEneity = tempView.getPSAppDataEntity() />
<#if appDataEneity.getMajorPSAppDERSs?? && appDataEneity.getMajorPSAppDERSs()??>
[<#list appDataEneity.getMajorPSAppDERSs() as psDes><#if !P.exists("importService", psDes.getMajorPSAppDataEntity().getId(), "")>'${psDes.getMajorPSAppDataEntity().getCodeName()}'</#if></#list>]
</#if>
</#if>
</#compress>
</#macro>
<#if item.getPSViewLogic?? && item.getPSViewLogic()??>
<#assign viewlogic = item.getPSViewLogic()/>
/**
......@@ -17,7 +27,47 @@
<#if viewlogic.isEnableWizardAdd()>
this.$Notice.warning({ title: '错误', desc: '向导添加未实现' });
<#elseif viewlogic.isEnableBatchAdd()>
this.$Notice.warning({ title: '错误', desc: '支持批添加未实现' });
<#-- 批量添加 -->
<#if viewlogic.getBatchAddPSAppViews?? && viewlogic.getBatchAddPSAppViews()??>
<#assign batchAddPSAppViews = viewlogic.getBatchAddPSAppViews()/>
const batchAddPSAppViews=[
<#list batchAddPSAppViews as batchAddPSAppView>
{view:{viewname:'${srffilepath2(batchAddPSAppView.getCodeName())}',height: ${batchAddPSAppView.getHeight()?c},width: ${batchAddPSAppView.getWidth()?c},title: '${batchAddPSAppView.title}'},
res:<@getres tempView=batchAddPSAppView />}<#if batchAddPSAppView_has_next>,</#if>
</#list>
];
</#if>
if(batchAddPSAppViews.length == 0 || !this.context.srfparentdename){
this.$Notice.warning({ title: '错误', desc: '批量添加需添加N:N关系' });
return;
}
let openViewModel:any = batchAddPSAppViews.find((item:any) =>{
return (item.res && (item.res[0] !== this.context.srfparentdename));
})
let container: Subject<any> = this.$appmodal.openModal(openViewModel.view, JSON.parse(JSON.stringify(this.context)), args[0]);
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
if(result.datas && result.datas.length == 0){
return;
}
let requestParam:Array<any> = [];
result.datas.forEach((record:any) => {
record[this.appEntityService.APPDEKEY] = this.context['srfparentkey'];
requestParam.push(record);
});
this.appEntityService.createBatch(JSON.parse(JSON.stringify(this.context)),requestParam,true).then((response:any) =>{
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '批处理操作失败' });
return;
}
if (!xData || !(xData.refresh instanceof Function)) {
return;
}
xData.refresh(result.datas);
});
});
<#elseif viewlogic.isBatchAddOnly()>
this.$Notice.warning({ title: '错误', desc: '只支持批添加未实现' });
<#elseif viewlogic.getNewDataPSAppView()??>
......
......@@ -128,7 +128,11 @@
const _this: any = this;
const openIndexViewTab = (data: any) => {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, curViewParam, deResParameters, parameters, args, data);
<#if dataview.getViewType() == "DEWFDYNAEDITVIEW" >
this.$router.push(routePath+'?userTaskId='+this.viewparams.userTaskId);
<#else>
this.$router.push(routePath);
</#if>
}
openIndexViewTab(data);
<#elseif dataview.getOpenMode() == 'POPUPAPP'>
......
<#assign self_content>
/**
* 分割宽度
*
* @type {number}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected split: number = 0.2;
/**
* 树导航栏数据
*
* @type {any}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected wfStepModel: Array<any> = [];
/**
* 是否展开搜索表单
*
* @type {any}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected isExpandSearchForm:boolean = true;
/**
* 是否单选
*
* @type {any}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected isSingleSelect:boolean = true;
/**
* 左侧树的默认配置
*
* @type {any}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected defaultProps:any ={
children: 'children',
label: 'userTaskName'
};
/**
* 左侧树当前选中节点
*
* @type {any}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected curSelectedNode:any;
/**
* 获取树导航栏数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected getWFStepModel():Promise<any>{
return new Promise((resolve:any, reject:any) =>{
this.appEntityService.WFGetWFStep().then((response:any) =>{
if (response && response.status === 200) {
this.wfStepModel = response.data;
if(this.wfStepModel && this.wfStepModel.length > 0){
this.curSelectedNode = this.wfStepModel[0];
}
Object.assign(this.viewparams,{'userTaskId':this.curSelectedNode['userTaskId'],'processDefinitionKey':this.curSelectedNode['processDefinitionKey']});
this.setTreeNodeHighLight(this.curSelectedNode);
resolve(response.data);
}
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
});
})
}
/**
* 左侧树选中节点
*
* @type {any}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected handleNodeClick(data:any) {
this.curSelectedNode = data;
this.setTreeNodeHighLight(this.curSelectedNode);
Object.assign(this.viewparams,{'userTaskId':data['userTaskId'],'processDefinitionKey':data['processDefinitionKey']});
(this.$refs.searchform as any).onSearch();
}
/**
* 设置选中高亮
*
* @param {*} data
* @memberof ${srfclassname('${view.codeName}')}Base
*/
protected setTreeNodeHighLight(data: any): void {
this.$nextTick(() =>{
const tree: any = this.$refs.tree;
tree.setCurrentKey(data.userTaskId);
})
}
</#assign>
<#ibizinclude>
../@MACRO/VIEW-BASE.vue.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEWFDYNAEXPGRIDVIEW
\ No newline at end of file
<#assign self_content>
/**
* 工具栏模型数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public linkModel:Array<any> = [];
/**
* 获取工具栏按钮
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
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;
resolve(response.data);
}
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
});
});
}
/**
* 动态工具栏点击
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public dynamic_toolbar_click(linkItem:any, $event:any){
let datas: any[] = [];
let xData: any = this.$refs.form;
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;
if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close');
} else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
</#assign>
<#ibizinclude>
../@MACRO/VIEW-BASE.vue.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEWFDYNAEDITVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW-BASE.vue.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEWFDYNAEDITVIEW3
\ No newline at end of file
......@@ -83,10 +83,55 @@ const mockDatas: Array<any> = [
</#if>
];
//getwflink
mock.onGet(new RegExp(/^\/wfcore\/${app.getPSSystem().getCodeName()?lower_case}-app-${app.getCodeName()?lower_case}\/${srfpluralize(item.codeName)?lower_case}\/[a-zA-Z0-9\-\;]+\/usertasks\/[a-zA-Z0-9\-\;]+\/ways$/)).reply((config: any) => {
console.groupCollapsed("实体:${item.codeName?lower_case} 方法: getwflink");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status,[
{"sequenceFlowId":"dfdsfdsfdsfdsfds","sequenceFlowName":"同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddlfldldfldsfds","refViewKey":""},
{"sequenceFlowId":"ddssdfdfdfdfsfdf","sequenceFlowName":"不同意",
"taskId":"aaaaddddccccddddd","processDefinitionKey":"support-workorders-approve-v1",
"processInstanceId":"ddfdsldlfdlldsf","refViewKey":"workorder_ltform_editview"}
]];
});
// getwfstep
mock.onGet(new RegExp(/^\/wfcore\/${app.getPSSystem().getCodeName()?lower_case}-app-${app.getCodeName()?lower_case}\/${srfpluralize(item.codeName)?lower_case}\/process-definitions-nodes$/)).reply((config: any) => {
console.groupCollapsed("实体:${item.codeName?lower_case} 方法: getwfstep");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
}
return [status, [
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-dfdfd",
"userTaskName":"待审",
"cnt":0,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"
},
{"userTaskId":"sddfddfd-dfdf-fdfd-fdf-87927",
"userTaskName":"待分配",
"cnt":3,
"processDefinitionKey":"support-workorders-approve-v1",
"processDefinitionName":"工单审批流程v1"}
]];
});
// createBatch
mock.onPost(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:${item.codeName?lower_case} 方法: createBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
......@@ -98,6 +143,7 @@ mock.onPost(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/batch$/)).
mock.onPut(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:${item.codeName?lower_case} 方法: updateBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
......@@ -109,6 +155,7 @@ mock.onPut(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/batch$/)).r
mock.onDelete(new RegExp(/^\/${srfpluralize(item.codeName)?lower_case}\/batch$/)).reply((config: any) => {
console.groupCollapsed("实体:${item.codeName?lower_case} 方法: removeBatch");
console.table({url:config.url, method: config.method, data:config.data});
console.groupEnd();
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, {}];
......
......@@ -438,6 +438,8 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
this.APPDEKEY = '${item.getKeyPSAppDEField().getCodeName()?lower_case}';
this.APPDENAME = '${srfpluralize(item.codeName)?lower_case}';
this.APPDETEXT = '<#if item.getMajorPSAppDEField?? && item.getMajorPSAppDEField()??>${item.getMajorPSAppDEField().getCodeName()?lower_case}</#if>';
this.APPNAME = '${app.getCodeName()?lower_case}';
this.SYSTEMNAME = '${app.getPSSystem().getCodeName()?lower_case}';
}
// 实体接口
......
*2020-4-29*
## v7.0.0-alpha.2 [2020-5-7]
### Bug修复
分页导航栏添加图标配置
### 功能新增及优化
#### 模板
表格文件上传信息显示
批添加、批删除
实体工作流动态视图
实体工作流动态导航表格视图
富文本信息模式
更新默认值
#### 基础文件
表格文件上传信息显示
实体工作流动态视图
实体工作流动态导航表格视图
## v7.0.0-alpha.1 [2020-4-29]
初始化文件
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册