Commit 90b58909 authored by “yiyousong”'s avatar “yiyousong”

fix: 修复窗口事项删除报错

parent d3afb785
...@@ -246,7 +246,7 @@ export default { ...@@ -246,7 +246,7 @@ export default {
siteMatterData: [], // 站点事项列表 siteMatterData: [], // 站点事项列表
matterKeys: [], matterKeys: [],
matterRows: [], matterRows: [],
allDel: "", // 批量删除id allDel: [], // 批量删除id
windowInfo: {}, windowInfo: {},
formData: { formData: {
isShow: 1, isShow: 1,
...@@ -335,6 +335,7 @@ export default { ...@@ -335,6 +335,7 @@ export default {
// 窗口事项搜索 // 窗口事项搜索
onSearch() { onSearch() {
this.winMatterTable.page = 1; this.winMatterTable.page = 1;
this.allDel= [];
this.getWindowmatterData(); this.getWindowmatterData();
}, },
// 保存站点事项加入窗口 // 保存站点事项加入窗口
...@@ -372,7 +373,7 @@ export default { ...@@ -372,7 +373,7 @@ export default {
}, },
// 全选窗口事项列表 // 全选窗口事项列表
onSelectChange(keys) { onSelectChange(keys) {
this.allDel = keys.join(","); this.allDel = keys
}, },
// 站点事项选择 // 站点事项选择
handleChange(keys, rows) { handleChange(keys, rows) {
...@@ -410,7 +411,7 @@ export default { ...@@ -410,7 +411,7 @@ export default {
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
_this.$message.success(msg); _this.$message.success(msg);
this.allDel = ""; _this.allDel = [];
_this.getWindowmatterData(); _this.getWindowmatterData();
} }
}, },
...@@ -421,8 +422,9 @@ export default { ...@@ -421,8 +422,9 @@ export default {
}, },
// 批量删除窗口事项 // 批量删除窗口事项
handleDelAll() { handleDelAll() {
if (this.allDel) { if (this.allDel.length) {
this.handleDel(this.allDel); let ids = this.allDel.join(',')
this.handleDel(ids);
} else { } else {
this.$message.warning("请先勾选数据"); this.$message.warning("请先勾选数据");
return; return;
......
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