@@ -18,17 +18,20 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
...
@@ -18,17 +18,20 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
import ${srfclassname('${appde.getCodeName()}')}Service from '@/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service';
import ${srfclassname('${appde.getCodeName()}')}Service from '@/service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-service';
</#if>
</#if>
import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-service';
import ${srfclassname('${ctrl.codeName}')}Service from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-service';
import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service';
import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service';
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service';
import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-ui-service';
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
</#if>
<#-- 语言资源入口 -->
<#-- 语言资源入口 -->
<#ibizinclude>
<#ibizinclude>
./LANGBASE.vue.ftl
./LANGBASE.vue.ftl
...
@@ -135,6 +139,14 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
...
@@ -135,6 +139,14 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service({ $store: this.$store });
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service({ $store: this.$store });
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>` });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: `<#noparse>${(this.$t('app.formpage.desc1') as string)}${r'${key}'},${(this.$t('app.formpage.desc2') as string)}</#noparse>` });
return false;
return false;
}
}
value = this.data[key];
value = this.data[key];
...
@@ -906,7 +916,7 @@ import schema from 'async-validator';
...
@@ -906,7 +916,7 @@ import schema from 'async-validator';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
return;
}
}
if(pageReset){
if(pageReset){
...
@@ -611,7 +652,7 @@ import { FormItemModel } from '@/model/form-detail';
...
@@ -611,7 +652,7 @@ import { FormItemModel } from '@/model/form-detail';
post.then((response: any) => {
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (!response.status || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
return;
return;
}
}
let _datas:any[] = [];
let _datas:any[] = [];
...
@@ -698,9 +742,9 @@ import { FormItemModel } from '@/model/form-detail';
...
@@ -698,9 +742,9 @@ import { FormItemModel } from '@/model/form-detail';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
return;
}
}
if(!arg){
if(!arg){
arg = {};
arg = {};
}
}
console.error("批量添加未实现");
console.error((this.$t('app.gridpage.notBatch') as string));
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{
}else{
Object.assign(item,{viewparams:this.viewparams});
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...
@@ -1586,7 +1637,7 @@ import { FormItemModel } from '@/model/form-detail';
...
@@ -1586,7 +1637,7 @@ import { FormItemModel } from '@/model/form-detail';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
}else{
}else{
Object.assign(item,{viewparams:this.viewparams});
Object.assign(item,{viewparams:this.viewparams});
<#if de??>
<#if de??>
...
@@ -1594,7 +1645,7 @@ import { FormItemModel } from '@/model/form-detail';
...
@@ -1594,7 +1645,7 @@ import { FormItemModel } from '@/model/form-detail';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return;
return;
}
}
let _this = this;
let _this = this;
...
@@ -1634,7 +1685,7 @@ import { FormItemModel } from '@/model/form-detail';
...
@@ -1634,7 +1685,7 @@ import { FormItemModel } from '@/model/form-detail';
post.then((response: any) => {
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (!response.status || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
return;
}
}
if(pageReset){
if(pageReset){
...
@@ -483,20 +619,27 @@ import CodeListService from "@service/app/codelist-service";
...
@@ -483,20 +619,27 @@ import CodeListService from "@service/app/codelist-service";
const parentdata: any = {};
const parentdata: any = {};
this.$emit('beforeload', parentdata);
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams});
let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.removeAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.fetchAction') as string) });
return;
return;
}
}
if(!arg){
if(!arg){
arg = {};
arg = {};
}
}
console.error("批量添加未实现");
console.error((this.$t('app.gridpage.notBatch') as string));
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.rulesException') as string) });
return [];
}
let successItems:any = [];
let errorItems:any = [];
let errorMessage:any = [];
for (const item of _this.items) {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.createAction') as string) });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.updateAction') as string) });
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}'+(this.$t('app.gridpage.notConfig.loaddraftAction') as string) });
return;
return;
}
}
let _this = this;
let _this = this;
...
@@ -1465,19 +1659,21 @@ import CodeListService from "@service/app/codelist-service";
...
@@ -1465,19 +1659,21 @@ import CodeListService from "@service/app/codelist-service";
post.then((response: any) => {
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (!response.status || response.status !== 200) {
@@ -24,6 +24,9 @@ import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservi
...
@@ -24,6 +24,9 @@ import ${srfclassname('${curAppEntity.getCodeName()}')}UIService from '@/uiservi
</#if>
</#if>
</#list>
</#list>
</#if>
</#if>
<#if appde??>
import ${srfclassname('${appde.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-service';
let tempDstParam${logicparam_index}Context:any = this.paramsMap.get('${dstParam.getCodeName()}').context?this.paramsMap.get('${dstParam.getCodeName()}').context:{};
let tempDstParam${logicparam_index}Context:any = this.paramsMap.get('${dstParam.getCodeName()}').context?this.paramsMap.get('${dstParam.getCodeName()}').context:{};
let tempDstParam${logicparam_index}Data:any = this.paramsMap.get('${dstParam.getCodeName()}').data?this.paramsMap.get('${dstParam.getCodeName()}').data:{};
let tempDstParam${logicparam_index}Data:any = this.paramsMap.get('${dstParam.getCodeName()}').data?this.paramsMap.get('${dstParam.getCodeName()}').data:{};
${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}') as any);
${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}Data = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_${srfpluralize(minorPSAppDataEntity.codeName)?lower_case}') as any);
...
@@ -49,12 +59,25 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
...
@@ -49,12 +59,25 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
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);
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);
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);
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);
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);
let appLogic:${srfclassname('${appdelogic.getCodeName()}')}Logic = new ${srfclassname('${appdelogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
let appLogic:${srfclassname('${appdelogic.getCodeName()}')}Logic = new ${srfclassname('${appdelogic.getCodeName()}')}Logic({context:JSON.parse(JSON.stringify(context)),data:JSON.parse(JSON.stringify(data))});
const result = await appLogic.onExecute(context,data,isloading?true:false);
const res = await appLogic.onExecute(context,data,isloading?true:false);
{<#list mainState.getPSDEMainStateOPPrivs() as mainStateOPPriv>'${mainStateOPPriv.getName()}':<#if mainState.isOPPrivAllowMode()>1<#else>0</#if><#if mainStateOPPriv_has_next>,</#if></#list>}
<#else>
{}
</#if>
</#compress>
</#macro>
import { Environment } from '@/environments/environment';
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import { Subject } from 'rxjs';
import ${srfclassname('${item.getCodeName()}')}Service from '@/service/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-service';
import ${srfclassname('${item.getCodeName()}')}Service from '@/service/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-service';
import ${srfclassname('${item.getCodeName()}')}AuthService from '@/authservice/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-auth-service';
<#if item.getAllPSAppDEUIActions()??>
<#if item.getAllPSAppDEUIActions()??>
<#list item.getAllPSAppDEUIActions() as appdeUIAction>
<#list item.getAllPSAppDEUIActions() as appdeUIAction>
<#if appdeUIAction.getPSAppDataEntity()??>
<#if appdeUIAction.getPSAppDataEntity()??>
...
@@ -85,6 +95,13 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
...
@@ -85,6 +95,13 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
*/
*/
public allDeMainStateMap:Map<string,string> = new Map();
public allDeMainStateMap:Map<string,string> = new Map();