|
@@ -8,6 +8,7 @@
|
|
@showInfo="showInfo"
|
|
@showInfo="showInfo"
|
|
@addOne="addOne"
|
|
@addOne="addOne"
|
|
@delOne="delOne"
|
|
@delOne="delOne"
|
|
|
|
+ :curOne="curOne"
|
|
></model-list>
|
|
></model-list>
|
|
<div class="contentPanel">
|
|
<div class="contentPanel">
|
|
<toolbarTab
|
|
<toolbarTab
|
|
@@ -131,6 +132,11 @@ export default {
|
|
currentShare: "",
|
|
currentShare: "",
|
|
coordinate: { r: 0, h: 0, n: 0 }, // 存放传递给canvas的值
|
|
coordinate: { r: 0, h: 0, n: 0 }, // 存放传递给canvas的值
|
|
coordinateA: { r: 0, n: 0, hl: 0, hr: 0 }, // 存放传递给完美传感器canvas的值
|
|
coordinateA: { r: 0, n: 0, hl: 0, hr: 0 }, // 存放传递给完美传感器canvas的值
|
|
|
|
+ // 用于当前选中项的展示
|
|
|
|
+ curOne: {
|
|
|
|
+ share: "",
|
|
|
|
+ id: "",
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -186,11 +192,18 @@ export default {
|
|
this.addOne();
|
|
this.addOne();
|
|
this.getListApi = item.api;
|
|
this.getListApi = item.api;
|
|
this.subPageActiveName = item.fromId;
|
|
this.subPageActiveName = item.fromId;
|
|
|
|
+
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.getList();
|
|
this.getList();
|
|
});
|
|
});
|
|
|
|
+
|
|
this.$refs.canvasSensor.clear();
|
|
this.$refs.canvasSensor.clear();
|
|
this.$refs.canvasSensorA.clear();
|
|
this.$refs.canvasSensorA.clear();
|
|
|
|
+
|
|
|
|
+ this.curOne = {
|
|
|
|
+ share: "",
|
|
|
|
+ id: "",
|
|
|
|
+ };
|
|
},
|
|
},
|
|
showInfo(id) {
|
|
showInfo(id) {
|
|
this.$refs[`form${this.subPageActiveName}`].showInfo(id);
|
|
this.$refs[`form${this.subPageActiveName}`].showInfo(id);
|
|
@@ -209,9 +222,15 @@ export default {
|
|
this.$refs.canvasSensor.clear();
|
|
this.$refs.canvasSensor.clear();
|
|
this.$refs.canvasSensorA.clear();
|
|
this.$refs.canvasSensorA.clear();
|
|
},
|
|
},
|
|
- changeShare(share) {
|
|
|
|
|
|
+ changeShare(form) {
|
|
// 根据form传回的share进行按钮展示
|
|
// 根据form传回的share进行按钮展示
|
|
- this.currentShare = share;
|
|
|
|
|
|
+ this.currentShare = form.share;
|
|
|
|
+
|
|
|
|
+ // 确定当前展示哪条数据
|
|
|
|
+ this.curOne = {
|
|
|
|
+ share: form.share,
|
|
|
|
+ id: form.id,
|
|
|
|
+ };
|
|
},
|
|
},
|
|
showDone() {
|
|
showDone() {
|
|
this.$refs[`form${this.subPageActiveName}`].inputChange();
|
|
this.$refs[`form${this.subPageActiveName}`].inputChange();
|
|
@@ -220,12 +239,19 @@ export default {
|
|
this.$refs[
|
|
this.$refs[
|
|
`form${this.subPageActiveName}`
|
|
`form${this.subPageActiveName}`
|
|
].$refs.form.resetFields();
|
|
].$refs.form.resetFields();
|
|
|
|
+
|
|
this.$refs[`form${this.subPageActiveName}`].form.sensorCode = "";
|
|
this.$refs[`form${this.subPageActiveName}`].form.sensorCode = "";
|
|
this.$refs[`form${this.subPageActiveName}`].form.share = "";
|
|
this.$refs[`form${this.subPageActiveName}`].form.share = "";
|
|
this.$refs[`form${this.subPageActiveName}`].form.id = "";
|
|
this.$refs[`form${this.subPageActiveName}`].form.id = "";
|
|
|
|
+
|
|
this.currentShare = "";
|
|
this.currentShare = "";
|
|
this.$refs.canvasSensor.clear();
|
|
this.$refs.canvasSensor.clear();
|
|
this.$refs.canvasSensorA.clear();
|
|
this.$refs.canvasSensorA.clear();
|
|
|
|
+
|
|
|
|
+ this.curOne = {
|
|
|
|
+ share: "",
|
|
|
|
+ id: "",
|
|
|
|
+ };
|
|
},
|
|
},
|
|
delOne(id) {
|
|
delOne(id) {
|
|
const delApis = [
|
|
const delApis = [
|
|
@@ -251,6 +277,11 @@ export default {
|
|
) {
|
|
) {
|
|
this.addOne();
|
|
this.addOne();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ this.curOne = {
|
|
|
|
+ share: "",
|
|
|
|
+ id: "",
|
|
|
|
+ };
|
|
} else {
|
|
} else {
|
|
this.$message.error(res.message || "删除失败");
|
|
this.$message.error(res.message || "删除失败");
|
|
}
|
|
}
|