From 5a6d6b9f3bb00b93e70d316c0fafcb34ddd0c510 Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期二, 09 一月 2024 14:25:13 +0800 Subject: [PATCH] 工位终端优化 --- jcdm-ui/src/views/main/kb/stationTerminal/index.vue | 110 +++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 87 insertions(+), 23 deletions(-) diff --git a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue index 6169b62..859fdc5 100644 --- a/jcdm-ui/src/views/main/kb/stationTerminal/index.vue +++ b/jcdm-ui/src/views/main/kb/stationTerminal/index.vue @@ -14,7 +14,7 @@ <el-col :span="12"> <el-card shadow="never"> <span class="head-font">鎬绘垚缂栫爜 : {{headContent.sfcCode}}</span> - <el-input v-model="input" style="float: right;width: 150px;" placeholder="璇疯緭鍏ュ唴瀹�"></el-input> + <el-input v-model="content" style="float: right;width: 150px;" placeholder="璇疯緭鍏ュ唴瀹�"></el-input> <el-button @click="scanCompleted" style="float: right" type="primary">鎵爜瀹屾垚</el-button> <el-button @click="clearClick" style="float: right" type="danger">娓呴櫎</el-button> </el-card> @@ -86,8 +86,8 @@ </el-col> <el-col :span="18"> - <el-tabs type="border-card" style="height: 600px"> - <el-tab-pane> + <el-tabs type="border-card" style="height: 600px" v-model="activeName" @tab-click="changeMenu"> + <el-tab-pane name="first"> <span slot="label"> <a class="el-icon-date"></a>棣栭〉</span> <el-col :span="8"> <el-table> @@ -99,27 +99,27 @@ <el-image style="height: 520px;width: 100%" :src="imgSrc"></el-image> </el-col> </el-tab-pane> - <el-tab-pane> + <el-tab-pane name="second"> <span slot="label"> <b class="el-icon-date"></b>鐗╂枡BOM</span> - <el-empty > + <el-empty> <span slot="description">鏆傛棤鏁版嵁</span> </el-empty> </el-tab-pane> - <el-tab-pane> - <span slot="label"> <c class="el-icon-date"></c>閲囬泦娓呭崟</span> - <el-empty > + <el-tab-pane name="third"> + <span slot="label"> <b class="el-icon-date"></b>閲囬泦娓呭崟</span> + <el-empty> <span slot="description">鏆傛棤鏁版嵁</span> </el-empty> </el-tab-pane> - <el-tab-pane> - <span slot="label"> <d class="el-icon-date"></d>瀹夌伅鐘舵��</span> - <el-empty > + <el-tab-pane name="fourth"> + <span slot="label"> <b class="el-icon-date"></b>瀹夌伅鐘舵��</span> + <el-empty> <span slot="description">鏆傛棤鏁版嵁</span> </el-empty> </el-tab-pane> - <el-tab-pane> - <span slot="label"> <e class="el-icon-date"></e>宸ヨ壓閰嶆柟</span> - <el-empty > + <el-tab-pane name="fifth"> + <span slot="label"> <b class="el-icon-date"></b>宸ヨ壓閰嶆柟</span> + <el-empty> <span slot="description">鏆傛棤鏁版嵁</span> </el-empty> </el-tab-pane> @@ -137,7 +137,6 @@ data() { return { ipAddress: '', - input: null, imgSrc: '', headContent: { processesCode: 'OP1010', @@ -164,22 +163,26 @@ scanFinish: 0, startWork: 0, release: 0 //鍏佽鏀捐 - } + }, + content: '', + activeName: 'first' } }, created() { - this.getIPAddress(); this.getStationConfList(); }, methods: { + changeMenu(tab, event) { + console.log(tab, event); + }, clearClick(){ this.$message('杩欐槸涓�鏉℃竻闄ゆ秷鎭彁绀�'); this.headContent.sfcCode = null }, scanCompleted(){ - this.$message('鎵爜瀹屾垚'+this.input); - this.headContent.sfcCode = this.input - this.queryParams.sfcCode = this.input + this.$message('鎵爜瀹屾垚'+this.content); + this.headContent.sfcCode = this.content + this.queryParams.sfcCode = this.content this.getList() this.cakeLamp.scanFinish = 1 }, @@ -200,9 +203,6 @@ clearInterval(this.timer); this.$message('淇濆瓨鑺傛媿涓�'+this.workpieceInformation.beat+'绉�'); }, - getIPAddress() { - this.ipAddress = window.location.hostname; - }, /** 鏌ヨ宸ヤ綅缁堢閰嶇疆鍒楄〃 */ getStationConfList() { let queryParams = { @@ -213,6 +213,10 @@ }); listStationConf(queryParams).then(response => { let rows = response.rows[0] + if(response.rows.length===0){ + this.$message('鏀筰p娌掓湁閰嶇疆宸ュ簭宸ヤ綅锛岃珛閲嶈│锛�'); + return + } this.headContent.processesName = rows.processesName this.headContent.processesCode = rows.processesCode }); @@ -255,3 +259,63 @@ font-size: 15px; } </style> +<!--<template>--> +<!-- <div>--> +<!-- <el-input v-model="url" type="text" style="width: 20%" /> --> +<!-- <el-button @click="join" type="primary">杩炴帴</el-button>--> +<!-- <el-button @click="exit" type="danger">鏂紑</el-button>--> + +<!-- <br />--> +<!-- <el-input type="textarea" v-model="message" :rows="9" />--> +<!-- <el-button type="info" @click="send">鍙戦�佹秷鎭�</el-button>--> +<!-- <br />--> +<!-- <br />--> +<!-- <el-input type="textarea" v-model="text_content" :rows="9" /> 杩斿洖鍐呭--> +<!-- <br />--> +<!-- <br />--> +<!-- </div>--> +<!--</template>--> + +<!--<script>--> +<!--export default {--> +<!-- data() {--> +<!-- return {--> +<!-- url: "ws://127.0.0.1:8081/websocket/message",--> +<!-- message: "",--> +<!-- text_content: "",--> +<!-- ws: null,--> +<!-- };--> +<!-- },--> +<!-- methods: {--> +<!-- join() {--> +<!-- const wsuri = this.url;--> +<!-- this.ws = new WebSocket(wsuri);--> +<!-- const self = this;--> +<!-- this.ws.onopen = function (event) {--> +<!-- self.text_content = self.text_content + "宸茬粡鎵撳紑杩炴帴!" + "\n";--> +<!-- };--> +<!-- this.ws.onmessage = function (event) {--> +<!-- console.log("鍚庣鍙戣繃鏉ョ殑娑堟伅"+event.data)--> +<!-- self.text_content = event.data + "\n";--> +<!-- };--> +<!-- this.ws.onclose = function (event) {--> +<!-- self.text_content = self.text_content + "宸茬粡鍏抽棴杩炴帴!" + "\n";--> +<!-- };--> +<!-- },--> +<!-- exit() {--> +<!-- if (this.ws) {--> +<!-- this.ws.close();--> +<!-- this.ws = null;--> +<!-- }--> +<!-- },--> +<!-- send() {--> +<!-- if (this.ws) {--> +<!-- this.ws.send(this.message);--> +<!-- } else {--> +<!-- alert("鏈繛鎺ュ埌鏈嶅姟鍣�");--> +<!-- }--> +<!-- },--> +<!-- },--> +<!--};--> +<!--</script>--> + -- Gitblit v1.9.3