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 => {}) },