| | |
| | | <div v-for="(item, itemIndex) in dataGroup" :key="itemIndex" class="item-container">
|
| | | <div class="item-row">
|
| | | <span class="name" style="width:300px;">{{ item.name }}</span>
|
| | | <el-input style="width:250px;" v-if="item.state != 0 && item.type === '0'" v-model="item.value"
|
| | |
|
| | | <el-input style="width:250px;" v-if="item.state != 0 && item.type === '0' && groupIndex === 0" v-model="item.value" @keyup.enter.native="A01start"
|
| | | class="input-box"></el-input>
|
| | | <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 1" v-model="item.value" @keyup.enter.native="A02start"
|
| | | class="input-box"></el-input>
|
| | | <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 2" v-model="item.value" @keyup.enter.native="B01start"
|
| | | class="input-box"></el-input>
|
| | | <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0' && groupIndex === 3" v-model="item.value" @keyup.enter.native="B02start"
|
| | | class="input-box"></el-input>
|
| | | <el-input style="width:250px;" v-else-if="item.state != 0 && item.type === '0'" v-model="item.value"
|
| | | class="input-box"></el-input>
|
| | | </div>
|
| | | </div>
|
| | |
| | | </el-card>
|
| | | </el-col>
|
| | | </el-row>
|
| | |
|
| | | <div class="container">
|
| | | <!-- 这里是用于显示内嵌 Vue 页面的区域 -->
|
| | | <div class="container">
|
| | | |
| | | <component :is="embeddedComponent"></component>
|
| | | </div>
|
| | | </div> |
| | |
|
| | | <!-- <el-button @click="submitDataToBackend">提交数据到后端</el-button> -->
|
| | | </div>
|
| | |
| | |
|
| | |
|
| | | },
|
| | | A01start(){
|
| | |
|
| | | const data = [];
|
| | |
|
| | | for (let i = 0; i < 1; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | |
|
| | | data.push(values);
|
| | | }
|
| | | data.push([], [], [],[],[],[]);
|
| | |
|
| | |
|
| | |
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | |
|
| | | },
|
| | | A02start(){
|
| | | const data = [];
|
| | |
|
| | | for (let i = 1; i < 2; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | | data.unshift([]);
|
| | | data.push(values);
|
| | | }
|
| | | data.push([], [], [],[],[]);
|
| | |
|
| | |
|
| | |
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | |
|
| | | },
|
| | | B01start(){
|
| | | const data = [];
|
| | |
|
| | | for (let i = 2; i < 3; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | | data.unshift([], []);
|
| | | data.push(values);
|
| | | }
|
| | | //data.unshift([]);
|
| | |
|
| | | data.push([], [], [],[]);
|
| | |
|
| | |
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | |
|
| | | },
|
| | | B02start(){
|
| | | const data = [];
|
| | |
|
| | | for (let i = 3; i < 4; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | | data.unshift([], [], []);
|
| | | data.push(values);
|
| | | }
|
| | |
|
| | | data.push([], [],[]);
|
| | |
|
| | |
|
| | |
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | |
|
| | | },
|
| | | submitDataToBackend (currentButtonName) {
|
| | | if (currentButtonName === 'A01启动' || currentButtonName === 'A01 Start') {
|
| | | const data = [];
|
| | |
|
| | | for (let i = 0; i < 1; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | | const values = [this.jsonData[0][3].button.value]
|
| | |
|
| | | data.push(values);
|
| | | }
|
| | | data.push([], [], [],[],[],[]);
|
| | | |
| | | data.unshift([], [], [],[],[],[],[]);
|
| | |
|
| | |
|
| | |
|
| | |
| | | if (currentButtonName === 'A02启动' || currentButtonName === 'A02 Start') {
|
| | | const data = [];
|
| | |
|
| | | for (let i = 1; i < 2; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | | const values = [this.jsonData[1][3].button.value]
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | | data.unshift([]);
|
| | | data.push(values);
|
| | | }
|
| | | data.push([], [], [],[],[]);
|
| | | data.push(values);
|
| | | |
| | | data.unshift([], [], [],[],[],[],[],[]);
|
| | |
|
| | |
|
| | |
|
| | | const jsonObject = { data };
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | |
|
| | | }
|
| | |
|
| | | if (currentButtonName === 'B01启动' || currentButtonName === 'B01 Start') {
|
| | | const data = [];
|
| | |
|
| | | for (let i = 2; i < 3; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | | const values = [this.jsonData[2][3].button.value]
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | | data.unshift([], []);
|
| | | data.push(values);
|
| | | }
|
| | | //data.unshift([]);
|
| | |
|
| | | data.push([], [], [],[]);
|
| | | data.push(values);
|
| | | |
| | | data.unshift([], [], [],[],[],[],[],[],[]);
|
| | |
|
| | |
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | |
|
| | | }
|
| | |
|
| | | if (currentButtonName === 'B02启动' || currentButtonName === 'B02 Start') {
|
| | | const data = [];
|
| | |
|
| | | for (let i = 3; i < 4; i++) {
|
| | | const inputData = this.jsonData[i].filter(item => item.type === '0').map(item => {
|
| | | return { value: item.value };
|
| | | });
|
| | | const values = [this.jsonData[3][3].button.value]
|
| | |
|
| | | const values = inputData.map(item => item.value);
|
| | | data.unshift([], [], []);
|
| | | data.push(values);
|
| | | }
|
| | |
|
| | | data.push([], [],[]);
|
| | | data.push(values);
|
| | | |
| | | data.unshift([], [], [],[],[],[],[],[],[],[]);
|
| | |
|
| | |
|
| | |
|
| | | const jsonObject = { data };
|
| | | const jsonObject = { data };
|
| | |
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | | // 提交数据到后端
|
| | | const jsonString = JSON.stringify(jsonObject);
|
| | | console.log('所有Type为0的value:', jsonString);
|
| | | socket?.send(jsonString);
|
| | |
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | let obj = JSON.parse(msg.data);
|
| | | // console.log(obj);
|
| | | // console.log(obj);
|
| | | const jsonData2 = this.jsonData;
|
| | | const weihuiling = obj.weihuiling;
|
| | | const handleMouseMove = throttle(function (event) {
|
| | |
| | |
|
| | |
|
| | |
|
| | | //改变状态文字
|
| | | // for (let i = 2; i < jsonData2.length; i++) {
|
| | | // let arr6 = jsonData2[i];
|
| | | // for (let j = 2; j < arr6.length; j++) {
|
| | | // let obj6 = arr6[j];
|
| | | // if (obj6.button&& (obj6.button.name === "未回零" || obj6.button.name === "NotZero")) {
|
| | | // if ( obj6.button.name.includes("未")&& this.language==="zh-CN") {
|
| | | // console.log(obj6.button.name)
|
| | | // obj6.button.name =obj6.button.name.replace("未","已") ;
|
| | | // }
|
| | | // if ( obj6.button.name.includes("NotZero")) {
|
| | | // obj6.button.name =obj6.button.name.replace("NotZero","Zero") ;
|
| | | // }
|
| | | // }
|
| | |
|
| | | |
| | | // }
|
| | | // }
|
| | |
|
| | |
|
| | |
|
| | |
| | |
|
| | | document.addEventListener('mouseover', handleMouseMove);
|
| | |
|
| | |
|
| | | if(obj.zuhe1){
|
| | |
|
| | |
|
| | | //更新实时位置
|
| | |
| | | for (let j = 2; j < arr2.length; j++) {
|
| | | let obj3 = arr2[j];
|
| | | if (obj3.button) {
|
| | | if (obj3.button && (obj3.button.name === "未回零" || obj3.button.name === "NotZero")) {
|
| | | if (obj3.button && (obj3.button.name === "未回零" || obj3.button.name === "NotZero" || obj3.button.name === "已回零" || obj3.button.name === "Zero")) {
|
| | | obj3.button.value = weihuiling[0][i];
|
| | | // console.log(obj3.button.value)
|
| | | }
|
| | |
| | | for (let j = 0; j < arr.length; j++) {
|
| | | let obj = arr[j];
|
| | | if (obj.button && obj.button.value===1) {
|
| | | if ( obj.button.name.includes("未回零")&& this.language==="zh-CN") {
|
| | | if ( obj.button.name==="未回零" && this.language==="zh-CN") {
|
| | | obj.button.name =obj.button.name.replace("未回零","已回零") ;
|
| | | }
|
| | | if ( obj.button.name.includes("NotZero")) {
|
| | | if ( obj.button.name==="NotZero") {
|
| | | obj.button.name =obj.button.name.replace("NotZero","Zero") ;
|
| | | }
|
| | | }
|
| | | if (obj.button && obj.button.value===0) {
|
| | | if ( obj.button.name==="已回零"&& this.language==="zh-CN") {
|
| | | obj.button.name =obj.button.name.replace("已回零","未回零") ;
|
| | | }
|
| | | if ( obj.button.name==="Zero") {
|
| | | obj.button.name =obj.button.name.replace("Zero","NotZero") ;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | | };
|