detection_result.vue 10.0 KB

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