提交 45a6ddff 编写于 作者: tony001's avatar tony001

Merge branch 'dev'

上级 98d3c4a5
...@@ -3,7 +3,7 @@ import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-pr ...@@ -3,7 +3,7 @@ import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-pr
import { CreateElement } from 'vue'; import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs'; import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control'; import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util,ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service'; import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service"; import AppCenterService from "@service/app/app-center-service";
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??> <#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
...@@ -18,17 +18,20 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co ...@@ -18,17 +18,20 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
import ${srfclassname('${appde.getCodeName()}')}Service from '@/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service'; import ${srfclassname('${appde.getCodeName()}')}Service from '@/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service';
</#if> </#if>
import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-service'; import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-service';
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??> <#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as uiAction> <#list ctrl.getPSUIActions() as uiAction>
<#if uiAction.getPSAppDataEntity()??> <#if uiAction.getPSAppDataEntity()??>
<#assign curAppEntity = uiAction.getPSAppDataEntity()/> <#assign curAppEntity = uiAction.getPSAppDataEntity()/>
<#if !P.exists("importService", curAppEntity.getId(), "")> <#if !P.exists("importService", curAppEntity.getId(), "") >
import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service'; import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service';
<#if appde?? && (curAppEntity.getId() == appde.getId())><#assign hasAppDE = true /></#if>
</#if> </#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#if appde?? && !hasAppDE??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#-- 语言资源入口 --> <#-- 语言资源入口 -->
<#ibizinclude> <#ibizinclude>
./LANGBASE.vue.ftl ./LANGBASE.vue.ftl
...@@ -188,6 +191,21 @@ ${P.getLogicCode(logic, "LOGIC.vue").code} ...@@ -188,6 +191,21 @@ ${P.getLogicCode(logic, "LOGIC.vue").code}
${P.getLogicCode(uiAction, "LOGIC.vue").code} ${P.getLogicCode(uiAction, "LOGIC.vue").code}
</#if> </#if>
</#list> </#list>
</#if>
<#if appde??>
/**
* 转化数据
*
* @param {any} args
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public transformData(args: any) {
let _this: any = this;
if(_this.service && _this.service.handleRequestData instanceof Function && _this.service.handleRequestData('transform',_this.context,args)){
return _this.service.handleRequestData('transform',_this.context,args)['data'];
}
}
</#if> </#if>
/** /**
......
...@@ -22,12 +22,16 @@ import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.co ...@@ -22,12 +22,16 @@ import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.co
<#list ctrl.getPSUIActions() as uiAction> <#list ctrl.getPSUIActions() as uiAction>
<#if uiAction.getPSAppDataEntity()??> <#if uiAction.getPSAppDataEntity()??>
<#assign curAppEntity = uiAction.getPSAppDataEntity()/> <#assign curAppEntity = uiAction.getPSAppDataEntity()/>
<#if !P.exists("importService", curAppEntity.getId(), "")> <#if !P.exists("importService", curAppEntity.getId(), "") >
import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service'; import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service';
<#if appde?? && (curAppEntity.getId() == appde.getId())><#assign hasAppDE = true /></#if>
</#if> </#if>
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#if appde?? && !hasAppDE??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#-- 语言资源入口 --> <#-- 语言资源入口 -->
<#ibizinclude> <#ibizinclude>
./LANGBASE.vue.ftl ./LANGBASE.vue.ftl
...@@ -135,6 +139,14 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get ...@@ -135,6 +139,14 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service({ $store: this.$store }); public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
</#if> </#if>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??> <#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl> <#list ctrl.getPSControls() as childCtrl>
......
...@@ -156,15 +156,6 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi ...@@ -156,15 +156,6 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
}); });
}); });
} }
<#assign has_keyfield = false />
<#list ctrl.getPSDEFormItems() as formitem>
<#if formitem.getPSAppDEField?? && formitem.getPSAppDEField()??>
<#if !formitem.isHidden() && formitem.getPSAppDEField().isKeyField()>
<#assign has_keyfield = true />
</#if>
</#if>
</#list>
/** /**
* 添加数据 * 添加数据
...@@ -179,9 +170,15 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi ...@@ -179,9 +170,15 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
@Errorlog @Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data); const {data:Data,context:Context} = this.handleRequestData(action,context,data);
<#if has_keyfield> <#-- 手动修改数据主键的情况start -->
Object.assign(Data,{${appde.getKeyPSAppDEField().getCodeName()?lower_case}: data.${appde.getKeyPSAppDEField().getCodeName()?lower_case}, srffrontuf: '1'}); <#list ctrl.getPSDEFormItems() as formitem>
</#if> <#if formitem.getPSAppDEField?? && formitem.getPSAppDEField()??>
<#if !formitem.isHidden() && formitem.getPSAppDEField().isKeyField()>
Object.assign(Data,{${appde.getKeyPSAppDEField().getCodeName()?lower_case}: data.${formitem.getName()}, srffrontuf: '1'});
</#if>
</#if>
</#list>
<#-- 手动修改数据主键的情况end -->
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
let result: Promise<any>; let result: Promise<any>;
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</#if> </#if>
</div> </div>
<div v-else> <div v-else>
暂无数据 {{ $t('app.commonWords.noData') }}
</div> </div>
</div> </div>
</template> </template>
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.fetchAction') as string) });
return; return;
} }
const arg: any = {...opt}; const arg: any = {...opt};
...@@ -353,7 +353,7 @@ ...@@ -353,7 +353,7 @@
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
...@@ -391,7 +391,7 @@ ...@@ -391,7 +391,7 @@
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.removeAction') as string) });
return; return;
} }
if (datas.length === 0) { if (datas.length === 0) {
...@@ -427,10 +427,10 @@ ...@@ -427,10 +427,10 @@
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info }); this.$Notice.error({ title: '', desc: (this.$t('app.commonWords.delDataFail') as string) + ',' + response.info });
return; return;
} else { } else {
this.$Notice.success({ title: '', desc: '删除成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
} }
//删除items中已删除的项 //删除items中已删除的项
datas.forEach((data: any) => { datas.forEach((data: any) => {
...@@ -449,7 +449,7 @@ ...@@ -449,7 +449,7 @@
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -460,8 +460,8 @@ ...@@ -460,8 +460,8 @@
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, ''); dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({ this.$Modal.confirm({
title: '警告', title: (this.$t('app.commonWords.warning') as string),
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?', content: (this.$t('app.list.confirmDel') as string) + ' ' + dataInfo + ',' + (this.$t('app.list.notRecoverable') as string) ,
onOk: () => { onOk: () => {
removeData(); removeData();
}, },
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表createAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -494,7 +494,7 @@ ...@@ -494,7 +494,7 @@
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表updateAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.warning') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
<#if de??> <#if de??>
...@@ -514,10 +514,10 @@ ...@@ -514,10 +514,10 @@
this.$emit('save', successItems); this.$emit('save', successItems);
this.refresh(); this.refresh();
if(errorItems.length === 0){ if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{ }else{
errorItems.forEach((item:any,index:number)=>{ errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: '保存失败', desc: item.majorentityname+'保存失败!' }); this.$Notice.error({ title: (this.$t('app.commonWords.saveFailed') as string), desc: item.majorentityname+ (this.$t('app.commonWords.saveFailed') as string) + '!' });
console.error(errorMessage[index]); console.error(errorMessage[index]);
}); });
} }
......
...@@ -109,9 +109,9 @@ ...@@ -109,9 +109,9 @@
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
let result: Promise<any>; let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Data,Context,isloading); result = _appEntityService[action](Context,Data,isloading);
}else{ }else{
result =_appEntityService.Update(Data,Context,isloading); result =_appEntityService.Update(Context,Data,isloading);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='list-exp-bar-header'> <div class='list-exp-bar-header'>
<#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if> <#if ctrl.getTitle() == ''>{{$t('app.listExpBar.title')}}<#else>${ctrl.getTitle()}</#if>
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="container-header">
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='dataview-exp-bar-header'> <div class='dataview-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>卡片视图导航栏<#else>${ctrl.getTitle()}</#if></div> <div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.dataViewExpBar.title') }}<#else>${ctrl.getTitle()}</#if></div>
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="container-header">
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
</#if> </#if>
</i-content> </i-content>
<footer class="app-wizard-footer"> <footer class="app-wizard-footer">
<i-button :disabled="isDisabled('PREV')" @click="onClickPrev()" type="primary">上一步</i-button> <i-button :disabled="isDisabled('PREV')" @click="onClickPrev()" type="primary">{{$t('app.wizardPanel.back')}}</i-button>
<i-button :disabled="isDisabled('NEXT')" @click="onClickNext()" type="primary">下一步</i-button> <i-button :disabled="isDisabled('NEXT')" @click="onClickNext()" type="primary">{{$t('app.wizardPanel.next')}}</i-button>
<i-button :disabled="isDisabled('FINISH')" @click="onClickFinish()" type="primary">完成</i-button> <i-button :disabled="isDisabled('FINISH')" @click="onClickFinish()" type="primary">{{$t('app.wizardPanel.complete')}}</i-button>
</footer> </footer>
</layout> </layout>
</template> </template>
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
}); });
</#if> </#if>
} }
...@@ -266,7 +266,7 @@ ...@@ -266,7 +266,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
}); });
</#if> </#if>
} }
...@@ -354,7 +354,7 @@ ...@@ -354,7 +354,7 @@
this.curState = 'NEXT'; this.curState = 'NEXT';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam }); this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam });
} else { } else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
} }
} }
} }
...@@ -373,7 +373,7 @@ ...@@ -373,7 +373,7 @@
this.curState = 'FINISH'; this.curState = 'FINISH';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam }); this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam });
} else { } else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
} }
} }
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div> <div>
<i-button type="primary" @click="handleAdd" style="float: right;"> <i-button type="primary" @click="handleAdd" style="float: right;">
增加 {{ $t('app.local.add')}}
</i-button> </i-button>
</div> </div>
</div> </div>
...@@ -170,7 +170,8 @@ ...@@ -170,7 +170,8 @@
public count: number = 0; public count: number = 0;
<#-- BEGIN:参数处理 --> <#-- BEGIN:参数处理 -->
<#list ctrl.getAllRelatedPSAppViews() as dataview> <#if ctrl.getEmbeddedPSAppView()??>
<#assign dataview = ctrl.getEmbeddedPSAppView() />
<#if !dataview.isPSDEView()> <#if !dataview.isPSDEView()>
/** /**
...@@ -223,7 +224,7 @@ ...@@ -223,7 +224,7 @@
{ pathName: '${srfpluralize(appDataEntity.codeName)?lower_case}', parameterName: '${appDataEntity.getCodeName()?lower_case}' }, { pathName: '${srfpluralize(appDataEntity.codeName)?lower_case}', parameterName: '${appDataEntity.getCodeName()?lower_case}' },
]; ];
</#if> </#if>
</#list> </#if>
<#-- END:参数处理 --> <#-- END:参数处理 -->
/** /**
...@@ -341,7 +342,7 @@ ...@@ -341,7 +342,7 @@
*/ */
public load(data: any): void { public load(data: any): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图多编辑视图面板fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.multiEditView.notConfig.fetchAction') as string) });
return; return;
} }
let arg: any = {}; let arg: any = {};
...@@ -351,7 +352,7 @@ ...@@ -351,7 +352,7 @@
promice.then((response: any) => { promice.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -365,7 +366,7 @@ ...@@ -365,7 +366,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
...@@ -376,14 +377,14 @@ ...@@ -376,14 +377,14 @@
*/ */
public handleAdd(){ public handleAdd(){
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图多编辑视图面板loaddraftAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.multiEditView.notConfig.loaddraftAction') as string) });
return; return;
} }
const promice: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:this.viewparams}, this.showBusyIndicator); const promice: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:this.viewparams}, this.showBusyIndicator);
promice.then((response: any) => { promice.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -393,7 +394,7 @@ ...@@ -393,7 +394,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
......
...@@ -13,12 +13,18 @@ ...@@ -13,12 +13,18 @@
<#if deuiaction.getUIActionTag() == 'ExportExcel'> <#if deuiaction.getUIActionTag() == 'ExportExcel'>
<app-export-excel :item="${ModelsName}.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel> <app-export-excel :item="${ModelsName}.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<#else> <#else>
<@badge item> <#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${srfclassname('${counter.getCodeName()}')}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#if>
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)"> <i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if> <#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
<#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if> <#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if>
</i-button> </i-button>
</@badge> <#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
</Badge>
</#if>
</#if> </#if>
<div slot='content'>{{<#if langbase??>$t('${langbase}.${item.name}.tip')<#else>'${item.getTooltip()}'</#if>}}</div> <div slot='content'>{{<#if langbase??>$t('${langbase}.${item.name}.tip')<#else>'${item.getTooltip()}'</#if>}}</div>
</tooltip> </tooltip>
...@@ -26,12 +32,18 @@ ...@@ -26,12 +32,18 @@
<#if deuiaction.getUIActionTag() == 'ExportExcel'> <#if deuiaction.getUIActionTag() == 'ExportExcel'>
<app-export-excel :item="${ModelsName}.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel> <app-export-excel :item="${ModelsName}.${item.name}" :caption="$t('${langbase}.${item.name}.caption')" @exportexcel="${ctrl.name}_click({ tag: '${item.name}' }, $event)"></app-export-excel>
<#else> <#else>
<@badge item> <#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
<#assign uiaction = item.getPSUIAction() />
<#assign counter = uiaction.getPSAppCounter() />
<Badge type="primary" v-show="${ModelsName}.${item.name}.visabled" :count="${srfclassname('${counter.getCodeName()}')}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
</#if>
<i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)"> <i-button v-show="${ModelsName}.${item.name}.visabled" :disabled="${ModelsName}.${item.name}.disabled" class='<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' @click="${ctrl.name}_click({ tag: '${item.name}' }, $event)">
<#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if> <#if item.isShowIcon()><i class='<#if item.getPSSysImage()??><#assign img=item.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i></#if>
<#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if> <#if item.isShowCaption()><span class='caption'>{{<#if langbase??>$t('${langbase}.${item.name}.caption')<#else>'${item.getCaption()}'</#if>}}</span></#if>
</i-button> </i-button>
</@badge> <#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
</Badge>
</#if>
</#if> </#if>
</#if> </#if>
<#assign deuiaction=item.getPSUIAction()> <#assign deuiaction=item.getPSUIAction()>
<#assign icon><#if item.getPSSysImage()??><#assign image = item.getPSSysImage()><#if image.getCssClass()??>, iconcls: '${image.getCssClass()}'</#if><#if image.getImagePath()??>, icon: '${image.getImagePath()}'</#if></#if></#assign> <#assign icon><#if item.getPSSysImage()??><#assign image = item.getPSSysImage()><#if image.getCssClass()??>, iconcls: '${image.getCssClass()}'</#if><#if image.getImagePath()??>, icon: '${image.getImagePath()}'</#if></#if></#assign>
<#if deuiaction.getUIActionTag() == 'ExportExcel'> <#if deuiaction.getUIActionTag() == 'ExportExcel'>
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', caption: '${item.caption}','isShowCaption':${item.isShowCaption()?c},'isShowIcon':${item.isShowIcon()?c}, tooltip: '${item.getTooltip()}'${icon}, disabled: false, type: '${item.getItemType()}', visabled: true, dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' }<#if view.hasPSControl("GRID")><#assign gridhandler = view.getPSControl("GRID").getPSAjaxControlHandler()>, MaxRowCount: <#if gridhandler?? && gridhandler.getPSDEDataExport()??>${gridhandler.getPSDEDataExport().getMaxRowCount()?c}<#elseif sys.getDEDataExportMaxRowCount() gt 0>${sys.getDEDataExportMaxRowCount()?c}<#else>10000</#if></#if>, class: '<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' }, ${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}',</#if> disabled: false, type: '${item.getItemType()}', visabled: true,noprivdisplaymode:<#if item.getNoPrivDisplayMode()??>${item.getNoPrivDisplayMode()}</#if>,dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' }<#if view.hasPSControl("GRID")><#assign gridhandler = view.getPSControl("GRID").getPSAjaxControlHandler()>, MaxRowCount: <#if gridhandler?? && gridhandler.getPSDEDataExport()??>${gridhandler.getPSDEDataExport().getMaxRowCount()?c}<#elseif sys.getDEDataExportMaxRowCount() gt 0>${sys.getDEDataExportMaxRowCount()?c}<#else>10000</#if></#if> },
<#elseif deuiaction.getUIActionTag() == 'ToggleRowEdit'> <#elseif deuiaction.getUIActionTag() == 'ToggleRowEdit'>
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', caption: '${item.caption}','isShowCaption':${item.isShowCaption()?c},'isShowIcon':${item.isShowIcon()?c}, tooltip: '${item.getTooltip()}'${icon}, disabled: false, type: '${item.getItemType()}', visabled: true, dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' }, class: '<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' }, ${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}', </#if>disabled: false, type: '${item.getItemType()}', visabled: true,noprivdisplaymode:<#if item.getNoPrivDisplayMode()??>${item.getNoPrivDisplayMode()}</#if>,dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' } },
<#else> <#else>
${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', caption: '${item.caption}','isShowCaption':${item.isShowCaption()?c},'isShowIcon':${item.isShowIcon()?c}, tooltip: '${item.getTooltip()}'${icon}, disabled: false, type: '${item.getItemType()}', visabled: true, dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' }, class: '<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' }, ${item.getName()?lower_case}: { name: '${item.getName()?lower_case}', <#if item.isShowCaption()>caption: '${item.caption}', </#if>disabled: false, type: '${item.getItemType()}', visabled: true,noprivdisplaymode:<#if item.getNoPrivDisplayMode()??>${item.getNoPrivDisplayMode()}</#if>,dataaccaction: '<#if deuiaction.getDataAccessAction()??>${deuiaction.getDataAccessAction()}</#if>', uiaction: { tag: '${deuiaction.getUIActionTag()}', target: '${deuiaction.getActionTarget()}' } },
</#if> </#if>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<template slot-scope="{ data }"> <template slot-scope="{ data }">
<#if ctrl.getPSSearchBarFilters()??> <#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter> <#list ctrl.getPSSearchBarFilters() as filter>
<template v-if="Object.is(data.field, '${filter.getName()}')"> <template v-if="Object.is(data.editor, '${filter.getName()}')">
${P.getEditorCode(filter, "EDITOR.vue").code} ${P.getEditorCode(filter, "EDITOR.vue").code}
</template> </template>
</#list> </#list>
...@@ -18,15 +18,30 @@ ...@@ -18,15 +18,30 @@
<i-input v-model="query" placeholder="<#if ctrl.getPSSearchBarQuickSearchs()??><#list ctrl.getPSSearchBarQuickSearchs() as search><#if search_index gt 0>,</#if><#if search.getPSDEField()??>${search.getPSDEField().getLogicName()}</#if></#list></#if>" style="<#if ctrl.getQuickSearchWidth() gt 0>width: ${ctrl.getQuickSearchWidth()?c}px;</#if>"></i-input> <i-input v-model="query" placeholder="<#if ctrl.getPSSearchBarQuickSearchs()??><#list ctrl.getPSSearchBarQuickSearchs() as search><#if search_index gt 0>,</#if><#if search.getPSDEField()??>${search.getPSDEField().getLogicName()}</#if></#list></#if>" style="<#if ctrl.getQuickSearchWidth() gt 0>width: ${ctrl.getQuickSearchWidth()?c}px;</#if>"></i-input>
</#if> --> </#if> -->
<div class="search-bar-action"> <div class="search-bar-action">
<i-button type="primary" @click="onSearch">搜索</i-button> <el-select size="small" v-if="historyItems.length > 0" v-model="selectItem" @change="onFilterChange">
<i-button @click="onReset">重置</i-button> <el-option v-for="item in historyItems" :key="item.value" :label="item.name" :value="item.value"></el-option>
<i-button @click="onSave"><i class="fa fa-floppy-o" aria-hidden="true"></i></i-button> </el-select>
<i-button type="primary" @click="onSearch">{{ $t('app.searchButton.search') }}</i-button>
<i-button @click="onReset">{{ $t('app.searchButton.reset') }}</i-button>
<Poptip ref="propip" trigger="hover" placement="top-end" :title="$t('app.searchForm.custom')" :width="250" @on-popper-show="openPoper">
<i-button><i class="fa fa-floppy-o" aria-hidden="true"></i></i-button>
<template slot="content">
<div>
<i-input v-model="saveItemName" :placeholder="$t('app.searchForm.title')"></i-input>
<div class="save-action">
<i-button @click="onCancel">{{ $t('app.commonWords.cancel') }}</i-button>
<i-button type="primary" @click="onOk">{{ $t('app.commonWords.save') }}</i-button>
</div>
</div>
</template>
</Poptip>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<#assign import_block> <#assign import_block>
import FilterTree from '@components/filter-tree/filter-tree.vue'; import FilterTree from '@components/filter-tree/filter-tree.vue';
import moment from 'moment';
</#assign> </#assign>
<#assign component_block> <#assign component_block>
...@@ -68,6 +83,9 @@ FilterTree, ...@@ -68,6 +83,9 @@ FilterTree,
label: '<#if filter.getPSDEField()??>${filter.getPSDEField().getLogicName()}</#if>', label: '<#if filter.getPSDEField()??>${filter.getPSDEField().getLogicName()}</#if>',
name: '${filter.getName()}', name: '${filter.getName()}',
prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>', prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>',
<#if filter.getPSDEFSearchMode()??>
mode: '${filter.getPSDEFSearchMode().getValueOP()}',
</#if>
disabled: false disabled: false
}, },
</#list> </#list>
...@@ -106,6 +124,30 @@ FilterTree, ...@@ -106,6 +124,30 @@ FilterTree,
*/ */
public utilServiceName: string = "<#if app.getPSAppFilterStorageUtil?? && app.getPSAppFilterStorageUtil()??>${app.getPSAppFilterStorageUtil().getCodeName()?lower_case}</#if>"; public utilServiceName: string = "<#if app.getPSAppFilterStorageUtil?? && app.getPSAppFilterStorageUtil()??>${app.getPSAppFilterStorageUtil().getCodeName()?lower_case}</#if>";
/**
* 历史记录
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected historyItems: any[] = [];
/**
* 选中记录
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected selectItem: any = null;
/**
* 存储项名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
protected saveItemName: string = '';
/** /**
* 获取多项数据 * 获取多项数据
* *
...@@ -128,7 +170,8 @@ FilterTree, ...@@ -128,7 +170,8 @@ FilterTree,
Object.assign(data, { query: this.query }) Object.assign(data, { query: this.query })
} --> } -->
if(this.filterFields.length > 0) { if(this.filterFields.length > 0) {
Object.assign(data, { filter: this.getFilter() }) let filter: any = this.getFilter();
Object.assign(data, { filter: filter ? JSON.stringify(filter) : null })
} }
return data; return data;
} }
...@@ -145,6 +188,9 @@ FilterTree, ...@@ -145,6 +188,9 @@ FilterTree,
} }
let ands: any[] = this.transformAnd(this.filterItems); let ands: any[] = this.transformAnd(this.filterItems);
this.transformResult(ands, '$and'); this.transformResult(ands, '$and');
if(ands.length === 0) {
return null;
}
return { '$and': ands }; return { '$and': ands };
} }
...@@ -184,9 +230,9 @@ FilterTree, ...@@ -184,9 +230,9 @@ FilterTree,
datas.forEach((data: any) => { datas.forEach((data: any) => {
let item: any = {}; let item: any = {};
if(data.field && data.mode) { if(data.field && data.mode) {
let field: any = this.detailsModel[data.field]; item[data.field] = {};
item[field.prop] = {}; let valField: string = data.editor ? data.editor : data.field;
item[field.prop][data.mode] = (data[data.field] == null ? '' : data[data.field]); item[data.field][data.mode] = (data[valField] == null ? '' : data[valField]);
result.push(item) result.push(item)
} else if(Object.is(data.label, '$and')) { } else if(Object.is(data.label, '$and')) {
let items: any[] = this.transformAnd(data.children); let items: any[] = this.transformAnd(data.children);
...@@ -210,9 +256,9 @@ FilterTree, ...@@ -210,9 +256,9 @@ FilterTree,
datas.forEach((data: any) => { datas.forEach((data: any) => {
let item: any = {}; let item: any = {};
if(data.field && data.mode) { if(data.field && data.mode) {
let field: any = this.detailsModel[data.field]; item[data.field] = {};
item[field.prop] = {}; let valField: string = data.editor ? data.editor : data.field;
item[field.prop][data.mode] = (data[data.field] == null ? '' : data[data.field]); item[data.field][data.mode] = (data[valField] == null ? '' : data[valField]);
result.push(item); result.push(item);
} else if(Object.is(data.label, '$and')) { } else if(Object.is(data.label, '$and')) {
item[data.label] = this.transformAnd(data.children); item[data.label] = this.transformAnd(data.children);
...@@ -266,10 +312,18 @@ FilterTree, ...@@ -266,10 +312,18 @@ FilterTree,
* @return {*} * @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onSave() { public onSave(name?: string) {
let time = moment();
this.historyItems.push({
name: (name ? name : time.format('YYYY-MM-DD HH:mm:ss')),
value: time.unix().toString(),
data: JSON.parse(JSON.stringify(this.filterItems))
})
this.selectItem = time.unix().toString();
let param: any = {}; let param: any = {};
Object.assign(param, { Object.assign(param, {
model: this.filterItems, model: JSON.parse(JSON.stringify(this.historyItems)),
appdeName: this.appdeName, appdeName: this.appdeName,
modelid: this.modelId, modelid: this.modelId,
utilServiceName: this.utilServiceName, utilServiceName: this.utilServiceName,
...@@ -311,15 +365,59 @@ FilterTree, ...@@ -311,15 +365,59 @@ FilterTree,
let post = this.service.loadModel(this.utilServiceName, this.context, param); let post = this.service.loadModel(this.utilServiceName, this.context, param);
post.then((response: any) => { post.then((response: any) => {
if(response.status == 200) { if(response.status == 200) {
this.filterItems = response.data; this.historyItems = response.data;
this.$nextTick(() => {
this.onSearch();
})
} }
}).catch((response: any) => { }).catch((response: any) => {
console.log(response); console.log(response);
}); });
} }
/**
* 改变过滤条件
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onFilterChange(evt: any) {
let item: any = this.historyItems.find((item: any) => Object.is(evt, item.value));
if(item) {
this.filterItems = JSON.parse(JSON.stringify(item.data));
}
}
/**
* 打开弹框
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public openPoper() {
this.saveItemName = '';
}
/**
* 确定
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onOk() {
let propip: any = this.$refs.propip;
propip.handleMouseleave();
this.onSave(this.saveItemName);
}
/**
* 取消设置
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onCancel() {
let propip: any = this.$refs.propip;
propip.handleMouseleave();
this.onSave();
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -2,8 +2,17 @@ ...@@ -2,8 +2,17 @@
height: 32px; height: 32px;
.search-bar-action { .search-bar-action {
float: right; float: right;
> .ivu-btn { display: flex;
align-items: center;
> * {
margin-left: 5px; margin-left: 5px;
.save-action {
text-align: right;
margin-top: 10px;
> * {
margin-left: 5px;
}
}
} }
} }
} }
......
...@@ -467,7 +467,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -467,7 +467,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (value && value.startsWith('%') && value.endsWith('%')) { if (value && value.startsWith('%') && value.endsWith('%')) {
const key: string = value.substring(1, value.length - 1); const key: string = value.substring(1, value.length - 1);
if (!this.data.hasOwnProperty(key)) { if (!this.data.hasOwnProperty(key)) {
this.$Notice.error({ title: '错误', desc: `操作失败,未能找到当前表单项${r'${key}'},无法继续操作` }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: `<#noparse>${(this.$t('app.formpage.desc1') as string)}${r'${key}'},${(this.$t('app.formpage.desc2') as string)}</#noparse>` });
return false; return false;
} }
value = this.data[key]; value = this.data[key];
...@@ -609,7 +609,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -609,7 +609,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图搜索表单loadAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.searchForm.notConfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -629,7 +629,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -629,7 +629,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
...@@ -646,7 +646,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -646,7 +646,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/ */
public loadDraft(opt: any = {},mode?:string): void { public loadDraft(opt: any = {},mode?:string): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图搜索表单loaddraftAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.searchForm.notConfig.loaddraftAction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
...@@ -655,7 +655,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -655,7 +655,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -687,7 +687,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -687,7 +687,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<#if ctrl.render??><#t> <#if ctrl.render??><#t>
${ctrl.render.code} ${ctrl.render.code}
<#else><#t> <#else><#t>
<div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>暂无数据</div> <div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('app.commonWords.noData')}}</div>
<div v-else class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div> <div v-else class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div>
</#if> </#if>
</div> </div>
...@@ -635,7 +635,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -635,7 +635,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
} }
// 补全空白分类 // 补全空白分类
if(returnArray.length >0){ if(returnArray.length >0){
let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:"未定义"; let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:(this.$t('app.chart.undefined') as string);
returnArray.forEach((item:any) =>{ returnArray.forEach((item:any) =>{
if(!item[groupField[0]]){ if(!item[groupField[0]]){
item[groupField[0]] = emptyText; item[groupField[0]] = emptyText;
...@@ -701,11 +701,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -701,11 +701,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
return Number(a[groupField[0].name]) - Number(b[groupField[0].name]); return Number(a[groupField[0].name]) - Number(b[groupField[0].name]);
}); });
}else if(Object.is(groupField[0].groupMode,"QUARTER")){ }else if(Object.is(groupField[0].groupMode,"QUARTER")){
returnArray = this.handleSortGroupData(arr,groupField,"季度"); returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.chart.quarter') as string));
}else if(Object.is(groupField[0].groupMode,"MONTH")){ }else if(Object.is(groupField[0].groupMode,"MONTH")){
returnArray = this.handleSortGroupData(arr,groupField,"月"); returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.calendar.month') as string));
}else if(Object.is(groupField[0].groupMode,"YEARWEEK")){ }else if(Object.is(groupField[0].groupMode,"YEARWEEK")){
returnArray = this.handleSortGroupData(arr,groupField,"周"); returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.calendar.week') as string));
}else if(Object.is(groupField[0].groupMode,"DAY")){ }else if(Object.is(groupField[0].groupMode,"DAY")){
returnArray = arr.sort((a:any, b:any) => { returnArray = arr.sort((a:any, b:any) => {
return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix(); return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix();
...@@ -743,7 +743,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -743,7 +743,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
arr.forEach((item:any) =>{ arr.forEach((item:any) =>{
let sortFieldValue:Array<any> = item[groupField[0].name].split("-"); let sortFieldValue:Array<any> = item[groupField[0].name].split("-");
Object.assign(item,{sortField:Number(sortFieldValue[0])*10000+Number(sortFieldValue[1])}); Object.assign(item,{sortField:Number(sortFieldValue[0])*10000+Number(sortFieldValue[1])});
item[groupField[0].name] = sortFieldValue[0]+"年"+sortFieldValue[1]+label; item[groupField[0].name] = sortFieldValue[0]+(this.$t('app.chart.year') as string)+sortFieldValue[1]+label;
}) })
arr.sort((a:any, b:any) => { arr.sort((a:any, b:any) => {
return Number(a.sortField) - Number(b.sortField); return Number(a.sortField) - Number(b.sortField);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<#if ctrl.render??><#t> <#if ctrl.render??><#t>
${ctrl.render.code} ${ctrl.render.code}
<#else><#t> <#else><#t>
<div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>暂无数据</div> <div v-if="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('app.commonWords.noData')}}</div>
<div v-else class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div> <div v-else class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div>
</#if> </#if>
</div> </div>
...@@ -635,7 +635,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -635,7 +635,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
} }
// 补全空白分类 // 补全空白分类
if(returnArray.length >0){ if(returnArray.length >0){
let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:"未定义"; let emptyText = (groupFieldModel[0] && groupFieldModel[0].codeList)?groupFieldModel[0].codeList.emptytext:(this.$t('app.chart.undefined') as string);
returnArray.forEach((item:any) =>{ returnArray.forEach((item:any) =>{
if(!item[groupField[0]]){ if(!item[groupField[0]]){
item[groupField[0]] = emptyText; item[groupField[0]] = emptyText;
...@@ -701,11 +701,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -701,11 +701,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
return Number(a[groupField[0].name]) - Number(b[groupField[0].name]); return Number(a[groupField[0].name]) - Number(b[groupField[0].name]);
}); });
}else if(Object.is(groupField[0].groupMode,"QUARTER")){ }else if(Object.is(groupField[0].groupMode,"QUARTER")){
returnArray = this.handleSortGroupData(arr,groupField,"季度"); returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.chart.quarter') as string));
}else if(Object.is(groupField[0].groupMode,"MONTH")){ }else if(Object.is(groupField[0].groupMode,"MONTH")){
returnArray = this.handleSortGroupData(arr,groupField,"月"); returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.calendar.month') as string));
}else if(Object.is(groupField[0].groupMode,"YEARWEEK")){ }else if(Object.is(groupField[0].groupMode,"YEARWEEK")){
returnArray = this.handleSortGroupData(arr,groupField,"周"); returnArray = this.handleSortGroupData(arr,groupField,(this.$t('app.calendar.week') as string));
}else if(Object.is(groupField[0].groupMode,"DAY")){ }else if(Object.is(groupField[0].groupMode,"DAY")){
returnArray = arr.sort((a:any, b:any) => { returnArray = arr.sort((a:any, b:any) => {
return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix(); return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix();
...@@ -743,7 +743,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -743,7 +743,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
arr.forEach((item:any) =>{ arr.forEach((item:any) =>{
let sortFieldValue:Array<any> = item[groupField[0].name].split("-"); let sortFieldValue:Array<any> = item[groupField[0].name].split("-");
Object.assign(item,{sortField:Number(sortFieldValue[0])*10000+Number(sortFieldValue[1])}); Object.assign(item,{sortField:Number(sortFieldValue[0])*10000+Number(sortFieldValue[1])});
item[groupField[0].name] = sortFieldValue[0]+"年"+sortFieldValue[1]+label; item[groupField[0].name] = sortFieldValue[0]+(this.$t('app.chart.year') as string)+sortFieldValue[1]+label;
}) })
arr.sort((a:any, b:any) => { arr.sort((a:any, b:any) => {
return Number(a.sortField) - Number(b.sortField); return Number(a.sortField) - Number(b.sortField);
......
...@@ -278,7 +278,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -278,7 +278,7 @@ import UtilService from '@/utilservice/util-service';
public handleClick(){ public handleClick(){
const view:any ={ const view:any ={
viewname: 'app-portal-design', viewname: 'app-portal-design',
title: '面板设计', title: (this.$t('app.dashBoard.handleClick.title')),
width: 1600, width: 1600,
placement: 'DRAWER_RIGHT' placement: 'DRAWER_RIGHT'
} }
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</i-col> </i-col>
</a> </a>
</row> </row>
<div v-else class="app-data-empty">暂无数据</div> <div v-else class="app-data-empty">{{ $t('app.commonWords.noData') }}</div>
</#if> </#if>
</div> </div>
</template> </template>
...@@ -410,7 +410,7 @@ ...@@ -410,7 +410,7 @@
*/ */
public load(opt: any = {}, isReset: boolean = false): void { public load(opt: any = {}, isReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.fetchAction') as string) });
return; return;
} }
const arg: any = {...opt}; const arg: any = {...opt};
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -463,7 +463,7 @@ ...@@ -463,7 +463,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
...@@ -476,7 +476,7 @@ ...@@ -476,7 +476,7 @@
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -509,9 +509,9 @@ ...@@ -509,9 +509,9 @@
}); });
if (_datas.length < 5) { if (_datas.length < 5) {
dataInfo = dataInfo + ' 共' + _datas.length + '条数据'; dataInfo = dataInfo + ' ' + (this.$t('app.dataView.sum') as string) + _datas.length + (this.$t('app.dataView.data') as string);
} else { } else {
dataInfo = dataInfo + '...' + ' 共' + _datas.length + '条数据'; dataInfo = dataInfo + '...' + ' ' + (this.$t('app.dataView.sum') as string) + _datas.length + (this.$t('app.dataView.data') as string);
} }
const removeData = () => { const removeData = () => {
...@@ -525,10 +525,10 @@ ...@@ -525,10 +525,10 @@
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info }); this.$Notice.error({ title: '', desc: (this.$t('app.commonWords.delDataFail') as string) + ',' + response.info });
return; return;
} else { } else {
this.$Notice.success({ title: '', desc: '删除成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
} }
//删除items中已删除的项 //删除items中已删除的项
_datas.forEach((data: any) => { _datas.forEach((data: any) => {
...@@ -547,7 +547,7 @@ ...@@ -547,7 +547,7 @@
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -558,8 +558,8 @@ ...@@ -558,8 +558,8 @@
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, ''); dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({ this.$Modal.confirm({
title: '警告', title: (this.$t('app.commonWords.warning') as string),
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?', content: (this.$t('app.gridpage.confirmDel') as string) + ' ' + dataInfo + ',' + (this.$t('app.gridpage.notRecoverable') as string),
onOk: () => { onOk: () => {
removeData(); removeData();
}, },
...@@ -585,7 +585,7 @@ ...@@ -585,7 +585,7 @@
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表createAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -593,7 +593,7 @@ ...@@ -593,7 +593,7 @@
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表updateAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
<#if de??> <#if de??>
...@@ -613,10 +613,10 @@ ...@@ -613,10 +613,10 @@
this.$emit('save', successItems); this.$emit('save', successItems);
this.refresh(); this.refresh();
if(errorItems.length === 0){ if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{ }else{
errorItems.forEach((item:any,index:number)=>{ errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: '保存失败', desc: item.majorentityname+'保存失败!' }); this.$Notice.error({ title: (this.$t('app.commonWords.saveFailed') as string), desc: item.majorentityname + (this.$t('app.commonWords.saveFailed') as string) + '!' });
console.error(errorMessage[index]); console.error(errorMessage[index]);
}); });
} }
......
...@@ -112,9 +112,9 @@ ...@@ -112,9 +112,9 @@
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
let result: Promise<any>; let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Data,Context,isloading); result = _appEntityService[action](Context,Data,isloading);
}else{ }else{
result =_appEntityService.Update(Data,Context,isloading); result =_appEntityService.Update(Context,Data,isloading);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='calendar-exp-bar-header'> <div class='calendar-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>日历导航栏<#else>${ctrl.getTitle()}</#if></div> <div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.calendarExpBar.title') }}<#else>${ctrl.getTitle()}</#if></div>
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="container-header">
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu"> <context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card @click.native="onEventClick(item,true,$event)" :class="item.className"> <el-card @click.native="onEventClick(item,true,$event)" :class="item.className">
<h4>{{item.title}}</h4> <h4>{{item.title}}</h4>
<p>从 {{item.start}} 至 {{item.end}}</p> <p>{{$t('app.calendar.from')}} {{item.start}} {{$t('app.calendar.to')}} {{item.end}}</p>
</el-card> </el-card>
</context-menu> </context-menu>
</el-timeline-item> </el-timeline-item>
...@@ -405,7 +405,7 @@ FullCalendar, ...@@ -405,7 +405,7 @@ FullCalendar,
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -416,7 +416,7 @@ FullCalendar, ...@@ -416,7 +416,7 @@ FullCalendar,
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
...@@ -606,7 +606,7 @@ FullCalendar, ...@@ -606,7 +606,7 @@ FullCalendar,
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -614,7 +614,7 @@ FullCalendar, ...@@ -614,7 +614,7 @@ FullCalendar,
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
......
...@@ -446,7 +446,7 @@ ...@@ -446,7 +446,7 @@
Object.assign(params,{viewparams:tempViewParams}); Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => { this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
resolve([]); resolve([]);
return; return;
} }
...@@ -466,7 +466,7 @@ ...@@ -466,7 +466,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: "错误", desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
}); });
} }
...@@ -530,7 +530,7 @@ ...@@ -530,7 +530,7 @@
const get: Promise<any> = this.service.getNodes(JSON.parse(JSON.stringify(this.context)),arg); const get: Promise<any> = this.service.getNodes(JSON.parse(JSON.stringify(this.context)),arg);
get.then((response: any) => { get.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
return; return;
} }
const _items = [...response.data]; const _items = [...response.data];
...@@ -545,7 +545,7 @@ ...@@ -545,7 +545,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
}); });
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div slot='left'> <div slot='left'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='tree-exp-bar-header'> <div class='tree-exp-bar-header'>
<div class="tree-exp-bar-title"><#if ctrl.getTitle() == ''>树视图导航栏<#else>${ctrl.getTitle()}</#if></div> <div class="tree-exp-bar-title"><#if ctrl.getTitle() == ''>{{ $t('app.treeExpBar.title') }}<#else>${ctrl.getTitle()}</#if></div>
<#if ctrl.getPSControls()??> <#if ctrl.getPSControls()??>
<#assign controls = ctrl.getPSControls()/> <#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl> <#list controls as singleControl>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div slot='left'> <div slot='left'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='workflow-exp-bar-header'> <div class='workflow-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>流程导航栏<#else>${ctrl.getTitle()}</#if></div> <div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{$t('app.wfExpBar.title')}}<#else>${ctrl.getTitle()}</#if></div>
</div> </div>
</#if> </#if>
<#if ctrl.isEnableSearch()> <#if ctrl.isEnableSearch()>
......
...@@ -63,8 +63,8 @@ ...@@ -63,8 +63,8 @@
</div> </div>
<div class="app-wizard-footer"> <div class="app-wizard-footer">
<i-button v-if="isVisiable('${form.name}','PREV')" @click="onClickPrev('${form.name}')" ><Icon type="ios-arrow-back"></Icon></i-button> <i-button v-if="isVisiable('${form.name}','PREV')" @click="onClickPrev('${form.name}')" ><Icon type="ios-arrow-back"></Icon></i-button>
<i-button v-if="isVisiable('${form.name}','NEXT')" @click="onClickNext('${form.name}')" type="primary" long>下一步</i-button> <i-button v-if="isVisiable('${form.name}','NEXT')" @click="onClickNext('${form.name}')" type="primary" long>{{$t('app.wizardPanel.next')}}</i-button>
<i-button v-if="isVisiable('${form.name}','FINISH')" @click="onClickFinish('${form.name}')" type="primary" long>完成</i-button> <i-button v-if="isVisiable('${form.name}','FINISH')" @click="onClickFinish('${form.name}')" type="primary" long>{{$t('app.wizardPanel.complete')}}</i-button>
</div> </div>
</div> </div>
</el-popover> </el-popover>
...@@ -358,7 +358,7 @@ ...@@ -358,7 +358,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
}); });
</#if> </#if>
} }
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
}); });
</#if> </#if>
} }
...@@ -543,7 +543,7 @@ ...@@ -543,7 +543,7 @@
this.curState = 'NEXT'; this.curState = 'NEXT';
this.wizardState.next({ tag: name, action: 'save', data: this.formParam }); this.wizardState.next({ tag: name, action: 'save', data: this.formParam });
} else { } else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
} }
} }
} }
...@@ -562,7 +562,7 @@ ...@@ -562,7 +562,7 @@
this.curState = 'FINISH'; this.curState = 'FINISH';
this.wizardState.next({ tag: name, action: 'save', data: this.formParam }); this.wizardState.next({ tag: name, action: 'save', data: this.formParam });
} else { } else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
} }
} }
} }
......
...@@ -257,7 +257,7 @@ GanttElastic, ...@@ -257,7 +257,7 @@ GanttElastic,
Object.assign(params,{viewparams:tempViewParams}); Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => { this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
return; return;
} }
this.tasks = [...this.tasks, ...response.data]; this.tasks = [...this.tasks, ...response.data];
...@@ -271,7 +271,7 @@ GanttElastic, ...@@ -271,7 +271,7 @@ GanttElastic,
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: "错误", desc: response.info }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
}); });
} }
......
...@@ -384,7 +384,7 @@ draggable, ...@@ -384,7 +384,7 @@ draggable,
*/ */
public load(opt: any = {}, isReset: boolean = false): void { public load(opt: any = {}, isReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.kanban.notConfig.fetchAction') as string) });
return; return;
} }
const arg: any = {...opt}; const arg: any = {...opt};
...@@ -408,7 +408,7 @@ draggable, ...@@ -408,7 +408,7 @@ draggable,
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -438,7 +438,7 @@ draggable, ...@@ -438,7 +438,7 @@ draggable,
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
...@@ -451,7 +451,7 @@ draggable, ...@@ -451,7 +451,7 @@ draggable,
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.kanban.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -500,10 +500,10 @@ draggable, ...@@ -500,10 +500,10 @@ draggable,
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info }); this.$Notice.error({ title: '', desc: (this.$t('app.commonWords.delDataFail') as string) + ',' + response.info });
return; return;
} else { } else {
this.$Notice.success({ title: '', desc: '删除成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
} }
//删除items中已删除的项 //删除items中已删除的项
_datas.forEach((data: any) => { _datas.forEach((data: any) => {
...@@ -522,7 +522,7 @@ draggable, ...@@ -522,7 +522,7 @@ draggable,
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -533,8 +533,8 @@ draggable, ...@@ -533,8 +533,8 @@ draggable,
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, ''); dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({ this.$Modal.confirm({
title: '警告', title: (this.$t('app.commonWords.warning') as string),
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?', content: (this.$t('app.kanban.delete1') as string) + dataInfo + ',' + (this.$t('app.kanban.delete2') as string),
onOk: () => { onOk: () => {
removeData(); removeData();
}, },
...@@ -560,7 +560,7 @@ draggable, ...@@ -560,7 +560,7 @@ draggable,
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.data) { if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
this.setGroups(); this.setGroups();
return; return;
...@@ -571,11 +571,11 @@ draggable, ...@@ -571,11 +571,11 @@ draggable,
this.$emit('update', this.items); this.$emit('update', this.items);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-form-group :manageContainerStatus="detailsModel.${item.name}.manageContainerStatus" :isManageContainer="detailsModel.${item.name}.isManageContainer" @managecontainerclick="manageContainerClick('${item.name}')" layoutType="<#if item.getPSLayout()??>${item.getPSLayout().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>> <app-form-group :uiService="appUIService" :data="transformData(data)" :manageContainerStatus="detailsModel.${item.name}.manageContainerStatus" :isManageContainer="detailsModel.${item.name}.isManageContainer" @managecontainerclick="manageContainerClick('${item.name}')" layoutType="<#if item.getPSLayout()??>${item.getPSLayout().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> <#assign content>
<#list item.getPSDEFormDetails() as formmenber> <#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())> <#if !(formmenber.isHidden?? && formmenber.isHidden())>
......
...@@ -14,7 +14,7 @@ new FormPageModel({ ${detail} }) ...@@ -14,7 +14,7 @@ new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'> <#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} }) new FormPartModel({ ${detail} })
<#elseif item.getDetailType() == 'GROUPPANEL'> <#elseif item.getDetailType() == 'GROUPPANEL'>
new FormGroupPanelModel({ ${detail}, uiActionGroup: { caption: '<#if item.getPSUIActionGroup()??>${item.getPSUIActionGroup().getName()}</#if>', langbase: '<#if langbase??>${langbase}</#if>', extractMode: '<#if item.getActionGroupExtractMode?? && item.getActionGroupExtractMode()??>${item.getActionGroupExtractMode()}<#else>ITEM</#if>', details: [<#if item.getPSUIActionGroup()??><#list item.getPSUIActionGroup().getPSUIActionGroupDetails() as uadetails><#if uadetails_index gt 0>, </#if>{ name: '${item.getName()}_${uadetails.getName()}', caption: '${uadetails.getPSUIAction().getCaption()}', uiactiontag: '<#if uadetails.getPSUIAction().getPSAppDataEntity?? && uadetails.getPSUIAction().getPSAppDataEntity()??>${uadetails.getPSUIAction().getPSAppDataEntity().getCodeName()?lower_case}_</#if>${uadetails.getPSUIAction().getUIActionTag()?lower_case}'<#if uadetails.getPSUIAction().getPSSysImage()??>, <#assign viewimg=uadetails.getPSUIAction().getPSSysImage()/><#if viewimg.getCssClass() != ''>icon: '${viewimg.getCssClass()}'<#else>img: '${viewimg.getImagePath()}'</#if></#if>,isShowCaption:${uadetails.isShowCaption()?c},isShowIcon:${uadetails.isShowIcon()?c} }</#list></#if>] }, isManageContainer: <#if item.getShowMoreMode?? && item.getShowMoreMode()?? && item.getShowMoreMode() == 2>true<#else>false</#if>, showMoreModeItems: [<#if item.getPSDEFormDetails()??><#list item.getPSDEFormDetails() as moreItem><#if moreItem.getShowMoreMode?? && moreItem.getShowMoreMode()?? && moreItem.getShowMoreMode() == 1>'${moreItem.getName()}',</#if></#list></#if>] }) new FormGroupPanelModel({ ${detail}, uiActionGroup: { caption: '<#if item.getPSUIActionGroup()??>${item.getPSUIActionGroup().getName()}</#if>', langbase: '<#if langbase??>${langbase}</#if>', extractMode: '<#if item.getActionGroupExtractMode?? && item.getActionGroupExtractMode()??>${item.getActionGroupExtractMode()}<#else>ITEM</#if>', details: [<#if item.getPSUIActionGroup()??><#list item.getPSUIActionGroup().getPSUIActionGroupDetails() as uadetails><#if uadetails_index gt 0>, </#if>{ name: '${item.getName()}_${uadetails.getName()}', caption: '${uadetails.getPSUIAction().getCaption()}',disabled: false, visabled: true, noprivdisplaymode:<#if uadetails.getPSUIAction()?? && uadetails.getPSUIAction().getNoPrivDisplayMode(view)??>${uadetails.getPSUIAction().getNoPrivDisplayMode(view)}</#if>,dataaccaction: '<#if uadetails.getPSUIAction()?? && uadetails.getPSUIAction().getDataAccessAction()??>${uadetails.getPSUIAction().getDataAccessAction()}</#if>',uiactiontag: '<#if uadetails.getPSUIAction().getPSAppDataEntity?? && uadetails.getPSUIAction().getPSAppDataEntity()??>${uadetails.getPSUIAction().getPSAppDataEntity().getCodeName()?lower_case}_</#if>${uadetails.getPSUIAction().getUIActionTag()?lower_case}'<#if uadetails.getPSUIAction().getPSSysImage()??>, <#assign viewimg=uadetails.getPSUIAction().getPSSysImage()/><#if viewimg.getCssClass() != ''>icon: '${viewimg.getCssClass()}'<#else>img: '${viewimg.getImagePath()}'</#if></#if>,isShowCaption:${uadetails.isShowCaption()?c},isShowIcon:${uadetails.isShowIcon()?c} }</#list></#if>] }, isManageContainer: <#if item.getShowMoreMode?? && item.getShowMoreMode()?? && item.getShowMoreMode() == 2>true<#else>false</#if>, showMoreModeItems: [<#if item.getPSDEFormDetails()??><#list item.getPSDEFormDetails() as moreItem><#if moreItem.getShowMoreMode?? && moreItem.getShowMoreMode()?? && moreItem.getShowMoreMode() == 1>'${moreItem.getName()}',</#if></#list></#if>] })
<#elseif item.getDetailType() == 'IFRAME'> <#elseif item.getDetailType() == 'IFRAME'>
new FormIFrameModel({ ${detail} }) new FormIFrameModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'> <#elseif item.getDetailType() == 'RAWITEM'>
......
...@@ -23,6 +23,14 @@ import schema from 'async-validator'; ...@@ -23,6 +23,14 @@ import schema from 'async-validator';
@Inject({from:'navModel',default: 'tab'}) @Inject({from:'navModel',default: 'tab'})
public navModel!:string; public navModel!:string;
/**
* 界面UI服务对象
*
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
/** /**
* 工作流审批意见控件绑定值 * 工作流审批意见控件绑定值
* *
...@@ -254,6 +262,7 @@ import schema from 'async-validator'; ...@@ -254,6 +262,7 @@ import schema from 'async-validator';
<#if ctrl.getPSDEFormItemVRs()??> <#if ctrl.getPSDEFormItemVRs()??>
<#list ctrl.getPSDEFormItemVRs() as fideValueRule> <#list ctrl.getPSDEFormItemVRs() as fideValueRule>
<#if fideValueRule.getPSDEFormItemName() == formdetail.getName()> <#if fideValueRule.getPSDEFormItemName() == formdetail.getName()>
<#-- 系统值规则 -->
<#if fideValueRule.getPSSysValueRule()??> <#if fideValueRule.getPSSysValueRule()??>
<#assign valueRule = fideValueRule.getPSSysValueRule()/> <#assign valueRule = fideValueRule.getPSSysValueRule()/>
<#if valueRule.getRuleType?? && valueRule.getRuleType()??> <#if valueRule.getRuleType?? && valueRule.getRuleType()??>
...@@ -272,6 +281,7 @@ import schema from 'async-validator'; ...@@ -272,6 +281,7 @@ import schema from 'async-validator';
</#list> </#list>
} }
/** /**
* 详情模型集合 * 详情模型集合
* *
...@@ -676,7 +686,7 @@ import schema from 'async-validator'; ...@@ -676,7 +686,7 @@ import schema from 'async-validator';
if (value && value.startsWith('%') && value.endsWith('%')) { if (value && value.startsWith('%') && value.endsWith('%')) {
const key: string = value.substring(1, value.length - 1); const key: string = value.substring(1, value.length - 1);
if (!this.data.hasOwnProperty(key)) { if (!this.data.hasOwnProperty(key)) {
this.$Notice.error({ title: '错误', desc: `操作失败,未能找到当前表单项${r'${key}'},无法继续操作` }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: `<#noparse>${(this.$t('app.formpage.desc1') as string)}${r'${key}'},${(this.$t('app.formpage.desc2') as string)}</#noparse>` });
return false; return false;
} }
value = this.data[key]; value = this.data[key];
...@@ -906,7 +916,7 @@ import schema from 'async-validator'; ...@@ -906,7 +916,7 @@ import schema from 'async-validator';
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表单loadAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.loadaction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -923,11 +933,11 @@ import schema from 'async-validator'; ...@@ -923,11 +933,11 @@ import schema from 'async-validator';
} }
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -941,7 +951,7 @@ import schema from 'async-validator'; ...@@ -941,7 +951,7 @@ import schema from 'async-validator';
*/ */
public loadDraft(opt: any = {}): void { public loadDraft(opt: any = {}): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表单loaddraftAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
...@@ -950,19 +960,21 @@ import schema from 'async-validator'; ...@@ -950,19 +960,21 @@ import schema from 'async-validator';
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.data) { if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
const data = response.data; const data = response.data;
<#if de??>
if(data.${appde.getCodeName()?lower_case}){
Object.assign(this.context,{${appde.getCodeName()?lower_case}:data.${appde.getCodeName()?lower_case}})
}
</#if>
this.resetDraftFormStates(); this.resetDraftFormStates();
this.onFormLoad(data,'loadDraft'); this.onFormLoad(data,'loadDraft');
<#list ctrl.getPSDEFormItems() as formitem>
<#if formitem.getPSAppDEField?? && formitem.getPSAppDEField()??>
<#if !formitem.isHidden() && formitem.getPSAppDEField().isKeyField()>
this.data.${formitem.getName()} = null;
</#if>
</#if>
</#list>
this.$emit('load', data); this.$emit('load', data);
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'load', data: data }); this.formState.next({ type: 'load', data: data });
...@@ -979,11 +991,11 @@ import schema from 'async-validator'; ...@@ -979,11 +991,11 @@ import schema from 'async-validator';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -1005,7 +1017,7 @@ import schema from 'async-validator'; ...@@ -1005,7 +1017,7 @@ import schema from 'async-validator';
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({ title: '错误', desc: '${view.getName()}视图表单'+actionName+'参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -1013,7 +1025,7 @@ import schema from 'async-validator'; ...@@ -1013,7 +1025,7 @@ import schema from 'async-validator';
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.data) { if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -1031,20 +1043,20 @@ import schema from 'async-validator'; ...@@ -1031,20 +1043,20 @@ import schema from 'async-validator';
if (response && response.status && response.data) { if (response && response.status && response.data) {
if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){ if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({ this.$Modal.confirm({
title: '保存数据发生错误', title: (this.$t('app.formpage.saveerror') as string),
content: '数据不一致,可能后台数据已经被修改,是否要重新加载数据?', content: (this.$t('app.formpage.savecontent') as string),
onOk: () => { onOk: () => {
this.refresh([]); this.refresh([]);
}, },
onCancel: () => { } onCancel: () => { }
}); });
}else{ }else{
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -1063,7 +1075,7 @@ import schema from 'async-validator'; ...@@ -1063,7 +1075,7 @@ import schema from 'async-validator';
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
showResultInfo = showResultInfo === undefined ? true : false; showResultInfo = showResultInfo === undefined ? true : false;
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.valuecheckex') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -1088,7 +1100,7 @@ import schema from 'async-validator'; ...@@ -1088,7 +1100,7 @@ import schema from 'async-validator';
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({ title: '错误', desc: '${view.getName()}视图表单'+actionName+'参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -1096,7 +1108,7 @@ import schema from 'async-validator'; ...@@ -1096,7 +1108,7 @@ import schema from 'async-validator';
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.data) { if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -1112,7 +1124,7 @@ import schema from 'async-validator'; ...@@ -1112,7 +1124,7 @@ import schema from 'async-validator';
}); });
<#if ctrl.getFormFuncMode()?lower_case != 'wizardform'> <#if ctrl.getFormFuncMode()?lower_case != 'wizardform'>
if (showResultInfo) { if (showResultInfo) {
this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;保存成功!' }); this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;'+ (this.$t('app.formpage.savesuccess') as string) });
} }
</#if> </#if>
resolve(response); resolve(response);
...@@ -1120,21 +1132,21 @@ import schema from 'async-validator'; ...@@ -1120,21 +1132,21 @@ import schema from 'async-validator';
if (response && response.status && response.data) { if (response && response.status && response.data) {
if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){ if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({ this.$Modal.confirm({
title: '保存数据发生错误', title: (this.$t('app.formpage.saveerror') as string),
content: '数据不一致,可能后台数据已经被修改,是否要重新加载数据?', content: (this.$t('app.formpage.savecontent') as string),
onOk: () => { onOk: () => {
this.refresh([]); this.refresh([]);
}, },
onCancel: () => { } onCancel: () => { }
}); });
}else{ }else{
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
} }
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -1153,7 +1165,7 @@ import schema from 'async-validator'; ...@@ -1153,7 +1165,7 @@ import schema from 'async-validator';
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> { public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表单removeAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return; return;
} }
const arg: any = opt[0]; const arg: any = opt[0];
...@@ -1165,7 +1177,7 @@ import schema from 'async-validator'; ...@@ -1165,7 +1177,7 @@ import schema from 'async-validator';
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({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;删除成功!' }); this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;' + (this.$t('app.formpage.deletesuccess') as string) });
<#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>
...@@ -1201,20 +1213,20 @@ import schema from 'async-validator'; ...@@ -1201,20 +1213,20 @@ import schema from 'async-validator';
result.then((response: any) => { result.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if(response.data){ if(response.data){
this.$Notice.error({ title: '', desc: '工作流启动失败, ' + response.data.message }); this.$Notice.error({ title: '', desc: (this.$t('app.formpage.workflow.starterror') as string) + ', ' + response.data.message });
} }
return; return;
} }
this.$Notice.info({ title: '', desc: '工作流启动成功' }); this.$Notice.info({ title: '', desc: (this.$t('app.formpage.workflow.startsuccess') as string) });
resolve(response); resolve(response);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -1222,12 +1234,12 @@ import schema from 'async-validator'; ...@@ -1222,12 +1234,12 @@ import schema from 'async-validator';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -1276,22 +1288,22 @@ import schema from 'async-validator'; ...@@ -1276,22 +1288,22 @@ import schema from 'async-validator';
result.then((response: any) => { result.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if(response.data){ if(response.data){
this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.data.message }); this.$Notice.error({ title: '', desc: (this.$t('app.formpage.workflow.submiterror') as string) + ', ' + response.data.message });
} }
return; return;
} }
this.onFormLoad(arg,'submit'); this.onFormLoad(arg,'submit');
this.$store.dispatch('viewaction/datasaved', { viewtag: this.viewtag }); this.$store.dispatch('viewaction/datasaved', { viewtag: this.viewtag });
this.$Notice.info({ title: '', desc: '工作流提交成功' }); this.$Notice.info({ title: '', desc: (this.$t('app.formpage.workflow.submitsuccess') as string) });
resolve(response); resolve(response);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -1299,12 +1311,12 @@ import schema from 'async-validator'; ...@@ -1299,12 +1311,12 @@ import schema from 'async-validator';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -1333,7 +1345,7 @@ import schema from 'async-validator'; ...@@ -1333,7 +1345,7 @@ import schema from 'async-validator';
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading); const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '表单项更新失败' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.updateerror') as string) });
return; return;
} }
const data = response.data; const data = response.data;
...@@ -1356,11 +1368,11 @@ import schema from 'async-validator'; ...@@ -1356,11 +1368,11 @@ import schema from 'async-validator';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
......
...@@ -75,22 +75,23 @@ ...@@ -75,22 +75,23 @@
<div style="text-align: center;"> <div style="text-align: center;">
<#if item.getPSDEUIActionGroup().getPSDEUIActions()??> <#if item.getPSDEUIActionGroup().getPSDEUIActions()??>
<#list item.getPSDEUIActionGroup().getPSUIActionGroupDetails() as uiactionDetail> <#list item.getPSDEUIActionGroup().getPSUIActionGroupDetails() as uiactionDetail>
<#if uiactionDetail_index gt 0>
<divider type='vertical'></divider>
</#if>
<#if uiactionDetail.getPSUIAction?? && uiactionDetail.getPSUIAction()??> <#if uiactionDetail.getPSUIAction?? && uiactionDetail.getPSUIAction()??>
<#assign uiaction = uiactionDetail.getPSUIAction() /> <#assign uiaction = uiactionDetail.getPSUIAction() />
<#if preUIAction??>
<divider type='vertical' v-show="scope.row.${preUIAction.getUIActionTag()}.visabled && scope.row.${uiaction.getUIActionTag()}.visabled" ></divider>
</#if>
<#if !uiactionDetail.isShowCaption()> <#if !uiactionDetail.isShowCaption()>
<tooltip :transfer="true" :max-width="600"> <tooltip :transfer="true" :max-width="600">
</#if> </#if>
<a @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)"> <a v-show="scope.row.${uiaction.getUIActionTag()}.visabled" :style="{'pointer-events':scope.row.${uiaction.getUIActionTag()}.disabled?'none':'auto'}" @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)">
<#if uiactionDetail.isShowIcon()><i class='<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>'></i></#if> <#if uiactionDetail.isShowIcon()><i class='<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>'></i></#if>
<#if uiactionDetail.isShowCaption()>{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</#if> <#if uiactionDetail.isShowCaption()>{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getFullCodeName()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</#if>
</a> </a>
<#if !uiactionDetail.isShowCaption()> <#if !uiactionDetail.isShowCaption()>
<div slot='content'>{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</div> <div slot='content'>{{<#if langbase??>$t('${langbase}.uiactions.<#if uiaction.getPSAppDataEntity?? && uiaction.getPSAppDataEntity()??>${uiaction.getPSAppDataEntity().getCodeName()?lower_case}_</#if>${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</div>
</tooltip> </tooltip>
</#if> </#if>
<#assign preUIAction = uiaction />
</#if> </#if>
</#list> </#list>
</#if> </#if>
...@@ -168,7 +169,12 @@ ...@@ -168,7 +169,12 @@
</app-column-link> </app-column-link>
<#else> <#else>
<#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??> <#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??>
<app-span name='${item.name}' 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}" <#t>
<#if item.getPSDEField().getDataType()!="">
dataType="${item.getPSDEField().getDataType()}" <#t>
</#if>
<#if item.getPSDEField().getPrecision()??>
precision="${item.getPSDEField().getPrecision()}" <#t></#if>></app-span>
<#else> <#else>
<#if item.getValueFormat()?? && item.getValueFormat() != "%1$s"> <#if item.getValueFormat()?? && item.getValueFormat() != "%1$s">
<app-format-data format="${item.getValueFormat()}" :data="row.${item.getName()?lower_case}"></app-format-data> <app-format-data format="${item.getValueFormat()}" :data="row.${item.getName()?lower_case}"></app-format-data>
......
<template> <template>
<div class='grid' style="height:100%;"> <div class='grid' style="height:100%;">
<#if ctrl.render?? || ctrl.getRender()??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<i-form style="height:100%"> <i-form style="height:100%">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
@row-dblclick="rowDBLClick($event)" @row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader"> ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty"> <template slot="empty">
无数据 {{$t('app.gridpage.noData')}}
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??> <#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<span class="quick-toolbar"> <span class="quick-toolbar">
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/> <#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
...@@ -116,6 +116,28 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -116,6 +116,28 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public codeListService:CodeListService = new CodeListService({ $store: this.$store }); public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ActionModel:any ={
<#if ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as item>
${item.getUIActionTag()}: { name: '${item.getUIActionTag()}',disabled: false, visabled: true,noprivdisplaymode:<#if item.getNoPrivDisplayMode(view)??>${item.getNoPrivDisplayMode(view)}</#if>,dataaccaction: '<#if item.getDataAccessAction()??>${item.getDataAccessAction()}</#if>', target: '${item.getActionTarget()}'}<#if item_has_next>,</#if>
</#list>
</#if>
};
/** /**
* 应用状态事件 * 应用状态事件
* *
...@@ -373,6 +395,13 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -373,6 +395,13 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public totalrow: number = 0; public totalrow: number = 0;
/**
* 表格更新默认值项
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public defaultUpdateItems:Array<any> =[<#list ctrl.getPSDEGridEditItems() as editItem><#if editItem.getUpdateDV?? && editItem.getUpdateDV()?? && !(editItem.getUpdateDV() == '')>'${editItem.getCodeName()?lower_case}'</#if><#if editItem_has_next>,</#if></#list>];
/** /**
* 选中行数据 * 选中行数据
* *
...@@ -487,6 +516,18 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -487,6 +516,18 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public gridItemsModel: any[] = []; public gridItemsModel: any[] = [];
/**
* 获取界面行为权限状态
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getActionState(data:any){
let targetData:any = this.transformData(data);
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
}
/** /**
* 获取表格行模型 * 获取表格行模型
* *
...@@ -584,7 +625,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -584,7 +625,7 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public load(opt: any = {}, pageReset: boolean = false): void { public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(pageReset){ if(pageReset){
...@@ -611,7 +652,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -611,7 +652,7 @@ import { FormItemModel } from '@/model/form-detail';
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -622,6 +663,9 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -622,6 +663,9 @@ import { FormItemModel } from '@/model/form-detail';
this.selections = []; this.selections = [];
this.gridItemsModel = []; this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())}); this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
Object.assign(item,this.getActionState(item));
});
this.$emit('load', this.items); this.$emit('load', this.items);
// 设置默认选中 // 设置默认选中
let _this = this; let _this = this;
...@@ -651,7 +695,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -651,7 +695,7 @@ import { FormItemModel } from '@/model/form-detail';
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
...@@ -664,7 +708,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -664,7 +708,7 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -698,9 +742,9 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -698,9 +742,9 @@ import { FormItemModel } from '@/model/form-detail';
}); });
if (_datas.length < 5) { if (_datas.length < 5) {
dataInfo = dataInfo + ' 共' + _datas.length + '条数据'; dataInfo = dataInfo + ' '+(this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.records') as string)+(this.$t('app.gridpage.data') as string);
} else { } else {
dataInfo = dataInfo + '...' + ' 共' + _datas.length + '条数据'; dataInfo = dataInfo + '...' + ' '+(this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.desc2') as string);
} }
const removeData = () => { const removeData = () => {
...@@ -715,10 +759,10 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -715,10 +759,10 @@ import { FormItemModel } from '@/model/form-detail';
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info }); this.$Notice.error({ title: '', desc: (this.$t('app.gridpage.delDataFail') as string)+',' + response.info });
return; return;
} else { } else {
this.$Notice.success({ title: '', desc: '删除成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.gridpage.delSuccess') as string) });
} }
//删除items中已删除的项 //删除items中已删除的项
console.log(this.items); console.log(this.items);
...@@ -740,7 +784,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -740,7 +784,7 @@ import { FormItemModel } from '@/model/form-detail';
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -751,8 +795,8 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -751,8 +795,8 @@ import { FormItemModel } from '@/model/form-detail';
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, ''); dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '');
this.$Modal.confirm({ this.$Modal.confirm({
title: '警告', title: (this.$t('app.commonWords.warning') as string),
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?', content: (this.$t('app.gridpage.confirmDel') as string)+' ' + dataInfo + ','+(this.$t('app.gridpage.notRecoverable') as string),
onOk: () => { onOk: () => {
removeData(); removeData();
}, },
...@@ -770,13 +814,13 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -770,13 +814,13 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public addBatch(arg: any = {}): void { public addBatch(arg: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(!arg){ if(!arg){
arg = {}; arg = {};
} }
console.error("批量添加未实现"); console.error((this.$t('app.gridpage.notBatch') as string));
<#-- const post: Promise<any> = this.$http.post(this.fetchAction, arg, this.showBusyIndicator); <#-- const post: Promise<any> = this.$http.post(this.fetchAction, arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (response.ret !== 200) { if (response.ret !== 200) {
...@@ -882,7 +926,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -882,7 +926,7 @@ import { FormItemModel } from '@/model/form-detail';
excel.export_json_to_excel({ excel.export_json_to_excel({
header: tHeader, //表头 必填 header: tHeader, //表头 必填
data, //具体数据 必填 data, //具体数据 必填
filename: "${ctrl.getPSAppDataEntity().getLogicName()}表", //非必填 filename: "${ctrl.getPSAppDataEntity().getLogicName()}"+(this.$t('app.gridpage.grid') as string), //非必填
autoWidth: true, //非必填 autoWidth: true, //非必填
bookType: "xlsx" //非必填 bookType: "xlsx" //非必填
}); });
...@@ -922,7 +966,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -922,7 +966,7 @@ import { FormItemModel } from '@/model/form-detail';
</#if> </#if>
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '数据导出失败,' + response.info }); this.$Notice.error({ title: '', desc: (this.$t('app.gridpage.exportFail') as string)+',' + response.info });
return; return;
} }
try { try {
...@@ -934,7 +978,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -934,7 +978,7 @@ import { FormItemModel } from '@/model/form-detail';
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '', desc: '数据导出失败' }); this.$Notice.error({ title: '', desc: (this.$t('app.gridpage.exportFail') as string) });
}); });
} }
...@@ -1342,7 +1386,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1342,7 +1386,7 @@ import { FormItemModel } from '@/model/form-detail';
const sums:Array<any> = []; const sums:Array<any> = [];
columns.forEach((column:any, index:number) => { columns.forEach((column:any, index:number) => {
if (index === 0) { if (index === 0) {
sums[index] = '合计'; sums[index] = (this.$t('app.gridpage.sum') as string);
return; return;
} }
if(index === (columns.length - 1)){ if(index === (columns.length - 1)){
...@@ -1422,7 +1466,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1422,7 +1466,7 @@ import { FormItemModel } from '@/model/form-detail';
const sums:Array<any> = []; const sums:Array<any> = [];
columns.forEach((column:any, index:number) => { columns.forEach((column:any, index:number) => {
if (index === 0) { if (index === 0) {
sums[index] = '合计'; sums[index] = (this.$t('app.gridpage.sum') as string);
return; return;
}else if(index === (columns.length - 1)){ }else if(index === (columns.length - 1)){
sums[index] = ''; sums[index] = '';
...@@ -1466,7 +1510,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1466,7 +1510,7 @@ import { FormItemModel } from '@/model/form-detail';
this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{ this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -1478,7 +1522,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1478,7 +1522,7 @@ import { FormItemModel } from '@/model/form-detail';
} }
this.remoteData = {}; this.remoteData = {};
this.isDisplay = true; this.isDisplay = true;
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}) })
} }
</#if> </#if>
...@@ -1567,8 +1611,15 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1567,8 +1611,15 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public async save(args: any[], params?: any, $event?: any, xData?: any){ public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this; let _this = this;
if(_this.items && _this.items.length >0){
for (const item of _this.items) {
if(Object.is(item.rowDataState, 'update')){
_this.updateDefault(item);
}
}
}
if(!await this.validateAll()){ if(!await this.validateAll()){
this.$Notice.error({ title: '错误', desc: '值规则校验异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
return []; return [];
} }
let successItems:any = []; let successItems:any = [];
...@@ -1578,7 +1629,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1578,7 +1629,7 @@ import { FormItemModel } from '@/model/form-detail';
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格createAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -1586,7 +1637,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1586,7 +1637,7 @@ import { FormItemModel } from '@/model/form-detail';
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格updateAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
<#if de??> <#if de??>
...@@ -1594,7 +1645,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1594,7 +1645,7 @@ import { FormItemModel } from '@/model/form-detail';
Object.assign(this.context,{${appde.getCodeName()?lower_case}:item.${appde.getCodeName()?lower_case}}); Object.assign(this.context,{${appde.getCodeName()?lower_case}:item.${appde.getCodeName()?lower_case}});
} }
</#if> </#if>
let response = await this.service.add(this.updateAction,JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.update(this.updateAction,JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
successItems.push(JSON.parse(JSON.stringify(response.data))); successItems.push(JSON.parse(JSON.stringify(response.data)));
} }
} }
...@@ -1606,10 +1657,10 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1606,10 +1657,10 @@ import { FormItemModel } from '@/model/form-detail';
this.$emit('save', successItems); this.$emit('save', successItems);
this.refresh([]); this.refresh([]);
if(errorItems.length === 0){ if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{ }else{
errorItems.forEach((item:any,index:number)=>{ errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: '保存失败', desc: item.majorentityname+'保存失败!' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: errorMessage[index].data.message });
console.error(errorMessage[index]); console.error(errorMessage[index]);
}); });
} }
...@@ -1625,7 +1676,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1625,7 +1676,7 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public newRow(args: any[], params?: any, $event?: any, xData?: any): void { public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格loaddraftAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return; return;
} }
let _this = this; let _this = this;
...@@ -1634,7 +1685,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1634,7 +1685,7 @@ import { FormItemModel } from '@/model/form-detail';
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -1648,7 +1699,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1648,7 +1699,7 @@ import { FormItemModel } from '@/model/form-detail';
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -1685,6 +1736,11 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1685,6 +1736,11 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){ public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){
row.rowDataState = row.rowDataState ? row.rowDataState : "update" ; row.rowDataState = row.rowDataState ? row.rowDataState : "update" ;
if(Object.is(row.rowDataState,"update")){
if(!value && this.defaultUpdateItems.includes(property)){
row.hasUpdated = true;
}
}
this.validate(property,row,rowIndex); this.validate(property,row,rowIndex);
<#if ctrl.getPSDEGridEditItems()??> <#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem> <#list ctrl.getPSDEGridEditItems() as editItem>
...@@ -1718,7 +1774,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1718,7 +1774,7 @@ import { FormItemModel } from '@/model/form-detail';
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading); const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '表单项更新失败' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.gridpage.formitemFailed') as string) });
return; return;
} }
const _data: any = response.data; const _data: any = response.data;
...@@ -1736,7 +1792,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1736,7 +1792,7 @@ import { FormItemModel } from '@/model/form-detail';
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -1813,6 +1869,45 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1813,6 +1869,45 @@ import { FormItemModel } from '@/model/form-detail';
} }
</#if> </#if>
</#if> </#if>
</#list>
}
/**
* 更新默认值
* @param {*} row 行数据
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public updateDefault(row: any){
<#list ctrl.getPSDEGridEditItems() as editItem><#t>
<#if editItem.getUpdateDV?? && editItem.getUpdateDV()??><#t>
<#if !(editItem.getUpdateDV() == '') || editItem.getUpdateDVT() == 'CURTIME'><#t>
if (row.hasOwnProperty('${editItem.getCodeName()?lower_case}') && !row.${editItem.getCodeName()?lower_case} && !row.hasUpdated) {
<#-- 网页请求 -->
<#if editItem.getUpdateDVT() == 'CONTEXT'>
row['${editItem.getCodeName()?lower_case}'] = this.viewparams['${editItem.getUpdateDV()}'];
<#-- 用户全局对象 -->
<#elseif editItem.getUpdateDVT() == 'SESSION'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getUpdateDV()}'];
<#-- 当前应用数据 -->
<#elseif editItem.getUpdateDVT() == 'APPDATA'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getUpdateDV()}'];
<#-- 当前操作用户(名称) -->
<#elseif editItem.getUpdateDVT() == 'OPERATORNAME'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfusername'];
<#-- 当前操作用户(编号) -->
<#elseif editItem.getUpdateDVT() == 'OPERATOR'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfuserid'];
<#-- 当前时间 -->
<#elseif editItem.getUpdateDVT() == 'CURTIME'>
row['${editItem.getCodeName()?lower_case}'] = this.$util.dateFormat(new Date());
<#else>
<#-- 默认值 -->
<#assign datatype=srfjavatype(editItem.getPSAppDEField().getStdDataType())>
row['${editItem.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${editItem.getUpdateDV()}<#else>'${editItem.getUpdateDV()}'</#if>;
</#if>
}
</#if>
</#if>
</#list> </#list>
} }
<#ibizinclude> <#ibizinclude>
......
...@@ -27,6 +27,15 @@ ...@@ -27,6 +27,15 @@
<#if dataitem.getPSDEField()??> <#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}', prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}', dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getName() == dataitem.getName()>
<#if editItem.isEditable()>
isEditable:${editItem.isEditable()?c}
</#if>
</#if>
</#list>
</#if> </#if>
}, },
</#list> </#list>
...@@ -42,6 +51,15 @@ ...@@ -42,6 +51,15 @@
<#if dataitem.getPSDEField()??> <#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}', prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}', dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getName() == dataitem.getName()>
<#if editItem.isEditable()>
isEditable:${editItem.isEditable()?c}
</#if>
</#if>
</#list>
</#if> </#if>
}, },
</#list> </#list>
...@@ -88,6 +106,10 @@ ${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code} ...@@ -88,6 +106,10 @@ ${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
name:'query', name:'query',
prop:'query' prop:'query'
}, },
{
name:'filter',
prop:'filter'
},
{ {
name:'page', name:'page',
prop:'page' prop:'page'
......
...@@ -110,7 +110,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi ...@@ -110,7 +110,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
*/ */
@Errorlog @Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true); const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
let result: Promise<any>; let result: Promise<any>;
...@@ -169,14 +169,14 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi ...@@ -169,14 +169,14 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
*/ */
@Errorlog @Errorlog
public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true); const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService; const _appEntityService: any = this.appEntityService;
let result: Promise<any>; let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) { if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Data,Context,isloading); result = _appEntityService[action](Context,Data,isloading);
}else{ }else{
result =_appEntityService.Update(Data,Context,isloading); result =_appEntityService.Update(Context,Data,isloading);
} }
result.then((response) => { result.then((response) => {
this.handleResponse(action, response); this.handleResponse(action, response);
...@@ -361,7 +361,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi ...@@ -361,7 +361,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
* @param {*} [data={}] * @param {*} [data={}]
* @param {boolean} [isloading] * @param {boolean} [isloading]
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof MainService * @memberof ${srfclassname('${ctrl.codeName}')}Service
*/ */
@Errorlog @Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> { public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
...@@ -383,6 +383,42 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi ...@@ -383,6 +383,42 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
}) })
} }
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && (data[item.name] || Object.is(data[item.name],0)) ){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
<#ibizinclude> <#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl ../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='grid-exp-bar-header'> <div class='grid-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>表格导航栏<#else>${ctrl.getTitle()}</#if></div> <div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>{{ $t('app.gridBar.title') }}<#else>${ctrl.getTitle()}</#if></div>
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="container-header">
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
import { FormItemModel } from '@/model/form-detail';
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
...@@ -85,15 +86,46 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -85,15 +86,46 @@ import CodeListService from "@service/app/codelist-service";
* 代码表服务对象 * 代码表服务对象
* *
* @type {CodeListService} * @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public codeListService:CodeListService = new CodeListService({ $store: this.$store }); public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 界面UI服务对象
*
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
/**
* 界面行为模型
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ActionModel:any ={
<#if ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as item>
${item.getUIActionTag()}: { name: '${item.getUIActionTag()}',disabled: false, visabled: true,noprivdisplaymode:<#if item.getNoPrivDisplayMode(view)??>${item.getNoPrivDisplayMode(view)}</#if>,dataaccaction: '<#if item.getDataAccessAction()??>${item.getDataAccessAction()}</#if>', target: '${item.getActionTarget()}'}<#if item_has_next>,</#if>
</#list>
</#if>
};
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/** /**
* 获取多项数据 * 获取多项数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return this.selections; return this.selections;
...@@ -103,7 +135,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -103,7 +135,7 @@ import CodeListService from "@service/app/codelist-service";
* 获取单项树 * 获取单项树
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getData(): any { public getData(): any {
return this.selections[0]; return this.selections[0];
...@@ -116,19 +148,18 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -116,19 +148,18 @@ import CodeListService from "@service/app/codelist-service";
* 打开新建数据视图 * 打开新建数据视图
* *
* @type {any} * @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected newdata: any; @Prop() public newdata: any;
</#if> </#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'> <#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
/** /**
* 打开编辑数据视图 * 打开编辑数据视图
* *
* @type {any} * @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected opendata: any; @Prop() public opendata: any;
</#if> </#if>
</#list> </#list>
</#if> </#if>
...@@ -137,152 +168,152 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -137,152 +168,152 @@ import CodeListService from "@service/app/codelist-service";
* 显示处理提示 * 显示处理提示
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop({ default: true }) protected showBusyIndicator?: boolean; @Prop({ default: true }) public showBusyIndicator?: boolean;
/** /**
* 部件行为--update * 部件行为--update
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected updateAction!: string; @Prop() public updateAction!: string;
/** /**
* 部件行为--fetch * 部件行为--fetch
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected fetchAction!: string; @Prop() public fetchAction!: string;
/** /**
* 部件行为--remove * 部件行为--remove
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected removeAction!: string; @Prop() public removeAction!: string;
/** /**
* 部件行为--load * 部件行为--load
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected loadAction!: string; @Prop() public loadAction!: string;
/** /**
* 部件行为--loaddraft * 部件行为--loaddraft
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected loaddraftAction!: string; @Prop() public loaddraftAction!: string;
/** /**
* 部件行为--create * 部件行为--create
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected createAction!: string; @Prop() public createAction!: string;
/** /**
* 当前页 * 当前页
* *
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected curPage: number = 1; public curPage: number = 1;
/** /**
* 数据 * 数据
* *
* @type {any[]} * @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected items: any[] = []; public items: any[] = [];
/** /**
* 是否支持分页 * 是否支持分页
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected isEnablePagingBar: boolean = ${ctrl.isEnablePagingBar()?c}; public isEnablePagingBar: boolean = ${ctrl.isEnablePagingBar()?c};
/** /**
* 是否禁用排序 * 是否禁用排序
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected isNoSort: boolean = ${ctrl.isNoSort()?c}; public isNoSort: boolean = ${ctrl.isNoSort()?c};
/** /**
* 排序方向 * 排序方向
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected minorSortDir: string = '<#if ctrl.getMinorSortDir()??>${ctrl.getMinorSortDir()}</#if>'; public minorSortDir: string = '<#if ctrl.getMinorSortDir()??>${ctrl.getMinorSortDir()}</#if>';
/** /**
* 排序字段 * 排序字段
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected minorSortPSDEF: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>'; public minorSortPSDEF: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>';
/** /**
* 分页条数 * 分页条数
* *
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected limit: number = ${ctrl.getPagingSize()?c}; public limit: number = ${ctrl.getPagingSize()?c};
/** /**
* 是否显示标题 * 是否显示标题
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected isHideHeader: boolean = ${ctrl.isHideHeader()?c}; public isHideHeader: boolean = ${ctrl.isHideHeader()?c};
/** /**
* 是否默认选中第一条数据 * 是否默认选中第一条数据
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop({ default: false }) protected isSelectFirstDefault!: boolean; @Prop({ default: false }) public isSelectFirstDefault!: boolean;
/** /**
* 是否单选 * 是否单选
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected isSingleSelect?: boolean; @Prop() public isSingleSelect?: boolean;
/** /**
* 选中数据字符串 * 选中数据字符串
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() protected selectedData?: string; @Prop() public selectedData?: string;
/** /**
* 选中值变化 * 选中值变化
* *
* @param {*} newVal * @param {*} newVal
* @param {*} oldVal * @param {*} oldVal
* @memberof MainTree * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Watch('selectedData') @Watch('selectedData')
public onValueChange(newVal: any, oldVal: any) { public onValueChange(newVal: any, oldVal: any) {
...@@ -310,33 +341,40 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -310,33 +341,40 @@ import CodeListService from "@service/app/codelist-service";
* 2 双击激活 * 2 双击激活
* *
* @type {(number | 0 | 1 | 2)} * @type {(number | 0 | 1 | 2)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop({default: 2}) protected gridRowActiveMode!: number; @Prop({default: 2}) public gridRowActiveMode!: number;
/** /**
* 是否开启行编辑 * 是否开启行编辑
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop({default: false}) protected isOpenEdit!: boolean; @Prop({default: false}) public isOpenEdit!: boolean;
/** /**
* 实际是否开启行编辑 * 实际是否开启行编辑
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected actualIsOpenEdit: boolean = this.isOpenEdit; public actualIsOpenEdit: boolean = this.isOpenEdit;
/** /**
* 总条数 * 总条数
* *
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public totalrow: number = 0;
/**
* 表格更新默认值项
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected totalrow: number = 0; public defaultUpdateItems:Array<any> =[<#list ctrl.getPSDEGridEditItems() as editItem><#if editItem.getUpdateDV?? && editItem.getUpdateDV()?? && !(editItem.getUpdateDV() == '')>'${editItem.getCodeName()?lower_case}'</#if><#if editItem_has_next>,</#if></#list>];
/** /**
* 选中行数据 * 选中行数据
...@@ -344,7 +382,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -344,7 +382,7 @@ import CodeListService from "@service/app/codelist-service";
* @type {any[]} * @type {any[]}
* @memberof Main * @memberof Main
*/ */
protected selections: any[] = []; public selections: any[] = [];
/** /**
* 拦截行选中 * 拦截行选中
...@@ -352,41 +390,51 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -352,41 +390,51 @@ import CodeListService from "@service/app/codelist-service";
* @type {boolean} * @type {boolean}
* @memberof Main * @memberof Main
*/ */
protected stopRowClick: boolean = false; public stopRowClick: boolean = false;
<#if ctrl.getAggMode() == "ALL"> <#if ctrl.getAggMode() == "ALL">
/** /**
* 表格聚合行为 * 表格聚合行为
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected aggAction:string ='<#if ctrl.getAggPSDEAction()??>${ctrl.getAggPSDEAction().getCodeName()}</#if>'; public aggAction:string ='<#if ctrl.getAggPSDEAction()??>${ctrl.getAggPSDEAction().getCodeName()}</#if>';
/** /**
* 远程数据 * 远程数据
* *
* @type {any} * @type {any}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected remoteData:any = {}; public remoteData:any = {};
</#if>
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
${P.getCtrlCode(quickToolbar, 'CONTROL.vue').code}
</#if>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if> </#if>
/** /**
* 表格是否显示 * 表格是否显示
* *
* @type {boolean} * @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected isDisplay:boolean = <#if ctrl.getAggMode() == "ALL">false<#else>true</#if>; public isDisplay:boolean = <#if ctrl.getAggMode() == "ALL">false<#else>true</#if>;
/** /**
* 部件刷新 * 部件刷新
* *
* @param {any[]} args * @param {any[]} args
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected refresh(args: any[]): void { public refresh(args: any[]): void {
this.load(); this.load();
} }
...@@ -404,41 +452,84 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -404,41 +452,84 @@ import CodeListService from "@service/app/codelist-service";
* @type {boolean} * @type {boolean}
* @memberof AppEmbedPicker * @memberof AppEmbedPicker
*/ */
protected isDragendCol: boolean = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.ISDRAGENDCOL',false)?c}<#else>false</#if>; public isDragendCol: boolean = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.ISDRAGENDCOL',false)?c}<#else>false</#if>;
<#-- public isDragendCol: boolean = true; -->
/** /**
* 所有列成员 * 所有列成员
* *
* @type {any[]} * @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected allColumns: any[] = [ public allColumns: any[] = [
<#if ctrl.getAllPSDEGridColumns()??> <#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as column> <#list ctrl.getAllPSDEGridColumns() as column>
{ {
name: '${column.getName()?lower_case}', name: '${column.getName()?lower_case}',
label: '${column.getCaption()}', label: '${column.getCaption()}',
langtag: '<#if langbase??>${langbase}.columns.${column.getName()?lower_case}</#if>', langtag: '<#if langbase??>${langbase}.columns.${column.getName()?lower_case}</#if>',
show: <#if column.isHideDefault()>false<#else>true</#if>, show: <#if column.isHideDefault()>false<#else>true</#if>,
util: '${column.getWidthUnit()}' util: '${column.getWidthUnit()}',
<#-- BEGIN:是否支持行编辑 -->
<#if ctrl.isEnableRowEdit() && column.isEnableRowEdit()>
isEnableRowEdit: true,
<#else>
isEnableRowEdit: false,
</#if>
<#-- END:是否支持行编辑 -->
}, },
</#list> </#list>
</#if> </#if>
] ]
/**
* 表格模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public gridItemsModel: any[] = [];
/**
* 获取界面行为权限状态
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getActionState(data:any){
let targetData:any = this.transformData(data);
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
}
/**
* 获取表格行模型
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getGridRowModel(){
return {
<#list ctrl.getPSDEGridEditItems() as edititem>
${edititem.getName()}: new FormItemModel(),
</#list>
}
}
/** /**
* 属性值规则 * 属性值规则
* *
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected rules: any = { public rules: any = {
<#list ctrl.getPSDEGridEditItems() as edititem> <#list ctrl.getPSDEGridEditItems() as edititem>
${edititem.getName()}: [ ${edititem.getName()}: [
{ required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'change' }, { required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'change' },
{ required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'blur' }, { required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'blur' },
<#if ctrl.getPSGEIDEFValueRules?? && ctrl.getPSGEIDEFValueRules()??> <#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??>
<#list ctrl.getPSGEIDEFValueRules() as fideValueRule> <#list ctrl.getPSDEGridEditItemVRs() as fideValueRule>
<#if fideValueRule.getPSDEGridEditItemName() == edititem.getName()>
<#if fideValueRule.getPSSysValueRule()??> <#if fideValueRule.getPSSysValueRule()??>
<#assign valueRule = fideValueRule.getPSSysValueRule()/> <#assign valueRule = fideValueRule.getPSSysValueRule()/>
<#if valueRule.getRuleType?? && valueRule.getRuleType()??> <#if valueRule.getRuleType?? && valueRule.getRuleType()??>
...@@ -449,21 +540,66 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -449,21 +540,66 @@ import CodeListService from "@service/app/codelist-service";
</#if> </#if>
</#if> </#if>
</#if> </#if>
</#if>
</#list> </#list>
</#if> </#if>
], ],
</#list> </#list>
} }
/**
* 表格行编辑项校验
*
* @param {string} property 属性名
* @param {*} data 行数据
* @param {number} rowIndex 行索引
* @returns Promise<any>
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public validate(property:string, data:any, rowIndex:number):Promise<any>{
return new Promise((resolve, reject) => {
this.$util.validateItem(property,data,this.rules).then(()=>{
this.gridItemsModel[rowIndex][property].setError(null);
resolve(true);
}).catch(({ errors, fields }) => {
this.gridItemsModel[rowIndex][property].setError(errors[0].message);
resolve(false);
});
});
}
/**
* 校验所有修改过的编辑项
*
* @returns Promise<any>
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public async validateAll(){
let validateState = true;
let index = -1;
for(let item of this.items){
index++;
if(item.rowDataState === "create" || item.rowDataState === "update"){
for(let property of Object.keys(this.rules)){
if(!await this.validate(property,item,index)){
validateState = false;
}
}
}
}
return validateState;
}
/** /**
* 表格数据加载 * 表格数据加载
* *
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected load(opt: any = {}, pageReset: boolean = false): void { public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(pageReset){ if(pageReset){
...@@ -483,20 +619,27 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -483,20 +619,27 @@ import CodeListService from "@service/app/codelist-service";
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata); Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams}); let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
const data: any = response.data; const data: any = response.data;
this.totalrow = response.total; this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data)); this.items = JSON.parse(JSON.stringify(data));
// 清空selections // 清空selections,gridItemsModel
this.selections = []; this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
Object.assign(item,this.getActionState(item));
});
this.$emit('load', this.items); this.$emit('load', this.items);
// 设置默认选中 // 设置默认选中
let _this = this; let _this = this;
...@@ -526,7 +669,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -526,7 +669,7 @@ import CodeListService from "@service/app/codelist-service";
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
...@@ -535,19 +678,20 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -535,19 +678,20 @@ import CodeListService from "@service/app/codelist-service";
* *
* @param {any[]} datas * @param {any[]} datas
* @returns {Promise<any>} * @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
datas.forEach((record: any, index: number) => { datas.forEach((record: any, index: number) => {
if (!record.srfkey) { if (Object.is(record.srfuf,"0")) {
this.items.some((val: any, num: number) =>{ this.items.some((val: any, num: number) =>{
if(JSON.stringify(val) == JSON.stringify(record)){ if(JSON.stringify(val) == JSON.stringify(record)){
this.items.splice(num,1); this.items.splice(num,1);
this.gridItemsModel.splice(num,1);
return true; return true;
} }
}); });
...@@ -572,9 +716,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -572,9 +716,9 @@ import CodeListService from "@service/app/codelist-service";
}); });
if (_datas.length < 5) { if (_datas.length < 5) {
dataInfo = dataInfo + ' 共' + _datas.length + '条数据'; dataInfo = dataInfo + ' '+(this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.records') as string)+(this.$t('app.gridpage.data') as string);
} else { } else {
dataInfo = dataInfo + '...' + ' 共' + _datas.length + '条数据'; dataInfo = dataInfo + '...' + ' '+(this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.desc2') as string);
} }
const removeData = () => { const removeData = () => {
...@@ -589,10 +733,10 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -589,10 +733,10 @@ import CodeListService from "@service/app/codelist-service";
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info }); this.$Notice.error({ title: '', desc: (this.$t('app.gridpage.delDataFail') as string)+',' + response.info });
return; return;
} else { } else {
this.$Notice.success({ title: '', desc: '删除成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.gridpage.delSuccess') as string) });
} }
//删除items中已删除的项 //删除items中已删除的项
console.log(this.items); console.log(this.items);
...@@ -600,6 +744,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -600,6 +744,7 @@ import CodeListService from "@service/app/codelist-service";
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1); this.items.splice(index,1);
this.gridItemsModel.splice(index,1);
return true; return true;
} }
}); });
...@@ -613,7 +758,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -613,7 +758,7 @@ import CodeListService from "@service/app/codelist-service";
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -624,8 +769,8 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -624,8 +769,8 @@ import CodeListService from "@service/app/codelist-service";
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, ''); dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '');
this.$Modal.confirm({ this.$Modal.confirm({
title: '警告', title: (this.$t('app.commonWords.warning') as string),
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?', content: (this.$t('app.gridpage.confirmDel') as string)+' ' + dataInfo + ','+(this.$t('app.gridpage.notRecoverable') as string),
onOk: () => { onOk: () => {
removeData(); removeData();
}, },
...@@ -639,17 +784,17 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -639,17 +784,17 @@ import CodeListService from "@service/app/codelist-service";
* 批量添加 * 批量添加
* *
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected addBatch(arg: any = {}): void { public addBatch(arg: any = {}): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return; return;
} }
if(!arg){ if(!arg){
arg = {}; arg = {};
} }
console.error("批量添加未实现"); console.error((this.$t('app.gridpage.notBatch') as string));
<#-- const post: Promise<any> = this.$http.post(this.fetchAction, arg, this.showBusyIndicator); <#-- const post: Promise<any> = this.$http.post(this.fetchAction, arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (response.ret !== 200) { if (response.ret !== 200) {
...@@ -670,7 +815,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -670,7 +815,7 @@ import CodeListService from "@service/app/codelist-service";
* 数据导入 * 数据导入
* *
* @param {*} data * @param {*} data
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public importExcel(data:any ={}):void{ public importExcel(data:any ={}):void{
//导入excel //导入excel
...@@ -690,12 +835,12 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -690,12 +835,12 @@ import CodeListService from "@service/app/codelist-service";
</#if> </#if>
} }
if(Object.keys(importDataModel).length == 0){ if(Object.keys(importDataModel).length == 0){
this.$Notice.warning({ title: '警告', desc: '请配置数据导入项' }); this.$Notice.warning({ 'title': (this.$t("app.utilview.warning") as string), 'desc': (this.$t("app.utilview.info") as string) });
return; return;
} }
const view:any ={ const view:any ={
viewname: 'app-data-upload', viewname: 'app-data-upload',
title: '导入数据', title: this.$t("app.utilview.importview"),
width: 900, width: 900,
height: 700 height: 700
} }
...@@ -714,9 +859,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -714,9 +859,9 @@ import CodeListService from "@service/app/codelist-service";
* 所有导出列成员 * 所有导出列成员
* *
* @type {any[]} * @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected allExportColumns: any[] = [ public allExportColumns: any[] = [
<#if ctrl.getPSDEDataExport().getPSDEDataExportItems()??> <#if ctrl.getPSDEDataExport().getPSDEDataExportItems()??>
<#list ctrl.getPSDEDataExport().getPSDEDataExportItems() as column> <#list ctrl.getPSDEDataExport().getPSDEDataExportItems() as column>
{ {
...@@ -735,9 +880,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -735,9 +880,9 @@ import CodeListService from "@service/app/codelist-service";
* 数据导出 * 数据导出
* *
* @param {*} data * @param {*} data
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected exportExcel(data: any = {}): void { public exportExcel(data: any = {}): void {
// 导出Excel // 导出Excel
const doExport = async (_data:any) => { const doExport = async (_data:any) => {
const tHeader: Array<any> = []; const tHeader: Array<any> = [];
...@@ -755,7 +900,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -755,7 +900,7 @@ import CodeListService from "@service/app/codelist-service";
excel.export_json_to_excel({ excel.export_json_to_excel({
header: tHeader, //表头 必填 header: tHeader, //表头 必填
data, //具体数据 必填 data, //具体数据 必填
filename: "${ctrl.getPSAppDataEntity().getLogicName()}表", //非必填 filename: "${ctrl.getPSAppDataEntity().getLogicName()}"+(this.$t('app.gridpage.grid') as string), //非必填
autoWidth: true, //非必填 autoWidth: true, //非必填
bookType: "xlsx" //非必填 bookType: "xlsx" //非必填
}); });
...@@ -795,7 +940,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -795,7 +940,7 @@ import CodeListService from "@service/app/codelist-service";
</#if> </#if>
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '数据导出失败,' + response.info }); this.$Notice.error({ title: '', desc: (this.$t('app.gridpage.exportFail') as string)+',' + response.info });
return; return;
} }
try { try {
...@@ -807,7 +952,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -807,7 +952,7 @@ import CodeListService from "@service/app/codelist-service";
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '', desc: '数据导出失败' }); this.$Notice.error({ title: '', desc: (this.$t('app.gridpage.exportFail') as string) });
}); });
} }
...@@ -818,7 +963,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -818,7 +963,7 @@ import CodeListService from "@service/app/codelist-service";
* @param {*} filterVal * @param {*} filterVal
* @param {*} jsonData * @param {*} jsonData
* @returns {[]} * @returns {[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public async formatExcelData(filterVal:any, jsonData:any) { public async formatExcelData(filterVal:any, jsonData:any) {
let codelistColumns:Array<any> = [ let codelistColumns:Array<any> = [
...@@ -843,11 +988,11 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -843,11 +988,11 @@ import CodeListService from "@service/app/codelist-service";
<#elseif codelist.getOrMode() == 'NUM'> <#elseif codelist.getOrMode() == 'NUM'>
renderMode: 'number', renderMode: 'number',
textSeparator: '${codelist.textSeparator}', textSeparator: '${codelist.textSeparator}',
valueSeparator: ';', valueSeparator: ',',
<#else> <#else>
renderMode: 'other', renderMode: 'other',
textSeparator: '、', textSeparator: '、',
valueSeparator: ';', valueSeparator: ',',
</#if> </#if>
}, },
</#if> </#if>
...@@ -874,16 +1019,17 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -874,16 +1019,17 @@ import CodeListService from "@service/app/codelist-service";
return jsonData.map((v:any) => filterVal.map((j:any) => v[j])) return jsonData.map((v:any) => filterVal.map((j:any) => v[j]))
} }
/** /**
* 解析代码表和vlaue,设置items * 解析代码表和vlaue,设置items
* *
* @private * @public
* @param {any[]} items 代码表数据 * @param {any[]} items 代码表数据
* @param {*} value * @param {*} value
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
private getCodelistValue(items: any[], value: any, codelist: any,){ public getCodelistValue(items: any[], value: any, codelist: any,){
if(!value){ if(!value){
return this.$t('codelist.'+codelist.srfkey+'.empty'); return this.$t('codelist.'+codelist.srfkey+'.empty');
} }
...@@ -930,13 +1076,13 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -930,13 +1076,13 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 获取代码项 * 获取代码项
* *
* @private * @public
* @param {any[]} items * @param {any[]} items
* @param {*} value * @param {*} value
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
private getItem(items: any[], value: any, codelist: any): any { public getItem(items: any[], value: any, codelist: any): any {
const arr: Array<any> = items.filter(item => {return item.value == value}); const arr: Array<any> = items.filter(item => {return item.value == value});
if (arr.length !== 1) { if (arr.length !== 1) {
return undefined; return undefined;
...@@ -951,18 +1097,18 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -951,18 +1097,18 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 生命周期 * 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected created(): void { public created(): void {
this.afterCreated(); this.afterCreated();
} }
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected afterCreated(){ public afterCreated(){
this.setColState(); this.setColState();
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
...@@ -980,26 +1126,39 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -980,26 +1126,39 @@ import CodeListService from "@service/app/codelist-service";
} }
}); });
} }
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh([data]);
}
})
}
} }
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected destroyed() { public destroyed() {
this.afterDestroy(); this.afterDestroy();
} }
/** /**
* 执行destroyed后的逻辑 * 执行destroyed后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected afterDestroy() { public afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
<#if destroyed_block??> <#if destroyed_block??>
${destroyed_block} ${destroyed_block}
</#if> </#if>
...@@ -1009,9 +1168,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1009,9 +1168,9 @@ import CodeListService from "@service/app/codelist-service";
* 获取选中行胡数据 * 获取选中行胡数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected getSelection(): any[] { public getSelection(): any[] {
return this.selections; return this.selections;
} }
...@@ -1020,9 +1179,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1020,9 +1179,9 @@ import CodeListService from "@service/app/codelist-service";
* *
* @param {*} $event * @param {*} $event
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected rowDBLClick($event: any): void { public rowDBLClick($event: any): void {
if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) { if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) {
return; return;
} }
...@@ -1044,9 +1203,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1044,9 +1203,9 @@ import CodeListService from "@service/app/codelist-service";
* *
* @param {*} $event * @param {*} $event
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected select($event: any): void { public select($event: any): void {
if (!$event) { if (!$event) {
return; return;
} }
...@@ -1059,9 +1218,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1059,9 +1218,9 @@ import CodeListService from "@service/app/codelist-service";
* 复选框数据全部选中 * 复选框数据全部选中
* *
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected selectAll($event: any): void { public selectAll($event: any): void {
if (!$event) { if (!$event) {
return; return;
} }
...@@ -1076,9 +1235,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1076,9 +1235,9 @@ import CodeListService from "@service/app/codelist-service";
* *
* @param {*} $event * @param {*} $event
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected rowClick($event: any, ifAlways: boolean = false): void { public rowClick($event: any, ifAlways: boolean = false): void {
if (!ifAlways && (!$event || this.actualIsOpenEdit)) { if (!ifAlways && (!$event || this.actualIsOpenEdit)) {
return; return;
} }
...@@ -1091,7 +1250,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1091,7 +1250,7 @@ import CodeListService from "@service/app/codelist-service";
} }
// 已选中则删除,没选中则添加 // 已选中则删除,没选中则添加
let selectIndex = this.selections.findIndex((item:any)=>{ let selectIndex = this.selections.findIndex((item:any)=>{
return Object.is(item.${ctrl.getPSDataEntity().getName()?lower_case},$event.${ctrl.getPSDataEntity().getName()?lower_case}); return Object.is(item.${ctrl.getPSAppDataEntity().getName()?lower_case},$event.${ctrl.getPSAppDataEntity().getName()?lower_case});
}); });
if (Object.is(selectIndex,-1)){ if (Object.is(selectIndex,-1)){
this.selections.push(JSON.parse(JSON.stringify($event))); this.selections.push(JSON.parse(JSON.stringify($event)));
...@@ -1118,9 +1277,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1118,9 +1277,9 @@ import CodeListService from "@service/app/codelist-service";
* *
* @param {*} $event * @param {*} $event
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected pageOnChange($event: any): void { public pageOnChange($event: any): void {
if (!$event) { if (!$event) {
return; return;
} }
...@@ -1136,9 +1295,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1136,9 +1295,9 @@ import CodeListService from "@service/app/codelist-service";
* *
* @param {*} $event * @param {*} $event
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onPageSizeChange($event: any): void { public onPageSizeChange($event: any): void {
if (!$event) { if (!$event) {
return; return;
} }
...@@ -1154,9 +1313,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1154,9 +1313,9 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 分页刷新 * 分页刷新
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected pageRefresh(): void { public pageRefresh(): void {
this.load({}); this.load({});
} }
...@@ -1164,9 +1323,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1164,9 +1323,9 @@ import CodeListService from "@service/app/codelist-service";
* 排序变化 * 排序变化
* *
* @param {{ column: any, prop: any, order: any }} { column, prop, order } * @param {{ column: any, prop: any, order: any }} { column, prop, order }
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onSortChange({ column, prop, order }: { column: any, prop: any, order: any }): void { public onSortChange({ column, prop, order }: { column: any, prop: any, order: any }): void {
const dir = Object.is(order, 'ascending') ? 'asc' : Object.is(order, 'descending') ? 'desc' : ''; const dir = Object.is(order, 'ascending') ? 'asc' : Object.is(order, 'descending') ? 'desc' : '';
if (Object.is(dir, this.minorSortDir) && Object.is(this.minorSortPSDEF, prop)) { if (Object.is(dir, this.minorSortDir) && Object.is(this.minorSortPSDEF, prop)) {
return; return;
...@@ -1181,9 +1340,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1181,9 +1340,9 @@ import CodeListService from "@service/app/codelist-service";
* *
* @param {{ row: any, rowIndex: any }} { row, rowIndex } * @param {{ row: any, rowIndex: any }} { row, rowIndex }
* @returns {string} * @returns {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onRowClassName({ row, rowIndex }: { row: any, rowIndex: any }): string { public onRowClassName({ row, rowIndex }: { row: any, rowIndex: any }): string {
const index = this.selections.findIndex((select: any) => Object.is(select.srfkey, row.srfkey)); const index = this.selections.findIndex((select: any) => Object.is(select.srfkey, row.srfkey));
return index !== -1 ? 'grid-row-select' : ''; return index !== -1 ? 'grid-row-select' : '';
} }
...@@ -1193,15 +1352,15 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1193,15 +1352,15 @@ import CodeListService from "@service/app/codelist-service";
* 合计行绘制 * 合计行绘制
* *
* @param {any} param * @param {any} param
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected getSummaries(param:any){ public getSummaries(param:any){
<#if ctrl.getAggMode() == "PAGE"> <#if ctrl.getAggMode() == "PAGE">
const { columns, data } = param; const { columns, data } = param;
const sums:Array<any> = []; const sums:Array<any> = [];
columns.forEach((column:any, index:number) => { columns.forEach((column:any, index:number) => {
if (index === 0) { if (index === 0) {
sums[index] = '合计'; sums[index] = (this.$t('app.gridpage.sum') as string);
return; return;
} }
if(index === (columns.length - 1)){ if(index === (columns.length - 1)){
...@@ -1281,7 +1440,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1281,7 +1440,7 @@ import CodeListService from "@service/app/codelist-service";
const sums:Array<any> = []; const sums:Array<any> = [];
columns.forEach((column:any, index:number) => { columns.forEach((column:any, index:number) => {
if (index === 0) { if (index === 0) {
sums[index] = '合计'; sums[index] = (this.$t('app.gridpage.sum') as string);
return; return;
}else if(index === (columns.length - 1)){ }else if(index === (columns.length - 1)){
sums[index] = ''; sums[index] = '';
...@@ -1319,13 +1478,13 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1319,13 +1478,13 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 远程获取合计行数据 * 远程获取合计行数据
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected getAggData(){ public getAggData(){
this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{ this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -1337,7 +1496,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1337,7 +1496,7 @@ import CodeListService from "@service/app/codelist-service";
} }
this.remoteData = {}; this.remoteData = {};
this.isDisplay = true; this.isDisplay = true;
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}) })
} }
</#if> </#if>
...@@ -1348,10 +1507,11 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1348,10 +1507,11 @@ import CodeListService from "@service/app/codelist-service";
* @param {*} row * @param {*} row
* @param {*} tag * @param {*} tag
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public uiAction(row: any, tag: any, $event: any) { public uiAction(row: any, tag: any, $event: any) {
// this.rowClick(row, true); // this.rowClick(row, true);
$event.stopPropagation();
<#if ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic> <#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??> <#if logic.getPSAppViewUIAction().getPSUIAction()??>
...@@ -1367,10 +1527,10 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1367,10 +1527,10 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 设置列状态 * 设置列状态
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected setColState() { public setColState() {
const _data: any = localStorage.getItem('${ctrl.getPSDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}'); const _data: any = localStorage.getItem('${ctrl.getPSAppDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}');
if (_data) { if (_data) {
let columns = JSON.parse(_data); let columns = JSON.parse(_data);
columns.forEach((col: any) => { columns.forEach((col: any) => {
...@@ -1385,10 +1545,10 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1385,10 +1545,10 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 列变化 * 列变化
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected onColChange() { public onColChange() {
localStorage.setItem('${ctrl.getPSDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}', JSON.stringify(this.allColumns)); localStorage.setItem('${ctrl.getPSAppDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}', JSON.stringify(this.allColumns));
} }
/** /**
...@@ -1396,67 +1556,101 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1396,67 +1556,101 @@ import CodeListService from "@service/app/codelist-service";
* *
* @param {string} name * @param {string} name
* @returns {boolean} * @returns {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected getColumnState(name: string): boolean { public getColumnState(name: string): boolean {
let column = this.allColumns.find((col: any) => let column = this.allColumns.find((col: any) =>
Object.is(name, col.name) Object.is(name, col.name)
); );
return column.show ? true : false; return column.show ? true : false;
} }
/**
* 表格列是否自适应布局
*
* @readonly
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
get adaptiveState(): boolean {
return !this.allColumns.find((column: any) => column.show && Object.is(column.util, 'STAR'));
}
/** /**
* 保存 * 保存
* *
* @param {*} $event * @param {*} $event
* @returns {void} * @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected async save(args: any[], params?: any, $event?: any, xData?: any) { public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this; let _this = this;
let promises:any = []; if(_this.items && _this.items.length >0){
_this.items.forEach((item:any)=>{ for (const item of _this.items) {
if(!item.rowDataState){ if(Object.is(item.rowDataState, 'update')){
return; _this.updateDefault(item);
} else if(Object.is(item.rowDataState, 'create')){ }
if(!this.createAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格createAction参数未配置' });
return;
} }
}
if(!await this.validateAll()){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
return [];
}
let successItems:any = [];
let errorItems:any = [];
let errorMessage:any = [];
for (const item of _this.items) {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
promises.push(this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator)); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
successItems.push(JSON.parse(JSON.stringify(response.data)));
}
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格updateAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
return; }else{
}
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
<#if de??> <#if de??>
if(item.${appde.getCodeName()?lower_case}){ if(item.${appde.getCodeName()?lower_case}){
Object.assign(this.context,{${appde.getCodeName()?lower_case}:item.${appde.getCodeName()?lower_case}}) Object.assign(this.context,{${appde.getCodeName()?lower_case}:item.${appde.getCodeName()?lower_case}});
} }
</#if> </#if>
promises.push(this.service.add(this.updateAction,JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator)); let response = await this.service.update(this.updateAction,JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
successItems.push(JSON.parse(JSON.stringify(response.data)));
} }
}
} catch (error) {
errorItems.push(JSON.parse(JSON.stringify(item)));
errorMessage.push(error);
}
}
this.$emit('save', successItems);
this.refresh([]);
if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{
errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: errorMessage[index].data.message });
console.error(errorMessage[index]);
}); });
Promise.all(promises).then((response: any) => { }
this.$emit('save', response); return successItems;
}).catch((response: any) => {
this.$Notice.error({ title: '错误', desc: '系统异常' });
});
} }
<#if ctrl.isEnableRowEdit()>
/** /**
* 新建行 * 新建行
* *
* @param {*} $event * @param {*} $event
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected newRow(args: any[], params?: any, $event?: any, xData?: any): void { public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格loaddraftAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return; return;
} }
let _this = this; let _this = this;
...@@ -1465,19 +1659,21 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1465,19 +1659,21 @@ import CodeListService from "@service/app/codelist-service";
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
const data = response.data; const data = response.data;
this.createDefault(data);
data.rowDataState = "create"; data.rowDataState = "create";
_this.items.push(data); _this.items.push(data);
_this.gridItemsModel.push(_this.getGridRowModel());
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -1489,7 +1685,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1489,7 +1685,7 @@ import CodeListService from "@service/app/codelist-service";
* @param row 行数据 * @param row 行数据
* @param {{ name: string, value: any }} $event * @param {{ name: string, value: any }} $event
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onGridItemValueChange(row: any,$event: { name: string, value: any },rowIndex: number): void { public onGridItemValueChange(row: any,$event: { name: string, value: any },rowIndex: number): void {
if (!$event) { if (!$event) {
...@@ -1505,15 +1701,21 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1505,15 +1701,21 @@ import CodeListService from "@service/app/codelist-service";
/** /**
* 表格编辑项值变化 * 表格编辑项值变化
* *
* @private * @public
* @param row 行数据 * @param row 行数据
* @param property 列编辑项名 * @param property 列编辑项名
* @param row 列编辑项值 * @param row 列编辑项值
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){ public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){
row.rowDataState = row.rowDataState ? row.rowDataState : "update" ; row.rowDataState = row.rowDataState ? row.rowDataState : "update" ;
if(Object.is(row.rowDataState,"update")){
if(!value && this.defaultUpdateItems.includes(property)){
row.hasUpdated = true;
}
}
this.validate(property,row,rowIndex);
<#if ctrl.getPSDEGridEditItems()??> <#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem> <#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getPSDEGridEditItemUpdate()??> <#if editItem.getPSDEGridEditItemUpdate()??>
...@@ -1535,9 +1737,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1535,9 +1737,9 @@ import CodeListService from "@service/app/codelist-service";
* @param {string[]} updateDetails 更新项 * @param {string[]} updateDetails 更新项
* @param {boolean} [showloading] 是否显示加载状态 * @param {boolean} [showloading] 是否显示加载状态
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected updateGridEditItem(mode: string, data: any = {}, updateDetails: string[], showloading?: boolean): void { public updateGridEditItem(mode: string, data: any = {}, updateDetails: string[], showloading?: boolean): void {
if (!mode || (mode && Object.is(mode, ''))) { if (!mode || (mode && Object.is(mode, ''))) {
return; return;
} }
...@@ -1546,7 +1748,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1546,7 +1748,7 @@ import CodeListService from "@service/app/codelist-service";
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading); const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '表单项更新失败' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.gridpage.formitemFailed') as string) });
return; return;
} }
const _data: any = response.data; const _data: any = response.data;
...@@ -1564,26 +1766,124 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1564,26 +1766,124 @@ import CodeListService from "@service/app/codelist-service";
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
} }
</#if>
/** /**
* 获取对应行class * 获取对应行class
* *
* @param {*} $args row 行数据,rowIndex 行索引 * @param {*} $args row 行数据,rowIndex 行索引
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
protected getRowClassName(args:{row: any,rowIndex: number}){ public getRowClassName(args:{row: any,rowIndex: number}){
let isSelected = this.selections.some((item:any)=>{ let isSelected = this.selections.some((item:any)=>{
return Object.is(item.${appde.getCodeName()?lower_case},args.row.${appde.getCodeName()?lower_case}); return Object.is(item.${appde.getCodeName()?lower_case},args.row.${appde.getCodeName()?lower_case});
}); });
return isSelected ? "grid-selected-row" : ""; return isSelected ? "grid-selected-row" : "";
} }
/**
* 获取对应列class
*
* @param {*} $args row 行数据,column 列数据,rowIndex 行索引,列索引
* @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getCellClassName(args:{row: any, column: any, rowIndex: number, columnIndex:number}){
if(args.column.property){
let col = this.allColumns.find((item:any)=>{
return Object.is(args.column.property,item.name);
})
if(col !== undefined){
if(col.isEnableRowEdit && this.actualIsOpenEdit ){
return 'edit-cell';
}
}
}
return 'info-cell';
}
/**
* 新建默认值
* @param {*} row 行数据
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public createDefault(row: any){
<#list ctrl.getPSDEGridEditItems() as editItem><#t>
<#if editItem.getCreateDV?? && editItem.getCreateDV()??><#t>
<#if !(editItem.getCreateDV() == '') || editItem.getCreateDVT() == 'CURTIME'><#t>
if (row.hasOwnProperty('${editItem.getCodeName()?lower_case}')) {
<#-- 网页请求 -->
<#if editItem.getCreateDVT() == 'CONTEXT'>
row['${editItem.getCodeName()?lower_case}'] = this.viewparams['${editItem.getCreateDV()}'];
<#-- 用户全局对象 -->
<#elseif editItem.getCreateDVT() == 'SESSION'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getCreateDV()}'];
<#-- 当前应用数据 -->
<#elseif editItem.getCreateDVT() == 'APPDATA'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getCreateDV()}'];
<#-- 当前操作用户(名称) -->
<#elseif editItem.getCreateDVT() == 'OPERATORNAME'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfusername'];
<#-- 当前操作用户(编号) -->
<#elseif editItem.getCreateDVT() == 'OPERATOR'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfuserid'];
<#-- 当前时间 -->
<#elseif editItem.getCreateDVT() == 'CURTIME'>
row['${editItem.getCodeName()?lower_case}'] = this.$util.dateFormat(new Date());
<#else>
<#-- 默认值 -->
<#assign datatype=srfjavatype(editItem.getPSAppDEField().getStdDataType())>
row['${editItem.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${editItem.getCreateDV()}<#else>'${editItem.getCreateDV()}'</#if>;
</#if>
}
</#if>
</#if>
</#list>
}
/**
* 更新默认值
* @param {*} row 行数据
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public updateDefault(row: any){
<#list ctrl.getPSDEGridEditItems() as editItem><#t>
<#if editItem.getUpdateDV?? && editItem.getUpdateDV()??><#t>
<#if !(editItem.getUpdateDV() == '') || editItem.getUpdateDVT() == 'CURTIME'><#t>
if (row.hasOwnProperty('${editItem.getCodeName()?lower_case}') && !row.${editItem.getCodeName()?lower_case} && !row.hasUpdated) {
<#-- 网页请求 -->
<#if editItem.getUpdateDVT() == 'CONTEXT'>
row['${editItem.getCodeName()?lower_case}'] = this.viewparams['${editItem.getUpdateDV()}'];
<#-- 用户全局对象 -->
<#elseif editItem.getUpdateDVT() == 'SESSION'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getUpdateDV()}'];
<#-- 当前应用数据 -->
<#elseif editItem.getUpdateDVT() == 'APPDATA'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getUpdateDV()}'];
<#-- 当前操作用户(名称) -->
<#elseif editItem.getUpdateDVT() == 'OPERATORNAME'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfusername'];
<#-- 当前操作用户(编号) -->
<#elseif editItem.getUpdateDVT() == 'OPERATOR'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfuserid'];
<#-- 当前时间 -->
<#elseif editItem.getUpdateDVT() == 'CURTIME'>
row['${editItem.getCodeName()?lower_case}'] = this.$util.dateFormat(new Date());
<#else>
<#-- 默认值 -->
<#assign datatype=srfjavatype(editItem.getPSAppDEField().getStdDataType())>
row['${editItem.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${editItem.getUpdateDV()}<#else>'${editItem.getUpdateDV()}'</#if>;
</#if>
}
</#if>
</#if>
</#list>
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<img class="logout-bg" src="/assets/img/logout_bg.png"/> <img class="logout-bg" src="/assets/img/logout_bg.png"/>
<div class="logout-container"> <div class="logout-container">
尊敬的客户您好,您已成功退出系统,将在 <a>{{this.countdown}}</a> 秒后跳转至<a @click="gotoLoginView">登录页</a>! {{ $t('app.viewLayoutPanel.appLogoutView.prompt1') }} <a>{{this.countdown}}</a> {{ $t('app.viewLayoutPanel.appLogoutView.prompt2') }} <a @click="gotoLoginView">{{ $t('app.viewLayoutPanel.appLogoutView.loginpage') }}</a>!
</div> </div>
</div> </div>
\ No newline at end of file
<div class="${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>"> <div class="${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> <app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<div>应用流程处理记录视图</div> <div>{{$t('app.viewLayoutPanel.appWfstepTraceView.title')}}</div>
</div> </div>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
../@MACRO/VIEW_CAPTION.vue.ftl ../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude> </#ibizinclude>
<div class='content-container'> <div class='content-container'>
应用流程跟踪视图 {{$t('app.viewLayoutPanel.appWfstepDataView.title')}}
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
...@@ -5,18 +5,18 @@ ...@@ -5,18 +5,18 @@
<div class="login-title">{{$t(model.srfTitle)}}</div> <div class="login-title">{{$t(model.srfTitle)}}</div>
<i-form class="login-form"> <i-form class="login-form">
<form-item> <form-item>
<i-input type="text" v-model="formData.loginname" placeholder="用户名" clearable> <i-input type="text" v-model="formData.loginname" :placeholder="$t('app.viewLayoutPanel.appLoginView.username')" clearable>
<icon type="ios-person-outline" slot="prepend"></icon> <icon type="ios-person-outline" slot="prepend"></icon>
</i-input> </i-input>
</form-item> </form-item>
<form-item> <form-item>
<i-input type="password" v-model="formData.password" placeholder="密码" clearable> <i-input type="password" v-model="formData.password" :placeholder="$t('app.viewLayoutPanel.appLoginView.password')" clearable>
<icon type="ios-lock-outline" slot="prepend"></icon> <icon type="ios-lock-outline" slot="prepend"></icon>
</i-input> </i-input>
</form-item> </form-item>
</i-form> </i-form>
<div class="form-submit"> <div class="form-submit">
<i-button @click="handleSubmit" long type="primary">登录</i-button> <i-button @click="handleSubmit" long type="primary">{{ $t('app.viewLayoutPanel.appLoginView.login') }}</i-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<div>无扩展插件</div> <div>{{$t('app.portlet.noExtensions')}}</div>
</#if> </#if>
</div> </div>
<#-- 操作栏 --> <#-- 操作栏 -->
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<#if ctrl.render??> <#if ctrl.render??>
${ctrl.render.code} ${ctrl.render.code}
<#else> <#else>
<app-actionbar :items="actionBarModelData" @itemClick="handleItemClick"></app-actionbar> <app-actionbar :viewState="viewState" :uiService="appUIService" :items="actionBarModelData" @itemClick="handleItemClick"></app-actionbar>
</#if> </#if>
</div> </div>
<#-- HTML --> <#-- HTML -->
...@@ -208,6 +208,9 @@ import { Environment } from '@/environments/environment'; ...@@ -208,6 +208,9 @@ import { Environment } from '@/environments/environment';
<#assign counter = uiaction.getPSAppCounter() /> <#assign counter = uiaction.getPSAppCounter() />
counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice, counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice,
<#if uiaction.getCounterId()??>counterId:"${uiaction.getCounterId()}",</#if> <#if uiaction.getCounterId()??>counterId:"${uiaction.getCounterId()}",</#if>
noprivdisplaymode:'<#if uiaction.getNoPrivDisplayMode(view)??>${uiaction.getNoPrivDisplayMode(view)}</#if>',
dataaccaction:'<#if uiaction.getDataAccessAction()??>${uiaction.getDataAccessAction()}</#if>',
visabled:true,disabled:false
</#if> </#if>
</#if> </#if>
</#if> </#if>
......
<#if item.render??>
${item.render.code}
<#else>
<input-box <input-box
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
v-model="row[column.property]" v-model="row[column.property]"
...@@ -7,3 +10,4 @@ ...@@ -7,3 +10,4 @@
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box> </input-box>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box <input-box
<#if item.getEnableCond??> <#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
...@@ -9,3 +12,4 @@ ...@@ -9,3 +12,4 @@
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{panelEditItemChange(data, ${editor.getName()?lower_case}, $event)}"> @change="($event)=>{panelEditItemChange(data, ${editor.getName()?lower_case}, $event)}">
</input-box> </input-box>
</#if>
<app-rich-text-editor :formState="formState" :value="data.${editor.name}" @change="(val) =>{this.data.${editor.name} =val}" :disabled="detailsModel.${editor.name}.disabled" name="${editor.name}"<#if editor.getEditorHeight() gt 0> height={${editor.getEditorHeight()?c}}</#if> style="${editor.getEditorCssStyle()}"></app-rich-text-editor> <#if item.render??>
\ No newline at end of file ${item.render.code}
<#else>
<app-rich-text-editor :formState="formState" :value="data.${editor.name}" @change="(val) =>{this.data.${editor.name} =val}" :disabled="detailsModel.${editor.name}.disabled" :data="JSON.stringify(this.data)" name="${editor.name}" :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' <#if editor.getEditorHeight() gt 0> height={${editor.getEditorHeight()?c}}</#if> style="${editor.getEditorCssStyle()}"></app-rich-text-editor>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<app-rich-text-editor :formState="formState" :value="data.${editor.name?lower_case}" @change="(val) =>{this.data.${editor.name?lower_case} =val}" <#if item.getEnableCond??>:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"</#if> name="${editor.name?lower_case}"<#if editor.getEditorHeight() gt 0> height={${editor.getEditorHeight()?c}}</#if> style="${editor.getEditorCssStyle()}"></app-rich-text-editor> <app-rich-text-editor :formState="formState" :value="data.${editor.name?lower_case}" @change="(val) =>{this.data.${editor.name?lower_case} =val}" <#if item.getEnableCond??>:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"</#if> name="${editor.name?lower_case}"<#if editor.getEditorHeight() gt 0> height={${editor.getEditorHeight()?c}}</#if> style="${editor.getEditorCssStyle()}"></app-rich-text-editor>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list <dropdown-list
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
...@@ -14,3 +17,4 @@ ...@@ -14,3 +17,4 @@
</#if> </#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}"> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}">
</dropdown-list> </dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list <dropdown-list
v-model="row[column.property]" v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
...@@ -16,3 +19,4 @@ ...@@ -16,3 +19,4 @@
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list> </dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list <dropdown-list
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> <#if item.getEnableCond??>
...@@ -18,3 +21,4 @@ ...@@ -18,3 +21,4 @@
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</dropdown-list> </dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list <dropdown-list
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
...@@ -15,3 +18,4 @@ ...@@ -15,3 +18,4 @@
</#if> </#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>>
</dropdown-list> </dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list <dropdown-list
v-model="row[column.property]" v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
...@@ -16,3 +19,4 @@ ...@@ -16,3 +19,4 @@
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list> </dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list <dropdown-list
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> <#if item.getEnableCond??>
...@@ -18,3 +21,4 @@ ...@@ -18,3 +21,4 @@
style="${item.getEditorCssStyle()}width: 100px;" style="${item.getEditorCssStyle()}width: 100px;"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</dropdown-list> </dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list-mpicker <dropdown-list-mpicker
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
...@@ -6,6 +9,7 @@ ...@@ -6,6 +9,7 @@
:viewparams="viewparams" :viewparams="viewparams"
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??> <#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()> <#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}' tag='${codelist.codeName}'
...@@ -16,3 +20,4 @@ ...@@ -16,3 +20,4 @@
</#if> </#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}"> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}">
</dropdown-list-mpicker> </dropdown-list-mpicker>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list-mpicker <dropdown-list-mpicker
v-model="row[column.property]" v-model="row[column.property]"
:data="row" :data="row"
...@@ -17,3 +20,4 @@ ...@@ -17,3 +20,4 @@
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</dropdown-list-mpicker> </dropdown-list-mpicker>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list-mpicker <dropdown-list-mpicker
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
:data="data" :data="data"
...@@ -19,3 +22,4 @@ ...@@ -19,3 +22,4 @@
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}" @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</dropdown-list-mpicker> </dropdown-list-mpicker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-code-editor :code="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" @change="(val) =>{this.data.${editor.name} =val}" codetype="javascript" ></app-code-editor> <app-code-editor :code="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" @change="(val) =>{this.data.${editor.name} =val}" codetype="javascript" ></app-code-editor>
</#if>
\ No newline at end of file
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select> <app-org-select :data="data" :disabled="detailsModel.${editor.name}.disabled" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select> <app-org-select :data="data" :disabled="detailsModel.${editor.name}.disabled" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select> <app-org-select :data="data" :disabled="detailsModel.${editor.name}.disabled" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select> <app-org-select :data="data" :disabled="detailsModel.${editor.name}.disabled" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-radio-group <app-radio-group
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
...@@ -15,3 +18,4 @@ ...@@ -15,3 +18,4 @@
</#if> </#if>
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-radio-group> </app-radio-group>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-radio-group <app-radio-group
v-model="row[column.property]" v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
...@@ -16,3 +19,4 @@ ...@@ -16,3 +19,4 @@
</#if> </#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-radio-group> </app-radio-group>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-radio-group <app-radio-group
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> <#if item.getEnableCond??>
...@@ -18,3 +21,4 @@ ...@@ -18,3 +21,4 @@
</#if> </#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-radio-group> </app-radio-group>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-image-upload :multiple="true" :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange" :data="JSON.stringify(this.data)" name='${editor.name}' :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' style="${editor.getEditorCssStyle()}overflow: auto;"></app-image-upload> <app-image-upload :multiple="true" :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange" :data="JSON.stringify(this.data)" name='${editor.name}' :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' style="${editor.getEditorCssStyle()}overflow: auto;"></app-image-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
...@@ -11,3 +14,4 @@ ...@@ -11,3 +14,4 @@
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
style="${editor.getEditorCssStyle()}overflow: auto;"> style="${editor.getEditorCssStyle()}overflow: auto;">
</app-file-upload> </app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
...@@ -14,3 +17,4 @@ ...@@ -14,3 +17,4 @@
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
style="${editor.getEditorCssStyle()}overflow: auto;"> style="${editor.getEditorCssStyle()}overflow: auto;">
</app-file-upload> </app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-image-upload :multiple="false" :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange" :data="JSON.stringify(this.data)" name='${editor.name}' :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' ></app-image-upload> <app-image-upload :multiple="false" :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange" :data="JSON.stringify(this.data)" name='${editor.name}' :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' ></app-image-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
...@@ -11,3 +14,4 @@ ...@@ -11,3 +14,4 @@
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
style="${editor.getEditorCssStyle()}overflow: auto;"> style="${editor.getEditorCssStyle()}overflow: auto;">
</app-file-upload> </app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
...@@ -13,3 +16,4 @@ ...@@ -13,3 +16,4 @@
:uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
style="${editor.getEditorCssStyle()}overflow: auto;"> style="${editor.getEditorCssStyle()}overflow: auto;">
</app-file-upload> </app-file-upload>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-mpicker <app-mpicker
:activeData="data" :activeData="data"
...@@ -21,3 +24,4 @@ ...@@ -21,3 +24,4 @@
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-mpicker> </app-mpicker>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-mpicker <app-mpicker
:activeData="row" :activeData="row"
...@@ -21,3 +24,4 @@ ...@@ -21,3 +24,4 @@
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-mpicker> </app-mpicker>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-mpicker <app-mpicker
:activeData="data" :activeData="data"
...@@ -21,3 +24,4 @@ ...@@ -21,3 +24,4 @@
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-mpicker> </app-mpicker>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-mpicker <app-mpicker
:activeData="row" :activeData="row"
...@@ -21,3 +24,4 @@ ...@@ -21,3 +24,4 @@
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-mpicker> </app-mpicker>
</#if> </#if>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<input-box v-model="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" type='textarea' style="${editor.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></input-box> <input-box v-model="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" type='textarea' style="${editor.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></input-box>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea class="ivu-input" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea> <textarea class="ivu-input" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea>
</div> </div>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea <textarea
class="ivu-input" class="ivu-input"
...@@ -12,3 +15,4 @@ ...@@ -12,3 +15,4 @@
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</textarea> </textarea>
</div> </div>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box v-model="data.${editor.name}" :textareaId="this.$util.createUUID()" :disabled="detailsModel.${editor.name}.disabled" type='textarea' textareaStyle="${editor.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></input-box> <input-box v-model="data.${editor.name}" :textareaId="this.$util.createUUID()" :disabled="detailsModel.${editor.name}.disabled" type='textarea' textareaStyle="${editor.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></input-box>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea class="ivu-input" rows="10" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea> <textarea class="ivu-input" rows="10" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea>
</div> </div>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type"> <div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea <textarea
class="ivu-input" class="ivu-input"
...@@ -13,3 +16,4 @@ ...@@ -13,3 +16,4 @@
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</textarea> </textarea>
</div> </div>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<i-input type="password" v-model="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></i-input> <i-input type="password" v-model="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></i-input>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<input-box type="password" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></input-box> <input-box type="password" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></input-box>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box <input-box
type="password" type="password"
<#if item.getEnableCond??> <#if item.getEnableCond??>
...@@ -7,3 +10,4 @@ ...@@ -7,3 +10,4 @@
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</input-box> </input-box>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-switch name='${editor.name}' :value="this.data.${editor.name}" @change="($event)=>{this.data.${editor.name} = $event} " :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-switch> <app-switch name='${editor.name}' :value="this.data.${editor.name}" @change="($event)=>{this.data.${editor.name} = $event} " :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-switch>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<app-switch name='${editor.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event;gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-switch> <app-switch name='${editor.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event;gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-switch>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-switch <app-switch
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
...@@ -7,3 +10,4 @@ ...@@ -7,3 +10,4 @@
</#if> </#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-switch> </app-switch>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box <input-box
v-model="data.${editor.name}" v-model="data.${editor.name}"
@enter="onEnter($event)" @enter="onEnter($event)"
<#if editor.getUnitName?? && editor.getUnitName()??>unit="${editor.getUnitName()}"</#if> <#if editor.getUnitName?? && editor.getUnitName()??>unit="${editor.getUnitName()}"</#if>
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
type='number' type='number'
<#if item.getPSAppDEField().getPSDEField().getPrecision??> <#if item.getPSAppDEField()?? && item.getPSAppDEField().getPSDEField()?? && item.getPSAppDEField().getPSDEField().getPrecision??>
<#if item.getPSAppDEField().getPSDEField().getDataType() == 'FLOAT' && item.getPSAppDEField().getPSDEField().getPrecision() == 0> <#if item.getPSAppDEField().getPSDEField().getDataType() == 'FLOAT' && item.getPSAppDEField().getPSDEField().getPrecision() == 0>
:precision="2" :precision="2"
<#else> <#else>
...@@ -14,3 +17,4 @@ ...@@ -14,3 +17,4 @@
<#if editor.getPlaceHolder()??>placeholder="${editor.getPlaceHolder()}"</#if> <#if editor.getPlaceHolder()??>placeholder="${editor.getPlaceHolder()}"</#if>
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</input-box> </input-box>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<input-box <input-box
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
v-model="row[column.property]" v-model="row[column.property]"
...@@ -5,7 +8,7 @@ ...@@ -5,7 +8,7 @@
unit="${item.getUnitName()}" unit="${item.getUnitName()}"
</#if> </#if>
type="number" type="number"
<#if item.getPSAppDEField().getPSDEField().getPrecision??> <#if item.getPSAppDEField()?? && item.getPSAppDEField().getPSDEField()?? && item.getPSAppDEField().getPSDEField().getPrecision??>
<#if item.getPSAppDEField().getPSDEField().getDataType() == 'FLOAT' && item.getPSAppDEField().getPSDEField().getPrecision() == 0> <#if item.getPSAppDEField().getPSDEField().getDataType() == 'FLOAT' && item.getPSAppDEField().getPSDEField().getPrecision() == 0>
:precision="2" :precision="2"
<#else> <#else>
...@@ -18,3 +21,4 @@ ...@@ -18,3 +21,4 @@
</#if> </#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box> </input-box>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box <input-box
type="number" type="number"
<#if item.getEnableCond??> <#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#if> </#if>
<#if item.getUnitName()??>unit="${item.getUnitName()}"</#if> <#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if>
:precision="2"
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</input-box> </input-box>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -26,3 +29,4 @@ ...@@ -26,3 +29,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -26,3 +29,4 @@ ...@@ -26,3 +29,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -26,3 +29,4 @@ ...@@ -26,3 +29,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker-select-view <app-picker-select-view
...@@ -24,3 +27,4 @@ ...@@ -24,3 +27,4 @@
</app-picker-select-view> </app-picker-select-view>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker-select-view <app-picker-select-view
...@@ -24,3 +27,4 @@ ...@@ -24,3 +27,4 @@
</app-picker-select-view> </app-picker-select-view>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker-select-view <app-picker-select-view
...@@ -26,3 +29,4 @@ ...@@ -26,3 +29,4 @@
</app-picker-select-view> </app-picker-select-view>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker-select-view <app-picker-select-view
...@@ -26,3 +29,4 @@ ...@@ -26,3 +29,4 @@
</app-picker-select-view> </app-picker-select-view>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-picker <app-picker
:formState="formState" :formState="formState"
:data="data" :data="data"
...@@ -21,3 +24,4 @@ ...@@ -21,3 +24,4 @@
@formitemvaluechange="onFormItemValueChange"> @formitemvaluechange="onFormItemValueChange">
<@getItemRender editor /> <@getItemRender editor />
</app-picker> </app-picker>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-picker <app-picker
:formState="viewState" :formState="viewState"
:data="row" :data="row"
...@@ -21,3 +24,4 @@ ...@@ -21,3 +24,4 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
<@getItemRender editor /> <@getItemRender editor />
</app-picker> </app-picker>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if item.getRefPickupPSAppView()??> <#if item.getRefPickupPSAppView()??>
<#assign pickupview = item.getRefPickupPSAppView()> <#assign pickupview = item.getRefPickupPSAppView()>
<app-embed-picker <app-embed-picker
...@@ -26,3 +29,4 @@ ...@@ -26,3 +29,4 @@
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-embed-picker> </app-embed-picker>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if item.getRefPickupPSAppView()??> <#if item.getRefPickupPSAppView()??>
<#assign pickupview = item.getRefPickupPSAppView()> <#assign pickupview = item.getRefPickupPSAppView()>
<app-embed-picker <app-embed-picker
...@@ -26,3 +29,4 @@ ...@@ -26,3 +29,4 @@
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-embed-picker> </app-embed-picker>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -27,3 +30,4 @@ ...@@ -27,3 +30,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -27,3 +30,4 @@ ...@@ -27,3 +30,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -24,3 +27,4 @@ ...@@ -24,3 +27,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -24,3 +27,4 @@ ...@@ -24,3 +27,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -23,3 +26,4 @@ ...@@ -23,3 +26,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??> <#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??> <#if editor.getPickupPSAppView()??>
<app-picker <app-picker
...@@ -23,3 +26,4 @@ ...@@ -23,3 +26,4 @@
</app-picker> </app-picker>
</#if> </#if>
</#if> </#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-picker <app-picker
:formState="formState" :formState="formState"
:data="data" :data="data"
...@@ -19,3 +22,4 @@ ...@@ -19,3 +22,4 @@
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="onFormItemValueChange"> @formitemvaluechange="onFormItemValueChange">
</app-picker> </app-picker>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-picker <app-picker
:formState="viewState" :formState="viewState"
:data="row" :data="row"
...@@ -19,3 +22,4 @@ ...@@ -19,3 +22,4 @@
style="${editor.getEditorCssStyle()}" style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"> @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker> </app-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange" :data="JSON.stringify(this.data)" name='${editor.name}' :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' style="${editor.getEditorCssStyle()}overflow: auto;"></app-file-upload> <app-file-upload :formState="formState" :ignorefieldvaluechange="ignorefieldvaluechange" @formitemvaluechange="onFormItemValueChange" :data="JSON.stringify(this.data)" name='${editor.name}' :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" :uploadparams='<#if editor.getEditorParam('uploadparams','') != ''>${editor.getEditorParam('uploadparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' style="${editor.getEditorCssStyle()}overflow: auto;"></app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
...@@ -11,3 +14,4 @@ ...@@ -11,3 +14,4 @@
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
style="${editor.getEditorCssStyle()}overflow: auto;"> style="${editor.getEditorCssStyle()}overflow: auto;">
</app-file-upload> </app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
...@@ -13,3 +16,4 @@ ...@@ -13,3 +16,4 @@
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>' :exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
style="${editor.getEditorCssStyle()}overflow: auto;"> style="${editor.getEditorCssStyle()}overflow: auto;">
</app-file-upload> </app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box v-model="data.${editor.name}" @enter="onEnter($event)" <#if item.getUnitName()??> unit="${item.getUnitName()}"</#if> :disabled="detailsModel.${editor.name}.disabled" type='<#if item.getPSDEField()??><#assign datatype=srfjavatype(item.getPSDEField().getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>text</#if><#else>text</#if>' <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> style="${editor.getEditorCssStyle()}"></input-box> <input-box v-model="data.${editor.name}" @enter="onEnter($event)" <#if item.getUnitName()??> unit="${item.getUnitName()}"</#if> :disabled="detailsModel.${editor.name}.disabled" type='<#if item.getPSDEField()??><#assign datatype=srfjavatype(item.getPSDEField().getStdDataType())><#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>number<#else>text</#if><#else>text</#if>' <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> style="${editor.getEditorCssStyle()}"></input-box>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker> <date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker> <date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<date-picker <date-picker
type="datetime" type="datetime"
:transfer="true" :transfer="true"
...@@ -10,3 +13,4 @@ ...@@ -10,3 +13,4 @@
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; gridEditItemChange(data, '${editor.name?lower_case}', val1)}"> @on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; gridEditItemChange(data, '${editor.name?lower_case}', val1)}">
</date-picker> </date-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px;${editor.getEditorCssStyle()} <#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px;${editor.getEditorCssStyle()} <#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<date-picker <date-picker
type="date" type="date"
:transfer="true" :transfer="true"
...@@ -10,3 +13,4 @@ ...@@ -10,3 +13,4 @@
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; gridEditItemChange(data, '${editor.name?lower_case}', val1)}"> @on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; gridEditItemChange(data, '${editor.name?lower_case}', val1)}">
</date-picker> </date-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="mm" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="mm" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="row[column.property]" :transfer="true" format="mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker <time-picker
:transfer="true" :transfer="true"
format="mm" format="mm"
...@@ -9,3 +12,4 @@ ...@@ -9,3 +12,4 @@
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}">
</time-picker> </time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="row[column.property]" :transfer="true" format="HH" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker <time-picker
:transfer="true" :transfer="true"
format="HH" format="HH"
...@@ -9,3 +12,4 @@ ...@@ -9,3 +12,4 @@
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}">
</time-picker> </time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<date-picker <date-picker
type="date" type="date"
:transfer="true" :transfer="true"
...@@ -10,3 +13,4 @@ ...@@ -10,3 +13,4 @@
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; gridEditItemChange(data, '${editor.name?lower_case}', val1)}"> @on-change="(val1, val2) => { data.${editor.name?lower_case} = val1; gridEditItemChange(data, '${editor.name?lower_case}', val1)}">
</date-picker> </date-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH:mm:ss" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH:mm:ss" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="row[column.property]" :transfer="true" format="HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH:mm:ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker <time-picker
:transfer="true" :transfer="true"
format="HH:mm:ss" format="HH:mm:ss"
...@@ -9,3 +12,4 @@ ...@@ -9,3 +12,4 @@
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}">
</time-picker> </time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH:mm" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH:mm" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="row[column.property]" :transfer="true" format="HH:mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH:mm" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker <time-picker
:transfer="true" :transfer="true"
format="HH:mm" format="HH:mm"
...@@ -9,3 +12,4 @@ ...@@ -9,3 +12,4 @@
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}">
</time-picker> </time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="ss" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="ss" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<time-picker :value="row[column.property]" :transfer="true" format="ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="ss" placeholder="请选择时间..." :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker <time-picker
:transfer="true" :transfer="true"
format="ss" format="ss"
...@@ -9,3 +12,4 @@ ...@@ -9,3 +12,4 @@
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
@on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}"> @on-change="(val) => { data.${editor.name?lower_case} = val; gridEditItemChange(data, '${editor.name?lower_case}', val)}">
</time-picker> </time-picker>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<i-input v-model="data.${editor.name}" readonly disabled style="${editor.getEditorCssStyle()}"></i-input> <i-input v-model="data.${editor.name}" readonly disabled style="${editor.getEditorCssStyle()}"></i-input>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-span <#t> <app-span <#t>
name='${editor.name}' <#t> name='${editor.name}' <#t>
:value="data.${editor.name}" <#t> :value="data.${editor.name}" <#t>
<#-- 值格式化 start -->
<#-- @author ljy -->
<#-- @update 2020.7.13 18:08 -->
<#if item.getPSEditor().getPSEditorContainer().getPSAppDEField().getPSDEField().getDataType()??>
dataType="${item.getPSEditor().getPSEditorContainer().getPSAppDEField().getPSDEField().getDataType()}" <#t>
<#if item.getUnitName()!="">
unitName="${item.getUnitName()}" <#t>
</#if>
</#if>
<#if item.getPSEditor().getPSEditorContainer().getPSDEFUIMode().getPSDEFFormItem().getValueFormat()?? && item.getPSEditor().getPSEditorContainer().getPSDEFUIMode().getPSDEFFormItem().getValueFormat()!= "%1$s">
valueFormat="${item.getPSEditor().getPSEditorContainer().getPSDEFUIMode().getPSDEFFormItem().getValueFormat()}" <#t>
</#if>
<#-- 值格式化 end -->
<#-- 数值精度 start -->
<#-- @author mos -->
<#-- @update 2020.7.16 -->
<#if item.getPSEditor().getPSEditorContainer().getPSAppDEField().getPSDEField().getPrecision??>
<#if item.getPSEditor().getPSEditorContainer().getPSAppDEField().getPSDEField().getDataType() == 'FLOAT' && item.getPSEditor().getPSEditorContainer().getPSAppDEField().getPSDEField().getPrecision() == 0>
:precision="2"
<#else>
:precision="${item.getPSEditor().getPSEditorContainer().getPSAppDEField().getPSDEField().getPrecision()?c}"
</#if>
</#if>
<#-- 数值精度 end -->
<#if item.getPSCodeList?? && item.getPSCodeList()??> <#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList() /> <#assign codelist=item.getPSCodeList() />
tag='${codelist.codeName}' <#t> tag='${codelist.codeName}' <#t>
...@@ -22,4 +49,6 @@ ...@@ -22,4 +49,6 @@
:localContext =<@getNavigateContext editor /> <#t> :localContext =<@getNavigateContext editor /> <#t>
:localParam =<@getNavigateParams editor /> <#t> :localParam =<@getNavigateParams editor /> <#t>
style="${editor.getEditorCssStyle()}"><#t> style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt> </app-span><#lt>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-span <#t> <app-span <#t>
name='${editor.name}' <#t> name='${editor.name}' <#t>
:value="row[column.property]" <#t> :value="row[column.property]" <#t>
...@@ -23,3 +26,4 @@ ...@@ -23,3 +26,4 @@
:localParam =<@getNavigateParams editor /> <#t> :localParam =<@getNavigateParams editor /> <#t>
style="${editor.getEditorCssStyle()}"><#t> style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt> </app-span><#lt>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-span <#t> <app-span <#t>
:value="data.${editor.name?lower_case}" <#t> :value="data.${editor.name?lower_case}" <#t>
name="${editor.name?lower_case}" <#t> name="${editor.name?lower_case}" <#t>
...@@ -14,3 +17,4 @@ ...@@ -14,3 +17,4 @@
</#if> </#if>
style="${item.getEditorCssStyle()}"> <#t> style="${item.getEditorCssStyle()}"> <#t>
</app-span> <#lt> </app-span> <#lt>
</#if>
<span v-html="data.${editor.name}"></span> <span v-html="data.${item.getName()?lower_case}"></span>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<app-stepper name='${editor.name}' :value="this.data.${editor.name}" @change="onFormItemValueChange" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-stepper> <app-stepper name='${editor.name}' :value="this.data.${editor.name}" @change="onFormItemValueChange" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-stepper>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<app-stepper name='${editor.name}' :value="row[column.property]" @change="($event)=>{onGridItemValueChange(row,$event,$index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-stepper> <app-stepper name='${editor.name}' :value="row[column.property]" @change="($event)=>{onGridItemValueChange(row,$event,$index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-stepper>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-stepper <app-stepper
name='${editor.name}' name='${editor.name}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
...@@ -7,3 +10,4 @@ ...@@ -7,3 +10,4 @@
</#if> </#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-stepper> </app-stepper>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-slider name='${editor.name}' :value="this.data.${editor.name}" @change="onFormItemValueChange" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-slider> <app-slider name='${editor.name}' :value="this.data.${editor.name}" @change="onFormItemValueChange" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-slider>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<app-slider name='${editor.name}' :value="row[column.property]" @change="($event)=>{onGridItemValueChange(row,$event,$index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-slider> <app-slider name='${editor.name}' :value="row[column.property]" @change="($event)=>{onGridItemValueChange(row,$event,$index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-slider>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-slider <app-slider
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
...@@ -7,3 +10,4 @@ ...@@ -7,3 +10,4 @@
</#if> </#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-slider> </app-slider>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div style="${editor.getEditorCssStyle()}">{{data.${editor.name}}}</div> <div style="${editor.getEditorCssStyle()}">{{data.${editor.name}}}</div>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-autocomplete <app-autocomplete
:data="data" :data="data"
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
...@@ -18,3 +21,4 @@ ...@@ -18,3 +21,4 @@
@formitemvaluechange="onFormItemValueChange" @formitemvaluechange="onFormItemValueChange"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-autocomplete> </app-autocomplete>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-autocomplete <app-autocomplete
:data="row" :data="row"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
...@@ -18,3 +21,4 @@ ...@@ -18,3 +21,4 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-autocomplete> </app-autocomplete>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-rate name='${editor.name}' :value="this.data.${editor.name}" @change="($event)=>{this.data.${editor.name} = $event} " :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-rate> <app-rate name='${editor.name}' :value="this.data.${editor.name}" @change="($event)=>{this.data.${editor.name} = $event} " :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-rate>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<app-rate name='${item.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event; gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-rate> <app-rate name='${item.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event; gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}"></app-rate>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-rate <app-rate
name='${editor.name?lower_case}' name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
...@@ -7,3 +10,4 @@ ...@@ -7,3 +10,4 @@
</#if> </#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-rate> </app-rate>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div style="${editor.getEditorCssStyle()}"> <div style="${editor.getEditorCssStyle()}">
<app-checkbox :value="this.data.${editor.name}" @change="($event)=>{this.data.${editor.name} = $event} " :disabled="detailsModel.${editor.name}.disabled"></app-checkbox> <app-checkbox :value="this.data.${editor.name}" @change="($event)=>{this.data.${editor.name} = $event} " :disabled="detailsModel.${editor.name}.disabled"></app-checkbox>
</div> </div>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<div style="${item.getEditorCssStyle()}"> <div style="${item.getEditorCssStyle()}">
<app-checkbox :value="row[column.property]" @change="($event)=>{row[column.property] = $event;gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"></app-checkbox> <app-checkbox :value="row[column.property]" @change="($event)=>{row[column.property] = $event;gridEditItemChange(row, column.property, $event, $index)} " :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"></app-checkbox>
</div> </div>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div style="${item.getEditorCssStyle()}"> <div style="${item.getEditorCssStyle()}">
<app-checkbox :value="data.${editor.name?lower_case}" @change="($event)=>{data.${editor.name?lower_case} = $event;panelEditItemChange(data, '${editor.name?lower_case}', $event)} " <#if item.getEnableCond??>:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"</#if>></app-checkbox> <app-checkbox :value="data.${editor.name?lower_case}" @change="($event)=>{data.${editor.name?lower_case} = $event;panelEditItemChange(data, '${editor.name?lower_case}', $event)} " <#if item.getEnableCond??>:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"</#if>></app-checkbox>
</div> </div>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-checkbox-list <app-checkbox-list
v-model="data.${editor.name}" v-model="data.${editor.name}"
:data="data" :data="data"
...@@ -19,3 +22,4 @@ ...@@ -19,3 +22,4 @@
name="${editor.name}" name="${editor.name}"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-checkbox-list> </app-checkbox-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-checkbox-list <app-checkbox-list
v-model="row[column.property]" v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
...@@ -19,3 +22,4 @@ ...@@ -19,3 +22,4 @@
name="${item.name}" name="${item.name}"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</app-checkbox-list> </app-checkbox-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-checkbox-list <app-checkbox-list
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??> <#if item.getEnableCond??>
...@@ -21,3 +24,4 @@ ...@@ -21,3 +24,4 @@
name="${editor.name?lower_case}" name="${editor.name?lower_case}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</app-checkbox-list> </app-checkbox-list>
</#if>
<app-department-select :data="data" :context="JSON.parse(JSON.stringify(context))" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}<#else>/ibzorganizations/${orgid}/ibzdepartments/picker</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" :multiple=<#if item.getEditorParam('multiple','') != ''>"${item.getEditorParam('multiple','')}"<#else>"false"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select> <app-department-select :data="data" :disabled="detailsModel.${editor.name}.disabled" :context="JSON.parse(JSON.stringify(context))" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}<#else>/ibzorganizations/${orgid}/ibzdepartments/picker</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" :multiple=<#if item.getEditorParam('multiple','') != ''>"${item.getEditorParam('multiple','')}"<#else>"false"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select>
\ No newline at end of file
<app-department-select :data="data" :context="JSON.parse(JSON.stringify(context))" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}<#else>/ibzorganizations/${orgid}/ibzdepartments/picker</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" :multiple=<#if item.getEditorParam('multiple','') != ''>"${item.getEditorParam('multiple','')}"<#else>"false"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select> <app-department-select :data="data" :disabled="detailsModel.${editor.name}.disabled" :context="JSON.parse(JSON.stringify(context))" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}<#else>/ibzorganizations/${orgid}/ibzdepartments/picker</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" :multiple=<#if item.getEditorParam('multiple','') != ''>"${item.getEditorParam('multiple','')}"<#else>"false"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select>
\ No newline at end of file
<app-department-select :data="data" :context="JSON.parse(JSON.stringify(context))" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}<#else>/ibzorganizations/${orgid}/ibzdepartments/picker</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" :multiple=<#if item.getEditorParam('multiple','') != ''>"${item.getEditorParam('multiple','')}"<#else>"false"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select> <app-department-select :data="data" :disabled="detailsModel.${editor.name}.disabled" :context="JSON.parse(JSON.stringify(context))" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}<#else>/ibzorganizations/${orgid}/ibzdepartments/picker</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" :multiple=<#if item.getEditorParam('multiple','') != ''>"${item.getEditorParam('multiple','')}"<#else>"false"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select>
\ No newline at end of file
<app-department-select :data="data" :context="JSON.parse(JSON.stringify(context))" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}<#else>/ibzorganizations/${orgid}/ibzdepartments/picker</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" :multiple=<#if item.getEditorParam('multiple','') != ''>"${item.getEditorParam('multiple','')}"<#else>"false"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select> <app-department-select :data="data" :disabled="detailsModel.${editor.name}.disabled" :context="JSON.parse(JSON.stringify(context))" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}<#else>/ibzorganizations/${orgid}/ibzdepartments/picker</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" :multiple=<#if item.getEditorParam('multiple','') != ''>"${item.getEditorParam('multiple','')}"<#else>"false"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select>
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this; const _this: any = this;
const data: any = {}; const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) { if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData); _this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) { } else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData); xData.newRow([{ ...data }], params, $event, xData);
......
...@@ -24,6 +24,9 @@ import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservi ...@@ -24,6 +24,9 @@ import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservi
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#if appde??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#if import_block??> <#if import_block??>
${import_block} ${import_block}
</#if> </#if>
...@@ -48,6 +51,14 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name? ...@@ -48,6 +51,14 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name?
* @memberof ${srfclassname(view.name)}Base * @memberof ${srfclassname(view.name)}Base
*/ */
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service; public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service;
/**
* 实体UI服务对象
*
* @type ${srfclassname('${appde.getCodeName()}')}UIService
* @memberof ${srfclassname('${view.name}')}Base
*/
public appUIService: ${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
</#if> </#if>
<#if view.getPSAppCounterRefs()??> <#if view.getPSAppCounterRefs()??>
......
...@@ -216,6 +216,7 @@ ...@@ -216,6 +216,7 @@
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public onClickCancel(): void { public onClickCancel(): void {
this.$emit('viewdataschange', null);
this.$emit('close', null); this.$emit('close', null);
} }
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}
*/ */
public onClickCancel(): void { public onClickCancel(): void {
this.$emit('viewdataschange', null);
this.$emit('close', null); this.$emit('close', null);
} }
......
<#assign view_base_name>ViewBase</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl ../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude> </#ibizinclude>
......
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
import AuthService from '../auth-service';
/**
* ${de.getLogicName()}权限服务对象基类
*
* @export
* @class ${srfclassname('${item.getCodeName()}')}AuthServiceBase
* @extends {AuthService}
*/
export default class ${srfclassname('${item.getCodeName()}')}AuthServiceBase extends AuthService {
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}AuthServiceBase.
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}AuthServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {*} mainSateOPPrivs 传入数据操作标识
* @returns {any}
* @memberof ${srfclassname('${item.getCodeName()}')}AuthServiceBase
*/
public getOPPrivs(mainSateOPPrivs:any):any{
let curDefaultOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs));
if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
}
return curDefaultOPPrivs;
}
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
import ${srfclassname('${item.getCodeName()}')}AuthServiceBase from './${srffilepath2(item.getCodeName())}-auth-service-base';
/**
* ${de.getLogicName()}权限服务对象
*
* @export
* @class ${srfclassname('${item.getCodeName()}')}AuthService
* @extends {${srfclassname('${item.getCodeName()}')}AuthServiceBase}
*/
export default class ${srfclassname('${item.getCodeName()}')}AuthService extends ${srfclassname('${item.getCodeName()}')}AuthServiceBase {
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}AuthService.
*
* @param {*} [opts={}]
* @memberof ${srfclassname('${item.getCodeName()}')}AuthService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
/**
* 实体权限服务注册中心
*
* @export
* @class AuthServiceRegister
*/
export class AuthServiceRegister {
/**
* 所有实体权限服务Map
*
* @protected
* @type {*}
* @memberof AuthServiceRegister
*/
protected allAuthService: Map<string, () => Promise<any>> = new Map();
/**
* 已加载实体权限服务Map缓存
*
* @protected
* @type {Map<string, any>}
* @memberof AuthServiceRegister
*/
protected serviceCache: Map<string, any> = new Map();
/**
* Creates an instance of AuthServiceRegister.
* @memberof AuthServiceRegister
*/
constructor() {
this.init();
}
/**
* 初始化
*
* @protected
* @memberof AuthServiceRegister
*/
protected init(): void {
<#if app.getAllPSAppDataEntities()??>
<#list app.getAllPSAppDataEntities() as curAppEntity>
this.allAuthService.set('${curAppEntity.getCodeName()?lower_case}', () => import('@/authservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-auth-service'));
</#list>
</#if>
}
/**
* 加载实体权限服务
*
* @protected
* @param {string} serviceName
* @returns {Promise<any>}
* @memberof AuthServiceRegister
*/
protected async loadService(serviceName: string): Promise<any> {
const service = this.allAuthService.get(serviceName);
if (service) {
return service();
}
}
/**
* 获取应用实体权限服务
*
* @param {string} name
* @returns {Promise<any>}
* @memberof AuthServiceRegister
*/
public async getService(name: string): Promise<any> {
if (this.serviceCache.has(name)) {
return this.serviceCache.get(name);
}
const authService: any = await this.loadService(name);
if (authService && authService.default) {
const instance: any = new authService.default();
this.serviceCache.set(name, instance);
return instance;
}
}
}
export const authServiceRegister: AuthServiceRegister = new AuthServiceRegister();
\ No newline at end of file
...@@ -18,9 +18,23 @@ export default { ...@@ -18,9 +18,23 @@ export default {
success: "Success", success: "Success",
ok: "OK", ok: "OK",
cancel: "Cancel", cancel: "Cancel",
save: "Save",
codeNotExist: 'Code list does not exist',
reqException: "Request exception",
sysException: "System abnormality",
warning: "Warning",
wrong: "Error",
rulesException: "Abnormal value check rule",
saveSuccess: "Saved successfully",
saveFailed: "Save failed",
deleteSuccess: "Successfully deleted!",
deleteError: "Failed to delete",
delDataFail: "Failed to delete data",
noData: "No data",
}, },
local:{ local:{
new: "New" new: "New",
add: "Add",
}, },
gridpage: { gridpage: {
choicecolumns: "Choice columns", choicecolumns: "Choice columns",
...@@ -28,6 +42,50 @@ export default { ...@@ -28,6 +42,50 @@ export default {
show: "Show", show: "Show",
records: "records", records: "records",
totle: "totle", totle: "totle",
noData: "No data",
valueVail: "Value cannot be empty",
notConfig: {
fetchAction: "The view table fetchaction parameter is not configured",
removeAction: "The view table removeaction parameter is not configured",
createAction: "The view table createaction parameter is not configured",
updateAction: "The view table updateaction parameter is not configured",
loaddraftAction: "The view table loadtrafaction parameter is not configured",
},
data: "Data",
delDataFail: "Failed to delete data",
delSuccess: "Delete successfully!",
confirmDel: "Are you sure you want to delete",
notRecoverable: "delete will not be recoverable?",
notBatch: "Batch addition not implemented",
grid: "Grid",
exportFail: "Data export failed",
sum: "Total",
formitemFailed: "Form item update failed",
},
list: {
notConfig: {
fetchAction: "View list fetchAction parameter is not configured",
removeAction: "View table removeAction parameter is not configured",
createAction: "View list createAction parameter is not configured",
updateAction: "View list updateAction parameter is not configured",
},
confirmDel: "Are you sure you want to delete",
notRecoverable: "delete will not be recoverable?",
},
listExpBar: {
title: "List navigation bar",
},
wfExpBar: {
title: "Process navigation bar",
},
calendarExpBar:{
title: "Calendar navigation bar",
},
treeExpBar: {
title: "Tree view navigation bar",
},
portlet: {
noExtensions: "No extensions",
}, },
tabpage: { tabpage: {
sureclosetip: { sureclosetip: {
...@@ -52,6 +110,8 @@ export default { ...@@ -52,6 +110,8 @@ export default {
list: "list", list: "list",
dateSelectModalTitle: "select the time you wanted", dateSelectModalTitle: "select the time you wanted",
gotoDate: "goto", gotoDate: "goto",
from: "From",
to: "To",
}, },
// 非实体视图 // 非实体视图
views: { views: {
...@@ -81,6 +141,94 @@ export default { ...@@ -81,6 +141,94 @@ export default {
}, },
</#list> </#list>
}, },
formpage:{
error: "Error",
desc1: "Operation failed, failed to find current form item",
desc2: "Can't continue",
notconfig: {
loadaction: "View form loadAction parameter is not configured",
loaddraftaction: "View form loaddraftAction parameter is not configured",
actionname: "View form actionName parameter is not configured",
removeaction: "View form removeAction parameter is not configured",
},
saveerror: "Error saving data",
savecontent: "The data is inconsistent. The background data may have been modified. Do you want to reload the data?",
valuecheckex: "Value rule check exception",
savesuccess: "Saved successfully!",
deletesuccess: "Successfully deleted!",
workflow: {
starterror: "Workflow started successfully",
startsuccess: "Workflow failed to start",
submiterror: "Workflow submission failed",
submitsuccess: "Workflow submitted successfully",
},
updateerror: "Form item update failed",
},
gridBar: {
title: "Table navigation bar",
},
multiEditView: {
notConfig: {
fetchAction: "View multi-edit view panel fetchAction parameter is not configured",
loaddraftAction: "View multi-edit view panel loaddraftAction parameter is not configured",
},
},
dataViewExpBar: {
title: "Card view navigation bar",
},
kanban: {
notConfig: {
fetchAction: "View list fetchAction parameter is not configured",
removeAction: "View table removeAction parameter is not configured",
},
delete1: "Confirm to delete ",
delete2: "the delete operation will be unrecoverable!",
},
dashBoard: {
handleClick: {
title: "Panel design",
},
},
dataView: {
sum: "total",
data: "data",
},
chart: {
undefined: "Undefined",
quarter: "Quarter",
year: "Year",
},
searchForm: {
notConfig: {
loadAction: "View search form loadAction parameter is not configured",
loaddraftAction: "View search form loaddraftAction parameter is not configured",
},
custom: "Store custom queries",
title: "Name",
},
wizardPanel: {
back: "Back",
next: "Next",
complete: "Complete",
},
viewLayoutPanel: {
appLogoutView: {
prompt1: "Dear customer, you have successfully exited the system, after",
prompt2: "seconds, we will jump to the",
logingPage: "login page",
},
appWfstepTraceView: {
title: "Application process processing record view",
},
appWfstepDataView: {
title: "Application process tracking view",
},
appLoginView: {
username: "Username",
password: "Password",
login: "Login",
},
},
}, },
entities: { entities: {
<#list app.getAllPSAppDataEntities() as dataEntitey> <#list app.getAllPSAppDataEntities() as dataEntitey>
......
...@@ -18,9 +18,23 @@ export default { ...@@ -18,9 +18,23 @@ export default {
success: "成功", success: "成功",
ok: "确认", ok: "确认",
cancel: "取消", cancel: "取消",
save: "保存",
codeNotExist: "代码表不存在",
reqException: "请求异常",
sysException: "系统异常",
warning: "警告",
wrong: "错误",
rulesException: "值规则校验异常",
saveSuccess: "保存成功",
saveFailed: "保存失败",
deleteSuccess: "删除成功!",
deleteError: "删除失败!",
delDataFail: "删除数据失败",
noData: "暂无数据",
}, },
local:{ local:{
new: "新建" new: "新建",
add: "增加",
}, },
gridpage: { gridpage: {
choicecolumns: "选择列", choicecolumns: "选择列",
...@@ -28,6 +42,50 @@ export default { ...@@ -28,6 +42,50 @@ export default {
show: "显示", show: "显示",
records: "条", records: "条",
totle: "共", totle: "共",
noData: "无数据",
valueVail: "值不能为空",
notConfig: {
fetchAction: "视图表格fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置",
createAction: "视图表格createAction参数未配置",
updateAction: "视图表格updateAction参数未配置",
loaddraftAction: "视图表格loaddraftAction参数未配置",
},
data: "数据",
delDataFail: "删除数据失败",
delSuccess: "删除成功!",
confirmDel: "确认要删除",
notRecoverable: "删除操作将不可恢复?",
notBatch: "批量添加未实现",
grid: "表",
exportFail: "数据导出失败",
sum: "合计",
formitemFailed: "表单项更新失败",
},
list: {
notConfig: {
fetchAction: "视图列表fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置",
createAction: "视图列表createAction参数未配置",
updateAction: "视图列表updateAction参数未配置",
},
confirmDel: "确认要删除",
notRecoverable: "删除操作将不可恢复?",
},
listExpBar: {
title: "列表导航栏",
},
wfExpBar: {
title: "流程导航栏",
},
calendarExpBar:{
title: "日历导航栏",
},
treeExpBar: {
title: "树视图导航栏",
},
portlet: {
noExtensions: "无扩展插件",
}, },
tabpage: { tabpage: {
sureclosetip: { sureclosetip: {
...@@ -52,6 +110,8 @@ export default { ...@@ -52,6 +110,8 @@ export default {
list: "列", list: "列",
dateSelectModalTitle: "选择要跳转的时间", dateSelectModalTitle: "选择要跳转的时间",
gotoDate: "跳转", gotoDate: "跳转",
from: "从",
to: "至",
}, },
// 非实体视图 // 非实体视图
views: { views: {
...@@ -81,6 +141,93 @@ export default { ...@@ -81,6 +141,93 @@ export default {
}, },
</#list> </#list>
}, },
formpage:{
desc1: "操作失败,未能找到当前表单项",
desc2: "无法继续操作",
notconfig: {
loadaction: "视图表单loadAction参数未配置",
loaddraftaction: "视图表单loaddraftAction参数未配置",
actionname: "视图表单'+actionName+'参数未配置",
removeaction: "视图表单removeAction参数未配置",
},
saveerror: "保存数据发生错误",
savecontent: "数据不一致,可能后台数据已经被修改,是否要重新加载数据?",
valuecheckex: "值规则校验异常",
savesuccess: "保存成功!",
deletesuccess: "删除成功!",
workflow: {
starterror: "工作流启动失败",
startsuccess: "工作流启动成功",
submiterror: "工作流提交失败",
submitsuccess: "工作流提交成功",
},
updateerror: "表单项更新失败",
},
gridBar: {
title: "表格导航栏",
},
multiEditView: {
notConfig: {
fetchAction: "视图多编辑视图面板fetchAction参数未配置",
loaddraftAction: "视图多编辑视图面板loaddraftAction参数未配置",
},
},
dataViewExpBar: {
title: "卡片视图导航栏",
},
kanban: {
notConfig: {
fetchAction: "视图列表fetchAction参数未配置",
removeAction: "视图表格removeAction参数未配置",
},
delete1: "确认要删除 ",
delete2: "删除操作将不可恢复?",
},
dashBoard: {
handleClick: {
title: "面板设计",
},
},
dataView: {
sum: "共",
data: "条数据",
},
chart: {
undefined: "未定义",
quarter: "季度",
year: "年",
},
searchForm: {
notConfig: {
loadAction: "视图搜索表单loadAction参数未配置",
loaddraftAction: "视图搜索表单loaddraftAction参数未配置",
},
custom: "存储自定义查询",
title: "名称",
},
wizardPanel: {
back: "上一步",
next: "下一步",
complete: "完成",
},
viewLayoutPanel: {
appLogoutView: {
prompt1: "尊敬的客户您好,您已成功退出系统,将在",
prompt2: "秒后跳转至",
logingPage: "登录页",
},
appWfstepTraceView: {
title: "应用流程处理记录视图",
},
appWfstepDataView: {
title: "应用流程跟踪视图",
},
appLoginView: {
username: "用户名",
password: "密码",
login: "登录",
},
},
}, },
entities: { entities: {
<#list app.getAllPSAppDataEntities() as dataEntitey> <#list app.getAllPSAppDataEntities() as dataEntitey>
......
...@@ -23,11 +23,23 @@ import { Verify } from '@/utils/verify/verify'; ...@@ -23,11 +23,23 @@ import { Verify } from '@/utils/verify/verify';
<#-- 源参数 --> <#-- 源参数 -->
<#if logicparam.getSrcPSDELogicParam()??><#assign srcParam = logicparam.getSrcPSDELogicParam() /></#if> <#if logicparam.getSrcPSDELogicParam()??><#assign srcParam = logicparam.getSrcPSDELogicParam() /></#if>
<#-- 源参数属性名称 --> <#-- 源参数属性名称 -->
<#if logicparam.getSrcFieldName()??><#assign srcFieldParam = logicparam.getSrcFieldName()?lower_case /></#if> <#if logicparam.getSrcFieldName()??>
<#assign srcFieldParamName = logicparam.getSrcFieldName() />
<#if srcParam?? && srcParam.getParamPSAppDataEntity?? && srcParam.getParamPSAppDataEntity()?? && srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true)??>
<#assign srcFieldParam=srfcaseformat(srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true).getCodeName()?lower_case,'l_u2lC') />
<#else>
<#assign srcFieldParam= logicparam.getSrcFieldName()?lower_case />
</#if>
</#if>
<#-- 目标参数 --> <#-- 目标参数 -->
<#assign dstParam = logicparam.getDstPSDELogicParam() /> <#assign dstParam = logicparam.getDstPSDELogicParam() />
<#-- 目标参数属性名称 --> <#-- 目标参数属性名称 -->
<#assign dstFieldParam = logicparam.getDstFieldName()?lower_case /> <#assign dstFieldParamName = logicparam.getDstFieldName() />
<#if dstParam?? && dstParam.getParamPSAppDataEntity?? && dstParam.getParamPSAppDataEntity()?? && dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true)??>
<#assign dstFieldParam=srfcaseformat(dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true).getCodeName()?lower_case,'l_u2lC') />
<#else>
<#assign dstFieldParam= logicparam.getDstFieldName()?lower_case />
</#if>
<#-- 源逻辑参数 --> <#-- 源逻辑参数 -->
let tempDstParam${logicparam_index}Context:any = this.paramsMap.get('${dstParam.getCodeName()}').context?this.paramsMap.get('${dstParam.getCodeName()}').context:{}; let tempDstParam${logicparam_index}Context:any = this.paramsMap.get('${dstParam.getCodeName()}').context?this.paramsMap.get('${dstParam.getCodeName()}').context:{};
let tempDstParam${logicparam_index}Data:any = this.paramsMap.get('${dstParam.getCodeName()}').data?this.paramsMap.get('${dstParam.getCodeName()}').data:{}; let tempDstParam${logicparam_index}Data:any = this.paramsMap.get('${dstParam.getCodeName()}').data?this.paramsMap.get('${dstParam.getCodeName()}').data:{};
......
...@@ -21,7 +21,13 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -21,7 +21,13 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() /> <#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 --> <#-- 从实体 -->
<#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() /> <#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() />
this.tempStorage.setItem(context.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case})); <#-- 从实体支持临时数据模式为true,才设置本地缓存 start -->
<#-- @author zpc -->
<#-- @update 2020.7.13 15:00 -->
<#if minorPSAppDataEntity.isEnableTempData()>
this.tempStorage.setItem(context.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}?res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}:[]));
</#if>
<#-- 从实体支持临时数据模式为true,才设置本地缓存 end -->
</#list> </#list>
</#if> </#if>
</#macro> </#macro>
...@@ -34,6 +40,10 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -34,6 +40,10 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() /> <#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 --> <#-- 从实体 -->
<#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() /> <#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() />
<#-- 从实体支持临时数据模式为true,才从前端缓存拿取数据,组装数据给后台 start -->
<#-- @author zpc -->
<#-- @update 2020.7.13 15:00 -->
<#if minorPSAppDataEntity.isEnableTempData()>
let ${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data:any = []; let ${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}'),'undefined')){ if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}'),'undefined')){
${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}') as any); ${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}') as any);
...@@ -49,12 +59,25 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -49,12 +59,25 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
} }
} }
masterData.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case} = ${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data; masterData.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case} = ${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data;
</#if>
<#-- 从实体支持临时数据模式为true,才从前端缓存拿取数据,组装数据给后台 end -->
</#list> </#list>
</#if> </#if>
</#macro> </#macro>
<#-- 检查行为是否可以执行 start -->
<#-- @author zpc -->
<#-- @update 2020.7.13 18:00 -->
<#-- 获取测试行为的修饰符和名称 start -->
<#macro getTestActionModifier appdeAction>
<#compress>
<#if appdeAction.getTestActionMode() == 1>private</#if><#if appdeAction.getTestActionMode() == 3>public</#if>
</#compress>
</#macro>
<#-- 获取测试行为的修饰符和名称 end -->
<#-- 定义service_block start --> <#-- 定义service_block start -->
<#macro service_block item singleAppMethod> <#macro service_block item singleAppMethod afterActionStr = "">
<#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??> <#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??>
<#list 1..item.getPSAppDERSPathCount() as count> <#list 1..item.getPSAppDERSPathCount() as count>
<#assign path = ''/> <#assign path = ''/>
...@@ -70,21 +93,24 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -70,21 +93,24 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if singleAppMethod.getMethodType() == "SELECT"> <#if singleAppMethod.getMethodType() == "SELECT">
if(${condition}context.${item.getCodeName()?lower_case}){ if(${condition}context.${item.getCodeName()?lower_case}){
<#if singleServiceApi.getRequestMethod() == 'PUT' || singleServiceApi.getRequestMethod() == 'POST'> <#if singleServiceApi.getRequestMethod() == 'PUT' || singleServiceApi.getRequestMethod() == 'POST'>
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#else> <#else>
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
</#if> </#if><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
} }
<#-- 方法类型为FETCH --> <#-- 方法类型为FETCH -->
<#elseif singleAppMethod.getMethodType() == "FETCH"> <#elseif singleAppMethod.getMethodType() == "FETCH">
if(${condition}true){ if(${condition}true){
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading); let res:any = Http.getInstance().get(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading);<#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
} }
<#-- 方法类型为FETCHTEMP --> <#-- 方法类型为FETCHTEMP -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP"> <#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
if(${condition}true){ if(${condition}true){
return Http.getInstance().get(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = Http.getInstance().get(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
} }
<#else> <#else>
<#-- 方法类型为DEACTION start --> <#-- 方法类型为DEACTION start -->
...@@ -93,7 +119,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -93,7 +119,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
if(${condition}true){ if(${condition}true){
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading); let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
res.data.${item.getCodeName()?lower_case} = data.${item.getCodeName()?lower_case}; res.data.${item.getCodeName()?lower_case} = data.${item.getCodeName()?lower_case};
<@setStore appEntity=item /> <@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
} }
<#-- 无参数情况end --> <#-- 无参数情况end -->
...@@ -104,12 +130,16 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -104,12 +130,16 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#-- GET --> <#-- GET -->
<#if singleServiceApi.getRequestMethod() == "GET"> <#if singleServiceApi.getRequestMethod() == "GET">
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading); let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
<@setStore appEntity=item /> <@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
<#elseif singleServiceApi.getRequestMethod() == "POST"> <#elseif singleServiceApi.getRequestMethod() == "POST">
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" >
${afterActionStr}</#if>
return res;
<#else> <#else>
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);<#if afterActionStr?? && afterActionStr !="" >
${afterActionStr}</#if>
return res;
</#if> </#if>
<#-- 指定属性情况end --> <#-- 指定属性情况end -->
} }
...@@ -135,9 +165,9 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -135,9 +165,9 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() /> <#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 --> <#-- 从实体 -->
<#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() /> <#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() />
this.tempStorage.setItem(tempContext.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case})); this.tempStorage.setItem(tempContext.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}?res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}:[]));
</#list> </#list>
</#if> </#if><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
} }
<#else> <#else>
...@@ -146,7 +176,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -146,7 +176,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<@getStore appEntity=item /> <@getStore appEntity=item />
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<@setStore appEntity=item /> <@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
} }
</#if> </#if>
...@@ -165,25 +195,30 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -165,25 +195,30 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if singleAppMethod.getMethodType() == "SELECT"> <#if singleAppMethod.getMethodType() == "SELECT">
<#-- if(context.${item.getCodeName()?lower_case}){ --> <#-- if(context.${item.getCodeName()?lower_case}){ -->
<#if singleServiceApi.getRequestMethod() == 'PUT' || singleServiceApi.getRequestMethod() == 'POST'> <#if singleServiceApi.getRequestMethod() == 'PUT' || singleServiceApi.getRequestMethod() == 'POST'>
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<#else> <#else>
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
</#if> </#if><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#-- } --> <#-- } -->
<#-- 方法类型为FETCH --> <#-- 方法类型为FETCH -->
<#elseif singleAppMethod.getMethodType() == "FETCH"> <#elseif singleAppMethod.getMethodType() == "FETCH">
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading); let res:any = Http.getInstance().get(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading);<#if afterActionStr?? && afterActionStr !="" >
${afterActionStr}</#if>
return res;
<#-- 方法类型为FETCHTEMP --> <#-- 方法类型为FETCHTEMP -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP"> <#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
return Http.getInstance().get(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = Http.getInstance().get(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" >
${afterActionStr}</#if>
return res;
<#else> <#else>
<#-- 方法类型为DEACTION start --> <#-- 方法类型为DEACTION start -->
<#if singleServiceApi.getRequestParamType() == "NONE"> <#if singleServiceApi.getRequestParamType() == "NONE">
<#-- 无参数情况start --> <#-- 无参数情况start -->
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading); let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
res.data.${item.getCodeName()?lower_case} = data.${item.getCodeName()?lower_case}; res.data.${item.getCodeName()?lower_case} = data.${item.getCodeName()?lower_case};
<@setStore appEntity=item /> <@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
<#-- 无参数情况end --> <#-- 无参数情况end -->
<#elseif singleServiceApi.getRequestParamType() == "FIELD"> <#elseif singleServiceApi.getRequestParamType() == "FIELD">
...@@ -192,17 +227,21 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -192,17 +227,21 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if singleServiceApi.getRequestMethod() == "GET"> <#if singleServiceApi.getRequestMethod() == "GET">
<#-- if(context.${item.getCodeName()?lower_case}){ --> <#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading); let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);
<@setStore appEntity=item /> <@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
<#-- } --> <#-- } -->
<#elseif singleServiceApi.getRequestMethod() == "POST"> <#elseif singleServiceApi.getRequestMethod() == "POST">
<#-- REMOVE --> <#-- REMOVE -->
<#-- if(context.${item.getCodeName()?lower_case}){ --> <#-- if(context.${item.getCodeName()?lower_case}){ -->
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" >
${afterActionStr}</#if>
return res;
<#-- } --> <#-- } -->
<#else> <#else>
<#-- if(context.${item.getCodeName()?lower_case}){ --> <#-- if(context.${item.getCodeName()?lower_case}){ -->
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,isloading);<#if afterActionStr?? && afterActionStr !="" >
${afterActionStr}</#if>
return res;
<#-- } --> <#-- } -->
</#if> </#if>
<#-- 指定属性情况end --> <#-- 指定属性情况end -->
...@@ -214,7 +253,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -214,7 +253,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
Object.assign(data,masterData); Object.assign(data,masterData);
<#-- if(context.${item.getCodeName()?lower_case}){ --> <#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<@setStore appEntity=item /> <@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
<#-- } --> <#-- } -->
<#elseif singleAppMethod.getCodeName() == 'Save'> <#elseif singleAppMethod.getCodeName() == 'Save'>
...@@ -223,7 +262,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -223,7 +262,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
Object.assign(data,masterData); Object.assign(data,masterData);
<#-- if(context.${item.getCodeName()?lower_case}){ --> <#-- if(context.${item.getCodeName()?lower_case}){ -->
let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = await Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);
<@setStore appEntity=item /> <@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
<#-- } --> <#-- } -->
<#elseif singleAppMethod.getCodeName() == 'Create'> <#elseif singleAppMethod.getCodeName() == 'Create'>
...@@ -244,13 +283,14 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -244,13 +283,14 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() /> <#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 --> <#-- 从实体 -->
<#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() /> <#assign minorPSAppDataEntity = deReRs.getMinorPSAppDataEntity() />
this.tempStorage.setItem(tempContext.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case})); this.tempStorage.setItem(tempContext.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}',JSON.stringify(res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}?res.data.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}:[]));
</#list> </#list>
</#if> </#if><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
<#else> <#else>
<#-- if(context.${item.getCodeName()?lower_case}){ --> <#-- if(context.${item.getCodeName()?lower_case}){ -->
return Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading); let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#-- } --> <#-- } -->
</#if> </#if>
<#-- 提交对象数据情况end --> <#-- 提交对象数据情况end -->
...@@ -440,6 +480,38 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -440,6 +480,38 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
</#macro> </#macro>
<#-- 定义service_block end --> <#-- 定义service_block end -->
<#-- 行为执行之前 start -->
<#-- @author zpc -->
<#-- @update 2020.7.14 11:00 -->
<#macro excuteBeforeAction appdeAction>
<#if appdeAction.getBeforePSDEActionLogics?? && appdeAction.getBeforePSDEActionLogics()??>
<#list appdeAction.getBeforePSDEActionLogics() as beforelogic>
<#if beforelogic.getPSDELogic()??>
<#assign singleLogic = beforelogic.getPSDELogic() />
let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
data = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,data,isloading?true:false);
</#if>
</#list>
</#if>
</#macro>
<#-- 行为执行之前 end -->
<#-- 行为执行之后 start -->
<#-- @author zpc -->
<#-- @update 2020.7.14 14:00 -->
<#macro excuteAfterAction appdeAction>
<#if appdeAction.getAfterPSDEActionLogics?? && appdeAction.getAfterPSDEActionLogics()??>
<#list appdeAction.getAfterPSDEActionLogics() as afterlogic>
<#if afterlogic.getPSDELogic()??>
<#assign singleLogic = afterlogic.getPSDELogic() />
<@compress single_line=true>let ${singleLogic.getCodeName()?lower_case}:${srfclassname('${singleLogic.getCodeName()}')}Logic = new ${srfclassname('${singleLogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(res))});</@compress>
<@compress single_line=true>res = await ${singleLogic.getCodeName()?lower_case}.onExecute(context,res,isloading?true:false);</@compress>
</#if>
</#list>
</#if>
</#macro>
<#-- 行为执行之后 end -->
/** /**
* ${de.getLogicName()}服务对象基类 * ${de.getLogicName()}服务对象基类
...@@ -479,7 +551,7 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends ...@@ -479,7 +551,7 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
<#if item.getAllPSAppDEMethods?? && item.getAllPSAppDEMethods()??> <#if item.getAllPSAppDEMethods?? && item.getAllPSAppDEMethods()??>
<#list item.getAllPSAppDEMethods() as singleAppMethod> <#list item.getAllPSAppDEMethods() as singleAppMethod>
<#if singleAppMethod.getPSDEServiceAPIMethod?? && singleAppMethod.getPSDEServiceAPIMethod()??> <#if singleAppMethod.getPSDEServiceAPIMethod?? && singleAppMethod.getPSDEServiceAPIMethod()??>
<#assign singleServiceApi = singleAppMethod.getPSDEServiceAPIMethod()/> <#assign singleServiceApi = singleAppMethod.getPSDEServiceAPIMethod()/>
</#if> </#if>
<#if singleAppMethod.render??> <#if singleAppMethod.render??>
${singleAppMethod.render.code} ${singleAppMethod.render.code}
...@@ -496,22 +568,133 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends ...@@ -496,22 +568,133 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase * @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/ */
public async ${singleAppMethod.getCodeName()}(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async ${singleAppMethod.getCodeName()}(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
<#--是否存在前端处理逻辑start -->
<#if singleAppMethod.getPSDEAction()??> <#if singleAppMethod.getPSDEAction()??>
<#assign appdeAction = singleAppMethod.getPSDEAction() /> <#assign appdeAction = singleAppMethod.getPSDEAction() />
<#-- 检查行为是否可以执行 start -->
<#-- @author zpc -->
<#-- @update 2020.7.13 16:00 -->
<#if appdeAction.getTestActionMode?? && appdeAction.getTestActionMode()?? && (appdeAction.getTestActionMode() == 1 || appdeAction.getTestActionMode() == 3)>
let result:any = await this.test${srfclassname('${singleAppMethod.getCodeName()}')}(context,data);
if(!result) return;
</#if>
<#-- 检查行为是否可以执行 end -->
<#-- 行为执行之前 start -->
<#-- @author zpc -->
<#-- @update 2020.7.14 11:00 -->
<@excuteBeforeAction appdeAction = appdeAction />
<#-- 行为执行之前 end -->
<#--是否存在前端处理逻辑start -->
<#if appdeAction.getPSDELogic?? && appdeAction.getPSDELogic()?? && (appdeAction.getActionHolder() == 2 || appdeAction.getActionHolder() == 3) > <#if appdeAction.getPSDELogic?? && appdeAction.getPSDELogic()?? && (appdeAction.getActionHolder() == 2 || appdeAction.getActionHolder() == 3) >
<#assign appdelogic = appdeAction.getPSDELogic() /> <#assign appdelogic = appdeAction.getPSDELogic() />
let appLogic:${srfclassname('${appdelogic.getCodeName()}')}Logic = new ${srfclassname('${appdelogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))}); let appLogic:${srfclassname('${appdelogic.getCodeName()}')}Logic = new ${srfclassname('${appdelogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
const result = await appLogic.onExecute(context,data,isloading?true:false); const res = await appLogic.onExecute(context,data,isloading?true:false);
return {status:200,data:result}; <@excuteAfterAction appdeAction = appdeAction />
return {status:200,data:res};
<#else> <#else>
<@service_block item=item singleAppMethod=singleAppMethod/> <#-- 行为执行之后 start -->
<#-- @author zpc -->
<#-- @update 2020.7.14 14:00 -->
<#assign afterActionStr><@excuteAfterAction appdeAction = appdeAction /></#assign>
<@service_block item=item singleAppMethod=singleAppMethod afterActionStr = afterActionStr/>
<#-- 行为执行之后 end -->
</#if> </#if>
<#--是否存在前端处理逻辑end --> <#--是否存在前端处理逻辑end -->
<#else> <#else>
<@service_block item=item singleAppMethod=singleAppMethod/> <#-- 行为执行之后 start -->
<#-- @author zpc -->
<#-- @update 2020.7.14 14:00 -->
<@service_block item=item singleAppMethod=singleAppMethod />
<#-- 行为执行之后 end -->
</#if>
}
<#-- 查询数据集(post方式)start -->
<#-- @author zpc -->
<#-- @update 2020.7.13 15:00 -->
<#-- <#if singleAppMethod.getMethodType?? && singleAppMethod.getMethodType()?? && singleAppMethod.getMethodType() == "FETCH">
<#assign dataSet = singleAppMethod.getPSDEDataSet() /> -->
<#-- /**
* search${dataSet.getCodeName()}接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/
public async search${dataSet.getCodeName()}(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { -->
<#-- 检查行为是否可以执行 start -->
<#-- @author zpc -->
<#-- @update 2020.7.13 16:00 -->
<#-- <#if singleAppMethod.getPSDEAction()??>
<#assign appdeAction = singleAppMethod.getPSDEAction() />
<#if appdeAction.getTestActionMode?? && appdeAction.getTestActionMode()?? && (appdeAction.getTestActionMode() == 1 || appdeAction.getTestActionMode() == 3)>
let result:any = await this.test${srfclassname('search${dataSet.getCodeName()}')}(context,data);
if(!result) return;
</#if>
</#if> -->
<#-- 检查行为是否可以执行 end -->
<#-- <#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??>
<#list 1..item.getPSAppDERSPathCount() as count>
<#assign path = ''/>
<#assign condition = ''/>
<#list item.getPSAppDERSPath(count_index) as deRSPath>
<#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??>
<#assign _dataEntity = deRSPath.getMajorPSAppDataEntity()/>
<#assign condition>${condition}context.${_dataEntity.getCodeName()?lower_case} && </#assign>
<#assign path>${path}${srfpluralize(_dataEntity.codeName)?lower_case}/<#noparse>$</#noparse>{context.${_dataEntity.getCodeName()?lower_case}}/</#assign>
</#if>
</#list>
if(${condition}true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().post(`/${path}${srfpluralize(item.codeName)?lower_case}/search${dataSet.getCodeName()?lower_case}`,tempData,isloading);
}
</#list>
</#if>
<#if item.isMajor()>
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().post(`/${srfpluralize(item.codeName)?lower_case}/search${dataSet.getCodeName()?lower_case}`,tempData,isloading);
</#if> </#if>
} }
</#if> -->
<#-- 查询数据集(post方式)end -->
<#-- 检查行为是否可以执行 start -->
<#-- @author zpc -->
<#-- @update 2020.7.13 17:00 -->
<#if singleAppMethod.getPSDEAction()??>
<#assign appdeAction = singleAppMethod.getPSDEAction() />
<#if appdeAction.getTestActionMode?? && appdeAction.getTestActionMode()?? && (appdeAction.getTestActionMode() == 1 || appdeAction.getTestActionMode() == 3)>
/**
* test${srfclassname('${singleAppMethod.getCodeName()}')}方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/
<@getTestActionModifier appdeAction=appdeAction/> async test${srfclassname('${singleAppMethod.getCodeName()}')}(context: any = {},data: any = {}): Promise<any> {
return true;
}
<#if singleAppMethod.getMethodType?? && singleAppMethod.getMethodType()?? && singleAppMethod.getMethodType() == "FETCH">
<#assign dataSet = singleAppMethod.getPSDEDataSet() />
/**
* test${srfclassname('search${dataSet.getCodeName()}')}方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/
<@getTestActionModifier appdeAction=appdeAction/> async test${srfclassname('search${dataSet.getCodeName()}')}(context: any = {},data: any = {}): Promise<any> {
return true;
}
</#if>
</#if>
</#if>
<#-- 检查行为是否可以执行 end -->
</#if> </#if>
</#if> </#if>
</#list> </#list>
......
<#ibiztemplate> <#ibiztemplate>
TARGET=PSAPPDATAENTITY TARGET=PSAPPDATAENTITY
</#ibiztemplate> </#ibiztemplate>
<#macro getMainStateOPPrivs mainState>
<#compress>
<#if mainState.getPSDEMainStateOPPrivs?? && mainState.getPSDEMainStateOPPrivs()??>
{<#list mainState.getPSDEMainStateOPPrivs() as mainStateOPPriv>'${mainStateOPPriv.getName()}':<#if mainState.isOPPrivAllowMode()>1<#else>0</#if><#if mainStateOPPriv_has_next>,</#if></#list>}
<#else>
{}
</#if>
</#compress>
</#macro>
import { Environment } from '@/environments/environment'; import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service'; import UIService from '../ui-service';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import ${srfclassname('${item.getCodeName()}')}Service from '@/service/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-service'; import ${srfclassname('${item.getCodeName()}')}Service from '@/service/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-service';
import ${srfclassname('${item.getCodeName()}')}AuthService from '@/authservice/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-auth-service';
<#if item.getAllPSAppDEUIActions()??> <#if item.getAllPSAppDEUIActions()??>
<#list item.getAllPSAppDEUIActions() as appdeUIAction> <#list item.getAllPSAppDEUIActions() as appdeUIAction>
<#if appdeUIAction.getPSAppDataEntity()??> <#if appdeUIAction.getPSAppDataEntity()??>
...@@ -85,6 +95,13 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten ...@@ -85,6 +95,13 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
*/ */
public allDeMainStateMap:Map<string,string> = new Map(); public allDeMainStateMap:Map<string,string> = new Map();
/**
* 主状态操作标识Map
*
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public allDeMainStateOPPrivsMap:Map<string,any> = new Map();
/** /**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}UIServiceBase. * Creates an instance of ${srfclassname('${item.getCodeName()}')}UIServiceBase.
* *
...@@ -93,8 +110,10 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten ...@@ -93,8 +110,10 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
*/ */
constructor(opts: any = {}) { constructor(opts: any = {}) {
super(opts); super(opts);
this.authService = new ${srfclassname('${item.getCodeName()}')}AuthService(opts);
this.initViewMap(); this.initViewMap();
this.initDeMainStateMap(); this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
} }
/** /**
...@@ -121,9 +140,21 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten ...@@ -121,9 +140,21 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
<#if demState.getMSTag()??> <#if demState.getMSTag()??>
this.allDeMainStateMap.set('${demState.getMSTag()}','${demState.getMSTag()}'); this.allDeMainStateMap.set('${demState.getMSTag()}','${demState.getMSTag()}');
</#if> </#if>
<#-- <#if demState.getId()?? && demState.getMSTag()??> </#list>
this.allDeMainStateMap.set('${demState.getId()}','${demState.getMSTag()}'); </#if>
</#if> --> }
/**
* 初始化主状态操作标识
*
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public initDeMainStateOPPrivsMap(){
<#if item.getPSDataEntity?? && item.getPSDataEntity()?? && item.getPSDataEntity().getAllPSDEMainStates()??>
<#list item.getPSDataEntity().getAllPSDEMainStates() as demState>
<#if demState.getMSTag()??>
this.allDeMainStateOPPrivsMap.set('${demState.getMSTag()}',<@getMainStateOPPrivs mainState=demState />);
</#if>
</#list> </#list>
</#if> </#if>
} }
...@@ -218,12 +249,12 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code} ...@@ -218,12 +249,12 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
} }
if(!Environment.isAppMode){ if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){ if(this.getDEMainStateTag(curData)){
<#noparse>return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;</#noparse> <#noparse>return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;</#noparse>
} }
return 'MOBEDITVIEW:'; return 'MOBEDITVIEW:';
} }
if(this.getDEMainStateTag(curData)){ if(this.getDEMainStateTag(curData)){
<#noparse>return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;</#noparse> <#noparse>return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;</#noparse>
} }
return 'EDITVIEW:'; return 'EDITVIEW:';
} }
...@@ -302,16 +333,14 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code} ...@@ -302,16 +333,14 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
* @param curData 当前数据 * @param curData 当前数据
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase * @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/ */
public async getDEMainStateTag(curData:any){ public getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null; if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{ this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){ if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`); <#noparse>console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);</#noparse>
} }
}) })
let strTag:String = "";
for (let i = 0; i <= 1; i++) { for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":""; let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) { if (this.mainStateFields.length >= 2) {
...@@ -334,4 +363,28 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code} ...@@ -334,4 +363,28 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
return null; return null;
} }
/**
* 获取数据对象当前操作标识
*
* @param data 当前数据
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public getDEMainStateOPPrivs(data:any){
if(this.getDEMainStateTag(data)){
return this.allDeMainStateOPPrivsMap.get((this.getDEMainStateTag(data) as string));
}else{
return null;
}
}
/**
* 获取数据对象所有的操作标识
*
* @param data 当前数据
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public getAllOPPrivs(data:any){
return this.authService.getOPPrivs(this.getDEMainStateOPPrivs(data));
}
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册