فهرست منبع

Merge branch 'wlj_dev' into dev

xklr/wlj 2 سال پیش
والد
کامیت
5a1d5e1788
65فایلهای تغییر یافته به همراه4805 افزوده شده و 555 حذف شده
  1. 2 0
      .gitignore
  2. 41 10
      App.vue
  3. 4 0
      api/index.js
  4. 177 0
      api/request.js
  5. 69 0
      api/userinfo.js
  6. 35 0
      component/empty/empty.vue
  7. 18 0
      config/net.config.js
  8. 29 0
      config/setting.config.js
  9. 1 0
      index.html
  10. 5 3
      main.js
  11. 5 0
      package-lock.json
  12. 7 0
      package.json
  13. 16 13
      pages.json
  14. 2 7
      pages/chart-model/chart-model.vue
  15. 179 31
      pages/eye_ground/eye_ground.vue
  16. 130 0
      pages/health_report/component/annual_inspection_plan.vue
  17. 467 0
      pages/health_report/component/detection_result.vue
  18. 1374 0
      pages/health_report/component/report.vue
  19. 151 0
      pages/health_report/health_report.vue
  20. 125 292
      pages/home_monitoring/home_monitoring.vue
  21. 196 51
      pages/index/index.vue
  22. 91 26
      pages/medication/medication.vue
  23. 210 117
      pages/userinfo/userinfo.vue
  24. 21 0
      static/.config.json
  25. BIN
      static/favicon.ico
  26. BIN
      static/img/defult/c.png
  27. BIN
      static/img/defult/head1.png
  28. BIN
      static/img/defult/head2.png
  29. 0 0
      static/img/defult/pic.png
  30. 0 0
      static/img/index/dqyy.png
  31. 0 0
      static/img/index/grtz.png
  32. 0 0
      static/img/index/jjjc.png
  33. 0 0
      static/img/index/jkbg.png
  34. 0 0
      static/img/index/ydjc.png
  35. BIN
      static/img/other/1.jpg
  36. 0 0
      static/img/other/31fanhui2备份.png
  37. 0 0
      static/img/other/jcyy.png
  38. 0 0
      static/img/other/med.png
  39. 0 0
      static/img/other/tou.png
  40. 0 0
      static/img/other/xinl.png
  41. 0 0
      static/img/other/xl.png
  42. 0 0
      static/img/other/xlfw.png
  43. 0 0
      static/img/other/xtfw.png
  44. 0 0
      static/img/other/xuet.png
  45. 0 0
      static/img/other/xuetangjinru.png
  46. 0 0
      static/img/other/xy.png
  47. 0 0
      static/img/other/xy2.png
  48. 0 0
      static/img/other/ydjc.png
  49. 0 0
      static/img/other/you.png
  50. 0 0
      static/img/other/zjjy.png
  51. 0 0
      static/img/other/zuo.png
  52. 0 0
      static/img/userinfo/dh.png
  53. 0 0
      static/img/userinfo/hb.png
  54. 0 0
      static/img/userinfo/jbs.png
  55. 0 0
      static/img/userinfo/jt.png
  56. 0 0
      static/img/userinfo/jzs.png
  57. 0 0
      static/img/userinfo/sb.png
  58. 0 0
      static/img/userinfo/sfz.png
  59. 0 0
      static/img/userinfo/xd.png
  60. 1190 0
      static/js/defult_value.js
  61. 112 1
      static/js/mf.js
  62. 8 1
      static/js/public.js
  63. 4 0
      static/style/color.css
  64. 51 3
      static/style/icon.css
  65. 85 0
      yarn.lock

+ 2 - 0
.gitignore

@@ -14,4 +14,6 @@ $RECYCLE.BIN/
 node_modules/
 unpackage
 
+uniapp
+uni_modules/
 .hbuilderx

+ 41 - 10
App.vue

@@ -1,15 +1,46 @@
 <script>
+	import configpath from 'config/setting.config.js';
+	import api from 'api/index.js'
+	import Vue from 'vue'
+	const inforeq = (cb) => {
+	  fetch('/static/.config.json')
+	    .then((res) => res.json())
+	    .then(async (res) => {
+	      let obj = {
+	        ...res,
+	        img_local_host:
+	          (process.env.NODE_ENV === 'production'
+	            ? res.prodIp || configpath.prodIp
+	            : process.env.NODE_ENV === 'test'
+	              ? res.testIp || configpath.testIp
+	              : res.devIp || configpath.devIp) + '/file/',
+	        // 请求 地址
+	        baseURL:
+	          (process.env.NODE_ENV === 'production'
+	            ? res.prodIp || configpath.prodIp
+	            : process.env.NODE_ENV === 'test'
+	              ? res.testIp || configpath.testIp
+	              : res.devIp || configpath.devIp) + '/api/h5',
+	      }
+				cb&&cb(obj)
+	    })
+	}
 	export default {
 		globalData: {
 			SET_STATUS_BAR: 0,
 			SET_CUSTOM_BAR: 0,
-			SET_SYSTEM_INFO: {}
+			SET_SYSTEM_INFO: {},
+			configData:{},
+			$api:{...api}
 		},
 		onLaunch: function(option) {
 			console.log('App Launch')
-			let query= option.query||option
-			uni.setStorageSync('query',query)
-			
+			let t = this
+			let query = option.query || option
+			uni.setStorageSync('query', query)
+			inforeq((res)=>{
+				t.globalData.configData=res
+			})
 			uni.getSystemInfo({
 				success: (e) => {
 					let statusBar = 0
@@ -22,10 +53,10 @@
 						customBar = e.statusBarHeight + 50
 					}
 					// #endif
-					
+
 					// #ifdef MP-WEIXIN
 					statusBar = e.statusBarHeight
-			 	const custom = wx.getMenuButtonBoundingClientRect()
+					const custom = wx.getMenuButtonBoundingClientRect()
 					customBar = custom.bottom + custom.top - e.statusBarHeight
 					// #endif
 
@@ -48,7 +79,6 @@
 					this.globalData.SET_SYSTEM_INFO = e
 					this.globalData.SET_CUSTOM_BAR = customBar
 					this.globalData.SET_STATUS_BAR = statusBar
-					console.log(this.globalData)
 				}
 			})
 		},
@@ -83,11 +113,12 @@
 		transform: initial;
 		background-color: transparent;
 	}
-	.bule_line{
+
+	.bule_line {
 		width: 10rpx;
 		height: 30rpx;
-		background-color: #1e8ff9 ;
+		background-color: #1e8ff9;
 		border-radius: 6rpx;
-		box-shadow: 0px 2px 4px 0px rgba(121,190,254,0.59);
+		box-shadow: 0px 2px 4px 0px rgba(121, 190, 254, 0.59);
 	}
 </style>

+ 4 - 0
api/index.js

@@ -0,0 +1,4 @@
+import userinfo from './userinfo';
+export default {
+	...userinfo,
+}

+ 177 - 0
api/request.js

@@ -0,0 +1,177 @@
+import axios from 'axios'
+import {
+	baseURL,
+	contentType,
+	messageName,
+	requestTimeout,
+	statusName,
+	successCode,
+} from '@/config/net.config'
+// import router from '@/router'
+import configpath from 'config/setting.config.js'
+let baseURL1 = ''
+let isAction, isDataAll;
+const inforeq = (cb) => {
+	fetch('/static/.config.json')
+		.then((res) =>res = res.json()).then((res)=>{
+			let obj = {
+				...res,
+				img_local_host: (process.env.NODE_ENV === 'production' ?
+					res.prodIp || configpath.prodIp :
+					process.env.NODE_ENV === 'test' ?
+					res.testIp || configpath.testIp :
+					res.devIp || configpath.devIp) + '/file/',
+				// 请求 地址
+				baseURL: (process.env.NODE_ENV === 'production' ?
+					res.prodIp || configpath.prodIp :
+					process.env.NODE_ENV === 'test' ?
+					res.testIp || configpath.testIp :
+					res.devIp || configpath.devIp) + '/api/h5',
+			}
+			baseURL1 = obj.baseURL
+			cb && cb()
+		})
+}
+inforeq()
+/**
+ * axios响应拦截器
+ * @param data response数据
+ * @param status HTTP status
+ * @param statusText HTTP status text
+ * @returns {Promise<*|*>}
+ */
+const handleData = async ({
+	config,
+	data,
+	status,
+	statusText
+}) => {
+
+	// 若data.code存在,覆盖默认code
+	let code = data && data[statusName] ? data[statusName] : status
+	// 若code属于操作正常code,则status修改为200
+	switch (code) {
+		case 200:
+			// 业务层级错误处理,以下是假定restful有一套统一输出格式(指不管成功与否都有相应的数据格式)情况下进行处理
+			// 例如响应内容:
+			// 错误内容:{ code: 1, msg: '非法参数' }
+			// 正确内容:{ code: 200, data: {  }, msg: '操作正常' }
+			// return data
+			// if (isAction)
+			// Vue.prototype.$baseNotify(
+			//   data[messageName],
+			//   '消息提示',
+			// )
+			return data
+		case 401:
+			// store
+			//   .dispatch('user/resetAll')
+			//   .then(() =>
+			//     router.push({ path: '/login', replace: true }).then(() => { })
+			//   )
+			break
+		case 403:
+			// router.push({ path: '/403' }).then(() => { })
+			break
+	}
+	if (isDataAll) {
+		return data
+	}
+	// 异常处理
+	// 若data.msg存在,覆盖默认提醒消息
+	//  const errMsg = `${data && data[messageName]
+	// ? data[messageName]
+	// : CODE_MESSAGE[code]
+	// 	? CODE_MESSAGE[code]
+	// 	: statusText
+	// }`
+	// console.log(data)
+	return Promise.reject(data)
+}
+
+/**
+ * @description axios初始化
+ */
+const instance = axios.create({
+	baseURL,
+	timeout: requestTimeout,
+	headers: {
+		'Content-Type': contentType,
+	},
+})
+
+let pendingMap = new Map();
+let removePending = function(config) {
+	var key = `${config.method}:${config.url}:${JSON.stringify(config.params)}`;
+	var func = pendingMap.get(key);
+	if (func) {
+		func();
+		pendingMap.delete(key);
+	}
+}
+
+/**
+ * @description axios请求拦截器
+ */
+instance.interceptors.request.use(
+	(config) => {
+		config.baseURL = baseURL1
+		// const token = store.getters['user/token']
+		// config.baseURL = store.getters['user/locationpath'].baseURL
+		removePending(config);
+		// 发送请求,并将请求的取消标识放入pendingMap中
+		config.cancelToken = new axios.CancelToken((cancelToken) => {
+			pendingMap.set(`${config.method}:${config.url}:${JSON.stringify(config.params)}`, cancelToken)
+		});
+		// 规范写法 不可随意自定义
+		// if (token) config.headers['token'] = token
+		if (
+			config.data &&
+			config.headers['Content-Type'] ===
+			'application/x-www-form-urlencoded;charset=UTF-8'
+		)
+			config.data = JSON.stringify(config.data)
+		isAction = config.isAction
+		isDataAll = config.isDataAll
+		return config
+	},
+	(error) => {
+		return Promise.reject(error)
+	}
+)
+
+/**
+ * @description axios响应拦截器
+ */
+let url = '',
+	path1 = ''
+instance.interceptors.response.use(
+	(response) => {
+		const config = response.config
+		url = `${config.method}:${config.url}:${JSON.stringify(config.params)}`;
+		path1 = config.url
+		return handleData(response)
+	},
+	(error) => {
+		const {
+			response
+		} = error
+		// console.log(response)
+		if (response === undefined) {
+			if (path1 !== '/eye/save_hand_img') {
+				// Vue.prototype.$baseMessage(
+				//   '网络错误',
+				//   'error',
+				//   'vab-hey-message-error'
+				// )
+			} else {
+				pendingMap.delete(key);
+			}
+			return Promise.reject({
+				code: -1
+			})
+		} else return handleData(response)
+	}
+)
+
+export default instance

+ 69 - 0
api/userinfo.js

@@ -0,0 +1,69 @@
+import request from './request.js';
+
+export default {
+	//获取用户信息
+	getUserInfo: function(data) {
+		return request({
+			url: '/find_patient',
+			method: 'post',
+			data
+		})
+	},
+	//体征
+	find_physical: function(data) {
+		return request({
+			url: '/find_physical',
+			method: 'post',
+			data
+		})
+	},
+	//药品分页
+	find_medicinal_page: function(data) {
+		return request({
+			url: '/find_medicinal_page',
+			method: 'post',
+			data
+		})
+	},
+	//眼底分页
+	find_eye_page: function(data) {
+		return request({
+			url: '/find_eye_page',
+			method: 'post',
+			data
+		})
+	},
+	//内外网
+	ifoss: function(data) {
+		return request({
+			url: '/ifoss',
+			method: 'post',
+			data
+		})
+	},
+	//居家检测
+	find_home_data: function(data) {
+		return request({
+			url: '/find_home_data',
+			method: 'post',
+			data
+		})
+	},
+	//健康报告
+	find_health_report: function(data) {
+		return request({
+			url: '/find_health_report',
+			method: 'post',
+			data
+		})
+	},
+	//健康报告
+	find_hospital: function(data) {
+		return request({
+			url: '/find_hospital',
+			method: 'post',
+			data
+		})
+	},
+	
+}

+ 35 - 0
component/empty/empty.vue

@@ -0,0 +1,35 @@
+<template>
+	<view class="py-4">
+		<view class="centerd">
+			 <view class="fs-40 iconfont kongjilu" style="color: #ddd;">
+			 </view>
+			
+		</view>
+		<view class="text-center text-gry mt-1">
+			{{title}}
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:{
+			title:{
+				type:String,
+				default:''
+			}
+		},
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 18 - 0
config/net.config.js

@@ -0,0 +1,18 @@
+/**
+ * @description 导出网络配置
+ **/
+const { baseURL } = require('./setting.config.js')
+
+module.exports = {
+  baseURL:baseURL,
+  // 配后端数据的接收方式application/json;charset=UTF-8 或 application/x-www-form-urlencoded;charset=UTF-8
+  contentType: 'application/json;charset=UTF-8',
+  // 最长请求时间
+  requestTimeout: 70000,
+  // 操作正常code,支持String、Array、int多种类型
+  successCode: [200, 0, '200', '0'],
+  // 数据状态的字段名称
+  statusName: 'code',
+  // 状态信息的字段名称
+  messageName: 'msg',
+}

+ 29 - 0
config/setting.config.js

@@ -0,0 +1,29 @@
+// 公用域名ip   默认使用地址  --- 动态修改请求地址在 public/.config.json
+const devIp = 'http://192.168.3.78:10066'; //本地开发接口ip
+const testIp = 'http://testapi.xklr.net:8601'; //测试ip
+let prodIp = 'http://apiv3.xklr.net'; //正式ip、选择线下图片
+let img_prod_host = 'http://img.xklr.net/'; //正式线上图片
+module.exports = {
+	// 图片地址
+	prodIp,
+	img_prod_host,
+	devIp,
+	testIp,
+	img_prod_host,
+	img_local_host: (process.env.NODE_ENV === 'production' ?
+		prodIp :
+		process.env.NODE_ENV === 'test' ? testIp :
+		devIp) + '/file/',
+	// 请求 地址
+	baseURL: (process.env.NODE_ENV === 'production' ?
+		prodIp :
+		process.env.NODE_ENV === 'test' ? testIp :
+		devIp) + '/api/h5',
+	appConfig: {
+		"jj_service_url": "http://118.31.70.1:8601",
+		"OrgCode": "jtapi.xklr.net:8601",
+		"type": "none",
+		"accessType": 1,
+		"district": "111111"
+	}
+}

+ 1 - 0
index.html

@@ -9,6 +9,7 @@
         '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
         (coverSupport ? ', viewport-fit=cover' : '') + '" />')
     </script>
