|
@@ -25,8 +25,9 @@
|
|
|
<el-col v-for="(item, index) in images" :key="item" :span="8">
|
|
|
<div
|
|
|
class="grid-item-background"
|
|
|
- style="
|
|
|
- background-color: black;
|
|
|
+ :style="{
|
|
|
+ backgroundColor: item.alt == selectedBenchId ? '#fff': '#000'
|
|
|
+ }
|
|
|
"
|
|
|
>
|
|
|
<div class="grid-item">
|
|
@@ -692,7 +693,8 @@ export default {
|
|
|
timerId: 0,
|
|
|
autoPlanResultInterval: 0,
|
|
|
remoteBenchList: [],
|
|
|
- waterdotrefresh: false
|
|
|
+ waterdotrefresh: false,
|
|
|
+ selectedBenchId: 0
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -959,7 +961,6 @@ export default {
|
|
|
|
|
|
{
|
|
|
this.autoPlanResultInterval = setInterval(() => {
|
|
|
- // debugger
|
|
|
let autoCurrentTaskData = window.localStorage.getItem("autoCurrentTaskData");
|
|
|
autoCurrentTaskData = JSON.parse(autoCurrentTaskData);
|
|
|
if (autoCurrentTaskData) {
|
|
@@ -1448,6 +1449,8 @@ export default {
|
|
|
console.log("connect bench success", benchId);
|
|
|
self.getBenchImage(benchId, 1, wsArray[i], () => {});
|
|
|
this.currentBench = this.benchList.find((b) => b.id == benchId) || {};
|
|
|
+ this.remoteBenchList.push(benchId)
|
|
|
+ this.$store.dispatch("common/setGoHome", false);
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log("connect bench failed", benchId);
|
|
@@ -2324,17 +2327,16 @@ export default {
|
|
|
|
|
|
}
|
|
|
console.log("benchId", benchId);
|
|
|
- let selectedBench = this.benchList.find((i) => i.benchId == benchId);
|
|
|
- // console.log("selectedBench", selectedBench);
|
|
|
- bus.emit("benchInfoVisible", selectedBench);
|
|
|
+ if (this.isOpenSquare) {
|
|
|
+ let selectedBench = this.benchList.find((i) => i.benchId == benchId);
|
|
|
+ bus.emit("benchInfoVisible", selectedBench);
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
if (benchId == this.currentBench.benchId) {
|
|
|
- benchId = 0;
|
|
|
let items = document.getElementsByClassName("grid-item-background");
|
|
|
for (var index = 0; index < items.length; index++) {
|
|
|
items[index].style.background = "#000000";
|
|
|
}
|
|
|
- this.currentBench = {};
|
|
|
return;
|
|
|
}
|
|
|
let items = document.getElementsByClassName("grid-item-background");
|
|
@@ -2355,31 +2357,29 @@ export default {
|
|
|
//{
|
|
|
// element.style = "{background: rgba(0, 0, 0, 1)}"
|
|
|
//});
|
|
|
- if (benchId == this.currentBench.id &&this.currentBench.selected) {
|
|
|
- this.currentBench.selected = false;
|
|
|
- this.currentBench.scale = 1;
|
|
|
- this.currentBench = {};
|
|
|
- let items = document.getElementsByClassName("item-box");
|
|
|
- for (var index = 0; index < items.length; index++) {
|
|
|
- items[index].style.background = "#00000032";
|
|
|
- }
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (benchId == this.currentBench.id &&this.currentBench.selected) {
|
|
|
+ // this.currentBench.selected = false;
|
|
|
+ // this.currentBench.scale = 1;
|
|
|
+ // this.currentBench = {};
|
|
|
+ // let items = document.getElementsByClassName("item-box");
|
|
|
+ // for (var index = 0; index < items.length; index++) {
|
|
|
+ // items[index].style.background = "#00000032";
|
|
|
+ // }
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
let items = document.getElementsByClassName("item-box");
|
|
|
for (var index = 0; index < items.length; index++) {
|
|
|
items[index].style.background = "#00000032";
|
|
|
- let title = items[index].getElementsByClassName("item-title");
|
|
|
// console.log("textContent", title[0].textContent);
|
|
|
let itemOther = this.benchList.find(
|
|
|
- (b) => parseInt(b.id) == parseInt(title[0].textContent)
|
|
|
+ (b) => b.id == items[index].dataset.index
|
|
|
);
|
|
|
if (itemOther) {
|
|
|
itemOther.selected = false;
|
|
|
}
|
|
|
- if (parseInt(benchId) == parseInt(title[0].textContent)) {
|
|
|
+ if (benchId == items[index].dataset.index) {
|
|
|
items[index].style.background = "#000000C0";
|
|
|
- this.currentBench = this.benchList.find((b) => b.id == benchId);
|
|
|
- this.currentBench.selected = true;
|
|
|
+ this.selectedBenchId = benchId
|
|
|
}
|
|
|
}
|
|
|
// console.log('this.currentBench', this.currentBench);
|
|
@@ -2444,6 +2444,7 @@ export default {
|
|
|
this.selectBench(benchId);
|
|
|
},
|
|
|
handleClickImg(benchId, indexParam) {
|
|
|
+ this.selectedBenchId = benchId;
|
|
|
this.$nextTick(() => {
|
|
|
if (benchId == this.currentBenchId) {
|
|
|
benchId = 0;
|
|
@@ -2464,7 +2465,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.$nextTick(() => {
|
|
|
- debugger
|
|
|
if (
|
|
|
benchId == this.currentBench.id &&
|
|
|
this.currentBench.selected == true
|