提交 0a5efb66 编写于 作者: tony001's avatar tony001

Merge remote-tracking branch 'local/master' into dev

上级 ece018fc
......@@ -3,7 +3,7 @@ import { Vue, Component, Prop, Provide, Emit, Watch, Model,Inject } from 'vue-pr
import { CreateElement } from 'vue';
import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils';
import { UIActionTool,Util,ViewTool } from '@/utils';
import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
......@@ -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';
</#if>
import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-service';
<#if ctrl.getPSUIActions?? && ctrl.getPSUIActions()??>
<#list ctrl.getPSUIActions() as uiAction>
<#if 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';
<#if appde?? && (curAppEntity.getId() == appde.getId())><#assign hasAppDE = true /></#if>
</#if>
</#if>
</#list>
</#if>
<#if appde?? && !hasAppDE??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#-- 语言资源入口 -->
<#ibizinclude>
./LANGBASE.vue.ftl
......@@ -188,6 +191,21 @@ ${P.getLogicCode(logic, "LOGIC.vue").code}
${P.getLogicCode(uiAction, "LOGIC.vue").code}
</#if>
</#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>
/**
......
......@@ -22,12 +22,16 @@ import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.co
<#list ctrl.getPSUIActions() as uiAction>
<#if 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';
<#if appde?? && (curAppEntity.getId() == appde.getId())><#assign hasAppDE = true /></#if>
</#if>
</#if>
</#list>
</#if>
<#if appde?? && !hasAppDE??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#-- 语言资源入口 -->
<#ibizinclude>
./LANGBASE.vue.ftl
......@@ -135,6 +139,14 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
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 ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
......
......@@ -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
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
<#if has_keyfield>
Object.assign(Data,{${appde.getKeyPSAppDEField().getCodeName()?lower_case}: data.${appde.getKeyPSAppDEField().getCodeName()?lower_case}, srffrontuf: '1'});
</#if>
<#-- 手动修改数据主键的情况start -->
<#list ctrl.getPSDEFormItems() as formitem>
<#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) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
......
......@@ -19,7 +19,7 @@
</#if>
</div>
<div v-else>
暂无数据
{{ $t('app.commonWords.noData') }}
</div>
</div>
</template>
......@@ -327,7 +327,7 @@
*/
public load(opt: any = {}): void {
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;
}
const arg: any = {...opt};
......@@ -353,7 +353,7 @@
post.then((response: any) => {
if (!response || response.status !== 200) {
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;
}
......@@ -378,7 +378,7 @@
if (response && response.status === 401) {
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 @@
*/
public async remove(datas: any[]): Promise<any> {
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;
}
if (datas.length === 0) {
......@@ -427,10 +427,10 @@
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
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;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
}
//删除items中已删除的项
datas.forEach((data: any) => {
......@@ -449,7 +449,7 @@
return;
}
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);
return;
}
......@@ -460,8 +460,8 @@
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
title: (this.$t('app.commonWords.warning') as string),
content: (this.$t('app.list.confirmDel') as string) + ' ' + dataInfo + ',' + (this.$t('app.list.notRecoverable') as string) ,
onOk: () => {
removeData();
},
......@@ -486,7 +486,7 @@
try {
if(Object.is(item.rowDataState, 'create')){
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{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -494,7 +494,7 @@
}
}else if(Object.is(item.rowDataState, 'update')){
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{
Object.assign(item,{viewparams:this.viewparams});
<#if de??>
......@@ -514,10 +514,10 @@
this.$emit('save', successItems);
this.refresh();
if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{
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]);
});
}
......
......@@ -109,9 +109,9 @@
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Data,Context,isloading);
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Data,Context,isloading);
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<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>
</#if>
<div class="container-header">
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<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>
</#if>
<div class="container-header">
......
......@@ -32,9 +32,9 @@
</#if>
</i-content>
<footer class="app-wizard-footer">
<i-button :disabled="isDisabled('PREV')" @click="onClickPrev()" type="primary">上一步</i-button>
<i-button :disabled="isDisabled('NEXT')" @click="onClickNext()" type="primary">下一步</i-button>
<i-button :disabled="isDisabled('FINISH')" @click="onClickFinish()" 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">{{$t('app.wizardPanel.next')}}</i-button>
<i-button :disabled="isDisabled('FINISH')" @click="onClickFinish()" type="primary">{{$t('app.wizardPanel.complete')}}</i-button>
</footer>
</layout>
</template>
......@@ -229,7 +229,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
</#if>
}
......@@ -266,7 +266,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
</#if>
}
......@@ -354,7 +354,7 @@
this.curState = 'NEXT';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam });
} 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 @@
this.curState = 'FINISH';
this.wizardState.next({ tag: this.activeForm, action: 'save', data: this.formParam });
} 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 @@
</div>
<div>
<i-button type="primary" @click="handleAdd" style="float: right;">
增加
{{ $t('app.local.add')}}
</i-button>
</div>
</div>
......@@ -170,7 +170,8 @@
public count: number = 0;
<#-- BEGIN:参数处理 -->
<#list ctrl.getAllRelatedPSAppViews() as dataview>
<#if ctrl.getEmbeddedPSAppView()??>
<#assign dataview = ctrl.getEmbeddedPSAppView() />
<#if !dataview.isPSDEView()>
/**
......@@ -223,7 +224,7 @@
{ pathName: '${srfpluralize(appDataEntity.codeName)?lower_case}', parameterName: '${appDataEntity.getCodeName()?lower_case}' },
];
</#if>
</#list>
</#if>
<#-- END:参数处理 -->
/**
......@@ -341,7 +342,7 @@
*/
public load(data: any): void {
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;
}
let arg: any = {};
......@@ -351,7 +352,7 @@
promice.then((response: any) => {
if (!response.status || response.status !== 200) {
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;
}
......@@ -365,7 +366,7 @@
if (response && response.status === 401) {
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 @@
*/
public handleAdd(){
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;
}
const promice: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:this.viewparams}, this.showBusyIndicator);
promice.then((response: any) => {
if (!response.status || response.status !== 200) {
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;
}
......@@ -393,7 +394,7 @@
if (response && response.status === 401) {
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 @@
<#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>
<#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)">
<#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>
</i-button>
</@badge>
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
</Badge>
</#if>
</#if>
<div slot='content'>{{<#if langbase??>$t('${langbase}.${item.name}.tip')<#else>'${item.getTooltip()}'</#if>}}</div>
</tooltip>
......@@ -26,12 +32,18 @@
<#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>
<#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)">
<#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>
</i-button>
</@badge>
<#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
</Badge>
</#if>
</#if>
</#if>
<#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>
<#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'>
${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>
${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>
\ No newline at end of file
......@@ -151,6 +151,10 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
*/
protected click(item: any) {
if (item) {
let navDataService = NavDataService.getInstance(this.$store);
if(Object.is(this.navModel,"route")){
navDataService.removeNavData(this.viewtag);
}
switch (item.appfunctag) {
<#if ctrl.getPSAppFuncs()??>
<#assign appFuncs = ctrl.getPSAppFuncs()>
......
......@@ -5,7 +5,7 @@
<template slot-scope="{ data }">
<#if ctrl.getPSSearchBarFilters()??>
<#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}
</template>
</#list>
......@@ -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>
</#if> -->
<div class="search-bar-action">
<i-button type="primary" @click="onSearch">搜索</i-button>
<i-button @click="onReset">重置</i-button>
<i-button @click="onSave"><i class="fa fa-floppy-o" aria-hidden="true"></i></i-button>
<el-select size="small" v-if="historyItems.length > 0" v-model="selectItem" @change="onFilterChange">
<el-option v-for="item in historyItems" :key="item.value" :label="item.name" :value="item.value"></el-option>
</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>
</template>
<#assign import_block>
import FilterTree from '@components/filter-tree/filter-tree.vue';
import moment from 'moment';
</#assign>
<#assign component_block>
......@@ -68,6 +83,9 @@ FilterTree,
label: '<#if filter.getPSDEField()??>${filter.getPSDEField().getLogicName()}</#if>',
name: '${filter.getName()}',
prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>',
<#if filter.getPSDEFSearchMode()??>
mode: '${filter.getPSDEFSearchMode().getValueOP()}',
</#if>
disabled: false
},
</#list>
......@@ -106,6 +124,30 @@ FilterTree,
*/
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,
Object.assign(data, { query: this.query })
} -->
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;
}
......@@ -145,6 +188,9 @@ FilterTree,
}
let ands: any[] = this.transformAnd(this.filterItems);
this.transformResult(ands, '$and');
if(ands.length === 0) {
return null;
}
return { '$and': ands };
}
......@@ -184,9 +230,9 @@ FilterTree,
datas.forEach((data: any) => {
let item: any = {};
if(data.field && data.mode) {
let field: any = this.detailsModel[data.field];
item[field.prop] = {};
item[field.prop][data.mode] = (data[data.field] == null ? '' : data[data.field]);
item[data.field] = {};
let valField: string = data.editor ? data.editor : data.field;
item[data.field][data.mode] = (data[valField] == null ? '' : data[valField]);
result.push(item)
} else if(Object.is(data.label, '$and')) {
let items: any[] = this.transformAnd(data.children);
......@@ -210,9 +256,9 @@ FilterTree,
datas.forEach((data: any) => {
let item: any = {};
if(data.field && data.mode) {
let field: any = this.detailsModel[data.field];
item[field.prop] = {};
item[field.prop][data.mode] = (data[data.field] == null ? '' : data[data.field]);
item[data.field] = {};
let valField: string = data.editor ? data.editor : data.field;
item[data.field][data.mode] = (data[valField] == null ? '' : data[valField]);
result.push(item);
} else if(Object.is(data.label, '$and')) {
item[data.label] = this.transformAnd(data.children);
......@@ -266,10 +312,18 @@ FilterTree,
* @return {*}
* @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 = {};
Object.assign(param, {
model: this.filterItems,
model: JSON.parse(JSON.stringify(this.historyItems)),
appdeName: this.appdeName,
modelid: this.modelId,
utilServiceName: this.utilServiceName,
......@@ -311,15 +365,59 @@ FilterTree,
let post = this.service.loadModel(this.utilServiceName, this.context, param);
post.then((response: any) => {
if(response.status == 200) {
this.filterItems = response.data;
this.$nextTick(() => {
this.onSearch();
})
this.historyItems = response.data;
}
}).catch((response: any) => {
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>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -2,8 +2,17 @@
height: 32px;
.search-bar-action {
float: right;
> .ivu-btn {
display: flex;
align-items: center;
> * {
margin-left: 5px;
.save-action {
text-align: right;
margin-top: 10px;
> * {
margin-left: 5px;
}
}
}
}
}
......
......@@ -467,7 +467,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if (value && value.startsWith('%') && value.endsWith('%')) {
const key: string = value.substring(1, value.length - 1);
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;
}
value = this.data[key];
......@@ -609,7 +609,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
public load(opt: any = {}): void {
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;
}
const arg: any = { ...opt };
......@@ -629,7 +629,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
return;
}
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;
}
......@@ -646,7 +646,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
public loadDraft(opt: any = {},mode?:string): void {
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;
}
const arg: any = { ...opt } ;
......@@ -655,7 +655,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
post.then((response: any) => {
if (!response.status || response.status !== 200) {
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;
}
......@@ -687,7 +687,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
return;
}
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;
}
......
......@@ -3,7 +3,7 @@
<#if ctrl.render??><#t>
${ctrl.render.code}
<#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>
</#if>
</div>
......@@ -635,7 +635,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
// 补全空白分类
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) =>{
if(!item[groupField[0]]){
item[groupField[0]] = emptyText;
......@@ -701,11 +701,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
return Number(a[groupField[0].name]) - Number(b[groupField[0].name]);
});
}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")){
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")){
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")){
returnArray = arr.sort((a:any, b:any) => {
return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix();
......@@ -743,7 +743,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
arr.forEach((item:any) =>{
let sortFieldValue:Array<any> = item[groupField[0].name].split("-");
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) => {
return Number(a.sortField) - Number(b.sortField);
......
......@@ -3,7 +3,7 @@
<#if ctrl.render??><#t>
${ctrl.render.code}
<#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>
</#if>
</div>
......@@ -635,7 +635,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}
// 补全空白分类
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) =>{
if(!item[groupField[0]]){
item[groupField[0]] = emptyText;
......@@ -701,11 +701,11 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
return Number(a[groupField[0].name]) - Number(b[groupField[0].name]);
});
}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")){
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")){
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")){
returnArray = arr.sort((a:any, b:any) => {
return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix();
......@@ -743,7 +743,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
arr.forEach((item:any) =>{
let sortFieldValue:Array<any> = item[groupField[0].name].split("-");
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) => {
return Number(a.sortField) - Number(b.sortField);
......
......@@ -278,7 +278,7 @@ import UtilService from '@/utilservice/util-service';
public handleClick(){
const view:any ={
viewname: 'app-portal-design',
title: '面板设计',
title: (this.$t('app.dashBoard.handleClick.title')),
width: 1600,
placement: 'DRAWER_RIGHT'
}
......
......@@ -54,7 +54,7 @@
</i-col>
</a>
</row>
<div v-else class="app-data-empty">暂无数据</div>
<div v-else class="app-data-empty">{{ $t('app.commonWords.noData') }}</div>
</#if>
</div>
</template>
......@@ -410,7 +410,7 @@
*/
public load(opt: any = {}, isReset: boolean = false): void {
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;
}
const arg: any = {...opt};
......@@ -434,7 +434,7 @@
post.then((response: any) => {
if (!response || response.status !== 200) {
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;
}
......@@ -463,7 +463,7 @@
if (response && response.status === 401) {
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 @@
*/
public async remove(datas: any[]): Promise<any> {
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;
}
let _datas:any[] = [];
......@@ -509,9 +509,9 @@
});
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 {
dataInfo = dataInfo + '...' + ' 共' + _datas.length + '条数据';
dataInfo = dataInfo + '...' + ' ' + (this.$t('app.dataView.sum') as string) + _datas.length + (this.$t('app.dataView.data') as string);
}
const removeData = () => {
......@@ -525,10 +525,10 @@
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
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;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
}
//删除items中已删除的项
_datas.forEach((data: any) => {
......@@ -547,7 +547,7 @@
return;
}
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);
return;
}
......@@ -558,8 +558,8 @@
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
title: (this.$t('app.commonWords.warning') as string),
content: (this.$t('app.gridpage.confirmDel') as string) + ' ' + dataInfo + ',' + (this.$t('app.gridpage.notRecoverable') as string),
onOk: () => {
removeData();
},
......@@ -585,7 +585,7 @@
try {
if(Object.is(item.rowDataState, 'create')){
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{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
......@@ -593,7 +593,7 @@
}
}else if(Object.is(item.rowDataState, 'update')){
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{
Object.assign(item,{viewparams:this.viewparams});
<#if de??>
......@@ -613,10 +613,10 @@
this.$emit('save', successItems);
this.refresh();
if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{
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]);
});
}
......
......@@ -112,9 +112,9 @@
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Data,Context,isloading);
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Data,Context,isloading);
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<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>
</#if>
<div class="container-header">
......
......@@ -31,7 +31,7 @@
<context-menu :contextMenuStyle="{width: '100%'}" :data="item" :renderContent="renderContextMenu">
<el-card @click.native="onEventClick(item,true,$event)" :class="item.className">
<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>
</context-menu>
</el-timeline-item>
......@@ -405,7 +405,7 @@ FullCalendar,
post.then((response: any) => {
if (!response || response.status !== 200) {
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;
}
......@@ -416,7 +416,7 @@ FullCalendar,
if (response && response.status === 401) {
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,
post.then((response: any) => {
if (!response || response.status !== 200) {
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;
}
......@@ -614,7 +614,7 @@ FullCalendar,
if (response && response.status === 401) {
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 @@
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
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([]);
return;
}
......@@ -466,7 +466,7 @@
if (response && response.status === 401) {
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 @@
const get: Promise<any> = this.service.getNodes(JSON.parse(JSON.stringify(this.context)),arg);
get.then((response: any) => {
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;
}
const _items = [...response.data];
......@@ -545,7 +545,7 @@
if (response && response.status === 401) {
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 @@
<div slot='left'>
<#if ctrl.isShowTitleBar()>
<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()??>
<#assign controls = ctrl.getPSControls()/>
<#list controls as singleControl>
......
......@@ -3,7 +3,7 @@
<div slot='left'>
<#if ctrl.isShowTitleBar()>
<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>
</#if>
<#if ctrl.isEnableSearch()>
......
......@@ -63,8 +63,8 @@
</div>
<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}','NEXT')" @click="onClickNext('${form.name}')" type="primary" long>下一步</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}','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>{{$t('app.wizardPanel.complete')}}</i-button>
</div>
</div>
</el-popover>
......@@ -358,7 +358,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
</#if>
}
......@@ -395,7 +395,7 @@
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.info });
});
</#if>
}
......@@ -543,7 +543,7 @@
this.curState = 'NEXT';
this.wizardState.next({ tag: name, action: 'save', data: this.formParam });
} 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 @@
this.curState = 'FINISH';
this.wizardState.next({ tag: name, action: 'save', data: this.formParam });
} 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,
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
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;
}
this.tasks = [...this.tasks, ...response.data];
......@@ -271,7 +271,7 @@ GanttElastic,
if (response && response.status === 401) {
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,
*/
public load(opt: any = {}, isReset: boolean = false): void {
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;
}
const arg: any = {...opt};
......@@ -408,7 +408,7 @@ draggable,
post.then((response: any) => {
if (!response || response.status !== 200) {
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;
}
......@@ -438,7 +438,7 @@ draggable,
if (response && response.status === 401) {
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,
*/
public async remove(datas: any[]): Promise<any> {
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;
}
let _datas:any[] = [];
......@@ -500,10 +500,10 @@ draggable,
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
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;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
}
//删除items中已删除的项
_datas.forEach((data: any) => {
......@@ -522,7 +522,7 @@ draggable,
return;
}
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);
return;
}
......@@ -533,8 +533,8 @@ draggable,
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
title: (this.$t('app.commonWords.warning') as string),
content: (this.$t('app.kanban.delete1') as string) + dataInfo + ',' + (this.$t('app.kanban.delete2') as string),
onOk: () => {
removeData();
},
......@@ -560,7 +560,7 @@ draggable,
post.then((response: any) => {
if (!response.status || response.status !== 200) {
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();
return;
......@@ -571,11 +571,11 @@ draggable,
this.$emit('update', this.items);
}).catch((response: any) => {
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;
}
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;
}
});
......
......@@ -4,7 +4,7 @@
<#if item.render??>
${item.render.code}
<#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>
<#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())>
......
......@@ -14,7 +14,7 @@ new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} })
<#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'>
new FormIFrameModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'>
......
......@@ -23,6 +23,14 @@ import schema from 'async-validator';
@Inject({from:'navModel',default: 'tab'})
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';
<#if ctrl.getPSDEFormItemVRs()??>
<#list ctrl.getPSDEFormItemVRs() as fideValueRule>
<#if fideValueRule.getPSDEFormItemName() == formdetail.getName()>
<#-- 系统值规则 -->
<#if fideValueRule.getPSSysValueRule()??>
<#assign valueRule = fideValueRule.getPSSysValueRule()/>
<#if valueRule.getRuleType?? && valueRule.getRuleType()??>
......@@ -272,6 +281,7 @@ import schema from 'async-validator';
</#list>
}
/**
* 详情模型集合
*
......@@ -676,7 +686,7 @@ import schema from 'async-validator';
if (value && value.startsWith('%') && value.endsWith('%')) {
const key: string = value.substring(1, value.length - 1);
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;
}
value = this.data[key];
......@@ -906,7 +916,7 @@ import schema from 'async-validator';
*/
public load(opt: any = {}): void {
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;
}
const arg: any = { ...opt };
......@@ -923,11 +933,11 @@ import schema from 'async-validator';
}
}).catch((response: any) => {
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;
}
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;
}
});
......@@ -941,7 +951,7 @@ import schema from 'async-validator';
*/
public loadDraft(opt: any = {}): void {
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;
}
const arg: any = { ...opt } ;
......@@ -950,19 +960,21 @@ import schema from 'async-validator';
post.then((response: any) => {
if (!response.status || response.status !== 200) {
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;
}
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.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.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
......@@ -979,11 +991,11 @@ import schema from 'async-validator';
});
}).catch((response: any) => {
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;
}
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;
}
});
......@@ -1005,7 +1017,7 @@ import schema from 'async-validator';
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
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;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1013,7 +1025,7 @@ import schema from 'async-validator';
post.then((response: any) => {
if (!response.status || response.status !== 200) {
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;
}
......@@ -1031,20 +1043,20 @@ import schema from 'async-validator';
if (response && response.status && response.data) {
if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({
title: '保存数据发生错误',
content: '数据不一致,可能后台数据已经被修改,是否要重新加载数据?',
title: (this.$t('app.formpage.saveerror') as string),
content: (this.$t('app.formpage.savecontent') as string),
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
}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;
}
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;
}
});
......@@ -1063,7 +1075,7 @@ import schema from 'async-validator';
return new Promise((resolve: any, reject: any) => {
showResultInfo = showResultInfo === undefined ? true : false;
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;
}
const arg: any = { ...opt };
......@@ -1088,7 +1100,7 @@ import schema from 'async-validator';
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){
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;
}
Object.assign(arg,{viewparams:this.viewparams});
......@@ -1096,7 +1108,7 @@ import schema from 'async-validator';
post.then((response: any) => {
if (!response.status || response.status !== 200) {
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;
}
......@@ -1112,7 +1124,7 @@ import schema from 'async-validator';
});
<#if ctrl.getFormFuncMode()?lower_case != 'wizardform'>
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>
resolve(response);
......@@ -1120,21 +1132,21 @@ import schema from 'async-validator';
if (response && response.status && response.data) {
if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({
title: '保存数据发生错误',
content: '数据不一致,可能后台数据已经被修改,是否要重新加载数据?',
title: (this.$t('app.formpage.saveerror') as string),
content: (this.$t('app.formpage.savecontent') as string),
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
}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);
}
return;
}
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);
return;
}
......@@ -1153,7 +1165,7 @@ import schema from 'async-validator';
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => {
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;
}
const arg: any = opt[0];
......@@ -1165,7 +1177,7 @@ import schema from 'async-validator';
this.$emit('remove',data);
this.formState.next({ type: 'remove', data: data });
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'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
......@@ -1201,20 +1213,20 @@ import schema from 'async-validator';
result.then((response: any) => {
if (!response || response.status !== 200) {
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;
}
this.$Notice.info({ title: '', desc: '工作流启动成功' });
this.$Notice.info({ title: '', desc: (this.$t('app.formpage.workflow.startsuccess') as string) });
resolve(response);
}).catch((response: any) => {
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);
return;
}
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);
return;
}
......@@ -1222,12 +1234,12 @@ import schema from 'async-validator';
});
}).catch((response: any) => {
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);
return;
}
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);
return;
}
......@@ -1276,22 +1288,22 @@ import schema from 'async-validator';
result.then((response: any) => {
if (!response || response.status !== 200) {
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;
}
this.onFormLoad(arg,'submit');
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);
}).catch((response: any) => {
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);
return;
}
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);
return;
}
......@@ -1299,12 +1311,12 @@ import schema from 'async-validator';
});
}).catch((response: any) => {
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);
return;
}
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);
return;
}
......@@ -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);
post.then((response: any) => {
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;
}
const data = response.data;
......@@ -1356,11 +1368,11 @@ import schema from 'async-validator';
});
}).catch((response: any) => {
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;
}
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;
}
});
......
......@@ -75,22 +75,23 @@
<div style="text-align: center;">
<#if item.getPSDEUIActionGroup().getPSDEUIActions()??>
<#list item.getPSDEUIActionGroup().getPSUIActionGroupDetails() as uiactionDetail>
<#if uiactionDetail_index gt 0>
<divider type='vertical'></divider>
</#if>
<#if uiactionDetail.getPSUIAction?? && 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()>
<tooltip :transfer="true" :max-width="600">
</#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.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>
<#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>
</#if>
<#assign preUIAction = uiaction />
</#if>
</#list>
</#if>
......@@ -168,7 +169,12 @@
</app-column-link>
<#else>
<#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>
<#if item.getValueFormat()?? && item.getValueFormat() != "%1$s">
<app-format-data format="${item.getValueFormat()}" :data="row.${item.getName()?lower_case}"></app-format-data>
......
<template>
<div class='grid' style="height:100%;">
<#if ctrl.render?? || ctrl.getRender()??>
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<i-form style="height:100%">
......@@ -29,7 +29,7 @@
@row-dblclick="rowDBLClick($event)"
ref='multipleTable' :data="items" :show-header="!isHideHeader">
<template slot="empty">
无数据
{{$t('app.gridpage.noData')}}
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<span class="quick-toolbar">
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
......@@ -116,6 +116,28 @@ import { FormItemModel } from '@/model/form-detail';
*/
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';
*/
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';
*/
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';
*/
public load(opt: any = {}, pageReset: boolean = false): void {
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;
}
if(pageReset){
......@@ -611,7 +652,7 @@ import { FormItemModel } from '@/model/form-detail';
post.then((response: any) => {
if (!response.status || response.status !== 200) {
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;
}
......@@ -622,6 +663,9 @@ import { FormItemModel } from '@/model/form-detail';
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);
// 设置默认选中
let _this = this;
......@@ -651,7 +695,7 @@ import { FormItemModel } from '@/model/form-detail';
if (response && response.status === 401) {
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';
*/
public async remove(datas: any[]): Promise<any> {
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;
}
let _datas:any[] = [];
......@@ -698,9 +742,9 @@ import { FormItemModel } from '@/model/form-detail';
});
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 {
dataInfo = dataInfo + '...' + ' 共' + _datas.length + '条数据';
dataInfo = dataInfo + '...' + ' '+(this.$t('app.gridpage.totle') as string) + _datas.length + (this.$t('app.gridpage.desc2') as string);
}
const removeData = () => {
......@@ -715,10 +759,10 @@ import { FormItemModel } from '@/model/form-detail';
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
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;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.gridpage.delSuccess') as string) });
}
//删除items中已删除的项
console.log(this.items);
......@@ -740,7 +784,7 @@ import { FormItemModel } from '@/model/form-detail';
return;
}
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);
return;
}
......@@ -751,8 +795,8 @@ import { FormItemModel } from '@/model/form-detail';
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
title: (this.$t('app.commonWords.warning') as string),
content: (this.$t('app.gridpage.confirmDel') as string)+' ' + dataInfo + ','+(this.$t('app.gridpage.notRecoverable') as string),
onOk: () => {
removeData();
},
......@@ -770,13 +814,13 @@ import { FormItemModel } from '@/model/form-detail';
*/
public addBatch(arg: any = {}): void {
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;
}
if(!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);
post.then((response: any) => {
if (response.ret !== 200) {
......@@ -882,7 +926,7 @@ import { FormItemModel } from '@/model/form-detail';
excel.export_json_to_excel({
header: tHeader, //表头 必填
data, //具体数据 必填
filename: "${ctrl.getPSAppDataEntity().getLogicName()}表", //非必填
filename: "${ctrl.getPSAppDataEntity().getLogicName()}"+(this.$t('app.gridpage.grid') as string), //非必填
autoWidth: true, //非必填
bookType: "xlsx" //非必填
});
......@@ -922,7 +966,7 @@ import { FormItemModel } from '@/model/form-detail';
</#if>
post.then((response: any) => {
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;
}
try {
......@@ -934,7 +978,7 @@ import { FormItemModel } from '@/model/form-detail';
if (response && response.status === 401) {
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';
const sums:Array<any> = [];
columns.forEach((column:any, index:number) => {
if (index === 0) {
sums[index] = '合计';
sums[index] = (this.$t('app.gridpage.sum') as string);
return;
}
if(index === (columns.length - 1)){
......@@ -1422,7 +1466,7 @@ import { FormItemModel } from '@/model/form-detail';
const sums:Array<any> = [];
columns.forEach((column:any, index:number) => {
if (index === 0) {
sums[index] = '合计';
sums[index] = (this.$t('app.gridpage.sum') as string);
return;
}else if(index === (columns.length - 1)){
sums[index] = '';
......@@ -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) =>{
if (!response.status || response.status !== 200) {
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;
}
......@@ -1478,7 +1522,7 @@ import { FormItemModel } from '@/model/form-detail';
}
this.remoteData = {};
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>
......@@ -1567,8 +1611,15 @@ import { FormItemModel } from '@/model/form-detail';
*/
public async save(args: any[], params?: any, $event?: any, xData?: any){
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()){
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 [];
}
let successItems:any = [];
......@@ -1578,7 +1629,7 @@ import { FormItemModel } from '@/model/form-detail';
try {
if(Object.is(item.rowDataState, 'create')){
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{
Object.assign(item,{viewparams:this.viewparams});
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';
}
}else if(Object.is(item.rowDataState, 'update')){
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{
Object.assign(item,{viewparams:this.viewparams});
<#if de??>
......@@ -1594,7 +1645,7 @@ import { FormItemModel } from '@/model/form-detail';
Object.assign(this.context,{${appde.getCodeName()?lower_case}:item.${appde.getCodeName()?lower_case}});
}
</#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)));
}
}
......@@ -1606,10 +1657,10 @@ import { FormItemModel } from '@/model/form-detail';
this.$emit('save', successItems);
this.refresh([]);
if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' });
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{
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]);
});
}
......@@ -1625,7 +1676,7 @@ import { FormItemModel } from '@/model/form-detail';
*/
public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
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;
}
let _this = this;
......@@ -1634,7 +1685,7 @@ import { FormItemModel } from '@/model/form-detail';
post.then((response: any) => {
if (!response.status || response.status !== 200) {
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;
}
......@@ -1648,7 +1699,7 @@ import { FormItemModel } from '@/model/form-detail';
return;
}
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;
}
});
......@@ -1685,6 +1736,11 @@ import { FormItemModel } from '@/model/form-detail';
*/
public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){
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()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
......@@ -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);
post.then((response: any) => {
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;
}
const _data: any = response.data;
......@@ -1736,7 +1792,7 @@ import { FormItemModel } from '@/model/form-detail';
return;
}
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;
}
});
......@@ -1813,6 +1869,45 @@ import { FormItemModel } from '@/model/form-detail';
}
</#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>
......
......@@ -27,6 +27,15 @@
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
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>
},
</#list>
......@@ -42,6 +51,15 @@
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
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>
},
</#list>
......@@ -88,6 +106,10 @@ ${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
name:'query',
prop:'query'
},
{
name:'filter',
prop:'filter'
},
{
name:'page',
prop:'page'
......
......@@ -110,7 +110,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
*/
@Errorlog
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) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
......@@ -169,14 +169,14 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
*/
@Errorlog
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) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Data,Context,isloading);
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(Data,Context,isloading);
result =_appEntityService.Update(Context,Data,isloading);
}
result.then((response) => {
this.handleResponse(action, response);
......@@ -361,7 +361,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MainService
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public frontLogic(action:string,context: any = {}, data: any = {}, isloading?: boolean): Promise<any> {
......@@ -382,6 +382,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>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
......
......@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()>
<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>
</#if>
<div class="container-header">
......
......@@ -17,4 +17,4 @@
</#assign>
<#ibizinclude>
../@MACRO/VIEW_LAYOUT_BASE.ftl
</#ibizinclude>
\ No newline at end of file
</#ibizinclude>
......@@ -2,6 +2,6 @@
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<img class="logout-bg" src="/assets/img/logout_bg.png"/>
<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>
\ No newline at end of file
<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>
<div>应用流程处理记录视图</div>
<div>{{$t('app.viewLayoutPanel.appWfstepTraceView.title')}}</div>
</div>
\ No newline at end of file
......@@ -5,7 +5,7 @@
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
<div class='content-container'>
应用流程跟踪视图
{{$t('app.viewLayoutPanel.appWfstepDataView.title')}}
</div>
</card>
</div>
\ No newline at end of file
......@@ -5,18 +5,18 @@
<div class="login-title">{{$t(model.srfTitle)}}</div>
<i-form class="login-form">
<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>
</i-input>
</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>
</i-input>
</form-item>
</i-form>
<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>
......@@ -93,7 +93,7 @@
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div>无扩展插件</div>
<div>{{$t('app.portlet.noExtensions')}}</div>
</#if>
</div>
<#-- 操作栏 -->
......@@ -110,7 +110,7 @@
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<app-actionbar :items="actionBarModelData" @itemClick="handleItemClick"></app-actionbar>
<app-actionbar :viewState="viewState" :uiService="appUIService" :items="actionBarModelData" @itemClick="handleItemClick"></app-actionbar>
</#if>
</div>
<#-- HTML -->
......@@ -208,6 +208,9 @@ import { Environment } from '@/environments/environment';
<#assign counter = uiaction.getPSAppCounter() />
counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice,
<#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 item.render??>
${item.render.code}
<#else>
<input-box
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
v-model="row[column.property]"
......@@ -6,4 +9,5 @@
<#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if>
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
\ No newline at end of file
</input-box>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
......@@ -9,3 +12,4 @@
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{panelEditItemChange(data, ${editor.getName()?lower_case}, $event)}">
</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>
\ No newline at end of file
<#if item.render??>
${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>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list
v-model="data.${editor.name}"
:data="data"
......@@ -13,4 +16,5 @@
codelistType='${codelist.getCodeListType()}'
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}">
</dropdown-list>
\ No newline at end of file
</dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
......@@ -16,3 +19,4 @@
style="${item.getEditorCssStyle()}"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list
v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
......@@ -18,3 +21,4 @@
style="${item.getEditorCssStyle()}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list
v-model="data.${editor.name}"
:data="data"
......@@ -14,4 +17,5 @@
codelistType='${codelist.getCodeListType()}'
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>>
</dropdown-list>
\ No newline at end of file
</dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
......@@ -16,3 +19,4 @@
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list
v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
......@@ -18,3 +21,4 @@
style="${item.getEditorCssStyle()}width: 100px;"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</dropdown-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list-mpicker
v-model="data.${editor.name}"
:data="data"
......@@ -6,6 +9,7 @@
:viewparams="viewparams"
:localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled"
<#if editor.getPSCodeList()??>
<#assign codelist=editor.getPSCodeList()>
tag='${codelist.codeName}'
......@@ -15,4 +19,5 @@
</#if>
</#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${editor.getEditorCssStyle()}">
</dropdown-list-mpicker>
\ No newline at end of file
</dropdown-list-mpicker>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list-mpicker
v-model="row[column.property]"
:data="row"
......@@ -16,4 +19,5 @@
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"
style="${item.getEditorCssStyle()}">
</dropdown-list-mpicker>
\ No newline at end of file
</dropdown-list-mpicker>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<dropdown-list-mpicker
v-model="data.${editor.name?lower_case}"
:data="data"
......@@ -19,3 +22,4 @@
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"
style="${item.getEditorCssStyle()}">
</dropdown-list-mpicker>
</#if>
<app-code-editor :code="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" @change="(val) =>{this.data.${editor.name} =val}" codetype="javascript" ></app-code-editor>
\ No newline at end of file
<#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>
</#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>
\ No newline at end of file
<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>
<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>
\ No newline at end of file
<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>
<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>
\ No newline at end of file
<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>
<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>
\ No newline at end of file
<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>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-radio-group
v-model="data.${editor.name}"
:data="data"
......@@ -14,4 +17,5 @@
codelistType='${codelist.getCodeListType()}'
</#if>
style="${editor.getEditorCssStyle()}">
</app-radio-group>
\ No newline at end of file
</app-radio-group>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-radio-group
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
......@@ -16,3 +19,4 @@
</#if>
style="${item.getEditorCssStyle()}">
</app-radio-group>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-radio-group
v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
......@@ -18,3 +21,4 @@
</#if>
style="${item.getEditorCssStyle()}">
</app-radio-group>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload
:formState="viewState"
:ignorefieldvaluechange="false"
......@@ -10,4 +13,5 @@
:imageOnly="true"
: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>
\ No newline at end of file
</app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload
:formState="viewState"
:ignorefieldvaluechange="false"
......@@ -14,3 +17,4 @@
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
style="${editor.getEditorCssStyle()}overflow: auto;">
</app-file-upload>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload
:formState="viewState"
:ignorefieldvaluechange="false"
......@@ -10,4 +13,5 @@
:imageOnly="true"
: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>
\ No newline at end of file
</app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload
:formState="viewState"
:ignorefieldvaluechange="false"
......@@ -13,3 +16,4 @@
: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>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getPickupPSAppView()??>
<app-mpicker
:activeData="data"
......@@ -20,4 +23,5 @@
@formitemvaluechange="onFormItemValueChange"
style="${editor.getEditorCssStyle()}">
</app-mpicker>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getPickupPSAppView()??>
<app-mpicker
:activeData="row"
......@@ -20,4 +23,5 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}">
</app-mpicker>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getPickupPSAppView()??>
<app-mpicker
:activeData="data"
......@@ -20,4 +23,5 @@
@formitemvaluechange="onFormItemValueChange"
style="${editor.getEditorCssStyle()}">
</app-mpicker>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getPickupPSAppView()??>
<app-mpicker
:activeData="row"
......@@ -20,4 +23,5 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}">
</app-mpicker>
</#if>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<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>
</div>
\ No newline at end of file
</div>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea
class="ivu-input"
......@@ -12,3 +15,4 @@
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</textarea>
</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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<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>
</div>
\ No newline at end of file
</div>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea
class="ivu-input"
......@@ -13,3 +16,4 @@
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</textarea>
</div>
</#if>
<i-input type="password" v-model="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></i-input>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box
type="password"
<#if item.getEnableCond??>
......@@ -7,3 +10,4 @@
style="${item.getEditorCssStyle()}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</input-box>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-switch
name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}"
......@@ -7,3 +10,4 @@
</#if>
style="${item.getEditorCssStyle()}">
</app-switch>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box
v-model="data.${editor.name}"
@enter="onEnter($event)"
......@@ -13,4 +16,5 @@
</#if>
<#if editor.getPlaceHolder()??>placeholder="${editor.getPlaceHolder()}"</#if>
style="${editor.getEditorCssStyle()}">
</input-box>
\ No newline at end of file
</input-box>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<input-box
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
v-model="row[column.property]"
......@@ -17,4 +20,5 @@
placeholder="${item.getPlaceHolder()}"
</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
\ No newline at end of file
</input-box>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<input-box
type="number"
<#if item.getEnableCond??>
:disabled="data.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
</#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}"
style="${item.getEditorCssStyle()}"
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</input-box>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -25,4 +28,5 @@
<@getItemRender editor />
</app-picker>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -25,4 +28,5 @@
<@getItemRender editor />
</app-picker>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -26,3 +29,4 @@
</app-picker>
</#if>
</#if>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker-select-view
......@@ -23,4 +26,5 @@
@formitemvaluechange="onFormItemValueChange">
</app-picker-select-view>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker-select-view
......@@ -23,4 +26,5 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker-select-view>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker-select-view
......@@ -25,4 +28,5 @@
@formitemvaluechange="onFormItemValueChange">
</app-picker-select-view>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker-select-view
......@@ -25,4 +28,5 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker-select-view>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-picker
:formState="formState"
:data="data"
......@@ -20,4 +23,5 @@
style="${editor.getEditorCssStyle()}"
@formitemvaluechange="onFormItemValueChange">
<@getItemRender editor />
</app-picker>
\ No newline at end of file
</app-picker>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-picker
:formState="viewState"
:data="row"
......@@ -20,4 +23,5 @@
style="${item.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
<@getItemRender editor />
</app-picker>
\ No newline at end of file
</app-picker>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if item.getRefPickupPSAppView()??>
<#assign pickupview = item.getRefPickupPSAppView()>
<app-embed-picker
......@@ -25,4 +28,5 @@
@formitemvaluechange="onFormItemValueChange"
style="${editor.getEditorCssStyle()}">
</app-embed-picker>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if item.getRefPickupPSAppView()??>
<#assign pickupview = item.getRefPickupPSAppView()>
<app-embed-picker
......@@ -25,4 +28,5 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}">
</app-embed-picker>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -26,4 +29,5 @@
<@getItemRender editor />
</app-picker>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -26,4 +29,5 @@
<@getItemRender editor />
</app-picker>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -23,4 +26,5 @@
@formitemvaluechange="onFormItemValueChange">
</app-picker>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -23,4 +26,5 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -22,4 +25,5 @@
@formitemvaluechange="onFormItemValueChange">
</app-picker>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<#if editor.getEditorParam("PICKUPVIEW",true)??>
<#if editor.getPickupPSAppView()??>
<app-picker
......@@ -22,4 +25,5 @@
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker>
</#if>
</#if>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-picker
:formState="formState"
:data="data"
......@@ -18,4 +21,5 @@
:linkview=<@getLinkView editor />
style="${editor.getEditorCssStyle()}"
@formitemvaluechange="onFormItemValueChange">
</app-picker>
\ No newline at end of file
</app-picker>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-picker
:formState="viewState"
:data="row"
......@@ -18,4 +21,5 @@
:linkview=<@getLinkView editor />
style="${editor.getEditorCssStyle()}"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
</app-picker>
\ No newline at end of file
</app-picker>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload
:formState="viewState"
:ignorefieldvaluechange="false"
......@@ -10,4 +13,5 @@
: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>
\ No newline at end of file
</app-file-upload>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-file-upload
:formState="viewState"
:ignorefieldvaluechange="false"
......@@ -13,3 +16,4 @@
:exportparams='<#if editor.getEditorParam('exportparams','') != ''>${editor.getEditorParam('exportparams','')}<#else>{}</#if>'
style="${editor.getEditorCssStyle()}overflow: auto;">
</app-file-upload>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<date-picker
type="datetime"
:transfer="true"
......@@ -10,3 +13,4 @@
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)}">
</date-picker>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<date-picker
type="date"
:transfer="true"
......@@ -10,3 +13,4 @@
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)}">
</date-picker>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker
:transfer="true"
format="mm"
......@@ -9,3 +12,4 @@
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)}">
</time-picker>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker
:transfer="true"
format="HH"
......@@ -9,3 +12,4 @@
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)}">
</time-picker>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<date-picker
type="date"
:transfer="true"
......@@ -10,3 +13,4 @@
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)}">
</date-picker>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker
:transfer="true"
format="HH:mm:ss"
......@@ -9,3 +12,4 @@
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)}">
</time-picker>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker
:transfer="true"
format="HH:mm"
......@@ -9,3 +12,4 @@
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)}">
</time-picker>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<time-picker
:transfer="true"
format="ss"
......@@ -9,3 +12,4 @@
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)}">
</time-picker>
</#if>
<i-input v-model="data.${editor.name}" readonly disabled style="${editor.getEditorCssStyle()}"></i-input>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<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>
<#if item.render??>
${item.render.code}
<#else>
<app-span <#t>
name='${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()??>
<#assign codelist=item.getPSCodeList() />
tag='${codelist.codeName}' <#t>
......@@ -22,4 +49,6 @@
:localContext =<@getNavigateContext editor /> <#t>
:localParam =<@getNavigateParams editor /> <#t>
style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt>
\ No newline at end of file
</app-span><#lt>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-span <#t>
name='${editor.name}' <#t>
:value="row[column.property]" <#t>
......@@ -22,4 +25,5 @@
:localContext =<@getNavigateContext editor /> <#t>
:localParam =<@getNavigateParams editor /> <#t>
style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt>
\ No newline at end of file
</app-span><#lt>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-span <#t>
:value="data.${editor.name?lower_case}" <#t>
name="${editor.name?lower_case}" <#t>
......@@ -14,3 +17,4 @@
</#if>
style="${item.getEditorCssStyle()}"> <#t>
</app-span> <#lt>
</#if>
<span v-html="data.${editor.name}"></span>
\ No newline at end of file
<span v-html="data.${item.getName()?lower_case}"></span>
<app-stepper name='${editor.name}' :value="this.data.${editor.name}" @change="onFormItemValueChange" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-stepper>
\ 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>
</#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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-stepper
name='${editor.name}'
:value="data.${editor.name?lower_case}"
......@@ -7,3 +10,4 @@
</#if>
style="${item.getEditorCssStyle()}">
</app-stepper>
</#if>
<app-slider name='${editor.name}' :value="this.data.${editor.name}" @change="onFormItemValueChange" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-slider>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-slider
name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}"
......@@ -7,3 +10,4 @@
</#if>
style="${item.getEditorCssStyle()}">
</app-slider>
</#if>
<div style="${editor.getEditorCssStyle()}">{{data.${editor.name}}}</div>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<div style="${editor.getEditorCssStyle()}">{{data.${editor.name}}}</div>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-autocomplete
:data="data"
:disabled="detailsModel.${editor.name}.disabled"
......@@ -17,4 +20,5 @@
:value="data.${editor.name}"
@formitemvaluechange="onFormItemValueChange"
style="${editor.getEditorCssStyle()}">
</app-autocomplete>
\ No newline at end of file
</app-autocomplete>
</#if>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-autocomplete
:data="row"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
......@@ -17,4 +20,5 @@
:value="row[column.property]"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}">
</app-autocomplete>
\ No newline at end of file
</app-autocomplete>
</#if>
<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>
\ No newline at end of file
<#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>
</#if>
\ No newline at end of file
<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>
\ 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>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<app-rate
name='${editor.name?lower_case}'
:value="data.${editor.name?lower_case}"
......@@ -7,3 +10,4 @@
</#if>
style="${item.getEditorCssStyle()}">
</app-rate>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<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>
</div>
\ No newline at end of file
</div>
</#if>
\ No newline at end of file
<#if item.render??>
${item.render.code}
<#else>
<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>
</div>
\ No newline at end of file
</div>
</#if>
<#if item.render??>
${item.render.code}
<#else>
<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>
</div>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-checkbox-list
v-model="data.${editor.name}"
:data="data"
......@@ -18,4 +21,5 @@
</#if>
name="${editor.name}"
style="${editor.getEditorCssStyle()}">
</app-checkbox-list>
\ No newline at end of file
</app-checkbox-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-checkbox-list
v-model="row[column.property]"
:disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1"
......@@ -19,3 +22,4 @@
name="${item.name}"
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</app-checkbox-list>
</#if>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<#if item.render??>
${item.render.code}
<#else>
<app-checkbox-list
v-model="data.${editor.name?lower_case}"
<#if item.getEnableCond??>
......@@ -21,3 +24,4 @@
name="${editor.name?lower_case}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
</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>
\ No newline at end of file
<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>
<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>
\ No newline at end of file
<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>
<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>
\ No newline at end of file
<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>
<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>
\ No newline at end of file
<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>
......@@ -12,7 +12,7 @@
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
const _this: any = this;
const data: any = {};
if (_this.newRow && _this.newRow instanceof Function) {
if (_this.hasOwnProperty('newRow') && _this.newRow instanceof Function) {
_this.newRow([{ ...data }], params, $event, xData);
} else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData);
......
......@@ -33,6 +33,9 @@ import view_${ctrl.getName()} from '@widgets/app/${srffilepath2(ctrl.getCodeName
},
beforeRouteEnter: (to: any, from: any, next: any) => {
next((vm: any) => {
if(!Object.is(vm.navModel,"route")){
vm.initNavDataWithTab(vm.viewCacheData);
}
vm.$store.commit('addCurPageViewtag', { fullPath: to.fullPath, viewtag: vm.viewtag });
});
},
......
......@@ -24,6 +24,9 @@ import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservi
</#if>
</#list>
</#if>
<#if appde??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#if import_block??>
${import_block}
</#if>
......@@ -48,6 +51,14 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name?
* @memberof ${srfclassname(view.name)}Base
*/
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 view.getPSAppCounterRefs()??>
......
......@@ -161,6 +161,16 @@
return [...uniqueSet];
}
/**
* 去重
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public removeDuplicates(data:any):Array<any> {
const uniqueSet = new Set(data);
return [...uniqueSet];
}
/**
* 选中数据全部删除
*
......@@ -216,6 +226,7 @@
* @memberof ${srfclassname('${view.name}')}Base
*/
public onClickCancel(): void {
this.$emit('viewdataschange', null);
this.$emit('close', null);
}
......
......@@ -84,6 +84,7 @@
* @memberof ${srfclassname('${view.name}')}
*/
public onClickCancel(): void {
this.$emit('viewdataschange', null);
this.$emit('close', null);
}
......
<#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 {
success: "Success",
ok: "OK",
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:{
new: "New"
new: "New",
add: "Add",
},
gridpage: {
choicecolumns: "Choice columns",
......@@ -28,6 +42,50 @@ export default {
show: "Show",
records: "records",
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: {
sureclosetip: {
......@@ -52,6 +110,8 @@ export default {
list: "list",
dateSelectModalTitle: "select the time you wanted",
gotoDate: "goto",
from: "From",
to: "To",
},
// 非实体视图
views: {
......@@ -81,6 +141,94 @@ export default {
},
</#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: {
<#list app.getAllPSAppDataEntities() as dataEntitey>
......
......@@ -18,9 +18,23 @@ export default {
success: "成功",
ok: "确认",
cancel: "取消",
save: "保存",
codeNotExist: "代码表不存在",
reqException: "请求异常",
sysException: "系统异常",
warning: "警告",
wrong: "错误",
rulesException: "值规则校验异常",
saveSuccess: "保存成功",
saveFailed: "保存失败",
deleteSuccess: "删除成功!",
deleteError: "删除失败!",
delDataFail: "删除数据失败",
noData: "暂无数据",
},
local:{
new: "新建"
new: "新建",
add: "增加",
},
gridpage: {
choicecolumns: "选择列",
......@@ -28,6 +42,50 @@ export default {
show: "显示",
records: "条",
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: {
sureclosetip: {
......@@ -52,6 +110,8 @@ export default {
list: "列",
dateSelectModalTitle: "选择要跳转的时间",
gotoDate: "跳转",
from: "从",
to: "至",
},
// 非实体视图
views: {
......@@ -81,6 +141,93 @@ export default {
},
</#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: {
<#list app.getAllPSAppDataEntities() as dataEntitey>
......
......@@ -23,11 +23,23 @@ import { Verify } from '@/utils/verify/verify';
<#-- 源参数 -->
<#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 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}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
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 -->
<#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>
</#if>
</#macro>
......@@ -34,6 +40,10 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 -->
<#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 = [];
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);
......@@ -49,12 +59,25 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
}
}
masterData.${srfpluralize(minorPSAppDataEntity.codeName)?lower_case} = ${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data;
</#if>
<#-- 从实体支持临时数据模式为true,才从前端缓存拿取数据,组装数据给后台 end -->
</#list>
</#if>
</#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 -->
<#macro service_block item singleAppMethod>
<#macro service_block item singleAppMethod afterActionStr = "">
<#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??>
<#list 1..item.getPSAppDERSPathCount() as count>
<#assign path = ''/>
......@@ -70,21 +93,24 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if singleAppMethod.getMethodType() == "SELECT">
if(${condition}context.${item.getCodeName()?lower_case}){
<#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>
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);
</#if>
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 afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
}
<#-- 方法类型为FETCH -->
<#elseif singleAppMethod.getMethodType() == "FETCH">
if(${condition}true){
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 -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
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>
<#-- 方法类型为DEACTION start -->
......@@ -93,7 +119,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
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);
res.data.${item.getCodeName()?lower_case} = data.${item.getCodeName()?lower_case};
<@setStore appEntity=item />
<@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
}
<#-- 无参数情况end -->
......@@ -104,12 +130,16 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#-- 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);
<@setStore appEntity=item />
<@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#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>
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>
<#-- 指定属性情况end -->
}
......@@ -135,9 +165,9 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 -->
<#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>
</#if>
</#if><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
}
<#else>
......@@ -146,7 +176,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<@getStore appEntity=item />
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);
<@setStore appEntity=item />
<@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
}
</#if>
......@@ -165,25 +195,30 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if singleAppMethod.getMethodType() == "SELECT">
<#-- if(context.${item.getCodeName()?lower_case}){ -->
<#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>
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);
</#if>
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 afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#-- } -->
<#-- 方法类型为FETCH -->
<#elseif singleAppMethod.getMethodType() == "FETCH">
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 -->
<#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>
<#-- 方法类型为DEACTION start -->
<#if singleServiceApi.getRequestParamType() == "NONE">
<#-- 无参数情况start -->
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};
<@setStore appEntity=item />
<@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#-- 无参数情况end -->
<#elseif singleServiceApi.getRequestParamType() == "FIELD">
......@@ -192,17 +227,21 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#if singleServiceApi.getRequestMethod() == "GET">
<#-- 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);
<@setStore appEntity=item />
<@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#-- } -->
<#elseif singleServiceApi.getRequestMethod() == "POST">
<#-- REMOVE -->
<#-- 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>
<#-- 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>
<#-- 指定属性情况end -->
......@@ -214,7 +253,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
Object.assign(data,masterData);
<#-- 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);
<@setStore appEntity=item />
<@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#-- } -->
<#elseif singleAppMethod.getCodeName() == 'Save'>
......@@ -223,7 +262,7 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
Object.assign(data,masterData);
<#-- 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);
<@setStore appEntity=item />
<@setStore appEntity=item /><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#-- } -->
<#elseif singleAppMethod.getCodeName() == 'Create'>
......@@ -244,13 +283,14 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#assign majorPSAppDataEntity = deReRs.getMajorPSAppDataEntity() />
<#-- 从实体 -->
<#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>
</#if>
</#if><#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res;
<#else>
<#-- 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>
<#-- 提交对象数据情况end -->
......@@ -440,6 +480,38 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
</#macro>
<#-- 定义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()}服务对象基类
......@@ -479,7 +551,7 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
<#if item.getAllPSAppDEMethods?? && item.getAllPSAppDEMethods()??>
<#list item.getAllPSAppDEMethods() as singleAppMethod>
<#if singleAppMethod.getPSDEServiceAPIMethod?? && singleAppMethod.getPSDEServiceAPIMethod()??>
<#assign singleServiceApi = singleAppMethod.getPSDEServiceAPIMethod()/>
<#assign singleServiceApi = singleAppMethod.getPSDEServiceAPIMethod()/>
</#if>
<#if singleAppMethod.render??>
${singleAppMethod.render.code}
......@@ -496,22 +568,133 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/
public async ${singleAppMethod.getCodeName()}(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
<#--是否存在前端处理逻辑start -->
<#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) >
<#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))});
const result = await appLogic.onExecute(context,data,isloading?true:false);
return {status:200,data:result};
const res = await appLogic.onExecute(context,data,isloading?true:false);
<@excuteAfterAction appdeAction = appdeAction />
return {status:200,data:res};
<#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>
<#--是否存在前端处理逻辑end -->
<#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> -->
<#-- 查询数据集(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>
</#list>
......
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#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 { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
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()??>
<#list item.getAllPSAppDEUIActions() as appdeUIAction>
<#if appdeUIAction.getPSAppDataEntity()??>
......@@ -85,6 +95,13 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
*/
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.
*
......@@ -93,8 +110,10 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
*/
constructor(opts: any = {}) {
super(opts);
this.authService = new ${srfclassname('${item.getCodeName()}')}AuthService(opts);
this.initViewMap();
this.initDeMainStateMap();
this.initDeMainStateOPPrivsMap();
}
/**
......@@ -121,9 +140,21 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
<#if demState.getMSTag()??>
this.allDeMainStateMap.set('${demState.getMSTag()}','${demState.getMSTag()}');
</#if>
<#-- <#if demState.getId()?? && demState.getMSTag()??>
this.allDeMainStateMap.set('${demState.getId()}','${demState.getMSTag()}');
</#if> -->
</#list>
</#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>
</#if>
}
......@@ -218,12 +249,12 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
<#noparse>return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;</#noparse>
<#noparse>return `MOBEDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;</#noparse>
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
<#noparse>return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;</#noparse>
<#noparse>return `EDITVIEW:MSTAG:${ this.getDEMainStateTag(curData)}`;</#noparse>
}
return 'EDITVIEW:';
}
......@@ -302,16 +333,14 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
* @param curData 当前数据
* @memberof ${srfclassname('${item.getCodeName()}')}UIServiceBase
*/
public async getDEMainStateTag(curData:any){
public getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
<#noparse>console.warn(`当前数据对象不包含属性${singleMainField},可能会发生错误`);</#noparse>
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
......@@ -334,4 +363,28 @@ ${P.getLogicCode(appdeUIAction, "LOGIC.vue").code}
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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册