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