Commit a2faf2df authored by yaqizhang's avatar yaqizhang

管道管理

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