|
@@ -226,11 +226,11 @@ export default {
|
|
|
const children = parent.data.sysMusicScoreCategoriesList || parent.data;
|
|
|
|
|
|
const index = children.findIndex((d) => {
|
|
|
- this.form.delCategoriesIds.push(data.id)
|
|
|
- return d.id === data.id;
|
|
|
+ this.form.delCategoriesIds.push(data.id);
|
|
|
+ return d.id === data.id;
|
|
|
});
|
|
|
children.splice(index, 1);
|
|
|
- this.form.delCategoriesIds=[... new Set(this.form.delCategoriesIds)]
|
|
|
+ this.form.delCategoriesIds = [...new Set(this.form.delCategoriesIds)];
|
|
|
},
|
|
|
editItem(data) {
|
|
|
this.$prompt("请输入修改的教材曲目名称", "提示", {
|
|
@@ -268,11 +268,11 @@ export default {
|
|
|
addSubmit() {
|
|
|
this.$refs.form.validate(async (flag) => {
|
|
|
if (flag) {
|
|
|
- let { organId,delCategoriesIds, ...rest } = this.form;
|
|
|
+ let { organId, delCategoriesIds, ...rest } = this.form;
|
|
|
let obj = {
|
|
|
...rest,
|
|
|
organId: organId.join(","),
|
|
|
- delCategoriesIds:delCategoriesIds.join(',')
|
|
|
+ delCategoriesIds: delCategoriesIds.join(","),
|
|
|
};
|
|
|
try {
|
|
|
if (this.activeRow?.id) {
|
|
@@ -297,11 +297,16 @@ export default {
|
|
|
this.$refs.uploadImg.$refs.upload.submit();
|
|
|
},
|
|
|
allowDrop(draggingNode, dropNode, type) {
|
|
|
- if (dropNode.level == 1) {
|
|
|
- return true;
|
|
|
+ let flag = true
|
|
|
+ // console.log(type, dropNode, draggingNode);
|
|
|
+ if (draggingNode.childNodes.length > 0 && type == "inner") {
|
|
|
+ flag = false;
|
|
|
} else {
|
|
|
- return false;
|
|
|
+ if (dropNode.level != 1) {
|
|
|
+ flag = false;
|
|
|
+ }
|
|
|
}
|
|
|
+ return flag
|
|
|
},
|
|
|
},
|
|
|
computed: {},
|