+		<link href="static/favicon.ico" rel="icon" />
     <title></title>
     <!--preload-links-->
     <!--app-context-->

+ 5 - 3
main.js

@@ -1,9 +1,10 @@
 import App from './App'
-import mf from 'static/js/mf.js'
+import mf from '@/static/js/mf.js';
+import api from 'api/index.js'
 import {md, //
 	regExp, //验证规则
 	ipurl, //ip
-	_try_} from 'static/js/public.js'
+	_try_} from '@/static/js/public.js'
 // #ifndef VUE3
 import Vue from 'vue'
 Vue.config.productionTip = false
@@ -12,7 +13,8 @@ const app = new Vue({
     ...App
 })
 app.$mount()
-Vue.prototype.$mf = { mf,...md,}
+Vue.prototype.$mf = { ...mf,...md}
+Vue.prototype.$api = api
 // #endif
 
 // #ifdef VUE3

+ 5 - 0
package-lock.json

@@ -11,6 +11,11 @@
         "zrender": "5.4.0"
       }
     },
+    "moment": {
+      "version": "2.29.4",
+      "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
+      "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
+    },
     "tslib": {
       "version": "2.3.0",
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",

+ 7 - 0
package.json

@@ -0,0 +1,7 @@
+{
+  "dependencies": {
+    "axios": "^1.2.0",
+    "echarts": "^5.4.0",
+    "moment": "^2.29.4"
+  }
+}

+ 16 - 13
pages.json

@@ -23,29 +23,32 @@
 				"navigationBarTitleText": "眼底检查",
 				"enablePullDownRefresh": true
 			}
-		},{
+		}, {
 			"path": "pages/home_monitoring/home_monitoring",
 			"style": {
 				"navigationBarTitleText": "健康监测",
 				"enablePullDownRefresh": true
 			}
+		}, {
+			"path": "pages/chart-model/chart-model",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/health_report/health_report",
+			"style": {
+				"navigationBarTitleText": "健康报告",
+				"enablePullDownRefresh": false
+			}
 		}
-		
-	    ,{
-            "path" : "pages/chart-model/chart-model",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "慢病报告",
 		"navigationBarBackgroundColor": "#F8F8F8",
-		"backgroundColor": "#F8F8F8"
+		"backgroundColor": "#F8F8F8",
+		"backgroundColorTop": "000"
 	},
 	"uniIdRouter": {}
 }

+ 2 - 7
pages/chart-model/chart-model.vue

@@ -1,11 +1,6 @@
 <template>
 	<view>
-		<view 
-		@click="echarts.onClick" 
-		:prop="option" 
-		:change:prop="echarts.updateEcharts" 
-		id="echarts" 
-		class="echarts">
+		<view @click="echarts.onClick" :prop="option" :change:prop="echarts.updateEcharts" id="echarts" class="echarts">
 		</view>
 	</view>
 </template>
