提交 3667c611 编写于 作者: JunZai's avatar JunZai

update

上级 37e304e6
......@@ -2,7 +2,7 @@
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<template>
<gantt-elastic :class="ganttClass" :tasks="tasks" :options="getOptions(this.locale)" :dynamic-style="dynamicStyle" @taskList-item-dblclick="taskClick">
<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>
......@@ -168,7 +168,7 @@ GanttElastic,
* @param {*} $event 日期信息
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load() {
public load(task: any = {}) {
const params: any = {
srfnodeid: "#",
srfnodefilter: ''
......@@ -223,6 +223,27 @@ GanttElastic,
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;
}
}
/**
* 获取编辑视图信息
*
......
......@@ -114,7 +114,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
srfnodefilter = query ? query : srfnodefilter;
let list: any[] = [];
let filter: any = {};
let srfotherkey: string = '';
<#-- BEGIN:逻辑代码 -->
if (!srfnodeid || Object.is(srfnodeid, '#')) {
......@@ -124,6 +124,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#else>
srfnodeid = this.TREENODE_${ctrl.getRootPSDETreeNode().getNodeType()?upper_case};
</#if>
} else {
srfotherkey = srfnodeid;
srfnodeid = srfnodeid.split('_#_')[0];
}
let strTreeNodeId: string = srfnodeid;
......@@ -153,6 +156,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
srfnodefilter: srfnodefilter,
strRealNodeId: strRealNodeId,
srfnodeid: srfnodeid,
srfotherkey: srfotherkey,
strNodeType: strNodeType,
viewparams: JSON.parse(JSON.stringify(data)).viewparams
}
......@@ -245,7 +249,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
strNodeId += filter.strRealNodeId;
</#if>
Object.assign(treeNode, { id: strNodeId });
Object.assign(treeNode, { id: strNodeId + '_#_' + filter.srfnodeid });
<#if node.getPSSysImage()??>
<#if node.getPSSysImage().getCssClass()?? && node.getPSSysImage().getCssClass()?length gt 0>
......@@ -270,9 +274,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
Object.assign(treeNode, { expanded: filter.isAutoexpand });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { leaf: true });
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.isSelected()>
Object.assign(treeNode, { selected: true });
......@@ -286,6 +290,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充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);
});
......@@ -317,7 +324,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
strNodeId += TREENODE_SEPARATOR;
strNodeId += filter.getRealnodeid();
</#if>
Object.assign(item, { id: strNodeId });
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()}' });
......@@ -378,7 +385,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
strNodeId += TREENODE_SEPARATOR;
strNodeId += filter.getRealnodeid();
</#if>
Object.assign(treeNode, { id: strNodeId });
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()}' });
......@@ -402,9 +409,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
Object.assign(treeNode, { expanded: filter.isautoexpand });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { leaf: true });
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.isSelected()>
Object.assign(treeNode, { selected: true });
......@@ -421,6 +428,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充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);
})
......@@ -490,7 +500,7 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
strNodeId += this.TREENODE_SEPARATOR;
strNodeId += filter.realnodeid;
</#if>
Object.assign(treeNode, { id: strNodeId });
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()}' });
......@@ -514,9 +524,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
Object.assign(treeNode, { expanded: filter.isautoexpand });
</#if>
<#if node.hasPSDETreeNodeRSs()>
Object.assign(treeNode, { leaf: false });
Object.assign(treeNode, { collapsed: false });
<#else>
Object.assign(treeNode, { leaf: true });
Object.assign(treeNode, { collapsed: true });
</#if>
<#if node.getLeafFlagPSDEField()??>
let objLeafFlag = entity.${node.getLeafFlagPSDEField().codeName?lower_case};
......@@ -546,6 +556,9 @@ import ${srfclassname('${node.getPSAppDataEntity().codeName}')}Service from '@se
<#-- 补充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;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册