提交:站点删除 添加 返回状态判断

This commit is contained in:
23688nl 2022-09-15 17:34:50 +08:00
parent 0d1e09a8c9
commit 311613fe8b
1 changed files with 7 additions and 3 deletions

View File

@ -937,7 +937,7 @@ export default {
const recordIds = row.recordId || this.ids; const recordIds = row.recordId || this.ids;
this.$confirm( this.$confirm(
// '"' + recordIds + '"?', // '"' + recordIds + '"?',
"是否删除该选项(删除后该站点下的所有摄像头将会被删除)", "是否删除该选项",
"警告", "警告",
{ {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -948,9 +948,13 @@ export default {
.then(function () { .then(function () {
return delSite(recordIds); return delSite(recordIds);
}) })
.then(() => { .then((data) => {
if (data.msg === 'ok') {
this.msgSuccess('删除成功');
} else {
this.msgError('删除失败,当前站点存在摄像头!');
}
this.getList(); this.getList();
this.msgSuccess("删除成功");
}) })
.catch(function () {}); .catch(function () {});
}, },