This commit is contained in:
nyoung 2024-08-22 22:04:46 +08:00
parent adf1e5b60b
commit 40dc3c5e9c
3 changed files with 35 additions and 11 deletions

View File

@ -2,7 +2,7 @@
<view>
<view class="orderCard" @click="onShowDetail">
<view class="orderCardHeader">
<text class="orderCardType">{{orderData.rescueTypeStr}}</text>
<text class="orderCardType">{{ getRescueTypeStr() }}</text>
<text class="orderCardTitle">{{ orderData.rescuePosition }}</text>
</view>
<view class="orderCardStatus">
@ -27,13 +27,13 @@
系统正在派单中...
</view>
<view v-if="orderData.rescueStatus > 2">
<text class="orderCardDriver">先伟</text>
<text class="orderCardDriver">{{ orderData.driverName || "" }}</text>
驾驶
<text class="orderCardCarNo">鲁A12345</text>
<text class="orderCardCarNo">{{ orderData.driverCarNum || "" }}</text>
</view>
</view>
<view class="orderCardFooter">
<text class="orderCardDateTime">2024-08-18 10:33</text>
<text class="orderCardDateTime">{{ orderData.rescueTime || "" }}</text>
<view class="orderCardBtnGroup">
<template v-if="role == 'ddzx' && orderData.rescueStatus <= 2">
<view @click.stop="deleteId" class="orderCardBtnGroupItem" style="background-color: #fff;color: #317DFA">
@ -76,6 +76,29 @@
}
},
methods: {
getRescueTypeStr(){
if(this.orderData.rescueTypeStr){
return this.orderData.rescueTypeStr
}
switch (this.orderData.rescueType){
case '1':
return '拖车'
case '2':
return '送油'
case '3':
return '搭电'
case '4':
return '换胎'
case '5':
return '扣车'
case '6':
return '事故'
case '7':
return '秩序'
default:
return ''
}
},
onShowDetail() {
uni.navigateTo({
url: '/pages/details/details?id=' + this.orderData.id

View File

@ -324,14 +324,14 @@
}
if (this.sfindex == 'police') {
request({
url: '/getJjInfo',
url: '/rescue/getJjInfo',
method: 'get',
}).then((res) => {
let userJson = {}
userJson.userId = res.user.userId
uni.setStorageSync('userInfo', res.user)
uni.setStorageSync('role', res.role)
uni.setStorageSync('userId', res.user.userId)
userJson.userId = res.data.user.userId
uni.setStorageSync('userInfo', res.data.user)
uni.setStorageSync('role', res.data.roles)
uni.setStorageSync('userId', res.data.user.userId)
this.goselect()
})
}

View File

@ -54,6 +54,7 @@ const request = config => {
reject(code)
}
res.data.code = (res.data.code === 0 ? 200 : res.data.code)
if(res.data.data && res.data.data.records){
res.data.rows = res.data.data.records
@ -61,7 +62,7 @@ const request = config => {
if(res.data.data && res.data.data.total){
res.data.total = res.data.data.total
}
console.log(res.data,'res.data')
resolve(res.data)
})
.catch(error => {