detailPages.vue 7.31 KB
   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
<template>
<view class="detailPages">
<view class="head-back">
<view class="userName">
<view class="name">
{{userInfo.licencePlate}}
</view>
<view class="jiashiyuan">
驾驶员:{{userInfo.driver}}
</view>
<view class="discharge">
<view class="icon">
<img src="/static/baishijz.png" alt="" />
</view>
<view class="time">
出车时间:{{userInfo.drivingTime}}
</view>
</view>
<view class="discharge" v-if="userInfo.status === 3">
<view class="icon">
<img src="/static/baishijz.png" alt="" />
</view>
<view class="time">
回院时间:{{userInfo.drivingEndTime || ''}}
</view>
</view>
</view>
<!-- 急救信息 -->
<view class="head-center">
<view class="head-center-item">
<view class="item-title">
急救任务:{{userInfo.orderNo}}
</view>
</view>
<view class="head-center-item">
<view class="item-title-flex">
<view class="user">
医生
</view>
<view class="name">
<view v-if="!type">{{userInfo.doctorName}}</view>
<u-input placeholder-style="input-placeholder" v-else v-model="userInfo.doctorName" :border="true" :type="text" />
</view>
</view>
</view>
<view class="head-center-item">
<view class="item-title-flex">
<view class="user">
护士
</view>
<view class="name">
<!-- {{userInfo.nurseName}} -->
<view v-if="!type">{{userInfo.nurseName}}</view>
<u-input placeholder-style="input-placeholder" v-else v-model="userInfo.nurseName" :border="true" :type="text" />
</view>
</view>
</view>
<view class="head-center-item">
<view class="item-title-flex">
<view class="user" style="width: 200rpx;">
患者地址
</view>
<view class="name">
<view v-if="!type">{{userInfo.address}}</view>
<u-input placeholder-style="input-placeholder" v-else v-model="userInfo.address" :border="true" :type="text" />
</view>
</view>
</view>
</view>
<!-- 第二段 -->
<view class="head-center" style="margin-top: 30rpx;">
<view class="head-center-item">
<view class="item-title-flex">
<view class="user">
送往医院
</view>
<view class="name">
<!-- {{userInfo.hospital}} -->
<view v-if="!type">{{userInfo.hospital}}</view>
<u-input placeholder-style="input-placeholder" v-else v-model="userInfo.hospital" :border="true" :type="text" />
</view>
</view>
</view>
<view class="head-center-item">
<view class="item-title-flex">
<view class="user">
来电号码
</view>
<view class="name">
<view v-if="!type">{{userInfo.phone}}</view>
<u-input placeholder-style="input-placeholder" v-else v-model="userInfo.phone" :border="true" :type="text" />
</view>
</view>
</view>
<view class="head-center-item">
<view class="item-title-flex">
<view class="user">
病情类型
</view>
<view class="name">
<!-- {{userInfo.bruiseType}} -->
<view v-if="!type">{{userInfo.bruiseType}}</view>
<u-input placeholder-style="input-placeholder" v-else v-model="userInfo.bruiseType" :border="true" :type="text" />
</view>
</view>
</view>
<view class="head-center-item">
<view class="item-title-flex">
<view class="user">
病情等级
</view>
<view class="name">
<view v-if="!type">{{userInfo.bruiseLevel}}</view>
<u-input placeholder-style="input-placeholder" v-else v-model="userInfo.bruiseLevel" border-color="#eee" :focus="true" :border="true" :type="text" />
</view>
</view>
</view>
</view>
<view class="bottom" v-if="!type && userInfo.status !== 3">
<button type="default" class="button" @click="editExtractBtn">修改</button>
</view>
<view class="bottom" v-if="type ===1">
<button type="default" class="button" @click="extractBtn">确认</button>
</view>
</view>
</view>
</template>

<script>
import {request} from '../../request/request.js'
export default {
data(){
return {
id:'',
userInfo:{},
type:null
}
},
onLoad({id}) {
this.id = id
this.getUserInfo(id)
},
methods:{
// 确认
async extractBtn(){
const data = this.userInfo
delete data.drivingTime
await request({url:'/dispatchOrder/update',method:'POST',data})
this.type = null
uni.navigateBack({
delta: 1 // 返回的页面数,1表示返回上一级页面
});
},
// 修改
editExtractBtn(){
this.type = 1
},
// 获取信息
async getUserInfo(id){
this.userInfo = await request({url:`/dispatchOrder/taskParticulars/${id}`})
}
}
}
</script>

<style scoped lang="scss">
::v-deep input {
text-align: right !important;
color: #656565 !important;
margin-right: -18rpx;
font-size: 30rpx !important;
}
.detailPages{
width: 100vw;
height: 100vh;
background-color: #eee;
.head-center {
background-color: #FFFFFF;
.head-center-item{
width: 100%;
height: 88rpx;
background: #FFFFFF;
padding: 0 30rpx;
.item-title{
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 400;
font-size: 30rpx;
color: #999999;
line-height: 88rpx;
border-bottom: 2rpx solid #D7D7D7;
}
.item-title-flex{
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
margin-right: 50rpx;
.user{
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 400;
font-size: 30rpx;
color: #1B1B20;
}
.name{
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 400;
font-size: 30rpx;
color: #656565;
}
}
}
}
.bottom{
margin-top: 50rpx;
height: 200rpx;
background-color: #FFFFFF;
display: flex;
align-items: center;
.button{
width: 721rpx;
height: 100rpx;
line-height: 100rpx;
background: #5581FF;
box-shadow: 8rpx 0rpx 16rpx 0rpx #2385FF;
border-radius: 44rpx 44rpx 44rpx 44rpx;
color: #FFFFFF;
}
}
.head-back{
width: 100%;
height: 350rpx;
background: url('/static/tuceng.png') no-repeat center ;
background-size: 100% 100%;
.discharge{
display: flex;
align-items: center;
margin-top: 20rpx;
.icon{
width: 40rpx;
height: 40rpx;
margin-right: 20rpx;
img {
height: 100%;
width: 100%;
}
}
.time {
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: 400;
font-size: 22rpx;
color: #F9F9F9;
// line-height: 40rpx;
}
}
.userName{
padding: 20rpx;
padding-left: 40rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.name{
margin-top: 30rpx;
font-family: SourceHanSansCN, SourceHanSansCN;
font-weight: bold;
font-size: 36rpx;
color: #FFFFFF;
// line-height: 20rpx;
}
.jiashiyuan{
margin-top: 20rpx;
font-weight: 400;
font-size: 26rpx;
color: #FFFFFF;
// line-height: 20rpx;
}
}
}
}
</style>