<style>
|
* {
|
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;
|
}
|
|
.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/xmjc.png');
|
margin: 0 auto;
|
background-repeat: no-repeat;
|
background-attachment: local;
|
min-height: 55vh;
|
width: 1400px;
|
max-width: 94vw;
|
background-size: 1200px 510px;
|
margin: 0 auto;
|
/* width: 1660px;
|
max-width: 100vw;
|
background-size: 1660px 560px; */
|
|
|
}
|
|
.blocks-img {
|
height: 88px;
|
line-height: 90px;
|
color: white;
|
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: 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;
|
}
|
|
.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;
|
}
|
</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: 9zz5%;margin: 0 auto;">
|
<el-button type="primary" @click="showform(1)" :disabled="SoftEmergencyStopState"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('Import order') }}</el-button>
|
<el-button type="primary" @click="showform(2)" :disabled="SoftEmergencyStopState"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('Measure') }}</el-button>
|
<el-button type="primary" @click="showform(2)" :disabled="SoftEmergencyStopState"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('StorageCage') }}</el-button>
|
<el-button type="primary" @click="showform(2)" :disabled="SoftEmergencyStopState"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('Task queue') }}</el-button>
|
</div>
|
<div>
|
<el-table :data="this.tasklist1" border style="width: 100%">
|
<el-table-column :min-width="180" prop="glassId" :label="$t('Outfeed glass barcode')"></el-table-column>
|
<el-table-column :min-width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
|
<el-table-column :min-width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
|
<el-table-column :min-width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
|
<el-table-column prop="orderId" :label="$t('List No')"></el-table-column>
|
<el-table-column prop="orderId" :label="$t('Box No')"></el-table-column>
|
<el-table-column :min-width="150" prop="lengthWidth" :label="$t('Dim')">
|
<template slot-scope='scope'>
|
{{ scope.row.glasswidthmm }}*{{ scope.row.glassheightmm }}
|
</template>
|
</el-table-column>
|
<el-table-column :label="$t('Terminate Task')">
|
<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('Terminate Task')
|
}}</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<el-table :data="this.tasklist2" border style="width: 100%">
|
<el-table-column :min-width="180" prop="glassId" :label="$t('Infeed glass barcode')"></el-table-column>
|
<el-table-column :min-width="130" prop="cage" :label="$t('Cage No')"></el-table-column>
|
<el-table-column :min-width="130" prop="cell" :label="$t('Slot No')"></el-table-column>
|
<el-table-column :min-width="130" prop="orderId" :label="$t('Order No')"></el-table-column>
|
<el-table-column prop="orderId" :label="$t('List No')"></el-table-column>
|
<el-table-column prop="orderId" :label="$t('Box No')"></el-table-column>
|
<el-table-column :min-width="150" prop="lengthWidth" :label="$t('Dim')">
|
<template slot-scope='scope'>
|
{{ scope.row.glasswidthmm }}*{{ scope.row.glassheightmm }}
|
</template>
|
</el-table-column>
|
|
<el-table-column :label="$t('Terminate Task')">
|
<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('Terminate 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-dialog :visible.sync="Importorder" :title="$t('Importorder')"
|
top="5vh">
|
</el-dialog>
|
<el-dialog :visible.sync="Measure" :title="$t('Measure')"
|
top="5vh">
|
</el-dialog>
|
<el-dialog :visible.sync="StorageCage" :title="$t('StorageCage')"
|
top="5vh">
|
</el-dialog>
|
<el-dialog :visible.sync="Taskqueue" :title="$t('Taskqueue')"
|
top="5vh">
|
</el-dialog>
|
<!-- <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: 28 + 'px', left: 1050 + 'px', height: loadglassheight1 + 'px', width: 4 + 'px' }">
|
</div>
|
<div class="blue gezi"
|
:style="{ display: 'flex', position: 'absolute', float: 'left', top: 105 + 'px', left: 1050 + 'px', height: loadglassheight2 + 'px', width: 4 + 'px' }">
|
</div>
|
|
<div class="blocks-img2"></div>
|
<div class="blocks-img3"></div>
|
|
<div class="device" :style="'top: 25px;left: 1027px;background-color: ' + ShowDeviceList(0) + ';'">D01</div>
|
<div class="device" :style="'top: 105px;left: 1027px;background-color: ' + ShowDeviceList(1) + ';'">D02
|
</div>
|
<div class="device" :style="'top: 102px;left: 605px;background-color: ' + ShowDeviceList(2) + ';'">B01</div>
|
<div class="device" :style="'top: 102px;left: 197px;background-color: ' + ShowDeviceList(3) + ';'">B02</div>
|
<div class="blocks-img" :style="'left:' + car2 + 'px;top:175px;background-color:' + ShowDeviceList(4) + ''">
|
A01</div>
|
<div class="blocks-img" :style="'left:' + car1 + 'px;top:16px;background-color:' + ShowDeviceList(5) + ''">
|
A02</div>
|
<div class="device" :style="'top: 108px;left: 150px;background-color: ' + ShowDeviceList(6) + ';'">D03</div>
|
<div class="device" :style="'top: 185px;left: 150px;background-color: ' + ShowDeviceList(7) + ';'">D04</div>
|
<div class="device" :style="'top: 262px;left: 150px;background-color: ' + ShowDeviceList(8) + ';'">D05</div>
|
<div class="device" :style="'top: 339px;left: 150px;background-color: ' + ShowDeviceList(9) + ';'">D06</div>
|
|
<div class="device" :style="'top: 395px;left: 90px;background-color: ;'">E01</div>
|
<div class="device" :style="'top: 395px;left: 243px;background-color: ;'">E02</div>
|
<div class="device" :style="'top: 395px;left: 395px;background-color: ;'">E03</div>
|
<div class="device" :style="'top: 345px;left: 655px;background-color: ;'">E04</div>
|
<div class="device" :style="'top: 345px;left: 810px;background-color: ;'">E05</div>
|
<div class="device" :style="'top: 345px;left: 960px;background-color: ;'">E06</div>
|
|
<div class="device" :style="'top: 345px;left: 525px;background-color: ;'">J01</div>
|
<div class="device" :style="'top: 345px;left: 1100px;background-color: ;'">F01</div>
|
<div class="device" :style="'top: 275px;left: 1100px;background-color: ;'">G01</div>
|
|
<div class="glass D01" style="top: 39px;left: 1055px;position: absolute;">{{ ShowGlassIdList(0) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 0)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
<div class="glass D02" style="top: 117px;left: 1055px;position: absolute;">{{ ShowGlassIdList(1) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.2', 1)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
<div class="glass B01" style="top: 270px;left: 640px;position: absolute;">
|
B01:{{ ShowGlassIdList(2) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.2', 2)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
<div class="glass B02" style="top: 315px;left: 640px;position: absolute;">B02:{{ ShowGlassIdList(3) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.3', 3)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
<div class="glass A01" style="top: 270px;left: 289px;position: absolute;">
|
A01.1:{{ ShowGlassIdList(4) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 4)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
|
<div class="glass A01" style="top: 315px;left: 289px;position: absolute;">A01.2:{{ ShowGlassIdList(5) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.0', 5)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
|
<div class="glass A02" style="top: 360px;left: 289px;position: absolute;">A02:{{ ShowGlassIdList(6) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.10.1', 6)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
|
<div class="glass D03" style="top: 122px;left: 42px;position: absolute;">
|
{{ ShowGlassIdList(7) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.4', 7)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
<div class="glass D04" style="top: 198px;left: 42px;position: absolute;">
|
{{ ShowGlassIdList(8) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 8)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
<div class="glass D05" style="top: 275px;left: 42px;position: absolute;">
|
{{ ShowGlassIdList(9) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.6', 9)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
<div class="glass D06" style="top: 352px;left: 42px;position: absolute;">
|
{{ ShowGlassIdList(10) }}
|
<br />
|
<el-button type="primary" size="mini" @click="ClearGlassId('DB101.9.5', 10)">
|
{{ $t('Clear') }}</el-button>
|
</div>
|
</div>
|
</el-footer> -->
|
</el-container>
|
</template>
|
<script>
|
|
import {
|
home, home2, UpdateTask, SelectCageInfo, DeleteByGlassID,
|
SelectPassword, Disabled, AddOutSliceS, SelectPermissionByUserName, currentUsername, CompleteQueue,
|
isAllowReorderings, WriteGlassID, ClearGlassId, CloseForm7, SoftEmergencyStop, SwitchScanMethod
|
} 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,
|
Importorder:false,
|
Measure:false,
|
StorageCage:false,
|
Taskqueue:false,
|
form: {
|
orderId: "",
|
glassId: "",
|
height: "",
|
width: ""
|
},
|
form1: {},
|
form2: {},
|
form3: {},
|
form4: {},
|
form5: {},
|
alarm: [],
|
tableData: [],
|
cagelist1: [],
|
cagelist2: [],
|
cagelist3: [],
|
cagelist4: [],
|
task1: 3,
|
task2: 2,
|
tasklist1: [],
|
tasklist2: [],
|
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: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
GlassIdList: [],
|
Scanningmethod: true,
|
CurrrentGlassId: ""
|
};
|
},
|
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;
|
}
|
},
|
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.params != null) {
|
var zhi1 = obj.params[0][0];
|
var zhi2 = obj.params[0][1];
|
this.car1 = 145 + 8.15 * Math.abs(zhi1 - this.carlist[0]['start']) / Math.abs(this.carlist[0]['end'] - this.carlist[0]['start']) * 100;
|
this.car2 = 210 + 8.15 * Math.abs(zhi2 - 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.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;
|
});
|
}
|
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;
|
});
|
//加载理片笼玻璃数据
|
home2().then(res => {
|
this.cagelist1 = res.data.list1;
|
this.cagelist2 = res.data.list2;
|
this.cagelist3 = res.data.list3;
|
this.cagelist4 = res.data.list4;
|
});
|
//加载确认密码
|
SelectPassword().then(res => {
|
this.password = res.data.password;
|
});
|
},
|
|
//结束进/出片任务
|
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')
|
});
|
});
|
},
|
//删除理片笼玻璃
|
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'));//密码错误
|
}
|
|
}).catch(() => {
|
this.$message({
|
type: 'info',
|
message: this.$t('Operation canceled')
|
});
|
});
|
},
|
//启用//理片笼禁用
|
UpdateDisabled(cage, cell, disabled) {
|
Disabled(cage, cell, disabled).then(res => {
|
if (res.data.message == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
|
//改变每页容纳的数据量
|
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)";
|
}
|
}
|
},
|
//获取设备玻璃id
|
ShowGlassIdList(num) {
|
if (this.GlassIdList != null && this.GlassIdList.length > 0) {
|
const specialChars = /[^\w\s]/g;
|
return this.GlassIdList[num].replace(specialChars, "");
|
}
|
}
|
|
}
|
}
|
</script>
|