jiangping
2025-03-20 a58208ba19f52c8d13a0ab1a88bd62ffe8802dd3
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,25 @@
    },
    handleSizeChange (capacity) {
      this.pagination.capacity = capacity
      this.getList(1)
    }
  }
}
</script>
<style lang="scss" scoped>
.table-pagination {
  margin-left: 0px;
  padding: 16px 0px ;
  text-align: left;
  display: block;
  z-index: 100;
  width: -webkit-fill-available;
  /* width: 80%; */
  position: fixed;
  bottom: 0px;
  background-color: white;
  margin-right: 50px;
}
</style>