提交 7c55fb53 编写于 作者: zcdtk's avatar zcdtk

表单与搜索表单代码整理

上级 579d42e4
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<div class="app-form-item-button" v-show="detailsModel.${item.name}.visible"> <div class="app-form-item-button" v-show="detailsModel.${item.name}.visible">
<nut-button v-if="detailsModel.${item.name}.visible" class="app-form-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style='<#if item.getHeight() gt 0>height: ${item.getHeight()}px;</#if>'>${item.caption}</nut-button> <nut-button
v-if="detailsModel.${item.name}.visible"
class="app-form-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"
style='<#if item.getHeight() gt 0>height: ${item.getHeight()}px;</#if>'>${item.caption}</nut-button>
</div> </div>
</#if> </#if>
\ No newline at end of file
<#ibizinclude>../../@NAVPARAMS/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<#assign dritem = item.getPSDEDRItem() /> <#assign dritem = item.getPSDEDRItem() />
<#assign refView = item.getPSAppView() /> <#assign refView = item.getPSAppView() />
<#assign appDataEntity = refView.getPSAppDataEntity()/> <#assign appDataEntity = refView.getPSAppDataEntity()/>
<app-form-druipart <app-form-druipart
<#if item.getPSSysCss?? && item.getPSSysCss()??>class="${item.getPSSysCss().getCssName()}"</#if> class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'
:formState="formState" parameterName='${appde.getCodeName()?lower_case}'
refviewtype='<#if refView.getPSViewType()??>${refView.getPSViewType().getId()}</#if>'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
viewname='${srffilepath2(refView.codeName)}'
paramItem='<#if item.getParamItem()??>${item.getParamItem()}<#else>${appde.getCodeName()?lower_case}</#if>' paramItem='<#if item.getParamItem()??>${item.getParamItem()}<#else>${appde.getCodeName()?lower_case}</#if>'
style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%;</#if><#if item.getContentHeight() == 0><#if refView.getHeight() gt 0>height:${refView.getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px;</#if>"
:formState="formState"
:parentdata='<#if dritem.getParentDataJO?? && dritem.getParentDataJO()??>${dritem.getParentDataJO()}<#else>{}</#if>' :parentdata='<#if dritem.getParentDataJO?? && dritem.getParentDataJO()??>${dritem.getParentDataJO()}<#else>{}</#if>'
:parameters="[ :parameters="[
<#if refView.getPSAppDERSPathCount() gt 0> <#if refView.getPSAppDERSPathCount() gt 0>
...@@ -19,13 +25,9 @@ ${item.render.code} ...@@ -19,13 +25,9 @@ ${item.render.code}
]" ]"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
parameterName='${appde.getCodeName()?lower_case}' :navigateContext ='<@getNavigateContext item />'
refviewtype='<#if refView.getPSViewType()??>${refView.getPSViewType().getId()}</#if>' :navigateParam ='<@getNavigateParams item />'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
:ignorefieldvaluechange="ignorefieldvaluechange" :ignorefieldvaluechange="ignorefieldvaluechange"
viewname='${srffilepath2(refView.codeName)}'
:data="JSON.stringify(this.data)" :data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)" @drdatasaved="drdatasaved($event)"/>
style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%;</#if><#if item.getContentHeight() == 0><#if refView.getHeight() gt 0>height:${refView.getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px;</#if>">
</app-form-druipart>
</#if> </#if>
...@@ -5,10 +5,35 @@ ...@@ -5,10 +5,35 @@
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-form-item ref="${item.name}rules" :checkValue="this.data.${item.name}" v-show="detailsModel.${item.name}.visible" name='${item.name}' :itemRules="this.rules.${item.name}" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??> labelStyle="${item.getLabelPSSysCss().getCssName()}"</#if> :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" uiStyle="${item.getDetailStyle()}" :labelWidth="${item.getLabelWidth()?c}" :isShowCaption="${item.isShowCaption()?c}" :error="detailsModel.${item.name}.error" :isEmptyCaption="${item.isEmptyCaption()?c}" labelPos="${item.getLabelPos()}"> <app-form-item
name='${item.name}'
class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'
<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>
labelStyle="${item.getLabelPSSysCss().getCssName()}"
</#if>
uiStyle="${item.getDetailStyle()}"
labelPos="${item.getLabelPos()}"
ref="${item.name}_item"
:itemValue="this.data.${item.name}"
v-show="detailsModel.${item.name}.visible"
:itemRules="this.rules.${item.name}"
:caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>"
:labelWidth="${item.getLabelWidth()?c}"
:isShowCaption="${item.isShowCaption()?c}"
:error="detailsModel.${item.name}.error"
:isEmptyCaption="${item.isEmptyCaption()?c}">
<#if item.isCompositeItem()> <#if item.isCompositeItem()>
<#assign formitems=item.getPSDEFormItems()> <#assign formitems=item.getPSDEFormItems()>
<app-range-editor v-model="data.${item.name}" :activeData="data" :disabled="detailsModel.${item.name}.disabled" name="${item.name}" editorType="${item.getEditorType()}" format="${item.getEditorParam("TIMEFMT","")}" :refFormItem="[<#list formitems as formitem><#if formitem_index gt 0>,</#if>'${formitem.name}'</#list>]" @formitemvaluechange="onFormItemValueChange" style="${item.getEditorCssStyle()}"></app-range-editor> <app-range-editor
name="${item.name}"
editorType="${item.getEditorType()}"
format="${item.getEditorParam("TIMEFMT","")}"
style="${item.getEditorCssStyle()}"
v-model="data.${item.name}"
:activeData="data"
:disabled="detailsModel.${item.name}.disabled"
:refFormItem="[<#list formitems as formitem><#if formitem_index gt 0>,</#if>'${formitem.name}'</#list>]"
@formitemvaluechange="onFormItemValueChange"/>
<#else> <#else>
${P.getEditorCode(item, "EDITOR.vue").code} ${P.getEditorCode(item, "EDITOR.vue").code}
</#if> </#if>
......
...@@ -4,7 +4,18 @@ ...@@ -4,7 +4,18 @@
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-form-group v-show="detailsModel.${item.name}.visible" 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}"> <app-form-group
class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'
layoutType='<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>'
titleStyle='<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>'
uiStyle="${item.getDetailStyle()}"
v-show="detailsModel.${item.name}.visible"
:uiActionGroup="detailsModel.${item.name}.uiActionGroup"
:caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>"
:isShowCaption="${item.isShowCaption()?c}"
:titleBarCloseMode="${item.getTitleBarCloseMode()}"
:isInfoGroupMode="${item.isInfoGroupMode()?c}"
@groupuiactionclick="groupUIActionClick($event)">
<#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> <#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>
<#assign content> <#assign content>
<#list item.getPSDEFormDetails() as formmenber> <#list item.getPSDEFormDetails() as formmenber>
......
<div v-show="detailsModel.${item.name}.visible" :style="{height:${item.getContentHeight()}px;}"><iframe src='${item.getIFrameUrl()}'></iframe></div> <div v-show="detailsModel.${item.name}.visible" :style="{height:${item.getContentHeight()}px;}">
<iframe src='${item.getIFrameUrl()}'></iframe>
</div>
...@@ -10,6 +10,12 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -10,6 +10,12 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/**
* 工作流审批意见控件绑定值
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() srfwfmemo?: string;
/** /**
* 获取多项数据 * 获取多项数据
...@@ -473,19 +479,10 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -473,19 +479,10 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected formValidateStatus(): boolean { protected formValidateStatus(): boolean {
<#-- const form: any = this.$refs.${ctrl.name}; const refArr: Array<string> = [<#list ctrl.getPSDEFormItems() as formItem><#if formItem.getEditorType?? && formItem.getEditorType() != 'HIDDEN'>'${formItem.getName()}_item', </#if></#list>];
let validatestate: boolean = true; let falg = true;
form.validate((valid: boolean) => { refArr.forEach((item: any) => {
validatestate = valid ? true : false; if (this.$refs[item] && (this.$refs[item] as any).validateRules && !(this.$refs[item] as any).validateRules()) {
}); -->
return this.cheackRules();
}
public cheackRules() :boolean{
let refArr: Array<string> = [<#list ctrl.getAllPSDEFormDetails() as formdetail><#if formdetail.getDetailType?? && formdetail.getDetailType() == 'FORMITEM'>"${formdetail.getName()}rules",</#if></#list>];
let falg = true ;
refArr.forEach((item:any) => {
if(this.$refs[item] && (this.$refs[item] as any).checkRule && !(this.$refs[item] as any).checkRule()){
falg = false; falg = false;
} }
}); });
...@@ -820,7 +817,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -820,7 +817,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/ */
private async load(opt: any = {}): Promise<any> { private async load(opt: any = {}): Promise<any> {
if (!this.loadAction) { if (!this.loadAction) {
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'loadAction'+ this.$t('app.notConfig')); this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+'loadAction'+ this.$t('app.notConfig'));
return Promise.reject(); return Promise.reject();
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -848,7 +845,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -848,7 +845,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/ */
protected async loadDraft(opt: any = {}): Promise<any> { protected async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) { if (!this.loaddraftAction) {
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'loaddraftAction'+ this.$t('app.notConfig')); this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+'loaddraftAction'+ this.$t('app.notConfig'));
return Promise.reject(); return Promise.reject();
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
...@@ -892,7 +889,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -892,7 +889,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if (!action) { if (!action) {
let actionName: any = Object.is(data.srfuf, '1') ? "updateAction" : "createAction"; let actionName: any = Object.is(data.srfuf, '1') ? "updateAction" : "createAction";
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+actionName+ this.$t('app.notConfig')); this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+actionName+ this.$t('app.notConfig'));
return Promise.reject(); return Promise.reject();
} }
Object.assign(arg, this.viewparams); Object.assign(arg, this.viewparams);
...@@ -955,7 +952,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -955,7 +952,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if (!action) { if (!action) {
let actionName: any = Object.is(data.srfuf, '1') ? "updateAction" : "createAction"; let actionName: any = Object.is(data.srfuf, '1') ? "updateAction" : "createAction";
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+actionName+ this.$t('app.notConfig')); this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+actionName+ this.$t('app.notConfig'));
return Promise.reject(); return Promise.reject();
} }
Object.assign(arg, this.viewparams); Object.assign(arg, this.viewparams);
...@@ -979,7 +976,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -979,7 +976,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
}); });
<#if ctrl.getFormFuncMode()?lower_case != 'wizardform'> <#if ctrl.getFormFuncMode()?lower_case != 'wizardform'>
if (showResultInfo) { if (showResultInfo) {
this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;保存成功!'); this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;'+ this.$t('app.message.savedSuccess'));
} }
</#if> </#if>
} else if (response && response.status !== 401) { } else if (response && response.status !== 401) {
...@@ -1004,7 +1001,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1004,7 +1001,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/ */
private async remove(opt: Array<any> = [], showResultInfo?: boolean): Promise<any> { private async remove(opt: Array<any> = [], showResultInfo?: boolean): Promise<any> {
if (!this.removeAction) { if (!this.removeAction) {
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'removeAction'+ this.$t('app.notConfig')); this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+'removeAction'+ this.$t('app.notConfig'));
return Promise.reject(); return Promise.reject();
} }
const arg: any = opt[0]; const arg: any = opt[0];
...@@ -1016,7 +1013,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1016,7 +1013,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$emit('remove', data); this.$emit('remove', data);
this.formState.next({ type: 'remove', data: data }); this.formState.next({ type: 'remove', data: data });
this.data.ismodify = false; this.data.ismodify = false;
this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;删除成功!'); this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;'+ this.$t('app.message.deleteSccess'));
} else if (response && response.status !== 401) { } else if (response && response.status !== 401) {
const { error: _data } = response; const { error: _data } = response;
this.$notice.error(_data.message); this.$notice.error(_data.message);
...@@ -1034,10 +1031,6 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1034,10 +1031,6 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected async wfstart(data: any): Promise<any> { protected async wfstart(data: any): Promise<any> {
if (!this.WFStartAction) {
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'WFStartAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const _this: any = this; const _this: any = this;
const arg: any = { ...data }; const arg: any = { ...data };
Object.assign(arg, this.viewparams); Object.assign(arg, this.viewparams);
...@@ -1055,25 +1048,26 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1055,25 +1048,26 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* *
* @protected * @protected
* @param {*} data * @param {*} data
* @param {*} linkItem
* @param {*} datas
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected async wfsubmit(data: any): Promise<any> { protected async wfsubmit(data: any, linkItem: any, datas: any): Promise<any> {
if (!this.WFSubmitAction) {
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'WFSubmitAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const _this: any = this;
const arg: any = { ...data }; const arg: any = { ...data };
Object.assign(arg, this.viewparams); Object.assign(arg, this.viewparams, linkItem);
const response: any = this.service.wfsubmit(this.WFSubmitAction, { ...this.context }, arg, this.showBusyIndicator); // 强制补充srfwfmemo
if (this.srfwfmemo) {
Object.assign(datas, { srfwfmemo: this.srfwfmemo });
}
const response: any = await this.service.wfsubmit(this.currentAction, { ...this.context }, datas, this.showBusyIndicator, arg);
if (response && response.status === 200) { if (response && response.status === 200) {
this.$notice.success('工作流提交成功'); this.$notice.success('工作流提交成功');
} else if (response && response.status !== 401) { } else if (response && response.status !== 401) {
this.$notice.error('工作流提交失败, ' + response.error.message); this.$notice.error('工作流提交失败, ' + response.error.message);
}
return response; return response;
} }
}
</#if> </#if>
/** /**
...@@ -1136,67 +1130,55 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1136,67 +1130,55 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
/** /**
* 保存并退出 * 保存并退出
* *
* @param {any[]} args * @protected
* @param {any[]} data
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected saveAndExit(data:any[]):Promise<any>{ protected async saveAndExit(data: any[]): Promise<any> {
let _this = this; const arg: any = { ...data[0] };
return new Promise((resolve: any, reject: any) =>{ this.currentAction = 'saveAndExit';
let arg: any = {}; const response: any = await this.save([arg]);
Object.assign(arg,data[0]); if (response && response.status === 200) {
_this.currentAction = "saveAndExit"; this.closeView([{ ...response.data }]);
_this.save([arg]).then((res) =>{
if(res){
_this.closeView(res.data);
} }
resolve(res); return response;
}).catch((error) =>{
reject(error);
})
})
} }
/** /**
* 保存并新建 * 保存并新建
* *
* @param {any[]} args * @protected
* @param {any[]} data
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected saveAndNew(data:any[]):Promise<any>{ protected async saveAndNew(data: any[]): Promise<any> {
let _this = this; let arg: any = { ...data[0] };
return new Promise((resolve: any, reject: any) =>{ this.currentAction = 'saveAndNew';
let arg: any = {}; const response: any = await this.save([arg]);
Object.assign(arg,data[0]); if (response && response.status === 200) {
_this.currentAction = "saveAndNew"; this.ResetData(response.data);
_this.save([arg]).then((res) =>{ this.loadDraft({});
_this.ResetData(res); }
_this.loadDraft({}); return response;
}).catch((error) =>{
reject(error);
})
})
} }
/** /**
* 删除并退出 * 删除并退出
* *
* @param {any[]} args * @protected
* @param {any[]} data
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected removeAndExit(data:any[]):Promise<any>{ protected async removeAndExit(data: any[]): Promise<any> {
let _this = this; let arg: any = { ...data[0] };
return new Promise((resolve: any, reject: any) =>{ const response: any = await this.remove([arg]);
let arg: any = {}; if (response && response.status === 200) {
Object.assign(arg,data[0]); this.closeView([{ ...response.data }]);
_this.remove([arg]).then((res) =>{
if(res){
_this.closeView(res.data);
} }
resolve(res); return response;
}).catch((error) =>{
reject(error);
})
})
} }
/** /**
......
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<div class="app-form-item-button" v-show="detailsModel.${item.name}.visible"> <div class="app-form-item-button" v-show="detailsModel.${item.name}.visible">
<nut-button v-if="detailsModel.${item.name}.visible" class="app-form-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style='<#if item.getHeight() gt 0>height: ${item.getHeight()}px;</#if>'>${item.caption}</nut-button> <nut-button
v-if="detailsModel.${item.name}.visible"
class="app-form-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"
style='<#if item.getHeight() gt 0>height: ${item.getHeight()}px;</#if>'>${item.caption}</nut-button>
</div> </div>
</#if> </#if>
\ No newline at end of file
<#ibizinclude>../../@NAVPARAMS/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../../@NAVPARAMS/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<#assign dritem = item.getPSDEDRItem() /> <#assign dritem = item.getPSDEDRItem() />
<#assign refView = item.getPSAppView() /> <#assign refView = item.getPSAppView() />
<#assign appDataEntity = refView.getPSAppDataEntity()/> <#assign appDataEntity = refView.getPSAppDataEntity()/>
<app-form-druipart <app-form-druipart
<#if item.getPSSysCss?? && item.getPSSysCss()??>class="${item.getPSSysCss().getCssName()}"</#if> class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'
:formState="formState" parameterName='${appde.getCodeName()?lower_case}'
refviewtype='<#if refView.getPSViewType()??>${refView.getPSViewType().getId()}</#if>'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
viewname='${srffilepath2(refView.codeName)}'
paramItem='<#if item.getParamItem()??>${item.getParamItem()}<#else>${appde.getCodeName()?lower_case}</#if>' paramItem='<#if item.getParamItem()??>${item.getParamItem()}<#else>${appde.getCodeName()?lower_case}</#if>'
style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%;</#if><#if item.getContentHeight() == 0><#if refView.getHeight() gt 0>height:${refView.getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px;</#if>"
:formState="formState"
:parentdata='<#if dritem.getParentDataJO?? && dritem.getParentDataJO()??>${dritem.getParentDataJO()}<#else>{}</#if>' :parentdata='<#if dritem.getParentDataJO?? && dritem.getParentDataJO()??>${dritem.getParentDataJO()}<#else>{}</#if>'
:parameters="[ :parameters="[
<#if refView.getPSAppDERSPathCount() gt 0> <#if refView.getPSAppDERSPathCount() gt 0>
...@@ -20,15 +25,9 @@ ${item.render.code} ...@@ -20,15 +25,9 @@ ${item.render.code}
]" ]"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
parameterName='${appde.getCodeName()?lower_case}'
:navigateContext ='<@getNavigateContext item />' :navigateContext ='<@getNavigateContext item />'
:navigateParam ='<@getNavigateParams item />' :navigateParam ='<@getNavigateParams item />'
refviewtype='<#if refView.getPSViewType()??>${refView.getPSViewType().getId()}</#if>'
refreshitems='<#if item.getRefreshItems()??>${item.getRefreshItems()}</#if>'
:ignorefieldvaluechange="ignorefieldvaluechange" :ignorefieldvaluechange="ignorefieldvaluechange"
viewname='${srffilepath2(refView.codeName)}'
:data="JSON.stringify(this.data)" :data="JSON.stringify(this.data)"
@drdatasaved="drdatasaved($event)" @drdatasaved="drdatasaved($event)"/>
style="<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX">height: 100%;</#if><#if item.getContentHeight() == 0><#if refView.getHeight() gt 0>height:${refView.getHeight()?c}px</#if><#else>height:${item.getContentHeight()?c}px;</#if>">
</app-form-druipart>
</#if> </#if>
...@@ -4,7 +4,18 @@ ...@@ -4,7 +4,18 @@
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-form-group v-show="detailsModel.${item.name}.visible" 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}"> <app-form-group
class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if>'
layoutType='<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>'
titleStyle='<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>'
uiStyle="${item.getDetailStyle()}"
v-show="detailsModel.${item.name}.visible"
:uiActionGroup="detailsModel.${item.name}.uiActionGroup"
:caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>"
:isShowCaption="${item.isShowCaption()?c}"
:titleBarCloseMode="${item.getTitleBarCloseMode()}"
:isInfoGroupMode="${item.isInfoGroupMode()?c}"
@groupuiactionclick="groupUIActionClick($event)">
<#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> <#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>
<#assign content> <#assign content>
<#list item.getPSDEFormDetails() as formmenber> <#list item.getPSDEFormDetails() as formmenber>
......
<div v-show="detailsModel.${item.name}.visible" :style="{height:${item.getContentHeight()}px;}"><iframe src='${item.getIFrameUrl()}'></iframe></div> <div v-show="detailsModel.${item.name}.visible" :style="{height:${item.getContentHeight()}px;}">
<iframe src='${item.getIFrameUrl()}'></iframe>
</div>
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
<#assign import_block> <#assign import_block>
import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail'; import { FormButtonModel, FormPageModel, FormItemModel, FormDRUIPartModel, FormPartModel, FormGroupPanelModel, FormIFrameModel, FormRowItemModel, FormTabPageModel, FormTabPanelModel, FormUserControlModel } from '@/model/form-detail';
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
<#if view.getViewType?? && view.getViewType() ?? && view.getViewType()=='DEMOBWFDYNAEDITVIEW'>
import { toastController, alertController } from '@ionic/core';
</#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册