From 7238380a5daef00c94eba911d6a6f560a538ed55 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期一, 13 一月 2025 16:48:11 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/task.html |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/src/main/webapp/views/task.html b/src/main/webapp/views/task.html
index cd5fb35..d4b48bb 100644
--- a/src/main/webapp/views/task.html
+++ b/src/main/webapp/views/task.html
@@ -80,18 +80,39 @@
 			</div>
 
 			<el-dialog :title="shuttleCommandTitle" :visible.sync="shuttleCommandVisible">
-				<el-table ref="singleTable" :data="shuttleCommandData.assignCommand.commands" style="width: 100%;" :row-class-name="tableRowClassName">
-					<el-table-column property="mode" label="鍛戒护绫诲瀷">
+				<el-table ref="singleTable" :data="shuttleCommandData.commands" style="width: 100%;" :row-class-name="tableRowClassName">
+					<el-table-column property="mode$" label="鍛戒护绫诲瀷">
 					</el-table-column>
 					<el-table-column property="start" label="璧风偣">
+						<template slot-scope="scope">
+							<div v-if="scope.row.nodes">
+								x:{{ scope.row.nodes[0].x }}
+								y:{{ scope.row.nodes[0].y }}
+								z:{{ scope.row.nodes[0].z }}
+							</div>
+						</template>
 					</el-table-column>
 					<el-table-column property="target" label="缁堢偣">
+						<template slot-scope="scope">
+							<div v-if="scope.row.nodes">
+								x:{{ scope.row.nodes[scope.row.nodes.length-1].x }}
+								y:{{ scope.row.nodes[scope.row.nodes.length-1].y }}
+								z:{{ scope.row.nodes[scope.row.nodes.length-1].z }}
+							</div>
+						</template>
 					</el-table-column>
-					<el-table-column property="taskId" label="taskId">
+					<el-table-column property="taskNo" label="浠诲姟鍙�">
 					</el-table-column>
-					<el-table-column property="robotId" label="robotId">
+					<el-table-column property="shuttleNo" label="绌挎杞�">
 					</el-table-column>
 					<el-table-column property="complete" label="鏄惁瀹屾垚">
+						<template slot-scope="scope">
+							<el-switch
+									v-model="scope.row.complete"
+									active-color="#13ce66"
+									@change="changeComplete(scope)">
+							</el-switch>
+						</template>
 					</el-table-column>
 					<el-table-column label="鎿嶄綔" width="100">
 						<template slot-scope="scope">
@@ -345,6 +366,34 @@
 								}
 							}
 						});
+					},
+					changeComplete(scope) {
+						let that = this;
+						let idx = scope.$index;
+						$.ajax({
+							url: baseUrl + "/shuttle/command/completeSwitch",
+							headers: {
+								'token': localStorage.getItem('token')
+							},
+							data: {
+								wrkNo: that.shuttleCommandWrkNo,
+								commandStep: idx,
+								complete: scope.row.complete ? 1 : 0
+							},
+							method: 'GET',
+							success: function(res) {
+								if (res.code == 200) {
+									that.showShuttleCommand(that.shuttleCommandWrkNo)
+								} else if (res.code === 403) {
+									top.location.href = baseUrl + "/";
+								} else {
+									that.$message({
+										message: res.msg,
+										type: 'error'
+									});
+								}
+							}
+						});
 					}
 				},
 			})

--
Gitblit v1.9.1