From 4e2e52b766d87fc528d02bdebc1757c3dda8c596 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 26 二月 2025 09:22:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 admin/src/views/business/reportRecord.vue |   29 +++++++++++++++++++++++------
 1 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/admin/src/views/business/reportRecord.vue b/admin/src/views/business/reportRecord.vue
index 0c1c06b..f9a206d 100644
--- a/admin/src/views/business/reportRecord.vue
+++ b/admin/src/views/business/reportRecord.vue
@@ -81,14 +81,13 @@
           <span v-if="row.status === 9" style="color: gray">宸插け鏁�</span>
         </template>
       </el-table-column>
-      <el-table-column label="鎿嶄綔" align="center" width="100" fixed="right">
+      <el-table-column label="鎿嶄綔" align="center" width="180" fixed="right">
         <template slot-scope="{ row }">
           <el-button
             type="text"
             @click="handleDetail(row)"
-            v-permissions="['business:company:update']"
-            >鏌ョ湅璇︽儏</el-button
-          >
+            v-permissions="['business:company:update']">鏌ョ湅璇︽儏</el-button>
+          <el-button  type="text"  icon="el-icon-delete" @click="deleteById(row)" style="color: red" v-permissions="['business:visits:delete']">鍒犻櫎</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -108,7 +107,7 @@
 // import ReportDetail from './page-components/ReportDetail.vue'
 import ReportDetail from '@/views/task/visReportDetail.vue'
 import OperaVisitsReportWindow from '@/components/business/operaVisitsReportWindow.vue'
-import { fetchList, exportExcel } from '@/api/business/visits'
+import { fetchList, exportExcel, deleteById } from '@/api/business/visits'
 export default {
   components: {
     ReportDetail,
@@ -149,7 +148,8 @@
       },
       pagination: {
         capacity: 10,
-        page: 1
+        page: 1,
+        total: 0
       },
       total: 0
     }
@@ -184,6 +184,21 @@
         this.$refs.operaVisitsWindowRef.isShowModal = true
       })
     },
+    deleteById (row) {
+      this.$confirm('纭畾鍒犻櫎璇ヨ褰曞悧, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        deleteById(row.id)
+          .then(res => {
+            this.$message.success('鎿嶄綔鎴愬姛')
+            this.page = 1
+            this.getList()
+          })
+      }).catch(() => {
+      })
+    },
     handleDetail (row) {
       this.isShowReport = true
       this.$nextTick(() => {
@@ -203,6 +218,7 @@
         ...pagination
       }).then(res => {
         this.dataList = res.records || []
+        this.pagination.total = res.total
       })
     },
     clear () {
@@ -213,6 +229,7 @@
     },
     handleSizeChange (capacity) {
       this.pagination.capacity = capacity
+      this.getList()
     }
   }
 }

--
Gitblit v1.9.3