From 85a0a75ab65874f8c010df5ba9cec0d97bf84708 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期五, 19 一月 2024 08:19:45 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
CanadaMes-ui/src/views/home/index.vue | 124 ++++++++++++++++++++++++++++------------
1 files changed, 86 insertions(+), 38 deletions(-)
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 84fc919..cf37f5b 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -252,7 +252,7 @@
<div style="display:flex;justify-content: space-around;width: 9zz5%;margin: 0 auto;">
<!-- <el-input style="width:15%;" :placeholder="$t('Enter the glass barcode')" v-model="glassid1"
:class="ManuallyInfeedGlass == true ? 'hide' : ''"></el-input> -->
- <el-button type="primary" @click="SelectGlassByGlassIDs(2)" :disabled="ManuallyInfeedGlass"
+ <el-button type="primary" @click="SelectGlassByGlassIDs()" :disabled="ManuallyInfeedGlass"
:class="ManuallyInfeedGlass == true ? 'hide' : ''">
{{ $t('Manually Infeed Glass') }}</el-button>
<el-button type="primary" @click="showform2()" :disabled="OrderInfo"
@@ -263,12 +263,11 @@
{{ $t('Outing Queue') }}</el-button>
<el-button type="primary" @click="TaskStop(0)" :disabled="OutingQueue"
:class="StopTask == true ? 'hide' : ''">
- {{ $t('Stop Feeding') }}</el-button>
- <el-button type="primary" @click="TaskStop(1)" :disabled="StopTask"
- :class="StopTask == true ? 'hide' : ''">
- {{ $t('Stop Outing') }}</el-button>
- <el-button type="primary" @click="SoftEmergencyStop()" :disabled="SoftEmergencyStop"
- :class="SoftEmergencyStop == true ? 'hide' : ''">
+ {{ $t('Terminate Feeding') }}</el-button>
+ <el-button type="primary" @click="TaskStop(1)" :disabled="StopTask" :class="StopTask == true ? 'hide' : ''">
+ {{ $t('Terminate Outing') }}</el-button>
+ <el-button type="primary" @click="SoftEmergencyStop()" :disabled="SoftEmergencyStopState"
+ :class="SoftEmergencyStopState == true ? 'hide' : ''">
{{ $t('SoftEmergencyStop') }}</el-button>
<!-- <el-input style="width:15%;" :placeholder="$t('Enter the Order No')" v-model="order"></el-input>
<el-button type="warning" @click="showform1();">{{ $t('Exit the glass by order number') }}</el-button> -->
@@ -390,10 +389,10 @@
A01.1:{{ ShowGlassIdList(4) }}</div>
<div class="glass A01" style="top: 290px;left: 289px;position: absolute;"
- @click="ClearGlassId('DB101.10.1,5')">A01.2:{{ ShowGlassIdList(5) }}</div>
+ @click="ClearGlassId('DB101.10.1,5',5)">A01.2:{{ ShowGlassIdList(5) }}</div>
- <div class="glass A02" style="top: 310px;left: 300px;position: absolute;"
- @click="ClearGlassId('DB101.10.2,6')">A02:{{ ShowGlassIdList(6) }}</div>
+ <div class="glass A02" style="top: 310px;left: 289px;position: absolute;"
+ @click="ClearGlassId('DB101.10.2,6',6)">A02:{{ ShowGlassIdList(6) }}</div>
<div class="glass D03" style="top: 137px;left: 42px;position: absolute;"
@click="ClearGlassId('DB101.9.4', 7)">
@@ -574,19 +573,29 @@
}}</el-button>
</el-form-item> -->
<el-form-item>
- <el-input style="width:70%;" :placeholder="$t('Enter the glass barcode')"
- v-model="glassid1"></el-input>
- <el-button type="primary" @click="SelectGlassByGlassIDs(2)">{{ $t('Add')
+ {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}
+ <el-button type="primary" @click="isConfirmState()">
+ {{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}</el-button>
+ </el-form-item>
+ <el-form-item>
+ {{ $t('Current State') }}:{{ this.Scanningmethod==true?$t('Automatic'):$t('Hand Movement')}}
+ <el-button type="primary" @click="SwitchScanMethod()">{{ $t('Switch')
}}</el-button>
+ </el-form-item>
+ <el-form-item>
+ <el-input style="width:70%;" maxlength="13" :placeholder="$t('Enter the glass barcode')"
+ v-model="glassid1"></el-input>
+ <el-button type="primary" :disabled="!Scanningmethod" @click="WriteGlassID()">{{ $t('Add')
+ }}</el-button>
+ </el-form-item>
+ <el-form-item>
+ {{ $t('Barcode') }}:
+ <el-input style="width:70%;" maxlength="14" :disabled="true" v-model="CurrrentGlassId"></el-input>
</el-form-item>
</div>
<div style="display: flex;justify-content: space-around;">
<label for="">{{ $t('Upper film position') }}</label>
- <div>
- {{ $t('Confirm State') }}:{{ this.isConfirm == true ? $t('Not Allow') : $t('Allow') }}
- <el-button type="primary" @click="isConfirmState()">
- {{ this.isConfirm == true ? $t('Allow') : $t('Not Allow') }}</el-button>
- </div>
+
<label for="">{{ $t('Scan Code Point') }}</label>
</div>
<div style="display: flex;justify-content: space-around;height: 40px;">
@@ -684,19 +693,19 @@
<!-- <el-button @click="DeleteQueueGlasss(2)" type="primary">{{ $t('Clear Current')
}}</el-button>
<el-button @click="InsertQueueGlass(2)" type="primary" :disabled="disabled">
- {{ $t('Confirm Modification') }}</el-button>
+ {{ $t('Confirm') }}</el-button>
<el-button @click="DeleteQueueGlasss(1)" type="primary">{{ $t('Clear Current')
}}</el-button> -->
<el-button @click="InsertQueueGlass(1)" style="margin-right: 100px;" type="primary"
:disabled="disabled1">
- {{ $t('Confirm Modification') }}</el-button>
+ {{ $t('Confirm') }}</el-button>
</div>
</el-form>
- <template #footer>
+ <!-- <template #footer>
<span class="dialog-footer">
<el-button @click="cancel3()">{{ $t('cancel') }}</el-button>
</span>
- </template>
+ </template> -->
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible6" :title="$t('Outing Queue')" top="5vh">
@@ -873,7 +882,7 @@
home, home2, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist,
SelectPassword, SelectGlassByGlassID, Disabled, Inglassid, SelectGlass, InsertQueueGlassId, UpdateQueueState, DeleteQueueGlass, SelectGlassNo,
SelectAluminumFrameInfoById, DeleteProductionQueueGlass, AddOutSliceS, isAllowQueues, isConfirmStates, SelectPermissionByUserName, currentUsername, CompleteQueue,
- isAllowReorderings, FrameStateUpdate, WriteGlassID, ClearGlassId, CloseForm7, TaskStop, SoftEmergencyStop
+ isAllowReorderings, FrameStateUpdate, WriteGlassID, ClearGlassId, CloseForm7, TaskStop, SoftEmergencyStop, SwitchScanMethod
} from "../../api/home";
@@ -959,9 +968,9 @@
OutingQueue: true,
OrderInfo: true,
CageDetails: true,
- ClearGlassID:true,
- StopTask:true,
- SoftEmergencyStop:true,
+ ClearGlassID: true,
+ StopTask: true,
+ SoftEmergencyStopState: true,
CountDowns: "0",
D01RequestState: false,
EmergencyStop: false,
@@ -970,7 +979,9 @@
isQueueWarning: false,
CurrentFrame: [],
DeviceList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
- GlassIdList: []
+ GlassIdList: [],
+ Scanningmethod: true,
+ CurrrentGlassId:""
};
},
created() {
@@ -1016,6 +1027,17 @@
this.tasklist1 = obj.tasklist1[0];
this.tasklist2 = obj.tasklist2[0];
this.alarm = obj.alarmmg[0];
+ //鑾峰彇褰撳墠鎵爜鏂瑰紡
+ if (obj.Scanningmethod != null) {
+ this.Scanningmethod=obj.Scanningmethod[0];
+ }
+
+ //鑾峰彇褰撳墠鎵爜鏋幓鐠僫d
+ if(obj.CurrrentGlassId!=null){
+ const specialChars = /[^\w\s]/g;
+ this.CurrrentGlassId=obj.CurrrentGlassId[0].replace(specialChars, "");
+ }
+
//鏌ヨ褰撳墠閾濇淇℃伅
this.CurrentFrame = obj.CurrentFrame;
//鑾峰彇璁惧鐘舵��
@@ -1100,10 +1122,13 @@
} else {
this.form3 = {};
}
+
if (obj.form3 != null && obj.form3 != "" && obj.state[0] == 0) {
this.loadglassheight1 = 70;
+ if(this.form5.glassId!=obj.form3[0].glassId){
+ this.showform3();
+ }
this.form5 = obj.form3[0];
- this.showform3();
this.glassid1 = "";
if (this.D01RequestState == true) {
this.Sizerange(this.form5, 3);
@@ -1155,14 +1180,14 @@
if (item.permissionId == "35" && item.state == 1) {
this.CageDetails = false;
}
- if (item.permissionId == "36" && item.state == 1) {
+ if (item.permissionId == "37" && item.state == 1) {
this.ClearGlassID = false;
}
- if (item.permissionId == "37" && item.state == 1) {
+ if (item.permissionId == "38" && item.state == 1) {
this.StopTask = false;
}
- if (item.permissionId == "38" && item.state == 1) {
- this.SoftEmergencyStop = false;
+ if (item.permissionId == "39" && item.state == 1) {
+ this.SoftEmergencyStopState = false;
}
});
});
@@ -1298,11 +1323,13 @@
},
//鎵嬪姩鍐欏叆plc鎵爜浣嶇幓鐠僫d
WriteGlassID() {
- if (this.glassid1 != "") {
+ if (this.glassid1.length ==14) {
WriteGlassID(this.glassid1).then(res => {
console.log(res.data);
this.$message.success(this.$t('Successful operation'));
});
+ }else{
+ this.$message.error(this.$t('Please enter the correct glassID'));
}
},
//鑾峰彇鎵爜浣嶅拰涓婄墖浣嶆暟鎹�
@@ -2017,8 +2044,9 @@
//娓呴櫎鐜荤拑id
ClearGlassId(position, num) {
if (this.ClearGlassID == false) {
- if (this.DeviceList[position] != null) {
- if (this.GlassIdList[num].length == 14) {
+ console.log(this.DeviceList,num);
+ if (this.DeviceList[num] == 0) {
+ if (this.GlassIdList[num].length < 14) {
this.$confirm(this.$t('Are you sure to clear this barcode ?'), this.$t('confirm'), {
confirmButtonText: this.$t('Yes'),
cancelButtonText: this.$t('No'),
@@ -2056,9 +2084,29 @@
}
});
},
- SoftEmergencyStop2() {
- SoftEmergencyStop.then(res => {
- if (res.data.message == 200) {
+ //杞�ュ仠
+ SoftEmergencyStop() {
+ this.$confirm(this.$t('Are you sure you want an emergency stop ?'), this.$t('confirm'), {
+ confirmButtonText: this.$t('Yes'),
+ cancelButtonText: this.$t('No'),
+ type: 'warning'
+ }).then(() => {
+ SoftEmergencyStop.then(res => {
+ if (res.data.message == 200) {
+ this.$message.success(this.$t('Operation successful'));
+ }
+ });
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: this.$t('Operation canceled')
+ });
+ });
+ },
+ //鍒囨崲浜岀淮鐮佽幏鍙栨柟寮�
+ SwitchScanMethod(){
+ SwitchScanMethod(!this.Scanningmethod).then(res => {
+ if(res.data.message == 200) {
this.$message.success(this.$t('Operation successful'));
}
});
--
Gitblit v1.8.0