From b35a46c502f4bcc22c75e9e3c7fd29af5b98d84b Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期三, 05 三月 2025 16:06:54 +0800
Subject: [PATCH] 代码初始化
---
admin/src/views/business/reportRecord.vue | 44 +++++++++++++++++++++++++++++++++++++-------
1 files changed, 37 insertions(+), 7 deletions(-)
diff --git a/admin/src/views/business/reportRecord.vue b/admin/src/views/business/reportRecord.vue
index 0c1c06b..5fe8440 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" style="padding-bottom: 60px">
<QueryForm
v-model="filters"
:query-form-config="queryFormConfig"
@@ -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,10 +229,24 @@
},
handleSizeChange (capacity) {
this.pagination.capacity = capacity
+ this.getList()
}
}
}
</script>
<style lang="scss" scoped>
+.table-pagination {
+ margin-left: -16px;
+ padding: 16px 0px 16px 25px;
+ text-align: left;
+ display: block;
+ z-index: 100;
+ width: -webkit-fill-available;
+ /* width: 80%; */
+ position: fixed;
+ bottom: 30px;
+ background-color: white;
+ margin-right: 50px;
+}
</style>
--
Gitblit v1.9.3