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

提示信息多语言

上级 42029f24
......@@ -31,6 +31,14 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
*/
@Prop() protected name?: string;
/**
* 部件名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() protected ctrlName?: string;
/**
* 视图通讯对象
*
......
......@@ -329,7 +329,7 @@ ${ctrl.render.code}
*/
private load(data: any): void {
if(!this.fetchAction){
this.$notify({ type: 'danger', message: '${view.getName()}视图多编辑视图面板loaddraftAction参数未配置' });
this.$notify({ type: 'danger', message: '${view.getName()}'+this.$t('app.view')+this.ctrlName+'loaddraftAction'+ this.$t('app.notConfig'));
return;
}
let arg: any = {};
......@@ -364,7 +364,7 @@ ${ctrl.render.code}
*/
protected handleAdd(){
if(!this.loaddraftAction){
this.$notify({ type: 'danger', message: '${view.getName()}视图多编辑视图面板loaddraftAction参数未配置' });
this.$notify({ type: 'danger', message: '${view.getName()}'+this.$t('app.view')+this.ctrlName+'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);
......
......@@ -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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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('${view.getName()}'+this.$t('app.view')+this.ctrlName+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('${view.getName()}'+this.$t('app.view')+this.ctrlName+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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'WFSubmitAction'+ this.$t('app.notConfig'));
return Promise.reject();
}
const _this: any = this;
......
......@@ -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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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('${view.getName()}'+this.$t('app.view')+this.ctrlName+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('${view.getName()}'+this.$t('app.view')+this.ctrlName+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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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('${view.getName()}'+this.$t('app.view')+this.ctrlName+'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"
:ctrlName="$t('app.ctrl.from')"
: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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册