2024-08-08 14:23:25 +08:00
|
|
|
<template>
|
2024-08-31 22:01:04 +08:00
|
|
|
<a-card :bordered='false'>
|
|
|
|
<div class='table-page-search-wrapper'>
|
|
|
|
<a-form layout='inline'>
|
|
|
|
<a-row :gutter='48'>
|
|
|
|
<a-col :md='4' :sm='15'>
|
|
|
|
<a-form-item label='姓名'>
|
|
|
|
<a-input placeholder='请输入姓名' v-model='queryParam.username' />
|
2024-08-29 17:18:22 +08:00
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
2024-08-31 22:01:04 +08:00
|
|
|
<a-col :md='7' :sm='15'>
|
|
|
|
<a-form-item label='时间范围'>
|
|
|
|
<a-range-picker v-model='timeRange' @change='selectTime' />
|
|
|
|
</a-form-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :md='8' :sm='24'>
|
|
|
|
<span class='table-page-search-submitButtons'>
|
|
|
|
<a-button type='primary' @click='selectList()'>查询</a-button>
|
|
|
|
<a-button style='margin-left: 8px' @click='reset()'>重置</a-button>
|
2024-08-08 14:23:25 +08:00
|
|
|
</span>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-form>
|
|
|
|
</div>
|
2024-08-31 22:01:04 +08:00
|
|
|
<a-tabs default-active-key='1'>
|
|
|
|
<a-tab-pane key='2' tab='网格区域' :force-render='true'>
|
|
|
|
<s-table
|
|
|
|
size='default'
|
|
|
|
ref='tableFloor'
|
|
|
|
rowKey='id'
|
|
|
|
:columns='floorColumns'
|
|
|
|
:data='loadFloor'
|
2024-08-08 16:13:30 +08:00
|
|
|
>
|
2024-08-31 22:01:04 +08:00
|
|
|
<span slot='status' slot-scope='text'>
|
2024-08-08 14:23:25 +08:00
|
|
|
{{ text | statusFilter }}
|
2024-08-31 22:01:04 +08:00
|
|
|
</span>
|
|
|
|
<span slot='action' slot-scope='text, record'>
|
|
|
|
<a v-if='editEnabel' @click='handleFloorView(record.id)'>详情</a>
|
|
|
|
</span>
|
|
|
|
</s-table>
|
|
|
|
<!-- <a-table-->
|
|
|
|
<!-- size="default"-->
|
|
|
|
<!-- ref="table"-->
|
|
|
|
<!-- rowKey="id"-->
|
|
|
|
<!-- :columns="floorColumns"-->
|
|
|
|
<!-- :data-source="floorData"-->
|
|
|
|
<!-- >-->
|
|
|
|
<!-- <span slot="status" slot-scope="text">-->
|
|
|
|
<!-- {{ text | statusFilter }}-->
|
|
|
|
<!-- </span>-->
|
|
|
|
<!-- <span slot="action" slot-scope="text, record">-->
|
|
|
|
<!-- <a v-if="editEnabel" @click="handleFloorView(record.id)">详情</a>-->
|
|
|
|
<!-- </span>-->
|
|
|
|
<!-- </a-table>-->
|
2024-08-08 16:13:30 +08:00
|
|
|
</a-tab-pane>
|
2024-08-31 22:01:04 +08:00
|
|
|
<a-tab-pane key='3' tab='网格长' :force-render='true'>
|
|
|
|
<s-table
|
|
|
|
size='default'
|
|
|
|
ref='tableFloorCreate'
|
|
|
|
rowKey='id'
|
|
|
|
:columns='floorCreateColumns'
|
|
|
|
:data='loadFloorCreate'
|
2024-08-08 16:13:30 +08:00
|
|
|
>
|
2024-08-31 22:01:04 +08:00
|
|
|
<span slot='status' slot-scope='text'>
|
2024-08-08 16:13:30 +08:00
|
|
|
{{ text | statusFilter }}
|
|
|
|
</span>
|
2024-08-31 22:01:04 +08:00
|
|
|
<span slot='action' slot-scope='text, record'>
|
|
|
|
<a v-if='editEnabel' @click='handleFloorCreateView(record.id)'>详情</a>
|
2024-08-29 00:04:46 +08:00
|
|
|
</span>
|
2024-08-31 22:01:04 +08:00
|
|
|
</s-table>
|
|
|
|
<!-- <a-table-->
|
|
|
|
<!-- size='default'-->
|
|
|
|
<!-- ref='table'-->
|
|
|
|
<!-- rowKey='id'-->
|
|
|
|
<!-- :columns='floorCreateColumns'-->
|
|
|
|
<!-- :data-source='floorCreateData'-->
|
|
|
|
<!-- >-->
|
|
|
|
<!-- <span slot='status' slot-scope='text'>-->
|
|
|
|
<!-- {{ text | statusFilter }}-->
|
|
|
|
<!-- </span>-->
|
|
|
|
<!-- <span slot='action' slot-scope='text, record'>-->
|
|
|
|
<!-- <a v-if='editEnabel' @click='handleFloorCreateView(record.id)'>详情</a>-->
|
|
|
|
<!-- </span>-->
|
|
|
|
<!-- </a-table>-->
|
2024-08-29 00:04:46 +08:00
|
|
|
</a-tab-pane>
|
2024-08-31 22:01:04 +08:00
|
|
|
<a-tab-pane key='1' tab='维修人员' :force-render='true'>
|
|
|
|
<s-table
|
|
|
|
size='default'
|
|
|
|
ref='tableWorker'
|
|
|
|
rowKey='id'
|
|
|
|
:columns='columns'
|
|
|
|
:data='loadWorker'
|
2024-08-29 00:04:46 +08:00
|
|
|
>
|
2024-08-31 22:01:04 +08:00
|
|
|
<span slot='status' slot-scope='text'>
|
2024-08-29 00:04:46 +08:00
|
|
|
{{ text | statusFilter }}
|
|
|
|
</span>
|
2024-08-31 22:01:04 +08:00
|
|
|
<span slot='action' slot-scope='text, record'>
|
|
|
|
<a v-if='editEnabel' @click='handleView(record.id)'>详情</a>
|
2024-08-08 16:13:30 +08:00
|
|
|
</span>
|
2024-08-31 22:01:04 +08:00
|
|
|
</s-table>
|
|
|
|
<!-- <a-table-->
|
|
|
|
<!-- size='default'-->
|
|
|
|
<!-- ref='table'-->
|
|
|
|
<!-- rowKey='id'-->
|
|
|
|
<!-- :columns='columns'-->
|
|
|
|
<!-- :data-source='workerData'-->
|
|
|
|
<!-- >-->
|
|
|
|
<!-- <span slot='status' slot-scope='text'>-->
|
|
|
|
<!-- {{ text | statusFilter }}-->
|
|
|
|
<!-- </span>-->
|
|
|
|
<!-- <span slot='action' slot-scope='text, record'>-->
|
|
|
|
<!-- <a v-if='editEnabel' @click='handleView(record.id)'>详情</a>-->
|
|
|
|
<!-- </span>-->
|
|
|
|
<!-- </a-table>-->
|
2024-08-08 16:13:30 +08:00
|
|
|
</a-tab-pane>
|
2024-08-30 12:10:49 +08:00
|
|
|
|
2024-08-08 16:13:30 +08:00
|
|
|
</a-tabs>
|
2024-08-08 14:23:25 +08:00
|
|
|
</a-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { STable } from '@/components'
|
2024-08-29 00:04:46 +08:00
|
|
|
import { getWorkerList, getFloorList, getFloorCreateList } from '@/api/admin/repair/repairStats'
|
2024-08-08 14:23:25 +08:00
|
|
|
import { checkPermission } from '@/utils/permissions'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'TableList',
|
|
|
|
components: {
|
2024-08-29 17:18:22 +08:00
|
|
|
STable
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
2024-08-31 22:01:04 +08:00
|
|
|
data() {
|
2024-08-08 14:23:25 +08:00
|
|
|
return {
|
|
|
|
labelCol: {
|
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 5 }
|
|
|
|
},
|
|
|
|
wrapperCol: {
|
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 16 }
|
|
|
|
},
|
|
|
|
form: this.$form.createForm(this),
|
|
|
|
mdl: {},
|
|
|
|
// 高级搜索 展开/关闭
|
|
|
|
advanced: false,
|
|
|
|
// 查询参数
|
|
|
|
queryParam: {},
|
2024-08-29 00:04:46 +08:00
|
|
|
floorCreateColumns: [
|
|
|
|
{
|
|
|
|
title: '网格长',
|
|
|
|
dataIndex: 'name'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '发现问题',
|
|
|
|
dataIndex: 'zs'
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
title: '已完成',
|
|
|
|
dataIndex: 'closed'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '未解决',
|
|
|
|
dataIndex: 'unresolved'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '处理中',
|
|
|
|
dataIndex: 'process'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '好评数量好评率',
|
|
|
|
dataIndex: 'h'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '中评数量中评率',
|
|
|
|
dataIndex: 'm'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '差评数量差评率',
|
|
|
|
dataIndex: 'l'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '操作',
|
|
|
|
width: '200px',
|
|
|
|
dataIndex: 'action',
|
|
|
|
scopedSlots: { customRender: 'action' }
|
|
|
|
}
|
|
|
|
],
|
2024-08-08 16:13:30 +08:00
|
|
|
floorColumns: [
|
|
|
|
{
|
|
|
|
title: '楼层负责人',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'name'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '所属楼层',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'adr'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '工单总数',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'zs'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '已完成',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'closed'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '未解决',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'unresolved'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '处理中',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'process'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '好评数量好评率',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'h'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '中评数量中评率',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'm'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '差评数量差评率',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'l'
|
2024-08-08 16:13:30 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '操作',
|
|
|
|
width: '200px',
|
|
|
|
dataIndex: 'action',
|
|
|
|
scopedSlots: { customRender: 'action' }
|
|
|
|
}
|
|
|
|
],
|
2024-08-08 14:23:25 +08:00
|
|
|
// 表头
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
title: '用户姓名',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'username'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '所属分类',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'typename'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '工单数量',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'zs'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
title: '已完成',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'closed'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '未解决',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'unresolved'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '处理中',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'process'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '好评数量好评率',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'h'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '中评数量中评率',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'm'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '差评数量差评率',
|
2024-08-16 11:07:18 +08:00
|
|
|
dataIndex: 'l'
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '操作',
|
|
|
|
width: '200px',
|
|
|
|
dataIndex: 'action',
|
|
|
|
scopedSlots: { customRender: 'action' }
|
|
|
|
}
|
|
|
|
],
|
2024-08-31 22:01:04 +08:00
|
|
|
loadFloor: parameter => {
|
|
|
|
this.queryParam.name = this.queryParam.username
|
|
|
|
return getFloorList(Object.assign(parameter, this.queryParam))
|
|
|
|
},
|
|
|
|
loadFloorCreate: parameter => {
|
|
|
|
this.queryParam.keywords = this.queryParam.username
|
|
|
|
return getFloorCreateList(Object.assign(parameter, this.queryParam))
|
|
|
|
},
|
|
|
|
loadWorker: parameter => {
|
|
|
|
return getWorkerList(Object.assign(parameter, this.queryParam))
|
|
|
|
},
|
|
|
|
|
2024-08-08 14:23:25 +08:00
|
|
|
// 加载数据方法 必须为 Promise 对象
|
2024-08-15 17:33:04 +08:00
|
|
|
// loadData: parameter => {
|
|
|
|
// return getRepairList(Object.assign(parameter, this.queryParam))
|
|
|
|
// },
|
2024-08-08 14:23:25 +08:00
|
|
|
addEnable: checkPermission('admin:repair:add'),
|
|
|
|
editEnabel: checkPermission('admin:repair:edit'),
|
2024-08-15 17:33:04 +08:00
|
|
|
removeEnable: checkPermission('admin:repair:list'),
|
2024-08-16 11:07:18 +08:00
|
|
|
loadData: [],
|
2024-08-30 00:42:34 +08:00
|
|
|
timeRange: '',
|
2024-08-16 11:07:18 +08:00
|
|
|
workerData: [],
|
2024-08-29 00:04:46 +08:00
|
|
|
floorData: [],
|
|
|
|
floorCreateData: []
|
2024-08-08 14:23:25 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
filters: {
|
2024-08-31 22:01:04 +08:00
|
|
|
statusFilter(status) {
|
2024-08-08 14:23:25 +08:00
|
|
|
const statusMap = {
|
|
|
|
'PENDING_ASSIGN': '待分配',
|
|
|
|
'PENDING_PROCESS': '待处理',
|
|
|
|
'COMPLETED': '已完成',
|
|
|
|
'CANCELED': '已取消',
|
|
|
|
'SCORE': '已评价'
|
|
|
|
}
|
|
|
|
return statusMap[status]
|
|
|
|
}
|
|
|
|
},
|
2024-08-31 22:01:04 +08:00
|
|
|
created() {
|
2024-08-08 14:23:25 +08:00
|
|
|
},
|
|
|
|
methods: {
|
2024-08-31 22:01:04 +08:00
|
|
|
reset() {
|
|
|
|
this.queryParam = {}
|
|
|
|
this.timeRange = ''
|
|
|
|
this.selectList()
|
|
|
|
},
|
|
|
|
selectList() {
|
|
|
|
this.$refs.tableFloor.refresh(true)
|
|
|
|
this.$refs.tableFloorCreate.refresh(true)
|
|
|
|
this.$refs.tableWorker.refresh(true)
|
|
|
|
// this.workerList(this.queryParam)
|
|
|
|
// this.floorList(this.queryParam)
|
|
|
|
// this.floorCreateList(this.queryParam)
|
2024-08-30 00:42:34 +08:00
|
|
|
},
|
2024-08-29 17:18:22 +08:00
|
|
|
// 切换时间
|
2024-09-02 17:55:21 +08:00
|
|
|
selectTime (value, dateString) {
|
2024-08-30 00:42:34 +08:00
|
|
|
this.queryParam.startDate = dateString[0]
|
|
|
|
this.queryParam.endDate = dateString[1]
|
2024-09-02 17:55:21 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
handleView (workerId) {
|
|
|
|
this.$router.push({ name: 'repair', query: { repairUserId: workerId } })
|
|
|
|
},
|
|
|
|
handleFloorView (floorId) {
|
|
|
|
console.log(floorId)
|
|
|
|
this.$router.push({ name: 'repair', query: { floorId: floorId } })
|
|
|
|
},
|
|
|
|
handleFloorCreateView (floorId) {
|
|
|
|
this.$router.push({ name: 'repair', query: { floorCreateId: floorId } })
|
2024-08-08 14:23:25 +08:00
|
|
|
}
|
|
|
|
},
|
2024-08-29 17:18:22 +08:00
|
|
|
watch: {}
|
2024-08-08 14:23:25 +08:00
|
|
|
}
|
|
|
|
</script>
|