|
@@ -24,9 +24,35 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="square-right">
|
|
|
- <div class="square-count">
|
|
|
+ <div class="square-count" v-show="!currentBench.selected">
|
|
|
<status-bar :ready="readyCount" :occupied="occupiedCount" :offline="offlineCount"></status-bar>
|
|
|
</div>
|
|
|
+ <div class="origin-basic" v-show="currentBench.selected" @dblclick="handleInfoDblClick(currentBench.benchId)">
|
|
|
+ <div>
|
|
|
+ <span>Location:</span>
|
|
|
+ <span>Automation Lab-7E</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>MU_SW</span>
|
|
|
+ <span>{{ currentBench.MU_SW }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>Cluster</span>
|
|
|
+ <span>{{ currentBench.Cluster }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>Market</span>
|
|
|
+ <span>{{ currentBench.Market }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>Box IP</span>
|
|
|
+ <span>{{ currentBench.ip }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>Box Version</span>
|
|
|
+ <span>{{ currentBench.equipment?.version }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="square-list">
|
|
|
<TabList :tabs="tabs" :itemRender="itemRender" :tabClass="tabClass"></TabList>
|
|
|
</div>
|
|
@@ -61,6 +87,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
currentBenchId: 0,
|
|
|
+ currentBench: {},
|
|
|
inputValue: '',
|
|
|
isOpen: false,
|
|
|
gridItems: [1, 2, 3, 4, 5, 6, 7, 8, 9],
|
|
@@ -357,8 +384,92 @@
|
|
|
onClickOutside() {
|
|
|
},
|
|
|
handleListClick(benchId,itemtype) {
|
|
|
+ if(itemtype == 2)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ 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');
|
|
|
+ for(var index = 0; index<items.length;index++)
|
|
|
+ {
|
|
|
+ items[index].style.background = "#000000";
|
|
|
+ if(this.images[index].alt == benchId)
|
|
|
+ {
|
|
|
+ console.log('equal');
|
|
|
+ items[index].style.background = "#ffffff"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //this.currentBench = this.benchList.find(b => b.id == benchId);
|
|
|
+ //this.isDetailVisible = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ //this.$refs.benchdetail.init(benchId);
|
|
|
+ //this.benchList.forEach(element =>
|
|
|
+ //{
|
|
|
+ // element.style = "{background: rgba(0, 0, 0, 1)}"
|
|
|
+ //});
|
|
|
+ if(benchId == this.currentBench.id && this.currentBench.selected == true)
|
|
|
+ {
|
|
|
+ this.currentBench.selected = false;
|
|
|
+ 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));
|
|
|
+ itemOther.selected = false;
|
|
|
+ if(parseInt(benchId) == parseInt(title[0].textContent))
|
|
|
+ {
|
|
|
+ items[index].style.background = "#000000C0"
|
|
|
+ this.currentBench = this.benchList.find(b => b.id == benchId);
|
|
|
+ this.currentBench.selected = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
handleListDbClick(benchId,itemtype) {
|
|
|
+ if(itemtype == 2)
|
|
|
+ {
|
|
|
+ window.location.href = '/task2?m=8b934420_ZJUb_b6f9';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ //this.currentBench = this.benchList.find(b => b.id == benchId);
|
|
|
+ //this.isDetailVisible = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ //this.$refs.benchdetail.init(benchId);
|
|
|
+ //this.benchList.forEach(element =>
|
|
|
+ //{
|
|
|
+ // element.style = "{background: rgba(0, 0, 0, 1)}"
|
|
|
+ //});
|
|
|
+ this.currentBench = this.benchList.find(b => b.id == benchId);
|
|
|
+ //this.currentBench.style = "{background: rgba(0, 0, 0, 1)}"
|
|
|
+ console.log('current bench',this.currentBench)
|
|
|
+ this.isRemoteBtnVisible = true;
|
|
|
+ this.isDetailVisible = true;
|
|
|
+ });
|
|
|
},
|
|
|
getBenchImage(benchId, screenType, wsRemote, func) {
|
|
|
let self = this;
|
|
@@ -382,33 +493,58 @@
|
|
|
},
|
|
|
handleClickImg(benchId,indexParam) {
|
|
|
this.$nextTick(() => {
|
|
|
- //this.$refs.benchdetail.init(benchId);
|
|
|
- //this.benchList.forEach(element =>
|
|
|
- //{
|
|
|
- // element.style = "{background: rgba(0, 0, 0, 1)}"
|
|
|
- //});
|
|
|
- if(benchId == this.currentBenchId)
|
|
|
- {
|
|
|
- benchId = 0;
|
|
|
- let items = document.getElementsByClassName('grid-item-background');
|
|
|
- for(var index = 0; index<items.length;index++)
|
|
|
- {
|
|
|
- items[index].style.background = "#000000"
|
|
|
- }
|
|
|
- return;
|
|
|
- }
|
|
|
- this.currentBenchId = benchId;
|
|
|
- let items = document.getElementsByClassName('grid-item-background');
|
|
|
- for(var index = 0; index<items.length;index++)
|
|
|
- {
|
|
|
- items[index].style.background = "#000000";
|
|
|
- if(index == indexParam)
|
|
|
- {
|
|
|
- console.log('equal');
|
|
|
- items[index].style.background = "#ffffff"
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ if(benchId == this.currentBenchId)
|
|
|
+ {
|
|
|
+ benchId = 0;
|
|
|
+ let items = document.getElementsByClassName('grid-item-background');
|
|
|
+ for(var index = 0; index<items.length;index++)
|
|
|
+ {
|
|
|
+ items[index].style.background = "#000000"
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.currentBenchId = benchId;
|
|
|
+ let items = document.getElementsByClassName('grid-item-background');
|
|
|
+ for(var index = 0; index<items.length;index++)
|
|
|
+ {
|
|
|
+ items[index].style.background = "#000000";
|
|
|
+ if(index == indexParam)
|
|
|
+ {
|
|
|
+ console.log('equal');
|
|
|
+ items[index].style.background = "#ffffff"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if(benchId == this.currentBench.id && this.currentBench.selected == true)
|
|
|
+ {
|
|
|
+ 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));
|
|
|
+ itemOther.selected = false;
|
|
|
+ if(parseInt(benchId) == parseInt(title[0].textContent))
|
|
|
+ {
|
|
|
+ items[index].style.background = "#000000C0"
|
|
|
+ this.currentBench = this.benchList.find(b => b.id == benchId);
|
|
|
+ this.currentBench.selected = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
handleCloseImg(benchId) {
|
|
|
var strRemoteBenchList = window.localStorage.getItem('remoteBenchList');
|
|
@@ -443,3 +579,21 @@
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style scoped>
|
|
|
+.origin-basic {
|
|
|
+ padding: 15px 20px;
|
|
|
+ color: #ccc;
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
+.origin-basic div {
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+.origin-basic div span {
|
|
|
+ margin-right: 12px;
|
|
|
+}
|
|
|
+.origin-basic h2 {
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-bottom: 15px;
|
|
|
+}
|
|
|
+</style>
|