优化 base 模块

This commit is contained in:
icssoa 2021-03-12 17:52:20 +08:00
parent 84820b831a
commit 790e1519cc
3 changed files with 8 additions and 6 deletions

View File

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

View File

@ -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({

View File

@ -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() {