From 908ce43ff21c2068ef5148b0a417423c8ed9eae5 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 12 三月 2025 16:37:32 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit

---
 admin/src/views/business/reportRecord.vue |   47 ++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/admin/src/views/business/reportRecord.vue b/admin/src/views/business/reportRecord.vue
index 0c1c06b..d6f2406 100644
--- a/admin/src/views/business/reportRecord.vue
+++ b/admin/src/views/business/reportRecord.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="main_app">
+  <div class="main_app" >
     <QueryForm
       v-model="filters"
       :query-form-config="queryFormConfig"
@@ -11,6 +11,7 @@
       <el-button type="primary" :loading="exLoading" @click="exportExcel" v-permissions="['business:visits:exportExcel']">瀵煎嚭</el-button>
     </div>
     <el-table
+      :height="tableHeightNew"
       v-loading="loading"
       :data="dataList"
       stripe
@@ -81,14 +82,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,8 +108,10 @@
 // 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'
+import BaseComputHeight from "@/components/base/BaseComputHeight";
 export default {
+  extends: BaseComputHeight,
   components: {
     ReportDetail,
     QueryForm,
@@ -149,7 +151,8 @@
       },
       pagination: {
         capacity: 10,
-        page: 1
+        page: 1,
+        total: 0
       },
       total: 0
     }
@@ -184,6 +187,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 +221,7 @@
         ...pagination
       }).then(res => {
         this.dataList = res.records || []
+        this.pagination.total = res.total
       })
     },
     clear () {
@@ -213,10 +232,24 @@
     },
     handleSizeChange (capacity) {
       this.pagination.capacity = capacity
+      this.getList(1)
     }
   }
 }
 </script>
 
 <style lang="scss" scoped>
+.table-pagination {
+  margin-left: -18px;
+  padding: 16px 0px 16px 25px;
+  text-align: left;
+  display: block;
+  z-index: 100;
+  width: -webkit-fill-available;
+  /* width: 80%; */
+  position: fixed;
+  bottom: 25px;
+  background-color: white;
+  margin-right: 50px;
+}
 </style>

--
Gitblit v1.9.3