Browse Source

添加定点机构信用等级及实时获取就医指标数据。

zjj_happy 6 months ago
parent
commit
10e5773df2

+ 13
- 1
assets/api/mechanism.js View File

@@ -1,4 +1,4 @@
1
-import { Request } from "@/assets/js/request.js"
1
+import { Request, Request2 } from "@/assets/js/request.js"
2 2
 
3 3
 /**
4 4
  * @name 根据ID获取用户信息
@@ -60,4 +60,16 @@ export async function GetServeCateListById(params) {
60 60
     return await Request("/serveCate/port/GetServeCateListById", params)
61 61
 }
62 62
 
63
+/**
64
+ * @name 根据医院编码获取定点医院就医指标数据
65
+ */
66
+export async function getHospJyzb(params) {
67
+    return await Request2("/sana/web/query/41072?queryid=41072", params)
68
+}
63 69
 
70
+/**
71
+ * @name 根据机构编码获取定点机构信用等级数据
72
+ */
73
+export async function getCreditLevel(params) {
74
+    return await Request2("/sana/web/query/41073?queryid=41073", params)
75
+}

+ 18
- 1
assets/js/request.js View File

@@ -1,4 +1,4 @@
1
-import { doMain } from "../../config.js"
1
+import { doMain,doMain2 } from "../../config.js"
2 2
 // let token = uni.getStorageSync("token")
3 3
 // console.log("token", token)
4 4
 export async function Request(url, params, method = 'POST') {
@@ -30,4 +30,21 @@ export async function Request(url, params, method = 'POST') {
30 30
         })
31 31
     }
32 32
     return info ? info : null
33
+}
34
+
35
+export async function Request2(url, params, method = 'POST') {
36
+    const header = {
37
+            'token': '2f30caa1eb664d619f8e7fe4dac73887'
38
+        }
39
+        // console.log("header--", header)
40
+    let res = await uni.request({
41
+            method,
42
+            url: `${doMain2}${url}`,
43
+            data: params,
44
+            // timeout:6000,
45
+            header: header
46
+        })
47
+        // console.log( 'Request--', res )
48
+    let info = res[1]
49
+    return info ? info : null
33 50
 }

+ 98
- 2
components/index/mechanism.vue View File

@@ -24,6 +24,11 @@
24 24
 						<view class="name">
25 25
 							<text class="name_text">{{ item.name ? item.name.replace(/\s+/g, '') : '' }}</text>
26 26
 						</view>
27
+						<view class="creditlevel" v-if="showCreditLevel">
28
+							<span style="margin-left: 4rpx"></span>
29
+							<!-- 信用等级:优(100分) -->
30
+							{{creditLevel}}
31
+						</view>
27 32
 						<view class="adds phone_box" v-if="item.phone && item.cate_id != 6">
28 33
 							<view class="label">
29 34
 								<u-icon name="phone" color="#909399" size="14"></u-icon>
@@ -93,6 +98,7 @@
93 98
 </template>
94 99
 
95 100
 <script>
