|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div class="main_app"> | 
|---|
|  |  |  | <div class="main_app" > | 
|---|
|  |  |  | <QueryForm | 
|---|
|  |  |  | v-model="filters" | 
|---|
|  |  |  | :query-form-config="queryFormConfig" | 
|---|
|  |  |  | 
|---|
|  |  |  | <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 | 
|---|
|  |  |  | 
|---|
|  |  |  | prop="status" | 
|---|
|  |  |  | fixed="right" | 
|---|
|  |  |  | label="状态" | 
|---|
|  |  |  | align="center" | 
|---|
|  |  |  | min-width="100" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot-scope="{ row }"> | 
|---|
|  |  |  | 
|---|
|  |  |  | >待提交审批</span | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <span v-if="row.status === 1" style="color: rgba(245, 154, 35, 0.996)" | 
|---|
|  |  |  | >审批中</span | 
|---|
|  |  |  | >处理中</span | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <span v-if="row.status === 2" style="color: rgba(245, 154, 35, 0.996)" | 
|---|
|  |  |  | >审核通过</span | 
|---|
|  |  |  | >已同意</span | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <span style="color: gray" v-if="row.status === 3">审核不通过</span> | 
|---|
|  |  |  | <span style="color: gray" v-if="row.status === 3">已拒绝</span> | 
|---|
|  |  |  | <span v-if="row.status === 4" style="color: gray">取消</span> | 
|---|
|  |  |  | <span v-if="row.status === 5" style="color: green">预约成功</span> | 
|---|
|  |  |  | <span v-if="row.status === 6" style="color: gray">预约失败</span> | 
|---|
|  |  |  | <span v-if="row.status === 5" style="color: green">下发成功</span> | 
|---|
|  |  |  | <span v-if="row.status === 6" style="color: gray">下发失败</span> | 
|---|
|  |  |  | <span v-if="row.status === 7" style="color: green">拜访中</span> | 
|---|
|  |  |  | <span v-if="row.status === 8" style="color: red">已签离</span> | 
|---|
|  |  |  | <span v-if="row.status === 9" style="color: gray">已失效</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column label="操作" 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> | 
|---|
|  |  |  | 
|---|
|  |  |  | // 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, | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | pagination: { | 
|---|
|  |  |  | capacity: 10, | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | page: 1, | 
|---|
|  |  |  | total: 0 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | total: 0 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | 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(() => { | 
|---|
|  |  |  | 
|---|
|  |  |  | ...pagination | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.dataList = res.records || [] | 
|---|
|  |  |  | this.pagination.total = res.total | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | clear () { | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | handleSizeChange (capacity) { | 
|---|
|  |  |  | this.pagination.capacity = capacity | 
|---|
|  |  |  | this.getList() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </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> | 
|---|