From 3eb2e3a7f3f40f48c8a44bf32e7b0baeee065921 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 20 十二月 2023 13:34:34 +0800
Subject: [PATCH] 添加终止任务功能

---
 CanadaMes-ui/src/views/home/index.vue |   76 ++++++++++++++++++++++----------------
 1 files changed, 44 insertions(+), 32 deletions(-)

diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 2c0efa2..e6a3c8a 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -211,6 +211,10 @@
     text-align: right;
 }
 
+.hide {
+    display: none;
+}
+
 /* .el-table td,
 .el-table th {
     padding: 0px 0;
@@ -230,8 +234,10 @@
                 </div>
             </div>
             <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"></el-input>
-                <el-button type="primary" @click="SelectGlassByGlassIDs(2)" :disabled="ManuallyInfeedGlass">
+                <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"
+                    :class="ManuallyInfeedGlass == true ? 'hide' : ''">
                     {{ $t('Manually Infeed Glass') }}</el-button>
                 <!-- <el-input style="width:15%;" :placeholder="$t('Enter the Order No')" v-model="order"></el-input>
                 <el-button type="warning" @click="showform1();">{{ $t('Exit the glass by order number') }}</el-button> -->
@@ -254,6 +260,7 @@
                             <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                 @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task')
                                 }}</el-button>
+
                         </template>
                     </el-table-column>
                 </el-table>
@@ -274,6 +281,9 @@
                         <template slot-scope='scope'>
                             <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                                 @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('Terminate Task')
+                                }}</el-button>
+                            <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+                                @click="endtask(2, scope.row.glassId, scope.row.cell)">{{ $t('Complete Task')
                                 }}</el-button>
                         </template>
                     </el-table-column>
@@ -325,9 +335,11 @@
                 <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
                 <div class="blocks-img2"></div>
                 <div class="blocks-img3"></div>
-                <el-button class="orderbutton1" type="primary" @click="showform2()" :disabled="OrderInfo">{{ $t('OrderInfo')
-                }}</el-button>
-                <el-button class="orderbutton2" type="primary" @click="showform6()" :disabled="OutingQueue">
+                <el-button class="orderbutton1" type="primary" @click="showform2()" :disabled="OrderInfo"
+                    :class="OrderInfo == true ? 'hide' : ''">{{ $t('OrderInfo')
+                    }}</el-button>
+                <el-button class="orderbutton2" type="primary" @click="showform6()" :disabled="OutingQueue"
+                    :class="OutingQueue == true ? 'hide' : ''">
                     {{ $t('Outing Queue') }}</el-button>
 
                 <!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
@@ -464,7 +476,7 @@
                             {{ scope.row.disabled == 0 ? $t('Enable') : $t('Disable') }}</el-button>
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
                             :disabled="scope.row.glassId != null ? true : false"
-                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Increase')
+                            @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('Add')
                             }}</el-button>
                     </template>
                 </el-table-column>
@@ -636,12 +648,12 @@
             }}</el-button>
             <el-table :data="this.OutSlice" :height="700" :span-method="objectSpanMethod" border :cell-style="cellStyle"
                 style="width: 100%;overflow: auto;font-size: 18px;">
-                <el-table-column :min-width="100" prop="glassId" :label="$t('Barcode')"></el-table-column>
-                <el-table-column prop="storageCage.orderId" :label="$t('Order No')"></el-table-column>
-                <el-table-column prop="storageCage.listId" :label="$t('List No')"></el-table-column>
-                <el-table-column prop="storageCage.boxId" :label="$t('Box No')"></el-table-column>
-                <el-table-column prop="storageCage.glasswidthmm" :label="$t('Length')"></el-table-column>
-                <el-table-column prop="storageCage.glassheightmm" :label="$t('Width')"></el-table-column>
+                <el-table-column :min-width="175" prop="glassId" :label="$t('Barcode')"></el-table-column>
+                <el-table-column :min-width="90" prop="storageCage.orderId" :label="$t('Order No')"></el-table-column>
+                <el-table-column :min-width="70" prop="storageCage.listId" :label="$t('List No')"></el-table-column>
+                <el-table-column :min-width="70" prop="storageCage.boxId" :label="$t('Box No')"></el-table-column>
+                <el-table-column :min-width="100" prop="storageCage.glasswidthmm" :label="$t('Length')"></el-table-column>
+                <el-table-column :min-width="100" prop="storageCage.glassheightmm" :label="$t('Width')"></el-table-column>
                 <el-table-column :min-width="90" prop="state" :label="$t('Glass State')">
                     <template slot-scope='scope'>
                         {{ scope.row.state == 0 ? $t('Waiting') : scope.row.state == 1 ? $t('Outing') : scope.row.state == 2
@@ -652,15 +664,16 @@
                 <el-table-column :min-width="300" prop="position" :label="$t('Position')" style="font-size: 20px;">
                     <template slot-scope='scope'>
                         <!-- {{ scope.row.position == 1 ? "<>鈻勨杽鈻�" : "鈻�" }} -->
-                        <div :style="'width:'+(scope.row.position==1?'300':'100') +'px;height:'+(scope.row.position==1?'100':'300') +'px;background-Color:gray;'">
+                        <div
+                            :style="'width:' + (scope.row.position == 1 ? '300' : '100') + 'px;height:' + (scope.row.position == 1 ? '100' : '200') + 'px;background-Color:gray;margin:0 auto;'">
                             <!-- <div :style="'width:100px;height:300px;background-Color:red;'"></div> -->
                         </div>
                         <!-- {{ scope.row.position == 1 ? "<div></div>" : "<div></div>" }} -->
                     </template>
                 </el-table-column>
-                <el-table-column prop="position" :label="$t('Flip')">
+                <el-table-column prop="position" :label="$t('Flipped')" :min-width="200">
                     <template slot-scope='scope'>
-                        {{ scope.row.flip == 1 ? $t('Yes') : $t('No') }}
+                        {{ scope.row.flip == true ? $t('EXTERIQR OUT AND BYPASS TO THE LEFT') : $t('EXTERIQR OUT AND BYPASS TO THE RIGHT') }}
                     </template>
                 </el-table-column>
                 <el-table-column prop="barcode" :label="$t('Frame No')"></el-table-column>
@@ -701,7 +714,7 @@
             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="addoutslice()">{{ $t('Increase') }}</el-button>
+            <el-button type="primary" @click="addoutslice()">{{ $t('Add') }}</el-button>
             <el-table :data="this.AluminumFrame" :height="700" border style="width: 100%;overflow: auto;">
 
                 <el-table-column prop="barcode" :label="$t('Barcode')"></el-table-column>
@@ -714,7 +727,7 @@
                 <el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column>
                 <el-table-column prop="storageCage.tier" :label="$t('The Side')"></el-table-column>
                 <el-table-column prop="FrameNo" :label="$t('Frame No')"></el-table-column>
-                <el-table-column prop="Flip" :label="$t('Flip')"></el-table-column>
+                <el-table-column prop="Flip" :label="$t('Flipped')"></el-table-column>
                 <el-table-column prop="out_slice.state" :label="$t('In the queue')">
                     <template slot-scope='scope'>
                         {{ scope.row.out_slice != null ? $t('Yes') : $t('No') }}
@@ -834,11 +847,11 @@
             OutingQueue: true,
             OrderInfo: true,
             CageDetails: true,
-            CountDowns: "EMERGENCY \r\n STOP",
+            CountDowns: "0",
             D01RequestState: false,
             EmergencyStop: false,
             PromptSize: 250,
-            reset:false
+            reset: false
         };
     },
     created() {
@@ -890,14 +903,14 @@
                     }
                     //鏄惁鎬ュ仠
                     this.EmergencyStop = obj.emergencystop[0];
-                    console.log(this.EmergencyStop);
 
                     //澶嶄綅鍊掕鏃�
                     if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                         this.CountDown();
                     }
                     //澶嶄綅瀹屾垚淇″彿
-                    this.reset=obj.reset[0];
+                    console.log(this.reset);
+                    this.reset = obj.reset[0];
                     //鏄惁鏈夎繘鐗囪姹�
                     this.D01RequestState = obj.D01RequestState[0];
 
@@ -1020,7 +1033,7 @@
             SelectAlarmmgInfo().then(res => {
                 this.alarm = res.data.alarmmg;
             });
-            
+
             //鍔犺浇纭瀵嗙爜
             SelectPassword().then(res => {
                 this.password = res.data.password;
@@ -1637,9 +1650,9 @@
             if (columnIndex === 8) {
                 style = "font-size:200px;text-align: center;height:200px;";
             }
-            if (columnIndex === 9 && row.flip == 1) {
-                style = "background-Color:yellow;";
-            }
+            // if (columnIndex === 9 && row.flip == 1) {
+            //     style = "background-Color:yellow;";
+            // }
             if (columnIndex === 6 && row.state == 3) {
                 style = "background-Color:gray;";
             }
@@ -1661,7 +1674,7 @@
             if (rowIndex != 0) {
                 barcode2 = arrOutSlice[rowIndex - 1].barcode;
             }
-            if (columnIndex === 12) {
+            if (columnIndex === 12||columnIndex === 8) {
                 if (barcode != barcode2) {
                     // this.FrameNoFlag = barcode;
                     for (let i = rowIndex; i < this.OutSlice.length; i++) {
@@ -1669,7 +1682,6 @@
                             barcode = arrOutSlice[i].barcode;
                             rowspans += 1;
                         } else {
-
                             break;
                         }
                     }
@@ -1736,9 +1748,9 @@
             let timer = setInterval(
                 () => {
                     if (this.EmergencyStop == true) {
+                        this.dialogFormCountDown = false;
                         clearInterval(timer);
-                        this.PromptSize = 250;
-                        this.CountDowns = "EMERGENCY \n STOP";
+                        this.CountDowns = "0";
                     } else {
                         if (count > 0) {
                             this.PromptSize = 500;
@@ -1746,9 +1758,9 @@
                             count--;
                         }
                         else {
-                            this.PromptSize = 250;
-                            this.CountDowns = "Waiting \n for \n reset";
-                            if(this.reset==true){
+                            this.PromptSize = 200;
+                            this.CountDowns = "Waiting for reset";
+                            if (this.reset == true) {
                                 clearInterval(timer);
                                 this.dialogFormCountDown = false;
                             }

--
Gitblit v1.8.0