101
+	import { getCreditLevel } from "../../assets/api/mechanism.js"
96 102
 	export default {
97 103
 		data() {
98 104
 			return {
@@ -103,6 +109,70 @@
103 109
 				ybzx: require("../../static/imgs/ybzx.png"),
104 110
 				active: require("../../static/active.png"),
105 111
 				inactive: require("../../static/inactive.png"),
112
+				creditLevel: '',
113
+				greatMeCodeList:[
114
+					'H41010300001',
115
+					'H41010500684',
116
+					'H41010500009',
117
+					'H41010500003',
118
+					'H41010500008',
119
+					'H41010500004',
120
+					'H41010500005',
121
+					'H41010300006',
122
+					'H41010500002',
123
+					'H41010300007',
124
+					'H41071103110',
125
+					'H41010200699',
126
+					'H41010300709',
127
+					'H41010500025',
128
+					'H41010200026',
129
+					'H41010500028',
130
+					'H41010500030',
131
+					'H41010500041',
132
+					'H41010500039',
133
+					'H41010500700',
134
+					'H41020200165',
135
+					'H41010400042',
136
+					'H41018400036',
137
+					'H41010400010',
138
+					'H41017300179',
139
+					'H41017301133',
140
+					'H41010300011',
141
+					'H41010400012',
142
+					'H41010801134',
143
+					'H41010200077',
144
+					'H41010200082',
145
+					'H41010500054',
146
+					'H41010200019',
147
+					'H41017100014',
148
+					'H41010300021',
149
+					'H41010300013',
150
+					'H41010500022',
151
+					'H41010400024',
152
+					'H41010500016',
153
+					'H41018201132',
154
+					'H41010500148',
155
+					'H41010400043',
156
+					'H41010400996',
157
+					'H41019901218',
158
+					'H41010201394',
159
+					'H41019901410',
160
+					'H41017100017',
161
+					'H41010500032',
162
+					'H41010500033',
163
+					'H41010300037',
164
+					'H41010300015',
165
+					'H41010200031',
166
+					'H41010400729',
167
+					'H41010300023',
168
+					'H41010200029',
169
+					'H41010300035',
170
+					'H41018300040',
171
+					'H41010500027',
172
+					'H41010200049',
173
+					'H41017200021',
174
+					'H41010300100'
175
+				],
106 176
 			}
107 177
 		},
108 178
 		props: {
@@ -125,7 +195,24 @@
125 195
 
126 196
 		},
127 197
 		computed: {
128
-
198
+			showCreditLevel() {
199
+				//console.log("****************125");
200
+				if(this.item.cate_id != 2 && this.item.cate_id != 3) {
201
+					return false;
202
+				}
203
+				if(this.item.creditLevel && item.creditLevel != '') {
204
+					this.creditLevel = this.item.creditLevel;
205
+					return true;
206
+				} else {
207
+					for(var i = 0; i < this.greatMeCodeList.length; i++) {
208
+						if(this.greatMeCodeList[i] == this.item.me_code) {
209
+							this.creditLevel = "信用等级:优(100分)"
210
+							return true;
211
+						}
212
+					}
213
+				}
214
+				return false;
215
+			}
129 216
 
130 217
 		},
131 218
 		onPullDownRefresh() {
@@ -264,7 +351,7 @@
264 351
 
265 352
 				.btns_box {
266 353
 					width: 100%;
267
-					padding-top: 20rpx;
354
+					//padding-top: 20rpx;
268 355
 					display: flex;
269 356
 					align-items: center;
270 357
 					justify-content: flex-start;
@@ -419,6 +506,15 @@
419 506
 							}
420 507
 
421 508
 						}
509
+						.creditlevel {
510
+							margin-top: 4rpx;
511
+							margin-bottom: 4rpx;
512
+							padding: 6rpx 12rpx;
513
+							color: #5e8ff4;//#1818f9;
514
+							background: #edf3fe;//#d0dcf3;
515
+							font-size: 26rpx;
516
+							width: fit-content;
517
+						}
422 518
 
423 519
 						.add.address.style-date {
424 520
 							overflow: unset;

+ 4
- 2
config.js View File

@@ -1,5 +1,6 @@
1 1
 // 本地开发环境
2
-// export const doMain = "http://39.104.186.120:3040/app"
2
+//export const doMain = "http://39.104.186.120:3040/app"
3
+// export const doMain = "http://localhost:3040/app"
3 4
 
4 5
 // 线上测试环境
5 6
 // export const doMain = "https://ybyy.acjing166.cn/app";
@@ -7,4 +8,5 @@
7 8
 // 线上生产环境
8 9
 //export const doMain = "https://ybjyy.smallapp.kcshuzi.com:8444/app"
9 10
 
10
-export const doMain = "https://cc-e.chs.zhengzhou.gov.cn/gzh/app"
11
+export const doMain = "https://cc-e.chs.zhengzhou.gov.cn/gzh/app"
12
+export const doMain2 = "https://cc-e.chs.zhengzhou.gov.cn/gzh/sana"

+ 54
- 2
pages/index/MeCate.vue View File

@@ -122,7 +122,8 @@
122 122
 	import {
123 123
 		getMechanismInfoById,
124 124
 		getCateById,
125
-		GetServeCateListForMid
125
+		GetServeCateListForMid,
126
+		getHospJyzb
126 127
 	} from "../../assets/api/mechanism.js"
127 128
 	import {
128 129
 		GetTreeData
@@ -160,6 +161,8 @@
160 161
 
161 162
 				tabList: ["简介", "参保登记类"],
162 163
 				TabCur: 0,
164
+				meCode : "",
165
+				hospJyzb: {}
163 166
 			}
164 167
 		},
165 168
 		components: {
@@ -201,7 +204,7 @@
201 204
 				return arr;
202 205
 			},
203 206
 
204
-			hosFit() {
207
+			hosFit0() {
205 208
 				if (this.info && this.info.hosInfo) {
206 209
 					const obj = JSON.parse(this.info.hosInfo);
207 210
 					console.log("obj", obj)
@@ -228,6 +231,33 @@
228 231
 					return null;
229 232
 				}
230 233
 
234
+			},
235
+
236
+			hosFit() {
237
+				if (this.hospJyzb && this.hospJyzb.rc) {
238
+					let newArr = [{
239
+							label: "人次:",
240
+							value: this.hospJyzb.rc
241
+						},
242
+						{
243
+							label: "次均费用:",
244
+							value: this.hospJyzb.cjfy
245
+						},
246
+						{
247
+							label: "报销率:",
248
+							value: this.hospJyzb.bxbl ? this.hospJyzb.bxbl*100 + '%' : ''
249
+						},
250
+						{
251
+							label: "平均住院天数:",
252
+							value: this.hospJyzb.pjzyts ? this.hospJyzb.pjzyts + '天' : ''
253
+						}
254
+					];
255
+					console.log("newArr", newArr)
256
+					return newArr;
257
+				} else {
258
+					return null;
259
+				}
260
+
231 261
 			}
232 262
 		},
233 263
 
@@ -312,6 +342,25 @@
312 342
 					this.getList()
313 343
 				}
