From 36de27dcf89a1a651c6498f3dc4c8fd872ca3f92 Mon Sep 17 00:00:00 2001
From: clll <1320612696@qq.com>
Date: 星期三, 13 九月 2023 17:17:17 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes

---
 CanadaMes-ui/src/views/home/index.vue |  229 ++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 146 insertions(+), 83 deletions(-)

diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index f76e51d..c2448cd 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -91,11 +91,36 @@
     background-size: 46px 94px;
     background-attachment: local;
     width: 32px;
-
     position: absolute;
     /* left: 116px; */
     /* left:1060px;18.88px */
     background-image: url('../../img/bigcar01.png');
+}
+
+.blocks-img2 {
+    height: 100px;
+    max-width: 100vw;
+    background-repeat: no-repeat;
+    background-size: 85px 100px;
+    background-attachment: local;
+    width: 100px;
+    position: absolute;
+    /* left: 116px; */
+    /* left:1060px;18.88px */
+    background-image: url('../../img/dipan.png');
+}
+
+.blocks-img3 {
+    height: 90px;
+    max-width: 100vw;
+    background-repeat: no-repeat;
+    background-size: 160px 40px;
+    background-attachment: local;
+    width: 160px;
+    position: absolute;
+    /* left: 116px; */
+    /* left:1060px;18.88px */
+    background-image: url('../../img/taimian.png');
 }
 
 .el-table td,
@@ -151,37 +176,37 @@
                 </div>
             </div>
             <div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;">
-                <el-input style="width:15%;" placeholder="Enter the glass lD" v-model="glassid"></el-input>
-                <el-button type="primary" @click="showform()">Manually feed the glass</el-button>
-                <el-input style="width:15%;" placeholder="Enter the order number" v-model="order"></el-input>
-                <el-button type="warning" @click="showform1();">Exit the glass by order number</el-button>
+                <el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid"></el-input>
+                <el-button type="primary" @click="showform()">{{ $t('Manually feed the glass') }}</el-button>
+                <el-input style="width:15%;" :placeholder="$t('Enter the order number')" v-model="order"></el-input>
+                <el-button type="warning" @click="showform1();">{{ $t('Exit the glass by order number') }}</el-button>
             </div>
             <div>
                 <el-table :data="this.tasklist1" border style="width: 100%">
-                    <el-table-column prop="glassId" label="Coming out glass ID"></el-table-column>
-                    <el-table-column :width="250" prop="cell" label="The Grille number being used"></el-table-column>
-                    <el-table-column prop="orderId" label="Order Nmuber"></el-table-column>
-                    <el-table-column prop="lengthWidth" label="Length and width"></el-table-column>
-                    <el-table-column prop="coating" label="coating"></el-table-column>
-                    <el-table-column label="Operate">
+                    <el-table-column prop="glassId" :label="$t('Coming out glass ID')"></el-table-column>
+                    <el-table-column :width="250" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
+                    <el-table-column :width="250" prop="cell" :label="$t('The Grille number being used')"></el-table-column>
+                    <el-table-column prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
+                    <el-table-column prop="lengthWidth" :label="$t('Length and width')"></el-table-column>
+                    <el-table-column prop="coating" :label="$t('coating')"></el-table-column>
+                    <el-table-column :label="$t('Operate')">
                         <template slot-scope='scope'>
                             <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
-                                @click="endtask(0, scope.row.glassId, scope.row.cell)">end
-                                task</el-button>
+                                @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
                 <el-table :data="this.tasklist2" border style="width: 100%">
-                    <el-table-column prop="glassId" label="Incoming glass ID"></el-table-column>
-                    <el-table-column :width="250" prop="cell" label="The Grille number being used"></el-table-column>
-                    <el-table-column prop="orderId" label="Order Nmuber"></el-table-column>
-                    <el-table-column prop="lengthWidth" label="Length and width"></el-table-column>
-                    <el-table-column prop="coating" label="coating"></el-table-column>
-                    <el-table-column label="Operate">
+                    <el-table-column prop="glassId" :label="$t('Incoming glass ID')"></el-table-column>
+                    <el-table-column :width="250" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
+                    <el-table-column :width="250" prop="cell" :label="$t('The Grille number being used')"></el-table-column>
+                    <el-table-column prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
+                    <el-table-column prop="lengthWidth" :label="$t('Length and width')"></el-table-column>
+                    <el-table-column prop="coating" :label="$t('coating')"></el-table-column>
+                    <el-table-column :label="$t('Operate')">
                         <template slot-scope='scope'>
                             <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
-                                @click="endtask(1, scope.row.glassId, scope.row.cell)">end
-                                task</el-button>
+                                @click="endtask(1, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -219,70 +244,73 @@
                 </div>
                 <div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
                 <div class="blocks-img" :style="{ left: car2 + 'px', top: '194px' }"></div>
+                <div class="blocks-img2" :style="{ left: '912px', top: '366px' }"></div>
+                <div class="blocks-img3" :style="{ left: '875px', top: '455px' }"></div>
             </div>
         </el-footer>
-        <el-dialog :visible.sync="dialogFormVisible" title="Please confirm the information">
+        <el-dialog :visible.sync="dialogFormVisible" :title="$t('Please confirm the glass information')">
             <el-form :model="form" label-width="100px" style="padding-right: 30px">
-                <el-form-item label="order">
+                <el-form-item :label="$t('order')">
                     <el-input v-model="form.orderno" autocomplete="off" />
                 </el-form-item>
-                <el-form-item label="length">
+                <el-form-item :label="$t('length')">
                     <el-input v-model="form.length" autocomplete="off" />
                 </el-form-item>
-                <el-form-item label="width">
+                <el-form-item :label="$t('width')">
                     <el-input v-model="form.width" autocomplete="off" />
                 </el-form-item>
-                <el-form-item label="coating">
+                <el-form-item :label="$t('coating')">
                     <el-input v-model="form.coating" autocomplete="off" />
                 </el-form-item>
             </el-form>
             <template #footer>
                 <span class="dialog-footer">
-                    <el-button @click="cancal()">cancal</el-button>
-                    <el-button @click="sbumitglassid()" type="primary">confirm</el-button>
+                    <el-button @click="cancal()">{{ $t('cancal') }}</el-button>
+                    <el-button @click="sbumitglassid()" type="primary">{{ $t('confirm') }}</el-button>
                 </span>
             </template>
         </el-dialog>
-        <el-dialog :visible.sync="dialogFormVisible1" title="Ordering Information">
+        <el-dialog :visible.sync="dialogFormVisible1" :title="$t('Please confirm the Ordering Information')">
             <el-form :model="form1" label-width="100px" style="padding-right: 30px">
-                <el-form-item label="order">
+                <el-form-item :label="$t('order')">
                     <el-input v-model="form1.order" autocomplete="off" />
                 </el-form-item>
-                <el-form-item label="number">
+                <el-form-item :label="$t('number')">
                     <el-input v-model="form1.number" autocomplete="off" />
                 </el-form-item>
             </el-form>
             <template #footer>
                 <span class="dialog-footer">
-                    <el-button @click="cancal1()">cancal</el-button>
-                    <el-button @click="getOrder();" type="primary">confirm</el-button>
+                    <el-button @click="cancal1()">{{ $t('cancal') }}</el-button>
+                    <el-button @click="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
                 </span>
             </template>
         </el-dialog>
-        <el-dialog :visible.sync="dialogFormVisible2" title="Ordering Information">
+        <el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')">
             <el-table :data="this.alarm" border style="width: 100%;">
-                <el-table-column prop="id" label="id"></el-table-column>
-                <el-table-column prop="content" label="content"></el-table-column>
-                <el-table-column prop="timeons" label="timeon"></el-table-column>
-
-                <el-table-column prop="endTime" label="endTime"></el-table-column>
+                <el-table-column prop="id" :label="$t('id')"></el-table-column>
+                <el-table-column prop="content" :label="$t('content')"></el-table-column>
+                <el-table-column prop="timeons" :label="$t('timeon')"></el-table-column>
+                <el-table-column prop="endTime" :label="$t('endTime')"></el-table-column>
             </el-table>
         </el-dialog>
-        <el-dialog :visible.sync="dialogFormVisible3" title="Cage Details">
-            <el-table :data="this.cageinfo" border style="width: 100%;height: 700px;overflow: auto;">
-                <el-table-column :width="150" prop="cage" label="the grille number"></el-table-column>
-                <el-table-column prop="cell" label="cell"></el-table-column>
-                <el-table-column prop="tier" label="tier"></el-table-column>
-                <el-table-column prop="glassId" label="glassid"></el-table-column>
-                <el-table-column :width="130" prop="orderId" label="order number"></el-table-column>
-                <el-table-column :width="150" prop="lengthWidth" label="length and width"></el-table-column>
-                <el-table-column prop="coating" label="coating"></el-table-column>
-                <el-table-column :width="150" label="operate">
+        <el-dialog :visible.sync="dialogFormVisible3" :title="$t('Cage Details')">
+            <el-table :data="this.cageinfo" :height="700" border style="width: 100%;overflow: auto;">
+                <el-table-column :width="150" prop="cage" :label="$t('The Cage number')"></el-table-column>
+                <el-table-column prop="cell" :label="$t('cell')"></el-table-column>
+                <el-table-column prop="tier" :label="$t('tier')"></el-table-column>
+                <el-table-column prop="glassId" :label="$t('glassid')"></el-table-column>
+                <el-table-column :width="130" prop="orderId" :label="$t('order number')"></el-table-column>
+                <el-table-column :width="150" prop="lengthWidth" :label="$t('Length and width')"></el-table-column>
+                <el-table-column prop="coating" :label="$t('coating')"></el-table-column>
+                <el-table-column :width="140" :label="$t('Operate')">
                     <template slot-scope='scope'>
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
-                            @click="deleteglass(scope.row.glassId, scope.row.state)">delete</el-button>
+                            @click="deleteglass(scope.row.glassId, scope.row.state)">{{ $t('delete') }}</el-button>
+                        <!-- <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" @click="open">{{ $t('delete')
+                        }}</el-button> -->
                         <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
-                            @click="outglass(scope.row.glassId, scope.row.state)">out</el-button>
+                            @click="outglass(scope.row.glassId, scope.row.state)">{{ $t('out') }}</el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -442,9 +470,11 @@
             if (this.form1.order != "") {
                 InsertOrder(this.order).then(res => {
                     if (res.data.message == 200) {
-                        this.$message.success("Operation successful");
+                        this.dialogFormVisible1 = false;
+                        this.$message.success(this.$t('Operation successful'));
+
                     } else {
-                        this.$message.success("There is no such order");
+                        this.$message.success(this.$t('There is no glass for this order'));
                     }
                     this.load();
                 });
@@ -456,16 +486,16 @@
             if (this.form.order != "") {
                 Addglassid(this.glassid).then(res => {
                     if (res.data.message2 == 200) {
-                        this.$message.success("Operation successful");
+                        this.$message.success(this.$t('Operation successful'));
                         this.cancal();
-                    } else if(res.data.message2 == 500) {
-                        this.$message.success("There are currently tasks");
+                    } else if (res.data.message2 == 500) {
+                        this.$message.success(this.$t('There are currently tasks'));
                     }
-                    else if(res.data.message2 == 300) {
-                        this.$message.success("There is no such grid");
+                    else if (res.data.message2 == 300) {
+                        this.$message.success(this.$t('There is no such glass'));
                     }
-                    else if(res.data.message2 == 400) {
-                        this.$message.success("There is no such grid");
+                    else if (res.data.message2 == 400) {
+                        this.$message.success(this.$t('There is no such grid'));
                     }
                 });
             }
@@ -503,11 +533,23 @@
             this.form1 = {};
         },
         endtask(type, glassid, cell) {
-            UpdateTask(type, glassid, cell).then(res => {
-                if (res.data.message3 == 200) {
-                    this.$message.success("Operation successful");
-                }
+            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+                confirmButtonText: this.$t('Yes'),
+                cancelButtonText: this.$t('No'),
+                type: 'warning'
+            }).then(() => {
+                UpdateTask(type, glassid, cell).then(res => {
+                    if (res.data.message3 == 200) {
+                        this.$message.success(this.$t('Operation successful'));
+                    }
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: this.$t('Operation canceled')
+                });
             });
+
         },
         showcageinfo(cage) {
             this.cage = cage;
@@ -517,31 +559,52 @@
             });
         },
         deleteglass(glassid, state) {
-            if (state == 1) {
-                DeleteByGlassID(glassid).then(res => {
-                    if (res.data.message3 == 200) {
-                        this.$message.success("Operation successful");
-                    }
+            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+                confirmButtonText: this.$t('Yes'),
+                cancelButtonText: this.$t('No'),
+                type: 'warning'
+            }).then(() => {
+                if (state == 1) {
+                    DeleteByGlassID(glassid).then(res => {
+                        if (res.data.message3 == 200) {
+                            this.$message.success(this.$t('Operation successful'));
+                        }
+                    });
+                } else {
+                    this.$message.success(this.$t('No delete allowed'));
+                }
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: this.$t('Operation canceled')
                 });
-            } else {
-                this.$message.success("No out allowed");
-            }
+            });
         },
         outglass(glassid, state) {
-            if (state == 1) {
-                OutByGlassID(glassid).then(res => {
-                    if (res.data.message3 == 200) {
-                        this.$message.success("Operation successful");
-                    }
+            this.$confirm(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+                confirmButtonText: this.$t('Yes'),
+                cancelButtonText: this.$t('No'),
+                type: 'warning'
+            }).then(() => {
+                if (state == 1) {
+                    OutByGlassID(glassid).then(res => {
+                        if (res.data.message3 == 200) {
+                            this.$message.success(this.$t('Operation successful'));
+                        }
+                    });
+                } else {
+                    this.$message.success(this.$t('No out allowed'));
+                }
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: this.$t('Operation canceled')
                 });
-            } else {
-                this.$message.success("No out allowed");
-            }
+            });
+
         }
-
     }
+
 }
-
-
 
 </script>
\ No newline at end of file

--
Gitblit v1.8.0