From ba604157629a79b6dd10d5d449eb6c05111bb3ef Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期一, 13 五月 2024 13:54:20 +0800 Subject: [PATCH] 修改出片队列显示 --- CanadaMes-ui/src/views/home/index.vue | 331 ++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 216 insertions(+), 115 deletions(-) diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue index ee8fe16..4cded1d 100644 --- a/CanadaMes-ui/src/views/home/index.vue +++ b/CanadaMes-ui/src/views/home/index.vue @@ -235,7 +235,6 @@ height: 15px; position: absolute; } - </style> <template> <el-container> @@ -244,7 +243,7 @@ <div class="box" @click="dialogFormVisible2 = true"> <div class="text"> <!-- Alarm: --> - {{ this.text }}{{this.plc1}}{{this.plc2}} + {{ this.text }}{{ this.plc1 }}{{ this.plc2 }} <label v-for="item in this.alarm" :key="item['id']"> {{ item['content'] }} </label> @@ -345,7 +344,8 @@ </el-main> <el-footer> <div class="blocks" style="position: relative;"> - <div :style="'position:absolute;width:40px;height:40px;top:40px;left:50px;background-Color:'+StateColor+';font-size:30px;text-align:center;border-radius: 50%;'"> + <div + :style="'position:absolute;width:40px;height:40px;top:40px;left:50px;background-Color:' + StateColor + ';font-size:30px;text-align:center;border-radius: 50%;'"> {{ CountDowns }} </div> <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:237px;"> @@ -598,20 +598,20 @@ <el-table-column :min-width="250" :label="$t('Operate')"> <template slot-scope='scope'> <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" - :disabled="(scope.row.state == 1&&loadname=='admin') ? false : true" + :disabled="(scope.row.state == 1 && loadname == 'admin') ? false : true" @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('Delete') }}</el-button> <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" - :disabled="(scope.row.state == 1&&(loadname=='admin'||loadname=='Transfer')) ? false : true" + :disabled="(scope.row.state == 1 && (loadname == 'admin' || loadname == 'Transfer')) ? false : true" @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('Outfeed') }}</el-button> <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" - :disabled="(loadname=='admin') ? false : true" + :disabled="(loadname == 'admin') ? false : true" @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)"> {{ scope.row.disabled == 0 ? $t('Disable') : $t('Enable') }}</el-button> <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" - :disabled="(scope.row.glassId == null&&loadname=='admin') ? false : true" + :disabled="(scope.row.glassId == null && loadname == 'admin') ? false : true" @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Add') }}</el-button> </template> @@ -684,7 +684,7 @@ </div> <div style="display: flex;justify-content: space-around;"> - <el-form-item :label="$t('Barcode')" > + <el-form-item :label="$t('Barcode')"> <el-input v-model="form2.glassId" readonly autocomplete="off" /> </el-form-item> <!-- <el-form-item :label="$t('Barcode')"> @@ -693,8 +693,9 @@ <el-form-item :label="$t('Barcode')"> <el-input v-model="form5.glassId" readonly autocomplete="off" /> </el-form-item> - <el-form-item :label="$t('Barcode')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'"> - <el-input v-model="form6.barcode" readonly autocomplete="off" /> + <el-form-item :label="$t('Barcode')" + :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'"> + <el-input v-model="form6.barcode" readonly autocomplete="off" /> </el-form-item> </div> <div style="display: flex;justify-content: space-around;"> @@ -707,7 +708,8 @@ <el-form-item :label="$t('Order No')"> <el-input v-model="form5.orderId" readonly autocomplete="off" /> </el-form-item> - <el-form-item :label="$t('Order No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'"> + <el-form-item :label="$t('Order No')" + :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'"> <el-input v-model="form6.ordernumber" readonly autocomplete="off" /> </el-form-item> </div> @@ -721,7 +723,8 @@ <el-form-item :label="$t('List No')"> <el-input v-model="form5.listId" readonly autocomplete="off" /> </el-form-item> - <el-form-item :label="$t('List No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'"> + <el-form-item :label="$t('List No')" + :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'"> <el-input v-model="form6.listnumber" readonly autocomplete="off" /> </el-form-item> </div> @@ -735,7 +738,8 @@ <el-form-item :label="$t('Box No')"> <el-input v-model="form5.boxId" readonly autocomplete="off" /> </el-form-item> - <el-form-item :label="$t('Box No')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'"> + <el-form-item :label="$t('Box No')" + :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'"> <el-input v-model="form6.boxnumber" readonly autocomplete="off" /> </el-form-item> </div> @@ -749,7 +753,8 @@ <el-form-item :label="$t('Length')"> <el-input v-model="form5.glasswidthmm" readonly autocomplete="off" /> </el-form-item> - <el-form-item :label="$t('Length')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'"> + <el-form-item :label="$t('Length')" + :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'"> <el-input v-model="form6.glasslength" readonly autocomplete="off" /> </el-form-item> </div> @@ -763,7 +768,8 @@ <el-form-item :label="$t('Width')"> <el-input v-model="form5.glassheightmm" readonly autocomplete="off" /> </el-form-item> - <el-form-item :label="$t('Width')" :style="'background-Color:'+(form6state==1?'yellow':'')+';'"> + <el-form-item :label="$t('Width')" + :style="'background-Color:' + (form6state == 1 ? 'yellow' : '') + ';'"> <el-input v-model="form6.glassheight" readonly autocomplete="off" /> </el-form-item> </div> @@ -773,7 +779,8 @@ {{ $t('Confirm') }}</el-button> <span style="margin-right: 12%;"> {{ $t('Remaining width:') }} - {{ (108.27 - (Object.keys(this.form6).length === 0 ? 0 : (form6.glassheight > form6.glasslength ? + {{ (108.27 - (Object.keys(this.form6).length === 0 ? 0 : (form6.glassheight > form6.glasslength + ? form6.glassheight : form6.glasslength))).toFixed(2) }} </span> @@ -834,25 +841,45 @@ </el-table> </div> <div style="width:30%;" v-for="(item) in CurrentFrame" :key="item['barcode']"> + <div style="background-color: yellow;"> + <h1 style="font-size: 40px;text-align: center;">{{ $t('Current scan') }}:</h1> + <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ frameInfo.listnumber }}</h1> + <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ frameInfo.boxnumber }}</h1> + </div> <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{ $t('Next') }}</el-button> - <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:</h1> + <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1> <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1> <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listId'] }}</h1> <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxId'] }}</h1> - <h1 style="font-size: 30px;text-align: center;"> - {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT') - : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }} - </h1> - <h1 style="font-size: 30px;text-align: center;">{{ item['framewidthmm'] }}*{{ item['frameheightmm'] - }} - </h1> + <div> + <div v-if="item['flip'] == 1" + style="width:40px;height:150px;border:1px solid black;float: left;"> - <div class="frame" :style="'background-color: green;margin-top:30px;margin:0 auto;width: ' + - FrameWidthHeight('before', item['framewidthmm'], item['frameheightmm'], item['position']) + 'px;height:' + - FrameWidthHeight('after', item['framewidthmm'], item['frameheightmm'], item['position']) + 'px;' - "> + </div> + <div class="frame" + :style="'background-color: ' + framecolor1 + ';margin-top:30px;margin:0 auto;width: 370px;height:150px;float: left;'"> + <h1 style="font-size: 54px;text-align: center;color:white;margin-top: 0px;"> + {{ framecolor1 == "green" ? $t('Interior Out Bypass: Right') + :framecolor1 == "blue" ? $t('Interior Out Bypass: Left') + :$t('Remove Frame') }} + </h1> + </div> + <div v-if="item['flip'] == 2" + style="width:40px;height:150px;border:1px solid black;float: left;"> + + </div> </div> + <h1 style="font-size: 30px;text-align: center;margin-top: 50px;">{{ + (item['framewidthmm'] * 1) > (item['frameheightmm'] * 1) ? item['frameheightmm'] : + item['framewidthmm'] + }} + </h1> + <div> + <h1 style="font-size: 30px;text-align: center;margin-top: 65px;"> + {{ (item['framewidthmm'] * 1) >= (item['frameheightmm'] * 1) ? item['frameheightmm'] : item['framewidthmm'] }}</h1> + </div> + </div> </div> @@ -860,7 +887,7 @@ <el-dialog :visible.sync="dialogFormVisible7" :title="$t('Glass information corresponding to aluminum frame')" top="5vh"> - + <el-input style="width:15%;" :placeholder="$t('Enter the Frame No')" v-model="framebarcode"></el-input> <el-button type="primary" @click="showform7()">{{ $t('Query') }}</el-button> <el-button type="primary" @click="AddOutSliceS()" :disabled="framestate">{{ $t('Outfeed') }}</el-button> @@ -877,7 +904,8 @@ <el-table-column prop="storageCage.cell" :label="$t('Slot No')"> <template slot-scope='scope'> {{ - scope.row.storageCage == null ? "" : (scope.row.storageCage.cage-1)*21+scope.row.storageCage.cell + scope.row.storageCage == null ? "" : + (scope.row.storageCage.cage - 1) * 21 + scope.row.storageCage.cell }} </template> </el-table-column> @@ -903,26 +931,59 @@ </el-table-column> </el-table> <div style="width:30%;" v-for="(item) in AluminumFrameInfo" :key="item['barcode']"> - <!-- <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{ - $t('Next') }}</el-button> --> - <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame') }}:</h1> + <el-button style="margin-left: 42%;" type="primary" @click="FrameStateUpdate(item['barcode'])">{{ + $t('Next') }}</el-button> + <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1> <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1> - <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listnumber'] }}</h1> - <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxnumber'] }}</h1> - <h1 style="font-size: 30px;text-align: center;"> - {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT') - : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }} - </h1> - <h1 style="font-size: 30px;text-align: center;">{{ item['framelength'] }}*{{ item['frameheight'] - }} - </h1> + <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listId'] }}</h1> + <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxId'] }}</h1> + <div> + <div v-if="item['flip'] == 1" + style="width:40px;height:150px;border:1px solid black;float: left;"> + </div> + <div class="frame" + :style="'background-color: ' + framecolor + ';margin-top:30px;margin:0 auto;width: 370px;height:150px;float: left;'"> + <h1 style="font-size: 54px;text-align: center;color:white;margin-top: 0px;"> + {{ framecolor == "green" ? $t('Interior Out Bypass: Right') + :framecolor == "blue" ? $t('Interior Out Bypass: Left') + :$t('Remove Frame') }} + </h1> + </div> + <div v-if="item['flip'] == 2" + style="width:40px;height:150px;border:1px solid black;float: left;"> - <div class="frame" :style="'background-color: '+ framecolor +';margin-top:30px;margin:0 auto;width: ' + - FrameWidthHeight('before', item['framelengthmm'], item['frameheightmm'], item['flip']) + 'px;height:' + - FrameWidthHeight('after', item['framelengthmm'], item['frameheightmm'], item['flip']) + 'px;' - "> + </div> </div> + <h1 style="font-size: 30px;text-align: center;margin-top: 50px;">{{ + (item['framelength'] * 1) > (item['frameheightmm'] * 1) ? item['frameheightmm'] : + item['framelength'] + }} + </h1> + <div> + <h1 style="font-size: 30px;text-align: center;margin-top: 65px;"> + {{ (item['framelength'] * 1) >= (item['frameheightmm'] * 1) ? item['frameheightmm'] : item['framelength'] }}</h1> + </div> + </div> + + + + <!-- <div style="width:30%;" v-for="(item) in AluminumFrameInfo" :key="item['barcode']"> + <h1 style="font-size: 40px;text-align: center;">{{ $t('Current Frame on Belt') }}:</h1> + <h1 style="font-size: 40px;text-align: center;">{{ $t('Barcode') }}:{{ item['barcode'] }}</h1> + <h1 style="font-size: 40px;text-align: center;">{{ $t('List No') }}:{{ item['listnumber'] }}</h1> + <h1 style="font-size: 40px;text-align: center;">{{ $t('Box No') }}:{{ item['boxnumber'] }}</h1> + <h1 style="font-size: 30px;text-align: center;"> + {{ item['flip'] == 1 ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT') + : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }} + </h1> + <h1 style="font-size: 30px;text-align: center;">{{ item['framelength'] }}*{{ item['frameheight'] + }} + </h1> + <div class="frame" + :style="'background-color: ' + framecolor +';margin-top:30px;margin:0 auto;width:400px;height:150px;' "> + </div> + </div> --> </el-dialog> <el-dialog :visible.sync="dialogFormCountDown" :title="$t('Approximately resettable time')" top="5vh"> <div :style="'font-size: ' + PromptSize + 'px;text-align: center;'"> @@ -1044,23 +1105,25 @@ count1: 0, count2: 1, loadname: "", - form6state:0, - StateColor:"green", - plc1:"", - plc2:"", - AluminumFrameInfo:{}, - framestate:false, - framecolor:"green" + form6state: 0, + StateColor: "green", + plc1: "", + plc2: "", + AluminumFrameInfo: {}, + framestate: false, + framecolor: "green", + framecolor1: "green", + frameInfo: {} }; }, created() { this.load(); setInterval(() => { - if(this.count1<this.count2){ - this.count1=this.count2; - }else{ + if (this.count1 < this.count2) { + this.count1 = this.count2; + } else { const now = new Date(); - console.log(this.$t('Mes Connection failed')+now); + console.log(this.$t('Mes Connection failed') + now); } }, 60000); }, @@ -1100,17 +1163,17 @@ // this.car2 = 300 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100; } if (obj.Plc1 != null) { - if(obj.Plc1[0]==true){ - this.plc1=""; - }else{ - this.plc1=this.$t('Plc1 Connection failed'); + if (obj.Plc1[0] == true) { + this.plc1 = ""; + } else { + this.plc1 = this.$t('Plc1 Connection failed'); } } if (obj.Plc2 != null) { - if(obj.Plc2[0]==true){ - this.plc2=""; - }else{ - this.plc2=this.$t('Plc2 Connection failed'); + if (obj.Plc2[0] == true) { + this.plc2 = ""; + } else { + this.plc2 = this.$t('Plc2 Connection failed'); } } @@ -1135,7 +1198,28 @@ //鏌ヨ褰撳墠閾濇淇℃伅 this.CurrentFrame = obj.CurrentFrame; + if (this.CurrentFrame[0].frameheightmm > this.CurrentFrame[0].framewidthmm) { + if (this.CurrentFrame[0].frameheightmm < 23.62205 || this.CurrentFrame[0].framewidthmm < 15.748) { + this.framecolor1 = "red"; + } else { + if (this.CurrentFrame[0].flip == 2) { + this.framecolo1 = "green"; + } else { + this.framecolor1 = "blue"; + } + } + } else { + if (this.CurrentFrame[0].frameheightmm < 15.748 || this.CurrentFrame[0].framewidthmm < 23.62205) { + this.framecolor1 = "red"; + } else { + if (this.CurrentFrame[0].flip == 2) { + this.framecolor1 = "green"; + } else { + this.framecolor1 = "blue"; + } + } + } // 鑾峰彇璁惧鐘舵�� if (obj.DeviceList != null) { this.DeviceList = obj.DeviceList[0]; @@ -1148,31 +1232,48 @@ if (obj.AluminumFrame != null) { this.AluminumFrame = obj.AluminumFrame[0]; + + if (this.dialogFormVisible6 == true) { this.dialogFormVisible7 = true; } } + + if(obj.frameInfo!=null){ + this.frameInfo=obj.frameInfo[0]; + console.log(this.frameInfo); + } + if (obj.AluminumFrameInfo != null) { this.AluminumFrameInfo = obj.AluminumFrameInfo; - if(this.AluminumFrameInfo[0].frameheightmm>this.AluminumFrameInfo[0].framelengthmm){ - if(this.AluminumFrameInfo[0].frameheightmm<600||this.AluminumFrameInfo[0].framelengthmm<400){ - this.framestate=true; - this.framecolor="red"; - }else{ - this.framestate=false; - this.framecolor="green"; + if (this.AluminumFrameInfo[0].frameheightmm > this.AluminumFrameInfo[0].framelengthmm) { + if (this.AluminumFrameInfo[0].frameheightmm < 600 || this.AluminumFrameInfo[0].framelengthmm < 400) { + this.framestate = true; + this.framecolor = "red"; + } else { + this.framestate = false; + if (this.AluminumFrameInfo[0].flip == 2) { + this.framecolor = "green"; + } else { + this.framecolor = "blue"; + } + } - }else{ - if(this.AluminumFrameInfo[0].frameheightmm<400||this.AluminumFrameInfo[0].framelengthmm<600){ - this.framestate=true; - this.framecolor="red"; - }else{ - this.framestate=false; - this.framecolor="green"; + } else { + if (this.AluminumFrameInfo[0].frameheightmm < 400 || this.AluminumFrameInfo[0].framelengthmm < 600) { + this.framestate = true; + this.framecolor = "red"; + } else { + this.framestate = false; + if (this.AluminumFrameInfo[0].flip == 2) { + this.framecolor = "green"; + } else { + this.framecolor = "blue"; + } } } - }else{ - this.AluminumFrameInfo={}; + } else { + this.AluminumFrameInfo = {}; } //鏍规嵁杩涚墖鐘舵�佸嚭鍙戣繘鐗囦换鍔� @@ -1230,9 +1331,9 @@ } else if (obj.zhi[0] == 400) { this.$message.error(this.$t('There is no such slot')); - } else if(obj.zhi[0] == 500) { + } else if (obj.zhi[0] == 500) { this.$message.error(this.$t('This glass ID already exists in the sorting cage')); - } else if(obj.zhi[0] == 600) { + } else if (obj.zhi[0] == 600) { this.$message.error(this.$t('The glass size is not within the range')); } } @@ -1294,15 +1395,15 @@ } } if (obj.form6 != null) { - this.form6state=1; + this.form6state = 1; this.form6 = obj.form6[0]; - if(this.form6.glassheight=="0"){ - this.form6.glassheight=""; - this.form6.glasslength=""; + if (this.form6.glassheight == "0") { + this.form6.glassheight = ""; + this.form6.glasslength = ""; } } else { this.form6 = {}; - this.form6state=0; + this.form6state = 0; } //鏁版嵁搴撹繛鎺ユ槸鍚︽甯� if (obj.dbconnected == "false") { @@ -1739,22 +1840,22 @@ }, //鍒犻櫎鍑虹墖闃熷垪鐜荤拑 deleteproductionqueueglass(id) { - this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), { - inputType: 'password', - inputPlaceholder: this.$t('Please enter the password'), + this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('confirm'), { + // inputType: 'password', + // inputPlaceholder: this.$t('Please enter the password'), confirmButtonText: this.$t('Yes'), cancelButtonText: this.$t('No'), type: 'warning' - }).then(({ value }) => { - if (this.password == value) { - DeleteProductionQueueGlass(id).then(res => { - if (res.data.message == 200) { - this.$message.success(this.$t('Operation successful')); - } else { - this.$message.error(this.$t('This frame has glass that is currently outing')); - } - }); - } + }).then(() => { + // if (this.password == value) { + DeleteProductionQueueGlass(id).then(res => { + if (res.data.message == 200) { + this.$message.success(this.$t('Operation successful')); + } else { + this.$message.error(this.$t('This frame has glass that is currently outing')); + } + }); + // } }).catch(() => { this.$message({ type: 'info', @@ -1797,7 +1898,7 @@ } else if (res.data.message == 400) { this.$message.error(this.$t('There is no such slot')); - }else if (res.data.message == 500) { + } else if (res.data.message == 500) { this.$message.error(this.$t('This glass ID already exists in the sorting cage')); } }); @@ -1870,7 +1971,7 @@ this.AluminumFrame = null; this.AluminumFrameInfo = null; this.dialogFormVisible7 = false; - this.framebarcode=""; + this.framebarcode = ""; this.$message.success(this.$t('Operation successful')); } }); @@ -2129,28 +2230,28 @@ () => { if (this.EmergencyStop == true) { clearInterval(timer); - this.StateColor="red"; + this.StateColor = "red"; this.CountDowns = ""; } else { if (count > 0) { - this.StateColor="yellow"; - this.PromptSize = 500; - this.CountDowns = count; - count--; + this.StateColor = "yellow"; + this.PromptSize = 500; + this.CountDowns = count; + count--; } else { - this.PromptSize = 200; - this.CountDowns = ""; - this.StateColor="green"; - if (this.reset == true) { - clearInterval(timer); - } + this.PromptSize = 200; + this.CountDowns = ""; + this.StateColor = "green"; + if (this.reset == true) { + clearInterval(timer); + } } } }, 1000 ); - }, + }, //鏇存崲褰撳墠閾濇 FrameStateUpdate(frameno) { FrameStateUpdate(frameno).then(res => { -- Gitblit v1.8.0