|
@@ -22,7 +22,7 @@
|
|
|
/>
|
|
|
<div class="square-map" v-show="isOpenSquare && !isOpen">
|
|
|
<el-row>
|
|
|
- <el-col v-for="(item, index) in images" :key="item" :span="8">
|
|
|
+ <el-col v-for="(item, index) in images" :key="index" :span="8">
|
|
|
<div
|
|
|
class="grid-item-background"
|
|
|
:style="{
|
|
@@ -269,6 +269,59 @@
|
|
|
</div>
|
|
|
</Transition>
|
|
|
<img :src="mainSnapshot" />
|
|
|
+ <el-row v-show="isConnected && !isOpenSquare && !isOpen" class="bench-button">
|
|
|
+ <el-col :span="5" class="btn-item" style="text-align: center">
|
|
|
+ {{currentBench && currentBench.name}}
|
|
|
+ </el-col>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ class="btn-item"
|
|
|
+ :class="{ benchBtnActive: isPlaying }"
|
|
|
+ >
|
|
|
+ <el-tooltip class="item" effect="dark" content="音量" placement="top-start">
|
|
|
+ <img
|
|
|
+ @click="connectAudioDevice('collectAudio')"
|
|
|
+ src="../../images/sound.png"
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ class="btn-item"
|
|
|
+ :class="{ benchBtnActive: isRecording }"
|
|
|
+ >
|
|
|
+ <el-tooltip class="item" effect="dark" content="麦克风" placement="top-start">
|
|
|
+ <img
|
|
|
+ @click="connectAudioDevice('playAudio')"
|
|
|
+ src="../../images/mic.png"
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ class="btn-item"
|
|
|
+ :class="{ benchBtnActive: displayTapMode }"
|
|
|
+ >
|
|
|
+ <el-tooltip class="item" effect="dark" content="点击" placement="top-start">
|
|
|
+ <img @click="tapModeControl" src="../../images/pointer.png" />
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="btn-item" v-show="false">
|
|
|
+ <el-tooltip class="item" effect="dark" content="日志" placement="top-start">
|
|
|
+ <img @click="showLogBox" src="../../images/book.png" />
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="btn-item">
|
|
|
+ <el-tooltip class="item" effect="dark" content="唤醒语音助手按钮" placement="top-start">
|
|
|
+ <img @click="pressPtt" src="../../images/robot.png" />
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="btn-item">
|
|
|
+ <el-tooltip class="item" effect="dark" content="断开远程控制按钮" placement="top-start">
|
|
|
+ <img @click="disconnectBench" src="../../images/disconnect.png" />
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
<image-list
|
|
|
v-show="isConnected && !isOpenSquare && !isOpen"
|
|
@@ -281,7 +334,7 @@
|
|
|
@next-page="nextPage"
|
|
|
class="image-container"
|
|
|
/>
|
|
|
- <el-row v-show="isConnected && !isOpenSquare && !isOpen" class="bench-button">
|
|
|
+ <!-- <el-row v-show="isConnected && !isOpenSquare && !isOpen" class="bench-button">
|
|
|
<el-col :span="5" class="btn-item" style="text-align: center">{{
|
|
|
currentBench && currentBench.name
|
|
|
}}</el-col>
|
|
@@ -290,62 +343,50 @@
|
|
|
class="btn-item"
|
|
|
:class="{ benchBtnActive: isPlaying }"
|
|
|
>
|
|
|
- <el-tooltip class="item" effect="dark" content="音量" placement="top-start">
|
|
|
- <img
|
|
|
- @click="connectAudioDevice('collectAudio')"
|
|
|
- src="../../images/sound.png"
|
|
|
- />
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
+ <el-tooltip class="item" effect="dark" content="音量" placement="top-start">
|
|
|
+ <img
|
|
|
+ @click="connectAudioDevice('collectAudio')"
|
|
|
+ src="../../images/sound.png"
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
</el-col>
|
|
|
<el-col
|
|
|
:span="3"
|
|
|
class="btn-item"
|
|
|
:class="{ benchBtnActive: isRecording }"
|
|
|
>
|
|
|
- <el-tooltip class="item" effect="dark" content="麦克风" placement="top-start">
|
|
|
- <img
|
|
|
- @click="connectAudioDevice('playAudio')"
|
|
|
- src="../../images/mic.png"
|
|
|
- />
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
+ <el-tooltip class="item" effect="dark" content="麦克风" placement="top-start">
|
|
|
+ <img
|
|
|
+ @click="connectAudioDevice('playAudio')"
|
|
|
+ src="../../images/mic.png"
|
|
|
+ />
|
|
|
+ </el-tooltip>
|
|
|
</el-col>
|
|
|
<el-col
|
|
|
:span="3"
|
|
|
class="btn-item"
|
|
|
:class="{ benchBtnActive: displayTapMode }"
|
|
|
>
|
|
|
- <el-tooltip class="item" effect="dark" content="点击" placement="top-start">
|
|
|
- <img @click="tapModeControl" src="../../images/pointer.png" />
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
+ <el-tooltip class="item" effect="dark" content="点击" placement="top-start">
|
|
|
+ <img @click="tapModeControl" src="../../images/pointer.png" />
|
|
|
+ </el-tooltip>
|
|
|
</el-col>
|
|
|
<el-col :span="3" class="btn-item" v-show="false">
|
|
|
- <el-tooltip class="item" effect="dark" content="日志" placement="top-start">
|
|
|
- <img @click="showLogBox" src="../../images/book.png" />
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
+ <el-tooltip class="item" effect="dark" content="日志" placement="top-start">
|
|
|
+ <img @click="showLogBox" src="../../images/book.png" />
|
|
|
+ </el-tooltip>
|
|
|
</el-col>
|
|
|
<el-col :span="3" class="btn-item">
|
|
|
-
|
|
|
- <el-tooltip class="item" effect="dark" content="唤醒语音助手按钮" placement="top-start">
|
|
|
- <img @click="pressPtt" src="../../images/robot.png" />
|
|
|
- </el-tooltip>
|
|
|
+ <el-tooltip class="item" effect="dark" content="唤醒语音助手按钮" placement="top-start">
|
|
|
+ <img @click="pressPtt" src="../../images/robot.png" />
|
|
|
+ </el-tooltip>
|
|
|
</el-col>
|
|
|
- <!-- <el-col :span="3" class="btn-item" @click="clickBenchList">
|
|
|
- <el-tooltip class="item" effect="dark" content="最小化按钮" placement="top-start">
|
|
|
- <img @click="gotoGrid" src="../../images/grid.png" />
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
- </el-col> -->
|
|
|
<el-col :span="3" class="btn-item">
|
|
|
- <el-tooltip class="item" effect="dark" content="断开远程控制按钮" placement="top-start">
|
|
|
- <img @click="disconnectBench" src="../../images/disconnect.png" />
|
|
|
- </el-tooltip>
|
|
|
-
|
|
|
+ <el-tooltip class="item" effect="dark" content="断开远程控制按钮" placement="top-start">
|
|
|
+ <img @click="disconnectBench" src="../../images/disconnect.png" />
|
|
|
+ </el-tooltip>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
|
|
|
</div>
|
|
|
|
|
@@ -897,9 +938,9 @@ export default {
|
|
|
|
|
|
window.bmMapItemActivate = this.bmMapItemActivate;
|
|
|
|
|
|
- this.$store.dispatch("benchList/fetchBenchList").then(()=>{
|
|
|
- this.getImageName();
|
|
|
- });
|
|
|
+ this.$store.dispatch("benchList/fetchBenchList").then(()=>{
|
|
|
+ this.getImageName();
|
|
|
+ });
|
|
|
|
|
|
// 调用定时器方法,返回定时器id,用于按条件清空
|
|
|
that.timerId = that.myInterval((count) => {
|
|
@@ -1065,28 +1106,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getImageName() {
|
|
|
- var sqlstr = "SELECT * FROM dat_bench_extend order by bench_id asc";
|
|
|
- let msg = {
|
|
|
- cmd: "query", // server端要进行判断的
|
|
|
- data: {
|
|
|
- name: "name", // 这个无所谓怎么写,有就行
|
|
|
- sql: sqlstr,
|
|
|
- },
|
|
|
- };
|
|
|
- window.vm.$socket.emit("REPT", msg, (datas) => {
|
|
|
- let result = datas.data;
|
|
|
- for (var item of result) {
|
|
|
-
|
|
|
- var currentBench = this.benchList.find((a) => a.id == item.bench_id);
|
|
|
- if (currentBench) {
|
|
|
- currentBench.image = require("../../assets/bench_img/"+item.bench_img);
|
|
|
- }
|
|
|
- this.tabs[0].list = this.benchList;
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ getImageName() {
|
|
|
+ var sqlstr = "SELECT * FROM dat_bench_extend order by bench_id asc";
|
|
|
+ let msg = {
|
|
|
+ cmd: "query", // server端要进行判断的
|
|
|
+ data: {
|
|
|
+ name: "name", // 这个无所谓怎么写,有就行
|
|
|
+ sql: sqlstr,
|
|
|
+ },
|
|
|
+ };
|
|
|
+ window.vm.$socket.emit("REPT", msg, (datas) => {
|
|
|
+ let result = datas.data;
|
|
|
+ for (var item of result) {
|
|
|
+ var currentBench = this.benchList.find((a) => a.id == item.bench_id);
|
|
|
+ if (currentBench) {
|
|
|
+ currentBench.image = require("../../assets/bench_img/"+item.bench_img);
|
|
|
+ }
|
|
|
+ this.tabs[0].list = this.benchList;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
changeCurrentBench(benchId) {
|
|
|
this.isDetailVisible = false;
|
|
|
if (this.isOpen3d) {
|
|
@@ -1457,56 +1496,72 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
itemRender(item) {
|
|
|
-
|
|
|
- //item.image = require("../../assets/mechine.png");
|
|
|
- //item.image = require("../../assets/bench_img/"+item.benchImg);
|
|
|
- /*return `
|
|
|
- <div class="item-box">
|
|
|
- <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
|
|
|
- <div class="item-right">
|
|
|
- <div class="item-title">
|
|
|
- <span onClick="handleListClick(${item.id})">${item.id}</span>
|
|
|
- <span onClick="selectBench(${item.id})" class="el-icon-s-platform ${item.status}"></span>
|
|
|
- </div>
|
|
|
- <div class="item-text">
|
|
|
- <div class="item-description">Automation Lab-7E</div>
|
|
|
- <div class="item-description">${item.name}</div>
|
|
|
- <div class="item-tag">
|
|
|
- <div class="tag">${item.Market}</div>
|
|
|
- <div class="tag">${item.Platform}</div>
|
|
|
- <div class="tag">${item.Project}</div>
|
|
|
- <div class="tag">${item.Carline}</div>
|
|
|
- <div class="tag">${item.Cluster}</div>
|
|
|
- </div>
|
|
|
- <div class="item-tag">
|
|
|
- <div class="tag">${item.MU_SW}</div>
|
|
|
- <div class="tag">${item.Variant}</div>
|
|
|
- <div class="tag">${item.ip}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>`;*/
|
|
|
- return `
|
|
|
- <div onDblClick="handleListDbClick(${item.id})" data-index="${item.id}" onClick="handleListClick(${item.id})" class="item-box">
|
|
|
- <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
|
|
|
- <div class="item-right">
|
|
|
- <div class="item-text">
|
|
|
- <div class="item-title">${item.name}
|
|
|
- <span onClick="selectBench(${item.id})" class="el-icon-monitor ${item.status}"></span>
|
|
|
- </div>
|
|
|
- <div class="item-description">Automation Lab-7E</div>
|
|
|
- <div class="item-tag">
|
|
|
- <div class="tag" title="Market">${item.Market}</div>
|
|
|
- <div class="tag" title="Platform">${item.Platform}</div>
|
|
|
- <div class="tag" title="Project">${item.Project}</div>
|
|
|
- <div class="tag" title="Carline">${item.Carline}</div>
|
|
|
- <div class="tag" title="Cluster">${item.Cluster}</div>
|
|
|
- <div class="tag" title="MU_SW">${item.MU_SW}</div>
|
|
|
- <div class="tag" title="Variant">${item.Variant}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>`;
|
|
|
+ if (item.groups["Basic Information"].Display == "DUO") {
|
|
|
+ return `
|
|
|
+ <div onDblClick="handleListDbClick(${item.id})" data-index="${item.id}" onClick="handleListClick(${item.id})" class="item-box">
|
|
|
+ <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
|
|
|
+ <div class="item-right">
|
|
|
+ <div class="item-text">
|
|
|
+ <div class="item-title">${item.name}
|
|
|
+ <span onClick="selectBench(${item.id})" class="el-icon-s-platform ${item.status}"></span>
|
|
|
+ </div>
|
|
|
+ <div class="item-description">Automation Lab-7E</div>
|
|
|
+ <div class="item-tag">
|
|
|
+ <div class="tag" title="Market">${item.Market}</div>
|
|
|
+ <div class="tag" title="Platform">${item.Platform}</div>
|
|
|
+ <div class="tag" title="Project">${item.Project}</div>
|
|
|
+ <div class="tag" title="Carline">${item.Carline}</div>
|
|
|
+ <div class="tag" title="Cluster">${item.Cluster}</div>
|
|
|
+ <div class="tag" title="MU_SW">${item.MU_SW}</div>
|
|
|
+ <div class="tag" title="Variant">${item.Variant}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>`;
|
|
|
+ }else{
|
|
|
+ return `
|
|
|
+ <div onDblClick="handleListDbClick(${item.id})" data-index="${item.id}" onClick="handleListClick(${item.id})" class="item-box">
|
|
|
+ <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
|
|
|
+ <div class="item-right">
|
|
|
+ <div class="item-text">
|
|
|
+ <div class="item-title">${item.name}
|
|
|
+ <span onClick="selectBench(${item.id})" class="el-icon-monitor ${item.status}"></span>
|
|
|
+ </div>
|
|
|
+ <div class="item-description">Automation Lab-7E</div>
|
|
|
+ <div class="item-tag">
|
|
|
+ <div class="tag" title="Market">${item.Market}</div>
|
|
|
+ <div class="tag" title="Platform">${item.Platform}</div>
|
|
|
+ <div class="tag" title="Project">${item.Project}</div>
|
|
|
+ <div class="tag" title="Carline">${item.Carline}</div>
|
|
|
+ <div class="tag" title="Cluster">${item.Cluster}</div>
|
|
|
+ <div class="tag" title="MU_SW">${item.MU_SW}</div>
|
|
|
+ <div class="tag" title="Variant">${item.Variant}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>`;
|
|
|
+ }
|
|
|
+ // return `
|
|
|
+ // <div onDblClick="handleListDbClick(${item.id})" data-index="${item.id}" onClick="handleListClick(${item.id})" class="item-box">
|
|
|
+ // <div class="item-image"><img src="${item.image}" alt="${item.title}"></div>
|
|
|
+ // <div class="item-right">
|
|
|
+ // <div class="item-text">
|
|
|
+ // <div class="item-title">${item.name}
|
|
|
+ // <span onClick="selectBench(${item.id})" class="el-icon-monitor ${item.status}"></span>
|
|
|
+ // </div>
|
|
|
+ // <div class="item-description">Automation Lab-7E</div>
|
|
|
+ // <div class="item-tag">
|
|
|
+ // <div class="tag" title="Market">${item.Market}</div>
|
|
|
+ // <div class="tag" title="Platform">${item.Platform}</div>
|
|
|
+ // <div class="tag" title="Project">${item.Project}</div>
|
|
|
+ // <div class="tag" title="Carline">${item.Carline}</div>
|
|
|
+ // <div class="tag" title="Cluster">${item.Cluster}</div>
|
|
|
+ // <div class="tag" title="MU_SW">${item.MU_SW}</div>
|
|
|
+ // <div class="tag" title="Variant">${item.Variant}</div>
|
|
|
+ // </div>
|
|
|
+ // </div>
|
|
|
+ // </div>
|
|
|
+ // </div>`;
|
|
|
},
|
|
|
handleImageClick(index) {
|
|
|
this.selectBench(
|
|
@@ -2271,7 +2326,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
var source = audioCtx.createBufferSource();
|
|
|
source.buffer = myArrayBuffer;
|
|
|
source.connect(audioCtx.destination);
|
|
@@ -2421,6 +2475,9 @@ export default {
|
|
|
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) {
|
|
|
+ items[index].style.background = "#ffffff";
|
|
|
+ }
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
@@ -2570,6 +2627,9 @@ export default {
|
|
|
let items = document.getElementsByClassName("grid-item-background");
|
|
|
for (var index = 0; index < items.length; index++) {
|
|
|
items[index].style.background = "#000000";
|
|
|
+ if (index == indexParam) {
|
|
|
+ items[index].style.background = "#ffffff";
|
|
|
+ }
|
|
|
}
|
|
|
this.brnchshow = false;
|
|
|
|
|
@@ -2579,13 +2639,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
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) {
|
|
|
- items[index].style.background = "#ffffff";
|
|
|
- }
|
|
|
- }
|
|
|
+ // let items = document.getElementsByClassName("grid-item-background");
|
|
|
+ // for (var index = 0; index < items.length; index++) {
|
|
|
+ // items[index].style.background = "#000000";
|
|
|
+ // if (index == indexParam) {
|
|
|
+ // items[index].style.background = "#ffffff";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
});
|
|
|
this.$nextTick(() => {
|
|
|
if (
|
|
@@ -2608,7 +2668,10 @@ export default {
|
|
|
let itemOther = this.benchList.find(
|
|
|
(b) => parseInt(b.id) == parseInt(title[0].textContent) || b.id == benchId
|
|
|
);
|
|
|
- itemOther.selected = false;
|
|
|
+ if(itemOther){
|
|
|
+ itemOther.selected = false;
|
|
|
+ }
|
|
|
+ // itemOther.selected = false;
|
|
|
if(items[index].dataset.index == benchId){
|
|
|
items[index].style.background = "#000000C0";
|
|
|
this.currentBench = this.benchList.find((b) => b.id == benchId);
|