Commit 0bafb213 by crushh

update: dist

parent d69f4c4d
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
}); });
}, },
deleteActiveTag(list, index, e) { deleteActiveTag(list, index, e) {
console.log(e)
this.deleteTagDialog.visible = true; this.deleteTagDialog.visible = true;
this.deleteTagDialog.deleteData = { this.deleteTagDialog.deleteData = {
...list, ...list,
...@@ -129,13 +130,19 @@ export default { ...@@ -129,13 +130,19 @@ export default {
}; };
}, },
doDelete(list) { doDelete(list) {
const { currentIndex: index, e, memberCount } = list; const { currentIndex: index, e,tagId } = list;
// memberCount为0时不加入垃圾桶,直接删除 getRequest('/memberTag/getTagById', { tagId }).then(res => {
if (memberCount == 0) { const { errorCode, result } = res.data;
this.directDelTag(list); if (errorCode == 0) {
} else { if(!result.memberCount){ // memberCount为0时不加入垃圾桶,直接删除
this.intoTrash(list, index, e); this.directDelTag(list);
} } else {
this.intoTrash(list, index, e);
}
}
}).catch(err => {
console.log(err);
});
}, },
directDelTag(list) { directDelTag(list) {
const param = { const param = {
......
...@@ -143,13 +143,19 @@ export default { ...@@ -143,13 +143,19 @@ export default {
}; };
}, },
doDelete(list) { doDelete(list) {
const { currentIndex: index, e, memberCount } = list; const { currentIndex: index, e,tagId } = list;
// memberCount为0时不加入垃圾桶,直接删除 getRequest('/memberTag/getTagById', { tagId }).then(res => {
if (memberCount == 0) { const { errorCode, result } = res.data;
this.directDelTag(list); if (errorCode == 0) {
} else { if(!result.memberCount){ // memberCount为0时不加入垃圾桶,直接删除
this.intoTrash(list, index, e); this.directDelTag(list);
} } else {
this.intoTrash(list, index, e);
}
}
}).catch(err => {
console.log(err);
});
}, },
directDelTag(list) { directDelTag(list) {
const param = { const param = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment