From 5465a833a00ee1ab59774398ced083d88bc0027d Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期一, 17 六月 2024 16:58:41 +0800 Subject: [PATCH] 添加中英文显示 --- Albania_Mes-ui/src/views/home/index.vue | 71 +++++++++++++++++++++++++---------- 1 files changed, 50 insertions(+), 21 deletions(-) diff --git a/Albania_Mes-ui/src/views/home/index.vue b/Albania_Mes-ui/src/views/home/index.vue index a562313..af9ad8b 100644 --- a/Albania_Mes-ui/src/views/home/index.vue +++ b/Albania_Mes-ui/src/views/home/index.vue @@ -309,6 +309,17 @@ .custom-row-class{ background-color: rgb(150, 238, 234) !important; } +.file-upload input[type="file"] { + display: none; +} + +.file-upload label { + padding: 10px; + background-color: #007bff; + color: white; + display: inline-block; + cursor: pointer; +} </style> <template> <el-container> @@ -428,7 +439,7 @@ </template> </el-table-column> </el-table> - <el-table :data="this.tasklist2" border style="width: 100%" > + <el-table :data="this.tasklist2" border style="width: 100%"> <el-table-column prop="glassId" :label="$t('Glasstype')"></el-table-column> <el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column> <el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column> @@ -454,9 +465,14 @@ <div id="" class="container"> <div class="header"> <div class="btn"> - <el-button type="primary" @click="importData()">淇濆瓨</el-button> + - <input type="file" id="uploadExcel" multiple @change="Change" /> + <div class="file-upload"> + <el-button type="primary" @click="importData()">{{ $t('Save') }}</el-button> + <input type="file" id="file-upload" multiple @change="Change" /> + <label for="file-upload">{{ $t('Select file') }}</label> + </div> + </div> </div> <el-table :data="this.dataList" border style="width: 100%;"> @@ -480,14 +496,14 @@ <div style="height: 780px;"> <!--鍔熻兘--> <div> - <el-button type="primary" @click="ManualMatching()" :disabled="(this.LastQueue.state <= 0)" + <!-- <el-button type="primary" @click="ManualMatching()" :disabled="(this.LastQueue.state <= 0)" style="z-index: 999;">{{ $t('Manual matching') }}</el-button> <el-button type="primary" @click="ManualTake()" :disabled="(this.LastQueue.state <= 0)" style="z-index: 999;">{{ - $t('Manual removal') }}</el-button> + $t('Manual removal') }}</el-button> --> <el-button type="primary" @click="AnewMeasure()" :disabled="(this.LastQueue.state <= 0)" style="z-index: 999;">{{ - $t('Remeasure') }}</el-button> + $t('Remeasure') }}</el-button> </div> <br> <!--鏄剧ず--> @@ -499,17 +515,19 @@ + (this.LastQueue.glassheight / 25 * 7) + 'px;line-height: ' + (this.LastQueue.glassheight / 25 * 7/3) + 'px; background-color: ' + (this.LastQueue.state > 0 ? '#4CCCE4' : (this.LastQueue.state == 0 ? '#E4CA4C' : '#E4CA4C')) + ';text-align: center;font-size:50px'"> - <div> + <div> {{ $t('Measure')}} </div> <div> - {{ $t('Width')+"*"+$t('Height') }}:{{(this.LastQueue.glasswidth + this.LastQueue.glassheight) != 0 ? (this.LastQueue.glasswidth + "*"+this.LastQueue.glassheight)+"" : ""}} + {{ $t('Width')+"*"+$t('Height') }}:{{(this.LastQueue.glasswidth + + this.LastQueue.glassheight) != 0 ? (this.LastQueue.glasswidth + + "*"+this.LastQueue.glassheight)+"" : ""}} </div> - + <div> {{ $t('results') }}:{{this.LastState[this.LastQueue.state]}} </div> - + </div> </div> @@ -536,7 +554,7 @@ (this.LastQueue.state == 0 ? $t('Multiple data matching') : $t('Matching failed')) }}</span> <br> --> <el-table :data="this.tasklist3" :row-class-name="rowClassName" style="width: 100%;padding:0;"> - <el-table-column prop="flowcard" :label="$t('flowcard')"></el-table-column> + <el-table-column prop="flowcard" :label="$t('Flowcard')"></el-table-column> <el-table-column prop="films" :label="$t('Films')"></el-table-column> <el-table-column prop="width" :label="$t('Width')"></el-table-column> <el-table-column prop="height" :label="$t('Height')"></el-table-column> @@ -545,7 +563,7 @@ <el-table-column prop="measurenumber" :label="$t('MeasureNumber')"></el-table-column> </el-table> </div> - + </div> </el-dialog> @@ -618,7 +636,7 @@ </el-table-column> <el-table-column prop="line" :label="$t('Task Line')"> </el-table-column> - <el-table-column width="350" :label="$t('Operate')"> + <el-table-column width="380" :label="$t('Operate')"> <template slot-scope='scope'> <el-select v-model="selected[scope.$index]" :placeholder="$t('Line')" @@ -629,19 +647,16 @@ </el-select> <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" v-show="scope.row.state >= 0 ? true : false" - @click="ClaimTasks(scope.row.flowcard, scope.row.state, selected[scope.$index])"> + @click="ClaimTasks(scope.row.flowcard, scope.row.state, selected[scope.$index],scope.row.line)"> {{ scope.row.state > 0 ? $t('Stop Task') : $t('Start Task') }}</el-button> - <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" v-show="scope.row.state >= 0 ? true : false" @click="ModeChange(scope.row.flowcard, scope.row.method)"> {{ $t('Mode Change') }}</el-button> - <el-button type="primary" style="padding: 4px 10px;font-size: 12px;" - v-show="scope.row.state >= 0 ? true : false" - @click="StartChange(scope.row.flowcard)"> + v-show="scope.row.state >= 0 ? true : false" @click="StartChange(scope.row.flowcard)"> {{ $t('start work') }}</el-button> </template> </el-table-column> @@ -980,12 +995,26 @@ }, //棰嗗彇/鏆傚仠浠诲姟 - ClaimTasks(flowcard, state, line) { - ClaimTasks(flowcard, state, line).then(res => { + ClaimTasks(flowcard, state, line, taksline) { + if(line===undefined&&state==1){ + this.$message.error(this.$t('Please select a route')); + } + if(line===undefined&&state==0){ + this.$message.error(this.$t('Please select a route')); + }else{ + if(line===undefined||state==1){ + line=taksline; + } + ClaimTasks(flowcard, state, line).then(res => { + if (res.data.message == 200) { this.$message.success(this.$t('Operation successful')); - } + }else{ + this.$message.error(this.$t('This route already has a task')); + } }); + } + }, //淇敼鍑虹墖鏂瑰紡 ModeChange(flowcard, method) { -- Gitblit v1.8.0