detection_result.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. <template>
  2. <view class="m-3 mb-5">
  3. <view class="centerY mt-3">
  4. <view class="bule_line" style=""></view>
  5. <text class="font-bold text-dark ml-2 fs-16 line-height1">检测结果一栏</text>
  6. </view>
  7. <view class="mt-3 bg-white p-3">
  8. <view class="">
  9. <view class="mtable-title centerY bg-primary text-white fs-12">
  10. <view class="text-center w-25">
  11. 检查项
  12. </view>
  13. <view class=" text-center w-40">
  14. 标准值
  15. </view>
  16. <view class="text-center w-35">
  17. 当前结果
  18. </view>
  19. </view>
  20. <view class="mtable-body-item centerY fs-12" v-for="(item,index) in datatable1" style="color: #868687;">
  21. <view class="text-center w-25">
  22. {{item.title}}
  23. </view>
  24. <view class="text-center w-40 text-green2" v-if="propData.patient.sex==1">
  25. {{item.standard1}}
  26. </view>
  27. <view class="text-center w-40 text-green2" v-if="propData.patient.sex==2">
  28. {{item.standard2}}
  29. </view>
  30. <view class="text-center w-40">
  31. <span v-if="item.type==1">{{item.value}} {{item.value=='未测量'?'':item.unit}}</span>
  32. <span v-if="item.type==0" class="text-error">{{item.value }}
  33. {{item.value=='未测量'?'':item.unit}}</span>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. const config = {
  42. pulse: [60, 100],
  43. temperature: [36.5, 37.5],
  44. shrink: [90, 139],
  45. diastole: [60, 90],
  46. shrinktop: [90, 149], //大于65
  47. shrinklow: [90, 139], //小于65
  48. bmi: [18.50, 23.90],
  49. urine1: [
  50. [53, 106],
  51. [44, 97], "肌酐"
  52. ],
  53. urine2: [0, 30, "微量白蛋白"],
  54. urine3: [8.4, 13.2, "尿微/肌酐"],
  55. kidney1: [
  56. [208, 428],
  57. [155, 357], "血尿酸"
  58. ],
  59. kidney2: [
  60. [54, 133],
  61. [44, 97], "血肌酐"
  62. ],
  63. kidney3: [13.9, 6.1, "尿素氮"],
  64. bloodFat1: [0.45, 1.7, "甘油三酯"],
  65. bloodFat2: [2.85, 5.69, "总胆固醇"],
  66. bloodFat3: [0, 3.4, "低密度脂蛋白"],
  67. bloodFat4: [1.16, 1.55, "高密度脂蛋白"],
  68. lvision: [1.0, 5.0, '左视力'],
  69. rvision: [1.0, 5.0, '右视力'],
  70. bloodGlucose: [3.9, 6.9, '血糖'],
  71. chol: [2.85, 5.69, '总胆固醇'],
  72. ua: [
  73. [149, 416],
  74. [89, 357], '尿酸'
  75. ],
  76. spo2: [95, 99, '血氧'],
  77. rxyl: [0, 0],
  78. ryjl: [0, 0],
  79. }
  80. let data1 = {
  81. checkList: [],
  82. visit: {
  83. "id": 1336,
  84. "isSend": 0,
  85. "sendTime": null,
  86. "idCard": "123456200001011212",
  87. "opUserId": 35,
  88. "type": "gxy",
  89. "sfys": "王医生",
  90. "sffs": "门诊",
  91. "zg": "继续随访",
  92. "zdsf": 1,
  93. "mqzz": "[\"无症状\"]",
  94. "xltz": "良好",
  95. "zyxw": "良好",
  96. "fyqk": "规律",
  97. "ywfy": "无",
  98. "rxyl": 0,
  99. "rxylzd": 0,
  100. "ryjl": 0,
  101. "ryjlzd": 0,
  102. "ydcs": 2,
  103. "ydcszd": 6,
  104. "ydsj": 30,
  105. "ydsjzd": 30,
  106. "sycd": "中",
  107. "sycdzd": "轻",
  108. "zs": null,
  109. "zszd": null,
  110. "tzzd": 29,
  111. "bmizd": 23.8,
  112. "ywzd": 89,
  113. "sffl": "控制满意",
  114. "gljb": "三级管理",
  115. "xcyy": "2022-10-06",
  116. "zz": 0,
  117. "zzyy": "",
  118. "zzjg": "",
  119. "jkcf": "1. 定期检查血脂,控制高脂肪饮食,不吃动物的内脏及其制品,可常食用黑木耳、山楂等。肥胖者需控制体重。\n2. 建议接种流感疫苗和肺炎疫苗。\n3. 饮食宜用低盐饮食,食盐每天不超过5~10克(1~2钱)。\n4. 从卧位到立位时不能太快,以防止发生直立性低血压。\n5. 保持大便畅通。",
  120. "zdmbd": "触及正常",
  121. "yds": "无",
  122. "ydsyl": "",
  123. "dxtfy": "无",
  124. "xtlx": "空腹血糖",
  125. "xtz": 0,
  126. "thxhdb": "",
  127. "jcrq": "2022-09-06",
  128. "bqgss": "",
  129. "zzqt": "无",
  130. "tzqt": "无",
  131. "height": 112,
  132. "weight": 50,
  133. "bmi": 39.9,
  134. "waist": 1231,
  135. "shrink": 123,
  136. "diastole": 11,
  137. "pulse": 31,
  138. "temperature": 312,
  139. "bloodGlucose1": null,
  140. "bloodGlucose2": null,
  141. "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\"}]",
  142. "visitSendId": null,
  143. "doctorId": null,
  144. "jkdaGljb": "",
  145. "bloodFat1": null,
  146. "bloodFat2": null,
  147. "bloodFat3": null,
  148. "bloodFat4": null,
  149. "createTime": "2022-09-06T10:30:09",
  150. "updateTime": "2022-09-06T10:30:09",
  151. "isDelete": 0,
  152. "otherDisease": "无",
  153. "lgmjzsj": null,
  154. "fymjzsj": null,
  155. "qttz1": "无",
  156. "lgymjzyy": "0",
  157. "ymgz": "0",
  158. "fyymjzyy": "0",
  159. "outVisterDoctor": null,
  160. "brjy": null,
  161. "outVisterSign": null,
  162. "BackVisitorDate": null
  163. }
  164. }
  165. export default {
  166. name: 'DetectionResult',
  167. data() {
  168. return {
  169. datatable1: [{
  170. title: 'BMI',
  171. value: '',
  172. standard1: '18.5~24 kg/m²',
  173. standard2: '18.5~24 kg/m²',
  174. type: 1,
  175. key: 'visit',
  176. key1: 'bmi',
  177. unit: 'kg/m²',
  178. },
  179. {
  180. title: '腰围',
  181. value: '',
  182. standard1: '<90 cm',
  183. standard2: '<85 cm',
  184. type: 1,
  185. key: 'visit',
  186. key1: 'waist',
  187. unit: 'cm',
  188. },
  189. {
  190. title: '收缩压',
  191. value: '',
  192. standard1: '<140 mmHg',
  193. standard2: '<140 mmHg',
  194. type: 1,
  195. key: 'visit',
  196. key1: 'shrink',
  197. unit: 'mmHg',
  198. },
  199. {
  200. title: '舒张压',
  201. value: '',
  202. standard1: '<90 mmHg',
  203. standard2: '<90 mmHg',
  204. type: 1,
  205. key: 'visit',
  206. key1: 'diastole',
  207. unit: 'mmHg',
  208. },
  209. {
  210. title: '心率',
  211. value: '',
  212. standard1: '60~90 次/分钟',
  213. standard2: '60~90 次/分钟',
  214. type: 1,
  215. key: '',
  216. key1: 'pulse',
  217. unit: '次/分钟',
  218. },
  219. {
  220. title: '吸烟',
  221. value: '',
  222. standard1: '戒烟',
  223. standard2: '戒烟',
  224. type: 1,
  225. key: '',
  226. key1: 'rxyl',
  227. unit: '根 ',
  228. },
  229. {
  230. title: '喝酒',
  231. value: '',
  232. standard1: '戒酒',
  233. standard2: '戒酒',
  234. type: 1,
  235. key: '',
  236. key1: 'ryjl',
  237. unit: 'ml',
  238. },
  239. {
  240. title: '血糖',
  241. value: '',
  242. standard1: '3.9~6.9 mmol/L',
  243. standard2: '3.9~6.9 mmol/L',
  244. type: 1,
  245. key: 'checkList',
  246. key1: 'bloodGlucose',
  247. unit: 'mmol/L',
  248. },
  249. {
  250. title: '血氧',
  251. value: '',
  252. standard1: '>=90 %',
  253. standard2: '>=90 %',
  254. type: 1,
  255. key: 'checkList',
  256. key1: 'spo2',
  257. unit: '%',
  258. },
  259. {
  260. title: '糖化血红蛋白',
  261. value: '',
  262. standard1: '<6.5%',
  263. standard2: '<6.5%',
  264. type: 1,
  265. key: '',
  266. key1: 'thxhdb',
  267. unit: '%',
  268. },
  269. {
  270. title: '总胆固醇',
  271. value: '',
  272. standard1: '2.85~5.69 mmol/L',
  273. standard2: '2.85~5.69 mmol/L',
  274. type: 1,
  275. key: 'checkList',
  276. key1: 'chol',
  277. unit: 'mmol/L',
  278. },
  279. {
  280. title: '甘油三酯',
  281. value: '',
  282. standard1: '0.45~1.7 mmol/L',
  283. standard2: '0.45~1.7 mmol/L',
  284. type: 1,
  285. key: 'checkList',
  286. key1: 'bloodFat1',
  287. unit: 'mmol/L',
  288. },
  289. {
  290. title: '低密度脂蛋白',
  291. value: '',
  292. standard1: '0~3.4 mmol/L',
  293. standard2: '0~3.4 mmol/L',
  294. type: 1,
  295. key: 'checkList',
  296. key1: 'bloodFat3',
  297. unit: 'mmol/L',
  298. },
  299. {
  300. title: '高密度脂蛋白',
  301. value: '',
  302. standard1: '1.16~1.55 mmol/L',
  303. standard2: '1.16~1.55 mmol/L',
  304. type: 1,
  305. key: 'checkList',
  306. key1: 'bloodFat4',
  307. unit: 'mmol/L',
  308. },
  309. {
  310. title: '肌酐',
  311. value: '',
  312. standard1: '53~106 μmol/L',
  313. standard2: '44~97 μmol/L',
  314. type: 1,
  315. key: 'checkList',
  316. key1: 'urine1',
  317. unit: 'μmol/L',
  318. },
  319. {
  320. title: '微量白蛋白',
  321. value: '',
  322. standard1: '0~30 mg/L',
  323. standard2: '0~30 mg/L',
  324. type: 1,
  325. key: 'checkList',
  326. key1: 'urine2',
  327. unit: 'mg/L',
  328. },
  329. {
  330. title: '尿酸',
  331. value: '',
  332. standard1: '149~416 μmol/L',
  333. standard2: '89~357 μmol/L',
  334. type: 1,
  335. key: 'checkList',
  336. key1: 'ua',
  337. unit: 'μmol/L',
  338. },
  339. ],
  340. }
  341. },
  342. props:{
  343. propData: {
  344. type: Object,
  345. default () {
  346. return {
  347. patient: {},
  348. checkResult:{}
  349. }
  350. },
  351. },
  352. },
  353. watch: {
  354. propData: {
  355. handler(val) {
  356. if(val.patient.id){
  357. this.setlist(val.checkResult)
  358. }
  359. },
  360. },
  361. },
  362. created() {
  363. },
  364. methods: {
  365. setlist(checkResult) {
  366. if (checkResult.bmi) {
  367. let checkList = data1.checkList[0] || {}
  368. this.datatable1.map((item, index) => {
  369. if (item.key == 'checkList') {
  370. this.datatable1[index].value = this.filterA(
  371. checkList[item.key1],
  372. item.key1
  373. ).value
  374. this.datatable1[index].type = this.filterA(
  375. checkList[item.key1],
  376. item.key1
  377. ).type
  378. } else {
  379. this.datatable1[index].value = this.filterA(
  380. data1.visit[item.key1],
  381. item.key1
  382. ).value
  383. this.datatable1[index].type = this.filterA(
  384. data1.visit[item.key1],
  385. item.key1
  386. ).type
  387. }
  388. })
  389. } else {
  390. this.datatable1.map((item, index) => {
  391. this.datatable1[index].value = '未测量'
  392. this.datatable1[index].type = 1
  393. })
  394. }
  395. },
  396. filterA(val, key) {
  397. // console.log(key, val)
  398. if ((val != 0 && this.$mf.isEmpty(val)) || String(val) == '') {
  399. // console.log(key, val, val != 0, '0' == '')
  400. return {
  401. value: '未测量',
  402. type: 1
  403. }
  404. }
  405. return {
  406. value: val,
  407. type: this.check({
  408. type: key,
  409. value: val,
  410. age: this.propData.patient.age,
  411. sex: this.propData.patient.sex,
  412. }) ?
  413. 0 :
  414. 1,
  415. }
  416. },
  417. check({
  418. type,
  419. value,
  420. age,
  421. sex
  422. }) {
  423. let msg = this.propData.patient
  424. let arr = config
  425. if (!arr[type]) {
  426. return false
  427. }
  428. if (type == 'shrink' && age) {
  429. if (msg.age > 65) {
  430. if (value > arr['shrinktop'][1]) {
  431. return true
  432. }
  433. if (value < arr['shrinktop'][0]) {
  434. return true
  435. }
  436. } else {
  437. if (value > arr['shrinklow'][1]) {
  438. return true
  439. }
  440. if (value < arr['shrinklow'][0]) {
  441. return true
  442. }
  443. }
  444. }
  445. if (sex) {
  446. if (msg.sex == 1) {
  447. if (value > arr[type][0][1]) {
  448. return true
  449. }
  450. if (value < arr[type][0][0]) {
  451. return true
  452. }
  453. } else {
  454. if (value > arr[type][1][1]) {
  455. return true
  456. }
  457. if (value < arr[type][1][0]) {
  458. return true
  459. }
  460. }
  461. }
  462. if (value > arr[type][1]) {
  463. return true
  464. }
  465. if (value < arr[type][0]) {
  466. return true
  467. }
  468. return false
  469. },
  470. }
  471. }
  472. </script>
  473. <style lang="scss">
  474. page {
  475. background: #F5F9FF;
  476. }
  477. .mtable {
  478. &-title {
  479. border-radius: 50rpx;
  480. padding: 20rpx 0 20rpx 20rpx;
  481. box-shadow: 0px 2px 7px 1px rgba(45, 142, 255, 0.5);
  482. }
  483. &-body {
  484. &-item {
  485. margin-top: 20rpx;
  486. border-radius: 50rpx;
  487. padding: 14rpx 0 14rpx 20rpx;
  488. background-color: #F6F9FE;
  489. color: #868687;
  490. }
  491. }
  492. }
  493. </style>