| | |
| | | <style>
|
| | | * {
|
| | | margin: 0;
|
| | | padding: 0;
|
| | | margin: 0;
|
| | | padding: 0;
|
| | | }
|
| | |
|
| | | .occupy {
|
| | | height: 100%;
|
| | | width: 10%;
|
| | | background-color: white;
|
| | | margin: 0px 8px 0px 8px;
|
| | | border: 1px #EBEEF5 solid;
|
| | | text-align: center;
|
| | | padding: 5px;
|
| | | height: 100%;
|
| | | width: 10%;
|
| | | background-color: white;
|
| | | margin: 0px 8px 0px 8px;
|
| | | border: 1px #EBEEF5 solid;
|
| | | text-align: center;
|
| | | padding: 5px;
|
| | | }
|
| | |
|
| | | .el-col {
|
| | | margin-top: 4px;
|
| | | margin-top: 4px;
|
| | | }
|
| | |
|
| | | .biao {
|
| | | font-size: 12px;
|
| | | font-size: 12px;
|
| | | }
|
| | |
|
| | | .zhi {
|
| | | font-size: 18px;
|
| | | font-weight: bold;
|
| | | font-size: 18px;
|
| | | font-weight: bold;
|
| | | }
|
| | |
|
| | | .el-main {
|
| | | padding: 3px;
|
| | | min-height: 40vh;
|
| | | padding: 3px;
|
| | | min-height: 40vh;
|
| | | }
|
| | |
|
| | | .el-footer {
|
| | | max-height: 60vh;
|
| | | padding: 0px;
|
| | | margin: 0px;
|
| | | max-height: 60vh;
|
| | | padding: 0px;
|
| | | margin: 0px;
|
| | | }
|
| | |
|
| | | .green {
|
| | | background-color: green;
|
| | | background-color: green;
|
| | | }
|
| | |
|
| | | .blue {
|
| | | background-color: blue;
|
| | | background-color: blue;
|
| | | }
|
| | |
|
| | | .red {
|
| | | background-color: red;
|
| | | background-color: red;
|
| | | }
|
| | |
|
| | | .yellow {
|
| | | background-color: yellow;
|
| | | background-color: yellow;
|
| | | }
|
| | |
|
| | | .black {
|
| | | background-color: black;
|
| | | background-color: black;
|
| | | }
|
| | |
|
| | | .gezi {
|
| | | height: 35px;
|
| | | height: 35px;
|
| | |
|
| | | position: absolute;
|
| | | width: 3.08px;
|
| | | /* width: 4.22px; */
|
| | | position: absolute;
|
| | | width: 3.08px;
|
| | | /* width: 4.22px; */
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | .blocks {
|
| | |
|
| | |
|
| | | background-image: url('../../img/xmjclzh.png');
|
| | | margin: 0 auto;
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | width: 1660px;
|
| | | min-height: 55vh;
|
| | | max-width: 94vw;
|
| | | background-size: 1200px 510px;
|
| | | /* max-width: 100vw;
|
| | | background-image: url('../../img/xmjc.png');
|
| | | margin: 0 auto;
|
| | | background-repeat: no-repeat;
|
| | | 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-attachment: local;
|
| | | width: 32px;
|
| | | position: absolute;
|
| | | background-image: url('../../img/bigcar01.png');
|
| | | background-size: 40px 87px;
|
| | | /* background-size: 46px 94px; */
|
| | | height: 100px;
|
| | | max-width: 100vw;
|
| | | background-repeat: no-repeat;
|
| | | background-attachment: local;
|
| | | width: 32px;
|
| | | position: absolute;
|
| | | 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;
|
| | | 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;
|
| | | 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: 5px 0;
|
| | | padding: 5px 0;
|
| | | }
|
| | |
|
| | | .el-table__empty-block {
|
| | | min-height: 41px;
|
| | | min-height: 41px;
|
| | | }
|
| | |
|
| | | .el-table__empty-text {
|
| | | line-height: 41px;
|
| | | line-height: 41px;
|
| | | }
|
| | |
|
| | | .box {
|
| | | width: 90%;
|
| | | margin-left: 5%;
|
| | | color: red;
|
| | | font-size: 12px;
|
| | | overflow: hidden;
|
| | | height: 20px;
|
| | | /* height: 35px; */
|
| | | width: 90%;
|
| | | margin-left: 5%;
|
| | | color: red;
|
| | | font-size: 12px;
|
| | | overflow: hidden;
|
| | | height: 20px;
|
| | | /* height: 35px; */
|
| | | }
|
| | |
|
| | | .text {
|
| | | width: auto;
|
| | | width: auto;
|
| | |
|
| | | white-space: nowrap;
|
| | | animation: textScroll 20s linear infinite;
|
| | | margin: 0 auto;
|
| | | line-height: 20px;
|
| | | /* line-height: 35px; */
|
| | | white-space: nowrap;
|
| | | animation: textScroll 20s linear infinite;
|
| | | margin: 0 auto;
|
| | | line-height: 20px;
|
| | | /* line-height: 35px; */
|
| | | }
|
| | |
|
| | | @keyframes textScroll {
|
| | | 0% {
|
| | | transform: translateX(100%);
|
| | | }
|
| | | 0% {
|
| | | transform: translateX(100%);
|
| | | }
|
| | |
|
| | | 100% {
|
| | | transform: translateX(-150%);
|
| | | }
|
| | | 100% {
|
| | | transform: translateX(-150%);
|
| | | }
|
| | | }
|
| | |
|
| | | .el-dialog {
|
| | | width: 90%;
|
| | | width: 90%;
|
| | | }
|
| | | </style>
|
| | | <template>
|
| | | <el-container>
|
| | | <!-- <el-header style="padding: 10px;"></el-header> -->
|
| | | <el-main>
|
| | | <div class="box" @click="dialogFormVisible2 = true">
|
| | | <div class="text">
|
| | | <!-- 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(1)">{{ $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 :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(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 :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(0, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | </div>
|
| | | <div style="padding: 10px;display: flex;height:85px;">
|
| | | <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">{{ $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">{{ $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: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>
|
| | | <!-- <div style="display:flex;position: absolute;float:left;z-index: 999;top:112px;left:328px;">
|
| | | <el-container>
|
| | | <!-- <el-header style="padding: 10px;"></el-header> -->
|
| | | <el-main>
|
| | | <div class="box" @click="dialogFormVisible2 = true">
|
| | | <div class="text">
|
| | | <!-- 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(1)">{{ $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 :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(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 :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(0, scope.row.glassId, scope.row.cell)">{{ $t('end task') }}</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | </div>
|
| | | <div style="padding: 10px;display: flex;height:85px;">
|
| | | <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">{{ $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">{{ $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: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 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">
|
| | |
|
| | | </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.orderId" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item :label="$t('length')">
|
| | | <el-input v-model="form.height" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item :label="$t('width')">
|
| | | <el-input v-model="form.width" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <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="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="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')">
|
| | | <el-input v-model="form1.order" autocomplete="off" />
|
| | | </el-form-item>
|
| | | <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="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
|
| | | <el-button @click="cancel1()">{{ $t('cancel') }}</el-button>
|
| | | </span>
|
| | | </template>
|
| | | </el-dialog>
|
| | | <el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')">
|
| | | <el-table :data="this.alarm" border style="width: 100%;">
|
| | | <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="$t('Cage Details')" top="5vh">
|
| | | <el-table :data="this.cageinfo" :height="700" border style="width: 100%;overflow: auto;">
|
| | | <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="this.GlassInfo" :height="700" border style="width: 100%;overflow: auto;">
|
| | |
|
| | | <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)">query</el-button>
|
| | | </el-form-item>
|
| | | <el-form-item :label="$t('order')">
|
| | | <el-input v-model="form.orderId" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item :label="$t('length')">
|
| | | <el-input v-model="form.height" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <el-form-item :label="$t('width')">
|
| | | <el-input v-model="form.width" readonly autocomplete="off" />
|
| | | </el-form-item>
|
| | | <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="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="cancal()">{{ $t('cancal') }}</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')">
|
| | | <el-input v-model="form1.order" autocomplete="off" />
|
| | | </el-form-item>
|
| | | <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="getOrder();" type="primary">{{ $t('confirm') }}</el-button>
|
| | | <el-button @click="cancal1()">{{ $t('cancal') }}</el-button>
|
| | | </span>
|
| | | </template>
|
| | | </el-dialog>
|
| | | <el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')">
|
| | | <el-table :data="this.alarm" border style="width: 100%;">
|
| | | <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="$t('Cage Details')" top="5vh">
|
| | | <el-table :data="this.cageinfo" :height="700" border style="width: 100%;overflow: auto;">
|
| | | <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-container>
|
| | | <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-dialog>
|
| | | </el-container>
|
| | | </template>
|
| | | <script>
|
| | | //: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
|
| | | home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo,
|
| | | SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist, SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass
|
| | | } from "../../api/home";
|
| | |
|
| | |
|
| | | import LanguageMixin from '../../lang/LanguageMixin'
|
| | | let socket;
|
| | | export default {
|
| | | 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,
|
| | | form: {
|
| | | orderId: "",
|
| | | glassId: "",
|
| | | height: "",
|
| | | width: ""
|
| | | },
|
| | | form1: {
|
| | | order: "NG2210210",
|
| | | number: 800,
|
| | | },
|
| | | alarm: [],
|
| | | tableData: [],
|
| | | cagelist1: [],
|
| | | cagelist2: [],
|
| | | cagelist3: [],
|
| | | cagelist4: [],
|
| | | task1: 3,
|
| | | task2: 2,
|
| | | tasklist1: [],
|
| | | tasklist2: [],
|
| | | order: "",
|
| | | glassid: "",
|
| | | url: "../../img/bigcar01.png",
|
| | | car1: 145,
|
| | | car2: 210,
|
| | | // car1: 210,
|
| | | // car2: 300,
|
| | | cageinfo: [],
|
| | | cage: 0,
|
| | | carlist: [],
|
| | | loadglassheight: 0,
|
| | | password: 1,
|
| | | text: "",
|
| | | zhuangtai: ""
|
| | | };
|
| | | },
|
| | | created () {
|
| | | this.load();
|
| | | this.init();
|
| | | },
|
| | | methods: {
|
| | | init () {
|
| | | let viewname = "Home";
|
| | |
|
| | | if (typeof (WebSocket) == "undefined") {
|
| | | console.log("您的浏览器不支持WebSocket");
|
| | | } else {
|
| | | //console.log("您的浏览器支持WebSocket");
|
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
|
| | | if (socket != null) {
|
| | | socket.close();
|
| | | socket = null;
|
| | | }
|
| | | // 开启一个websocket服务
|
| | | socket = new WebSocket(socketUrl);
|
| | | //打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | 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,
|
| | | form: {
|
| | | orderId: "",
|
| | | glassId: "",
|
| | | height: "",
|
| | | width: ""
|
| | | },
|
| | | form1: {
|
| | | order: "NG2210210",
|
| | | number: 800,
|
| | | },
|
| | | alarm: [],
|
| | | tableData: [],
|
| | | cagelist1: [],
|
| | | cagelist2: [],
|
| | | cagelist3: [],
|
| | | cagelist4: [],
|
| | | task1: 3,
|
| | | task2: 2,
|
| | | tasklist1: [],
|
| | | tasklist2: [],
|
| | | order: "",
|
| | | glassid: "",
|
| | | url: "../../img/bigcar01.png",
|
| | | car1: 145,
|
| | | car2: 210,
|
| | | // car1: 210,
|
| | | // car2: 300,
|
| | | cageinfo: [],
|
| | | cage: 0,
|
| | | carlist: [],
|
| | | loadglassheight: 0,
|
| | | password: 1,
|
| | | text: "",
|
| | | zhuangtai: "",
|
| | | orderid: "",
|
| | | GlassInfo: []
|
| | | };
|
| | | // 浏览器端收消息,获得从服务端发送过来的文本消息
|
| | | socket.onmessage = function (msg) {
|
| | | },
|
| | | created() {
|
| | | this.load();
|
| | | this.init();
|
| | | },
|
| | | methods: {
|
| | | init() {
|
| | | let viewname = "Home";
|
| | |
|
| | | //console.log("收到数据====" + msg.data);
|
| | | let obj = JSON.parse(msg.data);
|
| | | if (obj.params != null) {
|
| | | 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];
|
| | | this.cagelist2 = obj.cagelist2[0];
|
| | | this.cagelist3 = obj.cagelist3[0];
|
| | | this.cagelist4 = obj.cagelist4[0];
|
| | | this.tasklist1 = obj.tasklist1[0];
|
| | | this.tasklist2 = obj.tasklist2[0];
|
| | | this.alarm = obj.alarmmg[0];
|
| | | this.loadglassheight = obj.loadglassheight;
|
| | | this.zhuangtai = obj.zhuangtai[0];
|
| | | //if (obj.dbconnected == "false") {
|
| | | this.text = this.$t('DataBase Connection failed');
|
| | | // }
|
| | | SelectCageInfo(this.cage).then(res => {
|
| | | this.cageinfo = res.data.cageinfo;
|
| | | });
|
| | | if (typeof (WebSocket) == "undefined") {
|
| | | console.log("您的浏览器不支持WebSocket");
|
| | | } else {
|
| | | //console.log("您的浏览器支持WebSocket");
|
| | | let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
|
| | | if (socket != null) {
|
| | | socket.close();
|
| | | socket = null;
|
| | | }
|
| | | // 开启一个websocket服务
|
| | | socket = new WebSocket(socketUrl);
|
| | | //打开事件
|
| | | socket.onopen = function () {
|
| | | console.log("websocket已打开");
|
| | | };
|
| | | // 浏览器端收消息,获得从服务端发送过来的文本消息
|
| | | socket.onmessage = function (msg) {
|
| | |
|
| | | this.$forceUpdate();
|
| | | //console.log("收到数据====" + msg.data);
|
| | | let obj = JSON.parse(msg.data);
|
| | | if (obj.params != null) {
|
| | | 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];
|
| | | this.cagelist2 = obj.cagelist2[0];
|
| | | this.cagelist3 = obj.cagelist3[0];
|
| | | this.cagelist4 = obj.cagelist4[0];
|
| | | this.tasklist1 = obj.tasklist1[0];
|
| | | this.tasklist2 = obj.tasklist2[0];
|
| | | this.alarm = obj.alarmmg[0];
|
| | | this.loadglassheight = obj.loadglassheight;
|
| | | this.zhuangtai = obj.zhuangtai[0];
|
| | | //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;
|
| | | });
|
| | |
|
| | | }.bind(this);
|
| | | //关闭事件
|
| | | socket.onclose = function () {
|
| | | console.log("websocket已关闭");
|
| | | };
|
| | | //发生了错误事件
|
| | | socket.onerror = function () {
|
| | | console.log("websocket发生了错误");
|
| | | }
|
| | | }
|
| | | },
|
| | | 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;
|
| | | });
|
| | | },
|
| | | //根据格子状态修改颜色
|
| | | getStatusClass (state) {
|
| | | if (state == 0) {
|
| | | return "gezi";
|
| | | } else if (state == 1) {
|
| | | return "blue gezi";
|
| | | } else if (state == 2) {
|
| | | return "yellow gezi";
|
| | | } else if (state == 3) {
|
| | | return "red gezi";
|
| | | } else {
|
| | | return "black gezi";
|
| | | }
|
| | | },
|
| | | //按订单出片
|
| | | getOrder () {
|
| | | if (this.form1.order != "") {
|
| | | InsertOrder(this.order).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.dialogFormVisible1 = false;
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | this.$forceUpdate();
|
| | |
|
| | | } else {
|
| | | this.$message.error(this.$t('There is no glass for this order'));
|
| | | }
|
| | | this.load();
|
| | | });
|
| | | }
|
| | |
|
| | | },
|
| | | //手动上片
|
| | | sbumitglassid () {
|
| | | if (this.form.order != "") {
|
| | | 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.cancal();
|
| | | } 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'));
|
| | | }
|
| | | }
|
| | | }
|
| | | },
|
| | | showform (buttons) {
|
| | | if (buttons == 1) {
|
| | | this.confirm1 = true;
|
| | | this.confirm2 = false;
|
| | | } else if (buttons == 2) {
|
| | | this.confirm1 = false;
|
| | | this.confirm2 = true;
|
| | | }
|
| | | SelectGlassByGlassID(this.glassid).then(res => {
|
| | | if (res.data.form != null) {
|
| | | this.form = res.data.form;
|
| | | this.dialogFormVisible = true;
|
| | | this.$message.success('query was successful');
|
| | | } else {
|
| | | this.dialogFormVisible = true;
|
| | | this.$message.error(this.$t('There is no such glass'));
|
| | | }
|
| | | });
|
| | | },
|
| | | showform1 () {
|
| | | if (this.order != "") {
|
| | | this.form1 =
|
| | | {
|
| | | order: "NG2210210",
|
| | | number: 800,
|
| | | };
|
| | | this.dialogFormVisible1 = true;
|
| | | }
|
| | |
|
| | |
|
| | | },
|
| | | cancal () {
|
| | | this.dialogFormVisible = false;
|
| | | this.form = {
|
| | | orderId: "",
|
| | | glassId: "",
|
| | | height: "",
|
| | | width: ""
|
| | | };
|
| | | },
|
| | | cancal1 () {
|
| | | this.dialogFormVisible1 = 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'));
|
| | | }.bind(this);
|
| | | //关闭事件
|
| | | socket.onclose = function () {
|
| | | console.log("websocket已关闭");
|
| | | };
|
| | | //发生了错误事件
|
| | | socket.onerror = function () {
|
| | | console.log("websocket发生了错误");
|
| | | }
|
| | | }
|
| | | });
|
| | | } 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 => {
|
| | | this.cageinfo = res.data.cageinfo;
|
| | | this.dialogFormVisible3 = true;
|
| | | });
|
| | | },
|
| | | deleteglass (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) {
|
| | | DeleteByGlassID(glassid).then(res => {
|
| | | if (res.data.message3 == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }
|
| | | },
|
| | | load() {
|
| | | //加载笼子使用情况数据
|
| | | home().then(res => {
|
| | | this.tableData = res.data.list;
|
| | | });
|
| | | } else {
|
| | | this.$message.error(this.$t('No delete allowed'));
|
| | | }
|
| | | } else {
|
| | | this.$message.error(this.$t('Password error'));//密码错误
|
| | | }
|
| | | //加载理片笼玻璃数据
|
| | | 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;
|
| | | });
|
| | | //加载进出片任务数据
|
| | | 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;
|
| | | });
|
| | | },
|
| | | //根据格子状态修改颜色
|
| | | getStatusClass(state) {
|
| | | if (state == 0) {
|
| | | return "gezi";
|
| | | } else if (state == 1) {
|
| | | return "blue gezi";
|
| | | } else if (state == 2) {
|
| | | return "yellow gezi";
|
| | | } else if (state == 3) {
|
| | | return "red gezi";
|
| | | } else {
|
| | | return "black gezi";
|
| | | }
|
| | | },
|
| | | //按订单出片
|
| | | getOrder() {
|
| | | if (this.form1.order != "") {
|
| | | InsertOrder(this.order).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.dialogFormVisible1 = false;
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | |
|
| | | }).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('There is no glass for this order'));
|
| | | }
|
| | | this.load();
|
| | | });
|
| | | }
|
| | |
|
| | | },
|
| | | //手动上片
|
| | | sbumitglassid() {
|
| | | if (this.form.order != "") {
|
| | | 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'));
|
| | | }
|
| | | }
|
| | | }
|
| | | },
|
| | | //显示确认玻璃信息也没
|
| | | showform(buttons) {
|
| | | if (buttons == 1) {
|
| | | this.confirm1 = true;
|
| | | this.confirm2 = false;
|
| | | } else if (buttons == 2) {
|
| | | this.confirm1 = false;
|
| | | this.confirm2 = true;
|
| | | }
|
| | | //根据输入的玻璃id获取玻璃信息
|
| | | SelectGlassByGlassID(this.glassid).then(res => {
|
| | | if (res.data.form != null) {
|
| | | this.form = res.data.form;
|
| | | this.dialogFormVisible = true;
|
| | | this.$message.success('query was successful');
|
| | | } else {
|
| | | this.dialogFormVisible = true;
|
| | | this.$message.error(this.$t('There is no such glass'));
|
| | | }
|
| | | });
|
| | | } 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) {
|
| | | // 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'));
|
| | | // }
|
| | | // });
|
| | | 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'));
|
| | | },
|
| | | //显示订单信息页面
|
| | | showform1() {
|
| | | if (this.order != "") {
|
| | | this.form1 =
|
| | | {
|
| | | order: "NG2210210",
|
| | | number: 800,
|
| | | };
|
| | | this.dialogFormVisible1 = 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;
|
| | | } else {
|
| | | this.$message.error(this.$t('This glass is already in the cage'));
|
| | | }
|
| | | } else {
|
| | | this.$message.error(this.$t('There is no such glass'));
|
| | | }
|
| | | this.form = {
|
| | | orderId: "",
|
| | | glassId: "",
|
| | | height: "",
|
| | | width: ""
|
| | | };
|
| | | },
|
| | | //取消操作时关闭页面
|
| | | cancel1() {
|
| | | this.dialogFormVisible1 = 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 => {
|
| | | this.cageinfo = res.data.cageinfo;
|
| | | this.dialogFormVisible3 = true;
|
| | | });
|
| | | },
|
| | | //删除理片笼玻璃
|
| | | deleteglass(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) {
|
| | | 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.error(this.$t('Password error'));//密码错误
|
| | | }
|
| | |
|
| | | });
|
| | | },
|
| | | UpdateDisabled (cage, cell, disabled) {
|
| | | Disabled(cage, cell, disabled).then(res => {
|
| | | if (res.data.message == 200) {
|
| | | this.$message.success(this.$t('Operation successful'));
|
| | | }).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'));
|
| | | }
|
| | | });
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | | </script> |