From ea46f28356e2acb3bc7cc69b9af3c52fab38c0b0 Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期四, 18 一月 2024 16:56:47 +0800 Subject: [PATCH] 终止任务功能测试 --- CanadaMes-ui/src/views/home/index.vue | 54 +++++++++++++++++++++++++++--------------------------- 1 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue index b1e9558..cf37f5b 100644 --- a/CanadaMes-ui/src/views/home/index.vue +++ b/CanadaMes-ui/src/views/home/index.vue @@ -252,7 +252,7 @@ <div style="display:flex;justify-content: space-around;width: 9zz5%;margin: 0 auto;"> <!-- <el-input style="width:15%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid1" :class="ManuallyInfeedGlass == true ? 'hide' : ''"></el-input> --> - <el-button type="primary" @click="SelectGlassByGlassIDs(2)" :disabled="ManuallyInfeedGlass" + <el-button type="primary" @click="SelectGlassByGlassIDs()" :disabled="ManuallyInfeedGlass" :class="ManuallyInfeedGlass == true ? 'hide' : ''"> {{ $t('Manually Infeed Glass') }}</el-button> <el-button type="primary" @click="showform2()" :disabled="OrderInfo" @@ -389,10 +389,10 @@ A01.1:{{ ShowGlassIdList(4) }}</div> <div class="glass A01" style="top: 290px;left: 289px;position: absolute;" - @click="ClearGlassId('DB101.10.1,5')">A01.2:{{ ShowGlassIdList(5) }}</div> + @click="ClearGlassId('DB101.10.1,5',5)">A01.2:{{ ShowGlassIdList(5) }}</div> <div class="glass A02" style="top: 310px;left: 289px;position: absolute;" - @click="ClearGlassId('DB101.10.2,6')">A02:{{ ShowGlassIdList(6) }}</div> + @click="ClearGlassId('DB101.10.2,6',6)">A02:{{ ShowGlassIdList(6) }}</div> <div class="glass D03" style="top: 137px;left: 42px;position: absolute;" @click="ClearGlassId('DB101.9.4', 7)"> @@ -583,14 +583,14 @@ }}</el-button> </el-form-item> <el-form-item> - <el-input style="width:70%;" maxlength="14" :placeholder="$t('Enter the glass barcode')" + <el-input style="width:70%;" maxlength="13" :placeholder="$t('Enter the glass barcode')" v-model="glassid1"></el-input> - <el-button type="primary" :disabled="Scanningmethod" @click="WriteGlassID()">{{ $t('Add') + <el-button type="primary" :disabled="!Scanningmethod" @click="WriteGlassID()">{{ $t('Add') }}</el-button> </el-form-item> <el-form-item> {{ $t('Barcode') }}: - <el-input style="width:70%;" maxlength="14" :disabled="true" v-model="glassid1"></el-input> + <el-input style="width:70%;" maxlength="14" :disabled="true" v-model="CurrrentGlassId"></el-input> </el-form-item> </div> <div style="display: flex;justify-content: space-around;"> @@ -701,11 +701,11 @@ {{ $t('Confirm') }}</el-button> </div> </el-form> - <template #footer> + <!-- <template #footer> <span class="dialog-footer"> <el-button @click="cancel3()">{{ $t('cancel') }}</el-button> </span> - </template> + </template> --> </el-dialog> <el-dialog :visible.sync="dialogFormVisible6" :title="$t('Outing Queue')" top="5vh"> @@ -980,7 +980,8 @@ CurrentFrame: [], DeviceList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], GlassIdList: [], - Scanningmethod: true + Scanningmethod: true, + CurrrentGlassId:"" }; }, created() { @@ -1028,14 +1029,15 @@ this.alarm = obj.alarmmg[0]; //鑾峰彇褰撳墠鎵爜鏂瑰紡 if (obj.Scanningmethod != null) { - if (obj.Scanningmethod == 0) { - this.Scanningmethod = true; - } - else { - this.Scanningmethod = false; - } + this.Scanningmethod=obj.Scanningmethod[0]; } + //鑾峰彇褰撳墠鎵爜鏋幓鐠僫d + if(obj.CurrrentGlassId!=null){ + const specialChars = /[^\w\s]/g; + this.CurrrentGlassId=obj.CurrrentGlassId[0].replace(specialChars, ""); + } + //鏌ヨ褰撳墠閾濇淇℃伅 this.CurrentFrame = obj.CurrentFrame; //鑾峰彇璁惧鐘舵�� @@ -1120,10 +1122,13 @@ } else { this.form3 = {}; } + if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) { this.loadglassheight1 = 70; + if(this.form5.glassId!=obj.form3[0].glassId){ + this.showform3(); + } this.form5 = obj.form3[0]; - this.showform3(); this.glassid1 = ""; if (this.D01RequestState == true) { this.Sizerange(this.form5, 3); @@ -1328,7 +1333,7 @@ } }, //鑾峰彇鎵爜浣嶅拰涓婄墖浣嶆暟鎹� - SelectGlassByGlassIDs(parameter) { + SelectGlassByGlassIDs() { this.showform3(); // if (parameter == 1) { // SelectGlassByGlassID(this.glassid2).then(res => { @@ -2039,8 +2044,9 @@ //娓呴櫎鐜荤拑id ClearGlassId(position, num) { if (this.ClearGlassID == false) { - if (this.DeviceList[position] == 0) { - if (this.GlassIdList[num].length == 14) { + console.log(this.DeviceList,num); + if (this.DeviceList[num] == 0) { + if (this.GlassIdList[num].length < 14) { this.$confirm(this.$t('Are you sure to clear this barcode ?'), this.$t('confirm'), { confirmButtonText: this.$t('Yes'), cancelButtonText: this.$t('No'), @@ -2099,14 +2105,8 @@ }, //鍒囨崲浜岀淮鐮佽幏鍙栨柟寮� SwitchScanMethod(){ - var Scanmethod; - if(this.Scanningmethod == true){ - this.Scanmethod = 1; - }else{ - this.Scanmethod = 0; - } - SwitchScanMethod(Scanmethod).then(res => { - if (res.data.message == 200) { + SwitchScanMethod(!this.Scanningmethod).then(res => { + if(res.data.message == 200) { this.$message.success(this.$t('Operation successful')); } }); -- Gitblit v1.8.0