From e36eed2cdc9335fc4d1b84c8e4e306422638542f Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 27 十一月 2024 08:53:51 +0800
Subject: [PATCH] ll

---
 admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue b/admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue
index d936c67..86de3cb 100644
--- a/admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue
+++ b/admin/src/views/Inspection/components/OperaYwPatrolLineWindow.vue
@@ -48,7 +48,7 @@
 import BaseOpera from '@/components/base/BaseOpera'
 import GlobalWindow from '@/components/common/GlobalWindow'
 import { getFetchList } from '@/api/Inspection/ywPatrolPoint'
-import { create } from '@/api/Inspection/ywPatrolLine'
+import { create,detailById } from '@/api/Inspection/ywPatrolLine'
 import { Message } from 'element-ui'
 export default {
   name: 'OperaYwPatrolLineWindow',
@@ -82,13 +82,21 @@
       if (list.length == 0) return Message.warning('璇峰厛閫夋嫨宸℃鐐�')
       form.linePointList = list
       create({ ...form }).then(res => {
-        if (res.code == 200) {
-          Message.success('淇濆瓨鎴愬姛')
-          this.close()
-        }
+        Message.success('淇濆瓨鎴愬姛')
+        this.$emit('success')
+        this.close()
+        
+      })
+    },
+    getDetail(row) {
+      detailById(row.id).then(res => {
+        this.form = res
+        this.list = res.linePointList || []
       })
     },
     initData() {
+      this.list = []
+
       getFetchList({}).then(res => {
         this.pointList = res || []
       })
@@ -130,13 +138,12 @@
           needScancode: '1',
           pointName: i.name,
           pointId: i.id,
-          code: i.code,
-          id: i.id
+          code: i.code
         })
       })
       this.isShowModal = false
     },
-    close(){
+    close() {
       this.visible = false
       this.$emit('success')
     }

--
Gitblit v1.9.3