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

2020.5.28 更新

上级 bff128fc
...@@ -156,7 +156,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get ...@@ -156,7 +156,7 @@ export default class <#if ctrl.getPSAppDataEntity()??>${srfclassname('${ctrl.get
<#else> <#else>
<#if ctrlLogic.getEventArg()?? && ctrlLogic.getEventArg()?length gt 0> <#if ctrlLogic.getEventArg()?? && ctrlLogic.getEventArg()?length gt 0>
if (Object.is($event.tag, '${ctrlLogic.getEventArg()}')) { if (Object.is($event.tag, '${ctrlLogic.getEventArg()}')) {
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2); this.${ctrlLogic.name}(null, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
} }
<#else> <#else>
this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2); this.${ctrlLogic.name}($event, '<#if ctrlLogic.getLogicTag()?length gt 0>${ctrlLogic.getLogicTag()}</#if>', $event2);
......
...@@ -133,6 +133,22 @@ ...@@ -133,6 +133,22 @@
*/ */
public totalRecord: number = 0; public totalRecord: number = 0;
/**
* 排序方向
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public sortDir:string = '<#if ctrl.getMinorSortDir()??>${ctrl.getMinorSortDir()?lower_case}</#if>';
/**
* 排序字段
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public sortField: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>';
/** /**
* 选中数组 * 选中数组
* @type {Array<any>} * @type {Array<any>}
...@@ -254,11 +270,18 @@ ...@@ -254,11 +270,18 @@
if (this.isEnablePagingBar) { if (this.isEnablePagingBar) {
Object.assign(page, { page: this.curPage-1, size: this.limit }); Object.assign(page, { page: this.curPage-1, size: this.limit });
} }
// 设置排序
if (!Object.is(this.sortDir, '') && !Object.is(this.sortField, '')) {
const sort: string = this.sortField+","+this.sortDir;
Object.assign(page, { sort: sort });
}
Object.assign(arg, page); Object.assign(arg, page);
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata); Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams}); let tempViewParams:any = parentdata.viewparams?parentdata.viewparams:{};
Object.assign(tempViewParams,JSON.parse(JSON.stringify(this.viewparams)));
Object.assign(arg,{viewparams:tempViewParams});
const post: Promise<any> = this.service.search(this.fetchAction, this.context?JSON.parse(JSON.stringify(this.context)):{}, arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction, this.context?JSON.parse(JSON.stringify(this.context)):{}, arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
......
...@@ -65,6 +65,10 @@ ...@@ -65,6 +65,10 @@
name:'query', name:'query',
prop:'query' prop:'query'
}, },
{
name:'sort',
prop:'sort'
},
{ {
name:'page', name:'page',
prop:'page' prop:'page'
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>; public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()?c}<#else>0</#if>;
/** /**
* 控件高度 * 控件高度
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()}<#else>0</#if>; public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()?c}<#else>0</#if>;
/** /**
* 搜素值 * 搜素值
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>; public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()?c}<#else>0</#if>;
/** /**
* 控件高度 * 控件高度
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()}<#else>0</#if>; public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()?c}<#else>0</#if>;
/** /**
* 搜素值 * 搜素值
......
...@@ -361,6 +361,33 @@ new ChartBarSeries({ ...@@ -361,6 +361,33 @@ new ChartBarSeries({
}, },
seriesLayoutBy:"${item.getSeriesLayoutBy()}" seriesLayoutBy:"${item.getSeriesLayoutBy()}"
}) })
<#elseif item.getEChartsType() == "radar">
new ChartRadarSeries({
name:'${item.name?lower_case}',
type:'radar',
<#if item.getIdField()??>seriesIdField:"${item.getIdField()?lower_case}",</#if>
<#if item.getSeriesField()??>seriesNameField:"${item.getSeriesField()?lower_case}",</#if>
categorField:'${item.getCatalogField()?lower_case}',
<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}',emptycode:'empty',emptytext:'${categorCodeList.getEmptyText()}'},</#if>
valueField:'${item.getValueField()?lower_case}',
seriesValues:[],
data:[],
<#if item.getPSChartDataSet()??>
<#assign chartDataSet = item.getPSChartDataSet()/>
<#if chartDataSet.getPSChartDataSetFields()??>
dataSetFields:[
<#list chartDataSet.getPSChartDataSetFields() as singleField>
{name:"${singleField.getName()?lower_case}",codelist:<#if singleField.getPSCodeList()??><#assign codelist = singleField.getPSCodeList()/>{type:"${codelist.getCodeListType()}",tag:"${codelist.getCodeName()}",emptycode:'empty',emptytext:'${codelist.getEmptyText()}'}<#else>null</#if>,isGroupField:${singleField.isGroupField()?c},groupMode:"${singleField.getGroupMode()}"}<#if singleField_has_next>,</#if>
</#list>
],
</#if>
</#if>
baseOption:{
<#if item.getBaseOptionJOString()??>
${item.getBaseOptionJOString()}
</#if>
}
})
<#else> <#else>
new ChartLineSeries({name:'${item.name?lower_case}',categorField:'${item.getCatalogField()?lower_case}',<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}'},</#if>valueField:'${item.getValueField()?lower_case}',data:[]}), new ChartLineSeries({name:'${item.name?lower_case}',categorField:'${item.getCatalogField()?lower_case}',<#if item.getCatalogPSCodeList()??><#assign categorCodeList = item.getCatalogPSCodeList() />categorCodeList:{type:'${categorCodeList.getCodeListType()}',tag:'${categorCodeList.getCodeName()}'},</#if>valueField:'${item.getValueField()?lower_case}',data:[]}),
</#if> </#if>
......
<#-- 折线图序列start -->
<#if item.render??>
${item.render.code}
<#else>
{
id:'<#if item.getName()??>${item.getName()?lower_case}</#if>',
name:'<#if item.getCaption()??>${item.getCaption()}</#if>',
type:'radar',
encode:{
<#if item.getCatalogField()??>itemName:"${item.getCatalogField()}"</#if>
}<#if item.getBaseOptionJOString()??>,
${item.getBaseOptionJOString()}
</#if>
}
</#if>
<#-- 折线图序列end -->
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
import echarts from 'echarts'; import echarts from 'echarts';
import moment from "moment"; import moment from "moment";
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,ChartBarSeries} from '@/model/chart-detail'; import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,ChartBarSeries,ChartRadarSeries} from '@/model/chart-detail';
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
...@@ -264,7 +264,16 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -264,7 +264,16 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
const parentdata: any = {}; const parentdata: any = {};
this.$emit('beforeload', parentdata); this.$emit('beforeload', parentdata);
Object.assign(arg, parentdata); Object.assign(arg, parentdata);
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams,page:0,size:1000});
<#if ctrl.getPSDEDataSet()??>
<#assign appDataSet = ctrl.getPSDEDataSet() />
<#if appDataSet.getMajorSortDir()?? && appDataSet.getMajorSortPSDEField()??>
Object.assign(arg,{sort: '${appDataSet.getMajorSortPSDEField().getCodeName()?lower_case},${appDataSet.getMajorSortDir()?lower_case}'});
</#if>
<#if appDataSet.getPageSize()??>
Object.assign(arg,{size:${appDataSet.getPageSize()}});
</#if>
</#if>
this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => { this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg,this.showBusyIndicator).then((res) => {
if (res) { if (res) {
this.transformToBasicChartSetData(res.data,() =>{_this.drawCharts()}); this.transformToBasicChartSetData(res.data,() =>{_this.drawCharts()});
...@@ -327,19 +336,28 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -327,19 +336,28 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
} }
//设置多序列 //设置多序列
let tempSeries:any = this.seriesModel[seriesName]; let tempSeries:any = this.seriesModel[seriesName];
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){ // 雷达图
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{ if(tempSeries.type && Object.is(tempSeries.type,'radar') && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){
return Object.is(item.id,seriesName); let tempIndicator:any = [];
}) tempSeries.seriesValues.forEach((item:any) =>{
this.chartOption.series.splice(returnIndex,1); let singleIndicatorObj:any = {name:item,max:100};
let tempSeriesArray:Array<any> = []; tempIndicator.push(singleIndicatorObj);
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp);
}) })
this.chartOption.radar = {'indicator':tempIndicator};
}else{
// 非雷达图
if(tempSeries && tempSeries.seriesIdField && tempSeries.seriesValues.length > 0){
const returnIndex:number = this.chartOption.series.findIndex((item:any) =>{
return Object.is(item.id,seriesName);
})
this.chartOption.series.splice(returnIndex,1);
let tempSeriesArray:Array<any> = [];
tempSeries.seriesValues.forEach((seriesvalueItem:any) =>{
let tempSeriesTemp:any = JSON.parse(JSON.stringify(tempSeries.seriesTemp));
<#noparse>Object.assign(tempSeriesTemp,{name:tempSeries.seriesMap[seriesvalueItem],datasetIndex:tempSeries.seriesIndex,encode:{x:tempSeries.categorField,y:`${seriesvalueItem}`}});</#noparse>
this.chartOption.series.push(tempSeriesTemp);
})
}
} }
}) })
} }
...@@ -353,7 +371,13 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -353,7 +371,13 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
/** /**
* 实体数据集转化为图表数据集 * 实体数据集转化为图表数据集
* *
* 1.获取图表所有代码表值
* 2.查询集合映射图表数据集
* 3.补全图表数据集
* 4.图表数据集分组求和
* 5.排序图表数据集
*
* @param {*} data 实体数据集 * @param {*} data 实体数据集
* @param {Function} callback 回调 * @param {Function} callback 回调
* @memberof ${srfclassname('${ctrl.name}')}Base * @memberof ${srfclassname('${ctrl.name}')}Base
...@@ -366,6 +390,15 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -366,6 +390,15 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
let allCodeList:any = await this.getChartAllCodeList(); let allCodeList:any = await this.getChartAllCodeList();
if(Object.values(this.seriesModel).length > 0){ if(Object.values(this.seriesModel).length > 0){
Object.values(this.seriesModel).forEach((singleSeries:any,index:number) =>{ Object.values(this.seriesModel).forEach((singleSeries:any,index:number) =>{
// 值属性为srfcount设置{srfcount:1}到data
let valueField = singleSeries.dataSetFields.find((datasetField:any) =>{
return datasetField.name === singleSeries.valueField;
});
if(valueField && valueField.name && Object.is(valueField.name,"srfcount")){
data.forEach((singleData:any) =>{
Object.assign(singleData,{srfcount:1});
})
}
// 分组属性 // 分组属性
let groupField = singleSeries.dataSetFields.find((datasetField:any) =>{ let groupField = singleSeries.dataSetFields.find((datasetField:any) =>{
return datasetField.name === singleSeries.categorField; return datasetField.name === singleSeries.categorField;
...@@ -414,6 +447,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -414,6 +447,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
/** /**
* 构建图表序列数据集合 * 构建图表序列数据集合
* *
* 1.分组求和
* 2.排序求和数组
*
* @param {Array<any>} data 传入数据 * @param {Array<any>} data 传入数据
* @param {Array<any>} item 单个序列 * @param {Array<any>} item 单个序列
* @param {Array<any>} callback 回调 * @param {Array<any>} callback 回调
...@@ -573,6 +609,13 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -573,6 +609,13 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}) })
} }
returnArray = this.sortReturnArray(returnArray,groupFieldModel,allCodeList); returnArray = this.sortReturnArray(returnArray,groupFieldModel,allCodeList);
// 雷达图数据格式处理
if(Object.is(item.type,'radar')){
returnArray.forEach((item:any) =>{
item.type = item[groupField[0]];
delete item[groupField[0]];
})
}
console.log(JSON.stringify(returnArray)); console.log(JSON.stringify(returnArray));
return returnArray; return returnArray;
} }
...@@ -605,6 +648,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -605,6 +648,9 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
returnArray.push(item); returnArray.push(item);
} }
}) })
returnArray.forEach((item:any) =>{
delete item.hasused;
})
}else{ }else{
// 分组为年份 // 分组为年份
if(Object.is(groupField[0].groupMode,"YEAR")){ if(Object.is(groupField[0].groupMode,"YEAR")){
...@@ -622,7 +668,20 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -622,7 +668,20 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix(); return moment(a[groupField[0].name]).unix() - moment(b[groupField[0].name]).unix();
}); });
}else{ }else{
returnArray = arr; let groupFieldName:string = groupField[0].name;
let isConvert:boolean = true;
arr.forEach((item:any) =>{
if(isNaN(item[groupFieldName])){
isConvert = false;
}
})
if(isConvert){
returnArray = arr.sort((a:any, b:any) => {
return a[groupFieldName] - b[groupFieldName];
});
}else{
returnArray = arr;
}
} }
} }
return returnArray; return returnArray;
......
...@@ -10,10 +10,22 @@ ...@@ -10,10 +10,22 @@
*/ */
public getDataItems(): any[] { public getDataItems(): any[] {
return [ return [
{ {
name:'query', name:'size',
prop:'query' prop:'size'
}, },
{
name:'query',
prop:'query'
},
{
name:'page',
prop:'page'
},
{
name:'sort',
prop:'sort'
}
] ]
} }
......
...@@ -4,19 +4,29 @@ ...@@ -4,19 +4,29 @@
<app-build @handleClick="handleClick"></app-build> <app-build @handleClick="handleClick"></app-build>
</row> </row>
<row v-if="!isHasCustomized"> <row v-if="!isHasCustomized">
<#list ctrl.getPSPortlets() as portlet><#t> <#list ctrl.getPSPortlets() as portlet><#t>
<#if portlet.getPortletType?? && portlet.getPortletType()??><#t> <#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
<#assign layout='TABLE_24COL'><#if portlet.getPSLayoutPos()??><#if portlet.getPSLayoutPos().getParentPSLayout()??><#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'></#if></#if><#t> <#-- BEGIN:处理参数layout,LayoutPos -->
<#assign LayoutPos = portlet.getPSLayoutPos()><#t> <#assign layout='TABLE_24COL'>
<#if portlet_index == 0 > <#if portlet.getPSLayoutPos()??>
<#list ctrl.getPSPortlets() as container><#t> <#if portlet.getPSLayoutPos().getParentPSLayout()??>
<#assign layout='${portlet.getPSLayoutPos().getParentPSLayout().getLayout()}'>
</#if>
</#if>
<#assign LayoutPos = portlet.getPSLayoutPos()><#t>
<#-- END:处理参数layout,LayoutPos -->
<#-- BEGIN:第一个门户部件前 -->
<#if portlet_index == 0 >
<#list ctrl.getPSPortlets() as container><#t>
<#if container.getPortletType() == 'CONTAINER' && layout == 'FLEX'> <#if container.getPortletType() == 'CONTAINER' && layout == 'FLEX'>
<#assign flexLayout = container.getPSLayout()><#t> <#assign flexLayout = container.getPSLayout()><#t>
</#if> </#if>
</#list> </#list>
<div style = '<#if layout == 'FLEX' > display : flex; justify-content : ${flexLayout.getAlign()}; flex-direction:${flexLayout.getDir()} ;align-items:${flexLayout.getVAlign()};flex-wrap: wrap;</#if>'> <div style = '<#if layout == 'FLEX' > display : flex; justify-content : ${flexLayout.getAlign()}; flex-direction:${flexLayout.getDir()} ;align-items:${flexLayout.getVAlign()};flex-wrap: wrap;</#if>'>
</#if> </#if>
<#if layout == 'TABLE_24COL' && LayoutPos??><#t> <#-- END:第一个门户部件前 -->
<#-- BEGIN:门户部件绘制,栅格布局 -->
<#if layout == 'TABLE_24COL' && LayoutPos??><#t>
<i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>> <i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: ${LayoutPos.getColXS()}, offset: <#if LayoutPos.getColXSOffset() != -1>${LayoutPos.getColXSOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: ${LayoutPos.getColSM()}, offset: <#if LayoutPos.getColSMOffset() != -1>${LayoutPos.getColSMOffset()}<#else>0</#if>}"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: ${LayoutPos.getColMD()}, offset: <#if LayoutPos.getColMDOffset() != -1>${LayoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: ${LayoutPos.getColLG()}, offset: <#if LayoutPos.getColLGOffset() != -1>${LayoutPos.getColLGOffset()}<#else>0</#if> }"</#if>>
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content> <#if portlet.isShowTitleBar() && portlet.getTitle()?has_content>
...@@ -27,28 +37,14 @@ ...@@ -27,28 +37,14 @@
<a slot='extra'></a> <a slot='extra'></a>
</#if> </#if>
<span> <span>
<@ibizindent blank=10><#t> <@ibizindent blank=10><#t>
${P.getCtrlCode(portlet, 'CONTROL.html').code} ${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent> </@ibizindent>
</span> </span>
</card> </card>
</i-col> </i-col>
<#else> <#-- ELSE:门户部件布局,Flex -->
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <#else>
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content><#t>
<p slot='title'>
${portlet.getTitle()}
</p>
<a slot='extra'></a>
</#if>
<span>
<@ibizindent blank=10><#t>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</span>
</card>
</#if>
<#if layout == 'FLEX'>
<card class="portlet-card" :bordered="false" dis-hover :padding="0"> <card class="portlet-card" :bordered="false" dis-hover :padding="0">
<#if portlet.isShowTitleBar() && portlet.getTitle()?has_content><#t> <#if portlet.isShowTitleBar() && portlet.getTitle()?has_content><#t>
<p slot='title'> <p slot='title'>
...@@ -57,17 +53,20 @@ ${P.getCtrlCode(portlet, 'CONTROL.html').code} ...@@ -57,17 +53,20 @@ ${P.getCtrlCode(portlet, 'CONTROL.html').code}
<a slot='extra'></a> <a slot='extra'></a>
</#if> </#if>
<span> <span>
<@ibizindent blank=10><#t> <@ibizindent blank=10><#t>
${P.getCtrlCode(portlet, 'CONTROL.html').code} ${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent> </@ibizindent>
</span> </span>
</card> </card>
</#if> </#if>
<#if !portlet_has_next> <#-- END:门户部件布局 -->
</div> <#-- BEGIN:最后一个门户部件后 -->
</#if> <#if !portlet_has_next>
</#if> </div>
</#list> </#if>
<#-- END:最后一个门户部件后 -->
</#if>
</#list>
</row> </row>
<row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);"> <row v-if="isHasCustomized" style="width: 100%;min-height: calc(100% - 40px);">
<div class="portlet-container" style="position: relative;width:100%;"> <div class="portlet-container" style="position: relative;width:100%;">
......
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public sortDir:string = ''; public sortDir:string = '<#if ctrl.getMinorSortDir()??>${ctrl.getMinorSortDir()?lower_case}</#if>';
/** /**
* 排序字段 * 排序字段
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public sortField: string = ''; public sortField: string = '<#if ctrl.getMinorSortPSDEF()??>${ctrl.getMinorSortPSDEF().getCodeName()?lower_case}</#if>';
/** /**
* 排序点击事件 * 排序点击事件
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>; public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()?c}<#else>0</#if>;
/** /**
* 控件高度 * 控件高度
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()}<#else>0</#if>; public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()?c}<#else>0</#if>;
/** /**
* 搜素值 * 搜素值
......
...@@ -690,6 +690,7 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code} ...@@ -690,6 +690,7 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
</#list> </#list>
</#if> </#if>
} }
this.$emit('nodedblclick', this.selectedNodes);
} }
<#ibizinclude> <#ibizinclude>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<#if view.getViewType() == 'DEPICKUPTREEVIEW'> <#if view.getViewType() == 'DEPICKUPTREEVIEW'>
:isSingleSelect="isSingleSelect" :isSingleSelect="isSingleSelect"
:selectedData="selectedData" :selectedData="selectedData"
@nodedblclick="tree_nodedblclick($event)"
</#if> </#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>; public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()?c}<#else>0</#if>;
/** /**
* 过滤值 * 过滤值
......
...@@ -112,7 +112,6 @@ ...@@ -112,7 +112,6 @@
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
<#-- public split: string = '<#if ctrl.getWidth() gt 0>${ctrl.getWidth()?c}<#else>200</#if>px'; -->
public split: number = 0.2; public split: number = 0.2;
/** /**
......
...@@ -76,7 +76,7 @@ GanttElastic, ...@@ -76,7 +76,7 @@ GanttElastic,
*/ */
public options: any = { public options: any = {
isflex: true, isflex: true,
maxRows: 100, maxRows: 1000,
dataType: 'treegrid', dataType: 'treegrid',
title: { title: {
label: "" label: ""
...@@ -108,11 +108,26 @@ GanttElastic, ...@@ -108,11 +108,26 @@ GanttElastic,
<#list ctrl.getPSDETreeColumns() as column> <#list ctrl.getPSDETreeColumns() as column>
{ {
label: '${column.getCaption()}', label: '${column.getCaption()}',
value: '<#if column.getName() == "begin">start<#else>${column.getName()}</#if>', value: (task: any) => {
<#if column_index == 0> <#if column.render??>
${column.render.code}
<#else>
return this.getColumnValue(task, '<#if column.getName() == "begin">start<#else>${column.getName()}</#if>')
</#if>
},
<#if column.getName() == "text">
expander: true, expander: true,
</#if> </#if>
width: <#if column.getWidth() gt 0>${column.getWidth()}<#else>100</#if> width: <#if column.getWidth() gt 0>${column.getWidth()}<#else>100</#if>,
<#if column.isHideDefault()>
hidden: true,
</#if>
<#if column.getHeaderPSSysCss()??>
headerCls: '${column.getHeaderPSSysCss().getCssName()}',
</#if>
<#if column.getCellPSSysCss()??>
cellCls: '${column.getCellPSSysCss().getCssName()}',
</#if>
}, },
</#list> </#list>
</#if> </#if>
...@@ -127,9 +142,7 @@ GanttElastic, ...@@ -127,9 +142,7 @@ GanttElastic,
* @type {any[]} * @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public dynamicStyle: any = { public dynamicStyle: any = {};
};
/** /**
* 日程事件集合 * 日程事件集合
...@@ -151,6 +164,50 @@ GanttElastic, ...@@ -151,6 +164,50 @@ GanttElastic,
this.locale = newval; this.locale = newval;
} }
/**
* 获取列属性值
*
* @public
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getColumnValue(task: any, field: string) {
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
if(Object.is(task.id.split(';')[0], '${srfjavastring(node.getNodeType())}')) {
<#if node.getPSDETreeNodeDataItems()??>
<#list node.getPSDETreeNodeDataItems() as dataItem>
<#if dataItem.getFrontPSCodeList()??>
<#assign codelist = dataItem.getFrontPSCodeList()/>
if (Object.is(field, '${dataItem.name}')) {
let codelist: any[] = this.$store.getters.getCodeList('CodeList4');
if(codelist) {
return this.getCodeListItem(codelist, task[field]);
}
}
</#if>
</#list>
</#if>
return task[field];
}
</#list>
</#if>
}
/**
* 获取代码项
*
* @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;
}
/** /**
* 获取部件参数 * 获取部件参数
* *
...@@ -232,74 +289,13 @@ GanttElastic, ...@@ -232,74 +289,13 @@ GanttElastic,
*/ */
public taskItemExpand(task: any) { public taskItemExpand(task: any) {
if(!task.collapsed) { if(!task.collapsed) {
this.load(task); let index: number = this.tasks.findIndex((item: any) => Object.is(task.id, item.parentId));
} else { if(index < 0) {
let len: number = this.tasks.length; this.load(task);
let datas: any = [];
for(let i = len - 1;i >= 0; i--) {
if(!Object.is(task.id, this.tasks[i].parentId)) {
datas.push(this.tasks[i]);
}
} }
this.tasks = datas;
} }
} }
/**
* 获取编辑视图信息
*
* @param {*} $event 事件信息
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getEditView(deName: string) {
let view: any = {};
switch(deName){
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as ganttItem>
<#if ganttItem.getPSAppDataEntity()??>
<#assign _appde = ganttItem.getPSAppDataEntity() />
case "${_appde.getCodeName()?lower_case}":
<#if ganttItem.getNavPSAppView()??>
<#assign editview = ganttItem.getNavPSAppView()/>
view = {
viewname: '${srffilepath2(editview.getCodeName())}',
height: ${editview.getHeight()?c},
width: ${editview.getWidth()?c},
title: this.<@getViewLanguageTitle editview />,
placement: '${editview.getOpenMode()}',
deResParameters: <#rt>
<#if editview.isPSDEView()>
[<#t>
<#if editview.getPSAppDERSPathCount() gt 0>
<#list editview.getPSAppDERSPath(editview.getPSAppDERSPathCount() - 1) as deRSPath>
<#assign majorPSAppDataEntity = deRSPath.getMajorPSAppDataEntity()/><#t>
{ pathName: '${srfpluralize(majorPSAppDataEntity.codeName)?lower_case}', parameterName: '${majorPSAppDataEntity.getCodeName()?lower_case}' }, <#t>
</#list>
</#if>
],<#lt>
<#else>
[],<#lt>
</#if>
parameters: <#rt>
[<#t>
<#if editview.isPSDEView()>
<#assign appDataEntity = editview.getPSAppDataEntity()/>
{ pathName: '${srfpluralize(appDataEntity.codeName)?lower_case}', parameterName: '${appDataEntity.getCodeName()?lower_case}' }, <#t>
{ pathName: '${editview.getPSDEViewCodeName()?lower_case}', parameterName: '${editview.getPSDEViewCodeName()?lower_case}' } <#t>
<#else>
{ pathName: '${editview.getCodeName()?lower_case}', parameterName: '${editview.getCodeName()?lower_case}' } <#t>
</#if>
],<#lt>
};
</#if>
break;
</#if>
</#list>
</#if>
}
return view;
}
/** /**
* 刷新 * 刷新
* *
...@@ -357,41 +353,10 @@ GanttElastic, ...@@ -357,41 +353,10 @@ GanttElastic,
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public taskClick({event, data}: {event: any, data: any}) { public taskClick({event, data}: {event: any, data: any}) {
let view: any = {}; const _this: any = this;
let _context: any = Object.assign({},this.context);
let key: string = data.id.split(';')[0]; let key: string = data.id.split(';')[0];
switch(key) { if(_this[key + '_opendata'] instanceof Function) {
<#if ctrl.getPSDETreeNodes()??> _this[key + '_opendata']([data]);
<#list ctrl.getPSDETreeNodes() as ganttItem>
<#if ganttItem.getPSAppDataEntity()??>
<#assign _appde = ganttItem.getPSAppDataEntity() />
case "${ganttItem.getNodeType()}":
_context.${_appde.getCodeName()?lower_case} = data.${_appde.getCodeName()?lower_case};
view = this.getEditView("${_appde.getCodeName()?lower_case}");
break;
</#if>
</#list>
</#if>
}
// 根据打开模式打开视图
if (Object.is(view.placement, 'INDEXVIEWTAB') || Object.is(view.placement, '')) {
const routePath = this.$viewTool.buildUpRoutePath(this.$route, this.context, view.deResParameters, view.parameters, [JSON.parse(JSON.stringify(_context))] , JSON.parse(JSON.stringify(this.viewparams)));
this.$router.push(routePath);
} else {
let container: Subject<any> = new Subject();
if (Object.is(view.placement, 'POPOVER')) {
container = this.$apppopover.openPop(data, view,JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} else if (Object.is(view.placement, 'POPUPMODAL')) {
container = this.$appmodal.openModal(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
} else if (view.placement.startsWith('DRAWER')) {
container = this.$appdrawer.openDrawer(view, JSON.parse(JSON.stringify(_context)), JSON.parse(JSON.stringify(this.viewparams)));
}
container.subscribe((result: any) => {
if (!result || !Object.is(result.ret, 'OK')) {
return;
}
this.refresh();
});
} }
} }
......
<#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
@import '~@fullcalendar/core/main.css';
@import '~@fullcalendar/daygrid/main.css';
@import '~@fullcalendar/timegrid/main.css';
@import '~@fullcalendar/list/main.css';
.gantt { .gantt {
height: 100%; height: 100%;
.gantt-elastic__main-view-container { .gantt-elastic__main-view-container {
flex-grow: 1; flex-grow: 1;
} }
} }
\ No newline at end of file <#ibizinclude>
../@MACRO/CSS/DEFAULT.less.ftl
</#ibizinclude>
...@@ -99,6 +99,37 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -99,6 +99,37 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
</#list> </#list>
</#if> </#if>
/**
* 商品类别节点分隔符号
*
* @public
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public dataModel: any = {
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
${node.getNodeType()}: {
<#if node.getPSDETreeNodeDataItems()??>
<#list node.getPSDETreeNodeDataItems() as dataItem>
<#if dataItem.name == "barstyle">
style: {
prop: '<#if dataItem.getPSAppDEField()??>${dataItem.getPSAppDEField().getCodeName()?lower_case}</#if>',
default: <#if dataItem.getDefaultValue()?length gt 0>${dataItem.getDefaultValue()}<#else>null</#if>
},
<#else>
<#if dataItem.name == "begin">start<#else>${dataItem.name}</#if>: {
prop: '<#if dataItem.getPSAppDEField()??>${dataItem.getPSAppDEField().getCodeName()?lower_case}</#if>',
default: <#if dataItem.getDefaultValue()?length gt 0>'${dataItem.getDefaultValue()}'<#else>null</#if>
},
</#if>
</#list>
</#if>
},
</#list>
</#if>
}
/** /**
* 获取节点数据 * 获取节点数据
* *
...@@ -525,13 +556,6 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -525,13 +556,6 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
} }
} }
</#if> </#if>
<#if node.getPSDETreeNodeDataItems()??>
<#list node.getPSDETreeNodeDataItems() as dataitem>
<#if dataitem.getPSDEField()??>
Object.assign(treeNode, { <#if dataitem.name == "begin">start<#else>${dataitem.name?lower_case}</#if>: entity.${dataitem.getPSDEField().codeName?lower_case} });
</#if>
</#list>
</#if>
<#if node.isSelected()> <#if node.isSelected()>
Object.assign(treeNode, { selected: true }); Object.assign(treeNode, { selected: true });
</#if> </#if>
...@@ -547,6 +571,23 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se ...@@ -547,6 +571,23 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
if(!Object.is(filter.srfnodeid, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) { if(!Object.is(filter.srfnodeid, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(treeNode, { parentId: filter.srfotherkey }); Object.assign(treeNode, { parentId: filter.srfotherkey });
} }
for(let key in this.dataModel.${node.getNodeType()}) {
let item = this.dataModel.${node.getNodeType()}[key];
let propVal: any = entity[item.prop];
try {
let def: any = JSON.parse(item.default);
propVal = propVal != null ? propVal : def.value;
if (def.hasOwnProperty('bkcolor')) {
Object.assign(treeNode.style, { base: { fill: def.bkcolor, stroke: def.bkcolor }});
}
if (def.hasOwnProperty('color')) {
Object.assign(treeNode.style, { text: { color: def.color }});
}
} catch(e) {
propVal = propVal != null ? propVal : item.default
}
treeNode[key] = propVal
}
list.push(treeNode); list.push(treeNode);
resolve(list); resolve(list);
bFirst = false; bFirst = false;
......
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl ../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<i-form :model="this.data" class='app-form<#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if><#if ctrl.isInfoFormMode?? && ctrl.isInfoFormMode()> info-form-mode</#if>' ref='${ctrl.name}' id='${ctrl.name}' style="<#if ctrl.getFormWidth() gt 1>width: ${ctrl.getFormWidth()?c}px;</#if>"> <i-form :model="this.data" class='app-form<#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if><#if ctrl.isInfoFormMode?? && ctrl.isInfoFormMode()> info-form-mode</#if>' ref='${ctrl.name}' id='${ctrl.getPSAppDataEntity().getCodeName()?lower_case}_${ctrl.getCodeName()?lower_case}' style="<#if ctrl.getFormWidth() gt 1>width: ${ctrl.getFormWidth()?c}px;</#if>">
<input style="display:none;" /> <input style="display:none;" />
<row > <row >
<#if ctrl.isNoTabHeader()> <#if ctrl.isNoTabHeader()>
......
...@@ -13,6 +13,12 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -13,6 +13,12 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
/**
* 工作流审批意见控件绑定值
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public srfwfmemo:string = "";
/** /**
* 获取多项数据 * 获取多项数据
...@@ -797,7 +803,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -797,7 +803,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
*/ */
public print(){ public print(){
let _this:any = this; let _this:any = this;
_this.$print({id:'${ctrl.name}',popTitle:'${ctrl.getLogicName()}'}); _this.$print({id:'${ctrl.getPSAppDataEntity().getCodeName()?lower_case}_${ctrl.getCodeName()?lower_case}',popTitle:'${ctrl.getLogicName()}'});
} }
/** /**
...@@ -1193,6 +1199,10 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1193,6 +1199,10 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
if(this.viewparams){ if(this.viewparams){
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
} }
// 强制补充srfwfmemo
if(this.srfwfmemo){
Object.assign(arg,{srfwfmemo:this.srfwfmemo});
}
const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata); const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => { result.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
......
...@@ -28,6 +28,29 @@ ...@@ -28,6 +28,29 @@
] ]
</#macro> </#macro>
<#-- END:获取视图本身路由参数 --> <#-- 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()??>
<#assign img=item.getPSSysImage()>
<@insertBlank blankNum /> <i class='<#if 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> <#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl ../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -38,6 +61,7 @@ ...@@ -38,6 +61,7 @@
<#if item.getColumnType() == 'GROUPGRIDCOLUMN' && item.getPSDEGridColumns()??> <#if item.getColumnType() == 'GROUPGRIDCOLUMN' && item.getPSDEGridColumns()??>
<#-- BEGIN:分组列 --> <#-- 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>"> <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> <#list item.getPSDEGridColumns() as column>
${P.getPartCode(column,'COLUMN').code} ${P.getPartCode(column,'COLUMN').code}
</#list> </#list>
...@@ -46,12 +70,14 @@ ...@@ -46,12 +70,14 @@
<#elseif item.getColumnType() == 'UAGRIDCOLUMN'> <#elseif item.getColumnType() == 'UAGRIDCOLUMN'>
<#-- BEGIN:操作列 --> <#-- 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}'"> <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"> <template slot-scope="scope">
<span> <span>
<#if item.getPSDEUIActionGroup().getPSDEUIActions()??> <#if item.getPSDEUIActionGroup().getPSDEUIActions()??>
<#list item.getPSDEUIActionGroup().getPSDEUIActions() as uiaction> <#list item.getPSDEUIActionGroup().getPSUIActions() as uiaction>
<#if uiaction_index gt 0><divider type='vertical'></divider></#if> <#if uiaction_index gt 0><divider type='vertical'></divider></#if>
<a @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)"> <a @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)">
<i class='<#if uiaction.getIconCls?? && uiaction.getIconCls()??>${uiaction.getIconCls()}</#if>'></i>
{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}} {{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}
</a> </a>
</#list> </#list>
...@@ -63,7 +89,8 @@ ...@@ -63,7 +89,8 @@
<#elseif item.getColumnType() == 'DEFGRIDCOLUMN'> <#elseif item.getColumnType() == 'DEFGRIDCOLUMN'>
<#-- BEGIN:数据列 --> <#-- 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>> <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>>
<template v-slot="{row,column}"> <@getColumnHeader item 8 />
<template v-slot="{row,column,$index}">
<#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()> <#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()>
<#-- BEGIN:列绘制、前端绘制代码表、行编辑 --> <#-- BEGIN:列绘制、前端绘制代码表、行编辑 -->
<#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())> <#if (ctrl.isEnableRowEdit() && item.isEnableRowEdit())>
...@@ -74,11 +101,9 @@ ...@@ -74,11 +101,9 @@
<#-- END:列绘制 --> <#-- END:列绘制 -->
<#else> <#else>
<template v-if="actualIsOpenEdit"> <template v-if="actualIsOpenEdit">
<i-form style="height:100%;" :model="row"> <app-form-item :error="gridItemsModel[$index][column.property].error">
<app-form-item :name="column.property" :itemRules="rules[column.property]"> ${P.getEditorCode(item, "GRIDEIDTOR.vue").code}
${P.getEditorCode(item, "GRIDEIDTOR.vue").code} </app-form-item>
</app-form-item>
</i-form>
</template> </template>
</#if> </#if>
<#-- END:行编辑 --> <#-- END:行编辑 -->
......
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
overflow: hidden; overflow: hidden;
word-break: break-all; word-break: break-all;
} }
.el-table-column--selection .cell {
padding-left: 0px;
padding-right: 0px;
}
.app-column-link, .app-format-data{ .app-column-link, .app-format-data{
display: inline; display: inline;
} }
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()}<#else>0</#if>; public ctrlWidth:number = <#if ctrl.getWidth()??>${ctrl.getWidth()?c}<#else>0</#if>;
/** /**
* 控件高度 * 控件高度
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
* @type {number} * @type {number}
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()}<#else>0</#if>; public ctrlHeight: number = <#if ctrl.getHeight()??>${ctrl.getHeight()?c}<#else>0</#if>;
/** /**
* 选中数据 * 选中数据
......
...@@ -583,8 +583,9 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -583,8 +583,9 @@ import CodeListService from "@service/app/codelist-service";
keys.push(data.srfkey); keys.push(data.srfkey);
}); });
let _removeAction = keys.length > 1 ? 'removeBatch' : this.removeAction ; 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 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.join(';') }),Object.assign({ ${ctrl.getPSAppDataEntity().codeName?lower_case}: keys.join(';') },{viewparams:this.viewparams}), this.showBusyIndicator); 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) => { return new Promise((resolve: any, reject: any) => {
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
...@@ -1411,7 +1412,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1411,7 +1412,7 @@ import CodeListService from "@service/app/codelist-service";
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected save(args: any[], params?: any, $event?: any, xData?: any): void { protected async save(args: any[], params?: any, $event?: any, xData?: any) {
let _this = this; let _this = this;
let promises:any = []; let promises:any = [];
_this.items.forEach((item:any)=>{ _this.items.forEach((item:any)=>{
...@@ -1490,7 +1491,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1490,7 +1491,7 @@ import CodeListService from "@service/app/codelist-service";
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected onGridItemValueChange(row: any,$event: { name: string, value: any }): void { public onGridItemValueChange(row: any,$event: { name: string, value: any },rowIndex: number): void {
if (!$event) { if (!$event) {
return; return;
} }
...@@ -1511,7 +1512,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1511,7 +1512,7 @@ import CodeListService from "@service/app/codelist-service";
* @returns {void} * @returns {void}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected gridEditItemChange(row: any, property: string, value: any){ 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 ctrl.getPSDEGridEditItems()??> <#if ctrl.getPSDEGridEditItems()??>
<#list ctrl.getPSDEGridEditItems() as editItem> <#list ctrl.getPSDEGridEditItems() as editItem>
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<#comment><!--结束:快速搜索或工具栏存在--></#comment> <#comment><!--结束:快速搜索或工具栏存在--></#comment>
<#if view.hasPSControl('searchform')> <#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code} ${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if> </#if>
<#if view.hasPSControl('list')> <#if view.hasPSControl('list')>
${P.getCtrlCode('list', 'CONTROL.html').code} ${P.getCtrlCode('list', 'CONTROL.html').code}
</#if> </#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<#comment><!--结束:快速搜索或工具栏存在--></#comment> <#comment><!--结束:快速搜索或工具栏存在--></#comment>
<#if view.hasPSControl('searchform')> <#if view.hasPSControl('searchform')>
${P.getCtrlCode('searchform', 'CONTROL.html').code} ${P.getCtrlCode('searchform', 'CONTROL.html').code}
</#if> </#if>
<#if view.hasPSControl('list')> <#if view.hasPSControl('list')>
${P.getCtrlCode('list', 'CONTROL.html').code} ${P.getCtrlCode('list', 'CONTROL.html').code}
</#if> </#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
......
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/DEFAULT.vue.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=VIEWLAYOUTPANEL#APPDEGANTTVIEW9
\ No newline at end of file
...@@ -8,12 +8,13 @@ ...@@ -8,12 +8,13 @@
<#assign portletClass = "portlet"> <#assign portletClass = "portlet">
</#if> </#if>
<template> <template>
<div class='${portletClass} ${srffilepath2(ctrl.getCodeName())}' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : <#if ctrl.getHeight() == 1>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}"> <div class='${portletClass} ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': isAdaptiveSize ? '${portletHeight}' : <#if ctrl.getHeight() == 1>'auto'<#else>'${ctrl.getHeight()?c}px'</#if>,</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}">
<#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t> <#if ctrl.getPortletType?? && ctrl.getPortletType()??><#t>
<#-- 视图 --> <#-- 视图 -->
<#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t> <#if ctrl.getPortletType() == 'VIEW' && ctrl.getPortletPSAppView?? && ctrl.getPortletPSAppView()??><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()} ${ctrl.getTitle()}
</p> </p>
</#if> </#if>
...@@ -25,6 +26,7 @@ ...@@ -25,6 +26,7 @@
<#elseif ctrl.getPortletType() == 'APPMENU'><#t> <#elseif ctrl.getPortletType() == 'APPMENU'><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()} ${ctrl.getTitle()}
</p> </p>
</#if> </#if>
...@@ -38,6 +40,7 @@ ...@@ -38,6 +40,7 @@
<#elseif ctrl.getPortletType() == 'CUSTOM'> <#elseif ctrl.getPortletType() == 'CUSTOM'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()} ${ctrl.getTitle()}
</p> </p>
</#if> </#if>
...@@ -52,6 +55,7 @@ ...@@ -52,6 +55,7 @@
<#elseif ctrl.getPortletType() == 'ACTIONBAR'> <#elseif ctrl.getPortletType() == 'ACTIONBAR'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()} ${ctrl.getTitle()}
</p> </p>
</#if> </#if>
...@@ -66,6 +70,7 @@ ...@@ -66,6 +70,7 @@
<#elseif ctrl.getPortletType() == 'HTML'> <#elseif ctrl.getPortletType() == 'HTML'>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()} ${ctrl.getTitle()}
</p> </p>
</#if> </#if>
...@@ -96,13 +101,6 @@ ...@@ -96,13 +101,6 @@
</@ibizindent> </@ibizindent>
</div> </div>
</#if> </#if>
<#if layout == 'FLEX'>
<div class="portlet-without-title">
<@ibizindent blank=18>
${P.getCtrlCode(portlet, 'CONTROL.html').code}
</@ibizindent>
</div>
</#if>
<#if layout == 'FLEX' > <#if layout == 'FLEX' >
</div> </div>
</#if> </#if>
...@@ -112,6 +110,7 @@ ...@@ -112,6 +110,7 @@
<#elseif ctrl.getContentPSControl()??><#t> <#elseif ctrl.getContentPSControl()??><#t>
<#if ctrl.isShowTitleBar() && ctrl.getTitle()??> <#if ctrl.isShowTitleBar() && ctrl.getTitle()??>
<p class='portlet-title'> <p class='portlet-title'>
<i class='<#if ctrl.getPSSysImage()??><#assign img=ctrl.getPSSysImage()><#if img.getCssClass()?? && (img.getCssClass()?length gt 0)>${img.getCssClass()}</#if></#if>'></i>
${ctrl.getTitle()} ${ctrl.getTitle()}
</p> </p>
</#if> </#if>
...@@ -135,7 +134,7 @@ ...@@ -135,7 +134,7 @@
* 操作栏模型数据 * 操作栏模型数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public actionBarModelData:any[] =[ public actionBarModelData:any[] =[
<#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??>
...@@ -161,7 +160,7 @@ ...@@ -161,7 +160,7 @@
/** /**
* 触发界面行为 * 触发界面行为
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public handleItemClick($event:any){ public handleItemClick($event:any){
<#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics?? && ctrl.getPSAppViewLogics()??>
...@@ -174,11 +173,16 @@ ...@@ -174,11 +173,16 @@
} }
</#if> </#if>
<#if ctrl.getPortletType?? && ctrl.getPortletType()?? && ctrl.getPortletType() == "TOOLBAR" >
<#assign toolbar = ctrl.getContentPSControl()/>
${P.getCtrlCode(toolbar, 'CONTROL.vue').code}
</#if>
/** /**
* 是否自适应大小 * 是否自适应大小
* *
* @returns {boolean} * @returns {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Prop({default: false})public isAdaptiveSize!: boolean; @Prop({default: false})public isAdaptiveSize!: boolean;
...@@ -186,7 +190,7 @@ ...@@ -186,7 +190,7 @@
* 获取多项数据 * 获取多项数据
* *
* @returns {any[]} * @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getDatas(): any[] { public getDatas(): any[] {
return []; return [];
...@@ -196,7 +200,7 @@ ...@@ -196,7 +200,7 @@
* 获取单项树 * 获取单项树
* *
* @returns {*} * @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public getData(): any { public getData(): any {
return {}; return {};
...@@ -205,7 +209,7 @@ ...@@ -205,7 +209,7 @@
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public created() { public created() {
this.afterCreated(); this.afterCreated();
...@@ -214,7 +218,7 @@ ...@@ -214,7 +218,7 @@
/** /**
* 执行created后的逻辑 * 执行created后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterCreated(){ public afterCreated(){
if (this.viewState) { if (this.viewState) {
...@@ -233,7 +237,7 @@ ...@@ -233,7 +237,7 @@
/** /**
* vue 生命周期 * vue 生命周期
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public destroyed() { public destroyed() {
this.afterDestroy(); this.afterDestroy();
...@@ -242,7 +246,7 @@ ...@@ -242,7 +246,7 @@
/** /**
* 执行destroyed后的逻辑 * 执行destroyed后的逻辑
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public afterDestroy() { public afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
......
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
white-space: nowrap; white-space: nowrap;
color: #304265; color: #304265;
font-weight: 600; font-weight: 600;
i{
margin-right: 5px;
}
} }
> .portlet-with-title{ > .portlet-with-title{
width:100%; width:100%;
...@@ -38,4 +41,14 @@ ...@@ -38,4 +41,14 @@
.app-charts{ .app-charts{
height: 100%!important; height: 100%!important;
} }
.toolbar-container {
button{
margin: 6px 0px 4px 16px;
}
.ivu-badge{
.ivu-badge-count{
top: 0;
}
}
}
} }
\ No newline at end of file
<#assign flexAttr> <#assign flexAttr>
<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"><#assign layoutPos = item.getPSLayoutPos()/><#if layoutPos.getGrow() gt -1>flex-grow: ${layoutPos.getGrow()};</#if></#if></#assign> <#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"><#assign layoutPos = item.getPSLayoutPos()/><#if layoutPos.getGrow() gt -1>flex-grow: ${layoutPos.getGrow()};</#if></#if></#assign>
<#assign tableAttr> <#assign tableAttr>
<#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() != "FLEX"><#assign layoutPos = item.getPSLayoutPos()/><#if layoutPos.getColLG() gt -1> :lg="${layoutPos.getColLG()?c}"</#if><#if layoutPos.getColMD() gt -1> :md="${layoutPos.getColMD()?c}"</#if><#if layoutPos.getColSM() gt -1> :sm="${layoutPos.getColSM()?c}"</#if><#if layoutPos.getColXS() gt -1> :xs="${layoutPos.getColXS()?c}"</#if></#if></#assign> <#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() != "FLEX"><#t>
<#assign layoutPos = item.getPSLayoutPos()/><#t>
<#if layoutPos.getColXS() != -1> :xs="{ span: ${layoutPos.getColXS()}, offset: <#if layoutPos.getColXSOffset() != -1>${layoutPos.getColXSOffset()}<#else>0</#if> }"</#if><#t>
<#if layoutPos.getColSM() != -1> :sm="{ span: ${layoutPos.getColSM()}, offset: <#if layoutPos.getColSMOffset() != -1>${layoutPos.getColSMOffset()}<#else>0</#if> }"</#if><#t>
<#if layoutPos.getColMD() != -1> :md="{ span: ${layoutPos.getColMD()}, offset: <#if layoutPos.getColMDOffset() != -1>${layoutPos.getColMDOffset()}<#else>0</#if> }"</#if><#t>
<#if layoutPos.getColLG() != -1> :lg="{ span: ${layoutPos.getColLG()}, offset: <#if layoutPos.getColLGOffset() != -1>${layoutPos.getColLGOffset()}<#else>0</#if> }"</#if><#t>
</#if><#t>
</#assign>
<#assign content> <#assign content>
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
......
<#if item.getLogicType() == 'GROUP'><#if item.isNotMode()>!(</#if><#if item.getPSPanelItemLogics()??><#list item.getPSPanelItemLogics() as subLogic><#if subLogic_index gt 0><#if item.getGroupOP() == 'AND'> && </#if><#if item.getGroupOP() == 'OR'> || </#if></#if>${P.getPartCode(subLogic, 'DETAIL_LOGIC').code}</#list></#if><#if item.isNotMode()>)</#if><#elseif item.getLogicType() == 'SINGLE'>this.$verify.testCond(_${item.getDstModelField()?lower_case}, '${item.getCondOp()}', '${item.getValue()}')</#if>
\ No newline at end of file
<#assign selfContent> <#assign selfContent>
<i-button type="primary" long @click="${item.name}_click($event)" <#if item.getHeight() gt 0> style="height: ${item.getHeight()?c}px;"</#if>> <i-button type="primary" long <#if item.getPSUIAction?? && item.getPSUIAction()??>@click="uiAction(null, '${item.getPSUIAction().getUIActionTag()}', $event)"</#if> <#if item.getHeight() gt 0> style="height: ${item.getHeight()?c}px;"</#if>>
<#if item.getPSSysImage()??> <#if item.getPSSysImage()??>
<#assign image = item.getPSSysImage()> <#assign image = item.getPSSysImage()>
<i class="${image.getCssClass()}"></i> <i class="${image.getCssClass()}"></i>
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-button<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if layout.getLayout()=='FLEX'> <#if layout.getLayout()=='FLEX'>
<div class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>"> <div v-show="detailsModel.${item.name}.visible" class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>">
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<#-- <#if item.isShowCaption()> <#-- <#if item.isShowCaption()>
<#if item.getLabelPSSysCss()??> <#if item.getLabelPSSysCss()??>
<div class="${item.getLabelPSSysCss().getCssName()}" style="height: 50px;${item.getLabelPSSysCss().getRawCssStyle()}">${item.getCaption()}</div> <div class="${item.getLabelPSSysCss().getCssName()}" style="height: 50px;${item.getLabelPSSysCss().getRawCssStyle()}">${item.getCaption()}</div>
...@@ -15,21 +15,21 @@ ${item.render.code} ...@@ -15,21 +15,21 @@ ${item.render.code}
</#if> </#if>
</#if> --> </#if> -->
<div style="height:100%;display: flex;<#if layout.getDir()!="">flex-direction: ${layout.getDir()};</#if><#if layout.getAlign()!="">justify-content: ${layout.getAlign()};</#if><#if layout.getVAlign()!="">align-items: ${layout.getVAlign()};</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>"> <div style="height:100%;display: flex;<#if layout.getDir()!="">flex-direction: ${layout.getDir()};</#if><#if layout.getAlign()!="">justify-content: ${layout.getAlign()};</#if><#if layout.getVAlign()!="">align-items: ${layout.getVAlign()};</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>">
<@ibizindent blank=8> <@ibizindent blank=8>
<#if item.getPSPanelItems()??> <#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem> <#list item.getPSPanelItems() as panelItem>
${P.getPartCode(panelItem).code} ${P.getPartCode(panelItem).code}
</#list> </#list>
</#if> </#if>
</@ibizindent> </@ibizindent>
</div> </div>
</#if> </#if>
</div> </div>
<#else> <#else>
<i-col ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if>" class="app-layoutpanel-container<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<#-- <#if item.isShowCaption()> <#-- <#if item.isShowCaption()>
<#if item.getLabelPSSysCss()??> <#if item.getLabelPSSysCss()??>
<div class="${item.getLabelPSSysCss().getCssName()}" style="height: 50px;${item.getLabelPSSysCss().getRawCssStyle()}">${item.getCaption()}</div> <div class="${item.getLabelPSSysCss().getCssName()}" style="height: 50px;${item.getLabelPSSysCss().getRawCssStyle()}">${item.getCaption()}</div>
...@@ -38,14 +38,14 @@ ${item.render.code} ...@@ -38,14 +38,14 @@ ${item.render.code}
</#if> </#if>
</#if> --> </#if> -->
<row style="height:100%;<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>"> <row style="height:100%;<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>">
<@ibizindent blank=8> <@ibizindent blank=8>
<#if item.getPSPanelItems()??> <#if item.getPSPanelItems()??>
<#list item.getPSPanelItems() as panelItem> <#list item.getPSPanelItems() as panelItem>
${P.getPartCode(panelItem).code} ${P.getPartCode(panelItem).code}
</#list> </#list>
</#if> </#if>
</@ibizindent> </@ibizindent>
</row> </row>
</#if> </#if>
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
...@@ -6,11 +6,11 @@ ${P.getCtrlCode(item.getPSControl(), 'CONTROL.html').code} ...@@ -6,11 +6,11 @@ ${P.getCtrlCode(item.getPSControl(), 'CONTROL.html').code}
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
...@@ -10,11 +10,11 @@ ${P.getCtrlCode('${item.name}', 'CONTROL.html').code} ...@@ -10,11 +10,11 @@ ${P.getCtrlCode('${item.name}', 'CONTROL.html').code}
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getWidth() != -1>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() != -1>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col ${tableAttr} style="${flexAttr}<#if item.getWidth() != -1>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() != -1>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-ctrlpos<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field <#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field <#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getWidth() gt 0>width: ${item.getWidth()?c}px;</#if><#if item.getHeight() gt 0>height: ${item.getHeight()?c}px;</#if><#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-field<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
...@@ -6,11 +6,11 @@ ${item.getHtmlContent()} ...@@ -6,11 +6,11 @@ ${item.getHtmlContent()}
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col ${tableAttr} style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-rowitem<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
./@MACRO/PLAYOUT.vue.ftl ./@MACRO/PLAYOUT.vue.ftl
</#ibizinclude> </#ibizinclude>
<#if item.getParentLayoutMode()=='FLEX'> <#if item.getParentLayoutMode()=='FLEX'>
<div style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <div v-show="detailsModel.${item.name}.visible" style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</div> </div>
<#else> <#else>
<i-col ${tableAttr} style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>"> <i-col v-show="detailsModel.${item.name}.visible" ${tableAttr} style="${flexAttr}<#if item.getPSSysCss()??>${item.getPSSysCss().getRawCssStyle()}</#if>" class="app-layoutpanel-usercontrol<#if item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>">
${content} ${content}
</i-col> </i-col>
</#if> </#if>
\ No newline at end of file
<#list ctrl.getAllPSPanelItems() as panelitem>
<#if panelitem.getPSPanelItemGroupLogic('ITEMBLANK')??>
<#assign ITEMBLANK = panelitem.getPSPanelItemGroupLogic('ITEMBLANK')/>
if (Object.is(name, '')<#if ITEMBLANK.getRelatedItemNames()??><#list ITEMBLANK.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = true;
<#if ITEMBLANK.getRelatedItemNames()??>
<#list ITEMBLANK.getRelatedItemNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(ITEMBLANK, 'DETAIL_LOGIC').code}) {
ret = false;
}
this.rules.${panelitem.name}.some((rule: any) => {
if (rule.hasOwnProperty('required')) {
rule.required = ret;
}
return false;
});
}
</#if>
<#if panelitem.getPSPanelItemGroupLogic('ITEMENABLE')??>
<#assign ITEMENABLE = panelitem.getPSPanelItemGroupLogic('ITEMENABLE')/>
if (Object.is(name, '')<#if ITEMENABLE.getRelatedItemNames()??><#list ITEMENABLE.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if ITEMENABLE.getRelatedItemNames()??>
<#list ITEMENABLE.getRelatedItemNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(ITEMENABLE, 'DETAIL_LOGIC').code}) {
ret = true;
}
this.detailsModel.${panelitem.name}.setDisabled(!ret);
}
</#if>
<#if panelitem.getPSPanelItemGroupLogic('PANELVISIBLE')??>
<#assign PANELVISIBLE = panelitem.getPSPanelItemGroupLogic('PANELVISIBLE')/>
if (Object.is(name, '')<#if PANELVISIBLE.getRelatedItemNames()??><#list PANELVISIBLE.getRelatedItemNames() as detailName> || Object.is(name, '${detailName}')</#list></#if>) {
let ret = false;
<#if PANELVISIBLE.getRelatedItemNames()??>
<#list PANELVISIBLE.getRelatedItemNames() as detailName>
const _${detailName} = this.data.${detailName};
</#list>
</#if>
if (${P.getPartCode(PANELVISIBLE, 'DETAIL_LOGIC').code}) {
ret = true;
}
this.detailsModel.${panelitem.name}.setVisible(ret);
}
</#if>
</#list>
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
${P.getPartCode(item,'PANEL').code} ${P.getPartCode(item,'PANEL').code}
</template> </template>
<#assign import_block> <#assign import_block>
import { FormItemModel } from '@/model/form-detail';
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model'; import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import CodeListService from "@service/app/codelist-service"; import CodeListService from "@service/app/codelist-service";
</#assign> </#assign>
...@@ -48,6 +49,31 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -48,6 +49,31 @@ import CodeListService from "@service/app/codelist-service";
*/ */
public codeListService:CodeListService = new CodeListService({ $store:this.$store }); public codeListService:CodeListService = new CodeListService({ $store:this.$store });
/**
* 详情模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public detailsModel: any = {
<#list ctrl.getAllPSPanelItems() as panelItems>
${panelItems.name}: new FormItemModel({ visible: <#if panelItems.getPSPanelItemGroupLogic('PANELVISIBLE')??>false<#else>true</#if>, disabled: false, enableCond: 3 }),
</#list>
};
/**
* 面板逻辑
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public panelLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
<#if P.getPartCode(item,'PANEL_LOGIC').code?length gt 0>
${P.getPartCode(item,'PANEL_LOGIC').code}
</#if>
}
/** /**
* 数据模型对象 * 数据模型对象
* *
...@@ -73,6 +99,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -73,6 +99,7 @@ import CodeListService from "@service/app/codelist-service";
async onInputDataChange(newVal: any, oldVal: any){ async onInputDataChange(newVal: any, oldVal: any){
if(newVal){ if(newVal){
await this.computedUIData(newVal); await this.computedUIData(newVal);
this.panelLogic({ name: '', newVal: null, oldVal: null });
this.$forceUpdate(); this.$forceUpdate();
} }
} }
...@@ -185,6 +212,27 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -185,6 +212,27 @@ import CodeListService from "@service/app/codelist-service";
</#list> </#list>
</#if> </#if>
/**
* 界面行为
*
* @param {*} row
* @param {*} tag
* @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public uiAction(row: any, tag: any, $event: any) {
<#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>
}
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
type="text" type="text"
<#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if> <#if item.getUnitName?? && item.getUnitName()??>unit="${item.getUnitName()}"</#if>
<#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if> <#if item.getPlaceHolder()??>placeholder="${item.getPlaceHolder()}"</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event)}"> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box> </input-box>
\ No newline at end of file
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></dropdown-list> <dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list>
\ No newline at end of file \ No newline at end of file
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('FILLMAP','') != ''>${item.getEditorParam('FILLMAP','')}<#else>{}</#if>" filter="<#if item.getEditorParam('FILTER','') != ''>${item.getEditorParam('FILTER','')}</#if>" :multiple="<#if item.getEditorParam('MULTIPLE','') != ''>${item.getEditorParam('MULTIPLE','')}</#if>" style="${editor.getEditorCssStyle()}" @formitemvaluechange="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<span>单位选择</span>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
EDITORTYPE=DROPDOWNLIST#ORGSELECT
\ No newline at end of file
<app-department-select :data="data" name="${editor.name}" :value="data.${editor.name}" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('FILLMAP','') != ''>${item.getEditorParam('FILLMAP','')}<#else>{}</#if>" filter="<#if item.getEditorParam('FILTER','') != ''>${item.getEditorParam('FILTER','')}</#if>" <#if item.getEditorParam('MULTIPLE','') != ''>:multiple="${item.getEditorParam('MULTIPLE','')}"</#if> <#if item.getEditorParam('URL','') != ''>url="${item.getEditorParam('URL','')}"</#if> style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-department-select>
\ No newline at end of file
<span>部门选择</span>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
EDITORTYPE=DROPDOWNLIST#DEPATMENTSELECT
\ No newline at end of file
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></dropdown-list> <dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> style="${item.getEditorCssStyle()}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list>
\ No newline at end of file \ No newline at end of file
<dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}width: 100px;" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event)}"></dropdown-list> <dropdown-list v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" style="${item.getEditorCssStyle()}width: 100px;" <#if item.getPSCodeList()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></dropdown-list>
\ No newline at end of file \ No newline at end of file
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,6 @@
<#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if> <#if codelist.valueSeparator?has_content>valueSeparator="${codelist.valueSeparator}"</#if>
</#if> </#if>
placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if> placeholder=<#if item.getPlaceHolder()??>'${item.getPlaceHolder()}'<#else>'请选择...'</#if>
@change="($event)=>{gridEditItemChange(row, column.property, $event)}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"
style="${item.getEditorCssStyle()}"> style="${item.getEditorCssStyle()}">
</dropdown-list-mpicker> </dropdown-list-mpicker>
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
url=<#if editor.getEditorParam("url", "") != "">"${editor.getEditorParam("url", "")}"</#if>
<#if editor.getEditorParam("treeurl", "") != "">treeurl="${editor.getEditorParam("treeurl", "")}"</#if>
:multiple="<#if editor.getEditorParam("multiple", "") != "">${editor.getEditorParam("multiple", "")}<#else>true</#if>"
filter=<#if editor.getEditorParam("filter", "") != "">"${editor.getEditorParam("filter", "")}"<#else>"srforgid"</#if>
:fillmap=<#if editor.getEditorParam("fillMap", "") != "">"${editor.getEditorParam("fillMap", "")}"<#else>"{'id':'${editor.getValueItemName()}','label':'${editor.name}'}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
EDITORTYPE=PICKER#EMPSELECT
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
url=<#if editor.getEditorParam("url", "") != "">"${editor.getEditorParam("url", "")}"</#if>
<#if editor.getEditorParam("treeurl", "") != "">treeurl="${editor.getEditorParam("treeurl", "")}"</#if>
:multiple="<#if editor.getEditorParam("multiple", "") != "">${editor.getEditorParam("multiple", "")}<#else>true</#if>"
filter=<#if editor.getEditorParam("filter", "") != "">"${editor.getEditorParam("filter", "")}"<#else>"srforgid"</#if>
:fillmap=<#if editor.getEditorParam("fillMap", "") != "">"${editor.getEditorParam("fillMap", "")}"<#else>"{'id':'${editor.getValueItemName()}','label':'${editor.name}'}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
EDITORTYPE=PICKER#EMPMULTIPLE
\ No newline at end of file
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
url=<#if editor.getEditorParam("url", "") != "">"${editor.getEditorParam("url", "")}"</#if>
<#if editor.getEditorParam("treeurl", "") != "">treeurl="${editor.getEditorParam("treeurl", "")}"</#if>
:multiple="<#if editor.getEditorParam("multiple", "") != "">${editor.getEditorParam("multiple", "")}<#else>true</#if>"
filter=<#if editor.getEditorParam("filter", "") != "">"${editor.getEditorParam("filter", "")}"<#else>"srforgid"</#if>
:fillmap=<#if editor.getEditorParam("fillMap", "") != "">"${editor.getEditorParam("fillMap", "")}"<#else>"{'id':'${editor.getValueItemName()}','label':'${editor.name}'}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
<#ibizinclude>../@MACRO/FUNC/PUBLIC.vue.ftl</#ibizinclude>
<ibiz-group-select
name="${editor.name}"
:value='data.${editor.name}'
valueitem="${editor.getValueItemName()}"
url=<#if editor.getEditorParam("url", "") != "">"${editor.getEditorParam("url", "")}"</#if>
<#if editor.getEditorParam("treeurl", "") != "">treeurl="${editor.getEditorParam("treeurl", "")}"</#if>
:multiple="<#if editor.getEditorParam("multiple", "") != "">${editor.getEditorParam("multiple", "")}<#else>true</#if>"
filter=<#if editor.getEditorParam("filter", "") != "">"${editor.getEditorParam("filter", "")}"<#else>"srforgid"</#if>
:fillmap=<#if editor.getEditorParam("fillMap", "") != "">"${editor.getEditorParam("fillMap", "")}"<#else>"{'id':'${editor.getValueItemName()}','label':'${editor.name}'}"</#if>
:disabled="detailsModel.${editor.name}.disabled"
:data="data"
:context="context"
@formitemvaluechange="onFormItemValueChange">
</ibiz-group-select>
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<span>单位选择</span>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
EDITORTYPE=PICKER#ALLORGSELECT
\ No newline at end of file
<app-org-select :data="data" :context="JSON.parse(JSON.stringify(context))" :fillMap="<#if item.getEditorParam('fillMap','') != ''>${item.getEditorParam('fillMap','')}<#else>{'id':'${editor.getValueItemName()}','label':'${editor.name}'}</#if>" url="<#if item.getEditorParam('url','') != ''>${item.getEditorParam('url','')}</#if>" filter="<#if item.getEditorParam('filter','') != ''>${item.getEditorParam('filter','')}<#else>srforgid</#if>" :multiple="<#if item.getEditorParam('multiple','') != ''>${item.getEditorParam('multiple','')}<#else>false</#if>" style="${editor.getEditorCssStyle()}" @select-change="onFormItemValueChange"></app-org-select>
\ No newline at end of file
<span>单位选择</span>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
EDITORTYPE=PICKER#ALLORGMULTIPLE
\ No newline at end of file
<app-radio-group v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" name="${item.name}" @change="($event)=>{gridEditItemChange(row, column.property, $event)}" <#if item.isNeedCodeListConfig()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' </#if> style="${item.getEditorCssStyle()}"></app-radio-group> <app-radio-group v-model="row[column.property]" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" name="${item.name}" @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}" <#if item.isNeedCodeListConfig()??><#assign codelist=item.getPSCodeList()>tag='${codelist.codeName}' codelistType='${codelist.getCodeListType()}' </#if> style="${item.getEditorCssStyle()}"></app-radio-group>
\ No newline at end of file \ No newline at end of file
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
:data="JSON.stringify(row)" :data="JSON.stringify(row)"
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
......
<app-file-upload <app-file-upload
:formState="viewState" :formState="viewState"
:ignorefieldvaluechange="false" :ignorefieldvaluechange="false"
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
:data="JSON.stringify(row)" :data="JSON.stringify(row)"
:name='column.property' :name='column.property'
:value="row[column.property]" :value="row[column.property]"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</#if> </#if>
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-mpicker> </app-mpicker>
</#if> </#if>
\ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</#if> </#if>
:acParams=<@getAcParams editor /> :acParams=<@getAcParams editor />
:pickupView=<@getPickupView editor /> :pickupView=<@getPickupView editor />
@formitemvaluechange="($event)=>{onGridItemValueChange(row,$event)}" @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}"
style="${editor.getEditorCssStyle()}"> style="${editor.getEditorCssStyle()}">
</app-mpicker> </app-mpicker>
</#if> </#if>
\ No newline at end of file
<app-wf-approval v-model="srfwfmemo" :service="appEntityService" :context="JSON.parse(JSON.stringify(context))" :viewparams="JSON.parse(JSON.stringify(viewparams))"></app-wf-approval>
\ No newline at end of file
<div class="ivu-input-wrapper ivu-input-wrapper-default ivu-input-type">
<textarea class="ivu-input" :disabled="row.srfuf === 1 ? (${item.getEnableCond()?c} & 2) !== 2 : (${item.getEnableCond()?c} & 1) !== 1" v-model="row[column.property]" style="${item.getEditorCssStyle()}" <#if item.getPlaceHolder()??> placeholder="${item.getPlaceHolder()}"</#if> @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}"></textarea>
</div>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册