From b1384252a705821b61ce38e4927761d409273763 Mon Sep 17 00:00:00 2001 From: cl <418351270@qq.com> Date: 星期二, 23 一月 2024 09:57:41 +0800 Subject: [PATCH] 节拍 --- jcdm-ui/src/views/main/cfkb/Instructions/index.vue | 93 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 80 insertions(+), 13 deletions(-) diff --git a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue index 4d6c15b..7c57df7 100644 --- a/jcdm-ui/src/views/main/cfkb/Instructions/index.vue +++ b/jcdm-ui/src/views/main/cfkb/Instructions/index.vue @@ -9,12 +9,12 @@ </el-col> <el-col :span="3"> <el-card shadow="always"> - <span class="centerText" style="margin-top: 26px">{{productCode}}</span> + <span class="centerText" style="margin-top: 26px">{{locationCode}}</span> </el-card> </el-col> <el-col :span="15"> <el-card shadow="always"> - <span class="centerText">瑁呭壇杞�,鎷ㄥ弶</span> + <span class="centerText">{{locationName}}</span> </el-card> </el-col> </el-row> @@ -24,7 +24,7 @@ <div class="container" style="height: 50px;background-color: #00afff;margin-bottom: 10px"> <span class="centered">浣滀笟娴佺▼</span> </div> - <div v-for="(item,index) in tableData" :key="item.sort" class="outerDiv" :id="'outerDiv'+index"> + <div v-for="(item,index) in tableData" :key="item.index" class="outerDiv" :id="'outerDiv'+index"> <div class="innerDiv1"> <div class="innerDiv2"> <span class="content_left">{{ index+1 }}</span> @@ -56,29 +56,51 @@ <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: 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-button type="info" @click="changeProducts('2V91')" :class="{ 'active': isClickd === '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: 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-button type="info" @click="changeProducts('191')" :class="{ 'active': isClickd === '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: 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-button type="info" @click="changeProducts('0JWF')" :class="{ 'active': isClickd === '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> </el-col> </el-row> + <div> + <el-dialog + title="宸ヨ壓鏂囦欢" + :visible.sync="dialogVisible" + width="70%" + @close="closeMethod" + + > + <div><el-image style="height: 1090px;width: 960px;margin-left: 33px" :src="mainProcessSrc"></el-image></div> + <span slot="footer" class="dialog-footer"> + <el-button type="primary" @click="dialogVisible = false" style="margin-right: 80px">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> </div> + </template> <script> -import {listFormulaChild} from "@/api/main/bs/formulaChild/formulaChild"; +import {getMainProductProcess, getProductProcess} from "@/api/main/bs/formulaChild/formulaChild"; +import {listStationConf,getIp} from "@/api/main/sc/stationConf"; export default { name: "index", data() { return { + dialogVisible: false, + mainProcessSrc: '', + mainProcess: [], + isClickd: '', // 鍒濆鍖栦负鏈偣鍑荤姸鎬� + locationCode: "鏈厤缃�", + locationName: "鏈厤缃伐浣�", queryParams: { pageNum: 1, pageSize: 10, @@ -143,7 +165,9 @@ this.tableData = [] }, mounted() { - this.changeProducts(this.productCode) + this.getStationConf() + // this.changeProducts(this.productCode) + // this.changeProducts("2V91") this.getNowTime() // this.autoShow() }, @@ -151,6 +175,25 @@ // 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 + console.log('llllll',this.locationCode) + this.changeProducts("2V91") + }); + + }); + + }, + closeMethod(){ + this.mainProcessSrc = '' + }, //鑾峰彇褰撳墠鏃堕棿 getNowTime () { let speed = 1000 @@ -180,6 +223,10 @@ setImg(index) { this.address = this.tableData[index].address this.src = this.tableData[index].img + }, + cleanImg(){ + this.address = '' + this.src = '' }, setBg() { if (document.getElementById('outerDiv' + (this.tableData.length - 1)).style.background === 'yellow') { @@ -216,20 +263,31 @@ this.getUpOrDown(1) }, processDocuments(){ - + getMainProductProcess(this.queryParams).then(res => { + this.mainProcess = res.rows + if (res.rows!=null && res.rows.length>0){ + this.mainProcessSrc = res.rows[0].img + } + }) + this.dialogVisible = true }, changeProducts(val){ + console.log("------鏇存崲鍥剧墖",val) + console.log("------鐩綍==============",this.tableData) + console.log("locationCode",this.locationCode) this.productCode = val const _this = this + this.isClickd = val; // 鍒囨崲isClicked鐨勫�� /** 鏌ヨ閰嶆柟閰嶇疆瀛愪俊鎭垪琛� */ this.queryParams.productCode = val; - listFormulaChild(this.queryParams).then(response => { - // this.tableData = []; + this.queryParams.processesCode = this.locationCode + getProductProcess(this.queryParams).then(response => { + this.tableData = []; + this.cleanImg() this.tableData = response.rows; - console.log(response.rows) this.$nextTick(() => { clearInterval(this.intervalId); document.getElementById('outerDiv0').style.background = 'yellow' @@ -306,6 +364,15 @@ ::v-deep .el-card__body{ height: 100px; } - +.active { + background-color: #31b431; /* 鐐瑰嚮鍚庣殑鑳屾櫙鑹� */ +} +::v-deep .el-dialog { + height: 90%; + overflow-y: auto; +} +::v-deep .el-dialog__footer{ + margin-top: 10px; +} </style> -- Gitblit v1.9.3