mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2025-12-13 06:02:49 +00:00
优化 base 模块
This commit is contained in:
parent
84820b831a
commit
790e1519cc
@ -95,6 +95,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onCheckStrictlyChange() {
|
onCheckStrictlyChange() {
|
||||||
|
this.form.departmentIdList = [];
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
@ -91,6 +91,10 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
openCM(e, d, n) {
|
openCM(e, d, n) {
|
||||||
|
if (!d) {
|
||||||
|
d = this.list[0] || {};
|
||||||
|
}
|
||||||
|
|
||||||
let list = [
|
let list = [
|
||||||
{
|
{
|
||||||
label: "新增",
|
label: "新增",
|
||||||
@ -115,10 +119,6 @@ export default {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!d) {
|
|
||||||
d = this.list[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (d.parentId) {
|
if (d.parentId) {
|
||||||
list.push({
|
list.push({
|
||||||
label: "删除",
|
label: "删除",
|
||||||
@ -148,7 +148,7 @@ export default {
|
|||||||
return data.parentId;
|
return data.parentId;
|
||||||
},
|
},
|
||||||
|
|
||||||
allowDrop(draggingNode, dropNode) {
|
allowDrop(_, dropNode) {
|
||||||
return dropNode.data.parentId;
|
return dropNode.data.parentId;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -175,6 +175,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
rowEdit(e) {
|
rowEdit(e) {
|
||||||
|
console.log(e);
|
||||||
const method = e.id ? "update" : "add";
|
const method = e.id ? "update" : "add";
|
||||||
|
|
||||||
Form.open({
|
Form.open({
|
||||||
|
|||||||
@ -80,7 +80,7 @@ export default {
|
|||||||
|
|
||||||
fn(this.list);
|
fn(this.list);
|
||||||
|
|
||||||
this.checked = ids.filter(id => (val || []).includes(id));
|
this.checked = ids.filter(id => (val || []).find(e => e == id));
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user