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

2020.5.21 更新

上级 9accc83d
...@@ -11,15 +11,13 @@ ...@@ -11,15 +11,13 @@
</#if> </#if>
</#macro> </#macro>
<#-- 搜索框的输入提示信息 -->
<#macro getQuickSearchPlaceholder view> <#macro getQuickSearchPlaceholder view>
请输入<#t>
<#assign isdrawcComma = false /> <#assign isdrawcComma = false />
<#if view.getPSDataEntity?? && view.getPSDataEntity()?? && view.getPSDataEntity().getAllPSDEFields?? && view.getPSDataEntity().getAllPSDEFields()??> <#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().getAllPSAppDEFields?? && view.getPSAppDataEntity().getAllPSAppDEFields()??>
<#list view.getPSDataEntity().getAllPSDEFields() as field> <#list view.getPSAppDataEntity().getAllPSAppDEFields() as field>
<#if field.isEnableQuickSearch()> <#if field.isEnableQuickSearch()>
<#if isdrawcComma>,<#else><#assign isdrawcComma = true /></#if><#t> <#if isdrawcComma>,<#else><#assign isdrawcComma = true /></#if><#t>
${field.getLogicName()}<#t> ${field.getPSDEField().getLogicName()}<#t>
</#if> </#if>
</#list> </#list>
</#if> </#if>
......
<template> <template>
<div class='tabviewpanel' style="height:100%;"> <div class='tabviewpanel' style="height:100%;">
<tabs :animated="false" class='tabexppanel' name='${ctrl.name}' @on-click="tabPanelClick"> <tabs :animated="false" class='tabexppanel' name='${ctrl.getCodeName()?lower_case}' @on-click="tabPanelClick">
<#list ctrl.getPSControls() as tabviewpanel> <#list ctrl.getPSControls() as tabviewpanel>
<tab-pane :index="${tabviewpanel_index}" name='${tabviewpanel.name}' tab='${ctrl.name}' class='<#if tabviewpanel.getPSSysCss?? && tabviewpanel.getPSSysCss()??>${tabviewpanel.getPSSysCss().getCssName()}</#if>' <tab-pane :index="${tabviewpanel_index}" name='${tabviewpanel.name}' tab='${ctrl.getCodeName()?lower_case}' class='<#if tabviewpanel.getPSSysCss?? && tabviewpanel.getPSSysCss()??>${tabviewpanel.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{ :label="(h) =>{
return h('div', [ return h('div', [
<#if tabviewpanel.getPSSysImage()??> <#if tabviewpanel.getPSSysImage()??>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<div v-for = "item in items" :key="item.srfmajortext" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)"> <div v-for = "item in items" :key="item.srfmajortext" :class="['app-list-item', {'isSelect': item.isselected === true ? true : false}]" @click="handleClick(item)" @dblclick="handleDblClick(item)">
<#if ctrl.getItemPSLayoutPanel()??> <#if ctrl.getItemPSLayoutPanel()??>
<#assign panel = ctrl.getItemPSLayoutPanel()> <#assign panel = ctrl.getItemPSLayoutPanel()>
<layout_${panel.getName()} name='${panel.name}' :data="item"></layout_${panel.getName()}> <layout_${panel.getName()} name='${panel.name}' :inputData="item"></layout_${panel.getName()}>
<#elseif ctrl.itemRender??> <#elseif ctrl.itemRender??>
${ctrl.itemRender.code} ${ctrl.itemRender.code}
<#else> <#else>
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
<#if dataitem.getPSDEField()??> <#if dataitem.getPSDEField()??>
prop: '${dataitem.getPSDEField().getCodeName()?lower_case}', prop: '${dataitem.getPSDEField().getCodeName()?lower_case}',
dataType: '${dataitem.getPSDEField().getDataType()}', dataType: '${dataitem.getPSDEField().getDataType()}',
</#if>
<#if dataitem.getFrontPSCodeList?? && dataitem.getFrontPSCodeList()??>
<#assign codelist=dataitem.getFrontPSCodeList() />
codelist:{tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'},
</#if> </#if>
}, },
</#list> </#list>
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
}else{ }else{
result =_appEntityService.FetchDefault(Context,Data, isloading); result =_appEntityService.FetchDefault(Context,Data, isloading);
} }
result.then((response) => { result.then(async (response) => {
this.handleResponse(action, response); await this.handleResponse(action, response);
resolve(response); resolve(response);
}).catch(response => { }).catch(response => {
reject(response); reject(response);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'> <div slot='<#if view.getSideBarLayout()?? && view.getSideBarLayout() == "LEFT">left<#else>top</#if>'>
<#if ctrl.isShowTitleBar()> <#if ctrl.isShowTitleBar()>
<div class='list-exp-bar-header'> <div class='list-exp-bar-header'>
<div><icon type='ios-home-outline'/><#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if></div> <#if ctrl.getTitle() == ''>列表导航栏<#else>${ctrl.getTitle()}</#if>
</div> </div>
</#if> </#if>
<div class="container-header"> <div class="container-header">
......
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl ../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<tabs :animated="false" name='${item.name}' v-show="detailsModel.${item.name}.visible" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>' <tabs :animated="false" name='${item.getCodeName()?lower_case}' v-show="detailsModel.${item.name}.visible" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>'
:value="detailsModel.${item.name}.activiedPage" @on-click="detailsModel.${item.name}.clickPage($event)"> :value="detailsModel.${item.name}.activiedPage" @on-click="detailsModel.${item.name}.clickPage($event)">
<#list item.getPSDEFormTabPages() as formmenber> <#list item.getPSDEFormTabPages() as formmenber>
<tab-pane v-show="detailsModel.${formmenber.name}.visible" name='${formmenber.name}' :index="${formmenber_index}" tab='${item.name}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>' <tab-pane v-show="detailsModel.${formmenber.name}.visible" name='${formmenber.name}' :index="${formmenber_index}" tab='${item.getCodeName()?lower_case}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{ :label="(h) =>{
return h('span',{ return h('span',{
class:'caption<#if formmenber.getLabelPSSysCss?? && formmenber.getLabelPSSysCss()??> ${formmenber.getLabelPSSysCss().getCssName()}</#if>' class:'caption<#if formmenber.getLabelPSSysCss?? && formmenber.getLabelPSSysCss()??> ${formmenber.getLabelPSSysCss().getCssName()}</#if>'
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
</@ibizindent> </@ibizindent>
</#list> </#list>
<#else> <#else>
<tabs :animated="false" name='${ctrl.name}' :value="detailsModel.${ctrl.name}.activiedPage" <tabs :animated="false" name='${ctrl.getCodeName()?lower_case}' :value="detailsModel.${ctrl.name}.activiedPage"
@on-click="detailsModel.${ctrl.name}.clickPage($event)"> @on-click="detailsModel.${ctrl.name}.clickPage($event)">
<#list ctrl.getPSDEFormPages() as formpage> <#list ctrl.getPSDEFormPages() as formpage>
<tab-pane v-show="detailsModel.${formpage.name}.visible" name='${formpage.name}' :index="${formpage_index}" tab='${ctrl.name}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>' <tab-pane v-show="detailsModel.${formpage.name}.visible" name='${formpage.name}' :index="${formpage_index}" tab='${ctrl.getCodeName()?lower_case}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{ :label="(h) =>{
return h('span',{ return h('span',{
class:'caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>' class:'caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>'
......
<template> <template>
<div class = "drtab"> <div class = "drtab">
<tabs :animated='false' class='app-dr-tab' name='name' @on-click="tabPanelClick"> <tabs :animated='false' class='app-dr-tab' name='${ctrl.getCodeName()?lower_case}' @on-click="tabPanelClick">
<#list ctrl.getRootItem().getAllItems() as dritem> <#list ctrl.getRootItem().getAllItems() as dritem>
<tab-pane <#if dritem_index == 0>v-if="isShowSlot"</#if> :index='${dritem_index?c}' name='${dritem.getId()?lower_case}' tab='name' class='' :disabled='items[${dritem_index?c}].disabled' <tab-pane <#if dritem_index == 0>v-if="isShowSlot"</#if> :index='${dritem_index?c}' name='${dritem.getId()?lower_case}' tab='${ctrl.getCodeName()?lower_case}' class='' :disabled='items[${dritem_index?c}].disabled'
label='${dritem.text}'> label='${dritem.text}'>
<#if dritem.getId()?lower_case == 'form'> <#if dritem.getId()?lower_case == 'form'>
<div class='main-data'> <div class='main-data'>
......
...@@ -89,29 +89,29 @@ import UtilService from '@/utilservice/util-service'; ...@@ -89,29 +89,29 @@ import UtilService from '@/utilservice/util-service';
/** /**
* 是否支持看板定制 * 是否支持看板定制
* *
* @protected * @public
* @type {(boolean)} * @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
@Prop() protected isEnableCustomized!:boolean; @Prop() public isEnableCustomized!:boolean;
/** /**
* 是否已有看板定制 * 是否已有看板定制
* *
* @protected * @public
* @type {(boolean)} * @type {(boolean)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected isHasCustomized:boolean = false; public isHasCustomized:boolean = false;
/** /**
* 模型数据 * 模型数据
* *
* @protected * @public
* @type {(*)} * @type {(*)}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected modelDta:any; public modelDta:any;
/** /**
* modleId * modleId
...@@ -119,7 +119,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -119,7 +119,7 @@ import UtilService from '@/utilservice/util-service';
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected modelId:string = "dashboard_<#if ctrl.getPSAppDataEntity()??>${ctrl.getPSAppDataEntity().getCodeName()?lower_case}<#else>app</#if>_${ctrl.getCodeName()?lower_case}"; public modelId:string = "dashboard_<#if ctrl.getPSAppDataEntity()??>${ctrl.getPSAppDataEntity().getCodeName()?lower_case}<#else>app</#if>_${ctrl.getCodeName()?lower_case}";
/** /**
* 建构功能服务对象 * 建构功能服务对象
...@@ -127,7 +127,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -127,7 +127,7 @@ import UtilService from '@/utilservice/util-service';
* @type {UtilService} * @type {UtilService}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected utilService:UtilService = new UtilService(); public utilService:UtilService = new UtilService();
/** /**
* 功能服务名称 * 功能服务名称
...@@ -135,7 +135,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -135,7 +135,7 @@ import UtilService from '@/utilservice/util-service';
* @type {string} * @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected utilServiceName:string = "<#if ctrl.getPSAppDynaDashboardUtil?? && ctrl.getPSAppDynaDashboardUtil()??>${ctrl.getPSAppDynaDashboardUtil().getCodeName()?lower_case}</#if>"; public utilServiceName:string = "<#if ctrl.getPSAppDynaDashboardUtil?? && ctrl.getPSAppDynaDashboardUtil()??>${ctrl.getPSAppDynaDashboardUtil().getCodeName()?lower_case}</#if>";
/** /**
* 获取多项数据 * 获取多项数据
...@@ -162,7 +162,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -162,7 +162,7 @@ import UtilService from '@/utilservice/util-service';
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected created() { public created() {
this.afterCreated(); this.afterCreated();
} }
...@@ -171,7 +171,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -171,7 +171,7 @@ import UtilService from '@/utilservice/util-service';
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected afterCreated(){ public afterCreated(){
if (this.viewState) { if (this.viewState) {
this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => { this.viewStateEvent = this.viewState.subscribe(({ tag, action, data }) => {
if (!Object.is(tag, this.name)) { if (!Object.is(tag, this.name)) {
...@@ -235,7 +235,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -235,7 +235,7 @@ import UtilService from '@/utilservice/util-service';
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected loadModel(){ public loadModel(){
if(this.isEnableCustomized){ if(this.isEnableCustomized){
this.utilService.getService(this.utilServiceName).then((service:any) =>{ this.utilService.getService(this.utilServiceName).then((service:any) =>{
service.loadModelData(JSON.parse(JSON.stringify(this.context)),{modelid:this.modelId}).then((res:any) =>{ service.loadModelData(JSON.parse(JSON.stringify(this.context)),{modelid:this.modelId}).then((res:any) =>{
...@@ -266,7 +266,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -266,7 +266,7 @@ import UtilService from '@/utilservice/util-service';
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected handleClick(){ public handleClick(){
const view:any ={ const view:any ={
viewname: 'app-portal-design', viewname: 'app-portal-design',
title: '面板设计', title: '面板设计',
...@@ -291,7 +291,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -291,7 +291,7 @@ import UtilService from '@/utilservice/util-service';
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected destroyed() { public destroyed() {
this.afterDestroy(); this.afterDestroy();
} }
...@@ -300,7 +300,7 @@ import UtilService from '@/utilservice/util-service'; ...@@ -300,7 +300,7 @@ import UtilService from '@/utilservice/util-service';
* *
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected afterDestroy() { public afterDestroy() {
if (this.viewStateEvent) { if (this.viewStateEvent) {
this.viewStateEvent.unsubscribe(); this.viewStateEvent.unsubscribe();
} }
......
...@@ -186,7 +186,7 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi ...@@ -186,7 +186,7 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
* @param {*} response * @param {*} response
* @memberof ControlService * @memberof ControlService
*/ */
public handleResponse(action: string, response: any,isCreate:boolean = false,itemType:string=""){ public async handleResponse(action: string, response: any,isCreate:boolean = false,itemType:string=""){
let model: any = this.getMode(); let model: any = this.getMode();
model.itemType = itemType; model.itemType = itemType;
super.handleResponse(action,response,isCreate); super.handleResponse(action,response,isCreate);
......
<#ibizinclude>
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<template>
<gantt-elastic :class="ganttClass" :tasks="tasks" :options="getOptions(this.locale)" :dynamic-style="dynamicStyle" @taskList-item-dblclick="taskClick" @task-item-expand="taskItemExpand">
</gantt-elastic>
</template>
<#assign import_block>
import GanttElastic from "ibiz-gantt-elastic/src/GanttElastic.vue";
</#assign>
<#assign component_block>
GanttElastic,
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 显示处理提示
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) public showBusyIndicator?: boolean;
/**
* 部件行为--load
*
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop() public loadAction!: string;
/**
* 部件样式名
*
* @public
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public ganttClass: string = "gantt";
/**
* 语言
*
* @public
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public locale: string = 'zh-CN';
/**
* 语言资源
*
* @public
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public localeZH: any = {
weekdays: ['星期一','星期二','星期三','星期四','星期五','星期六','星期日'],
months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
Now: "现在",
"X-Scale": "时间颗粒度",
"Display task list": "显示列表",
"Before/After": "数据范围"
}
/**
* 配置参数
*
* @public
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public options: any = {
isflex: true,
maxRows: 100,
dataType: 'treegrid',
title: {
label: ""
},
header: {
yScole: false,
taskListWidth: false,
},
calendar: {
hour: {
display: false
}
},
chart: {
progress: {
bar: false
},
expander: {
display: true
},
},
taskList: {
expander: {
straight: false
},
labelField: 'text',
columns: [
<#if ctrl.getPSDETreeColumns()??>
<#list ctrl.getPSDETreeColumns() as column>
{
label: '${column.getCaption()}',
value: '<#if column.getName() == "begin">start<#else>${column.getName()}</#if>',
<#if column_index == 0>
expander: true,
</#if>
width: <#if column.getWidth() gt 0>${column.getWidth()}<#else>100</#if>
},
</#list>
</#if>
]
}
};
/**
* 样式
*
* @public
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dynamicStyle: any = {
};
/**
* 日程事件集合
*
* @public
* @type {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public tasks: any[] = [];
/**
* 监听语言变化
*
* @public
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Watch('$i18n.locale')
public onLocaleChange(newval: any, val: any) {
this.locale = newval;
}
/**
* 获取部件参数
*
* @returns {any}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getOptions() {
if(Object.is(this.locale, 'zh-CN')) {
return { locale: this.localeZH, ...this.options };
}
return this.options;
}
/**
* 搜索获取日程事件
*
* @param {*} $event 日期信息
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(task: any = {}) {
const params: any = {
srfnodeid: task && task.id ? task.id : "#",
srfnodefilter: ''
};
let tempViewParams:any = JSON.parse(JSON.stringify(this.viewparams));
let curNode:any = {};
Util.deepObjectMerge(curNode, task);
let tempContext:any = this.computecurNodeContext(curNode);
if(curNode && curNode.srfparentdename) {
Object.assign(tempContext,{ srfparentdename: curNode.srfparentdename });
Object.assign(tempViewParams,{ srfparentdename: curNode.srfparentdename });
}
if(curNode && curNode.srfparentkey) {
Object.assign(tempContext,{ srfparentkey: curNode.srfparentkey });
Object.assign(tempViewParams,{ srfparentkey: curNode.srfparentkey });
}
Object.assign(params,{viewparams:tempViewParams});
this.service.getNodes(tempContext,params).then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: "错误", desc: response.info });
return;
}
this.tasks = [...this.tasks, ...response.data];
response.data.forEach((item: any) => {
if(!item.collapsed) {
this.load(item);
}
})
this.$emit("load", this.tasks);
}).catch((response: any) => {
if (response && response.status === 401) {
return;
}
this.$Notice.error({ title: "错误", desc: response.info });
});
}
/**
* 计算当前节点的上下文
*
* @param {*} curNode 当前节点
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public computecurNodeContext(curNode:any){
let tempContext:any = {};
if(curNode && curNode.data && curNode.data.srfappctx){
tempContext = JSON.parse(JSON.stringify(curNode.data.srfappctx));
}else{
tempContext = JSON.parse(JSON.stringify(this.context));
}
return tempContext;
}
/**
* 节点展开
*
* @param {*} task 当前节点
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public taskItemExpand(task: any) {
if(!task.collapsed) {
this.load(task);
} else {
let len: number = this.tasks.length;
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;
}
/**
* 刷新
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public refresh() {
this.load();
}
/**
* 选中的数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selections: any[] = [];
/**
* 获取多项数据
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getDatas(): any[] {
return this.selections;
}
/**
* 获取单项树
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getData(): any {
return null;
}
/**
* vue 生命周期
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public created() {
this.locale = this.$i18n.locale;
this.load();
}
/**
* 点击事件
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public taskClick({event, data}: {event: any, data: any}) {
let view: any = {};
let _context: any = Object.assign({},this.context);
let key: string = data.id.split(';')[0];
switch(key) {
<#if ctrl.getPSDETreeNodes()??>
<#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/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
<#assign content>
:showBusyIndicator="${ctrl.isShowBusyIndicator()?c}"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
\ No newline at end of file
<#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 {
height: 100%;
.gantt-elastic__main-view-container {
flex-grow: 1;
}
}
\ No newline at end of file
<#ibizinclude>
../@MACRO/CONTROL/CONTROL.vue.ftl
</#ibizinclude>
\ No newline at end of file
<#ibizinclude>
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 日历项类型
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public itemType: string = "";
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.getCodeName()}')}${srfclassname('${ctrl.name}')}Mode
*/
public getDataItems(): any[] {
let dataItems: any = [
<#-- 关联主实体的主键 -->
<#if ctrl.getPSAppDataEntity()??>
<#assign appDataEntity = ctrl.getPSAppDataEntity() />
<#if appDataEntity.isMajor() == false && appDataEntity.getMinorPSAppDERSs()??>
<#list appDataEntity.getMinorPSAppDERSs() as minorAppDERSs>
<#if minorAppDERSs.getMajorPSAppDataEntity()??>
<#assign majorAppDataEntity = minorAppDERSs.getMajorPSAppDataEntity() />
{
name: '${majorAppDataEntity.getCodeName()?lower_case}',
prop: '${majorAppDataEntity.getKeyPSAppDEField().getCodeName()?lower_case}'
},
</#if>
</#list>
</#if>
</#if>
// 前端新增修改标识,新增为"0",修改为"1"或未设值
{
name: 'srffrontuf',
prop: 'srffrontuf',
dataType: 'TEXT',
},
{
name: 'style',
},
{
name: 'textColor',
},
{
name: 'itemType',
},
{
name: 'parentId'
},
{
name: 'query',
prop: 'query',
},
];
switch(this.itemType){
<#-- 甘特项实体映射 -->
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as ganttItem>
<#if ganttItem.getTreeNodeType() == "DE">
case "${ganttItem.getNodeType()}":
dataItems = [...dataItems,
<#if ganttItem.getIdPSAppDEField()??>
{
name: 'id',
prop: '${ganttItem.getIdPSAppDEField().getCodeName()?lower_case}'
},
</#if>
<#if ganttItem.getPSDETreeNodeDataItems()??>
<#list ganttItem.getPSDETreeNodeDataItems() as dataItem>
{
name: '<#if dataItem.getName() == 'begin'>start<#else>${dataItem.getName()?lower_case}</#if>',
prop: '<#if dataItem.getPSDEField()??>${dataItem.getPSDEField().getCodeName()?lower_case}</#if>'
},
</#list>
</#if>
];
break;
</#if>
</#list>
</#if>
}
return dataItems;
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
<#assign import_block>
import CodeListService from '@service/app/codelist-service';
import i18n from '@/locale';
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
<#if node.getTreeNodeType() == 'DE' && node.getPSAppDataEntity()??>
<#if appde?? && appde.getId() != node.getPSAppDataEntity().getId()>
<#if !P.exists("importService", node.getPSAppDataEntity().getId(), "")>
import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@service/${srffilepath2(node.getPSAppDataEntity().codeName)}/${srffilepath2(node.getPSAppDataEntity().codeName)}-service';
</#if>
</#if>
</#if>
</#list>
</#if>
</#assign>
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_HEADER.ts.ftl
</#ibizinclude>
<#-- 获取树节点关系导航上下文 -->
<#macro getNavContext nodeRs>
<#compress>
<#if nodeRs.getPSDETreeNodeRSNavContexts()??>
<#list nodeRs.getPSDETreeNodeRSNavContexts() as rsNavContext>
"${rsNavContext.getKey()}":{"isRawValue":${rsNavContext.isRawValue()?c},"value":"${rsNavContext.getValue()}"}<#if rsNavContext_has_next>,</#if>
</#list>
</#if>
</#compress>
</#macro>
<#-- 获取树节点关系导航参数 -->
<#macro getNavParams nodeRs>
<#compress>
<#if nodeRs.getPSDETreeNodeRSNavParams()??>
<#list nodeRs.getPSDETreeNodeRSNavParams() as rsNavParam>
"${rsNavParam.getKey()}":{"isRawValue":${rsNavParam.isRawValue()?c},"value":"${rsNavParam.getValue()}"}<#if rsNavParam_has_next>,</#if>
</#list>
</#if>
</#compress>
</#macro>
<#-- 获取树节点关系参数 -->
<#macro getParams nodeRs>
<#compress>
<#if nodeRs.getPSDETreeNodeRSParams()??>
<#list nodeRs.getPSDETreeNodeRSParams() as rsParam>
"${rsParam.getKey()}":{"value":"${rsParam.getValue()}"}<#if rsParam_has_next>,</#if>
</#list>
</#if>
</#compress>
</#macro>
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public codeListService:CodeListService = new CodeListService({ $store: this.getStore() });
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
<#if node.getTreeNodeType() == 'DE' && node.getPSAppDataEntity()??>
<#if appde?? && appde.getId() != node.getPSAppDataEntity().getId()>
<#if !P.exists("importService2", node.getPSAppDataEntity().getId(), "")>
/**
* ${node.getPSAppDataEntity().getLogicName()}服务对象
*
* @type {${srfclassname('${node.getPSAppDataEntity().codeName}')}Service}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public ${node.getPSAppDataEntity().codeName?lower_case}Service: ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service = new ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service({ $store: this.getStore() });
</#if>
</#if>
</#if>
</#list>
</#if>
/**
* 节点分隔符号
*
* @public
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public TREENODE_SEPARATOR: string = ';';
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
/**
* ${node.getName()}节点分隔符号
*
* @public
* @type {string}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public TREENODE_${node.getNodeType()?upper_case}: string = '${node.getNodeType()?j_string}';
</#list>
</#if>
/**
* 获取节点数据
*
* @param {string} action
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public async getNodes(context:any = {},data: any = {}, isloading?: boolean): Promise<any> {
let { srfparentkey, srfcat, srfnodeid, srfnodefilter, query }: { srfparentkey: string, srfcat: string, srfnodeid: string, srfnodefilter: string, query:string } = data;
srfnodefilter = query ? query : srfnodefilter;
let list: any[] = [];
let filter: any = {};
let srfotherkey: string = '';
<#-- BEGIN:逻辑代码 -->
if (!srfnodeid || Object.is(srfnodeid, '#')) {
<#if ctrl.isRootVisible()>
await this.fill${srfclassname(ctrl.getRootPSDETreeNode().getNodeType()?lower_case)}Nodes(context, filter, list);
return Promise.resolve({ status: 200, data: list });
<#else>
srfnodeid = this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case};
</#if>
} else {
srfotherkey = srfnodeid;
srfnodeid = srfnodeid.split('_#_')[0];
}
let strTreeNodeId: string = srfnodeid;
let strRealNodeId: string = '';
let bRootSelect: boolean = false;
let strNodeType: string | null = null;
let strRootSelectNode: string = '';
if (Object.is(strTreeNodeId, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
strNodeType = this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case};
if (srfparentkey) {
strRealNodeId = srfparentkey;
}
} else {
let nPos = strTreeNodeId.indexOf(this.TREENODE_SEPARATOR);
if (nPos === -1) {
return Promise.reject({ status: 500, data: { title: '失败', message: `树节点${r'${strTreeNodeId}'}标识无效` } });
}
strNodeType = strTreeNodeId.substring(0, nPos);
strRealNodeId = strTreeNodeId.substring(nPos + 1);
}
Object.assign(filter,
{
srfparentkey: srfparentkey,
srfcat: srfcat,
srfnodefilter: srfnodefilter,
strRealNodeId: strRealNodeId,
srfnodeid: srfnodeid,
srfotherkey: srfotherkey,
strNodeType: strNodeType,
viewparams: JSON.parse(JSON.stringify(data)).viewparams
}
);
// 分解节点标识
let nodeid: string[] = strRealNodeId.split(this.TREENODE_SEPARATOR);
for (let i = 0; i < nodeid.length; i++) {
switch (i) {
case 0:
Object.assign(filter, { nodeid: nodeid[0] });
break;
case 1:
Object.assign(filter, { nodeid2: nodeid[1] });
break;
case 2:
Object.assign(filter, { nodeid3: nodeid[2] });
break;
case 3:
Object.assign(filter, { nodeid4: nodeid[3] });
break;
default:
break;
}
}
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
if (Object.is(strNodeType, this.TREENODE_${node.getNodeType()?upper_case})) {
await this.fill${srfclassname(node.getNodeType()?lower_case)}NodeChilds(context,filter, list);
return Promise.resolve({ status: 200, data: list });
}
</#list>
</#if>
<#-- END:逻辑代码 -->
return Promise.resolve({ status: 500, data: { title: '失败', message: `树节点${r'${strTreeNodeId}'}标识无效` } });
}
<#-- BEGIN:填充代码 -->
<#if ctrl.getPSDETreeNodes()??>
<#list ctrl.getPSDETreeNodes() as node>
<#assign filtername="">
<#assign entityname="">
/**
* 填充 树视图节点[${node.getName()}]
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @param {*} rsNavContext
* @param {*} rsNavParams
* @param {*} rsParams
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public fill${srfclassname(node.getNodeType()?lower_case)}Nodes(context:any={},filter: any, list: any[],rsNavContext?:any,rsNavParams?:any,rsParams?:any): Promise<any> {
context = this.handleResNavContext(context,filter,rsNavContext);
filter = this.handleResNavParams(context,filter,rsNavParams,rsParams);
return new Promise((resolve:any,reject:any) =>{
<#if node.getTreeNodeType() == 'STATIC'>
let treeNode: any = {};
Object.assign(treeNode, { text: 'entities.${appde.getCodeName()?lower_case}.${ctrl.getCodeName()?lower_case}_${ctrl.getControlType()?lower_case}.nodes.${node.getNodeType()?lower_case}' });
Object.assign(treeNode, { isUseLangRes: true });
<#if node.isEnableQuickSearch()>
if(filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")){
if((i18n.t(treeNode.text) as string).toUpperCase().indexOf(filter.getSrfnodefilter().toUpperCase())==-1)
return Promise.reject();
}
</#if>
Object.assign(treeNode,{srfappctx:context});
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = '${node.getNodeType()?j_string}';
<#if node.getNodeValue()?? && node.getNodeValue()?length gt 0>
Object.assign(treeNode, { srfkey: '${node.getNodeValue()?j_string}' });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += '${node.getNodeValue()?j_string}';
<#if node.isAppendPNodeId()>
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.strRealNodeId;
</#if>
<#else>
// 没有指定节点值,直接使用父节点值
Object.assign(treeNode, { srfkey: filter.strRealNodeId });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.strRealNodeId;
</#if>
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
Object.assign(treeNode, { iconcls: '${node.getPSSysImage().getCssClass()}' });
<#else>
Object.assign(treeNode, { icon: '${node.getPSSysImage().getImagePath()}' });
</#if>
</#if>
<#if node.isEnableCheck()>
Object.assign(treeNode, { enablecheck: true });
</#if>
<#if node.isDisableSelect()>
Object.assign(treeNode, { disabled: true });
</#if>
<#if node.isExpanded()>
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: false });
<#else>
Object.assign(treeNode, { leaf: true });
</#if>
<#if node.isSelected()>
Object.assign(treeNode, { selected: true });
</#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() != "">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
list.push(treeNode);
resolve(list);
});
</#if>
<#if node.getTreeNodeType() == 'CODELIST' && node.getPSCodeList()??>
<#if node.getPSCodeList().getCodeListType()?? && node.getPSCodeList().getCodeListType() == 'STATIC'>
let codeListIems:Array<any> = [];
if (this.getStore()) {
codeListIems = (this.getStore() as any).getters.getCodeListItems('${node.getPSCodeList().codeName}');
}
<#elseif node.getPSCodeList().getCodeListType()?? && node.getPSCodeList().getCodeListType() == 'DYNAMIC'>
this.codeListService.getItems('${node.getPSCodeList().codeName}',context).then((codeListIems:any)=>{
</#if>
if(codeListIems && codeListIems.length >0){
const handleChildData = (context:any,item:any,) =>{
Object.assign(item,{srfappctx:context});
<#if node.getPSCodeList().getCodeListType() == 'STATIC'>
Object.assign(item, { text: 'codelist.${node.getPSCodeList().codeName}.'+item.value });
Object.assign(item, { isUseLangRes: true });
<#else>
Object.assign(item, { text: item.text });
</#if>
Object.assign(item, { srfmajortext: item.text });
let strNodeId: string = "${srfjavastring(node.getNodeType())}";
Object.assign(item, { srfkey: item.value });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += item.value;
<#if node.isAppendPNodeId()>
strNodeId += TREENODE_SEPARATOR;
strNodeId += filter.getRealnodeid();
</#if>
Object.assign(item, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
Object.assign(item, { iconcls: '${node.getPSSysImage().getCssClass()}' });
<#else>
Object.assign(item, { icon: '${node.getPSSysImage().getImagePath()}' });
</#if>
</#if>
<#if node.isEnableCheck()>
Object.assign(item, { enablecheck: true });
</#if>
<#if node.isDisableSelect()>
Object.assign(item, { disabled: true });
</#if>
<#if node.isExpanded()>
Object.assign(item, { collapsed: false });
<#else>
Object.assign(item, { collapsed: true });
</#if>
<#if node.isSelected()>
Object.assign(item, { selected: true });
</#if>
<#if node.getNavFilter()??>
Object.assign(item, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() !="">
Object.assign(item, { navparams: '${node.getNavViewParam()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(item, { nodeid: item.srfkey });
Object.assign(item, { nodeid2: item.pvalue });
}
codeListIems = this.handleDataSet(JSON.parse(JSON.stringify(codeListIems)),context,handleChildData);
codeListIems.forEach((item:any) => {
let treeNode: any = {};
Object.assign(treeNode,{srfappctx:context});
<#if node.getPSCodeList().getCodeListType() == 'STATIC'>
Object.assign(treeNode, { text: 'codelist.${node.getPSCodeList().codeName}.'+item.value });
Object.assign(treeNode, { isUseLangRes: true });
<#else>
Object.assign(treeNode, { text: item.text });
</#if>
<#if node.isEnableQuickSearch()>
if(filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")){
if((i18n.t(treeNode.text) as string).toUpperCase().indexOf(filter.getSrfnodefilter().toUpperCase())==-1)
return;
}
</#if>
Object.assign(treeNode, { srfmajortext: treeNode.text });
let strNodeId: string = "${srfjavastring(node.getNodeType())}";
Object.assign(treeNode, { srfkey: item.value });
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += item.value;
<#if node.isAppendPNodeId()>
strNodeId += TREENODE_SEPARATOR;
strNodeId += filter.getRealnodeid();
</#if>
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
Object.assign(treeNode, { iconcls: '${node.getPSSysImage().getCssClass()}' });
<#else>
Object.assign(treeNode, { icon: '${node.getPSSysImage().getImagePath()}' });
</#if>
</#if>
<#if node.isEnableCheck()>
Object.assign(treeNode, { enablecheck: true });
</#if>
<#if node.isDisableSelect()>
Object.assign(treeNode, { disabled: true });
</#if>
<#if node.isExpanded()>
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: false });
<#else>
Object.assign(treeNode, { leaf: true });
</#if>
<#if node.isSelected()>
Object.assign(treeNode, { selected: true });
</#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() !="">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
</#if>
if(item.children && item.children.length >0){
Object.assign(treeNode, { children: item.children });
}
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
list.push(treeNode);
resolve(list);
})
}else{
resolve(list);
}
<#if node.getPSCodeList().getCodeListType()?? && node.getPSCodeList().getCodeListType() == 'DYNAMIC'>
});
</#if>
});
</#if>
<#if node.getTreeNodeType() == 'DE' && node.getPSDataEntity()??>
<#assign filtername>${node.getPSDataEntity().codeName}SearchFilter</#assign>
<#assign entityname>${node.getPSDataEntity().codeName}</#assign>
let searchFilter: any = {};
<#list ctrl.getPSDETreeNodeRSs() as noders>
<#if noders.getChildPSDETreeNode().id == node.id>
<#if noders.getParentFilter()?? && noders.getParentFilter()?length gt 0>
<#assign pickupfield=noders.getParentFilter()>
if (Object.is(filter.strNodeType, this.TREENODE_${noders.getParentPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(searchFilter, { n_${pickupfield?lower_case}_eq: filter.nodeid<#if noders.getParentValueLevel() gt 1>${noders.getParentValueLevel()?c}</#if> });
}
<#elseif noders.getParentPSDER1N()??>
<#assign pickupfield=noders.getParentPSDER1N().getPSPickupDEField()>
if (Object.is(filter.strNodeType, this.TREENODE_${noders.getParentPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(searchFilter, { n_${pickupfield.getName()?lower_case}_eq: filter.nodeid<#if noders.getParentValueLevel() gt 1>${noders.getParentValueLevel()?c}</#if> });
}
</#if>
</#if>
</#list>
Object.assign(searchFilter, { total: false });
<#if node.isEnableQuickSearch()>
Object.assign(searchFilter, { query: filter.srfnodefilter });
</#if>
let bFirst: boolean = true;
let records: any[] = [];
try {
this.search${srfclassname(node.getNodeType()?lower_case)}(context, searchFilter, filter).then((records:any) =>{
if(records && records.length >0){
records.forEach((entity: any) => {
let treeNode: any = {};
// 整理context
<#if node.getIdPSDEField()??>
let strId: string = entity.${node.getIdPSDEField().codeName?lower_case};
<#else>
let strId: string = entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case};
</#if>
<#if node.getTextPSDEField()??>
let strText: string = entity.${node.getTextPSDEField().codeName?lower_case};
<#else>
let strText: string = entity.${node.getPSAppDataEntity().getMajorPSAppDEField().codeName?lower_case};
</#if>
Object.assign(treeNode,{srfparentdename:'${node.getPSAppDataEntity().getCodeName()}',srfparentkey:<#if node.getIdPSDEField()??>entity.${node.getIdPSDEField().codeName?lower_case}<#else>entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>});
let tempContext:any = JSON.parse(JSON.stringify(context));
Object.assign(tempContext,{srfparentdename:'${node.getPSAppDataEntity().getCodeName()}',srfparentkey:<#if node.getIdPSDEField()??>entity.${node.getIdPSDEField().codeName?lower_case}<#else>entity.${node.getPSAppDataEntity().getKeyPSAppDEField().codeName?lower_case}</#if>,${node.getPSAppDataEntity().getCodeName()?lower_case}:strId})
Object.assign(treeNode,{srfappctx:tempContext});
Object.assign(treeNode,{'${node.getPSAppDataEntity().getCodeName()?lower_case}':strId});
Object.assign(treeNode, { srfkey: strId });
Object.assign(treeNode, { text: strText, srfmajortext: strText });
let strNodeId: string = '${node.getNodeType()?j_string}';
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += strId;
<#if node.isAppendPNodeId()>
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.realnodeid;
</#if>
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
Object.assign(treeNode, { iconcls: '${node.getPSSysImage().getCssClass()}' });
<#else>
Object.assign(treeNode, { icon: '${node.getPSSysImage().getImagePath()}' });
</#if>
</#if>
<#if node.isEnableCheck()>
Object.assign(treeNode, { enablecheck: true });
</#if>
<#if node.isDisableSelect()>
Object.assign(treeNode, { disabled: true });
</#if>
<#if node.isExpanded()>
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: false });
<#else>
Object.assign(treeNode, { leaf: true });
</#if>
<#if node.getLeafFlagPSDEField()??>
let objLeafFlag = entity.${node.getLeafFlagPSDEField().codeName?lower_case};
if (objLeafFlag != null ) {
let strLeafFlag: string = objLeafFlag.toString().toLowerCase();
if (Object.is(strLeafFlag, '1') || Object.is(strLeafFlag, 'true')){
Object.assign(treeNode, { leaf: true });
}
}
</#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()>
Object.assign(treeNode, { selected: true });
</#if>
<#if node.getNavFilter()??>
Object.assign(treeNode, { navfilter: "${node.getNavFilter()}" });
</#if>
<#if node.getNavViewParam()?? && node.getNavViewParam() != "">
Object.assign(treeNode, { navparams: '${node.getNavViewParam()}' });
</#if>
<#-- 补充nodeid和nodeid2 -->
Object.assign(treeNode, { nodeid: treeNode.srfkey });
Object.assign(treeNode, { nodeid2: filter.strRealNodeId });
if(!Object.is(filter.srfnodeid, this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case})) {
Object.assign(treeNode, { parentId: filter.srfotherkey });
}
list.push(treeNode);
resolve(list);
bFirst = false;
});
}else{
resolve(list);
}
});
} catch (error) {
console.error(error);
}
});
</#if>
}
<#if (filtername?length gt 0) && (entityname?length gt 0)>
/**
* 获取查询集合
*
* @public
* @param {any{}} context
* @param {*} searchFilter
* @param {*} filter
* @returns {any[]}
* @memberof TestEnetityDatasService
*/
@Errorlog
public search${srfclassname(node.getNodeType()?lower_case)}(context:any={}, searchFilter: any, filter: any): Promise<any> {
return new Promise((resolve:any,reject:any) =>{
if(filter.viewparams){
Object.assign(searchFilter,filter.viewparams);
}
if(!searchFilter.page){
Object.assign(searchFilter,{page:0});
}
if(!searchFilter.size){
Object.assign(searchFilter,{size:1000});
}
if(context && context.srfparentdename){
Object.assign(searchFilter,{srfparentdename:JSON.parse(JSON.stringify(context)).srfparentdename});
}
if(context && context.srfparentkey){
Object.assign(searchFilter,{srfparentkey:JSON.parse(JSON.stringify(context)).srfparentkey});
}
<#if node.getSortField?? && node.getSortField()?? && node.getSortField() != "" && node.getSortDir?? && node.getSortDir()?? && node.getSortDir() != "">
Object.assign(searchFilter,{sort: '${node.getSortField()?lower_case},${node.getSortDir()?lower_case}'})
</#if>
<#if appde?? && appde.getId() != node.getPSAppDataEntity().getId()>
const _appEntityService: any = this.${node.getPSAppDataEntity().codeName?lower_case}Service;
<#else>
const _appEntityService: any = this.appEntityService;
</#if>
let list: any[] = [];
if (_appEntityService['${node.getPSAppDEDataSet().getCodeName()}'] && _appEntityService['${node.getPSAppDEDataSet().getCodeName()}'] instanceof Function) {
const response: Promise<any> = _appEntityService['${node.getPSAppDEDataSet().getCodeName()}'](context, searchFilter, false);
response.then((response: any) => {
if (!response.status || response.status !== 200) {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询${node.getPSAppDEDataSet().getCodeName()}数据集异常!');
}
const data: any = response.data;
if (Object.keys(data).length > 0) {
list = JSON.parse(JSON.stringify(data));
resolve(list);
} else {
resolve([]);
}
}).catch((response: any) => {
resolve([]);
console.log(JSON.stringify(context));
console.error('查询${node.getPSAppDEDataSet().getCodeName()}数据集异常!');
});
}
})
}
</#if>
/**
* 填充 树视图节点[${node.getName()}]子节点
*
* @public
* @param {any{}} context
* @param {*} filter
* @param {any[]} list
* @returns {Promise<any>}
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
@Errorlog
public async fill${srfclassname(node.getNodeType()?lower_case)}NodeChilds(context:any={}, filter: any, list: any[]): Promise<any> {
<#if ctrl.getPSDETreeNodeRSs()??>
if (filter.srfnodefilter && !Object.is(filter.srfnodefilter,"")) {
<#list ctrl.getPSDETreeNodeRSs() as noders>
<#if noders.getParentPSDETreeNode().id == node.id>
<#if noders.getSearchMode() == 1 || noders.getSearchMode() == 3>
// 填充${noders.getChildPSDETreeNode().getName()}
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavContext:any = {<@getNavContext nodeRs=noders />};
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavParams:any = {<@getNavParams nodeRs=noders />};
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsParams:any = {<@getParams nodeRs=noders />};
await this.fill${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}Nodes(context, filter, list ,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavContext,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavParams,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsParams);
</#if>
</#if>
</#list>
} else {
<#list ctrl.getPSDETreeNodeRSs() as noders>
<#if noders.getParentPSDETreeNode().id == node.id>
<#if noders.getSearchMode() == 2 || noders.getSearchMode() == 3>
// 填充${noders.getChildPSDETreeNode().getName()}
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavContext:any = {<@getNavContext nodeRs=noders />};
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavParams:any = {<@getNavParams nodeRs=noders />};
let ${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsParams:any = {<@getParams nodeRs=noders />};
await this.fill${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}Nodes(context, filter, list ,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavContext,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsNavParams,${srfclassname(noders.getChildPSDETreeNode().getNodeType()?lower_case)}RsParams);
</#if>
</#if>
</#list>
}
</#if>
}
</#list>
</#if>
/**
* 处理代码表返回数据(树状结构)
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleDataSet(result:Array<any>,context:any,callBack:any){
let list:Array<any> = [];
if(result.length === 0){
return list;
}
result.forEach((codeItem:any) =>{
if(!codeItem.pvalue){
let valueField:string = codeItem.value;
this.setChildCodeItems(valueField,result,codeItem);
list.push(codeItem);
}
})
this.setNodeData(list,context,callBack);
return list;
}
/**
* 处理非根节点数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public setChildCodeItems(pValue:string,result:Array<any>,codeItem:any){
result.forEach((item:any) =>{
if(item.pvalue == pValue){
let valueField:string = item.value;
this.setChildCodeItems(valueField,result,item);
if(!codeItem.children){
codeItem.children = [];
}
codeItem.children.push(item);
}
})
}
/**
* 设置节点UI数据
*
* @param result 返回数组
* @param context 应用上下文
* @param callBack 回调
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public setNodeData(result:Array<any>,context:any,callBack:any){
result.forEach((item:any) =>{
if(item.children){
item.leaf = false;
this.setNodeData(item.children,context,callBack);
}else{
item.leaf = true;
}
callBack(context,item);
})
}
/**
* 处理节点关系导航上下文
*
* @param context 应用上下文
* @param filter 参数
* @param resNavContext 节点关系导航上下文
*
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleResNavContext(context:any,filter:any,resNavContext:any){
if(resNavContext && Object.keys(resNavContext).length > 0){
let tempContextData:any = JSON.parse(JSON.stringify(context));
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
}
Object.keys(resNavContext).forEach((item:any) =>{
let curDataObj:any = resNavContext[item];
this.handleCustomDataLogic(context,tempViewParams,curDataObj,tempContextData,item);
})
return tempContextData;
}else{
return context;
}
}
/**
* 处理关系导航参数
*
* @param context 应用上下文
* @param filter 参数
* @param resNavParams 节点关系导航参数
* @param resParams 节点关系参数
*
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleResNavParams(context:any,filter:any,resNavParams:any,resParams:any){
if((resNavParams && Object.keys(resNavParams).length >0) || (resParams && Object.keys(resParams).length >0)){
let tempViewParamData:any = {};
let tempViewParams:any = {};
if(filter && filter.viewparams){
tempViewParams = filter.viewparams;
tempViewParamData = JSON.parse(JSON.stringify(filter.viewparams));
}
if( Object.keys(resNavParams).length > 0){
Object.keys(resNavParams).forEach((item:any) =>{
let curDataObj:any = resNavParams[item];
this.handleCustomDataLogic(context,tempViewParams,curDataObj,tempViewParamData,item);
})
}
if( Object.keys(resParams).length > 0){
Object.keys(resParams).forEach((item:any) =>{
let curDataObj:any = resParams[item];
tempViewParamData[item.toLowerCase()] = curDataObj.value;
})
}
Object.assign(filter,{viewparams:tempViewParamData});
return filter;
}else{
return filter;
}
}
/**
* 处理自定义节点关系导航数据
*
* @param context 应用上下文
* @param viewparams 参数
* @param curNavData 节点关系导航参数对象
* @param tempData 返回数据
* @param item 节点关系导航参数键值
*
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public handleCustomDataLogic(context:any,viewparams:any,curNavData:any,tempData:any,item:string){
// 直接值直接赋值
if(curNavData.isRawValue){
if(Object.is(curNavData.value,"null") || Object.is(curNavData.value,"")){
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: curNavData.value,
writable : true,
enumerable : true,
configurable : true
});
}
}else{
// 先从导航上下文取数,没有再从导航参数(URL)取数,如果导航上下文和导航参数都没有则为null
if(context[(curNavData.value).toLowerCase()]){
Object.defineProperty(tempData, item.toLowerCase(), {
value: context[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
if(viewparams[(curNavData.value).toLowerCase()]){
Object.defineProperty(tempData, item.toLowerCase(), {
value: viewparams[(curNavData.value).toLowerCase()],
writable : true,
enumerable : true,
configurable : true
});
}else{
Object.defineProperty(tempData, item.toLowerCase(), {
value: null,
writable : true,
enumerable : true,
configurable : true
});
}
}
}
}
<#ibizinclude>
../@MACRO/SERVICE/SERVICE_BOTTOM.ts.ftl
</#ibizinclude>
\ No newline at end of file
CTRLTYPE=GANTT
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<#if item.render??> <#if item.render??>
${item.render.code} ${item.render.code}
<#else> <#else>
<app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}" <#if item.getPSSysImage()??>:iconInfo="{<#assign img=item.getPSSysImage()><#if img.getImagePath() == "">'iconclass':'${img.getCssClass()}'<#else>'iconpath':'${img.getImagePath()}'</#if>}"</#if>> <app-form-group layoutType="<#if item.getPSLayoutPos()??>${item.getPSLayoutPos().getLayout()}</#if>" titleStyle="<#if item.getLabelPSSysCss?? && item.getLabelPSSysCss()??>${item.getLabelPSSysCss().getCssName()}</#if>" class='<#if item.getPSSysCss?? && item.getPSSysCss()??> ${item.getPSSysCss().getCssName()}</#if>' :uiActionGroup="detailsModel.${item.name}.uiActionGroup" @groupuiactionclick="groupUIActionClick($event)" :caption="<#if langbase??>$t('${langbase}.details.${item.name}')<#else>'${item.getCaption()}'</#if>" :isShowCaption="${item.isShowCaption()?c}" uiStyle="${item.getDetailStyle()}" :titleBarCloseMode="${item.getTitleBarCloseMode()}" :isInfoGroupMode="${item.isInfoGroupMode()?c}" <#if item.getPSSysImage()??>:iconInfo="{<#assign img=item.getPSSysImage()><#if img.getImagePath() == "">'iconclass':'${img.getCssClass()}'<#else>'iconpath':'${img.getImagePath()}'</#if>}"</#if>>
<#assign content> <#assign content>
<#list item.getPSDEFormDetails() as formmenber> <#list item.getPSDEFormDetails() as formmenber>
<#if !(formmenber.isHidden?? && formmenber.isHidden())> <#if !(formmenber.isHidden?? && formmenber.isHidden())>
......
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/LANGBASE.vue.ftl ../@MACRO/CONTROL/LANGBASE.vue.ftl
</#ibizinclude> </#ibizinclude>
<tabs :animated="false" name='${item.name}' v-show="detailsModel.${item.name}.visible" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>' <tabs :animated="false" name='${item.getCodeName()?lower_case}' v-show="detailsModel.${item.name}.visible" class='<#if item.getPSSysCss?? && item.getPSSysCss()??>${item.getPSSysCss().getCssName()}</#if><#if item.getPSLayoutPos()?? && item.getPSLayoutPos().getLayout() == "FLEX"> app-tabpanel-flex</#if>'
:value="detailsModel.${item.name}.activiedPage" @on-click="detailsModel.${item.name}.clickPage($event)"> :value="detailsModel.${item.name}.activiedPage" @on-click="detailsModel.${item.name}.clickPage($event)">
<#list item.getPSDEFormTabPages() as formmenber> <#list item.getPSDEFormTabPages() as formmenber>
<tab-pane v-show="detailsModel.${formmenber.name}.visible" name='${formmenber.name}' :index="${formmenber_index}" tab='${item.name}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>' <tab-pane v-show="detailsModel.${formmenber.name}.visible" name='${formmenber.name}' :index="${formmenber_index}" tab='${item.getCodeName()?lower_case}' class='<#if formmenber.getPSSysCss?? && formmenber.getPSSysCss()??>${formmenber.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{ :label="(h) =>{
return h('span',{ return h('span',{
class:'caption<#if formmenber.getLabelPSSysCss?? && formmenber.getLabelPSSysCss()??> ${formmenber.getLabelPSSysCss().getCssName()}</#if>' class:'caption<#if formmenber.getLabelPSSysCss?? && formmenber.getLabelPSSysCss()??> ${formmenber.getLabelPSSysCss().getCssName()}</#if>'
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
${P.getPartCode(formmenber).code} ${P.getPartCode(formmenber).code}
</#list> </#list>
<#else> <#else>
<tabs :animated="false" name='${ctrl.name}' :value="detailsModel.${ctrl.name}.activiedPage" <tabs :animated="false" name='${ctrl.getCodeName()?lower_case}' :value="detailsModel.${ctrl.name}.activiedPage"
@on-click="detailsModel.${ctrl.name}.clickPage($event)"> @on-click="detailsModel.${ctrl.name}.clickPage($event)">
<#list ctrl.getPSDEFormPages() as formpage> <#list ctrl.getPSDEFormPages() as formpage>
<tab-pane v-show="detailsModel.${formpage.name}.visible" name='${formpage.name}' :index="${formpage_index}" tab='${ctrl.name}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>' <tab-pane v-show="detailsModel.${formpage.name}.visible" name='${formpage.name}' :index="${formpage_index}" tab='${ctrl.getCodeName()?lower_case}' class='<#if formpage.getPSSysCss?? && formpage.getPSSysCss()??>${formpage.getPSSysCss().getCssName()}</#if>'
:label="(h) =>{ :label="(h) =>{
return h('span',{ return h('span',{
class:'caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>' class:'caption<#if formpage.getLabelPSSysCss?? && formpage.getLabelPSSysCss()??> ${formpage.getLabelPSSysCss().getCssName()}</#if>'
......
...@@ -701,8 +701,12 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -701,8 +701,12 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.load(data); this.load(data);
} }
if (Object.is('loaddraft', action)) { if (Object.is('loaddraft', action)) {
if(this.context.srfsourcekey){
this.copy(this.context.srfsourcekey);
}else{
this.loadDraft(data); this.loadDraft(data);
} }
}
if (Object.is('save', action)) { if (Object.is('save', action)) {
this.save(data,data.showResultInfo); this.save(data,data.showResultInfo);
} }
...@@ -773,8 +777,18 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -773,8 +777,18 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
* @param {*} [arg={}] * @param {*} [arg={}]
* @memberof @memberof ${srfclassname('${ctrl.codeName}')} * @memberof @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public copy(arg: any = {}): void { public copy(srfkey: string): void {
this.loadDraft(arg); let copyData = this.$store.getters.getCopyData(srfkey);
copyData.srfkey = Util.createUUID();
copyData.${appde.getCodeName()?lower_case} = copyData.srfkey;
copyData.${appde.getKeyPSAppDEField().getCodeName()?lower_case} = copyData.srfkey;
Object.assign(this.context,{${appde.getCodeName()?lower_case}:copyData.${appde.getCodeName()?lower_case}})
this.data = copyData;
this.$nextTick(() => {
this.formState.next({ type: 'load', data: copyData });
this.data.srfuf = '0';
this.setFormEnableCond(this.data);
});
} }
/** /**
......
...@@ -45,13 +45,15 @@ ...@@ -45,13 +45,15 @@
<#-- END:分组列 --> <#-- END:分组列 -->
<#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}"</#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}'">
<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().getPSDEUIActions() 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)">{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}</a> <a @click="uiAction(scope.row, '${uiaction.getUIActionTag()}', $event)">
{{<#if langbase??>$t('${langbase}.uiactions.${uiaction.getUIActionTag()?lower_case}')<#else>'${uiaction.getCaption()}'</#if>}}
</a>
</#list> </#list>
</#if> </#if>
</span> </span>
...@@ -60,7 +62,7 @@ ...@@ -60,7 +62,7 @@
<#-- END:操作列 --> <#-- END:操作列 -->
<#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}"</#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}"> <template v-slot="{row,column}">
<#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()> <#if (item.render??) || (item.getCodeList()?? && item.getCLConvertMode() == 'FRONT') || item.isEnableRowEdit()>
<#-- BEGIN:列绘制、前端绘制代码表、行编辑 --> <#-- BEGIN:列绘制、前端绘制代码表、行编辑 -->
......
...@@ -427,7 +427,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -427,7 +427,7 @@ import CodeListService from "@service/app/codelist-service";
* @type {number} * @type {number}
* @memberof AppIndex * @memberof AppIndex
*/ */
protected checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH',34)}<#else>34</#if>; public checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH',34)}<#else>34</#if>;
/** /**
* 是否允许拖动列宽 * 是否允许拖动列宽
...@@ -1385,7 +1385,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1385,7 +1385,7 @@ import CodeListService from "@service/app/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
public uiAction(row: any, tag: any, $event: any) { public uiAction(row: any, tag: any, $event: any) {
this.rowClick(row, true); // this.rowClick(row, true);
<#if ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic> <#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??> <#if logic.getPSAppViewUIAction().getPSUIAction()??>
......
...@@ -396,7 +396,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -396,7 +396,7 @@ import CodeListService from "@service/app/codelist-service";
* @type {number} * @type {number}
* @memberof AppIndex * @memberof AppIndex
*/ */
protected checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH',34)}<#else>34</#if>; public checkboxColWidth: number = <#if app.getPSApplicationUI()??>${app.getPSApplicationUI().getPFStyleParam('EL-TABLE.CHECKCOLWIDTH',34)}<#else>34</#if>;
/** /**
* 是否允许拖动列宽 * 是否允许拖动列宽
...@@ -1349,8 +1349,8 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -1349,8 +1349,8 @@ import CodeListService from "@service/app/codelist-service";
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
protected uiAction(row: any, tag: any, $event: any) { public uiAction(row: any, tag: any, $event: any) {
this.rowClick(row, true); // this.rowClick(row, true);
<#if ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic> <#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??> <#if logic.getPSAppViewUIAction().getPSUIAction()??>
......
<#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#APPDEGANTTVIEW
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<#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}' : '${ctrl.getHeight()?c}px',</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': isAdaptiveSize ? '${portletWidth}' : '${ctrl.getWidth()?c}px '</#if>}"> <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>}">
<#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>
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<#assign viewUIAction = appViewLogic.getPSAppViewUIAction()/> <#assign viewUIAction = appViewLogic.getPSAppViewUIAction()/>
<#if viewUIAction.getPSUIAction?? && viewUIAction.getPSUIAction()??> <#if viewUIAction.getPSUIAction?? && viewUIAction.getPSUIAction()??>
<#assign uiaction = viewUIAction.getPSUIAction() /> <#assign uiaction = viewUIAction.getPSUIAction() />
actionName:"${uiaction.getName()}", actionName:"${uiaction.getCaption()}",
<#if uiaction.getPSAppCounter?? && uiaction.getPSAppCounter()??> <#if uiaction.getPSAppCounter?? && uiaction.getPSAppCounter()??>
<#assign counter = uiaction.getPSAppCounter() /> <#assign counter = uiaction.getPSAppCounter() />
counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice, counterService:this.${srfclassname('${counter.getCodeName()}')}counterservice,
......
<#assign selfContent> <#assign selfContent>
<#if !item.isHidden()>
<div class="item-field"> <div class="item-field">
<span class="item-field-label <#if item.getLabelPSSysCss()??> ${item.getLabelPSSysCss().getCssName()}</#if>"<#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span> <#if item.isShowCaption()><span class="item-field-label <#if item.getLabelPSSysCss()??> ${item.getLabelPSSysCss().getCssName()}</#if>"<#if item.getLabelPSSysCss()??> style="${item.getLabelPSSysCss().getRawCssStyle()}"</#if>>${item.getCaption()}</span></#if>
<div class="item-field-content"> <div class="item-field-content">
${P.getEditorCode(item, "PANELEDITOR.vue").code} ${P.getEditorCode(item, "PANELEDITOR.vue").code}
</div> </div>
</div> </div>
</#if>
</#assign> </#assign>
<#ibizinclude> <#ibizinclude>
......
<template> <template>
${P.getPartCode(item,'PANEL').code} ${P.getPartCode(item,'PANEL').code}
</template> </template>
<#assign import_block>
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import CodeListService from "@service/app/codelist-service";
</#assign>
<#ibizinclude> <#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl ../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude> </#ibizinclude>
...@@ -17,6 +21,13 @@ ...@@ -17,6 +21,13 @@
} }
return [this.data]; return [this.data];
} }
/**
* 接口实现
*
* @returns {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
getData() { getData() {
return this.data; return this.data;
} }
...@@ -27,7 +38,134 @@ ...@@ -27,7 +38,134 @@
* @type {*} * @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')} * @memberof ${srfclassname('${ctrl.codeName}')}
*/ */
@Prop() public data?: any; @Prop() public inputData?: any;
/**
* 代码表服务对象
*
* @type {CodeListService}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public codeListService:CodeListService = new CodeListService({ $store:this.$store });
/**
* 数据模型对象
*
* @type {${srfclassname('${ctrl.codeName}')}Model}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public dataModel:${srfclassname('${ctrl.codeName}')}Model = new ${srfclassname('${ctrl.codeName}')}Model();
/**
* UI数据对象
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public data:any = {};
/**
* 监听数据对象
*
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Watch('inputData',{immediate:true})
async onInputDataChange(newVal: any, oldVal: any){
if(newVal){
await this.computedUIData(newVal);
this.$forceUpdate();
}
}
/**
* 计算UI展示数据
*
* @param codelistArray 代码表模型数组
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public async computedUIData(newVal:any){
let codelistArray:Array<any> = [];
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
this.dataModel.getDataItems().forEach((item:any) =>{
if(item.codelist){
codelistArray.push(item.codelist);
}
})
if(codelistArray.length >0){
let res:any = await this.getAllCodeList(codelistArray);
this.dataModel.getDataItems().forEach((item:any) =>{
if(item.codelist){
this.data[item.name] = res.get(item.codelist.tag).get(newVal[item.prop]);
}else{
this.data[item.name] = newVal[item.prop];
}
})
}else{
this.dataModel.getDataItems().forEach((item:any) =>{
this.data[item.name] = newVal[item.prop];
})
}
}
}
/**
* 获取所有代码表
*
* @param codelistArray 代码表模型数组
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getAllCodeList(codelistArray:Array<any>):Promise<any>{
return new Promise((resolve:any,reject:any) =>{
let codeListMap:Map<string,any> = new Map();
let promiseArray:Array<any> = [];
codelistArray.forEach((item:any) =>{
if(!codeListMap.get(item.tag)){
promiseArray.push(this.getCodeList(item));
Promise.all(promiseArray).then((result:any) =>{
if(result && result.length >0){
result.forEach((codeList:any) =>{
let tempCodeListMap:Map<number,any> = new Map();
if(codeList.length >0){
codeList.forEach((codeListItem:any) =>{
tempCodeListMap.set(codeListItem.value,codeListItem.text);
})
}
codeListMap.set(item.tag,tempCodeListMap);
})
resolve(codeListMap);
}
})
}
})
})
}
/**
* 获取代码表
*
* @param codeListObject 传入代码表对象
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public getCodeList(codeListObject:any):Promise<any>{
return new Promise((resolve:any,reject:any) =>{
if(codeListObject.tag && Object.is(codeListObject.codelistType,"STATIC")){
const codelist = this.$store.getters.getCodeList(codeListObject.tag);
if (codelist) {
resolve([...JSON.parse(JSON.stringify(codelist.items))]);
} else {
resolve([]);
console.log(`----<#noparse>${codeListObject.tag}</#noparse>----代码表不存在`);
}
}else if(codeListObject.tag && Object.is(codeListObject.codelistType,"DYNAMIC")){
this.codeListService.getItems(codeListObject.tag).then((res:any) => {
resolve(res);
}).catch((error:any) => {
resolve([]);
console.log(`----<#noparse>${codeListObject.tag}</#noparse>----代码表不存在`);
});
}
})
}
<#if ctrl.getAllPSPanelItems()??> <#if ctrl.getAllPSPanelItems()??>
<#list ctrl.getAllPSPanelItems() as panelItem> <#list ctrl.getAllPSPanelItems() as panelItem>
...@@ -42,7 +180,6 @@ ...@@ -42,7 +180,6 @@
<#assign uiaction = panelItem.getPSUIAction()> <#assign uiaction = panelItem.getPSUIAction()>
this.${ctrl.name}_${panelItem.getName()}_click(null, null, $event); this.${ctrl.name}_${panelItem.getName()}_click(null, null, $event);
</#if> </#if>
} }
</#if> </#if>
</#list> </#list>
......
<#ibizinclude> <#ibizinclude>
../@MACRO/MODEL/DEFAULT.ts.ftl ../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>
/**
* 获取数据项集合
*
* @returns {any[]}
* @memberof ${srfclassname('${ctrl.codeName}')}Model
*/
public getDataItems(): any[] {
return [
<#-- 主实体所有属性 -->
<#if ctrl.getAllPSPanelFields()??>
<#list ctrl.getAllPSPanelFields() as datafield>
{
name: '${datafield.getName()?lower_case}',
<#if datafield.getPSCodeList()??>
<#assign codelist = datafield.getPSCodeList() />
codelist:{tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'},
</#if>
prop: '${datafield.getViewFieldName()?lower_case}'
}<#if datafield_has_next>,</#if>
</#list>
</#if>
]
}
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
<el-input size="small" v-model="data.${editor.getViewFieldName()?lower_case}" style="width: 100%;"></el-input> <el-input size="small" v-model="data.${editor.getName()?lower_case}" style="width: 100%;"></el-input>
\ No newline at end of file \ No newline at end of file
<span v-html="data.${item.getViewFieldName()?lower_case}"></span> <span v-html="data.${item.getName()?lower_case}"></span>
\ No newline at end of file \ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<span>{{data.${item.getViewFieldName()?lower_case}}}</span> <span>{{data.${item.getName()?lower_case}}}</span>
\ No newline at end of file \ No newline at end of file
<span v-html="data.${item.getViewFieldName()?lower_case}"></span> <span v-html="data.${item.getName()?lower_case}"></span>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
<#ibizinclude>../@MACRO/PANEL/DEFAULT.vue.ftl</#ibizinclude>
\ No newline at end of file
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
const data: any = {}; const data: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data, { srfsourcekey: args[0].srfkey }) Object.assign(data, { srfsourcekey: args[0].srfkey })
actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
_this.newdata([{ ...data }],[{ ...data }],params, $event, xData); _this.newdata([{ ...data }],[{ ...data }],params, $event, xData);
} else if (xData && xData.copy instanceof Function) { } else if (xData && xData.copy instanceof Function) {
const data2: any = {};
if (args.length > 0) { if (args.length > 0) {
Object.assign(data2, { srfsourcekey: args[0].srfkey }) actionContext.$store.commit('addCopyData', { srfkey: args[0].srfkey, copyData: args[0] });
} }
xData.copy(data2); xData.copy(args[0].srfkey);
} else { } else {
_this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
} }
......
...@@ -90,6 +90,9 @@ ...@@ -90,6 +90,9 @@
<#elseif viewlogic.getNewDataPSAppView()??> <#elseif viewlogic.getNewDataPSAppView()??>
<#assign dataview = viewlogic.getNewDataPSAppView()/> <#assign dataview = viewlogic.getNewDataPSAppView()/>
const data: any = {}; const data: any = {};
if(args[0].srfsourcekey){
data.srfsourcekey = args[0].srfsourcekey;
}
let curViewParam = JSON.parse(JSON.stringify(this.context)); let curViewParam = JSON.parse(JSON.stringify(this.context));
if(args.length >0){ if(args.length >0){
Object.assign(curViewParam,args[0]); Object.assign(curViewParam,args[0]);
......
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
datas = [..._this.getDatas()]; datas = [..._this.getDatas()];
} }
</#if> </#if>
if(params){
datas = [params];
}
// 界面行为 // 界面行为
<#if item.getPSAppViewUIAction().getPSUIAction()??> <#if item.getPSAppViewUIAction().getPSUIAction()??>
<#assign uiaction = item.getPSAppViewUIAction().getPSUIAction()/> <#assign uiaction = item.getPSAppViewUIAction().getPSUIAction()/>
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
<#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, '', $event2); this.${ctrlLogic.name}(null, '', $event2);
} }
<#else> <#else>
this.${ctrlLogic.name}($event, '', $event2); this.${ctrlLogic.name}($event, '', $event2);
......
...@@ -47,7 +47,33 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name? ...@@ -47,7 +47,33 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name?
* @type {${srfclassname(appde.getCodeName())}Service} * @type {${srfclassname(appde.getCodeName())}Service}
* @memberof ${srfclassname(view.name)}Base * @memberof ${srfclassname(view.name)}Base
*/ */
public appEntityService: ${srfclassname(appde.getCodeName())}Service = new ${srfclassname(appde.getCodeName())}Service; public appEntityService: ${srfclassname('${appde.getCodeName()}')}Service = new ${srfclassname('${appde.getCodeName()}')}Service;
</#if>
<#if view.getPSAppCounterRefs()??>
<#assign counterRefs = ''/>
<#list view.getPSAppCounterRefs() as singleCounterRef>
<#if singleCounterRef.getPSAppCounter()??>
<#assign appCounter = singleCounterRef.getPSAppCounter()/>
<#assign counterRefs>${counterRefs}this.${srfclassname('${appCounter.getCodeName()}')}counterservice<#if singleCounterRef_has_next>,</#if></#assign>
/**
* ${srfclassname('${appCounter.getCodeName()}')}CounterService计数器服务对象
*
* @type {${srfclassname('${appCounter.getCodeName()}')}CounterService}
* @memberof ${srfclassname('${view.name}')}Base
*/
public ${srfclassname('${appCounter.getCodeName()}')}counterservice: ${srfclassname('${appCounter.getCodeName()}')}CounterService = new ${srfclassname('${appCounter.getCodeName()}')}CounterService({ $store: this.$store });
</#if>
</#list>
/**
* 计数器服务对象集合
*
* @type {Array<*>}
* @memberof ${srfclassname('${view.name}')}Base
*/
public counterServiceArray:Array<any> = [${counterRefs}];
</#if> </#if>
/** /**
...@@ -85,7 +111,7 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name? ...@@ -85,7 +111,7 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name?
* @type {*} * @type {*}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
protected customViewNavContexts:any ={ public customViewNavContexts:any ={
<#if view.getPSAppViewNavContexts()??> <#if view.getPSAppViewNavContexts()??>
<#list view.getPSAppViewNavContexts() as viewNavContext> <#list view.getPSAppViewNavContexts() as viewNavContext>
"${viewNavContext.getKey()}":{"isRawValue":${viewNavContext.isRawValue()?c},"value":"${viewNavContext.getValue()}"}<#if viewNavContext_has_next>,</#if> "${viewNavContext.getKey()}":{"isRawValue":${viewNavContext.isRawValue()?c},"value":"${viewNavContext.getValue()}"}<#if viewNavContext_has_next>,</#if>
...@@ -99,7 +125,7 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name? ...@@ -99,7 +125,7 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name?
* @type {*} * @type {*}
* @memberof ${srfclassname('${view.name}')}Base * @memberof ${srfclassname('${view.name}')}Base
*/ */
protected customViewParams:any ={ public customViewParams:any ={
<#if view.getPSAppViewNavParams()??> <#if view.getPSAppViewNavParams()??>
<#list view.getPSAppViewNavParams() as viewNavParam> <#list view.getPSAppViewNavParams() as viewNavParam>
"${viewNavParam.getKey()}":{"isRawValue":${viewNavParam.isRawValue()?c},"value":"${viewNavParam.getValue()}"}<#if viewNavParam_has_next>,</#if> "${viewNavParam.getKey()}":{"isRawValue":${viewNavParam.isRawValue()?c},"value":"${viewNavParam.getValue()}"}<#if viewNavParam_has_next>,</#if>
...@@ -148,12 +174,11 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name? ...@@ -148,12 +174,11 @@ export default class ${srfclassname(view.name)}Base extends <#if view_base_name?
/** /**
* 视图状态订阅对象 * 视图状态订阅对象
* *
* @private * @public
* @type {Subject<{action: string, data: any}>} * @type {Subject<{action: string, data: any}>}
* @memberof ${srfclassname(view.name)}Base * @memberof ${srfclassname(view.name)}Base
*/ */
public viewState: Subject<ViewState> = new Subject(); public viewState: Subject<ViewState> = new Subject();
<#if view.hasPSControl('toolbar')> <#if view.hasPSControl('toolbar')>
${P.getCtrlCode('toolbar', 'CONTROL.vue').code} ${P.getCtrlCode('toolbar', 'CONTROL.vue').code}
</#if> </#if>
\ No newline at end of file
<#ibizinclude>
../@MACRO/LAYOUTPANEL_VIEW.template.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_HEADER-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_CONTENT-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW_BOTTOM-BASE.vue.ftl
</#ibizinclude>
<#ibizinclude>
../@MACRO/VIEW-BASE.style.ftl
</#ibizinclude>
\ No newline at end of file
${P.getLayoutCode().code}
\ No newline at end of file
<#ibizinclude>
../@MACRO/VIEW.vue.ftl
</#ibizinclude>
\ No newline at end of file
VIEWTYPE=APPDEGANTTVIEW
\ No newline at end of file
...@@ -120,7 +120,9 @@ $ yarn build ...@@ -120,7 +120,9 @@ $ yarn build
|─ ─ favicon.ico 图标 |─ ─ favicon.ico 图标
​ |─ ─ src 工程文件夹 ​ |─ ─ src 工程文件夹
|─ ─ assets 静态资源 |─ ─ assets 静态资源
|─ ─ codelist 动态代码表服务
|─ ─ components 基础组件,主要包含编辑器组件和其他全局使用的组件 |─ ─ components 基础组件,主要包含编辑器组件和其他全局使用的组件
|─ ─ counter 计数器服务
|─ ─ engine 引擎文件,主要封装了内置视图的内置逻辑 |─ ─ engine 引擎文件,主要封装了内置视图的内置逻辑
|─ ─ environments 环境文件 |─ ─ environments 环境文件
​ |─ ─ interface 接口文件 ​ |─ ─ interface 接口文件
...@@ -153,6 +155,7 @@ $ yarn build ...@@ -153,6 +155,7 @@ $ yarn build
|─ ─ YYY-ui-logic-base.ts 应用实体界面处理逻辑文件 |─ ─ YYY-ui-logic-base.ts 应用实体界面处理逻辑文件
|─ ─ YYY-ui-logic.ts 自定义应用实体界面处理逻辑文件 |─ ─ YYY-ui-logic.ts 自定义应用实体界面处理逻辑文件
|─ ─ utils 工具类文件 |─ ─ utils 工具类文件
|─ ─ utilservice 应用功能服务
|─ ─ widgets 部件文件夹 |─ ─ widgets 部件文件夹
|─ ─ appde 应用实体名称 |─ ─ appde 应用实体名称
​ |─ ─ XXX 部件名称 ​ |─ ─ XXX 部件名称
......
...@@ -23,7 +23,7 @@ import { Verify } from '@/utils/verify/verify'; ...@@ -23,7 +23,7 @@ import { Verify } from '@/utils/verify/verify';
Object.assign(params,{${logicparam.getDstFieldName()?lower_case}:<#if logicparam.getSrcFieldName()?? && logicparam.getSrcFieldName() != "">params.${logicparam.getSrcFieldName()?lower_case}<#else>params.${logicparam.getDstFieldName()?lower_case}</#if>}); Object.assign(params,{${logicparam.getDstFieldName()?lower_case}:<#if logicparam.getSrcFieldName()?? && logicparam.getSrcFieldName() != "">params.${logicparam.getSrcFieldName()?lower_case}<#else>params.${logicparam.getDstFieldName()?lower_case}</#if>});
<#if logicparam.getDstPSDELogicParam?? && logicparam.getDstPSDELogicParam()?? && logicparam.getDstPSDELogicParam().getParamPSAppDataEntity()??> <#if logicparam.getDstPSDELogicParam?? && logicparam.getDstPSDELogicParam()?? && logicparam.getDstPSDELogicParam().getParamPSAppDataEntity()??>
<#if logicparam.getSrcFieldName()?lower_case?contains("id") > <#if logicparam.getSrcFieldName()?lower_case?contains("id") >
Object.assign(context,{${logicparam.getDstPSDELogicParam().getParamPSAppDataEntity().getCodeName()?lower_case}:params.${logicparam.getSrcFieldName()?lower_case}}); Object.assign(context,{${logicparam.getDstPSDELogicParam().getParamPSAppDataEntity().getCodeName()?lower_case}:params.${logicparam.getSrcFieldName()?lower_case} ? params.${logicparam.getSrcFieldName()?lower_case} : null});
</#if> </#if>
</#if> </#if>
</#if> </#if>
......
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_GANTT
</#ibiztemplate>
${P.getCtrlCode('CONTROL-BASE.vue').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_GANTT
</#ibiztemplate>
${P.getCtrlCode('MODEL.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_GANTT
</#ibiztemplate>
${P.getCtrlCode('SERVICE.ts').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_GANTT
</#ibiztemplate>
${P.getCtrlCode('CONTROL.less').code}
\ No newline at end of file
<#ibiztemplate>
TARGET=PSAPPVIEWCTRL_GANTT
</#ibiztemplate>
${P.getCtrlCode('CONTROL.vue').code}
\ No newline at end of file
## v7.0.0-alpha.4 [2020-5-21]
### Bug修复
修复表格视图搜索placeholder显示为搜索字段
修复表单嵌表单分页异常
修复门户视图操作栏标题
修复看板部件高度自动撑
修复表单分组,界面行为组不显示
修复表格操作列数据异常
### 功能新增及优化
#### 模板
支持拷贝功能
支持实体甘特图视图
支持面板项隐藏表单项
支持表格列最小宽度和操作列样式支持
支持列表项、面板代码表转化
#### 基础文件
支持列表项、面板代码表转化
修复表单分组,界面行为组不显示
## v7.0.0-alpha.3 [2020-5-14] ## v7.0.0-alpha.3 [2020-5-14]
### Bug修复 ### Bug修复
...@@ -58,12 +94,10 @@ ...@@ -58,12 +94,10 @@
#### 基础文件 #### 基础文件
登录页面调整 登录页面调整
增加数据选择类插件表格呈现插件 增加数据选择类插件表格呈现插件
## v7.0.0-alpha.2 [2020-5-7] ## v7.0.0-alpha.2 [2020-5-7]
### Bug修复 ### Bug修复
...@@ -94,6 +128,14 @@ ...@@ -94,6 +128,14 @@
实体工作流动态导航表格视图 实体工作流动态导航表格视图
#### 基础文件
表格文件上传信息显示
实体工作流动态视图
实体工作流动态导航表格视图
## v7.0.0-alpha.1 [2020-4-29] ## v7.0.0-alpha.1 [2020-4-29]
初始化文件 初始化文件
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册