index.vue 3.36 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
<template>
<view class="home">
<!-- 个人信息 -->
<view class="infoUser">
<view class="logo">
<img :src="userInfo.icon" alt="" />
</view>
<view class="box-title">
<span class="box-title1">手机号:{{userInfo.phone}}</span>
<view class="box-view">
<span >{{userInfo.hospital || ''}}</span>
<span v-if="userInfo.type === 1">医生</span>
<span v-if="userInfo.type === 2">护士</span>
</view>
</view>
</view>
<!-- 智能建档 地图导航 -->
<view class="box-function">
<view class="box1" @click="getpack">
<img src="/static/zhineng.png" alt="" />
<view>
<view>智能建档</view>
<view>一键上传患者信息</view>
</view>
</view>
<view class="box2" @click="getpackList">
<img src="/static/ditu.png" alt="" />
<view>
<view>地图导航</view>
</view>
</view>
</view>
</view>
</template>

<script>
import {request} from '../../request/request.js'
export default {
data(){
return{
userInfo:{
},
getfirstList:[]
}
},
// created(){
// this.getfirstList()
// },
mounted() {
this.getInfoList()
this.getfirstList1()
},
onShow() {
// 在页面显示时触发的逻辑,可以在这里更新数据
this.getInfoList()
this.getfirstList1()
},
methods:{
//获取急救列表
async getfirstList1(){
this.getfirstList = await request({url:'/dispatchOrder'})
},
// 跳转页面
getpack(){
uni.navigateTo({
url:'/pages/Intelligent/index'
})
},
getpackList(){
if(this.getfirstList.length === 0 ){
uni.showToast({
title:'目前没有正在进行的急救任务'
})
}else {
uni.navigateTo({
url:'/pages/mapLIst/map'
})
}
},
// 获取个人信息
async getInfoList(){
const res = await request({url:'/user/info'})
this.userInfo = res
},
}
}
</script>

<style scoped lang="scss">
.home{
width: 100%;
height: 100%;
background: linear-gradient(to bottom, #418FF9, #4175F9,#538DEB);
padding: 0 30rpx ;
padding-top:20rpx ;
padding-bottom: 20rpx;
}
.infoUser{
display: flex;
align-items: center;
.box-title{
color: #FFFFFF;
.box-title1{
font-size: 36rpx;
}
.box-view{
span {
width: 256rpx;
height: 33rpx;
background: rgba(255,255,255,.2);
border-radius: 17rpx 17rpx 17rpx 17rpx;
font-size: 30rpx;
padding: 10rpx;
margin-right: 10rpx;
}
}
}
}
.infoUser .logo{
width: 134rpx;
height: 134rpx;
border-radius: 50%;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
margin-right: 30rpx;
img{
height: 80rpx;
width: 80rpx;
}
}
.box-function{
width: 690rpx;
height: 210rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
margin: 40rpx 0rpx;
margin-top: 80rpx;
display: flex;
justify-content:space-evenly;
align-items: center;
.box1 ,.box2{
width: 311rpx;
height: 131rpx;
background: #F5F9FD;
display: flex;
justify-content:space-evenly;
align-items: center;
img {
width: 80rpx;
height: 80rpx;
}
view{
font-family: SourceHanSansSC, SourceHanSansSC;
font-weight: 400;
font-size: 28rpx;
color: #272726;
line-height: 36rpx;
text-align: left;
font-style: normal;
text-transform: none;
}
}

}
</style>