提交 71487d13 编写于 作者: tony001's avatar tony001

Merge branch 'dev'

上级 0cb57f01
...@@ -5,6 +5,7 @@ import { Subject, Subscription } from 'rxjs'; ...@@ -5,6 +5,7 @@ import { Subject, Subscription } from 'rxjs';
import { ControlInterface } from '@/interface/control'; import { ControlInterface } from '@/interface/control';
import { UIActionTool,Util } from '@/utils'; import { UIActionTool,Util } from '@/utils';
import NavDataService from '@/service/app/navdata-service'; import NavDataService from '@/service/app/navdata-service';
import AppCenterService from "@service/app/app-center-service";
<#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??> <#if ctrl.getPSAppCounterRefs?? && ctrl.getPSAppCounterRefs()??>
<#list ctrl.getPSAppCounterRefs() as singleCounterRef> <#list ctrl.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??> <#if singleCounterRef.getPSAppCounter()??>
......
...@@ -70,6 +70,8 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi ...@@ -70,6 +70,8 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
*/ */
@Errorlog @Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> { public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
<#list ctrl.getPSDEFormItems() as deItem> <#list ctrl.getPSDEFormItems() as deItem>
<#if deItem.getPSEditor()?? && deItem.getPSEditor().getPSAppDataEntity?? && deItem.getPSEditor().getPSAppDataEntity()?? && deItem.getPSEditor().getPSAppDEDataSet?? && deItem.getPSEditor().getPSAppDEDataSet()??> <#if deItem.getPSEditor()?? && deItem.getPSEditor().getPSAppDataEntity?? && deItem.getPSEditor().getPSAppDataEntity()?? && deItem.getPSEditor().getPSAppDEDataSet?? && deItem.getPSEditor().getPSAppDEDataSet()??>
<#assign _appde = deItem.getPSEditor().getPSAppDataEntity()/> <#assign _appde = deItem.getPSEditor().getPSAppDataEntity()/>
......
...@@ -197,6 +197,15 @@ ...@@ -197,6 +197,15 @@
*/ */
public selections: Array<any> = []; public selections: Array<any> = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/** /**
* Vue声明周期,组件挂载完毕 * Vue声明周期,组件挂载完毕
* *
...@@ -219,7 +228,6 @@ ...@@ -219,7 +228,6 @@
}) })
} }
/** /**
* Vue声明周期,组件创建完毕 * Vue声明周期,组件创建完毕
* *
...@@ -245,6 +253,16 @@ ...@@ -245,6 +253,16 @@
} }
}); });
} }
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh([data]);
}
})
}
} }
/** /**
...@@ -265,6 +283,9 @@ ...@@ -265,6 +283,9 @@
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
<#if destroyed_block??> <#if destroyed_block??>
${destroyed_block} ${destroyed_block}
</#if> </#if>
......
<template> <template>
<div> <div>
<#if ctrl.getQuickSearchMode() gt 0>
<i-input v-model="query" @on-change="onQueryChange" 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 v-if="filterFields.length > 0" class="filter-group"> <div v-if="filterFields.length > 0" class="filter-group">
<template v-for="(item, index) of filterItems"> <filter-tree :datas="filterItems" :fields="filterFields">
<filter-item :key="index" :data="item" :filterFields="filterFields"> <template slot-scope="{ data }">
<template slot-scope="{data}">
<#if ctrl.getPSSearchBarFilters()??> <#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter> <#list ctrl.getPSSearchBarFilters() as filter>
<template v-if="Object.is(data.field, '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>')"> <template v-if="Object.is(data.field, '${filter.getName()}')">
${P.getEditorCode(filter, "EDITOR.vue").code} ${P.getEditorCode(filter, "EDITOR.vue").code}
</template> </template>
</#list> </#list>
</#if> </#if>
</template> </template>
</filter-item> </filter-tree>
</template> </div>
<div class="search-bar-footer">
<#-- <#if !view.isEnableQuickSearch() && ctrl.getQuickSearchMode() gt 0>
<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>
</div>
</div> </div>
</div> </div>
</template> </template>
<#assign import_block>
import FilterTree from '@components/filter-tree/filter-tree.vue';
</#assign>
<#assign component_block>
FilterTree,
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/** <#-- /**
* 快速搜索值 * 快速搜索值
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public query: string = ''; public query: string = ''; -->
/** /**
* 过滤属性集合 * 过滤属性集合
...@@ -39,7 +52,7 @@ ...@@ -39,7 +52,7 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
get filterFields() { get filterFields() {
return Object.vals(this.detailsModel); return Object.values(this.detailsModel);
} }
/** /**
...@@ -52,7 +65,8 @@ ...@@ -52,7 +65,8 @@
<#if ctrl.getPSSearchBarFilters()??> <#if ctrl.getPSSearchBarFilters()??>
<#list ctrl.getPSSearchBarFilters() as filter> <#list ctrl.getPSSearchBarFilters() as filter>
'${filter.getName()}': { '${filter.getName()}': {
label: '${filter.getCaption()}', label: '<#if filter.getPSDEField()??>${filter.getPSDEField().getLogicName()}</#if>',
name: '${filter.getName()}',
prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>', prop: '<#if filter.getPSDEField()??>${filter.getPSDEField().getCodeName()?lower_case}<#else>${filter.getName()}</#if>',
disabled: false disabled: false
}, },
...@@ -68,6 +82,30 @@ ...@@ -68,6 +82,30 @@
*/ */
public filterItems: any[] = []; public filterItems: any[] = [];
/**
* 应用实体名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appdeName: string = '<#if ctrl.getPSDataEntity()??>${ctrl.getPSDataEntity().getCodeName()}</#if>';
/**
* modleId
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public modelId: string = "searchbar_<#if ctrl.getPSAppDataEntity()??>${ctrl.getPSAppDataEntity().getCodeName()?lower_case}<#else>app</#if>_${ctrl.getCodeName()?lower_case}";
/**
* 功能服务名称
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public utilServiceName: string = "<#if app.getPSAppFilterStorageUtil?? && app.getPSAppFilterStorageUtil()??>${app.getPSAppFilterStorageUtil().getCodeName()?lower_case}</#if>";
/** /**
* 获取多项数据 * 获取多项数据
* *
...@@ -85,30 +123,203 @@ ...@@ -85,30 +123,203 @@
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getData(): any { public getData(): any {
let data: any = {};
<#-- if(!Object.is(this.query, '')) {
Object.assign(data, { query: this.query })
} -->
if(this.filterFields.length > 0) {
Object.assign(data, { filter: this.getFilter() })
}
return data;
}
/**
* 获取filter
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getFilter(): any {
if(this.filterItems.length === 0) {
return null; return null;
} }
let ands: any[] = this.transformAnd(this.filterItems);
this.transformResult(ands, '$and');
return { '$and': ands };
}
/** /**
* 快速搜索框值变化 * 处理结果集
* *
* @returns {*} * @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onQueryChange($event: any) { public transformResult(datas: any[], pName: string) {
this.$emit('on-change', { query: this.query }); let items: any[] = [];
for(let i = datas.length - 1; i >= 0; i--) {
let data: any = datas[i];
let field: string = Object.is(pName, '$and') ? '$or' : '$and';
if(data.hasOwnProperty(field)) {
items.push(data);
datas.splice(i, 1);
this.transformResult(data[field], field);
}
}
if(items.length > 0) {
let item: any = {};
item[pName] = items;
datas.push(item);
}
} }
/** /**
* 过滤项值变化 * 处理并且逻辑
* *
* @returns {*} * @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public transformAnd(datas: any[]): any {
let result: any[] = [];
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]);
result.push(item)
} else if(Object.is(data.label, '$and')) {
let items: any[] = this.transformAnd(data.children);
result = [...result, ...items];
} else if(Object.is(data.label, '$or')) {
item[data.label] = this.transformOr(data.children);
result.push(item)
}
})
return result;
}
/**
* 处理或逻辑
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public transformOr(datas: any[]) {
let result: any[] = [];
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]);
result.push(item);
} else if(Object.is(data.label, '$and')) {
item[data.label] = this.transformAnd(data.children);
result.push(item)
} else if(Object.is(data.label, '$or')) {
item[data.label] = this.transformOr(data.children);
result.push(item);
}
})
return result;
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public created(): void {
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (Object.is('load', action)) {
this.load(data);
}
});
}
}
/**
* 删除过滤项
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onRemove(index: number) {
this.filterItems.splice(index, 1);
}
/**
* 搜索
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public onFilterChange($event: any) { public onSearch() {
this.$emit('on-change', { filter: '' }); this.$emit('search', this.getData());
} }
/**
* 保存
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onSave() {
let param: any = {};
Object.assign(param, {
model: this.filterItems,
appdeName: this.appdeName,
modelid: this.modelId,
utilServiceName: this.utilServiceName,
...this.viewparams
});
let post = this.service.saveModel(this.utilServiceName, this.context, param);
post.then((response: any) => {
this.$emit("save", response.data);
}).catch((response: any) => {
console.log(response);
});
}
/**
* 重置
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onReset() {
<#-- this.query = ''; -->
this.filterItems = [];
}
/**
* 加载
*
* @return {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public load(data: any) {
let param: any = {};
Object.assign(param, {
appdeName: this.appdeName,
modelid: this.modelId,
utilServiceName: this.utilServiceName,
...this.viewparams
});
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();
})
}
}).catch((response: any) => {
console.log(response);
});
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
<#-- content --> <#-- content -->
<#assign content> <#assign content>
@on-change="onSearchBarChange" v-show="isExpandSearchForm"
@search="onSearch($event)"
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl ../@MACRO/HTML/DEFAULT.html.ftl
......
.search-bar-footer {
height: 32px;
.search-bar-action {
float: right;
> .ivu-btn {
margin-left: 5px;
}
}
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude> </#ibizinclude>
<#assign import_block>
import UtilService from '@/utilservice/util-service';
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl ../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude> </#ibizinclude>
/**
* 工具服务对象
*
* @protected
* @type {UtilService}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
protected utilService: UtilService = new UtilService();
/**
* 加载数据模型
*
* @param {string} serviceName
* @param {*} context
* @param {*} viewparams
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public loadModel(serviceName: string, context: any, viewparams: any) {
return new Promise((resolve: any, reject: any) => {
this.utilService.getService(serviceName).then((service: any) => {
service.loadModelData(JSON.stringify(context), viewparams).then((response: any) => {
resolve(response);
}).catch((response: any) => {
reject(response);
});
}).catch((response: any) => {
reject(response);
});
});
}
/**
* 保存模型
*
* @param {string} serviceName
* @param {*} context
* @param {*} viewparams
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public saveModel(serviceName: string, context: any, viewparams: any) {
return new Promise((resolve: any, reject: any) => {
this.utilService.getService(serviceName).then((service: any) => {
service.saveModelData(JSON.stringify(context), '', viewparams).then((response: any) => {
resolve(response);
}).catch((response: any) => {
reject(response);
});
}).catch((response: any) => {
reject(response);
});
});
}
<#ibizinclude> <#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl ../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ${item.render.code} ...@@ -5,7 +5,7 @@ ${item.render.code}
{ {
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if> <#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>, position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()??>'${item.getType()}'<#else>'category'</#if>, type:<#if item.getEChartsType()??>'${item.getEChartsType()}'<#else>'category'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>, name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if> <#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if> <#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
......
...@@ -5,7 +5,7 @@ ${item.render.code} ...@@ -5,7 +5,7 @@ ${item.render.code}
{ {
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if> <#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>, position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()?? && item.getType() == 'numeric'>'value'<#else>'${item.getType()}'</#if>, type:<#if item.getEChartsType()??>'${item.getEChartsType()}'<#else>'value'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>, name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if> <#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if> <#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
......
...@@ -5,7 +5,7 @@ ${item.render.code} ...@@ -5,7 +5,7 @@ ${item.render.code}
{ {
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if> <#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>, position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()??>'${item.getType()}'<#else>'category'</#if>, type:<#if item.getEChartsType()??>'${item.getEChartsType()}'<#else>'category'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>, name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if> <#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if> <#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
......
...@@ -5,7 +5,7 @@ ${item.render.code} ...@@ -5,7 +5,7 @@ ${item.render.code}
{ {
<#if item.getIndex()??>gridIndex:${item.getIndex()},</#if> <#if item.getIndex()??>gridIndex:${item.getIndex()},</#if>
position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>, position:<#if item.getPosition()?? && item.getPosition() =='bottom'>"bottom"<#else>"top"</#if>,
type:<#if item.getType()?? && item.getType() == 'numeric'>'value'<#else>'${item.getType()}'</#if>, type:<#if item.getEChartsType()??>'${item.getEChartsType()}'<#else>'value'</#if>,
name:<#if item.getCaption()??>'${item.getCaption()}'</#if>, name:<#if item.getCaption()??>'${item.getCaption()}'</#if>,
<#if item.getMinValue()??>min:${item.getMinValue()},</#if> <#if item.getMinValue()??>min:${item.getMinValue()},</#if>
<#if item.getMaxValue()??>max:${item.getMaxValue()},</#if> <#if item.getMaxValue()??>max:${item.getMaxValue()},</#if>
......
...@@ -240,6 +240,15 @@ ...@@ -240,6 +240,15 @@
*/ */
public sortField: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>'; public sortField: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>';
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/** /**
* 排序点击事件 * 排序点击事件
* @param {string} field 属性名 * @param {string} field 属性名
...@@ -328,6 +337,16 @@ ...@@ -328,6 +337,16 @@
} }
}); });
} }
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh([data]);
}
})
}
} }
/** /**
...@@ -373,6 +392,9 @@ ...@@ -373,6 +392,9 @@
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
<#if destroyed_block??> <#if destroyed_block??>
${destroyed_block} ${destroyed_block}
</#if> </#if>
......
...@@ -626,6 +626,15 @@ FullCalendar, ...@@ -626,6 +626,15 @@ FullCalendar,
*/ */
public selections: any[] = []; public selections: any[] = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/** /**
* 获取多项数据 * 获取多项数据
* *
...@@ -674,6 +683,16 @@ FullCalendar, ...@@ -674,6 +683,16 @@ FullCalendar,
} }
}); });
} }
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh();
}
})
}
} }
...@@ -717,6 +736,9 @@ FullCalendar, ...@@ -717,6 +736,9 @@ FullCalendar,
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
<#if destroyed_block??> <#if destroyed_block??>
${destroyed_block} ${destroyed_block}
</#if> </#if>
......
...@@ -240,6 +240,15 @@ ...@@ -240,6 +240,15 @@
@Provide() @Provide()
public expandedKeys: string[] = []; public expandedKeys: string[] = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/** /**
* 选中数据变更事件 * 选中数据变更事件
* *
...@@ -319,6 +328,16 @@ ...@@ -319,6 +328,16 @@
} }
}); });
} }
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh([data]);
}
})
}
} }
/** /**
...@@ -349,6 +368,9 @@ ...@@ -349,6 +368,9 @@
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
<#if destroyed_block??> <#if destroyed_block??>
${destroyed_block} ${destroyed_block}
</#if> </#if>
......
<#-- 获取该步骤的表单 -->
<#macro getStepForm ctrlmodel step>
<#compress>
<#if ctrlmodel.getPSDEEditForms()??>
<#list ctrlmodel.getPSDEEditForms() as form>
<#if form.getPSDEWizardForm()??><#assign wizardForm = form.getPSDEWizardForm() />
<#if wizardForm.getPSDEWizardStep()??><#assign wizardStep = wizardForm.getPSDEWizardStep() />
<#if wizardStep.getId() == step.getId()>${form.getName()}</#if>
</#if>
</#if>
</#list>
</#if>
</#compress>
</#macro>
<template>
<layout class="app-wizard">
<#if ctrl.getPSDEWizard?? && ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardSteps?? && ctrl.getPSDEWizard().getPSDEWizardSteps()??>
<div class="view-steps">
<div class="background-box"></div>
<div class="steps_icon" @click="handleClick('PRE')"><i class="el-icon-arrow-left"></i></div>
<el-steps class="wizard-steps" :active="(wizardForms.indexOf(activeForm) + 1)" finish-status="success">
<#list ctrl.getPSDEWizard().getPSDEWizardSteps() as step>
<el-step :class="{'app-active-step':activeForm==='<@getStepForm ctrlmodel=ctrl step=step />'?true:false}">
<template v-slot:title>
<div v-popover:<@getStepForm ctrlmodel=ctrl step=step />_popover @click="hanleClick('<@getStepForm ctrlmodel=ctrl step=step />')">
<span><i v-if="activeForm != '<@getStepForm ctrlmodel=ctrl step=step />' && !historyForms.includes('<@getStepForm ctrlmodel=ctrl step=step />')" class="el-icon-lock"></i>${step.getTitle()}</span>
</div>
</template>
</el-step>
</#list>
</el-steps>
<div class="steps_icon" @click="handleClick('NEXT')"><i class="el-icon-arrow-right"></i></div>
</div>
<#if ctrl.getPSDEEditForms()??>
<#list ctrl.getPSDEEditForms() as form>
<#assign handler = form.getPSAjaxControlHandler() />
<el-popover v-model="stepVisiable['${form.getName()}']" ref="${form.getName()}_popover" popper-class="app-wizard-popover-container" placement="bottom-<#if form_has_next>start<#else>end</#if>" trigger="click">
<div class="app-wizard-container">
<div class="app-wizard-header">
<div class="app-wizard-header-extra">
<Icon type="md-open" size="18" @click="handleOPen('${form.getName()}')"/>
<Icon type="md-close" size="18" @click="handleClose('${form.getName()}')"/>
</div>
</div>
<div class="popover-title">${form.getLogicName()}</div>
<div class="app-wizard-content">
<view_${form.getName()}
:key="'${form.name}'"
:viewState='wizardState'
:context="context"
:viewparams="viewparams"
updateAction="<#if form.getUpdatePSControlAction()?? && form.getUpdatePSControlAction().getPSAppDEMethod()??>${form.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
removeAction="<#if form.getRemovePSControlAction()?? && form.getRemovePSControlAction().getPSAppDEMethod()??>${form.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
loadAction="<#if form.getGetPSControlAction()?? && form.getGetPSControlAction().getPSAppDEMethod()??>${form.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
<#if form.getHookEventNames()??>
<#list form.getHookEventNames() as eventName>
@${eventName?lower_case}="${form.name}_${eventName?lower_case}"
</#list>
</#if>
name='${form.name}'
ref='${form.name}'>
</view_${form.getName()}>
</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>
</div>
</div>
</el-popover>
<drawer class="app-wizard-drawer" :closable="false" :value="drawerOpenStatus.isOpen && drawerOpenStatus.formName == '${form.name}'"
:width="600" title="${form.getLogicName()}" @on-visible-change="onVisibleChange($event)">
<view_${form.getName()}
:key="'${form.name}'"
:viewState='wizardState'
:context="context"
:viewparams="viewparams"
updateAction="<#if form.getUpdatePSControlAction()?? && form.getUpdatePSControlAction().getPSAppDEMethod()??>${form.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
removeAction="<#if form.getRemovePSControlAction()?? && form.getRemovePSControlAction().getPSAppDEMethod()??>${form.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
loadAction="<#if form.getGetPSControlAction()?? && form.getGetPSControlAction().getPSAppDEMethod()??>${form.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"
<#if form.getHookEventNames()??>
<#list form.getHookEventNames() as eventName>
@${eventName?lower_case}="${form.name}_${eventName?lower_case}"
</#list>
</#if>
name='${form.name}'
ref='${form.name}'>
</view_${form.getName()}>
</drawer>
</#list>
</#if>
</#if>
</layout>
</template>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 部件行为--init
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public initAction!: string;
/**
* 部件行为--finish
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public finishAction!: string;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getDatas(): any[] {
return [this.formParam];
}
/**
* 获取单项数据
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getData(): any {
return this.formParam;
}
/**
* 视图状态订阅对象
*
* @public
* @type {Subject<{action: string, data: any}>}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public wizardState: Subject<ViewState> = new Subject();
/**
* 当前激活表单
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public activeForm: string = '';
/**
* 第一个向导表单
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public firstForm: string = '<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getFirstPSDEWizardForm()??><#assign firstForm = ctrl.getPSDEWizard().getFirstPSDEWizardForm()>${ctrl.name}_form_${firstForm.getFormTag()}</#if>';
/**
* 状态属性
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public stateField: string = '${ctrl.getStatePSAppDEField().getCodeName()?lower_case}';
/**
* 当前显示表单
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public curShow:string ="";
/**
* 向导表单参数
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public formParam: any = {};
/**
* 执行过的表单
*
* @public
* @type {Array<string>}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public historyForms: Array<string> = [];
/**
* 步骤行为集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public stepActions: any = {};
/**
* 步骤标识集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public stepTags: any = {};
/**
* 步骤是否显示集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public stepVisiable:any = {};
/**
* 向导表单集合
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public wizardForms: Array<any> = [];
/**
* 当前状态
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public curState = '';
/**
* 抽屉状态
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public drawerOpenStatus:any = {
isOpen:false,
formName:""
}
/**
* Vue声明周期(处理组件的输入属性)
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public created(): void {
this.regFormActions();
this.doInit();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (Object.is(tag, this.name)) {
if (Object.is('load', action)) {
this.doInit(data);
}
}
});
}
}
/**
* vue 生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public destroyed() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
/**
* 注册表单步骤行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public regFormActions() {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getPSDEWizardForms()??>
<#list ctrl.getPSDEWizard().getPSDEWizardForms() as form>
this.regFormAction('${ctrl.name}_form_${form.getFormTag()}', [<#if form.getStepActions()??><#list form.getStepActions() as action><#if action_index gt 0>,</#if>'${action}'</#list></#if>],<#if form.getPSDEWizardStep()?? && form.getPSDEWizardStep().getStepTag()??>'${form.getPSDEWizardStep().getStepTag()}'<#else>null</#if>);
</#list>
</#if>
}
/**
* 注册表单步骤行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public regFormAction(name: string, actions: Array<string>,stepTag:any) {
this.stepActions[name] = actions;
this.stepTags[name] = stepTag;
this.stepVisiable[name] = false;
this.wizardForms.push(name);
}
/**
* 计算激活表单
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computedActiveForm(data:any){
if(data[this.stateField]){
if(Object.keys(this.stepTags).length >0){
Object.keys(this.stepTags).forEach((name:string) =>{
if(this.stepTags[name] === data[this.stateField]){
this.activeForm = name;
}
})
}
if(!this.activeForm){
this.activeForm = this.firstForm;
}
}else{
this.activeForm = this.firstForm;
}
if(this.activeForm) {
let index = this.wizardForms.indexOf(this.activeForm);
this.wizardForms.forEach((item:any,inx:number) =>{
if(inx <= index){
this.historyForms.push(item);
}
})
}
}
/**
* 初始化行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public doInit(opt: any = {}) {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getInitPSDEAction()??>
<#assign action = ctrl.getPSDEWizard().getInitPSDEAction()>
const arg: any = { ...opt };
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.init(this.initAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (response && response.status === 200) {
this.formParam = response.data;
if(response.data.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}){
Object.assign(this.context,{${ctrl.getPSAppDataEntity().getCodeName()?lower_case}:response.data.${ctrl.getPSAppDataEntity().getCodeName()?lower_case}})
}
this.computedActiveForm(response.data);
}
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
});
</#if>
}
/**
* 表单加载
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public formLoad(name:string) {
if(name) {
this.wizardState.next({ tag: name, action: 'load', data: this.formParam });
}
}
/**
* 完成行为
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public doFinish() {
<#if ctrl.getPSDEWizard()?? && ctrl.getPSDEWizard().getFinishPSDEAction()??>
<#assign action = ctrl.getPSDEWizard().getFinishPSDEAction()>
let arg: any = {};
Object.assign(arg, this.formParam);
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.finish(this.finishAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
this.$emit("finish", data);
}
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.info });
});
</#if>
}
/**
* 向导表单加载完成
*
* @param {*} args
* @param {string} name
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_formload(args: any, name: string, $event2?: any) {
if(args) {
Object.assign(this.formParam, args);
}
}
/**
* 向导表单保存完成
*
* @param {*} args
* @param {string} name
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ${ctrl.name}_formsave(args: any, name: string, $event2?: any) {
Object.assign(this.formParam, args);
if(Object.is(this.curState, 'NEXT')) {
if(this.historyForms.indexOf(name) === -1){
this.historyForms.push(name);
}
this.setPopVisiable(name,false);
if (this.getNextForm(name)) {
this.activeForm = this.getNextForm(name);
this.setPopVisiable(this.activeForm,true);
setTimeout(() => {
this.formLoad(this.activeForm);
}, 1);
} else {
this.doFinish();
}
}else if(Object.is(this.curState, 'FINISH')) {
this.doFinish();
}
}
/**
* 打开链接
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleOPen(name:string){
this.handleClose(name);
this.drawerOpenStatus.isOpen = true;
this.drawerOpenStatus.formName = name;
}
/**
* 关闭
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleClose(name:string){
this.setPopVisiable(name,false);
}
/**
* 设置popover是否显示
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public setPopVisiable(name:string,isVisiable:boolean){
this.stepVisiable[name] = isVisiable;
(this.$refs[name+'_popover'] as any).showPopper = isVisiable;
this.curShow = isVisiable?name:"";
}
/**
* 导航条点击事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public hanleClick(name:string){
let activeIndex:number = this.wizardForms.indexOf(this.activeForm);
let curIndex:number = this.wizardForms.indexOf(name);
if(curIndex > activeIndex){
setTimeout(() =>{
(this.$refs[name+'_popover'] as any).showPopper = false;
this.curShow = "";
},0)
return;
}
this.stepVisiable[name] = !this.stepVisiable[name];
if(this.stepVisiable[name]){
this.curShow = name;
this.formLoad(name);
}else{
this.curShow = "";
}
}
/**
* 获取下一步向导表单
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getNextForm(name:string) {
let index = this.wizardForms.indexOf(name);
if(index >= 0) {
if(this.wizardForms[index + 1]) {
return this.wizardForms[index + 1];
}
}
return undefined;
}
/**
* 上一步
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onClickPrev(name:string) {
const length = this.historyForms.length;
if(length > 1) {
this.curState = 'PREV';
let curIndex:number = this.wizardForms.indexOf(name);
this.setPopVisiable(name,false);
setTimeout(() => {
this.setPopVisiable(this.historyForms[curIndex - 1],true);
this.formLoad(this.historyForms[curIndex - 1]);
}, 1);
}
}
/**
* 下一步
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onClickNext(name:string) {
if(name) {
if(this.$refs && this.$refs[name]){
let form: any = this.$refs[name];
if(form.formValidateStatus()) {
this.curState = 'NEXT';
this.wizardState.next({ tag: name, action: 'save', data: this.formParam });
} else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
}
}
}
}
/**
* 完成
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onClickFinish(name:string) {
if(name) {
if(this.$refs && this.$refs[name]){
let form: any = this.$refs[name];
if(form.formValidateStatus()) {
this.curState = 'FINISH';
this.wizardState.next({ tag: name, action: 'save', data: this.formParam });
} else {
this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
}
}
}
}
/**
* 左右两侧点击事件
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleClick(mode:string){
if(Object.is(this.curShow,"")){
return;
}
let curIndex:number = this.wizardForms.indexOf(this.curShow);
if(Object.is(mode,"PRE") && (curIndex !== 0)){
this.setPopVisiable(this.wizardForms[curIndex],false);
setTimeout(() => {
this.setPopVisiable(this.wizardForms[curIndex-1],true);
this.formLoad(this.wizardForms[curIndex-1]);
}, 0);
}
if(Object.is(mode,"NEXT") && (curIndex < (this.wizardForms.length - 1) && this.historyForms.includes(this.wizardForms[curIndex+1]))){
this.setPopVisiable(this.wizardForms[curIndex],false);
setTimeout(() => {
this.setPopVisiable(this.wizardForms[curIndex+1],true);
this.formLoad(this.wizardForms[curIndex+1]);
}, 0);
}
}
/**
* 是否显示
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public isVisiable(name:string,type: string) {
const actions: Array<string> = this.stepActions[name];
if(actions && actions.indexOf(type) !== -1 && Object.is(name,this.activeForm)) {
return true;
}else{
return false;
}
}
/**
* 抽屉状态改变
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onVisibleChange(value:any){
if(!value){
this.drawerOpenStatus.isOpen = false;
}
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
<#if ctrl.getPSControlActions()??>
<#list ctrl.getPSControlActions() as action>
<#if action.getPSAppDEMethod?? && action.getPSAppDEMethod()??>
${action.name?lower_case}Action='${action.getPSAppDEMethod().getCodeName()}'
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
.app-wizard {
background: #fff;
height: 100%;
.view-steps{
display: flex;
padding: 0 20px;
position: relative;
.steps_icon{
width: 30px;
text-align: center;
font-size: 20px;
background: #409eff;
color: #fff;
line-height: 50px;
height: 50px;
margin-top: 21px;
z-index: 1;
}
.steps_icon:hover{
cursor: pointer;
}
}
.wizard-steps{
padding: 10px 20px 10px 70px;
margin-bottom: 10px;
width: 100%;
.steps-item-span{
padding: 7px 20px;
position: relative;
right: 20px;
}
.drawer-box-shadow{
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
}
.el-step__head.is-process{
border-color: #7e8187;
color: #7e8187;
}
.el-step__title.is-process{
color: #7e8187;
}
.el-step__head.is-success{
border-color: #1890ff;
color: #1890ff;
}
.el-step__title.is-success{
color: #1890ff;
}
.el-step__title:hover{
cursor: pointer;
}
.app-active-step{
.el-icon-check:before {
content: "";
width: 12px;
height: 12px;
border-radius: 8px;
background-color: #1890ff;
display: block;
}
}
}
.el-step__main{
background-color: rgb(239, 239, 239);
}
.background-box {
height: 50px;
width: calc(100% - 40px);
position: absolute;
background: #efefef;
top: 21px;
border-top: 2px solid rgb(225, 225, 225);
}
}
.app-wizard-popover-container{
.app-wizard-container{
width: 100%;
.popover-title{
position: absolute;
top: 14px;
left: 13px;
}
.app-wizard-header{
width: 100%;
height: 30px;
line-height: 22px;
padding: 2px;
border-bottom: 1px solid #ccc;
margin-bottom: 10px;
.app-wizard-header-extra{
float: right;
}
}
.app-wizard-content{
width: 100%;
padding: 4px 0px;
}
.app-wizard-footer{
display: flex;
}
}
}
.el-popper[x-placement^=bottom] {
margin-top: 0px;
}
.app-wizard-drawer{
.app-form {
height: calc(100% - 51px);
}
.drawer-button{
display: flex;
justify-content: flex-end;
}
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 主实体所有属性 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.getAllPSAppDEFields?? && appDataEntity.getAllPSAppDEFields()??>
<#list appDataEntity.getAllPSAppDEFields() as defield>
{
<#if defield.isKeyField()>
name: '${appDataEntity.getCodeName()?lower_case}',
prop: '${defield.getCodeName()?lower_case}',
<#else>
name: '${defield.getCodeName()?lower_case}',
prop: '${defield.getCodeName()?lower_case}',
</#if>
},
</#list>
</#if>
</#if>
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
/**
* 初始化向导
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public init(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Create(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
/**
* 向导结束
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public finish(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestData(action,context,data);
return new Promise((resolve: any, reject: any) => {
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
result = this.appEntityService.Update(Context,Data, isloading);
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=STATEWIZARDPANEL
\ No newline at end of file
...@@ -154,6 +154,15 @@ GanttElastic, ...@@ -154,6 +154,15 @@ GanttElastic,
*/ */
public tasks: any[] = []; public tasks: any[] = [];
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/** /**
* 监听语言变化 * 监听语言变化
* *
...@@ -345,6 +354,16 @@ GanttElastic, ...@@ -345,6 +354,16 @@ GanttElastic,
public created() { public created() {
this.locale = this.$i18n.locale; this.locale = this.$i18n.locale;
this.load(); this.load();
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh();
}
})
}
} }
/** /**
...@@ -361,6 +380,29 @@ GanttElastic, ...@@ -361,6 +380,29 @@ GanttElastic,
} }
} }
/**
* vue 生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterDestroy() {
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-form-group 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 :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> <#assign content>
<#list item.getPSDEFormDetails() as formmenber> <#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())> <#if !(formmenber.isHidden?? && formmenber.isHidden())>
......
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl ../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: <#if item.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, isShowCaption: ${item.isShowCaption()?c}, form: this</#assign> <#assign detail>caption: '${item.getCaption()}', detailType: '${item.getDetailType()}', name: '${item.getName()}', visible: <#if item.getPSDEFDGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, isShowCaption: ${item.isShowCaption()?c}, form: this, isControlledContent: <#if item.getShowMoreMode() == 1>true<#else>false</#if> </#assign>
<#if item.getDetailType() == 'BUTTON'> <#if item.getDetailType() == 'BUTTON'>
new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}', new FormButtonModel({ ${detail}<#if item.getPSUIAction()??><#assign uiaction=item.getPSUIAction()>, uiaction: { type: '${uiaction.getUIActionType()}',
tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if> }</#if> }) tag: '${uiaction.getUIActionTag()}'<#if (uiaction.getActionTarget()!="")>, actiontarget: '${uiaction.getActionTarget()}'</#if> }</#if> })
...@@ -14,7 +14,7 @@ new FormPageModel({ ${detail} }) ...@@ -14,7 +14,7 @@ new FormPageModel({ ${detail} })
<#elseif item.getDetailType() == 'FORMPART'> <#elseif item.getDetailType() == 'FORMPART'>
new FormPartModel({ ${detail} }) new FormPartModel({ ${detail} })
<#elseif item.getDetailType() == 'GROUPPANEL'> <#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>] } }) 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() == 2>true<#else>false</#if>, showMoreModeItems: [<#if item.getPSDEFormDetails()??><#list item.getPSDEFormDetails() as moreItem><#if moreItem.getShowMoreMode() == 1>'${moreItem.getName()}',</#if></#list></#if>] })
<#elseif item.getDetailType() == 'IFRAME'> <#elseif item.getDetailType() == 'IFRAME'>
new FormIFrameModel({ ${detail} }) new FormIFrameModel({ ${detail} })
<#elseif item.getDetailType() == 'RAWITEM'> <#elseif item.getDetailType() == 'RAWITEM'>
......
...@@ -310,6 +310,24 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -310,6 +310,24 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
</#list> </#list>
/**
* 显示更多模式切换操作
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public manageContainerClick(name: string){
let model = this.detailsModel[name];
if(model.isManageContainer){
model.setManageContainerStatus(!model.manageContainerStatus);
model.showMoreModeItems.forEach((item:any) => {
if(this.detailsModel[item].isControlledContent){
this.detailsModel[item].setVisible(model.manageContainerStatus? this.detailsModel[item].oldVisible : false);
}
});
}
}
/** /**
* 重置表单项值 * 重置表单项值
* *
...@@ -982,14 +1000,25 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -982,14 +1000,25 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.onFormLoad(data,'autoSave'); this.onFormLoad(data,'autoSave');
this.$emit('save', data); this.$emit('save', data);
<#if ctrl.getControlType() == 'FORM'> <#if ctrl.getControlType() == 'FORM'>
this.$store.dispatch('viewaction/datasaved', { viewtag: this.viewtag }); AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if> </#if>
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({
title: '保存数据发生错误',
content: '数据不一致,可能后台数据已经被修改,是否要重新加载数据?',
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
}else{
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: '错误', desc: response.data.message });
}
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
...@@ -1054,7 +1083,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1054,7 +1083,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.onFormLoad(data,'save'); this.onFormLoad(data,'save');
this.$emit('save', data); this.$emit('save', data);
<#if ctrl.getControlType() == 'FORM'> <#if ctrl.getControlType() == 'FORM'>
this.$store.dispatch('viewaction/datasaved', { viewtag: this.viewtag }); AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if> </#if>
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: data }); this.formState.next({ type: 'save', data: data });
...@@ -1067,8 +1096,19 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1067,8 +1096,19 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
resolve(response); resolve(response);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({
title: '保存数据发生错误',
content: '数据不一致,可能后台数据已经被修改,是否要重新加载数据?',
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
}else{
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: '错误', desc: response.data.message });
reject(response); reject(response);
}
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
...@@ -1104,6 +1144,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1104,6 +1144,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.formState.next({ type: 'remove', data: data }); this.formState.next({ type: 'remove', data: data });
this.data.ismodify = false; this.data.ismodify = false;
this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;删除成功!' }); this.$Notice.success({ title: '', desc: (data.srfmajortext ? data.srfmajortext : '') + '&nbsp;删除成功!' });
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
resolve(response); resolve(response);
} }
}).catch((error: any) => { }).catch((error: any) => {
...@@ -1125,10 +1168,6 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1125,10 +1168,6 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/ */
public async wfstart(data: any,localdata?:any): Promise<any> { public async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
<#-- if(!this.WFStartAction){
this.$Notice.error({ title: '错误', desc: 'WFCIDEditView视图表单WFStartAction参数未配置' });
return;
} -->
const _this: any = this; const _this: any = this;
const post: Promise<any> = _this.save({},false); const post: Promise<any> = _this.save({},false);
post.then((response:any) =>{ post.then((response:any) =>{
...@@ -1185,10 +1224,6 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1185,10 +1224,6 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/ */
public async wfsubmit(data: any,localdata?:any): Promise<any> { public async wfsubmit(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
<#-- if(!this.WFSubmitAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表单WFSubmitAction参数未配置' });
return;
} -->
const _this: any = this; const _this: any = this;
const arg: any = data[0]; const arg: any = data[0];
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -1201,6 +1236,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1201,6 +1236,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
// 保存完成UI处理 // 保存完成UI处理
this.onFormLoad(arg,'save'); this.onFormLoad(arg,'save');
this.$emit('save', arg); this.$emit('save', arg);
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'save', data: arg }); this.formState.next({ type: 'save', data: arg });
}); });
...@@ -1288,6 +1326,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1288,6 +1326,9 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.fillForm(_data,'updateFormItem'); this.fillForm(_data,'updateFormItem');
this.formLogic({ name: '', newVal: null, oldVal: null }); this.formLogic({ name: '', newVal: null, oldVal: null });
this.dataChang.next(JSON.stringify(this.data)); this.dataChang.next(JSON.stringify(this.data));
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
this.$nextTick(() => { this.$nextTick(() => {
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: _data }); this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: _data });
}); });
......
...@@ -116,6 +116,15 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -116,6 +116,15 @@ import { FormItemModel } from '@/model/form-detail';
*/ */
public codeListService:CodeListService = new CodeListService({ $store: this.$store }); public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/** /**
* 获取多项数据 * 获取多项数据
* *
...@@ -450,17 +459,24 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -450,17 +459,24 @@ import { FormItemModel } from '@/model/form-detail';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public allColumns: any[] = [ public allColumns: any[] = [
<#if ctrl.getAllPSDEGridColumns()??> <#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as column> <#list ctrl.getAllPSDEGridColumns() as column>
{ {
name: '${column.getName()?lower_case}', name: '${column.getName()?lower_case}',
label: '${column.getCaption()}', label: '${column.getCaption()}',
langtag: '<#if langbase??>${langbase}.columns.${column.getName()?lower_case}</#if>', langtag: '<#if langbase??>${langbase}.columns.${column.getName()?lower_case}</#if>',
show: <#if column.isHideDefault()>false<#else>true</#if>, show: <#if column.isHideDefault()>false<#else>true</#if>,
util: '${column.getWidthUnit()}' util: '${column.getWidthUnit()}',
<#-- BEGIN:是否支持行编辑 -->
<#if ctrl.isEnableRowEdit() && column.isEnableRowEdit()>
isEnableRowEdit: true,
<#else>
isEnableRowEdit: false,
</#if>
<#-- END:是否支持行编辑 -->
}, },
</#list> </#list>
</#if> </#if>
] ]
/** /**
...@@ -1092,6 +1108,16 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1092,6 +1108,16 @@ import { FormItemModel } from '@/model/form-detail';
} }
}); });
} }
if(AppCenterService && AppCenterService.getMessageCenter()){
this.appStateEvent = AppCenterService.getMessageCenter().subscribe(({ name, action, data }) =>{
if(!Object.is(name,"${ctrl.getPSAppDataEntity().getCodeName()}")){
return;
}
if(Object.is(action,'appRefresh')){
this.refresh([data]);
}
})
}
} }
/** /**
...@@ -1112,6 +1138,9 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1112,6 +1138,9 @@ import { FormItemModel } from '@/model/form-detail';
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
if(this.appStateEvent){
this.appStateEvent.unsubscribe();
}
<#if destroyed_block??> <#if destroyed_block??>
${destroyed_block} ${destroyed_block}
</#if> </#if>
...@@ -1735,16 +1764,17 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1735,16 +1764,17 @@ import { FormItemModel } from '@/model/form-detail';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getCellClassName(args:{row: any, column: any, rowIndex: number, columnIndex:number}){ public getCellClassName(args:{row: any, column: any, rowIndex: number, columnIndex:number}){
let hasRowEdit:any = { if(args.column.property){
<#list ctrl.getPSDEGridColumns() as column> let col = this.allColumns.find((item:any)=>{
<#if ctrl.isEnableRowEdit() && column.isEnableRowEdit()> return Object.is(args.column.property,item.name);
'${column.getName()?lower_case}':true, })
<#else> if(col !== undefined){
'${column.getName()?lower_case}':false, if(col.isEnableRowEdit && this.actualIsOpenEdit ){
</#if> return 'edit-cell';
</#list> }
}
} }
return ( hasRowEdit[args.column.property] && this.actualIsOpenEdit ) ? "edit-cell" : "info-cell"; return 'info-cell';
} }
/** /**
......
...@@ -75,6 +75,8 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi ...@@ -75,6 +75,8 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
*/ */
@Errorlog @Errorlog
public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> { public getItems(serviceName: string, interfaceName: string, context: any = {}, data: any, isloading?: boolean): Promise<any[]> {
data.page = data.page ? data.page : 0;
data.size = data.size ? data.size : 1000;
<#list ctrl.getPSDEGridEditItems() as deItem> <#list ctrl.getPSDEGridEditItems() as deItem>
<#if deItem.getPSEditor()?? && deItem.getPSEditor().getPSAppDataEntity?? && deItem.getPSEditor().getPSAppDataEntity()?? && deItem.getPSEditor().getPSAppDEDataSet?? && deItem.getPSEditor().getPSAppDEDataSet()??> <#if deItem.getPSEditor()?? && deItem.getPSEditor().getPSAppDataEntity?? && deItem.getPSEditor().getPSAppDataEntity()?? && deItem.getPSEditor().getPSAppDEDataSet?? && deItem.getPSEditor().getPSAppDEDataSet()??>
<#assign _appde = deItem.getPSEditor().getPSAppDataEntity()/> <#assign _appde = deItem.getPSEditor().getPSAppDataEntity()/>
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
<#if view.hasPSControl('wizardpanel')> <#if view.hasPSControl('wizardpanel')>
${P.getCtrlCode('wizardpanel', 'CONTROL.html').code} ${P.getCtrlCode('wizardpanel', 'CONTROL.html').code}
</#if> </#if>
<#if view.hasPSControl('statewizardpanel')>
${P.getCtrlCode('statewizardpanel', 'CONTROL.html').code}
</#if>
</@ibizindent> </@ibizindent>
</div> </div>
</card> </card>
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
height: 100%; height: 100%;
justify-content: center;
>.menuicon{ >.menuicon{
display: block; display: block;
text-align: center; text-align: center;
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
<div class="sider-top"> <div class="sider-top">
<div class="page-logo"> <div class="page-logo">
<#if view.getAppIconPath() != ""> <#if view.getAppIconPath() != "">
<img v-show="collapseChange" src="${view.getAppIconPath()}" height="16" @click="contextMenuDragVisiable=!contextMenuDragVisiable" /> <img v-show="collapseChange" v-if="isEnableAppSwitch" src="${view.getAppIconPath()}" height="16" @click="contextMenuDragVisiable=!contextMenuDragVisiable" />
<#else> <#else>
<span class="menuicon" @click="contextMenuDragVisiable=!contextMenuDragVisiable"><Icon type="md-menu" /></span> <span class="menuicon" v-if="isEnableAppSwitch" @click="contextMenuDragVisiable=!contextMenuDragVisiable"><Icon type="md-menu" /></span>
</#if> </#if>
<span v-show="!collapseChange" style="overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap;display: block;text-align: center;font-weight: 300;font-size: 20px;">{{$t(model.srfCaption)}}</span> <span v-show="!collapseChange" style="overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap;display: block;text-align: center;font-weight: 300;font-size: 20px;">{{$t(model.srfCaption)}}</span>
</div> </div>
</div> </div>
${P.getCtrlCode('appmenu', 'CONTROL.html').code} ${P.getCtrlCode('appmenu', 'CONTROL.html').code}
<context-menu-drag :contextMenuDragVisiable="contextMenuDragVisiable"></context-menu-drag> <context-menu-drag v-if="isEnableAppSwitch" :contextMenuDragVisiable="contextMenuDragVisiable"></context-menu-drag>
</sider> </sider>
<layout> <layout>
<header class="index_header"> <header class="index_header">
......
...@@ -203,6 +203,7 @@ import { Environment } from '@/environments/environment'; ...@@ -203,6 +203,7 @@ import { Environment } from '@/environments/environment';
<#if viewUIAction.getPSUIAction?? && viewUIAction.getPSUIAction()??> <#if viewUIAction.getPSUIAction?? && viewUIAction.getPSUIAction()??>
<#assign uiaction = viewUIAction.getPSUIAction() /> <#assign uiaction = viewUIAction.getPSUIAction() />
actionName:"${uiaction.getCaption()}", actionName:"${uiaction.getCaption()}",
icon:"<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>",
<#if uiaction.getPSAppCounter?? && uiaction.getPSAppCounter()??> <#if uiaction.getPSAppCounter?? && uiaction.getPSAppCounter()??>
<#assign counter = uiaction.getPSAppCounter() /> <#assign counter = uiaction.getPSAppCounter() />
counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice, counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice,
......
<#assign selfContent>
<#if !item.isHidden()> <#if !item.isHidden()>
<#assign selfContent>
<div class="item-field"> <div class="item-field">
<#if item.isShowCaption()><span class="item-field-label <#if item.getLabelPSSysCss()??> ${item.getLabelPSSysCss().getCssName()}</#if>"<#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span></#if> <#if item.isShowCaption()><span class="item-field-label <#if item.getLabelPSSysCss()??> ${item.getLabelPSSysCss().getCssName()}</#if>"<#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span></#if>
<div class="item-field-content"> <div class="item-field-content">
${P.getEditorCode(item, "PANELEDITOR.vue").code} ${P.getEditorCode(item, "PANELEDITOR.vue").code}
</div> </div>
</div> </div>
</#if> </#assign>
</#assign>
<#ibizinclude> <#ibizinclude>
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field <#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field <#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if>
</#if> </#if>
\ No newline at end of file
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:service="service" :service="service"
valueitem='${editor.getValueItemName()}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:service="service" :service="service"
valueitem='${editor.getValueItemName()}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:service="service" :service="service"
valueitem='${editor.getValueItemName()}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:service="service" :service="service"
valueitem='${editor.getValueItemName()}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}' deKeyField='${editor.getPSAppDataEntity().getCodeName()?lower_case}'
......
<input-box v-model="data.${editor.name}" :autoSize="{minRows: 10}" :disabled="detailsModel.${editor.name}.disabled" type='textarea' style="${editor.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if>></input-box> <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>
<span>{{data.${item.getName()?lower_case}}}</span> <#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
\ No newline at end of file <app-span <#t>
:value="data.${editor.name?lower_case}" <#t>
name="${editor.name?lower_case}" <#t>
:data="data" <#t>
:context="context" <#t>
:viewparams="viewparams" <#t>
:localContext =<@getNavigateContext editor /> <#t>
:localParam =<@getNavigateParams editor /> <#t>
<#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}' <#t>
codelistType='${codelist.getCodeListType()}' <#t>
</#if>
style="${item.getEditorCssStyle()}"> <#t>
</app-span> <#lt>
<app-span <#t> <span v-html="data.${item.getName()?lower_case}"></span>
name='${editor.name}' <#t> \ No newline at end of file
:value="data.${editor.name}" <#t>
<#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList() />
tag='${codelist.codeName}' <#t>
codelistType='${codelist.getCodeListType()}' <#t>
<#if codelist.getOrMode?? && codelist.getOrMode()?has_content>
renderMode="${codelist.getOrMode()}" <#t>
</#if>
<#if codelist.valueSeparator?has_content>
valueSeparator="${codelist.valueSeparator}" <#t>
</#if>
<#if codelist.textSeparator?has_content>
textSeparator="${codelist.textSeparator}" <#t>
</#if>
</#if>
:data="data" <#t>
:context="context" <#t>
:viewparams="viewparams" <#t>
:localContext =<@getNavigateContext editor /> <#t>
:localParam =<@getNavigateParams editor /> <#t>
style="${editor.getEditorCssStyle()}"><#t>
</app-span><#lt>
\ No newline at end of file
<span v-html="row[column.property]"></span>
\ No newline at end of file
...@@ -14,6 +14,15 @@ ...@@ -14,6 +14,15 @@
* @memberof ${srfclassname('${view.name}')} * @memberof ${srfclassname('${view.name}')}
*/ */
public ${item.name}(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) { public ${item.name}(args: any[],fullargs?:any[],params?: any, $event?: any, xData?: any) {
<#if item.getPSControlContainer().getViewType??>
if(!this.viewDefaultUsage){
if(Object.is(this.navModel,"route")){
this.initNavDataWithRoute(this.viewCacheData, false, true);
}else{
this.initNavDataWithTab(this.viewCacheData, false, true);
}
}
</#if>
<#if viewlogic.getPSAppUILogicRefViews?? && viewlogic.getPSAppUILogicRefViews()??> <#if viewlogic.getPSAppUILogicRefViews?? && viewlogic.getPSAppUILogicRefViews()??>
<#list viewlogic.getPSAppUILogicRefViews() as appUILogicRefView> <#list viewlogic.getPSAppUILogicRefViews() as appUILogicRefView>
<#if appUILogicRefView_index == 0><#assign curOPenLogicRefView = appUILogicRefView /></#if> <#if appUILogicRefView_index == 0><#assign curOPenLogicRefView = appUILogicRefView /></#if>
......
...@@ -282,18 +282,6 @@ if(this.formDruipart){ ...@@ -282,18 +282,6 @@ if(this.formDruipart){
this.onSearch($event); this.onSearch($event);
} }
</#if> </#if>
<#if view.hasPSControl('searchbar')>
/**
* 搜索栏事件
*
* @param {*} $event
* @memberof ${srfclassname('${view.name}')}Base
*/
public onSearchBarChange($event: any) {
console.log($event);
}
</#if>
<#ibizinclude> <#ibizinclude>
./VIEW_BOTTOM-BASE.vue.ftl ./VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -234,8 +234,8 @@ ...@@ -234,8 +234,8 @@
* *
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public initNavDataWithRoute(data:any = null, isNew:boolean = false){ public initNavDataWithRoute(data:any = null, isNew:boolean = false, isAlways:boolean = false){
if(this.viewDefaultUsage && Object.is(this.navModel,"route")){ if( isAlways || (this.viewDefaultUsage && Object.is(this.navModel,"route")) ){
this.navDataService.addNavData({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:isNew ? null : <#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath}); this.navDataService.addNavData({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:isNew ? null : <#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath});
} }
} }
...@@ -245,8 +245,8 @@ ...@@ -245,8 +245,8 @@
* *
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true){ public initNavDataWithTab(data:any = null,isOnlyAdd:boolean = true, isAlways:boolean = false){
if(this.viewDefaultUsage && !Object.is(this.navModel,"route")){ if( isAlways || (this.viewDefaultUsage && !Object.is(this.navModel,"route")) ){
this.navDataService.addNavDataByOnly({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:<#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd); this.navDataService.addNavDataByOnly({id:'${srffilepath2(view.getCodeName())}',tag:this.viewtag,srfkey:<#if appde??>this.context.${appde.getCodeName()?lower_case}<#else>null</#if>,title:this.$t(this.model.srfTitle),data:data,context:this.context,viewparams:this.viewparams,path:this.$route.fullPath},isOnlyAdd);
} }
} }
......
...@@ -132,9 +132,18 @@ if(this.viewparams.selectedData){ ...@@ -132,9 +132,18 @@ if(this.viewparams.selectedData){
newSelections.push(this.viewSelections[index]); newSelections.push(this.viewSelections[index]);
} }
}); });
this.viewSelections = newSelections; this.viewSelections = this.removeDuplicates([...newSelections,...this.viewSelections]);
}); });
this.selectedData = JSON.stringify(this.viewSelections); }
/**
* 去重
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public removeDuplicates(data:any):Array<any> {
const uniqueSet = new Set(data);
return [...uniqueSet];
} }
/** /**
......
...@@ -44,6 +44,14 @@ ...@@ -44,6 +44,14 @@
*/ */
public contextMenuDragVisiable: boolean = false; public contextMenuDragVisiable: boolean = false;
/**
* 是否支持应用切换
*
* @type {boolean}
* @memberof ${srfclassname('${view.name}')}Base
*/
public isEnableAppSwitch: boolean = <#if view.isEnableAppSwitch?? && view.isEnableAppSwitch()??>${view.isEnableAppSwitch()?c}<#else>false</#if>;
<#if view.getViewStyle() != "STYLE2"> <#if view.getViewStyle() != "STYLE2">
/** /**
* 初始化之前 * 初始化之前
......
...@@ -70,9 +70,9 @@ export default class ${srfclassname('${item.getCodeName()}')}UtilServiceBase ext ...@@ -70,9 +70,9 @@ export default class ${srfclassname('${item.getCodeName()}')}UtilServiceBase ext
*/ */
public initBasicParam(){ public initBasicParam(){
<#if item.getModelIdPSAppDEField()??>this.modelIdField = "${item.getModelIdPSAppDEField().getCodeName()?lower_case}";</#if> <#if item.getModelIdPSAppDEField()??>this.modelIdField = "${item.getModelIdPSAppDEField().getCodeName()?lower_case}";</#if>
<#if item.getModelIdPSAppDEField()??>this.modelField = "${item.getModelPSAppDEField().getCodeName()?lower_case}";</#if> <#if item.getModelPSAppDEField()??>this.modelField = "${item.getModelPSAppDEField().getCodeName()?lower_case}";</#if>
<#if item.getModelIdPSAppDEField()??>this.appIdField = "${item.getAppIdPSAppDEField().getCodeName()?lower_case}";</#if> <#if item.getAppIdPSAppDEField()??>this.appIdField = "${item.getAppIdPSAppDEField().getCodeName()?lower_case}";</#if>
<#if item.getModelIdPSAppDEField()??>this.userIdField = "${item.getUserIdPSAppDEField().getCodeName()?lower_case}";</#if> <#if item.getUserIdPSAppDEField()??>this.userIdField = "${item.getUserIdPSAppDEField().getCodeName()?lower_case}";</#if>
<#if item.getStoagePSAppDataEntity()??> <#if item.getStoagePSAppDataEntity()??>
<#assign stoageDataEntity = item.getStoagePSAppDataEntity() /> <#assign stoageDataEntity = item.getStoagePSAppDataEntity() />
this.stoageEntityName ="${stoageDataEntity.getCodeName()?lower_case}"; this.stoageEntityName ="${stoageDataEntity.getCodeName()?lower_case}";
......
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL-BASE.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('SERVICE.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_STATEWIZARDPANEL
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
## v7.0.0-alpha.12 [2020-7-2]
### Bug修复
修复mpicker解析调整
修复表格列class逻辑调整
修复面板标签,隐藏表单项
修复嵌入视图导航服务逻辑调整
修复选择多数据视图选择数据异常
修复多行输入十行 高度问题
### 功能新增及优化
#### 模板
新增表单显示更多模式(658)
新增首页应用切换器(658)
新增状态向导面板(658)
新增门户操作栏图标(654)
优化应用级数据状态同步功能(654)
#### 基础文件
新增修改密码功能(654)
## v7.0.0-alpha.11 [2020-6-21] ## v7.0.0-alpha.11 [2020-6-21]
### Bug修复 ### Bug修复
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册