<style>
|
.started-row {
|
background-color: red;
|
}
|
|
* {
|
margin: 0;
|
padding: 0;
|
}
|
|
.occupy {
|
height: 50%;
|
width: 45%;
|
background-color: white;
|
margin: 0px 8px 0px 8px;
|
border: 1px #EBEEF5 solid;
|
text-align: center;
|
padding: 5px;
|
}
|
|
.el-col {
|
margin-top: 4px;
|
}
|
|
.biao {
|
font-size: 12px;
|
}
|
|
.zhi {
|
font-size: 18px;
|
font-weight: bold;
|
}
|
|
.el-main {
|
padding: 3px;
|
min-height: 40vh;
|
}
|
|
.el-footer {
|
max-height: 60vh;
|
padding: 0px;
|
margin: 0px;
|
}
|
|
.green {
|
background-color: green;
|
}
|
|
.blue {
|
background-color: blue;
|
}
|
|
|
.yellow {
|
background-color: yellow;
|
}
|
|
.black {
|
background-color: black;
|
}
|
|
.gezi {
|
height: 35px;
|
|
position: absolute;
|
width: 3.08px;
|
/* width: 4.22px; */
|
}
|
|
.blocks {
|
background-image: url('../../img/device.png');
|
/* margin: 0 auto; */
|
/* clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); */
|
background-repeat: no-repeat;
|
background-attachment: local;
|
min-height: 118vh;
|
width: 1124px;
|
max-width: 57%;
|
background-size: 1050px 1400px;
|
margin-top: -280px;
|
overflow: hidden;
|
/* width: 1660px;
|
max-width: 100vw;
|
background-size: 1660px 560px; */
|
|
|
}
|
|
.blocks-img {
|
height: 900px;
|
max-width: 100vw;
|
background-repeat: no-repeat;
|
background-attachment: local;
|
width: 1200px;
|
position: absolute;
|
background-image: url('../../img/car.png');
|
background-size: 800px 1200px;
|
}
|
|
.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: 501px;
|
top: 333px;
|
/* background-size: 85px 100px;
|
left: 912px;
|
top: 366px; */
|
}
|
|
/* .orderbutton1 {
|
position: absolute;
|
left: 1070px;
|
top: 70px;
|
}
|
|
.orderbutton2 {
|
position: absolute;
|
left: 500px;
|
top: -10px;
|
} */
|
.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: 477px;
|
top: 420px;
|
/* background-size: 160px 40px;
|
left: 875px;
|
top: 455px; */
|
}
|
|
.el-table td,
|
.el-table th {
|
padding: 5px 0;
|
}
|
|
.el-table__empty-block {
|
min-height: 41px;
|
}
|
|
.el-table__empty-text {
|
line-height: 41px;
|
}
|
|
.box {
|
width: 90%;
|
margin-left: 5%;
|
color: red;
|
font-size: 12px;
|
overflow: hidden;
|
height: 20px;
|
/* height: 35px; */
|
}
|
|
.text {
|
width: auto;
|
|
white-space: nowrap;
|
animation: textScroll 20s linear infinite;
|
margin: 0 auto;
|
line-height: 20px;
|
/* line-height: 35px; */
|
}
|
|
@keyframes textScroll {
|
0% {
|
transform: translateX(100%);
|
}
|
|
100% {
|
transform: translateX(-150%);
|
}
|
}
|
|
.el-dialog {
|
width: 90%;
|
}
|
|
.el-message-box__message {
|
font-size: 27px;
|
}
|
|
.el-message-box {
|
height: 200px;
|
width: 600px;
|
}
|
|
.el-button--small {
|
font-size: 25px;
|
}
|
|
/*
|
@media screen and (min-width: 1900px) {
|
.blocks {
|
transform: scale(1.5, 1.05);
|
width: 1210px;
|
}
|
} */
|
|
.el-message-box__btns {
|
padding: 0px 15px 0;
|
text-align: right;
|
}
|
|
.hide {
|
display: none;
|
}
|
|
.el-table .cell {
|
display: flex;
|
/* height: 30px;
|
line-height: 30px; */
|
}
|
|
.device {
|
font-weight: bold;
|
width: 25px;
|
height: 72px;
|
line-height: 72px;
|
color: white;
|
font-size: 12px;
|
position: absolute;
|
}
|
|
.glass {
|
font-weight: bold;
|
font-size: 12px;
|
width: 105px;
|
height: 15px;
|
position: absolute;
|
}
|
|
/*
|
|
*/
|
#fileinput .container {
|
width: 800px;
|
margin: 0 auto;
|
}
|
|
#fileinput .header {
|
display: flex;
|
justify-content: space-between;
|
margin-bottom: 10px;
|
}
|
|
#fileinput table {
|
width: 100%;
|
border-collapse: collapse;
|
border: 1px solid;
|
}
|
|
#fileinput tr,
|
#fileinput th,
|
#fileinput td {
|
border: 1px solid #000;
|
padding: 5px;
|
}
|
|
#fileinput button {
|
border: none;
|
padding: 5px;
|
background-color: #00a297;
|
color: #fff;
|
border-radius: 5px;
|
cursor: pointer;
|
margin: 0 5px;
|
}
|
|
#fileinput tr:nth-child(2n) {
|
background-color: #dcdcdc;
|
}
|
|
#fileinput .hide {
|
display: none;
|
}
|
|
#fileinput .c1 {
|
position: fixed;
|
top: 0;
|
bottom: 0;
|
left: 0;
|
right: 0;
|
background: rgba(0, 0, 0, .5);
|
z-index: 2;
|
}
|
|
#fileinput .c2 {
|
background-color: white;
|
position: fixed;
|
width: 400px;
|
height: 300px;
|
top: 50%;
|
left: 50%;
|
z-index: 3;
|
margin-top: -150px;
|
margin-left: -200px;
|
}
|
|
.cells {
|
height: 100%;
|
}
|
|
.custom-row-class {
|
background-color: rgb(150, 238, 234) !important;
|
}
|
|
.file-upload input[type="file"] {
|
display: none;
|
}
|
|
.file-upload label {
|
padding: 11px;
|
background-color: #409EFF;
|
border-radius: 3px;
|
color: white;
|
display: inline-block;
|
cursor: pointer;
|
}
|
|
.bold-center {
|
font-weight: bold;
|
text-align: center;
|
}
|
|
.el-table .el-table__body-wrapper tr {
|
height: 40px;
|
/* 设置每行的高度为 30px */
|
line-height: 30px;
|
}
|
|
/* 出片队列显示表 */
|
</style>
|
<template>
|
<el-container>
|
<!-- <el-header style="padding: 10px;"></el-header> -->
|
<el-main>
|
<el-dialog :visible.sync="dialogFormVisible2" :title="$t('Alarm Information')">
|
<el-table :data="this.alarm" border style="width: 100%;font-size: 25px;">
|
<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>
|
</el-dialog>
|
<div class="box" @click="dialogFormVisible2 = true" style="z-index: 999;">
|
<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-button type="primary" @click="showform(1)" :disabled="SoftEmergencyStopState" style="z-index: 999;"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('Import order') }}</el-button>
|
|
<el-button type="primary" @click="showform(2)" :disabled="SoftEmergencyStopState" style="z-index: 999;"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('Measure') }}</el-button>
|
|
<el-button type="primary" @click="showform(3)" :disabled="SoftEmergencyStopState" style="z-index: 999;"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('StorageCage') }}</el-button>
|
<el-button type="primary" @click="showform(4)" :disabled="SoftEmergencyStopState" style="z-index: 999;"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('Task queue') }}</el-button>
|
|
<el-button type="primary" @click="showform(5)" :disabled="SoftEmergencyStopState" style="z-index: 999;"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('Outing Queue') }}</el-button>
|
|
</div>
|
<div style="display: flex;align-items: center;overflow: hidden;">
|
<div class="blocks" style="position: relative;width: 100%;">
|
<div class="blocks-img" :style="'z-index:999;left:150px;top:' + carposition + 'px;'">
|
|
</div>
|
<div
|
:style="'position: absolute;z-index:99;left:271px;top:987px;width:210px;height:38px;background-color:' + ShowDeviceList(0) + ';'">
|
</div>
|
<div
|
:style="'position: absolute;z-index:1000;left:553px;top:' + (400 + carposition) + 'px;width:110px;height:88px;background-color:' + ShowDeviceList(0) + ';'">
|
</div>
|
<div
|
:style="'position: absolute;z-index:99;left:800px;top:450px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';'">
|
</div>
|
<div
|
:style="'position: absolute;z-index:99;left:800px;top:675px;width:115px;height:30px;background-color:' + ShowDeviceList(0) + ';'">
|
</div>
|
<div :style="'position: absolute;z-index:99;left:740px;top:507px;width:230px;height:114px;'">
|
<div v-for="item in cagelist4" :key="item['id']"
|
:style="'display:flex;height:4.55px;position: relative;'">
|
<div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' +
|
((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'">
|
</div>
|
</div>
|
</div>
|
<div :style="'position: absolute;z-index:100;left:740px;top:730px;width:230px;height:90px;'">
|
<div v-for="item in cagelist3" :key="item['id']"
|
:style="'display:flex;height:2.25px;position: relative;'">
|
<div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' +
|
((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'">
|
</div>
|
</div>
|
</div>
|
<div :style="'position: absolute;z-index:100;left:740px;top:830px;width:230px;height:90px;'">
|
<div v-for="item in cagelist2" :key="item['id']"
|
:style="'display:flex;height:2.25px;position: relative;'">
|
<div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' +
|
((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'">
|
</div>
|
</div>
|
</div>
|
<div :style="'position: absolute;z-index:100;left:740px;top:930px;width:230px;height:90px;'">
|
<div v-for="item in cagelist1" :key="item['id']"
|
:style="'display:flex;height:2.25px;position: relative;'">
|
<div class="cells" v-for="(num) in item['number']" :key="num" :style="'width: ' + (item['glassWidth'] * 0.046) + 'px;background-color:' + ShowCellList(1) + ';position: absolute;left:' +
|
((item['glassWidth'] * 0.046 * (num - 1)) + ((num - 1) * 5)) + 'px;'">
|
</div>
|
</div>
|
</div>
|
</div>
|
<div>
|
<div style="padding: 10px;display: flex;height: 300px;flex-wrap: wrap;">
|
<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;height: 70px;">
|
<span class="biao">{{ $t('Usage') }}</span><span class="zhi">{{ item['width'] }}%</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['cell']
|
}}</span>
|
</el-col>
|
</div>
|
</div>
|
<el-table :data="this.tasklist1" border style="width: 730px;">
|
<el-table-column prop="mateid" :label="$t('Mateid')" width="70"></el-table-column>
|
<el-table-column prop="storageCage.cage" :label="$t('Start bit')" width="70"></el-table-column>
|
<el-table-column prop="storageCage.cell" :label="$t('Target bit')"></el-table-column>
|
<el-table-column prop="storageCage.glassWidth" :label="$t('Width')"
|
width="70"></el-table-column>
|
<el-table-column prop="storageCage.glassHeight" :label="$t('Height')"
|
width="70"></el-table-column>
|
<el-table-column prop="storageCage.thickness" :label="$t('Thickness')"
|
width="50"></el-table-column>
|
<el-table-column prop="storageCage.tier" :label="$t('Tier')" width="50"></el-table-column>
|
<el-table-column prop="storageCage.films" :label="$t('Films')" width="70"></el-table-column>
|
|
<el-table-column :min-width="120" :label="$t('Terminate Task')">
|
<template slot-scope='scope'>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
@click="FinishTask(scope.row.id)">{{ $t('Complete') }}</el-button>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
@click="TerminateTask(scope.row.id)">{{ $t('Terminate') }}</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<el-table :data="this.tasklist2" border style="width: 100%">
|
<el-table-column prop="mateid" :label="$t('Mateid')" width="70"></el-table-column>
|
<el-table-column prop="storageCage.cage" :label="$t('Start bit')" width="70"></el-table-column>
|
<el-table-column prop="storageCage.cell" :label="$t('Target bit')"></el-table-column>
|
<el-table-column prop="storageCage.glassWidth" :label="$t('Width')"
|
width="70"></el-table-column>
|
<el-table-column prop="storageCage.glassHeight" :label="$t('Height')"
|
width="70"></el-table-column>
|
<el-table-column prop="storageCage.thickness" :label="$t('Thickness')"
|
width="50"></el-table-column>
|
<el-table-column prop="storageCage.tier" :label="$t('Tier')" width="50"></el-table-column>
|
<el-table-column prop="storageCage.films" :label="$t('Films')" width="70"></el-table-column>
|
<el-table-column :min-width="120" :label="$t('Terminate Task')">
|
<template slot-scope='scope'>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
@click="FinishTask(scope.row.id)">{{ $t('Complete') }}</el-button>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
@click="TerminateTask(scope.row.id)">{{ $t('Terminate') }}</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</div>
|
|
|
</el-main>
|
<el-dialog :visible.sync="Importorder" :title="$t('Import order')" top="5vh">
|
<!--文件导入数据页面-->
|
<div id="" class="container">
|
<div class="header">
|
<div class="btn">
|
|
|
<div class="file-upload">
|
<!-- 保存 -->
|
<el-button type="primary" @click="importData()"
|
style="margin-right: 10px;margin-bottom: 10px;">{{
|
$t('Save') }}</el-button>
|
<input type="file" id="file-upload" multiple @change="Change" />
|
<label for="file-upload">{{ $t('Select file') }}</label>
|
</div>
|
|
</div>
|
</div>
|
<!-- 此处更改接收的表头名字prop="" -->
|
<el-table :data="this.dataList" border style="width: 100%;">
|
<el-table-column prop="Customer" :label="$t('Customer')"></el-table-column>
|
<el-table-column prop="order" :label="$t('Order')"></el-table-column>
|
<el-table-column prop="base" :label="$t('Width')"></el-table-column>
|
<el-table-column prop="height" :label="$t('Height')"></el-table-column>
|
<el-table-column prop="thickness" :label="$t('Thickness')"></el-table-column>
|
<el-table-column prop="films" :label="$t('Films')"></el-table-column>
|
<el-table-column prop="quantity" :label="$t('number')"></el-table-column>
|
<el-table-column prop="tier" :label="$t('Tier')"></el-table-column>
|
<el-table-column prop="matching" :label="$t('Matching')"></el-table-column>
|
<el-table-column prop="glasstype" :label="$t('Glasstype')"></el-table-column>
|
<el-table-column prop="productname" :label="$t('Productname')"></el-table-column>
|
</el-table>
|
</div>
|
</el-dialog>
|
|
<el-dialog :visible.sync="Measure" :title="$t('Measure')" top="5vh"><!--测量页面-->
|
<!--测量页面主体-->
|
<div style="height: 760px;">
|
<!--功能-->
|
<div>
|
<el-button type="primary" @click="ManualMatching()" :disabled="(this.LastQueue.state > 3)"
|
style="z-index: 999;">{{ $t('Manual matching') }}</el-button>
|
<el-button type="primary" @click="ManualTake()" :disabled="(this.LastQueue.state > 3)"
|
style="z-index: 999;">{{
|
$t('Manual removal') }}</el-button>
|
<el-button type="primary" @click="AnewMeasure()" style="z-index: 999;">{{
|
$t('Remeasure') }}</el-button>
|
<!-- 输入下拉框1 -->
|
<!-- SelectSetting -->
|
<label for="file-upload" style="font-weight: bold;font-size: 16px;margin-left: 50px;">{{ $t('Films')
|
}}:{{ SelectSetting.films }}</label>
|
<el-select v-model="selectedValue1" :placeholder="$t('Films')">
|
<el-option v-for="item in selectedOption1.films" :key="item.value" :label="item.films"
|
:value="item.films">
|
</el-option>
|
</el-select>
|
<!-- 输入下拉框2 -->
|
<label for="file-upload" style="font-weight: bold;font-size: 16px;">{{ $t('Thickness')
|
}}:{{ SelectSetting.thickness }}mm</label>
|
<el-select v-model="selectedValue2" :placeholder="$t('Thickness')">
|
<el-option v-for="item in selectedOption2.thickness" :key="item.value" :label="item.thickness"
|
:value="item.thickness">
|
</el-option>
|
</el-select>
|
<el-button type="primary" @click="SaveMeasure(selectedValue1, selectedValue2)"
|
style="z-index: 999;">{{
|
$t('Save') }}</el-button>
|
</div>
|
<br>
|
<!--显示-->
|
<div style="width:900px;height: 720px;border: 2px solid #d1d1d1;float: left;">
|
<!--玻璃图 #81b337-->
|
<div
|
:style="'top:10px;bottom: 10px;left: 10px;right: 10px;margin:'
|
+ ((720 - (this.LastQueue.glassheight / 25 * 7)) / 2) + 'px auto;width:'
|
+ (this.LastQueue.glasswidth / 25 * 7) + 'px;height:'
|
+ (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' : 'red')) + ';text-align: center;font-size:50px'">
|
<div>
|
{{ $t('Measure') }}
|
</div>
|
<div>
|
{{ $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>
|
<!--显示-->
|
<div style="width:20px;height: 720px;float: left;"></div>
|
<div style="width:700px;height: 720px;border: 2px solid #d1d1d1;float: left;">
|
<!--玻璃图 #81b337 padding: 50px 50px;-->
|
<!-- <span class="measuretitle">{{ $t('Width') }}:</span> <span class="measureValue">{{
|
this.LastQueue.glasswidth
|
}}</span> <span class="measureUnit">mm</span>
|
<br>
|
<span class="measuretitle">{{ $t('Height') }}:</span> <span class="measureValue">{{
|
this.LastQueue.glassheight }}</span> <span class="measureUnit">mm</span>
|
<br>
|
|
<span class="measuretitle">{{ $t('Measure Width') }}:</span> <span class="measureValue">{{
|
this.LastQueue.glasswidthmm }}</span> <span class="measureUnit">mm</span>
|
<br>
|
<span class="measuretitle">{{ $t('Measure Height') }}:</span> <span class="measureValue">{{
|
this.LastQueue.glassheightmm }}</span> <span class="measureUnit">mm</span>
|
<br>
|
<span class="measuretitle">{{ $t('Matching results') }}:</span> <span class="measureValue">{{
|
this.LastQueue.state > 0 ? $t('Matching successful') :
|
(this.LastQueue.state == 0 ? $t('Multiple data matching') : $t('Matching failed')) }}</span>
|
<br> -->
|
<el-table :data="this.tasklist3" :height="700" :row-class-name="rowClassName"
|
style="width: 100%;padding:0;">
|
<el-table-column prop="flowcard" :label="$t('Order')"></el-table-column>
|
<el-table-column prop="mateid" :label="$t('Mateid')"></el-table-column>
|
<el-table-column prop="tier" :label="$t('Tier')" width="50"></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>
|
<el-table-column prop="thickness" :label="$t('Thickness')"></el-table-column>
|
<el-table-column prop="number" :label="$t('Number')"></el-table-column>
|
<el-table-column prop="measurenumber" :label="$t('MeasureNumber')"></el-table-column>
|
</el-table>
|
</div>
|
|
</div>
|
</el-dialog>
|
|
<el-dialog :visible.sync="StorageCage" :title="$t('StorageCage')" top="5vh">
|
<el-table :data="this.StorageCageInfo" :height="700" border style="width: 100%;overflow: auto;"
|
:span-method="spanMethod" class="bold-center">
|
<el-table-column :min-width="80" prop="cage" :label="$t('Cage No')"></el-table-column>
|
<el-table-column :min-width="80" prop="cell" :label="$t('Slot No')"></el-table-column>
|
<el-table-column :min-width="80" prop="flowcard" :label="$t('Order')"></el-table-column>
|
<el-table-column :min-width="80" prop="customer" :label="$t('Customer')"></el-table-column>
|
<el-table-column :min-width="80" prop="glassWidth" :label="$t('Width')"></el-table-column>
|
<el-table-column :min-width="80" prop="glassHeight" :label="$t('Height')"></el-table-column>
|
<el-table-column :min-width="80" prop="thickness" :label="$t('Thickness')"></el-table-column>
|
<el-table-column :min-width="80" prop="films" :label="$t('Films')"></el-table-column>
|
<el-table-column :min-width="80" prop="number" :label="$t('number')"></el-table-column>
|
<el-table-column :min-width="80" prop="tier" :label="$t('Tier')"></el-table-column>
|
<el-table-column :min-width="80" prop="mateid" :label="$t('Mateid')"></el-table-column>
|
<!-- <el-table-column :min-width="80" prop="width" :label="$t('Width')"></el-table-column> -->
|
<el-table-column :min-width="250" :label="$t('Operate')">
|
<template slot-scope='scope'>
|
<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('Disable') : $t('Enable') }}</el-button>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
:disabled="(scope.row.width < scope.row.glassWidth + 300 ? true : false)"
|
@click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, 1)">{{ $t('Add')
|
}}
|
</el-button>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
:disabled="scope.row.number >= 1 ? false : true"
|
@click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, -1)">{{ $t('Reduce')
|
}}</el-button>
|
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
:disabled="scope.row.number >= 1 ? false : true"
|
@click="UpdateStroageCageByCell(scope.row.cell, scope.row.number, 0)">{{ $t('Delete')
|
}}</el-button>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
:disabled="scope.row.number >= 1 ? false : true"
|
@click="AddOutGlass(scope.row.cell, scope.row.glasstype)">{{ $t('OutGlass')
|
}}</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-dialog>
|
<!-- 任务队列显示表 -->
|
<el-dialog :visible.sync="Taskqueue" :title="$t('Task queue')" top="5vh">
|
<el-table :data="tableData1" style="width: 100%;margin-bottom: 20px;" row-key="id" border lazy
|
:tree-props="{ children: 'glassinfo', hasChildren: 'hasChildren' }">
|
<el-table-column prop="flowcard" :label="$t('Order')" width="150" align="center">
|
<template slot-scope='scope'>
|
<div>
|
{{ scope.row.flowcard }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="customer" :label="$t('Customer')" width="150" align="center">
|
<template slot-scope='scope'>
|
<div>
|
{{ scope.row.customer }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="mateid" :label="$t('Mateid')" align="center">
|
</el-table-column>
|
<el-table-column prop="tier" :label="$t('Tier')" width="50" align="center">
|
</el-table-column>
|
<el-table-column prop="number" :label="$t('Number')" width="50" align="center">
|
</el-table-column>
|
<el-table-column prop="cageno" :label="$t('Cage GlassNumber')" align="center">
|
</el-table-column>
|
<el-table-column prop="finishnumber" :label="$t('Finish No')" align="center">
|
</el-table-column>
|
<el-table-column prop="films" :label="$t('Films')" align="center">
|
</el-table-column>
|
<el-table-column prop="thickness" :label="$t('Thickness')" align="center">
|
</el-table-column>
|
<el-table-column prop="width" :label="$t('Width')" align="center">
|
</el-table-column>
|
<el-table-column prop="height" :label="$t('Height')" align="center">
|
</el-table-column>
|
<el-table-column prop="state" :label="$t('Task State')" align="center">
|
<template slot-scope='scope'>
|
<div
|
:style="{ backgroundColor: scope.row.state === 0 ? '' : '#00FFFF', width: '105%', height: '125%', lineHeight: '50px' }">
|
{{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Stop') : $t('Start') : "" }}
|
</div>
|
</template>
|
</el-table-column>
|
<!-- <el-table-column prop="state" :label="$t('Task State')" align="center">
|
<template slot-scope='scope'>
|
{{ scope.row.state >= 0 ? scope.row.state == 0 ? $t('Stop') : $t('Start') : "" }}
|
</template>
|
</el-table-column> -->
|
<el-table-column prop="method" :label="$t('Task Method')" align="center">
|
<template slot-scope='scope'>
|
<div style="text-align: center;width: 105%;">
|
{{ scope.row.state >= 0 ? (scope.row.method == 0 ? $t('Out') : $t('All Out')) : "" }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="line" :label="$t('Task Line')">
|
</el-table-column>
|
<el-table-column width="420" :label="$t('Operate')">
|
|
<template slot-scope='scope'>
|
<el-select v-model="selected[scope.$index]" :placeholder="$t('Line')"
|
style="min-width: 70px; max-width: 70px;" v-show="scope.row.state >= 0 ? true : false">
|
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
v-show="scope.row.state >= 0 ? true : false"
|
@click="StartChange(scope.row.flowcard, scope.row.orderstate)">
|
{{ scope.row.orderstate > 0 ? $t('stop work') : $t('start work') }}</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;margin-left: 6px;"
|
v-show="scope.row.state >= 0 ? true : false"
|
@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="deleteTasks(scope.row.flowcard)">
|
{{ $t('langDelete') }}</el-button>
|
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-dialog>
|
|
<!-- 出片队列显示表 -->
|
<el-dialog :visible.sync="Outqueue" top="5vh" style="height: 100%; overflow-y: auto;">
|
<!-- //出片记录 -->
|
<label style="font-weight: bold; font-size: 18px;">{{ $t('Out Records') }}</label>
|
<el-table :data="OutLog" style="width: 100%;margin-bottom: 20px;" row-key="id" border lazy>
|
<el-table-column prop="id" :label="$t('Task Id')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.id }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="flowcard" :label="$t('Order')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.flowcard }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="customer" :label="$t('Customer')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.customer }}
|
</div>
|
</template>
|
</el-table-column>
|
|
<el-table-column prop="tier" :label="$t('Tier')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.tier }}
|
</div>
|
</template>
|
</el-table-column>
|
|
<el-table-column prop="thickness" :label="$t('Thickness')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.thickness }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="width" :label="$t('Width')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.width }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="height" :label="$t('Height')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.height }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="cell" :label="$t('Slot No')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.cell }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="films" :label="$t('Films')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.films }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="mateid" :label="$t('Mateid')" align="center">
|
<template slot-scope="scope">
|
<div
|
:style="{ backgroundColor: scope.row.state === 0 ? '#00FFFF' : '', width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.mateid }}
|
</div>
|
</template>
|
</el-table-column>
|
|
</el-table>
|
<label style="font-weight: bold; font-size: 18px;">{{ $t('Outing Queue') }}</label>
|
|
<!-- //出片队列 -->
|
<el-table :data="OutTask" style="width: 100%;margin-bottom: 20px;" row-key="id" border lazy>
|
<el-table-column prop="id" :label="$t('Task Id')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.id }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="flowcard" :label="$t('Order')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.flowcard }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="customer" :label="$t('Customer')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.customer }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="tier" :label="$t('Tier')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.tier }}
|
</div>
|
</template>
|
</el-table-column>
|
|
<el-table-column prop="thickness" :label="$t('Thickness')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.thickness }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="width" :label="$t('Width')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.width }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="height" :label="$t('Height')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.height }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="films" :label="$t('Films')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.films }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="cell" :label="$t('Slot No')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.cell }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="mateid" :label="$t('Mateid')" align="center">
|
<template slot-scope="scope">
|
<div :style="{ width: '105%', height: '100%', lineHeight: '38px' }">
|
{{ scope.row.mateid }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column prop="task_state" :label="$t('Task State')" align="center">
|
<template slot-scope='scope'>
|
<div
|
:style="{ backgroundColor: scope.row.state === 0 ? '#00FFFF' : '', width: '105%', height: '100%%', lineHeight: '38px' }">
|
{{ scope.row.state == 0 ? $t('Waiting') : $t('Suspend') }}
|
</div>
|
</template>
|
</el-table-column>
|
<el-table-column width="250" :label="$t('Operate')">
|
<template slot-scope='scope'>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;height:42px;width: 70px;"
|
v-show="scope.row.state >= 0 ? true : false"
|
@click="UpdateOutTask(scope.row.id, scope.row.state)">
|
{{ scope.row.state == 0 ? $t('Suspend') : $t('Start') }}</el-button>
|
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;height:42px;width: 70px;"
|
v-show="scope.row.state >= 0 ? true : false" @click="DeleteOutTask(scope.row.id)">
|
{{ $t('langDelete') }}</el-button>
|
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-dialog>
|
<!-- 人工匹配 -->
|
<el-dialog :visible.sync="StorageCageAdd" :title="$t('StorageCageAdd')" top="5vh" width="80%">
|
<div style="display: flex;height: 40px;line-height: 40px;">
|
<label for="">{{ $t('Width') }}</label>
|
<el-input v-model="StorageCageForm.glasswidthmm" autocomplete="off" style="width:15%;" />
|
<label for="">{{ $t('Height') }}</label>
|
<el-input v-model="StorageCageForm.glassheightmm" autocomplete="off" style="width:15%;" />
|
<label for="">{{ $t('Thickness') }}</label>
|
<el-input v-model="StorageCageForm.thickness" autocomplete="off" style="width:15%;" />
|
<label for="">{{ $t('Films') }}</label>
|
<el-input v-model="StorageCageForm.films" autocomplete="off" style="width:15%;" />
|
<label for="">{{ $t('Tier') }}</label>
|
<el-input v-model="StorageCageForm.tier" autocomplete="off" style="width:15%;" />
|
<el-button @click="SelectGlassInfo()" type="primary">
|
{{ $t('Select') }}</el-button>
|
</div>
|
<el-table :data="this.StorageCageAddInfo" :height="700" border style="width: 100%;overflow: auto;">
|
<el-table-column prop="flowcard" :label="$t('Order')"></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>
|
<el-table-column prop="thickness" :label="$t('Thickness')"></el-table-column>
|
<el-table-column prop="films" :label="$t('Films')"></el-table-column>
|
<el-table-column prop="tier" :label="$t('Tier')"></el-table-column>
|
<el-table-column prop="mateid" :label="$t('Mateid')"></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="StorageCageAddGlass(scope.$index)">
|
{{ $t('Add') }}</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-dialog>
|
|
</el-container>
|
</template>
|
<script>
|
|
import {
|
home, SelectCageInfo,
|
Disabled, SelectPermissionByUserName, currentUsername, CompleteQueue,
|
isAllowReorderings,
|
|
UpdateStroageCageByCell, AddOutGlass, FinishTask, TerminateTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue, importData, ManualTake, AnewMeasure, StartChange, UpdateOutTask, DeleteOutTask, deleteTasks, SaveMeasure
|
} from "../../api/home";
|
|
|
import LanguageMixin from '../../lang/LanguageMixin';
|
import * as XLSX from "../../../node_modules/xlsx/xlsx.mjs";
|
let socket;
|
export function debounce(func, wait = 300) {
|
let timeout;
|
return function (...args) {
|
clearTimeout(timeout); // 清除上次的定时器
|
timeout = setTimeout(() => func.apply(this, args), wait); // 设置一个新的定时器
|
};
|
}
|
export default {
|
name: "Home",
|
data() {
|
return {
|
carposition: 0,
|
// selected: [],
|
selected: Array.from({ length: 1000 }, () => 1),
|
selected2: Array.from({ length: 1000 }, () => 1),
|
selected3: Array.from({ length: 1000 }, () => 1),
|
// selected: '1',
|
options: [{
|
value: '1',
|
label: '1'
|
}],
|
// 测量下拉框膜系
|
selectedOption1: {
|
films: [],
|
},
|
selectedOption2: {
|
thickness: [],
|
},
|
// selectedOption1: [films],
|
// selectedOption2: [thickness],
|
|
selectedValue1: null, // 用于存储第一个下拉框的选中值
|
selectedValue2: null, // 用于存储第二个下拉框的选中值
|
// 将值赋给 selectedValue1 和 selectedValue2
|
|
|
dataList: [],
|
tableData1: [],
|
tableData2: [],
|
OutTask: [],
|
OutLog: [],
|
Measuermode: false,
|
confirm1: false,
|
confirm2: false,
|
insertcage: 0,
|
insertcell: 0,
|
inserttier: 0,
|
name: 'Confirm',
|
mixins: [LanguageMixin],
|
dialogFormVisible: false,
|
dialogFormVisible1: false,
|
dialogFormVisible2: false,
|
Importorder: false,
|
Measure: false,
|
StorageCage: false,
|
Taskqueue: false,
|
Outqueue: false,
|
StorageCageAdd: false,
|
StorageCageInfo: [],
|
StorageCageForm: {
|
glasswidthmm: "",
|
glassheightmm: "",
|
thickness: "",
|
films: "",
|
tier: ""
|
},
|
StorageCageAddInfo: [],
|
TaskqueueInfo: [],
|
cell: "",
|
form1: {},
|
form2: {},
|
form3: {},
|
form4: {},
|
form5: {},
|
alarm: [],
|
tableData: [],
|
cagelist1: [],
|
cagelist2: [],
|
cagelist3: [],
|
cagelist4: [],
|
SelectMeasure: [],
|
SelectSetting: [],
|
task1: 3,
|
task2: 2,
|
tasklist1: [],
|
tasklist2: [],
|
tasklist3: [],
|
order: "",
|
glassid: "",
|
glassid1: "",
|
glassid2: "",
|
cageglassid: "",
|
url: "../../img/bigcar01.png",
|
car1: 145,
|
car2: 210,
|
// car1: 210,
|
// car2: 300,
|
cageinfo: [],
|
cage: 0,
|
carlist: [],
|
loadglassheight1: 0,
|
loadglassheight2: 0,
|
password: 1,
|
text: "",
|
zhuangtai: "",
|
orderid: "",
|
GlassInfo: [],
|
disabled: false,
|
disabled1: false,
|
currentPage: 1, //默认初始页
|
pagesize: 15, //每页默认显示的数据
|
pageCount: 0,
|
currentPages: 1, //默认初始页
|
pagesizes: 42, //每页默认显示的数据
|
pageCounts: 0,
|
OutSlice: [],
|
AluminumFrame: [],
|
framebarcode: "",
|
isAllowQueue: true,
|
isAllowReordering: true,
|
FrameNoFlag: "",
|
isConfirm: true,
|
ManuallyInfeedGlass: true,
|
OutingQueue: true,
|
OrderInfo: true,
|
CageDetails: true,
|
ClearGlassID: true,
|
StopTask: true,
|
SoftEmergencyStopState: true,
|
CountDowns: "0",
|
D01RequestState: false,
|
EmergencyStop: false,
|
PromptSize: 250,
|
reset: false,
|
isQueueWarning: false,
|
// CurrentFrame: [],
|
DeviceList: [1, 1, 1, 1],
|
GlassIdList: [],
|
Scanningmethod: true,
|
CurrrentGlassId: "",
|
LastQueue: {},
|
LastState: ["", this.$t('Matching successful'), this.$t('Multiple data matching'), this.$t('Matching failed')]
|
};
|
},
|
created() {
|
this.load();
|
|
|
},
|
activated() {
|
this.init();
|
}
|
,
|
|
methods: {
|
showform(i) {
|
if (i == 1) {
|
this.Importorder = true;
|
} else if (i == 2) {
|
this.Measure = true;
|
} else if (i == 3) {
|
this.StorageCage = true;
|
} else if (i == 4) {
|
this.Taskqueue = true;
|
} else if (i == 5) {
|
this.Outqueue = true;
|
}
|
},
|
init() {
|
let viewname = "Home";
|
if (typeof (WebSocket) == "undefined") {
|
console.log("您的浏览器不支持WebSocket");
|
} else {
|
//console.log("您的浏览器支持WebSocket");
|
let socketUrl = "ws://" + this.$t('ip') + ":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) {
|
// console.log("收到数据====" + msg.data);
|
let obj = JSON.parse(msg.data);
|
if (obj.carposition != null) {
|
this.carposition = obj.carposition[0];
|
}
|
// 获取设备状态
|
if (obj.DeviceList != null) {
|
this.DeviceList = obj.DeviceList[0];
|
}
|
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.tasklist3 = obj.glassInfoFlowCard[0];
|
this.tasklist2 = obj.StoragTaskeTaskFeed[0];
|
this.tasklist1 = obj.StoragTaskeTaskOut[0];
|
// console.log(obj.StoragTaskeTaskOut[0]);
|
|
this.SelectSetting = obj.SelectSetting[0];
|
this.selectedOption1.films = obj.SelectMeasure[0];
|
this.selectedOption2.thickness = obj.SelectMeasure[0];
|
// if(obj.StorageCageForm.length == 0){
|
// this.StorageCageForm.glasswidthmm = ""
|
// this.StorageCageForm.glassheightmm = ""
|
// this.StorageCageForm.films = ""
|
// this.StorageCageForm.thickness = ""
|
// }else{
|
// this.StorageCageForm = obj.StorageCageForm[0];
|
// }
|
|
// console.log(obj.StorageCageForm[0]);
|
|
|
//在这里写下拉选的v-for的名称
|
|
if (obj.alarmmg[0].length > 0) {
|
if (this.alarm.length > 0) {
|
if (this.alarm[this.alarm.length - 1].id != obj.alarmmg[0][obj.alarmmg[0].length - 1].id) {
|
this.alarm = obj.alarmmg[0];
|
this.dialogFormVisible2 = true;
|
}
|
} else {
|
this.alarm = obj.alarmmg[0];
|
this.dialogFormVisible2 = true;
|
}
|
} else {
|
this.alarm = obj.alarmmg[0];
|
this.dialogFormVisible2 = false;
|
}
|
|
this.tableData1 = obj.OrderTask[0];
|
this.OutTask = obj.OutTask[0];
|
this.OutLog = obj.OutLog[0];
|
|
|
|
this.tableData2 = obj.OrderTask[0];
|
this.LastQueue = obj.LastQueue[0];
|
|
//是否允许出片
|
this.isAllowQueue = obj.isAllowQueue[0];
|
//当前出片格子是否被禁用
|
this.isQueueWarning = obj.isQueueWarning[0];
|
//是否允许出片队列调序
|
this.isAllowReordering = obj.isAllowReordering[0];
|
//出片队列
|
if (this.isAllowReordering == true) {
|
this.OutSlice = obj.listoutslice[0];
|
}
|
//理片笼玻璃信息
|
if (this.dialogFormVisible3 == true) {
|
SelectCageInfo(this.cageglassid).then(res => {
|
this.cageinfo = res.data.cageinfo;
|
});
|
}
|
if (obj.StorageCageInfo != null) {
|
this.StorageCageInfo = obj.StorageCageInfo[0];
|
}
|
this.$forceUpdate();
|
|
}.bind(this);
|
|
//关闭事件
|
socket.onclose = function () {
|
console.log("websocket已关闭");
|
};
|
//发生了错误事件
|
socket.onerror = function () {
|
console.log("websocket发生了错误");
|
}
|
//跳转页面时关闭socket
|
this.$router.afterEach(function () {
|
socket.close();
|
});
|
}
|
},
|
|
load() {
|
//加载用户权限
|
currentUsername().then(res => {
|
SelectPermissionByUserName(res.data).then(res => {
|
res.data.permission.forEach(item => {
|
if (item.permissionId == "32" && item.state == 1) {
|
this.ManuallyInfeedGlass = false;
|
}
|
if (item.permissionId == "33" && item.state == 1) {
|
this.OutingQueue = false;
|
}
|
if (item.permissionId == "34" && item.state == 1) {
|
this.OrderInfo = false;
|
}
|
if (item.permissionId == "35" && item.state == 1) {
|
this.CageDetails = false;
|
}
|
if (item.permissionId == "37" && item.state == 1) {
|
this.ClearGlassID = false;
|
}
|
if (item.permissionId == "38" && item.state == 1) {
|
this.StopTask = false;
|
}
|
if (item.permissionId == "39" && item.state == 1) {
|
this.SoftEmergencyStopState = false;
|
}
|
});
|
});
|
|
});
|
//加载笼子使用情况数据
|
home().then(res => {
|
this.tableData = res.data.list;
|
});
|
//加载理片笼玻璃信息
|
SelectCageInfo("").then(res => {
|
this.cageinfo = res.data.cageinfo;
|
this.currentPages = 1;
|
});
|
|
},
|
//添加理片笼玻璃
|
StorageCageAddGlass(index) {
|
if (this.Measuermode == true) {
|
StorageCageAddGlass(this.cell, this.StorageCageAddInfo[index]).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
this.StorageCageAdd = false;
|
}
|
})
|
} else {
|
UpdateQueue(this.StorageCageAddInfo[index]).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
// this.StorageCageAdd = false;
|
} else {
|
this.$message.error(this.$t('The measuring table has glass'));
|
}
|
});
|
}
|
|
},
|
//领取/暂停任务
|
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) {
|
ModeChange(flowcard, method).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},//选择开始工程
|
StartChange(flowcard, orderstate) {
|
if (orderstate == 1) {
|
|
StartChange(flowcard, 0).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
} else {
|
StartChange(flowcard, 1).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
}
|
},
|
//开始/暂停出片队列
|
UpdateOutTask(id, state) {
|
console.log(id + " 状态" + state);
|
if (state == 0) {
|
state = 2
|
} else {
|
state = 0
|
}
|
UpdateOutTask(id, state).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
|
},
|
//删除工程
|
deleteTasks(flowcard) {
|
deleteTasks(flowcard).then(res => {
|
console.log("@" + flowcard + "@");
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
} else {
|
this.$message.error(this.$t('The glass for this order is still in the cage and cannot be deleted'));
|
}
|
});
|
},
|
// 防抖版的 DeleteOutTask 方法
|
//删除出片队列
|
debouncedDeleteOutTask: debounce(function (id) {
|
DeleteOutTask(id).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
} else {
|
this.$message.error(this.$t('Operation failed'));
|
}
|
});
|
}, 200), // 防抖延迟时间为 200 毫秒
|
|
// 修改原方法,调用防抖版的 DeleteOutTask
|
DeleteOutTask(id) {
|
// 调用防抖版本的 DeleteOutTask
|
this.debouncedDeleteOutTask(id);
|
},
|
|
//保存测量膜系的参数
|
SaveMeasure(films, thickness) {
|
console.log('Films:', films); // 打印 films
|
console.log('Thickness:', thickness); // 打印 thickness
|
SaveMeasure(films, thickness).then(res => {
|
if (res.data.message >= 1) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
//查询玻璃信息
|
SelectGlassInfo() {
|
// console.log(this.StorageCageForm.glasswidthmm);
|
// console.log(this.StorageCageForm.tier);
|
SelectGlassInfo(this.StorageCageForm.glasswidthmm, this.StorageCageForm.glassheightmm, this.StorageCageForm.thickness, this.StorageCageForm.films, this.StorageCageForm.tier).then(res => {
|
this.StorageCageAddInfo = res.data.StorageCageAddInfo;
|
})
|
},
|
//完成进/出片任务
|
FinishTask(id) {
|
FinishTask(id).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
//结束进/出片任务
|
TerminateTask(id) {
|
TerminateTask(id).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
|
//修改理片笼玻璃信息
|
UpdateStroageCageByCell(cell, nownum, num) {
|
// 调用防抖方法
|
this.debouncedUpdateStroageCageByCell(cell, nownum, num);
|
|
// if (nownum == null && num == 1) {
|
// this.StorageCageAdd = true;
|
// this.Measuermode = true;
|
// this.cell = cell;
|
// } else {
|
// if (nownum + num == 0) {
|
// num = 0;
|
// }
|
// UpdateStroageCageByCell(cell, num).then(res => {
|
// if (res.data.message3 == 200) {
|
// this.$message.success(this.$t('Operation successful'));
|
// }
|
// });
|
// }
|
|
},
|
// 防抖版的 UpdateStroageCageByCell 方法
|
debouncedUpdateStroageCageByCell: debounce(function (cell, nownum, num) {
|
if (nownum == null && num == 1) {
|
this.StorageCageAdd = true;
|
this.Measuermode = true;
|
this.cell = cell;
|
} else {
|
if (nownum + num == 0) {
|
num = 0;
|
}
|
UpdateStroageCageByCell(cell, num).then(res => {
|
if (res.data.message3 == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
}
|
}, 200), // 设置防抖的时间间隔为 200 毫秒
|
|
|
AddOutGlass(cell, glasstype) {
|
this.debouncedAddOutGlass(cell, glasstype);
|
// AddOutGlass(cell, glasstype).then(res => {
|
// if (res.data.message == 200) {
|
// this.$message.success(this.$t('Operation successful'));
|
// } else {
|
// this.$message.error(this.$t('Operation failed'));
|
// }
|
// });
|
|
},
|
debouncedAddOutGlass: debounce(function (cell, glasstype) {
|
AddOutGlass(cell, glasstype).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
} else {
|
this.$message.error(this.$t('Operation failed'));
|
}
|
});
|
}, 200), // 设置防抖的时间间隔为 200 毫秒
|
|
//启用//理片笼禁用
|
UpdateDisabled(cage, cell, disabled) {
|
Disabled(cage, cell, disabled).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
spanMethod({ rowIndex, columnIndex }) {
|
let zhi1 = this.StorageCageInfo[rowIndex].cage;
|
let zhi2 = 0;
|
if (rowIndex > 0) {
|
zhi2 = this.StorageCageInfo[rowIndex - 1].cage;
|
}
|
if (columnIndex === 0) { // 仅处理 cage 列
|
// console.log(columnIndex,rowIndex);
|
if (zhi1 != zhi2) {
|
const currentCage = this.StorageCageInfo[rowIndex].cage;
|
let span = { rowspan: 1, colspan: 1 };
|
|
// 检查后续行,找到相同的 cage 值
|
for (let i = rowIndex + 1; i < this.StorageCageInfo.length; i++) {
|
if (this.StorageCageInfo[i].cage === currentCage) {
|
span.rowspan++;
|
} else {
|
break;
|
}
|
}
|
return span;
|
} else {
|
return { rowspan: 0, colspan: 0 };
|
}
|
|
}
|
// 其他列保持默认,不合并
|
return { rowspan: 1, colspan: 1 };
|
},
|
//改变每页容纳的数据量
|
handleSizeChange: function (size) {
|
this.pagesize = size;
|
},
|
//切换页码
|
handleCurrentChange: function (currentPage) {
|
this.currentPage = currentPage;
|
},
|
//改变每页容纳的数据量
|
handleSizeChanges: function (size) {
|
this.pagesizes = size;
|
},
|
//切换页码
|
handleCurrentChanges: function (currentPage) {
|
this.currentPages = currentPage;
|
},
|
|
//是否允许出片队列排序
|
isAllowReorderings() {
|
isAllowReorderings(!this.isAllowReordering, this.OutSlice).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
})
|
},
|
//手动完成出片任务
|
CompleteQueue(id, frameid, glassid) {
|
CompleteQueue(id, frameid, glassid).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
//获取设备显示状态
|
ShowDeviceList(num) {
|
if (this.DeviceList != null && this.DeviceList.length > 0) {
|
|
if (this.DeviceList[num] == 0) {
|
return "";
|
} else if (this.DeviceList[num] == 1) {
|
return "rgba(0,128,0,0.5)";
|
} else if (this.DeviceList[num] == 2) {
|
return "rgba(255,0,0)";
|
}
|
}
|
},
|
//获取设备显示状态
|
ShowCellList(num) {
|
if (num == null) {
|
return "";
|
} else if (num > 0) {
|
return "gray";
|
// return "rgba(0,0,0,1)";
|
}
|
},
|
//获取设备玻璃id
|
ShowGlassIdList(num) {
|
if (this.GlassIdList != null && this.GlassIdList.length > 0) {
|
const specialChars = /[^\w\s]/g;
|
return this.GlassIdList[num].replace(specialChars, "");
|
}
|
},
|
//人工匹配
|
ManualMatching() {
|
this.StorageCageAdd = true;
|
this.SelectGlassInfo();
|
this.Measuermode = false;
|
},
|
//人工拿走
|
ManualTake() {
|
let s = "123";
|
ManualTake(s).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('The current data on the measuring console has been cleared'));
|
} else {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
})
|
},
|
//重新测量
|
AnewMeasure() {
|
let s = "123";
|
AnewMeasure(s).then(res => {
|
if (res.data.message == 200) {
|
console.log(res.data.message);
|
}
|
})
|
},
|
Change(event) {
|
// 获取到文件夹
|
let fileList = event.target.files;
|
// 如果数据不为空
|
if (fileList) {
|
// FileReader是一种异步文件读取机制,结合input:file可以很方便的读取本地文件。
|
let reader = new FileReader();
|
let file = fileList[0]; //拿到第一条数据
|
reader.readAsBinaryString(file)// 将文件以二进制形式读入页面
|
let _this = this //把data里的数据赋值给新的变量
|
// wb:wordbook 工作表
|
reader.addEventListener("load", function (e) {
|
|
var data = e.target.result; //读取成功后result中的数据
|
var wb = XLSX.read(data, { type: "binary" });
|
let sheetName = wb.SheetNames[0]; //是获取Sheets中第一个Sheet的名字
|
let sheets = wb.Sheets[sheetName];
|
let dataList2 = JSON.stringify(XLSX.utils.sheet_to_json(sheets));
|
let dataList3 = (JSON.parse(dataList2));
|
_this.dataList = dataList3;//赋值
|
//console.log(dataList2);
|
console.log(dataList3);
|
|
})
|
}
|
},
|
Add() {
|
|
},
|
importData() {
|
//let tbdata=JSON.stringify(this.dataList);
|
let tbdata = this.dataList;
|
console.log(tbdata);
|
importData(tbdata).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
this.dataList = null;
|
}
|
});
|
},
|
del() {
|
|
this.StorageCageAdd = true;
|
},
|
rowClassName({ row, rowIndex }) {
|
if (row.glasstype != 0 && row.glasstype == this.LastQueue.glasstype) {
|
console.log(rowIndex);
|
return 'custom-row-class';
|
} else {
|
return ''; // 返回空字符串表示不添加任何额外的类名
|
}
|
}
|
|
|
}
|
}
|
</script>
|