提交 92095875 编写于 作者: KK's avatar KK

多语言提示

上级 d8fe836d
......@@ -31,6 +31,15 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
*/
@Prop() protected name?: string;
/**
* 视图名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected viewName?: string;
/**
* 视图通讯对象
*
......
......@@ -319,7 +319,6 @@ ${ctrl.render.code}
this.items.push(item);
});
}
/**
* 数据加载
*
......@@ -329,7 +328,7 @@ ${ctrl.render.code}
*/
private load(data: any): void {
if(!this.fetchAction){
this.$notify({ type: 'danger', message: '${view.getName()}视图多编辑视图面板loaddraftAction参数未配置' });
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.multieditviewpanel')+'loaddraftAction'+ this.$t('app.notConfig'));
return;
}
let arg: any = {};
......@@ -364,7 +363,7 @@ ${ctrl.render.code}
*/
protected handleAdd(){
if(!this.loaddraftAction){
this.$notify({ type: 'danger', message: '${view.getName()}视图多编辑视图面板loaddraftAction参数未配置' });
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.multieditviewpanel')+'loaddraftAction'+ this.$t('app.notConfig'));
return;
}
const promice: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:this.viewparams}, this.showBusyIndicator);
......
......@@ -2,6 +2,7 @@
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
:saveRefView="saveRefView"
viewName="${view.getName()}"
@viewdatadirty="onViewDataDirty"
@drdatasaved="onDRDataSaved"
updateAction="<#if ctrl.getUpdatePSControlAction()?? && ctrl.getUpdatePSControlAction().getPSAppDEMethod()??>${ctrl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
......
......@@ -820,7 +820,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
private async load(opt: any = {}): Promise<any> {
if (!this.loadAction) {
this.$notice.error('${view.getName()}视图表单loadAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'loadAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const arg: any = { ...opt };
......@@ -848,7 +848,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
protected async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$notice.error('${view.getName()}视图表单loaddraftAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'loaddraftAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const arg: any = { ...opt } ;
......@@ -892,7 +892,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
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('${view.getName()}视图表单' + actionName + '参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+actionName+ this.$t('app.notConfig'));
return Promise.reject();
}
Object.assign(arg, this.viewparams);
......@@ -955,7 +955,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
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('${view.getName()}视图表单' + actionName + '参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+actionName+ this.$t('app.notConfig'));
return Promise.reject();
}
Object.assign(arg, this.viewparams);
......@@ -1004,7 +1004,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
private async remove(opt: Array<any> = [], showResultInfo?: boolean): Promise<any> {
if (!this.removeAction) {
this.$notice.error('${view.getName()}视图表单removeAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'removeAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const arg: any = opt[0];
......@@ -1035,7 +1035,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
protected async wfstart(data: any): Promise<any> {
if (!this.WFStartAction) {
this.$notice.error('${view.getName()}视图表单WFStartAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'WFStartAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const _this: any = this;
......@@ -1060,7 +1060,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
protected async wfsubmit(data: any): Promise<any> {
if (!this.WFSubmitAction) {
this.$notice.error('${view.getName()}视图表单WFSubmitAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.searchform')+'WFSubmitAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const _this: any = this;
......
......@@ -2,6 +2,7 @@
<#assign content>
<#if ctrl.isEnableAutoSave??>:autosave="${ctrl.isEnableAutoSave()?c}"</#if>
:viewtag="viewtag"
viewName="${view.getName()}"
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
updateAction="<#if ctrl.getUpdatePSControlAction ?? && ctrl.getUpdatePSControlAction()?? && ctrl.getUpdatePSControlAction().getPSAppDEMethod()??>${ctrl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
removeAction="<#if ctrl.getRemovePSControlAction ?? && ctrl.getRemovePSControlAction()?? && ctrl.getRemovePSControlAction().getPSAppDEMethod()??>${ctrl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
......
......@@ -820,7 +820,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
private async load(opt: any = {}): Promise<any> {
if (!this.loadAction) {
this.$notice.error('${view.getName()}视图表单loadAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+'loadAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const arg: any = { ...opt };
......@@ -848,7 +848,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
protected async loadDraft(opt: any = {}): Promise<any> {
if (!this.loaddraftAction) {
this.$notice.error('${view.getName()}视图表单loaddraftAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+'loaddraftAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const arg: any = { ...opt } ;
......@@ -892,7 +892,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
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('${view.getName()}视图表单' + actionName + '参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+actionName+ this.$t('app.notConfig'));
return Promise.reject();
}
Object.assign(arg, this.viewparams);
......@@ -955,7 +955,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
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('${view.getName()}视图表单' + actionName + '参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+actionName+ this.$t('app.notConfig'));
return Promise.reject();
}
Object.assign(arg, this.viewparams);
......@@ -1004,7 +1004,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
private async remove(opt: Array<any> = [], showResultInfo?: boolean): Promise<any> {
if (!this.removeAction) {
this.$notice.error('${view.getName()}视图表单removeAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+'removeAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const arg: any = opt[0];
......@@ -1035,7 +1035,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
protected async wfstart(data: any): Promise<any> {
if (!this.WFStartAction) {
this.$notice.error('${view.getName()}视图表单WFStartAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+'WFStartAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const _this: any = this;
......@@ -1060,7 +1060,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/
protected async wfsubmit(data: any): Promise<any> {
if (!this.WFSubmitAction) {
this.$notice.error('${view.getName()}视图表单WFSubmitAction参数未配置');
this.$notice.error(this.viewName+this.$t('app.view')+this.$t('app.ctrl.form')+'WFSubmitAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const _this: any = this;
......
......@@ -2,6 +2,7 @@
<#assign content>
<#if ctrl.isEnableAutoSave??>:autosave="${ctrl.isEnableAutoSave()?c}"</#if>
:viewtag="viewtag"
viewName="${view.getName()}"
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
updateAction="<#if ctrl.getUpdatePSControlAction ?? && ctrl.getUpdatePSControlAction()?? && ctrl.getUpdatePSControlAction().getPSAppDEMethod()??>${ctrl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
removeAction="<#if ctrl.getRemovePSControlAction ?? && ctrl.getRemovePSControlAction()?? && ctrl.getRemovePSControlAction().getPSAppDEMethod()??>${ctrl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册