提交 25382278 编写于 作者: KK's avatar KK

树ui调整, 逻辑新增是否为节点

上级 d1bfe763
......@@ -12,35 +12,22 @@
</div>
<div class="tree-partition"></div>
<ion-list>
<ion-item v-for="item in nodes" :key="item.id" @click="click_node(item)">
<template v-for="item in nodes">
<ion-item v-if="isNode(item.id)" :key="item.id" @click="click_node(item)">
<ion-label>{{item.text}}</ion-label>
<ion-icon class="tree-icon" slot="end" name="chevron-forward-outline"></ion-icon>
</ion-item>
</template>
</ion-list>
<#if ctrl.getPSDETreeNodes?? && ctrl.getPSDETreeNodes()??>
<div class="tree-partition tree-partition-bigger"></div>
<ion-list>
<#list ctrl.getPSDETreeNodes() as node>
<#if node.isRootNode?? && node.isRootNode()?? && node.isRootNode()>
<#if node.getPSDETreeNodeRSs?? && node.getPSDETreeNodeRSs()??>
<#list node.getPSDETreeNodeRSs() as nodeitem>
<#if nodeitem.getChildPSDETreeNode?? && nodeitem.getChildPSDETreeNode()??>
<#assign nodeitemchild = nodeitem.getChildPSDETreeNode()>
<#if nodeitemchild.getTreeNodeType?? && nodeitemchild.getTreeNodeType()?? && nodeitemchild.getTreeNodeType() == 'STATIC'>
<#if nodeitemchild.hasPSDETreeNodeRSs?? && nodeitemchild.hasPSDETreeNodeRSs()?? && !nodeitemchild.hasPSDETreeNodeRSs() >
<ion-item>
<ion-label>${nodeitemchild.getName()}</ion-label>
<template v-for="item in nodes">
<ion-item v-if="!isNode(item.id)" :key="item.id">
<ion-label>{{item.text}}</ion-label>
</ion-item>
</#if>
</#if>
</#if>
</#list>
</#if>
</#if>
</#list>
</template>
</ion-list>
</#if>
</#if>
</div>
</template>
\ No newline at end of file
......@@ -145,9 +145,20 @@ import { Util } from '@ibiz-core/utils'
</#if>
</#if>
</#list>
'${rootnode};${rootnode}'
</#if>
]
/**
* 选中值变化
*
* @param {string} key
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public isNode(key:string) {
return this.treenodes.includes(key);
}
/**
* 选中值变化
*
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册