icssoa 4 лет назад
Родитель
Сommit
790e1519cc

+ 1 - 0
src/cool/modules/base/components/dept/check.vue

@@ -95,6 +95,7 @@ export default {
 		},
 
 		onCheckStrictlyChange() {
+			this.form.departmentIdList = [];
 			this.visible = false;
 
 			this.$nextTick(() => {

+ 6 - 5
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({

+ 1 - 1
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() {