From 0dc7fbac552884839ee89807e0140d6bf6d1f005 Mon Sep 17 00:00:00 2001
From: jihongshun <1151753686@qq.com>
Date: 星期六, 02 八月 2025 13:38:38 +0800
Subject: [PATCH] fix创建多个设备 第n个转的时候

---
 src/views/system/shootPoint/index.vue |   36 ++++++++++++++++++++----------------
 1 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/src/views/system/shootPoint/index.vue b/src/views/system/shootPoint/index.vue
index 8276101..03f2833 100644
--- a/src/views/system/shootPoint/index.vue
+++ b/src/views/system/shootPoint/index.vue
@@ -3,14 +3,14 @@
      <el-row :gutter="20">
        <el-col :span="showMap ? 12 : 24" :xs="24">
         <AppTable ref="AppTable" selection :showDeptSearch="false" :url="'tower/point/list'" :tableColumns="tableColumns"
-          :tableFilter="tableFilter"  @clickRow="clickRow">
+          :tableFilter="tableFilter">
           <template #operatorBox="{ row }">
             <el-button type="primary" plain icon="el-icon-plus" size="mini"
-              @click="handleAdd">鏂板妯″瀷</el-button>
+              @click="handleAdd">鏂板妯℃澘</el-button>
           </template>
           <template #operator="{ row }">
-            <el-button size="mini" type="text" icon="el-icon-edit"
-              @click="handleUpdate(row)">淇敼</el-button>
+            <el-button size="mini" type="text" icon="el-icon-view"
+              @click="preview(row)">棰勮</el-button>
             <el-button size="mini" type="text" icon="el-icon-delete"
               @click="handleDelete(row)">鍒犻櫎</el-button>
           </template>
@@ -21,7 +21,7 @@
        </el-col>
      </el-row>
     
-    <shootPointDialog  v-if="showDialog" @close="close"></shootPointDialog>
+    <shootPointDialog  @on-submit="$refs.AppTable.getData()"  v-if="showDialog" @close="close" :templateId="templateId"></shootPointDialog>
   </div>
 </template>
 
@@ -45,16 +45,12 @@
       multiple: true,
       tableColumns: [
         {
-          label: '妯″瀷鍚嶇О',
-          prop: 'name'
+          label: '妯℃澘鍚嶇О',
+          prop: 'templateName'
         },
         {
-          label: '妯″瀷绫诲瀷',
-          prop: 'createBy'
-        },
-        {
-          label: '妯″瀷璺緞',
-          prop: 'createTime'
+          label: '妯″瀷ID',
+          prop: 'modelId'
         },
         {
           label: '鎿嶄綔',
@@ -73,7 +69,8 @@
         }
       ],
       showMap:false,
-      showDialog:false
+      showDialog:false,
+      templateId:null
     };
   },
   watch: {
@@ -85,6 +82,7 @@
   methods: {
     // 娣诲姞鏁版嵁
     handleAdd() {
+      this.templateId = null
       this.showMap  = false
       this.showDialog = true
       // this.$refs.shootPointDialog.show()
@@ -97,8 +95,9 @@
     // 鍒犻櫎鏁版嵁
     handleDelete(row) {
       const ids = row.id || this.ids
-      const name = row.name || ''
-      this.$api.deleteByName('/work/tower', ids,name).then(res => {
+      // const name = row.name || ''
+      const name = ids
+      this.$api.deleteByName('/tower/point', ids,name).then(res => {
         this.$refs.AppTable.getData()
       })
     },
@@ -112,6 +111,11 @@
     // },
     close(){
       this.showDialog =false
+    },
+    preview(row){
+      console.log(row)
+      this.templateId = row.id
+      this.showDialog = true
     }
   },
 };

--
Gitblit v1.9.3