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

update

上级 6ca19b5d
......@@ -8,7 +8,7 @@
<el-table :data="items" row-key="id" border lazy :load="loadTreeNode" :tree-props="{ children: 'children', hasChildren: 'leaf' }">
<#if ctrl.getPSDETreeColumns()??>
<#list ctrl.getPSDETreeColumns() as column>
<el-table-column show-overflow-tooltip prop="${column.getName()?lower_case}" label="${column.getCaption()}"<#if column.getWidth() gt 0> :width="${column.getWidth()?c}"</#if> :align="'${column.getAlign()?lower_case}'">
<el-table-column show-overflow-tooltip prop="${column.getName()?lower_case}" label="${column.getCaption()}"<#if column.getWidthUnit()!='STAR'> :width="${column.getWidth()?c}" <#else> :min-width="${column.getWidth()?c}" </#if> :align="'${column.getAlign()?lower_case}'">
<template v-slot="{ row, column, $index }">
<#if column.render??>
${column.render.code}
......@@ -152,7 +152,7 @@
* @param {*} $event 日期信息
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public load(task: any = {}, resolve: any) {
public load(task: any = {}, resolve?: any) {
const params: any = {
srfnodeid: task && task.id ? task.id : "#",
srfnodefilter: ''
......@@ -177,9 +177,16 @@
}
if(resolve && resolve instanceof Function) {
resolve(response.data);
} else if(task && task.id) {
task.children = [...response.data];
} else {
this.items = [...response.data];
}
response.data.forEach((item: any) => {
if(!item.collapsed) {
this.load(item);
}
})
this.$emit("load", this.items);
}).catch((response: any) => {
if (response && response.status === 401) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册