From ba9e189dd33c8d48f7f4ac36bcefeef9afb426f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 七月 2023 23:40:49 +0800 Subject: [PATCH] 2023-07-17 --- src/tabviews/custom/components/tree/antd-tree/index.jsx | 32 ++++++++++++++++++++++++++------ 1 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx index 6b287c2..e924dd2 100644 --- a/src/tabviews/custom/components/tree/antd-tree/index.jsx +++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx @@ -218,10 +218,6 @@ } else { this.loadData() } - - if (position === 'popclose') { // 鎵ц鍚姩寮圭獥鐨勬寜閽墍閫夋嫨鐨勫埛鏂伴」 - btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId) - } } /** @@ -270,17 +266,39 @@ }, () => { 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() + } + } + + if (result.message) { + if (result.ErrCode === 'Y') { + Modal.success({ + title: result.message + }) + } else if (result.ErrCode === 'S') { + notification.success({ + top: 92, + message: result.message, + duration: 2 + }) + } + } } else { this.setState({ loading: false }) this.timer && this.timer.stop() + if (!result.message) return if (result.ErrCode === 'N') { Modal.error({ title: result.message, }) - } else { + } else if (result.ErrCode !== '-2') { notification.error({ top: 92, message: result.message, @@ -332,6 +350,7 @@ if (pval === config.wrap.mark) { parentNodes.push({ ...item, + mk_floor: 1, $$uuid: uuid, $title: item[config.wrap.labelField] || '', $key: val, @@ -348,7 +367,7 @@ } }) let _treedata = this.getTree(parentNodes, _options) - + let _treeNodes = [] if (!searchkey) { @@ -430,6 +449,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