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

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

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