From 19724b0969eb2f91b38efb262a6ef4de04d6b0c5 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 14 十月 2025 12:07:58 +0800
Subject: [PATCH] 新增“有货状态”显示及数据处理逻辑支持在Home.vue和 LineComponent.vue中新增了“有货状态”显示功能,为 RGV 和堆垛机对象添加了 InStock属性。 修改了 Home.vue 的 created生命周期和 LineComponent.vue的 update 方法,增加了对 inStock数据的处理逻辑。删除了三个旧的二进制文件,新增了六个新的二进制文件,可能与项目构建或依赖更新相关。优化了任务分配和状态判断逻辑,确保任务执行更加准确和高效。
---
项目代码/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue | 266 ++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 192 insertions(+), 74 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue"
index c1ca36a..338a8f0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/views/LineInfocopy.vue"
@@ -1,12 +1,11 @@
<template>
- <div :class="update()" :style="{ left: left, top: top, }" @click="mouseClick"
- v-loading.fullscreen.lock="fullscreenLoading" style="">
- <img v-if="imgType === '2'" src="../../public/lines.png" />
+ <div :class="update()" :style="{ left: left, top: top, marginBottom: 0 + 'px', marginTop: 15 + 'px' }"
+ @click="mouseClick" v-loading.fullscreen.lock="fullscreenLoading">
+ <img v-if="imgType === '2'" src="../../public/lines.png" />
<img v-if="imgType === '1'" src="../../public/lines2.png" />
<label v-if="equipNo" class="equip-no">{{ equipNo }}</label>
</div>
-
- <!-- <el-dialog v-model="dialogVisible" title="淇℃伅鏌ョ湅" :before-close="handleClose">
+ <el-dialog v-model="dialogVisible" title="杈撻�佺嚎淇℃伅鏌ョ湅" :before-close="handleClose">
<el-form ref="$form" :model="lineItemInfo" label-position="left" label-width="100px" size="medium">
<el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
<el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
@@ -16,55 +15,77 @@
</el-col>
<el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
<el-form-item label="鏄惁鏈夌洏:">
- <j-el-description :value="lineItemInfo.r_Line_HasPallet" type="primary"
- ellipsis></j-el-description>
+ <j-el-description :value="lineItemInfo.inStock" type="primary" ellipsis></j-el-description>
</el-form-item>
</el-col>
</el-row>
- <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
+ <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
<el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
- <el-form-item label="鎵樼洏鏉$爜:">
- <j-el-description :value="lineItemInfo.r_Line_Barcode" type="primary"
- ellipsis></j-el-description>
+ <el-form-item label="浠诲姟鍙�:">
+ <j-el-description :value="lineItemInfo.taskNum" type="primary" ellipsis></j-el-description>
</el-form-item>
</el-col>
<el-col :span="12" :offset="0" :push="0" :pull="0" tag="div">
<el-form-item label="鎶ヨ浠g爜锛�">
- <j-el-description :value="lineItemInfo.r_Line_ErrorCode" type="primary"
- ellipsis></j-el-description>
+ <j-el-description :value="lineItemInfo.alarm" type="primary" ellipsis></j-el-description>
</el-form-item>
</el-col>
- </el-row> -->
- <!-- </el-form>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="dialogVisible = false">
- 纭
+ </el-row>
+
+ </el-form><el-divider />
+ <h4 style="margin-bottom: 20px;">鎵嬪姩鎿嶄綔</h4>
+ <el-form ref="form" :model="form" label-width="100px">
+ <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
+ <el-col :span="16" :offset="0" :push="0" :pull="0" tag="div">
+ <el-form-item label="浠� 鍔� 鍛� 浠�" prop="TargetAddress">
+ <el-select size="large" v-model="form.TaskType" placeholder="璇烽�夋嫨浠诲姟鍛戒护">
+ <el-option label="鍏ュ簱" value="1" />
+ <el-option label="鍑哄簱" value="2" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
+ <el-col :span="16" :offset="0" :push="0" :pull="0" tag="div">
+ <el-form-item label="涓嬩竴鐩爣鍦板潃:">
+ <el-input size="large" v-model="form.TargetAddress" placeholder="璇疯緭鍏ヤ笅涓�鐩爣鍦板潃" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <el-divider />
+ <el-row :gutter="20" type="flex" justify="start" align="top" tag="div">
+ <el-col :span="4" :offset="0" :push="0" :pull="0" tag="div">
+ <el-button type="primary" size="small" plain @click="SendCommand">
+ <i class="el-icon-check">鍙戦�佸懡浠�</i>
</el-button>
- </div>
- </template>
- </el-dialog> -->
- <!-- <el-dialog v-model="dialogVisible" title="淇℃伅鏌ョ湅" :before-close="handleClose">
- <el-row>
- <el-col :span="12">鏄惁鏈夌洏:</el-col>
- <el-col :span="12">{{ lineItemInfo.r_Line_HasPallet }}</el-col>
- </el-row>
- <el-row>
- <el-col :span="12">鎵樼洏鏉$爜</el-col>
- <el-col :span="12">{{ lineItemInfo.r_Line_Barcode }}</el-col>
- </el-row>
- <el-row>
- <el-col :span="12">鐩爣浣嶇疆</el-col>
- <el-col :span="12">{{ lineItemInfo.r_Line_Target }}</el-col>
- </el-row>
- <el-row>
- <el-col :span="12">浠诲姟鍙�</el-col>
- <el-col :span="12">{{ lineItemInfo.r_Line_TaskNum }}</el-col>
- </el-row>
- <el-row>
- <el-col :span="12">鎶ヨ浠g爜</el-col>
- <el-col :span="12">{{ lineItemInfo.r_Line_ErrorCode }}</el-col>
+ </el-col>
+ <el-col :span="4" :offset="0" :push="0" :pull="0" tag="div">
+ <el-button type="warning" size="small" plain @click="ConveyorLineReset">
+ <i class="el-icon-check">澶嶄綅</i>
+ </el-button>
+
+ </el-col>
+ <el-col :span="4" :offset="0" :push="0" :pull="0" tag="div">
+ <el-button type="danger" size="small" plain @click="ConveyorLineEmergencyStop">
+ <i class="el-icon-check">鍋滄</i>
+ </el-button>
+ </el-col>
+ <el-col :span="4" :offset="0" :push="0" :pull="0" tag="div">
+ <el-button type="danger" size="small" plain @click="ConveyorLineReturn">
+ <i class="el-icon-check">閫�鍥�</i>
+ </el-button>
+ </el-col>
+ <el-col :span="4" :offset="0" :push="0" :pull="0" tag="div">
+ <el-button type="danger" size="small" plain @click="ConveyorLineCancel">
+ <i class="el-icon-check">鍙栨秷浠诲姟</i>
+ </el-button>
+ </el-col>
+ <el-col :span="4" :offset="0" :push="0" :pull="0" tag="div">
+ <el-button type="danger" size="small" plain @click="ConveyorLineInitialize">
+ <i class="el-icon-check">宸ヤ綅鍒濆鍖�</i>
+ </el-button>
+ </el-col>
</el-row>
<template #footer>
<div class="dialog-footer">
@@ -74,7 +95,7 @@
</el-button>
</div>
</template>
- </el-dialog> -->
+ </el-dialog>
</template>
<script>
@@ -109,22 +130,25 @@
type: String,
default: "",
},
- condition:{
+ condition: {
type: Boolean,
default: false,
},
},
data() {
return {
- left: "20px",
- top: "260px",
+ left: "500px",
+ top: "400px",
dialogVisible: false,
lineItemInfo: {
- r_Line_Barcode: "",
- r_Line_HasPallet: "",
- r_Line_TaskNum: "",
- r_Line_ErrorCode: "",
- r_Line_Target: "",
+ inStock: "",
+ taskNum: "",
+ alarm: "",
+ },
+ form: {
+ TaskType: "",
+ TargetAddress: "",
+ DeviceCode: "",
},
};
},
@@ -141,25 +165,117 @@
this.fullscreenLoading = true;
this.dialogVisible = true;
// 澶勭悊鐐瑰嚮浜嬩欢
- if (this.url != "") {
- this.http.post(this.url + "?equipNo=" + this.equipNo, null, "")
- .then((x) => {
- if (x.status) {
- this.lineItemInfo = x.data;
- } else {
- this.$message({
- type: "error",
- message: x.message,
- });
- }
- });
- }
+ this.http.post("api/DeviceInfo/GetConveyorLineInfo?DeviceChildCode=" + this.equipNo, null, "")
+ .then((x) => {
+ if (x.status) {
+ this.lineItemInfo = x.data;
+ } else {
+ this.$message({
+ type: "error",
+ message: x.message,
+ });
+ }
+ });
+
this.fullscreenLoading = false;
- // this.dialogVisible = false;
},
- update(){
- return !this.condition ? 'custom-img' : 'custom-img-color'
- }
+
+ SendCommand() {
+ this.fullscreenLoading = true;
+ this.form.DeviceCode=this.equipNo;
+ this.http.post("api/DeviceInfo/ConveyorLineHandTask" ,this.form)
+ .then((x) => {
+ if (!x.status) {
+ this.$message.error(x.message);
+ } else {
+ this.$Message.success(x.message);
+ }
+ })
+ .finally(() => {
+ this.fullscreenLoading = false;
+ });
+ },
+ ConveyorLineReset() {
+ this.fullscreenLoading = true;
+ this.http.post("api/DeviceInfo/ConveyorLineReset?DeviceChildCode=" + this.equipNo, null, "")
+ .then((x) => {
+ if (!x.status) {
+ this.$message.error(x.message);
+ } else {
+ this.$Message.success(x.message);
+
+ }
+ })
+ .finally(() => {
+ this.fullscreenLoading = false;
+ });
+ },
+ ConveyorLineEmergencyStop() {
+ this.fullscreenLoading = true;
+ this.http.post("api/DeviceInfo/ConveyorLineEmergencyStop?DeviceChildCode=" + this.equipNo, null, "")
+ .then((x) => {
+ if (!x.status) {
+ this.$message.error(x.message);
+ } else {
+ this.$Message.success(x.message);
+
+ }
+ })
+ .finally(() => {
+ this.fullscreenLoading = false;
+ });
+ },
+ ConveyorLineReturn() {
+ this.fullscreenLoading = true;
+ this.http.post("api/DeviceInfo/ConveyorLineReturn?DeviceChildCode=" + this.equipNo, null, "")
+ .then((x) => {
+ if (!x.status) {
+ this.$message.error(x.message);
+ } else {
+ this.$Message.success(x.message);
+ }
+ })
+ .finally(() => {
+ this.fullscreenLoading = false;
+ });
+ },
+ ConveyorLineCancel() {
+ this.fullscreenLoading = true;
+ this.http.post("api/DeviceInfo/ConveyorLineCancel?DeviceChildCode=" + this.equipNo, null, "")
+ .then((x) => {
+ if (!x.status) {
+ this.$message.error(x.message);
+ } else {
+ this.$Message.success(x.message);
+ }
+ })
+ .finally(() => {
+ this.fullscreenLoading = false;
+ });
+ },
+ ConveyorLineInitialize() {
+ this.fullscreenLoading = true;
+ this.http.post("api/DeviceInfo/ConveyorLineInitialize?DeviceChildCode=" + this.equipNo, null, "")
+ .then((x) => {
+ if (!x.status) {
+ this.$message.error(x.message);
+ } else {
+ this.$Message.success(x.message);
+ }
+ })
+ .finally(() => {
+ this.fullscreenLoading = false;
+ });
+ },
+ update() {
+ return !this.condition ? 'custom-img' : 'custom-img-color'
+ },
+ startTimer() {
+ // 寮�鍚畾鏃跺櫒锛屾瘡3绉掓墽琛屼竴娆�
+ this.timer1 = setInterval(() => {
+ update();
+ }, 500);
+ },
},
});
</script>
@@ -170,29 +286,31 @@
display: inline-block;
/* background-color: #d9ecff ; */
}
+
.custom-img-color {
position: relative;
display: inline-block;
- background-color: #409eff ;
+ background-color: #05fa7f;
color: white;
text-align: center;
}
-.custom-img-color::before {
+/* .custom-img-color::before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
- background-color: #409eff;
- border-radius: 50%; /* 鍒涘缓涓�涓渾褰㈢殑闀傜┖鏁堟灉 */
-}
+ background-color: #05fa7f;
+ border-radius: 50%;
+} */
.custom-img img {
width: 40px;
height: 40px;
}
+
.custom-img-color img {
width: 40px;
height: 40px;
--
Gitblit v1.9.3