<style>
|
* {
|
margin: 0;
|
padding: 0;
|
}
|
|
.occupy {
|
height: 100%;
|
width: 20%;
|
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;
|
/* 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(3)" :disabled="SoftEmergencyStopState"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('StorageCage') }}</el-button>
|
<el-button type="primary" @click="showform(4)" :disabled="SoftEmergencyStopState"
|
:class="SoftEmergencyStopState == true ? 'hide' : ''">
|
{{ $t('Task queue') }}</el-button>
|
</div>
|
<div style="display: flex;align-items: center;">
|
<div class="blocks" style="position: relative;width: 100%;">
|
|
</div>
|
<div>
|
<div style="padding: 10px;display: flex;height:100px;">
|
<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-table :data="this.tasklist1" border style="width: 700px;">
|
<el-table-column prop="glasstype" :label="$t('Glasstype')"></el-table-column>
|
<el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column>
|
<el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column>
|
<el-table-column prop="storageCage.glassWidth" :label="$t('Width')"></el-table-column>
|
<el-table-column prop="storageCage.glassHeight" :label="$t('Height')"></el-table-column>
|
<el-table-column prop="storageCage.thickness" :label="$t('Thickness')"></el-table-column>
|
<el-table-column prop="storageCage.films" :label="$t('Films')"></el-table-column>
|
<el-table-column :min-width="100" :label="$t('Terminate Task')">
|
<template slot-scope='scope'>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
@click="FinishTask(0, scope.row.id)">{{ $t('Complete') }}</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
<el-table :data="this.tasklist2" border style="width: 100%">
|
<el-table-column prop="glassId" :label="$t('Glasstype')"></el-table-column>
|
<el-table-column prop="storageCage.cage" :label="$t('Cage No')"></el-table-column>
|
<el-table-column prop="storageCage.cell" :label="$t('Slot No')"></el-table-column>
|
<el-table-column prop="storageCage.glassWidth" :label="$t('Width')"></el-table-column>
|
<el-table-column prop="storageCage.glassHeight" :label="$t('Height')"></el-table-column>
|
<el-table-column prop="storageCage.thickness" :label="$t('Thickness')"></el-table-column>
|
<el-table-column prop="storageCage.films" :label="$t('Films')"></el-table-column>
|
|
<el-table-column :min-width="100" :label="$t('Terminate Task')">
|
<template slot-scope='scope'>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
@click="FinishTask(1, scope.row.id)">{{ $t('Complete') }}</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
</div>
|
|
|
</el-main>
|
<el-dialog :visible.sync="Importorder" :title="$t('Import order')" 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-table :data="this.StorageCageInfo" :height="700" border style="width: 100%;overflow: auto;">
|
<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="glasstype" :label="$t('GlassType')"></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="number" :label="$t('number')"></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 + 100 ? 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>
|
</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
|
default-expand-all :tree-props="{ children: 'glassinfo', hasChildren: 'hasChildren' }">
|
<el-table-column prop="flowcard" :label="$t('Order')">
|
</el-table-column>
|
<el-table-column prop="glasstype" :label="$t('GlassType')">
|
</el-table-column>
|
<el-table-column prop="number" :label="$t('Order No')">
|
</el-table-column>
|
<el-table-column prop="" :label="$t('No Of Cage')">
|
</el-table-column>
|
<el-table-column prop="finishnumber" :label="$t('Finish No')">
|
</el-table-column>
|
<el-table-column prop="mateid" :label="$t('Mate No')">
|
</el-table-column>
|
<el-table-column prop="films" :label="$t('Films')">
|
</el-table-column>
|
<el-table-column prop="thickness" :label="$t('Thickness')">
|
</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="state" :label="$t('Task State')">
|
<template slot-scope='scope'>
|
{{ scope.state == 0 ? $t('Start') : $t('Finished') }}
|
</template>
|
</el-table-column>
|
<el-table-column prop="method" :label="$t('Task Method')">
|
</el-table-column>
|
<el-table-column prop="line" :label="$t('Task Line')">
|
</el-table-column>
|
<el-table-column width="220" :label="$t('Operate')">
|
<template slot-scope='scope'>
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
v-show="scope.row.state >= 0 ? true : false"
|
@click="ClaimTasks(scope.row.flowcard, scope.row.state)">
|
{{ scope.row.status == '0' ? $t('Start Task') : $t('Stop Task') }}</el-button>
|
|
<el-button type="primary" style="padding: 4px 10px;font-size: 12px;"
|
v-show="scope.row.state >= 0 ? true : false"
|
@click="ModeChange(scope.row.flowcard, scope.row.method)">
|
{{ $t('Mode Change') }}</el-button>
|
</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.width" autocomplete="off" style="width:15%;" />
|
<label for="">{{ $t('Height') }}</label>
|
<el-input v-model="StorageCageForm.height" 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%;" />
|
<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('Flowcard')"></el-table-column>
|
<el-table-column prop="glasstype" :label="$t('GlassType')"></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 :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, home2, SelectCageInfo,
|
Disabled, SelectPermissionByUserName, currentUsername, CompleteQueue,
|
isAllowReorderings,
|
|
UpdateStroageCageByCell, FinishTask, SelectGlassInfo, StorageCageAddGlass, ClaimTasks, ModeChange, UpdateQueue
|
} from "../../api/home";
|
|
|
import LanguageMixin from '../../lang/LanguageMixin'
|
let socket;
|
export default {
|
name: "Home",
|
data() {
|
return {
|
tableData1:[],
|
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,
|
StorageCageAdd: false,
|
StorageCageInfo: [],
|
StorageCageForm: {
|
width: "",
|
height: "",
|
thickness: "",
|
films: ""
|
},
|
StorageCageAddInfo: [],
|
TaskqueueInfo: [],
|
cell: "",
|
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.tasklist2 = obj.StoragTaskeTaskFeed[0];
|
this.tasklist1 = obj.StoragTaskeTaskOut[0];
|
console.log(this.tasklist1);
|
this.alarm = obj.alarmmg[0];
|
|
this.tableData1 = obj.OrderTask[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;
|
});
|
//加载理片笼玻璃数据
|
home2().then(res => {
|
this.cagelist1 = res.data.list1;
|
this.cagelist2 = res.data.list2;
|
this.cagelist3 = res.data.list3;
|
this.cagelist4 = res.data.list4;
|
});
|
},
|
//添加理片笼玻璃
|
StorageCageAddGlass(index) {
|
if (this.Measuermode == true) {
|
StorageCageAddGlass(this.cell, this.StorageCageAddInfo[index]).then(res => {
|
if (res.data.code == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
})
|
} else {
|
UpdateQueue(this.StorageCageAddInfo[index]).then(res => {
|
if (res.data.code == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
}
|
|
},
|
//领取/暂停任务
|
ClaimTasks(flowcard, state) {
|
console.log(flowcard, state);
|
ClaimTasks(flowcard, state).then(res => {
|
if (res.data.code == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
//修改出片方式
|
ModeChange(flowcard, method) {
|
ModeChange(flowcard, method).then(res => {
|
if (res.data.code == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
//查询玻璃信息
|
SelectGlassInfo() {
|
SelectGlassInfo(this.StorageCageForm.width, this.StorageCageForm.height, this.StorageCageForm.thickness, this.StorageCageForm.films).then(res => {
|
this.StorageCageAddInfo = res.data.StorageCageAddInfo;
|
})
|
},
|
//完成进/出片任务
|
FinishTask(tasktype, id) {
|
FinishTask(tasktype, id).then(res => {
|
if (res.data.message3 == 200) {
|
this.$message.success(this.$t('Operation successful'));
|
}
|
});
|
},
|
//修改理片笼玻璃信息
|
UpdateStroageCageByCell(cell, nownum, num) {
|
if (nownum == null && num == 1) {
|
this.StorageCageAdd = 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'));
|
}
|
});
|
}
|
|
},
|
//启用//理片笼禁用
|
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>
|