@@ -23,7 +18,7 @@
 		},
 		data() {
 			return {
-option: {
+				option: {
 					title: {
 						text: 'ECharts 入门示例'
 					},

+ 179 - 31
pages/eye_ground/eye_ground.vue

@@ -1,7 +1,7 @@
 <template>
-	<view>
+	<view class="mb-5">
 		<view class="position-relative bghead">
-			<image style="opacity: 0;" src="@/static/other/ydjc.png" mode="widthFix" class="w-100"></image>
+			<image style="opacity: 0;" src="@/static/img/other/ydjc.png" mode="widthFix" class="w-100"></image>
 			<view class="position-absolute text-white px-3 mx-3 positionY-50" style="">
 				<view class="centerY">
 					<view class="bw_line line-height1"></view>
@@ -14,19 +14,24 @@
 				</view>
 			</view>
 		</view>
-		<view class="px-3 pb-3 mt-n2">
-			<view class="bg-white px-3 py-2 mt-3" style="border-radius: 16rpx;" v-for="(item,index) in 5">
+		<view class="px-3 pb-3 mt-n2" v-if="dataArray.length>0">
+			<view class="bg-white px-3 py-2 mt-3" style="border-radius: 16rpx;" v-for="(item,index) in dataArray">
 				<view class="centerY mb-2 text-gry">
 					<text class="iconfont Clock fs-20"></text>
 					<view class="">
-						{{'2022-11-01'}}
+						{{item.createTime}}
+					</view>
+					<view class="">
+						<span :class="{'text-green':item.isRead==1}">
+							({{item.isRead==0?'未阅片':'已阅片'}})
+						</span>
 					</view>
 				</view>
 				<view class="">
 					<view class="centerY">
 						<view class="w-50 mx-1">
 							<view class="centerY">
-								<image class="w-15" src="@/static/other/zuo.png" mode="widthFix"></image>
+								<image class="w-15" src="@/static/img/other/zuo.png" mode="widthFix"></image>
 								<view class="d-inline-block ml-1 fs-14 text-dark">
 									左眼
 								</view>
@@ -36,15 +41,26 @@
 								<view class="picbox1"
 									style="border: 1px dotted  #E3E3E3;border-radius: 16rpx;box-sizing: border-box;">
 									<view style="background: #F6F9FE;" class="picimg1">
-										<image class="w-100" style="height: 100%;" src="@/static/defult/pic.png"
-											mode="aspectFit"></image>
+										<image @click="pic(	item.leftImg || item.localLeftImg
+										  ? img_host +
+										    (accessType == 1
+										      ? item.leftImg
+										      : item.localLeftImg)
+										  : '@/static/img/other/you.png')" class="w-100" style="height: 100%;" :src="
+										item.leftImg || item.localLeftImg
+										  ? img_host +
+										    (accessType == 1
+										      ? item.leftImg
+										      : item.localLeftImg)
+										  : '@/static/img/other/you.png'
+										" mode="scaleToFill"></image>
 									</view>
 								</view>
 							</view>
 						</view>
 						<view class="w-50 mx-2">
 							<view class="centerY">
-								<image class="w-15" src="@/static/other/you.png" mode="widthFix"></image>
+								<image class="w-15" src="@/static/img/other/you.png" mode="widthFix"></image>
 								<view class="d-inline-block ml-1 fs-14 text-dark">
 									右眼
 								</view>
@@ -54,56 +70,189 @@
 								<view class="picbox1"
 									style="border: 1px dotted  #E3E3E3;border-radius: 16rpx;box-sizing: border-box;">
 									<view style="background: #F6F9FE;" class="picimg1">
-										<image class="w-100" style="height: 100%;" src="@/static/defult/pic.png"
-											mode="aspectFit"></image>
+										<image @click="pic(	item.rightImg || item.localRightImg
+										  ? img_host +
+										    (accessType == 1
+										      ? item.ightImg
+										      : item.localRightImg)
+										  : '@/static/img/other/you.png')" class="w-100" style="height: 100%;" :src="
+										item.rightImg || item.localRightImg
+										  ? img_host +
+										    (accessType == 1
+										      ? item.ightImg
+										      : item.localRightImg)
+										  : '@/static/img/other/you.png'" mode="scaleToFill"></image>
 									</view>
 								</view>
 							</view>
 						</view>
 					</view>
-					<view class="mt-3 p-2" style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
-						<view class="centerY">
-							<image class="w-15" src="@/static/other/zjjy.png" mode="widthFix"></image>
-							<view class="fs-14 font-bold ml-2">
-								专家建议
+					<view class="mt-3 p-2"
+						style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
+						<view class="centerY mt-2">
+							<image class="w-15" src="@/static/img/other/jcyy.png" mode="widthFix"></image>
+							<view class="fs-14 font-bold ml-2 space-nowrap">
+								检测医院
 							</view>
 							<view class=" ml-2 fs-12" style="color: #868687;">
-									无异常。请保持
+								{{hospital.hospitalName||'暂无医院信息'}}
 							</view>
 						</view>
-						<view class="centerY mt-2">
-							<image class="w-15" src="@/static/other/jcyy.png" mode="widthFix"></image>
-							<view class="fs-14 font-bold ml-2">
+						<view class="centerY">
+							<image class="w-15" src="@/static/img/other/zjjy.png" mode="widthFix"></image>
+							<view class="fs-14 font-bold ml-2 space-nowrap">
 								专家建议
 							</view>
-							<view class=" ml-2 fs-12" style="color: #868687;">
-									宁波第一人民医院
+							<view v-if="item.isRead==1" class="ml-2 fs-12" style="color: #868687;">
+								<span>左眼:{{item.leftNote||'无'}};</span>
+								<span>右眼:{{item.rightNote||'无'}}</span>
+							</view>
+							<view v-if="item.isRead==0" class="ml-2 fs-12" style="color: #868687;">
+								暂未阅片
 							</view>
 						</view>
+
 					</view>
 				</view>
-				<view class="text-center text-gry2 fs-10 mt-2">
+				<view class="text-center text-gry2 fs-10 mt-2 mb-2">
 					注:本报告内容只针对眼底照片可见范围
 				</view>
 			</view>
 		</view>
-		<view class="">
-
+		<view v-if="dataArray.length>0">
+			<uni-load-more iconType="circle" :status="status" class="fs-12"></uni-load-more>
+		</view>
+		<view class="px-3 pb-3 mt-n2" v-if="dataArray.length==0">
+			<Empty title="没有随眼底检查" class="py-5" />
 		</view>
 	</view>
 </template>
 
 <script>
+	import Empty from '@/component/empty/empty.vue';
 	export default {
+		components: {
+			Empty
+		},
 		data() {
 			return {
-
+				accessType: 1,
+				dataArray: [],
+				status: 'loading',
+				hospital: {},
+				filter: {
+					size: 10,
+					current: 1
+				},
+				img_host: ''
 			};
 		},
+		onLoad() {
+			this.getifoss();
+			this.get_medicinal();
+			this.find_hospital()
+		},
+		onReachBottom(a) {
+			if (this.status !== "no-more") {
+				this.status = 'loading';
+				let page = JSON.parse(this.filter.page) + 1
+				this.get_medicinal(page)
+			}
+		},
+		methods: {
+			async pic(url) {
+				uni.previewImage({
+					urls: [url],
+					longPressActions: {
+						itemList: ['发送给朋友', '保存图片', '收藏'],
+						success: function(data) {
+							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+						},
+						fail: function(err) {
+							console.log(err.errMsg);
+						}
+					}
+				});
+			},
+			async find_hospital() {
+				let idCard = uni.getStorageSync('idCard')
+				let {
+					data,
+					code
+				} = await this.$api.find_hospital({
+					idCard
+				})
+				if (code == 0) {
+					this.hospital = data
+					uni.stopPullDownRefresh()
+				} else {
+					this.status = 'more';
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				}
+			},
+			async getifoss() {
+				let idCard = uni.getStorageSync('idCard')
+				let {
+					data,
+					code,
+					count
+				} = await this.$api.ifoss({
+					idCard
+				})
+				if (code == 0) {
+					this.accessType = data
+					let configData = getApp().globalData.configData
+					data == 1 ?
+						this.img_host = configData.img_prod_host :
+						this.img_host = configData.img_local_host
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				} else {
+					this.status = 'more';
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				}
+			},
+			async get_medicinal(page) {
+				page = page || 1
+				this.filter = {
+					...this.filter,
+					page
+				}
+				uni.showLoading({
+					title: '加载中'
+				});
+				let idCard = uni.getStorageSync('idCard')
+				let {
+					data,
+					code,
+					count
+				} = await this.$api.find_eye_page({
+					idCard,
+					...this.filter
+				})
+				if (code == 0) {
+					uni.setStorageSync('userData', data || {})
+					this.dataArray = [...this.dataArray, ...data || []]
+					uni.hideLoading();
+					console.log(count / this.filter.size > this.filter.current)
+					if (count / this.filter.size > this.filter.current) {
+						this.status = 'more';
+					} else {
+						this.status = 'no-more';
+					}
+					uni.stopPullDownRefresh()
+				} else {
+					this.status = 'more';
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				}
+			},
+		},
 		onPullDownRefresh() {
-			setTimeout(()=>{
-				uni.stopPullDownRefresh()
-			},1000)
+			this.dataArray = []
+			this.get_medicinal(1)
 		}
 	}
 </script>
@@ -137,11 +286,10 @@
 	}
 
 	.bghead {
-		background-image: url('@/static/other/ydjc.png');
+		background-image: url('@/static/img/other/ydjc.png');
 		background-size: 100% 100%;
 		background-repeat: no-repeat;
 		background-position: center;
 
 	}
-
 </style>

+ 130 - 0
pages/health_report/component/annual_inspection_plan.vue

@@ -0,0 +1,130 @@
+<template>
+	<view class="mb-5">
+		<view class="m-3">
+			<view class="centerY mt-3">
+				<view class="bule_line" style=""></view>
+				<text class="font-bold text-dark ml-2 fs-16 line-height1">全年检查计划</text>
+			</view>
+			<view class="mt-3 bg-white p-3">
+				<view class="">
+					<view class="mtable-title centerY bg-primary text-white fs-12">
+						<view class=" w-20">
+							时间
+						</view>
+						<view class=" text-center w-80">
+							检查项
+						</view>
+					</view>
+					<view v-if="yearCheck.length>0" class="mtable-body-item centerY fs-12"
+						v-for="(item,index) in yearCheck" style="color: #868687;">
+						<view class="w-20">
+							{{item.date}}
+						</view>
+						<view class="w-80">
+							<span>{{item.value}}</span>
+						</view>
+					</view>
+					<view class="px-3 pb-3 mt-n2" v-if="yearCheck.length==0">
+						<Empty title="没有随眼底检查" class="py-5" />
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import Empty from '@/component/empty/empty.vue'
+	import Moment from 'moment'
+	export default {
+		components: {
+			Empty
+		},
+		name: "AnnualInspectionPlan",
+		props: {
+			propData: {
+				type: Object,
+				default () {
+					return {
+						yearCheck: []
+					}
+				},
+			},
+		},
+		data() {
+			return {
+				yearCheck: []
+			}
+		},
+		watch: {
+			propData: {
+				handler(val) {
+					this.getyearCheck(val)
+				},
+			},
+		},
+		created() {
+
+		},
+		methods: {
+			async getyearCheck(res) {
+				// this.yearCheck = data
+				let data = res.yearCheck ? res.yearCheck : []
+				let data1 = []
+				data.map((item) => {
+					let str = ''
+					let arr = Object.values(item)
+					arr.map((item1, index) => {
+						str += index + 1 + '. ' + item1 + ';'
+					})
+					data1.push(str)
+				})
+				let yearList = (function() {
+					let date = new Date()
+					let arr = []
+					for (let i = 0; i < 12; i++) {
+						arr.push(
+							date.getFullYear() +
+							'-' +
+							Moment(date.getFullYear()).add(i, 'months').format('MM')
+						)
+					}
+					return arr
+				})()
+				// console.log(data1,yearList,this.yearCheck)
+				let yearCheck1 = []
+				yearList.map((item, index) => {
+					yearCheck1.push({
+						date: item,
+						value: data1[index]
+					})
+				})
+				this.yearCheck = yearCheck1
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #F5F9FF;
+	}
+
+	.mtable {
+		&-title {
+			border-radius: 50rpx;
+			padding: 20rpx;
+			box-shadow: 0px 2px 7px 1px rgba(45, 142, 255, 0.5);
+		}
+
+		&-body {
+			&-item {
+				margin-top: 20rpx;
+				border-radius: 50rpx;
+				padding: 20rpx;
+				background-color: #F6F9FE;
+				color: #868687;
+			}
+		}
+	}
+</style>

+ 467 - 0
pages/health_report/component/detection_result.vue

@@ -0,0 +1,467 @@
+<template>
+	<view class="m-3 mb-5">
+		<view class="centerY mt-3">
+			<view class="bule_line" style=""></view>
+			<text class="font-bold text-dark ml-2 fs-16 line-height1">检测结果一栏</text>
+		</view>
+		<view class="mt-3 bg-white p-3">
+			<view class="">
+				<view class="mtable-title centerY bg-primary text-white fs-12">
+					<view class="text-center w-25">
+						检查项
+					</view>
+					<view class=" text-center w-40">
+						标准值
+					</view>
+					<view class="text-center  w-35">
+						当前结果
+					</view>
+				</view>
+				<view class="mtable-body-item centerY fs-12" v-for="(item,index) in datatable1" style="color: #868687;">
+					<view class="text-center w-25">
+						{{item.title}}
+					</view>
+					<view class="text-center w-40 text-green2" v-if="propData.patient.sex==1">
+						{{item.standard1}}
+					</view>
+					<view class="text-center w-40 text-green2" v-if="propData.patient.sex==2">
+						{{item.standard2}}
+					</view>
+					<view class="text-center w-40">
+						<span v-if="item.type==1">{{item.value}} {{item.value=='未测量'?'':item.unit}}</span>
+						<span v-if="item.type==0" class="text-error">{{item.value }}
+							{{item.value=='未测量'?'':item.unit}}</span>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		config
+	} from '@/static/js/defult_value.js';
+
+	let data1 = {
+		checkList: [],
+		visit: {
+			"id": 1336,
+			"isSend": 0,
+			"sendTime": null,
+			"idCard": "123456200001011212",
+			"opUserId": 35,
+			"type": "gxy",
+			"sfys": "王医生",
+			"sffs": "门诊",
+			"zg": "继续随访",
+			"zdsf": 1,
+			"mqzz": "[\"无症状\"]",
+			"xltz": "良好",
+			"zyxw": "良好",
+			"fyqk": "规律",
+			"ywfy": "无",
+			"rxyl": 0,
+			"rxylzd": 0,
+			"ryjl": 0,
+			"ryjlzd": 0,
+			"ydcs": 2,
+			"ydcszd": 6,
+			"ydsj": 30,
+			"ydsjzd": 30,
+			"sycd": "中",
+			"sycdzd": "轻",
+			"zs": null,
+			"zszd": null,
+			"tzzd": 29,
+			"bmizd": 23.8,
+			"ywzd": 89,
+			"sffl": "控制满意",
+			"gljb": "三级管理",
+			"xcyy": "2022-10-06",
+			"zz": 0,
+			"zzyy": "",
+			"zzjg": "",
+			"jkcf": "1. 定期检查血脂,控制高脂肪饮食,不吃动物的内脏及其制品,可常食用黑木耳、山楂等。肥胖者需控制体重。\n2. 建议接种流感疫苗和肺炎疫苗。\n3. 饮食宜用低盐饮食,食盐每天不超过5~10克(1~2钱)。\n4. 从卧位到立位时不能太快,以防止发生直立性低血压。\n5. 保持大便畅通。",
+			"zdmbd": "触及正常",
+			"yds": "无",
+			"ydsyl": "",
+			"dxtfy": "无",
+			"xtlx": "空腹血糖",
+			"xtz": 0,
+			"thxhdb": "",
+			"jcrq": "2022-09-06",
+			"bqgss": "",
+			"zzqt": "无",
+			"tzqt": "无",
+			"height": 112,
+			"weight": 50,
+			"bmi": 39.9,
+			"waist": 1231,
+			"shrink": 123,
+			"diastole": 11,
+			"pulse": 31,
+			"temperature": 312,
+			"bloodGlucose1": null,
+			"bloodGlucose2": null,
+			"medicinalList": "[{\"id\":773,\"idCard\":\"123456200001011212\",\"opUserId\":1,\"name\":\"拉西地平片\",\"type\":\"Gxy\",\"medicinalUnit\":\"mg\",\"unit\":\"4\",\"medicinalUse\":\"口服\",\"medicinalInterval\":\"1天/1次\",\"untowardReaction\":\"无\",\"medicinalId\":null,\"medicineUnitId\":null,\"usageId\":null,\"wayId\":null,\"createTime\":\"2022-08-05\"}]",
+			"visitSendId": null,
+			"doctorId": null,
+			"jkdaGljb": "",
+			"bloodFat1": null,
+			"bloodFat2": null,
+			"bloodFat3": null,
+			"bloodFat4": null,
+			"createTime": "2022-09-06T10:30:09",
+			"updateTime": "2022-09-06T10:30:09",
+			"isDelete": 0,
+			"otherDisease": "无",
+			"lgmjzsj": null,
+			"fymjzsj": null,
+			"qttz1": "无",
+			"lgymjzyy": "0",
+			"ymgz": "0",
+			"fyymjzyy": "0",
+			"outVisterDoctor": null,
+			"brjy": null,
+			"outVisterSign": null,
+			"BackVisitorDate": null
+		}
+	}
+	export default {
+		name: 'DetectionResult',
+		data() {
+			return {
+				datatable1: [{
+						title: 'BMI',
+						value: '',
+						standard1: '18.5~24 kg/m²',
+						standard2: '18.5~24 kg/m²',
+						type: 1,
+						key: 'visit',
+						key1: 'bmi',
+						unit: 'kg/m²',
+					},
+					{
+						title: '腰围',
+						value: '',
+						standard1: '<90 cm',
+						standard2: '<85 cm',
+						type: 1,
+						key: 'visit',
+						key1: 'waist',
+						unit: 'cm',
+					},
+					{
+						title: '收缩压',
+						value: '',
+						standard1: '<140 mmHg',
+						standard2: '<140 mmHg',
+						type: 1,
+						key: 'visit',
+						key1: 'shrink',
+						unit: 'mmHg',
+					},
+					{
+						title: '舒张压',
+						value: '',
+						standard1: '<90 mmHg',
+						standard2: '<90 mmHg',
+						type: 1,
+						key: 'visit',
+						key1: 'diastole',
+						unit: 'mmHg',
+					},
+					{
+						title: '心率',
+						value: '',
+						standard1: '60~90 次/分钟',
+						standard2: '60~90 次/分钟',
+						type: 1,
+						key: '',
+						key1: 'pulse',
+						unit: '次/分钟',
+					},
+					{
+						title: '吸烟',
+						value: '',
+						standard1: '戒烟',
+						standard2: '戒烟',
+						type: 1,
+						key: '',
+						key1: 'rxyl',
+						unit: '根 ',
+					},
+					{
+						title: '喝酒',
+						value: '',
+						standard1: '戒酒',
+						standard2: '戒酒',
+						type: 1,
+						key: '',
+						key1: 'ryjl',
+						unit: 'ml',
+					},
+					{
+						title: '血糖',
+						value: '',
+						standard1: '3.9~6.9 mmol/L',
+						standard2: '3.9~6.9 mmol/L',
+						type: 1,
+						key: 'checkList',
+						key1: 'bloodGlucose',
+						unit: 'mmol/L',
+					},
+					{
+						title: '血氧',
+						value: '',
+						standard1: '>=90 %',
+						standard2: '>=90 %',
+						type: 1,
+						key: 'checkList',
+						key1: 'spo2',
+						unit: '%',
+					},
+					{
+						title: '糖化血红蛋白',
+						value: '',
+						standard1: '<6.5%',
+						standard2: '<6.5%',
+						type: 1,
+						key: '',
+						key1: 'thxhdb',
+						unit: '%',
+					},
+					{
+						title: '总胆固醇',
+						value: '',
+						standard1: '2.85~5.69 mmol/L',
+						standard2: '2.85~5.69 mmol/L',
+						type: 1,
+						key: 'checkList',
+						key1: 'chol',
+						unit: 'mmol/L',
+					},
+					{
+						title: '甘油三酯',
+						value: '',
+						standard1: '0.45~1.7 mmol/L',
+						standard2: '0.45~1.7 mmol/L',
+						type: 1,
+						key: 'checkList',
+						key1: 'bloodFat1',
+						unit: 'mmol/L',
+					},
+					{
+						title: '低密度脂蛋白',
+						value: '',
+						standard1: '0~3.4 mmol/L',
+						standard2: '0~3.4 mmol/L',
+						type: 1,
+						key: 'checkList',
+						key1: 'bloodFat3',
+						unit: 'mmol/L',
+					},
+					{
+						title: '高密度脂蛋白',
+						value: '',
+						standard1: '1.16~1.55 mmol/L',
+						standard2: '1.16~1.55 mmol/L',
+						type: 1,
+						key: 'checkList',
+						key1: 'bloodFat4',
+						unit: 'mmol/L',
+					},
+					{
+						title: '肌酐',
+						value: '',
+						standard1: '53~106 μmol/L',
+						standard2: '44~97 μmol/L',
+						type: 1,
+						key: 'checkList',
+						key1: 'urine1',
+						unit: 'μmol/L',
+					},
+					{
+						title: '微量白蛋白',
+						value: '',
+						standard1: '0~30 mg/L',
+						standard2: '0~30 mg/L',
+						type: 1,
+						key: 'checkList',
+						key1: 'urine2',
+						unit: 'mg/L',
+					},
+					{
+						title: '尿酸',
+						value: '',
+						standard1: '149~416 μmol/L',
+						standard2: '89~357 μmol/L',
+						type: 1,
+						key: 'checkList',
+						key1: 'ua',
+						unit: 'μmol/L',
+					},
+				],
+			}
+		},
+		props: {
+			propData: {
+				type: Object,
+				default () {
+					return {
+						patient: {},
+						checkResult: {}
+					}
+				},
+			},
+		},
+		watch: {
+			propData: {
+				handler(val) {
+					if (val.patient.id) {
+						this.setlist(val.checkResult)
+					}
+				},
+			},
+		},
+		created() {
+
+		},
+		methods: {
+			setlist(checkResult) {
+				if (checkResult.bmi) {
+					let checkList = data1.checkList[0] || {}
+					this.datatable1.map((item, index) => {
+						if (item.key == 'checkList') {
+							this.datatable1[index].value = this.filterA(
+								checkList[item.key1],
+								item.key1
+							).value
+							this.datatable1[index].type = this.filterA(
+								checkList[item.key1],
+								item.key1
+							).type
+						} else {
+							this.datatable1[index].value = this.filterA(
+								data1.visit[item.key1],
+								item.key1
+							).value
+							this.datatable1[index].type = this.filterA(
+								data1.visit[item.key1],
+								item.key1
+							).type
+						}
+					})
+				} else {
+					this.datatable1.map((item, index) => {
+						this.datatable1[index].value = '未测量'
+						this.datatable1[index].type = 1
+					})
+				}
+			},
+			filterA(val, key) {
+				// console.log(key, val)
+				if ((val != 0 && this.$mf.isEmpty(val)) || String(val) == '') {
+					// console.log(key, val, val != 0, '0' == '')
+					return {
+						value: '未测量',
+						type: 1
+					}
+				}
+				return {
+					value: val,
+					type: this.check({
+							type: key,
+							value: val,
+							age: this.propData.patient.age,
+							sex: this.propData.patient.sex,
+						}) ?
+						0 : 1,
+				}
+			},
+			check({
+				type,
+				value,
+				age,
+				sex
+			}) {
+				let msg = this.propData.patient
+				let arr = config
+
+				if (!arr[type]) {
+					return false
+				}
+				if (type == 'shrink' && age) {
+					if (msg.age > 65) {
+						if (value > arr['shrinktop'][1]) {
+							return true
+						}
+						if (value < arr['shrinktop'][0]) {
+							return true
+						}
+					} else {
+						if (value > arr['shrinklow'][1]) {
+							return true
+						}
+						if (value < arr['shrinklow'][0]) {
+							return true
+						}
+					}
+				}
+
+				if (sex) {
+					if (msg.sex == 1) {
+						if (value > arr[type][0][1]) {
+							return true
+						}
+						if (value < arr[type][0][0]) {
+							return true
+						}
+					} else {
+						if (value > arr[type][1][1]) {
+							return true
+						}
+						if (value < arr[type][1][0]) {
+							return true
+						}
+					}
+				}
+
+				if (value > arr[type][1]) {
+					return true
+				}
+				if (value < arr[type][0]) {
+					return true
+				}
+				return false
+			},
+
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #F5F9FF;
+	}
+
+	.mtable {
+		&-title {
+			border-radius: 50rpx;
+			padding: 20rpx 0 20rpx 20rpx;
+			box-shadow: 0px 2px 7px 1px rgba(45, 142, 255, 0.5);
+		}
+
+		&-body {
+			&-item {
+				margin-top: 20rpx;
+				border-radius: 50rpx;
+				padding: 14rpx 0 14rpx 20rpx;
+				background-color: #F6F9FE;
+				color: #868687;
+			}
+		}
+	}
+</style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1374 - 0
pages/health_report/component/report.vue


+ 151 - 0
pages/health_report/health_report.vue

@@ -0,0 +1,151 @@
+<template>
+	<view class="">
+		<view class=" tab position-relative">
+			<view class="mx-3 mt-3 tab-box centerY text-center fs-14 font-bold">
+				<view @click="tabactive(index)" v-for="(item,index) in ['健康报告','全年检查计划','检测结果']"
+					:class="{'tab-item w-33 m-2 py-2':true,'tab-item-active ': tab_index==index}" :key="index">
+					<view class="my-1">
+						{{item}}
+					</view>
+				</view>
+			</view>
+			<view class="position-relative px-3" style="height: 50vh;" ref="ccc">
+				<view
+					:class="{'w-100 tab-content position-absolute':true,'tab-content-active': tab_index==0,'tab-content-hidden':tab_index!==0}">
+					<report :propData="dataAll" />
+				</view>
+				<view
+					:class="{'w-100 tab-content position-absolute':true,'tab-content-active': tab_index==1,'tab-content-hidden':tab_index!==1}">
+					<annual-inspection-plan :propData="dataAll" />
+				</view>
+				<view
+					:class="{'w-100 tab-content position-absolute':true,'tab-content-active': tab_index==2,'tab-content-hidden':tab_index!==2}">
+					<detection-result :propData="dataAll" />
+				</view>
+			</view>
+			<view class="" @click="resttop" v-if="isshowbtntop"
+				style="position: fixed;transform: rotate(180deg);width: 100rpx;bottom:100rpx;right: 0;z-index: 999;">
+				<view class="picbox">
+					<image class="picimg" src="@/static/img/other/xl.png" mode=""></image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import Report from './component/report.vue';
+	import DetectionResult from './component/detection_result.vue'
+	import AnnualInspectionPlan from './component/annual_inspection_plan.vue'
+	export default {
+		components: {
+			Report,
+			DetectionResult,
+			AnnualInspectionPlan
+		},
+		data() {
+			return {
+				tab_index: 0,
+				isshowbtntop: false,
+				dataAll: {}
+			}
+		},
+		onPageScroll: function(e) { //nvue暂不支持滚动监听,可用bindingx代替
+			// console.log("滚动距离为:" + e.scrollTop);
+			if (e.scrollTop >= 500) {
+				this.isshowbtntop = true
+			} else {
+				this.isshowbtntop = false
+			}
+		},
+		onLoad() {
+			this.find_health_report()
+		},
+		methods: {
+			async find_health_report() {
+				let idCard = uni.getStorageSync('idCard')
+				uni.showLoading({
+					title: '加载中'
+				});
+				let {
+					data,
+					code
+				} = await this.$api.find_health_report({
+					idCard
+				})
+				if (code == 0) {
+					console.log(data)
+					this.dataAll = data || {}
+					uni.hideLoading();
+				} else {
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				}
+			},
+			tabactive(i) {
+				this.tab_index = i
+				uni.pageScrollTo({ //滚动条初始化
+					scrollTop: 0,
+					duration: 0
+				});
+			},
+			resttop() {
+				uni.pageScrollTo({ //滚动条初始化
+					scrollTop: 0,
+					duration: 300
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #F5F9FF;
+	}
+
+	.tab {
+
+		&-box {
+			background: #D7E6F8;
+			border-radius: 12rpx;
+
+		}
+
+		&-item {
+			color: #4B4B4B;
+			transition: all .3s;
+		}
+
+		&-item-active {
+			background: #FFFFFF !important;
+			box-shadow: 0px 2px 4px 0px #B2D2FD;
+			border-radius: 6px;
+		}
+
+		&-content {
+			top: 20vh;
+			transition: all .4s;
+			opacity: 0;
+			left: 0vw;
+
+			&-active {
+				opacity: 1;
+				top: 0vw;
+				z-index: 1;
+			}
+
+			&-hidden {
+				height: 30vh;
+				overflow: hidden;
+			}
+		}
+
+	}
+
+	.sticky-nav {
+		position: sticky;
+		top: 80rpx;
+		z-index: 999;
+	}
+</style>

+ 125 - 292
pages/home_monitoring/home_monitoring.vue

@@ -1,7 +1,7 @@
 <template>
-	<view>
+	<view class="m-3 mb-5" ref="ccc">
 		<view class="position-relative bghead" style="margin-top: -80rpx;">
-			<image src="@/static/other/tou.png" mode="widthFix" class="w-100"></image>
+			<image src="@/static/img/other/tou.png" mode="widthFix" class="w-100"></image>
 		</view>
 		<view class="p-3">
 			<view class="centerY mb-3 w-100 font-bold">
@@ -12,7 +12,7 @@
 				<view class="px-2 py-1 centerY" style="background: linear-gradient(180deg, #F6FFFF 0%, #EAFEFF 100%);">
 					<view class="w-15">
 						<view class="picbox">
-							<image class="picimg" src="@/static/other/xy.png" mode="aspectFit"></image>
+							<image class="picimg" src="@/static/img/other/xy.png" mode="aspectFit"></image>
 						</view>
 					</view>
 					<view class=" ml-2">
@@ -23,28 +23,30 @@
 					</view>
 					<view class="ml-auto fs-14">
 						<view class="font-bold text-right line-height1" style="color: #868687;">
-							{{'70/150 mmHg'}}
+							<span v-if="dataArray.gxyList&&dataArray.gxyList[0]">{{dataArray.gxyList&&dataArray.gxyList[0].rbp||'未测量'}}/{{dataArray.gxyList&&dataArray.gxyList[0].sbp||'未测量'}} mmHg</span>
+							<span v-else>未测量</span>
 						</view>
 						<view class="fs-12 centerY" style="color: #868687 ;">
 							<text class="iconfont Clock"></text>
 							<view class="ml-1">
-								{{'2022-11-22 14:20:20'}}
+								<span v-if="dataArray.gxyList&&dataArray.gxyList[0]">{{dataArray.gxyList&&dataArray.gxyList[0].uploadTime}}</span>
+								<span v-else>暂无</span>
 							</view>
 						</view>
 					</view>
 					<view class="iconfont Chevron-Right fs-24" style="color: #35B79C;"></view>
 				</view>
-				<view class="px-3 py-2">
+				<view class="px-3 py-2" v-if="dataArray.gxyList&&dataArray.gxyList.length">
 					<view class="fs-14 text-gry mb-1">
 						近7次测量记录
 					</view>
 					<view class="">
 						<view id="echarts1" class="echarts"></view>
 					</view>
-					
-					<view class="mt-3 p-2 mb-2" style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
+					<view class="mt-3 p-2 mb-2"
+						style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
 						<view class="centerY">
-							<image class="w-10" src="@/static/other/xy2.png" mode="widthFix"></image>
+							<image class="w-10" src="@/static/img/other/xy2.png" mode="widthFix"></image>
 							<view class="fs-14 font-bold ml-2 space-nowrap">
 								血压标准
 							</view>
@@ -58,12 +60,12 @@
 							</view>
 						</view>
 						<view class="centerY mt-2">
-							<image class="w-10" src="@/static/other/zjjy.png" mode="widthFix"></image>
+							<image class="w-10" src="@/static/img/other/zjjy.png" mode="widthFix"></image>
 							<view class="fs-14 font-bold ml-2 space-nowrap">
 								专家建议
 							</view>
 							<view class=" ml-2 fs-12" style="color: #868687;">
-									正常
+								正常
 							</view>
 						</view>
 					</view>
@@ -73,7 +75,7 @@
 				<view class="px-2 py-1 centerY" style="background: linear-gradient(180deg, #ebf6ff 0%, #D4EBFF 100%);">
 					<view class="w-15 ">
 						<view class="picbox">
-							<image class="picimg" src="@/static/other/xuet.png" mode="aspectFit"></image>
+							<image class="picimg" src="@/static/img/other/xuet.png" mode="aspectFit"></image>
 						</view>
 					</view>
 					<view class=" ml-2">
@@ -84,54 +86,57 @@
 					</view>
 					<view class="ml-auto fs-14">
 						<view class="font-bold text-right line-height1" style="color: #868687;">
-							{{'4.5 mmol/L'}}
+							<span v-if="dataArray.gxyList&&dataArray.tnbList[0]">{{dataArray.tnbList&&dataArray.tnbList[0].glu||'未测量'}} mmol/L</span>
+							<span v-else>未测量</span>
 						</view>
 						<view class=" centerY" style="color: #868687 ;">
 							<text class="iconfont Clock"></text>
 							<view class="fs-12 ml-1">
-								{{'2022-11-22 14:20:20'}}
+								<span v-if="dataArray.tnbList&&dataArray.tnbList[0]">{{dataArray.tnbList&&dataArray.tnbList[0].uploadTime}}</span>
+								<span v-else>暂无</span>
 							</view>
 						</view>
 					</view>
 					<view class="iconfont Chevron-Right fs-24" style="color: #369FE5;"></view>
 				</view>
-				<view class="px-3 py-2">
+				<view class="px-3 py-2"  v-if="dataArray.tnbList&&dataArray.tnbList.length">
 					<view class="fs-14 text-gry mb-1">
 						近7次测量记录
 					</view>
 					<view class="">
 						<view id="echarts2" class="echarts"></view>
 					</view>
-					<view class="mt-3 p-2 mb-2" style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
-							<view class="centerY">
-								<image class="w-10" src="@/static/other/xtfw.png" mode="widthFix"></image>
-								<view class="fs-14 font-bold ml-2 space-nowrap">
-									血糖标准
-								</view>
-								<view class=" ml-2 fs-12" style="color: #868687;">
-									<view class="">
-										3.9~6.9 mmol/L
-									</view>
-								</view>
+					<view class="mt-3 p-2 mb-2"
+						style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
+						<view class="centerY">
+							<image class="w-10" src="@/static/img/other/xtfw.png" mode="widthFix"></image>
+							<view class="fs-14 font-bold ml-2 space-nowrap">
+								血糖标准
 							</view>
-							<view class="centerY mt-2">
-								<image class="w-10" src="@/static/other/zjjy.png" mode="widthFix"></image>
-								<view class="fs-14 font-bold ml-2 space-nowrap">
-									专家建议
-								</view>
-								<view class=" ml-2 fs-12" style="color: #868687;">
-										正常
+							<view class=" ml-2 fs-12" style="color: #868687;">
+								<view class="">
+									3.9~6.9 mmol/L
 								</view>
 							</view>
 						</view>
-					
+						<view class="centerY mt-2">
+							<image class="w-10" src="@/static/img/other/zjjy.png" mode="widthFix"></image>
+							<view class="fs-14 font-bold ml-2 space-nowrap">
+								专家建议
+							</view>
+							<view class=" ml-2 fs-12" style="color: #868687;">
+								正常
+							</view>
+						</view>
+					</view>
+
 				</view>
 			</view>
 			<view class="bg-white mt-2" style="border-radius: 16rpx;overflow: hidden;">
 				<view class="px-2 py-1 centerY" style="background: linear-gradient(180deg, #F6FFFF 0%, #EAFEFF 100%);">
 					<view class="w-15 ">
 						<view class="picbox">
-							<image class="picimg" src="@/static/other/xinl.png" mode="aspectFit"></image>
+							<image class="picimg" src="@/static/img/other/xinl.png" mode="aspectFit"></image>
 						</view>
 					</view>
 					<view class=" ml-2">
@@ -142,48 +147,49 @@
 					</view>
 					<view class="ml-auto fs-14">
 						<view class="font-bold text-right line-height1" style="color: #868687;">
-							{{'80 次/分钟'}}
+							<span v-if="dataArray.gxyList&&dataArray.gxyList[0]">{{dataArray.gxyList&&dataArray.gxyList[0].pulse||'未测量'}} 次/分钟</span>
+							<span v-else>未测量</span>
 						</view>
 						<view class="fs-10 centerY" style="color: #868687 ;">
 							<text class="iconfont Clock"></text>
 							<view class="ml-1">
-								{{'2022-11-22 14:20:20'}}
+								<span v-if="dataArray.gxyList&&dataArray.gxyList[0]">{{dataArray.gxyList&&dataArray.gxyList[0].uploadTime}}</span>
+								<span v-else>暂无</span>
 							</view>
 						</view>
 					</view>
 					<view class="iconfont Chevron-Right fs-24" style="color: #35B79C "></view>
 				</view>
-				<view class="px-3 py-2">
+				<view class="px-3 py-2"  v-if="dataArray.gxyList&&dataArray.gxyList.length">
 					<view class="fs-14 text-gry mb-1">
 						近7次测量记录
 					</view>
 					<view class="">
 						<view id="echarts3" class="echarts"></view>
 					</view>
-					<view class="mt-3 p-2 mb-2" style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
-							<view class="centerY">
-								<image class="w-10" src="@/static/other/xlfw.png" mode="widthFix"></image>
-								<view class="fs-14 font-bold ml-2 space-nowrap">
-									心率标准
-								</view>
-								<view class=" ml-2 fs-12" style="color: #868687;">
-									60~100 次/分钟
-								</view>
+					<view class="mt-3 p-2 mb-2"
+						style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
+						<view class="centerY">
+							<image class="w-10" src="@/static/img/other/xlfw.png" mode="widthFix"></image>
+							<view class="fs-14 font-bold ml-2 space-nowrap">
+								心率标准
 							</view>
-							<view class="centerY mt-2">
-								<image class="w-10" src="@/static/other/zjjy.png" mode="widthFix"></image>
-								<view class="fs-14 font-bold ml-2 space-nowrap">
-									专家建议
-								</view>
-								<view class=" ml-2 fs-12" style="color: #868687;">
-										正常
-								</view>
+							<view class=" ml-2 fs-12" style="color: #868687;">
+								60~100 次/分钟
 							</view>
 						</view>
-					
+						<view class="centerY mt-2">
+							<image class="w-10" src="@/static/img/other/zjjy.png" mode="widthFix"></image>
+							<view class="fs-14 font-bold ml-2 space-nowrap">
+								专家建议
+							</view>
+							<view class=" ml-2 fs-12" style="color: #868687;">
+								正常
+							</view>
+						</view>
+					</view>
 				</view>
 			</view>
-
 		</view>
 	</view>
 </template>
@@ -192,248 +198,69 @@
 	export default {
 		data() {
 			return {
-
+				dataArray:{}
 			};
 		},
-		onReady() {},
+		onLoad() {
+			this.find_home_data()
+		},
 		methods: {
-			changeOption() {
-				const data = this.option.series[0].data
-				// 随机更新示例数据
-				data.forEach((item, index) => {
-					data.splice(index, 1, Math.random() * 40)
+			async find_home_data() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				let idCard = uni.getStorageSync('idCard')
+				let {
+					data,
+					code
+				} = await this.$api.find_home_data({
+					idCard
 				})
+				if (code == 0) {
+					this.dataArray = data;
+					if(data&&data.gxyList.length){
+						this.getdom('echarts1',()=>{
+							this.chartOption1(data.gxyList, 'echarts1')
+						})
+						this.getdom('echarts3',()=>{
+							this.chartOption3(data.gxyList, 'echarts3')
+						})
+					}
+					if(data&&data.tnbList.length){
+						this.getdom('echarts2',()=>{
+							this.chartOption2(data.tnbList, 'echarts3')
+						})
+					}
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				} else {
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				}
+				console.log(this.dataArray)
 			},
-			onViewClick(options) {
-				console.log(options)
+			getdom(dom,cb){
+				let timer = setInterval(()=>{
+					if(document.getElementById(dom)){
+						clearInterval(timer)
+						cb&&cb()
+					}
+				},300)
 			}
 		},
 		onPullDownRefresh() {
-			setTimeout(()=>{
-				uni.stopPullDownRefresh()
-			},1000)
+			this.find_home_data()
 		}
 	}
 </script>
 
 <script module="echarts" lang="renderjs">
 	import * as echarts from 'echarts';
-	let dataList = [{
-		"id": 41,
-		"idCard": null,
-		"checkType": "ExamBloodGlucose",
-		"medicalRecordId": null,
-		"authorizationCode": null,
-		"glu": "5.8",
-		"deviceUuid": "355D0003795",
-		"sbp": 110,
-		"rbp": 80,
-		"pulse": 80,
-		"uploadTime": "2022-09-26 07:08:00",
-		"createTime": "2022-09-26T07:06:54",
-		"updateTime": "2022-09-26T07:06:54",
-		"isDelete": 0,
-		"aorB": null
-	}, {
-		"id": 39,
-		"idCard": null,
-		"checkType": "ExamBloodGlucose",
-		"medicalRecordId": null,
-		"authorizationCode": null,
-		"glu": "5.5",
-		"deviceUuid": "355D0003795",
-		"sbp": 130,
-		"rbp": 87,
-		"pulse": 82,
-		"uploadTime": "2022-09-23 06:20:00",
-		"createTime": "2022-09-23T06:19:45",
-		"updateTime": "2022-09-23T06:19:45",
-		"isDelete": 0,
-		"aorB": null
-	}, {
-		"id": 25,
-		"idCard": null,
-		"checkType": "ExamBloodGlucose",
-		"medicalRecordId": null,
-		"authorizationCode": null,
-		"glu": "7.3",
-		"deviceUuid": "355D0003795",
-		"sbp": 125,
-		"rbp": 95,
-		"pulse": 95,
-		"uploadTime": "2022-09-13 06:04:00",
-		"createTime": "2022-09-13T06:04:26",
-		"updateTime": "2022-09-13T06:04:26",
-		"isDelete": 0,
-		"aorB": null
-	}, {
-		"id": 24,
-		"idCard": null,
-		"checkType": "ExamBloodGlucose",
-		"medicalRecordId": null,
-		"authorizationCode": null,
-		"glu": "9.1",
-		"deviceUuid": "355D0003795",
-		"sbp": 135,
-		"rbp": 84,
-		"pulse": 77,
-		"uploadTime": "2022-09-12 07:56:00",
-		"createTime": "2022-09-12T07:56:53",
-		"updateTime": "2022-09-12T07:56:53",
-		"isDelete": 0,
-		"aorB": null
-	}, {
-		"id": 23,
-		"idCard": null,
-		"checkType": "ExamBloodGlucose",
-		"medicalRecordId": null,
-		"authorizationCode": null,
-		"glu": "7.7",
-		"deviceUuid": "355D0003795",
-		"sbp": 143,
-		"rbp": 90,
-		"pulse": 89,
-		"uploadTime": "2022-09-12 05:38:00",
-		"createTime": "2022-09-12T05:38:40",
-		"updateTime": "2022-09-12T05:38:40",
-		"isDelete": 0,
-		"aorB": null
-	}, {
-		"id": 22,
-		"idCard": null,
-		"checkType": "ExamBloodGlucose",
-		"medicalRecordId": null,
-		"authorizationCode": null,
-		"glu": "17.8",
-		"deviceUuid": "355D0003795",
-		"sbp": 133,
-		"rbp": 80,
-		"pulse": 85,
-		"uploadTime": "2022-09-11 15:51:00",
-		"createTime": "2022-09-11T15:52:00",
-		"updateTime": "2022-09-11T15:52:00",
-		"isDelete": 0,
-		"aorB": null
-	}, {
-		"id": 21,
-		"idCard": null,
-		"checkType": "ExamBloodGlucose",
-		"medicalRecordId": null,
-		"authorizationCode": null,
-		"glu": "6.5",
-		"deviceUuid": "355D0003795",
-		"sbp": 123,
-		"rbp": 75,
-		"pulse": 86,
-		"uploadTime": "2022-09-08 07:15:00",
-		"createTime": "2022-09-08T07:13:21",
-		"updateTime": "2022-09-08T07:13:21",
-		"isDelete": 0,
-		"aorB": null
-	}]
-	const config = {
-		pulse: [60, 100],
-		temperature: [36.5, 37.5],
-		shrink: [90, 139],
-		diastole: [60, 90],
-		shrinktop: [90, 149], //大于65
-		shrinklow: [90, 139], //小于65  
-		bmi: [18.50, 23.90],
-		urine1: [
-			[53, 106],
-			[44, 97], "肌酐"
-		],
-		urine2: [0, 30, "微量白蛋白"],
-		urine3: [8.4, 13.2, "尿微/肌酐"],
-		kidney1: [
-			[208, 428],
-			[155, 357], "血尿酸"
-		],
-		kidney2: [
-			[54, 133],
-			[44, 97], "血肌酐"
-		],
-		kidney3: [13.9, 6.1, "尿素氮"],
-		bloodFat1: [0.45, 1.7, "甘油三酯"],
-		bloodFat2: [2.85, 5.69, "总胆固醇"],
-		bloodFat3: [0, 3.4, "低密度脂蛋白"],
-		bloodFat4: [1.16, 1.55, "高密度脂蛋白"],
-		lvision: [1.0, 5.0, '左视力'],
-		rvision: [1.0, 5.0, '右视力'],
-		bloodGlucose: [3.9, 6.9, '血糖'],
-		chol: [2.85, 5.69, '总胆固醇'],
-		ua: [
-			[149, 416],
-			[89, 357], '尿酸'
-		],
-		spo2: [95, 99, '血氧'],
-		rxyl: [0, 0],
-		ryjl: [0, 0],
-	}
-	let info = {
-		"id": 905,
-		"username": "罗桂花",
-		"birthday": "1945-12-28",
-		"age": 77,
-		"sex": 2,
-		"idCard": "330222194512283184",
-		"socialInsurance": "1111",
-		"tod": "[]",
-		"phone": "15854712036",
-		"nation": "汉族",
-		"culture": "高中",
-		"occupation": "自由职业",
-		"marriage": "已婚",
-		"address": "[\"330000\",\"330100\",\"330122\"]",
-		"addressDetail": "111",
-		"province": "浙江省",
-		"city": "杭州市",
-		"area": "桐庐县",
-		"town": "附海镇",
-		"village": "花木村",
-		"healthIndex": null,
-		"complication": "[]",
-		"acutecomplications": null,
-		"medicalInsuranceType": 1,
-		"chronicDiseaseType": 4,
-		"gxyIllTime": null,
-		"tnbIllTime": null,
-		"diseaseHistory": null,
-		"familyHistory": null,
-		"saltiness": "",
-		"hospitalId": 103,
-		"registUserId": 78,
-		"nextVisitTime": null,
-		"newVisitDate": null,
-		"disability": null,
-		"povertySituation": null,
-		"healthImportance": null,
-		"lvhTime": null,
-		"lvh": null,
-		"carotidPlaque": null,
-		"carotidPlaqueTime": null,
-		"hyperhomocysteinemia": null,
-		"mentalIllness": null,
-		"acuteDisease": null,
-		"chronicDisease": null,
-		"chronicConfirmedTime": null,
-		"acuteConfirmedTime": null,
-		"hospitalTime": null,
-		"acuteRiskLevel": null,
-		"chronicRiskLevel": null,
-		"andComplication": "[]",
-		"project": null,
-		"isSend": "0",
-		"createTime": "2022-11-23 13:14:24",
-		"updateTime": "2022-11-23T13:14:24",
-		"isDelete": 0
-	}
+	import { config } from '@/static/js/defult_value.js';
 	export default {
 		mounted() {
 			console.log(echarts)
-			this.chartOption1(dataList, 'echarts1')
-			this.chartOption2(dataList, 'echarts2')
-			this.chartOption3(dataList, 'echarts3')
+			
 			// this.initChart('echarts1', this.option)
 			// this.initChart('echarts2', this.option2)
 		},
@@ -448,18 +275,15 @@
 			// },
 			onClick(event, ownerInstance) {
 				// 调用 service 层的方法
-				ownerInstance.callMethod('onViewClick', {
-					test: 'test'
-				})
-			},
 
+			},
 			check({
 				type,
 				value,
 				age,
 				sex
 			}) {
-				let msg = info
+				let msg = uni.getStorageSync('userData')
 				let arr = config
 				if (type == 'shrink' && age) {
 					if (msg.age > 65) {
@@ -491,7 +315,7 @@
 						if (value > arr[type][1][1]) {
 							return true
 						}
-			  	if (value < arr[type][1][0]) {
+						if (value < arr[type][1][0]) {
 							return true
 						}
 					}
@@ -513,7 +337,10 @@
 					data3 = [],
 					time = []
 				data.map((item) => {
-					time.push(this.$mf.timeTrans({time:item.uploadTime,format:'M.D'}))
+					time.push(this.$mf.timeTrans({
+						time: item.uploadTime,
+						format: 'M.D'
+					}))
 					data1.push(item.sbp)
 					data2.push(item.rbp)
 					data3.push(item.pulse)
@@ -644,7 +471,10 @@
 				let data1 = [],
 					time = []
 				data.map((item) => {
-					time.push(this.$mf.timeTrans({time:item.uploadTime,format:'M.D'}))
+					time.push(this.$mf.timeTrans({
+						time: item.uploadTime,
+						format: 'M.D'
+					}))
 					data1.push(item.glu)
 				})
 
@@ -737,7 +567,10 @@
 					data3 = [],
 					time = []
 				data.map((item) => {
-					time.push(this.$mf.timeTrans({time:item.uploadTime,format:'M.D'}))
+					time.push(this.$mf.timeTrans({
+						time: item.uploadTime,
+						format: 'M.D'
+					}))
 					data3.push(item.pulse)
 				})
 
@@ -804,7 +637,7 @@
 									x: 0,
 									y: 0,
 									x2: 0,
-							 	y2: 1,
+									y2: 1,
 									global: false,
 									colorStops: [{
 											offset: 0,

+ 196 - 51
pages/index/index.vue

@@ -1,59 +1,133 @@
 <template>
-	<view class="">
-		<view class="header p-3">
-			<view class="fs-18 text-white">
-				个人档案
-			</view>
-			<view class="centerY mt-2">
-				<view class="w-20 userhead">
-					<view class="picbox">
-						<image src="@/static/userinfo/jzs.png" mode="widthFix" class="picimg"></image>
-					</view>
+	<view class="mb-5">
+		<view class="" v-if="userData.id">
+			<view class="header p-3">
+				<view class="centerY">
+					<span class="d-inline-block fs-18 text-white font-bold">个人档案</span>
+					<span class="d-inline-block py-1 d-inline-block ml-auto text-white1" @click="closet">[ 退出 ]</span>
 				</view>
-				<view class="w-80 ml-2">
-					<view class="text-white fs-16 font-bold">
-						{{'王老爷'}}
+				<view class="centerY mt-2" @click="$mf.clickNavto('/pages/userinfo/userinfo')">
+					<view class="w-15 userhead">
+						<view class="picbox">
+							<image v-if="userData.sex==1" src="@/static/img/defult/head1.png" mode="widthFix"
+								class="picimg"></image>
+							<image v-if="userData.sex==2" src="@/static/img/defult/head2.png" mode="widthFix"
+								class="picimg"></image>
+						</view>
 					</view>
-					<view class="centerY" style="margin-top:10rpx;">
-						<view class="iconfont nv text-white fs-16 font-bold"></view>
-						<view @click="$mf.clickNavto('/pages/userinfo/userinfo')" class="text-gry80 fs-12 bg-white ml-auto"
-							style="padding:8rpx 26rpx;border-radius: 50rpx;">
-							基础资料
+					<view class="w-85 ml-3">
+						<view class="text-white fs-16 font-bold">
+							{{userData.username||''}}
 						</view>
-						<view class="iconfont youla2 fs-24 text-white font-bold">
+						<view class="centerY" style="margin-top:10rpx;">
+							<view
+								:class="{'iconfont text-white fs-16 font-bold':true,' nv':userData.sex==2,'nanxing':userData.sex==1,} ">
+							</view>
+							<view class="py-1 pl-2 text-center centerY text-gry80 bg-white ml-auto"
+								style="border-radius: 6rpx;">
+								<view class="">
+									基础资料
+								</view>
+								<view class="iconfont youla2 fs-12 font-bold">
+								</view>
+							</view>
 						</view>
 					</view>
 				</view>
 			</view>
-		</view>
-		<view class="content p-3  bg-white mx-3 my-2 box-border08">
-			<view class="centerY mt-1">
-				<view class="bule_line d-inline-block">
-				</view>
-				<view class="ml-2 font-bold">
-					健康数据
+			<view class="content p-3 bg-white mx-3 my-3 box-border08">
+				<view class="" style="display:flex;flex-wrap: wrap !important;">
+					<view class="w-100 border-box">
+						<view class=""
+							style="background: linear-gradient(180deg, rgb(151,220,249) 0%, rgb(110,197,246) 100%);border-radius: 16rpx;">
+							<view class="px-3 pt-2 pb-3 ">
+								<view class="centerY ">
+									<view class="bule_line"></view>
+									<text class="fs-18 ml-2 font-bold" style="color: #1C90D7;">
+										个人体征
+									</text>
+								</view>
+								<view class="mt-2" style="color: #000;">
+									<view class="font-bold" style="display:flex;flex-wrap: wrap !important;">
+										<view class="w-50  border-box pr-1">
+											<view class=" d-flex px-2 py-1"
+												style="color: #55afdf;border-radius: 10rpx;background-color: rgba(255,255,255)">
+												身高<span class="ml-auto ml-1">{{physical.height}} cm</span>
+											</view>
+										</view>
+										<view class="w-50 border-box  pl-1">
+											<view class=" d-flex px-2 py-1"
+												style="color: #55afdf;border-radius: 10rpx;background-color: rgba(255,255,255)">
+												体重<span class="ml-auto ml-1">{{physical.waist}} kg</span>
+											</view>
+										</view>
+										<view class="w-50 border-box pr-1 mt-2">
+											<view class=" d-flex px-2 py-1"
+												style="color: #55afdf;border-radius: 10rpx;background-color: rgba(255,255,255)">
+												BMI
+												<span class="ml-auto ml-1">{{physical.bmi}} kg/m^2</span>
+											</view>
+										</view>
+										<view class="w-50 border-box pl-1 mt-2">
+											<view class=" d-flex px-2 py-1"
+												style="color: #55afdf;border-radius: 10rpx;background-color: rgba(255,255,255)">
+												血压<span class="ml-auto ml-1">{{physical.diastole}}/{{physical.shrink}}
+													mmHg</span>
+											</view>
+										</view>
+										<view class="w-50 border-box pr-1 mt-2">
+											<view class=" d-flex px-2 py-1"
+												style="color: #55afdf;border-radius: 10rpx;background-color: rgba(255,255,255)">
+												心率<span class="ml-auto ml-1">{{physical.pulse}} bmp</span>
+											</view>
+										</view>
+										<view class="w-50 border-box pl-1 mt-2">
+											<view class=" d-flex px-2 py-1"
+												style="color: #55afdf;border-radius: 10rpx;background-color: rgba(255,255,255)">
+												腰围<span class="ml-auto ml-1">{{physical.weight}} cm</span>
+											</view>
+										</view>
+									</view>
+
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="w-50 pr-2 border-box mt-3">
+						<image @click="$mf.clickNavto('/pages/medication/medication')" src="@/static/img/index/dqyy.png"
+							mode="widthFix" class="w-100"></image>
+					</view>
+					<view class="w-50 pl-2 border-box mt-3">
+						<image @click="$mf.clickNavto('/pages/health_report/health_report')"
+							src="@/static/img/index/jkbg.png" mode="widthFix" class="w-100"></image>
+					</view>
 				</view>
-				<view class="ml-auto fs-10 text-gry">
-					更多
+				<view class="mt-2">
+					<image @click="$mf.clickNavto('/pages/eye_ground/eye_ground')" src="@/static/img/index/ydjc.png"
+						mode="widthFix" class="w-100"></image>
 				</view>
-				<view class="iconfont Chevron-Right text-gry">
+				<view class="mt-2">
+					<image @click="$mf.clickNavto('/pages/home_monitoring/home_monitoring')"
+						src="@/static/img/index/jjjc.png" mode="widthFix" class="w-100"></image>
 				</view>
 			</view>
-			<view class="centerY mt-3">
-				<view class="w-50 pr-2">
-					<image src="@/static/index/grtz.png" mode="widthFix" class="w-100"></image>
-				</view>
-				<view class="w-50 pl-1">
-					<image src="@/static/index/jkbg.png" mode="widthFix" class="w-100"></image>
-					<image @click="$mf.clickNavto('/pages/medication/medication')" src="@/static/index/dqyy.png" mode="widthFix" class="w-100 mt-2"></image>
+
+		</view>
+
+		<view class="">
+			<uni-popup ref="popup1" type="center" :mask-click="false">
+				<view class="bg-white p-3 w-100" style="border-radius: 16rpx;">
+					<view class="text-center mb-3 fs-14 font-bold py-2">
+						查询
+					</view>
+					<view class=" centerY mb-3" style="border-radius: 14rpx;border: 1px solid #007aff;">
+						<input type="text" v-model="valueId" class="p-1 px-2 fs-12" placeholder="请输入身份证号码"
+							placeholder-class="fs-12">
+						<button type="primary" class="d-inline-block fs-12 px-3 py-0 ml-auto mr-0"
+							@click="search">搜索</button>
+					</view>
 				</view>
-			</view>
-			<view class="mt-2">
-				<image @click="$mf.clickNavto('/pages/eye_ground/eye_ground')" src="@/static/index/ydjc.png" mode="widthFix" class="w-100"></image>
-			</view>
-			<view class="mt-2">
-				<image @click="$mf.clickNavto('/pages/home_monitoring/home_monitoring')" src="@/static/index/jjjc.png" mode="widthFix" class="w-100"></image>
-			</view>
+			</uni-popup>
 		</view>
 	</view>
 </template>
@@ -62,19 +136,91 @@
 	export default {
 		data() {
 			return {
-				title: 'Hello'
+				userData: {},
+				physical: {},
+				valueId: '330222194512283184'
 			}
 		},
-		onLoad() {
-			console.log(this.$mf.clickNavto)
+		mounted() {
+			// console.log(this.$mf)
+			// console.log(this.$httpApi)
+
+			if (!uni.getStorageSync('idCard')) {
+				console.log(this.$refs)
+				this.$refs.popup1.open()
+			} else {
+				this.getuserinfo(uni.getStorageSync('idCard'))
+			}
 		},
 		methods: {
-		
+			closet() {
+				uni.clearStorage('idCard')
+				uni.clearStorage('userData')
+				this.valueId = '';
+				this.userData = {};
+				this.physical = {};
+				this.$refs.popup1.open()
+			},
+			search() {
+				this.getuserinfo(this.valueId)
+				this.valueId = '';
+				this.userData = {};
+				this.physical = {};
+			},
+			async find_physical() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				let idCard = uni.getStorageSync('idCard')
+				let {
+					data,
+					code
+				} = await this.$api.find_physical({
+					idCard
+				})
+				if (code == 0) {
+					this.physical = data || {}
+					uni.hideLoading();
+				} else {
+					uni.hideLoading();
+				}
+				uni.stopPullDownRefresh()
+			},
+			async getuserinfo(idCard) { //330222194512283184
+				uni.showLoading({
+					title: '加载中'
+				});
+				let {
+					data,
+					code
+				} = await this.$api.getUserInfo({
+					idCard
+				})
+				if (code == 0) {
+					uni.setStorageSync('userData', data || {});
+					uni.setStorageSync('idCard', data && data.idCard || '')
+					this.userData = data || {}
+					console.log(this.userData)
+					if (data && data.id) {
+						this.$refs.popup1.close();
+						this.find_physical()
+
+					} else {
+						uni.showToast({
+							title: '未查询到患者',
+							icon: 'error'
+						})
+					}
+
+					uni.hideLoading();
+				} else {
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				}
+			}
 		},
 		onPullDownRefresh() {
-			setTimeout(()=>{
-				uni.stopPullDownRefresh()
-			},1000)
+			this.getuserinfo()
 		}
 	}
 </script>
@@ -90,7 +236,6 @@
 
 	.userhead {
 		border-radius: 50%;
-		background: rgb(255, 255, 255);
 		box-shadow: 1px 1px 10px 1px #096DCB;
 	}
 

+ 91 - 26
pages/medication/medication.vue

@@ -1,10 +1,10 @@
 <template>
-	<view>
+	<view class="mb-5">
 		<view class="position-relative bghead">
-			<image style="opacity: 0;" src="@/static/other/med.png" mode="widthFix" class="w-100"></image>
+			<image style="opacity: 0;" src="@/static/img/other/med.png" mode="widthFix" class="w-100"></image>
 			<view class="position-absolute text-white px-3 mx-3 positionY-50" style="">
 				<view class="centerY">
-					<view class="bw_line line-height1"></view>
+					<view class="bw_line"></view>
 					<view class="ml-1 fs-18 font-bold">
 						随访用药
 					</view>
@@ -14,16 +14,16 @@
 				</view>
 			</view>
 		</view>
-		<view class="px-3 pb-3 mt-n2">
-			<view class="bg-white px-2 py-3 mt-3" style="border-radius: 16rpx;" v-for="(item,index) in 5">
+		<view class="px-3 pb-3 mt-n2" v-if="dataArray.length>0">
+			<view class="bg-white px-2 py-3 mt-3" style="border-radius: 16rpx;" v-for="(item,index) in dataArray">
 				<view class="centerY mb-2 text-gry">
 					<view class="bule_line"></view>
-					<view class="ml-2">
-						{{'糖尿病随访'}}
+					<view class="ml-2 fs-14 text-dark font-bold">
+						{{item.type=="tnb"?'糖尿病随访':item.type=="gxy"?'高血压随访':'未知类型'}}
 					</view>
-					<text class="ml-auto iconfont Clock fs-20"></text>
-					<view class="">
-						{{'2022-11-01'}}
+					<text class="ml-auto iconfont Clock fs-16"></text>
+					<view class="ml-1 fs-12">
+						{{item.date}}
 					</view>
 				</view>
 				<view class="">
@@ -47,46 +47,110 @@
 							用药类型
 						</view>
 					</view>
-					<view class="mtable-body-item centerY fs-12" v-for="(item,index) in 5" style="color: #868687;">
-						<view class="text-left" style="width: 23%;">
-							{{'培哚普利吲达帕胺片4mg'}}
-						</view>
+					<view v-if="item.medicinals.length==0">
+						<Empty title="此次随访没有用药" />
+					</view>
+					<view class="mtable-body-item centerY fs-12" v-for="(item2,index2) in item.medicinals"
+						style="color: #868687;">
+						<uni-tooltip :content="item2.name" style="color: #818181;width: 23%;">
+							<view class="text-left text-view2">
+								{{item2.name }}
+							</view>
+						</uni-tooltip>
 						<view class=" text-center" style="width: 15%;">
-							{{'1.05mg'}}
+							{{item2.unit + item2.medicinalUnit}}
 						</view>
 						<view class="w-10 text-center">
-							{{'口服'}}
+							{{item2.medicinalUse||'未知'}}
 						</view>
 						<view class="text-center" style="width: 17%;">
-							{{'1日1次'}}
+							{{item2.medicinalInterval||'未知'}}
 						</view>
 						<view class="text-center" style="width: 17%;">
-							{{'无'}}
+							{{item2.untowardReaction||'无'}}
 						</view>
 						<view class="text-center" style="width: 17%;">
-							{{'糖尿病'}}
+							{{item2.type=="Tnb"?'糖尿病':item2.type=="Gxy"?'高血压':'未知类型'}}
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
-		<view class="">
-
+		<view v-if="dataArray.length>0">
+			<uni-load-more iconType="circle" :status="status" class="fs-12"></uni-load-more>
+		</view>
+		<view class="px-3 pb-3 mt-n2" v-if="dataArray.length==0">
+			<Empty title="没有随访用药" class="py-5" />
 		</view>
 	</view>
 </template>
 
 <script>
+	import Empty from '@/component/empty/empty.vue'
 	export default {
+		components: {
+			Empty
+		},
 		data() {
 			return {
-
+				dataArray: [],
+				status: 'loading',
+				filter: {
+					size: 10,
+					current: 1
+				}
 			};
 		},
+		onLoad() {
+			this.get_medicinal()
+		},
+		onReachBottom(a) {
+			if (this.status !== "no-more") {
+				this.status = 'loading';
+				let page = JSON.parse(this.filter.page) + 1
+				this.get_medicinal(page)
+			}
+		},
+		methods: {
+			async get_medicinal(page) {
+				page = page || 1
+				this.filter = {
+					...this.filter,
+					page
+				}
+				uni.showLoading({
+					title: '加载中'
+				});
+				let idCard = uni.getStorageSync('idCard')
+				let {
+					data,
+					code,
+					count
+				} = await this.$api.find_medicinal_page({
+					idCard,
+					...this.filter
+				})
+				if (code == 0) {
+					this.dataArray=[...this.dataArray,...data||[]]
+					uni.hideLoading();
+					console.log(count / this.filter.size > this.filter.current)
+					if (count / this.filter.size > this.filter.current) {
+						this.status = 'more';
+					} else {
+						this.status = 'no-more';
+					}
+					uni.stopPullDownRefresh()
+				} else {
+					this.status = 'more';
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				}
+				console.log(this.dataArray)
+			}
+		},
 		onPullDownRefresh() {
-			setTimeout(()=>{
-				uni.stopPullDownRefresh()
-			},1000)
+			this.dataArray=[]
+			this.get_medicinal(1)
 		}
 	}
 </script>
@@ -104,7 +168,7 @@
 	}
 
 	.bghead {
-		background-image: url('@/static/other/med.png');
+		background-image: url('@/static/img/other/med.png');
 		background-size: 100% 100%;
 		background-repeat: no-repeat;
 		background-position: center;
@@ -115,6 +179,7 @@
 		&-title {
 			border-radius: 50rpx;
 			padding: 20rpx 0 20rpx 20rpx;
+			box-shadow: 0px 2px 7px 1px rgba(45, 142, 255, 0.5);
 		}
 
 		&-body {

+ 210 - 117
pages/userinfo/userinfo.vue

@@ -1,6 +1,6 @@
 <template>
-	<view>
-		<view class="p-3">
+	<view class="mb-5">
+		<view class="p-3" v-if="userData.id">
 			<view class="d-flex">
 				<view class="w-100 font-bold">
 					<view class="centerY  mb-3">
@@ -10,214 +10,307 @@
 					<view class="centerY border-bottom mb-2 fs-14" style="color: #818181;">
 						<view class="w-50 mb-2">
 							<view class="mb-2">
-								姓名:{{'王老爷爷'}}
+								姓名:{{userData.username||''}}
 							</view>
 							<view class="">
-								出生日期:{{'1864.02.09'}}
+								出生日期:{{userData.birthday||''}}
 							</view>
 						</view>
 						<view class="w-50 mb-2">
 							<view class="mb-2">
-								年龄:{{'160'}}
+								年龄:{{$mf.getIDCardInfo(userData.idCard).age||'0'}}
 							</view>
 							<view class="">
-								性别:{{'男'}}
+								性别:{{userData.sex==1?'男':'女'}}
 							</view>
 						</view>
 					</view>
 					<view class="centerY mb-2 fs-14" style="color: #818181;">
 						<view class="w-50 mb-2">
 							<view class=" mb-2">
-								文化程度:{{'文盲'}}
+								文化程度:{{userData.culture ||''}}
 							</view>
 							<view class="">
-								职业:{{'导盲犬训练员'}}
+								职业:{{userData.occupation||''}}
 							</view>
 						</view>
 						<view class="w-50 mb-2">
-							<view class=" mb-2">
-								民族:{{'维吾尔族人'}}
+							<view class="mb-2">
+								民族:{{userData.nation||''}}
 							</view>
 							<view class="">
-								婚姻状况:{{'未婚'}}
+								婚姻状况:{{userData.marriage||'未婚'}}
 							</view>
 						</view>
 					</view>
 				</view>
 				<view style="position: absolute;right: 20rpx;top: 20rpx;width: 100rpx;">
 					<view class="picbox">
-						<image src="@/static/userinfo/jzs.png" mode="widthFix" class="picimg"></image>
+						<image v-if="userData.sex==1" src="@/static/img/defult/head1.png" mode="widthFix" class="picimg">
+						</image>
+						<image v-if="userData.sex==2" src="@/static/img/defult/head2.png" mode="widthFix" class="picimg">
+						</image>
 					</view>
 				</view>
 			</view>
 			<view class="bg-white px-3 fs-14  font-bold" style="border-radius: 16rpx;color: #818181;">
-				<view class="centerY border-bottom py-2">
-					<image src="@/static/userinfo/sb.png" mode="widthFix" style="width: 40rpx;"></image>
-					<view class=" ml-1 line-height1">
-						社保卡号:{{'A1122233333'}}
+				<view class="d-flex border-bottom py-2">
+					<view class="centerY space-nowrap" style="align-items: flex-start;">
+						<image src="@/static/img/userinfo/sb.png" mode="widthFix" style="width: 40rpx;"></image>
+						<span class="ml-1"> 社保卡号:</span>
+					</view>
+					<view class="">
+						{{userData.socialInsurance||''}}
 					</view>
 				</view>
-				<view class="centerY border-bottom py-2">
-					<image src="@/static/userinfo/sfz.png" mode="widthFix" style="width: 40rpx;"></image>
-					<view class=" ml-1 line-height1">
-						身份证号:{{'542250213151651511'}}
+				<view class="d-flex border-bottom py-2">
+					<view class="centerY space-nowrap" style="align-items: flex-start;">
+						<image src="@/static/img/userinfo/sfz.png" mode="widthFix" style="width: 40rpx;"></image>
+						<span class="ml-1"> 身份证号:</span>
+					</view>
+					<view class="">{{userData.idCard||''}}
 					</view>
 				</view>
-				<view class="centerY border-bottom py-2">
-					<image src="@/static/userinfo/dh.png" mode="widthFix" style="width: 40rpx;"></image>
-					<view class=" ml-1 line-height1">
-						手机号码:{{'18812345678'}}
+				<view class="d-flex border-bottom py-2">
+					<view class="centerY space-nowrap" style="align-items: flex-start;">
+						<image src="@/static/img/userinfo/dh.png" mode="widthFix" style="width: 40rpx;"></image>
+						<span class="ml-1"> 手机号码:</span>
+					</view>
+					<view class="">
+						{{userData.phone||''}}
 					</view>
 				</view>
-				<view class="centerY py-2">
-					<image src="@/static/userinfo/jt.png" mode="widthFix" style="width: 40rpx;"></image>
-					<view class=" ml-1 line-height1">
-						家庭住址:{{'浙江省杭州市西湖区XX街道'}}
+				<view class="d-flex py-2">
+					<view class="centerY space-nowrap" style="align-items: flex-start;">
+						<image src="@/static/img/userinfo/jt.png" mode="widthFix" style="width: 40rpx;"></image>
+						<span class="ml-1"> 家庭住址:</span>
+					</view>
+					<view class="">
+						{{userData.city + userData.area + userData.town + userData.village +userData.addressDetail}}
 					</view>
 				</view>
 			</view>
-			<view class="d-flex mt-2  font-bold"  style="color: #818181;">
+			<view class="d-flex mt-2  font-bold" style="color: #818181;">
 				<view class="py-1 mt-1 fs-14 space-nowrap">
 					医保类型:
 				</view>
 				<view class="fs-10 w-100">
-					<span class="mr-1 text-center py-1 mt-2 d-inline-block w-20 line-height1" 
-						:style="{borderRadius:'50rpx',background:index==1?'#1890FF':'#EBEBEB',color:index==1?'#fff':'#A4A4A4'}"
-					 v-for="(item,index) in ['城镇医保','公费医保','系农村','商业保险','自费']">
-						{{item}}
+					<span class="mr-1 text-center py-1 mt-2 d-inline-block w-20"
+						:style="{borderRadius:'50rpx',background:userData.medicalInsuranceType==item.value?'#1890FF':'#EBEBEB',color:userData.medicalInsuranceType==item.value?'#fff':'#A4A4A4'}"
+						v-for="(item,index) in MEDICAL_INSURANCE_TYPE">
+						{{item.label}}
 					</span>
 				</view>
 			</view>
-			<view class="d-flex mt-2 font-bold"  style="color: #818181;">
+			<view class="d-flex mt-2 font-bold" style="color: #818181;">
 				<view class="mt-1 py-1 fs-14 space-nowrap font-bold">
 					慢病类型:
 				</view>
 				<view class="fs-10 w-100">
-					<span class="mr-1 text-center py-1 mt-2 d-inline-block w-20 line-height1" 
-						:style="{borderRadius:'50rpx',background:index==1?'#1890FF':'#EBEBEB',color:index==1?'#fff':'#A4A4A4'}"
-					 v-for="(item,index) in ['高血压','糖尿病','合并症','无']">
-						{{item}}
+					<span class="mr-1 text-center py-1 mt-2 d-inline-block w-20"
+						:style="{borderRadius:'50rpx',background:userData.chronicDiseaseType==item.value?'#1890FF':'#EBEBEB',color:userData.chronicDiseaseType==item.value?'#fff':'#A4A4A4'}"
+						v-for="(item,index) in CHRONIC_DISEASE_TYPE">
+						{{item.label}}
 					</span>
 				</view>
 			</view>
-			<view class="d-flex mt-2 font-bold"  style="color: #818181;">
-				<view class="mt-1 py-1 fs-14 space-nowrap font-bold">
-					糖尿病病龄:
+			<view class="centerY">
+				<view class="d-flex mt-2 font-bold w-50" style="color: #818181;">
+					<view class="mt-1 py-1 fs-14 space-nowrap font-bold">
+						糖尿病病龄:
+					</view>
+					<view class="fs-10">
+						<span class="mr-1 text-center py-1 mt-2 d-inline-block px-3"
+							:style="{borderRadius:'50rpx',background:'#1890FF',color:'#fff'}">
+							{{userData.tnbIllTime
+						? (
+						    (new Date().getTime() - new Date(userData.tnbIllTime).getTime()) /
+						    31536000000
+						  ).toFixed(0)
+						: ''}}年
+						</span>
+					</view>
 				</view>
-				<view class="fs-10 w-100">
-					<span class="mr-1 text-center py-1 mt-2 d-inline-block w-20 line-height1" 
-						:style="{borderRadius:'50rpx',background:index==1?'#1890FF':'#EBEBEB',color:index==1?'#fff':'#A4A4A4'}"
-					 v-for="(item,index) in ['30年']">
-						{{item}}
-					</span>
+				<view class="d-flex mt-2 font-bold w-50" style="color: #818181;" v-if="
+				              userData.chronicDiseaseType == 1 ||
+				              userData.chronicDiseaseType == 3
+				            ">
+					<view class="mt-1 py-1 fs-14 space-nowrap font-bold">
+						高血压病龄:
+					</view>
+					<view class="fs-10">
+						<span class="mr-1 text-center py-1 mt-2 d-inline-block px-3"
+							:style="{borderRadius:'50rpx',background:'#1890FF',color:'#fff'}">
+							{{userData.gxyIllTime
+				    ? (
+				        (new Date().getTime() - new Date(userData.gxyIllTime).getTime()) /
+				        31536000000
+				      ).toFixed(0)
+				    : ''}}年
+						</span>
+					</view>
 				</view>
 			</view>
-			<view class=" mt-2 bg-white p-3 fs-14  font-bold" style="border-radius: 16rpx;">
+			<view class=" mt-3 bg-white p-3 fs-14  font-bold" style="border-radius: 16rpx;">
 				<view class="centerY mb-2">
 					<view class="bule_line" style="height: 26rpx;margin-top: -2rpx;"></view>
-					<text class="font-bold text-dark ml-2 fs-18 line-height1">其他信息</text>
+					<text class="font-bold text-dark ml-2 fs-16 line-height1">其他信息</text>
 				</view>
 				<view class=" border-bottom pt-2">
 					<view class="w-50 d-inline-block mb-2">
 						<view class="centerY">
-								<view class="w-40">
-										<view class="picbox">
-											<image class="picimg" src="@/static/userinfo/jbs.png" mode=""></image>
-										</view>
-									</view>
-									<view class="w-60 ml-1">
-										<view class="fs-16">
-											疾病史
-										</view>
-										<view class="mt-1"  style="color: #818181;">
-											心脏病
-										</view>
+							<view class="w-40">
+								<view class="picbox">
+									<image class="picimg" src="@/static/img/userinfo/jbs.png" mode=""></image>
+								</view>
+							</view>
+							<view class="w-60 ml-1">
+								<view class="fs-16">
+									疾病史
+								</view>
+								<view class="fs-12" style="color: #818181;"
+									v-if="!userData.diseaseHistory?true:userData.diseaseHistory&&JSON.parse(userData.diseaseHistory).length==0">
+									无
+								</view>
+								<uni-tooltip :content="String(JSON.parse(userData.diseaseHistory))">
+									<view class="text-view2 fs-12" style="color: #818181;">
+										<span class=""
+											v-for="(item,index) in JSON.parse(userData.diseaseHistory)">{{item}};</span>
 									</view>
+								</uni-tooltip>
+							</view>
 						</view>
 					</view>
-					
-						<view class="w-50 d-inline-block mb-2">
-							<view class="centerY">
-									<view class="w-40">
-											<view class="picbox">
-												<image class="picimg" src="@/static/userinfo/jzs.png" mode=""></image>
-											</view>
-										</view>
-										<view class="w-60 ml-1">
-											<view class="fs-16">
-												家族史
-											</view>
-											<view class="mt-1"  style="color: #818181;">
-												心脏病
-											</view>
-										</view>
-									
+
+					<view class="w-50 d-inline-block mb-2">
+						<view class="centerY">
+							<view class="w-40">
+								<view class="picbox">
+									<image class="picimg" src="@/static/img/userinfo/jzs.png" mode=""></image>
+								</view>
 							</view>
+							<view class="w-60 ml-1">
+								<view class="fs-16">
+									家族史
+								</view>
+								<view class="fs-12" style="color: #818181;"
+									v-if="!userData.familyHistory?true:userData.familyHistory&&JSON.parse(userData.familyHistory).length==0">
+									无
+								</view>
+								<uni-tooltip
+									:content="String(userData.familyHistory&&JSON.parse(userData.familyHistory))">
+									<view class="text-view2 fs-12" style="color: #818181;">
+										<span class=""
+											v-for="(item,index) in userData.familyHistory&&JSON.parse(userData.familyHistory)">{{item}};</span>
+									</view>
+								</uni-tooltip>
+							</view>
+
 						</view>
-						<view class="w-50 d-inline-block mb-2">
-							<view class="centerY">
-									<view class="w-40">
-											<view class="picbox">
-												<image class="picimg" src="@/static/userinfo/xd.png" mode=""></image>
-											</view>
-										</view>
-										<view class="w-60 ml-1">
-											<view class="fs-16">
-												咸淡情况
-											</view>
-											<view class="mt-1"  style="color: #818181;">
-												心脏病
-											</view>
-										</view>
+					</view>
+					<view class="w-50 d-inline-block mb-2" v-if="userData.saltiness">
+						<view class="centerY">
+							<view class="w-40">
+								<view class="picbox">
+									<image class="picimg" src="@/static/img/userinfo/xd.png" mode=""></image>
+								</view>
+							</view>
+							<view class="w-60 ml-1">
+								<view class="fs-16">
+									咸淡情况
+								</view>
+								<view class="fs-12" style="color: #818181;" v-if="userData.saltiness">
+									无
+								</view>
+								<view class="fs-12" style="color: #818181;">
+									{{userData.saltiness}}
+								</view>
 							</view>
 						</view>
-						<view class="w-50 d-inline-block mb-2">
-							<view class="centerY">
-									<view class="w-40">
-											<view class="picbox">
-												<image class="picimg" src="@/static/userinfo/hb.png" mode=""></image>
-											</view>
-										</view>
-										<view class="w-60 ml-1">
-											<view class="fs-16">
-												合并症
-											</view>
-											<view class="mt-1"  style="color: #818181;">
-												心脏病
-											</view>
-										</view>
+					</view>
+					<view class="w-50 d-inline-block mb-2">
+						<view class="centerY">
+							<view class="w-40">
+								<view class="picbox">
+									<image class="picimg" src="@/static/img/userinfo/hb.png" mode=""></image>
+								</view>
+							</view>
+							<view class="w-60 ml-1">
+								<view class="fs-16">
+									合并症
+								</view>
+								<view class="fs-12" style="color: #818181;"
+									v-if="!userData.andComplication?true:userData.andComplication&&JSON.parse(userData.andComplication).length==0">
+									无
+								</view>
+								<uni-tooltip :content="String(JSON.parse(userData.andComplication))">
+									<view class=" text-view2 fs-12" style="color: #818181;">
+										<span class=""
+											v-for="(item,index) in JSON.parse(userData.andComplication)">{{item}};</span>
+									</view>
+								</uni-tooltip>
 							</view>
 						</view>
 					</view>
+				</view>
 				<view class="mt-2">
 					<view class="fs-14 font-bold text-dark">
-							并发症
+						并发症
 					</view>
 					<view class="fs-10 w-100">
-						<span class="mr-1 text-center py-1 px-2 mt-2 d-inline-block line-height1" 
-							:style="{borderRadius:'50rpx',background:'#EBEBEB',color:'#A4A4A4',border:'1px solid #A4A4A4'}"
-						 v-for="(item,index) in ['30年','dasdsaadassa']">
+						<span class="mr-1 text-center py-1 px-2 mt-2 d-inline-block"
+							:style="{borderRadius:'50rpx',background:'#E8E8E8',color:'#868687',border:'1px solid #E8E8E8'}"
+							v-for="(item,index) in JSON.parse(userData.complication)">
 							{{item}}
 						</span>
 					</view>
 				</view>
 			</view>
-			
+
 		</view>
 	</view>
 </template>
 
 <script>
+	import {
+		MEDICAL_INSURANCE_TYPE,
+		CHRONIC_DISEASE_TYPE,
+	} from '@/static/js/defult_value.js'
 	export default {
 		data() {
 			return {
-
+				MEDICAL_INSURANCE_TYPE,
+				CHRONIC_DISEASE_TYPE,
+				userData: {}
 			};
 		},
+		onLoad() {
+			this.getuserinfo()
+		},
 		onPullDownRefresh() {
-			setTimeout(()=>{
-				uni.stopPullDownRefresh()
-			},1000)
+			this.getuserinfo()
+		},
+		methods: {
+			async getuserinfo() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				let idCard = uni.getStorageSync('idCard')
+				let {
+					data,
+					code
+				} = await this.$api.getUserInfo({
+					idCard
+				})
+				if (code == 0) {
+					uni.setStorageSync('userData', data || {})
+					this.userData = data || {}
+					uni.hideLoading();
+					uni.stopPullDownRefresh()
+				} else {
+					uni.hideLoading();
+				}
+			}
 		}
 	}
 </script>

+ 21 - 0
static/.config.json

@@ -0,0 +1,21 @@
+{
+	"prodIp": "http://apiv3.xklr.net",
+	"img_prod_host": "http://img.xklr.net/",
+	"devIp": "http://192.168.3.78:10066",
+	"testIp": "http://testapi.xklr.net:8601",
+	"appConfig": {
+		"jj_service_url": "http://118.31.70.1:8601",
+		"jt_service_url": "http://118.31.70.1:8601",
+		"OrgCode": "jtapi.xklr.net:8601",
+		"type": "none",
+		"accessType": 1,
+		"district": "111111"
+	},
+	"notes": {
+		"devIp1": "http://192.168.3.77:10066",
+		"prodIp": "正式ip/线下图片地址",
+		"testIp": "正式测试服ip",
+		"devIp/devip1": "开发ip",
+		"img_prod_host": "线上图片地址"
+	}
+}

BIN
static/favicon.ico


BIN
static/img/defult/c.png


BIN
static/img/defult/head1.png


BIN
static/img/defult/head2.png


static/defult/pic.png → static/img/defult/pic.png


static/index/dqyy.png → static/img/index/dqyy.png


static/index/grtz.png → static/img/index/grtz.png


static/index/jjjc.png → static/img/index/jjjc.png


static/index/jkbg.png → static/img/index/jkbg.png


static/index/ydjc.png → static/img/index/ydjc.png


BIN
static/img/other/1.jpg


static/other/31fanhui2备份.png → static/img/other/31fanhui2备份.png


static/other/jcyy.png → static/img/other/jcyy.png


static/other/med.png → static/img/other/med.png


static/other/tou.png → static/img/other/tou.png


static/other/xinl.png → static/img/other/xinl.png


static/other/xl.png → static/img/other/xl.png


static/other/xlfw.png → static/img/other/xlfw.png


static/other/xtfw.png → static/img/other/xtfw.png


static/other/xuet.png → static/img/other/xuet.png


static/other/xuetangjinru.png → static/img/other/xuetangjinru.png


static/other/xy.png → static/img/other/xy.png


static/other/xy2.png → static/img/other/xy2.png


static/other/ydjc.png → static/img/other/ydjc.png


static/other/you.png → static/img/other/you.png


static/other/zjjy.png → static/img/other/zjjy.png


static/other/zuo.png → static/img/other/zuo.png


static/userinfo/dh.png → static/img/userinfo/dh.png


static/userinfo/hb.png → static/img/userinfo/hb.png


static/userinfo/jbs.png → static/img/userinfo/jbs.png


static/userinfo/jt.png → static/img/userinfo/jt.png


static/userinfo/jzs.png → static/img/userinfo/jzs.png


static/userinfo/sb.png → static/img/userinfo/sb.png


static/userinfo/sfz.png → static/img/userinfo/sfz.png


static/userinfo/xd.png → static/img/userinfo/xd.png


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1190 - 0
static/js/defult_value.js


+ 112 - 1
static/js/mf.js

@@ -1,6 +1,117 @@
 
+export function getTime2() {
+  let d = new Date();
+  let hours = d.getHours()
+  let minutes = d.getMinutes()
+  let seconds = d.getSeconds()
+  hours = hours > 9 ? hours + '' : '0' + hours
+  minutes = minutes > 9 ? minutes + '' : '0' + minutes
+  seconds = seconds > 9 ? seconds + '' : '0' + seconds
+  return hours + minutes + seconds
+}
+
+export function getDate2() {
+  let d = new Date()
+  let year = d.getFullYear()
+  let month = d.getMonth() + 1
+  let day = d.getDate()
+  return year + getFormatDate(month) + getFormatDate(day)
+}
+
+export function getDate() {
+  let d = new Date();
+  let year = d.getFullYear();
+  let month = d.getMonth() + 1;
+  let day = d.getDate();
+  return year + '-' + getFormatDate(month) + '-' + getFormatDate(day);
+}
+
+/**
+ * 获取生日
+ *
+ * @param IDCard
+ * @returns {string}
+ */
+let getBirthDate = function (idCard) {
+  let year = idCard.substring(6, 10);
+  let month = idCard.substring(10, 12);
+  let day = idCard.substring(12, 14);
+  return year + '-' + month + '-' + day;
+}
+
+/**
+ * 获取当前时间
+ *
+ * @returns {string}
+ */
+let getNowDate = function () {
+  let d = new Date();
+  let year = d.getFullYear();
+  let month = d.getMonth() + 1;
+  let day = d.getDate();
+  return year + '-' + getFormatDate(month) + '-' + getFormatDate(day);
+}
+
+/**
+ * 格式化时间
+ *
+ * @param value
+ * @returns {string}
+ */
+let getFormatDate = function (value) {
+  if (value === undefined || value === "") {
+    return '';
+  }
+  let str = value;
+  if (parseInt(value) < 10) {
+    str = '0' + value;
+  }
+  return str;
+}
+
+/**
+ * 获取年龄
+ *
+ * @param startDateStr
+ * @param endDateStr
+ * @returns {number}
+ */
+let getAge = function (startDateStr, endDateStr) {
+  //计算两个日期相差多少年
+  let startDate = new Date(startDateStr);
+  let endDate = new Date(endDateStr);
+  let yearNum = endDate.getFullYear() - startDate.getFullYear();
+  //获取两个日期(月+日)部分
+  let sStr = startDateStr.substring(5, 10);
+  let eStr = endDateStr.substring(5, 10);
+  //判断两个日期大小
+  //判断是否过生日
+  if (new Date(sStr) <= new Date(eStr)) {
+    return yearNum + 1;
+  }
+  else {
+    return yearNum;
+  }
+}
+
+
 export default {
-	
+	getIDCardInfo(idCard) {
+	  if (idCard.length === 18) {
+	    //获取计算后出生日期
+	    let birthDateStr = getBirthDate(idCard);
+	    //设置出生日期
+	    // console.log(birthDateStr);
+	    //获取当前的日期
+	    var nowDateStr = getNowDate();
+	    //获取计算后年龄(两个日期之间)
+	    var age = getAge(birthDateStr, nowDateStr);
+	    let sex = idCard.substring(16, 17);
+	    // console.log(sex%2 ===0)
+	    //设置年龄
+	    return { birthDateStr: birthDateStr, age: age, sex: sex % 2 === 0 ? '2' : '1' }
+	  }
+	},
 	clickNavto: (path, type) => {
 		// console.log(path, type)
 		if (type == 'redirect') {

+ 8 - 1
static/js/public.js

@@ -1,4 +1,5 @@
 const md = {
+	
 	empty:(val)=>{
 		if(val.length==0||val.replace(/\s/g, "").length==0||!val){
 			return true
@@ -7,7 +8,13 @@ const md = {
 			
 		// }
 	},
-	
+	isEmpty(str) {
+	  if (str == null || typeof str == null || str == "" || str == "undefined") {
+	    return true;
+	  } else {
+	    return false;
+	  }
+	},
 	/**
 	 * @removeSpace 检查图片是否存在
 	 * imgUrl 图片链接

+ 4 - 0
static/style/color.css

@@ -6,6 +6,10 @@
 .text-green{
 	color: #55aa00 !important;
 }
+.text-green2{
+	color: #44BA93 !important;
+}
+
 .text-orange {
 	color: orangered  !important;
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 51 - 3
static/style/icon.css


+ 85 - 0
yarn.lock

@@ -0,0 +1,85 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+asynckit@^0.4.0:
+  version "0.4.0"
+  resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+  integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
+
+axios@^1.2.0:
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.0.tgz#1cb65bd75162c70e9f8d118a905126c4a201d383"
+  integrity sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==
+  dependencies:
+    follow-redirects "^1.15.0"
+    form-data "^4.0.0"
+    proxy-from-env "^1.1.0"
+
+combined-stream@^1.0.8:
+  version "1.0.8"
+  resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
+  integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
+  dependencies:
+    delayed-stream "~1.0.0"
+
+delayed-stream@~1.0.0:
+  version "1.0.0"
+  resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+  integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
+
+echarts@^5.4.0:
+  version "5.4.0"
+  resolved "https://registry.yarnpkg.com/echarts/-/echarts-5.4.0.tgz#a9a8e5367293a397408d3bf3e2638b869249ce04"
+  integrity sha512-uPsO9VRUIKAdFOoH3B0aNg7NRVdN7aM39/OjovjO9MwmWsAkfGyeXJhK+dbRi51iDrQWliXV60/XwLA7kg3z0w==
+  dependencies:
+    tslib "2.3.0"
+    zrender "5.4.0"
+
+follow-redirects@^1.15.0:
+  version "1.15.2"
+  resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"
+  integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==
+
+form-data@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
+  integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
+  dependencies:
+    asynckit "^0.4.0"
+    combined-stream "^1.0.8"
+    mime-types "^2.1.12"
+
+mime-db@1.52.0:
+  version "1.52.0"
+  resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
+  integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
+
+mime-types@^2.1.12:
+  version "2.1.35"
+  resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
+  integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
+  dependencies:
+    mime-db "1.52.0"
+
+moment@^2.29.4:
+  version "2.29.4"
+  resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
+  integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==
+
+proxy-from-env@^1.1.0:
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
+  integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
+
+tslib@2.3.0:
+  version "2.3.0"
+  resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
+  integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
+
+zrender@5.4.0:
+  version "5.4.0"
+  resolved "https://registry.yarnpkg.com/zrender/-/zrender-5.4.0.tgz#d4f76e527b2e3bbd7add2bdaf27a16af85785576"
+  integrity sha512-rOS09Z2HSVGFs2dn/TuYk5BlCaZcVe8UDLLjj1ySYF828LATKKdxuakSZMvrDz54yiKPDYVfjdKqcX8Jky3BIA==
+  dependencies:
+    tslib "2.3.0"