diff --git a/src/cool/modules/base/components/dept/check.vue b/src/cool/modules/base/components/dept/check.vue index c745e2d..f42c823 100644 --- a/src/cool/modules/base/components/dept/check.vue +++ b/src/cool/modules/base/components/dept/check.vue @@ -95,6 +95,7 @@ export default { }, onCheckStrictlyChange() { + this.form.departmentIdList = []; this.visible = false; this.$nextTick(() => { diff --git a/src/cool/modules/base/components/dept/tree.vue b/src/cool/modules/base/components/dept/tree.vue index 24dd719..70bde73 100644 --- a/src/cool/modules/base/components/dept/tree.vue +++ b/src/cool/modules/base/components/dept/tree.vue @@ -91,6 +91,10 @@ export default { methods: { openCM(e, d, n) { + if (!d) { + d = this.list[0] || {}; + } + let list = [ { label: "新增", @@ -115,10 +119,6 @@ export default { } ]; - if (!d) { - d = this.list[0]; - } - if (d.parentId) { list.push({ label: "删除", @@ -148,7 +148,7 @@ export default { return data.parentId; }, - allowDrop(draggingNode, dropNode) { + allowDrop(_, dropNode) { return dropNode.data.parentId; }, @@ -175,6 +175,7 @@ export default { }, rowEdit(e) { + console.log(e); const method = e.id ? "update" : "add"; Form.open({ diff --git a/src/cool/modules/base/components/role/perms.vue b/src/cool/modules/base/components/role/perms.vue index 81123d7..00973b4 100644 --- a/src/cool/modules/base/components/role/perms.vue +++ b/src/cool/modules/base/components/role/perms.vue @@ -80,7 +80,7 @@ export default { fn(this.list); - this.checked = ids.filter(id => (val || []).includes(id)); + this.checked = ids.filter(id => (val || []).find(e => e == id)); }, refresh() {