修改了对应设备类型列表和楼层列表

This commit is contained in:
chenze 2024-08-16 11:07:18 +08:00
parent e91b4e308d
commit dcef42fdbc
2 changed files with 54 additions and 29 deletions

View File

@ -68,7 +68,7 @@ export default {
advanced: false,
//
queryParam: {},
loadData:[],
loadData: [],
//
columns: [
{
@ -142,10 +142,20 @@ export default {
},
methods: {
getRepairList () {
let datas = {
'menu': 7,
'type': 'all'
let datas = {}
if (this.$route.query.repairUserId) {
datas = {
'menu': 5,
'type': 'all',
'workerId': this.$route.query.repairUserId
}
} else {
datas = {
'menu': 7,
'type': 'all'
}
}
getRepairList(datas).then(res => {
this.loadData = res.rows
})

View File

@ -24,7 +24,7 @@
ref="table"
rowKey="id"
:columns="columns"
:data-source="loadData"
:data-source="workerData"
>
<span slot="status" slot-scope="text">
{{ text | statusFilter }}
@ -41,7 +41,7 @@
ref="table"
rowKey="id"
:columns="floorColumns"
:data-source="loadData"
:data-source="floorData"
>
<span slot="status" slot-scope="text">
{{ text | statusFilter }}
@ -59,7 +59,7 @@
<script>
import { STable } from '@/components'
import { getRepairList, complete } from '@/api/admin/repair'
import { getWorkerList,getFloorList } from '@/api/admin/repair/repairStats'
import { checkPermission } from '@/utils/permissions'
export default {
@ -86,40 +86,40 @@ export default {
floorColumns: [
{
title: '楼层负责人',
dataIndex: 'userName'
dataIndex: 'name'
},
{
title: '所属楼层',
dataIndex: 'typeName'
dataIndex: 'adr'
},
{
title: '工单总数',
dataIndex: 'repairDeviceName'
dataIndex: 'zs'
},
{
title: '已完成',
dataIndex: 'status'
dataIndex: 'closed'
},
{
title: '未解决',
dataIndex: 'repairLevel'
dataIndex: 'unresolved'
},
{
title: '处理中',
dataIndex: 'userName'
dataIndex: 'process'
},
{
title: '好评数量好评率',
dataIndex: 'repairTime'
dataIndex: 'h'
},
{
title: '中评数量中评率',
dataIndex: 'repairTime'
dataIndex: 'm'
},
{
title: '差评数量差评率',
dataIndex: 'repairTime'
dataIndex: 'l'
},
{
title: '操作',
@ -132,40 +132,40 @@ export default {
columns: [
{
title: '用户姓名',
dataIndex: 'userName'
dataIndex: 'username'
},
{
title: '所属分类',
dataIndex: 'typeName'
dataIndex: 'typename'
},
{
title: '工单数量',
dataIndex: 'repairDeviceName'
dataIndex: 'zs'
},
{
title: '已完成',
dataIndex: 'status'
dataIndex: 'closed'
},
{
title: '未解决',
dataIndex: 'repairLevel'
dataIndex: 'unresolved'
},
{
title: '处理中',
dataIndex: 'userName'
dataIndex: 'process'
},
{
title: '好评数量好评率',
dataIndex: 'repairTime'
dataIndex: 'h'
},
{
title: '中评数量中评率',
dataIndex: 'repairTime'
dataIndex: 'm'
},
{
title: '差评数量差评率',
dataIndex: 'repairTime'
dataIndex: 'l'
},
{
title: '操作',
@ -181,7 +181,9 @@ export default {
addEnable: checkPermission('admin:repair:add'),
editEnabel: checkPermission('admin:repair:edit'),
removeEnable: checkPermission('admin:repair:list'),
loadData: []
loadData: [],
workerData: [],
floorData: []
}
},
filters: {
@ -197,17 +199,30 @@ export default {
}
},
created () {
this.workerList()
this.floorList()
},
methods: {
callback(){
// admin/repair/stats/workerList
workerList () {
getWorkerList().then(res => {
this.workerData = res.rows
})
},
floorList (){
getFloorList().then(res => {
this.floorData = res.rows
})
},
callback () {
},
handleAdd () {
this.$refs.modal.add()
},
handleView (repairId) {
this.$router.push({ name: 'repairView', query: { repairId: repairId } })
handleView (workerId) {
this.$router.push({ name: 'repair', query: { repairUserId: workerId } })
},
handleEdit (record) {
this.$refs.modal.edit(record)