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

Merge branch 'DEV'

...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
../@MACRO/CONTROL/LANGBASE.vue.ftl ../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<template> <template>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<div>
</#if>
<div :class="['app-list',<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()>'${singleCss.getCssName()}',</#if>this.items.length > 0 ? '' : 'app-list-empty' ]"> <div :class="['app-list',<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()>'${singleCss.getCssName()}',</#if>this.items.length > 0 ? '' : 'app-list-empty' ]">
<div v-if="items.length > 0"> <div v-if="items.length > 0">
<#if ctrl.render??> <#if ctrl.render??>
...@@ -16,7 +19,15 @@ ...@@ -16,7 +19,15 @@
<#elseif ctrl.itemRender??> <#elseif ctrl.itemRender??>
${ctrl.itemRender.code} ${ctrl.itemRender.code}
<#else> <#else>
{{item.srfmajortext}} <div class="app-list-item-content">{{item.srfmajortext}}</div>
<div calss="app-list-item-action">
<template v-for="(action,index) in Object.keys(ActionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(item, action, $event)">
<i :class="ActionModel[action].icon" style="margin-right:2px;"></i>
<span>{{ActionModel[action].caption}}</span>
</a>
</template>
</div>
</#if> </#if>
</div> </div>
<#elseif ctrl.isEnableGroup?? && ctrl.isEnableGroup()> <#elseif ctrl.isEnableGroup?? && ctrl.isEnableGroup()>
...@@ -35,7 +46,15 @@ ...@@ -35,7 +46,15 @@
<#elseif ctrl.itemRender??> <#elseif ctrl.itemRender??>
${ctrl.itemRender.code} ${ctrl.itemRender.code}
<#else> <#else>
{{item.srfmajortext}} <div class="app-list-item-content">{{item.srfmajortext}}</div>
<div calss="app-list-item-action">
<template v-for="(action,index) in Object.keys(ActionModel)">
<a :key="index" style="display: inline-block;margin: 0 12px;" @click="uiAction(item, action, $event)">
<i :class="ActionModel[action].icon" style="margin-right:2px;"></i>
<span>{{ActionModel[action].caption}}</span>
</a>
</template>
</div>
</#if> </#if>
</div> </div>
</div> </div>
...@@ -52,9 +71,28 @@ ...@@ -52,9 +71,28 @@
</div> </div>
<div v-else> <div v-else>
{{ $t('<#if langbase??>${langbase}.nodata</#if>') }} {{ $t('<#if langbase??>${langbase}.nodata</#if>') }}
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<span class="quick-toolbar">
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(quickToolbar, 'CONTROL.html').code}
</@ibizindent>
</span>
</#if>
</div> </div>
<el-backtop target=".content-container .app-list"></el-backtop> <el-backtop target=".content-container .app-list"></el-backtop>
</div> </div>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<row class='list-pagination' v-if="selections.length > 0">
<span class="batch-toolbar">
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</span>
</row>
</div>
</#if>
</template> </template>
<#assign import_block> <#assign import_block>
import CodeListService from "@/codelist/codelist-service"; import CodeListService from "@/codelist/codelist-service";
...@@ -243,6 +281,9 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -243,6 +281,9 @@ import CodeListService from "@/codelist/codelist-service";
} else if(Object.is(this.codelistType, "STATIC")){ } else if(Object.is(this.codelistType, "STATIC")){
groups = this.$store.getters.getCodeListItems(this.tag); groups = this.$store.getters.getCodeListItems(this.tag);
} }
if(groups.length == 0){
console.warn("分组数据无效");
}
groups.forEach((group: any,i: number)=>{ groups.forEach((group: any,i: number)=>{
let children:Array<any> = []; let children:Array<any> = [];
data.forEach((item: any,j: number)=>{ data.forEach((item: any,j: number)=>{
...@@ -258,7 +299,7 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -258,7 +299,7 @@ import CodeListService from "@/codelist/codelist-service";
}); });
let child:Array<any> = []; let child:Array<any> = [];
data.forEach((item: any)=>{ data.forEach((item: any)=>{
let i = groups.findIndex((group: any)=>Object.is(group,item[this.groupField])); let i = groups.findIndex((group: any)=>Object.is(group.label,item[this.groupField]));
if(i < 0){ if(i < 0){
child.push(item); child.push(item);
} }
...@@ -267,7 +308,9 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -267,7 +308,9 @@ import CodeListService from "@/codelist/codelist-service";
group: this.$t('app.commonWords.other'), group: this.$t('app.commonWords.other'),
children: child children: child
} }
groupTree.push(Tree); if(child && child.length > 0){
groupTree.push(Tree);
}
this.groupData = [...groupTree]; this.groupData = [...groupTree];
} }
</#if> </#if>
...@@ -287,6 +330,9 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -287,6 +330,9 @@ import CodeListService from "@/codelist/codelist-service";
} }
}); });
groups = [...new Set(groups)]; groups = [...new Set(groups)];
if(groups.length == 0){
console.warn("分组数据无效");
}
let groupTree:Array<any> = []; let groupTree:Array<any> = [];
groups.forEach((group: any,i: number)=>{ groups.forEach((group: any,i: number)=>{
let children:Array<any> = []; let children:Array<any> = [];
...@@ -295,6 +341,7 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -295,6 +341,7 @@ import CodeListService from "@/codelist/codelist-service";
children.push(item); children.push(item);
} }
}); });
group = group ? group : this.$t('app.commonWords.other');
const tree: any ={ const tree: any ={
group: group, group: group,
children: children children: children
...@@ -305,6 +352,16 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -305,6 +352,16 @@ import CodeListService from "@/codelist/codelist-service";
} }
</#if> </#if>
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
${P.getCtrlCode(quickToolbar, 'CONTROL.vue').code}
</#if>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if>
/** /**
* 当前页 * 当前页
* *
...@@ -831,6 +888,45 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -831,6 +888,45 @@ import CodeListService from "@/codelist/codelist-service";
}); });
} }
/**
* 操作栏模型数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ActionModel:any ={
<#if ctrl.getPSAppViewUIActions?? && ctrl.getPSAppViewUIActions()??>
<#list ctrl.getPSAppViewUIActions() as viewUIAction>
<#if viewUIAction.getPSUIAction?? && viewUIAction.getPSUIAction()??>
<#assign UIAction = viewUIAction.getPSUIAction() />
"${UIAction.getUIActionTag()}":{name:"${UIAction.getUIActionTag()}",icon:"<#if UIAction.getPSSysImage()??><#assign img=UIAction.getPSSysImage() /><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>",caption:"${UIAction.getCaption()}",disabled: false, visabled: true,noprivdisplaymode:<#if UIAction.getNoPrivDisplayMode(view)??>${UIAction.getNoPrivDisplayMode(view)}</#if>,dataaccaction: "<#if UIAction.getDataAccessAction()??>${UIAction.getDataAccessAction()}</#if>", actiontarget: "${UIAction.getActionTarget()}"}<#if viewUIAction_has_next>,</#if>
</#if>
</#list>
</#if>
};
/**
* 操作列界面行为
*
* @param {*} data
* @param {*} tag
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public uiAction(data: any, tag: any, $event: any) {
$event.stopPropagation();
<#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??>
<#assign action = logic.getPSAppViewUIAction().getPSUIAction()>
if(Object.is('${action.getUIActionTag()}', tag)) {
this.${logic.getName()}(data, tag, $event);
}
</#if>
</#list>
</#if>
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
box-shadow: 0px 0px 2px 1px rgb(209, 208, 208); box-shadow: 0px 0px 2px 1px rgb(209, 208, 208);
background: #f7f7fa; background: #f7f7fa;
min-height: 24px; min-height: 24px;
display: flex;
justify-content: space-between;
align-items: center;
} }
.app-list-item.isSelect { .app-list-item.isSelect {
background: #ecf5ff; background: #ecf5ff;
...@@ -41,4 +44,27 @@ ...@@ -41,4 +44,27 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} <#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
\ No newline at end of file .quick-toolbar{
display: inline-block;
button{
background: #ebf3fb;
color: #2575ca;
border: 0;
}
}
</#if>
}
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
.list-pagination {
position: fixed;
background-color: #fff;
height: 50px;
bottom: 30px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
z-index: 5;
}
</#if>
\ No newline at end of file
<template>
<#if ctrl.render??>
${ctrl.render.code}
<#else>
<div class="map-container">
<div ref="map" class="map"></div>
</div>
</#if>
</template>
<#assign import_block>
import echarts from 'echarts';
import 'echarts/map/js/china.js'
import { Http } from "@/utils";
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 地图对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public map: any;
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--update
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public updateAction!: string;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public fetchAction!: string;
/**
* 部件行为--remove
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public removeAction!: string;
/**
* 部件行为--load
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public loadAction!: string;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public loaddraftAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop() public createAction!: string;
/**
* 地图数据项模型
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public mapItems: any = {
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
'${mapitem.getItemType()?lower_case}': {
bkcolor: '<#if mapitem.getBKColorPSAppDEField?? && mapitem.getBKColorPSAppDEField()??>${mapitem.getBKColorPSAppDEField().getCodeName()?lower_case}</#if>',
color:'<#if mapitem.getColorPSAppDEField?? && mapitem.getColorPSAppDEField()??>${mapitem.getColorPSAppDEField().getCodeName()?lower_case}</#if>',
content:'<#if mapitem.getContentPSDEField?? && mapitem.getContentPSDEField()??>${mapitem.getContentPSDEField().getCodeName()?lower_case}</#if>',
latitude:'<#if mapitem.getLatitudePSAppDEField?? && mapitem.getLatitudePSAppDEField()??>${mapitem.getLatitudePSAppDEField().getCodeName()?lower_case}</#if>',
longitude:'<#if mapitem.getLongitudePSAppDEField?? && mapitem.getLongitudePSAppDEField()??>${mapitem.getLongitudePSAppDEField().getCodeName()?lower_case}</#if>',
text:'<#if mapitem.getTextPSAppDEField?? && mapitem.getTextPSAppDEField()??>${mapitem.getTextPSAppDEField().getCodeName()?lower_case}</#if>',
tips:'<#if mapitem.getTipsPSAppDEField?? && mapitem.getTipsPSAppDEField()??>${mapitem.getTipsPSAppDEField().getCodeName()?lower_case}</#if>',
code:'${mapitem_index}'
}<#if mapitem_has_next>,</#if>
</#list>
</#if>
};
/**
* 数据集
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public items: any[] = [];
/**
* 初始化配置
*
* @type {}
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public initOptions: any = {
tooltip: {
trigger: 'item'
},
legend: {
orient: 'horizontal',
x: 'center',
data: [
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
'${mapitem.getName()}'<#if mapitem_has_next>,</#if>
</#list>
</#if>
]
},
geo: {
map: 'china',
zoom: 1.2,
label: {
normal: {
show: false
},
emphasis: {
show: false
}
},
itemStyle: {
normal: {
areaColor: '#4FADFD',
borderColor: '#111'
},
emphasis: {
areaColor: '#0CD3DB'
}
}
},
visualMap: [
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
{
type: 'piecewise',
left: 'left',
top: 'bottom',
splitNumber: 1,
seriesIndex: ${mapitem_index},
pieces: [{
label: '${mapitem.getName()}',
min: ${mapitem_index * 10},
max: ${(mapitem_index+1) * 10},
<#if mapitem.getColor?? && mapitem.getColor()??>
color: '${mapitem.getColor()}',
</#if><#t>
<#if mapitem.getBKColor?? && mapitem.getBKColor()??>
backgroundColor: '${mapitem.getBKColor()}',
</#if><#t>
<#if mapitem.getBorderColor?? && mapitem.getBorderColor()??>
borderColor: '${mapitem.getBorderColor()}',
</#if><#t>
<#if mapitem.getBorderWidth?? && mapitem.getBorderWidth()??>
borderWidth: '${mapitem.getBorderWidth()}',
</#if><#t>
}],
show: false
}<#if mapitem_has_next>,</#if>
</#list>
</#if>
],
series: [
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
{
name: '<#if mapitem.getName()??>${mapitem.getName()}</#if>',
<#-- 类型判断 Start (默认 POINT )-->
<#-- 目前支持 POINT -->
<#if mapitem.getItemStyle?? && mapitem.getItemStyle()??>
<#if mapitem.getItemStyle() == 'POINT'>
type: 'scatter',
<#else>
type: 'scatter',
</#if>
<#else>
type: 'scatter',
</#if>
<#-- 类型判断 End -->
coordinateSystem: 'geo',
<#if mapitem.getItemType?? && mapitem.getItemType()??>
itemType: '${mapitem.getItemType()?lower_case}',
</#if><#t>
<#if mapitem.getColor?? && mapitem.getColor()??>
color: '${mapitem.getColor()}',
</#if><#t>
geoIndex: 0,
symbolSize: 14,
label: {
show: false
},
emphasis: {
label: {
show: false
}
},
tooltip: {
formatter: '{a}'
},
seriesDataIndex: ${(mapitem_index + 1) * 10 - 5},
data: []
}<#if mapitem_has_next>,</#if>
</#list>
</#if>
]
}
/**
* 应用状态事件
*
* @public
* @type {(Subscription | undefined)}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public appStateEvent: Subscription | undefined;
/**
* 刷新
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public refresh(args?: any) {
this.load();
}
/**
* 选中的数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public selections: any[] = [];
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getData(): any {
return null;
}
/**
* vue 生命周期
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public created() {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterCreated() {
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();
}
})
}
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.load(data);
}
});
}
/**
* vue生命周期
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public mounted() {
this.afterMounted();
}
/**
* 执行mounted后的逻辑
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public afterMounted() {
let map: any = (this.$refs.map as any);
this.map = echarts.init(map);
this.map.setOption(this.initOptions);
}
/**
* 加载数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public load(data: any = {}, type: string = "",isloadding = this.showBusyIndicator) {
this.items = [];
const parentData: any = {};
this.$emit('beforeload', parentData);
Object.assign(data, parentData);
let tempViewParams: any = parentData.viewparams ? parentData.viewparams : {};
Object.assign(tempViewParams, JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(data, { viewparams: tempViewParams });
this.service.search(this.fetchAction, this.context, data, isloadding).then((response: any) => {
if(!response || response.status !== 200) {
this.$notify.warning({
title: '警告',
message: response.error.message
})
}
this.$emit('load', response.data ? response.data : []);
this.items = response.data;
this.handleOptions(response.data);
this.setOptions();
});
}
/**
* 设置配置
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public setOptions() {
if(!this.map) {
return;
}
const options = JSON.parse(JSON.stringify(this.initOptions));
this.map.setOption(options);
}
/**
* 处理数据集
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleOptions(items: any[]) {
if(!items || items.length == 0) {
return;
}
items.forEach((item: any) => {
let longitudeArr: Array<any> = [];
let latitudeArr: Array<any> = [];
for(let key in this.mapItems) {
if(Object.is(key, item.itemType)) {
item.longitude ? longitudeArr.push(item.longitude) : '';
item.latitude ? latitudeArr.push(item.latitude) : '';
}
}
this.handleMapOptions(longitudeArr, latitudeArr, item);
})
}
/**
* 配置整合
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleMapOptions(longitude: Array<any>, latitude: Array<any>, arg: any) {
let series: Array<any> = this.initOptions.series;
if(!series || series.length==0) {
return;
}
series.forEach((item: any) => {
if(Object.is(arg.itemType, item.itemType)) {
longitude.forEach((jd: any, index: number) => {
let tempItem: any[] = [];
tempItem.push(parseFloat(jd));
tempItem.push(parseFloat(latitude[index]));
this.handleSeriesOptions(tempItem, item, arg);
item.data.push(tempItem);
})
}
});
Object.assign(this.initOptions.series, series);
}
/**
* 数据整合
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleSeriesOptions(tempItem: any, item: any, data: any) {
// 序列
tempItem.push(item.seriesDataIndex);
}
/**
* 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(this.viewStateEvent){
this.viewStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
.map{
width: 80vw;
height: 70vh;
}
\ No newline at end of file
<#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.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public itemType: string = "";
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
let dataItems: any = [
<#-- 关联主实体的主键 -->
<#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}'
},
</#if>
</#list>
</#if>
</#if>
{
name: 'itemType',
},
];
switch (this.itemType) {
<#-- 地图项实体映射 -->
<#if ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapItem>
<#if mapItem.getPSAppDataEntity()??>
case "${mapItem.getItemType()?lower_case}":
dataItems =
[
...dataItems,
{
name: 'longitude',
prop: '${mapItem.getLongitudePSAppDEField().getCodeName()?lower_case}'
},
{
name: 'latitude',
prop: '${mapItem.getLatitudePSAppDEField().getCodeName()?lower_case}'
},
{
// 高度
name: 'height',
prop: '<#if mapItem.getAltitudePSAppDEField?? && mapItem.getAltitudePSAppDEField()??>${mapItem.getAltitudePSAppDEField().getCodeName()?lower_case}</#if>'
},
{
// 背景颜色
name: 'height',
prop: '<#if mapItem.getBKColorPSAppDEField?? && mapItem.getBKColorPSAppDEField()??>${mapItem.getBKColorPSAppDEField().getCodeName()?lower_case}</#if>'
},
{
// 提示
name: 'tips',
prop: '<#if mapItem.getTipsPSAppDEField?? && mapItem.getTipsPSAppDEField()??>${mapItem.getTipsPSAppDEField().getCodeName()?lower_case}</#if>'
},
{
// 文本值
name: 'text',
prop: '<#if mapItem.getTextPSAppDEField?? && mapItem.getTextPSAppDEField()??>${mapItem.getTextPSAppDEField().getCodeName()?lower_case}</#if>'
},
{
// 排序
name: 'height',
prop: '<#if mapItem.getOrderValuePSAppDEField?? && mapItem.getOrderValuePSAppDEField()??>${mapItem.getOrderValuePSAppDEField().getCodeName()?lower_case}</#if>'
},
{
// 字体颜色
name: 'fontcolor',
prop: '<#if mapItem.getColorPSAppDEField?? && mapItem.getColorPSAppDEField()??>${mapItem.getColorPSAppDEField().getCodeName()?lower_case}</#if>'
},
{
// 数据项内容
name: 'content',
prop: '<#if mapItem.getContentPSDEField?? && mapItem.getContentPSDEField()??>${mapItem.getContentPSDEField().getCodeName()?lower_case}</#if>'
},
{
// 分组
name: 'group',
prop: '<#if mapItem.getGroupPSAppDEField?? && mapItem.getGroupPSAppDEField()??>${mapItem.getGroupPSAppDEField().getCodeName()?lower_case}</#if>'
},
{
// 图标
name: 'icon',
prop: '<#if mapItem.getIconPSAppDEField?? && mapItem.getIconPSAppDEField()??>${mapItem.getIconPSAppDEField().getCodeName()?lower_case}</#if>'
},
];
break;
</#if>
</#list>
</#if>
}
return dataItems;
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign import_block>
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
<#if mapitem.getPSAppDataEntity()??>
<#assign _appde = mapitem.getPSAppDataEntity() />
<#if _appde.getId() != appde.getId()>
<#if !P.exists("importService", _appde.getId(), "")>
import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffilepath2(_appde.getCodeName())}/${srffilepath2(_appde.getCodeName())}-service';
</#if>
</#if>
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
<#if mapitem.getPSAppDataEntity()??>
<#assign _appde = mapitem.getPSAppDataEntity() />
<#if _appde.getId() != appde.getId()>
<#if !P.exists("importService", _appde.getId(), "")>
/**
* ${_appde.getLogicName()}服务对象
*
* @type {${srfclassname('${_appde.getCodeName()}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public ${_appde.getCodeName()?lower_case}Service: ${srfclassname('${_appde.getCodeName()}')}Service = new ${srfclassname('${_appde.getCodeName()}')}Service();
</#if>
</#if>
</#if>
</#list>
</#if>
/**
* 地图配置集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public mapConfig: any[] = [
<#if ctrl.getPSSysMapItems?? && ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
{
itemName: '${mapitem.getName()}',
itemType: '${mapitem.getItemType()}',
color : '${mapitem.getBKColor()}',
textColor : '${mapitem.getColor()}'
}<#if mapitem_has_next>,</#if>
</#list>
</#if>
];
/**
* 查询数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public search(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let _this = this;
return new Promise((resolve: any, reject: any) => {
let promises:any = [];
let tempRequest:any;
<#if ctrl.getPSSysMapItems()??>
<#list ctrl.getPSSysMapItems() as mapitem>
<#if mapitem.getPSAppDataEntity()?? && mapitem.getPSDEDataSet()??>
<#assign _appde = mapitem.getPSAppDataEntity() />
<#assign deDataSet = mapitem.getPSDEDataSet() />
<#if !P.exists("importService3", _appde.getId() + deDataSet.getCodeName(), "")>
<#if _appde.getId() == appde.getId()>
tempRequest = this.handleRequestData(action,context,data,true,"${mapitem.getItemType()}");
promises.push(this.appEntityService.Fetch${deDataSet.getCodeName()}(tempRequest.context, tempRequest.data, isloading));
<#else>
tempRequest = this.handleRequestData(action,context,data,true,"${mapitem.getItemType()}");
promises.push(this.${_appde.getCodeName()?lower_case}Service.Fetch${deDataSet.getCodeName()}(tempRequest.context, tempRequest.data, isloading));
</#if>
</#if>
</#if>
</#list>
</#if>
Promise.all(promises).then((resArray: any) => {
let _data:any = [];
resArray.forEach((response:any,resIndex:number) => {
if (!response || response.status !== 200) {
return;
}
let _response: any = JSON.parse(JSON.stringify(response));
_response.data.forEach((item:any,index:number) =>{
_response.data[index].color = _this.mapConfig[resIndex].color;
_response.data[index].textColor = _this.mapConfig[resIndex].textColor;
_response.data[index].itemType = _this.mapConfig[resIndex].itemType;
});
;
_this.handleResponse(action, _response,false,_this.mapConfig[resIndex].itemType);
_data.push(..._response.data);
});
let result = {status: 200, data: _data};
resolve(result);
}).catch((response: any) => {
reject(response);
});
});
}
/**
* 处理request请求数据
*
* @param action 行为
* @param data 数据
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleRequestData(action: string,context:any ={},data: any = {},isMerge:boolean = false,itemType:string=""){
let model: any = this.getMode();
model.itemType = itemType;
return super.handleRequestData(action,context,data,isMerge);
}
/**
* 处理response返回数据
*
* @param {string} action
* @param {*} response
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public async handleResponse(action: string, response: any,isCreate:boolean = false,itemType:string=""){
let model: any = this.getMode();
model.itemType = itemType;
super.handleResponse(action,response,isCreate);
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=MAP
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<#else> <#else>
<div class="app-data-chart<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>"> <div class="app-data-chart<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div v-show="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('<#if langbase??>${langbase}.nodata</#if>')}}</div> <div v-show="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('<#if langbase??>${langbase}.nodata</#if>')}}</div>
<div v-show="!isNoData" class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div> <div v-show="!isNoData" class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px;</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px<#else>100%</#if>;padding: 6px 0;"></div>
</div> </div>
</#if> </#if>
</template> </template>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<#else> <#else>
<div class="app-data-chart<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>"> <div class="app-data-chart<#if ctrl.getPSSysCss?? && ctrl.getPSSysCss()??><#assign singleCss = ctrl.getPSSysCss()> ${singleCss.getCssName()}</#if>">
<div v-show="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('<#if langbase??>${langbase}.nodata</#if>')}}</div> <div v-show="isNoData" class="chart-no-data"><i class="el-icon-data-analysis"></i>{{$t('<#if langbase??>${langbase}.nodata</#if>')}}</div>
<div v-show="!isNoData" class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()};</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()}px<#else>100%</#if>;padding: 6px 0;"></div> <div v-show="!isNoData" class="app-charts" :id="chartId" style="<#if ctrl.getWidth() gt 0>width: ${ctrl.getWidth()?c}px;</#if>height: <#if ctrl.getHeight() gt 0>${ctrl.getHeight()?c}px<#else>100%</#if>;padding: 6px 0;"></div>
</div> </div>
</#if> </#if>
</template> </template>
......
...@@ -46,12 +46,22 @@ ...@@ -46,12 +46,22 @@
<#elseif ctrl.itemRender??> <#elseif ctrl.itemRender??>
${ctrl.itemRender.code} ${ctrl.itemRender.code}
<#else> <#else>
<img v-if="item.srficonpath" :src="item.srficonpath" class="single-card-img" /> <div class="data-view-item">
<img v-else src="/assets/img/noimage.png" class="single-card-img" /> <img v-if="item.srficonpath" :src="item.srficonpath" class="single-card-img" />
<div class="single-card-default"> <img v-else src="/assets/img/noimage.png" class="single-card-img" />
<Tooltip :content="item.srfmajortext"> <div class="single-card-default">
{{item.srfmajortext}} <Tooltip :content="item.srfmajortext">
</Tooltip> {{item.srfmajortext}}
</Tooltip>
</div>
</div>
<div class="data-view-item-action">
<template v-for="(action,index) in Object.keys(ActionModel)">
<button type="info" :key="index" @click="uiAction(item, action, $event)">
<i :class="ActionModel[action].icon" style="margin-right:2px;"></i>
<span>{{ActionModel[action].caption}}</span>
</button>
</template>
</div> </div>
</#if> </#if>
</el-card> </el-card>
...@@ -75,12 +85,22 @@ ...@@ -75,12 +85,22 @@
<#elseif ctrl.itemRender??> <#elseif ctrl.itemRender??>
${ctrl.itemRender.code} ${ctrl.itemRender.code}
<#else> <#else>
<img v-if="item.srficonpath" :src="item.srficonpath" class="single-card-img" /> <div class="data-view-item">
<img v-else src="/assets/img/noimage.png" class="single-card-img" /> <img v-if="item.srficonpath" :src="item.srficonpath" class="single-card-img" />
<div class="single-card-default"> <img v-else src="/assets/img/noimage.png" class="single-card-img" />
<Tooltip :content="item.srfmajortext"> <div class="single-card-default">
{{item.srfmajortext}} <Tooltip :content="item.srfmajortext">
</Tooltip> {{item.srfmajortext}}
</Tooltip>
</div>
</div>
<div class="data-view-item-action">
<template v-for="(action,index) in Object.keys(ActionModel)">
<button type="info" :key="index" @click="uiAction(item, action, $event)">
<i :class="ActionModel[action].icon" style="margin-right:2px;"></i>
<span>{{ActionModel[action].caption}}</span>
</button>
</template>
</div> </div>
</#if> </#if>
</el-card> </el-card>
...@@ -94,8 +114,31 @@ ...@@ -94,8 +114,31 @@
</el-collapse> </el-collapse>
</#if> </#if>
</row> </row>
<div v-else class="app-data-empty">{{ $t('<#if langbase??>${langbase}.nodata</#if>') }}</div> <div v-else class="app-data-empty">
{{ $t('<#if langbase??>${langbase}.nodata</#if>') }}
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<span class="quick-toolbar">
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(quickToolbar, 'CONTROL.html').code}
</@ibizindent>
</span>
</#if>
</div>
<el-backtop target=".content-container .app-data-view"></el-backtop> <el-backtop target=".content-container .app-data-view"></el-backtop>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<row class='dataview-pagination'>
<div v-show="flag" class="batch-toolbar">
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</div>
<div class="dataview-pagination-icon">
<Icon type="md-code-working" @click="onClick"/>
</div>
</row>
</#if>
</div> </div>
</#if> </#if>
</template> </template>
...@@ -353,6 +396,16 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -353,6 +396,16 @@ import CodeListService from "@/codelist/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop() public isSingleSelect?: boolean; @Prop() public isSingleSelect?: boolean;
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
${P.getCtrlCode(quickToolbar, 'CONTROL.vue').code}
</#if>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if>
/** /**
* 数据 * 数据
...@@ -362,6 +415,23 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -362,6 +415,23 @@ import CodeListService from "@/codelist/codelist-service";
*/ */
public items: any[] = []; public items: any[] = [];
/**
* 操作栏模型数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public ActionModel:any ={
<#if ctrl.getPSAppViewUIActions?? && ctrl.getPSAppViewUIActions()??>
<#list ctrl.getPSAppViewUIActions() as viewUIAction>
<#if viewUIAction.getPSUIAction?? && viewUIAction.getPSUIAction()??>
<#assign UIAction = viewUIAction.getPSUIAction() />
"${UIAction.getUIActionTag()}":{name:"${UIAction.getUIActionTag()}",icon:"<#if UIAction.getPSSysImage()??><#assign img=UIAction.getPSSysImage() /><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>",caption:"${UIAction.getCaption()}",disabled: false, visabled: true,noprivdisplaymode:<#if UIAction.getNoPrivDisplayMode(view)??>${UIAction.getNoPrivDisplayMode(view)}</#if>,dataaccaction: "<#if UIAction.getDataAccessAction()??>${UIAction.getDataAccessAction()}</#if>", actiontarget: "${UIAction.getActionTarget()}"}<#if viewUIAction_has_next>,</#if>
</#if>
</#list>
</#if>
};
/** /**
* 是否支持分页 * 是否支持分页
* *
...@@ -434,6 +504,24 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -434,6 +504,24 @@ import CodeListService from "@/codelist/codelist-service";
*/ */
public appStateEvent: Subscription | undefined; public appStateEvent: Subscription | undefined;
/**
* 默认隐藏批量操作工具栏
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public flag: boolean = false;
/**
* 更改批量操作工具栏显示状态
*
* @param $event
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onClick($event: any){
this.flag = !this.flag;
}
/** /**
* 排序点击事件 * 排序点击事件
* @param {string} field 属性名 * @param {string} field 属性名
...@@ -485,13 +573,15 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -485,13 +573,15 @@ import CodeListService from "@/codelist/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterMounted(){ public afterMounted(){
<#if ctrl.isEnablePagingBar()>
this.$el.addEventListener('scroll', ()=> { this.$el.addEventListener('scroll', ()=> {
let el: any = this.$el.getElementsByClassName('dataview-pagination')[0];
el.style.top = 40 + this.$el.scrollTop + 'px';
<#if ctrl.isEnablePagingBar()>
if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) { if( this.$el.scrollTop + this.$el.clientHeight >= this.$el.scrollHeight) {
this.loadMore(); this.loadMore();
} }
})
</#if> </#if>
})
} }
/** /**
...@@ -875,6 +965,29 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -875,6 +965,29 @@ import CodeListService from "@/codelist/codelist-service";
}); });
this.$emit('selectionchange', this.selections); this.$emit('selectionchange', this.selections);
} }
/**
* 操作列界面行为
*
* @param {*} data
* @param {*} tag
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public uiAction(data: any, tag: any, $event: any) {
$event.stopPropagation();
<#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??>
<#assign action = logic.getPSAppViewUIAction().getPSUIAction()>
if(Object.is('${action.getUIActionTag()}', tag)) {
this.${logic.getName()}(data, tag, $event);
}
</#if>
</#list>
</#if>
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
position: relative;
// 排序栏样式 // 排序栏样式
.bar-container{ .bar-container{
padding: 6px 8px; padding: 6px 8px;
...@@ -98,23 +99,35 @@ ...@@ -98,23 +99,35 @@
width: 100%; width: 100%;
cursor: pointer; cursor: pointer;
border: 2px solid transparent; border: 2px solid transparent;
.single-card-default { .data-view-item{
.ivu-tooltip{ .single-card-default {
.ivu-tooltip-rel{ .ivu-tooltip{
width: 150px; .ivu-tooltip-rel{
white-space: nowrap; width: 150px;
text-overflow: ellipsis; white-space: nowrap;
overflow: hidden; text-overflow: ellipsis;
text-align: left; overflow: hidden;
padding-left: 5px; text-align: left;
font-size: 18px; padding-left: 5px;
font-weight: 800; font-size: 18px;
} font-weight: 800;
} }
}
}
.single-card-img {
width: 150px;
height: calc(100% - 32px);
}
} }
.single-card-img { .data-view-item-action{
width: 150px; button{
height: calc(100% - 32px); margin: 0 3px;
cursor: pointer;
padding:3px;
}
button:hover{
color: #409eff;
}
} }
} }
.isselected{ .isselected{
...@@ -149,6 +162,36 @@ ...@@ -149,6 +162,36 @@
.el-backtop { .el-backtop {
position: absolute; position: absolute;
} }
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
.dataview-pagination {
position: absolute;
height: 42px;
width: 100%;
top: 40px;
display: flex;
justify-content: flex-end;
align-items: center;
text-align: center;
font-size: 20px;
z-index: 5;
.dataview-pagination-icon{
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
border:1px solid #dcdee2;
border-radius: 50%;
background-color: #FFF;
margin: 3px;
}
.dataview-pagination-icon:hover{
background-color: #409eff;
color: #fff;
}
}
</#if>
} }
<#ibizinclude> <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl ../@MACRO/CSS/DEFAULT.less.ftl
......
...@@ -11,9 +11,17 @@ ${ctrl.render.code} ...@@ -11,9 +11,17 @@ ${ctrl.render.code}
<#if ctrl.groupRender??> <#if ctrl.groupRender??>
${ctrl.groupRender.code} ${ctrl.groupRender.code}
<#else> <#else>
<div :key="group + index" class="dataview-group-content" style="<#if ctrl.getGroupWidth() gt 0>width: ${ctrl.getGroupWidth()?c}px;<#else>flex-grow: 1;</#if>"> <div :key="index" class="dataview-group-folading-kanban">
<div class="dataview-group-icon">
<Icon :type="group.folding ? 'md-arrow-dropright' : 'md-arrow-dropleft'" size="25" @click="onClick(group,index)"/>
</div>
<div class="dataview-group-folding">
<span>{{getGroupText(group.value)}}({{group.items.length}})</span>
</div>
</div>
<div :key="group + index" class="dataview-group-content dataview-group-kanban" style="<#if ctrl.getGroupWidth() gt 0>width: ${ctrl.getGroupWidth()?c}px;<#else>flex-grow: 1;</#if>">
<div class="dataview-group-header<#if ctrl.getGroupPSSysCss()??> ${ctrl.getGroupPSSysCss().getCssName()}</#if>"> <div class="dataview-group-header<#if ctrl.getGroupPSSysCss()??> ${ctrl.getGroupPSSysCss().getCssName()}</#if>">
{{ getGroupText(group.name) }} {{ getGroupText(group.value) }}
<#if ctrl.getGroupPSUIActionGroup()??> <#if ctrl.getGroupPSUIActionGroup()??>
<Poptip trigger="hover" content="content" placement="bottom-end" style="float: right;"> <Poptip trigger="hover" content="content" placement="bottom-end" style="float: right;">
<Icon type="md-more" /> <Icon type="md-more" />
...@@ -38,11 +46,11 @@ ${ctrl.render.code} ...@@ -38,11 +46,11 @@ ${ctrl.render.code}
</Poptip> </Poptip>
</#if> </#if>
</div> </div>
<draggable :list="group.items" group="${ctrl.name}" class="dataview-group-items" @change="onDragChange($event, group.name)"> <draggable :list="group.items" group="${ctrl.name}" class="dataview-group-items" @change="onDragChange($event, group.value)">
<div v-for="(item, i) in group.items" :key="i" :class="{'dataview-group-item': true, 'is-select': item.isselected}" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <div v-for="(item, i) in group.items" :key="i" :class="{'dataview-group-item': true, 'is-select': item.isselected}" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??> <#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()> <#assign panel = ctrl.getItemPSLayoutPanel()>
<layout_${panel.getName()} name='${panel.name}' :inputData="item"></layout_${panel.getName()}> <layout_${panel.getName()} name='${panel.name}' :inputData="item" @panelDataChange="($event)=>{onPanelDataChange(item,$event)}"></layout_${panel.getName()}>
<#elseif ctrl.itemRender??> <#elseif ctrl.itemRender??>
${ctrl.itemRender.code} ${ctrl.itemRender.code}
<#else> <#else>
...@@ -81,6 +89,7 @@ ${ctrl.render.code} ...@@ -81,6 +89,7 @@ ${ctrl.render.code}
</template> </template>
<#assign import_block> <#assign import_block>
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import CodeListService from '@codelist/codelist-service';
</#assign> </#assign>
<#assign component_block> <#assign component_block>
draggable, draggable,
...@@ -235,6 +244,22 @@ draggable, ...@@ -235,6 +244,22 @@ draggable,
*/ */
public selections: Array<any> = []; public selections: Array<any> = [];
/**
* 代码表服务
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codeListService:CodeListService = new CodeListService( {$store: this.$store});
/**
* 代码表数据
*
* @type {Array<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public allCodeList:Array<any> = [];
/** /**
* 当前页 * 当前页
* *
...@@ -296,13 +321,12 @@ draggable, ...@@ -296,13 +321,12 @@ draggable,
*/ */
public groupMode: string = '${ctrl.getGroupMode()}' public groupMode: string = '${ctrl.getGroupMode()}'
/** /**
* 分组模式 * 分组代码表
* *
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public groupCodelist: string = '<#if ctrl.getGroupPSCodeList()??>${ctrl.getGroupPSCodeList().getCodeName()}</#if>' public groupCodelist: any = {<#if ctrl.getGroupPSCodeList()??>type:'${ctrl.getGroupPSCodeList().getCodeListType()}',tag:'${ctrl.getGroupPSCodeList().getCodeName()}'</#if>};
/** /**
* Vue声明周期,组件挂载完毕 * Vue声明周期,组件挂载完毕
* *
...@@ -413,7 +437,7 @@ draggable, ...@@ -413,7 +437,7 @@ draggable,
* @param {boolean} [isReset=false] 是否重置items * @param {boolean} [isReset=false] 是否重置items
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public load(opt: any = {}, isReset: boolean = false): void { public async load(opt: any = {}, isReset: boolean = false) {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.kanban.notConfig.fetchAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.kanban.notConfig.fetchAction') as string) });
return; return;
...@@ -585,7 +609,7 @@ draggable, ...@@ -585,7 +609,7 @@ draggable,
Object.assign(arg, { viewparams: this.viewparams }); Object.assign(arg, { viewparams: this.viewparams });
let _context = JSON.parse(JSON.stringify(this.context)); let _context = JSON.parse(JSON.stringify(this.context));
<#if ctrl.getPSAppDataEntity()??> <#if ctrl.getPSAppDataEntity()??>
Object.assign(_context, { ${ctrl.getPSAppDataEntity().getCodeName()?lower_case}: opt.task }); Object.assign(_context, { ${ctrl.getPSAppDataEntity().getCodeName()?lower_case}: opt.srfkey });
</#if> </#if>
const post: Promise<any> = this.service.update(this.updateGroupAction, _context, arg, this.showBusyIndicator); const post: Promise<any> = this.service.update(this.updateGroupAction, _context, arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
...@@ -618,7 +642,7 @@ draggable, ...@@ -618,7 +642,7 @@ draggable,
* @param {} * @param {}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public setGroups() { public async setGroups() {
if(!this.isGroup || !this.groupField || Object.is(this.groupMode, 'NONE')) { if(!this.isGroup || !this.groupField || Object.is(this.groupMode, 'NONE')) {
return; return;
} }
...@@ -629,6 +653,7 @@ draggable, ...@@ -629,6 +653,7 @@ draggable,
if(!group) { if(!group) {
this.groups.push({ this.groups.push({
name: item[this.groupField], name: item[this.groupField],
value: item[this.groupField],
items: this.getGroupItems(item[this.groupField]) items: this.getGroupItems(item[this.groupField])
}) })
} }
...@@ -636,11 +661,13 @@ draggable, ...@@ -636,11 +661,13 @@ draggable,
} }
if(Object.is(this.groupMode, 'CODELIST') && this.groupCodelist) { if(Object.is(this.groupMode, 'CODELIST') && this.groupCodelist) {
this.groups = []; this.groups = [];
let codelist: any = this.$store.getters.getCodeList(this.groupCodelist); let codelistItems: any = await this.codeListService.getDataItems(this.groupCodelist);
if(codelist) { this.allCodeList = Util.deepCopy(codelistItems);
codelist.items.forEach((item: any) => { if(codelistItems && codelistItems.length >0) {
codelistItems.forEach((item: any) => {
this.groups.push({ this.groups.push({
name: item.value, name: item.value,
value: item.value,
items: this.getGroupItems(item.value) items: this.getGroupItems(item.value)
}) })
}) })
...@@ -672,18 +699,18 @@ draggable, ...@@ -672,18 +699,18 @@ draggable,
*/ */
public getGroupText(name: string) { public getGroupText(name: string) {
if(Object.is(this.groupMode, 'CODELIST') && this.groupCodelist) { if(Object.is(this.groupMode, 'CODELIST') && this.groupCodelist) {
let codelist: any = this.$store.getters.getCodeList(this.groupCodelist); if(this.allCodeList && this.allCodeList.length >0) {
if(codelist) {
if(!name) { if(!name) {
return codelist.emptytext; return '未定义';
} }
let item = codelist.items.find((item: any) => Object.is(item.value, name)); let item = this.allCodeList.find((item: any) => Object.is(item.value, name));
if(item) { if(item) {
return item.text; return item.text;
} }
} }
}else{
return name;
} }
return name;
} }
/** /**
...@@ -731,6 +758,24 @@ draggable, ...@@ -731,6 +758,24 @@ draggable,
this.$emit('selectionchange', this.selections); this.$emit('selectionchange', this.selections);
} }
/**
* 点击时触发看板的展开和收起
*
* @param group 分组看板
* @param index 分组看板编号
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onClick(group: any,index: number){
group.folding = !group.folding;
let kanban: any = this.$el.getElementsByClassName('dataview-group-kanban')[index];
if(group.folding){
kanban.style.display="none";
}else{
kanban.style.display="block";
}
this.$forceUpdate();
}
/** /**
* 界面行为 * 界面行为
* *
...@@ -752,6 +797,17 @@ draggable, ...@@ -752,6 +797,17 @@ draggable,
</#if> </#if>
} }
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
/** /**
* 拖拽变化 * 拖拽变化
* *
......
...@@ -2,6 +2,24 @@ ...@@ -2,6 +2,24 @@
height: 100%; height: 100%;
display: flex; display: flex;
overflow: auto; overflow: auto;
.dataview-group-folading-kanban{
border: 1px solid #ddd;
text-align: center;
border-left: 0;
height: 100%;
width: 40px;
background-color: #d8d8d8;
color: #a5a5a5;
.dataview-group-icon{
padding: 6px 0;
}
.dataview-group-folding{
height: calc(100% - 39px);
writing-mode: tb;
width: 31px;
font-size: 17px;
}
}
.dataview-group-content { .dataview-group-content {
border: 1px solid #ddd; border: 1px solid #ddd;
border-left: 0; border-left: 0;
......
...@@ -40,6 +40,14 @@ import { Environment } from '@/environments/environment'; ...@@ -40,6 +40,14 @@ import { Environment } from '@/environments/environment';
*/ */
public formKeyItemName: string = '<#list ctrl.getPSDEFormItems() as formitem><#if formitem.getPSAppDEField?? && formitem.getPSAppDEField()??><#if !formitem.isHidden() && formitem.getPSAppDEField().isKeyField()>${formitem.getName()}</#if></#if></#list>'; public formKeyItemName: string = '<#list ctrl.getPSDEFormItems() as formitem><#if formitem.getPSAppDEField?? && formitem.getPSAppDEField()??><#if !formitem.isHidden() && formitem.getPSAppDEField().isKeyField()>${formitem.getName()}</#if></#if></#list>';
/**
* 是否自动加载
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
@Prop({default:false}) public isautoload?:boolean;
/** /**
* 界面UI服务对象 * 界面UI服务对象
* *
...@@ -440,34 +448,40 @@ import { Environment } from '@/environments/environment'; ...@@ -440,34 +448,40 @@ import { Environment } from '@/environments/environment';
startOp(true); startOp(true);
return falg; return falg;
} }
// 常规规则 try {
if(item.type == 'SIMPLE'){ // 常规规则
startOp(!this.$verify.checkFieldSimpleRule(dataValue,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.data,item.isKeyCond)); if(item.type == 'SIMPLE'){
falg.infoMessage = item.ruleInfo; startOp(!this.$verify.checkFieldSimpleRule(dataValue,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.data,item.isKeyCond));
if(!falg.isPast) return falg; falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 数值范围 }
if(item.type == 'VALUERANGE2'){ // 数值范围
startOp( !this.$verify.checkFieldValueRangeRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond)); if(item.type == 'VALUERANGE2'){
falg.infoMessage = item.ruleInfo; startOp( !this.$verify.checkFieldValueRangeRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond));
if(!falg.isPast) return falg; falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 正则式 }
if (item.type == "REGEX") { // 正则式
startOp(!this.$verify.checkFieldRegExRule(dataValue,item.regExCode,item.ruleInfo,item.isKeyCond)); if (item.type == "REGEX") {
falg.infoMessage = item.ruleInfo; startOp(!this.$verify.checkFieldRegExRule(dataValue,item.regExCode,item.ruleInfo,item.isKeyCond));
if(!falg.isPast) return falg; falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 长度 }
if (item.type == "STRINGLENGTH") { // 长度
startOp(!this.$verify.checkFieldStringLengthRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond)); if (item.type == "STRINGLENGTH") {
falg.infoMessage = item.ruleInfo; startOp(!this.$verify.checkFieldStringLengthRule(dataValue,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond));
if(!falg.isPast) return falg; falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 系统值规则 }
if(item.type == "SYSVALUERULE") { // 系统值规则
startOp(!this.$verify.checkFieldSysValueRule(dataValue,item.sysRule.regExCode,item.ruleInfo,item.isKeyCond)); if(item.type == "SYSVALUERULE") {
startOp(!this.$verify.checkFieldSysValueRule(dataValue,item.sysRule.regExCode,item.ruleInfo,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
} catch(error) {
falg.infoMessage = item.ruleInfo; falg.infoMessage = item.ruleInfo;
startOp(false);
if(!falg.isPast) return falg; if(!falg.isPast) return falg;
} }
// 分组 // 分组
...@@ -482,7 +496,7 @@ import { Environment } from '@/environments/environment'; ...@@ -482,7 +496,7 @@ import { Environment } from '@/environments/environment';
if(!falg.hasOwnProperty("isPast")){ if(!falg.hasOwnProperty("isPast")){
falg.isPast = true; falg.isPast = true;
} }
if(!this.data[name]){ if(!this.data[name] && this.data[name] != 0){
falg.isPast = true; falg.isPast = true;
} }
return falg; return falg;
...@@ -995,6 +1009,9 @@ import { Environment } from '@/environments/environment'; ...@@ -995,6 +1009,9 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
if(this.isautoload){
this.autoLoad({srfkey:this.context.documentcenter});
}
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -1952,6 +1969,17 @@ import { Environment } from '@/environments/environment'; ...@@ -1952,6 +1969,17 @@ import { Environment } from '@/environments/environment';
</#if> </#if>
</#if> </#if>
/**
* 面板数据变化处理事件
* @param {any} item 当前列数据
* @param {any} $event 面板事件数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onPanelDataChange(item:any,$event:any) {
Object.assign(item, $event, {rowDataState:'update'});
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
......
...@@ -26,7 +26,7 @@ ${ctrl.render.code} ...@@ -26,7 +26,7 @@ ${ctrl.render.code}
:cell-class-name="getCellClassName" :cell-class-name="getCellClassName"
<#if ctrl.isEnableGroup()> <#if ctrl.isEnableGroup()>
:span-method="arraySpanMethod" :span-method="arraySpanMethod"
:tree-props="{children: 'children', hasChildren: 'children.length>0'}" :tree-props="{children: 'children', hasChildren: 'children?true:false'}"
row-key="groupById" row-key="groupById"
</#if> </#if>
<#if ctrl.isEnablePagingBar()> <#if ctrl.isEnablePagingBar()>
...@@ -346,7 +346,7 @@ ${gridColumn.getName()} ...@@ -346,7 +346,7 @@ ${gridColumn.getName()}
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public minorSortPSDEF: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>'; public minorSortPSDEF: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getName()?lower_case}</#if>';
/** /**
* 分页条数 * 分页条数
...@@ -609,6 +609,22 @@ ${gridColumn.getName()} ...@@ -609,6 +609,22 @@ ${gridColumn.getName()}
*/ */
public groupAppField:string ="<#if ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>"; public groupAppField:string ="<#if ctrl.getGroupPSDEField()??>${ctrl.getGroupPSDEField().getCodeName()?lower_case}</#if>";
/**
* 分组属性代码表标识
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupAppFieldCodelistTag:string ="<#if ctrl.getGroupPSDEField()?? && ctrl.getGroupPSDEField().getPSCodeList?? && ctrl.getGroupPSDEField().getPSCodeList()??>${ctrl.getGroupPSDEField().getPSCodeList().getCodeName()}</#if>";
/**
* 分组属性代码表类型
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public groupAppFieldCodelistType: string = "<#if ctrl.getGroupPSDEField()?? && ctrl.getGroupPSDEField().getPSCodeList?? && ctrl.getGroupPSDEField().getPSCodeList()??>${ctrl.getGroupPSDEField().getPSCodeList().getCodeListType()}</#if>";
/** /**
* 分组模式 * 分组模式
* *
...@@ -617,6 +633,22 @@ ${gridColumn.getName()} ...@@ -617,6 +633,22 @@ ${gridColumn.getName()}
*/ */
public groupMode:string ="<#if ctrl.getGroupMode()??>${ctrl.getGroupMode()}</#if>"; public groupMode:string ="<#if ctrl.getGroupMode()??>${ctrl.getGroupMode()}</#if>";
/**
* 分组代码表标识
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codelistTag: string = "<#if ctrl.getGroupPSCodeList?? && ctrl.getGroupPSCodeList()??>${ctrl.getGroupPSCodeList().getCodeName()}</#if>";
/**
* 分组代码表类型
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public codelistType: string = "<#if ctrl.getGroupPSCodeList?? && ctrl.getGroupPSCodeList()??>${ctrl.getGroupPSCodeList().getCodeListType()}</#if>";
/** /**
* 获取界面行为权限状态 * 获取界面行为权限状态
* *
...@@ -837,7 +869,7 @@ ${gridColumn.getName()} ...@@ -837,7 +869,7 @@ ${gridColumn.getName()}
this.getAggData(); this.getAggData();
</#if> </#if>
<#if ctrl.isEnableGroup()> <#if ctrl.isEnableGroup()>
this.drawGroup(); this.group();
</#if> </#if>
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
...@@ -913,7 +945,6 @@ ${gridColumn.getName()} ...@@ -913,7 +945,6 @@ ${gridColumn.getName()}
this.$Notice.success({ title: '', desc: (this.$t('app.gridpage.delSuccess') as string) }); this.$Notice.success({ title: '', desc: (this.$t('app.gridpage.delSuccess') as string) });
} }
//删除items中已删除的项 //删除items中已删除的项
console.log(this.items);
_datas.forEach((data: any) => { _datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{ this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){ if(Object.is(item.srfkey,data.srfkey)){
...@@ -1380,7 +1411,7 @@ ${gridColumn.getName()} ...@@ -1380,7 +1411,7 @@ ${gridColumn.getName()}
*/ */
public rowDBLClick($event: any): void { public rowDBLClick($event: any): void {
// 分组行跳过 // 分组行跳过
if($event && $event.children && $event.children.length >0){ if($event && $event.children){
return; return;
} }
if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) { if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) {
...@@ -1406,7 +1437,7 @@ ${gridColumn.getName()} ...@@ -1406,7 +1437,7 @@ ${gridColumn.getName()}
*/ */
public arraySpanMethod({row, column, rowIndex, columnIndex} : any) { public arraySpanMethod({row, column, rowIndex, columnIndex} : any) {
let allColumns:Array<any> = [<#if ctrl.getPSDEGridColumns()??><#list ctrl.getPSDEGridColumns() as singleColumn>'${singleColumn.getCodeName()}'<#if singleColumn_has_next>,</#if></#list></#if>]; let allColumns:Array<any> = [<#if ctrl.getPSDEGridColumns()??><#list ctrl.getPSDEGridColumns() as singleColumn>'${singleColumn.getCodeName()}'<#if singleColumn_has_next>,</#if></#list></#if>];
if(row && row.children && row.children.length>0) { if(row && row.children) {
if(columnIndex == (this.isSingleSelect ? 0:1)) { if(columnIndex == (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length+1]; return [1, allColumns.length+1];
} else if(columnIndex > (this.isSingleSelect ? 0:1)) { } else if(columnIndex > (this.isSingleSelect ? 0:1)) {
...@@ -1415,6 +1446,160 @@ ${gridColumn.getName()} ...@@ -1415,6 +1446,160 @@ ${gridColumn.getName()}
} }
} }
/**
* 分组方法
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public group(){
if(Object.is(this.groupMode,"AUTO")){
this.drawGroup();
}else if(Object.is(this.groupMode,"CODELIST")){
this.drawCodelistGroup();
}
}
/**
* 获取表格分组相关代码表
*
* @param {string} codelistType 代码表类型
* @param {string} codelistTag 代码表标识
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public getGroupCodelist(codelistType: string,codelistTag:string){
let codelist: Array<any> = [];
// 动态代码表
if (Object.is(codelistType, "DYNAMIC")) {
this.codeListService.getItems(codelistTag).then((res: any)=>{
codelist = res;
}).catch((error: any) => {
});
// 静态代码表
} else if(Object.is(codelistType, "STATIC")){
codelist = this.$store.getters.getCodeListItems(codelistTag);
}
return codelist;
}
/**
* 根据分组代码表绘制分组列表
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public drawCodelistGroup(){
if(!this.isEnableGroup) return;
// 分组
let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
let groupTree:Array<any> = [];
allGroup = this.getGroupCodelist(this.codelistType,this.codelistTag);
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
if(allGroup.length == 0){
console.warn("分组数据无效");
}
allGroup.forEach((group: any,i: number)=>{
let children:Array<any> = [];
this.items.forEach((item: any,j: number)=>{
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group.label,arr[0].label)){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group.label,item[this.groupAppField])){
item.groupById = Number((i+1) * 100 + (j+1) * 1);
item.group = '';
children.push(item);
}
});
const tree: any ={
groupById: Number((i+1)*100),
group: group.label,
<#if ctrl.getPSDEGridColumns()??>
<#list ctrl.getPSDEGridColumns() as singleColumn>
<#if singleColumn.getColumnType()?? && singleColumn.getColumnType() == "UAGRIDCOLUMN">
<#if singleColumn.getPSDEUIActionGroup()?? && singleColumn.getPSDEUIActionGroup().getPSUIActions()??>
<#list singleColumn.getPSDEUIActionGroup().getPSUIActions() as singleUIAction>
${singleUIAction.getCodeName()}:{
visabled: false
},
</#list>
</#if>
<#else>
<#if singleColumn.getColumnType()?? && singleColumn.getColumnType() == "DEFGRIDCOLUMN">
<#if singleColumn.getPSDEUIAction?? && singleColumn.getPSDEUIAction()?? && singleColumn.getPSDEUIAction().getUIActionTag?? && singleColumn.getPSDEUIAction().getUIActionTag()??>
${singleColumn.getPSDEUIAction().getUIActionTag()}:{
visabled: false
},
</#if>
${singleColumn.getCodeName()}:'',
</#if>
</#if>
</#list>
</#if>
children: children
}
groupTree.push(tree);
});
let child:Array<any> = [];
this.items.forEach((item: any,index: number)=>{
let i: number = 0;
if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
i = allGroup.findIndex((group: any)=>Object.is(group.label,arr[0].label));
}else{
i = allGroup.findIndex((group: any)=>Object.is(group.label,item[this.groupAppField]));
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
item.group = '';
child.push(item);
}
if(i < 0){
item.groupById = Number((allGroup.length+1) * 100 + (index+1) * 1);
item.group = '';
child.push(item);
}
})
const Tree: any = {
groupById: Number((allGroup.length+1)*100),
group: this.$t('app.gridpage.other'),
<#if ctrl.getPSDEGridColumns()??>
<#list ctrl.getPSDEGridColumns() as singleColumn>
<#if singleColumn.getColumnType()?? && singleColumn.getColumnType() == "UAGRIDCOLUMN">
<#if singleColumn.getPSDEUIActionGroup()?? && singleColumn.getPSDEUIActionGroup().getPSUIActions()??>
<#list singleColumn.getPSDEUIActionGroup().getPSUIActions() as singleUIAction>
${singleUIAction.getCodeName()}:{
visabled: false
},
</#list>
</#if>
<#else>
<#if singleColumn.getColumnType()?? && singleColumn.getColumnType() == "DEFGRIDCOLUMN">
<#if singleColumn.getPSDEUIAction?? && singleColumn.getPSDEUIAction()?? && singleColumn.getPSDEUIAction().getUIActionTag?? && singleColumn.getPSDEUIAction().getUIActionTag()??>
${singleColumn.getPSDEUIAction().getUIActionTag()}:{
visabled: false
},
</#if>
${singleColumn.getCodeName()}:'',
</#if>
</#if>
</#list>
</#if>
children: child
}
if(child && child.length > 0){
groupTree.push(Tree);
}
this.items = groupTree;
if(this.actualIsOpenEdit) {
for(let i = 0; i < this.items.length; i++) {
this.gridItemsModel.push(this.getGridRowModel());
}
}
}
/** /**
* 绘制分组 * 绘制分组
* *
...@@ -1424,9 +1609,16 @@ ${gridColumn.getName()} ...@@ -1424,9 +1609,16 @@ ${gridColumn.getName()}
if(!this.isEnableGroup) return; if(!this.isEnableGroup) return;
// 分组 // 分组
let allGroup: Array<any> = []; let allGroup: Array<any> = [];
let allGroupField: Array<any> =[];
allGroupField = this.getGroupCodelist(this.groupAppFieldCodelistType,this.groupAppFieldCodelistTag);
this.items.forEach((item: any)=>{ this.items.forEach((item: any)=>{
if(item.hasOwnProperty(this.groupAppField)){ if(item.hasOwnProperty(this.groupAppField)){
allGroup.push(item[this.groupAppField]); if(allGroupField && allGroupField.length > 0){
const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
allGroup.push(arr[0].label);
}else{
allGroup.push(item[this.groupAppField]);
}
} }
}); });
let groupTree:Array<any> = []; let groupTree:Array<any> = [];
...@@ -1438,15 +1630,22 @@ ${gridColumn.getName()} ...@@ -1438,15 +1630,22 @@ ${gridColumn.getName()}
allGroup.forEach((group: any, groupIndex: number)=>{ allGroup.forEach((group: any, groupIndex: number)=>{
let children:Array<any> = []; let children:Array<any> = [];
this.items.forEach((item: any,itemIndex: number)=>{ this.items.forEach((item: any,itemIndex: number)=>{
if(Object.is(group,item[this.groupAppField])){ if(allGroupField && allGroupField.length > 0){
item.groupById = Number((groupIndex+1) * 10 + (itemIndex+1) * 1); const arr:Array<any> = allGroupField.filter((field:any)=>{return field.value == item[this.groupAppField]});
if(Object.is(group,arr[0].label)){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = '';
children.push(item);
}
}else if(Object.is(group,item[this.groupAppField])){
item.groupById = Number((groupIndex+1) * 100 + (itemIndex+1) * 1);
item.group = ''; item.group = '';
children.push(item); children.push(item);
} }
}); });
group = group ? group : this.$t('app.gridpage.other'); group = group ? group : this.$t('app.gridpage.other');
const tree: any ={ const tree: any ={
groupById: Number((groupIndex+1)*10), groupById: Number((groupIndex+1)*100),
group: group, group: group,
<#if ctrl.getPSDEGridColumns()??> <#if ctrl.getPSDEGridColumns()??>
<#list ctrl.getPSDEGridColumns() as singleColumn> <#list ctrl.getPSDEGridColumns() as singleColumn>
...@@ -1459,8 +1658,15 @@ ${gridColumn.getName()} ...@@ -1459,8 +1658,15 @@ ${gridColumn.getName()}
</#list> </#list>
</#if> </#if>
<#else> <#else>
<#if singleColumn.getColumnType()?? && singleColumn.getColumnType() == "DEFGRIDCOLUMN">
<#if singleColumn.getPSDEUIAction?? && singleColumn.getPSDEUIAction()?? && singleColumn.getPSDEUIAction().getUIActionTag?? && singleColumn.getPSDEUIAction().getUIActionTag()??>
${singleColumn.getPSDEUIAction().getUIActionTag()}:{
visabled: false
},
</#if>
${singleColumn.getCodeName()}:'', ${singleColumn.getCodeName()}:'',
</#if> </#if>
</#if>
</#list> </#list>
</#if> </#if>
children: children, children: children,
...@@ -1582,7 +1788,7 @@ ${gridColumn.getName()} ...@@ -1582,7 +1788,7 @@ ${gridColumn.getName()}
let flag: boolean = true; let flag: boolean = true;
if(selection && selection.length === this.items.length) { if(selection && selection.length === this.items.length) {
selection.forEach((element: any) => { selection.forEach((element: any) => {
if(element.children && element.children.length > 0) { if(element.children) {
this.toggleSelection(element.children, flag); this.toggleSelection(element.children, flag);
element.children.forEach((children: any) => { element.children.forEach((children: any) => {
this.selections.push(children); this.selections.push(children);
...@@ -1616,7 +1822,7 @@ ${gridColumn.getName()} ...@@ -1616,7 +1822,7 @@ ${gridColumn.getName()}
*/ */
public rowClick($event: any, ifAlways: boolean = false): void { public rowClick($event: any, ifAlways: boolean = false): void {
// 分组行跳过 // 分组行跳过
if($event && $event.children && $event.children.length >0){ if($event && $event.children){
return; return;
} }
if (!ifAlways && (!$event || this.actualIsOpenEdit)) { if (!ifAlways && (!$event || this.actualIsOpenEdit)) {
...@@ -2021,7 +2227,7 @@ ${gridColumn.getName()} ...@@ -2021,7 +2227,7 @@ ${gridColumn.getName()}
} }
this.$emit('save', successItems); this.$emit('save', successItems);
this.refresh([]); this.refresh([]);
if(errorItems.length === 0 && successItems.length >0 && !this.isformDruipart){ if(errorItems.length === 0 && successItems.length > 0){
this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{ }else{
errorItems.forEach((item: any, index: number) => { errorItems.forEach((item: any, index: number) => {
...@@ -2154,7 +2360,7 @@ ${gridColumn.getName()} ...@@ -2154,7 +2360,7 @@ ${gridColumn.getName()}
public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){ public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){
row.rowDataState = row.rowDataState ? row.rowDataState : "update" ; row.rowDataState = row.rowDataState ? row.rowDataState : "update" ;
if(Object.is(row.rowDataState,"update")){ if(Object.is(row.rowDataState,"update")){
if(!value && this.defaultUpdateItems.includes(property)){ if(this.defaultUpdateItems.includes(property)){
row.hasUpdated = true; row.hasUpdated = true;
} }
} }
...@@ -2432,30 +2638,47 @@ ${gridColumn.getName()} ...@@ -2432,30 +2638,47 @@ ${gridColumn.getName()}
falg.isPast = val; falg.isPast = val;
} }
} }
rule[name].forEach((item:any) => { for(let i=0; i < rule[name].length; i++) {
let item: any = rule[name][i];
if((value === null || value === undefined || value === "") && (item.type != 'GROUP')){ if((value === null || value === undefined || value === "") && (item.type != 'GROUP')){
startOp(true); startOp(true);
return falg; return falg;
} }
// 常规规则 try {
if(item.type == 'SIMPLE'){ // 常规规则
startOp(!this.$verify.checkFieldSimpleRule(value,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.curEditRowData,item.isKeyCond)); if(item.type == 'SIMPLE'){
} startOp(!this.$verify.checkFieldSimpleRule(value,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.curEditRowData,item.isKeyCond));
// 数值范围 falg.infoMessage = item.ruleInfo;
if(item.type == 'VALUERANGE2'){ if(!falg.isPast) return falg;
startOp( !this.$verify.checkFieldValueRangeRule(value,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond)); }
} // 数值范围
// 正则式 if(item.type == 'VALUERANGE2'){
if (item.type == "REGEX") { startOp( !this.$verify.checkFieldValueRangeRule(value,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond));
startOp(!this.$verify.checkFieldRegExRule(value,item.regExCode,item.ruleInfo,item.isKeyCond)); falg.infoMessage = item.ruleInfo;
} if(!falg.isPast) return falg;
// 长度 }
if (item.type == "STRINGLENGTH") { // 正则式
startOp(!this.$verify.checkFieldStringLengthRule(value,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond)); if (item.type == "REGEX") {
} startOp(!this.$verify.checkFieldRegExRule(value,item.regExCode,item.ruleInfo,item.isKeyCond));
// 系统值规则 falg.infoMessage = item.ruleInfo;
if(item.type == "SYSVALUERULE") { if(!falg.isPast) return falg;
startOp(!this.$verify.checkFieldSysValueRule(value,item.sysRule.regExCode,item.ruleInfo,item.isKeyCond)); }
// 长度
if (item.type == "STRINGLENGTH") {
startOp(!this.$verify.checkFieldStringLengthRule(value,item.minValue,item.isIncludeMinValue,item.maxValue,item.isIncludeMaxValue,item.ruleInfo,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
// 系统值规则
if(item.type == "SYSVALUERULE") {
startOp(!this.$verify.checkFieldSysValueRule(value,item.sysRule.regExCode,item.ruleInfo,item.isKeyCond));
falg.infoMessage = item.ruleInfo;
if(!falg.isPast) return falg;
}
} catch(error) {
falg.infoMessage = item.ruleInfo;
startOp(false);
if(!falg.isPast) return falg;
} }
// 分组 // 分组
if(item.type == 'GROUP'){ if(item.type == 'GROUP'){
...@@ -2465,11 +2688,11 @@ ${gridColumn.getName()} ...@@ -2465,11 +2688,11 @@ ${gridColumn.getName()}
} }
} }
}); };
if(!falg.hasOwnProperty("isPast")){ if(!falg.hasOwnProperty("isPast")){
falg.isPast = true; falg.isPast = true;
} }
if(!value){ if(!value && value != 0){
falg.isPast = true; falg.isPast = true;
} }
return falg; return falg;
......
<#-- BEGIN:获取父关系路由参数 -->
<#macro getDeResParameters currentView>
<#if currentView.isPSDEView()>
[
<#if currentView.getPSAppDERSPathCount() gt 0>
<#list currentView.getPSAppDERSPath(currentView.getPSAppDERSPathCount() - 1) as deRSPath>
<#assign majorPSAppDataEntity = deRSPath.getMajorPSAppDataEntity()/>
{ pathName: '${srfpluralize(majorPSAppDataEntity.codeName)?lower_case}', parameterName: '${majorPSAppDataEntity.getCodeName()?lower_case}' },
</#list>
</#if>
]
<#else>
[]
</#if>
</#macro>
<#-- END:获取父关系路由参数 -->
<#-- BEGIN:获取视图本身路由参数 -->
<#macro getParameters currentView>
[
<#if currentView.isPSDEView()>
<#assign appDataEntity = currentView.getPSAppDataEntity()/>
{ pathName: '${srfpluralize(appDataEntity.codeName)?lower_case}', parameterName: '${appDataEntity.getCodeName()?lower_case}' },
{ pathName: '${currentView.getPSDEViewCodeName()?lower_case}', parameterName: '${currentView.getPSDEViewCodeName()?lower_case}' }
<#else>
{ pathName: '${currentView.getCodeName()?lower_case}', parameterName: '${currentView.getCodeName()?lower_case}' }
</#if>
]
</#macro>
<#-- END:获取视图本身路由参数 -->
<#-- BEGIN:插入空格 -->
<#macro insertBlank num>
<#assign blank_space = " " />
<#list 1..num as i>
${blank_space}<#t>
</#list>
</#macro>
<#-- END:插入空格 -->
<#-- BEGIN:表格列标题自定义绘制 -->
<#macro getColumnHeader item blankNum>
<@insertBlank blankNum /><template v-slot:header="{column}">
<@insertBlank blankNum /> <span class="column-header <#if item.getHeaderPSSysCss?? && item.getHeaderPSSysCss()??>${item.getHeaderPSSysCss().getCssName()}</#if>">
<#if item.getPSSysImage?? && item.getPSSysImage()??>
<#assign img=item.getPSSysImage()>
<@insertBlank blankNum /> <i class='<#if img.getCssClass?? && img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if>'></i>
</#if>
<@insertBlank blankNum /> {{<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>}}
<@insertBlank blankNum /> </span>
<@insertBlank blankNum /></template>
</#macro>
<#-- END:表格列标题自定义绘制 -->
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<template v-if="getColumnState('${item.getName()?lower_case}')">
<#if item.getColumnType() == 'GROUPGRIDCOLUMN' && item.getPSDEGridColumns()??>
<#-- [1]BEGIN:分组列 -->
<el-table-column show-overflow-tooltip :align="'${item.getAlign()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>">
<@getColumnHeader item 4 />
<#list item.getPSDEGridColumns() as column>
${P.getPartCode(column,'COLUMN').code}
</#list>
</el-table-column>
<#-- [1]END:分组列 -->
<#elseif item.getColumnType() == 'UAGRIDCOLUMN'>
<#-- [2]BEGIN:操作列 -->
<el-table-column :column-key="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'">
<@getColumnHeader item 8 />
<template slot-scope="scope">
<div style="text-align: center;">
<#if item.getPSDEUIActionGroup().getPSDEUIActions()??>
<#list item.getPSDEUIActionGroup().getPSUIActionGroupDetails() as uiactionDetail>
<#if uiactionDetail.getPSUIAction?? && uiactionDetail.getPSUIAction()??>
<#assign uiaction = uiactionDetail.getPSUIAction() />
<#-- 取消分割线标签,使用样式替代分割线 start -->
<#-- @author ljy -->
<#-- @update 2020.7.21 -->
<#-- <#if preUIAction??>
<divider type='vertical' v-show="scope.row.${preUIAction.getUIActionTag()}.visible && scope.row.${uiaction.getUIActionTag()}.visible" ></divider>
</#if> -->
<#if !uiactionDetail.isShowCaption()>
<tooltip :transfer="true" :max-width="600">
</#if>
<a v-show="scope.row.${uiaction.getUIActionTag()}.visible" <#if !preUIAction??>:class="{'grid-first-uiaction':scope.row.${uiaction.getUIActionTag()}.visible && scope.row.${uiaction.getUIActionTag()}.visible}"</#if> <#if preUIAction??>:class="{'grid-uiaction-divider':scope.row.${preUIAction.getUIActionTag()}.visible && scope.row.${uiaction.getUIActionTag()}.visible}"</#if> :style="{'pointer-events':scope.row.${uiaction.getUIActionTag()}.disabled?'none':'auto'}" @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)">
<#-- 取消分割线标签,使用样式替代分割线 end -->
<#if uiactionDetail.isShowIcon()><i class='<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>'></i></#if>
<#if uiactionDetail.isShowCaption()>{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getFullCodeName()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</#if>
</a>
<#if !uiactionDetail.isShowCaption()>
<div slot='content'>{{<#if langbase??>$t('${langbase}.uiactions.<#if uiaction.getPSAppDataEntity?? && uiaction.getPSAppDataEntity()??>${uiaction.getPSAppDataEntity().getCodeName()?lower_case}_</#if>${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</div>
</tooltip>
</#if>
<#assign preUIAction = uiaction />
</#if>
</#list>
</#if>
</div>
</template>
</el-table-column>
<#-- [2]END:操作列 -->
<#elseif item.getColumnType() == 'DEFGRIDCOLUMN'>
<#-- [3]BEGIN:数据列 -->
<el-table-column show-overflow-tooltip :prop="'${item.getName()?lower_case}'" :label="<#if langbase??>$t('${langbase}.columns.${item.getName()?lower_case}')<#else>'${item.getCaption()}'</#if>"<#if item.getWidthUnit()!='STAR'> :width="${item.width?c}" <#else> :min-width="${item.width?c}" </#if> :align="'${item.getAlign()?lower_case}'"<#if (!ctrl.isNoSort()) && item.isEnableSort()> :sortable="'custom'"</#if>>
<@getColumnHeader item 8 />
<template v-slot="{row,column,$index}">
<#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()>
<#-- BEGIN:列绘制、前端绘制代码表、行编辑 -->
<#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>
<#-- BEGIN:行编辑 -->
<#if (item.render??)>
<#-- BEGIN:列绘制 -->
<span>${item.render.code}</span>
<#-- END:列绘制 -->
<#else>
<template v-if="actualIsOpenEdit">
<app-form-item :error="gridItemsModel[$index][column.property].error">
${P.getEditorCode(item, "GRIDEIDTOR.vue").code}
</app-form-item>
</template>
</#if>
<#-- END:行编辑 -->
</#if>
<template <#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>v-if="!actualIsOpenEdit"</#if>>
<#if item.getPSDEUIAction?? && item.getPSDEUIAction()??>
<a @click="uiAction(row, '${item.getPSDEUIAction().getUIActionTag()}', $event)">
</#if>
<#if (item.render??)>
<#-- BEGIN:列绘制 -->
<span>${item.render.code}</span>
<#-- END:列绘制 -->
<#elseif (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT')>
<#-- BEGIN:前端绘制代码表 -->
<#assign codelist = item.getPSCodeList()>
<#if codelist.getCodeListType() == 'STATIC' || codelist.getCodeListType() == 'DYNAMIC'>
<codelist <#t>
:value="row.${item.getName()?lower_case}" <#t>
<#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>><#t>
</codelist><#lt>
</#if>
<#-- END:前端绘制代码表 -->
<#else>
<#if item.isEnableLinkView()>
<#-- 支持链接视图-->
<#if item.getLinkPSAppView()??>
<#assign dataview = item.getLinkPSAppView() />
<#assign appLinkView>
viewname: '${srffilepath2(dataview.getCodeName())}', height: ${dataview.getHeight()?c},width: ${dataview.getWidth()?c},title: <@getViewLanguageTitle dataview />,placement: '${dataview.getOpenMode()}', isRedirectView: <#if dataview.isRedirectView()>true<#else>false</#if>,deResParameters: <@getDeResParameters dataview />,parameters: <@getParameters dataview />
</#assign>
</#if>
<app-column-link
deKeyField='<#if dataview.isPSDEView()>${dataview.getPSAppDataEntity().getCodeName()?lower_case}</#if>'
:context="JSON.parse(JSON.stringify(context))"
:viewparams="JSON.parse(JSON.stringify(viewparams))"
:data="row"
:linkview="{<#compress><#if appLinkView??>${appLinkView}</#if></#compress>}"
valueitem="<#if item.getLinkValueItem()??>${item.getLinkValueItem()}</#if>">
<#-- BEGIN:常规显示 -->
<#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??>
<app-span name='${item.name}' editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :value="row.${item.getName()?lower_case}"></app-span>
<#else>
<span>{{row.${item.getName()?lower_case}}}</span>
</#if>
</app-column-link>
<#else>
<#if item.getPSDEGridEditItem()?? && item.getPSDEGridEditItem().getPSEditorType?? && item.getPSDEGridEditItem().getPSEditorType()??>
<app-span name='${item.name}' editorType="${item.getPSDEGridEditItem().getPSEditorType().getStandardPSEditorType()}" :value="row.${item.getName()?lower_case}" <#t>
<#if item.getPSDEField().getDataType()!="">
dataType="${item.getPSDEField().getDataType()}" <#t>
</#if>
<#if item.getPSDEField().getPrecision()??>
precision="${item.getPSDEField().getPrecision()}" <#t></#if>></app-span>
<#else>
<#if item.getValueFormat()?? && item.getValueFormat() != "%1$s">
<app-format-data format="${item.getValueFormat()}" :data="row.${item.getName()?lower_case}"></app-format-data>
<#elseif item.getPSDEField?? && item.getPSDEField()?? && (item.getPSDEField().getDataType() == "DECIMAL" || item.getPSDEField().getDataType() == "FLOAT" || item.getPSDEField().getDataType() == "CURRENCY")>
<app-format-data dataType="${item.getPSDEField().getDataType()}" precision="${item.getPSDEField().getPrecision()}" :data="row.${item.getName()?lower_case}"></app-format-data>
<#else>
<span>{{row.${item.getName()?lower_case}}}</span>
</#if>
</#if>
</#if>
<#-- END:常规显示 -->
</#if>
<#if item.getPSDEUIAction?? && item.getPSDEUIAction()??>
</a>
</#if>
</template>
<#-- END:列绘制、前端绘制代码表、行编辑 -->
<#else>
<#if item.isEnableLinkView()>
<#-- 支持链接视图-->
<#if item.getLinkPSAppView()??>
<#assign dataview = item.getLinkPSAppView() />
<#assign appLinkView>
viewname: '${srffilepath2(dataview.getCodeName())}', height: ${dataview.getHeight()?c},width: ${dataview.getWidth()?c},title: <@getViewLanguageTitle dataview />,placement: '${dataview.getOpenMode()}', isRedirectView: <#if dataview.isRedirectView()>true<#else>false</#if>,deResParameters: <@getDeResParameters dataview />,parameters: <@getParameters dataview />
</#assign>
</#if>
<app-column-link deKeyField='<#if dataview.isPSDEView()>${dataview.getPSAppDataEntity().getCodeName()?lower_case}</#if>' :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))" :data="row" :linkview="{<#compress><#if appLinkView??>${appLinkView}</#if></#compress>}" valueitem="<#if item.getLinkValueItem()??>${item.getLinkValueItem()}</#if>">
<span>{{row.${item.getName()?lower_case}}}</span>
</app-column-link >
<#else>
<#if item.getPSDEUIAction?? && item.getPSDEUIAction()??>
<a @click="uiAction(row, '${item.getPSDEUIAction().getUIActionTag()}', $event)">
</#if>
<#if item.getValueFormat()?? && item.getValueFormat() != "%1$s">
<app-format-data format="${item.getValueFormat()}" :data="row.${item.getName()?lower_case}"></app-format-data>
<#elseif item.getPSDEField?? && item.getPSDEField()?? && (item.getPSDEField().getDataType() == "DECIMAL" || item.getPSDEField().getDataType() == "FLOAT" || item.getPSDEField().getDataType() == "CURRENCY")>
<app-format-data dataType="${item.getPSDEField().getDataType()}" precision="${item.getPSDEField().getPrecision()}" :data="row.${item.getName()?lower_case}"></app-format-data>
<#else>
<span>{{row.${item.getName()?lower_case}}}</span>
</#if>
<#if item.getPSDEUIAction?? && item.getPSDEUIAction()??>
</a>
</#if>
</#if>
</#if>
</template>
</el-table-column>
<#-- [3]END:数据列 -->
</#if>
</template>
<#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude>
<template>
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
<#if ctrl.render?? || ctrl.getRender()??>
${ctrl.render.code}
<#else>
<i-form>
<div :style="{ height: isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%', overflow: 'auto' }">
<app-vue-pivottable :datas="items" :allColumns="allColumns"></app-vue-pivottable>
</div>
<#if ctrl.isEnablePagingBar()>
<row class='grid-pagination' v-show="items.length > 0">
<page class='pull-right' @on-change="pageOnChange($event)"
@on-page-size-change="onPageSizeChange($event)"
:transfer="true" :total="totalrow"
show-sizer :current="curPage" :page-size="limit"
:page-size-opts="[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]" show-elevator show-total>
<span>
<span class="page-column">
<poptip transfer placement="top-start">
<i-button icon="md-menu">{{$t('app.gridpage.choicecolumns')}}</i-button>
<div slot="content">
<template v-for="col in allColumns">
<div :key="col.name"><el-checkbox v-model="col.show" @change="onColChange()">{{$t(col.langtag)}}</el-checkbox></div>
</template>
</div>
</poptip>
</span>
<span v-if="selections.length > 0" class="batch-toolbar">
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
<@ibizindent blank=12>
${P.getCtrlCode(batchToolbar, 'CONTROL.html').code}
</@ibizindent>
</#if>
</span>
<span class="page-button"><i-button icon="md-refresh" :title="$t('app.gridpage.refresh')" @click="pageRefresh()"></i-button></span>&nbsp;
<span>
{{$t('app.gridpage.show')}}&nbsp;
<span>
<template v-if="items.length === 1">
1
</template>
<template v-else>
<span>{{(curPage - 1) * limit + 1}}&nbsp;-&nbsp;{{totalrow > curPage * limit ? curPage * limit : totalrow}}</span>
</template>
</span>&nbsp;
{{$t('app.gridpage.records')}},{{$t('app.gridpage.totle')}}&nbsp;{{totalrow}}&nbsp;{{$t('app.gridpage.records')}}
</span>
</span>
</page>
</row>
</#if>
</#if>
</i-form>
</div>
</template>
<#assign import_block>
import CodeListService from "@/codelist/codelist-service";
import { FormItemModel } from '@/model/form-detail';
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public codeListService:CodeListService = new CodeListService({ $store: this.$store });
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getData(): any {
return this.selections[0];
}
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getPFLogicCodeType() == 'APP_NEWDATA'>
/**
* 打开新建数据视图
*
* @type {any}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public newdata: any;
</#if>
<#if logic.getPFLogicCodeType() == 'APP_OPENDATA'>
/**
* 打开编辑数据视图
*
* @type {any}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public opendata: any;
</#if>
</#list>
</#if>
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--update
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public updateAction!: string;
/**
* 部件行为--fetch
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public fetchAction!: string;
/**
* 部件行为--remove
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public removeAction!: string;
/**
* 部件行为--load
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public loadAction!: string;
/**
* 部件行为--loaddraft
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public loaddraftAction!: string;
/**
* 部件行为--create
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public createAction!: string;
/**
* 当前页
*
* @type {number}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public curPage: number = 1;
/**
* 数据
*
* @type {any[]}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public items: any[] = [];
/**
* 是否支持分页
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public isEnablePagingBar: boolean = ${ctrl.isEnablePagingBar()?c};
/**
* 是否禁用排序
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public isNoSort: boolean = ${ctrl.isNoSort()?c};
/**
* 排序方向
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public minorSortDir: string = '<#if ctrl.getMinorSortDir()??>${ctrl.getMinorSortDir()}</#if>';
/**
* 排序字段
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public minorSortPSDEF: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>';
/**
* 分页条数
*
* @type {number}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public limit: number = ${ctrl.getPagingSize()?c};
/**
* 是否显示标题
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public isHideHeader: boolean = ${ctrl.isHideHeader()?c};
/**
* 是否默认选中第一条数据
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop({ default: false }) public isSelectFirstDefault!: boolean;
/**
* 是否单选
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public isSingleSelect?: boolean;
/**
* 选中数据字符串
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop() public selectedData?: string;
/**
* 动态代码表集合
*
* @type {*}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public dCodeList: any = {};
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Watch('selectedData')
public onValueChange(newVal: any, oldVal: any) {
this.selections = [];
if(this.selectedData){
const refs: any = this.$refs;
if (refs.multipleTable) {
refs.multipleTable.clearSelection();
JSON.parse(this.selectedData).forEach((selection:any)=>{
let selectedItem = this.items.find((item:any)=>{
return Object.is(item.srfkey, selection.srfkey);
});
if(selectedItem){
this.rowClick(selectedItem);
}
});
}
}
}
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop({default: 2}) public gridRowActiveMode!: number;
/**
* 是否开启行编辑
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
@Prop({default: false}) public isOpenEdit!: boolean;
/**
* 实际是否开启行编辑
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public actualIsOpenEdit: boolean = this.isOpenEdit;
/**
* 总条数
*
* @type {number}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public totalrow: number = 0;
/**
* 选中行数据
*
* @type {any[]}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public selections: any[] = [];
/**
* 拦截行选中
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public stopRowClick: boolean = false;
<#if ctrl.getAggMode() == "ALL">
/**
* 表格聚合行为
*
* @type {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public aggAction:string ='<#if ctrl.getAggPSDEAction()??>${ctrl.getAggPSDEAction().getCodeName()}</#if>';
/**
* 远程数据
*
* @type {any}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public remoteData:any = {};
</#if>
<#if ctrl.getQuickPSDEToolbar?? && ctrl.getQuickPSDEToolbar()??>
<#assign quickToolbar = ctrl.getQuickPSDEToolbar()/>
${P.getCtrlCode(quickToolbar, 'CONTROL.vue').code}
</#if>
<#if ctrl.getBatchPSDEToolbar?? && ctrl.getBatchPSDEToolbar()??>
<#assign batchToolbar = ctrl.getBatchPSDEToolbar()/>
${P.getCtrlCode(batchToolbar, 'CONTROL.vue').code}
</#if>
/**
* 表格是否显示
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public isDisplay:boolean = <#if ctrl.getAggMode() == "ALL">false<#else>true</#if>;
/**
* 部件刷新
*
* @param {any[]} args
* @memberof ${srfclassname(ctrl.codeName)}
*/
public refresh(args: any[]): void {
this.load();
}
/**
* 选项框列宽
*
* @type {number}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH', 35)}<#else>35</#if>;
/**
* 是否允许拖动列宽
*
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public isDragendCol: boolean = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.ISDRAGENDCOL',false)?c}<#else>false</#if>;
<#-- public isDragendCol: boolean = true; -->
/**
* 所有列成员
*
* @type {any[]}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public allColumns: any[] = [
<#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as column>
{
name: '${column.getName()?lower_case}',
label: '${column.getCaption()}',
langtag: '<#if langbase??>${langbase}.columns.${column.getName()?lower_case}</#if>',
show: <#if column.isHideDefault()>false<#else>true</#if>,
util: '${column.getWidthUnit()}',
render: (val: any) => {
return this.renderColValue('${column.getName()?lower_case}', val);
}
},
</#list>
</#if>
]
/**
* 表格模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public gridItemsModel: any[] = [];
/**
* 绘制列值
*
* @type {*}
* @memberof PivotTable
*/
public renderColValue(name: string, value: any) {
<#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as column>
<#if column.render?? || (column.getCodeList()?? && column.getCLConvertMode() == 'FRONT')>
if(Object.is('${column.getName()?lower_case}', name)) {
<#if column.render??>
${item.render.code}
<#elseif column.getCodeList()?? && column.getCLConvertMode() == 'FRONT'>
<#assign codelist = column.getPSCodeList()>
<#if codelist.getCodeListType() == 'STATIC'>
let codelist: any[] = this.$store.getters.getCodeList('${codelist.getCodeName()}');
if(codelist) {
return this.getCodeListItem(codelist, value);
}
<#elseif codelist.getCodeListType() == 'DYNAMIC'>
let items = this.dCodeList['${codelist.getCodeName()}'];
if(items) {
for(let i = 0; i < items.length; i++) {
if(Object.is(items[i].value, value)) {
return items[i].text;
}
}
}
</#if>
</#if>
}
</#if>
</#list>
</#if>
return value;
}
/**
* 获取代码项
*
* @public
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getCodeListItem(codelist: any, val: any) {
for(let i = 0; i < codelist.items.length; i++) {
if(Object.is(codelist.items[i].value, val)) {
return codelist.items[i].text;
}
}
return codelist.emptytext;
}
/**
* 准备动态代码表数据集合
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public async readyDCodelist() {
<#assign num = 0>
let keys: string[] = [
<#if ctrl.getAllPSDEGridColumns()??>
<#list ctrl.getAllPSDEGridColumns() as column>
<#if column.getCodeList()?? && column.getCLConvertMode() == 'FRONT'>
<#assign codelist = column.getPSCodeList()>
<#if codelist.getCodeListType() == 'DYNAMIC'>
<#if num gt 0>,</#if>'${codelist.getCodeName()}'<#assign num = num + 1>
</#if>
</#if>
</#list>
</#if>
];
for (let key of keys) {
let items = await this.codeListService.getItems('UserRealName');
this.dCodeList[key] = items;
}
}
/**
* 获取表格行模型
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getGridRowModel(){
return {
<#list ctrl.getPSDEGridEditItems() as edititem>
${edititem.getName()}: new FormItemModel(),
</#list>
}
}
/**
* 属性值规则
*
* @type {*}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public rules(){
return {
<#list ctrl.getPSDEGridEditItems() as edititem>
${edititem.getName()}: [
{ required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'change' },
{ required: <#if edititem.isAllowEmpty()>false<#else>true</#if>, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: <#if edititem.getCaption?? && edititem.getCaption()??>'${edititem.getCaption()} 值不能为空'<#else>'值不能为空'</#if>, trigger: 'blur' },
<#if ctrl.getPSDEGridEditItemVRs?? && ctrl.getPSDEGridEditItemVRs()??>
<#list ctrl.getPSDEGridEditItemVRs() as fideValueRule>
<#if fideValueRule.getPSDEGridEditItemName() == edititem.getName()>
<#if fideValueRule.getPSSysValueRule()??>
<#assign valueRule = fideValueRule.getPSSysValueRule()/>
<#if valueRule.getRuleType?? && valueRule.getRuleType()??>
<#if valueRule.getRuleType() == "REG">
{ <#if valueRule.getRegExCode?? && valueRule.getRegExCode()??>pattern: /^${valueRule.getRegExCode()}$/</#if><#if valueRule.getRuleInfo?? && valueRule.getRuleInfo()??>, message: '${valueRule.getRuleInfo()}'</#if>, trigger: 'change' },
<#elseif valueRule.getRuleType() == "SCRIPT">
{ <#if valueRule.getScriptCode?? && valueRule.getScriptCode()??>validator: (rule:any, value:any, callback:any) => { ${valueRule.getScriptCode()} }</#if><#if valueRule.getRuleInfo?? && valueRule.getRuleInfo()??>, message: '${valueRule.getRuleInfo()}'</#if>, trigger: 'change' },
</#if>
</#if>
</#if>
</#if>
</#list>
</#if>
],
</#list>
}
}
/**
* 表格行编辑项校验
*
* @param {string} property 属性名
* @param {*} data 行数据
* @param {number} rowIndex 行索引
* @returns Promise<any>
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public validate(property:string, data:any, rowIndex:number):Promise<any>{
return new Promise((resolve, reject) => {
this.$util.validateItem(property,data,this.rules() as any).then(()=>{
this.gridItemsModel[rowIndex][property].setError(null);
resolve(true);
}).catch((res: any) => {
this.gridItemsModel[rowIndex][property].setError(res.errors[0].message);
resolve(false);
});
});
}
/**
* 校验所有修改过的编辑项
*
* @returns Promise<any>
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public async validateAll(){
let validateState = true;
let index = -1;
for(let item of this.items){
index++;
if(item.rowDataState === "create" || item.rowDataState === "update"){
for(let property of Object.keys(this.rules() as any)){
if(!await this.validate(property,item,index)){
validateState = false;
}
}
}
}
return validateState;
}
/**
* 表格数据加载
*
* @param {*} [arg={}]
* @memberof ${srfclassname(ctrl.codeName)}
*/
public load(opt: any = {}, pageReset: boolean = false): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格fetchAction参数未配置' });
return;
}
if(pageReset){
this.curPage = 1;
}
const arg: any = {...opt};
const page: any = {};
if (this.isEnablePagingBar) {
Object.assign(page, { page: this.curPage-1, size: this.limit });
}
// 设置排序
if (!this.isNoSort && !Object.is(this.minorSortDir, '') && !Object.is(this.minorSortPSDEF, '')) {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
}
return;
}
const data: any = response.data;
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.$emit('load', this.items);
// 设置默认选中
let _this = this;
setTimeout(() => {
if(_this.isSelectFirstDefault){
_this.rowClick(_this.items[0]);
}
if(_this.selectedData){
const refs: any = _this.$refs;
if (refs.multipleTable) {
refs.multipleTable.clearSelection();
JSON.parse(_this.selectedData).forEach((selection:any)=>{
let selectedItem = _this.items.find((item:any)=>{
return Object.is(item.srfkey, selection.srfkey);
});
if(selectedItem){
_this.rowClick(selectedItem);
}
});
}
}
}, 300);
<#if ctrl.getAggMode() == "ALL">
this.getAggData();
</#if>
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '错误', desc: response.errorMessage });
});
}
/**
* 删除
*
* @param {any[]} datas
* @returns {Promise<any>}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' });
return;
}
let _datas:any[] = [];
datas.forEach((record: any, index: number) => {
if (!record.srfkey) {
this.items.some((val: any, num: number) =>{
if(JSON.stringify(val) == JSON.stringify(record)){
this.items.splice(num,1);
this.gridItemsModel.splice(num,1);
return true;
}
});
}else{
_datas.push(datas[index]);
}
});
if (_datas.length === 0) {
return;
}
let dataInfo = '';
_datas.forEach((record: any, index: number) => {
let srfmajortext = record.${ctrl.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case};
if (index < 5) {
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
}
dataInfo += srfmajortext;
} else {
return false;
}
});
if (_datas.length < 5) {
dataInfo = dataInfo + ' 共' + _datas.length + '条数据';
} else {
dataInfo = dataInfo + '...' + ' 共' + _datas.length + '条数据';
}
const removeData = () => {
let keys: any[] = [];
_datas.forEach((data: any) => {
keys.push(data.srfkey);
});
let _removeAction = keys.length > 1 ? 'removeBatch' : this.removeAction ;
let _keys = keys.length > 1 ? keys : keys[0] ;
const context:any = JSON.parse(JSON.stringify(this.context));
const post: Promise<any> = this.service.delete(_removeAction,Object.assign(context,{ ${ctrl.getPSAppDataEntity().codeName?lower_case}: _keys }),Object.assign({ ${ctrl.getPSAppDataEntity().codeName?lower_case}: _keys },{viewparams:this.viewparams}), this.showBusyIndicator);
return new Promise((resolve: any, reject: any) => {
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info });
return;
} else {
this.$Notice.success({ title: '', desc: '删除成功!' });
}
//删除items中已删除的项
console.log(this.items);
_datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1);
this.gridItemsModel.splice(index,1);
return true;
}
});
});
this.totalrow -= _datas.length;
this.$emit('remove', null);
this.selections = [];
resolve(response);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
reject(response);
return;
}
reject(response);
});
});
}
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '');
this.$Modal.confirm({
title: '警告',
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?',
onOk: () => {
removeData();
},
onCancel: () => { }
});
return removeData;
}
/**
* 批量添加
*
* @param {*} [arg={}]
* @memberof ${srfclassname(ctrl.codeName)}
*/
public addBatch(arg: any = {}): void {
if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格fetchAction参数未配置' });
return;
}
if(!arg){
arg = {};
}
console.error("批量添加未实现");
<#-- const post: Promise<any> = this.$http.post(this.fetchAction, arg, this.showBusyIndicator);
post.then((response: any) => {
if (response.ret !== 200) {
this.$Notice.error({ title: '', desc: '批量添加失败,' + response.info });
return;
}
this.load({});
this.$emit('addbatch', null);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '', desc: '批量添加失败' });
}); -->
}
/**
* 数据导入
*
* @param {*} data
* @memberof ${srfclassname(ctrl.codeName)}
*/
public importExcel(data:any ={}):void{
//导入excel
const importDataModel:any ={
<#if ctrl.getPSDEDataImport?? && ctrl.getPSDEDataImport()??>
<#assign dataImport = ctrl.getPSDEDataImport() />
importId:'${dataImport.getCodeName()}',
serviceName:'${dataImport.getPSAppDataEntity().getCodeName()?lower_case}',
appDeLogicName:'${dataImport.getPSAppDataEntity().getLogicName()}',
importData:{
<#if dataImport.getPSDEDataImportItems()??>
<#list dataImport.getPSDEDataImportItems() as dataImportItem>
"${dataImportItem.getName()}":{<#if dataImportItem.getPSCodeList()??><#assign codelist = dataImportItem.getPSCodeList()/>"codelist":{"type":"${codelist.getCodeListType()}","tag":"${codelist.getCodeName()}","isnumber":${codelist.isCodeItemValueNumber()?c}},</#if>"headername":"${dataImportItem.getCaption()}","isuniqueitem":${dataImportItem.isUniqueItem()?c},<#if dataImportItem.getPSAppDEField()??><#assign appDeField = dataImportItem.getPSDEField()/>"name":"${appDeField.getCodeName()?lower_case}","order":<#if appDeField.getImportOrder()??>${appDeField.getImportOrder()?c}</#if></#if>}<#if dataImportItem_has_next>,</#if>
</#list>
</#if>
}
</#if>
}
if(Object.keys(importDataModel).length == 0){
this.$Notice.warning({ 'title': (this.$t("app.utilview.warning") as string), 'desc': (this.$t("app.utilview.info") as string) });
return;
}
const view:any ={
viewname: 'app-data-upload',
title: this.$t("app.utilview.importview"),
width: 900,
height: 700
}
let container: Subject<any> = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(this.context)), importDataModel);
container.subscribe((result: any) => {
if(Object.is(result.ret,'OK')){
this.refresh(result.datas);
}
});
}
<#assign hasDEExport = false />
<#if ctrl.getPSDEDataExport?? && ctrl.getPSDEDataExport()??>
<#assign hasDEExport = true />
/**
* 所有导出列成员
*
* @type {any[]}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public allExportColumns: any[] = [
<#if ctrl.getPSDEDataExport().getPSDEDataExportItems()??>
<#list ctrl.getPSDEDataExport().getPSDEDataExportItems() as column>
{
name: '${column.getName()?lower_case}',
label: '${column.getCaption()}',
langtag: '<#if langbase??>${langbase}.exportColumns.${column.getName()?lower_case}</#if>',
show: true,
},
</#list>
</#if>
]
</#if>
/**
* 数据导出
*
* @param {*} data
* @memberof ${srfclassname(ctrl.codeName)}
*/
public exportExcel(data: any = {}): void {
// 导出Excel
const doExport = async (_data:any) => {
const tHeader: Array<any> = [];
const filterVal: Array<any> = [];
<#if hasDEExport>
this.allExportColumns.forEach((item: any) => {
<#else>
this.allColumns.forEach((item: any) => {
</#if>
item.show && item.label ? tHeader.push(this.$t(item.langtag)) : "";
item.show && item.name ? filterVal.push(item.name) : "";
});
const data = await this.formatExcelData(filterVal, _data);
this.$export.exportExcel().then((excel:any)=>{
excel.export_json_to_excel({
header: tHeader, //表头 必填
data, //具体数据 必填
filename: "${ctrl.getPSAppDataEntity().getLogicName()}表", //非必填
autoWidth: true, //非必填
bookType: "xlsx" //非必填
});
});
};
const page: any = {};
// 设置page,size
if (Object.is(data.type, 'maxRowCount')) {
Object.assign(page, { page: 0, size: data.maxRowCount });
} else if (Object.is(data.type, 'activatedPage')) {
<#if hasDEExport>
Object.assign(page, { page: this.curPage-1, size: this.limit });
<#else>
try {
doExport(JSON.parse(JSON.stringify(this.items)));
} catch (error) {
console.error(error);
}
return;
</#if>
}
// 设置排序
if (!this.isNoSort && !Object.is(this.minorSortDir, '') && !Object.is(this.minorSortPSDEF, '')) {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
const arg: any = {};
Object.assign(arg, page);
// 获取query,搜索表单,viewparams等父数据
const parentdata: any = {};
this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata);
<#if hasDEExport>
const post: Promise<any> = this.service.searchDEExportData(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
<#else>
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
</#if>
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '数据导出失败,' + response.info });
return;
}
try {
doExport(JSON.parse(JSON.stringify(response.data)));
} catch (error) {
console.error(error);
}
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: '', desc: '数据导出失败' });
});
}
/**
* 导出数据格式化
*
* @param {*} filterVal
* @param {*} jsonData
* @returns {[]}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public async formatExcelData(filterVal:any, jsonData:any) {
let codelistColumns:Array<any> = [
<#if hasDEExport>
<#assign exportItems = ctrl.getPSDEDataExport().getPSDEDataExportItems() />
<#else>
<#assign exportItems = ctrl.getAllPSDEGridColumns() />
</#if>
<#if exportItems??>
<#list exportItems as column>
<#if (hasDEExport || (!column.isHideDefault() && column.getName() != '')) && column.getCodeList?? && column.getCodeList()?? && column.getCLConvertMode() == 'FRONT'>
<#assign codelist = column.getPSCodeList()>
<#if codelist.getCodeListType() == 'STATIC' || codelist.getCodeListType() == 'DYNAMIC'>
{
name: '${column.getName()?lower_case}',
srfkey: '${codelist.codeName}',
codelistType : '${codelist.getCodeListType()}',
<#if codelist.getOrMode() == 'STR'>
textSeparator: '${codelist.textSeparator}',
renderMode: 'string',
valueSeparator: "${codelist.valueSeparator}",
<#elseif codelist.getOrMode() == 'NUM'>
renderMode: 'number',
textSeparator: '${codelist.textSeparator}',
valueSeparator: ',',
<#else>
renderMode: 'other',
textSeparator: '、',
valueSeparator: ',',
</#if>
},
</#if>
</#if>
</#list>
</#if>
];
let _this = this;
for (const codelist of codelistColumns) {
// 动态代码表处理
if (Object.is(codelist.codelistType, "DYNAMIC")) {
let items = await _this.codeListService.getItems(codelist.srfkey);
jsonData.forEach((row:any)=>{
row[codelist.name] = _this.getCodelistValue(items, row[codelist.name], codelist);
});
// 静态处理
} else if(Object.is(codelist.codelistType, "STATIC")){
let items = await _this.$store.getters.getCodeListItems(codelist.srfkey);
jsonData.forEach((row:any)=>{
row[codelist.name] = _this.getCodelistValue(items, row[codelist.name], codelist);
});
}
}
return jsonData.map((v:any) => filterVal.map((j:any) => v[j]))
}
/**
* 解析代码表和vlaue,设置items
*
* @public
* @param {any[]} items 代码表数据
* @param {*} value
* @returns {*}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getCodelistValue(items: any[], value: any, codelist: any,){
if(!value){
return this.$t('codelist.'+codelist.srfkey+'.empty');
}
if (items) {
let result:any = [];
if(Object.is(codelist.renderMode,"number")){
items.map((_item: any, index: number)=>{
const nValue = parseInt((value as any), 10);
const codevalue = _item.value;
if((parseInt(codevalue, 10) & nValue) > 0){
result.push(_item);
}
});
} else if(Object.is(codelist.renderMode,"string")){
const arrayValue: Array<any> = (value as any).split(codelist.valueSeparator);
arrayValue.map((value: any, index: number) => {
result.push([]);
let values: any[] = Object.is(this.$util.typeOf(value), 'number') ? [value] : [...(value as any).split(codelist.valueSeparator)];
values.map((val:any ,num: number)=>{
const item = this.getItem(items, val, codelist);
if(item){
result[index].push(item);
}
});
});
} else {
let values: any[] = Object.is(this.$util.typeOf(value), 'number') ? [value] : [...(value as any).split(codelist.valueSeparator)];
values.map((value:any ,index: number)=>{
const item = this.getItem(items, value, codelist);
if(item){
result.push(item);
}
});
}
// 设置items
if(result.length != 0){
return result.join(codelist.valueSeparator);
}else{
return value;
}
}
}
/**
* 获取代码项
*
* @public
* @param {any[]} items
* @param {*} value
* @returns {*}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getItem(items: any[], value: any, codelist: any): any {
const arr: Array<any> = items.filter(item => {return item.value == value});
if (arr.length !== 1) {
return undefined;
}
if(Object.is(codelist.codelistType,'STATIC')){
return this.$t('codelist.'+codelist.srfkey+'.'+arr[0].value);
}else{
return arr[0].text;
}
}
/**
* 生命周期
*
* @memberof ${srfclassname(ctrl.codeName)}
*/
public created(): void {
this.afterCreated();
}
/**
* 执行created后的逻辑
*
* @memberof ${srfclassname(ctrl.codeName)}
*/
public afterCreated(){
this.readyDCodelist();
this.setColState();
if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) {
return;
}
if (Object.is('load', action)) {
this.load(data);
}
if (Object.is('remove', action)) {
this.remove(data);
}
if (Object.is('save', action)) {
this.save(data);
}
});
}
}
/**
* vue 生命周期
*
* @memberof ${srfclassname(ctrl.codeName)}
*/
public destroyed() {
this.afterDestroy();
}
/**
* 执行destroyed后的逻辑
*
* @memberof ${srfclassname(ctrl.codeName)}
*/
public afterDestroy() {
if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe();
}
<#if destroyed_block??>
${destroyed_block}
</#if>
}
/**
* 获取选中行胡数据
*
* @returns {any[]}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getSelection(): any[] {
return this.selections;
}
/**
* 行双击事件
*
* @param {*} $event
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public rowDBLClick($event: any): void {
if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) {
return;
}
this.selections = [];
this.selections.push(JSON.parse(JSON.stringify($event)));
const refs: any = this.$refs;
if (refs.multipleTable) {
refs.multipleTable.clearSelection();
refs.multipleTable.toggleRowSelection($event);
}
this.$emit('rowdblclick', this.selections);
this.$emit('selectionchange', this.selections);
}
/**
* 复选框数据选中
*
* @param {*} $event
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public select($event: any): void {
if (!$event) {
return;
}
this.selections = [];
this.selections = [...JSON.parse(JSON.stringify($event))];
this.$emit('selectionchange', this.selections);
}
/**
* 复选框数据全部选中
*
* @param {*} $event
* @memberof ${srfclassname(ctrl.codeName)}
*/
public selectAll($event: any): void {
if (!$event) {
return;
}
this.selections = [];
this.selections = [...JSON.parse(JSON.stringify($event))];
this.$emit('selectionchange', this.selections);
}
/**
* 行单击选中
*
* @param {*} $event
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public rowClick($event: any, ifAlways: boolean = false): void {
if (!ifAlways && (!$event || this.actualIsOpenEdit)) {
return;
}
if(this.stopRowClick) {
this.stopRowClick = false;
return;
}
if(this.isSingleSelect){
this.selections = [];
}
// 已选中则删除,没选中则添加
let selectIndex = this.selections.findIndex((item:any)=>{
return Object.is(item.${ctrl.getPSDataEntity().getName()?lower_case},$event.${ctrl.getPSDataEntity().getName()?lower_case});
});
if (Object.is(selectIndex,-1)){
this.selections.push(JSON.parse(JSON.stringify($event)));
} else {
this.selections.splice(selectIndex,1);
}
const refs: any = this.$refs;
if (refs.multipleTable) {
if(this.isSingleSelect){
refs.multipleTable.clearSelection();
refs.multipleTable.setCurrentRow($event);
}else{
refs.multipleTable.toggleRowSelection($event);
}
}
this.$emit('selectionchange', this.selections);
}
/**
* 页面变化
*
* @param {*} $event
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public pageOnChange($event: any): void {
if (!$event) {
return;
}
if ($event === this.curPage) {
return;
}
this.curPage = $event;
this.load({});
}
/**
* 分页条数变化
*
* @param {*} $event
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public onPageSizeChange($event: any): void {
if (!$event) {
return;
}
if ($event === this.limit) {
return;
}
this.limit = $event;
if (this.curPage === 1) {
this.load({});
}
}
/**
* 分页刷新
*
* @memberof ${srfclassname(ctrl.codeName)}
*/
public pageRefresh(): void {
this.load({});
}
/**
* 排序变化
*
* @param {{ column: any, prop: any, order: any }} { column, prop, order }
* @memberof ${srfclassname(ctrl.codeName)}
*/
public onSortChange({ column, prop, order }: { column: any, prop: any, order: any }): void {
const dir = Object.is(order, 'ascending') ? 'asc' : Object.is(order, 'descending') ? 'desc' : '';
if (Object.is(dir, this.minorSortDir) && Object.is(this.minorSortPSDEF, prop)) {
return;
}
this.minorSortDir = dir;
this.minorSortPSDEF = prop ? prop : '';
this.load({});
}
/**
* 表格行选中样式
*
* @param {{ row: any, rowIndex: any }} { row, rowIndex }
* @returns {string}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public onRowClassName({ row, rowIndex }: { row: any, rowIndex: any }): string {
const index = this.selections.findIndex((select: any) => Object.is(select.srfkey, row.srfkey));
return index !== -1 ? 'grid-row-select' : '';
}
<#if ctrl.getAggMode() != "NONE">
/**
* 合计行绘制
*
* @param {any} param
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getSummaries(param:any){
<#if ctrl.getAggMode() == "PAGE">
const { columns, data } = param;
const sums:Array<any> = [];
columns.forEach((column:any, index:number) => {
if (index === 0) {
sums[index] = '合计';
return;
}
if(index === (columns.length - 1)){
sums[index] = '';
return;
}
const values = data.map((item:any) => Number(item[column.property]));
if (!values.every((value:any) => isNaN(value))) {
<#if ctrl.getPSDEGridColumns()??>
<#list ctrl.getPSDEGridColumns() as singleColumn>
<#if singleColumn.getAggMode() == "SUM">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
let tempData = values.reduce((prev:any, curr:any) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] = tempData;
}
<#elseif singleColumn.getAggMode() == "AVG">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
let tempData = values.reduce((prev:any, curr:any) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] = tempData/data.length;
}
<#elseif singleColumn.getAggMode() == "MAX">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
let tempData:any;
values.forEach((item:any) =>{
const value = Number(item);
if (!isNaN(value)) {
if(!tempData){
tempData = value;
}
if(value > tempData){
tempData = value;
}
}
});
sums[index] = tempData;
}
<#elseif singleColumn.getAggMode() == "MIN">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
let tempData:any;
values.forEach((item:any) =>{
const value = Number(item);
if (!isNaN(value)) {
if(!tempData){
tempData = value;
}
if(value < tempData){
tempData = value;
}
}
});
sums[index] = tempData;
}
</#if>
</#list>
</#if>
} else {
sums[index] = 'N/A';
}
});
return sums;
<#elseif ctrl.getAggMode() == "ALL">
const { columns } = param;
const sums:Array<any> = [];
columns.forEach((column:any, index:number) => {
if (index === 0) {
sums[index] = '合计';
return;
}else if(index === (columns.length - 1)){
sums[index] = '';
return;
}else{
<#if ctrl.getPSDEGridColumns()??>
sums[index] = 'N/A';
<#list ctrl.getPSDEGridColumns() as singleColumn>
<#if singleColumn.getAggMode() != "NONE">
if(Object.is(column.property,'${singleColumn.getCodeName()?lower_case}')){
const value = Number(this.remoteData.${singleColumn.getCodeName()?lower_case});
if (!isNaN(value)) {
<#if singleColumn.getAggMode() == "SUM">
sums[index] = value;
<#elseif singleColumn.getAggMode() == "AVG">
sums[index] = value;
<#elseif singleColumn.getAggMode() == "MAX">
sums[index] = value;
<#elseif singleColumn.getAggMode() == "MIN">
sums[index] = value;
</#if>
}
}
</#if>
</#list>
</#if>
}
});
return sums;
</#if>
}
</#if>
<#if ctrl.getAggMode() == "ALL">
/**
* 远程获取合计行数据
*
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getAggData(){
this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
}
return;
}
this.remoteData = response.data;
this.isDisplay = true;
}).catch((response:any) =>{
if (response && response.status === 401) {
return;
}
this.remoteData = {};
this.isDisplay = true;
this.$Notice.error({ title: '错误', desc: response.errorMessage });
})
}
</#if>
/**
* 界面行为
*
* @param {*} row
* @param {*} tag
* @param {*} $event
* @memberof ${srfclassname(ctrl.codeName)}
*/
public uiAction(row: any, tag: any, $event: any) {
<#-- this.rowClick(row, true); -->
$event.stopPropagation();
<#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??>
<#assign action = logic.getPSAppViewUIAction().getPSUIAction()>
if(Object.is('${action.getUIActionTag()}', tag)) {
this.${logic.getName()}(row, tag, $event);
}
</#if>
</#list>
</#if>
}
/**
* 设置列状态
*
* @memberof ${srfclassname(ctrl.codeName)}
*/
public setColState() {
const _data: any = localStorage.getItem('${ctrl.getPSDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}');
if (_data) {
let columns = JSON.parse(_data);
columns.forEach((col: any) => {
let column = this.allColumns.find((item) => Object.is(col.name, item.name));
if (column) {
Object.assign(column, col);
}
});
}
}
/**
* 列变化
*
* @memberof ${srfclassname(ctrl.codeName)}
*/
public onColChange() {
localStorage.setItem('${ctrl.getPSDataEntity().getName()?lower_case}_${ctrl.getCodeName()?lower_case}_${ctrl.name}', JSON.stringify(this.allColumns));
}
/**
* 获取列状态
*
* @param {string} name
* @returns {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getColumnState(name: string): boolean {
let column = this.allColumns.find((col: any) =>
Object.is(name, col.name)
);
return column.show ? true : false;
}
/**
* 表格列是否自适应布局
*
* @readonly
* @type {boolean}
* @memberof ${srfclassname(ctrl.codeName)}
*/
get adaptiveState(): boolean {
return !this.allColumns.find((column: any) => column.show && Object.is(column.util, 'STAR'));
}
/**
* 保存
*
* @param {*} $event
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public async save(args: any[], params?: any, $event?: any, xData?: any){
let _this = this;
if(!await this.validateAll()){
this.$Notice.error({ title: '错误', desc: '值规则校验异常' });
return [];
}
let successItems:any = [];
let errorItems:any = [];
let errorMessage:any = [];
for (const item of _this.items) {
try {
if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格createAction参数未配置' });
}else{
Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
successItems.push(JSON.parse(JSON.stringify(response.data)));
}
}else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格updateAction参数未配置' });
}else{
Object.assign(item,{viewparams:this.viewparams});
<#if de??>
if(item.${appde.getCodeName()?lower_case}){
Object.assign(this.context,{${appde.getCodeName()?lower_case}:item.${appde.getCodeName()?lower_case}});
}
</#if>
let response = await this.service.add(this.updateAction,JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
successItems.push(JSON.parse(JSON.stringify(response.data)));
}
}
} catch (error) {
errorItems.push(JSON.parse(JSON.stringify(item)));
errorMessage.push(error);
}
}
this.$emit('save', successItems);
this.refresh([]);
if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' });
}else{
errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: '保存失败', desc: item.majorentityname+'保存失败!' });
console.error(errorMessage[index]);
});
}
return successItems;
}
<#if ctrl.isEnableRowEdit()>
/**
* 新建行
*
* @param {*} $event
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public newRow(args: any[], params?: any, $event?: any, xData?: any): void {
if(!this.loaddraftAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格loaddraftAction参数未配置' });
return;
}
let _this = this;
Object.assign(args[0],{viewparams:this.viewparams});
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction, JSON.parse(JSON.stringify(this.context)), args[0], this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
}
return;
}
const data = response.data;
this.createDefault(data);
data.rowDataState = "create";
_this.items.push(data);
_this.gridItemsModel.push(_this.getGridRowModel());
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
});
}
/**
* 表格编辑项值变更
*
* @param row 行数据
* @param {{ name: string, value: any }} $event
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public onGridItemValueChange(row: any,$event: { name: string, value: any },rowIndex: number): void {
if (!$event) {
return;
}
if (!$event.name || Object.is($event.name, '') || !row.hasOwnProperty($event.name)) {
return;
}
row[$event.name] = $event.value;
this.gridEditItemChange(row, $event.name, $event.value, rowIndex);
}
/**
* 表格编辑项值变化
*
* @public
* @param row 行数据
* @param property 列编辑项名
* @param row 列编辑项值
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public gridEditItemChange(row: any, property: string, value: any, rowIndex: number){
row.rowDataState = row.rowDataState ? row.rowDataState : "update" ;
this.validate(property,row,rowIndex);
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getPSDEGridEditItemUpdate()??>
<#assign itemUpdate=editItem.getPSDEGridEditItemUpdate()/>
if(Object.is(property, '${editItem.name}')){
const details: string[] = [<#list itemUpdate.getPSDEGEIUpdateDetails() as detail><#if detail_index gt 0>, </#if>'${detail.getPSDEGridColumnName()?lower_case}'</#list>];
this.updateGridEditItem('${itemUpdate.codeName}', row, details, ${itemUpdate.isShowBusyIndicator()?c});
}
</#if>
</#list>
</#if>
}
/**
* 表格编辑项更新
*
* @param {string} mode 界面行为名称
* @param {*} [data={}] 请求数据
* @param {string[]} updateDetails 更新项
* @param {boolean} [showloading] 是否显示加载状态
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public updateGridEditItem(mode: string, data: any = {}, updateDetails: string[], showloading?: boolean): void {
if (!mode || (mode && Object.is(mode, ''))) {
return;
}
const arg: any = JSON.parse(JSON.stringify(data));
Object.assign(arg,{viewparams:this.viewparams});
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
post.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '错误', desc: '表单项更新失败' });
return;
}
const _data: any = response.data;
if(!_data){
return;
}
updateDetails.forEach((name: string) => {
if (!_data.hasOwnProperty(name)) {
return;
}
data[name] = _data[name];
});
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' });
return;
}
});
}
</#if>
/**
* 获取对应行class
*
* @param {*} $args row 行数据,rowIndex 行索引
* @returns {void}
* @memberof ${srfclassname(ctrl.codeName)}
*/
public getRowClassName(args:{row: any,rowIndex: number}){
let isSelected = this.selections.some((item:any)=>{
return Object.is(item.${appde.getCodeName()?lower_case},args.row.${appde.getCodeName()?lower_case});
});
return isSelected ? "grid-selected-row" : "";
}
/**
* 新建默认值
* @param {*} row 行数据
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public createDefault(row: any){
<#list ctrl.getPSDEGridEditItems() as editItem><#t>
<#if editItem.getCreateDV?? && editItem.getCreateDV()??><#t>
<#if !(editItem.getCreateDV() == '')><#t>
if (row.hasOwnProperty('${editItem.getCodeName()?lower_case}')) {
<#-- 网页请求 -->
<#if editItem.getCreateDVT() == 'CONTEXT'>
row['${editItem.getCodeName()?lower_case}'] = this.viewparams['${editItem.getCreateDV()}'];
<#-- 用户全局对象 -->
<#elseif editItem.getCreateDVT() == 'SESSION'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getCreateDV()}'];
<#-- 当前应用数据 -->
<#elseif editItem.getCreateDVT() == 'APPDATA'>
row['${editItem.getCodeName()?lower_case}'] = this.context['${editItem.getCreateDV()}'];
<#-- 当前操作用户(名称) -->
<#elseif editItem.getCreateDVT() == 'OPERATORNAME'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfusername'];
<#-- 当前操作用户(编号) -->
<#elseif editItem.getCreateDVT() == 'OPERATOR'>
row['${editItem.getCodeName()?lower_case}'] = this.context['srfuserid'];
<#else>
<#-- 默认值 -->
<#assign datatype=srfjavatype(editItem.getPSAppDEField().getStdDataType())>
row['${editItem.getCodeName()?lower_case}'] = <#if datatype=='BigInteger' || datatype=='Integer' || datatype=='Double' || datatype=='Decimal' || datatype=='Float' || datatype=='BigDecimal'>${editItem.getCreateDV()}<#else>'${editItem.getCreateDV()}'</#if>;
</#if>
}
</#if>
</#if>
</#list>
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/HTML/GRID.html.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#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.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public isDEExport: boolean = false;
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
if(this.isDEExport){
return [
<#-- 实体导出数据项 -->
<#if ctrl.getPSDEDataExport?? && ctrl.getPSDEDataExport()?? && ctrl.getPSDEDataExport().getPSDEDataExportItems()??>
<#list ctrl.getPSDEDataExport().getPSDEDataExportItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getName() == dataitem.getName()>
<#if editItem.isEditable()>
isEditable:${editItem.isEditable()?c}
</#if>
</#if>
</#list>
</#if>
},
</#list>
</#if>
]
}else{
return [
<#-- 表格数据项 -->
<#if ctrl.getPSDEGridDataItems()??>
<#list ctrl.getPSDEGridDataItems() as dataitem>
{
name: '${dataitem.getName()}',
<#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getName() == dataitem.getName()>
<#if editItem.isEditable()>
isEditable:${editItem.isEditable()?c}
</#if>
</#if>
</#list>
</#if>
},
</#list>
</#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: '${minorAppDERSs.getPSDER1N().getPSPickupDEField().getCodeName()?lower_case}',
dataType: 'FONTKEY',
},
</#if>
</#list>
</#if>
</#if>
<#if ctrl.getPSDEGridDataItems()??>
<#list ctrl.getPSDEGridDataItems() as dataitem>
<#-- 界面主键标识 -->
<#if dataitem.getPSDEField?? && dataitem.getPSDEField()??>
<#if !P.exists("importService", dataitem.getPSDEField().getId(), "")>
<#if dataitem.getPSDEField().isKeyDEField() == true>
{
name: '${ctrl.getPSAppDataEntity().getCodeName()?lower_case}',
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
},
</#if>
</#if>
</#if>
</#list>
</#if>
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'MODEL_CONTENT.ts').code}
</#if>
{
name:'size',
prop:'size'
},
{
name:'query',
prop:'query'
},
{
name:'filter',
prop:'filter'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
},
{
name:'srfparentdata',
prop:'srfparentdata'
},
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
]
}
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign import_block>
<#list ctrl.getPSDEGridEditItems() as deItem>
<#if deItem.getPSEditor()?? && deItem.getPSEditor().getPSAppDataEntity?? && deItem.getPSEditor().getPSAppDataEntity()??>
<#assign _appde = deItem.getPSEditor().getPSAppDataEntity()/>
<#if _appde.getId() != appde.getId()>
<#if !P.exists("importService", _appde.getId(), "")>
import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffilepath2(_appde.getCodeName())}/${srffilepath2(_appde.getCodeName())}-service';
</#if>
</#if>
</#if>
</#list>
<#if ctrl.getAggMode() == "ALL" && ctrl.getAggPSAppDataEntity()??>
<#assign aggAppDataEntity = ctrl.getAggPSAppDataEntity() >
import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/service/${srffilepath2(aggAppDataEntity.getCodeName())}/${srffilepath2(aggAppDataEntity.getCodeName())}-service';
</#if>
</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
/**
* 备份原生数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
private copynativeData:any;
/**
* 远端数据
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
private remoteCopyData:any = {};
<#list ctrl.getPSDEGridEditItems() as deItem>
<#if deItem.getPSEditor()?? && deItem.getPSEditor().getPSAppDataEntity?? && deItem.getPSEditor().getPSAppDataEntity()??>
<#assign _appde = deItem.getPSEditor().getPSAppDataEntity()/>
<#if _appde.getId() != appde.getId()>
<#if !P.exists("importService2", _appde.getId(), "")>
/**
* ${_appde.getLogicName()}服务对象
*
* @type {${srfclassname('${_appde.getCodeName()}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public ${_appde.getCodeName()?lower_case}Service: ${srfclassname('${_appde.getCodeName()}')}Service = new ${srfclassname('${_appde.getCodeName()}')}Service();
</#if>
</#if>
</#if>
</#list>
/**
* 处理数据
*
* @public
* @param {Promise<any>} promise
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public doItems(promise: Promise<any>, deKeyField: string, deName: string): Promise<any> {
return new Promise((resolve, reject) => {
promise.then((response: any) => {
if (response && response.status === 200) {
const data = response.data;
data.forEach((item:any,index:number) =>{
item[deName] = item[deKeyField];
data[index] = item;
});
resolve(data);
} else {
reject([])
}
}).catch((response: any) => {
reject([])
});
});
}
/**
* 获取跨实体数据集合
*
* @param {string} serviceName 服务名称
* @param {string} interfaceName 接口名称
* @param {*} data
* @param {boolean} [isloading]
* @returns {Promise<any[]>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
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>
<#if deItem.getPSEditor()?? && deItem.getPSEditor().getPSAppDataEntity?? && deItem.getPSEditor().getPSAppDataEntity()?? && deItem.getPSEditor().getPSAppDEDataSet?? && deItem.getPSEditor().getPSAppDEDataSet()??>
<#assign _appde = deItem.getPSEditor().getPSAppDataEntity()/>
<#assign deDataSet = deItem.getPSEditor().getPSAppDEDataSet()/>
<#if !P.exists("importService4", _appde.getId() + deDataSet.getCodeName(), "")>
<#if _appde.getId() == appde.getId()>
if (Object.is(serviceName, '${srfclassname('${_appde.getCodeName()}')}Service') && Object.is(interfaceName, '${deDataSet.getCodeName()}')) {
return this.doItems(this.appEntityService.${deDataSet.getCodeName()}(JSON.parse(JSON.stringify(context)), data, isloading), '${_appde.getKeyPSAppDEField().getCodeName()?lower_case}', '${_appde.getCodeName()?lower_case}');
}
<#else>
if (Object.is(serviceName, '${srfclassname('${_appde.getCodeName()}')}Service') && Object.is(interfaceName, '${deDataSet.getCodeName()}')) {
return this.doItems(this.${_appde.getCodeName()?lower_case}Service.${deDataSet.getCodeName()}(JSON.parse(JSON.stringify(context)),data, isloading), '${_appde.getKeyPSAppDEField().getCodeName()?lower_case}', '${_appde.getCodeName()?lower_case}');
}
</#if>
</#if>
</#if>
</#list>
return Promise.reject([])
}
/**
* 添加数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public add(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
<#-- 手动修改数据主键的情况start -->
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getPSAppDEField()?? && editItem.getPSAppDEField().isKeyField() && editItem.getCodeName() != "srfkey">
Object.assign(Data,{${editItem.getPSAppDEField().getCodeName()?lower_case}: data.${editItem.getName()}, srffrontuf: '1'});
</#if>
</#list>
</#if>
<#-- 手动修改数据主键的情况end -->
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_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 delete(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 = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.Remove(Context,Data, isloading);
}
result.then((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 update(action: string, context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const {data:Data,context:Context} = this.handleRequestDataWithUpdate(action,context,data,true);
return new Promise((resolve: any, reject: any) => {
const _appEntityService: any = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data,isloading);
}else{
result =_appEntityService.Update(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 get(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) => {
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.Get(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:0});
}
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 search(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 = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
this.setCopynativeData(response.data);
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
<#if ctrl.getPSDEDataExport?? && ctrl.getPSDEDataExport()??>
/**
* 查询实体导出数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public searchDEExportData(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 = this.appEntityService;
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result =_appEntityService.FetchDefault(Context,Data, isloading);
}
result.then((response) => {
let model: any = this.getMode();
model.isDEExport = true;
this.handleResponse(action, response);
model.isDEExport = false;
resolve(response);
}).catch(response => {
reject(response);
});
});
}
</#if>
/**
* 加载草稿
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public loadDraft(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) => {
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.GetDraft(Context,Data, isloading);
}
result.then((response) => {
//处理返回数据,补充判断标识
if(response.data){
Object.assign(response.data,{srfuf:'0'});
<#-- 手动修改数据主键的情况start -->
<#assign hasKeyField = ''/>
<#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem>
<#if editItem.getPSAppDEField()?? && editItem.getPSAppDEField().isKeyField() && editItem.getCodeName() != "srfkey">
<#assign hasKeyField>${editItem.getName()}</#assign>
</#if>
</#list>
</#if>
<#-- 手动修改数据主键的情况end -->
<#if hasKeyField == "">
//仿真主键数据
response.data.${appde.getKeyPSAppDEField().getCodeName()?lower_case} = Util.createUUID();
</#if>
}
this.setRemoteCopyData(response);
this.handleResponse(action, response, true);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
<#if ctrl.getAggMode() == "ALL" && ctrl.getAggPSAppDataEntity()??>
<#assign aggAppDataEntity = ctrl.getAggPSAppDataEntity() >
/**
* 表格聚合加载数据
*
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
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() });
let result: Promise<any>;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
}else{
result = Promise.reject({});
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
});
}
</#if>
/**
* 前台逻辑
* @param {string} action
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public frontLogic(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)=>{
let result: Promise<any>;
const _appEntityService: any = this.appEntityService;
if (_appEntityService[action] && _appEntityService[action] instanceof Function) {
result = _appEntityService[action](Context,Data, isloading);
} else {
return Promise.reject({ status: 500, data: { title: '失败', message: '系统异常' } });
}
result.then((response) => {
this.handleResponse(action, response);
resolve(response);
}).catch(response => {
reject(response);
});
})
}
/**
* 处理请求数据(修改或增加数据)
*
* @param action 行为
* @param data 数据
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleRequestDataWithUpdate(action: string,context:any ={},data: any = {},isMerge:boolean = false){
let model: any = this.getMode();
if (!model && model.getDataItems instanceof Function) {
return data;
}
let dataItems: any[] = model.getDataItems();
let requestData:any = {};
if(isMerge && (data && data.viewparams)){
Object.assign(requestData,data.viewparams);
}
dataItems.forEach((item:any) =>{
if(item && item.dataType && Object.is(item.dataType,'FONTKEY')){
if(item && item.prop && item.name ){
requestData[item.prop] = context[item.name];
}
}else{
if(item && item.isEditable && item.prop && item.name && data.hasOwnProperty(item.name)){
requestData[item.prop] = data[item.name];
}
}
});
let tempContext:any = JSON.parse(JSON.stringify(context));
if(tempContext && tempContext.srfsessionid){
tempContext.srfsessionkey = tempContext.srfsessionid;
delete tempContext.srfsessionid;
}
return {context:tempContext,data:requestData};
}
/**
* 设置远端数据
*
* @param result 远端请求结果
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public setRemoteCopyData(result:any){
if (result && result.status === 200) {
this.remoteCopyData = Util.deepCopy(result.data);
}
}
/**
* 获取远端数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public getRemoteCopyData(){
return this.remoteCopyData;
}
/**
* 设置备份原生数据
*
* @param data 远端请求结果
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public setCopynativeData(data:any){
this.copynativeData = Util.deepCopy(data);
}
/**
* 获取备份原生数据
*
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public getCopynativeData(){
return this.copynativeData;
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=GRID#PivotTable
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../../@MACRO/FUNC/MACRO.ftl</#ibizinclude>
<#assign MDContent><#t>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#if view.getViewType() == "DEGRIDVIEW9">
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('grid')>
${P.getCtrlCode('grid', 'CONTROL.html').code}
</#if>
</#if>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
<div style='margin-bottom: 6px;'>
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
<div class="quick-search-container">
<#assign quickSearchForm = view.getQuickPSDESearchForm() />
${P.getCtrlCode(quickSearchForm, 'CONTROL.html').code}
</div>
</#if>
<#if view.isEnableQuickSearch()>
<i-input<#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show="!isExpandSearchForm"</#if></#if> v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="<@getQuickSearchPlaceholder view />" />
</#if>
<div class='pull-left'>
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=8>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
</div>
</#if>
<#-- END:快速搜索或工具栏存在 -->
<#if view.getViewType() != "DEGRIDVIEW9">
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('map')>
${P.getCtrlCode('map', 'CONTROL.html').code}
</#if>
</#if>
</#assign>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
</@ibizindent>
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#-- BEGIN:视图内容 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图内容 -->
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMAPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../../@MACRO/FUNC/MACRO.ftl</#ibizinclude>
<#assign MDContent><#t>
<#if view.getPSSysCounterRef?? && view.getPSSysCounterRef()?? && view.getPSSysCounterRef().getPSAppCounter()??>
<#assign appCounter = view.getPSSysCounterRef().getPSAppCounter() />
</#if>
<#if view.getViewType() == "DEGRIDVIEW9">
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
</#if>
<#-- BEGIN:快速搜索框或工具栏或支持快速分组搜索或快速搜索表单部件存在 -->
<#if (view.isEnableQuickSearch() || view.hasPSControl('toolbar') || view.isEnableQuickGroup() || view.getQuickPSDESearchForm()??)>
<div style='margin-bottom: 6px;'>
<#if view.isEnableQuickGroup()>
<div class="quick-group-container">
<app-quick-group :items="quickGroupModel" <#if appCounter??>:counterService="${srfclassname('${appCounter.getCodeName()}')}counterservice"</#if> @valuechange="qucikGroupValueChange"></app-quick-group>
</div>
</#if>
<#if view.getQuickPSDESearchForm()??>
<div class="quick-search-container">
<#assign quickSearchForm = view.getQuickPSDESearchForm() />
${P.getCtrlCode(quickSearchForm, 'CONTROL.html').code}
</div>
</#if>
<#if view.isEnableQuickSearch()>
<i-input<#if view.hasPSControl('searchform')><#if view.isExpandSearchForm??> v-show="!isExpandSearchForm"</#if></#if> v-model="query" search enter-button @on-search="onSearch($event)" class='quick-search-input' style='max-width: 400px;' placeholder="<@getQuickSearchPlaceholder view />" />
</#if>
<div class='pull-left'>
<#if view.hasPSControl('toolbar')>
<@ibizindent blank=8>
${P.getCtrlCode('toolbar', 'CONTROL.html').code}<#t>
</@ibizindent>
</#if>
</div>
</div>
</#if>
<#-- END:快速搜索或工具栏存在 -->
<#if view.getViewType() != "DEGRIDVIEW9">
<#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if>
<#if view.hasPSControl('map')>
${P.getCtrlCode('map', 'CONTROL.html').code}
</#if>
</#if>
</#assign>
<div class='view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>'>
<app-studioaction :viewTitle="$t(model.srfTitle)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card <#if !view.isShowCaptionBar()> view-no-caption</#if>' :dis-hover="true" :bordered="false">
<@ibizindent blank=8>
<#ibizinclude>
../@MACRO/VIEW_CAPTION.vue.ftl
</#ibizinclude>
</@ibizindent>
<div class='content-container'>
<#-- BEGIN:视图顶部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/View_Pos_Top_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图顶部视图消息 -->
<#-- BEGIN:视图内容 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/VIEW_MD_CONTENT.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图内容 -->
<#-- BEGIN:视图底部视图消息 -->
<@ibizindent blank=12>
<#ibizinclude>
../@MACRO/View_Pos_Bottom_Msgs.vue.ftl
</#ibizinclude>
</@ibizindent>
<#-- END:视图底部视图消息 -->
</div>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEMAPVIEW9
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<div class="view-container ${view.getViewType()?lower_case} ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card view-no-caption view-no-toolbar' :disHover="true" :padding="0" :bordered="false">
<div class="content-container">
<component
:is="activeForm.name"
:viewState="viewState"
:viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="activeForm.showBusyIndicator"
:updateAction="activeForm.updateAction"
:removeAction="activeForm.removeAction"
:loaddraftAction="activeForm.loaddraftAction"
:loadAction="activeForm.loadAction"
:createAction="activeForm.createAction"
:WFSubmitAction="activeForm.WFSubmitAction"
:WFStartAction="activeForm.WFStartAction"
name="form"
ref='form'>
</component>
</div>
<card dis-hover :bordered="false" class='footer'>
<row style=" text-align: right ">
<i-button type='primary' @click="onClickOk">{{ $t("app.commonWords.ok") }}</i-button>
&nbsp;&nbsp;
<i-button @click="onClickCancel">{{ $t("app.commonWords.cancel") }}</i-button>
</row>
</card>
</card>
</div>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEWFDYNAACTIONVIEW
\ No newline at end of file
...@@ -15,11 +15,29 @@ ...@@ -15,11 +15,29 @@
</div> </div>
</div> </div>
<div class="content-container"> <div class="content-container">
<#if view.hasPSControl('form')> <component
<@ibizindent blank=8> :is="activeForm.name"
${P.getCtrlCode('form', 'CONTROL.html').code} :isautoload="true"
</@ibizindent> :viewState="viewState"
</#if> :viewparams="viewparams"
:context="context"
:autosave="false"
:viewtag="viewtag"
:showBusyIndicator="activeForm.showBusyIndicator"
:updateAction="activeForm.updateAction"
:removeAction="activeForm.removeAction"
:loaddraftAction="activeForm.loaddraftAction"
:loadAction="activeForm.loadAction"
:createAction="activeForm.createAction"
:WFSubmitAction="activeForm.WFSubmitAction"
:WFStartAction="activeForm.WFStartAction"
name="form"
ref='form'
@save="form_save($event)"
@remove="form_remove($event)"
@load="form_load($event)"
@closeview="closeView($event)">
</component>
</div> </div>
</card> </card>
</div> </div>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<i-input type="password" v-model="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></i-input> <i-input type="password" v-model="data.${editor.name}" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></i-input>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<input-box type="password" :disabled="getColumnDisabled(row,column.property)" v-model="row[column.property]" style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></input-box> <input-box type="password" :disabled="getColumnDisabled(row,column.property)" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> v-model="row[column.property]" style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></input-box>
</#if> </#if>
\ No newline at end of file
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<input-box <input-box
type="password" type="password"
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
v-model="data.${editor.name?lower_case}" v-model="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}" style="${item.getEditorCssStyle()}"
@change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}"> @change="($event)=>{panelEditItemChange(data, '${editor.name?lower_case}', $event)}">
......
<app-map-position
name="${editor.name}"
v-model="data.${editor.name}"
:data="data"
:formState="formState"
mode="<#if item.getEditorParam("mode","") != ''>${item.getEditorParam("mode","")}<#else>address</#if>"
<#if item.getEditorParam("address","") != ''>
address="${item.getEditorParam("address","")}"
</#if><#t>
<#if item.getEditorParam("longitude","") != ''>
longitude="${item.getEditorParam("longitude","")}"
</#if><#t>
<#if item.getEditorParam("latitude","") != ''>
latitude="${item.getEditorParam("latitude","")}"
</#if><#t>
@itemChange="(val1, val2) => { onFormItemValueChange(val1); onFormItemValueChange(val2); }"
/>
\ No newline at end of file
EDITORTYPE=PICKER#MAPPOSITION
\ No newline at end of file
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getEditorParam("PICKUPDATA", "") != "">pickUpData="${editor.getEditorParam("PICKUPDATA", "")}"</#if> <#if editor.getEditorParam("PICKUPDATA", "") != "">pickUpData="${editor.getEditorParam("PICKUPDATA", "")}"</#if>
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getEditorParam("PICKUPDATA", "") != "">pickUpData="${editor.getEditorParam("PICKUPDATA", "")}"</#if> <#if editor.getEditorParam("PICKUPDATA", "") != "">pickUpData="${editor.getEditorParam("PICKUPDATA", "")}"</#if>
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??> <#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
:isSingleSelect="false" :isSingleSelect="false"
</#if> </#if>
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
:isSingleSelect="false" :isSingleSelect="false"
</#if> </#if>
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??> <#if editor.getPSAppDataEntity?? && editor.getPSAppDataEntity()??>
deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}' deMajorField='${editor.getPSAppDataEntity().getMajorPSAppDEField().getCodeName()?lower_case}'
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getEditorParam("PICKUPDATA", "") != "">pickUpData="${editor.getEditorParam("PICKUPDATA", "")}"</#if> <#if editor.getEditorParam("PICKUPDATA", "") != "">pickUpData="${editor.getEditorParam("PICKUPDATA", "")}"</#if>
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getEditorParam("PICKUPDATA", "") != "">pickUpData="${editor.getEditorParam("PICKUPDATA", "")}"</#if> <#if editor.getEditorParam("PICKUPDATA", "") != "">pickUpData="${editor.getEditorParam("PICKUPDATA", "")}"</#if>
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
......
<app-address-selection :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-address-selection> <app-address-selection :value="data.${editor.name}" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-address-selection>
\ No newline at end of file \ No newline at end of file
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??> <#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:showButton="false" :showButton="false"
name='${editor.name}' name='${editor.name}'
<#-- 自填模式文本属性、值属性start --> <#-- 自填模式文本属性、值属性start -->
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
name="${editor.name}" name="${editor.name}"
:value='data.${editor.name}' :value='data.${editor.name}'
valueitem="${editor.getValueItemName()}" valueitem="${editor.getValueItemName()}"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
<#if editor.getEditorParam("MULTIPLE", false)>:multiple="true"</#if> <#if editor.getEditorParam("MULTIPLE", false)>:multiple="true"</#if>
<#if editor.getEditorParam("FILTER", "") != "">filter="${editor.getEditorParam("FILTER", "")}"</#if> <#if editor.getEditorParam("FILTER", "") != "">filter="${editor.getEditorParam("FILTER", "")}"</#if>
<#if editor.getEditorParam("FILLMAP", "") != "">:fillmap='${editor.getEditorParam("FILLMAP", "")}'</#if> <#if editor.getEditorParam("FILLMAP", "") != "">:fillmap='${editor.getEditorParam("FILLMAP", "")}'</#if>
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:itemParams='<#if editor.getItemParamJO?? && editor.getItemParamJO()??>${editor.getItemParamJO()}</#if>' :itemParams='<#if editor.getItemParamJO?? && editor.getItemParamJO()??>${editor.getItemParamJO()}</#if>'
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??> <#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
<#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??> <#if editor.getPSAppDEACMode?? && editor.getPSAppDEACMode()??>
<#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??> <#if editor.getPSAppDEACMode().getMinorSortPSDEF?? && editor.getPSAppDEACMode().getMinorSortPSDEF()?? && editor.getPSAppDEACMode().getMinorSortDir?? && editor.getPSAppDEACMode().getMinorSortDir()??>
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
:data="data" :data="data"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
:data="row" :data="row"
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:localContext =<@getNavigateContext editor /> :localContext =<@getNavigateContext editor />
:localParam =<@getNavigateParams editor /> :localParam =<@getNavigateParams editor />
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker> <date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker> <date-picker type="datetime" :transfer="true" format="yyyy-MM-dd HH:mm:ss" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="getColumnDisabled(row,column.property)" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
</#if> </#if>
\ No newline at end of file
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
type="datetime" type="datetime"
:transfer="true" :transfer="true"
format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间..." <#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px;${editor.getEditorCssStyle()} <#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px;${editor.getEditorCssStyle()} <#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="getColumnDisabled(row,column.property)" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
</#if> </#if>
\ No newline at end of file
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
type="date" type="date"
:transfer="true" :transfer="true"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="请选择时间..." <#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="mm" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="mm" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="row[column.property]" :transfer="true" format="mm" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="mm" :disabled="getColumnDisabled(row,column.property)" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if> </#if>
\ No newline at end of file
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<time-picker <time-picker
:transfer="true" :transfer="true"
format="mm" format="mm"
placeholder="请选择时间..." <#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="row[column.property]" :transfer="true" format="HH" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if> </#if>
\ No newline at end of file
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<time-picker <time-picker
:transfer="true" :transfer="true"
format="HH" format="HH"
placeholder="请选择时间..." <#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :value="data.${editor.name}" :disabled="detailsModel.${editor.name}.disabled" style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { this.data.${editor.name} = val1 }"></date-picker>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker> <date-picker type="date" :transfer="true" format="yyyy-MM-dd" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="getColumnDisabled(row,column.property)" :value="row[column.property]" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
</#if> </#if>
\ No newline at end of file
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
type="date" type="date"
:transfer="true" :transfer="true"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="请选择时间..." <#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH:mm:ss" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH:mm:ss" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="row[column.property]" :transfer="true" format="HH:mm:ss" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH:mm:ss" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if> </#if>
\ No newline at end of file
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<time-picker <time-picker
:transfer="true" :transfer="true"
format="HH:mm:ss" format="HH:mm:ss"
placeholder="请选择时间..." <#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH:mm" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="HH:mm" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="row[column.property]" :transfer="true" format="HH:mm" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="HH:mm" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if> </#if>
\ No newline at end of file
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<time-picker <time-picker
:transfer="true" :transfer="true"
format="HH:mm" format="HH:mm"
placeholder="请选择时间..." <#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="ss" placeholder="请选择时间..." style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker> <time-picker :value="data.${editor.name}" :transfer="true" :disabled="detailsModel.${editor.name}.disabled" format="ss" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> style="min-width: 150px; ${editor.getEditorCssStyle()}<#if editor.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => {this.data.${editor.name} = val}"></time-picker>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<time-picker :value="row[column.property]" :transfer="true" format="ss" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker> <time-picker :value="row[column.property]" :transfer="true" format="ss" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" @on-change="(val) => { row[column.property] = val; gridEditItemChange(row, column.property, val, $index)}"></time-picker>
</#if> </#if>
\ No newline at end of file
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
<time-picker <time-picker
:transfer="true" :transfer="true"
format="ss" format="ss"
placeholder="请选择时间..." <#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>" style="${item.getEditorCssStyle()}<#if item.getEditorParam('width','') == 'auto'>width:100%;</#if>"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<i-input v-model="data.${editor.name}" readonly disabled style="${editor.getEditorCssStyle()}"></i-input> <i-input v-model="data.${editor.name}" <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> readonly disabled style="${editor.getEditorCssStyle()}"></i-input>
</#if> </#if>
\ No newline at end of file
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
<#assign codelist=item.getPSCodeList()> <#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}' <#t> tag='${codelist.codeName}' <#t>
codelistType='${codelist.getCodeListType()}' <#t> codelistType='${codelist.getCodeListType()}' <#t>
<#if codelist.getValueSeparator?? && codelist.getValueSeparator()?? && codelist.getValueSeparator() != ''>
valueSeparator='${codelist.getValueSeparator()}' <#t>
</#if>
</#if> </#if>
style="${item.getEditorCssStyle()}"> <#t> style="${item.getEditorCssStyle()}"> <#t>
</app-span> <#lt> </app-span> <#lt>
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
<app-autocomplete <app-autocomplete
:data="data" :data="data"
:disabled="detailsModel.${editor.name}.disabled" :disabled="detailsModel.${editor.name}.disabled"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
<app-autocomplete <app-autocomplete
:data="row" :data="row"
:disabled="getColumnDisabled(row,column.property)" :disabled="getColumnDisabled(row,column.property)"
<#if item.getPlaceHolder()??>
placeholder="${item.getPlaceHolder()}"
</#if>
name='${editor.name}' name='${editor.name}'
:context="context" :context="context"
:viewparams="viewparams" :viewparams="viewparams"
......
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<app-rate name='${editor.name}' :value="this.data.${editor.name}" @change="($event)=>{this.data.${editor.name} = $event} " :disabled="detailsModel.${editor.name}.disabled" style="${editor.getEditorCssStyle()}"></app-rate> <app-rate
name='${editor.name}'
:value="this.data.${editor.name}"
@change="($event)=>{this.data.${editor.name} = $event} "
:disabled="detailsModel.${editor.name}.disabled"
style="${editor.getEditorCssStyle()}">
<#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}' <#t>
codelistType='${codelist.getCodeListType()}' <#t>
<#if codelist.getValueSeparator?? && codelist.getValueSeparator()?? && codelist.getValueSeparator() != ''>
valueSeparator='${codelist.getValueSeparator()}' <#t>
</#if>
</#if>
</app-rate>
</#if> </#if>
\ No newline at end of file
<#if editor?? && editor.render??> <#if editor?? && editor.render??>
${editor.render.code} ${editor.render.code}
<#else> <#else>
<app-rate name='${item.name}' :value="row[column.property]" @change="($event)=>{row[column.property] = $event; gridEditItemChange(row, column.property, $event, $index)} " :disabled="getColumnDisabled(row,column.property)" style="${item.getEditorCssStyle()}"></app-rate> <app-rate
name='${item.name}'
:value="row[column.property]"
@change="($event)=>{row[column.property] = $event; gridEditItemChange(row, column.property, $event, $index)} "
:disabled="getColumnDisabled(row,column.property)"
<#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}' <#t>
codelistType='${codelist.getCodeListType()}' <#t>
<#if codelist.getValueSeparator?? && codelist.getValueSeparator()?? && codelist.getValueSeparator() != ''>
valueSeparator='${codelist.getValueSeparator()}' <#t>
</#if>
</#if>
style="${item.getEditorCssStyle()}"></app-rate>
</#if> </#if>
\ No newline at end of file
...@@ -6,6 +6,14 @@ ...@@ -6,6 +6,14 @@
:value="data.${editor.name?lower_case}" :value="data.${editor.name?lower_case}"
@change="($event)=>{data.${editor.name?lower_case} = $event; panelEditItemChange(data, '${editor.name?lower_case}', $event)} " @change="($event)=>{data.${editor.name?lower_case} = $event; panelEditItemChange(data, '${editor.name?lower_case}', $event)} "
:disabled="detailsModel.${item.getCodeName()}.disabled" :disabled="detailsModel.${item.getCodeName()}.disabled"
<#if item.getPSCodeList?? && item.getPSCodeList()??>
<#assign codelist=item.getPSCodeList()>
tag='${codelist.codeName}' <#t>
codelistType='${codelist.getCodeListType()}' <#t>
<#if codelist.getValueSeparator?? && codelist.getValueSeparator()?? && codelist.getValueSeparator() != ''>
valueSeparator='${codelist.getValueSeparator()}' <#t>
</#if>
</#if>
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</app-rate> </app-rate>
</#if> </#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEMAPVIEW
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEMAPVIEW9
\ No newline at end of file
...@@ -7,6 +7,22 @@ ...@@ -7,6 +7,22 @@
*/ */
public split: number = 0.2; public split: number = 0.2;
/**
* 视图引用数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public viewRefData:any = {
<#if view.getPSAppViewRefs?? && view.getPSAppViewRefs()??>
<#list view.getPSAppViewRefs() as viewRef>
<#if viewRef.getName?? && viewRef.getName()?? && viewRef.getRefPSAppView?? && viewRef.getRefPSAppView()??>
<#assign refAppView = viewRef.getRefPSAppView() />
"${viewRef.getName()}":{viewname:"${srffilepath2(refAppView.getCodeName())}",title:"<#if refAppView.getPSAppDataEntity()??>entities.${refAppView.getPSAppDataEntity().getCodeName()?lower_case}.views.${refAppView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${refAppView.getCodeName()?lower_case}.caption</#if>", width: <#if refAppView.getWidth?? && refAppView.getWidth() gt 0>${refAppView.getWidth()?c}<#else>800</#if>, height: <#if refAppView.getHeight?? && refAppView.getHeight() gt 0>${refAppView.getHeight()?c}<#else>500</#if>}<#if viewRef_has_next>,</#if>
</#if>
</#list>
</#if>
};
/** /**
* 树导航栏数据 * 树导航栏数据
* *
...@@ -135,16 +151,36 @@ ...@@ -135,16 +151,36 @@
if (xData.getDatas && xData.getDatas instanceof Function) { if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
xData.submitbatch(datas,linkItem).then((response: any) => { const submitBatchData:Function = (submitdata:any,linkItem:any) =>{
if (!response || response.status !== 200) { xData.submitbatch(submitdata,linkItem).then((response: any) => {
return; if (!response || response.status !== 200) {
} return;
const { data: _data } = response; }
this.engine.load(); const { data: _data } = response;
if (this.viewdata) { this.engine.load();
this.$emit('viewdataschange', [{ ..._data }]); if (this.viewdata) {
} this.$emit('viewdataschange', [{ ..._data }]);
}); }
});
}
if(linkItem && linkItem.sequenceflowview && <#noparse>this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`]</#noparse>){
let tempContext:any = Util.deepCopy(this.context);
let tempViewParam:any = {actionView:linkItem.sequenceflowview,actionForm:linkItem.sequenceflowform};
<#noparse>let targetView:any = this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`];</#noparse>
const appmodal = this.$appmodal.openModal({viewname:targetView.viewname, title:(this.$t(targetView.title) as string), height: targetView.height, width: targetView.width}, tempContext,tempViewParam);
appmodal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
let tempSubmitData:any = Util.deepCopy(datas);
tempSubmitData.forEach((element:any) => {
element.viewparams = result.datas && result.datas[0];
});
submitBatchData(tempSubmitData,linkItem);
});
}else{
submitBatchData(datas,linkItem);
}
} }
/** /**
...@@ -170,7 +206,9 @@ ...@@ -170,7 +206,9 @@
public setTreeNodeHighLight(data: any): void { public setTreeNodeHighLight(data: any): void {
this.$nextTick(() =>{ this.$nextTick(() =>{
const tree: any = this.$refs.tree; const tree: any = this.$refs.tree;
tree.setCurrentKey(data.userTaskId); if(tree) {
tree.setCurrentKey(data.userTaskId);
}
}) })
} }
<#if view.hasPSControl('grid')> <#if view.hasPSControl('grid')>
......
<#assign watch_viewparam_block>
if(this.viewparams && this.viewparams.actionForm){
this.computeActivedForm(this.viewparams.actionForm);
}else{
this.computeActivedForm(null);
}
</#assign>
<#assign mounted_block>
this.viewState.next({ tag: "form", action: "autoload", data: {srfkey:this.context.${appde.getCodeName()?lower_case}} });
</#assign>
<#assign self_content>
/**
* 当前激活表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public activeForm:any = {};
/**
* 所有表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
/**
* 所有表单数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public allForm: any = {
<#if view.getAllPSControls?? && view.getAllPSControls()??>
<#list view.getAllPSControls() as singleControl>
<#if singleControl.getControlType?? && singleControl.getControlType()?? && singleControl.getControlType() != "TOOLBAR">
"${singleControl.getName()}":{name:"view_${singleControl.getName()}",autosave:"${singleControl.isEnableAutoSave()?c}",showBusyIndicator:"${singleControl.isShowBusyIndicator()?c}",updateAction:"<#if singleControl.getUpdatePSControlAction()?? && singleControl.getUpdatePSControlAction().getPSAppDEMethod()??>${singleControl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",removeAction:"<#if singleControl.getRemovePSControlAction()?? && singleControl.getRemovePSControlAction().getPSAppDEMethod()??>${singleControl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",loaddraftAction:"<#if singleControl.getGetDraftPSControlAction()?? && singleControl.getGetDraftPSControlAction().getPSAppDEMethod()??>${singleControl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",loadAction:"<#if singleControl.getGetPSControlAction()?? && singleControl.getGetPSControlAction().getPSAppDEMethod()??>${singleControl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",createAction:"<#if singleControl.getCreatePSControlAction()?? && singleControl.getCreatePSControlAction().getPSAppDEMethod()??>${singleControl.getCreatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",WFSubmitAction:"<#if singleControl.getWFSubmitPSControlAction()?? && singleControl.getWFSubmitPSControlAction().getPSAppDEMethod()??>${singleControl.getWFSubmitPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",WFStartAction:"<#if singleControl.getWFStartPSControlAction()?? && singleControl.getWFStartPSControlAction().getPSAppDEMethod()??>${singleControl.getWFStartPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"}<#if singleControl_has_next>,</#if>
</#if>
</#list>
</#if>
};
/**
* 计算激活表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public computeActivedForm(inputForm:any){
if(!inputForm){
this.activeForm = this.allForm && Object.values(this.allForm)[0];
return;
}
if(this.allForm && Object.keys(this.allForm).length >0){
Object.keys(this.allForm).forEach((name:string) =>{
if(Object.is(name,<#noparse>`wfform_${inputForm.toLowerCase()}`</#noparse>)){
this.activeForm = this.allForm[name];
}
})
}
}
/**
* 确认
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public onClickOk(){
let xData:any = this.$refs.form;
if(xData){
let preFormData:any = xData.getData();
let nextFormData:any = xData.transformData(preFormData);
Object.assign(preFormData,nextFormData);
this.$store.commit('viewaction/setViewDataChange', { viewtag: this.viewtag, viewdatachange: false });
this.$emit('viewdataschange', [preFormData]);
this.$emit('close', null);
}
}
/**
* 取消
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public onClickCancel(){
this.$emit('close', null);
}
</#assign>
<#ibizinclude>
../@MACRO/VIEW-BASE.vue.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEWFDYNAACTIONVIEW
\ No newline at end of file
...@@ -6,6 +6,44 @@ ...@@ -6,6 +6,44 @@
*/ */
public linkModel:Array<any> = []; public linkModel:Array<any> = [];
/**
* 激活表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public activeForm:any = {};
/**
* 所有表单数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public allForm: any = {
<#if view.getAllPSControls?? && view.getAllPSControls()??>
<#list view.getAllPSControls() as singleControl>
<#if singleControl.getControlType?? && singleControl.getControlType()?? && singleControl.getControlType() != "TOOLBAR">
"${singleControl.getName()}":{name:"view_${singleControl.getName()}",autosave:"${singleControl.isEnableAutoSave()?c}",showBusyIndicator:"${singleControl.isShowBusyIndicator()?c}",updateAction:"<#if singleControl.getUpdatePSControlAction()?? && singleControl.getUpdatePSControlAction().getPSAppDEMethod()??>${singleControl.getUpdatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",removeAction:"<#if singleControl.getRemovePSControlAction()?? && singleControl.getRemovePSControlAction().getPSAppDEMethod()??>${singleControl.getRemovePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",loaddraftAction:"<#if singleControl.getGetDraftPSControlAction()?? && singleControl.getGetDraftPSControlAction().getPSAppDEMethod()??>${singleControl.getGetDraftPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",loadAction:"<#if singleControl.getGetPSControlAction()?? && singleControl.getGetPSControlAction().getPSAppDEMethod()??>${singleControl.getGetPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",createAction:"<#if singleControl.getCreatePSControlAction()?? && singleControl.getCreatePSControlAction().getPSAppDEMethod()??>${singleControl.getCreatePSControlAction().getPSAppDEMethod().getCodeName()}</#if>",WFSubmitAction:"<#if singleControl.getWFSubmitPSControlAction()?? && singleControl.getWFSubmitPSControlAction().getPSAppDEMethod()??>${singleControl.getWFSubmitPSControlAction().getPSAppDEMethod().getCodeName()}</#if>",WFStartAction:"<#if singleControl.getWFStartPSControlAction()?? && singleControl.getWFStartPSControlAction().getPSAppDEMethod()??>${singleControl.getWFStartPSControlAction().getPSAppDEMethod().getCodeName()}</#if>"}<#if singleControl_has_next>,</#if>
</#if>
</#list>
</#if>
};
/**
* 视图引用数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public viewRefData:any = {
<#if view.getPSAppViewRefs?? && view.getPSAppViewRefs()??>
<#list view.getPSAppViewRefs() as viewRef>
<#if viewRef.getName?? && viewRef.getName()?? && viewRef.getRefPSAppView?? && viewRef.getRefPSAppView()??>
<#assign refAppView = viewRef.getRefPSAppView() />
"${viewRef.getName()}":{viewname:"${srffilepath2(refAppView.getCodeName())}",title:"<#if refAppView.getPSAppDataEntity()??>entities.${refAppView.getPSAppDataEntity().getCodeName()?lower_case}.views.${refAppView.getPSDEViewCodeName()?lower_case}.caption<#else>app.views.${refAppView.getCodeName()?lower_case}.caption</#if>", width: <#if refAppView.getWidth?? && refAppView.getWidth() gt 0>${refAppView.getWidth()?c}<#else>800</#if>, height: <#if refAppView.getHeight?? && refAppView.getHeight() gt 0>${refAppView.getHeight()?c}<#else>500</#if>}<#if viewRef_has_next>,</#if>
</#if>
</#list>
</#if>
};
/** /**
* 获取工具栏按钮 * 获取工具栏按钮
* *
...@@ -14,16 +52,17 @@ ...@@ -14,16 +52,17 @@
public getWFLinkModel():Promise<any>{ public getWFLinkModel():Promise<any>{
return new Promise((resolve:any, reject:any) =>{ return new Promise((resolve:any, reject:any) =>{
let datas: any[] = []; let datas: any[] = [];
let xData: any = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(Object.keys(this.viewparams).length > 0){ if(Object.keys(this.viewparams).length > 0){
Object.assign(datas,{'taskDefinitionKey':this.viewparams.userTaskId}); Object.assign(datas,{'taskDefinitionKey':this.viewparams.userTaskId});
} }
this.appEntityService.GetWFLink(JSON.parse(JSON.stringify(this.context)),datas,true).then((response:any) =>{ this.appEntityService.GetWFLink(JSON.parse(JSON.stringify(this.context)),datas,true).then((response:any) =>{
if (response && response.status === 200) { if (response && response.status === 200) {
this.linkModel = response.data; this.linkModel = response.data;
if(response.headers && response.headers['process-form']){
this.computeActivedForm(response.headers['process-form']);
}else{
this.computeActivedForm(null);
}
resolve(response.data); resolve(response.data);
} }
}).catch((response: any) => { }).catch((response: any) => {
...@@ -39,6 +78,25 @@ ...@@ -39,6 +78,25 @@
}); });
} }
/**
* 计算激活表单
*
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public computeActivedForm(inputForm:any){
if(!inputForm){
this.activeForm = this.allForm && Object.values(this.allForm)[0];
return;
}
if(this.allForm && Object.keys(this.allForm).length >0){
Object.keys(this.allForm).forEach((name:string) =>{
<#noparse>if(Object.is(name,`wfform_${inputForm.toLowerCase()}`)){</#noparse>
this.activeForm = this.allForm[name];
}
})
}
}
/** /**
* 动态工具栏点击 * 动态工具栏点击
* *
...@@ -50,19 +108,40 @@ ...@@ -50,19 +108,40 @@
if (xData.getDatas && xData.getDatas instanceof Function) { if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()]; datas = [...xData.getDatas()];
} }
xData.wfsubmit(datas,linkItem).then((response: any) => { const submit:Function = (submitData:any,linkItem:any) =>{
if (!response || response.status !== 200) { xData.wfsubmit(submitData,linkItem).then((response: any) => {
return; if (!response || response.status !== 200) {
} return;
const { data: _data } = response; }
const { data: _data } = response;
if (this.viewdata) { if (this.viewdata) {
this.$emit('viewdataschange', [{ ..._data }]); this.$emit('viewdataschange', [{ ..._data }]);
this.$emit('close'); this.$emit('close');
} else if (this.$tabPageExp) { } else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath); this.$tabPageExp.onClose(this.$route.fullPath);
} }
}); });
}
if(linkItem && linkItem.sequenceflowview && <#noparse>this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`]</#noparse>){
let tempContext:any = Util.deepCopy(this.context);
Object.assign(tempContext,{${appde.getCodeName()?lower_case}:datas && datas[0].srfkey});
let tempViewParam:any = {actionView:linkItem.sequenceflowview,actionForm:linkItem.sequenceflowform};
let targetView:any = <#noparse>this.viewRefData[`WFACTION@${linkItem.sequenceflowview}`];</#noparse>
const appmodal = this.$appmodal.openModal({viewname:targetView.viewname, title:(this.$t(targetView.title) as string), height: targetView.height, width: targetView.width}, tempContext,tempViewParam);
appmodal.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
let tempSubmitData:any = Util.deepCopy(datas);
tempSubmitData.forEach((element:any) => {
Object.assign(element,result.datas && result.datas[0]);
});
submit(tempSubmitData,linkItem);
});
}else{
submit(datas,linkItem);
}
} }
</#assign> </#assign>
......
...@@ -15,6 +15,15 @@ import 'view-design/dist/styles/iview.css'; ...@@ -15,6 +15,15 @@ import 'view-design/dist/styles/iview.css';
import 'ibiz-vue-lib/lib/ibiz-vue-lib.css'; import 'ibiz-vue-lib/lib/ibiz-vue-lib.css';
import '@/styles/default.less'; import '@/styles/default.less';
import VueAMap from 'vue-amap';
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
key: '6ab2751103aea67e817c90a5528181b5',
plugin: ["AMap.Geolocation","AMap.PlaceSearch","AMap.Geocoder", "AMap.Autocomplete"],
uiVersion: '1.1'
});
// 模拟数据 // 模拟数据
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
require('@/mock'); require('@/mock');
......
...@@ -32,6 +32,7 @@ TARGET=PSSYSAPP ...@@ -32,6 +32,7 @@ TARGET=PSSYSAPP
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"ibiz-gantt-elastic": "^1.0.17", "ibiz-gantt-elastic": "^1.0.17",
"ibiz-vue-lib": "^0.1.13", "ibiz-vue-lib": "^0.1.13",
"ibiz-vue-pivottable": "^1.0.6",
"interactjs": "^1.9.4", "interactjs": "^1.9.4",
"moment": "^2.24.0", "moment": "^2.24.0",
"path-to-regexp": "^6.1.0", "path-to-regexp": "^6.1.0",
...@@ -40,6 +41,7 @@ TARGET=PSSYSAPP ...@@ -40,6 +41,7 @@ TARGET=PSSYSAPP
"tinymce": "4.8.5", "tinymce": "4.8.5",
"view-design": "4.2.0", "view-design": "4.2.0",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-amap": "^0.5.10",
"vue-class-component": "^7.0.2", "vue-class-component": "^7.0.2",
"vue-grid-layout": "^2.3.7", "vue-grid-layout": "^2.3.7",
"vue-i18n": "^8.15.3", "vue-i18n": "^8.15.3",
......
...@@ -133,6 +133,8 @@ export default class ${srfclassname('${item.getCodeName()}')} { ...@@ -133,6 +133,8 @@ export default class ${srfclassname('${item.getCodeName()}')} {
Object.assign(itemdata,{text:item.<#if item.getTextPSAppDEField()??>${item.getTextPSAppDEField().getCodeName()?lower_case}<#else>${item.getPSAppDataEntity().getMajorPSAppDEField().codeName?lower_case}</#if>}); Object.assign(itemdata,{text:item.<#if item.getTextPSAppDEField()??>${item.getTextPSAppDEField().getCodeName()?lower_case}<#else>${item.getPSAppDataEntity().getMajorPSAppDEField().codeName?lower_case}</#if>});
Object.assign(itemdata,{label:item.<#if item.getTextPSAppDEField()??>${item.getTextPSAppDEField().getCodeName()?lower_case}<#else>${item.getPSAppDataEntity().getMajorPSAppDEField().codeName?lower_case}</#if>}); Object.assign(itemdata,{label:item.<#if item.getTextPSAppDEField()??>${item.getTextPSAppDEField().getCodeName()?lower_case}<#else>${item.getPSAppDataEntity().getMajorPSAppDEField().codeName?lower_case}</#if>});
<#if item.getPValuePSAppDEField()??>Object.assign(itemdata,{pvalue:item.${item.getPValuePSAppDEField().getCodeName()?lower_case}});</#if> <#if item.getPValuePSAppDEField()??>Object.assign(itemdata,{pvalue:item.${item.getPValuePSAppDEField().getCodeName()?lower_case}});</#if>
<#if item.getIconPathPSDEField()??>Object.assign(itemdata,{icon:item.${item.getIconPathPSDEField().getCodeName()?lower_case}});</#if>
<#if item.getIconClsPSDEField()??>Object.assign(itemdata,{iconcls:item.${item.getIconClsPSDEField().getCodeName()?lower_case}});</#if>
_items.push(itemdata); _items.push(itemdata);
}); });
} }
......
...@@ -26,7 +26,7 @@ import { Verify } from '@/utils/verify/verify'; ...@@ -26,7 +26,7 @@ import { Verify } from '@/utils/verify/verify';
<#if logicparam.getSrcFieldName()??> <#if logicparam.getSrcFieldName()??>
<#assign srcFieldParamName = logicparam.getSrcFieldName() /> <#assign srcFieldParamName = logicparam.getSrcFieldName() />
<#if srcParam?? && srcParam.getParamPSAppDataEntity?? && srcParam.getParamPSAppDataEntity()?? && srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true)??> <#if srcParam?? && srcParam.getParamPSAppDataEntity?? && srcParam.getParamPSAppDataEntity()?? && srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true)??>
<#assign srcFieldParam=srfcaseformat(srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true).getCodeName()?lower_case,'l_u2lC') /> <#assign srcFieldParam=srcParam.getParamPSAppDataEntity().getPSAppDEField(srcFieldParamName,true).getCodeName()?lower_case />
<#else> <#else>
<#assign srcFieldParam= logicparam.getSrcFieldName()?lower_case /> <#assign srcFieldParam= logicparam.getSrcFieldName()?lower_case />
</#if> </#if>
...@@ -36,7 +36,7 @@ import { Verify } from '@/utils/verify/verify'; ...@@ -36,7 +36,7 @@ import { Verify } from '@/utils/verify/verify';
<#-- 目标参数属性名称 --> <#-- 目标参数属性名称 -->
<#assign dstFieldParamName = logicparam.getDstFieldName() /> <#assign dstFieldParamName = logicparam.getDstFieldName() />
<#if dstParam?? && dstParam.getParamPSAppDataEntity?? && dstParam.getParamPSAppDataEntity()?? && dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true)??> <#if dstParam?? && dstParam.getParamPSAppDataEntity?? && dstParam.getParamPSAppDataEntity()?? && dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true)??>
<#assign dstFieldParam=srfcaseformat(dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true).getCodeName()?lower_case,'l_u2lC') /> <#assign dstFieldParam=dstParam.getParamPSAppDataEntity().getPSAppDEField(dstFieldParamName,true).getCodeName()?lower_case />
<#else> <#else>
<#assign dstFieldParam= logicparam.getDstFieldName()?lower_case /> <#assign dstFieldParam= logicparam.getDstFieldName()?lower_case />
</#if> </#if>
......
...@@ -132,13 +132,13 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -132,13 +132,13 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#elseif singleAppMethod.getMethodType() == "FETCH"> <#elseif singleAppMethod.getMethodType() == "FETCH">
if(${condition}true){ if(${condition}true){
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading);<#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if> let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading);<#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
} }
<#-- 方法类型为FETCHTEMP --> <#-- 方法类型为FETCHTEMP -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP"> <#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
if(${condition}true){ if(${condition}true){
let res:any = Http.getInstance().get(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if> let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${path}${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" >${afterActionStr}</#if>
return res; return res;
} }
<#else> <#else>
...@@ -234,12 +234,12 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr ...@@ -234,12 +234,12 @@ import ${srfclassname('${singleLogic.getCodeName()}')}Logic from '@/service/${sr
<#-- 方法类型为FETCH --> <#-- 方法类型为FETCH -->
<#elseif singleAppMethod.getMethodType() == "FETCH"> <#elseif singleAppMethod.getMethodType() == "FETCH">
let tempData:any = JSON.parse(JSON.stringify(data)); let tempData:any = JSON.parse(JSON.stringify(data));
let res:any = Http.getInstance().get(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading);<#if afterActionStr?? && afterActionStr !="" > let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,tempData,isloading);<#if afterActionStr?? && afterActionStr !="" >
${afterActionStr}</#if> ${afterActionStr}</#if>
return res; return res;
<#-- 方法类型为FETCHTEMP --> <#-- 方法类型为FETCHTEMP -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP"> <#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
let res:any = Http.getInstance().get(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" > let res:any = Http.getInstance().${singleServiceApi.getRequestMethod()?lower_case}(`/${srfpluralize(item.codeName)?lower_case}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`,data,isloading);<#if afterActionStr?? && afterActionStr !="" >
${afterActionStr}</#if> ${afterActionStr}</#if>
return res; return res;
<#else> <#else>
...@@ -683,6 +683,53 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends ...@@ -683,6 +683,53 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
<#-- 无实体行为,有接口走接口,无接口走本地供数 end --> <#-- 无实体行为,有接口走接口,无接口走本地供数 end -->
</#if> </#if>
} }
<#-- 查询数据集(post方式)start -->
<#if singleAppMethod.getMethodType?? && singleAppMethod.getMethodType()?? && singleAppMethod.getMethodType() == "FETCH">
<#assign dataSet = singleAppMethod.getPSDEDataSet() />
/**
* search${dataSet.getCodeName()}接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/
public async search${dataSet.getCodeName()}(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
<#if singleAppMethod.getPSDEAction()??>
<#assign appdeAction = singleAppMethod.getPSDEAction() />
<#if appdeAction.getTestActionMode?? && appdeAction.getTestActionMode()?? && (appdeAction.getTestActionMode() == 1 || appdeAction.getTestActionMode() == 3)>
let result:any = await this.test${srfclassname('search${dataSet.getCodeName()}')}(context,data);
if(!result) return;
</#if>
</#if>
<#-- 检查行为是否可以执行 end -->
<#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??>
<#list 1..item.getPSAppDERSPathCount() as count>
<#assign path = ''/>
<#assign condition = ''/>
<#list item.getPSAppDERSPath(count_index) as deRSPath>
<#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??>
<#assign _dataEntity = deRSPath.getMajorPSAppDataEntity()/>
<#assign condition>${condition}context.${_dataEntity.getCodeName()?lower_case} && </#assign>
<#assign path>${path}${srfpluralize(_dataEntity.codeName)?lower_case}/<#noparse>$</#noparse>{context.${_dataEntity.getCodeName()?lower_case}}/</#assign>
</#if>
</#list>
if(${condition}true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/${path}${srfpluralize(item.codeName)?lower_case}/search${dataSet.getCodeName()?lower_case}`,tempData,isloading);
}
</#list>
</#if>
<#if item.isMajor()>
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/${srfpluralize(item.codeName)?lower_case}/search${dataSet.getCodeName()?lower_case}`,tempData,isloading);
</#if>
}
</#if>
<#-- 查询数据集(post方式)end -->
<#-- 检查行为是否可以执行 start --> <#-- 检查行为是否可以执行 start -->
<#-- @author zpc --> <#-- @author zpc -->
<#-- @update 2020.7.13 17:00 --> <#-- @update 2020.7.13 17:00 -->
...@@ -701,6 +748,21 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends ...@@ -701,6 +748,21 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
<@getTestActionModifier appdeAction=appdeAction/> async test${srfclassname('${singleAppMethod.getCodeName()}')}(context: any = {},data: any = {}): Promise<any> { <@getTestActionModifier appdeAction=appdeAction/> async test${srfclassname('${singleAppMethod.getCodeName()}')}(context: any = {},data: any = {}): Promise<any> {
return true; return true;
} }
<#if singleAppMethod.getMethodType?? && singleAppMethod.getMethodType()?? && singleAppMethod.getMethodType() == "FETCH">
<#assign dataSet = singleAppMethod.getPSDEDataSet() />
/**
* test${srfclassname('search${dataSet.getCodeName()}')}方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/
<@getTestActionModifier appdeAction=appdeAction/> async test${srfclassname('search${dataSet.getCodeName()}')}(context: any = {},data: any = {}): Promise<any> {
return true;
}
</#if>
</#if> </#if>
</#if> </#if>
<#-- 检查行为是否可以执行 end --> <#-- 检查行为是否可以执行 end -->
......
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MAP
</#ibiztemplate>
${P.getCtrlCode('CONTROL-BASE.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MAP
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MAP
</#ibiztemplate>
${P.getCtrlCode('SERVICE.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MAP
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_MAP
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
## v7.0.0-alpha.22 [2020-11-22]
### Bug修复
修复表单项值校验错误信息提示问题 [7dcad593](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/7dcad593036a9c6ea0612bdbf2e99fc1bee20062)
修复表单新建和更新默认值问题 [426f7930](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/426f793037ca228e3ae2b6449df9c10359d4844a)
修复表格新建更新默认值问题 [73a7f288](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/73a7f288493f8606a3bcf3a697c68c86171d12f2)[daac8796](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/daac8796532556617979fbfa91dc78033cc31215)
修复搜索表单新建默认值问题 [940c4e6b](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/940c4e6b854f7f32de41656535c329da683ca631)
修复图表加载逻辑问题 [b35ee838](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/b35ee83875787b3edb1df20c92c932b55972e092)
修复应用菜单计算权限异常问题 [c3335e88](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/c3335e8858ec1137ca65d35114f3a060ae56e2ba)
修复表单数据对象报错问题 [5722dbb4](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/5722dbb48122dbc60c8904b634995c906d10a456)
修复主信息属性映射表单项名称报错问题 [1a948e6d](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/1a948e6d52cf133dae90990cd3c2b0262559fd60)[b2f366a0](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/b2f366a05fbf2b1ed00d199ad0856a0ac7099809)[81f9ddee](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/81f9ddee9a859451ed860d155e2ea7d265ee3457)
修复表格分页加载未重置当前页为第一页问题 [8cc91599](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/8cc91599c6ef83e3a1e387d2d8f8857443452af9)
修复图表无数据刷新问题 [485463d8](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/485463d8a13522d87a240eea01faa35da3ae3e1b)
修复多数据选择视图未引入选择视图面板问题 [ed3130dd](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/ed3130dd859417e3659be3ba8af914e3d8622612)
修复视图viewparams为字符串时处理逻辑异常问题 [55d26f5f](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/55d26f5f6729e3bb3ef5211d0459a8503ac3250f)
修复看板视图整合参数问题 [9e4828f1](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/9e4828f1d3be520dfe2c53d4938f13bf569a0d06)
修复表格排序属性异常问题 [5e746632](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/5e7466326a19a411662e10f959d946152eee511c)
修复实体处理逻辑异常问题 [29e2e495](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/29e2e4959afc5a1fcf36e374dd357212fe86f382)
### 功能新增及优化
#### 模板
新增图表视图添加快速分组代码表和快速搜索栏 [b3305963](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/b33059638134e4245aab6c6498a721c87aa8ad61)[99711fd0](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/99711fd0d50384e03645ff0948d551d5a9b63691)
新增标签(地址栏插件) [22271ea9](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/22271ea9e5d636dbbc3850511cdce36089bc7dfa)[a348ff6b](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/a348ff6b11b4348cf191a59b422e85e8f67d304e)
新增复合表单项值规则 [0b838bdf](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/0b838bdf805fd48e2c898fc63a296cd4b01151dc)[a88f78dd](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/a88f78dda0ff2c3bacf58c4bb04cb1ede539792a)
新增表单按钮无图标使用界面行为图标逻辑 [a214c5b8](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/a214c5b88bf0bb1d669b468991180ddfc4b7e4f8)[90cbf4b8](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/90cbf4b8c3474922e6b065ba70e3138191491947)
新增列表部件操作列界面行为支持 [4a2664b1](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/4a2664b1525f8850cc5c39a541c7bc907a6d81b8)[0586ad9d](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/0586ad9d1534caa06eaecb3484c73f7dc9f0fdfa)[63dc0dab](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/63dc0dabb1adcf0a56ebe9d97f9bb1ece562fad6)[6ee19a63](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/6ee19a63f87346f7edd0fc1c7d95ce4b212357f7)
新增数据视图部件操作列界面行为支持 [ef18acdf](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/ef18acdf5b10264fd40fa43a3375aeec2830c71b)[218333d5](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/218333d54e596ed97b62027bd35340b96e35b5f5)
新增关系界面表格保存提示内容显示 [50b9a9f7](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/50b9a9f7925359aa84e23ffa27bf0d7a9a527cbd)
新增列表批操作工具栏和快速工具栏支持 [ddb1d067](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/ddb1d067b299cab6eab9c049940da5623bd42298)[d56c3d79](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/d56c3d79747baac4e6d0aa1501873a4680dd1291)
新增数据视图批操作工具栏和快速工具栏支持 [aba0f9e0](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/aba0f9e00e50f18b804297bb3a440812d8a32f23)[9f8fdce8](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/9f8fdce8e73e02b223524812ced0300282429072)[ef753f43](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/ef753f43754c5ff29b0ee2f1f9986b5bbd44cac1)[dac712a2](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/dac712a2a2c84653deaab1cdfb0680d2b555a43f)[6e2bccea](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/6e2bccea860951bb1ea85b2a1be8280189eaca31)[974aadd1](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/974aadd1fe47768d33a7e508d81323be9c6cd7fd)
新增工作流动态操作视图支持 [065a8dce](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/065a8dce5550b051245793e58af5bc5484464e07)[6f9a0ee3](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/6f9a0ee3536f4e5cb6d32bcdc79a4c9aec1afd9e)[5fd6366d](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/5fd6366d50dde1fe2e8168e23bfb6d6964792ca0)[a40bf66b](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/a40bf66b9066197c9a2757e66a45f00e3e3eacb5)[0cdd5713](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/0cdd571311b0f4d379977d836d6ca7c1f287c55c)[21264471](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/21264471b30b713bdc873ca87d66ae5979b39ef8)[bc85a97b](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/bc85a97bdeb18bdc70c0f71ccc9f29e1448b5399)[fcea460c](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/fcea460ce3c320c0c02556cf4cb997d5b36a64f2)[729bc0a6](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/729bc0a680203e81dc3e6118ebfe72bc40784c63)[b1a569ac](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/b1a569acf82aa3e777cfa6d596615c6048c2f980)[81857c4a](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/81857c4ac443137a49649023dfc1ac9f7136c10e)
新增表格(透视表)插件 [4f57e1ba](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/4f57e1baad8881fb3a069fb293044b16daa08e44)
新增看板视图支持看板展开与收缩 [104bde80](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/104bde80f844cf4f985e76d234095c9857d4ea59)
新增数据服务查询数据集(post方式)方法 [c2fe9f3b](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/c2fe9f3bf8bedd12255650b3969817123b6701de)
新增代码表服务图标属性 [20c54b64](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/20c54b6409d5e3343a74c84ef7241f868d7ddae9)
新增实体地图视图及地图部件 [9943b1c0](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/9943b1c01f1146b95dd45464a2896b03c85783e8)
新增实体地图视图(部件视图) [f3887778](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/f3887778d471cbec33eddf56756e2d4d07a1818f)
新增地图定位组件 [84297814](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/842978148e116dfef3b044cfcce934f5468d16d5)[fd2ae711](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/fd2ae71184646ad13a5d5a2ac50701bbdc7cd0f5)[9742d2a0](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/9742d2a0f2210fd4a5e73e2254985cfc21065761)
优化前台调用界面行为关闭编辑或弹出视图逻辑 [8d191a79](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/8d191a790a52ed46985e1f8faf8de8266cfa08d8)
优化表单保存提示信息 [93cdc68b](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/93cdc68bc84486c2a4df70ab144eeadae78ab1a3)
优化表格值规则校验 [e3bf8fd1](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/e3bf8fd10f52ff1d3d1746cc675780a9e1d8f0ce)[a6544f41](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/a6544f41e7e547d9b18893d2b990e0e7ea04458e)[92f12d80](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/92f12d801cc4e540c7b1034782faed5b6459132c)
优化表单值规则校验 [e100c8eb](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/e100c8eb79eb3d0d9646d93b929698d159a43200)[5ed59675](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/5ed59675e2a8c515054804d9e40a4de83ff30bf7)[19d639ee](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/19d639ee7e18e04d678898f8e499b61b18812cb7)
优化表格、表单属性值规则校验异常捕获逻辑 [8f78ffad](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/8f78ffadaa42c2ca1ecb3fac94022df7b6f795a8)[2cbedd77](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/2cbedd7759be86933b3136ec2d43df4f0b959a2d)[5f719edd](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/5f719edd3bfce6abff63ba229fc79abaaa5714d7)[53b99003](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/53b99003e1bfa941d0175ed263825490eacb5b80)
优化直接内容项html类型 [c9712800](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/c9712800819554064b8aace92306e74a4cd41c30)
优化表单、表格提示信息内容 [cfefe47d](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/cfefe47df2321cbdc5c9149d709e3de6ae3af153)[6a908895](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/6a908895a4cad9af3b6d2baa8f0b342c06a45ea5)[ff815b76](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/ff815b766207692483420b3fb3fdc48e1af1a716)
优化表格删除提示信息内容 [3dc02183](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/3dc021833cac72e7e37c963c0f46ed7fa9d3b97c)
优化编辑器占位提示 [60e296d9](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/60e296d94d1c331ff1f6d4c920ea7b929de36e2a)[3128fdbf](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/3128fdbf55e7dfbb5f6b9438137ef87d549743e8)
优化列表部件数据分组逻辑 [c8a74e10](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/c8a74e10c6f3fa4b15dba8141c4f52509b1ee5eb)[55a3fb4b](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/55a3fb4b649c50a645670ab8dda7d8aad7fea802)
优化表格部件数据分组逻辑 [75624d3e](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/75624d3e042a7a15d55568ae92c1578948ad1b13)[7873329d](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/7873329de8c3f0805d1b72945b43b14220f61bc7)[982a2c2b](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/982a2c2b48fe71c326b68d7020c22a4daebb4a89)[276f90d3](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/276f90d3b2bd6cc18899cadec9d11fc2e8236433)[d6377294](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/d63772945d4db25f2a743d355e1b648992cf0048)[d326d83a](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/d326d83a2030aa17a04aa2e482b44acf4973e5ad)[b8ad5bfd](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/b8ad5bfde4fdfc13765a2e25d48a7583b0dcad1a)[641a67f4](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/641a67f4183997c45dfe3b4775cd1b75b315b195)[8db35ec3](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/8db35ec34c00a47d67f7f864461e8b005988e597)[faecb1cc](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/faecb1cc20142420a79a57f9cef5b71053a1d98d)
优化实体工作流动态导航表格视图逻辑 [909f0cd4](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/909f0cd48133b974f2a8d634a252f0dd7248ea5c)[1e9a4fe9](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/1e9a4fe92e64a86aea9b730da8f9b7a72ee0ee11)[899e6882](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/899e68821c06e2d584c5b03304ca11d6d6edbc6b)[64d99a8c](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/64d99a8ceb2c942dbf9c1e6089718d2c53bffc86)[729bc0a6](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/729bc0a680203e81dc3e6118ebfe72bc40784c63)[e57c1f14](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/e57c1f141e256f4813c347197461bccaad9c1194)[bd46e456](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/bd46e4565331e8bb4757514d80b17615186db1d5)[f3e4468a](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/f3e4468af140170e4dd7c5f5882ff0bcc9621b81)
优化实体工作流动态编辑视图逻辑 [909f0cd4](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/909f0cd48133b974f2a8d634a252f0dd7248ea5c)[1e9a4fe9](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/1e9a4fe92e64a86aea9b730da8f9b7a72ee0ee11)[899e6882](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/899e68821c06e2d584c5b03304ca11d6d6edbc6b)[e89a302d](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/e89a302d477433808d61b4cf7ec4f62455a8aeb7)[91feb5aa](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/91feb5aabcef545b20bc3de935dcb0cd2f92f1f7)[9c892670](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/9c8926700f7c6526bafd9a84ea00c861f731f521)[ff0c64f1](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/ff0c64f19a075d13f2258c80fcc19dec77c4ac7f)[729bc0a6](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/729bc0a680203e81dc3e6118ebfe72bc40784c63)[bd46e456](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/bd46e4565331e8bb4757514d80b17615186db1d5)[f3e4468a](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/f3e4468af140170e4dd7c5f5882ff0bcc9621b81)
优化面板标签代码表发布值分隔符 [6a0029df](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/6a0029dfcd0d5970114d0040d1712775105ec4f3)
优化数据图表部件增加高度发布逻辑 [aca0084a](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/aca0084a00011cec55096984293425de4fdef57e)
优化数据看板部件逻辑 [160dedcd](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/160dedcdd4c66e25bc83abebf3e471beebefa857)[d005eeba](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/d005eeba57c974063a1df0cca914d2c7b012d470)[d10cf154](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/d10cf154f0887dcd011cdd99f711bdcc98e64205)
优化评分器编辑器支持代码表逻辑 [e2f0d18f](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/e2f0d18f5820a7acbf198635de190843da91467a)
优化看板视图部件嵌入面板数据处理 [b07ba68c](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/b07ba68c5d1f1823fce2e52d985cbcc3a7fb85c4)
#### 基础文件
修复图表视图、图表部件视图获取快速分组和搜索栏参数及样式 [cc9ec9d8](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/cc9ec9d88483c7f14ccd519897778635b9385b14)
修复工具栏按钮异常问题 [f66edc45](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/f66edc45e909ec0d1fbb47861c8ea336819ce0aa)
修复修复下拉列表框不加载数据异常 [503581d7](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/503581d771cbb628a5cfb170bb10e68808cbaf5b)
修复关系界面内嵌视图出现不加载的情况 [c1d6db61](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/c1d6db6130ff6a5768f9d982e75949cde86307f0)
新增部件服务增加根据后台标识获取前台数据标识名称能力 [a07d7088](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/a07d70887e5044f415a29d92f136ef910231a2dd)
新增图标绘制组件 [3a160350](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/3a1603502740cde5ee12051bd2ee3c76abe2b554)[9653dd15](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/9653dd15cdef7b97ce0c022d78c6236d3bf9d8fe)
新增响应头错误状态汇总 [3cb2a17f](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/3cb2a17f78d262efab0914a3d025de29e36d5641)
新增透视表表格插件 [dbebc115](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/dbebc115cfa9d90cca2518db27646c935fc5c11c)
新增代码表获取代码表项能力 [06c53dca](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/06c53dca2963165c8593cf2b7f2ba6f9e0f13f0c)[f856c55f](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/f856c55f6983bfab490848dfefed0a8ca29bac9b)
新增实体地图视图引擎 [5ccb40ba](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/5ccb40ba780548f7758e0cf4027fb8a16affc56d)
新增实体地图视图(部件视图)引擎 [da07aede](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/da07aede9151f474740da1cabcaa10e8bc1b3749)
新增地图定位组件 [b76bf4ba](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/b76bf4ba09630d477e1a75637a76b39974b8ff2f)[19c862e7](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/19c862e71eabdf4e10a56118ea32c3f23793e68b)[1683f20e](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/1683f20e070d0f2a1c738929ca4eb018d61eaea0)
优化数据选择下拉时清空旧数据 [a42584a4](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/a42584a4235a0beb0d155b47890e5e685d9eb5ac)
优化视图消息样式 [22406733](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/22406733fecb566929770e688e5d06fa7b6ed5d1)
优化代码表组件增加图片识别 [853d4ad4](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/853d4ad406a35cfb013dbc18188aeb45d148b8b6)[bc879205](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/bc879205eb35dba743974a9af189de0292dd4979)
优化工作流动态编辑视图加载逻辑 [19760cf6](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/19760cf6f32f9bb47aa75ffe13ca5db8639cc250)
优化引用avue.min.js的文件路径 [e4a9d11d](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/e4a9d11db906cc8e18a0f290cb66fd2c3fc277a1)
优化评分器编辑器支持代码表逻辑 [28721171](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/28721171ffa8d5adae6d9b567838041e320c5767)[453c1e6c](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/453c1e6c79b31a49d189c40a4537a60fa0dd0023)
优化表单项label长度过长显示异常和支持label显示html [fc754a29](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/fc754a294d553d70d4e634df940069012a16a7e1)[ed804eb6](http://demo.ibizlab.cn/ibizr7pfstdtempl/ibizvuer7/commit/ed804eb6b5bccab109b92edd5419310363bc0b68)
## v7.0.0-alpha.21 [2020-10-31] ## v7.0.0-alpha.21 [2020-10-31]
### Bug修复 ### Bug修复
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册