From dbe5f1d0156bd5bef1067c548ff39fe93d10205e Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期四, 18 一月 2024 16:51:13 +0800 Subject: [PATCH] 车间导入 --- jcdm-ui/src/views/main/cfkb/Instructions/index.vue | 102 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 82 insertions(+), 20 deletions(-) diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue index 7d33e70..26cb331 100644 --- a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue +++ b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue @@ -3,17 +3,18 @@ <el-row :gutter="3"> <el-col :span="6"> <el-card shadow="always"> - CFMOTO + <img style="width: 200px;height: 50px; margin-left: 40px; margin-top: 0px" src="@/assets/logo/jcdm2.png" alt="dark"> + <span style="margin-left: 66px; font-weight: bold">{{currentTime}}</span> </el-card> </el-col> <el-col :span="3"> <el-card shadow="always"> - {{productCode}} + <span class="centerText" style="margin-top: 26px">{{locationCode}}</span> </el-card> </el-col> <el-col :span="15"> <el-card shadow="always"> - 瑁呭壇杞�,鎷ㄥ弶 + <span class="centerText">{{locationName}}</span> </el-card> </el-col> </el-row> @@ -21,7 +22,7 @@ <el-col :span="6"> <div style="height: 600px;overflow: auto;"> <div class="container" style="height: 50px;background-color: #00afff;margin-bottom: 10px"> - <span class="centered">灞呬腑鏂囨湰</span> + <span class="centered">浣滀笟娴佺▼</span> </div> <div v-for="(item,index) in tableData" :key="item.sort" class="outerDiv" :id="'outerDiv'+index"> <div class="innerDiv1"> @@ -37,31 +38,31 @@ <el-col :span="20"> <el-card style="height: 600px" shadow="always"> <el-row style="height: 100px"> - {{address}} + <span style="color: #31b431;font-size: 30px;font-weight: bold">{{address}}</span> </el-row> <el-row style="height: 400px"> <el-image style="height: 390px;width: 960px" :src="src"></el-image> <!-- {{src}}--> </el-row> <el-row style="height: 100px"> - <el-button type="primary" @click="backClick()" style="float: left" icon="el-icon-arrow-left">涓婁竴姝�</el-button> - <el-button type="primary" @click="nextStep()" style="float: right">涓嬩竴姝�<i class="el-icon-arrow-right el-icon--right"></i></el-button> + <el-button type="primary" @click="backClick()" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-d-arrow-left">涓婁竴姝�</el-button> + <el-button type="primary" @click="nextStep()" style="height: 50px; width: 130px; font-size: 20px; float: right">涓嬩竴姝�<i class="el-icon-d-arrow-right"></i></el-button> </el-row> </el-card> </el-col> <el-col :span="4"> <el-card style="height: 600px" shadow="always"> <el-row style="height: 100px;margin-top: 100px"> - <el-button type="primary" @click="processDocuments()" style="float: left" icon="el-icon-folder-opened">宸ヨ壓鏂囦欢</el-button> + <el-button type="primary" @click="processDocuments()" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-folder-opened">宸ヨ壓鏂囦欢</el-button> </el-row> - <el-row style="height: 50px;margin-top: 5px"> - <el-button type="primary" @click="changeProducts('2V91')" style="width: 100px" icon="el-icon-s-unfold">2V91</el-button> + <el-row style="height: 80px;margin-top: 5px"> + <el-button type="success" @click="changeProducts('2V91')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">2V91</el-button> </el-row> - <el-row style="height: 50px;"> - <el-button type="primary" @click="changeProducts('191')" style="width: 100px" icon="el-icon-s-unfold">191</el-button> + <el-row style="height: 80px;"> + <el-button type="info" @click="changeProducts('191')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">191</el-button> </el-row> - <el-row style="height: 50px;"> - <el-button type="primary" @click="changeProducts('0JWF')" style="width: 100px" icon="el-icon-s-unfold">0JWF</el-button> + <el-row style="height: 80px;"> + <el-button type="info" @click="changeProducts('0JWF')" style="height: 50px; width: 130px; font-size: 20px; float: left" icon="el-icon-s-unfold">0JWF</el-button> </el-row> </el-card> </el-col> @@ -73,16 +74,20 @@ <script> import {listFormulaChild} from "@/api/main/bs/formulaChild/formulaChild"; +import {listStationConf,getIp} from "@/api/main/sc/stationConf"; export default { name: "index", data() { return { + locationCode: "鏈厤缃�", + locationName: "鏈厤缃伐浣�", queryParams: { pageNum: 1, pageSize: 10, productCode: null, }, + currentTime:'', productCode: '2V91', tableData: [{ img: 'https://fuss10.elemecdn.com/e/5d/4a731a90594', @@ -130,7 +135,7 @@ address: '涓婃捣甯傛櫘闄�鍖洪噾娌欐睙璺� 1516 寮�' }], address: '', - src: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg', + // src: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg', // src: 'file:///D:/img/qt.jpg' intervalId: null, @@ -141,16 +146,53 @@ this.tableData = [] }, mounted() { - this.changeProducts(this.productCode) + this.getStationConf() + // this.changeProducts(this.productCode) + this.changeProducts("2V91") + this.getNowTime() // this.autoShow() }, + // computed: { + // currentTime: + // }, methods: { + /** 鏌ヨ宸ヤ綅缁堢閰嶇疆鍒楄〃 */ + getStationConf() { + getIp().then(response => { + let queryParams = { + ipAddress: response.msg, + } + listStationConf(queryParams).then(response => { + this.locationName = response.rows[0].processesName + this.locationCode = response.rows[0].processesCode + }); + }); + }, + //鑾峰彇褰撳墠鏃堕棿 + getNowTime () { + let speed = 1000 + let that = this + let theNowTime = function () { + that.currentTime = that.timeNumber() + } + setInterval(theNowTime, speed) + }, + timeNumber () { + let today = new Date() + let date = today.getFullYear() + '-' + this.twoDigits(today.getMonth() + 1) + '-' + this.twoDigits(today.getDate()) + let time = this.twoDigits(today.getHours()) + ':' + this.twoDigits(today.getMinutes()) + ':' + this.twoDigits(today.getSeconds()) + return date + ' ' + time + }, + twoDigits (val) { + if (val < 10) return '0' + val + return val + }, // 瀹氭椂瑙﹀彂 autoShow() { const _this = this this.intervalId = setInterval(() => { _this.setBg() - }, 2000) + }, 10000) }, setImg(index) { this.address = this.tableData[index].address @@ -168,7 +210,7 @@ for (let i = 0; i < this.tableData.length - 1; i++) { if (document.getElementById('outerDiv' + i).style.background === 'yellow') { this.setImg(i+1) - document.getElementById('outerDiv' + i).style.background = 'green' + document.getElementById('outerDiv' + i).style.background = 'lightgreen' document.getElementById('outerDiv' + (i+1)).style.background = 'yellow' return; } @@ -178,7 +220,7 @@ for (let i = 0; i < this.tableData.length; i++) { if (document.getElementById('outerDiv' + i).style.background === 'yellow') { this.setImg(i + index) - document.getElementById('outerDiv' + i).style.background = index < 0 ? 'white' : 'green' + document.getElementById('outerDiv' + i).style.background = index < 0 ? 'white' : 'lightgreen' document.getElementById('outerDiv' + (i + index)).style.background = 'yellow' return; } @@ -195,6 +237,7 @@ }, changeProducts(val){ + console.log("------鏇存崲鍥剧墖",val) this.productCode = val const _this = this @@ -203,9 +246,13 @@ listFormulaChild(this.queryParams).then(response => { // this.tableData = []; this.tableData = response.rows; + console.log(response.rows) this.$nextTick(() => { clearInterval(this.intervalId); document.getElementById('outerDiv0').style.background = 'yellow' + for (let i = 1; i < this.tableData.length; i++){ + document.getElementById('outerDiv' + i).style.background = 'white' + } this.setImg(0) this.autoShow() }) @@ -220,7 +267,7 @@ <style scoped> .outerDiv { width: fit-content; - min-width: 100%; + min-width: 102%; /*width: 300px;*/ height: 50px; margin-bottom: 10px; @@ -261,6 +308,21 @@ .centered { text-align: center; + color: white; + font-weight: bold; + font-size: 20px; } +.centerText{ + color: black; + font-weight: bold; + font-size: 40px; + display: flex; + justify-content: center; + margin-top: 20px +} +::v-deep .el-card__body{ + height: 100px; +} + </style> -- Gitblit v1.9.3