提交 75601815 编写于 作者: RedPig97's avatar RedPig97

update: 内存优化

上级 b5b3395a
......@@ -110,7 +110,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Base extends Vue impleme
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams});
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({context:this.context,viewparams:this.viewparams});
</#if>
</#list>
......
......@@ -110,7 +110,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({$store: this.$store,context:this.context,viewparams:this.viewparams});
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({context:this.context,viewparams:this.viewparams});
</#if>
</#list>
......@@ -146,7 +146,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
</#if>
<#if ctrl.getPSControls?? && ctrl.getPSControls()??>
<#list ctrl.getPSControls() as childCtrl>
......
......@@ -21,7 +21,7 @@ export default class ${srfclassname('${ctrl.codeName}')}Service extends ControlS
* @type {${srfclassname('${appde.getCodeName()}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service({ $store: this.getStore() });
public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service();
</#if>
<#if view.isPSDEView()??>
......
......@@ -64,7 +64,7 @@ import { Environment } from '@/environments/environment';
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
/**
* 是否初始化
......
......@@ -134,7 +134,7 @@ import CodeListService from "@/codelist/codelist-service";
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 界面UI服务对象
......@@ -142,7 +142,7 @@ import CodeListService from "@/codelist/codelist-service";
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
/**
* 获取多项数据
......
......@@ -127,7 +127,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams });
</#if>
/**
......@@ -248,7 +248,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -128,7 +128,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams });
</#if>
/**
......@@ -240,7 +240,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -27,7 +27,8 @@
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
<i class='app-menu-icon'></i>
<#-- <i class='fa fa-cogs app-menu-icon'></i> -->
</template>
<span class='text' :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)}}</span>
</template>
......@@ -98,7 +99,8 @@
<i :class="[item0.iconcls, 'app-menu-icon']"></i>
</template>
<template v-else>
<i class='fa fa-cogs app-menu-icon'></i>
<i class='app-menu-icon'></i>
<#-- <i class='fa fa-cogs app-menu-icon'></i> -->
</template>
<template slot="title">
<span class="text" :title="$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)">{{$t('app.menus.${ctrl.getCodeName()?lower_case}.' + item0.name)}}</span>
......@@ -124,7 +126,7 @@
<#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import { Environment } from '@/environments/environment';
import AuthService from '@/authservice/auth-service';
import AuthService from '@/api/authservice/auth-service';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
......@@ -301,7 +303,7 @@ import AuthService from '@/authservice/auth-service';
* @type {AuthService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public authService:AuthService = new AuthService({ $store: this.$store });
public authService:AuthService = new AuthService();
/**
* vue 生命周期
......@@ -501,7 +503,7 @@ import AuthService from '@/authservice/auth-service';
*/
public click(item: any) {
if (item) {
let navDataService = NavDataService.getInstance(this.$store);
let navDataService = NavDataService.getInstance();
if(Object.is(this.navModel,"route")){
navDataService.removeNavData(this.viewtag);
}
......
......@@ -143,7 +143,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 序列模型
......
......@@ -143,7 +143,7 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 序列模型
......
......@@ -147,7 +147,7 @@ import CodeListService from "@/codelist/codelist-service";
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 界面UI服务对象
......@@ -155,7 +155,7 @@ import CodeListService from "@/codelist/codelist-service";
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
/**
* 获取多项数据
......
......@@ -56,7 +56,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public codeListService:CodeListService = new CodeListService({ $store: this.getStore() });
public codeListService:CodeListService = new CodeListService();
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
......@@ -70,7 +70,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
* @type {${srfclassname('${node.getPSAppDataEntity().codeName}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public ${node.getPSAppDataEntity().codeName?lower_case}Service: ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service = new ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service({ $store: this.getStore() });
public ${node.getPSAppDataEntity().codeName?lower_case}Service: ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service = new ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service();
</#if>
</#if>
</#if>
......
......@@ -60,7 +60,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public codeListService:CodeListService = new CodeListService({ $store: this.getStore() });
public codeListService:CodeListService = new CodeListService();
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
......@@ -74,7 +74,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
* @type {${srfclassname('${node.getPSAppDataEntity().codeName}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public ${node.getPSAppDataEntity().codeName?lower_case}Service: ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service = new ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service({ $store: this.getStore() });
public ${node.getPSAppDataEntity().codeName?lower_case}Service: ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service = new ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service();
</#if>
</#if>
</#if>
......
......@@ -56,7 +56,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public codeListService:CodeListService = new CodeListService({ $store: this.getStore() });
public codeListService:CodeListService = new CodeListService();
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
......@@ -70,7 +70,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
* @type {${srfclassname('${node.getPSAppDataEntity().codeName}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public ${node.getPSAppDataEntity().codeName?lower_case}Service: ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service = new ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service({ $store: this.getStore() });
public ${node.getPSAppDataEntity().codeName?lower_case}Service: ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service = new ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service();
</#if>
</#if>
</#if>
......
......@@ -255,7 +255,7 @@ draggable,
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService( {$store: this.$store});
public codeListService:CodeListService = new CodeListService();
/**
* 代码表数据
......
......@@ -54,7 +54,7 @@ import { Environment } from '@/environments/environment';
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
/**
* 工作流审批意见控件绑定值
......
......@@ -154,7 +154,7 @@ ${gridColumn.getName()}
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 主信息表格列
......@@ -170,7 +170,7 @@ ${gridColumn.getName()}
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
/**
* 界面行为模型
......
......@@ -378,7 +378,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
public getAggData(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = new ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service({ $store: this.getStore() });
const _appEntityService: any = new ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service();
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
......
......@@ -127,7 +127,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams });
</#if>
/**
......@@ -239,7 +239,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -71,7 +71,7 @@ import { FormItemModel } from '@/model/form-detail';
* @type {CodeListService}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 获取多项数据
......
......@@ -376,7 +376,7 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
public getAggData(action: string,context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = new ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service({ $store: this.getStore() });
const _appEntityService: any = new ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service();
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
......
......@@ -464,7 +464,7 @@ import { Environment } from '@/environments/environment';
return;
}
let _this: any = this;
let uiservice: any = _this.appUIService ? _this.appUIService : new UIService(_this.$store);
let uiservice: any = _this.appUIService ? _this.appUIService : new UIService();
if(_this.uiactionModel){
ViewTool.calcActionItemAuthState(data,_this.uiactionModel,uiservice);
}
......
......@@ -88,7 +88,7 @@ import UIService from '@/uiservice/ui-service';
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store:this.$store });
public codeListService:CodeListService = new CodeListService();
<#if appde??>
/**
......@@ -97,7 +97,7 @@ import UIService from '@/uiservice/ui-service';
* @type {${srfclassname('${appde.getCodeName()}')}UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService:${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
<#else>
/**
* 界面UI服务对象
......@@ -105,7 +105,7 @@ import UIService from '@/uiservice/ui-service';
* @type {UIService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appUIService:UIService = new UIService(this.$store);
public appUIService:UIService = new UIService();
</#if>
/**
......
......@@ -14,7 +14,7 @@
return;
}
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let navDataService:any = new NavDataService();
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('${srffilepath2(view.getCodeName())}'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
let computedIndex:any;
......
......@@ -14,7 +14,7 @@
return;
}
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let navDataService:any = new NavDataService();
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('${srffilepath2(view.getCodeName())}'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
let computedIndex:any;
......
......@@ -11,7 +11,7 @@
*/
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let navDataService:any = new NavDataService();
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('${srffilepath2(view.getCodeName())}'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
if(_this.parseViewParam && _this.engine){
......
......@@ -11,7 +11,7 @@
*/
public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
let _this:any = this;
let navDataService:any = new NavDataService(this.$store);
let navDataService:any = new NavDataService();
let allNavData:any = Object.is(this.navModel,"route")?navDataService.getPreNavDataById('${srffilepath2(view.getCodeName())}'):navDataService.getPreNavDataByTag(_this.viewtag);
if(allNavData && allNavData.data && allNavData.data.length >0){
if(_this.parseViewParam && _this.engine){
......
......@@ -79,7 +79,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams });
</#if>
<#if view.isEnableQuickGroup()>
......@@ -90,7 +90,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -3,10 +3,10 @@
</#ibizinclude>
<#assign import_block>
import CodeListService from "@/codelist/codelist-service";
import CodeListService from "@/api/codelist/codelist-service";
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/api/counter/${srffilepath2(appCounter.getCodeName())}/${srffilepath2(appCounter.getCodeName())}-counter';
</#if>
</#assign>
......@@ -16,7 +16,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
<#assign created_block>
if(this.formDruipart){
this.formDruipart.subscribe((res:any) =>{
this.formDruipartEvent = this.formDruipart.subscribe((res:any) =>{
if(Object.is(res.action,'save')){
this.viewState.next({ tag:'grid', action: 'save', data: this.viewparams });
}
......@@ -57,7 +57,7 @@ if(this.formDruipart){
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({context:this.context,viewparams:this.viewparams });
</#if>
/**
......@@ -172,7 +172,7 @@ if(this.formDruipart){
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -67,7 +67,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams });
</#if>
<#if view.isEnableQuickGroup()>
......@@ -78,7 +78,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -59,7 +59,7 @@
* @type {*}
* @memberof ${srfclassname('${view.name}')}Base
*/
public navDataService = NavDataService.getInstance(this.$store);
public navDataService = NavDataService.getInstance();
/**
* 导航服务事件
......@@ -87,6 +87,15 @@
*/
public portletStateEvent: Subscription | undefined;
/**
* 门户部件状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${view.name}')}Base
*/
public formDruipartEvent: Subscription | undefined;
/**
* 应用上下文
*
......@@ -124,7 +133,7 @@
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams});
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({context:this.context,viewparams:this.viewparams});
</#if>
</#list>
......@@ -172,10 +181,12 @@
const matchArray = curReg.exec(this.$route.path);
let tempValue: Object = {};
keys.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: matchArray[index + 1]
});
if(matchArray[index + 1]){
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: decodeURIComponent(matchArray[index + 1])
});
}
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
<#if appde??>
......@@ -366,6 +377,17 @@
*/
public beforeDestroy() {
this.$store.commit('viewaction/removeView', this.viewtag);
let _this: any = this
if (_this.serviceStateEvent) {
_this.serviceStateEvent.unsubscribe();
}
if (_this.portletStateEvent) {
_this.portletStateEvent.unsubscribe();
}
if (_this.engine) {
_this.engine.destroy();
}
}
/**
......@@ -501,9 +523,9 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
if(Object.is(this.navModel,"tab")){
this.navDataService.removeNavDataByTag(this.viewtag);
}
if (this.serviceStateEvent) {
this.serviceStateEvent.unsubscribe();
}
}
if (this.serviceStateEvent) {
this.serviceStateEvent.unsubscribe();
}
// 销毁计数器定时器
if(this.counterServiceArray && this.counterServiceArray.length >0){
......@@ -516,6 +538,10 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
if(this.portletStateEvent){
this.portletStateEvent.unsubscribe();
}
if (this.formDruipartEvent) {
this.formDruipartEvent.unsubscribe();
}
this.viewState.complete();
}
</#if>
</#if>
......
......@@ -89,10 +89,12 @@
const matchArray = curReg.exec(this.$route.path);
let tempValue: Object = {};
keys.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: matchArray[index + 1]
});
if(matchArray[index + 1]){
Object.defineProperty(tempValue, item.name, {
enumerable: true,
value: decodeURIComponent(matchArray[index + 1])
});
}
});
this.$viewTool.formatRouteParams(tempValue,this.$route,this.context,this.viewparams);
<#if view.isPSDEView()>
......@@ -130,6 +132,16 @@
*/
public beforeDestroy() {
this.$store.commit('viewaction/removeView', this.viewtag);
let _this: any = this
if (_this.serviceStateEvent) {
_this.serviceStateEvent.unsubscribe();
}
if (_this.portletStateEvent) {
_this.portletStateEvent.unsubscribe();
}
if (_this.engine) {
_this.engine.destroy();
}
}
/**
......
......@@ -66,7 +66,7 @@ export default class ${srfclassname('${view.name}')}Base extends Vue {
* @type ${srfclassname('${appde.getCodeName()}')}UIService
* @memberof ${srfclassname('${view.name}')}Base
*/
public appUIService: ${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService(this.$store);
public appUIService: ${srfclassname('${appde.getCodeName()}')}UIService = new ${srfclassname('${appde.getCodeName()}')}UIService();
</#if>
/**
......
......@@ -73,7 +73,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -46,7 +46,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -107,7 +107,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams });
</#if>
<#if view.isEnableQuickGroup()>
......@@ -118,7 +118,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -137,7 +137,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store,context:this.context,viewparams:this.viewparams });
public ${appCounter.getCodeName()?lower_case}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ context:this.context,viewparams:this.viewparams });
</#if>
<#if view.isEnableQuickGroup()>
......@@ -148,7 +148,7 @@ import ${srfclassname('${appCounter.getCodeName()}')}CounterService from '@/co
* @type {CodeListService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
public codeListService:CodeListService = new CodeListService();
/**
* 快速分组数据对象
......
......@@ -64,7 +64,7 @@ import { appConfig } from '@/config/appConfig';
* @memberof ${srfclassname('${view.name}')}Base
*/
public beforeCreate(){
let navDataService = NavDataService.getInstance(this.$store)
let navDataService = NavDataService.getInstance();
navDataService.removeAllNavData();
}
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册