314 344
 			},
345
+						
346
+			/**
347
+			 * @param {Object} 获取定点医院就医指标数据
348
+			 */
349
+			async getHospJyzb(code) {
350
+				if(code == '' || code == this.meCode) {
351
+					return;
352
+				}
353
+				this.meCode = code;
354
+				this.hospJyzb = {};
355
+				let res = await getHospJyzb({
356
+					query_id: "41072",
357
+					stt_f: code
358
+				})
359
+				if (res.data.success && res.data.data.length > 0) {
360
+					this.hospJyzb = res.data.data[0];
361
+					console.log(this.hospJyzb);
362
+				}
363
+			},
315 364
 
316 365
 			// 处理children为null
317 366
 			handleChilren(arr) {
@@ -427,6 +476,9 @@
427 476
 						this.info.end_time = this.info.end_time ? this.info.end_time : "17:00"
428 477
 						// console.log( this.info.cate_id );
429 478
 						this.getCate(this.info.cate_id)
479
+						if(this.info.cate_id == 2 && this.info.me_code) {
480
+							this.getHospJyzb(this.info.me_code)
481
+						}
430 482
 					}
431 483
 				}
432 484
 			},

+ 2
- 2
pages/index/index.vue View File

@@ -385,7 +385,7 @@
385 385
 				const that = this
386 386
 				let res = await GetUserDetails()
387 387
 				console.log('GetUserDetails---', res);
388
-				if (res.data.code == 1) {
388
+				if (res.data && res.data.code && res.data.code == 1) {
389 389
 					that.userInfo.avatar = res.data.data.avatar
390 390
 					that.userInfo.nickname = res.data.data.nickname
391 391
 					that.userInfo.phone = res.data.data.user_name
@@ -665,7 +665,7 @@
665 665
 					ymd,
666 666
 					openid,
667 667
 				})
668
-				if (res.data.code == 1) {
668
+				if (res.data && res.data.code && res.data.code == 1) {
669 669
 					let hasOrderInfo = res.data.data
670 670
 					// 用户已预约 重定向到  预约结果页面
671 671
 					// if (hasOrderInfo && hasOrderInfo.ID) {

+ 2
- 2
pages/user/index/index.vue View File

@@ -62,7 +62,7 @@
62 62
       </view>
63 63
     </view>
64 64
     <view class="jl">
65
-      <view class="make-info">
65
+      <!-- <view class="make-info">
66 66
         <view class="card-item" @click="goMake(0)">
67 67
           <text class="text">预约记录</text>
68 68
           <u-icon name="arrow-right" color="#ababab" size="15"></u-icon>
@@ -85,7 +85,7 @@
85 85
             <text class="text">预约完成</text>
86 86
           </view>
87 87
         </view>
88
-      </view>
88
+      </view> -->
89 89
       <view class="make-info">
90 90
         <view class="card-item" @click="aboutHandle()">
91 91
           <view class="text">

BIN
static/lunbo01.png View File


Loading…
Cancel
Save