mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 06:49:37 +08:00
工单页面调整
This commit is contained in:
parent
c114f791ec
commit
45ee4039af
@ -36,6 +36,22 @@ export function oneFloorList (parameter) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getFloorCreateList (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/floorCreateList',
|
||||
method: 'post',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function oneFloorCreateList (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/oneFloorCreateList',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
// 第一行 管理员 工单与 通知统计
|
||||
export function repairAdminStats (parameter) {
|
||||
return axios({
|
||||
|
@ -51,16 +51,16 @@
|
||||
</a-col>
|
||||
<a-col :md="5" :sm="15">
|
||||
<a-form-item label="时间范围">
|
||||
<a-range-picker @change="onChange" />
|
||||
<a-range-picker v-model="dateRange" @change="onChange" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="getRepairList()">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => queryParam = {}">重置</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" @click="exportRepair()">导出工单模板</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" @click="exportRepairList()">导出工单模板</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" @click="exportRepair()">导出工单模版</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" @click="importDataVisible()">导入</a-button>
|
||||
<a-button style="margin-left: 8px" type="primary" @click="exportRepairList()">导出工单数据</a-button>
|
||||
|
||||
</span>
|
||||
</a-col>
|
||||
@ -96,13 +96,13 @@
|
||||
</a-table>
|
||||
<repair-modal ref="modal" @ok="handleOk" />
|
||||
|
||||
<a-modal v-model="visible" title="导入用户">
|
||||
<a-modal v-model="visible" title="导入工单">
|
||||
<div style="display: flex">
|
||||
<a-upload
|
||||
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
||||
@change="customChange"
|
||||
:customRequest="customRequest">
|
||||
<a-button type="primary">导入用户数据</a-button>
|
||||
<a-button type="primary">导入工单</a-button>
|
||||
</a-upload>
|
||||
</div>
|
||||
|
||||
@ -115,7 +115,7 @@
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { getRepairList, complete } from '@/api/admin/repair'
|
||||
import { oneWorkerList, oneFloorList } from '@/api/admin/repair/repairStats'
|
||||
import { oneWorkerList, oneFloorList, oneFloorCreateList} from '@/api/admin/repair/repairStats'
|
||||
import RepairModal from './modules/RepairModal.vue'
|
||||
import { checkPermission } from '@/utils/permissions'
|
||||
import { getRepairDeviceList } from '@/api/admin/repair/repairDevice'
|
||||
@ -123,6 +123,7 @@ import { getRepairTypeList } from '@/api/admin/repair/repairDeviceType'
|
||||
import { exportRepair, exportTemplate, importData } from '@/api/admin/repair/repairIo'
|
||||
import storage from 'store'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
export default {
|
||||
name: 'TableList',
|
||||
@ -132,6 +133,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dateRange: [],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
@ -299,17 +301,21 @@ export default {
|
||||
// 导出工单模板
|
||||
exportRepair () {
|
||||
exportTemplate().then(res => {
|
||||
this.exportExcel('工单模板', res)
|
||||
this.exportExcel('工单模版', res)
|
||||
})
|
||||
},
|
||||
|
||||
// 导出工单
|
||||
exportRepairList () {
|
||||
exportRepair({ startDate: '2024-08-01', endDate: '2024-08-30' }).then(res => {
|
||||
this.exportExcel('工单导出', res)
|
||||
if (this.dateRange.length < 2) {
|
||||
message.error("请先设置时间范围,系统将根据时间范围导出工单数据")
|
||||
return;
|
||||
}
|
||||
const startDate = this.dateRange[0].format('YYYY-MM-DD');
|
||||
const endDate = this.dateRange[1].format('YYYY-MM-DD');
|
||||
exportRepair({ startDate: startDate, endDate: endDate }).then(res => {
|
||||
this.exportExcel('工单数据', res)
|
||||
})
|
||||
},
|
||||
|
||||
exportExcel (filename, res) {
|
||||
const link = document.createElement('a')
|
||||
let blob = new Blob([res], { type: 'application/vnd.ms-excel;charset=UTF-8' })
|
||||
@ -359,6 +365,10 @@ export default {
|
||||
oneFloorList({ floorId: this.$route.query.floorId }).then(res => {
|
||||
this.loadData = res.rows
|
||||
})
|
||||
} else if (this.$route.query.floorCreateId != null) {
|
||||
oneFloorCreateList({ floorId: this.$route.query.floorCreateId }).then(res => {
|
||||
this.loadData = res.rows
|
||||
})
|
||||
} else {
|
||||
console.log(this.deviceId)
|
||||
let datas = {
|
||||
|
@ -31,11 +31,10 @@
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleView(record.id)">详情</a>
|
||||
<a-divider type="vertical" />
|
||||
</span>
|
||||
</a-table>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="网格长" force-render>
|
||||
<a-tab-pane key="2" tab="网格区域" force-render>
|
||||
<a-table
|
||||
size="default"
|
||||
ref="table"
|
||||
@ -48,8 +47,22 @@
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleFloorView(record.id)">详情</a>
|
||||
<!-- <a v-if="editEnabel" @click="handleEdit(record)">指派</a>-->
|
||||
<!-- <a-divider type="vertical" />-->
|
||||
</span>
|
||||
</a-table>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="网格长">
|
||||
<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>
|
||||
</a-tab-pane>
|
||||
@ -59,7 +72,7 @@
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { getWorkerList, getFloorList } from '@/api/admin/repair/repairStats'
|
||||
import { getWorkerList, getFloorList, getFloorCreateList } from '@/api/admin/repair/repairStats'
|
||||
import { checkPermission } from '@/utils/permissions'
|
||||
|
||||
export default {
|
||||
@ -83,6 +96,47 @@ export default {
|
||||
advanced: false,
|
||||
// 查询参数
|
||||
queryParam: {},
|
||||
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' }
|
||||
}
|
||||
],
|
||||
floorColumns: [
|
||||
{
|
||||
title: '楼层负责人',
|
||||
@ -183,7 +237,8 @@ export default {
|
||||
removeEnable: checkPermission('admin:repair:list'),
|
||||
loadData: [],
|
||||
workerData: [],
|
||||
floorData: []
|
||||
floorData: [],
|
||||
floorCreateData: []
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
@ -201,6 +256,7 @@ export default {
|
||||
created () {
|
||||
this.workerList()
|
||||
this.floorList()
|
||||
this.floorCreateList()
|
||||
},
|
||||
methods: {
|
||||
// admin/repair/stats/workerList
|
||||
@ -214,10 +270,14 @@ export default {
|
||||
this.floorData = res.rows
|
||||
})
|
||||
},
|
||||
floorCreateList (){
|
||||
getFloorCreateList().then(res => {
|
||||
this.floorCreateData = res.rows
|
||||
})
|
||||
},
|
||||
callback () {
|
||||
|
||||
},
|
||||
|
||||
handleAdd () {
|
||||
this.$refs.modal.add()
|
||||
},
|
||||
@ -229,6 +289,9 @@ export default {
|
||||
this.$router.push({ name: 'repair', query: { floorId: floorId } })
|
||||
|
||||
},
|
||||
handleFloorCreateView(floorId){
|
||||
this.$router.push({ name: 'repair', query: { floorCreateId: floorId } })
|
||||
},
|
||||
handleEdit (record) {
|
||||
this.$refs.modal.edit(record)
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user