|
|
@@ -186,23 +186,31 @@ export default {
|
|
|
codes[def_key_] = bo_code_
|
|
|
})
|
|
|
// 删除选中记录
|
|
|
- removeDraft({ ids: idList.join(',') }).then(() => {
|
|
|
- ActionUtils.removeSuccessMessage()
|
|
|
- this.selection = []
|
|
|
- // 循环删除对应数据表数据
|
|
|
- defKeyArr.forEach((k) => {
|
|
|
- const deleteParams = {
|
|
|
- tableName: `t_${codes[k]}`,
|
|
|
- paramWhere: { id_: delList[k].join(',') }
|
|
|
- }
|
|
|
- this.$common.request('delete', deleteParams, 'post', true)
|
|
|
- })
|
|
|
- this.$message.success('删除成功!')
|
|
|
- this.search()
|
|
|
+ removeDraft({ ids: idList.join(',') }).then((res) => {
|
|
|
+ if (res.state === 103) {
|
|
|
+ // this.selection = []
|
|
|
+ // this.search()
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ } else {
|
|
|
+ ActionUtils.removeSuccessMessage()
|
|
|
+ this.selection = []
|
|
|
+ // 循环删除对应数据表数据
|
|
|
+ defKeyArr.forEach((k) => {
|
|
|
+ const deleteParams = {
|
|
|
+ tableName: `t_${codes[k]}`,
|
|
|
+ paramWhere: { id_: delList[k].join(',') }
|
|
|
+ }
|
|
|
+ this.$common.request('delete', deleteParams, 'post', true)
|
|
|
+ })
|
|
|
+ this.$message.success('删除成功!')
|
|
|
+ this.search()
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
+ .catch((res) => {
|
|
|
+ this.selection = []
|
|
|
this.$message.error('获取数据表key值出错,请联系开发人员!')
|
|
|
+ // this.search()
|
|
|
})
|
|
|
})
|
|
|
}
|