From 68d56160c32384f8d939df0bd25bdc9c50b042b9 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期一, 30 十月 2023 11:08:04 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
CanadaMes-ui/src/views/home/index.vue | 750 ++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 601 insertions(+), 149 deletions(-)
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 98c0f36..7012203 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -60,47 +60,82 @@
.gezi {
height: 35px;
- width: 4.22px;
+
+ position: absolute;
+ width: 3.08px;
+ /* width: 4.22px; */
}
-
-.gezi:nth-child(22),
-.gezi:nth-child(43),
-.gezi:nth-child(64),
-.gezi:nth-child(85) {
- margin-left: 10px;
-}
-
-
.blocks {
- min-height: 55vh;
- max-width: 100vw;
+
+
background-image: url('../../img/xmjc.png');
margin: 0 auto;
background-repeat: no-repeat;
- /* background-size: 100% 100%; */
- background-size: 1660px 560px;
background-attachment: local;
width: 1660px;
+ min-height: 55vh;
+ max-width: 94vw;
+ background-size: 1200px 510px;
+ /* max-width: 100vw;
+ background-size: 1660px 560px; */
+
+
}
.blocks-img {
height: 100px;
max-width: 100vw;
background-repeat: no-repeat;
- background-size: 46px 94px;
background-attachment: local;
width: 32px;
-
position: absolute;
- /* left: 116px; */
- /* left:1060px;18.88px */
background-image: url('../../img/bigcar01.png');
+ background-size: 40px 87px;
+ /* background-size: 46px 94px; */
+}
+
+.blocks-img2 {
+ height: 100px;
+ max-width: 100vw;
+ background-repeat: no-repeat;
+ background-attachment: local;
+ width: 100px;
+ position: absolute;
+ background-image: url('../../img/dipan.png');
+ background-size: 70px 85px;
+ left: 654px;
+ top: 333px;
+ /* background-size: 85px 100px;
+ left: 912px;
+ top: 366px; */
+}
+
+.orderbutton {
+ position: absolute;
+ left: 1070px;
+ top: 70px;
+}
+
+.blocks-img3 {
+ height: 90px;
+ max-width: 100vw;
+ background-repeat: no-repeat;
+ background-attachment: local;
+ width: 160px;
+ position: absolute;
+ background-image: url('../../img/taimian.png');
+ background-size: 120px 30px;
+ left: 630px;
+ top: 420px;
+ /* background-size: 160px 40px;
+ left: 875px;
+ top: 455px; */
}
.el-table td,
.el-table th {
- padding: 8px 0;
+ padding: 5px 0;
}
.el-table__empty-block {
@@ -114,18 +149,21 @@
.box {
width: 90%;
margin-left: 5%;
- height: 35px;
color: red;
font-size: 12px;
overflow: hidden;
+ height: 20px;
+ /* height: 35px; */
}
.text {
width: auto;
- line-height: 35px;
+
white-space: nowrap;
animation: textScroll 20s linear infinite;
margin: 0 auto;
+ line-height: 20px;
+ /* line-height: 35px; */
}
@keyframes textScroll {
@@ -137,6 +175,10 @@
transform: translateX(-150%);
}
}
+
+.el-dialog {
+ width: 90%;
+}
</style>
<template>
<el-container>
@@ -144,44 +186,47 @@
<el-main>
<div class="box" @click="dialogFormVisible2 = true">
<div class="text">
- Alarm:
+ <!-- Alarm: -->
+ {{ this.text }}
<label v-for="item in this.alarm" :key="item['id']">
{{ item['content'] }}
</label>
</div>
</div>
<div style="display:flex;justify-content: space-around;width: 95%;margin: 0 auto;">
- <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 glass lD')" v-model="glassid1"></el-input>
+ <el-button type="primary" @click="SelectGlassByGlassIDs()">{{ $t('Infeed barcodid') }}</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="$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 :width="130" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
+ <el-table-column :width="130" prop="cell" :label="$t('The Slot number being used')"></el-table-column>
+ <el-table-column :width="150" prop="glassId" :label="$t('Outfeed Barcodid')"></el-table-column>
+ <el-table-column :width="130" prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
+ <el-table-column prop="list" :label="$t('List Number')"></el-table-column>
+ <el-table-column prop="box" :label="$t('Box Number')"></el-table-column>
+ <el-table-column prop="lengthWidth" :label="$t('Length and Width')"></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)">{{$t('end task')}}</el-button>
+ @click="endtask(1, 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="$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 :width="130" prop="cage" :label="$t('The Cage number being used')"></el-table-column>
+ <el-table-column :width="130" prop="cell" :label="$t('The Slot number being used')"></el-table-column>
+ <el-table-column :width="150" prop="glassId" :label="$t('Infeed Barcodid')"></el-table-column>
+ <el-table-column :width="130" prop="orderId" :label="$t('Order Nmuber')"></el-table-column>
+ <el-table-column prop="list" :label="$t('List Number')"></el-table-column>
+ <el-table-column prop="box" :label="$t('Box Number')"></el-table-column>
+ <el-table-column prop="lengthWidth" :label="$t('Length and Width')"></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)">{{$t('end task')}}</el-button>
+ @click="endtask(0, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
</template>
</el-table-column>
</el-table>
@@ -190,59 +235,173 @@
<div v-for="item in tableData" :key="item['cageno']" class="occupy">
<el-col style="text-align:left;font-weight: bold;">#{{ item['cage'] }}</el-col>
<el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
- <span class="biao">Usage</span><span class="zhi">{{ item['cell'] }}%</span>
+ <span class="biao">{{ $t('Usage') }}</span><span class="zhi">{{ item['cell'] }}%</span>
</el-col>
<hr style="width:80%;margin: 0 auto;" />
<el-col style="text-align:left;display:flex;justify-content: space-between;align-items: center;">
- <span class="biao">Space (Pieces)</span><span class="zhi">{{ item['state'] }}</span>
+ <span class="biao">{{ $t('Space (Pieces)') }}</span><span class="zhi">{{ item['state'] }}</span>
</el-col>
</div>
</div>
</el-main>
<el-footer>
<div class="blocks" style="position: relative;">
- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
- <div :class="getStatusClass(item.state)" v-for="item in cagelist1" :key="item['date']"
+ <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:237px;">
+ <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist1" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index + Math.abs(item['cage'] - 10) * 6.8 + 'px' }"
+ @click="showcageinfo(item['cage'])"></div>
+ </div>
+ <div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:640px;">
+ <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist2" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index + Math.abs(item['cage'] - 5) * 6.8 + 'px' }"
+ @click="showcageinfo(item['cage'])"></div>
+ </div>
+ <div style="display:flex;position: absolute;float:left;z-index: 999;top:139px;left:237px;">
+ <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist3" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index + Math.abs(item['cage'] - 10) * 6.8 + 'px' }"
+ @click="showcageinfo(item['cage'])">
+ </div>
+ </div>
+ <div style="display:flex;position: absolute;float:left;z-index: 999;top:139px;left:640px;">
+ <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist4" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index + Math.abs(item['cage'] - 5) * 6.8 + 'px' }"
+ @click="showcageinfo(item['cage'])"></div>
+ </div>
+ <div class="blue gezi"
+ :style="{ display: 'flex', position: 'absolute', float: 'left', top: 105 + 'px', left: 1050 + 'px', height: loadglassheight + 'px', width: 5 + 'px' }">
+ </div>
+ <div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
+ <div class="blocks-img" :style="{ left: car2 + 'px', top: '175px' }"></div>
+ <div class="blocks-img2"></div>
+ <div class="blocks-img3"></div>
+ <el-button class="orderbutton" type="primary" @click="showform2()">{{ $t('OrderInfo') }}</el-button>
+
+ <!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
+ <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist1" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px',left:4.22*index+'px' }"
@click="showcageinfo(item['cage'])"></div>
</div>
<div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:885px;">
- <div :class="getStatusClass(item.state)" v-for="item in cagelist2" :key="item['date']"
+ <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist2" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px',left:4.22*index+'px' }"
@click="showcageinfo(item['cage'])"></div>
</div>
<div style="display:flex;position: absolute;float:left;z-index: 999;top:154px;left:328px;">
- <div :class="getStatusClass(item.state)" v-for="item in cagelist3" :key="item['date']"
+ <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist3" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px',left:4.22*index+'px' }"
@click="showcageinfo(item['cage'])"></div>
</div>
<div style="display:flex;position: absolute;float:left;z-index: 999;top:154px;left:885px;">
- <div :class="getStatusClass(item.state)" v-for="item in cagelist4" :key="item['date']"
+ <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist4" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px',left:4.22*index+'px' }"
@click="showcageinfo(item['cage'])"></div>
</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="$t('Please confirm the glass information')">
<el-form :model="form" label-width="100px" style="padding-right: 30px">
+ <el-form-item :label="$t('Barcodid')">
+ <el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid"></el-input>
+ <el-button type="primary" @click="showform(3)">{{ $t('Query') }}</el-button>
+ </el-form-item>
<el-form-item :label="$t('order')">
- <el-input v-model="form.orderno" autocomplete="off" />
+ <el-input v-model="form.orderId" readonly autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('length')">
- <el-input v-model="form.length" autocomplete="off" />
+ <el-input v-model="form.height" readonly autocomplete="off" />
</el-form-item>
<el-form-item :label="$t('width')">
- <el-input v-model="form.width" autocomplete="off" />
+ <el-input v-model="form.width" readonly autocomplete="off" />
</el-form-item>
- <el-form-item :label="$t('coating')">
- <el-input v-model="form.coating" autocomplete="off" />
+ <el-form-item :label="$t('Barcodid')">
+ <el-input v-model="form.glassId" readonly autocomplete="off" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="cancal()">{{ $t('cancal') }}</el-button>
- <el-button @click="sbumitglassid()" type="primary">{{ $t('confirm') }}</el-button>
+ <el-button @click="sbumitglassid()" :style="{ display: confirm1 == true ? '' : 'none' }"
+ type="primary">{{
+ $t('confirm') }}</el-button>
+ <el-button @click="FeedInglassid()" :style="{ display: confirm2 == true ? '' : 'none' }"
+ type="primary">{{
+ $t('confirm') }}</el-button>
+ <el-button @click="cancel()">{{ $t('cancel') }}</el-button>
</span>
</template>
</el-dialog>
+
+ <el-dialog :visible.sync="dialogFormVisible5" :title="$t('Please confirm the glass information')">
+ <el-form :model="form" label-width="100px" style="padding-right: 30px">
+ <el-form-item style="text-align: center;">
+ <el-input style="width:15%;" :placeholder="$t('Enter the glass lD')" v-model="glassid1"></el-input>
+ <el-button type="primary" @click="SelectGlassByGlassIDs()">{{ $t('Query') }}</el-button>
+ </el-form-item>
+ <div style="display: flex;justify-content: space-around;height: 40px;">
+ <label for="">{{ $t('Scan Code Point') }}</label>
+ <label for="">{{ $t('Upper film position') }}</label>
+ <label for="">{{ $t('Glass Information') }}</label>
+ </div>
+ <div style="display: flex;justify-content: space-around;">
+ <el-form-item :label="$t('Barcodid')">
+ <el-input v-model="form2.glassId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('Barcodid')">
+ <el-input v-model="form3.glassId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('Barcodid')">
+ <el-input v-model="form4.glassId" readonly autocomplete="off" />
+ </el-form-item>
+ </div>
+ <div style="display: flex;justify-content: space-around;">
+ <el-form-item :label="$t('order')">
+ <el-input v-model="form2.orderId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('order')">
+ <el-input v-model="form3.orderId" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('order')">
+ <el-input v-model="form4.orderId" readonly autocomplete="off" />
+ </el-form-item>
+ </div>
+ <div style="display: flex;justify-content: space-around;">
+ <el-form-item :label="$t('length')">
+ <el-input v-model="form2.height" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('length')">
+ <el-input v-model="form3.height" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('length')">
+ <el-input v-model="form4.height" readonly autocomplete="off" />
+ </el-form-item>
+ </div>
+ <div style="display: flex;justify-content: space-around;">
+ <el-form-item :label="$t('width')">
+ <el-input v-model="form2.width" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('width')">
+ <el-input v-model="form3.width" readonly autocomplete="off" />
+ </el-form-item>
+ <el-form-item :label="$t('width')">
+ <el-input v-model="form4.width" readonly autocomplete="off" />
+ </el-form-item>
+ </div>
+
+ </el-form>
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="InsertQueueGlass()" type="primary" :disabled="disabled">{{ $t('confirm')
+ }}</el-button>
+ <el-button @click="InsertQueueGlass()" type="primary" :disabled="disabled">{{ $t('confirm')
+ }}</el-button>
+ <el-button @click="cancel3()">{{ $t('cancel') }}</el-button>
+ </span>
+ </template>
+ </el-dialog>
+
<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="$t('order')">
@@ -254,8 +413,8 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="cancal1()">{{ $t('cancal') }}</el-button>
<el-button @click="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
+ <el-button @click="cancel1()">{{ $t('cancel') }}</el-button>
</span>
</template>
</el-dialog>
@@ -267,30 +426,76 @@
<el-table-column prop="endTime" :label="$t('endTime')"></el-table-column>
</el-table>
</el-dialog>
- <el-dialog :visible.sync="dialogFormVisible3" :title="$t('Cage Details')">
+ <el-dialog :visible.sync="dialogFormVisible3" :title="$t('Cage Details')" top="5vh">
<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')">
+ <el-table-column :width="90" prop="cage" :label="$t('The Cage number')"></el-table-column>
+ <el-table-column :width="90" prop="cell" :label="$t('The Slot Number')"></el-table-column>
+ <el-table-column :width="55" prop="tier" :label="$t('The Side')"></el-table-column>
+ <el-table-column :width="100" prop="glassId" :label="$t('Barcodid')"></el-table-column>
+ <el-table-column :width="100" prop="orderId" :label="$t('Order Number')"></el-table-column>
+ <el-table-column :width="100" prop="list" :label="$t('List Number')"></el-table-column>
+ <el-table-column :width="100" prop="box" :label="$t('Box Number')"></el-table-column>
+ <el-table-column :width="170" prop="lengthWidth" :label="$t('Length and Width')"></el-table-column>
+ <el-table-column :width="280" :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)">{{ $t('delete') }}</el-button>
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
@click="outglass(scope.row.glassId, scope.row.state)">{{ $t('out') }}</el-button>
+ <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+ @click="UpdateDisabled(scope.row.cage, scope.row.cell, scope.row.disabled == 0 ? 1 : 0)">
+ {{ scope.row.disabled == 0 ? $t('Enable') : $t('Disable') }}</el-button>
+ <el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
+ @click="insertglass(scope.row.cage, scope.row.cell, scope.row.tier)">{{ $t('increase')
+ }}</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
+ <el-dialog :visible.sync="dialogFormVisible4" :title="$t('OrderInfo')" top="5vh">
+ <el-input style="width:15%;" :placeholder="$t('Enter the Order lD')" v-model="orderid"></el-input>
+ <el-button type="primary" @click="selectglassinfo()">{{ $t('Query') }}</el-button>
+ <el-table :data="GlassInfo.slice((currentPage - 1) * pagesize, currentPage * pagesize)
+ " :height="700" border style="width: 100%;overflow: auto;">
+ <el-table-column prop="glassId" :label="$t('Barcodid')"></el-table-column>
+ <el-table-column prop="orderId" :label="$t('Order Number')"></el-table-column>
+ <el-table-column prop="width" :label="$t('length')"></el-table-column>
+ <el-table-column prop="height" :label="$t('width')"></el-table-column>
+ </el-table>
+
+
+ <!-- <el-table :data="tableDatas.slice((currentPage - 1) * pagesize, currentPage * pagesize)
+ " style="width: 100%">
+ <el-table-column label="Date" prop="date"> </el-table-column>
+ <el-table-column label="Name" prop="name"> </el-table-column>
+ <el-table-column label="鎿嶄綔">
+ <template slot-scope="scope">
+ <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">Edit</el-button>
+ <el-button size="mini" type="danger"
+ @click="handleDelete(scope.$index, scope.row)">Delete</el-button>
+ </template>
+ </el-table-column>
+ </el-table> -->
+
+ <!-- 琛ㄦ牸鍒嗛〉 -->
+ <!-- pager-count pager-count灞炴�у彲浠ヨ缃渶澶ч〉鐮佹寜閽暟,瓒呭嚭鎶樺彔,榛樿涓�7-->
+ <!-- 娉ㄦ剰锛氳嫢鏁版嵁鏄悗绔帴鍙h繑鍥炵殑鍒欐鏃�:total="pageCount"-->
+ <el-pagination :style="'margin-top:-2px'" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+ :pager-count="7" :current-page="currentPage" :page-sizes="[5, 10, 15, 20]" :page-size="pagesize"
+ layout="total, sizes, prev, pager, next, jumper" :total="GlassInfo.length > 0 ? GlassInfo.length : null"
+ background style="float: right; margin-top: 20px">
+ </el-pagination>
+
+
+ </el-dialog>
</el-container>
</template>
<script>
-
-import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID } from "../../api/home";
+//:disabled="scope.row.glassId > 0 || scope.row.disabled == 1 ? true : false"
+import {
+ home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist,
+ SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass, InsertQueueGlassId
+} from "../../api/home";
import LanguageMixin from '../../lang/LanguageMixin'
@@ -299,20 +504,46 @@
name: "Home",
data() {
return {
+ confirm1: false,
+ confirm2: false,
+ insertcage: 0,
+ insertcell: 0,
+ inserttier: 0,
+ name: 'Confirm',
mixins: [LanguageMixin],
dialogFormVisible: false,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
+ dialogFormVisible4: false,
+ dialogFormVisible5: false,
form: {
- orderno: "NG2210210",
- length: 800,
- width: 1000,
- coating: "red",
+ orderId: "",
+ glassId: "",
+ height: "",
+ width: ""
},
form1: {
order: "NG2210210",
number: 800,
+ },
+ form2: {
+ orderId: "1145",
+ glassId: "112",
+ height: "59.06",
+ width: "48.03"
+ },
+ form3: {
+ orderId: "1",
+ glassId: "2",
+ height: "3",
+ width: "4"
+ },
+ form4: {
+ orderId: "",
+ glassId: "",
+ height: "",
+ width: ""
},
alarm: [],
tableData: [],
@@ -320,17 +551,32 @@
cagelist2: [],
cagelist3: [],
cagelist4: [],
- task1: 2,
- task2: 3,
+ task1: 3,
+ task2: 2,
tasklist1: [],
tasklist2: [],
order: "",
glassid: "",
+ glassid1: "",
url: "../../img/bigcar01.png",
- car1: 150,
- car2: 242,
+ car1: 145,
+ car2: 210,
+ // car1: 210,
+ // car2: 300,
cageinfo: [],
- cage: 0
+ cage: 0,
+ carlist: [],
+ loadglassheight: 0,
+ password: 1,
+ text: "",
+ zhuangtai: "",
+ orderid: "",
+ GlassInfo: [],
+ disabled: true,
+ disabled1: true,
+ currentPage: 1, //榛樿鍒濆椤�
+ pagesize: 15, //姣忛〉榛樿鏄剧ず鐨勬暟鎹�
+ pageCount: 0
};
},
created() {
@@ -358,12 +604,13 @@
};
// 娴忚鍣ㄧ鏀舵秷鎭紝鑾峰緱浠庢湇鍔$鍙戦�佽繃鏉ョ殑鏂囨湰娑堟伅
socket.onmessage = function (msg) {
-
//console.log("鏀跺埌鏁版嵁====" + msg.data);
let obj = JSON.parse(msg.data);
if (obj.params != null) {
- this.car1 = 150 + 24.6 * obj.params[0][0];
- this.car2 = 242 + 24.6 * obj.params[0][1];
+ this.car1 = 145 + 8.15 * Math.abs(obj.params[0][0] - this.carlist[0]['start']) / Math.abs(this.carlist[0]['end'] - this.carlist[0]['start']) * 100;
+ this.car2 = 210 + 8.15 * Math.abs(obj.params[0][1] - this.carlist[1]['start']) / Math.abs(this.carlist[1]['end'] - this.carlist[1]['start']) * 100;
+ // this.car1 = 210 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
+ // this.car2 = 300 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
}
this.tableData = obj.tableData[0];
this.cagelist1 = obj.cagelist1[0];
@@ -373,9 +620,25 @@
this.tasklist1 = obj.tasklist1[0];
this.tasklist2 = obj.tasklist2[0];
this.alarm = obj.alarmmg[0];
+ this.loadglassheight = obj.loadglassheight;
+ this.zhuangtai = obj.zhuangtai[0];
+ this.glassid1 = obj.queid[0];
+ if (this.glassid1 != "") {
+ this.disabled1=false;
+ this.showform3();
+ }
+ this.form2 = obj.form2;
+ this.form2 = obj.form3;
+
+ //if (obj.dbconnected == "false") {
+ this.text = this.$t('DataBase Connection failed');
+ // }
SelectCageInfo(this.cage).then(res => {
this.cageinfo = res.data.cageinfo;
+ });
+ SelectGlass(this.orderid).then(res => {
+ this.GlassInfo = res.data.glass;
});
this.$forceUpdate();
@@ -392,34 +655,36 @@
}
},
load() {
+ //鍔犺浇绗煎瓙浣跨敤鎯呭喌鏁版嵁
home().then(res => {
this.tableData = res.data.list;
});
+ //鍔犺浇鐞嗙墖绗肩幓鐠冩暟鎹�
home2().then(res => {
this.cagelist1 = res.data.list1;
this.cagelist2 = res.data.list2;
this.cagelist3 = res.data.list3;
this.cagelist4 = res.data.list4;
});
+ //鍔犺浇杩涚墖浠诲姟鏁版嵁
loadtask(this.task1).then(res => {
this.tasklist1 = res.data.list;
- if (res.data.list.length > 0) {
- this.incell = this.tasklist1[0]['cell'];
- }
});
+ //鍔犺浇杩涘嚭鐗囦换鍔℃暟鎹�
loadtask(this.task2).then(res => {
this.tasklist2 = res.data.list;
- if (res.data.list.length > 0) {
- this.outcell = this.tasklist2[0]['cell'];
- }
-
});
- loadtask(this.task2).then(res => {
- this.tasklist2 = res.data.list;
-
- });
+ //鍔犺浇鎶ヨ淇℃伅
SelectAlarmmgInfo().then(res => {
this.alarm = res.data.alarmmg;
+ });
+ //鍔犺浇灏忚溅浣嶇疆淇℃伅
+ Loadcarlist().then(res => {
+ this.carlist = res.data.carlist;
+ });
+ //鍔犺浇纭瀵嗙爜
+ SelectPassword().then(res => {
+ this.password = res.data.password;
});
},
//鏍规嵁鏍煎瓙鐘舵�佷慨鏀归鑹�
@@ -441,11 +706,11 @@
if (this.form1.order != "") {
InsertOrder(this.order).then(res => {
if (res.data.message == 200) {
- this.dialogFormVisible1=false;
- 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.error(this.$t('There is no glass for this order'));
}
this.load();
});
@@ -455,34 +720,52 @@
//鎵嬪姩涓婄墖
sbumitglassid() {
if (this.form.order != "") {
- Addglassid(this.glassid).then(res => {
- if (res.data.message2 == 200) {
- this.$message.success("Operation successful");
- this.cancal();
- } else if(res.data.message2 == 500) {
- this.$message.success("There are currently tasks");
+ if (this.form.height < 380 || this.form.width < 390 || this.form.height > 1810 || this.form.width > 2760) {
+ this.$message.error(this.$t('The glass size is not within the range'));
+ } else {
+ if (this.zhuangtai == true) {
+ Addglassid(this.glassid).then(res => {
+ if (res.data.message2 == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ this.cancel();
+ } else if (res.data.message2 == 500) {
+ this.$message.error(this.$t('There are currently tasks'));
+ }
+ else if (res.data.message2 == 300) {
+ this.$message.error(this.$t('There is no such glass'));
+ }
+ else if (res.data.message2 == 400) {
+ this.$message.error(this.$t('There is no such grid'));
+ }
+ });
+ } else {
+ this.$message.error(this.$t('There are currently tasks'));
}
- else if(res.data.message2 == 300) {
- this.$message.success("There is no such glass");
- }
- else if(res.data.message2 == 400) {
- this.$message.success("There is no such grid");
- }
- });
+ }
}
},
- showform() {
- if (this.glassid != "") {
- this.form =
- {
- orderno: "NG2210210",
- length: 800,
- width: 1000,
- coating: "red",
- };
- this.dialogFormVisible = true;
+ //鏄剧ず纭鐜荤拑淇℃伅涔熸病
+ showform(buttons) {
+ if (buttons == 1) {
+ this.confirm1 = true;
+ this.confirm2 = false;
+ } else if (buttons == 2) {
+ this.confirm1 = false;
+ this.confirm2 = true;
}
+ //鏍规嵁杈撳叆鐨勭幓鐠僫d鑾峰彇鐜荤拑淇℃伅
+ SelectGlassByGlassID(this.glassid).then(res => {
+ if (res.data.form != null) {
+ this.form = res.data.form;
+ this.dialogFormVisible = true;
+ this.$message.success(this.$t('query was successful'));
+ } else {
+ this.dialogFormVisible = true;
+ this.$message.error(this.$t('There is no such glass'));
+ }
+ });
},
+ //鏄剧ず璁㈠崟淇℃伅椤甸潰
showform1() {
if (this.order != "") {
this.form1 =
@@ -492,24 +775,84 @@
};
this.dialogFormVisible1 = true;
}
-
-
},
- cancal() {
- this.dialogFormVisible = false;
- this.form = {};
+ //鏄剧ず鎵爜浣嶅拰涓婄墖浣�
+ showform3(){
+ this.dialogFormVisible5 = true;
},
- cancal1() {
- this.dialogFormVisible1 = false;
- this.form1 = {};
- },
- endtask(type, glassid, cell) {
- UpdateTask(type, glassid, cell).then(res => {
- if (res.data.message3 == 200) {
- this.$message.success("Operation successful");
+ //鑾峰彇鎵爜浣嶅拰涓婄墖浣嶆暟鎹�
+ SelectGlassByGlassIDs() {
+ this.showform3();
+ SelectGlassByGlassID(this.glassid1).then(res => {
+ if (res.data.form != null) {
+ this.form4 = res.data.form;
+ this.$message.success(this.$t('query was successful'));
+ } else {
+ this.$message.error(this.$t('There is no such glass'));
+ }
+ if (this.form2.glassId == "") {
+ this.disabled = false;
+ } else {
+ this.disabled = true;
}
});
},
+ selectglassinfo() {
+ SelectGlass(this.orderid).then(res => {
+ this.GlassInfo = res.data.glass;
+ });
+ },
+ showform2() {
+ SelectGlass(this.orderid).then(res => {
+ this.GlassInfo = res.data.glass;
+ });
+ this.dialogFormVisible4 = true;
+ },
+ //鍙栨秷鎿嶄綔鏃跺叧闂〉闈�
+ cancel() {
+ this.dialogFormVisible = false;
+ this.form = {
+ orderId: "",
+ glassId: "",
+ height: "",
+ width: ""
+ };
+ },
+ //鍙栨秷鎿嶄綔鏃跺叧闂〉闈�
+ cancel1() {
+ this.dialogFormVisible1 = false;
+ this.form1 = {};
+ },
+ cancel3() {
+ this.dialogFormVisible5 = false;
+ this.form1 = {};
+ },
+ //缁撴潫杩�/鍑虹墖浠诲姟
+ endtask(type, glassid, cell) {
+ this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+ 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) {
+ UpdateTask(type, glassid, cell).then(res => {
+ if (res.data.message3 == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ } else {
+ this.$message.error(this.$t('Password error'));//瀵嗙爜閿欒
+ }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
+ });
+ });
+ },
+ //鏄剧ず鐞嗙墖绗艰鎯呬俊鎭�
showcageinfo(cage) {
this.cage = cage;
SelectCageInfo(cage).then(res => {
@@ -517,32 +860,141 @@
this.dialogFormVisible3 = true;
});
},
+ //鍒犻櫎鐞嗙墖绗肩幓鐠�
deleteglass(glassid, state) {
- if (state == 1) {
- DeleteByGlassID(glassid).then(res => {
- if (res.data.message3 == 200) {
- this.$message.success("Operation successful");
+ this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+ 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) {
+ if (state == 1) {
+ DeleteByGlassID(glassid).then(res => {
+ if (res.data.message3 == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ } else {
+ this.$message.error(this.$t('No delete allowed'));
}
- });
- } 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");
- }
- });
- } else {
- this.$message.success("No out allowed");
- }
- }
+ } else {
+ this.$message.error(this.$t('Password error'));//瀵嗙爜閿欒
+ }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
+ });
+ });
+ },
+ //鎵嬪姩鍑虹墖
+ outglass(glassid, state) {
+ this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+ 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) {
+ if (state == 1) {
+ OutByGlassID(glassid).then(res => {
+ if (res.data.message3 == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ else if (res.data.message2 == 300) {
+ this.$message.error(this.$t('There is no such grid'));
+ }
+ else if (res.data.message2 == 500) {
+ this.$message.error(this.$t('This glass is already in the cage'));
+ }
+ });
+ } else {
+ this.$message.error(this.$t('No out allowed'));
+ }
+ } else {
+ this.$message.error(this.$t('Password error'));//瀵嗙爜閿欒
+ }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
+ });
+ });
+ },
+ //鎵嬪姩寰�鐞嗙墖绗兼坊鍔犵幓鐠�
+ insertglass(cage, cell, tier) {
+ this.$prompt(this.$t('Are you sure to perform this operation ?'), this.$t('prompt'), {
+ 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) {
+ this.insertcage = cage;
+ this.insertcell = cell;
+ this.inserttier = tier;
+ this.showform(2);
+ } else {
+ this.$message.error(this.$t('Password error'));//瀵嗙爜閿欒
+ }
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
+ });
+ });
+ },
+ //鎵嬪姩涓婄墖
+ FeedInglassid() {
+ Inglassid(this.insertcage, this.insertcell, this.inserttier, this.form).then(res => {
+ if (this.form.glassId != "") {
+ if (res.data.message == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ this.dialogFormVisible = false;
+ } else {
+ this.$message.error(this.$t('This glass is already in the cage'));
+ }
+ } else {
+ this.$message.error(this.$t('There is no such glass'));
+ }
+
+ });
+ },
+ //鍚敤//鐞嗙墖绗肩鐢�
+ UpdateDisabled(cage, cell, disabled) {
+ Disabled(cage, cell, disabled).then(res => {
+ if (res.data.message == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ },
+ handleEdit(index, row) {
+ console.log(index, row);
+ },
+ //琛ㄦ牸鍒犻櫎
+ handleDelete(index, row) {
+ console.log(index, row);
+ },
+ //鏀瑰彉姣忛〉瀹圭撼鐨勬暟鎹噺
+ handleSizeChange: function (size) {
+ this.pagesize = size;
+ },
+ //鍒囨崲椤电爜
+ handleCurrentChange: function (currentPage) {
+ this.currentPage = currentPage;
+ },
+ InsertQueueGlass() {
+ InsertQueueGlassId(this.glassid1).then(res => {
+ if (res.data.message == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ }
}
}
-
-
-
</script>
\ No newline at end of file
--
Gitblit v1.8.0