|
@@ -45,9 +45,10 @@
|
|
<a @click="handleEdit(nodeData)">修改</a>
|
|
<a @click="handleEdit(nodeData)">修改</a>
|
|
</a-menu-item>
|
|
</a-menu-item>
|
|
<a-menu-item>
|
|
<a-menu-item>
|
|
- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(nodeData.id)">
|
|
|
|
|
|
+ <a @click="handleDelete(nodeData)">删除</a>
|
|
|
|
+ <!-- <a-popconfirm title="删除该装置系统会删除掉对应的联锁,是否确认删除?" @confirm="() => handleDelete(nodeData.id)">
|
|
<a>删除</a>
|
|
<a>删除</a>
|
|
- </a-popconfirm>
|
|
|
|
|
|
+ </a-popconfirm> -->
|
|
</a-menu-item>
|
|
</a-menu-item>
|
|
</a-menu>
|
|
</a-menu>
|
|
</a-dropdown>
|
|
</a-dropdown>
|
|
@@ -282,23 +283,28 @@
|
|
this.$refs.modalForm.disableSubmit = false;
|
|
this.$refs.modalForm.disableSubmit = false;
|
|
this.$refs.modalForm.disableEdit = true;
|
|
this.$refs.modalForm.disableEdit = true;
|
|
},
|
|
},
|
|
- handleDelete: function (id) {
|
|
|
|
- if(!this.url.delete){
|
|
|
|
- this.$message.error("请设置url.delete属性!")
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+ handleDelete(value) {
|
|
|
|
+ console.log(value.interlockName, value.id)
|
|
var that = this;
|
|
var that = this;
|
|
- deleteAction(that.url.delete, {id: id}).then((res) => {
|
|
|
|
- if(res.code === 200){
|
|
|
|
- that.getTpmTreeData();
|
|
|
|
- that.$message.success(res.message);
|
|
|
|
- }else if(res.code === 400){
|
|
|
|
- that.getTpmTreeData();
|
|
|
|
- that.$message.warning(res.message);
|
|
|
|
- } else {
|
|
|
|
- that.$message.warning(res.message);
|
|
|
|
- }
|
|
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: `是否确认删除${value.interlockName}?`,
|
|
|
|
+ content: '确认删除该装置系统后,关联的联锁会一并删除',
|
|
|
|
+ onOk() {
|
|
|
|
+ deleteAction(that.url.delete, {id: value.id}).then((res) => {
|
|
|
|
+ if(res.code === 200){
|
|
|
|
+ that.getTpmTreeData();
|
|
|
|
+ that.$message.success(res.message);
|
|
|
|
+ }else if(res.code === 400){
|
|
|
|
+ that.getTpmTreeData();
|
|
|
|
+ that.$message.warning(res.message);
|
|
|
|
+ } else {
|
|
|
|
+ that.$message.warning(res.message);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ onCancel() {},
|
|
});
|
|
});
|
|
|
|
+
|
|
},
|
|
},
|
|
modalFormOk() {
|
|
modalFormOk() {
|
|
// 新增/修改 成功时,重载列表
|
|
// 新增/修改 成功时,重载列表
|