|
|
@@ -178,12 +178,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="prePointId"
|
|
|
- label="前置节点"
|
|
|
+ label="前置隔离点"
|
|
|
width="100"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-select size="mini" v-model="scope.row.prePointId" @change="prePointIdChange(scope.row)"
|
|
|
- @visible-change="onDropdownVisibleChange(scope.row)"
|
|
|
+ @visible-change="onDropdownVisibleChange(scope.row)" clearable @clear="clearprePointId"
|
|
|
>
|
|
|
<el-option v-for="item in prePointIdOptions"
|
|
|
:key="item.pointId"
|
|
|
@@ -931,6 +931,25 @@ export default {
|
|
|
// 重新调用 onDropdownVisibleChange 确保其他节点的选项更新
|
|
|
this.onDropdownVisibleChange(row)
|
|
|
},
|
|
|
+ // 前置节点清除操作
|
|
|
+ clearprePointId(row) {
|
|
|
+ console.log(row, '清除前置节点');
|
|
|
+
|
|
|
+ // 重置当前行的 prePointId 为 null
|
|
|
+ row.prePointId = null;
|
|
|
+
|
|
|
+ // 更新 tableData 中对应行的 prePointId
|
|
|
+ const index = this.tableData.findIndex(item => item.pointId === row.pointId);
|
|
|
+ if (index !== -1) {
|
|
|
+ this.$set(this.tableData, index, row);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 恢复下拉选项为原始未过滤状态
|
|
|
+ this.prePointIdOptions = [...this.initprePointIdOptions];
|
|
|
+
|
|
|
+ // 调用 onDropdownVisibleChange 以刷新其他选项
|
|
|
+ this.onDropdownVisibleChange(row);
|
|
|
+ },
|
|
|
// 子组件逆向传递选中的隔离点
|
|
|
handleSelectPoint(points) {
|
|
|
// console.log(points, '父组件接收逆向传递选中的隔离点');
|