|
|
|
|
@ -76,14 +76,14 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:catalog_id v-if="false">
|
|
|
|
|
<template v-slot:catalog_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>所属目录:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content" style="height:150px;overflow: scroll;">
|
|
|
|
|
<el-tree v-if="isShow" :default-checked-keys="checkArr" :check-strictly="true" @check="getSelectedNodes"
|
|
|
|
|
:data="catalogList" show-checkbox default-expand-all node-key="id" ref="tree" highlight-current
|
|
|
|
|
:data="catalogList" show-checkbox node-key="id" ref="tree" highlight-current
|
|
|
|
|
:props="defaultProps">
|
|
|
|
|
</el-tree>
|
|
|
|
|
</div>
|
|
|
|
|
@ -236,6 +236,13 @@
|
|
|
|
|
},
|
|
|
|
|
getSelectedNodes(data, node) {
|
|
|
|
|
console.log("data", data)
|
|
|
|
|
if(data.children && data.children.length>0){
|
|
|
|
|
this.$Message.warning('当前节点不可选择')
|
|
|
|
|
this.form.catalog_name = ''
|
|
|
|
|
this.form.catalog_id = ''
|
|
|
|
|
this.$refs.tree.setCheckedKeys([]);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.$refs.tree.setCheckedKeys([]); // 删除所有选中节点
|
|
|
|
|
this.$refs.tree.setCheckedNodes([data]); // 选中已选中节点
|
|
|
|
|
this.form.catalog_name = data.name
|
|
|
|
|
|