From fc5c58dba3e3524e3bfb75ee91e8ac892e96c598 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 24 六月 2023 11:58:27 +0800 Subject: [PATCH] 2023-06-24 --- src/tabviews/custom/components/tree/antd-tree/index.jsx | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx index 8755abb..2d63a92 100644 --- a/src/tabviews/custom/components/tree/antd-tree/index.jsx +++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx @@ -260,7 +260,7 @@ let result = await Api.genericInterface(param) if (result.status) { this.loaded = true - if (config.$cache) { + if (config.$cache && config.setting.onload !== 'false') { Api.writeCacheConfig(config.uuid, result.data || '') } @@ -270,6 +270,13 @@ }, () => { this.handleData() }) + + if (config.timer && config.clearField && result.data && result.data[0]) { + let vals = (config.clearValue || '').split(',') + if (vals.includes(result.data[0][config.clearField])) { + this.timer && this.timer.stop() + } + } } else { this.setState({ loading: false @@ -332,6 +339,7 @@ if (pval === config.wrap.mark) { parentNodes.push({ ...item, + mk_floor: 1, $$uuid: uuid, $title: item[config.wrap.labelField] || '', $key: val, @@ -348,7 +356,7 @@ } }) let _treedata = this.getTree(parentNodes, _options) - + let _treeNodes = [] if (!searchkey) { @@ -430,6 +438,7 @@ // 娣诲姞鑿滃崟鐨勫瓙鍏冪礌 options = options.filter(option => { if (option.$parentId === parent.$key) { + option.mk_floor = parent.mk_floor + 1 parent.children.push(option) return false } -- Gitblit v1.8.0