From 2f06f6ab7de05126a2dd56589f7c123d64891e7c Mon Sep 17 00:00:00 2001 From: Jo <479214531@qq.com> Date: Mon, 21 Mar 2022 18:17:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/codemirror.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue index 667d2c9..3b67850 100644 --- a/src/components/codemirror.vue +++ b/src/components/codemirror.vue @@ -71,7 +71,7 @@ :props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}"> - 取消 + 取消 导入 @@ -229,10 +229,12 @@ export default { pageSize: 10000, categoryId: e.id }).then(res => { - const { records } = res.data + let { records } = res.data + records = records.filter(e => !e.isOpen) // 禁用的不显示 records.map(n => { n.categoryName = n.modelName }) + console.log(records) e.children = [...e.children, ...records] resolve() }).catch(res => { @@ -262,7 +264,7 @@ export default { const id = this.$refs.tree.getCheckedKeys() if (!id.length) return this.$message.error('请选择模型!') this.$post(`${this.api.referenceFindById}?id=${id[0]}`).then(res => { - this.codeVal += '\n' + res.data.modelDemo + this.codeVal += '\n\n' + res.data.modelDemo this.modelVisible = false }).catch(res => {}) },