From 2a5bb8c19a6fe25ca6bfb1d64e17e6a58064c98a Mon Sep 17 00:00:00 2001
From: maochaoying <925670706@qq.com>
Date: Fri, 7 Jul 2023 10:27:51 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E6=9D=82=E8=B7=AF=E5=BE=84=E9=9D=99?=
=?UTF-8?q?=E6=80=81=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PathPlan.vue | 90 +++++++++++++++++++++++++++++++++++++++++++++
src/components/Task.vue | 49 ++++++++++++++++++++++++
src/router/index.js | 1 +
3 files changed, 140 insertions(+)
create mode 100644 src/components/PathPlan.vue
diff --git a/src/components/PathPlan.vue b/src/components/PathPlan.vue
new file mode 100644
index 0000000..747b043
--- /dev/null
+++ b/src/components/PathPlan.vue
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
diff --git a/src/components/Task.vue b/src/components/Task.vue
index 28941d7..e4d15a2 100644
--- a/src/components/Task.vue
+++ b/src/components/Task.vue
@@ -30,6 +30,19 @@
:onClose="closeDelDialog"
:cancelBtn="null"
/>
+
+
+
this.showPathDialog(row.id)}
+ >
+ 自定义路径规划
+
+
this.viewDetail(
@@ -374,6 +396,9 @@ export default {
],
}
},
+ components: {
+ PathPlan,
+ },
computed: {
actionAddress() {
return `${import.meta.env.VITE_BASE_URL}/upload/${this.currentTaskId}`
@@ -390,6 +415,25 @@ export default {
},
},
methods: {
+ saveDiyPath() {
+ console.log('diy')
+ },
+ showPathDialog() {
+ const confirmDia = this.$dialog.confirm({
+ header: '提示',
+ body: '已开始的任务无法更改路径。复杂路径规划后,将清除创建任务时所选择的规则路径,确认要进行自定义规划吗?',
+ confirmBtn: '确定',
+ cancelBtn: '取消',
+ onConfirm: ({ e }) => {
+ // 请求成功后,销毁弹框
+ this.pathVisible = true
+ confirmDia.destroy()
+ },
+ onClose: ({ e, trigger }) => {
+ confirmDia.hide()
+ },
+ })
+ },
async getAllOperator() {
const res = await allOperatorApi()
if (res?.code == 200) {
@@ -623,4 +667,9 @@ export default {
background: #d8d8d8;
cursor: default;
}
+.path_wrap {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
diff --git a/src/router/index.js b/src/router/index.js
index 7ac726b..e9cc4a2 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -2,6 +2,7 @@ import { createRouter, createWebHashHistory } from 'vue-router'
import Cookies from '@/utils/cookie'
const Home = () => import('@/pages')
const Login = () => import('@/pages/Login')
+const PathPlan = () => import('cpns/PathPlan')
// 配置路由信息
const routes = [