模型完善

dev_2022-03-03
Jo 3 years ago
parent 094121935b
commit 2f06f6ab7d
  1. 8
      src/components/codemirror.vue

@ -71,7 +71,7 @@
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
</el-tree>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="typeVisible = false">取消</el-button>
<el-button size="small" @click="modelVisible = false">取消</el-button>
<el-button size="small" type="primary" @click="submit">导入</el-button>
</span>
</el-dialog>
@ -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 => {})
},

Loading…
Cancel
Save