Commit a2faf2df authored by yaqizhang's avatar yaqizhang

管道管理

parent 0de38c9b
...@@ -479,21 +479,27 @@ ...@@ -479,21 +479,27 @@
handleDelete(row) { handleDelete(row) {
row.isDel = "1"; row.isDel = "1";
var devices = " "; var devices = " ";
for(var i = 0; i < row.deviceInfoList.length; i++){ var tip = '';
var obj = row.deviceInfoList[i]; if (row.deviceInfoList != null){
devices = devices + obj.deviceName + " "; for(var i = 0; i < row.deviceInfoList.length; i++){
var obj = row.deviceInfoList[i];
devices = devices + obj.deviceName + " ";
}
tip = '请确认是否删除管道名称为"' + row.pipeName + '"的数据项,该管道下包含的设备(' + devices + ')将一并被删除', "警告"
}else{
tip ='请确认是否删除管道名称为"' + row.pipeName + '"的数据项';
} }
this.$confirm('请确认是否删除管道名称为"' + row.pipeName + '"的数据项,该管道下包含的设备(' + devices + ')将一并被删除', "警告", { this.$confirm(tip , {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(function () { }).then(function () {
return updatePipe(row); return updatePipe(row);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.msgSuccess("已删除"); this.msgSuccess("已删除");
}).catch(() => { }).catch(() => {
}); });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
......
...@@ -332,11 +332,18 @@ ...@@ -332,11 +332,18 @@
handleDelete(res) { handleDelete(res) {
res.isDel = "1"; res.isDel = "1";
var devices = " "; var devices = " ";
for (var i = 0; i < res.deviceInfoList.length; i++) { var tip = '';
var obj = res.deviceInfoList[i]; if(res.deviceInfoList != null){
devices = devices + obj.deviceName + " "; for (var i = 0; i < res.deviceInfoList.length; i++) {
var obj = res.deviceInfoList[i];
devices = devices + obj.deviceName + " ";
}
tip = '该管道下包含的设备(' + devices + ')将一并被删除', "警告"
}else{
tip = '请确认是否删除管道名称为"' + res.pipeName + '"的数据项'
} }
this.$confirm('请确认是否删除管道名称为"' + res.pipeName + '"的数据项,该管道下包含的设备(' + devices + ')将一并被删除', "警告", {
this.$confirm(tip, {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
......
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