修改了对应bug

This commit is contained in:
chenze 2024-08-30 10:26:59 +08:00
parent 34c72cf67f
commit 0f475d7560

View File

@ -26,20 +26,20 @@
</a-col> </a-col>
<a-col :md="5" :sm="15"> <a-col :md="5" :sm="15">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="故障类型"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="故障类型">
<a-select :label-in-value="true" <a-select v-model="queryParam.typeId"
v-decorator="['typeId', {rules: [{ required: true, message: '请选择故障类型' }]}]" v-decorator="['typeId']"
@change="selectDevice"> @change="selectDevice">
<a-select-option v-for="item in typeList" :key="item.id" :value="item.id">{{ item.name }} <a-select-option v-for="item in typeList" :key="item.id">{{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="5" :sm="15"> <a-col :md="5" :sm="15">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="报修设备"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="报修设备">
<a-select :label-in-value="true" <a-select v-model="queryParam.deviceId"
v-decorator="['deviceId', {rules: [{ required: true, message: '请选择所属设备' }]}]" v-decorator="['deviceId', {rules: [{ required: true, message: '请选择所属设备' }]}]"
@change="getDeviceName"> @change="getDeviceName">
<a-select-option v-for="item in deviceList" :key="item.id" :value="item.id">{{ item.name }} <a-select-option v-for="item in deviceList" :key="item.id">{{ item.name }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@ -251,11 +251,11 @@ export default {
dataIndex: 'sn' dataIndex: 'sn'
}, },
{ {
title: '所属分类', title: '故障类别',
dataIndex: 'typeName' dataIndex: 'typeName'
}, },
{ {
title: '设备名称', title: '故障子类',
dataIndex: 'deviceName' dataIndex: 'deviceName'
}, },
{ {
@ -301,12 +301,12 @@ export default {
// :1 ,3 ,5 ,7 , 9 , 11 13 // :1 ,3 ,5 ,7 , 9 , 11 13
statusFilter (status) { statusFilter (status) {
const statusMap = { const statusMap = {
'1': '待分配', '1': '待派单',
'3': '重新派单', '3': '重新派单',
'5': '已派单', '5': '已派单',
'7': '处理中', '7': '处理中',
'9': '已完成,待评价', '9': '已完成,待评价',
'11': '已关闭', '11': '无效申请',
'13': '已评价' '13': '已评价'
} }
return statusMap[status] return statusMap[status]
@ -327,6 +327,7 @@ export default {
}, },
reset () { reset () {
this.queryParam = {} this.queryParam = {}
this.queryParam.typeId = ''
this.selectRepairList() this.selectRepairList()
}, },
customRequest (file) { customRequest (file) {
@ -401,16 +402,15 @@ export default {
}) })
}, },
// //
selectDevice (item) { selectDevice (typeId) {
getRepairDeviceList({ 'typeId': item.key }).then(res => { getRepairDeviceList({ 'typeId': typeId }).then(res => {
this.deviceList = res.rows this.deviceList = res.rows
}) })
this.queryParam.typeId = item.key this.queryParam.typeId = typeId
console.log(this.queryParam.typeId)
}, },
getDeviceName (item) { getDeviceName (deviceId) {
this.deviceName = item.label this.queryParam.deviceId = deviceId
this.queryParam.deviceId = item.key
}, },
// //
selectRepairList () { selectRepairList () {
@ -449,7 +449,8 @@ export default {
'endTime': this.queryParam.endTime, 'endTime': this.queryParam.endTime,
'evalService': this.queryParam.evalService, 'evalService': this.queryParam.evalService,
'timeout': this.queryParam.timeout, 'timeout': this.queryParam.timeout,
'remark': this.queryParam.remark 'remark': this.queryParam.remark,
'name': this.queryParam.name
} }
} }
getRepairList(datas).then(res => { getRepairList(datas).then(res => {