|
|
@ -85,7 +85,7 @@ export default { |
|
|
|
visible: false, |
|
|
|
dataForm: {}, |
|
|
|
form: {}, |
|
|
|
partyOrgId: "", |
|
|
|
partyOrgId: null, |
|
|
|
tableData: [], |
|
|
|
tableDataEdit: [], |
|
|
|
}; |
|
|
@ -118,9 +118,12 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
resetData() { |
|
|
|
this.searchValue = ""; |
|
|
|
this.searchOptions = []; |
|
|
|
this.resultList = []; |
|
|
|
this.partyOrgId = null; |
|
|
|
this.dataForm = {}; |
|
|
|
this.form = {}; |
|
|
|
this.partyOrgId = null; |
|
|
|
this.tableData = []; |
|
|
|
this.tableDataEdit = []; |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
|
dataFormSubmitHandle() { |
|
|
@ -161,7 +164,7 @@ export default { |
|
|
|
this.tableData[index].ifEdit = true; |
|
|
|
}, |
|
|
|
async onSave(item) { |
|
|
|
const row = {...item, ifEdit: undefined} |
|
|
|
const row = { ...item, ifEdit: undefined }; |
|
|
|
let url = "/resi/partymember/icpartyorgleader"; |
|
|
|
const { data, code, msg } = await requestPost(url, { |
|
|
|
...row, |
|
|
@ -190,8 +193,8 @@ export default { |
|
|
|
}); |
|
|
|
this.tableDataEdit = this.tableData; |
|
|
|
} else { |
|
|
|
this.tableData = this.tableData.slice(0, -1) |
|
|
|
this.tableDataEdit = this.tableDataEdit.slice(0, -1) |
|
|
|
this.tableData = this.tableData.slice(0, -1); |
|
|
|
this.tableDataEdit = this.tableDataEdit.slice(0, -1); |
|
|
|
} |
|
|
|
}, |
|
|
|
async onDelete(row) { |
|
|
@ -209,21 +212,18 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
async deleteActivity(row) { |
|
|
|
const url = "/resi/partymember/icpartyorgleader/delete"; |
|
|
|
let params = { |
|
|
|
id: row.id, |
|
|
|
partyOrgId: this.partyOrgId, |
|
|
|
}; |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code === 0) { |
|
|
|
this.$http |
|
|
|
.delete("/resi/partymember/icpartyorgleader/delete", { data: [row.id] }) |
|
|
|
.then((res) => { |
|
|
|
this.$message({ |
|
|
|
type: "success", |
|
|
|
message: "删除成功", |
|
|
|
}); |
|
|
|
this.getData(); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
this.getData(); |
|
|
|
}) |
|
|
|
.catch((res) => { |
|
|
|
this.$message.error(res.msg||'删除失败!'); |
|
|
|
}); |
|
|
|
}, |
|
|
|
onAdd() { |
|
|
|
this.tableData = [ |
|
|
|