guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 1 | <template> |
| 2 | <view class="appointment"> |
| 3 | <view class="appointment-header" @click="getLocal"> |
| 4 | <u-image src="./images/app_bannar.png" width="100%" mode="widthFix"></u-image> |
| 5 | <u-icon name="map" color="#52B6E6" size="36" :label="local" class="appointment-header-icon"></u-icon> |
| 6 | </view> |
| 7 | <view class="appointment-search"> |
| 8 | <u-search placeholder="搜索医院名称" v-model="hospial" :show-action="false" bg-color="#ffffff" @focus="toPath('/pages/sub_medical/hospital')"></u-search> |
| 9 | </view> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 10 | <!-- <view class="appointment-record"> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 11 | <u-cell-group> |
| 12 | <u-cell-item title="我的挂号记录" value="查看更多" @click="toPath('/pages/sub_medical/record')"></u-cell-item> |
| 13 | </u-cell-group> |
| 14 | <view class="appointment-record-msg" v-if="record_list.length != 0"> |
| 15 | <view class="appointment-record-msg-left"> |
| 16 | <u-image src="/static/images/active/mrlfl.png" width="100" mode="widthFix"></u-image> |
| 17 | </view> |
| 18 | <view class="appointment-record-msg-center"> |
| 19 | <view class="appointment-record-msg-center-item"> |
| 20 | <text class="appointment-record-msg-center-item-title">就诊人员:</text> |
| 21 | <text class="appointment-record-msg-center-item-value">李小萌</text> |
| 22 | </view> |
| 23 | <view class="appointment-record-msg-center-item"> |
| 24 | <text class="appointment-record-msg-center-item-title">就诊医院:</text> |
| 25 | <text class="appointment-record-msg-center-item-value">大理市第二人民医院</text> |
| 26 | </view> |
| 27 | <view class="appointment-record-msg-center-item"> |
| 28 | <text class="appointment-record-msg-center-item-title">就诊科室:</text> |
| 29 | <text class="appointment-record-msg-center-item-value">普外科</text> |
| 30 | </view> |
| 31 | <view class="appointment-record-msg-center-item"> |
| 32 | <text class="appointment-record-msg-center-item-title">就诊时间:</text> |
| 33 | <text class="appointment-record-msg-center-item-value">2020-10-27【上午】</text> |
| 34 | </view> |
| 35 | </view> |
| 36 | <view class="appointment-record-msg-right"> |
| 37 | <text class="appointment-record-msg-status">挂号成功</text> |
| 38 | </view> |
| 39 | </view> |
| 40 | <view class="appointment-record-nomsg" v-else> |
| 41 | <text>暂无挂号记录</text> |
| 42 | </view> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 43 | <view class="appointment-record-btn"> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 44 | <u-button :plain="true" size="mini" type="primary" shape="circle">取消预约</u-button> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 45 | </view> |
| 46 | </view> --> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 47 | <view class="appointment-hospital"> |
| 48 | <u-cell-group> |
| 49 | <u-cell-item title="本地医院" value="查看更多" @click="toPath('/pages/sub_medical/hospital')"></u-cell-item> |
| 50 | </u-cell-group> |
| 51 | <view class="appointment-hospital-msg" v-if="hospital_list.length != 0"> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 52 | <view class="appointment-hospital-msg-box" @click="toPath('/pages/sub_medical/cashFlow?hospitalcode=' + v.hospitalcode)" v-for="(v,i) in hospital_list" :key="i"> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 53 | <view class="appointment-hospital-msg-left"> |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 54 | <u-image :src="v.icon" width="100" mode="widthFix"></u-image> |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 55 | </view> |
| 56 | <view class="appointment-hospital-msg-right"> |
| 57 | <view class="appointment-hospital-msg-right-item"> |
| 58 | <text class="appointment-hospital-msg-right-item-logo">{{v.level}}</text> |
| 59 | <text class="appointment-hospital-msg-right-item-value" style="color: #333333;font-size: 32rpx;">{{v.name}}</text> |
| 60 | </view> |
| 61 | <view class="appointment-hospital-msg-right-item"> |
| 62 | <text class="appointment-hospital-msg-right-item-title">地理位置:</text> |
| 63 | <text class="appointment-hospital-msg-right-item-value">{{v.address}}</text> |
| 64 | </view> |
| 65 | <view class="appointment-hospital-msg-right-item"> |
| 66 | <text class="appointment-hospital-msg-right-item-title">门诊时间:</text> |
| 67 | <text class="appointment-hospital-msg-right-item-value">{{v.time}}</text> |
| 68 | </view> |
| 69 | </view> |
| 70 | </view> |
| 71 | </view> |
| 72 | <view class="appointment-hospital-nomsg" v-else> |
| 73 | <text>暂无医院数据</text> |
| 74 | </view> |
| 75 | </view> |
| 76 | </view> |
| 77 | </template> |
| 78 | |
| 79 | <script> |
| 80 | export default { |
| 81 | data() { |
| 82 | return { |
| 83 | local: '大理', |
| 84 | hospial: '', |
| 85 | hospital_list:[], |
| 86 | record_list:[] |
| 87 | } |
| 88 | }, |
| 89 | onLoad() { |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 90 | uni.setNavigationBarTitle({title:'医院查询'}) |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 91 | this.get_hospital_list() |
| 92 | this.getLocal() |
| 93 | }, |
| 94 | methods: { |
| 95 | getLocal() { |
| 96 | let that = this |
| 97 | uni.getLocation({ |
| 98 | type: 'gcj02', |
| 99 | geocode: true, |
| 100 | success(res) { |
| 101 | console.log(res) |
| 102 | // #ifdef APP-PLUS |
| 103 | that.local = res.address.city |
| 104 | // #endif |
| 105 | }, |
| 106 | fail(ret){ |
| 107 | that.local = '获取位置失败' |
| 108 | console.log(ret) |
| 109 | } |
| 110 | }) |
| 111 | }, |
| 112 | get_hospital_list(){ |
| 113 | let that = this |
| 114 | let params = { |
| 115 | pageno:1, |
| 116 | pagesize:3, |
| 117 | name:'' |
| 118 | } |
guangchao.xu | 50e4238 | 2021-01-04 17:53:47 +0800 | [diff] [blame^] | 119 | that.$u.get('/medicalapi/hospital/list',params).then(res=>{ |
| 120 | let url = uni.getStorageSync('imageurl') |
| 121 | let list = res.data.list |
| 122 | list.forEach(item=>{ |
| 123 | item.icon = url + '/' + item.picid |
| 124 | }) |
| 125 | that.hospital_list = list |
| 126 | console.log(list) |
guangchao.xu | 070005a | 2020-12-07 09:56:40 +0800 | [diff] [blame] | 127 | }) |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | </script> |
| 132 | |
| 133 | <style lang="scss" scoped> |
| 134 | /deep/.u-btn--primary--plain { |
| 135 | background-color: #FFFFFF !important; |
| 136 | } |
| 137 | |
| 138 | .u-cell { |
| 139 | padding: 30rpx 20rpx; |
| 140 | } |
| 141 | |
| 142 | /deep/.u-cell__right-icon-wrap { |
| 143 | height: 54rpx; |
| 144 | } |
| 145 | |
| 146 | uni-button { |
| 147 | margin-left: 0; |
| 148 | margin-right: 0; |
| 149 | } |
| 150 | |
| 151 | .appointment { |
| 152 | font-family: "PingFang-SC-Medium"; |
| 153 | |
| 154 | &-header { |
| 155 | position: relative; |
| 156 | |
| 157 | &-icon { |
| 158 | position: absolute; |
| 159 | top: 20rpx; |
| 160 | left: 20rpx; |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | &-search { |
| 165 | padding: 30rpx; |
| 166 | } |
| 167 | |
| 168 | &-record { |
| 169 | background-color: #FFFFFF; |
| 170 | &-nomsg{ |
| 171 | display: flex; |
| 172 | justify-content: center; |
| 173 | align-items: center; |
| 174 | padding: 50rpx 30rpx; |
| 175 | } |
| 176 | |
| 177 | &-msg { |
| 178 | padding: 30rpx 10rpx; |
| 179 | display: flex; |
| 180 | justify-content: space-between; |
| 181 | |
| 182 | // align-items: center; |
| 183 | &-left { |
| 184 | flex: 1; |
| 185 | display: flex; |
| 186 | justify-content: center; |
| 187 | } |
| 188 | |
| 189 | &-center { |
| 190 | flex: 3; |
| 191 | |
| 192 | &-item { |
| 193 | padding: 0 0 10rpx; |
| 194 | |
| 195 | &-title { |
| 196 | color: #909399; |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | &-right { |
| 202 | display: flex; |
| 203 | justify-content: center; |
| 204 | flex: 1; |
| 205 | color: #3DC64F; |
| 206 | |
| 207 | &-item {} |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | &-btn { |
| 212 | padding: 0rpx 30rpx 30rpx; |
| 213 | display: flex; |
| 214 | justify-content: flex-end; |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | &-hospital { |
| 219 | background-color: #FFFFFF; |
| 220 | margin: 30rpx 0; |
| 221 | |
| 222 | &-nomsg{ |
| 223 | display: flex; |
| 224 | justify-content: center; |
| 225 | align-items: center; |
| 226 | padding: 50rpx 30rpx; |
| 227 | } |
| 228 | |
| 229 | &-msg { |
| 230 | &-box { |
| 231 | display: flex; |
| 232 | justify-content: space-between; |
| 233 | padding: 30rpx 10rpx; |
| 234 | } |
| 235 | |
| 236 | &-left { |
| 237 | flex: 1; |
| 238 | display: flex; |
| 239 | justify-content: center; |
| 240 | } |
| 241 | |
| 242 | &-right { |
| 243 | display: flex; |
| 244 | flex: 4; |
| 245 | flex-direction: column; |
| 246 | |
| 247 | &-item { |
| 248 | padding: 0 0 10rpx; |
| 249 | display: flex; |
| 250 | align-items: center; |
| 251 | |
| 252 | &-logo { |
| 253 | display: inline-block; |
| 254 | background-color: #17C46F; |
| 255 | padding: 4rpx; |
| 256 | color: #FFFFFF; |
| 257 | font-size: 20rpx; |
| 258 | border-radius: 5rpx; |
| 259 | margin-right: 10rpx; |
| 260 | } |
| 261 | |
| 262 | &-title { |
| 263 | display: inline-block; |
| 264 | // flex: 1; |
| 265 | width: 140rpx; |
| 266 | color: #B5B5B5; |
| 267 | font-size: 26rpx; |
| 268 | } |
| 269 | |
| 270 | &-value { |
| 271 | display: inline-block; |
| 272 | // flex: 4; |
| 273 | color: #B5B5B5; |
| 274 | width: 400rpx; |
| 275 | white-space: nowrap; |
| 276 | text-overflow: ellipsis; |
| 277 | overflow: hidden; |
| 278 | font-size: 28rpx; |
| 279 | } |
| 280 | } |
| 281 | } |
| 282 | } |
| 283 | } |
| 284 | } |
| 285 | </style> |