浏览代码

Merge branch 'superman' of http://git.shengws.com/zhangbj/xt_vue into superman

柳香萍 6 年前
父节点
当前提交
99e43d3f67
共有 31 个文件被更改,包括 4166 次插入3994 次删除
  1. 3 3
      config/dev.env.js
  2. 2 2
      config/index.js
  3. 14 66
      package-lock.json
  4. 9 0
      src/api/board.js
  5. 11 0
      src/api/print_data.js
  6. 44 0
      src/api/qcd.js
  7. 19 18
      src/lang/en.js
  8. 3 1
      src/store/getters.js
  9. 3 1
      src/store/index.js
  10. 434 425
      src/store/modules/globalConfig.js
  11. 26 0
      src/store/modules/temp_params.js
  12. 111 102
      src/xt_pages/dialysis/details/DialysisPrescription.vue
  13. 85 85
      src/xt_pages/dialysis/details/assessmentAfter.vue
  14. 38 38
      src/xt_pages/dialysis/details/assessmentBefore.vue
  15. 294 278
      src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue
  16. 487 512
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  17. 265 279
      src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue
  18. 430 449
      src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue
  19. 80 80
      src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue
  20. 262 119
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  21. 134 111
      src/xt_pages/dialysis/details/dialog/monitor_dialog.vue
  22. 18 18
      src/xt_pages/dialysis/details/dialysisMonitoring.vue
  23. 207 194
      src/xt_pages/dialysis/dialysisPrintOrder.vue
  24. 56 58
      src/xt_pages/dialysis/schedualPatient.vue
  25. 166 166
      src/xt_pages/home/index.vue
  26. 111 119
      src/xt_pages/service/serviceOrder.vue
  27. 0 13
      src/xt_pages/stock/Dialog/stockOutDetailDialog.vue
  28. 314 318
      src/xt_pages/user/components/PatientForm.vue
  29. 144 145
      src/xt_pages/user/dialysisRecord.vue
  30. 383 381
      src/xt_pages/workforce/components/template_table.vue
  31. 13 13
      src/xt_permission.js

+ 3 - 3
config/dev.env.js 查看文件

@@ -7,6 +7,6 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   BASE_API: '"http://localhost:9529"', // '"http://localhost:9529"'//http://api.xt.test.sgjyun.com
10
-  PATIENT_SIT: '"http://test1.sgjyun.com"',
11
-  MIRCOMALL_SIT: '"http://mall.test.sgjyun.com"'
12
-}
10
+  // PATIENT_SIT: '"http://test1.sgjyun.com"',
11
+  // MIRCOMALL_SIT: '"http://mall.test.sgjyun.com"'
12
+}

+ 2 - 2
config/index.js 查看文件

@@ -17,7 +17,7 @@ module.exports = {
17 17
     // can be overwritten by process.env.HOST
18 18
     // if you want dev by ip, please set host: '0.0.0.0'
19 19
 
20
-  //  host: 'xt.test.sgjyun.com',
20
+    // host: 'xt.test.sgjyun.com',
21 21
     // host: 'xt.kuyicloud.com',
22 22
     host: 'localhost',
23 23
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
@@ -29,7 +29,7 @@ module.exports = {
29 29
     // Use Eslint Loader?
30 30
     // If true, your code will be linted during bundling and
31 31
     // linting errors and warnings will be shown in the console.
32
-    useEslint: true,
32
+    useEslint: false,
33 33
 
34 34
     // If true, eslint errors and warnings will also be shown in the error overlay
35 35
     // in the browser.

+ 14 - 66
package-lock.json 查看文件

@@ -2014,12 +2014,6 @@
2014 2014
       "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
2015 2015
       "dev": true
2016 2016
     },
2017
-    "ci-info": {
2018
-      "version": "1.6.0",
2019
-      "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
2020
-      "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==",
2021
-      "dev": true
2022
-    },
2023 2017
     "cipher-base": {
2024 2018
       "version": "1.0.4",
2025 2019
       "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
@@ -4727,14 +4721,12 @@
4727 4721
         "balanced-match": {
4728 4722
           "version": "1.0.0",
4729 4723
           "bundled": true,
4730
-          "dev": true,
4731
-          "optional": true
4724
+          "dev": true
4732 4725
         },
4733 4726
         "brace-expansion": {
4734 4727
           "version": "1.1.11",
4735 4728
           "bundled": true,
4736 4729
           "dev": true,
4737
-          "optional": true,
4738 4730
           "requires": {
4739 4731
             "balanced-match": "^1.0.0",
4740 4732
             "concat-map": "0.0.1"
@@ -4749,20 +4741,17 @@
4749 4741
         "code-point-at": {
4750 4742
           "version": "1.1.0",
4751 4743
           "bundled": true,
4752
-          "dev": true,
4753
-          "optional": true
4744
+          "dev": true
4754 4745
         },
4755 4746
         "concat-map": {
4756 4747
           "version": "0.0.1",
4757 4748
           "bundled": true,
4758
-          "dev": true,
4759
-          "optional": true
4749
+          "dev": true
4760 4750
         },
4761 4751
         "console-control-strings": {
4762 4752
           "version": "1.1.0",
4763 4753
           "bundled": true,
4764
-          "dev": true,
4765
-          "optional": true
4754
+          "dev": true
4766 4755
         },
4767 4756
         "core-util-is": {
4768 4757
           "version": "1.0.2",
@@ -4879,8 +4868,7 @@
4879 4868
         "inherits": {
4880 4869
           "version": "2.0.3",
4881 4870
           "bundled": true,
4882
-          "dev": true,
4883
-          "optional": true
4871
+          "dev": true
4884 4872
         },
4885 4873
         "ini": {
4886 4874
           "version": "1.3.5",
@@ -4892,7 +4880,6 @@
4892 4880
           "version": "1.0.0",
4893 4881
           "bundled": true,
4894 4882
           "dev": true,
4895
-          "optional": true,
4896 4883
           "requires": {
4897 4884
             "number-is-nan": "^1.0.0"
4898 4885
           }
@@ -4907,7 +4894,6 @@
4907 4894
           "version": "3.0.4",
4908 4895
           "bundled": true,
4909 4896
           "dev": true,
4910
-          "optional": true,
4911 4897
           "requires": {
4912 4898
             "brace-expansion": "^1.1.7"
4913 4899
           }
@@ -4915,14 +4901,12 @@
4915 4901
         "minimist": {
4916 4902
           "version": "0.0.8",
4917 4903
           "bundled": true,
4918
-          "dev": true,
4919
-          "optional": true
4904
+          "dev": true
4920 4905
         },
4921 4906
         "minipass": {
4922 4907
           "version": "2.3.5",
4923 4908
           "bundled": true,
4924 4909
           "dev": true,
4925
-          "optional": true,
4926 4910
           "requires": {
4927 4911
             "safe-buffer": "^5.1.2",
4928 4912
             "yallist": "^3.0.0"
@@ -4941,7 +4925,6 @@
4941 4925
           "version": "0.5.1",
4942 4926
           "bundled": true,
4943 4927
           "dev": true,
4944
-          "optional": true,
4945 4928
           "requires": {
4946 4929
             "minimist": "0.0.8"
4947 4930
           }
@@ -5022,8 +5005,7 @@
5022 5005
         "number-is-nan": {
5023 5006
           "version": "1.0.1",
5024 5007
           "bundled": true,
5025
-          "dev": true,
5026
-          "optional": true
5008
+          "dev": true
5027 5009
         },
5028 5010
         "object-assign": {
5029 5011
           "version": "4.1.1",
@@ -5035,7 +5017,6 @@
5035 5017
           "version": "1.4.0",
5036 5018
           "bundled": true,
5037 5019
           "dev": true,
5038
-          "optional": true,
5039 5020
           "requires": {
5040 5021
             "wrappy": "1"
5041 5022
           }
@@ -5157,7 +5138,6 @@
5157 5138
           "version": "1.0.2",
5158 5139
           "bundled": true,
5159 5140
           "dev": true,
5160
-          "optional": true,
5161 5141
           "requires": {
5162 5142
             "code-point-at": "^1.0.0",
5163 5143
             "is-fullwidth-code-point": "^1.0.0",
@@ -5230,9 +5210,9 @@
5230 5210
       }
5231 5211
     },
5232 5212
     "fstream": {
5233
-      "version": "1.0.11",
5234
-      "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
5235
-      "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=",
5213
+      "version": "1.0.12",
5214
+      "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
5215
+      "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
5236 5216
       "dev": true,
5237 5217
       "requires": {
5238 5218
         "graceful-fs": "^4.1.2",
@@ -5951,17 +5931,6 @@
5951 5931
       "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
5952 5932
       "dev": true
5953 5933
     },
5954
-    "husky": {
5955
-      "version": "0.14.3",
5956
-      "resolved": "https://registry.npmjs.org/husky/-/husky-0.14.3.tgz",
5957
-      "integrity": "sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==",
5958
-      "dev": true,
5959
-      "requires": {
5960
-        "is-ci": "^1.0.10",
5961
-        "normalize-path": "^1.0.0",
5962
-        "strip-indent": "^2.0.0"
5963
-      }
5964
-    },
5965 5934
     "iconv-lite": {
5966 5935
       "version": "0.4.24",
5967 5936
       "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@@ -6223,15 +6192,6 @@
6223 6192
       "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
6224 6193
       "dev": true
6225 6194
     },
6226
-    "is-ci": {
6227
-      "version": "1.2.1",
6228
-      "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz",
6229
-      "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==",
6230
-      "dev": true,
6231
-      "requires": {
6232
-        "ci-info": "^1.5.0"
6233
-      }
6234
-    },
6235 6195
     "is-data-descriptor": {
6236 6196
       "version": "0.1.4",
6237 6197
       "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
@@ -7826,12 +7786,6 @@
7826 7786
         "validate-npm-package-license": "^3.0.1"
7827 7787
       }
7828 7788
     },
7829
-    "normalize-path": {
7830
-      "version": "1.0.0",
7831
-      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz",
7832
-      "integrity": "sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=",
7833
-      "dev": true
7834
-    },
7835 7789
     "normalize-range": {
7836 7790
       "version": "0.1.2",
7837 7791
       "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
@@ -13039,12 +12993,6 @@
13039 12993
       "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
13040 12994
       "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
13041 12995
     },
13042
-    "strip-indent": {
13043
-      "version": "2.0.0",
13044
-      "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
13045
-      "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
13046
-      "dev": true
13047
-    },
13048 12996
     "strip-json-comments": {
13049 12997
       "version": "2.0.1",
13050 12998
       "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
@@ -13359,13 +13307,13 @@
13359 13307
       "dev": true
13360 13308
     },
13361 13309
     "tar": {
13362
-      "version": "2.2.1",
13363
-      "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
13364
-      "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
13310
+      "version": "2.2.2",
13311
+      "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
13312
+      "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
13365 13313
       "dev": true,
13366 13314
       "requires": {
13367 13315
         "block-stream": "*",
13368
-        "fstream": "^1.0.2",
13316
+        "fstream": "^1.0.12",
13369 13317
         "inherits": "2"
13370 13318
       }
13371 13319
     },

+ 9 - 0
src/api/board.js 查看文件

@@ -0,0 +1,9 @@
1
+import request from '@/utils/request'
2
+
3
+export function getBoards(page) {
4
+  return request({
5
+    url: '/api/dialysis/board?page=' + page,
6
+    method: 'get'
7
+  })
8
+}
9
+

+ 11 - 0
src/api/print_data.js 查看文件

@@ -0,0 +1,11 @@
1
+import request from '@/utils/request'
2
+
3
+export function GetBatchPrintDialysisData(sch_ids) {
4
+  return request({
5
+    url: '/api/print/schedule/dialysis',
6
+    method: 'get',
7
+    params: {
8
+      ids: sch_ids
9
+    }
10
+  })
11
+}

+ 44 - 0
src/api/qcd.js 查看文件

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+export function getdialysistotaldata(params) {
4
+  return request({
5
+    url: '/api/qcd/dialysistotaldata',
6
+    method: 'get',
7
+    params: params
8
+  })
9
+}
10
+export function GetProcessIndicatorsData(params) {
11
+  return request({
12
+    url: '/api/qcd/processindicatorsdata',
13
+    method: 'get',
14
+    params: params
15
+  })
16
+}
17
+export function GetOICData(params) {
18
+  return request({
19
+    url: '/api/qcd/oicdata',
20
+    method: 'get',
21
+    params: params
22
+  })
23
+}
24
+export function GetOIQData(params) {
25
+  return request({
26
+    url: '/api/qcd/oiqdata',
27
+    method: 'get',
28
+    params: params
29
+  })
30
+}
31
+export function GetPATotalData(params) {
32
+  return request({
33
+    url: '/api/qcd/patotaldata',
34
+    method: 'get',
35
+    params: params
36
+  })
37
+}
38
+export function GetPADialysisAgeData(params) {
39
+  return request({
40
+    url: '/api/qcd/padialysisagedata',
41
+    method: 'get',
42
+    params: params
43
+  })
44
+}

+ 19 - 18
src/lang/en.js 查看文件

@@ -92,24 +92,25 @@ export default {
92 92
     sign: 'sign',
93 93
     remind: 'remind',
94 94
     signWeight: 'signWeight',
95
-    deviceZoneManage: "Device Zone Manage",
96
-    deviceGroupManage: "Device Group Manage",
97
-    deviceNumberManage: "Device Number Manage",
95
+    deviceZoneManage: 'Device Zone Manage',
96
+    deviceGroupManage: 'Device Group Manage',
97
+    deviceNumberManage: 'Device Number Manage',
98 98
     stockManage: 'Stock Manage',
99
-    baseInfo:'base Info',
100
-    stockIn:'stock in',
101
-    stockOut:'stock out',
102
-    stockQuery:'stock query',
103
-    manufacturer:'manufacturer',
104
-    dealer:'dealer',
105
-    AddStockIn:"Add Stock In",
106
-    salesReturn:"sales Return",
107
-    deviceNumberManage: "Device Number Manage",
108
-    workforce_template: "Workforce Template",
109
-    CourseOfDiseaseManage: "Course Of Disease Manage",
110
-    RescueRecord: "Rescue Record",
111
-    special_permission_manage: "Special Permission Manage",
112
-    schedule_print: "Print Schudule",
99
+    baseInfo: 'base Info',
100
+    stockIn: 'stock in',
101
+    stockOut: 'stock out',
102
+    stockQuery: 'stock query',
103
+    manufacturer: 'manufacturer',
104
+    dealer: 'dealer',
105
+    AddStockIn: 'Add Stock In',
106
+    salesReturn: 'sales Return',
107
+    deviceNumberManage: 'Device Number Manage',
108
+    workforce_template: 'Workforce Template',
109
+    CourseOfDiseaseManage: 'Course Of Disease Manage',
110
+    RescueRecord: 'Rescue Record',
111
+    special_permission_manage: 'Special Permission Manage',
112
+    schedule_print: 'Print Schudule',
113
+    dialysis_batch_print: 'Batch Print Order'
113 114
   },
114 115
   navbar: {
115 116
     logOut: 'Log Out',
@@ -209,6 +210,6 @@ export default {
209 210
     config_value: 'config_value',
210 211
     remark: '备注',
211 212
     course_disease: 'course_of_disease',
212
-    rescue_record: 'rescue_record',
213
+    rescue_record: 'rescue_record'
213 214
   }
214 215
 }

+ 3 - 1
src/store/getters.js 查看文件

@@ -61,6 +61,8 @@ const getters = {
61 61
   patient_gose: state => state.global_config.patient_gose,
62 62
   observation_content: state => state.global_config.observation_content,
63 63
   units: state => state.global_config.units,
64
-  good_unit:state => state.global_config.good_unit,
64
+  good_unit: state => state.global_config.good_unit,
65
+
66
+  temp_params: state => state.temp_params
65 67
 }
66 68
 export default getters

+ 3 - 1
src/store/index.js 查看文件

@@ -12,6 +12,7 @@ import global_config from './modules/globalConfig'
12 12
 
13 13
 import getters from './getters'
14 14
 import data from './modules/data'
15
+import temp_params from './modules/temp_params'
15 16
 
16 17
 Vue.use(Vuex)
17 18
 
@@ -26,7 +27,8 @@ const store = new Vuex.Store({
26 27
     data,
27 28
     xt_permission,
28 29
     xt_role_temps,
29
-    global_config
30
+    global_config,
31
+    temp_params
30 32
   },
31 33
   getters
32 34
 })

+ 434 - 425
src/store/modules/globalConfig.js 查看文件

@@ -1,444 +1,453 @@
1 1
 const global_config = {
2
-    state:{
3
-        patient_types:[//患者类型
4
-            {id:1,name:"血透患者",type:1},
5
-            {id:2,name:"腹透患者",type:2},
6
-        ],
7
-        partitions:[//病区
8
-            {id:1, name:"A区"},
9
-            {id:2, name:"B区"},
10
-            {id:3, name:"C区"},
11
-        ],
12
-        marital_options:[//婚姻状况
13
-            {id:1, name:"未婚"},
14
-            {id:2, name:"已婚"},
15
-            {id:3, name:"离异"},
16
-        ],
17
-        reimbursement_ways:[//报销方式
18
-            {id:1, name:"职工医保"},
19
-            {id:2, name:"居民医保"},
20
-            {id:3, name:"离休医保"},
21
-            {id:4, name:"杭州医保"},
22
-            {id:5, name:"退休医保"},
23
-            {id:6, name:"其他"},
24
-            {id:7, name:"异地市域"},
25
-            {id:8, name:"异地省域"},
26
-        ],
27
-        blood_types:[//血型
28
-            {id:1, name:"A"},
29
-            {id:2, name:"B"},
30
-            {id:3, name:"AB"},
31
-            {id:4, name:"O"},
32
-            {id:5, name:"不详"},
33
-        ],
34
-        rh:[
35
-            {id:1, name:"阴性"},
36
-            {id:2, name:"阳性"},
37
-            {id:3, name:"不详"},
38
-            {id:4, name:"未查"},
39
-        ],
40
-        education_types:[//文化程度
41
-            { id: 1, name: "小学毕业" },
42
-            { id: 2, name: "初中毕业" },
43
-            { id: 3, name: "高中毕业" },
44
-            { id: 4, name: "中等技术学校,职业学校毕业" },
45
-            { id: 5, name: "大专或大学毕业" },
46
-            { id: 6, name: "硕士以上" }
47
-        ],
48
-        profession_options:[//职业
49
-            { id: 1, name: "在家" },
50
-            { id: 2, name: "国家,党群组织,企事业人员" },
51
-            { id: 3, name: "专业技术人员" },
52
-            { id: 4, name: "非技术工作或普通工人" },
53
-            { id: 5, name: "商业,服务业人员" },
54
-            { id: 6, name: "农业,牧渔,水利生产人员" },
55
-            { id: 7, name: "生产,运输设备操作人员及有关人员" },
56
-            { id: 8, name: "军人" },
57
-            { id: 9, name: "不便分类的其他人员" },
58
-            { id: 10, name: "无业" }
59
-        ],
60
-        induction_options:[//诱导期
61
-            { id: 1, name: "无" },
62
-            { id: 2, name: "一周" },
63
-            { id: 3, name: "两周" },
64
-            { id: 4, name: "三周" },
65
-            { id: 5, name: "四周" },
66
-            { id: 6, name: "五周" },
67
-            { id: 7, name: "六周" },
68
-            { id: 8, name: "七周" },
69
-            { id: 9, name: "八周" }
70
-        ],
71
-        contagions:[//传染病
72
-            { id: 1, name: "普通",type:1 },
73
-            { id: 2, name: "乙肝",type:2 },
74
-            { id: 3, name: "丙肝",type:2 },
75
-            { id: 4, name: "艾滋病",type:2 },
76
-            { id: 5, name: "肺结核",type:2 },
77
-            { id: 6, name: "梅毒",type:2 },
78
-        ],
79
-        disease:[//慢性病
80
-            { id: 1, name: "慢性病" },
81
-            { id: 2, name: "神经病" },
82
-            { id: 3, name: "抑郁症" },
83
-        ],
84
-        treatment_mode: {//治疗模式
85
-            1:{id:1, name:"HD",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
86
-            2:{id:2, name:"HDF",dialysis_duration:1, replacement_way:1,hemodialysis_machine:2,blood_filter:1,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
87
-            3:{id:3, name:"HD+HP",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:1,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
88
-            4:{id:4, name:"HP",dialysis_duration:1, replacement_way:2,hemodialysis_machine:2,blood_filter:2,perfusion_apparatus:1,blood_flow_volume:1,dialysate_flow:2,kalium:2,sodium:2,calcium:2,bicarbonate:2},
89
-            5:{id:5, name:"HF",dialysis_duration:1, replacement_way:1,hemodialysis_machine:2,blood_filter:1,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:2,kalium:1,sodium:1,calcium:1,bicarbonate:1},
90
-            6:{id:6, name:"SCUF",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:2,kalium:2,sodium:2,calcium:2,bicarbonate:2},
91
-            7:{id:7, name:"IUF",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:2,blood_flow_volume:2,dialysate_flow:2,kalium:2,sodium:2,calcium:2,bicarbonate:2},
92
-            8:{id:8, name:"HFHD",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
93
-            9:{id:9, name:"HFHD+HP",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:1,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
94
-            10:{id:10, name:"PHF",dialysis_duration:1, replacement_way:1,hemodialysis_machine:2,blood_filter:1,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
95
-            11:{id:11, name:"HFR",dialysis_duration:1, replacement_way:2,hemodialysis_machine:2,blood_filter:1,perfusion_apparatus:1,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
96
-            12:{id:12, name:"HDF+HP",dialysis_duration:1, replacement_way:1,hemodialysis_machine:2,blood_filter:1,perfusion_apparatus:1,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
97
-            13:{id:13, name:"CRRT",dialysis_duration:1, replacement_way:1,hemodialysis_machine:2,blood_filter:1,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:2,kalium:1,sodium:1,calcium:1,bicarbonate:1},
98
-            14:{id:14, name:"腹水回输",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:2,blood_flow_volume:2,dialysate_flow:2,kalium:2,sodium:2,calcium:2,bicarbonate:2},
99
-            15:{id:15, name:"HD前置换",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
100
-            16:{id:16, name:"HD后置换",dialysis_duration:1, replacement_way:2,hemodialysis_machine:1,blood_filter:2,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
101
-            17:{id:17, name:"HDF前置换",dialysis_duration:1, replacement_way:1,hemodialysis_machine:2,blood_filter:1,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
102
-            18:{id:18, name:"HDF后置换",dialysis_duration:1, replacement_way:1,hemodialysis_machine:2,blood_filter:1,perfusion_apparatus:2,blood_flow_volume:1,dialysate_flow:1,kalium:1,sodium:1,calcium:1,bicarbonate:1},
103
-
104
-        },
105
-        anticoagulants_confit:{//抗凝剂
106
-            1:{id:1, name:"无肝素",    type:1, shouji:2, weichi:2, zongliang:2, gaimingcheng:-1, gaijiliang:-1, shouji_unit:"mg", weichi_unit:"mg/h", zongliang_unit:"mg", gaimingcheng_unit:"", gaijiliang_unit:""},
107
-            2:{id:2, name:"普通肝素",  type:1, shouji:1, weichi:1, zongliang:1, gaimingcheng:-1, gaijiliang:-1, shouji_unit:"mg", weichi_unit:"mg/h", zongliang_unit:"mg", gaimingcheng_unit:"", gaijiliang_unit:""},
108
-            3:{id:3, name:"低分子肝素",type:1, shouji:-1, weichi:-1, zongliang:1,  gaimingcheng:-1, gaijiliang:-1, shouji_unit:"lu", weichi_unit:"lu", zongliang_unit:"lu", gaimingcheng_unit:"", gaijiliang_unit:""},
109
-            4:{id:4, name:"阿加曲班", type:1, shouji:1, weichi:1, zongliang:1, gaimingcheng:-1, gaijiliang:-1, shouji_unit:"mg", weichi_unit:"mg/h", zongliang_unit:"mg", gaimingcheng_unit:"", gaijiliang_unit:""},
110
-            5:{id:5, name:"枸橼酸钠", type:1, shouji:-1, weichi:1, zongliang:-1, gaimingcheng:1, gaijiliang:1, shouji_unit:"", weichi_unit:"ml/h", zongliang_unit:"", gaimingcheng_unit:"ml/h", gaijiliang_unit:""},
111
-        },
112
-        anticoagulants_set:{
113
-            type:2,
114
-        },
115
-        replacement_ways:[
116
-            {id:1, name:"前置换"},
117
-            {id:2, name:"后置换"},
118
-            {id:3, name:"中置换"},
119
-            {id:4, name:"混合置换"},
120
-        ],
121
-        blood_filters:[
122
-            {id:1, name:"血滤器1"},
123
-            {id:2, name:"血滤器2"},
124
-            {id:3, name:"血滤器3"},
125
-            {id:4, name:"血滤器4"},
126
-        ],
127
-        perfusion_apparatus:[
128
-            {id:1, name:"灌流器1"},
129
-            {id:2, name:"灌流器2"},
130
-            {id:3, name:"灌流器3"},
131
-            {id:4, name:"灌流4"},
132
-        ],
133
-        hemodialysis_machines:[
134
-            {id:1, name:"血透器1"},
135
-            {id:2, name:"血透器2"},
136
-            {id:3, name:"血透器3"},
137
-            {id:4, name:"血透器4"},
138
-        ],
139
-        vascular_access:{
140
-            1:{id:1, name:'左侧'},
141
-            2:{id:2, name:'右侧'},
142
-            3:{id:3, name:'左鼻咽窝'},
143
-            4:{id:4, name:'右鼻咽窝'},
144
-            5:{id:5, name:'左前臂腕部'},
145
-            6:{id:6, name:'右前臂腕部'},
146
-            7:{id:7, name:'左前臂'},
147
-            8:{id:8, name:'右前臂'},
148
-            9:{id:9, name:'左上臂'},
149
-            10:{id:10, name:'右上臂'},
150
-            11:{id:11, name:'左下肢'},
151
-            12:{id:12, name:'右下肢'},
152
-        },
153
-        vascular_access_desc:{
154
-            1:{id: 1, name: '自体内瘘'},
155
-            2:{id: 2, name: '人造血管'},
156
-            3:{id: 3, name: '直穿'},
157
-            4:{id: 4, name: '颈内静脉'},
158
-            5:{id: 5, name: '股静脉'},
159
-            6:{id: 6, name:'动脉直穿'},
160
-            7:{id: 7, name:'动静脉直穿'},
161
-            8:{id: 8, name:'带隧道带绦纶套股静脉导管'},
162
-            9:{id: 9, name:'带隧道带绦纶套锁骨下静脉导管'},
163
-            10:{id: 10, name:'带隧道带绦纶套颈内静脉导管'},
164
-            11:{id: 11, name:'无绦纶套股静脉导管'},
165
-            12:{id: 12, name:'无绦纶套锁骨下静脉导管'},
166
-            13:{id: 13, name:'无绦纶套颈内静脉导管'},
167
-            14:{id: 14, name:'直线型移植血管动静脉内瘘'},
168
-            15:{id: 15, name:'自体动静脉内瘘'},
169
-            16:{id: 16, name:'袢型移植血管动静脉内瘘'},
170
-            17:{id: 17, name:'静脉直穿'},
171
-        },
172
-
173
-        // 透析液配方
174
-        dialysate_formulation: [
175
-            {id: 1, value:"常规", name:"常规"},
176
-            {id: 2, value:"低钙(1.25mmol/L)", name:"低钙(1.25mmol/L)"},
177
-            {id: 3, value:"高钙(1.75mmol/L)", name:"高钙(1.75mmol/L)"},
178
-            {id: 4, value:"低钠(135mmol/L)", name:"低钠(135mmol/L)"},
179
-            {id: 5, value:"高钠(145mmol/L)", name:"高钠(145mmol/L)"},
180
-        ],
181
-
182
-
183
-      symptoms:[
184
-        {id:1, name:'血压下降'},
185
-        {id:2, name:'恶心呕吐'},
186
-        {id:3, name:'肌肉痉挛'},
187
-        {id:4, name:'血压增高'},
188
-        {id:5, name:'头痛'},
189
-        {id:6, name:'胸痛,背痛'},
190
-        {id:7, name:'休克'},
191
-        {id:8, name:'低血糖'},
192
-        {id:9, name:'皮肤瘙痒'},
193
-        {id:10, name:'静脉压高'},
194
-        {id:11, name:'静脉压低'},
195
-        {id:12, name:'血流量不足'},
196
-        {id:13, name:'透析中体外循环凝血'},
197
-        {id:14, name:'胃寒发热'},
198
-        {id:15, name:'无肝素透析'},
199
-        {id:16, name:'穿刺部位渗血'},
200
-        {id:17, name:'A端穿刺点脓性分泌物,更换穿刺点'},
201
-        {id:18, name:'A端穿失败至血肿'},
202
-        {id:19, name:'穿刺针脱落'},
203
-        {id:20, name:'导管相关血流感染'},
204
-        {id:21, name:'导管出口处感染:红肿热痛,有异味'},
205
-        {id:22, name:'首次使用综合症'},
206
-        {id:23, name:'失衡综合症'},
207
-        {id:24, name:'意识障碍'},
208
-        {id:25, name:'空气栓塞'},
209
-        {id:26, name:'透析器破膜'},
210
-        {id:27, name:'透析器反应'},
211
-        {id:28, name:'下机拔针动脉渗血'},
212
-        {id:29, name:'下机拔针京脉渗血'},
213
-      ],
214
-
215
-
216
-      deals:[
217
-        {id:1, name:'立即汇报医生'},
218
-        {id:2, name:'遵医嘱'},
219
-        {id:3, name:'暂停超滤'},
220
-        {id:4, name:'降低血流量'},
221
-        {id:5, name:'头低足高位'},
222
-        {id:6, name:'0.9%NS100ml输注'},
223
-        {id:7, name:'密切观察病情变化'},
224
-        {id:8, name:'提前结束透析'},
225
-        {id:9, name:'透析平卧,头偏向一侧'},
226
-        {id:10, name:'保持呼吸道通畅'},
227
-        {id:11, name:'挤压按摩痉挛肌肉'},
228
-        {id:12, name:'按医嘱用药'},
229
-        {id:13, name:'指测血糖'},
230
-        {id:14, name:'进食糖块'},
231
-        {id:15, name:'安抚患者,减轻患者紧张情绪'},
232
-        {id:16, name:'停止透析,丢弃透析器及管路内的血液'},
233
-      ],
234
-
235
-
236
-      results:[
237
-        {id:1, name:'症状好转'},
238
-        {id:2, name:'症状好转,继续脱水'},
239
-        {id:3, name:'低血糖纠正'},
240
-        {id:4, name:'症状消失'},
241
-        {id:5, name:'回血后症状好转'},
242
-        {id:6, name:'其他'},
243
-        {id:7, name:'血糖mmol/l'},
244
-        {id:8, name:'家属要求结束透析'},
245
-        {id:9, name:'内瘘穿刺不顺利'},
246
-        {id:10, name:'内瘘穿刺不顺利-静脉端'},
247
-        {id:11, name:'局部血肿瘀血'},
248
-        {id:12, name:'瘢痕'},
249
-        {id:13, name:'血管条件差'},
250
-        {id:14, name:'血流量不足'},
251
-        {id:15, name:'血肿:无'},
252
-        {id:16, name:'血肿:有,5x5cm'},
253
-        {id:17, name:'动脉穿刺2针'},
254
-        {id:18, name:'静脉穿刺2针'},
255
-        {id:19, name:'下针拔针不顺利'},
256
-        {id:20, name:'血肿:有,5x5cm'}
257
-      ],
2
+  state: {
3
+    patient_types: [// 患者类型
4
+      { id: 1, name: '血透患者', type: 1 },
5
+      { id: 2, name: '腹透患者', type: 2 }
6
+    ],
7
+    partitions: [// 病区
8
+      { id: 1, name: 'A区' },
9
+      { id: 2, name: 'B区' },
10
+      { id: 3, name: 'C区' }
11
+    ],
12
+    marital_options: [// 婚姻状况
13
+      { id: 1, name: '未婚' },
14
+      { id: 2, name: '已婚' },
15
+      { id: 3, name: '离异' }
16
+    ],
17
+    reimbursement_ways: [// 报销方式
18
+      { id: 1, name: '职工医保' },
19
+      { id: 2, name: '居民医保' },
20
+      { id: 3, name: '离休医保' },
21
+      { id: 4, name: '杭州医保' },
22
+      { id: 5, name: '退休医保' },
23
+      { id: 6, name: '其他' },
24
+      { id: 7, name: '异地市域' },
25
+      { id: 8, name: '异地省域' }
26
+    ],
27
+    blood_types: [// 血型
28
+      { id: 1, name: 'A' },
29
+      { id: 2, name: 'B' },
30
+      { id: 3, name: 'AB' },
31
+      { id: 4, name: 'O' },
32
+      { id: 5, name: '不详' }
33
+    ],
34
+    rh: [
35
+      { id: 1, name: '阴性' },
36
+      { id: 2, name: '阳性' },
37
+      { id: 3, name: '不详' },
38
+      { id: 4, name: '未查' }
39
+    ],
40
+    education_types: [// 文化程度
41
+      { id: 1, name: '小学毕业' },
42
+      { id: 2, name: '初中毕业' },
43
+      { id: 3, name: '高中毕业' },
44
+      { id: 4, name: '中等技术学校,职业学校毕业' },
45
+      { id: 5, name: '大专或大学毕业' },
46
+      { id: 6, name: '硕士以上' }
47
+    ],
48
+    profession_options: [// 职业
49
+      { id: 1, name: '在家' },
50
+      { id: 2, name: '国家,党群组织,企事业人员' },
51
+      { id: 3, name: '专业技术人员' },
52
+      { id: 4, name: '非技术工作或普通工人' },
53
+      { id: 5, name: '商业,服务业人员' },
54
+      { id: 6, name: '农业,牧渔,水利生产人员' },
55
+      { id: 7, name: '生产,运输设备操作人员及有关人员' },
56
+      { id: 8, name: '军人' },
57
+      { id: 9, name: '不便分类的其他人员' },
58
+      { id: 10, name: '无业' }
59
+    ],
60
+    induction_options: [// 诱导期
61
+      { id: 1, name: '无' },
62
+      { id: 2, name: '一周' },
63
+      { id: 3, name: '两周' },
64
+      { id: 4, name: '三周' },
65
+      { id: 5, name: '四周' },
66
+      { id: 6, name: '五周' },
67
+      { id: 7, name: '六周' },
68
+      { id: 8, name: '七周' },
69
+      { id: 9, name: '八周' }
70
+    ],
71
+    contagions: [// 传染病
72
+      { id: 1, name: '普通', type: 1 },
73
+      { id: 2, name: '乙肝', type: 2 },
74
+      { id: 3, name: '丙肝', type: 2 },
75
+      { id: 4, name: '艾滋病', type: 2 },
76
+      { id: 5, name: '肺结核', type: 2 },
77
+      { id: 6, name: '梅毒', type: 2 }
78
+    ],
79
+    disease: [// 慢性病
80
+      { id: 1, name: '慢性病' },
81
+      { id: 2, name: '神经病' },
82
+      { id: 3, name: '抑郁症' }
83
+    ],
84
+    treatment_mode: {// 治疗模式
85
+      1: { id: 1, name: 'HD', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
86
+      2: { id: 2, name: 'HDF', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
87
+      3: { id: 3, name: 'HD+HP', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 1, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
88
+      4: { id: 4, name: 'HP', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 2, blood_filter: 2, perfusion_apparatus: 1, blood_flow_volume: 1, dialysate_flow: 2, kalium: 2, sodium: 2, calcium: 2, bicarbonate: 2 },
89
+      5: { id: 5, name: 'HF', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 2, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
90
+      6: { id: 6, name: 'SCUF', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 2, kalium: 2, sodium: 2, calcium: 2, bicarbonate: 2 },
91
+      7: { id: 7, name: 'IUF', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 2, dialysate_flow: 2, kalium: 2, sodium: 2, calcium: 2, bicarbonate: 2 },
92
+      8: { id: 8, name: 'HFHD', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
93
+      9: { id: 9, name: 'HFHD+HP', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 1, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
94
+      10: { id: 10, name: 'PHF', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
95
+      11: { id: 11, name: 'HFR', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 1, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
96
+      12: { id: 12, name: 'HDF+HP', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 1, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
97
+      13: { id: 13, name: 'CRRT', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 2, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
98
+      14: { id: 14, name: '腹水回输', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 2, dialysate_flow: 2, kalium: 2, sodium: 2, calcium: 2, bicarbonate: 2 },
99
+      15: { id: 15, name: 'HD前置换', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
100
+      16: { id: 16, name: 'HD后置换', dialysis_duration: 1, replacement_way: 2, hemodialysis_machine: 1, blood_filter: 2, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
101
+      17: { id: 17, name: 'HDF前置换', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 },
102
+      18: { id: 18, name: 'HDF后置换', dialysis_duration: 1, replacement_way: 1, hemodialysis_machine: 2, blood_filter: 1, perfusion_apparatus: 2, blood_flow_volume: 1, dialysate_flow: 1, kalium: 1, sodium: 1, calcium: 1, bicarbonate: 1 }
258 103
 
104
+    },
105
+    anticoagulants_confit: {// 抗凝剂
106
+      1: { id: 1, name: '无肝素', type: 1, shouji: 2, weichi: 2, zongliang: 2, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'mg', weichi_unit: 'mg/h', zongliang_unit: 'mg', gaimingcheng_unit: '', gaijiliang_unit: '' },
107
+      2: { id: 2, name: '普通肝素', type: 1, shouji: 1, weichi: 1, zongliang: 1, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'mg', weichi_unit: 'mg/h', zongliang_unit: 'mg', gaimingcheng_unit: '', gaijiliang_unit: '' },
108
+      3: { id: 3, name: '低分子肝素', type: 1, shouji: -1, weichi: -1, zongliang: 1, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'lu', weichi_unit: 'lu', zongliang_unit: 'lu', gaimingcheng_unit: '', gaijiliang_unit: '' },
109
+      4: { id: 4, name: '阿加曲班', type: 1, shouji: 1, weichi: 1, zongliang: 1, gaimingcheng: -1, gaijiliang: -1, shouji_unit: 'mg', weichi_unit: 'mg/h', zongliang_unit: 'mg', gaimingcheng_unit: '', gaijiliang_unit: '' },
110
+      5: { id: 5, name: '枸橼酸钠', type: 1, shouji: -1, weichi: 1, zongliang: -1, gaimingcheng: 1, gaijiliang: 1, shouji_unit: '', weichi_unit: 'ml/h', zongliang_unit: '', gaimingcheng_unit: 'ml/h', gaijiliang_unit: '' }
111
+    },
112
+    anticoagulants_set: {
113
+      type: 2
114
+    },
115
+    replacement_ways: [
116
+      { id: 1, name: '前置换' },
117
+      { id: 2, name: '后置换' },
118
+      { id: 3, name: '中置换' },
119
+      { id: 4, name: '混合置换' }
120
+    ],
121
+    blood_filters: [
122
+      { id: 1, name: '血滤器1' },
123
+      { id: 2, name: '血滤器2' },
124
+      { id: 3, name: '血滤器3' },
125
+      { id: 4, name: '血滤器4' }
126
+    ],
127
+    perfusion_apparatus: [
128
+      { id: 1, name: '灌流器1' },
129
+      { id: 2, name: '灌流器2' },
130
+      { id: 3, name: '灌流器3' },
131
+      { id: 4, name: '灌流4' }
132
+    ],
133
+    hemodialysis_machines: [
134
+      { id: 1, name: '血透器1' },
135
+      { id: 2, name: '血透器2' },
136
+      { id: 3, name: '血透器3' },
137
+      { id: 4, name: '血透器4' }
138
+    ],
139
+    vascular_access: {
140
+      1: { id: 1, name: '左侧' },
141
+      2: { id: 2, name: '右侧' },
142
+      3: { id: 3, name: '左鼻咽窝' },
143
+      4: { id: 4, name: '右鼻咽窝' },
144
+      5: { id: 5, name: '左前臂腕部' },
145
+      6: { id: 6, name: '右前臂腕部' },
146
+      7: { id: 7, name: '左前臂' },
147
+      8: { id: 8, name: '右前臂' },
148
+      9: { id: 9, name: '左上臂' },
149
+      10: { id: 10, name: '右上臂' },
150
+      11: { id: 11, name: '左下肢' },
151
+      12: { id: 12, name: '右下肢' }
152
+    },
153
+    vascular_access_desc: {
154
+      1: { id: 1, name: '自体内瘘' },
155
+      2: { id: 2, name: '人造血管' },
156
+      3: { id: 3, name: '直穿' },
157
+      4: { id: 4, name: '颈内静脉' },
158
+      5: { id: 5, name: '股静脉' },
159
+      6: { id: 6, name: '动脉直穿' },
160
+      7: { id: 7, name: '动静脉直穿' },
161
+      8: { id: 8, name: '带隧道带绦纶套股静脉导管' },
162
+      9: { id: 9, name: '带隧道带绦纶套锁骨下静脉导管' },
163
+      10: { id: 10, name: '带隧道带绦纶套颈内静脉导管' },
164
+      11: { id: 11, name: '无绦纶套股静脉导管' },
165
+      12: { id: 12, name: '无绦纶套锁骨下静脉导管' },
166
+      13: { id: 13, name: '无绦纶套颈内静脉导管' },
167
+      14: { id: 14, name: '直线型移植血管动静脉内瘘' },
168
+      15: { id: 15, name: '自体动静脉内瘘' },
169
+      16: { id: 16, name: '袢型移植血管动静脉内瘘' },
170
+      17: { id: 17, name: '静脉直穿' }
171
+    },
259 172
 
260
-      dialysis_duration:[
261
-        {id:1, name:'无症状'},
262
-        {id:2, name:'耳鸣'},
263
-        {id:3, name:'出汗'},
264
-        {id:4, name:'食欲差'},
265
-        {id:5, name:'血压偏高'},
266
-        {id:6, name:'四肢无力,口周发麻'},
267
-        {id:7, name:'腹泻'},
268
-        {id:8, name:'肢体偏瘫活动'},
269
-        {id:9, name:'胸闷'},
270
-        {id:10, name:'黑便'},
271
-        {id:11, name:'咳嗽'},
272
-      ],
173
+    // 透析液配方
174
+    dialysate_formulation: [
175
+      { id: 1, value: '常规', name: '常规' },
176
+      { id: 2, value: '低钙(1.25mmol/L)', name: '低钙(1.25mmol/L)' },
177
+      { id: 3, value: '高钙(1.75mmol/L)', name: '高钙(1.75mmol/L)' },
178
+      { id: 4, value: '低钠(135mmol/L)', name: '低钠(135mmol/L)' },
179
+      { id: 5, value: '高钠(145mmol/L)', name: '高钠(145mmol/L)' }
180
+    ],
273 181
 
274
-      last_dialysis_after:[
275
-        {id:1, name:'无症状'},
276
-        {id:2, name:'耳鸣'},
277
-        {id:3, name:'出汗'},
278
-        {id:4, name:'乏力'},
279
-        {id:5, name:'呕吐'},
280
-        {id:6, name:'胸闷'},
281
-        {id:7, name:'出血'},
282
-        {id:8, name:'深昏迷'},
283
-        {id:9, name:'腹泻'},
284
-        {id:10, name:'痉挛'},
285
-        {id:11, name:'头晕'},
286
-        {id:12, name:'出血'},
287
-        {id:13, name:'恶心'},
288
-        {id:14, name:'头痛'},
289
-        {id:15, name:'发热'},
290
-      ],
182
+    symptoms: [
183
+      { id: 1, name: '血压下降' },
184
+      { id: 2, name: '恶心呕吐' },
185
+      { id: 3, name: '肌肉痉挛' },
186
+      { id: 4, name: '血压增高' },
187
+      { id: 5, name: '头痛' },
188
+      { id: 6, name: '胸痛,背痛' },
189
+      { id: 7, name: '休克' },
190
+      { id: 8, name: '低血糖' },
191
+      { id: 9, name: '皮肤瘙痒' },
192
+      { id: 10, name: '静脉压高' },
193
+      { id: 11, name: '静脉压低' },
194
+      { id: 12, name: '血流量不足' },
195
+      { id: 13, name: '透析中体外循环凝血' },
196
+      { id: 14, name: '胃寒发热' },
197
+      { id: 15, name: '无肝素透析' },
198
+      { id: 16, name: '穿刺部位渗血' },
199
+      { id: 17, name: 'A端穿刺点脓性分泌物,更换穿刺点' },
200
+      { id: 18, name: 'A端穿失败至血肿' },
201
+      { id: 19, name: '穿刺针脱落' },
202
+      { id: 20, name: '导管相关血流感染' },
203
+      { id: 21, name: '导管出口处感染:红肿热痛,有异味' },
204
+      { id: 22, name: '首次使用综合症' },
205
+      { id: 23, name: '失衡综合症' },
206
+      { id: 24, name: '意识障碍' },
207
+      { id: 25, name: '空气栓塞' },
208
+      { id: 26, name: '透析器破膜' },
209
+      { id: 27, name: '透析器反应' },
210
+      { id: 28, name: '下机拔针动脉渗血' },
211
+      { id: 29, name: '下机拔针京脉渗血' }
212
+    ],
291 213
 
292
-     dialysis_before:[
293
-        {id:1, name:'无症状'},
294
-        {id:2, name:'耳鸣'},
295
-        {id:3, name:'出汗'},
296
-        {id:4, name:'乏力'},
297
-        {id:5, name:'呕吐'},
298
-        {id:6, name:'胸闷'},
299
-        {id:7, name:'出血'},
300
-        {id:8, name:'深昏迷'},
301
-        {id:9, name:'腹泻'},
302
-        {id:10, name:'痉挛'},
303
-        {id:11, name:'头晕'},
304
-        {id:12, name:'出血'},
305
-        {id:13, name:'恶心'},
306
-        {id:14, name:'头痛'},
307
-        {id:15, name:'发热'},
308
-      ],
214
+    deals: [
215
+      { id: 1, name: '立即汇报医生' },
216
+      { id: 2, name: '遵医嘱' },
217
+      { id: 3, name: '暂停超滤' },
218
+      { id: 4, name: '降低血流量' },
219
+      { id: 5, name: '头低足高位' },
220
+      { id: 6, name: '0.9%NS100ml输注' },
221
+      { id: 7, name: '密切观察病情变化' },
222
+      { id: 8, name: '提前结束透析' },
223
+      { id: 9, name: '透析平卧,头偏向一侧' },
224
+      { id: 10, name: '保持呼吸道通畅' },
225
+      { id: 11, name: '挤压按摩痉挛肌肉' },
226
+      { id: 12, name: '按医嘱用药' },
227
+      { id: 13, name: '指测血糖' },
228
+      { id: 14, name: '进食糖块' },
229
+      { id: 15, name: '安抚患者,减轻患者紧张情绪' },
230
+      { id: 16, name: '停止透析,丢弃透析器及管路内的血液' }
231
+    ],
309 232
 
310
-      internal_fistula:[
311
-        {id:1, name:'震颤-存在'},
312
-        {id:2, name:'震颤-减弱'},
313
-        {id:3, name:'震颤-无'},
314
-        {id:4, name:'内瘘皮肤-正常'},
315
-        {id:5, name:'内瘘皮肤-瘀斑'},
316
-        {id:6, name:'内瘘皮肤-红'},
317
-        {id:7, name:'内瘘皮肤-肿'},
318
-        {id:8, name:'无搏动'},
319
-        {id:9, name:'皮下瘀血'},
320
-        {id:10, name:'内瘘术后待成熟,可及震颤'},
321
-        {id:11, name:'内瘘PTA术后一天,震颤强'},
322
-        {id:12, name:'内瘘首次使用穿刺顺利'},
323
-        {id:13, name:'血管狭窄'},
324
-        {id:14, name:'肿胀手综合征'},
325
-        {id:15, name:'正常'},
326
-        {id:16, name:'血管震颤减弱'},
327
-        {id:17, name:'穿刺部位肿胀'},
328
-        {id:18, name:'手指发冷、苍白、发绀'},
329
-        {id:19, name:'内瘘原血管重建术后,切口干燥'},
330
-        {id:20, name:'血栓'},
331
-        {id:21, name:'血管瘤样扩张'},
332
-        {id:22, name:'内瘘感染'},
333
-      ],
233
+    results: [
234
+      { id: 1, name: '症状好转' },
235
+      { id: 2, name: '症状好转,继续脱水' },
236
+      { id: 3, name: '低血糖纠正' },
237
+      { id: 4, name: '症状消失' },
238
+      { id: 5, name: '回血后症状好转' },
239
+      { id: 6, name: '其他' },
240
+      { id: 7, name: '血糖mmol/l' },
241
+      { id: 8, name: '家属要求结束透析' },
242
+      { id: 9, name: '内瘘穿刺不顺利' },
243
+      { id: 10, name: '内瘘穿刺不顺利-静脉端' },
244
+      { id: 11, name: '局部血肿瘀血' },
245
+      { id: 12, name: '瘢痕' },
246
+      { id: 13, name: '血管条件差' },
247
+      { id: 14, name: '血流量不足' },
248
+      { id: 15, name: '血肿:无' },
249
+      { id: 16, name: '血肿:有,5x5cm' },
250
+      { id: 17, name: '动脉穿刺2针' },
251
+      { id: 18, name: '静脉穿刺2针' },
252
+      { id: 19, name: '下针拔针不顺利' },
253
+      { id: 20, name: '血肿:有,5x5cm' }
254
+    ],
334 255
 
335
-      catheter:[
336
-        {id:1, name:'穿刺口-干洁'},
337
-        {id:2, name:'穿刺口-红肿'},
338
-        {id:3, name:'穿刺口-分泌物'},
339
-        {id:4, name:'穿刺口-渗血'},
340
-        {id:5, name:'导管打折'},
341
-        {id:6, name:'导管堵塞'},
342
-        {id:7, name:'皮导管出口处感染:红肿热痛、有异味下瘀血'},
343
-        {id:8, name:'缝线脱落'},
344
-        {id:9, name:'导管同侧肢体肿胀'},
345
-        {id:10, name:'内瘘首次使用穿刺顺利'},
346
-        {id:11, name:'导管破损'},
347
-        {id:12, name:'正常'},
348
-        {id:13, name:'导管相关血流感染'},
349
-        {id:14, name:'导管出口处渗血'},
350
-        {id:15, name:'导管脱落'},
351
-        {id:16, name:'头面部肿胀'},
352
-      ],
256
+    dialysis_duration: [
257
+      { id: 1, name: '无症状' },
258
+      { id: 2, name: '耳鸣' },
259
+      { id: 3, name: '出汗' },
260
+      { id: 4, name: '食欲差' },
261
+      { id: 5, name: '血压偏高' },
262
+      { id: 6, name: '四肢无力,口周发麻' },
263
+      { id: 7, name: '腹泻' },
264
+      { id: 8, name: '肢体偏瘫活动' },
265
+      { id: 9, name: '胸闷' },
266
+      { id: 10, name: '黑便' },
267
+      { id: 11, name: '咳嗽' }
268
+    ],
353 269
 
354
-      complication:[
355
-        {id:1, name:'低血压'},
356
-        {id:2, name:'高血压'},
357
-        {id:3, name:'心律失常'},
358
-        {id:4, name:'头晕'},
359
-        {id:5, name:'头痛'},
360
-        {id:6, name:'呕吐'},
361
-        {id:7, name:'抽搐'},
362
-        {id:8, name:'出血'},
363
-        {id:9, name:'心衰'},
364
-        {id:10, name:'腹痛'},
365
-        {id:11, name:'痔疮出血'},
366
-        {id:12, name:'鼻腔出血'},
367
-        {id:13, name:'脑梗塞'},
368
-        {id:14, name:'外伤'},
369
-        {id:15, name:'呼吸道感染'},
370
-        {id:16, name:'其他'},
371
-        {id:17, name:'右耻骨下支骨折'},
372
-        {id:18, name:'上消化道出血'},
373
-        {id:19, name:'牙龈出血'},
374
-        {id:20, name:'出血-其他'},
375
-        {id:21, name:'手术后一周'},
376
-        {id:22, name:'肿瘤'},
377
-        {id:23, name:'肠道感染'},
378
-      ],
270
+    last_dialysis_after: [
271
+      { id: 1, name: '无症状' },
272
+      { id: 2, name: '耳鸣' },
273
+      { id: 3, name: '出汗' },
274
+      { id: 4, name: '乏力' },
275
+      { id: 5, name: '呕吐' },
276
+      { id: 6, name: '胸闷' },
277
+      { id: 7, name: '出血' },
278
+      { id: 8, name: '深昏迷' },
279
+      { id: 9, name: '腹泻' },
280
+      { id: 10, name: '痉挛' },
281
+      { id: 11, name: '头晕' },
282
+      { id: 12, name: '出血' },
283
+      { id: 13, name: '恶心' },
284
+      { id: 14, name: '头痛' },
285
+      { id: 15, name: '发热' }
286
+    ],
379 287
 
380
-      cruor:[
381
-        {id:1, name:'透析器-0度'},
382
-        {id:2, name:'透析器-Ⅰ度'},
383
-        {id:3, name:'透析起-Ⅱ度'},
384
-        {id:4, name:'透析起-Ⅲ度'},
385
-        {id:5, name:'动脉壶凝血块'},
386
-        {id:6, name:'静脉壶凝血块'},
387
-        {id:7, name:'体外循环完全凝血'},
388
-        {id:8, name:'更换透析器'},
389
-        {id:9, name:'更换管路'},
390
-      ],
288
+    dialysis_before: [
289
+      { id: 1, name: '无症状' },
290
+      { id: 2, name: '耳鸣' },
291
+      { id: 3, name: '出汗' },
292
+      { id: 4, name: '乏力' },
293
+      { id: 5, name: '呕吐' },
294
+      { id: 6, name: '胸闷' },
295
+      { id: 7, name: '出血' },
296
+      { id: 8, name: '深昏迷' },
297
+      { id: 9, name: '腹泻' },
298
+      { id: 10, name: '痉挛' },
299
+      { id: 11, name: '头晕' },
300
+      { id: 12, name: '出血' },
301
+      { id: 13, name: '恶心' },
302
+      { id: 14, name: '头痛' },
303
+      { id: 15, name: '发热' }
304
+    ],
305
+    internal_fistula_tremor_ac: [
306
+      { id: 1, name: '存在' },
307
+      { id: 2, name: '减弱' },
308
+      { id: 3, name: '无' }
309
+    ],
310
+    patient_gose: [
311
+      { id: 1, name: '离院' },
312
+      { id: 2, name: '留观' },
313
+      { id: 3, name: '住院' }
314
+    ],
315
+    observation_content: [
316
+      { id: 1, name: '意识状态' },
317
+      { id: 2, name: '生命体征' },
318
+      { id: 3, name: '内瘘搏动/渗血' },
319
+      { id: 4, name: '导管固定/穿刺口渗血' },
320
+      { id: 5, name: '动静脉直接穿刺口渗血/肢端循环情况' }
321
+    ],
322
+    internal_fistula: [
323
+      { id: 1, name: '震颤-存在' },
324
+      { id: 2, name: '震颤-减弱' },
325
+      { id: 3, name: '震颤-无' },
326
+      { id: 4, name: '内瘘皮肤-正常' },
327
+      { id: 5, name: '内瘘皮肤-瘀斑' },
328
+      { id: 6, name: '内瘘皮肤-红' },
329
+      { id: 7, name: '内瘘皮肤-肿' },
330
+      { id: 8, name: '无搏动' },
331
+      { id: 9, name: '皮下瘀血' },
332
+      { id: 10, name: '内瘘术后待成熟,可及震颤' },
333
+      { id: 11, name: '内瘘PTA术后一天,震颤强' },
334
+      { id: 12, name: '内瘘首次使用穿刺顺利' },
335
+      { id: 13, name: '血管狭窄' },
336
+      { id: 14, name: '肿胀手综合征' },
337
+      { id: 15, name: '正常' },
338
+      { id: 16, name: '血管震颤减弱' },
339
+      { id: 17, name: '穿刺部位肿胀' },
340
+      { id: 18, name: '手指发冷、苍白、发绀' },
341
+      { id: 19, name: '内瘘原血管重建术后,切口干燥' },
342
+      { id: 20, name: '血栓' },
343
+      { id: 21, name: '血管瘤样扩张' },
344
+      { id: 22, name: '内瘘感染' }
345
+    ],
391 346
 
347
+    catheter: [
348
+      { id: 1, name: '穿刺口-干洁' },
349
+      { id: 2, name: '穿刺口-红肿' },
350
+      { id: 3, name: '穿刺口-分泌物' },
351
+      { id: 4, name: '穿刺口-渗血' },
352
+      { id: 5, name: '导管打折' },
353
+      { id: 6, name: '导管堵塞' },
354
+      { id: 7, name: '皮导管出口处感染:红肿热痛、有异味下瘀血' },
355
+      { id: 8, name: '缝线脱落' },
356
+      { id: 9, name: '导管同侧肢体肿胀' },
357
+      { id: 10, name: '内瘘首次使用穿刺顺利' },
358
+      { id: 11, name: '导管破损' },
359
+      { id: 12, name: '正常' },
360
+      { id: 13, name: '导管相关血流感染' },
361
+      { id: 14, name: '导管出口处渗血' },
362
+      { id: 15, name: '导管脱落' },
363
+      { id: 16, name: '头面部肿胀' }
364
+    ],
392 365
 
393
-       summary : [
394
-        {id: 1, value: '嘱少食含钾高的食物,告知含钾高的代表食物及降低钾摄入的烹调方法', text: '高钾'},
395
-        {id: 2, value: '告知内瘘术后注意事项', text: '内瘘术后'},
396
-        {id: 3, value: '告知内瘘自我护理要点', text: '内瘘护理'},
397
-        {id: 4, value: '嘱做好个人卫生', text: '卫生'},
398
-        {id: 5, value: '嘱控制水分摄入,饮食清淡,保持透析间期体重增加在合理范围。', text: '控水摄入'},
399
-        {id: 6, value: '告知中心静脉置管注意事项。', text: '导管护理'},
400
-        {id: 7, value: '中心静脉导管新置入,予以妥善固定,防止牵扯,注意观察有无渗血,及时告知医护人员。', text: '新置导管'},
401
-        {id: 8, value: '告知人造血管自我护理要点', text: '人造血管护理'},
402
-        {id: 9, value: '血压偏高,请按医嘱规律服药,透析间期监测血压并记录,有不适随诊。', text: '血压管理'},
403
-        {id: 10, value: '结束后血压低,嘱休息半小时测血压平稳后离院,途中注意安会,出现头昏、出汗等低血压症状立即平卧并与医生联系,同时监测内瘘功能。', text: '内瘘低血压'},
404
-        {id: 11, value: '导管口轻压可见分泌物,红、痛不明显,百多邦药膏外用,嘱注意个人卫生。', text: '导管口感染'},
405
-      ],
366
+    complication: [
367
+      { id: 1, name: '低血压' },
368
+      { id: 2, name: '高血压' },
369
+      { id: 3, name: '心律失常' },
370
+      { id: 4, name: '头晕' },
371
+      { id: 5, name: '头痛' },
372
+      { id: 6, name: '呕吐' },
373
+      { id: 7, name: '抽搐' },
374
+      { id: 8, name: '出血' },
375
+      { id: 9, name: '心衰' },
376
+      { id: 10, name: '腹痛' },
377
+      { id: 11, name: '痔疮出血' },
378
+      { id: 12, name: '鼻腔出血' },
379
+      { id: 13, name: '脑梗塞' },
380
+      { id: 14, name: '外伤' },
381
+      { id: 15, name: '呼吸道感染' },
382
+      { id: 16, name: '其他' },
383
+      { id: 17, name: '右耻骨下支骨折' },
384
+      { id: 18, name: '上消化道出血' },
385
+      { id: 19, name: '牙龈出血' },
386
+      { id: 20, name: '出血-其他' },
387
+      { id: 21, name: '手术后一周' },
388
+      { id: 22, name: '肿瘤' },
389
+      { id: 23, name: '肠道感染' }
390
+    ],
406 391
 
392
+    cruor: [
393
+      { id: 1, name: '透析器-0度' },
394
+      { id: 2, name: '透析器-Ⅰ度' },
395
+      { id: 3, name: '透析起-Ⅱ度' },
396
+      { id: 4, name: '透析起-Ⅲ度' },
397
+      { id: 5, name: '动脉壶凝血块' },
398
+      { id: 6, name: '静脉壶凝血块' },
399
+      { id: 7, name: '体外循环完全凝血' },
400
+      { id: 8, name: '更换透析器' },
401
+      { id: 9, name: '更换管路' }
402
+    ],
407 403
 
408
-      good_unit:[
409
-        {id:1, name:'支'},
410
-        {id:2, name:'条'},
411
-        {id:3, name:'盒'},
412
-        {id:4, name:'包'},
413
-        {id:5, name:'件'},
414
-        {id:6, name:'个'},
415
-        {id:7, name:'套'},
416
-        {id:8, name:'袋'},
417
-        {id:9, name:'箱'},
418
-        {id:10, name:'瓶'},
419
-        {id:11, name:'付'},
420
-        {id:12, name:'颗'},
421
-        {id:13, name:'根'},
422
-        {id:14, name:'桶'},
423
-        {id:15, name:'台'},
424
-        {id:16, name:'张'},
425
-        {id:17, name:'把'},
426
-        {id:18, name:'卷'},
427
-        {id:19, name:'块'},
428
-        {id:20, name:'双'},
429
-        {id:21, name:'人份'},
430
-      ]
404
+    summary: [
405
+      { id: 1, value: '嘱少食含钾高的食物,告知含钾高的代表食物及降低钾摄入的烹调方法', text: '高钾' },
406
+      { id: 2, value: '告知内瘘术后注意事项', text: '内瘘术后' },
407
+      { id: 3, value: '告知内瘘自我护理要点', text: '内瘘护理' },
408
+      { id: 4, value: '嘱做好个人卫生', text: '卫生' },
409
+      { id: 5, value: '嘱控制水分摄入,饮食清淡,保持透析间期体重增加在合理范围。', text: '控水摄入' },
410
+      { id: 6, value: '告知中心静脉置管注意事项。', text: '导管护理' },
411
+      { id: 7, value: '中心静脉导管新置入,予以妥善固定,防止牵扯,注意观察有无渗血,及时告知医护人员。', text: '新置导管' },
412
+      { id: 8, value: '告知人造血管自我护理要点', text: '人造血管护理' },
413
+      { id: 9, value: '血压偏高,请按医嘱规律服药,透析间期监测血压并记录,有不适随诊。', text: '血压管理' },
414
+      { id: 10, value: '结束后血压低,嘱休息半小时测血压平稳后离院,途中注意安会,出现头昏、出汗等低血压症状立即平卧并与医生联系,同时监测内瘘功能。', text: '内瘘低血压' },
415
+      { id: 11, value: '导管口轻压可见分泌物,红、痛不明显,百多邦药膏外用,嘱注意个人卫生。', text: '导管口感染' }
416
+    ],
431 417
 
432
-    },
433
-    mutations:{
434
-        SET_PATIENT_TYPE:(state, patientTypes)=>{
435
-            state.patient_types = patientTypes
436
-        }
437
-    },
438
-    action:{
418
+    good_unit: [
419
+      { id: 1, name: '支' },
420
+      { id: 2, name: '条' },
421
+      { id: 3, name: '盒' },
422
+      { id: 4, name: '包' },
423
+      { id: 5, name: '件' },
424
+      { id: 6, name: '个' },
425
+      { id: 7, name: '套' },
426
+      { id: 8, name: '袋' },
427
+      { id: 9, name: '箱' },
428
+      { id: 10, name: '瓶' },
429
+      { id: 11, name: '付' },
430
+      { id: 12, name: '颗' },
431
+      { id: 13, name: '根' },
432
+      { id: 14, name: '桶' },
433
+      { id: 15, name: '台' },
434
+      { id: 16, name: '张' },
435
+      { id: 17, name: '把' },
436
+      { id: 18, name: '卷' },
437
+      { id: 19, name: '块' },
438
+      { id: 20, name: '双' },
439
+      { id: 21, name: '人份' }
440
+    ]
439 441
 
442
+  },
443
+  mutations: {
444
+    SET_PATIENT_TYPE: (state, patientTypes) => {
445
+      state.patient_types = patientTypes
440 446
     }
441
-}
447
+  },
448
+  action: {
442 449
 
450
+  }
451
+}
443 452
 
444 453
 export default global_config

+ 26 - 0
src/store/modules/temp_params.js 查看文件

@@ -0,0 +1,26 @@
1
+const temp_params = {
2
+  state: {
3
+    batch_print_dialysis_record_ids: []
4
+  },
5
+  mutations: {
6
+    SET_BATCH_PRINT_DIALYSIS_RECORD_IDS: (state, record_ids) => {
7
+      state.batch_print_dialysis_record_ids = record_ids == null || record_ids == undefined ? [] : record_ids
8
+    }
9
+  },
10
+  actions: {
11
+    SetBatchPrintDialysisRecordIDs({ commit, state }, record_ids) {
12
+      return new Promise((resolve, reject) => {
13
+        commit('SET_BATCH_PRINT_DIALYSIS_RECORD_IDS', record_ids)
14
+        resolve()
15
+      })
16
+    },
17
+    ClearBatchPrintDialysisRecordIDs({ commit, state }) {
18
+      return new Promise((resolve, reject) => {
19
+        commit('SET_BATCH_PRINT_DIALYSIS_RECORD_IDS', null)
20
+        resolve()
21
+      })
22
+    }
23
+  }
24
+}
25
+
26
+export default temp_params

+ 111 - 102
src/xt_pages/dialysis/details/DialysisPrescription.vue 查看文件

@@ -13,40 +13,42 @@
13 13
         </li> -->
14 14
         <li>
15 15
           <label>置换量 : </label>
16
-          <span class="content">{{ replacement_total }}</span>
17
-          <span class="unit">L</span>
16
+          <span class="content" v-if="replacement_total!='0'">{{replacement_total}}</span>
17
+          <span class="unit" v-if="replacement_total!='0'">L</span>
18 18
         </li>
19 19
         <li>
20 20
           <label>首剂 : </label>
21
-          <span class="content">{{ anticoagulant_shouji }}</span>
22
-          <span class="unit">mg</span>
21
+          <span class="content" v-if="anticoagulant_shouji!='0'">{{ anticoagulant_shouji }}</span>
22
+          <span class="unit" v-if="anticoagulant_shouji!='0'">mg</span>
23 23
         </li>
24 24
         <li>
25 25
           <label>钾 : </label>
26
-          <span class="content">{{ kalium }}</span>
27
-          <span class="unit">mmol/L</span>
26
+          <span class="content" v-if="kalium!='0'">{{ kalium }}</span>
27
+          <span class="unit" v-if="kalium!='0'">mmol/L</span>
28 28
         </li>
29 29
         <li>
30 30
           <label>碳酸氢盐 : </label>
31
-          <span class="content">{{ bicarbonate }}</span>
32
-          <span class="unit">mmol/l</span>
31
+          <span class="content" v-if="bicarbonate!='0'">{{ bicarbonate }}</span>
32
+          <span class="unit" v-if="bicarbonate!='0'">mmol/l</span>
33 33
         </li>
34 34
         <li>
35 35
           <label>透析液流量 : </label>
36
-          <span class="content">{{ dialysate_flow }}</span>
37
-          <span class="unit">ml/min</span>
36
+          <span class="content" v-if="dialysate_flow!='0'">{{ dialysate_flow }}</span>
37
+          <span class="unit" v-if="dialysate_flow!='0'">ml/min</span>
38 38
         </li>
39 39
       </ul>
40 40
       <ul>
41 41
         <li>
42 42
           <label>透析时长 : </label>
43
-          <span class="content">{{ dialysis_duration }}</span>
44
-          <span class="unit">h</span>
43
+          <span class="content" v-if="dialysis_duration_hour!='0'">{{ dialysis_duration_hour }}</span>
44
+          <span class="unit" v-if="dialysis_duration_hour!='0'">h</span>
45
+          <span class="content" v-if="dialysis_duration_minute!='0'">{{ dialysis_duration_minute }}</span>
46
+          <span class="unit" v-if="dialysis_duration_minute!='0'">min</span>
45 47
         </li>
46 48
         <li>
47 49
           <label>血流量 : </label>
48
-          <span class="content">{{ blood_flow_volume }}</span>
49
-          <span class="unit">ml/min</span>
50
+          <span class="content" v-if="blood_flow_volume!='0'">{{ blood_flow_volume }}</span>
51
+          <span class="unit" v-if="blood_flow_volume!='0'">ml/min</span>
50 52
         </li>
51 53
         <!-- <li>
52 54
           <label>置换方式 : </label>
@@ -54,23 +56,23 @@
54 56
         </li> -->
55 57
         <li>
56 58
           <label>维持 : </label>
57
-          <span class="content">{{ anticoagulant_weichi }}</span>
58
-          <span class="unit">mg/h</span>
59
+          <span class="content" v-if="anticoagulant_weichi!='0'">{{ anticoagulant_weichi }}</span>
60
+          <span class="unit" v-if="anticoagulant_weichi!='0'">mg/h</span>
59 61
         </li>
60 62
         <li>
61 63
           <label>钠 : </label>
62
-          <span class="content">{{ sodium }}</span>
63
-          <span class="unit">mmol/l</span>
64
+          <span class="content" v-if="sodium!='0'">{{ sodium }}</span>
65
+          <span class="unit" v-if="sodium!='0'">mmol/l</span>
64 66
         </li>
65 67
         <li>
66 68
           <label>葡萄糖 : </label>
67
-          <span class="content">{{ glucose }}</span>
68
-          <span class="unit">mmol/l</span>
69
+          <span class="content" v-if="glucose!='0'">{{ glucose }}</span>
70
+          <span class="unit" v-if="glucose!='0'">mmol/l</span>
69 71
         </li>
70 72
         <li>
71 73
           <label>透析液温度 : </label>
72
-          <span class="content">{{ dialysate_temperature }}</span>
73
-          <span class="unit">℃</span>
74
+          <span class="content" v-if="dialysate_temperature!='0'">{{ dialysate_temperature }}</span>
75
+          <span class="unit" v-if="dialysate_temperature!='0'">℃</span>
74 76
         </li>
75 77
       </ul>
76 78
       <ul>
@@ -80,8 +82,8 @@
80 82
         </li> -->
81 83
         <li>
82 84
           <label>脱水量 : </label>
83
-          <span class="content">{{ prescription_dewatering }}</span>
84
-          <span class="unit">L</span>
85
+          <span class="content" v-if="prescription_dewatering!='0'">{{ prescription_dewatering }}</span>
86
+          <span class="unit" v-if="prescription_dewatering!='0'">L</span>
85 87
         </li>
86 88
         <li>
87 89
           <label>抗疑剂 : </label>
@@ -89,23 +91,23 @@
89 91
         </li>
90 92
         <li>
91 93
           <label>总量: </label>
92
-          <span class="content">{{ anticoagulant_zongliang }}</span>
93
-          <span class="unit">mg</span>
94
+          <span class="content" v-if="anticoagulant_zongliang!='0'">{{ anticoagulant_zongliang }}</span>
95
+          <span class="unit" v-if="anticoagulant_zongliang!='0'">mg</span>
94 96
         </li>
95 97
         <li>
96 98
           <label>钙: </label>
97
-          <span class="content">{{ calcium }}</span>
98
-          <span class="unit">mmol/l</span>
99
+          <span class="content" v-if="calcium!='0'">{{ calcium }}</span>
100
+          <span class="unit" v-if="calcium!='0'">mmol/l</span>
99 101
         </li>
100 102
         <li>
101 103
           <label>干体重 : </label>
102
-          <span class="content">{{ dry_weight }}</span>
103
-          <span class="unit">kg</span>
104
+          <span class="content" v-if="dry_weight!='0'">{{ dry_weight }}</span>
105
+          <span class="unit" v-if="dry_weight!='0'">kg</span>
104 106
         </li>
105 107
         <li>
106 108
           <label>电导率 : </label>
107
-          <span class="content">{{ conductivity }}</span>
108
-          <span class="unit">mS/cm</span>
109
+          <span class="content" v-if="conductivity!='0'">{{ conductivity }}</span>
110
+          <span class="unit" v-if="conductivity!='0'">mS/cm</span>
109 111
         </li>
110 112
 
111 113
         <li>
@@ -121,164 +123,171 @@
121 123
 </template>
122 124
 
123 125
 <script>
124
-import { getDataConfig } from "@/utils/data"
126
+import { getDataConfig } from '@/utils/data'
125 127
 
126 128
 export default {
127
-  name: "DialysisPrescription",
129
+  name: 'DialysisPrescription',
128 130
   data() {
129 131
     return {
130
-      title: "透析处方",
132
+      title: '透析处方',
131 133
       perfusion_apparatus_map: {},
132
-      replacement_way_map: {},
133
-    };
134
+      replacement_way_map: {}
135
+    }
134 136
   },
135 137
   props: {
136 138
     prescription: {
137
-      type: Object,
139
+      type: Object
138 140
     },
139 141
     solution: {
140
-      type: Object,
142
+      type: Object
141 143
     },
142 144
     device_map: {
143
-      type: Object,
145
+      type: Object
144 146
     }
145 147
   },
146 148
   computed: {
147 149
     dialysis_mode: function() {
148
-      var mode = this.getValueStr("mode_id", "mode_id")
150
+      var mode = this.getValueStr('mode_id', 'mode_id')
149 151
       if (mode.length == 0) {
150
-        return ""
152
+        return ''
151 153
       }
152 154
       if (this.$store.getters.treatment_mode[mode] != undefined) {
153 155
         return this.$store.getters.treatment_mode[mode].name
154 156
       }
155
-      return ""
157
+      return ''
156 158
     },
157 159
     perfusion_apparatus: function() {
158
-      var v = this.getValueStr("perfusion_apparatus", "perfusion_apparatus")
160
+      var v = this.getValueStr('perfusion_apparatus', 'perfusion_apparatus')
159 161
       if (v.length == 0) {
160
-        return ""
162
+        return ''
161 163
       }
162 164
       if (this.perfusion_apparatus_map[v] != undefined) {
163 165
         return this.perfusion_apparatus_map[v].name
164 166
       }
165
-      return ""
167
+      return ''
166 168
     },
167 169
     replacement_total: function() {
168
-      var v = this.getValueStr("replacement_total", "replacement_total")
169
-      return v.length == 0 ? "0" : v
170
+      var v = this.getValueStr('replacement_total', 'replacement_total')
171
+      return v.length == 0 ? '0' : v
170 172
     },
171 173
     anticoagulant_shouji: function() {
172
-      var v = this.getValueStr("anticoagulant_shouji", "anticoagulant_shouji")
173
-      return v.length == 0 ? "0" : v
174
+      var v = this.getValueStr('anticoagulant_shouji', 'anticoagulant_shouji')
175
+      return v.length == 0 ? '0' : v
174 176
     },
175 177
     kalium: function() {
176
-      var v = this.getValueStr("kalium", "kalium")
177
-      return v.length == 0 ? "0" : v
178
+      var v = this.getValueStr('kalium', 'kalium')
179
+      return v.length == 0 ? '0' : v
178 180
     },
179 181
     bicarbonate: function() {
180
-      var v = this.getValueStr("bicarbonate", "bicarbonate")
181
-      return v.length == 0 ? "0" : v
182
+      var v = this.getValueStr('bicarbonate', 'bicarbonate')
183
+      return v.length == 0 ? '0' : v
182 184
     },
183 185
     dialysate_flow: function() {
184
-      var v = this.getValueStr("dialysate_flow", "dialysate_flow")
185
-      return v.length == 0 ? "0" : v
186
+      var v = this.getValueStr('dialysate_flow', 'dialysate_flow')
187
+      return v.length == 0 ? '0' : v
186 188
     },
187 189
     dialysis_duration: function() {
188
-      var v = this.getValueStr("dialysis_duration", "dialysis_duration")
189
-      return v.length == 0 ? "0" : v
190
+      var v = this.getValueStr('dialysis_duration', 'dialysis_duration')
191
+      return v.length == 0 ? '0' : v
192
+    },
193
+    dialysis_duration_hour: function() {
194
+      var v = this.getValueStr('dialysis_duration_hour', 'dialysis_duration_hour')
195
+      return v.length == 0 ? '0' : v
196
+    },
197
+    dialysis_duration_minute: function() {
198
+      var v = this.getValueStr('dialysis_duration_minute', 'dialysis_duration_minute')
199
+      return v.length == 0 ? '0' : v
190 200
     },
191 201
     blood_flow_volume: function() {
192
-      var v = this.getValueStr("blood_flow_volume", "blood_flow_volume")
193
-      return v.length == 0 ? "0" : v
202
+      var v = this.getValueStr('blood_flow_volume', 'blood_flow_volume')
203
+      return v.length == 0 ? '0' : v
194 204
     },
195 205
     replacement_way: function() {
196
-      var v = this.getValueStr("replacement_way", "replacement_way")
206
+      var v = this.getValueStr('replacement_way', 'replacement_way')
197 207
       if (v.length == 0) {
198
-        return ""
208
+        return ''
199 209
       }
200 210
       if (this.replacement_way_map[v] != undefined) {
201 211
         return this.replacement_way_map[v].name
202 212
       }
203
-      return ""
213
+      return ''
204 214
     },
205 215
     anticoagulant_weichi: function() {
206
-      var v = this.getValueStr("anticoagulant_weichi", "anticoagulant_weichi")
207
-      return v.length == 0 ? "0" : v
216
+      var v = this.getValueStr('anticoagulant_weichi', 'anticoagulant_weichi')
217
+      return v.length == 0 ? '0' : v
208 218
     },
209 219
     sodium: function() {
210
-      var v = this.getValueStr("sodium", "sodium")
211
-      return v.length == 0 ? "0" : v
220
+      var v = this.getValueStr('sodium', 'sodium')
221
+      return v.length == 0 ? '0' : v
212 222
     },
213 223
     glucose: function() {
214
-      var v = this.getValueStr("glucose", "glucose")
215
-      return v.length == 0 ? "0" : v
224
+      var v = this.getValueStr('glucose', 'glucose')
225
+      return v.length == 0 ? '0' : v
216 226
     },
217 227
     dialysate_temperature: function() {
218
-      var v = this.getValueStr("dialysate_temperature", "dialysate_temperature")
219
-      return v.length == 0 ? "0" : v
228
+      var v = this.getValueStr('dialysate_temperature', 'dialysate_temperature')
229
+      return v.length == 0 ? '0' : v
220 230
     },
221 231
     dialyzer: function() {
222
-      var v = this.getValueStr("dialyzer", "hemodialysis_machine")
232
+      var v = this.getValueStr('dialyzer', 'hemodialysis_machine')
223 233
       if (v.length == 0) {
224
-        return ""
234
+        return ''
225 235
       }
226 236
       if (this.device_map[v] != undefined) {
227 237
         return this.device_map[v].name
228 238
       }
229
-      return ""
239
+      return ''
230 240
     },
231 241
     prescription_dewatering: function() {
232
-      var v = this.getValueStr("prescription_dewatering", "dewater")
233
-      return v.length == 0 ? "0" : v
242
+      var v = this.getValueStr('prescription_dewatering', 'dewater')
243
+      return v.length == 0 ? '0' : v
234 244
     },
235 245
     anticoagulant: function() {
236
-      var v = this.getValueStr("anticoagulant", "anticoagulant")
246
+      var v = this.getValueStr('anticoagulant', 'anticoagulant')
237 247
       if (v.length == 0) {
238
-        return ""
248
+        return ''
239 249
       }
240 250
       if (this.$store.getters.anticoagulants_confit[v] != undefined) {
241 251
         return this.$store.getters.anticoagulants_confit[v].name
242 252
       }
243
-      return ""
253
+      return ''
244 254
     },
245 255
     anticoagulant_zongliang: function() {
246
-      var v = this.getValueStr("anticoagulant_zongliang", "anticoagulant_zongliang")
247
-      return v.length == 0 ? "0" : v
256
+      var v = this.getValueStr('anticoagulant_zongliang', 'anticoagulant_zongliang')
257
+      return v.length == 0 ? '0' : v
248 258
     },
249 259
     calcium: function() {
250
-      var v = this.getValueStr("calcium", "calcium")
251
-      return v.length == 0 ? "0" : v
260
+      var v = this.getValueStr('calcium', 'calcium')
261
+      return v.length == 0 ? '0' : v
252 262
     },
253 263
     dry_weight: function() {
254
-      var v = this.getValueStr("dry_weight", "dry_weight")
255
-      return v.length == 0 ? "0" : v
264
+      var v = this.getValueStr('dry_weight', 'dry_weight')
265
+      return v.length == 0 ? '0' : v
256 266
     },
257 267
     conductivity: function() {
258
-      var v = this.getValueStr("conductivity", "conductivity")
259
-      return v.length == 0 ? "0" : v
268
+      var v = this.getValueStr('conductivity', 'conductivity')
269
+      return v.length == 0 ? '0' : v
260 270
     },
261
-    dialyzer_perfusion_apparatus:function(){
262
-      return this.getValueStr("dialyzer_perfusion_apparatus", "dialyzer_perfusion_apparatus")
263
-
271
+    dialyzer_perfusion_apparatus: function() {
272
+      return this.getValueStr('dialyzer_perfusion_apparatus', 'dialyzer_perfusion_apparatus')
264 273
     },
265 274
     note: function() {
266
-      return this.getValueStr("remark", "remark")
275
+      return this.getValueStr('remark', 'remark')
267 276
     }
268 277
   },
269 278
   created() {
270
-    var perfusion_apparatus = getDataConfig("hemodialysis", "perfusion_apparatus")
279
+    var perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
271 280
     var map = {}
272 281
     for (let index = 0; index < perfusion_apparatus.length; index++) {
273
-      const p = perfusion_apparatus[index];
282
+      const p = perfusion_apparatus[index]
274 283
       map[p.id] = p
275 284
     }
276 285
     this.perfusion_apparatus_map = map
277 286
 
278
-    var replacement_ways = getDataConfig("hemodialysis", "replacement_ways")
287
+    var replacement_ways = getDataConfig('hemodialysis', 'replacement_ways')
279 288
     var replacement_way_map = {}
280 289
     for (let index = 0; index < replacement_ways.length; index++) {
281
-      const r = replacement_ways[index];
290
+      const r = replacement_ways[index]
282 291
       replacement_way_map[r.id] = r
283 292
     }
284 293
     this.replacement_way_map = replacement_way_map
@@ -286,21 +295,21 @@ export default {
286 295
   methods: {
287 296
     getValueStr(pkey, skey) {
288 297
       if (this.prescription.id == 0 && this.solution.id == 0) {
289
-        return ""
298
+        return ''
290 299
       } else if (this.prescription.id != 0) {
291 300
         if (this.prescription[pkey] == null || this.prescription[pkey] == undefined) {
292
-          return ""
301
+          return ''
293 302
         }
294
-        return this.prescription[pkey] + ""
303
+        return this.prescription[pkey] + ''
295 304
       } else {
296 305
         if (this.solution[skey] == null || this.solution[skey] == undefined) {
297
-          return ""
306
+          return ''
298 307
         }
299
-        return this.solution[skey] + ""
308
+        return this.solution[skey] + ''
300 309
       }
301
-    },
310
+    }
302 311
   }
303
-};
312
+}
304 313
 </script>
305 314
 
306 315
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 85 - 85
src/xt_pages/dialysis/details/assessmentAfter.vue 查看文件

@@ -5,18 +5,18 @@
5 5
       <ul>
6 6
         <li>
7 7
           <label>透后体重 : </label>
8
-          <span class="content">{{ weight_after }}</span>
9
-          <span class="unit">kg</span>
8
+          <span class="content" v-if="weight_after!='0'">{{ weight_after }}</span>
9
+          <span class="unit" v-if="weight_after!='0'">kg</span>
10 10
         </li>
11 11
         <li>
12 12
           <label>收缩压 : </label>
13
-          <span class="content">{{ systolic_blood_pressure }}</span>
14
-          <span class="unit">mmhg</span>
13
+          <span class="content" v-if="systolic_blood_pressure!='0'">{{ systolic_blood_pressure }}</span>
14
+          <span class="unit" v-if="systolic_blood_pressure!='0'">mmhg</span>
15 15
         </li>
16 16
         <li>
17 17
           <label>实际超滤量: </label>
18
-          <span class="content">{{ actual_ultrafiltration }}</span>
19
-          <span class="unit">ml</span>
18
+          <span class="content" v-if="actual_ultrafiltration!='0'">{{ actual_ultrafiltration }}</span>
19
+          <span class="unit" v-if="actual_ultrafiltration!='0'">ml</span>
20 20
         </li>
21 21
         <li>
22 22
           <label>疑血 : </label>
@@ -46,18 +46,18 @@
46 46
       <ul>
47 47
         <li>
48 48
           <label>体重减少 : </label>
49
-          <span class="content">{{ weight_loss }}</span>
50
-          <span class="unit">kg</span>
49
+          <span class="content"  v-if="weight_loss!='0'">{{ weight_loss }}</span>
50
+          <span class="unit" v-if="weight_loss!='0'">kg</span>
51 51
         </li>
52 52
         <li>
53 53
           <label>舒张压 : </label>
54
-          <span class="content">{{ diastolic_blood_pressure }}</span>
55
-          <span class="unit">mmhg</span>
54
+          <span class="content" v-if="diastolic_blood_pressure!='0'">{{ diastolic_blood_pressure }}</span>
55
+          <span class="unit" v-if="diastolic_blood_pressure!='0'">mmhg</span>
56 56
         </li>
57 57
         <li>
58 58
           <label>实际置换量 : </label>
59
-          <span class="content">{{ actual_displacement }}</span>
60
-          <span class="unit">ml</span>
59
+          <span class="content" v-if="actual_displacement!='0'">{{ actual_displacement }}</span>
60
+          <span class="unit" v-if="actual_displacement!='0'">ml</span>
61 61
         </li>
62 62
         <li>
63 63
           <label>透后症状 : </label>
@@ -84,21 +84,22 @@
84 84
       <ul>
85 85
         <li>
86 86
           <label>体温 : </label>
87
-          <span class="content">{{ temperature }}</span>
88
-          <span class="unit">℃</span>
87
+          <span class="content" v-if="temperature!='0'">{{ temperature }}</span>
88
+          <span class="unit" v-if="temperature!='0'">℃</span>
89 89
         </li>
90 90
         <li>
91 91
           <label>脉率 : </label>
92
-          <span class="content">{{ pulse_frequency }}</span>
93
-          <span class="unit">次/分</span>
92
+          <span class="content" v-if="pulse_frequency!='0'">{{ pulse_frequency }}</span>
93
+          <span class="unit" v-if="pulse_frequency!='0'">次/分</span>
94 94
         </li>
95 95
         <li>
96 96
           <label>实际治疗时长 : </label>
97
-          <span class="content">{{ actual_treatment_hour }}时{{ actual_treatment_minute }}分</span>
97
+          <span class="content" v-if="actual_treatment_hour!='0'">{{ actual_treatment_hour }}时</span>
98
+          <span class="content" v-if="actual_treatment_minute!='0'">{{ actual_treatment_minute }}分</span>
98 99
         </li>
99 100
         <li>
100 101
           <label>透析中入量: </label>
101
-          <span class="content">{{ dialysis_intakes_feed }}</span>
102
+          <span class="content" v-if="dialysis_intakes_feed!='0'">{{ dialysis_intakes_feed }}</span>
102 103
         </li>
103 104
         <li>
104 105
           <label>血管通路操作: </label>
@@ -125,61 +126,61 @@
125 126
 
126 127
 <script>
127 128
 export default {
128
-  name: "DialysisPrescription",
129
+  name: 'DialysisPrescription',
129 130
   data() {
130 131
     return {
131
-      title: "透后评估 ",
132
-    };
132
+      title: '透后评估 '
133
+    }
133 134
   },
134 135
   props: {
135 136
     record: {
136
-      type: Object,
137
+      type: Object
137 138
     }
138 139
   },
139 140
   computed: {
140 141
     weight_after: function() {
141 142
       if (this.record.id == 0) {
142
-        return "-"
143
+        return '-'
143 144
       }
144 145
       return this.record.weight_after
145 146
     },
146 147
     systolic_blood_pressure: function() {
147 148
       if (this.record.id == 0) {
148
-        return "-"
149
+        return '-'
149 150
       }
150 151
       return this.record.systolic_blood_pressure
151 152
     },
152 153
     actual_ultrafiltration: function() {
153 154
       if (this.record.id == 0) {
154
-        return "-"
155
+        return '-'
155 156
       }
156 157
       return this.record.actual_ultrafiltration
157 158
     },
158 159
     cruor: function() {
159 160
       if (this.record.id == 0) {
160
-        return "-"
161
+        return '-'
161 162
       }
162 163
       return this.record.cruor
163 164
     },
164
-    internal_fistula: function(){
165
-      if (this.record==null || this.record.id == "") {
166
-        return "-"
165
+    internal_fistula: function() {
166
+      if (this.record == null || this.record.id == '') {
167
+        return '-'
167 168
       }
168
-      return this.record.internal_fistula;
169
+      return this.record.internal_fistula
169 170
     },
170 171
     weight_loss: function() {
171 172
       if (this.record.id == 0) {
172
-        return "-"
173
+        return '-'
173 174
       }
174 175
       return this.record.weight_loss
175 176
     },
176
-    inpatient_department:function() {
177
+    inpatient_department: function() {
177 178
       if (this.record.id == 0) {
178
-        return "-"
179
+        return '-'
179 180
       }
180 181
       return this.record.inpatient_department
181 182
     },
182
-    patient_gose:function() {
183
+    patient_gose: function() {
183 184
       if (this.record.id == 0) {
184 185
         return 0
185 186
       }
@@ -187,191 +188,190 @@ export default {
187 188
     },
188 189
     diastolic_blood_pressure: function() {
189 190
       if (this.record.id == 0) {
190
-        return "-"
191
+        return '-'
191 192
       }
192 193
       return this.record.diastolic_blood_pressure
193 194
     },
194 195
     actual_displacement: function() {
195 196
       if (this.record.id == 0) {
196
-        return "-"
197
+        return '-'
197 198
       }
198 199
       return this.record.actual_displacement
199 200
     },
200 201
     symptom_after_dialysis: function() {
201 202
       if (this.record.id == 0) {
202
-        return "-"
203
+        return '-'
203 204
       }
204 205
       return this.record.symptom_after_dialysis
205 206
     },
206
-    blood_access_part:function(){
207
+    blood_access_part: function() {
207 208
       if (this.record.id == 0) {
208
-        return "-"
209
+        return '-'
209 210
       }
210
-      let vascular_access =  this.$store.getters.vascular_access;
211
-      let valen = vascular_access.length
212
-      let name = '-';
211
+      const vascular_access = this.$store.getters.vascular_access
212
+      const valen = vascular_access.length
213
+      let name = '-'
213 214
 
214 215
       for (var index in vascular_access) {
215 216
         if (vascular_access[index].id == this.record.blood_access_part_id) {
216
-          name = vascular_access[index].name;
217
-          break;
217
+          name = vascular_access[index].name
218
+          break
218 219
         }
219 220
       }
220 221
       return name
221 222
     },
222
-    puncture_point_oozing_blood_name:function(){
223
-      
223
+    puncture_point_oozing_blood_name: function() {
224 224
       if (this.record.id == 0) {
225
-        return "-"
225
+        return '-'
226 226
       }
227 227
       switch (this.record.puncture_point_oozing_blood) {
228 228
         case 1:
229 229
           return '有'
230
-          break;
230
+          break
231 231
         case 2:
232 232
           return '无'
233 233
           break
234
-      
234
+
235 235
         default:
236 236
           return '-'
237
-          break;
237
+          break
238 238
       }
239 239
     },
240
-    patient_gose_name: function(){
240
+    patient_gose_name: function() {
241 241
       if (this.record.id == 0) {
242
-        return "-"
242
+        return '-'
243 243
       }
244 244
       switch (this.record.patient_gose) {
245 245
         case 1:
246 246
           return '离院'
247
-          break;
247
+          break
248 248
         case 2:
249 249
           return '留观'
250 250
           break
251 251
         case 3:
252 252
           return '住院'
253 253
           break
254
-      
254
+
255 255
         default:
256 256
           return '-'
257
-          break;
257
+          break
258 258
       }
259 259
     },
260
-    blood_access_opera:function(){
260
+    blood_access_opera: function() {
261 261
       if (this.record.id == 0) {
262
-        return "-"
262
+        return '-'
263 263
       }
264
-      let vascular_access =  this.$store.getters.vascular_access_desc;
265
-      let name = '-';
264
+      const vascular_access = this.$store.getters.vascular_access_desc
265
+      let name = '-'
266 266
       for (var index in vascular_access) {
267 267
         if (vascular_access[index].id == this.record.blood_access_part_opera_id) {
268
-          name = vascular_access[index].name;
269
-          break;
268
+          name = vascular_access[index].name
269
+          break
270 270
         }
271 271
       }
272 272
       return name
273 273
     },
274 274
     catheter: function() {
275 275
       if (this.record.id == 0) {
276
-        return "-"
276
+        return '-'
277 277
       }
278 278
       return this.record.catheter
279 279
     },
280
-    puncture_point_haematoma_name: function(){
280
+    puncture_point_haematoma_name: function() {
281 281
       if (this.record.id == 0) {
282
-        return "-"
282
+        return '-'
283 283
       }
284 284
       switch (this.record.puncture_point_haematoma) {
285 285
         case 1:
286 286
           return '有'
287
-          break;
287
+          break
288 288
         case 2:
289 289
           return '无'
290 290
           break
291 291
         default:
292 292
           return '-'
293
-          break;
293
+          break
294 294
       }
295 295
     },
296 296
     temperature: function() {
297 297
       if (this.record.id == 0) {
298
-        return "-"
298
+        return '-'
299 299
       }
300 300
       return this.record.temperature
301 301
     },
302 302
     pulse_frequency: function() {
303 303
       if (this.record.id == 0) {
304
-        return "-"
304
+        return '-'
305 305
       }
306 306
       return this.record.pulse_frequency
307 307
     },
308 308
     actual_treatment_hour: function() {
309 309
       if (this.record.id == 0) {
310
-        return "-"
310
+        return '-'
311 311
       }
312 312
       return this.record.actual_treatment_hour
313 313
     },
314 314
     actual_treatment_minute: function() {
315 315
       if (this.record.id == 0) {
316
-        return "-"
316
+        return '-'
317 317
       }
318 318
       return this.record.actual_treatment_minute
319 319
     },
320 320
     dialysis_intakes_feed: function() {
321 321
       if (this.record.id == 0) {
322
-        return "-"
322
+        return '-'
323 323
       }
324 324
       return this.record.dialysis_intakes
325 325
     },
326
-    observation_content_other:function() {
326
+    observation_content_other: function() {
327 327
       if (this.record.id == 0) {
328
-        return "-"
328
+        return '-'
329 329
       }
330 330
       return this.record.observation_content_other
331 331
     },
332
-    observation_content:function() {
332
+    observation_content: function() {
333 333
       if (this.record.id == 0) {
334
-        return "-"
334
+        return '-'
335 335
       }
336 336
       return this.record.observation_content
337 337
     },
338 338
     complication: function() {
339 339
       if (this.record.id == 0) {
340
-        return "-"
340
+        return '-'
341 341
       }
342 342
       return this.record.complication
343 343
     },
344 344
     internal_fistula_tremor_ac_name: function() {
345 345
       if (this.record.id == 0) {
346
-        return "-"
346
+        return '-'
347 347
       }
348 348
       switch (this.record.internal_fistula_tremor_ac) {
349 349
         case 1:
350 350
           return '存在'
351
-          break;
351
+          break
352 352
         case 2:
353 353
           return '减弱'
354
-          break;
354
+          break
355 355
         case 3:
356
-          return '无';
356
+          return '无'
357 357
           break
358 358
         default:
359 359
           return '-'
360
-          break;
360
+          break
361 361
       }
362 362
     },
363
-    
363
+
364 364
     remark: function() {
365 365
       if (this.record.id == 0) {
366
-        return ""
366
+        return ''
367 367
       }
368 368
       return this.record.remark
369 369
     }
370 370
   },
371 371
   methods: {
372
-    
372
+
373 373
   }
374
-};
374
+}
375 375
 </script>
376 376
 
377 377
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 38 - 38
src/xt_pages/dialysis/details/assessmentBefore.vue 查看文件

@@ -5,18 +5,18 @@
5 5
       <ul>
6 6
         <li>
7 7
           <label>透前体重 : </label>
8
-          <span class="content">{{ weight_before }}</span>
9
-          <span class="unit">kg</span>
8
+          <span class="content" v-if="weight_before!='0'">{{ weight_before }}</span>
9
+          <span class="unit" v-if="weight_before!='0'">kg</span>
10 10
         </li>
11 11
         <li>
12 12
           <label>收缩压 : </label>
13
-          <span class="content">{{ systolic_blood_pressure }}</span>
14
-          <span class="unit">mmhg</span>
13
+          <span class="content" v-if="systolic_blood_pressure!='0'">{{ systolic_blood_pressure }}</span>
14
+          <span class="unit" v-if="systolic_blood_pressure!='0'">mmhg</span>
15 15
         </li>
16 16
         <li>
17 17
           <label>前次透析后: </label>
18
-          <span class="content">{{ last_post_dialysis }}</span>
19
-          <span class="unit"></span>
18
+          <span class="content" v-if="last_post_dialysis!='0'">{{ last_post_dialysis }}</span>
19
+          <span class="unit" v-if="last_post_dialysis!='0'"></span>
20 20
         </li>
21 21
         <li>
22 22
           <label>导管 : </label>
@@ -27,18 +27,18 @@
27 27
       <ul>
28 28
         <li>
29 29
           <label>干体重 : </label>
30
-          <span class="content">{{ dry_weight }}</span>
31
-          <span class="unit">kg</span>
30
+          <span class="content" v-if="dry_weight!='0'">{{ dry_weight }}</span>
31
+          <span class="unit" v-if="dry_weight!='0'">kg</span>
32 32
         </li>
33 33
         <li>
34 34
           <label>舒张压 : </label>
35
-          <span class="content">{{ diastolic_blood_pressure }}</span>
36
-          <span class="unit">mmhg</span>
35
+          <span class="content" v-if="diastolic_blood_pressure!='0'">{{ diastolic_blood_pressure }}</span>
36
+          <span class="unit" v-if="diastolic_blood_pressure!='0'">mmhg</span>
37 37
         </li>
38 38
         <li>
39 39
           <label>透析期间 : </label>
40
-          <span class="content">{{ dialysis_interphase }}</span>
41
-          <span class="unit"></span>
40
+          <span class="content" v-if="dialysis_interphase!='0'">{{ dialysis_interphase }}</span>
41
+          <span class="unit" v-if="dialysis_interphase!='0'"></span>
42 42
         </li>
43 43
         <li>
44 44
           <label>合并症: </label>
@@ -49,13 +49,13 @@
49 49
       <ul>
50 50
         <li>
51 51
           <label>体温 : </label>
52
-          <span class="content">{{ temperature }}</span>
53
-          <span class="unit">℃</span>
52
+          <span class="content" v-if="temperature!='0'">{{ temperature }}</span>
53
+          <span class="unit" v-if="temperature!='0'">℃</span>
54 54
         </li>
55 55
         <li>
56 56
           <label>心率 : </label>
57
-          <span class="content">{{ pulse_frequency }}</span>
58
-          <span class="unit">次/分</span>
57
+          <span class="content" v-if="pulse_frequency!='0'">{{ pulse_frequency }}</span>
58
+          <span class="unit" v-if="pulse_frequency!='0'">次/分</span>
59 59
         </li>
60 60
         <li>
61 61
           <label>透析前症状 : </label>
@@ -77,11 +77,11 @@
77 77
 
78 78
 <script>
79 79
 export default {
80
-  name: "assessmentBefore",
80
+  name: 'assessmentBefore',
81 81
   data() {
82 82
     return {
83
-      title: "透前评估 ",
84
-    };
83
+      title: '透前评估 '
84
+    }
85 85
   },
86 86
   props: {
87 87
     record: {
@@ -91,75 +91,75 @@ export default {
91 91
   computed: {
92 92
     weight_before: function() {
93 93
       if (this.record.id == 0) {
94
-        return "-"
94
+        return '-'
95 95
       }
96 96
       return this.record.weight_before
97 97
     },
98 98
     systolic_blood_pressure: function() {
99 99
       if (this.record.id == 0) {
100
-        return "-"
100
+        return '-'
101 101
       }
102 102
       return this.record.systolic_blood_pressure
103 103
     },
104 104
     last_post_dialysis: function() {
105 105
       if (this.record.id == 0) {
106
-        return "-"
106
+        return '-'
107 107
       }
108 108
       return this.record.last_post_dialysis
109 109
     },
110
-    
110
+
111 111
     dry_weight: function() {
112 112
       if (this.record.id == 0) {
113
-        return "-"
113
+        return '-'
114 114
       }
115 115
       return this.record.dry_weight
116 116
     },
117 117
     diastolic_blood_pressure: function() {
118 118
       if (this.record.id == 0) {
119
-        return "-"
119
+        return '-'
120 120
       }
121 121
       return this.record.diastolic_blood_pressure
122 122
     },
123 123
     dialysis_interphase: function() {
124 124
       if (this.record.id == 0) {
125
-        return "-"
125
+        return '-'
126 126
       }
127 127
       return this.record.dialysis_interphase
128 128
     },
129 129
     catheter: function() {
130 130
       if (this.record.id == 0) {
131
-        return "-"
131
+        return '-'
132 132
       }
133 133
       return this.record.catheter
134 134
     },
135 135
 
136 136
     temperature: function() {
137 137
       if (this.record.id == 0) {
138
-        return "-"
138
+        return '-'
139 139
       }
140 140
       return this.record.temperature
141 141
     },
142 142
     pulse_frequency: function() {
143 143
       if (this.record.id == 0) {
144
-        return "-"
144
+        return '-'
145 145
       }
146 146
       return this.record.pulse_frequency
147 147
     },
148 148
     symptom_before_dialysis: function() {
149 149
       if (this.record.id == 0) {
150
-        return "-"
150
+        return '-'
151 151
       }
152 152
       return this.record.symptom_before_dialysis
153 153
     },
154 154
     complication: function() {
155 155
       if (this.record.id == 0) {
156
-        return "-"
156
+        return '-'
157 157
       }
158 158
       return this.record.complication
159 159
     },
160 160
     internal_fistula: function() {
161 161
       if (this.record.id == 0) {
162
-        return "-"
162
+        return '-'
163 163
       }
164 164
       return this.record.internal_fistula
165 165
     },
@@ -171,28 +171,28 @@ export default {
171 171
     },
172 172
     hemorrhage: function() {
173 173
       if (this.record.id == 0) {
174
-        return "-"
174
+        return '-'
175 175
       }
176 176
       return this.record.hemorrhage
177 177
     },
178 178
     hemorrhage_other: function() {
179 179
       if (this.record.id == 0) {
180
-        return "-"
180
+        return '-'
181 181
       }
182 182
       return this.record.hemorrhage_other
183 183
     },
184
-    
184
+
185 185
     remark: function() {
186 186
       if (this.record.id == 0) {
187
-        return ""
187
+        return ''
188 188
       }
189 189
       return this.record.remark
190 190
     }
191 191
   },
192 192
   methods: {
193
-    
193
+
194 194
   }
195
-};
195
+}
196 196
 </script>
197 197
 
198 198
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 294 - 278
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue 查看文件

@@ -213,323 +213,339 @@
213 213
   </template>
214 214
 
215 215
 <script>
216
-import { getDataConfig } from "@/utils/data";
217
-import MultiSelectBox from "./MultiSelectBox";
218
-import {postAssessmentAfterDislysis} from "@/api/dialysis"
219
-import {uParseTime} from "@/utils/tools";
216
+import { getDataConfig } from '@/utils/data'
217
+import MultiSelectBox from './MultiSelectBox'
218
+import { postAssessmentAfterDislysis } from '@/api/dialysis'
219
+import { uParseTime } from '@/utils/tools'
220 220
 
221 221
 export default {
222
-  name: "AssessmentAfterDislysis",
222
+  name: 'AssessmentAfterDislysis',
223 223
   props: {
224
-    assessment_after_dislysis : { // 透后评估
225
-        type: Object,
226
-        default: () => {
227
-            return {id: 0}
228
-        }
229
-    },
230
-    dialysis_order : { // 透析记录
231
-        type: Object,
232
-        default: () => {
233
-            return {id: 0}
234
-        }
224
+    assessment_after_dislysis: { // 透后评估
225
+      type: Object,
226
+      default: () => {
227
+        return { id: 0 }
228
+      }
235 229
     },
236
-    patient : { // 患者信息
237
-        type: Object,
238
-        default: () => {
239
-            return {id: 0}
240
-        }
230
+    dialysis_order: { // 透析记录
231
+      type: Object,
232
+      default: () => {
233
+        return { id: 0 }
234
+      }
241 235
     },
236
+    patient: { // 患者信息
237
+      type: Object,
238
+      default: () => {
239
+        return { id: 0 }
240
+      }
241
+    }
242 242
   },
243 243
   data() {
244 244
     return {
245
-        loading:false,
246
-        record_date:'',
247
-        isVisibility:false,
248
-
249
-        actualTreatmentHourShow: new Date(2018, 1, 1, 3, 0),
250
-        cruorOptions: [],
251
-        symptomsOptions:[],
252
-        internalFistulaOptions:[],
253
-        vascularAccessOptions:[],
254
-        vascularAccessDescOptions:[],
255
-        catheterOptions:[],
256
-        complicationOptions:[],
257
-        internalFistulaTremorAcOptions:[],
258
-        patientGoseOptions:[],
259
-        observationContentOptions:[],
260
-
261
-
262
-        isVisibiltyForCruorDialog: false,
263
-        dialogCruorTitle:'凝血',
264
-
265
-        InnerDialogProps: {
266
-            values: [],
267
-            visibility: false,
268
-            isShowTextArea: true,
269
-            customContent: '',
270
-            titles: '',
271
-            type:'', //不同弹框类型,用来匹配数据
272
-        },
273
-
274
-        form: {
275
-            weight_after:'',
276
-            weight_loss:'',
277
-            temperature:'',
278
-            systolic_blood_pressure:'',
279
-            diastolic_blood_pressure:'',
280
-            pulse_frequency:'',
281
-            actual_ultrafiltration:'',
282
-            actual_displacement:'',
283
-            actual_treatment_hour:'',
284
-            actual_treatment_minute:'',
285
-            cruor:'',
286
-            symptom_after_dialysis:'',
287
-            dialysis_intakes:'',
288
-            internal_fistula:'',
289
-            blood_access_part_id:'',
290
-            blood_access_part_opera_id:'',
291
-            catheter:'',
292
-            complication:'',
293
-            puncture_point_oozing_blood:2,
294
-            puncture_point_haematoma:2,
295
-            internal_fistula_tremor_ac:'',
296
-            patient_gose:'',
297
-            inpatient_department:'',
298
-            observation_content:'',
299
-            observation_content_other:'',
300
-            remark:'',
301
-            dialysis_order_id:0,
302
-        }
303
-    };
245
+      loading: false,
246
+      record_date: '',
247
+      isVisibility: false,
248
+
249
+      actualTreatmentHourShow: new Date(2018, 1, 1, 3, 0),
250
+      cruorOptions: [],
251
+      symptomsOptions: [],
252
+      internalFistulaOptions: [],
253
+      vascularAccessOptions: [],
254
+      vascularAccessDescOptions: [],
255
+      catheterOptions: [],
256
+      complicationOptions: [],
257
+      internalFistulaTremorAcOptions: [],
258
+      patientGoseOptions: [],
259
+      observationContentOptions: [],
260
+
261
+      isVisibiltyForCruorDialog: false,
262
+      dialogCruorTitle: '凝血',
263
+
264
+      InnerDialogProps: {
265
+        values: [],
266
+        visibility: false,
267
+        isShowTextArea: true,
268
+        customContent: '',
269
+        titles: '',
270
+        type: '' // 不同弹框类型,用来匹配数据
271
+      },
272
+
273
+      form: {
274
+        weight_after: '',
275
+        weight_loss: '',
276
+        temperature: '',
277
+        systolic_blood_pressure: '',
278
+        diastolic_blood_pressure: '',
279
+        pulse_frequency: '',
280
+        actual_ultrafiltration: '',
281
+        actual_displacement: '',
282
+        actual_treatment_hour: '',
283
+        actual_treatment_minute: '',
284
+        cruor: '',
285
+        symptom_after_dialysis: '',
286
+        dialysis_intakes: '',
287
+        internal_fistula: '',
288
+        blood_access_part_id: '',
289
+        blood_access_part_opera_id: '',
290
+        catheter: '',
291
+        complication: '',
292
+        puncture_point_oozing_blood: 2,
293
+        puncture_point_haematoma: 2,
294
+        internal_fistula_tremor_ac: '',
295
+        patient_gose: '',
296
+        inpatient_department: '',
297
+        observation_content: '',
298
+        observation_content_other: '',
299
+        remark: '',
300
+        dialysis_order_id: 0
301
+      }
302
+    }
304 303
   },
305 304
   watch: {
306
-    "assessment_after_dislysis.id":function () {
307
-        if(this.assessment_after_dislysis.id>0) {
308
-            for(var index in this.form) {
309
-                this.form[index] = this.assessment_after_dislysis[index];
310
-            }
311
-
312
-
313
-          if(this.assessment_after_dislysis['blood_access_part_id'] == 0){
314
-            this.form['blood_access_part_id'] = ''
315
-          }
316
-          if(this.assessment_after_dislysis['blood_access_part_opera_id'] == 0){
317
-            this.form['blood_access_part_opera_id'] = ''
318
-          }
319
-          if(this.assessment_after_dislysis['internal_fistula_tremor_ac'] == 0){
320
-            this.form['internal_fistula_tremor_ac'] = ''
321
-
322
-          }
323
-          if(this.assessment_after_dislysis['patient_gose'] == 0){
324
-            this.form['patient_gose'] = ''
325
-
326
-
327
-          }
305
+    'assessment_after_dislysis.id': function() {
306
+      if (this.assessment_after_dislysis.id > 0) {
307
+        for (var index in this.form) {
308
+          this.form[index] = this.assessment_after_dislysis[index]
309
+        }
328 310
 
311
+        if (this.assessment_after_dislysis['blood_access_part_id'] == 0) {
312
+          this.form['blood_access_part_id'] = ''
313
+        }
314
+        if (this.assessment_after_dislysis['blood_access_part_opera_id'] == 0) {
315
+          this.form['blood_access_part_opera_id'] = ''
316
+        }
317
+        if (this.assessment_after_dislysis['internal_fistula_tremor_ac'] == 0) {
318
+          this.form['internal_fistula_tremor_ac'] = ''
319
+        }
320
+        if (this.assessment_after_dislysis['patient_gose'] == 0) {
321
+          this.form['patient_gose'] = ''
322
+        }
323
+        if (this.assessment_after_dislysis['weight_after'] == 0) {
324
+          this.form['weight_after'] = ''
329 325
         }
326
+        if (this.assessment_after_dislysis['weight_loss'] == 0) {
327
+          this.form['weight_loss'] = ''
328
+        }
329
+        if (this.assessment_after_dislysis['temperature'] == 0) {
330
+          this.form['temperature'] = ''
331
+        }
332
+        if (this.assessment_after_dislysis['systolic_blood_pressure'] == 0) {
333
+          this.form['systolic_blood_pressure'] = ''
334
+        }
335
+        if (this.assessment_after_dislysis['diastolic_blood_pressure'] == 0) {
336
+          this.form['diastolic_blood_pressure'] = ''
337
+        }
338
+        if (this.assessment_after_dislysis['pulse_frequency'] == 0) {
339
+          this.form['pulse_frequency'] = ''
340
+        }
341
+        if (this.assessment_after_dislysis['actual_ultrafiltration'] == 0) {
342
+          this.form['actual_ultrafiltration'] = ''
343
+        }
344
+        if (this.assessment_after_dislysis['actual_displacement'] == 0) {
345
+          this.form['actual_displacement'] = ''
346
+        }
347
+        if (this.assessment_after_dislysis['dialysis_intakes'] == 0) {
348
+          this.form['dialysis_intakes'] = ''
349
+        }
350
+        this.actualTreatmentHourShow = new Date(2018, 1, 1, this.assessment_after_dislysis['actual_treatment_hour'], this.assessment_after_dislysis['actual_treatment_minute'])
351
+      }
330 352
     },
331
-    "dialysis_order.id":function () {
332
-        this.form["dialysis_order_id"] = this.assessment_after_dislysis["dialysis_order_id"];
353
+    'dialysis_order.id': function() {
354
+      this.form['dialysis_order_id'] = this.assessment_after_dislysis['dialysis_order_id']
333 355
     },
334
-    "form.patient_gose":function(){
335
-        if(this.form.patient_gose.patient_gose != 3) {
336
-            this.form.inpatient_department = '';
337
-            this.form.observation_content = '';
338
-            this.form.observation_content_other = '';
339
-        }
356
+    'form.patient_gose': function() {
357
+      if (this.form.patient_gose.patient_gose != 3) {
358
+        this.form.inpatient_department = ''
359
+        this.form.observation_content = ''
360
+        this.form.observation_content_other = ''
361
+      }
340 362
     }
341 363
   },
342 364
   methods: {
343
-    submitForm(){
344
-        this.loading = true;
345
-        let ParamsQuery = {};
346
-
347
-        if (!(this.patient.id > 0)) {
348
-            this.$message.error("没有选择患者");
349
-            this.loading = false;
350
-            return false;
351
-        }
352
-        if (this.record_date.length != 10) {
353
-            this.$message.error("无效的日期");
354
-            this.loading = false;
355
-            return false;
365
+    submitForm() {
366
+      this.loading = true
367
+      const ParamsQuery = {}
368
+
369
+      if (!(this.patient.id > 0)) {
370
+        this.$message.error('没有选择患者')
371
+        this.loading = false
372
+        return false
373
+      }
374
+      if (this.record_date.length != 10) {
375
+        this.$message.error('无效的日期')
376
+        this.loading = false
377
+        return false
378
+      }
379
+
380
+      ParamsQuery['patient'] = this.patient.id
381
+      ParamsQuery['record_date'] = this.record_date
382
+
383
+      const data = {}
384
+      data['weight_after'] = this.form.weight_after ? parseFloat(this.form.weight_after) : 0
385
+      data['weight_loss'] = this.form.weight_loss ? parseFloat(this.form.weight_loss) : 0
386
+      data['temperature'] = this.form.temperature ? parseFloat(this.form.temperature) : 0
387
+      data['systolic_blood_pressure'] = this.form.systolic_blood_pressure ? parseFloat(this.form.systolic_blood_pressure) : 0
388
+      data['diastolic_blood_pressure'] = this.form.diastolic_blood_pressure ? parseFloat(this.form.diastolic_blood_pressure) : 0
389
+      data['pulse_frequency'] = this.form.pulse_frequency ? parseFloat(this.form.pulse_frequency) : 0
390
+      data['actual_ultrafiltration'] = this.form.actual_ultrafiltration ? parseFloat(this.form.actual_ultrafiltration) : 0
391
+      data['actual_displacement'] = this.form.actual_displacement ? parseFloat(this.form.actual_displacement) : 0
392
+      data['actual_treatment_hour'] = this.form.actual_treatment_hour ? parseFloat(this.form.actual_treatment_hour) : 0
393
+      data['actual_treatment_minute'] = this.form.actual_treatment_minute ? parseFloat(this.form.actual_treatment_minute) : 0
394
+      data['cruor'] = this.form.cruor
395
+      data['symptom_after_dialysis'] = this.form.symptom_after_dialysis
396
+      data['dialysis_intakes'] = this.form.dialysis_intakes ? parseFloat(this.form.dialysis_intakes) : 0
397
+      data['internal_fistula'] = this.form.internal_fistula
398
+      data['blood_access_part_id'] = this.form.blood_access_part_id ? parseFloat(this.form.blood_access_part_id) : 0
399
+      data['blood_access_part_opera_id'] = this.form.blood_access_part_opera_id ? parseFloat(this.form.blood_access_part_opera_id) : 0
400
+      data['catheter'] = this.form.catheter
401
+      data['complication'] = this.form.complication
402
+      data['puncture_point_oozing_blood'] = this.form.puncture_point_oozing_blood ? parseFloat(this.form.puncture_point_oozing_blood) : 0
403
+      data['puncture_point_haematoma'] = this.form.puncture_point_haematoma ? parseFloat(this.form.puncture_point_haematoma) : 0
404
+      data['internal_fistula_tremor_ac'] = this.form.internal_fistula_tremor_ac ? parseFloat(this.form.internal_fistula_tremor_ac) : 0
405
+      data['patient_gose'] = this.form.patient_gose ? parseFloat(this.form.patient_gose) : 0
406
+      data['inpatient_department'] = this.form.inpatient_department
407
+      data['observation_content'] = this.form.observation_content
408
+      data['observation_content_other'] = this.form.observation_content_other
409
+      data['remark'] = this.form.remark
410
+      data['dialysis_order_id'] = this.form.dialysis_order_id ? parseFloat(this.form.dialysis_order_id) : 0
411
+
412
+      postAssessmentAfterDislysis(ParamsQuery, data).then(response => {
413
+        this.loading = false
414
+        if (response.data.state == 0) {
415
+          this.$message.error(response.data.msg)
416
+          return false
417
+        } else {
418
+          this.$notify({
419
+            title: '成功',
420
+            message: '提交成功',
421
+            type: 'success',
422
+            duration: 2000
423
+          })
424
+
425
+          var assement = response.data.data.AssessmentAfterDislysis
426
+          var assessment_after_dislysis = this.assessment_after_dislysis
427
+          for (var index in assement) {
428
+            // assessment_after_dislysis[index] = assement[index];
429
+            this.$set(assessment_after_dislysis, index, assement[index])
430
+          }
431
+          this.hide()
356 432
         }
357
-
358
-        ParamsQuery["patient"] = this.patient.id;
359
-        ParamsQuery["record_date"] = this.record_date;
360
-
361
-        let data = {};
362
-        data["weight_after"] = this.form.weight_after?parseFloat(this.form.weight_after):0;
363
-        data["weight_loss"] = this.form.weight_loss?parseFloat(this.form.weight_loss):0;
364
-        data["temperature"] = this.form.temperature?parseFloat(this.form.temperature):0;
365
-        data["systolic_blood_pressure"] = this.form.systolic_blood_pressure?parseFloat(this.form.systolic_blood_pressure):0;
366
-        data["diastolic_blood_pressure"] = this.form.diastolic_blood_pressure?parseFloat(this.form.diastolic_blood_pressure):0;
367
-        data["pulse_frequency"] = this.form.pulse_frequency?parseFloat(this.form.pulse_frequency):0;
368
-        data["actual_ultrafiltration"] = this.form.actual_ultrafiltration?parseFloat(this.form.actual_ultrafiltration):0;
369
-        data["actual_displacement"] = this.form.actual_displacement?parseFloat(this.form.actual_displacement):0;
370
-        data["actual_treatment_hour"] = this.form.actual_treatment_hour?parseFloat(this.form.actual_treatment_hour):0;
371
-        data["actual_treatment_minute"] = this.form.actual_treatment_minute?parseFloat(this.form.actual_treatment_minute):0;
372
-        data["cruor"] = this.form.cruor;
373
-        data["symptom_after_dialysis"] = this.form.symptom_after_dialysis;
374
-        data["dialysis_intakes"] = this.form.dialysis_intakes?parseFloat(this.form.dialysis_intakes):0;
375
-        data["internal_fistula"] = this.form.internal_fistula;
376
-        data["blood_access_part_id"] = this.form.blood_access_part_id?parseFloat(this.form.blood_access_part_id):0;
377
-        data["blood_access_part_opera_id"] = this.form.blood_access_part_opera_id?parseFloat(this.form.blood_access_part_opera_id):0;
378
-        data["catheter"] = this.form.catheter;
379
-        data["complication"] = this.form.complication;
380
-        data["puncture_point_oozing_blood"] = this.form.puncture_point_oozing_blood?parseFloat(this.form.puncture_point_oozing_blood):0;
381
-        data["puncture_point_haematoma"] = this.form.puncture_point_haematoma?parseFloat(this.form.puncture_point_haematoma):0;
382
-        data["internal_fistula_tremor_ac"] = this.form.internal_fistula_tremor_ac?parseFloat(this.form.internal_fistula_tremor_ac):0;
383
-        data["patient_gose"] = this.form.patient_gose?parseFloat(this.form.patient_gose):0;
384
-        data["inpatient_department"] = this.form.inpatient_department;
385
-        data["observation_content"] = this.form.observation_content;
386
-        data["observation_content_other"] = this.form.observation_content_other;
387
-        data["remark"] = this.form.remark;
388
-        data["dialysis_order_id"] = this.form.dialysis_order_id?parseFloat(this.form.dialysis_order_id):0;
389
-
390
-
391
-        postAssessmentAfterDislysis(ParamsQuery, data).then(response => {
392
-            this.loading = false;
393
-            if (response.data.state == 0) {
394
-                this.$message.error(response.data.msg);
395
-                return false;
396
-            } else {
397
-
398
-                this.$notify({
399
-                title: "成功",
400
-                message: "提交成功",
401
-                type: "success",
402
-                duration: 2000
403
-                });
404
-
405
-                var assement = response.data.data.AssessmentAfterDislysis;
406
-                var assessment_after_dislysis = this.assessment_after_dislysis;
407
-                for( var index in assement) {
408
-                    // assessment_after_dislysis[index] = assement[index];
409
-                    this.$set(assessment_after_dislysis, index, assement[index])
410
-                }
411
-                this.hide();
412
-
413
-            }
414
-        }).catch(v=>{
415
-            this.loading = false;
416
-        });
417
-
418
-
433
+      }).catch(v => {
434
+        this.loading = false
435
+      })
419 436
     },
420
-    showDialog:function(val){
421
-        this.InnerDialogProps.visibility = true
422
-        switch(val) {
423
-            case '1':
424
-                this.InnerDialogProps.values = this.cruorOptions
425
-                this.InnerDialogProps.titles = '凝血'
426
-                this.InnerDialogProps.type = 'cruor'
427
-                this.InnerDialogProps.selected = this.form.cruor
428
-                this.InnerDialogProps.isShowTextArea = true
429
-                break
430
-            case '2':
431
-                this.InnerDialogProps.values = this.symptomsOptions
432
-                this.InnerDialogProps.titles = '透后症状'
433
-                this.InnerDialogProps.type = 'symptom_after_dialysis'
434
-                this.InnerDialogProps.selected = this.form.symptom_after_dialysis
435
-                this.InnerDialogProps.isShowTextArea = true
436
-                break
437
-            case '3':
438
-                this.InnerDialogProps.values = this.internalFistulaOptions
439
-                this.InnerDialogProps.titles = '内瘘'
440
-                this.InnerDialogProps.type = 'internal_fistula'
441
-                this.InnerDialogProps.selected = this.form.internal_fistula
442
-                this.InnerDialogProps.isShowTextArea = true
443
-                break
444
-            case '4':
445
-                this.InnerDialogProps.values = this.catheterOptions
446
-                this.InnerDialogProps.titles = '导管'
447
-                this.InnerDialogProps.type = 'catheter'
448
-                this.InnerDialogProps.selected = this.form.catheter
449
-                this.InnerDialogProps.isShowTextArea = true
450
-                break
451
-            case '5':
452
-                this.InnerDialogProps.values = this.complicationOptions
453
-                this.InnerDialogProps.titles = '并发症'
454
-                this.InnerDialogProps.type = 'complication'
455
-                this.InnerDialogProps.selected = this.form.complication
456
-                this.InnerDialogProps.isShowTextArea = true
457
-                break
458
-            case '6':
459
-                this.InnerDialogProps.values = this.observationContentOptions
460
-                this.InnerDialogProps.titles = '交待病房护士/患者/陪人观察内容'
461
-                this.InnerDialogProps.type = 'observation_content'
462
-                this.InnerDialogProps.selected = this.form.observation_content
463
-                this.InnerDialogProps.isShowTextArea = false
464
-                break
465
-        }
437
+    showDialog: function(val) {
438
+      this.InnerDialogProps.visibility = true
439
+      switch (val) {
440
+        case '1':
441
+          this.InnerDialogProps.values = this.cruorOptions
442
+          this.InnerDialogProps.titles = '凝血'
443
+          this.InnerDialogProps.type = 'cruor'
444
+          this.InnerDialogProps.selected = this.form.cruor
445
+          this.InnerDialogProps.isShowTextArea = true
446
+          break
447
+        case '2':
448
+          this.InnerDialogProps.values = this.symptomsOptions
449
+          this.InnerDialogProps.titles = '透后症状'
450
+          this.InnerDialogProps.type = 'symptom_after_dialysis'
451
+          this.InnerDialogProps.selected = this.form.symptom_after_dialysis
452
+          this.InnerDialogProps.isShowTextArea = true
453
+          break
454
+        case '3':
455
+          this.InnerDialogProps.values = this.internalFistulaOptions
456
+          this.InnerDialogProps.titles = '内瘘'
457
+          this.InnerDialogProps.type = 'internal_fistula'
458
+          this.InnerDialogProps.selected = this.form.internal_fistula
459
+          this.InnerDialogProps.isShowTextArea = true
460
+          break
461
+        case '4':
462
+          this.InnerDialogProps.values = this.catheterOptions
463
+          this.InnerDialogProps.titles = '导管'
464
+          this.InnerDialogProps.type = 'catheter'
465
+          this.InnerDialogProps.selected = this.form.catheter
466
+          this.InnerDialogProps.isShowTextArea = true
467
+          break
468
+        case '5':
469
+          this.InnerDialogProps.values = this.complicationOptions
470
+          this.InnerDialogProps.titles = '并发症'
471
+          this.InnerDialogProps.type = 'complication'
472
+          this.InnerDialogProps.selected = this.form.complication
473
+          this.InnerDialogProps.isShowTextArea = true
474
+          break
475
+        case '6':
476
+          this.InnerDialogProps.values = this.observationContentOptions
477
+          this.InnerDialogProps.titles = '交待病房护士/患者/陪人观察内容'
478
+          this.InnerDialogProps.type = 'observation_content'
479
+          this.InnerDialogProps.selected = this.form.observation_content
480
+          this.InnerDialogProps.isShowTextArea = false
481
+          break
482
+      }
466 483
     },
467 484
     selectActualTreatmentHour(val) {
468
-      var valTime = val.split(":");
469
-      this.form.actual_treatment_hour = valTime[0];
470
-      this.form.actual_treatment_minute = valTime[1];
485
+      var valTime = val.split(':')
486
+      this.form.actual_treatment_hour = valTime[0]
487
+      this.form.actual_treatment_minute = valTime[1]
471 488
     },
472
-    DialogComfirm:function (val) {
473
-        this.InnerDialogProps.visibility = false
474
-        switch (val.type) {
475
-            case 'cruor':
476
-                this.form.cruor = val.value.join(',');
477
-                break;
478
-            case 'symptom_after_dialysis':
479
-                this.form.symptom_after_dialysis = val.value.join(',');
480
-                break;
481
-            case 'internal_fistula':
482
-                this.form.internal_fistula = val.value.join(',');
483
-                break;
484
-            case 'catheter':
485
-                this.form.catheter = val.value.join(',');
486
-                break;
487
-            case 'complication':
488
-                this.form.complication = val.value.join(',');
489
-                break;
490
-            case 'observation_content':
491
-                this.form.observation_content = val.value.join(',');
492
-                break;
493
-
494
-            default:
495
-                break;
496
-        }
497
-        console.log(val);
489
+    DialogComfirm: function(val) {
490
+      this.InnerDialogProps.visibility = false
491
+      switch (val.type) {
492
+        case 'cruor':
493
+          this.form.cruor = val.value.join(',')
494
+          break
495
+        case 'symptom_after_dialysis':
496
+          this.form.symptom_after_dialysis = val.value.join(',')
497
+          break
498
+        case 'internal_fistula':
499
+          this.form.internal_fistula = val.value.join(',')
500
+          break
501
+        case 'catheter':
502
+          this.form.catheter = val.value.join(',')
503
+          break
504
+        case 'complication':
505
+          this.form.complication = val.value.join(',')
506
+          break
507
+        case 'observation_content':
508
+          this.form.observation_content = val.value.join(',')
509
+          break
510
+
511
+        default:
512
+          break
513
+      }
514
+      console.log(val)
498 515
     },
499
-    DialogCancle: function (val) {
500
-        this.InnerDialogProps.visibility = false
516
+    DialogCancle: function(val) {
517
+      this.InnerDialogProps.visibility = false
501 518
     },
502 519
 
503 520
     show() {
504
-        this.isVisibility = true;
521
+      this.isVisibility = true
505 522
     },
506 523
 
507 524
     hide() {
508
-        this.isVisibility = false;
525
+      this.isVisibility = false
509 526
     }
510 527
   },
511 528
   created() {
512
-    this.cruorOptions = getDataConfig("hemodialysis", "cruor");
513
-    this.symptomsOptions = getDataConfig('hemodialysis','symptoms');
514
-    this.internalFistulaOptions = getDataConfig('hemodialysis','internal_fistula')
515
-    this.vascularAccessOptions = getDataConfig('hemodialysis','vascular_access')
516
-    this.vascularAccessDescOptions = getDataConfig('hemodialysis','vascular_access_desc')
517
-    this.catheterOptions = getDataConfig('hemodialysis','catheter')
518
-    this.complicationOptions = getDataConfig('hemodialysis','complication')
519
-    this.internalFistulaTremorAcOptions = this.$store.getters.internal_fistula_tremor_ac;
520
-    this.patientGoseOptions = this.$store.getters.patient_gose;
521
-    this.observationContentOptions = this.$store.getters.observation_content;
529
+    this.cruorOptions = getDataConfig('hemodialysis', 'cruor')
530
+    this.symptomsOptions = getDataConfig('hemodialysis', 'symptoms')
531
+    this.internalFistulaOptions = getDataConfig('hemodialysis', 'internal_fistula')
532
+    this.vascularAccessOptions = getDataConfig('hemodialysis', 'vascular_access')
533
+    this.vascularAccessDescOptions = getDataConfig('hemodialysis', 'vascular_access_desc')
534
+    this.catheterOptions = getDataConfig('hemodialysis', 'catheter')
535
+    this.complicationOptions = getDataConfig('hemodialysis', 'complication')
536
+    this.internalFistulaTremorAcOptions = this.$store.getters.internal_fistula_tremor_ac
537
+    this.patientGoseOptions = this.$store.getters.patient_gose
538
+    this.observationContentOptions = this.$store.getters.observation_content
522 539
 
523 540
     console.log(this.patient)
524 541
 
525
-    var date = this.$route.query && this.$route.query.date;
526
-    this.record_date = uParseTime(date, '{y}-{m}-{d}');
527
-
542
+    var date = this.$route.query && this.$route.query.date
543
+    this.record_date = uParseTime(date, '{y}-{m}-{d}')
528 544
   },
529 545
   components: {
530 546
     MultiSelectBox
531 547
   }
532
-};
548
+}
533 549
 </script>
534 550
 
535 551
 <style scoped>

文件差异内容过多而无法显示
+ 487 - 512
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue


+ 265 - 279
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue 查看文件

@@ -451,7 +451,6 @@
451 451
 </template>
452 452
 
453 453
 <script>
454
-
455 454
   import {
456 455
     CreateDoctorAdvice,
457 456
     CreateGroupAdvice,
@@ -461,9 +460,9 @@
461 460
     getAdviceConfig,
462 461
     getDoctorAdviceList,
463 462
     StopDoctorAdvice
464
-  } from "@/api/advice";
463
+  } from '@/api/advice'
465 464
 
466
-  export default {
465
+export default {
467 466
     name: 'AddGroupAdvice',
468 467
     data() {
469 468
       return {
@@ -478,56 +477,56 @@
478 477
         isEdit: false,
479 478
         adminusername: '',
480 479
         groupRules: {
481
-          advice_type: [{required: true, message: "请选择医嘱类型",},],
482
-          advice_date: [{required: true, message: "请选择医嘱时间",},],
483
-          start_time: [{required: true, message: "请选择开始时间",},],
484
-          advice_name: [{required: true, message: "请填写医嘱名称",},],
485
-          advice_doctor: [{required: true, message: "请选择开嘱医生",},],
480
+          advice_type: [{ required: true, message: '请选择医嘱类型' }],
481
+          advice_date: [{ required: true, message: '请选择医嘱时间' }],
482
+          start_time: [{ required: true, message: '请选择开始时间' }],
483
+          advice_name: [{ required: true, message: '请填写医嘱名称' }],
484
+          advice_doctor: [{ required: true, message: '请选择开嘱医生' }]
486 485
         },
487 486
         nameRules: {
488
-          advice_name: [{required: true, message: "请填写医嘱内容",},],
487
+          advice_name: [{ required: true, message: '请填写医嘱内容' }]
489 488
         },
490 489
         templateRules: {
491
-          id: [{required: true, message: "请选择医嘱模板",},],
490
+          id: [{ required: true, message: '请选择医嘱模板' }]
492 491
         },
493
-        templateForm: {id: ''},
492
+        templateForm: { id: '' },
494 493
         nameForm: {
495
-          advice_name: "",
496
-          advice_desc: "",
497
-          single_dose: "",
498
-          single_dose_unit: "",
499
-          drug_spec: "",
500
-          drug_spec_unit: "",
501
-          prescribing_number: "",
502
-          prescribing_number_unit: "",
503
-          delivery_way: "",
504
-          execution_frequency: "",
494
+          advice_name: '',
495
+          advice_desc: '',
496
+          single_dose: '',
497
+          single_dose_unit: '',
498
+          drug_spec: '',
499
+          drug_spec_unit: '',
500
+          prescribing_number: '',
501
+          prescribing_number_unit: '',
502
+          delivery_way: '',
503
+          execution_frequency: '',
505 504
           isEdit: 0,
506 505
           index: 0,
507 506
           id: 0,
508
-          children: [],
507
+          children: []
509 508
         },
510 509
         submitGroupForm: {
511
-          advice_type: "",
512
-          advice_date: "",
513
-          start_time: "",
510
+          advice_type: '',
511
+          advice_date: '',
512
+          start_time: '',
514 513
           adviceNames: [],
515
-          advice_doctor: "",
516
-          remark: "",
517
-          parent_id: 0,
514
+          advice_doctor: '',
515
+          remark: '',
516
+          parent_id: 0
518 517
         },
519 518
         groupForm: {
520
-          advice_type: "",
521
-          advice_date: "",
522
-          start_time: "",
519
+          advice_type: '',
520
+          advice_date: '',
521
+          start_time: '',
523 522
           adviceNames: [],
524
-          advice_doctor: "",
525
-          remark: "",
526
-          parent_id: 0,
523
+          advice_doctor: '',
524
+          remark: '',
525
+          parent_id: 0
527 526
         },
528
-        selectedTemp: {'id': 0, name: '', org_id: 0, 'list': [], 'rows': []},
527
+        selectedTemp: { 'id': 0, name: '', org_id: 0, 'list': [], 'rows': [] },
529 528
         selectedTemplate: [],
530
-        allSelectedTemplate: [],
529
+        allSelectedTemplate: []
531 530
 
532 531
       }
533 532
     },
@@ -537,14 +536,14 @@
537 536
       rowKey: 0,
538 537
       adviceTemplates: {
539 538
         type: Array,
540
-        default: function () {
539
+        default: function() {
541 540
           return []
542 541
         }
543 542
       },
544 543
       recordDate: '',
545 544
       adviceTypeOptions: {
546 545
         type: Array,
547
-        default: function () {
546
+        default: function() {
548 547
           return []
549 548
         }
550 549
       },
@@ -554,28 +553,28 @@
554 553
       },
555 554
       unitsOption: {
556 555
         type: Array,
557
-        default: function () {
556
+        default: function() {
558 557
           return []
559 558
         }
560 559
       },
561 560
       executionFrequencyOptions: {
562 561
         type: Array,
563
-        default: function () {
562
+        default: function() {
564 563
           return []
565 564
         }
566 565
       },
567 566
       adviceTemplateMaps: {
568 567
         type: Object,
569
-        default: function () {
568
+        default: function() {
570 569
           return {}
571 570
         }
572 571
       },
573 572
       adviceTableData: {
574 573
         type: Array,
575
-        default: function () {
574
+        default: function() {
576 575
           return []
577 576
         }
578
-      },
577
+      }
579 578
     },
580 579
     methods: {
581 580
 
@@ -589,51 +588,51 @@
589 588
               adviceNames: [],
590 589
               advice_doctor: this.groupForm.advice_doctor,
591 590
               remark: this.groupForm.remark,
592
-              parent_id: this.groupForm.parent_id,
593
-            };
591
+              parent_id: this.groupForm.parent_id
592
+            }
594 593
 
595
-            var adviceNames = [];
594
+            var adviceNames = []
596 595
             for (const index in this.groupForm.adviceNames) {
597
-              adviceNames.unshift(this.groupForm.adviceNames[index]);
596
+              adviceNames.unshift(this.groupForm.adviceNames[index])
598 597
             }
599
-            submitForm.adviceNames = adviceNames;
598
+            submitForm.adviceNames = adviceNames
600 599
             CreateGroupAdvice(this.patientID, 0, submitForm).then(response => {
601 600
               if (response.data.state == 0) {
602
-                this.$message.error(response.data.msg);
603
-                return false;
601
+                this.$message.error(response.data.msg)
602
+                return false
604 603
               } else {
605 604
                 this.$notify({
606
-                  title: "成功",
607
-                  message: "新增成功",
608
-                  type: "success",
605
+                  title: '成功',
606
+                  message: '新增成功',
607
+                  type: 'success',
609 608
                   duration: 2000
610
-                });
609
+                })
611 610
 
612
-                var childMap = {};
611
+                var childMap = {}
613 612
                 for (const index in response.data.data.advices) {
614 613
                   if (response.data.data.advices[index].parent_id == 0) {
615
-                    continue;
614
+                    continue
616 615
                   }
617
-                  if (false === (response.data.data.advices[index].parent_id in childMap)) {
618
-                    childMap[response.data.data.advices[index].parent_id] = [];
616
+                  if ((response.data.data.advices[index].parent_id in childMap) === false) {
617
+                    childMap[response.data.data.advices[index].parent_id] = []
619 618
                   }
620
-                  childMap[response.data.data.advices[index].parent_id].unshift(response.data.data.advices[index]);
619
+                  childMap[response.data.data.advices[index].parent_id].unshift(response.data.data.advices[index])
621 620
                 }
622
-                var parentArr = [];
621
+                var parentArr = []
623 622
                 for (const index in response.data.data.advices) {
624 623
                   if (response.data.data.advices[index].parent_id > 0) {
625
-                    continue;
624
+                    continue
626 625
                   }
627
-                  parentArr.push(response.data.data.advices[index]);
626
+                  parentArr.push(response.data.data.advices[index])
628 627
                 }
629 628
 
630 629
                 for (const index in parentArr) {
631 630
                   if (parentArr[index].id in childMap) {
632 631
                     for (const j in childMap[parentArr[index].id]) {
633
-                      this.adviceTableData.unshift(childMap[parentArr[index].id][j]);
632
+                      this.adviceTableData.unshift(childMap[parentArr[index].id][j])
634 633
                     }
635 634
                   }
636
-                  this.adviceTableData.unshift(parentArr[index]);
635
+                  this.adviceTableData.unshift(parentArr[index])
637 636
                 }
638 637
 
639 638
                 // var alen = response.data.data.advices.length
@@ -641,32 +640,32 @@
641 640
                 //   this.adviceTableData.unshift(response.data.data.advices[index]);
642 641
                 // }
643 642
 
644
-                this.resetForm(formName);
645
-                this.groupAddFormVisible = false;
646
-                return false;
643
+                this.resetForm(formName)
644
+                this.groupAddFormVisible = false
645
+                return false
647 646
               }
648
-            });
647
+            })
649 648
           }
650
-        });
649
+        })
651 650
       },
652 651
 
653 652
       openDeleteGroupAdvice() {
654 653
         if (this.groupSelectRow === null) {
655 654
           this.$notify.error({
656
-            title: "错误",
657
-            message: "未选择要删除的医嘱内容"
658
-          });
659
-          return;
655
+            title: '错误',
656
+            message: '未选择要删除的医嘱内容'
657
+          })
658
+          return
660 659
         }
661
-        var content = ""
662
-        if(this.groupSelectRow.children.length > 0){
663
-          content = "确认删除此医嘱内容,包括它的子药?"
664
-        }else{
665
-          content = "确认删除此医嘱内容?"
660
+        var content = ''
661
+        if (this.groupSelectRow.children.length > 0) {
662
+          content = '确认删除此医嘱内容,包括它的子药?'
663
+        } else {
664
+          content = '确认删除此医嘱内容?'
666 665
         }
667
-        var isChild = this.groupSelectRow.parent_row ? true : false;
668
-        var title = isChild ? '删除子药内容' : '删除医嘱内容';
669
-        var msg = isChild ? '确认删除此子药内容?' : content;
666
+        var isChild = !!this.groupSelectRow.parent_row
667
+        var title = isChild ? '删除子药内容' : '删除医嘱内容'
668
+        var msg = isChild ? '确认删除此子药内容?' : content
670 669
         this.$confirm(msg, title, {
671 670
           confirmButtonText: '确定',
672 671
           cancelButtonText: '取消',
@@ -677,9 +676,9 @@
677 676
               if (this.groupForm.adviceNames[index].row_key == this.groupSelectRow.parent_row) {
678 677
                 for (const j in this.groupForm.adviceNames[index].children) {
679 678
                   if (this.groupForm.adviceNames[index].children[j].row_key == this.groupSelectRow.row_key) {
680
-                    this.groupForm.adviceNames[index].children.splice(j, 1);
681
-                    this.$set(this.groupForm.adviceNames, index, this.groupForm.adviceNames[index]);
682
-                    break;
679
+                    this.groupForm.adviceNames[index].children.splice(j, 1)
680
+                    this.$set(this.groupForm.adviceNames, index, this.groupForm.adviceNames[index])
681
+                    break
683 682
                   }
684 683
                 }
685 684
               }
@@ -687,21 +686,20 @@
687 686
           } else {
688 687
             for (const index in this.groupForm.adviceNames) {
689 688
               if (this.groupForm.adviceNames[index].row_key == this.groupSelectRow.row_key) {
690
-                this.groupForm.adviceNames.splice(index, 1);
691
-                break;
689
+                this.groupForm.adviceNames.splice(index, 1)
690
+                break
692 691
               }
693 692
             }
694 693
           }
695
-
696 694
         }).catch(() => {
697
-        });
695
+        })
698 696
       },
699 697
       submitNameForm(formName) {
700
-        var _this = this;
698
+        var _this = this
701 699
         this.$refs[formName].validate((valid) => {
702 700
           if (valid) {
703 701
             if (_this.nameForm.isEdit) {
704
-              var ale = _this.groupForm.adviceNames.length;
702
+              var ale = _this.groupForm.adviceNames.length
705 703
               if (_this.isChild) {
706 704
                 for (let index = 0; index < ale; index++) {
707 705
                   if (_this.groupSelectRow.parent_row == _this.groupForm.adviceNames[index].row_key) {
@@ -709,19 +707,19 @@
709 707
                     var children = _this.groupForm.adviceNames[index].children
710 708
                     for (let j = 0; j < ale; j++) {
711 709
                       if (_this.groupSelectRow.row_key == children[j].row_key) {
712
-                        _this.groupForm.adviceNames[index].children[j].advice_name = _this.nameForm.advice_name;
713
-                        _this.groupForm.adviceNames[index].children[j].advice_desc = _this.nameForm.advice_desc;
714
-                        _this.groupForm.adviceNames[index].children[j].single_dose = '' + _this.nameForm.single_dose;
715
-                        _this.groupForm.adviceNames[index].children[j].single_dose_unit = _this.nameForm.single_dose_unit;
716
-                        _this.groupForm.adviceNames[index].children[j].drug_spec = '' + _this.nameForm.drug_spec;
717
-                        _this.groupForm.adviceNames[index].children[j].drug_spec_unit = _this.nameForm.drug_spec_unit;
718
-                        _this.groupForm.adviceNames[index].children[j].prescribing_number = '' + _this.nameForm.prescribing_number;
719
-                        _this.groupForm.adviceNames[index].children[j].prescribing_number_unit = _this.nameForm.prescribing_number_unit;
720
-                        _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way;
721
-                        _this.groupForm.adviceNames[index].children[j].execution_frequency = _this.nameForm.execution_frequency;
722
-
723
-                        _this.$set(_this.groupForm.adviceNames[index].children, j, _this.groupForm.adviceNames[index].children[j]);
724
-                        break;
710
+                        _this.groupForm.adviceNames[index].children[j].advice_name = _this.nameForm.advice_name
711
+                        _this.groupForm.adviceNames[index].children[j].advice_desc = _this.nameForm.advice_desc
712
+                        _this.groupForm.adviceNames[index].children[j].single_dose = '' + _this.nameForm.single_dose
713
+                        _this.groupForm.adviceNames[index].children[j].single_dose_unit = _this.nameForm.single_dose_unit
714
+                        _this.groupForm.adviceNames[index].children[j].drug_spec = '' + _this.nameForm.drug_spec
715
+                        _this.groupForm.adviceNames[index].children[j].drug_spec_unit = _this.nameForm.drug_spec_unit
716
+                        _this.groupForm.adviceNames[index].children[j].prescribing_number = '' + _this.nameForm.prescribing_number
717
+                        _this.groupForm.adviceNames[index].children[j].prescribing_number_unit = _this.nameForm.prescribing_number_unit
718
+                        _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way
719
+                        _this.groupForm.adviceNames[index].children[j].execution_frequency = _this.nameForm.execution_frequency
720
+
721
+                        _this.$set(_this.groupForm.adviceNames[index].children, j, _this.groupForm.adviceNames[index].children[j])
722
+                        break
725 723
                       }
726 724
                     }
727 725
                   }
@@ -729,105 +727,104 @@
729 727
               } else {
730 728
                 for (let index = 0; index < ale; index++) {
731 729
                   if (_this.groupSelectRow.row_key == _this.groupForm.adviceNames[index].row_key) {
732
-                    _this.groupForm.adviceNames[index].advice_name = _this.nameForm.advice_name;
733
-                    _this.groupForm.adviceNames[index].advice_desc = _this.nameForm.advice_desc;
734
-                    _this.groupForm.adviceNames[index].single_dose = '' + _this.nameForm.single_dose;
735
-                    _this.groupForm.adviceNames[index].single_dose_unit = _this.nameForm.single_dose_unit;
736
-                    _this.groupForm.adviceNames[index].drug_spec = '' + _this.nameForm.drug_spec;
737
-                    _this.groupForm.adviceNames[index].drug_spec_unit = _this.nameForm.drug_spec_unit;
738
-                    _this.groupForm.adviceNames[index].prescribing_number = '' + _this.nameForm.prescribing_number;
739
-                    _this.groupForm.adviceNames[index].prescribing_number_unit = _this.nameForm.prescribing_number_unit;
740
-                    _this.groupForm.adviceNames[index].delivery_way = _this.nameForm.delivery_way;
741
-                    _this.groupForm.adviceNames[index].execution_frequency = _this.nameForm.execution_frequency;
742
-
743
-                    _this.$set(_this.groupForm.adviceNames, index, _this.groupForm.adviceNames[index]);
744
-                    break;
730
+                    _this.groupForm.adviceNames[index].advice_name = _this.nameForm.advice_name
731
+                    _this.groupForm.adviceNames[index].advice_desc = _this.nameForm.advice_desc
732
+                    _this.groupForm.adviceNames[index].single_dose = '' + _this.nameForm.single_dose
733
+                    _this.groupForm.adviceNames[index].single_dose_unit = _this.nameForm.single_dose_unit
734
+                    _this.groupForm.adviceNames[index].drug_spec = '' + _this.nameForm.drug_spec
735
+                    _this.groupForm.adviceNames[index].drug_spec_unit = _this.nameForm.drug_spec_unit
736
+                    _this.groupForm.adviceNames[index].prescribing_number = '' + _this.nameForm.prescribing_number
737
+                    _this.groupForm.adviceNames[index].prescribing_number_unit = _this.nameForm.prescribing_number_unit
738
+                    _this.groupForm.adviceNames[index].delivery_way = _this.nameForm.delivery_way
739
+                    _this.groupForm.adviceNames[index].execution_frequency = _this.nameForm.execution_frequency
740
+
741
+                    _this.$set(_this.groupForm.adviceNames, index, _this.groupForm.adviceNames[index])
742
+                    break
745 743
                   }
746 744
                 }
747 745
               }
748 746
             } else {
749 747
               if (_this.isChild) {
750
-                _this.editRowKey++;
751
-                _this.nameForm.row_key = _this.editRowKey;
748
+                _this.editRowKey++
749
+                _this.nameForm.row_key = _this.editRowKey
752 750
 
753
-                var ale = _this.groupForm.adviceNames.length;
751
+                var ale = _this.groupForm.adviceNames.length
754 752
                 for (let index = 0; index < ale; index++) {
755 753
                   if (_this.nameForm.parent_row == _this.groupForm.adviceNames[index].row_key) {
756
-                    _this.groupForm.adviceNames[index].children.push(_this.nameForm);
757
-                    _this.$set(_this.groupForm.adviceNames, index, _this.groupForm.adviceNames[index]);
758
-                    break;
754
+                    _this.groupForm.adviceNames[index].children.push(_this.nameForm)
755
+                    _this.$set(_this.groupForm.adviceNames, index, _this.groupForm.adviceNames[index])
756
+                    break
759 757
                   }
760 758
                 }
761 759
               } else {
762
-
763
-                _this.editRowKey++;
764
-                _this.nameForm.row_key = _this.editRowKey;
765
-                _this.groupForm.adviceNames.push(_this.nameForm);
760
+                _this.editRowKey++
761
+                _this.nameForm.row_key = _this.editRowKey
762
+                _this.groupForm.adviceNames.push(_this.nameForm)
766 763
               }
767 764
             }
768
-            _this.nameFormVisible = false;
765
+            _this.nameFormVisible = false
769 766
           }
770
-        });
767
+        })
771 768
         console.log(_this.groupForm.adviceNames)
772 769
       },
773 770
 
774 771
       openGroupChild() {
775 772
         if (this.groupSelectRow === null) {
776 773
           this.$notify.error({
777
-            title: "错误",
778
-            message: "未选择医嘱内容,无法添加子药"
779
-          });
780
-          return;
774
+            title: '错误',
775
+            message: '未选择医嘱内容,无法添加子药'
776
+          })
777
+          return
781 778
         } else if (this.groupSelectRow.parent_row > 0) {
782 779
           this.$notify.error({
783
-            title: "错误",
784
-            message: "子药不能添加子药"
785
-          });
786
-          return;
780
+            title: '错误',
781
+            message: '子药不能添加子药'
782
+          })
783
+          return
787 784
         }
788 785
         this.nameForm = {
789
-          advice_name: "",
790
-          advice_desc: "",
791
-          single_dose: "",
792
-          single_dose_unit: "",
793
-          drug_spec: "",
794
-          drug_spec_unit: "",
795
-          prescribing_number: "",
796
-          prescribing_number_unit: "",
786
+          advice_name: '',
787
+          advice_desc: '',
788
+          single_dose: '',
789
+          single_dose_unit: '',
790
+          drug_spec: '',
791
+          drug_spec_unit: '',
792
+          prescribing_number: '',
793
+          prescribing_number_unit: '',
797 794
           delivery_way: this.groupSelectRow.delivery_way,
798 795
           execution_frequency: this.groupSelectRow.execution_frequency,
799 796
           isEdit: 0,
800 797
           index: 0,
801 798
           children: [],
802 799
           parent_row: this.groupSelectRow.row_key,
803
-          id: 0,
804
-        };
805
-        this.isChild = true;
806
-        this.nameFormVisible = true;
807
-        this.nameFormTitle = '添加子药内容';
800
+          id: 0
801
+        }
802
+        this.isChild = true
803
+        this.nameFormVisible = true
804
+        this.nameFormTitle = '添加子药内容'
808 805
       },
809 806
       openGroupAdvice(isEdit) {
810
-        this.isChild = false;
807
+        this.isChild = false
811 808
         if (isEdit) {
812 809
           if (this.groupSelectRow === null) {
813 810
             this.$notify.error({
814
-              title: "错误",
815
-              message: "未选择要修改的医嘱内容"
816
-            });
817
-            return;
811
+              title: '错误',
812
+              message: '未选择要修改的医嘱内容'
813
+            })
814
+            return
818 815
           }
819 816
           if (this.groupSelectRow.parent_row) {
820
-            this.isChild = true;
817
+            this.isChild = true
821 818
           }
822 819
 
823 820
           this.nameForm = {
824 821
             advice_name: this.groupSelectRow.advice_name,
825 822
             advice_desc: this.groupSelectRow.advice_desc,
826
-            single_dose: this.groupSelectRow.single_dose,
823
+            single_dose: this.groupSelectRow.single_dose != 0 ? this.groupSelectRow.single_dose : '',
827 824
             single_dose_unit: this.groupSelectRow.single_dose_unit,
828
-            drug_spec: this.groupSelectRow.drug_spec,
825
+            drug_spec: this.groupSelectRow.drug_spec != 0 ? this.groupSelectRow.drug_spec : '',
829 826
             drug_spec_unit: this.groupSelectRow.drug_spec_unit,
830
-            prescribing_number: this.groupSelectRow.prescribing_number,
827
+            prescribing_number: this.groupSelectRow.prescribing_number != 0 ? this.groupSelectRow.prescribing_number : '',
831 828
             prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
832 829
             delivery_way: this.isChild ? '' : this.groupSelectRow.delivery_way,
833 830
             execution_frequency: this.isChild ? '' : this.groupSelectRow.execution_frequency,
@@ -835,36 +832,35 @@
835 832
             index: this.groupSelectRow.index,
836 833
             id: this.groupSelectRow.id,
837 834
             children: [],
838
-            parent_row: this.groupSelectRow.parent_row,
835
+            parent_row: this.groupSelectRow.parent_row
839 836
             // row_key:this.groupSelectRow.row_key,
840
-          };
841
-          this.nameFormTitle = '修改医嘱内容';
837
+          }
838
+          this.nameFormTitle = '修改医嘱内容'
842 839
         } else {
843 840
           this.nameForm = {
844
-            advice_name: "",
845
-            advice_desc: "",
846
-            single_dose: "",
847
-            single_dose_unit: "",
848
-            drug_spec: "",
849
-            drug_spec_unit: "",
850
-            prescribing_number: "",
851
-            prescribing_number_unit: "",
852
-            delivery_way: "",
853
-            execution_frequency: "",
841
+            advice_name: '',
842
+            advice_desc: '',
843
+            single_dose: '',
844
+            single_dose_unit: '',
845
+            drug_spec: '',
846
+            drug_spec_unit: '',
847
+            prescribing_number: '',
848
+            prescribing_number_unit: '',
849
+            delivery_way: '',
850
+            execution_frequency: '',
854 851
             isEdit: 0,
855 852
             index: 0,
856 853
             id: 0,
857 854
             children: [],
858
-            parent_row: 0,
859
-          };
860
-          this.nameFormTitle = '添加医嘱内容';
855
+            parent_row: 0
856
+          }
857
+          this.nameFormTitle = '添加医嘱内容'
861 858
         }
862
-        this.nameFormVisible = true;
863
-
859
+        this.nameFormVisible = true
864 860
       },
865 861
 
866 862
       changeAdvice(selection) {
867
-        this.selectedTemplate = selection;
863
+        this.selectedTemplate = selection
868 864
       },
869 865
       selectAdvice(selection, row) {
870 866
         // this.selectedTemplate = [];
@@ -888,36 +884,35 @@
888 884
 
889 885
         console.log(adviceArray)
890 886
 
891
-
892 887
         if (row.children.length > 0) {
893 888
           for (const index in row.children) {
894
-            this.$refs.selecttemplatetable.toggleRowSelection(row.children[index]);
889
+            this.$refs.selecttemplatetable.toggleRowSelection(row.children[index])
895 890
           }
896 891
         }
897 892
 
898
-        //下面两步的作用是为了上选中的数据的输出顺序不变
893
+        // 下面两步的作用是为了上选中的数据的输出顺序不变
899 894
         for (const index in this.selectedTemp.list) {
900
-          this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index]);
895
+          this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index])
901 896
           if (this.selectedTemp.list[index].children.length > 0) {
902 897
             for (const j in this.selectedTemp.list[index].children) {
903
-              this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index].children[j]);
898
+              this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index].children[j])
904 899
             }
905 900
           }
906 901
         }
907 902
 
908 903
         for (const index in this.selectedTemp.list) {
909
-          this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index]);
904
+          this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index])
910 905
           if (this.selectedTemp.list[index].children.length > 0) {
911 906
             for (const j in this.selectedTemp.list[index].children) {
912
-              this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index].children[j]);
907
+              this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index].children[j])
913 908
             }
914 909
           }
915 910
         }
916 911
       },
917
-      spanselecttable({row, column, rowIndex, columnIndex}) {
912
+      spanselecttable({ row, column, rowIndex, columnIndex }) {
918 913
         if (columnIndex == 0) {
919
-          const _row = this.selectedTemp.rows[rowIndex];
920
-          const _col = _row > 0 ? 1 : 0;
914
+          const _row = this.selectedTemp.rows[rowIndex]
915
+          const _col = _row > 0 ? 1 : 0
921 916
           return {
922 917
             rowspan: _row,
923 918
             colspan: _col
@@ -925,38 +920,38 @@
925 920
         }
926 921
       },
927 922
       calcselectedTemp() {
928
-        var rowKeys = 0;
923
+        var rowKeys = 0
929 924
         for (const index in this.selectedTemp.list) {
930
-          var pkey = rowKeys;
931
-          this.selectedTemp.rows[rowKeys] = 1;
925
+          var pkey = rowKeys
926
+          this.selectedTemp.rows[rowKeys] = 1
932 927
           if (this.selectedTemp.list[index].children.length > 0) {
933 928
             for (const childindex in this.selectedTemp.list[index].children) {
934
-              rowKeys++;
935
-              this.selectedTemp.rows[pkey] += 1;
936
-              this.selectedTemp.rows[rowKeys] = 0;
929
+              rowKeys++
930
+              this.selectedTemp.rows[pkey] += 1
931
+              this.selectedTemp.rows[rowKeys] = 0
937 932
             }
938 933
           }
939
-          rowKeys++;
940
-          this.$nextTick(function () {
934
+          rowKeys++
935
+          this.$nextTick(function() {
941 936
             if (this.selectedTemp.list[index].selection) {
942
-              this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index]);
937
+              this.$refs.selecttemplatetable.toggleRowSelection(this.selectedTemp.list[index])
943 938
             }
944 939
           })
945 940
         }
946 941
       },
947 942
       templateTableChange(currentRow, oldCurrentRow) {
948
-        this.selectedTemp = {'id': 0, name: '', org_id: 0, 'list': [], 'rows': []};
943
+        this.selectedTemp = { 'id': 0, name: '', org_id: 0, 'list': [], 'rows': [] }
949 944
         if (currentRow == null) {
950
-          return false;
945
+          return false
951 946
         }
952
-        this.selectedTemp.id = currentRow.id;
953
-        this.selectedTemp.name = currentRow.name;
954
-        this.selectedTemp.org_id = currentRow.org_id;
947
+        this.selectedTemp.id = currentRow.id
948
+        this.selectedTemp.name = currentRow.name
949
+        this.selectedTemp.org_id = currentRow.org_id
955 950
         if (this.selectedTemp.id in this.adviceTemplateMaps) {
956
-          var mapid = this.selectedTemp.id;
957
-          var thisRowKey = 0;
951
+          var mapid = this.selectedTemp.id
952
+          var thisRowKey = 0
958 953
           for (const index in this.adviceTemplateMaps[mapid].DoctorAdviceTemplate) {
959
-            thisRowKey++;
954
+            thisRowKey++
960 955
             var item = {
961 956
               advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_name,
962 957
               advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_desc,
@@ -975,10 +970,10 @@
975 970
               id: 0,
976 971
               children: [],
977 972
               parent_row: 0,
978
-              row_key: thisRowKey,
973
+              row_key: thisRowKey
979 974
             }
980 975
             if ('children' in this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index] && this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].children.length > 0) {
981
-              var parentRow = thisRowKey;
976
+              var parentRow = thisRowKey
982 977
               var children = this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].children
983 978
               for (const key in children) {
984 979
                 thisRowKey++
@@ -998,27 +993,25 @@
998 993
                   id: 0,
999 994
                   children: [],
1000 995
                   parent_row: parentRow,
1001
-                  row_key: thisRowKey,
996
+                  row_key: thisRowKey
1002 997
                 }
1003
-                item.children.push(child);
998
+                item.children.push(child)
1004 999
               }
1005
-              this.$set(item, 'children', item.children);
1000
+              this.$set(item, 'children', item.children)
1006 1001
             }
1007 1002
 
1008
-            this.selectedTemp.list.unshift(item);
1009
-
1003
+            this.selectedTemp.list.unshift(item)
1010 1004
           }
1011 1005
         }
1012
-
1013 1006
       },
1014 1007
       newAddTempForm() {
1015 1008
         this.allSelectedTemplate = []
1016
-        var thisRowKey = 0;
1009
+        var thisRowKey = 0
1017 1010
         for (const indexs in this.adviceTemplateMaps) {
1018
-          let adviceTemplate = this.adviceTemplateMaps[indexs]
1011
+          const adviceTemplate = this.adviceTemplateMaps[indexs]
1019 1012
           for (const index in adviceTemplate.DoctorAdviceTemplate) {
1020 1013
             if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
1021
-              thisRowKey++;
1014
+              thisRowKey++
1022 1015
               var item = {
1023 1016
                 advice_name: adviceTemplate.DoctorAdviceTemplate[index].advice_name,
1024 1017
                 advice_desc: adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
@@ -1036,10 +1029,10 @@
1036 1029
                 id: 0,
1037 1030
                 children: [],
1038 1031
                 parent_row: 0,
1039
-                row_key: thisRowKey,
1032
+                row_key: thisRowKey
1040 1033
               }
1041 1034
               if ('children' in adviceTemplate.DoctorAdviceTemplate[index] && adviceTemplate.DoctorAdviceTemplate[index].children.length > 0) {
1042
-                var parentRow = thisRowKey;
1035
+                var parentRow = thisRowKey
1043 1036
                 var children = adviceTemplate.DoctorAdviceTemplate[index].children
1044 1037
                 for (const key in children) {
1045 1038
                   thisRowKey++
@@ -1059,36 +1052,34 @@
1059 1052
                     id: 0,
1060 1053
                     children: [],
1061 1054
                     parent_row: parentRow,
1062
-                    row_key: thisRowKey,
1055
+                    row_key: thisRowKey
1063 1056
                   }
1064
-                  item.children.push(child);
1057
+                  item.children.push(child)
1065 1058
                   this.allSelectedTemplate.unshift(child)
1066
-
1067 1059
                 }
1068
-                this.$set(item, 'children', item.children);
1060
+                this.$set(item, 'children', item.children)
1069 1061
               }
1070
-              this.allSelectedTemplate.unshift(item);
1062
+              this.allSelectedTemplate.unshift(item)
1071 1063
               adviceTemplate.DoctorAdviceTemplate[index].selection = false
1072 1064
             }
1073 1065
           }
1074 1066
         }
1075 1067
 
1076
-
1077
-        var childMap = {};
1068
+        var childMap = {}
1078 1069
         for (const index in this.allSelectedTemplate) {
1079 1070
           if (this.allSelectedTemplate[index].parent_row > 0) {
1080 1071
             if (!(this.allSelectedTemplate[index].parent_row in childMap)) {
1081
-              childMap[this.allSelectedTemplate[index].parent_row] = [];
1072
+              childMap[this.allSelectedTemplate[index].parent_row] = []
1082 1073
             }
1083
-            childMap[this.allSelectedTemplate[index].parent_row].push(this.allSelectedTemplate[index]);
1074
+            childMap[this.allSelectedTemplate[index].parent_row].push(this.allSelectedTemplate[index])
1084 1075
           }
1085 1076
         }
1086 1077
 
1087 1078
         for (const index in this.allSelectedTemplate) {
1088 1079
           if (this.allSelectedTemplate[index].parent_row > 0) {
1089
-            continue;
1080
+            continue
1090 1081
           }
1091
-          this.editRowKey++;
1082
+          this.editRowKey++
1092 1083
           var item = {
1093 1084
             advice_name: this.allSelectedTemplate[index].advice_name,
1094 1085
             advice_desc: this.allSelectedTemplate[index].advice_desc,
@@ -1104,14 +1095,13 @@
1104 1095
             id: 0,
1105 1096
             children: [],
1106 1097
             parent_row: 0,
1107
-            row_key: this.editRowKey,
1098
+            row_key: this.editRowKey
1108 1099
           }
1109 1100
 
1110 1101
           if (this.allSelectedTemplate[index].children.length > 0) {
1111 1102
             if (this.allSelectedTemplate[index].row_key in childMap) {
1112
-
1113
-              var parentRow = this.editRowKey;
1114
-              var children = childMap[this.allSelectedTemplate[index].row_key];
1103
+              var parentRow = this.editRowKey
1104
+              var children = childMap[this.allSelectedTemplate[index].row_key]
1115 1105
               for (const key in children) {
1116 1106
                 this.editRowKey++
1117 1107
                 var child = {
@@ -1129,27 +1119,26 @@
1129 1119
                   id: 0,
1130 1120
                   children: [],
1131 1121
                   parent_row: parentRow,
1132
-                  row_key: this.editRowKey,
1122
+                  row_key: this.editRowKey
1133 1123
                 }
1134
-                item.children.push(child);
1124
+                item.children.push(child)
1135 1125
               }
1136
-              this.$set(item, 'children', item.children);
1126
+              this.$set(item, 'children', item.children)
1137 1127
             }
1138 1128
           }
1139 1129
 
1140
-          this.groupForm.adviceNames.push(item);
1130
+          this.groupForm.adviceNames.push(item)
1141 1131
         }
1142
-        this.templateFormVisible = false;
1132
+        this.templateFormVisible = false
1143 1133
       },
1144 1134
       addTempForm(formName) {
1145
-        var _this = this;
1135
+        var _this = this
1146 1136
         this.$refs[formName].validate((valid) => {
1147 1137
           if (valid) {
1148
-
1149 1138
             if (_this.templateForm.id in _this.adviceTemplateMaps) {
1150
-              var mapid = _this.templateForm.id;
1139
+              var mapid = _this.templateForm.id
1151 1140
               for (const index in _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate) {
1152
-                this.editRowKey++;
1141
+                this.editRowKey++
1153 1142
                 var item = {
1154 1143
                   advice_name: _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_name,
1155 1144
                   advice_desc: _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].advice_desc,
@@ -1165,10 +1154,10 @@
1165 1154
                   id: 0,
1166 1155
                   children: [],
1167 1156
                   parent_row: 0,
1168
-                  row_key: this.editRowKey,
1157
+                  row_key: this.editRowKey
1169 1158
                 }
1170 1159
                 if ('children' in _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index] && _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].children) {
1171
-                  var parentRow = this.editRowKey;
1160
+                  var parentRow = this.editRowKey
1172 1161
                   var children = _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].children
1173 1162
                   for (const key in children) {
1174 1163
                     this.editRowKey++
@@ -1187,63 +1176,60 @@
1187 1176
                       id: 0,
1188 1177
                       children: [],
1189 1178
                       parent_row: parentRow,
1190
-                      row_key: this.editRowKey,
1179
+                      row_key: this.editRowKey
1191 1180
                     }
1192
-                    item.children.push(child);
1181
+                    item.children.push(child)
1193 1182
                   }
1194
-                  _this.$set(item, 'children', item.children);
1183
+                  _this.$set(item, 'children', item.children)
1195 1184
                 }
1196 1185
 
1197
-                _this.groupForm.adviceNames.unshift(item);
1198
-
1186
+                _this.groupForm.adviceNames.unshift(item)
1199 1187
               }
1200 1188
             }
1201
-            _this.templateFormVisible = false;
1189
+            _this.templateFormVisible = false
1202 1190
           }
1203
-
1204
-        });
1205
-
1191
+        })
1206 1192
       },
1207 1193
       openAdviceTemplate() {
1208
-        this.templateForm = {id: ''};
1209
-        this.selectedTemp = {'id': 0, name: '', org_id: 0, 'list': [], 'rows': []};
1210
-        this.selectedTemplate = [];
1211
-        if (typeof (this.$refs.templatetable) != 'undefined') {
1212
-          this.$refs.templatetable.setCurrentRow(null);
1194
+        this.templateForm = { id: '' }
1195
+        this.selectedTemp = { 'id': 0, name: '', org_id: 0, 'list': [], 'rows': [] }
1196
+        this.selectedTemplate = []
1197
+        if (typeof (this.$refs.templatetable) !== 'undefined') {
1198
+          this.$refs.templatetable.setCurrentRow(null)
1213 1199
         }
1214
-        this.templateFormVisible = true;
1200
+        this.templateFormVisible = true
1215 1201
       },
1216 1202
       selectGroupAdvice(row) {
1217
-        this.groupSelectRow = row;
1203
+        this.groupSelectRow = row
1218 1204
       },
1219
-      groupClassName({row, rowIndex}) {
1220
-        row.index = rowIndex;
1205
+      groupClassName({ row, rowIndex }) {
1206
+        row.index = rowIndex
1221 1207
       },
1222 1208
       getRowKey(row) {
1223
-        return row.row_key;
1209
+        return row.row_key
1224 1210
       },
1225 1211
       resetForm(formName) {
1226
-        this.$refs[formName].resetFields();
1212
+        this.$refs[formName].resetFields()
1227 1213
       },
1228 1214
       open() {
1229
-        this.groupAddFormVisible = true;
1230
-        this.groupSelectRow = null;
1231
-        if (typeof (this.$refs.advicenametable) != 'undefined') {
1232
-          this.$refs.advicenametable.setCurrentRow(null);
1215
+        this.groupAddFormVisible = true
1216
+        this.groupSelectRow = null
1217
+        if (typeof (this.$refs.advicenametable) !== 'undefined') {
1218
+          this.$refs.advicenametable.setCurrentRow(null)
1233 1219
         }
1234
-        this.editRowKey = 0;
1220
+        this.editRowKey = 0
1235 1221
         this.groupForm = {
1236 1222
           advice_type: 2,
1237 1223
           advice_date: this.recordDate,
1238
-          start_time: "",
1224
+          start_time: '',
1239 1225
           adviceNames: [],
1240
-          advice_doctor: "",
1241
-          remark: "",
1242
-          parent_id: 0,
1226
+          advice_doctor: '',
1227
+          remark: '',
1228
+          parent_id: 0
1243 1229
         }
1244
-        var xtuser = this.$store.getters.xt_user;
1230
+        var xtuser = this.$store.getters.xt_user
1245 1231
         // this.orgname = xtuser.org.org_name;
1246
-        this.adminusername = xtuser.user.user_name;
1232
+        this.adminusername = xtuser.user.user_name
1247 1233
       }, selectAllTemplateAdvice(selection) {
1248 1234
         var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id].DoctorAdviceTemplate
1249 1235
         for (let y = 0; y < adviceArray.length; y++) {
@@ -1261,7 +1247,7 @@
1261 1247
       }, cancleDialog() {
1262 1248
         this.templateFormVisible = false
1263 1249
         for (const indexs in this.adviceTemplateMaps) {
1264
-          let adviceTemplate = this.adviceTemplateMaps[indexs]
1250
+          const adviceTemplate = this.adviceTemplateMaps[indexs]
1265 1251
           for (const index in adviceTemplate.DoctorAdviceTemplate) {
1266 1252
             adviceTemplate.DoctorAdviceTemplate[index].selection = false
1267 1253
           }
@@ -1269,10 +1255,10 @@
1269 1255
       }
1270 1256
     },
1271 1257
     watch: {
1272
-      'selectedTemp.list': function () {
1273
-        this.calcselectedTemp();
1274
-      },
1275
-    },
1258
+      'selectedTemp.list': function() {
1259
+        this.calcselectedTemp()
1260
+      }
1261
+    }
1276 1262
 
1277 1263
   }
1278 1264
 </script>

文件差异内容过多而无法显示
+ 430 - 449
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue


+ 80 - 80
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue 查看文件

@@ -208,16 +208,16 @@
208 208
 
209 209
 <script>
210 210
   import multiSelectBox from './MultiSelectBox'
211
-  import {getDataConfig} from '@/utils/data'
212
-  import {postAssessmentBeforeDislysis} from "@/api/dialysis"
211
+  import { getDataConfig } from '@/utils/data'
212
+  import { postAssessmentBeforeDislysis } from '@/api/dialysis'
213 213
 
214
-  import {uParseTime} from "@/utils/tools";
214
+  import { uParseTime } from '@/utils/tools'
215 215
 
216
-  export default {
216
+export default {
217 217
     components: {
218
-      multiSelectBox,
218
+      multiSelectBox
219 219
     },
220
-    name: "assessment-after-dislysis-dialog",
220
+    name: 'assessment-after-dislysis-dialog',
221 221
     data() {
222 222
       return {
223 223
         isVisibility: false,
@@ -241,7 +241,7 @@
241 241
           weight_before: '',
242 242
           additional_weight: '',
243 243
           temperature: '',
244
-          dry_weight:'',
244
+          dry_weight: '',
245 245
           systolic_blood_pressure: '',
246 246
           diastolic_blood_pressure: '',
247 247
           symptom_before_dialysis: '',
@@ -255,8 +255,8 @@
255 255
           blood_access_part_opera_id: '',
256 256
           internal_fistula: '',
257 257
           is_hemorrhage: '',
258
-          hemorrhage: "",
259
-          hemorrhage_other: "",
258
+          hemorrhage: '',
259
+          hemorrhage_other: ''
260 260
         },
261 261
         // InnerDialogProps: {
262 262
         //   checkedCities: [],
@@ -274,38 +274,37 @@
274 274
           isShowTextArea: true,
275 275
           customContent: '',
276 276
           titles: '',
277
-          type: '', //不同弹框类型,用来匹配数据
278
-        },
279
-
277
+          type: '' // 不同弹框类型,用来匹配数据
278
+        }
280 279
 
281
-      };
282
-    },
280
+      }
281
+  },
283 282
     props: {
284 283
 
285 284
       predialysis_evaluation: { // 透前评估
286 285
         type: Object,
287 286
         default: () => {
288
-          return {id: 0}
287
+          return { id: 0 }
289 288
         }
290 289
       },
291 290
       patient: { // 患者信息
292 291
         type: Object,
293 292
         default: () => {
294
-          return {id: 0}
293
+          return { id: 0 }
295 294
         }
296
-      },
295
+      }
297 296
     },
298 297
     methods: {
299 298
       show() {
300
-        this.isVisibility = true;
299
+        this.isVisibility = true
301 300
       },
302 301
       hide() {
303
-        this.isVisibility = false;
302
+        this.isVisibility = false
304 303
       },
305
-      showInnerDialog: function (val) {
304
+      showInnerDialog: function(val) {
306 305
         this.InnerDialogProps.visibility = true
307 306
         switch (val) {
308
-          case '1': //前次透析后
307
+          case '1': // 前次透析后
309 308
 
310 309
             this.InnerDialogProps.values = this.last_dialysis_after
311 310
             this.InnerDialogProps.titles = '前次透析后'
@@ -314,7 +313,7 @@
314 313
             this.InnerDialogProps.isShowTextArea = true
315 314
 
316 315
             break
317
-          case '2': //透析期间
316
+          case '2': // 透析期间
318 317
 
319 318
             this.InnerDialogProps.values = this.dialysis_interphase
320 319
             this.InnerDialogProps.titles = '透析期间'
@@ -323,9 +322,8 @@
323 322
             this.InnerDialogProps.isShowTextArea = true
324 323
             break
325 324
 
326
-
327 325
             break
328
-          case '3': //透析前症状
326
+          case '3': // 透析前症状
329 327
 
330 328
             this.InnerDialogProps.values = this.symptom_before_dialysis
331 329
             this.InnerDialogProps.titles = '透析期间'
@@ -334,8 +332,7 @@
334 332
             this.InnerDialogProps.isShowTextArea = true
335 333
             break
336 334
 
337
-
338
-          case '4': //导管
335
+          case '4': // 导管
339 336
 
340 337
             this.InnerDialogProps.values = this.catheter
341 338
             this.InnerDialogProps.titles = '导管'
@@ -344,9 +341,8 @@
344 341
             this.InnerDialogProps.isShowTextArea = true
345 342
             break
346 343
 
347
-
348 344
             break
349
-          case '5': //并发症
345
+          case '5': // 并发症
350 346
 
351 347
             this.InnerDialogProps.values = this.complication
352 348
             this.InnerDialogProps.titles = '并发症'
@@ -354,10 +350,9 @@
354 350
             this.InnerDialogProps.selected = this.assessmentBeforeDislysis.complication
355 351
             this.InnerDialogProps.isShowTextArea = true
356 352
 
357
-
358 353
             break
359 354
 
360
-          case '6': //出血选项
355
+          case '6': // 出血选项
361 356
 
362 357
             this.InnerDialogProps.values = this.hemorrhage
363 358
             this.InnerDialogProps.titles = '出血选项'
@@ -365,9 +360,8 @@
365 360
             this.InnerDialogProps.selected = this.assessmentBeforeDislysis.hemorrhage
366 361
             this.InnerDialogProps.isShowTextArea = false
367 362
 
368
-
369 363
             break
370
-          case '7': //内瘘
364
+          case '7': // 内瘘
371 365
 
372 366
             this.InnerDialogProps.values = this.internal_fistula
373 367
             this.InnerDialogProps.titles = '内瘘'
@@ -375,9 +369,8 @@
375 369
             this.InnerDialogProps.selected = this.assessmentBeforeDislysis.internal_fistula
376 370
             this.InnerDialogProps.isShowTextArea = false
377 371
 
378
-
379 372
             break
380
-          case '8': //内瘘皮肤情况
373
+          case '8': // 内瘘皮肤情况
381 374
             this.InnerDialogProps.values = this.internal_fistula_skin
382 375
             this.InnerDialogProps.titles = '内瘘皮肤情况'
383 376
             this.InnerDialogProps.type = 'internal_fistula_skin'
@@ -385,10 +378,8 @@
385 378
             this.InnerDialogProps.isShowTextArea = false
386 379
 
387 380
             break
388
-
389 381
         }
390
-
391
-      }, innerDialogComfirm: function (val) {
382
+      }, innerDialogComfirm: function(val) {
392 383
         this.InnerDialogProps.visibility = false
393 384
         switch (val.type) {
394 385
           case 'last_dialysis_after':
@@ -419,43 +410,38 @@
419 410
           case 'internal_fistula_skin':
420 411
             this.assessmentBeforeDislysis.internal_fistula_skin = val.value.join(',')
421 412
             break
422
-
423 413
         }
424
-
425
-
426
-      }, innerDialogCancle: function () {
414
+      }, innerDialogCancle: function() {
427 415
         this.InnerDialogProps.visibility = false
428
-      }, handleComfirm: function () {
429
-        let ParamsQuery = this.assessmentBeforeDislysis;
430
-        ParamsQuery["patient"] = this.patient.id;
431
-        ParamsQuery["record_date"] = this.record_date;
416
+      }, handleComfirm: function() {
417
+        const ParamsQuery = this.assessmentBeforeDislysis
418
+        ParamsQuery['patient'] = this.patient.id
419
+        ParamsQuery['record_date'] = this.record_date
432 420
         postAssessmentBeforeDislysis(ParamsQuery).then(response => {
433 421
           if (response.data.state == 0) {
434
-            this.$message.error(response.data.msg);
435
-            return false;
422
+            this.$message.error(response.data.msg)
423
+            return false
436 424
           } else {
437 425
             this.$notify({
438
-              title: "成功",
439
-              message: "提交成功",
440
-              type: "success",
426
+              title: '成功',
427
+              message: '提交成功',
428
+              type: 'success',
441 429
               duration: 2000
442
-            });
430
+            })
443 431
 
444
-            let assessment_before_dislysis_resp = response.data.data.assessmentBeforeDislysis;
445
-            //prop
446
-            var predialysis_evaluation = this.predialysis_evaluation;
432
+            const assessment_before_dislysis_resp = response.data.data.assessmentBeforeDislysis
433
+            // prop
434
+            var predialysis_evaluation = this.predialysis_evaluation
447 435
             for (var index in assessment_before_dislysis_resp) {
448 436
               // predialysis_evaluation[index] = assessment_before_dislysis_resp[index];
449 437
               this.$set(predialysis_evaluation, index, assessment_before_dislysis_resp[index])
450 438
             }
451 439
             this.hide()
452 440
           }
453
-        });
454
-
455
-      }, handleCancle: function () {
441
+        })
442
+      }, handleCancle: function() {
456 443
         this.isVisibility = false
457
-
458
-      },
444
+      }
459 445
 
460 446
     },
461 447
     created() {
@@ -469,47 +455,61 @@
469 455
       this.blood_access_part = getDataConfig('hemodialysis', 'vascular_access')
470 456
       this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
471 457
       this.internal_fistula_skin = getDataConfig('hemodialysis', 'internal_fistula_skin')
472
-      var date = this.$route.query && this.$route.query.date;
473
-      this.record_date = uParseTime(date, '{y}-{m}-{d}');
474
-
475
-    }, watch: {
458
+      var date = this.$route.query && this.$route.query.date
459
+      this.record_date = uParseTime(date, '{y}-{m}-{d}')
460
+  }, watch: {
476 461
       isVisibility(val) {
477 462
 
478 463
       },
479
-      "predialysis_evaluation.id": function () {
464
+      'predialysis_evaluation.id': function() {
480 465
         if (this.predialysis_evaluation.id > 0) {
481 466
           for (var index in this.assessmentBeforeDislysis) {
482
-            this.assessmentBeforeDislysis[index] = this.predialysis_evaluation[index];
483
-
467
+            this.assessmentBeforeDislysis[index] = this.predialysis_evaluation[index]
484 468
           }
485 469
           // this.assessmentBeforeDislysis['catheter_bend'] = this.predialysis_evaluation['catheter_bend'].toString()
486 470
           // this.assessmentBeforeDislysis['is_hemorrhage'] = this.predialysis_evaluation['is_hemorrhage'].toString()
487
-          if(this.predialysis_evaluation['catheter_bend'] == 0){
471
+          if (this.predialysis_evaluation['catheter_bend'] == 0) {
488 472
             this.assessmentBeforeDislysis['catheter_bend'] = ''
489
-          }else{
490
-            this.assessmentBeforeDislysis['catheter_bend']  = this.predialysis_evaluation['catheter_bend']+''
491
-
492
-
473
+          } else {
474
+            this.assessmentBeforeDislysis['catheter_bend'] = this.predialysis_evaluation['catheter_bend'] + ''
493 475
           }
494
-          if(this.predialysis_evaluation['is_hemorrhage'] == 0){
476
+          if (this.predialysis_evaluation['is_hemorrhage'] == 0) {
495 477
             this.assessmentBeforeDislysis['is_hemorrhage'] = ''
496
-          }else{
497
-
498
-            this.assessmentBeforeDislysis['is_hemorrhage']  = this.predialysis_evaluation['is_hemorrhage']+''
499
-
478
+          } else {
479
+            this.assessmentBeforeDislysis['is_hemorrhage'] = this.predialysis_evaluation['is_hemorrhage'] + ''
500 480
           }
501
-          if(this.predialysis_evaluation['blood_access_part_id'] == 0){
481
+          if (this.predialysis_evaluation['blood_access_part_id'] == 0) {
502 482
             this.assessmentBeforeDislysis['blood_access_part_id'] = ''
503 483
           }
504
-          if(this.predialysis_evaluation['blood_access_part_opera_id'] == 0){
484
+          if (this.predialysis_evaluation['blood_access_part_opera_id'] == 0) {
505 485
             this.assessmentBeforeDislysis['blood_access_part_opera_id'] = ''
506 486
           }
487
+          if (this.predialysis_evaluation['weight_before'] == 0) {
488
+            this.assessmentBeforeDislysis['weight_before'] = ''
489
+          }
490
+          if (this.predialysis_evaluation['dry_weight'] == 0) {
491
+            this.assessmentBeforeDislysis['dry_weight'] = ''
492
+          }
493
+          if (this.predialysis_evaluation['temperature'] == 0) {
494
+            this.assessmentBeforeDislysis['temperature'] = ''
495
+          }
496
+          if (this.predialysis_evaluation['systolic_blood_pressure'] == 0) {
497
+            this.assessmentBeforeDislysis['systolic_blood_pressure'] = ''
498
+          }
499
+          if (this.predialysis_evaluation['diastolic_blood_pressure'] == 0) {
500
+            this.assessmentBeforeDislysis['diastolic_blood_pressure'] = ''
501
+          }
502
+          if (this.predialysis_evaluation['pulse_frequency'] == 0) {
503
+            this.assessmentBeforeDislysis['pulse_frequency'] = ''
504
+          }
505
+          if (this.predialysis_evaluation['pulse_frequency'] == 0) {
506
+            this.assessmentBeforeDislysis['pulse_frequency'] = ''
507
+          }
507 508
         }
508
-      },
509
+      }
509 510
     }
510 511
   }
511 512
 
512
-
513 513
 </script>
514 514
 
515 515
 <style scoped>

+ 262 - 119
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

@@ -256,47 +256,45 @@
256 256
 </template>
257 257
 
258 258
 <script>
259
+  import { postPrescription, postSoulution } from '@/api/dialysis'
260
+import { getDataConfig } from '@/utils/data'
261
+  import { uParseTime } from '@/utils/tools'
259 262
 
260
-  import {postPrescription, postSoulution} from "@/api/dialysis";
261
-  import {getDataConfig} from '@/utils/data'
262
-  import {uParseTime} from "@/utils/tools";
263
-
264
-
265
-  export default {
266
-    name: "dialysisPrescriptionDialog",
263
+export default {
264
+    name: 'dialysisPrescriptionDialog',
267 265
     props: {
268 266
 
269 267
       prescription: { // 透析处方
270 268
         type: Object,
271 269
         default: () => {
272
-          return {id: 0}
270
+          return { id: 0 }
273 271
         }
274 272
       },
275 273
 
276 274
       solution: { // 长期处方
277 275
         type: Object,
278 276
         default: () => {
279
-          return {id: 0}
277
+          return { id: 0 }
280 278
         }
281 279
       },
282 280
 
283 281
       dialysis_order: { // 透析记录
284 282
         type: Object,
285 283
         default: () => {
286
-          return {id: 0}
284
+          return { id: 0 }
287 285
         }
288 286
       },
289 287
       patient: { // 患者信息
290 288
         type: Object,
291 289
         default: () => {
292
-          return {id: 0}
290
+          return { id: 0 }
293 291
         }
294 292
       },
295 293
 
296 294
       devices: {
297 295
         type: Array,
298
-        default: function () {
299
-          return new Array();
296
+        default: function() {
297
+          return new Array()
300 298
         }
301 299
       }
302 300
 
@@ -316,136 +314,132 @@
316 314
         dialysate_formulation_options: [],
317 315
 
318 316
         dialysisPrescription: {
319
-          replacement_total: "",
320
-          mode_id: "",
321
-          dialysis_duration: "",
322
-          dialysis_duration_hour: "",
323
-          dialysis_duration_minute: "",
324
-          mode_name: "",
325
-          dialyzer: "",
326
-          perfusion_apparatus: "",
327
-          blood_flow_volume: "",
328
-          dewater_amount: "",
329
-          displace_liqui: "",
330
-          replacement_way: "",
331
-          anticoagulant: "",
332
-          anticoagulant_shouji: "",
333
-          anticoagulant_weichi: "",
334
-          anticoagulant_zongliang: "",
335
-          anticoagulant_gaimingcheng: "",
336
-          anticoagulant_gaijiliang: "",
337
-          kalium: "",
338
-          sodium: "",
339
-          calcium: "",
340
-          bicarbonate: "",
341
-          glucose: "",
342
-          dry_weight: "",
343
-          dialysate_flow: "",
344
-          dialysate_temperature: "",
345
-          target_ultrafiltration: "",
346
-          dialysate_formulation: "",
347
-          conductivity: "",
348
-          doctor: "",
349
-          remark: "",
350
-          dialyzer_perfusion_apparatus:"",
317
+          replacement_total: '',
318
+          mode_id: '',
319
+          dialysis_duration: '',
320
+          dialysis_duration_hour: '',
321
+          dialysis_duration_minute: '',
322
+          mode_name: '',
323
+          dialyzer: '',
324
+          perfusion_apparatus: '',
325
+          blood_flow_volume: '',
326
+          dewater_amount: '',
327
+          displace_liqui: '',
328
+          replacement_way: '',
329
+          anticoagulant: '',
330
+          anticoagulant_shouji: '',
331
+          anticoagulant_weichi: '',
332
+          anticoagulant_zongliang: '',
333
+          anticoagulant_gaimingcheng: '',
334
+          anticoagulant_gaijiliang: '',
335
+          kalium: '',
336
+          sodium: '',
337
+          calcium: '',
338
+          bicarbonate: '',
339
+          glucose: '',
340
+          dry_weight: '',
341
+          dialysate_flow: '',
342
+          dialysate_temperature: '',
343
+          target_ultrafiltration: '',
344
+          dialysate_formulation: '',
345
+          conductivity: '',
346
+          doctor: '',
347
+          remark: '',
348
+          dialyzer_perfusion_apparatus: ''
351 349
         },
352 350
 
353 351
         anticoagulant: {
354 352
           id: 0,
355
-          name: "",
353
+          name: '',
356 354
           type: 1,
357 355
           shouji: 1,
358 356
           weichi: 1,
359 357
           zongliang: 1,
360 358
           gaimingcheng: -1,
361 359
           gaijiliang: -1,
362
-          shouji_unit: "mg",
363
-          weichi_unit: "mg/h",
364
-          zongliang_unit: "mg",
365
-          gaimingcheng_unit: "",
366
-          gaijiliang_unit: ""
360
+          shouji_unit: 'mg',
361
+          weichi_unit: 'mg/h',
362
+          zongliang_unit: 'mg',
363
+          gaimingcheng_unit: '',
364
+          gaijiliang_unit: ''
367 365
         }
368 366
 
369 367
       }
370 368
     },
371 369
     methods: {
372 370
       show() {
373
-        this.isVisibility = true;
371
+        this.isVisibility = true
374 372
       },
375 373
       hide() {
376
-        this.isVisibility = false;
374
+        this.isVisibility = false
377 375
       },
378
-      changeThisAnticoagulant: function (val) {
379
-        var thismode = parseInt(val);
376
+      changeThisAnticoagulant: function(val) {
377
+        var thismode = parseInt(val)
380 378
         if (isNaN(thismode) || thismode <= 0) {
381
-          return false;
379
+          return false
382 380
         }
383
-        if (typeof(this.anticoagulantsConfit[thismode]) == 'undefined' || this.anticoagulantsConfit[thismode] == null) {
384
-          return false;
381
+        if (typeof (this.anticoagulantsConfit[thismode]) === 'undefined' || this.anticoagulantsConfit[thismode] == null) {
382
+          return false
385 383
         }
386
-        this.anticoagulant = this.anticoagulantsConfit[thismode];
387
-
388
-      }, handleCommit: function () {
384
+        this.anticoagulant = this.anticoagulantsConfit[thismode]
385
+      }, handleCommit: function() {
389 386
         if (this.patient.id <= 0) {
390
-          this.$message.error("没有选择患者")
387
+          this.$message.error('没有选择患者')
391 388
           this.loading = false
392 389
           return
393 390
         }
394 391
 
395
-        let ParamsQuery = this.dialysisPrescription;
396
-        ParamsQuery["patient"] = this.patient.id;
397
-        ParamsQuery["record_date"] = this.record_date;
392
+        const ParamsQuery = this.dialysisPrescription
393
+        ParamsQuery['patient'] = this.patient.id
394
+        ParamsQuery['record_date'] = this.record_date
398 395
 
399 396
         postPrescription(ParamsQuery).then(response => {
400 397
           if (response.data.state == 0) {
401
-            this.$message.error(response.data.msg);
402
-            return false;
398
+            this.$message.error(response.data.msg)
399
+            return false
403 400
           } else {
404 401
             this.$notify({
405
-              title: "成功",
406
-              message: "提交成功",
407
-              type: "success",
402
+              title: '成功',
403
+              message: '提交成功',
404
+              type: 'success',
408 405
               duration: 2000
409
-            });
406
+            })
410 407
 
411
-            let prescription_resp = response.data.data.prescription;
412
-            var prescription = this.prescription;
408
+            const prescription_resp = response.data.data.prescription
409
+            var prescription = this.prescription
413 410
             for (var index in prescription_resp) {
414 411
               // prescription[index] = prescription_resp[index];
415 412
               this.$set(prescription, index, prescription_resp[index])
416 413
             }
417 414
             this.hide()
418 415
           }
419
-        });
420
-
421
-
422
-      }, handleCancle: function () {
416
+        })
417
+      }, handleCancle: function() {
423 418
         this.hide()
424
-
425
-      }, handleSolution: function () {
419
+      }, handleSolution: function() {
426 420
         if (this.patient.id <= 0) {
427
-          this.$message.error("没有选择患者")
421
+          this.$message.error('没有选择患者')
428 422
           this.loading = false
429 423
           return
430 424
         }
431
-        let ParamsQuery = this.dialysisPrescription;
432
-        ParamsQuery["patient"] = this.patient.id;
433
-        ParamsQuery["record_date"] = this.record_date;
425
+        const ParamsQuery = this.dialysisPrescription
426
+        ParamsQuery['patient'] = this.patient.id
427
+        ParamsQuery['record_date'] = this.record_date
434 428
         postSoulution(ParamsQuery).then(response => {
435 429
           if (response.data.state == 0) {
436
-            this.$message.error(response.data.msg);
437
-            return false;
430
+            this.$message.error(response.data.msg)
431
+            return false
438 432
           } else {
439 433
             this.$notify({
440
-              title: "成功",
441
-              message: "提交成功",
442
-              type: "success",
434
+              title: '成功',
435
+              message: '提交成功',
436
+              type: 'success',
443 437
               duration: 2000
444
-            });
445
-            let prescription_resp = response.data.data.prescription;
446
-            let solution_resp = response.data.data.solution;
447
-            var prescription = this.prescription;
448
-            var solution = this.solution;
438
+            })
439
+            const prescription_resp = response.data.data.prescription
440
+            const solution_resp = response.data.data.solution
441
+            var prescription = this.prescription
442
+            var solution = this.solution
449 443
             for (var index in prescription_resp) {
450 444
               // prescription[index] = prescription_resp[index];
451 445
               this.$set(prescription, index, prescription_resp[index])
@@ -457,34 +451,33 @@
457 451
 
458 452
             this.hide()
459 453
           }
460
-        });
454
+        })
461 455
       }
462 456
     },
463 457
     created() {
464
-
465 458
       this.treatment_mode = this.$store.getters.treatment_mode
466 459
       this.perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
467 460
       this.replacement_ways = getDataConfig('hemodialysis', 'replacement_ways')
468
-      this.dialysate_formulation_options = getDataConfig("hemodialysis", "dialysate_formulation")
461
+      this.dialysate_formulation_options = getDataConfig('hemodialysis', 'dialysate_formulation')
469 462
       this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
470 463
       this.dialysisList = this.devices
471 464
 
472
-      var date = this.$route.query && this.$route.query.date;
473
-      this.record_date = uParseTime(date, '{y}-{m}-{d}');
474
-    },
465
+      var date = this.$route.query && this.$route.query.date
466
+      this.record_date = uParseTime(date, '{y}-{m}-{d}')
467
+  },
475 468
     watch: {
476 469
       isVisibility(val) {
477 470
 
478 471
       },
479
-      "prescription.id": function () {
472
+      'prescription.id': function() {
480 473
         if (this.prescription.id > 0) {
481 474
           for (var index in this.dialysisPrescription) {
482
-            this.dialysisPrescription[index] = this.prescription[index];
475
+            this.dialysisPrescription[index] = this.prescription[index]
483 476
           }
484 477
 
485 478
           // console.log(this.prescription['dialysate_formulation'])
486 479
 
487
-          if(this.prescription['dialysate_formulation'] == 0){
480
+          if (this.prescription['dialysate_formulation'] == 0) {
488 481
             this.dialysisPrescription['dialysate_formulation'] = ''
489 482
           }
490 483
 
@@ -494,23 +487,74 @@
494 487
           // }
495 488
           //
496 489
           //
497
-          if(this.prescription['anticoagulant'] == 0){
490
+          if (this.prescription['anticoagulant'] == 0) {
498 491
             this.dialysisPrescription['anticoagulant'] = ''
499 492
           }
500 493
           // else{
501 494
           //   this.dialysisPrescription['anticoagulant']  = this.prescription['anticoagulant']
502 495
           //
503 496
           // }
504
-
497
+  
498
+          if (this.prescription['dialysis_duration_hour'] == 0) {
499
+            this.dialysisPrescription['dialysis_duration_hour'] = ''
500
+          }
501
+          if (this.prescription['dialysis_duration_minute'] == 0) {
502
+            this.dialysisPrescription['dialysis_duration_minute'] = ''
503
+          }
504
+          if (this.prescription['blood_flow_volume'] == 0) {
505
+            this.dialysisPrescription['blood_flow_volume'] = ''
506
+          }
507
+          if (this.prescription['target_ultrafiltration'] == 0) {
508
+            this.dialysisPrescription['target_ultrafiltration'] = ''
509
+          }
510
+          if (this.prescription['dialysate_temperature'] == 0) {
511
+            this.dialysisPrescription['dialysate_temperature'] = ''
512
+          }
513
+          if (this.prescription['anticoagulant_shouji'] == 0) {
514
+            this.dialysisPrescription['anticoagulant_shouji'] = ''
515
+          }
516
+          if (this.prescription['anticoagulant_weichi'] == 0) {
517
+            this.dialysisPrescription['anticoagulant_weichi'] = ''
518
+          }
519
+          if (this.prescription['anticoagulant_zongliang'] == 0) {
520
+            this.dialysisPrescription['anticoagulant_zongliang'] = ''
521
+          }
522
+          if (this.prescription['anticoagulant_gaijiliang'] == 0) {
523
+            this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
524
+          }
525
+          if (this.prescription['kalium'] == 0) {
526
+            this.dialysisPrescription['kalium'] = ''
527
+          }
528
+          if (this.prescription['sodium'] == 0) {
529
+            this.dialysisPrescription['sodium'] = ''
530
+          }
531
+          if (this.prescription['calcium'] == 0) {
532
+            this.dialysisPrescription['calcium'] = ''
533
+          }
534
+          if (this.prescription['bicarbonate'] == 0) {
535
+            this.dialysisPrescription['bicarbonate'] = ''
536
+          }
537
+          if (this.prescription['glucose'] == 0) {
538
+            this.dialysisPrescription['glucose'] = ''
539
+          }
540
+          if (this.prescription['dialysate_flow'] == 0) {
541
+            this.dialysisPrescription['dialysate_flow'] = ''
542
+          }
543
+          if (this.prescription['conductivity'] == 0) {
544
+            this.dialysisPrescription['conductivity'] = ''
545
+          }
546
+          if (this.prescription['replacement_total'] == 0) {
547
+            this.dialysisPrescription['replacement_total'] = ''
548
+          }
505 549
         }
506 550
       },
507
-      "solution.id": function () {
551
+      'solution.id': function() {
508 552
         if (this.solution.id > 0) {
509
-          if (this.prescription != null && typeof(this.prescription.id) != 'undefined' && this.prescription.id > 0) {
553
+          if (this.prescription != null && typeof (this.prescription.id) !== 'undefined' && this.prescription.id > 0) {
510 554
             for (const key in this.prescription) {
511
-              this.dialysisPrescription[key] = this.prescription[key];
555
+              this.dialysisPrescription[key] = this.prescription[key]
512 556
             }
513
-            if(this.prescription['dialysate_formulation'] == 0){
557
+            if (this.prescription['dialysate_formulation'] == 0) {
514 558
               this.dialysisPrescription['dialysate_formulation'] = ''
515 559
             }
516 560
 
@@ -520,7 +564,7 @@
520 564
             // }
521 565
             //
522 566
             //
523
-            if(this.prescription['anticoagulant'] == 0){
567
+            if (this.prescription['anticoagulant'] == 0) {
524 568
               this.dialysisPrescription['anticoagulant'] = ''
525 569
             }
526 570
             //
@@ -528,13 +572,64 @@
528 572
             //   this.dialysisPrescription['anticoagulant']  = this.prescription['anticoagulant']+''
529 573
             //
530 574
             // }
531
-
532
-          } else if (this.solution != null && typeof this.solution.id != 'undefined' && this.solution.id) {
575
+  
576
+            if (this.prescription['dialysis_duration_hour'] == 0) {
577
+              this.dialysisPrescription['dialysis_duration_hour'] = ''
578
+            }
579
+            if (this.prescription['dialysis_duration_minute'] == 0) {
580
+              this.dialysisPrescription['dialysis_duration_minute'] = ''
581
+            }
582
+            if (this.prescription['blood_flow_volume'] == 0) {
583
+              this.dialysisPrescription['blood_flow_volume'] = ''
584
+            }
585
+            if (this.prescription['target_ultrafiltration'] == 0) {
586
+              this.dialysisPrescription['target_ultrafiltration'] = ''
587
+            }
588
+            if (this.prescription['dialysate_temperature'] == 0) {
589
+              this.dialysisPrescription['dialysate_temperature'] = ''
590
+            }
591
+            if (this.prescription['anticoagulant_shouji'] == 0) {
592
+              this.dialysisPrescription['anticoagulant_shouji'] = ''
593
+            }
594
+            if (this.prescription['anticoagulant_weichi'] == 0) {
595
+              this.dialysisPrescription['anticoagulant_weichi'] = ''
596
+            }
597
+            if (this.prescription['anticoagulant_zongliang'] == 0) {
598
+              this.dialysisPrescription['anticoagulant_zongliang'] = ''
599
+            }
600
+            if (this.prescription['anticoagulant_gaijiliang'] == 0) {
601
+              this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
602
+            }
603
+            if (this.prescription['kalium'] == 0) {
604
+              this.dialysisPrescription['kalium'] = ''
605
+            }
606
+            if (this.prescription['sodium'] == 0) {
607
+              this.dialysisPrescription['sodium'] = ''
608
+            }
609
+            if (this.prescription['calcium'] == 0) {
610
+              this.dialysisPrescription['calcium'] = ''
611
+            }
612
+            if (this.prescription['bicarbonate'] == 0) {
613
+              this.dialysisPrescription['bicarbonate'] = ''
614
+            }
615
+            if (this.prescription['glucose'] == 0) {
616
+              this.dialysisPrescription['glucose'] = ''
617
+            }
618
+            if (this.prescription['dialysate_flow'] == 0) {
619
+              this.dialysisPrescription['dialysate_flow'] = ''
620
+            }
621
+            if (this.prescription['conductivity'] == 0) {
622
+              this.dialysisPrescription['conductivity'] = ''
623
+            }
624
+            if (this.prescription['replacement_total'] == 0) {
625
+              this.dialysisPrescription['replacement_total'] = ''
626
+            }
627
+          } else if (this.solution != null && typeof this.solution.id !== 'undefined' && this.solution.id) {
533 628
             for (const key in this.solution) {
534
-              this.dialysisPrescription[key] = this.solution[key];
629
+              this.dialysisPrescription[key] = this.solution[key]
535 630
             }
536 631
 
537
-            if(this.solution['dialysate_formulation'] == 0){
632
+            if (this.solution['dialysate_formulation'] == 0) {
538 633
               this.dialysisPrescription['dialysate_formulation'] = ''
539 634
             }
540 635
             // else{
@@ -542,19 +637,67 @@
542 637
             //
543 638
             // }
544 639
 
545
-            if(this.solution['anticoagulant'] == 0){
640
+            if (this.solution['anticoagulant'] == 0) {
546 641
               this.dialysisPrescription['anticoagulant'] = ''
547 642
             }
548
-
549
-
550
-
643
+  
644
+            if (this.solution['dialysis_duration_hour'] == 0) {
645
+              this.dialysisPrescription['dialysis_duration_hour'] = ''
646
+            }
647
+            if (this.solution['dialysis_duration_minute'] == 0) {
648
+              this.dialysisPrescription['dialysis_duration_minute'] = ''
649
+            }
650
+            if (this.solution['blood_flow_volume'] == 0) {
651
+              this.dialysisPrescription['blood_flow_volume'] = ''
652
+            }
653
+            if (this.solution['target_ultrafiltration'] == 0) {
654
+              this.dialysisPrescription['target_ultrafiltration'] = ''
655
+            }
656
+            if (this.solution['dialysate_temperature'] == 0) {
657
+              this.dialysisPrescription['dialysate_temperature'] = ''
658
+            }
659
+            if (this.solution['anticoagulant_shouji'] == 0) {
660
+              this.dialysisPrescription['anticoagulant_shouji'] = ''
661
+            }
662
+            if (this.solution['anticoagulant_weichi'] == 0) {
663
+              this.dialysisPrescription['anticoagulant_weichi'] = ''
664
+            }
665
+            if (this.solution['anticoagulant_zongliang'] == 0) {
666
+              this.dialysisPrescription['anticoagulant_zongliang'] = ''
667
+            }
668
+            if (this.solution['anticoagulant_gaijiliang'] == 0) {
669
+              this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
670
+            }
671
+            if (this.solution['kalium'] == 0) {
672
+              this.dialysisPrescription['kalium'] = ''
673
+            }
674
+            if (this.solution['sodium'] == 0) {
675
+              this.dialysisPrescription['sodium'] = ''
676
+            }
677
+            if (this.solution['calcium'] == 0) {
678
+              this.dialysisPrescription['calcium'] = ''
679
+            }
680
+            if (this.solution['bicarbonate'] == 0) {
681
+              this.dialysisPrescription['bicarbonate'] = ''
682
+            }
683
+            if (this.solution['glucose'] == 0) {
684
+              this.dialysisPrescription['glucose'] = ''
685
+            }
686
+            if (this.solution['dialysate_flow'] == 0) {
687
+              this.dialysisPrescription['dialysate_flow'] = ''
688
+            }
689
+            if (this.solution['conductivity'] == 0) {
690
+              this.dialysisPrescription['conductivity'] = ''
691
+            }
692
+            if (this.solution['replacement_total'] == 0) {
693
+              this.dialysisPrescription['replacement_total'] = ''
694
+            }
551 695
           }
552 696
         }
553
-      },
697
+      }
554 698
     }
555 699
   }
556 700
 
557
-
558 701
 </script>
559 702
 
560 703
 <style scoped>

+ 134 - 111
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue 查看文件

@@ -17,28 +17,58 @@
17 17
           </el-table-column>
18 18
           <el-table-column align="center" label="血压(mmhg)" width="110">
19 19
             <template slot-scope="scope">
20
-              {{scope.row.systolic_blood_pressure}}/{{scope.row.diastolic_blood_pressure}}
20
+              {{scope.row.systolic_blood_pressure?scope.row.systolic_blood_pressure:''}}/{{scope.row.diastolic_blood_pressure?scope.row.diastolic_blood_pressure:''}}
21 21
             </template>
22 22
           </el-table-column>
23 23
           <el-table-column prop="pulse_frequency" align="center" width="100" label="心率(次/分)">
24
+            <template slot-scope="scope">
25
+              {{scope.row.pulse_frequency?scope.row.pulse_frequency:''}}
26
+            </template>
24 27
           </el-table-column>
25 28
           <el-table-column prop="breathing_rate" align="center" label="呼吸(次/分)" width="100">
29
+            <template slot-scope="scope">
30
+              {{scope.row.breathing_rate?scope.row.breathing_rate:''}}
31
+            </template>
26 32
           </el-table-column>
27 33
           <el-table-column prop="blood_flow_volume" align="center" label="血流量(ml/min)" width="120">
34
+            <template slot-scope="scope">
35
+              {{scope.row.blood_flow_volume?scope.row.blood_flow_volume:''}}
36
+            </template>
28 37
           </el-table-column>
29 38
           <el-table-column prop="venous_pressure" align="center" label="静脉压(mmhg)" width="120">
39
+            <template slot-scope="scope">
40
+              {{scope.row.venous_pressure?scope.row.venous_pressure:''}}
41
+            </template>
30 42
           </el-table-column>
31 43
           <el-table-column prop="transmembrane_pressure" align="center" label="跨膜压(mmhg)" width="120">
44
+            <template slot-scope="scope">
45
+              {{scope.row.transmembrane_pressure?scope.row.transmembrane_pressure:''}}
46
+            </template>
32 47
           </el-table-column>
33 48
           <el-table-column prop="ultrafiltration_volume" align="center" label="超滤量(L)" width="110">
49
+            <template slot-scope="scope">
50
+              {{scope.row.ultrafiltration_volume?scope.row.ultrafiltration_volume:''}}
51
+            </template>
34 52
           </el-table-column>
35 53
           <el-table-column prop="sodium_concentration" align="center" label="钠浓度(mmol/L)" width="126">
54
+            <template slot-scope="scope">
55
+              {{scope.row.sodium_concentration?scope.row.sodium_concentration:''}}
56
+            </template>
36 57
           </el-table-column>
37 58
           <el-table-column prop="dialysate_temperature" align="center" label="透析液温度(℃)" width="120">
59
+            <template slot-scope="scope">
60
+              {{scope.row.dialysate_temperature?scope.row.dialysate_temperature:''}}
61
+            </template>
38 62
           </el-table-column>
39 63
           <el-table-column prop="replacement_rate" align="center" label="置换率(L/h)" width="120">
64
+            <template slot-scope="scope">
65
+              {{scope.row.replacement_rate?scope.row.replacement_rate:''}}
66
+            </template>
40 67
           </el-table-column>
41 68
           <el-table-column prop="displacement_quantity" align="center" label="置换量(L)" width="100">
69
+            <template slot-scope="scope">
70
+              {{scope.row.displacement_quantity?scope.row.displacement_quantity:''}}
71
+            </template>
42 72
           </el-table-column>
43 73
           <el-table-column prop="symptom" align="center" label="病情变化" width="130">
44 74
           </el-table-column>
@@ -225,17 +255,17 @@
225 255
 </template>
226 256
 
227 257
 <script>
228
-  import {parseTime} from '@/utils'
229
-  import {getDataConfig} from "@/utils/data"
230
-  import {editMonitor,postDelMonitorInfo} from "@/api/dialysis_record"
258
+  import { parseTime } from '@/utils'
259
+  import { getDataConfig } from '@/utils/data'
260
+  import { editMonitor, postDelMonitorInfo } from '@/api/dialysis_record'
231 261
 
232 262
   export default {
233
-    name: "MonitorDialog",
263
+    name: 'MonitorDialog',
234 264
     data() {
235 265
       return {
236 266
         visible: false,
237 267
         edit: false,
238
-        current_row_class: "current-box-class",
268
+        current_row_class: 'current-box-class',
239 269
 
240 270
         patient_id: 0,
241 271
         schedule_date: 0,
@@ -248,44 +278,44 @@
248 278
           // operate_date: 0, // 实际测量日期
249 279
           // monitoring_time: "", // 监测时间 HH:mm
250 280
           operate_time: 0,
251
-          systolic_bp: "", // 收缩压
252
-          diastolic_bp: "", // 舒张压
253
-          pulse_frequency: "", // 心率
254
-          breathing_rated: "", // 呼吸频率
255
-          blood_flow_volume: "", // 血流量
256
-          venous_pressure: "", // 静脉压
257
-          transmembrane_pressure: "", // 跨膜压
258
-          ultrafiltration_volume: "", // 超滤量
259
-          ultrafiltration_rate: "", // 超滤率
260
-          arterial_pressure: "", // 动脉压
261
-          sodium_concentration: "", // 钠浓度
262
-          dialysate_temperature: "", // 透析液温度
263
-          replacement_rate: "", // 置换率
264
-          displacement_quantity: "", // 置换量
265
-          ktv: "", // KT/V
266
-          symptom: "", // 病情变化
267
-          dispose: "", // 处理
268
-          result: "", // 结果
281
+          systolic_bp: '', // 收缩压
282
+          diastolic_bp: '', // 舒张压
283
+          pulse_frequency: '', // 心率
284
+          breathing_rated: '', // 呼吸频率
285
+          blood_flow_volume: '', // 血流量
286
+          venous_pressure: '', // 静脉压
287
+          transmembrane_pressure: '', // 跨膜压
288
+          ultrafiltration_volume: '', // 超滤量
289
+          ultrafiltration_rate: '', // 超滤率
290
+          arterial_pressure: '', // 动脉压
291
+          sodium_concentration: '', // 钠浓度
292
+          dialysate_temperature: '', // 透析液温度
293
+          replacement_rate: '', // 置换率
294
+          displacement_quantity: '', // 置换量
295
+          ktv: '', // KT/V
296
+          symptom: '', // 病情变化
297
+          dispose: '', // 处理
298
+          result: '' // 结果
269 299
         },
270 300
 
271 301
         table_current_row: null,
272 302
 
273 303
         symptom_selecteds: [],
274
-        symptom_options: getDataConfig("hemodialysis", "symptoms"),
304
+        symptom_options: getDataConfig('hemodialysis', 'symptoms'),
275 305
         dispose_selecteds: [],
276
-        dispose_options: getDataConfig("hemodialysis", "deals"),
306
+        dispose_options: getDataConfig('hemodialysis', 'deals'),
277 307
         result_selecteds: [],
278
-        result_options: getDataConfig("hemodialysis", "results"),
308
+        result_options: getDataConfig('hemodialysis', 'results')
279 309
       }
280 310
     },
281 311
     props: {
282 312
       monitors: {
283
-        type: Array,
313
+        type: Array
284 314
       }
285 315
     },
286 316
     computed: {
287
-      monitor_date_str: function () {
288
-        return parseTime(this.form.monitoring_date, "{y}-{m}-{d}")
317
+      monitor_date_str: function() {
318
+        return parseTime(this.form.monitoring_date, '{y}-{m}-{d}')
289 319
       }
290 320
     },
291 321
     created() {
@@ -299,7 +329,7 @@
299 329
       this.form.operate_time = (new Date()).getTime()
300 330
     },
301 331
     methods: {
302
-      reset: function () {
332
+      reset: function() {
303 333
         this.cancelEditAction()
304 334
       },
305 335
       show() {
@@ -308,80 +338,79 @@
308 338
       hide() {
309 339
         this.visible = false
310 340
       },
311
-      getMonitorDate: function (monitor) {
312
-        return parseTime(monitor.operate_time, "{y}-{m}-{d} {h}:{i}")
341
+      getMonitorDate: function(monitor) {
342
+        return parseTime(monitor.operate_time, '{y}-{m}-{d} {h}:{i}')
313 343
       },
314 344
 
315
-      newRecordAction: function () {
345
+      newRecordAction: function() {
316 346
         this.setEditMonitor(null)
317 347
         this.$refs.table.setCurrentRow(null)
318 348
         this.edit = true
319 349
       },
320
-      modifyRecordAction: function () {
350
+      modifyRecordAction: function() {
321 351
         if (this.table_current_row == null) {
322
-          this.$message.error("请选择一条监测记录")
352
+          this.$message.error('请选择一条监测记录')
323 353
           return
324 354
         }
325 355
         this.setEditMonitor(this.table_current_row)
326 356
         this.$refs.table.setCurrentRow(null)
327 357
         this.edit = true
328 358
       },
329
-      cancelEditAction: function () {
359
+      cancelEditAction: function() {
330 360
         this.setEditMonitor(null)
331 361
         this.$refs.table.setCurrentRow(null)
332 362
         this.edit = false
333 363
       },
334
-      tableCurrentRowChange: function (currentRow) {
364
+      tableCurrentRowChange: function(currentRow) {
335 365
         this.table_current_row = currentRow
336 366
         // console.log("tableCurrentRowChange", currentRow)
337 367
       },
338
-      setEditMonitor: function (monitor) {
368
+      setEditMonitor: function(monitor) {
339 369
         if (monitor == null || monitor == undefined) {
340 370
           this.form.id = 0
341 371
           // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
342 372
           // this.form.monitoring_time = parseTime(new Date(), "{h}:{i}")
343 373
           this.form.operate_time = (new Date()).getTime()
344
-          this.form.systolic_bp = ""
345
-          this.form.diastolic_bp = ""
346
-          this.form.pulse_frequency = ""
347
-          this.form.breathing_rated = ""
348
-          this.form.blood_flow_volume = ""
349
-          this.form.venous_pressure = ""
350
-          this.form.transmembrane_pressure = ""
351
-          this.form.ultrafiltration_volume = ""
352
-          this.form.ultrafiltration_rate = ""
353
-          this.form.arterial_pressure = ""
354
-          this.form.sodium_concentration = ""
355
-          this.form.dialysate_temperature = ""
356
-          this.form.replacement_rate = ""
357
-          this.form.displacement_quantity = ""
358
-          this.form.ktv = ""
359
-          this.form.symptom = ""
360
-          this.form.dispose = ""
361
-          this.form.result = ""
374
+          this.form.systolic_bp = ''
375
+          this.form.diastolic_bp = ''
376
+          this.form.pulse_frequency = ''
377
+          this.form.breathing_rated = ''
378
+          this.form.blood_flow_volume = ''
379
+          this.form.venous_pressure = ''
380
+          this.form.transmembrane_pressure = ''
381
+          this.form.ultrafiltration_volume = ''
382
+          this.form.ultrafiltration_rate = ''
383
+          this.form.arterial_pressure = ''
384
+          this.form.sodium_concentration = ''
385
+          this.form.dialysate_temperature = ''
386
+          this.form.replacement_rate = ''
387
+          this.form.displacement_quantity = ''
388
+          this.form.ktv = ''
389
+          this.form.symptom = ''
390
+          this.form.dispose = ''
391
+          this.form.result = ''
362 392
           this.symptom_selecteds = []
363 393
           this.dispose_selecteds = []
364 394
           this.result_selecteds = []
365
-
366 395
         } else {
367 396
           this.form.id = monitor.id,
368
-            // this.form.operate_date = monitor.operate_date
369
-            // this.form.monitoring_time = monitor.monitoring_time
370
-            this.form.operate_time = monitor.operate_time * 1000
371
-          this.form.systolic_bp = monitor.systolic_blood_pressure
372
-          this.form.diastolic_bp = monitor.diastolic_blood_pressure
373
-          this.form.pulse_frequency = monitor.pulse_frequency
374
-          this.form.breathing_rated = monitor.breathing_rate
375
-          this.form.blood_flow_volume = monitor.blood_flow_volume
376
-          this.form.venous_pressure = monitor.venous_pressure
377
-          this.form.transmembrane_pressure = monitor.transmembrane_pressure
378
-          this.form.ultrafiltration_volume = monitor.ultrafiltration_volume
379
-          this.form.ultrafiltration_rate = monitor.ultrafiltration_rate
380
-          this.form.arterial_pressure = monitor.arterial_pressure
381
-          this.form.sodium_concentration = monitor.sodium_concentration
382
-          this.form.dialysate_temperature = monitor.dialysate_temperature
383
-          this.form.replacement_rate = monitor.replacement_rate
384
-          this.form.displacement_quantity = monitor.displacement_quantity
397
+          // this.form.operate_date = monitor.operate_date
398
+          // this.form.monitoring_time = monitor.monitoring_time
399
+          this.form.operate_time = monitor.operate_time * 1000
400
+          this.form.systolic_bp = monitor.systolic_blood_pressure ? monitor.systolic_blood_pressure : ''
401
+          this.form.diastolic_bp = monitor.diastolic_blood_pressure ? monitor.diastolic_blood_pressure : ''
402
+          this.form.pulse_frequency = monitor.pulse_frequency ? monitor.pulse_frequency : ''
403
+          this.form.breathing_rated = monitor.breathing_rate ? monitor.breathing_rate : ''
404
+          this.form.blood_flow_volume = monitor.blood_flow_volume ? monitor.blood_flow_volume : ''
405
+          this.form.venous_pressure = monitor.venous_pressure ? monitor.venous_pressure : ''
406
+          this.form.transmembrane_pressure = monitor.transmembrane_pressure ? monitor.transmembrane_pressure : ''
407
+          this.form.ultrafiltration_volume = monitor.transmembrane_pressure ? monitor.transmembrane_pressure : ''
408
+          this.form.ultrafiltration_rate = monitor.ultrafiltration_rate ? monitor.ultrafiltration_rate : ''
409
+          this.form.arterial_pressure = monitor.arterial_pressure ? monitor.arterial_pressure : ''
410
+          this.form.sodium_concentration = monitor.sodium_concentration ? monitor.sodium_concentration : ''
411
+          this.form.dialysate_temperature = monitor.dialysate_temperature ? monitor.dialysate_temperature : ''
412
+          this.form.replacement_rate = monitor.replacement_rate ? monitor.replacement_rate : ''
413
+          this.form.displacement_quantity = monitor.displacement_quantity ? monitor.displacement_quantity : ''
385 414
           this.form.ktv = monitor.ktv
386 415
           this.form.symptom = monitor.symptom
387 416
           this.form.dispose = monitor.dispose
@@ -394,7 +423,7 @@
394 423
         }
395 424
       },
396 425
 
397
-      submitAction: function () {
426
+      submitAction: function() {
398 427
         // TODO loading
399 428
         var is_new = this.form.id == 0
400 429
         this.form.operate_time = parseInt(this.form.operate_time / 1000)
@@ -413,7 +442,7 @@
413 442
         this.form.replacement_rate = parseFloat(this.form.replacement_rate) == NaN ? 0 : parseFloat(this.form.replacement_rate)
414 443
         this.form.displacement_quantity = parseFloat(this.form.displacement_quantity) == NaN ? 0 : parseFloat(this.form.displacement_quantity)
415 444
         this.form.ktv = parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv)
416
-        this.form.monitoring_date = parseInt(this.form.monitoring_date);
445
+        this.form.monitoring_date = parseInt(this.form.monitoring_date)
417 446
 
418 447
         editMonitor(this.patient_id, this.schedule_date, this.form).then(rs => {
419 448
           var resp = rs.data
@@ -421,10 +450,9 @@
421 450
             var monitor = resp.data.monitor
422 451
             if (is_new) {
423 452
               this.monitors.unshift(monitor)
424
-
425 453
             } else {
426 454
               for (let index = 0; index < this.monitors.length; index++) {
427
-                const m = this.monitors[index];
455
+                const m = this.monitors[index]
428 456
                 if (m.id == monitor.id) {
429 457
                   for (const key in monitor) {
430 458
                     m[key] = monitor[key]
@@ -434,58 +462,56 @@
434 462
               }
435 463
             }
436 464
             this.reset()
437
-
438 465
           } else {
439 466
             this.$message.error(resp.msg)
440 467
           }
441 468
         })
442 469
       },
443 470
 
444
-      symptomTextareaBlur: function () {
471
+      symptomTextareaBlur: function() {
445 472
         if (this.form.symptom.length > 0) {
446
-          this.symptom_selecteds = this.form.symptom.split(",")
473
+          this.symptom_selecteds = this.form.symptom.split(',')
447 474
         } else {
448 475
           this.symptom_selecteds = []
449 476
         }
450 477
       },
451
-      symptomSelectorChange: function () {
478
+      symptomSelectorChange: function() {
452 479
         if (this.symptom_selecteds.length > 0) {
453
-          this.form.symptom = this.symptom_selecteds.join(",") + ","
480
+          this.form.symptom = this.symptom_selecteds.join(',') + ','
454 481
         } else {
455
-          this.form.symptom = ""
482
+          this.form.symptom = ''
456 483
         }
457 484
       },
458
-      disposeTextareaBlur: function () {
485
+      disposeTextareaBlur: function() {
459 486
         if (this.form.dispose.length > 0) {
460
-          this.dispose_selecteds = this.form.dispose.split(",")
487
+          this.dispose_selecteds = this.form.dispose.split(',')
461 488
         } else {
462 489
           this.dispose_selecteds = []
463 490
         }
464 491
       },
465
-      disposeSelectorChange: function () {
492
+      disposeSelectorChange: function() {
466 493
         if (this.dispose_selecteds.length > 0) {
467
-          this.form.dispose = this.dispose_selecteds.join(",") + ","
494
+          this.form.dispose = this.dispose_selecteds.join(',') + ','
468 495
         } else {
469
-          this.form.dispose = ""
496
+          this.form.dispose = ''
470 497
         }
471 498
       },
472
-      resultTextareaBlur: function () {
499
+      resultTextareaBlur: function() {
473 500
         if (this.form.result.length > 0) {
474
-          this.result_selecteds = this.form.result.split(",")
501
+          this.result_selecteds = this.form.result.split(',')
475 502
         } else {
476 503
           this.result_selecteds = []
477 504
         }
478 505
       },
479
-      resultSelectorChange: function () {
506
+      resultSelectorChange: function() {
480 507
         if (this.result_selecteds.length > 0) {
481
-          this.form.result = this.result_selecteds.join(",") + ","
508
+          this.form.result = this.result_selecteds.join(',') + ','
482 509
         } else {
483
-          this.form.result = ""
510
+          this.form.result = ''
484 511
         }
485
-      }, deleteRecordAction: function () {
486
-
512
+      }, deleteRecordAction: function() {
487 513
         if (this.table_current_row == null) {
488
-          this.$message.error("请选择一条监测记录")
514
+          this.$message.error('请选择一条监测记录')
489 515
           return
490 516
         }
491 517
 
@@ -494,32 +520,29 @@
494 520
           cancelButtonText: '取消',
495 521
           type: 'warning'
496 522
         }).then(() => {
497
-          let params = {
523
+          const params = {
498 524
             patient_id: this.patient_id,
499 525
             record_id: this.table_current_row.id
500 526
           }
501 527
 
502 528
           postDelMonitorInfo(params).then(response => {
503 529
             if (response.data.state == 0) {
504
-              this.$message.error(response.data.msg);
505
-              return false;
530
+              this.$message.error(response.data.msg)
531
+              return false
506 532
             } else {
507
-              let record_id = response.data.data.record_id;
508
-              for(let i = 0; i < this.monitors.length; i++){
509
-                if(this.monitors[i].id == record_id){
510
-                  this.monitors.splice(i,1);
533
+              const record_id = response.data.data.record_id
534
+              for (let i = 0; i < this.monitors.length; i++) {
535
+                if (this.monitors[i].id == record_id) {
536
+                  this.monitors.splice(i, 1)
511 537
                 }
512 538
               }
513 539
             }
514
-          });
515
-
516
-
540
+          })
517 541
         }).catch(() => {
518 542
 
519
-
520
-        });
543
+        })
521 544
       }
522
-    },
545
+    }
523 546
   }
524 547
 </script>
525 548
 

+ 18 - 18
src/xt_pages/dialysis/details/dialysisMonitoring.vue 查看文件

@@ -22,17 +22,17 @@
22 22
       </tr>
23 23
       <tr v-for="(monitor, index) in monitores" :key="index">
24 24
         <td>{{ parseTime(monitor.operate_time, "{y}-{m}-{d} {h}:{i}") }}</td>
25
-        <td>{{ monitor.systolic_blood_pressure }}/{{ monitor.diastolic_blood_pressure }}</td>
26
-        <td>{{ monitor.pulse_frequency }}</td>
27
-        <td>{{ monitor.breathing_rate }}</td>
28
-        <td>{{ monitor.blood_flow_volume }}</td>
29
-        <td>{{ monitor.venous_pressure }}</td>
30
-        <td>{{ monitor.transmembrane_pressure }}</td>
31
-        <td>{{ monitor.ultrafiltration_volume }}</td>
32
-        <td>{{ monitor.sodium_concentration }}</td>
33
-        <td>{{ monitor.dialysate_temperature }}</td>
34
-        <td>{{ monitor.replacement_rate }}</td>
35
-        <td>{{ monitor.displacement_quantity }}</td>        
25
+        <td>{{ monitor.systolic_blood_pressure?monitor.systolic_blood_pressure:'' }}/{{ monitor.diastolic_blood_pressure?monitor.diastolic_blood_pressure:'' }}</td>
26
+        <td>{{ monitor.pulse_frequency?monitor.pulse_frequency:'' }}</td>
27
+        <td>{{ monitor.breathing_rate?monitor.breathing_rate:'' }}</td>
28
+        <td>{{ monitor.blood_flow_volume?monitor.blood_flow_volume:'' }}</td>
29
+        <td>{{ monitor.venous_pressure?monitor.venous_pressure:'' }}</td>
30
+        <td>{{ monitor.transmembrane_pressure?monitor.transmembrane_pressure:'' }}</td>
31
+        <td>{{ monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:'' }}</td>
32
+        <td>{{ monitor.sodium_concentration?monitor.sodium_concentration:'' }}</td>
33
+        <td>{{ monitor.dialysate_temperature?monitor.dialysate_temperature:'' }}</td>
34
+        <td>{{ monitor.replacement_rate?monitor.replacement_rate:'' }}</td>
35
+        <td>{{ monitor.displacement_quantity?monitor.displacement_quantity:'' }}</td>        
36 36
         <td>{{ monitor.symptom }}</td>
37 37
         <td>{{ monitor.dispose }}</td>
38 38
         <td>{{ monitor.result }}</td>
@@ -44,26 +44,26 @@
44 44
 </template>
45 45
 
46 46
 <script>
47
-import {parseTime} from "@/utils"
47
+import { parseTime } from '@/utils'
48 48
 
49 49
 export default {
50
-  name: "statOrder",
50
+  name: 'statOrder',
51 51
   data() {
52 52
     return {
53
-      title: "透析监测 ",
54
-    };
53
+      title: '透析监测 '
54
+    }
55 55
   },
56 56
   props: {
57 57
     monitores: {
58
-      type: Array,
58
+      type: Array
59 59
     }
60 60
   },
61 61
   methods: {
62 62
     parseTime(time, layout) {
63 63
       return parseTime(time, layout)
64
-    },
64
+    }
65 65
   }
66
-};
66
+}
67 67
 </script>
68 68
 
69 69
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 207 - 194
src/xt_pages/dialysis/dialysisPrintOrder.vue 查看文件

@@ -107,7 +107,7 @@
107 107
                   <td></td>
108 108
                   <td width="50">体温:</td>
109 109
                   <td width="100">
110
-                    <div class="under-line">&nbsp;{{predialysis.temperature}}</div>
110
+                    <div class="under-line">&nbsp;{{predialysis.temperature?predialysis.temperature:''}}</div>
111 111
                   </td>
112 112
                   <td width="35">℃</td>
113 113
                 </tr>
@@ -281,7 +281,7 @@
281 281
                     <div>
282 282
                       <label-box :isChecked="predialysis.catheter_bend == 1?true:false" showValue='有'></label-box>
283 283
                       &nbsp;
284
-                      <label-box :isChecked="predialysis.catheter_bend != 1?true:false" showValue='无'></label-box>
284
+                      <label-box :isChecked="predialysis.catheter_bend ==2?true:false" showValue='无'></label-box>
285 285
                     </div>
286 286
                   </td>
287 287
                   <td width="10">)</td>
@@ -304,35 +304,35 @@
304 304
                 <tr>
305 305
                   <td width="70">透析时间:</td>
306 306
                   <td width="40">
307
-                    <div class="under-line">&nbsp;{{prescription.dialysis_duration_hour}}</div>
307
+                    <div class="under-line">&nbsp;{{prescription.dialysis_duration_hour?prescription.dialysis_duration_hour:''}}</div>
308 308
                   </td>
309 309
                   <td width="10">h</td>
310 310
                   <td width="40">
311
-                    <div class="under-line">&nbsp;{{prescription.dialysis_duration_minute}}</div>
311
+                    <div class="under-line">&nbsp;{{prescription.dialysis_duration_minute?prescription.dialysis_duration_minute:''}}</div>
312 312
                   </td>
313 313
                   <td width="35">min</td>
314 314
                   <td></td>
315 315
                   <td width="55">血流量:</td>
316 316
                   <td width="60">
317
-                    <div class="under-line">&nbsp;{{prescription.blood_flow_volume}}</div>
317
+                    <div class="under-line">&nbsp;{{prescription.blood_flow_volume?prescription.blood_flow_volume:''}}</div>
318 318
                   </td>
319 319
                   <td width="60">ml/min</td>
320 320
                   <td></td>
321 321
                   <td width="40">体重:</td>
322 322
                   <td width="35">透前</td>
323 323
                   <td width="50">
324
-                    <div class="under-line">&nbsp;{{predialysis.weight_before}}</div>
324
+                    <div class="under-line">&nbsp;{{predialysis.weight_before?predialysis.weight_before:''}}</div>
325 325
                   </td>
326 326
                   <td width="20">Kg</td>
327 327
                   <td width="45">干体重</td>
328 328
                   <td width="50">
329
-                    <div class="under-line">&nbsp;{{predialysis.dry_weight}}</div>
329
+                    <div class="under-line">&nbsp;{{predialysis.dry_weight?predialysis.dry_weight:''}}</div>
330 330
                   </td>
331 331
                   <td width="20">Kg</td>
332 332
                   <td></td>
333 333
                   <td width="85">目标超滤量:</td>
334 334
                   <td width="70">
335
-                    <div class="under-line">&nbsp;{{prescription.target_ultrafiltration}}</div>
335
+                    <div class="under-line">&nbsp;{{prescription.target_ultrafiltration?prescription.target_ultrafiltration:''}}</div>
336 336
                   </td>
337 337
                   <td width="20">ml</td>
338 338
                 </tr>
@@ -452,7 +452,7 @@
452 452
                 <tr>
453 453
                   <td width="55">置换量:</td>
454 454
                   <td width="40">
455
-                    <div class="under-line">&nbsp;{{prescription.replacement_total}}</div>
455
+                    <div class="under-line">&nbsp;{{prescription.replacement_total?prescription.replacement_total:''}}</div>
456 456
                   </td>
457 457
                   <td width="10">L</td>
458 458
                   <td width="10"></td>
@@ -557,14 +557,14 @@
557 557
               </template>     -->
558 558
               {{getTime(monitor.operate_time,'{h}:{i}')}}
559 559
             </td>
560
-            <td>&nbsp;{{monitor.systolic_blood_pressure}} / {{monitor.diastolic_blood_pressure}}</td>
561
-            <td>&nbsp;{{monitor.pulse_frequency}}</td>
562
-            <td>&nbsp;{{monitor.breathing_rate}}</td>
563
-            <td>&nbsp;{{monitor.blood_flow_volume}}</td>
564
-            <td>&nbsp;{{monitor.ultrafiltration_volume}}</td>
565
-            <td>&nbsp;{{monitor.displacement_quantity}}</td>
566
-            <td>&nbsp;{{monitor.venous_pressure}}</td>
567
-            <td>&nbsp;{{monitor.transmembrane_pressure}}</td>
560
+            <td>&nbsp;{{monitor.systolic_blood_pressure?monitor.systolic_blood_pressure:''}} / {{monitor.diastolic_blood_pressure?monitor.diastolic_blood_pressure:''}}</td>
561
+            <td>&nbsp;{{monitor.pulse_frequency?monitor.pulse_frequency:''}}</td>
562
+            <td>&nbsp;{{monitor.breathing_rate?monitor.breathing_rate:''}}</td>
563
+            <td>&nbsp;{{monitor.blood_flow_volume?monitor.blood_flow_volume:''}}</td>
564
+            <td>&nbsp;{{monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:''}}</td>
565
+            <td>&nbsp;{{monitor.displacement_quantity?monitor.displacement_quantity:''}}</td>
566
+            <td>&nbsp;{{monitor.venous_pressure?monitor.venous_pressure:''}}</td>
567
+            <td>&nbsp;{{monitor.transmembrane_pressure?monitor.transmembrane_pressure:''}}</td>
568 568
             <!-- <td>&nbsp;{{monitor.sodium_concentration}}</td>
569 569
             <td>&nbsp;{{monitor.dialysate_temperature}}</td>
570 570
             <td>&nbsp;{{monitor.replacement_rate}}</td> -->
@@ -586,23 +586,23 @@
586 586
                 <tr>
587 587
                   <td width="90">实际治疗时间</td>
588 588
                   <td width="40">
589
-                    <div class="under-line">&nbsp;{{afterdialysis.actual_treatment_hour}}</div>
589
+                    <div class="under-line">&nbsp;{{afterdialysis.actual_treatment_hour?afterdialysis.actual_treatment_hour:''}}</div>
590 590
                   </td>
591 591
                   <td width="10">h</td>
592 592
                   <td width="40">
593
-                    <div class="under-line">&nbsp;{{afterdialysis.actual_treatment_minute}}</div>
593
+                    <div class="under-line">&nbsp;{{afterdialysis.actual_treatment_minute?afterdialysis.actual_treatment_minute:''}}</div>
594 594
                   </td>
595 595
                   <td width="35">min</td>
596 596
                   <td></td>
597 597
                   <td width="75">实际超滤量</td>
598 598
                   <td width="70">
599
-                    <div class="under-line">&nbsp;{{afterdialysis.actual_ultrafiltration}}</div>
599
+                    <div class="under-line">&nbsp;{{afterdialysis.actual_ultrafiltration?afterdialysis.actual_ultrafiltration:''}}</div>
600 600
                   </td>
601 601
                   <td width="20">ml</td>
602 602
                   <td></td>
603 603
                   <td width="60">透后体重</td>
604 604
                   <td width="50">
605
-                    <div class="under-line">&nbsp;{{afterdialysis.weight_after}}</div>
605
+                    <div class="under-line">&nbsp;{{afterdialysis.weight_after?afterdialysis.weight_after:''}}</div>
606 606
                   </td>
607 607
                   <td width="20">Kg</td>
608 608
                   <td></td>
@@ -624,7 +624,7 @@
624 624
                   <td width="80">
625 625
                     <label-box :isChecked="afterdialysis.puncture_point_oozing_blood==1?true:false"
626 626
                                showValue='有'></label-box>
627
-                    <label-box :isChecked="afterdialysis.puncture_point_oozing_blood!=1?true:false"
627
+                    <label-box :isChecked="afterdialysis.puncture_point_oozing_blood==2?true:false"
628 628
                                showValue='无'></label-box>
629 629
                   </td>
630 630
                   <td width="10"></td>
@@ -632,7 +632,7 @@
632 632
                   <td width="80">
633 633
                     <label-box :isChecked="afterdialysis.puncture_point_haematoma==1?true:false"
634 634
                                showValue='有'></label-box>
635
-                    <label-box :isChecked="afterdialysis.puncture_point_haematoma!=1?true:false"
635
+                    <label-box :isChecked="afterdialysis.puncture_point_haematoma==2?true:false"
636 636
                                showValue='无'></label-box>
637 637
                   </td>
638 638
 
@@ -827,7 +827,7 @@
827 827
               <span>{{advice[0].advice_desc}}</span>
828 828
               <!-- <span v-if="advice[0].drug_spec">{{advice[0].drug_spec}}{{advice[0].drug_spec_unit}}</span> -->
829 829
               <span v-if="advice[0].prescribing_number">* {{advice[0].prescribing_number}}{{advice[0].prescribing_number_unit}}</span>
830
-              <span v-if="advice[0].single_dose">单次用量 {{advice[0].single_dose}}{{advice[0].single_dose_unit}}</span>
830
+              <span v-if="advice[0].single_dose != 0">单次用量 {{advice[0].single_dose}}{{advice[0].single_dose_unit}}</span>
831 831
               <span>{{advice[0].delivery_way}}</span>
832 832
               <span>{{advice[0].execution_frequency}}</span>
833 833
               <div v-for="(child, childindex) in advice[0].children" :key="childindex" class="advice-children">
@@ -838,7 +838,7 @@
838 838
                   <span v-if="child.drug_spec">{{child.drug_spec}}{{child.drug_spec_unit}}</span>
839 839
                   <span
840 840
                     v-if="child.prescribing_number">* {{child.prescribing_number}}{{child.prescribing_number_unit}}</span>
841
-                  <span v-if="child.single_dose">单次用量 {{child.single_dose}}{{child.single_dose_unit}}</span>
841
+                  <span v-if="child.single_dose != 0">单次用量 {{child.single_dose}}{{child.single_dose_unit}}</span>
842 842
                 </div>
843 843
               </div>
844 844
 
@@ -892,7 +892,7 @@
892 892
               <span>{{advice[1].advice_desc}}</span>
893 893
               <!-- <span v-if="advice[1].drug_spec">{{advice[1].drug_spec}}{{advice[1].drug_spec_unit}}</span> -->
894 894
               <span v-if="advice[1].prescribing_number">* {{advice[1].prescribing_number}}{{advice[1].prescribing_number_unit}}</span>
895
-              <span v-if="advice[1].single_dose">单次用量 {{advice[1].single_dose}}{{advice[1].single_dose_unit}}</span>
895
+              <span v-if="advice[1].single_dose != 0">单次用量 {{advice[1].single_dose}}{{advice[1].single_dose_unit}}</span>
896 896
               <span>{{advice[1].delivery_way}}</span>
897 897
               <span>{{advice[1].execution_frequency}}</span>
898 898
 
@@ -904,7 +904,7 @@
904 904
                   <span v-if="child.drug_spec">{{child.drug_spec}}{{child.drug_spec_unit}}</span>
905 905
                   <span
906 906
                     v-if="child.prescribing_number">* {{child.prescribing_number}}{{child.prescribing_number_unit}}</span>
907
-                  <span v-if="child.single_dose">单次用量 {{child.single_dose}}{{child.single_dose_unit}}</span>
907
+                  <span v-if="child.single_dose != 0">单次用量 {{child.single_dose}}{{child.single_dose_unit}}</span>
908 908
                 </div>
909 909
               </div>
910 910
             </td>
@@ -964,6 +964,25 @@
964 964
               <span></span>
965 965
             </td>
966 966
           </tr>
967
+
968
+          <!-- 使整个表有5行以上 -->
969
+          <!-- <template v-if="advices.length < 5">
970
+          <tr v-for="(num) in (5 - advices.length)" :key="'5_' + num">
971
+              <td>&nbsp;</td>
972
+              <td></td>
973
+              <td></td>
974
+              <td></td>
975
+              <td></td>
976
+              <td></td>
977
+              <td></td>
978
+              <td>&nbsp;</td>
979
+              <td></td>
980
+              <td></td>
981
+              <td></td>
982
+              <td></td>
983
+              <td></td>
984
+          </tr>
985
+          </template> -->
967 986
           </tbody>
968 987
         </table>
969 988
 
@@ -984,16 +1003,16 @@
984 1003
 </template>
985 1004
 
986 1005
 <script>
987
-  import {getDialysisRecord} from '@/api/dialysis';
988
-  import {getDataConfig} from '@/utils/data';
989
-  import {jsGetAge, uParseTime} from "@/utils/tools";
990
-  import LabelBox from './printItem/LabelBox'
991
-  import print from "print-js";
1006
+  import { getDialysisRecord } from '@/api/dialysis'
1007
+import { getDataConfig } from '@/utils/data'
1008
+import { jsGetAge, uParseTime } from '@/utils/tools'
1009
+import LabelBox from './printItem/LabelBox'
1010
+  import print from 'print-js'
992 1011
 
993
-  export default {
1012
+export default {
994 1013
     name: 'dialysisPrintOrder',
995 1014
     components: {
996
-      LabelBox,
1015
+      LabelBox
997 1016
     },
998 1017
     data() {
999 1018
       return {
@@ -1004,7 +1023,7 @@
1004 1023
         },
1005 1024
         operatorMaps: {},
1006 1025
         complications: ['低血压', '高血压', '心律失常', '头晕', '头痛', '呕吐', '抽搐', '出血', '心衰', '腹痛'],
1007
-        jilurow: 10,
1026
+        jilurow: 0,
1008 1027
         loading: false,
1009 1028
         orgname: '',
1010 1029
         patientInfo_gender_1: false,
@@ -1020,29 +1039,29 @@
1020 1039
 
1021 1040
         queryParams: {
1022 1041
           xtdate: '',
1023
-          xtno: '',
1042
+          xtno: ''
1024 1043
         },
1025 1044
         patientInfo: {
1026 1045
           birth: '',
1027 1046
           age: '',
1028 1047
           DialysisSchedule: {
1029
-            device_number: {number: ""},
1030
-            device_zone: {name: ""},
1048
+            device_number: { number: '' },
1049
+            device_zone: { name: '' }
1031 1050
           },
1032 1051
           gender: 0
1033 1052
         },
1034 1053
         predialysis: {
1035
-          internal_fistula: "",
1036
-          internal_fistula_skin: "",
1037
-          catheter: "",
1038
-          blood_access_part_opera_name: '',
1054
+          internal_fistula: '',
1055
+          internal_fistula_skin: '',
1056
+          catheter: '',
1057
+          blood_access_part_opera_name: ''
1039 1058
         },
1040 1059
         afterdialysis: {
1041
-          complications_index: "",
1060
+          complications_index: ''
1042 1061
         },
1043 1062
         prescription: {
1044 1063
           dialysate_formulation_name: '',
1045
-          device: {},
1064
+          device: {}
1046 1065
         },
1047 1066
         advices: [],
1048 1067
         users: [],
@@ -1050,22 +1069,21 @@
1050 1069
         summary: {},
1051 1070
         receiverTreatmentAccess: {},
1052 1071
 
1053
-
1054 1072
         AlPanel: {
1055 1073
           id: 0,
1056
-          name: "",
1074
+          name: '',
1057 1075
           type: 1,
1058 1076
           shouji: 2,
1059 1077
           weichi: 2,
1060 1078
           zongliang: 2,
1061 1079
           gaimingcheng: -1,
1062 1080
           gaijiliang: -1,
1063
-          shouji_unit: "mg",
1064
-          weichi_unit: "mg/h",
1065
-          zongliang_unit: "mg",
1066
-          gaimingcheng_unit: "",
1067
-          gaijiliang_unit: ""
1068
-        },
1081
+          shouji_unit: 'mg',
1082
+          weichi_unit: 'mg/h',
1083
+          zongliang_unit: 'mg',
1084
+          gaimingcheng_unit: '',
1085
+          gaijiliang_unit: ''
1086
+        }
1069 1087
 
1070 1088
       }
1071 1089
     },
@@ -1087,20 +1105,20 @@
1087 1105
         if (value != undefined) {
1088 1106
           return uParseTime(value, temp)
1089 1107
         }
1090
-        return ""
1108
+        return ''
1091 1109
       },
1092 1110
       printThisPage() {
1093
-        var ptime = Math.round(new Date().getTime() / 1000);
1094
-        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}');
1111
+        var ptime = Math.round(new Date().getTime() / 1000)
1112
+        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
1095 1113
 
1096
-        const style = '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:15px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;}';
1114
+        const style = '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:15px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;}'
1097 1115
 
1098 1116
         printJS({
1099
-          printable: "dialysis-print-box",
1100
-          type: "html",
1117
+          printable: 'dialysis-print-box',
1118
+          type: 'html',
1101 1119
           style: style,
1102 1120
           scanStyles: false
1103
-        });
1121
+        })
1104 1122
       }, getNumber() {
1105 1123
         if (this.dialysisOrder != null) {
1106 1124
           return this.patientInfo.DialysisSchedule.device_zone.name + this.dialysisOrder.DeviceNumber.number
@@ -1111,23 +1129,23 @@
1111 1129
 
1112 1130
       getXuserName(id) {
1113 1131
         if (id <= 0) {
1114
-          return "";
1132
+          return ''
1115 1133
         }
1116
-        var name = "";
1117
-        if (this.users == null || typeof (this.users.length) == "undefined") {
1118
-          return name;
1134
+        var name = ''
1135
+        if (this.users == null || typeof (this.users.length) === 'undefined') {
1136
+          return name
1119 1137
         }
1120
-        var leng = this.users.length;
1138
+        var leng = this.users.length
1121 1139
         if (leng == 0) {
1122
-          return name;
1140
+          return name
1123 1141
         }
1124 1142
         for (let index = 0; index < leng; index++) {
1125 1143
           if (this.users[index].id == id) {
1126
-            name = this.users[index].name;
1127
-            break;
1144
+            name = this.users[index].name
1145
+            break
1128 1146
           }
1129 1147
         }
1130
-        return name;
1148
+        return name
1131 1149
       },
1132 1150
       setAdminUserES(id) {
1133 1151
         console.log(id)
@@ -1135,251 +1153,241 @@
1135 1153
           return ''
1136 1154
         }
1137 1155
         if (id in this.operatorMaps) {
1138
-          return this.operatorMaps[id].url;
1156
+          return this.operatorMaps[id].url
1139 1157
         } else {
1140
-          return '';
1158
+          return ''
1141 1159
         }
1142 1160
       },
1143 1161
       modeName(mode_id) {
1144
-        return typeof (this.modeOptions[mode_id]) != 'undefined' && typeof (this.modeOptions[mode_id].name) != 'undefined' ? this.modeOptions[mode_id].name : '';
1162
+        return typeof (this.modeOptions[mode_id]) !== 'undefined' && typeof (this.modeOptions[mode_id].name) !== 'undefined' ? this.modeOptions[mode_id].name : ''
1145 1163
       },
1146 1164
       getDialysisRecord() {
1147 1165
         getDialysisRecord(this.queryParams).then(response => {
1148 1166
           if (response.data.state == 1) {
1149
-            this.adminUser = response.data.data.users;
1150
-            this.users = response.data.data.users;
1151
-            this.patientInfo = response.data.data.patientInfo;
1152
-            this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}');
1153
-            this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-');
1167
+            this.adminUser = response.data.data.users
1168
+            this.users = response.data.data.users
1169
+            this.patientInfo = response.data.data.patientInfo
1170
+            this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
1171
+            this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
1154 1172
             if (response.data.data.patientInfo.first_dialysis_date != 0) {
1155
-              this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}');
1173
+              this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
1156 1174
             } else {
1157
-              this.patientInfo.first_dialysis_date = '';
1175
+              this.patientInfo.first_dialysis_date = ''
1158 1176
             }
1159 1177
 
1160
-            this.predialysis = response.data.data.PredialysisEvaluation;
1161
-            this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id);
1162
-            this.afterdialysis = response.data.data.AssessmentAfterDislysis;
1163
-            this.operators = response.data.data.operators;
1164
-            this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder;
1178
+            this.predialysis = response.data.data.PredialysisEvaluation
1179
+            this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
1180
+            this.afterdialysis = response.data.data.AssessmentAfterDislysis
1181
+            this.operators = response.data.data.operators
1182
+            this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
1165 1183
 
1166 1184
             if (this.operators.length > 0) {
1167
-              var operatorsLen = this.operators.length;
1185
+              var operatorsLen = this.operators.length
1168 1186
               for (var index = 0; index < operatorsLen; index++) {
1169
-                this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index]);
1187
+                this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
1170 1188
               }
1171 1189
             }
1172 1190
 
1173
-            this.afterdialysis.txqnx = -1;
1191
+            this.afterdialysis.txqnx = -1
1174 1192
             if (this.afterdialysis.cruor.indexOf('0度') > -1) {
1175
-              this.afterdialysis.txqnx = 0;
1193
+              this.afterdialysis.txqnx = 0
1176 1194
             }
1177 1195
             if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
1178
-              this.afterdialysis.txqnx = 1;
1196
+              this.afterdialysis.txqnx = 1
1179 1197
             }
1180 1198
             if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
1181
-              this.afterdialysis.txqnx = 2;
1199
+              this.afterdialysis.txqnx = 2
1182 1200
             }
1183 1201
             if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
1184
-              this.afterdialysis.txqnx = 3;
1202
+              this.afterdialysis.txqnx = 3
1185 1203
             }
1186 1204
 
1187
-
1188
-            this.afterdialysis.complications = this.afterdialysis.complication.split(',');
1189
-            this.afterdialysis.complications_other = [];
1190
-            this.afterdialysis.complications_index = [];
1191
-            var acllen = this.afterdialysis.complications.length;
1205
+            this.afterdialysis.complications = this.afterdialysis.complication.split(',')
1206
+            this.afterdialysis.complications_other = []
1207
+            this.afterdialysis.complications_index = []
1208
+            var acllen = this.afterdialysis.complications.length
1192 1209
             for (let index = 0; index < acllen; index++) {
1193 1210
               if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
1194
-                this.afterdialysis.complications_index.push(this.afterdialysis.complications[index]);
1211
+                this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
1195 1212
               } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
1196
-                this.afterdialysis.complications_other.push(this.afterdialysis.complications[index]);
1213
+                this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
1197 1214
               }
1198 1215
             }
1199
-            this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',');
1216
+            this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
1200 1217
 
1218
+            this.prescription = response.data.data.dialysisPrescription
1219
+            this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
1201 1220
 
1202
-            this.prescription = response.data.data.dialysisPrescription;
1203
-            this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess;
1204
-
1205
-            this.prescription.mode = this.modeName(this.prescription.mode_id);
1206
-            var rwLen = this.replacementWays.length;
1207
-            this.prescription.replacement = "";
1221
+            this.prescription.mode = this.modeName(this.prescription.mode_id)
1222
+            var rwLen = this.replacementWays.length
1223
+            this.prescription.replacement = ''
1208 1224
             for (let index = 0; index < rwLen; index++) {
1209 1225
               if (this.replacementWays[index].id == this.prescription.replacement_way) {
1210
-                this.prescription.replacement = this.replacementWays[index].name;
1211
-                break;
1226
+                this.prescription.replacement = this.replacementWays[index].name
1227
+                break
1212 1228
               }
1213 1229
             }
1214 1230
 
1215
-            this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation);
1216
-
1231
+            this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
1217 1232
 
1218
-            var paLen = this.perfusionApparatus.length;
1219
-            this.prescription.perfusion_apparatus_name = "";
1233
+            var paLen = this.perfusionApparatus.length
1234
+            this.prescription.perfusion_apparatus_name = ''
1220 1235
             for (let index = 0; index < paLen; index++) {
1221 1236
               if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
1222
-                this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name;
1223
-                break;
1237
+                this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
1238
+                break
1224 1239
               }
1225 1240
             }
1226 1241
 
1227
-            var acLen = this.anticoagulantsConfit.length;
1228
-            var thisALID = this.prescription.anticoagulant;
1229
-            this.prescription.anticoagulant_name = "";
1242
+            var acLen = this.anticoagulantsConfit.length
1243
+            var thisALID = this.prescription.anticoagulant
1244
+            this.prescription.anticoagulant_name = ''
1230 1245
 
1231
-            if (typeof (this.anticoagulantsConfit[thisALID]) != 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
1232
-              this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name;
1233
-              this.AlPanel = this.anticoagulantsConfit[thisALID];
1246
+            if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
1247
+              this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
1248
+              this.AlPanel = this.anticoagulantsConfit[thisALID]
1234 1249
             }
1235 1250
 
1236
-            this.advices = response.data.data.advices;
1237
-            this.monitors = response.data.data.monitors;
1238
-            this.summary = response.data.data.summary;
1251
+            this.advices = response.data.data.advices
1252
+            this.monitors = response.data.data.monitors
1253
+            this.summary = response.data.data.summary
1239 1254
 
1240 1255
             if (this.monitors.length < 8) {
1241
-              var nl = 8 - this.monitors.length;
1256
+              var nl = 8 - this.monitors.length
1242 1257
               for (let index = 0; index < nl; index++) {
1243
-                this.monitors.push([]);
1258
+                this.monitors.push([])
1244 1259
               }
1245 1260
             }
1246
-            this.jilurow = this.monitors.length + 1;
1261
+            this.jilurow = this.monitors.length + 1
1247 1262
 
1248
-
1249
-            var childMap = {};
1263
+            var childMap = {}
1250 1264
             for (const index in this.advices) {
1251 1265
               if (this.advices[index].parent_id == 0) {
1252
-                continue;
1266
+                continue
1253 1267
               }
1254 1268
               if (!(this.advices[index].parent_id in childMap)) {
1255
-                childMap[this.advices[index].parent_id] = [];
1269
+                childMap[this.advices[index].parent_id] = []
1256 1270
               }
1257
-              childMap[this.advices[index].parent_id].push(this.advices[index]);
1271
+              childMap[this.advices[index].parent_id].push(this.advices[index])
1258 1272
             }
1259 1273
 
1260
-
1261
-            var advices = [];
1274
+            var advices = []
1262 1275
             for (const index in this.advices) {
1263 1276
               if (this.advices[index].parent_id > 0) {
1264
-                continue;
1277
+                continue
1265 1278
               }
1266 1279
               var item = this.advices[index]
1267 1280
               if (item.id in childMap) {
1268
-                item.children = childMap[item.id];
1281
+                item.children = childMap[item.id]
1269 1282
               } else {
1270
-                item.children = [];
1283
+                item.children = []
1271 1284
               }
1272
-              advices.push(item);
1285
+              advices.push(item)
1273 1286
             }
1274 1287
 
1275
-            var leftAdvice = [];
1276
-            var rightAdvice = [];
1277
-            var adlen = advices.length;
1288
+            var leftAdvice = []
1289
+            var rightAdvice = []
1290
+            var adlen = advices.length
1278 1291
 
1279
-            var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen+1) / 2
1292
+            var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
1280 1293
             for (var i = 0; i < halfLen; i++) {
1281
-              leftAdvice.push(advices[i]);
1282
-              rightAdvice.push(advices[i + halfLen]);
1294
+              leftAdvice.push(advices[i])
1295
+              rightAdvice.push(advices[i + halfLen])
1283 1296
             }
1284 1297
             if (halfLen < 5) {
1285
-              var nl = 5 - leftAdvice.length;
1298
+              var nl = 5 - leftAdvice.length
1286 1299
               for (let index = 0; index < nl; index++) {
1287
-                leftAdvice.push([]);
1300
+                leftAdvice.push([])
1288 1301
               }
1289
-              var nl = 5 - rightAdvice.length;
1302
+              var nl = 5 - rightAdvice.length
1290 1303
               for (let index = 0; index < nl; index++) {
1291
-                rightAdvice.push([]);
1304
+                rightAdvice.push([])
1292 1305
               }
1293 1306
             }
1294 1307
 
1295
-            this.advices = [];
1308
+            this.advices = []
1296 1309
             for (var i = 0; i < halfLen; i++) {
1297
-              var item = [];
1298
-              item.push(leftAdvice[i]);
1299
-              item.push(rightAdvice[i]);
1300
-              this.advices.push(item);
1310
+              var item = []
1311
+              item.push(leftAdvice[i])
1312
+              item.push(rightAdvice[i])
1313
+              this.advices.push(item)
1301 1314
             }
1302 1315
           } else {
1303
-            this.$message.error("请求数据失败");
1304
-            return false;
1316
+            this.$message.error('请求数据失败')
1317
+            return false
1305 1318
           }
1306
-
1307
-        });
1319
+        })
1308 1320
       },
1309 1321
       bloodAccessParOperaName(id) {
1310 1322
         if (id in this.bloodAccessParOpera) {
1311
-          return this.bloodAccessParOpera[id].name;
1323
+          return this.bloodAccessParOpera[id].name
1312 1324
         }
1313
-        return '';
1325
+        return ''
1314 1326
       },
1315 1327
       dialysateFormulationName(id) {
1316 1328
         if (id in this.dialysateFormulationOptions) {
1317
-          return this.dialysateFormulationOptions[id].name;
1329
+          return this.dialysateFormulationOptions[id].name
1318 1330
         }
1319
-        return '';
1331
+        return ''
1320 1332
       }
1321 1333
     },
1322 1334
     watch: {
1323
-      "patientInfo.gender": function () {
1324
-
1335
+      'patientInfo.gender': function() {
1325 1336
         if (this.patientInfo.gender == 1) {
1326
-          this.patientInfo_gender_1 = true;
1327
-          this.patientInfo_gender_2 = false;
1337
+          this.patientInfo_gender_1 = true
1338
+          this.patientInfo_gender_2 = false
1328 1339
         } else if (this.patientInfo.gender == 2) {
1329
-          this.patientInfo_gender_2 = true;
1330
-          this.patientInfo_gender_1 = false;
1340
+          this.patientInfo_gender_2 = true
1341
+          this.patientInfo_gender_1 = false
1331 1342
         } else {
1332
-          this.patientInfo_gender_2 = false;
1333
-          this.patientInfo_gender_1 = false;
1343
+          this.patientInfo_gender_2 = false
1344
+          this.patientInfo_gender_1 = false
1334 1345
         }
1335 1346
       },
1336
-      "patientInfo.source": function () {
1337
-
1347
+      'patientInfo.source': function() {
1338 1348
         if (this.patientInfo.source == 1) {
1339
-          this.patientInfo_source_1 = true;
1340
-          this.patientInfo_source_2 = false;
1349
+          this.patientInfo_source_1 = true
1350
+          this.patientInfo_source_2 = false
1341 1351
         } else if (this.patientInfo.source == 2) {
1342
-          this.patientInfo_source_2 = true;
1343
-          this.patientInfo_source_1 = false;
1352
+          this.patientInfo_source_2 = true
1353
+          this.patientInfo_source_1 = false
1344 1354
         } else {
1345
-
1346
-          this.patientInfo_source_2 = false;
1347
-          this.patientInfo_source_1 = false;
1355
+          this.patientInfo_source_2 = false
1356
+          this.patientInfo_source_1 = false
1348 1357
         }
1349 1358
       }
1350 1359
 
1351
-
1352 1360
     },
1353 1361
     created() {
1354
-      var xtuser = this.$store.getters.xt_user;
1355
-      this.orgname = xtuser.org.org_name;
1362
+      var xtuser = this.$store.getters.xt_user
1363
+      this.orgname = xtuser.org.org_name
1356 1364
       // this.orgname = "遂溪方济医院";
1357
-      this.modeOptions = this.$store.getters.treatment_mode;
1358
-      this.replacementWays = this.$store.getters.replacement_ways;
1359
-      this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
1360
-      this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
1365
+      this.modeOptions = this.$store.getters.treatment_mode
1366
+      this.replacementWays = this.$store.getters.replacement_ways
1367
+      this.perfusionApparatus = this.$store.getters.perfusion_apparatus
1368
+      this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
1361 1369
 
1362 1370
       // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
1363 1371
 
1364
-      var bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc');
1372
+      var bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
1365 1373
       for (var key in bloodAccessParOpera) {
1366
-        this.bloodAccessParOpera[bloodAccessParOpera[key].id] = bloodAccessParOpera[key];
1374
+        this.bloodAccessParOpera[bloodAccessParOpera[key].id] = bloodAccessParOpera[key]
1367 1375
       }
1368 1376
 
1369
-      var dialysateFormulationOptions = getDataConfig("hemodialysis", "dialysate_formulation");
1377
+      var dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation')
1370 1378
       for (var key in dialysateFormulationOptions) {
1371
-        this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] = dialysateFormulationOptions[key];
1379
+        this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] = dialysateFormulationOptions[key]
1372 1380
       }
1373 1381
 
1374
-      const xtdate = this.$route.query && this.$route.query.xtdate;
1375
-      const xtno = this.$route.query && this.$route.query.xtno;
1376
-      if (typeof (xtdate) == "string" && xtdate.length > 0 && typeof (xtno) == "string" && xtno.length > 0) {
1377
-        this.queryParams.xtdate = xtdate;
1378
-        this.queryParams.xtno = xtno;
1379
-        this.getDialysisRecord();
1382
+      const xtdate = this.$route.query && this.$route.query.xtdate
1383
+      const xtno = this.$route.query && this.$route.query.xtno
1384
+      if (typeof (xtdate) === 'string' && xtdate.length > 0 && typeof (xtno) === 'string' && xtno.length > 0) {
1385
+        this.queryParams.xtdate = xtdate
1386
+        this.queryParams.xtno = xtno
1387
+        this.getDialysisRecord()
1380 1388
       } else {
1381
-        this.$message.error("参数不齐");
1382
-        return false;
1389
+        this.$message.error('参数不齐')
1390
+        return false
1383 1391
       }
1384 1392
     }
1385 1393
 
@@ -1483,6 +1491,11 @@
1483 1491
     font-size: 15px;
1484 1492
   }
1485 1493
 
1494
+
1495
+  .dialysis-print-order .print-table-no tr td {
1496
+      padding: 8px 5px;
1497
+      line-height: 25px;
1498
+  }
1486 1499
   .es-img {
1487 1500
     height: 25px;
1488 1501
   }

+ 56 - 58
src/xt_pages/dialysis/schedualPatient.vue 查看文件

@@ -47,13 +47,13 @@
47 47
 </template>
48 48
 
49 49
 <script>
50
-  import PatientBox from './PatientBox';
51
-  import { getDialysisRecordInitData, getDialysisSchedules } from "@/api/dialysis_record"
52
-  import { parseTime } from "@/utils"
53
-  import BreadCrumb from "@/xt_pages/components/bread-crumb"
50
+  import PatientBox from './PatientBox'
51
+import { getDialysisRecordInitData, getDialysisSchedules } from '@/api/dialysis_record'
52
+  import { parseTime } from '@/utils'
53
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
54 54
 
55 55
   export default {
56
-    name: "Patient",
56
+    name: 'Patient',
57 57
     components: {
58 58
       PatientBox,
59 59
       BreadCrumb
@@ -61,49 +61,49 @@
61 61
     data() {
62 62
       return {
63 63
         selected_date: new Date(), // this.$store.getters.app.dialysis_area.schedule_date,
64
-        schedule_type_selected: 0, //this.$store.getters.app.dialysis_area.schedule_type_select_index,
64
+        schedule_type_selected: 0, // this.$store.getters.app.dialysis_area.schedule_type_select_index,
65 65
         schedule_type_options: [
66
-          { value: 0, text: "全部班" },
67
-          { value: 1, text: "上午" },
68
-          { value: 2, text: "下午" },
69
-          { value: 3, text: "晚上" },
66
+          { value: 0, text: '全部班' },
67
+          { value: 1, text: '上午' },
68
+          { value: 2, text: '下午' },
69
+          { value: 3, text: '晚上' }
70 70
         ],
71
-        zone_selected: 0,// this.$store.getters.app.dialysis_area.zone_select_index,
72
-        zone_options:[
73
-          { id: 0, text: "全部分区" }
71
+        zone_selected: 0, // this.$store.getters.app.dialysis_area.zone_select_index,
72
+        zone_options: [
73
+          { id: 0, text: '全部分区' }
74 74
         ],
75
-        zone_schedules:[],
75
+        zone_schedules: [],
76 76
 
77 77
         date_picker_options: {
78 78
           shortcuts: [
79 79
             {
80
-              text: "今天",
80
+              text: '今天',
81 81
               onClick(picker) {
82
-                picker.$emit("pick", new Date());
82
+                picker.$emit('pick', new Date())
83 83
               }
84 84
             },
85 85
             {
86
-              text: "昨天",
86
+              text: '昨天',
87 87
               onClick(picker) {
88
-                const date = new Date();
89
-                date.setTime(date.getTime() - 3600 * 1000 * 24);
90
-                picker.$emit("pick", date);
88
+                const date = new Date()
89
+                date.setTime(date.getTime() - 3600 * 1000 * 24)
90
+                picker.$emit('pick', date)
91 91
               }
92 92
             },
93 93
             {
94
-              text: "一周前",
94
+              text: '一周前',
95 95
               onClick(picker) {
96
-                const date = new Date();
97
-                date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
98
-                picker.$emit("pick", date);
96
+                const date = new Date()
97
+                date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
98
+                picker.$emit('pick', date)
99 99
               }
100
-            },
100
+            }
101 101
           ]
102 102
         },
103 103
 
104 104
         // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
105
-        search_keyword: "", // 确定用于搜索的关键字
106
-        search_input: "", // 输入中的关键字
105
+        search_keyword: '', // 确定用于搜索的关键字
106
+        search_input: '' // 输入中的关键字
107 107
       }
108 108
     },
109 109
     computed: {
@@ -112,21 +112,21 @@
112 112
         if (search_keyword.length > 0) {
113 113
           var schedules = []
114 114
           for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
115
-            const scheduleInfo = this.zone_schedules[o_i];
115
+            const scheduleInfo = this.zone_schedules[o_i]
116 116
             var originSchedules = scheduleInfo.schedules
117 117
             if (originSchedules.length == 0) {
118 118
               continue
119 119
             }
120 120
             var filtedSchedules = []
121 121
             for (let s_i = 0; s_i < originSchedules.length; s_i++) {
122
-              const schedule = originSchedules[s_i];
122
+              const schedule = originSchedules[s_i]
123 123
               if (schedule.patient.name.indexOf(search_keyword) != -1) {
124 124
                 filtedSchedules.push(schedule)
125 125
                 break
126 126
               }
127 127
             }
128 128
             if (filtedSchedules.length > 0) {
129
-              schedules.push({zone_id:scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules})
129
+              schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
130 130
             }
131 131
           }
132 132
           return schedules
@@ -137,7 +137,7 @@
137 137
         if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
138 138
           var schedules = []
139 139
           for (let index = 0; index < this.zone_schedules.length; index++) {
140
-            const scheduleInfo = this.zone_schedules[index];
140
+            const scheduleInfo = this.zone_schedules[index]
141 141
             if (scheduleInfo.schedules.length != 0) {
142 142
               schedules.push(scheduleInfo)
143 143
             }
@@ -147,7 +147,7 @@
147 147
 
148 148
         var schedules = []
149 149
         for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
150
-          const scheduleInfo = this.zone_schedules[o_i];
150
+          const scheduleInfo = this.zone_schedules[o_i]
151 151
           if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
152 152
             if (scheduleInfo.schedules.length == 0) {
153 153
               return []
@@ -161,9 +161,9 @@
161 161
           }
162 162
           var filtedSchedules = []
163 163
           for (let s_i = 0; s_i < originSchedules.length; s_i++) {
164
-            const schedule = originSchedules[s_i];
164
+            const schedule = originSchedules[s_i]
165 165
             if (zone_selected != 0) {
166
-              if (zone_selected == schedule.device_zone.id) {
166
+              if (zone_selected == schedule.device_number.zone.id) {
167 167
                 if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
168 168
                   filtedSchedules.push(schedule)
169 169
                 }
@@ -175,7 +175,7 @@
175 175
             }
176 176
           }
177 177
           if (filtedSchedules.length > 0) {
178
-            schedules.push({zone_id:scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules})
178
+            schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
179 179
           }
180 180
         }
181 181
         return schedules
@@ -186,30 +186,30 @@
186 186
     },
187 187
     methods: {
188 188
       handletimeType: function(index) {
189
-        this.schedule_type_selected = index;
190
-        this.search_keyword = this.search_input = ""
189
+        this.schedule_type_selected = index
190
+        this.search_keyword = this.search_input = ''
191 191
         // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
192
-        //   zone: this.zone_selected, 
193
-        //   schedule_type: this.schedule_type_selected, 
192
+        //   zone: this.zone_selected,
193
+        //   schedule_type: this.schedule_type_selected,
194 194
         //   schedule_date: this.selected_date,
195 195
         // })
196 196
       },
197
-      handleZoneChange:function(index) {
198
-        this.zone_selected = index;
199
-        this.search_keyword = this.search_input = ""
197
+      handleZoneChange: function(index) {
198
+        this.zone_selected = index
199
+        this.search_keyword = this.search_input = ''
200 200
         // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
201
-        //   zone: this.zone_selected, 
202
-        //   schedule_type: this.schedule_type_selected, 
201
+        //   zone: this.zone_selected,
202
+        //   schedule_type: this.schedule_type_selected,
203 203
         //   schedule_date: this.selected_date,
204 204
         // })
205 205
       },
206 206
       handleScheduleDateChange: function() {
207 207
         this.zone_selected = 0
208 208
         this.schedule_type_selected = 0
209
-        this.search_keyword = this.search_input = ""
209
+        this.search_keyword = this.search_input = ''
210 210
         // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
211
-        //   zone: this.zone_selected, 
212
-        //   schedule_type: this.schedule_type_selected, 
211
+        //   zone: this.zone_selected,
212
+        //   schedule_type: this.schedule_type_selected,
213 213
         //   schedule_date: this.selected_date,
214 214
         // })
215 215
         this.requestDialysisSchedules()
@@ -225,27 +225,25 @@
225 225
           if (resp.state == 1) {
226 226
             var zones = resp.data.zones
227 227
             var schedules = resp.data.schedules
228
-            var zone_options = [{ id: 0, text: "全部分区" }]
228
+            var zone_options = [{ id: 0, text: '全部分区' }]
229 229
             for (let z_i = 0; z_i < zones.length; z_i++) {
230
-              const zone = zones[z_i];
231
-              zone_options.push({ id: zone.id, text: zone.name, })
230
+              const zone = zones[z_i]
231
+              zone_options.push({ id: zone.id, text: zone.name })
232 232
             }
233 233
             this.zone_options = zone_options
234 234
             this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
235
-
236 235
           } else {
237 236
             this.$message.error(resp.msg)
238 237
           }
239 238
         })
240 239
       },
241 240
       requestDialysisSchedules: function() {
242
-        var ymd = parseTime(this.selected_date, "{y}-{m}-{d}")
241
+        var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
243 242
         getDialysisSchedules(ymd).then(rs => {
244 243
           var resp = rs.data
245 244
           if (resp.state == 1) {
246 245
             var schedules = resp.data.schedules
247 246
             this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
248
-
249 247
           } else {
250 248
             this.$message.error(resp.msg)
251 249
           }
@@ -255,7 +253,7 @@
255 253
         var zoneMap = {}
256 254
         var scheduleMap = {}
257 255
         for (let z_i = 0; z_i < zone_options.length; z_i++) {
258
-          const zone = zone_options[z_i];
256
+          const zone = zone_options[z_i]
259 257
           if (zone.id == 0) {
260 258
             continue
261 259
           }
@@ -263,7 +261,7 @@
263 261
         }
264 262
         for (let index = 0; index < schedules.length; index++) {
265 263
           const schedule = schedules[index]
266
-          scheduleMap[schedule.device_zone.id].push(schedule)
264
+          scheduleMap[schedule.device_number.zone.id].push(schedule)
267 265
         }
268 266
         var zone_schedules = []
269 267
         for (let index = 0; index < zone_options.length; index++) {
@@ -272,11 +270,11 @@
272 270
             continue
273 271
           }
274 272
           var schedules = scheduleMap[zone.id]
275
-          zone_schedules.push({zone_id: zone.id, zone_name: zone.text, schedules: schedules})
273
+          zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
276 274
         }
277 275
         return zone_schedules
278
-      },
279
-    },
276
+      }
277
+    }
280 278
   }
281 279
 </script>
282 280
 

+ 166 - 166
src/xt_pages/home/index.vue 查看文件

@@ -65,237 +65,237 @@
65 65
 
66 66
 </template>
67 67
 <script>
68
-import {GetServerTime} from '@/api/public';
69
-import {GetPatientTotal} from '@/api/patient';
70
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
68
+import { GetServerTime } from '@/api/public'
69
+import { GetPatientTotal } from '@/api/patient'
70
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
71 71
 export default {
72
-  name: "Home",
73
-  components:{
72
+  name: 'Home',
73
+  components: {
74 74
     BreadCrumb
75 75
   },
76 76
   data() {
77 77
     return {
78
-      searchKey: "",
79
-      patientTotal:0,
78
+      searchKey: '',
79
+      patientTotal: 0,
80 80
       steps: [
81
-        { title: "透析处方" },
82
-        { title: "接诊评估" },
83
-        { title: "透前评估" },
84
-        { title: "临时医嘱" },
85
-        { title: "透析上机" },
86
-        { title: "双人核对" },
87
-        { title: "透析监测" },
88
-        { title: "透析下机" },
89
-        { title: "透后评估" },
90
-        { title: "治疗小结" }
81
+        { title: '透析处方' },
82
+        { title: '接诊评估' },
83
+        { title: '透前评估' },
84
+        { title: '临时医嘱' },
85
+        { title: '透析上机' },
86
+        { title: '双人核对' },
87
+        { title: '透析监测' },
88
+        { title: '透析下机' },
89
+        { title: '透后评估' },
90
+        { title: '治疗小结' }
91 91
       ],
92 92
       process: [
93 93
         {
94
-          imgUrl: require("../../assets/home/equipment.png"),
95
-          name: "设备管理",
96
-          link: "/device/main"
94
+          imgUrl: require('../../assets/home/equipment.png'),
95
+          name: '设备管理',
96
+          link: '/device/main'
97 97
         },
98 98
         {
99
-          imgUrl: require("../../assets/home/user.png"),
100
-          name: "病人管理",
101
-          link: "/patients/patients"
99
+          imgUrl: require('../../assets/home/user.png'),
100
+          name: '病人管理',
101
+          link: '/patients/patients'
102 102
         },
103 103
         // { imgUrl: require('../../assets/home/sick.png'), name: '登记病人', link: '/patients/create' },
104 104
         // { imgUrl: require('../../assets/home/prescription.png'), name: '透析处方', link: '/dialysis/paper' },
105 105
         {
106
-          imgUrl: require("../../assets/home/scheduling.png"),
107
-          name: "病人排班",
108
-          link: "/workforce/appointment"
106
+          imgUrl: require('../../assets/home/scheduling.png'),
107
+          name: '病人排班',
108
+          link: '/workforce/appointment'
109 109
         },
110 110
         {
111
-          imgUrl: require("../../assets/home/record.png"),
112
-          name: "透析记录",
113
-          link: "/dialysis/dialysisrecord"
111
+          imgUrl: require('../../assets/home/record.png'),
112
+          name: '透析记录',
113
+          link: '/dialysis/dialysisrecord'
114 114
         },
115 115
         {
116
-          imgUrl: require("../../assets/home/analyze.png"),
117
-          name: "透析监控",
118
-          link: "/dialysis/watch"
116
+          imgUrl: require('../../assets/home/analyze.png'),
117
+          name: '透析监控',
118
+          link: '/dialysis/watch'
119 119
         }
120 120
       ],
121
-      subscibe:{},
122
-      subscibeBan:{
123
-        used:'已使用0天',
124
-        name:'免费版本',
125
-        desc:'当前为免费版',
126
-        detail:'可管理20位(含)以下患者',
127
-        leave:'剩余0天',
128
-        pay_status:false,
121
+      subscibe: {},
122
+      subscibeBan: {
123
+        used: '已使用0天',
124
+        name: '免费版本',
125
+        desc: '当前为免费版',
126
+        detail: '可管理100位(含)以下患者',
127
+        leave: '剩余0天',
128
+        pay_status: false
129 129
       },
130
-      serverTime:0,
131
-      leftTime:false,
132
-    };
130
+      serverTime: 0,
131
+      leftTime: false
132
+    }
133 133
   },
134 134
   methods: {
135
-    GetPatientTotal(){
136
-      GetPatientTotal().then(response=>{
137
-        if(response.data.state==1) {
138
-          this.patientTotal = response.data.data.total;
139
-        }else {
140
-          this.$message.error(response.data.msg);
135
+    GetPatientTotal() {
136
+      GetPatientTotal().then(response => {
137
+        if (response.data.state == 1) {
138
+          this.patientTotal = response.data.data.total
139
+        } else {
140
+          this.$message.error(response.data.msg)
141 141
         }
142
-      }).catch(e=>{
142
+      }).catch(e => {
143 143
 
144
-      });
144
+      })
145 145
     },
146 146
     clickSearch() {
147 147
       if (this.searchKey.length > 0) {
148
-        this.$router.push("/patients/patients?keyword=" + this.searchKey);
148
+        this.$router.push('/patients/patients?keyword=' + this.searchKey)
149 149
       } else {
150
-        this.$router.push("/patients/patients");
150
+        this.$router.push('/patients/patients')
151 151
       }
152 152
     },
153
-    openPay(){
154
-      this.$router.push('/service/buy');
153
+    openPay() {
154
+      this.$router.push('/service/buy')
155 155
     },
156
-    GetServerTime(){
157
-      GetServerTime().then(response=>{
158
-        if (response.data.state==1) {
159
-          this.serverTime = response.data.data.timestamp;
160
-        }else {
161
-          this.serverTime = Math.round(new Date().getTime()/1000);
156
+    GetServerTime() {
157
+      GetServerTime().then(response => {
158
+        if (response.data.state == 1) {
159
+          this.serverTime = response.data.data.timestamp
160
+        } else {
161
+          this.serverTime = Math.round(new Date().getTime() / 1000)
162 162
         }
163 163
       }).catch(() => {
164
-        this.serverTime = Math.round(new Date().getTime()/1000);
165
-      });
164
+        this.serverTime = Math.round(new Date().getTime() / 1000)
165
+      })
166 166
     },
167 167
     initSubscibe() {
168 168
       // state:1正版(标准),2试用(免费),3其他无效状态,8专业,9(永久免费),标准版和专业版会过期
169
-      var used = Math.ceil((this.serverTime - this.subscibe.period_start)/86400);
169
+      var used = Math.ceil((this.serverTime - this.subscibe.period_start) / 86400)
170 170
 
171
-      var leave = "";
172
-      var pce = '';
171
+      var leave = ''
172
+      var pce = ''
173 173
 
174
-      var leaveTime = 0;
174
+      var leaveTime = 0
175 175
 
176 176
       switch (this.subscibe.state) {
177 177
         case 9:
178
-          this.subscibeBan={
179
-            used:'已使用'+used+'天',
180
-            name:'永久版',
181
-            desc:'当前为永久免费版本',
182
-            detail:'该版本不会过期,并可使用所有功能',
183
-            leave:'',
184
-            pay_status:false,
185
-            pce:"width:100%",
186
-          };
187
-          break;
178
+          this.subscibeBan = {
179
+            used: '已使用' + used + '天',
180
+            name: '永久版',
181
+            desc: '当前为永久免费版本',
182
+            detail: '该版本不会过期,并可使用所有功能',
183
+            leave: '',
184
+            pay_status: false,
185
+            pce: 'width:100%'
186
+          }
187
+          break
188 188
         case 2:
189
-          //免费版本不会过期,但有人数限制,免费版,可以管理20位(含)以下患者,当患者数过了20位,系统不能正常使用,达到18位时,要提醒购买,超过60位,要购买专业版
190
-          pce = 0;
191
-          if(this.patientTotal>60) {
192
-            leave = "管理患者数已达"+this.patientTotal+"位,请购买专业版";
193
-            pce = 100;
194
-          }else if(this.patientTotal>20) {
195
-            leave = "管理患者数已达"+this.patientTotal+"位,请购买标准版";
196
-            pce = 100;
197
-          }else if(this.patientTotal>=18) {
198
-            leave = "管理患者数已达"+this.patientTotal+"位,建议购买标准版";
199
-            pce = Math.round(this.patientTotal/20*100)
189
+          // 免费版本不会过期,但有人数限制,免费版,可以管理20位(含)以下患者,当患者数过了20位,系统不能正常使用,达到18位时,要提醒购买,超过60位,要购买专业版
190
+          pce = 0
191
+          if (this.patientTotal > 200) {
192
+            leave = '管理患者数已达' + this.patientTotal + '位,请购买专业版'
193
+            pce = 100
194
+          } else if (this.patientTotal > 100) {
195
+            leave = '管理患者数已达' + this.patientTotal + '位,请购买标准版'
196
+            pce = 100
197
+          } else if (this.patientTotal >= 90) {
198
+            leave = '管理患者数已达' + this.patientTotal + '位,建议购买标准版'
199
+            pce = Math.round(this.patientTotal / 100 * 100)
200
+          }
201
+          pce = 'width:' + pce + '%'
202
+          this.subscibeBan = {
203
+            used: '已使用' + used + '天',
204
+            name: '免费版',
205
+            desc: '当前为免费版',
206
+            detail: '可管理100位(含)以下患者',
207
+            leave: leave,
208
+            pay_status: !!leave,
209
+            pce: pce
200 210
           }
201
-          pce = "width:"+pce+"%";
202
-          this.subscibeBan={
203
-            used:'已使用'+used+'天',
204
-            name:'免费版',
205
-            desc:'当前为免费版',
206
-            detail:'可管理20位(含)以下患者',
207
-            leave:leave,
208
-            pay_status:leave?true:false,
209
-            pce:pce,
210
-          };
211
-          break;
211
+          break
212 212
         case 8:
213
-          leaveTime = this.subscibe.period_end - this.serverTime;
214
-          this.leftTime = leaveTime;
215
-          if (leaveTime<0){
216
-            leave = "已经过期";
217
-            pce = "100";
213
+          leaveTime = this.subscibe.period_end - this.serverTime
214
+          this.leftTime = leaveTime
215
+          if (leaveTime < 0) {
216
+            leave = '已经过期'
217
+            pce = '100'
218 218
           } else {
219
-            leave = Math.floor(leaveTime/86400);
220
-            leave = leave>30?"":'剩余'+leave+'天';
221
-            pce = 100 - Math.round(leaveTime/(this.subscibe.period_end - this.subscibe.period_start)*100);
219
+            leave = Math.floor(leaveTime / 86400)
220
+            leave = leave > 30 ? '' : '剩余' + leave + '天'
221
+            pce = 100 - Math.round(leaveTime / (this.subscibe.period_end - this.subscibe.period_start) * 100)
222 222
           }
223
-          pce = "width:"+pce+"%";
223
+          pce = 'width:' + pce + '%'
224 224
 
225
-          this.subscibeBan={
226
-            used:'已使用'+used+'天',
227
-            name:'专业版',
228
-            desc:'当前为专业版',
229
-            detail:'不限患者',
230
-            leave:leave,
231
-            pay_status:leave?true:false,
232
-            pce:pce,
233
-          };
234
-          break;
225
+          this.subscibeBan = {
226
+            used: '已使用' + used + '天',
227
+            name: '专业版',
228
+            desc: '当前为专业版',
229
+            detail: '不限患者',
230
+            leave: leave,
231
+            pay_status: !!leave,
232
+            pce: pce
233
+          }
234
+          break
235 235
         case 1:
236
-          leaveTime = this.subscibe.period_end - this.serverTime;
237
-          this.leftTime = leaveTime;
238
-          if (leaveTime<0){
239
-            leave = "已经过期";
240
-            pce = "100";
241
-          } else if(this.patientTotal>60) {
242
-            leave = "管理患者数已达"+this.patientTotal+"位,请购买专业版";
243
-            pce = "width:100%";
244
-          } else if(this.patientTotal>=58) {
245
-              leave = "管理患者数已达"+this.patientTotal+"位,建议购买专业版";
246
-              pce = Math.round(this.patientTotal/60*100);
236
+          leaveTime = this.subscibe.period_end - this.serverTime
237
+          this.leftTime = leaveTime
238
+          if (leaveTime < 0) {
239
+            leave = '已经过期'
240
+            pce = '100'
241
+          } else if (this.patientTotal > 200) {
242
+            leave = '管理患者数已达' + this.patientTotal + '位,请购买专业版'
243
+            pce = 'width:100%'
244
+          } else if (this.patientTotal >= 190) {
245
+            leave = '管理患者数已达' + this.patientTotal + '位,建议购买专业版'
246
+            pce = Math.round(this.patientTotal / 200 * 100)
247 247
           } else {
248
-            leave = Math.floor(leaveTime/86400);
249
-            leave = leave>30?"":'剩余'+leave+'天,建议购买标准版';
250
-            pce = 100 - Math.round(leaveTime/(this.subscibe.period_end - this.subscibe.period_start)*100);
248
+            leave = Math.floor(leaveTime / 86400)
249
+            leave = leave > 30 ? '' : '剩余' + leave + '天,建议购买标准版'
250
+            pce = 100 - Math.round(leaveTime / (this.subscibe.period_end - this.subscibe.period_start) * 100)
251 251
           }
252
-          pce = "width:"+pce+"%";
252
+          pce = 'width:' + pce + '%'
253 253
 
254
-          this.subscibeBan={
255
-            used:'已使用'+used+'天',
256
-            name:'标准版',
257
-            desc:'当前为标准版',
258
-            detail:'可管理60位(含)以下患者',
259
-            leave:leave,
260
-            pay_status:leave?true:false,
261
-            pce:pce,
262
-          };
263
-          break;
254
+          this.subscibeBan = {
255
+            used: '已使用' + used + '天',
256
+            name: '标准版',
257
+            desc: '当前为标准版',
258
+            detail: '可管理200位(含)以下患者',
259
+            leave: leave,
260
+            pay_status: !!leave,
261
+            pce: pce
262
+          }
263
+          break
264 264
 
265 265
         default:
266
-          this.subscibeBan={
267
-            used:'',
268
-            name:'未订阅服务',
269
-            desc:'当前未订阅服务',
270
-            detail:'无法使用血透系统',
271
-            leave:"",
272
-            pay_status:true,
273
-            pce:"",
274
-          };
275
-          break;
266
+          this.subscibeBan = {
267
+            used: '',
268
+            name: '未订阅服务',
269
+            desc: '当前未订阅服务',
270
+            detail: '无法使用血透系统',
271
+            leave: '',
272
+            pay_status: true,
273
+            pce: ''
274
+          }
275
+          break
276 276
       }
277
-    },
277
+    }
278 278
 
279 279
   },
280
-  created(){
281
-    this.subscibe = this.$store.getters.xt_user.subscibe;
282
-    this.GetPatientTotal();
283
-    this.GetServerTime();
280
+  created() {
281
+    this.subscibe = this.$store.getters.xt_user.subscibe
282
+    this.GetPatientTotal()
283
+    this.GetServerTime()
284 284
   },
285
-  watch:{
286
-    serverTime:function () {
287
-      if(this.serverTime>0 && this.patientTotal>0) {
288
-        this.initSubscibe();
285
+  watch: {
286
+    serverTime: function() {
287
+      if (this.serverTime > 0 && this.patientTotal > 0) {
288
+        this.initSubscibe()
289 289
       }
290 290
     },
291
-    patientTotal:function () {
292
-      if(this.serverTime>0 && this.patientTotal>0) {
293
-        this.initSubscibe();
291
+    patientTotal: function() {
292
+      if (this.serverTime > 0 && this.patientTotal > 0) {
293
+        this.initSubscibe()
294 294
       }
295 295
     }
296 296
   }
297 297
 
298
-};
298
+}
299 299
 </script>
300 300
 
301 301
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 111 - 119
src/xt_pages/service/serviceOrder.vue 查看文件

@@ -49,7 +49,7 @@
49 49
         <li  tag="li" class="items" >
50 50
           <div class="inner">
51 51
             <h2 class="name">免费版</h2>
52
-            <p class="text">最多可管理20位患者</p>
52
+            <p class="text">最多可管理100位患者</p>
53 53
             <span class="price size">免费使用</span>
54 54
             <!-- <span  @click="isSCRMClick = 1" v-if="isSCRMClick == 2" class="buy active">已选购</span> -->
55 55
             <span class="buy active">已开通</span>
@@ -58,8 +58,8 @@
58 58
         <li  tag="li" class="items" >
59 59
           <div class="inner">
60 60
             <h2 class="name">标准版</h2>
61
-            <p class="text">最多可管理60位患者</p>
62
-            <span class="price"><i>¥</i>1998<span class="year">/ 年</span></span>
61
+            <p class="text">最多可管理200位患者</p>
62
+            <span class="price"><i>¥</i>6980<span class="year">/ 年</span></span>
63 63
             <!-- <span  @click="isWxClick = 1" v-if="isWxClick == 2" class="buy active">已选购</span> -->
64 64
             <!-- <span class="buy active">已开通</span> -->
65 65
             <!-- <span @click="selectXt(1)" v-if="isBZClick == 2" class="buy active">已选购</span> -->
@@ -71,7 +71,7 @@
71 71
           <div class="inner">
72 72
             <h2 class="name">专业版</h2>
73 73
             <p class="text">管理的患者数无限制</p>
74
-            <span class="price"><i>¥</i>9998<span class="year">/ 年</span></span>
74
+            <span class="price"><i>¥</i>15800<span class="year">/ 年</span></span>
75 75
             <!-- <span class="price"><i>¥</i>23888<span class="year">/ 年</span></span> -->
76 76
             <!-- <span @click="selectXt(8)" v-if="isXTClick == 2" class="buy active">已选购</span>
77 77
             <span @click="selectXt(8)" v-if="isXTClick == 1" class="buy ">立即选购</span> -->
@@ -102,133 +102,127 @@
102 102
 </template>
103 103
 
104 104
 <script>
105
-
106
-  import {getProduct} from "@/api/service"
105
+  import { getProduct } from '@/api/service'
107 106
 
108 107
   export default {
109
-    name: "ServiceOrder",
108
+    name: 'ServiceOrder',
110 109
     created() {
111 110
       this.getProduct()
112
-
113 111
     },
114 112
     data() {
115 113
       return {
116
-        loading:true,
117
-        bzactive:false,
118
-        bztext:'立即选购',
119
-        bzflag:false,
120
-
121
-        zyactive:false,
122
-        zytext:'立即选购',
123
-        isWxClick:1,
124
-        isXTClick:2,
125
-        isBZClick:2,
126
-        isSCRMClick:1,
114
+        loading: true,
115
+        bzactive: false,
116
+        bztext: '立即选购',
117
+        bzflag: false,
118
+
119
+        zyactive: false,
120
+        zytext: '立即选购',
121
+        isWxClick: 1,
122
+        isXTClick: 2,
123
+        isBZClick: 2,
124
+        isSCRMClick: 1,
127 125
         flag: false,
128
-        time:'',
126
+        time: '',
129 127
         isShowProbationPeriod: false,
130 128
         isShowFormal: false,
131
-        isShowZYPanel:false,
129
+        isShowZYPanel: false,
132 130
         isShowYj: false,
133
-        leftTime:'',
131
+        leftTime: '',
134 132
         num1: 1,
135
-        price:'',
136
-        original_price:'',
137
-        totalPrice:'',
138
-        subscibe:{
133
+        price: '',
134
+        original_price: '',
135
+        totalPrice: '',
136
+        subscibe: {
139 137
           created_time: 0,
140 138
           id: 0,
141 139
           org_id: 0,
142 140
           patients: 0,
143 141
           period_end: 0,
144
-          period_end_time: "0",
142
+          period_end_time: '0',
145 143
           period_start: 0,
146
-          period_start_time: "0",
144
+          period_start_time: '0',
147 145
           state: 0,
148 146
           status: 0,
149
-          updated_time: 0,
147
+          updated_time: 0
150 148
         },
151 149
         products: [
152 150
 
153 151
         ],
154
-        productsMap:{},
155
-        selectProduct:{},
156
-      };
157
-    },
158
-    methods:{
159
-      getProduct:function () {
152
+        productsMap: {},
153
+        selectProduct: {}
154
+      }
155
+  },
156
+    methods: {
157
+      getProduct: function() {
160 158
         getProduct().then(response => {
161
-          
162 159
           if (response.data.state == 0) {
163
-            this.$message.error(response.data.msg);
164
-          }else {
165
-            this.subscibe = response.data.data.subscibe;
166
-            if(this.subscibe.patients>60) {
167
-              this.bzflag = false; //可否购买
168
-              this.bztext = '无法选购';
169
-            }else {
170
-              this.bzflag = true;
171
-              this.bztext = '立即选购';
160
+            this.$message.error(response.data.msg)
161
+          } else {
162
+            this.subscibe = response.data.data.subscibe
163
+            if (this.subscibe.patients > 60) {
164
+              this.bzflag = false // 可否购买
165
+              this.bztext = '无法选购'
166
+            } else {
167
+              this.bzflag = true
168
+              this.bztext = '立即选购'
172 169
             }
173 170
 
174
-            if(this.subscibe.state == 1){//标准版
171
+            if (this.subscibe.state == 1) { // 标准版
175 172
               this.isShowFormal = true
176 173
               this.isShowProbationPeriod = false
177
-              this.isShowZYPanel = false;
178
-              this.isShowYj = false;
174
+              this.isShowZYPanel = false
175
+              this.isShowYj = false
179 176
               this.leftTime = response.data.data.subscibe.period_end - response.data.data.serviceTime
180
-              if(this.leftTime < 0){
177
+              if (this.leftTime < 0) {
181 178
                 this.flag = true
182
-                this.time="已过期"
179
+                this.time = '已过期'
183 180
               }
184
-            }else if(this.subscibe.state == 8){//专业版
185
-              this.isShowProbationPeriod = false;
186
-              this.isShowFormal = false;
187
-              this.isShowZYPanel = true;
188
-              this.isShowYj = false;
181
+            } else if (this.subscibe.state == 8) { // 专业版
182
+              this.isShowProbationPeriod = false
183
+              this.isShowFormal = false
184
+              this.isShowZYPanel = true
185
+              this.isShowYj = false
189 186
               this.leftTime = response.data.data.subscibe.period_end - response.data.data.serviceTime
190
-              if(this.leftTime < 0){
187
+              if (this.leftTime < 0) {
191 188
                 this.flag = true
192
-                this.time="已过期"
189
+                this.time = '已过期'
193 190
               }
194
-            }else if(this.subscibe.state == 2){//试用版
191
+            } else if (this.subscibe.state == 2) { // 试用版
195 192
               this.isShowProbationPeriod = true
196 193
               this.isShowFormal = false
197
-              this.isShowZYPanel = false;
198
-              this.isShowYj = false;
194
+              this.isShowZYPanel = false
195
+              this.isShowYj = false
199 196
               this.leftTime = response.data.data.subscibe.period_end - response.data.data.serviceTime
200
-              if(this.leftTime < 0){
197
+              if (this.leftTime < 0) {
201 198
                 this.flag = true
202
-                this.time="已过期"
199
+                this.time = '已过期'
203 200
               }
204
-            }if(this.subscibe.state == 9){//永乐免费版
201
+            } if (this.subscibe.state == 9) { // 永乐免费版
205 202
               this.isShowProbationPeriod = false
206 203
               this.isShowFormal = false
207
-              this.isShowZYPanel = false;
208
-              this.isShowYj = true;
204
+              this.isShowZYPanel = false
205
+              this.isShowYj = true
209 206
             }
210
-            for(let i = 0; i < response.data.data.products.length; i++){
211
-              this.products.unshift(response.data.data.products[i]);
212
-              this.productsMap[response.data.data.products[i]['edition']] = response.data.data.products[i];
213
-              // this.price = response.data.data.products[0].price
214
-              // this.original_price = response.data.data.products[0].original_price
207
+            for (let i = 0; i < response.data.data.products.length; i++) {
208
+              this.products.unshift(response.data.data.products[i])
209
+              this.productsMap[response.data.data.products[i]['edition']] = response.data.data.products[i]
210
+            // this.price = response.data.data.products[0].price
211
+            // this.original_price = response.data.data.products[0].original_price
215 212
             }
216 213
           }
217
-
218
-          
219
-          this.loading = false;
220
-          
214
+  
215
+          this.loading = false
221 216
         })
222
-
223
-      },timeDown() {
224
-        let leftTime =   this.leftTime
225
-        let d = parseInt(leftTime / (24 * 60 * 60))
226
-        let h = this.formate(parseInt(leftTime / (60 * 60) % 24))
227
-        let m = this.formate(parseInt(leftTime / 60 % 60))
228
-        let s = this.formate(parseInt(leftTime % 60))
217
+      }, timeDown() {
218
+        const leftTime = this.leftTime
219
+        const d = parseInt(leftTime / (24 * 60 * 60))
220
+        const h = this.formate(parseInt(leftTime / (60 * 60) % 24))
221
+        const m = this.formate(parseInt(leftTime / 60 % 60))
222
+        const s = this.formate(parseInt(leftTime % 60))
229 223
         if (leftTime <= 0) {
230 224
           this.flag = true
231
-        }else {
225
+        } else {
232 226
           this.time = d + '天' + h + '小时' + m + '分' + s + '秒'
233 227
         }
234 228
       }, formate(time) {
@@ -238,60 +232,58 @@
238 232
           return `0${time}`
239 233
         }
240 234
       },
241
-      handleChange:function (val) {
235
+      handleChange: function(val) {
242 236
         this.totalPrice = this.price * val
243 237
       },
244
-      jumpToNewUrl:function () {
245
-        this.$router.push("/servicePay?amount="+this.num1+'&serve_id='+this.selectProduct['id']);
238
+      jumpToNewUrl: function() {
239
+        this.$router.push('/servicePay?amount=' + this.num1 + '&serve_id=' + this.selectProduct['id'])
246 240
       },
247 241
       selectXt(type) {
248
-        if(type==1 && this.bzflag) {
249
-
250
-          if(!(type in this.productsMap)) {
251
-            this.$message.error("没有此服务,无法订购");
252
-            return false;
242
+        if (type == 1 && this.bzflag) {
243
+          if (!(type in this.productsMap)) {
244
+            this.$message.error('没有此服务,无法订购')
245
+            return false
253 246
           }
254 247
 
255
-          this.bzactive = true;
256
-          this.bztext = '已选购';
257
-          this.zyactive = false;
258
-          this.zytext = '立即选购';
259
-
260
-          this.selectProduct = this.productsMap[type];
261
-          this.price = this.selectProduct['price'];
262
-          this.totalPrice = this.price;
263
-          this.num1 = 1;
264
-          // this.isXTClick = 2;
265
-          // this.isBZClick = 1;
266
-        }else if(type==8) {
267
-          if(!(type in this.productsMap)) {
268
-            this.$message.error("没有此服务,无法订购");
269
-            return false;
248
+          this.bzactive = true
249
+          this.bztext = '已选购'
250
+          this.zyactive = false
251
+          this.zytext = '立即选购'
252
+
253
+          this.selectProduct = this.productsMap[type]
254
+          this.price = this.selectProduct['price']
255
+          this.totalPrice = this.price
256
+          this.num1 = 1
257
+        // this.isXTClick = 2;
258
+        // this.isBZClick = 1;
259
+        } else if (type == 8) {
260
+          if (!(type in this.productsMap)) {
261
+            this.$message.error('没有此服务,无法订购')
262
+            return false
270 263
           }
271
-          this.bzactive = false;
272
-          this.bztext = this.bzflag?'立即选购':'无法选购';
273
-          this.zyactive = true;
274
-          this.zytext = '已选购';
275
-          this.selectProduct = this.productsMap[type];
276
-          this.price = this.selectProduct['price'];
277
-          this.totalPrice = this.price;
278
-          this.num1 = 1;
279
-        }else {
280
-          this.selectProduct = {};
264
+          this.bzactive = false
265
+          this.bztext = this.bzflag ? '立即选购' : '无法选购'
266
+          this.zyactive = true
267
+          this.zytext = '已选购'
268
+          this.selectProduct = this.productsMap[type]
269
+          this.price = this.selectProduct['price']
270
+          this.totalPrice = this.price
271
+          this.num1 = 1
272
+        } else {
273
+          this.selectProduct = {}
281 274
         }
282 275
       }
283 276
     },
284 277
     mounted() {
285
-      let time = setInterval(() => {
278
+      const time = setInterval(() => {
286 279
         if (this.flag == true) {
287 280
           clearInterval(time)
288 281
         }
289 282
         this.leftTime = this.leftTime - 1
290 283
         this.timeDown()
291 284
       }, 1000)
292
-
293
-    },
294
-  };
285
+    }
286
+  }
295 287
 </script>
296 288
 
297 289
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 0 - 13
src/xt_pages/stock/Dialog/stockOutDetailDialog.vue 查看文件

@@ -1,13 +0,0 @@
1
-<template>
2
-
3
-</template>
4
-
5
-<script>
6
-    export default {
7
-        name: "stock-out-detail-dialog"
8
-    }
9
-</script>
10
-
11
-<style scoped>
12
-
13
-</style>

+ 314 - 318
src/xt_pages/user/components/PatientForm.vue 查看文件

@@ -371,8 +371,8 @@
371 371
 </template>
372 372
 
373 373
 <script>
374
-import { getToken } from "@/api/qiniu";
375
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
374
+import { getToken } from '@/api/qiniu'
375
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
376 376
 import {
377 377
   getFileExtension,
378 378
   isCardNo,
@@ -380,84 +380,84 @@ import {
380 380
   isPositiveInteger,
381 381
   dialysisAge,
382 382
   uParseTime
383
-} from "@/utils/tools";
383
+} from '@/utils/tools'
384 384
 import {
385 385
   generateDialysisNo,
386 386
   createPatient,
387 387
   editPatient,
388 388
   fetchPatient,
389
-  GetPatientTotal,
390
-} from "@/api/patient";
389
+  GetPatientTotal
390
+} from '@/api/patient'
391 391
 // import { fetchAllDoctorAndNurse } from "@/api/doctor";
392
-import { getDataConfig } from "@/utils/data";
392
+import { getDataConfig } from '@/utils/data'
393 393
 
394 394
 const defaultForm = {
395
-  avatar: "https://images.shengws.com/201809182128111.png",
396
-  name: "",
397
-  alias:'',
398
-  idCardNo: "",
399
-  dialysisNo: "",
400
-  gender: "",
401
-  birth: "",
402
-  nation: "",
403
-  native_place: "",
404
-  height: "",
405
-  maritalStatus: "",
406
-  children:'',
407
-  admissionNumber: "",
408
-  reimbursementWayID: "",
409
-  healthCareNo: "",
410
-  phone: "",
411
-  homeTelephone: "",
412
-  relative_phone: "",
413
-  relative_relations: "",
414
-  lapseto:"",
415
-  homeAddress: "",
416
-  work: "",
417
-  unit_address: "",
418
-  profession: "",
419
-  education: "",
420
-  source: "",
421
-  is_hospital_first_dialysis: "",
422
-  firstDialysisDate: "",
423
-  first_dialysis_hospital: "",
424
-  predialysis_condition:[],
425
-  pre_hospital_dialysis_frequency:"",
426
-  pre_hospital_dialysis_times:"",
427
-  hospital_first_dialysis_date:"",
395
+  avatar: 'https://images.shengws.com/201809182128111.png',
396
+  name: '',
397
+  alias: '',
398
+  idCardNo: '',
399
+  dialysisNo: '',
400
+  gender: '',
401
+  birth: '',
402
+  nation: '',
403
+  native_place: '',
404
+  height: '',
405
+  maritalStatus: '',
406
+  children: '',
407
+  admissionNumber: '',
408
+  reimbursementWayID: '',
409
+  healthCareNo: '',
410
+  phone: '',
411
+  homeTelephone: '',
412
+  relative_phone: '',
413
+  relative_relations: '',
414
+  lapseto: '',
415
+  homeAddress: '',
416
+  work: '',
417
+  unit_address: '',
418
+  profession: '',
419
+  education: '',
420
+  source: '',
421
+  is_hospital_first_dialysis: '',
422
+  firstDialysisDate: '',
423
+  first_dialysis_hospital: '',
424
+  predialysis_condition: [],
425
+  pre_hospital_dialysis_frequency: '',
426
+  pre_hospital_dialysis_times: '',
427
+  hospital_first_dialysis_date: '',
428 428
   contagions: [],
429 429
   diseases: [],
430
-  remark:"",
431
-  diagnose: "",
432
-//  patientType: "",
433
-//   partition: "",
434
-//   bed: "",
435
-//   age: "",
436
-//   healthCareDueDate: "",
437
-//   blood: "",
438
-//   rh: "",
439
-//   healthCareDueAlertDate: "",
440
-//   receivingDate: "",
441
-//   dialysisAge: "",
442
-//   induction: "",
443
-//   initial: "",
444
-//   dialysisTotal: "",
445
-//   doctor: "",
446
-//   nurse: "",
447
-//   assessment: "",
448
-
449
-  patient_complains: "",
450
-  present_history: "",
451
-  past_history: "",
452
-  temperature: "",
453
-  pulse: "",
454
-  respiratory: "",
455
-  sbp: "",
456
-  dbp: "",
457
-};
430
+  remark: '',
431
+  diagnose: '',
432
+  //  patientType: "",
433
+  //   partition: "",
434
+  //   bed: "",
435
+  //   age: "",
436
+  //   healthCareDueDate: "",
437
+  //   blood: "",
438
+  //   rh: "",
439
+  //   healthCareDueAlertDate: "",
440
+  //   receivingDate: "",
441
+  //   dialysisAge: "",
442
+  //   induction: "",
443
+  //   initial: "",
444
+  //   dialysisTotal: "",
445
+  //   doctor: "",
446
+  //   nurse: "",
447
+  //   assessment: "",
448
+
449
+  patient_complains: '',
450
+  present_history: '',
451
+  past_history: '',
452
+  temperature: '',
453
+  pulse: '',
454
+  respiratory: '',
455
+  sbp: '',
456
+  dbp: ''
457
+}
458 458
 
459 459
 export default {
460
-  name: "patientForm",
460
+  name: 'patientForm',
461 461
   props: {
462 462
     isEdit: {
463 463
       type: Boolean,
@@ -466,50 +466,50 @@ export default {
466 466
   },
467 467
   data() {
468 468
     var checkPhone = (rule, value, callback) => {
469
-      if (value.length==0) {
470
-        return callback(new Error('本人电话不能为空'));
469
+      if (value.length == 0) {
470
+        return callback(new Error('本人电话不能为空'))
471 471
       }
472 472
       if (!value.match(/^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/)) {
473
-        return callback(new Error('请填写正确的电话(手机号码)'));
473
+        return callback(new Error('请填写正确的电话(手机号码)'))
474 474
       }
475
-      callback();
476
-    };
475
+      callback()
476
+    }
477 477
     var checkFamilyPhone = (rule, value, callback) => {
478
-      if (value.length==0) {
479
-        return callback(new Error('家属电话不能为空'));
478
+      if (value.length == 0) {
479
+        return callback(new Error('家属电话不能为空'))
480 480
       }
481 481
       if (!value.match(/^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/)) {
482
-        return callback(new Error('请填写正确的电话(手机号码)'));
482
+        return callback(new Error('请填写正确的电话(手机号码)'))
483 483
       }
484
-      callback();
485
-    };
484
+      callback()
485
+    }
486 486
 
487 487
     return {
488 488
       generic_info_fold: true,
489 489
       treat_info_fold: true,
490 490
 
491
-      patientTotal:0,
492
-      pageLoad:true,
493
-      avatarFlag:false,
494
-      subscibeFlag:false,
495
-      orgname:'',
496
-      adminusername:'',
491
+      patientTotal: 0,
492
+      pageLoad: true,
493
+      avatarFlag: false,
494
+      subscibeFlag: false,
495
+      orgname: '',
496
+      adminusername: '',
497 497
       form: Object.assign({}, defaultForm),
498 498
       formSubmit: true,
499
-      submitMethod: "",
500
-      uploadData: { token: "", key: "" },
501
-      dialogImageUrl: "",
502
-      qiniuDomain: "https://images.shengws.com/",
499
+      submitMethod: '',
500
+      uploadData: { token: '', key: '' },
501
+      dialogImageUrl: '',
502
+      qiniuDomain: 'https://images.shengws.com/',
503 503
       dialogVisible: false,
504 504
       // typeOptions: null,
505 505
       // styleOptions: null,
506
-      sourceOptions: [{ value: 1, label: "门诊" }, { value: 2, label: "住院" }],
507
-      lapsetoOptions: [{ value: 1, label: "留治" }, { value: 2, label: "转出" }],
506
+      sourceOptions: [{ value: 1, label: '门诊' }, { value: 2, label: '住院' }],
507
+      lapsetoOptions: [{ value: 1, label: '留治' }, { value: 2, label: '转出' }],
508 508
 
509 509
       // partitionOptions: null,
510
-      sexOptions: [{ value: 1, label: "男" }, { value: 2, label: "女" }],
511
-      isHospitalFirstDialysisOptions: [{ value: 1, label: "是" }, { value: 2, label: "否" }],
512
-      predialysisConditionOptions: [{ value: 1, label: "腹膜透析" }, { value: 2, label: "肾移植" }],
510
+      sexOptions: [{ value: 1, label: '男' }, { value: 2, label: '女' }],
511
+      isHospitalFirstDialysisOptions: [{ value: 1, label: '是' }, { value: 2, label: '否' }],
512
+      predialysisConditionOptions: [{ value: 1, label: '腹膜透析' }, { value: 2, label: '肾移植' }],
513 513
       maritalOptions: null,
514 514
       wayOptions: null,
515 515
       educationOptions: null,
@@ -521,383 +521,380 @@ export default {
521 521
       checkDisease: null,
522 522
       contagionList: null,
523 523
       loading: null,
524
-      submitMsg: "",
524
+      submitMsg: '',
525 525
       patientID: 0,
526 526
 
527
-      subscibe:{},
527
+      subscibe: {},
528 528
       rules: {
529
-        avatar: [{ required: true, message: "请上传头像", trigger: "blur" }],
530
-        patientType: [{ required: true, message: "请选择患者类型", trigger: "blur" }],
531
-        dialysisNo: [{ required: true, message: "请填写透析号", trigger: "blur" }],
529
+        avatar: [{ required: true, message: '请上传头像', trigger: 'blur' }],
530
+        patientType: [{ required: true, message: '请选择患者类型', trigger: 'blur' }],
531
+        dialysisNo: [{ required: true, message: '请填写透析号', trigger: 'blur' }],
532 532
         phone: [{ validator: checkPhone, trigger: 'blur' }],
533
-        source: [{ required: true, message: "请选择患者来源", trigger: "blur" }],
534
-        lapseto: [{ required: true, message: "请选择治疗状态", trigger: "blur" }],
535
-        name: [{ required: true, message: "请填写姓名", trigger: "blur" }],
536
-        gender: [{ required: true, message: "请选择性别", trigger: "blur" }],
537
-        idCardNo: [{ required: true, message: "请填写身份证号", trigger: "blur" }],
538
-        birth: [{ required: true, message: "请填写生日", trigger: "blur" }],
533
+        source: [{ required: true, message: '请选择患者来源', trigger: 'blur' }],
534
+        lapseto: [{ required: true, message: '请选择治疗状态', trigger: 'blur' }],
535
+        name: [{ required: true, message: '请填写姓名', trigger: 'blur' }],
536
+        gender: [{ required: true, message: '请选择性别', trigger: 'blur' }],
537
+        idCardNo: [{ required: true, message: '请填写身份证号', trigger: 'blur' }],
538
+        birth: [{ required: true, message: '请填写生日', trigger: 'blur' }]
539 539
         // homeTelephone: [{ validator: checkFamilyPhone, trigger: "blur" }],
540 540
         // homeAddress: [{ required: true, message: "请填写住址", trigger: "blur" }],
541 541
       }
542
-    };
542
+    }
543 543
   },
544
-  components:{
544
+  components: {
545 545
     BreadCrumb
546 546
   },
547 547
   computed: {
548 548
     generic_fold_icon: function() {
549
-      return this.generic_info_fold ? "el-icon-arrow-down" : "el-icon-arrow-up"
549
+      return this.generic_info_fold ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
550 550
     },
551 551
     treat_fold_icon: function() {
552
-      return this.treat_info_fold ? "el-icon-arrow-down" : "el-icon-arrow-up"
553
-    },
552
+      return this.treat_info_fold ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
553
+    }
554 554
   },
555 555
   created() {
556 556
     // this.styleOptions = this.$store.getters.patient_types;
557 557
     // this.partitionOptions = this.$store.getters.partitions;
558
-    this.maritalOptions = getDataConfig("patient", "marital_options");
559
-    this.wayOptions =  getDataConfig("patient", "reimbursement_ways");
558
+    this.maritalOptions = getDataConfig('patient', 'marital_options')
559
+    this.wayOptions = getDataConfig('patient', 'reimbursement_ways')
560 560
     // this.typeOptions = this.$store.getters.blood_types;
561 561
     // this.rhOptions = this.$store.getters.rh;
562
-    this.educationOptions = getDataConfig("patient", "education_types");
563
-    this.professionOptions = getDataConfig("patient", "profession_options");
562
+    this.educationOptions = getDataConfig('patient', 'education_types')
563
+    this.professionOptions = getDataConfig('patient', 'profession_options')
564 564
     // this.inductionOptions = this.$store.getters.induction_options;
565
-    this.contagionList = this.$store.getters.contagions;
566
-    this.checkDisease = this.$store.getters.disease;
565
+    this.contagionList = this.$store.getters.contagions
566
+    this.checkDisease = this.$store.getters.disease
567 567
 
568
-    this.subscibe = this.$store.getters.xt_user.subscibe;
569
-    this.GetPatientTotal();
570
-    
568
+    this.subscibe = this.$store.getters.xt_user.subscibe
569
+    this.GetPatientTotal()
571 570
 
572 571
     // this.fetchAllDoctorAndNurse();
573
-    this.pageLoad = false;
574
-    
575
-    var xtuser = this.$store.getters.xt_user;
576
-    this.orgname = xtuser.org.org_name;
577
-    this.adminusername = xtuser.user.user_name;
572
+    this.pageLoad = false
578 573
 
574
+    var xtuser = this.$store.getters.xt_user
575
+    this.orgname = xtuser.org.org_name
576
+    this.adminusername = xtuser.user.user_name
579 577
 
580 578
     if (this.isEdit) {
581
-      this.submitMsg = "修改患者信息成功";
582
-      const id = this.$route.params && this.$route.params.id;
583
-      this.patientID = parseInt(id);
579
+      this.submitMsg = '修改患者信息成功'
580
+      const id = this.$route.params && this.$route.params.id
581
+      this.patientID = parseInt(id)
584 582
       if (isNaN(this.patientID) || this.patientID <= 0) {
585 583
         this.$notify.error({
586
-          title: "错误",
587
-          message: "无效的id"
588
-        });
589
-        this.$router.back(-1);
584
+          title: '错误',
585
+          message: '无效的id'
586
+        })
587
+        this.$router.back(-1)
590 588
       }
591
-      this.fetchPatient(id);
592
-      this.avatarFlag = true;
589
+      this.fetchPatient(id)
590
+      this.avatarFlag = true
593 591
     } else {
594
-      this.submitMsg = "新增患者成功";
595
-      this.form = Object.assign({}, defaultForm);
592
+      this.submitMsg = '新增患者成功'
593
+      this.form = Object.assign({}, defaultForm)
596 594
     }
597 595
   },
598 596
   methods: {
599
-    
600
-    GetPatientTotal(){
601
-      GetPatientTotal().then(response=>{
602
-        if(response.data.state==1) {
603
-          this.patientTotal = response.data.data.total;
604
-          if((this.subscibe.state==2 && this.patientTotal>=20)||(this.subscibe.state==1 && this.patientTotal>=60)){
597
+
598
+    GetPatientTotal() {
599
+      GetPatientTotal().then(response => {
600
+        if (response.data.state == 1) {
601
+          this.patientTotal = response.data.data.total
602
+          if ((this.subscibe.state == 2 && this.patientTotal >= 100) || (this.subscibe.state == 1 && this.patientTotal >= 200)) {
605 603
             this.$alert('患者数已达到当前服务版本病人数,需要升级到更高的版本', '提示', {
606 604
               confirmButtonText: '确定',
607
-              showClose:false,
605
+              showClose: false,
608 606
               callback: action => {
609
-                this.$router.push('/service/buy');
607
+                this.$router.push('/service/buy')
610 608
               }
611
-            });
612
-          }else {
613
-            this.subscibeFlag = true;
609
+            })
610
+          } else {
611
+            this.subscibeFlag = true
614 612
           }
615
-    
616
-        }else {
617
-          this.$message.error(response.data.msg);
613
+        } else {
614
+          this.$message.error(response.data.msg)
618 615
         }
619
-      }).catch(e=>{
616
+      }).catch(e => {
620 617
 
621
-      });
618
+      })
622 619
     },
623 620
 
624
-    changeGender(value){
621
+    changeGender(value) {
625 622
       if (this.avatarFlag) {
626
-        return false;
623
+        return false
627 624
       }
628
-      if (value==1) {
629
-        this.form.avatar = "https://images.shengws.com/201809182128111.png";
630
-      }else if (value==2) {
631
-        this.form.avatar = "https://images.shengws.com/201809182128222.png";
632
-      }else {
633
-        
625
+      if (value == 1) {
626
+        this.form.avatar = 'https://images.shengws.com/201809182128111.png'
627
+      } else if (value == 2) {
628
+        this.form.avatar = 'https://images.shengws.com/201809182128222.png'
629
+      } else {
630
+
634 631
       }
635 632
     },
636 633
     resetForm(formName) {
637
-      this.$refs[formName].resetFields();
634
+      this.$refs[formName].resetFields()
638 635
     },
639 636
     onReSubmit(formName) {
640
-      this.submitForm(formName, "renew");
637
+      this.submitForm(formName, 'renew')
641 638
     },
642 639
     onSubmit(formName) {
643
-      this.submitForm(formName, "redict");
640
+      this.submitForm(formName, 'redict')
644 641
     },
645 642
     submitForm(formName, action) {
646 643
       if (!this.formSubmit) {
647
-        return false;
644
+        return false
648 645
       }
649 646
       this.$refs[formName].validate(valid => {
650 647
         if (valid) {
651
-          this.formSubmit = false;
648
+          this.formSubmit = false
652 649
           if (this.isEdit) {
653 650
             editPatient(this.patientID, this.form)
654 651
               .then(response => {
655 652
                 if (response.data.state == 0) {
656
-                  this.$message.error(response.data.msg);
657
-                  this.formSubmit = true;
658
-                  return false;
653
+                  this.$message.error(response.data.msg)
654
+                  this.formSubmit = true
655
+                  return false
659 656
                 } else {
660
-                  this.formSubmit = false;
657
+                  this.formSubmit = false
661 658
                   this.$notify({
662
-                    title: "成功",
659
+                    title: '成功',
663 660
                     message: this.submitMsg,
664
-                    type: "success",
661
+                    type: 'success',
665 662
                     duration: 2000
666
-                  });
667
-                  this.$refs[formName].resetFields();
668
-                  if (action !== "renew") {
669
-                    this.$router.back(-1);
663
+                  })
664
+                  this.$refs[formName].resetFields()
665
+                  if (action !== 'renew') {
666
+                    this.$router.back(-1)
670 667
                   }
671
-                  this.formSubmit = true;
672
-                  return false;
668
+                  this.formSubmit = true
669
+                  return false
673 670
                 }
674 671
               })
675 672
               .catch(err => {
676
-                this.$message.error("网络异常");
677
-                this.formSubmit = true;
678
-                return false;
679
-              });
673
+                this.$message.error('网络异常')
674
+                this.formSubmit = true
675
+                return false
676
+              })
680 677
           } else {
681 678
             createPatient(this.form)
682 679
               .then(response => {
683 680
                 if (response.data.state == 0) {
684
-                  this.$message.error(response.data.msg);
685
-                  this.formSubmit = true;
686
-                  return false;
681
+                  this.$message.error(response.data.msg)
682
+                  this.formSubmit = true
683
+                  return false
687 684
                 } else {
688
-                  this.formSubmit = false;
685
+                  this.formSubmit = false
689 686
                   this.$notify({
690
-                    title: "成功",
687
+                    title: '成功',
691 688
                     message: this.submitMsg,
692
-                    type: "success",
689
+                    type: 'success',
693 690
                     duration: 2000
694
-                  });
695
-                  this.$refs[formName].resetFields();
696
-                  this.$store.dispatch('SetSubscibePatients');
697
-                  var sub = this.$store.getters.xt_user.subscibe;
698
-                  console.log(sub);
699
-                  if (action !== "renew") {
700
-                    this.$router.back(-1);
691
+                  })
692
+                  this.$refs[formName].resetFields()
693
+                  this.$store.dispatch('SetSubscibePatients')
694
+                  var sub = this.$store.getters.xt_user.subscibe
695
+                  console.log(sub)
696
+                  if (action !== 'renew') {
697
+                    this.$router.back(-1)
701 698
                   }
702
-                  return false;
699
+                  return false
703 700
                 }
704 701
               })
705 702
               .catch(err => {
706
-                this.$message.error("网络异常");
707
-                this.formSubmit = true;
708
-                return false;
709
-              });
703
+                this.$message.error('网络异常')
704
+                this.formSubmit = true
705
+                return false
706
+              })
710 707
           }
711 708
         } else {
712
-          this.formSubmit = true;
713
-          return false;
709
+          this.formSubmit = true
710
+          return false
714 711
         }
715
-      });
712
+      })
716 713
     },
717 714
     handlePictureCardPreview(file) {
718
-      this.dialogImageUrl = file.url;
719
-      this.dialogVisible = true;
715
+      this.dialogImageUrl = file.url
716
+      this.dialogVisible = true
720 717
     },
721 718
     handleAvatarError(err, file, fileList) {
722
-      this.$message.error(err);
723
-      this.loading.close();
724
-      return false;
719
+      this.$message.error(err)
720
+      this.loading.close()
721
+      return false
725 722
     },
726 723
     handleAvatarSuccess(res, file) {
727 724
       // this.imageUrl = URL.createObjectURL(file.raw);
728
-      this.form.avatar = this.qiniuDomain + res.url;
729
-      this.avatarFlag = true;
730
-      this.loading.close();
725
+      this.form.avatar = this.qiniuDomain + res.url
726
+      this.avatarFlag = true
727
+      this.loading.close()
731 728
     },
732 729
     beforeAvatarUpload(file) {
733 730
       // const isJPG = file.type === "image/jpeg";
734
-      var fileType = file.type;
735
-      const isJPG = fileType.indexOf("image") > -1;
736
-      const isLt2M = file.size / 1024 / 1024 < 2;
731
+      var fileType = file.type
732
+      const isJPG = fileType.indexOf('image') > -1
733
+      const isLt2M = file.size / 1024 / 1024 < 2
737 734
 
738 735
       if (!isJPG) {
739
-        this.$message.error("只能上传图片");
740
-        return false;
736
+        this.$message.error('只能上传图片')
737
+        return false
741 738
       }
742 739
       if (!isLt2M) {
743
-        this.$message.error("上传头像图片大小不能超过 2MB!");
744
-        return false;
740
+        this.$message.error('上传头像图片大小不能超过 2MB!')
741
+        return false
745 742
       }
746 743
 
747
-      var date = new Date();
748
-      var ext = getFileExtension(file.name);
744
+      var date = new Date()
745
+      var ext = getFileExtension(file.name)
749 746
       var key =
750 747
         date.getFullYear() +
751
-        "/" +
748
+        '/' +
752 749
         (date.getMonth() + 1) +
753
-        "/" +
750
+        '/' +
754 751
         date.getDate() +
755
-        "/" +
752
+        '/' +
756 753
         date.getHours() +
757
-        "/" +
754
+        '/' +
758 755
         date.getMinutes() +
759
-        "/" +
756
+        '/' +
760 757
         date.getSeconds() +
761
-        "/" +
762
-        "_s_" +
758
+        '/' +
759
+        '_s_' +
763 760
         file.uid +
764
-        "." +
765
-        ext;
761
+        '.' +
762
+        ext
766 763
       this.loading = this.$loading({
767 764
         lock: true,
768
-        text: "上传中...",
769
-        spinner: "el-icon-loading",
770
-        background: "rgba(0, 0, 0, 0.7)"
771
-      });
765
+        text: '上传中...',
766
+        spinner: 'el-icon-loading',
767
+        background: 'rgba(0, 0, 0, 0.7)'
768
+      })
772 769
 
773
-      const _self = this;
770
+      const _self = this
774 771
       return new Promise((resolve, reject) => {
775 772
         getToken()
776 773
           .then(response => {
777
-            const token = response.data.data.uptoken;
778
-            _self._data.uploadData.token = token;
779
-            _self._data.uploadData.key = key;
780
-            resolve(true);
774
+            const token = response.data.data.uptoken
775
+            _self._data.uploadData.token = token
776
+            _self._data.uploadData.key = key
777
+            resolve(true)
781 778
           })
782 779
           .catch(err => {
783
-            console.log(err);
784
-            reject(false);
785
-            this.loading.close();
786
-          });
787
-      });
780
+            console.log(err)
781
+            reject(false)
782
+            this.loading.close()
783
+          })
784
+      })
788 785
     },
789 786
     generatedialysisno() {
790 787
       generateDialysisNo().then(response => {
791
-        this.form.dialysisNo = response.data.data.no + "";
792
-      });
788
+        this.form.dialysisNo = response.data.data.no + ''
789
+      })
793 790
     },
794 791
     checkIdCardNo() {
795 792
       if (!isCardNo(this.form.idCardNo)) {
796
-        this.$message.error("身份证号码信息有误!");
797
-        this.form.birth = "";
798
-        return false;
793
+        this.$message.error('身份证号码信息有误!')
794
+        this.form.birth = ''
795
+        return false
799 796
       }
800
-      var thisLen = this.form.idCardNo.length;
801
-      var birth = "";
797
+      var thisLen = this.form.idCardNo.length
798
+      var birth = ''
802 799
       if (thisLen == 15) {
803
-        birth = "19" + this.form.idCardNo.substr(6, 6);
800
+        birth = '19' + this.form.idCardNo.substr(6, 6)
804 801
       } else {
805
-        birth = this.form.idCardNo.substr(6, 8);
802
+        birth = this.form.idCardNo.substr(6, 8)
806 803
       }
807 804
       this.form.birth =
808 805
         birth.substr(0, 4) +
809
-        "-" +
806
+        '-' +
810 807
         birth.substr(4, 2) +
811
-        "-" +
812
-        birth.substr(6, 2);
808
+        '-' +
809
+        birth.substr(6, 2)
813 810
 
814
-      this.form.age = jsGetAge(this.form.birth, "-");
811
+      this.form.age = jsGetAge(this.form.birth, '-')
815 812
     },
816 813
     hadSelectBirth() {
817
-      this.form.age = jsGetAge(this.form.birth, "-");
814
+      this.form.age = jsGetAge(this.form.birth, '-')
818 815
     },
819 816
     checkHeight() {
820 817
       if (!isPositiveInteger(this.form.height)) {
821
-        this.$message.error("身高请填写正整数!");
822
-        return false;
818
+        this.$message.error('身高请填写正整数!')
819
+        return false
823 820
       }
824 821
     },
825 822
     selectFirstDialysisDate() {
826
-      this.form.dialysisAge = dialysisAge(this.form.firstDialysisDate);
823
+      this.form.dialysisAge = dialysisAge(this.form.firstDialysisDate)
827 824
     },
828 825
     fetchPatient(id) {
829 826
       fetchPatient(id)
830 827
         .then(response => {
831 828
           if (response.data.state == 1) {
832
-            this.$emit("tran-patient-info", response.data.data.patient);
833
-            var patietInfo = response.data.data.patient;
834
-            this.form.avatar = patietInfo.avatar;
835
-            this.form.name = patietInfo.name;
836
-            this.form.alias = patietInfo.alias;
837
-            this.form.idCardNo = patietInfo.id_card_no;
838
-            this.form.dialysisNo = patietInfo.dialysis_no;
839
-            this.form.gender = patietInfo.gender;
829
+            this.$emit('tran-patient-info', response.data.data.patient)
830
+            var patietInfo = response.data.data.patient
831
+            this.form.avatar = patietInfo.avatar
832
+            this.form.name = patietInfo.name
833
+            this.form.alias = patietInfo.alias
834
+            this.form.idCardNo = patietInfo.id_card_no
835
+            this.form.dialysisNo = patietInfo.dialysis_no
836
+            this.form.gender = patietInfo.gender
840 837
             if (patietInfo.gender == 1 || patietInfo.gender == 2) {
841
-              this.form.gender = patietInfo.gender;
838
+              this.form.gender = patietInfo.gender
842 839
             }
843
-            this.form.birth = uParseTime(patietInfo.birthday, "{y}-{m}-{d}");
840
+            this.form.birth = uParseTime(patietInfo.birthday, '{y}-{m}-{d}')
844 841
             this.form.nation = patietInfo.nation
845 842
             this.form.native_place = patietInfo.native_place
846
-            this.form.height = patietInfo.height + "";
843
+            this.form.height = patietInfo.height + ''
847 844
             // this.form.age = jsGetAge(this.form.birth, "-");
848 845
             if (patietInfo.marital_status > 0) {
849
-              this.form.maritalStatus = patietInfo.marital_status;
846
+              this.form.maritalStatus = patietInfo.marital_status
850 847
             }
851
-            this.form.children = patietInfo.children;
852
-            this.form.admissionNumber = patietInfo.admission_number;
848
+            this.form.children = patietInfo.children
849
+            this.form.admissionNumber = patietInfo.admission_number
853 850
             if (patietInfo.reimbursement_way_id > 0) {
854
-              this.form.reimbursementWayID = patietInfo.reimbursement_way_id;
851
+              this.form.reimbursementWayID = patietInfo.reimbursement_way_id
855 852
             }
856
-            this.form.healthCareNo = patietInfo.health_care_no;
857
-            this.form.phone = patietInfo.phone;
858
-            this.form.homeTelephone = patietInfo.home_telephone;
859
-            this.form.relative_phone = patietInfo.relative_phone;
860
-            this.form.relative_relations = patietInfo.relative_relations;
861
-            this.form.homeAddress = patietInfo.home_address;
862
-            this.form.work = patietInfo.work_unit;
863
-            this.form.unit_address = patietInfo.unit_address;
853
+            this.form.healthCareNo = patietInfo.health_care_no
854
+            this.form.phone = patietInfo.phone
855
+            this.form.homeTelephone = patietInfo.home_telephone
856
+            this.form.relative_phone = patietInfo.relative_phone
857
+            this.form.relative_relations = patietInfo.relative_relations
858
+            this.form.homeAddress = patietInfo.home_address
859
+            this.form.work = patietInfo.work_unit
860
+            this.form.unit_address = patietInfo.unit_address
864 861
             if (patietInfo.profession > 0) {
865
-              this.form.profession = patietInfo.profession;
862
+              this.form.profession = patietInfo.profession
866 863
             }
867 864
             if (patietInfo.education_level > 0) {
868
-              this.form.education = patietInfo.education_level;
865
+              this.form.education = patietInfo.education_level
869 866
             }
870 867
             if (patietInfo.source == 1 || patietInfo.source == 2) {
871
-              this.form.source = patietInfo.source;
868
+              this.form.source = patietInfo.source
872 869
             }
873 870
             if (patietInfo.lapseto == 1 || patietInfo.lapseto == 2) {
874
-              this.form.lapseto = patietInfo.lapseto;
871
+              this.form.lapseto = patietInfo.lapseto
875 872
             }
876 873
             if (patietInfo.is_hospital_first_dialysis == 1 || patietInfo.is_hospital_first_dialysis == 2) {
877
-              this.form.is_hospital_first_dialysis = patietInfo.is_hospital_first_dialysis;
874
+              this.form.is_hospital_first_dialysis = patietInfo.is_hospital_first_dialysis
878 875
             }
879
-            if (patietInfo.first_dialysis_date!=0) {
876
+            if (patietInfo.first_dialysis_date != 0) {
880 877
               this.form.firstDialysisDate = uParseTime(
881 878
                 patietInfo.first_dialysis_date,
882
-                "{y}-{m}-{d}"
883
-              );
879
+                '{y}-{m}-{d}'
880
+              )
884 881
             }
885
-            this.form.first_dialysis_hospital = patietInfo.first_dialysis_hospital;
886
-            if(patietInfo.predialysis_condition.length>0) {
887
-                this.form.predialysis_condition = patietInfo.predialysis_condition.split(',');
882
+            this.form.first_dialysis_hospital = patietInfo.first_dialysis_hospital
883
+            if (patietInfo.predialysis_condition.length > 0) {
884
+              this.form.predialysis_condition = patietInfo.predialysis_condition.split(',')
888 885
             }
889
-            this.form.pre_hospital_dialysis_frequency = patietInfo.pre_hospital_dialysis_frequency;
890
-            this.form.pre_hospital_dialysis_times = patietInfo.pre_hospital_dialysis_times;
891
-            if (patietInfo.hospital_first_dialysis_date!=0) {
886
+            this.form.pre_hospital_dialysis_frequency = patietInfo.pre_hospital_dialysis_frequency
887
+            this.form.pre_hospital_dialysis_times = patietInfo.pre_hospital_dialysis_times
888
+            if (patietInfo.hospital_first_dialysis_date != 0) {
892 889
               this.form.hospital_first_dialysis_date = uParseTime(
893 890
                 patietInfo.hospital_first_dialysis_date,
894
-                "{y}-{m}-{d}"
895
-              );
891
+                '{y}-{m}-{d}'
892
+              )
896 893
             }
897
-            this.form.contagions = response.data.data.contagions;
898
-            this.form.diseases = response.data.data.diseases;
899
-            this.form.remark = patietInfo.remark;
900
-            this.form.diagnose = patietInfo.diagnose;
894
+            this.form.contagions = response.data.data.contagions
895
+            this.form.diseases = response.data.data.diseases
896
+            this.form.remark = patietInfo.remark
897
+            this.form.diagnose = patietInfo.diagnose
901 898
 
902 899
             this.form.patient_complains = patietInfo.patient_complains
903 900
             this.form.present_history = patietInfo.present_history
@@ -907,7 +904,6 @@ export default {
907 904
             this.form.respiratory = patietInfo.respiratory
908 905
             this.form.sbp = patietInfo.sbp
909 906
             this.form.dbp = patietInfo.dbp
910
-            
911 907
 
912 908
             // this.form.initial = patietInfo.initial_dialysis + "";
913 909
             // this.form.dialysisTotal = patietInfo.total_dialysis + "";
@@ -957,10 +953,10 @@ export default {
957 953
             // }
958 954
           } else {
959 955
             this.$notify.error({
960
-              title: "错误",
961
-              message: "网络异常"
962
-            });
963
-            this.$router.back(-1);
956
+              title: '错误',
957
+              message: '网络异常'
958
+            })
959
+            this.$router.back(-1)
964 960
           }
965 961
 
966 962
           // this.postForm = response.data
@@ -970,22 +966,22 @@ export default {
970 966
         })
971 967
         .catch(err => {
972 968
           this.$notify.error({
973
-            title: "错误",
974
-            message: "网络异常"
975
-          });
976
-          this.$router.back(-1);
977
-        });
978
-    },
969
+            title: '错误',
970
+            message: '网络异常'
971
+          })
972
+          this.$router.back(-1)
973
+        })
974
+    }
979 975
     // fetchAllDoctorAndNurse() {
980
-      // fetchAllDoctorAndNurse().then(response => {
981
-      //   if (response.data.state == 1) {
982
-          // this.doctorOptions = response.data.data.doctors;
983
-          // this.nurseOptions = response.data.data.nursers;
984
-      //   }
985
-      // });
976
+    // fetchAllDoctorAndNurse().then(response => {
977
+    //   if (response.data.state == 1) {
978
+    // this.doctorOptions = response.data.data.doctors;
979
+    // this.nurseOptions = response.data.data.nursers;
980
+    //   }
981
+    // });
986 982
     // }
987 983
   }
988
-};
984
+}
989 985
 </script>
990 986
 
991 987
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 144 - 145
src/xt_pages/user/dialysisRecord.vue 查看文件

@@ -90,7 +90,7 @@
90 90
             :total="total">
91 91
           </el-pagination>
92 92
         </div>
93
-        
93
+
94 94
         <div style="display:none;">
95 95
             <div id="printRecord" class="record-order">
96 96
                 <div class="rd-title">{{orgname}}</div>
@@ -124,7 +124,7 @@
124 124
                         <td>{{item.partition_name}}-{{item.device_number}}</td>
125 125
                         <td>{{modeName(item.prescription.mode_id)}}</td>
126 126
                         <td>{{item.prescription.dialysis_duration}}</td>
127
-                        <td>{{item.prescription.dry_weight}}</td>
127
+                        <td>{{item.predialysis_evaluation.dry_weight}}</td>
128 128
                         <td>{{item.predialysis_evaluation.weight_before}}</td>
129 129
                         <td>{{item.assessment_after_dislysis.weight_after}}</td>
130 130
                         <td>{{item.predialysis_evaluation.systolic_blood_pressure}}/{{item.predialysis_evaluation.diastolic_blood_pressure}}</td>
@@ -132,7 +132,7 @@
132 132
                         <td>{{item.predialysis_evaluation.ultrafiltration_amount}}</td>
133 133
                         <td>{{setVascularAccess(item.prescription)}}</td>
134 134
                         <td>{{setAnticoagulantsConfit(item.prescription)}}</td>
135
-                        <td>{{setAnticoagulantsConfit(item.prescription)}}</td>
135
+                        <td>{{item.prescription.dialyzer_perfusion_apparatus}}</td>
136 136
                         <td>{{getNurseName(item.treatment_summary)}}</td>
137 137
                         <td>{{getDoctorName(item.treatment_summary)}}</td>
138 138
                       </tr>
@@ -146,218 +146,217 @@
146 146
   </div>
147 147
 </template>
148 148
 <script>
149
-import PatientSidebar from './components/PatientSidebar';
150
-import {getPatientDialysisRecords} from '@/api/patient';
151
-import {uParseTime} from "@/utils/tools";
152
-import { fetchAllDoctorAndNurse } from "@/api/doctor";
153
-import print from "print-js";
149
+import PatientSidebar from './components/PatientSidebar'
150
+import { getPatientDialysisRecords } from '@/api/patient'
151
+import { uParseTime } from '@/utils/tools'
152
+import { fetchAllDoctorAndNurse } from '@/api/doctor'
153
+import print from 'print-js'
154 154
 
155 155
 export default {
156
-  name: "dialysisRecord",
156
+  name: 'dialysisRecord',
157 157
   data() {
158 158
     return {
159
-      orgname:'',
160
-      currentPatient:{},
161
-      patientID:0,
162
-      total:0,
159
+      orgname: '',
160
+      currentPatient: {},
161
+      patientID: 0,
162
+      total: 0,
163 163
       queryParams: {
164 164
         // date: "",
165
-        mode_id:'',
166
-        start_time: "",
167
-        end_time: "",
168
-        page:1,
169
-        patient_id:0,
170
-        limit:10,
165
+        mode_id: '',
166
+        start_time: '',
167
+        end_time: '',
168
+        page: 1,
169
+        patient_id: 0,
170
+        limit: 10
171 171
       },
172 172
       recordData: [],
173 173
       dateOptions: [
174
-        { value: "0", label: "本月" },
175
-        { value: "1", label: "本年" }
174
+        { value: '0', label: '本月' },
175
+        { value: '1', label: '本年' }
176 176
       ],
177 177
       modeOptions: [],
178
-      anticoagulantsConfit:[],
179
-      blood_filters:[],
180
-      perfusion_apparatus:[],
181
-      hemodialysis_machines:[],
178
+      anticoagulantsConfit: [],
179
+      blood_filters: [],
180
+      perfusion_apparatus: [],
181
+      hemodialysis_machines: [],
182 182
       doctorOptions: [],
183 183
       nurseOptions: [],
184 184
       vascularAccess: [],
185
-      vascularAccessDesc: [],
186
-    };
185
+      vascularAccessDesc: []
186
+    }
187 187
   },
188 188
   components: {
189 189
     PatientSidebar
190 190
   },
191
-  methods:{
192
-    changeSearch(){
193
-      this.getPatientDialysisRecords();
191
+  methods: {
192
+    changeSearch() {
193
+      this.getPatientDialysisRecords()
194 194
     },
195 195
     handleSizeChange(val) {
196
-      this.queryParams.limit = val;
197
-      this.getPatientDialysisRecords();
196
+      this.queryParams.limit = val
197
+      this.getPatientDialysisRecords()
198 198
     },
199 199
     handleCurrentChange(val) {
200
-      this.queryParams.page = val;
201
-      this.getPatientDialysisRecords();
200
+      this.queryParams.page = val
201
+      this.getPatientDialysisRecords()
202 202
     },
203 203
     getPatientDialysisRecords() {
204
-      getPatientDialysisRecords(this.queryParams).then(response=>{
205
-        if (response.data.state==1) {
206
-          this.total = response.data.data.total;
207
-          this.recordData = response.data.data.records;
204
+      getPatientDialysisRecords(this.queryParams).then(response => {
205
+        if (response.data.state == 1) {
206
+          this.total = response.data.data.total
207
+          this.recordData = response.data.data.records
208 208
         }
209
-      });
209
+      })
210 210
     },
211
-    fetchAllDoctorAndNurse(){
212
-      fetchAllDoctorAndNurse().then(response=>{
213
-        if (response.data.state==1) {
214
-            this.doctorOptions = response.data.data.doctors === null ? [] : response.data.data.doctors;
215
-            this.nurseOptions = response.data.data.nursers === null ? [] : response.data.data.nursers;
211
+    fetchAllDoctorAndNurse() {
212
+      fetchAllDoctorAndNurse().then(response => {
213
+        if (response.data.state == 1) {
214
+          this.doctorOptions = response.data.data.doctors === null ? [] : response.data.data.doctors
215
+          this.nurseOptions = response.data.data.nursers === null ? [] : response.data.data.nursers
216 216
         }
217
-      });
217
+      })
218 218
     },
219 219
     scheduleType(schedule_type) {
220
-      var typeName = "未知"
220
+      var typeName = '未知'
221 221
       switch (schedule_type) {
222 222
         case 1:
223
-          typeName = '上午';
224
-          break;
223
+          typeName = '上午'
224
+          break
225 225
         case 2:
226
-          typeName = '下午';
227
-          break;
226
+          typeName = '下午'
227
+          break
228 228
         case 3:
229
-          typeName = '晚上';
230
-          break;
229
+          typeName = '晚上'
230
+          break
231 231
         default:
232
-          break;
232
+          break
233 233
       }
234
-      return typeName;
234
+      return typeName
235 235
     },
236 236
     modeName(mode_id) {
237
-      return typeof(this.modeOptions[mode_id]) != 'undefined' && typeof(this.modeOptions[mode_id].name) != 'undefined'?this.modeOptions[mode_id].name:'';
237
+      return typeof (this.modeOptions[mode_id]) !== 'undefined' && typeof (this.modeOptions[mode_id].name) !== 'undefined' ? this.modeOptions[mode_id].name : ''
238 238
     },
239
-    setAnticoagulantsConfit(prescription){
240
-      if (typeof(this.anticoagulantsConfit[prescription.anticoagulant]) == 'undefined') {
241
-        return '';
242
-      }else {
239
+    setAnticoagulantsConfit(prescription) {
240
+      if (typeof (this.anticoagulantsConfit[prescription.anticoagulant]) === 'undefined') {
241
+        return ''
242
+      } else {
243 243
         if (this.anticoagulantsConfit[prescription.anticoagulant].shouji != 1) {
244
-          return this.anticoagulantsConfit[prescription.anticoagulant].name;
245
-        }else {
246
-          return this.anticoagulantsConfit[prescription.anticoagulant].name + '/' + prescription.anticoagulant_shouji + '/' + prescription.anticoagulant_weichi + '/' + prescription.anticoagulant_zongliang;
244
+          return this.anticoagulantsConfit[prescription.anticoagulant].name
245
+        } else {
246
+          return this.anticoagulantsConfit[prescription.anticoagulant].name + '/' + prescription.anticoagulant_shouji + '/' + prescription.anticoagulant_weichi + '/' + prescription.anticoagulant_zongliang
247 247
         }
248 248
       }
249 249
     },
250
-    setVascularAccess(prescription){
251
-      if (typeof(this.vascularAccess[prescription.vascular_access_mode]) == 'undefined') {
252
-        return '';
253
-      }else {
254
-        if ( typeof(this.vascularAccessDesc[prescription.vascular_access]) == 'undefined') {
255
-          return this.vascularAccess[prescription.vascular_access_mode].name;
256
-        }else {
257
-          return this.vascularAccess[prescription.vascular_access_mode].name + '-' + this.vascularAccessDesc[prescription.vascular_access].name;
250
+    setVascularAccess(prescription) {
251
+      if (typeof (this.vascularAccess[prescription.vascular_access_mode]) === 'undefined') {
252
+        return ''
253
+      } else {
254
+        if (typeof (this.vascularAccessDesc[prescription.vascular_access]) === 'undefined') {
255
+          return this.vascularAccess[prescription.vascular_access_mode].name
256
+        } else {
257
+          return this.vascularAccess[prescription.vascular_access_mode].name + '-' + this.vascularAccessDesc[prescription.vascular_access].name
258 258
         }
259 259
       }
260 260
     },
261
-    setDialyzerModel(prescription){
262
-      var models = [];
263
-      if (prescription.hemodialysis_machine>0) {
264
-         var ml = this.hemodialysis_machines.length;
265
-         if(ml>0) {
266
-           for (let index = 0; index < ml; index++) {
267
-             if (this.hemodialysis_machines[index].id==prescription.hemodialysis_machine) {
268
-                models.push(this.hemodialysis_machines[index].name);
269
-             }
270
-           }
271
-         }
261
+    setDialyzerModel(prescription) {
262
+      var models = []
263
+      if (prescription.hemodialysis_machine > 0) {
264
+        var ml = this.hemodialysis_machines.length
265
+        if (ml > 0) {
266
+          for (let index = 0; index < ml; index++) {
267
+            if (this.hemodialysis_machines[index].id == prescription.hemodialysis_machine) {
268
+              models.push(this.hemodialysis_machines[index].name)
269
+            }
270
+          }
271
+        }
272 272
       }
273
-      if (prescription.blood_filter>0 ) {
274
-        var ml = this.blood_filters.length;
275
-         if(ml>0) {
276
-           for (let index = 0; index < ml; index++) {
277
-             if (this.blood_filters[index].id==prescription.blood_filter) {
278
-                models.push(this.blood_filters[index].name);
279
-             }
280
-           }
281
-         }
273
+      if (prescription.blood_filter > 0) {
274
+        var ml = this.blood_filters.length
275
+        if (ml > 0) {
276
+          for (let index = 0; index < ml; index++) {
277
+            if (this.blood_filters[index].id == prescription.blood_filter) {
278
+              models.push(this.blood_filters[index].name)
279
+            }
280
+          }
281
+        }
282 282
       }
283
-      if (prescription.perfusion_apparatus>0 ) {
284
-        var ml = this.perfusion_apparatus.length;
285
-         if(ml>0) {
286
-           for (let index = 0; index < ml; index++) {
287
-             if (this.perfusion_apparatus[index].id==prescription.perfusion_apparatus) {
288
-                models.push(this.perfusion_apparatus[index].name);
289
-             }
290
-           }
291
-         }
283
+      if (prescription.perfusion_apparatus > 0) {
284
+        var ml = this.perfusion_apparatus.length
285
+        if (ml > 0) {
286
+          for (let index = 0; index < ml; index++) {
287
+            if (this.perfusion_apparatus[index].id == prescription.perfusion_apparatus) {
288
+              models.push(this.perfusion_apparatus[index].name)
289
+            }
290
+          }
291
+        }
292 292
       }
293
-      return models.join(',');
293
+      return models.join(',')
294 294
     },
295
-    getDoctorName(summary){
296
-      var dl = this.doctorOptions.length;
297
-      if (dl>0) {
295
+    getDoctorName(summary) {
296
+      var dl = this.doctorOptions.length
297
+      if (dl > 0) {
298 298
         for (let index = 0; index < dl; index++) {
299
-          if (this.doctorOptions[index].id=summary.zl_doctor) {
300
-            return this.doctorOptions[index].name;
299
+          if (this.doctorOptions[index].id = summary.zl_doctor) {
300
+            return this.doctorOptions[index].name
301 301
           }
302 302
         }
303 303
       }
304
-      return '';
304
+      return ''
305 305
     },
306
-    getNurseName(summary){
307
-      var dl = this.nurseOptions.length;
308
-      if (dl>0) {
306
+    getNurseName(summary) {
307
+      var dl = this.nurseOptions.length
308
+      if (dl > 0) {
309 309
         for (let index = 0; index < dl; index++) {
310
-          if (this.nurseOptions[index].id=summary.zl_nurse) {
311
-            return this.nurseOptions[index].name;
310
+          if (this.nurseOptions[index].id = summary.zl_nurse) {
311
+            return this.nurseOptions[index].name
312 312
           }
313 313
         }
314 314
       }
315
-      return '';
315
+      return ''
316 316
     },
317
-    onTranPatient:function (tranPatient) {
318
-        this.currentPatient = tranPatient;
317
+    onTranPatient: function(tranPatient) {
318
+      this.currentPatient = tranPatient
319 319
     },
320 320
     printThisInfo() {
321
-      const style = '@media print { .record-order .rd-title{  text-align: center; font-weight: 600; font-size: 30px; line-height: 80px; margin-bottom: 20px; } .record-order .rd-type{ text-align: center;  margin-bottom: 20px; } .record-order .rd-name { align-items: center; justify-content: space-between; padding: 30px 2em; } .record-order .el-table__body{ border: 1px solid #333; } .record-order .el-table__body td{ border: 1px solid #333; } .record-order .item-value {  border-bottom: 1px solid #333; padding: 0 20px;} .record-order th, .record-order td {  padding: 5px 10px; }}';
322
-      setTimeout(() => { 
323
-          printJS({
324
-          printable: "printRecord",
325
-          type: "html",
321
+      const style = '@media print { .record-order .rd-title{  text-align: center; font-weight: 600; font-size: 30px; line-height: 80px; margin-bottom: 20px; } .record-order .rd-type{ text-align: center;  margin-bottom: 20px; } .record-order .rd-name { align-items: center; justify-content: space-between; padding: 30px 2em; } .record-order .el-table__body{ border: 1px solid #333; } .record-order .el-table__body td{ border: 1px solid #333; } .record-order .item-value {  border-bottom: 1px solid #333; padding: 0 20px;} .record-order th, .record-order td {  padding: 5px 10px; }}'
322
+      setTimeout(() => {
323
+        printJS({
324
+          printable: 'printRecord',
325
+          type: 'html',
326 326
           style: style,
327 327
           scanStyles: false
328
-          });
329
-      }, 1);
330
-    },clickCurrent(val){
331
-      this.$router.push({ path: "/dialysis/details", query: {patient_id: val.patient_id, date: val.dialysis_date}})
328
+        })
329
+      }, 1)
330
+    }, clickCurrent(val) {
331
+      this.$router.push({ path: '/dialysis/details', query: { patient_id: val.patient_id, date: val.dialysis_date }})
332 332
     }
333 333
   },
334
-  created(){
335
-    const id = this.$route.params && this.$route.params.id;
336
-    this.patientID = parseInt(id);
334
+  created() {
335
+    const id = this.$route.params && this.$route.params.id
336
+    this.patientID = parseInt(id)
337 337
     if (isNaN(this.patientID) || this.patientID <= 0) {
338 338
       this.$notify.error({
339
-        title: "错误",
340
-        message: "无效的id"
341
-      });
342
-      this.$router.back(-1);
339
+        title: '错误',
340
+        message: '无效的id'
341
+      })
342
+      this.$router.back(-1)
343 343
     }
344
-    this.queryParams.patient_id = this.patientID;
345
-    this.modeOptions = this.$store.getters.treatment_mode;
346
-    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
347
-    this.blood_filters = this.$store.getters.blood_filters;
348
-    this.perfusion_apparatus = this.$store.getters.perfusion_apparatus;
349
-    this.hemodialysis_machines = this.$store.getters.hemodialysis_machines;
350
-      this.vascularAccess = this.$store.getters.vascular_access;
351
-      this.vascularAccessDesc = this.$store.getters.vascular_access_desc;
344
+    this.queryParams.patient_id = this.patientID
345
+    this.modeOptions = this.$store.getters.treatment_mode
346
+    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
347
+    this.blood_filters = this.$store.getters.blood_filters
348
+    this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
349
+    this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
350
+    this.vascularAccess = this.$store.getters.vascular_access
351
+    this.vascularAccessDesc = this.$store.getters.vascular_access_desc
352 352
 
353
-    this.fetchAllDoctorAndNurse();
354
-    this.getPatientDialysisRecords();
353
+    this.fetchAllDoctorAndNurse()
354
+    this.getPatientDialysisRecords()
355 355
 
356
-    
357
-    var xtuser = this.$store.getters.xt_user;
358
-    this.orgname = xtuser.org.org_name;
356
+    var xtuser = this.$store.getters.xt_user
357
+    this.orgname = xtuser.org.org_name
359 358
   }
360
-};
359
+}
361 360
 </script>
362 361
 <style rel='stylesheet/scss' lang="scss" scoped >
363 362
 .total {
@@ -395,4 +394,4 @@ export default {
395 394
 .record-order th, .record-order td {
396 395
     padding: 5px 10px;
397 396
 }
398
-</style>
397
+</style>

+ 383 - 381
src/xt_pages/workforce/components/template_table.vue 查看文件

@@ -162,415 +162,417 @@
162 162
 </template>
163 163
 
164 164
 <script>
165
-import TemplateTableItem from "./template_table_item"
166
-import ScheduleSelectorDialog from "./template_schedule_selector_dialog"
167
-import {updateSchedules} from "@/api/schedule_template/patient"
165
+import TemplateTableItem from './template_table_item'
166
+import ScheduleSelectorDialog from './template_schedule_selector_dialog'
167
+import { updateSchedules } from '@/api/schedule_template/patient'
168 168
 
169 169
 var rowspanNoControl = -1
170 170
 export default {
171
-    name: "TemplateTable",
172
-    components: {
173
-        TemplateTableItem,
174
-        ScheduleSelectorDialog
171
+  name: 'TemplateTable',
172
+  components: {
173
+    TemplateTableItem,
174
+    ScheduleSelectorDialog
175
+  },
176
+  data() {
177
+    return {
178
+      saving: false,
179
+      zone_device_counts: {},
180
+      treat_modes: {},
181
+      is_editing: false,
182
+      opera_device_numbers: [],
183
+      origin_device_numbers: [],
184
+
185
+      tableHeight: document.documentElement.clientHeight
186
+    }
187
+  },
188
+  props: {
189
+    editable: {
190
+      type: Boolean,
191
+      default: true
175 192
     },
176
-    data() {
177
-        return {
178
-            saving: false,
179
-            zone_device_counts: {},
180
-            treat_modes: {},
181
-            is_editing: false,
182
-            opera_device_numbers: [],
183
-            origin_device_numbers: [],
184
-
185
-            tableHeight: document.documentElement.clientHeight,
186
-        }
193
+    device_numbers: {
194
+      type: Array
187 195
     },
188
-    props: {
189
-        editable: {
190
-            type: Boolean,
191
-            default: true,
192
-        },
193
-        device_numbers: {
194
-            type: Array,
195
-        },
196
-        template: {
197
-            type: Object,
198
-        },
199
-        patients: {
200
-            type: Array,
201
-        }
196
+    template: {
197
+      type: Object
202 198
     },
203
-    created() {
204
-        this.treat_modes = this.$store.getters.treatment_mode
205
-        
206
-        // window.addEventListener('scroll', this.handleScroll)
199
+    patients: {
200
+      type: Array
201
+    }
202
+  },
203
+  created() {
204
+    this.treat_modes = this.$store.getters.treatment_mode
205
+
206
+    // window.addEventListener('scroll', this.handleScroll)
207
+  },
208
+  watch: {
209
+    'device_numbers': function() {
210
+      this.opera_device_numbers = this.makeDeviceNumbers(this.device_numbers)
211
+      this.origin_device_numbers = this.makeDeviceNumbers(this.device_numbers)
207 212
     },
208
-    watch: {
209
-        "device_numbers": function() {
210
-            this.opera_device_numbers = this.makeDeviceNumbers(this.device_numbers)
211
-            this.origin_device_numbers = this.makeDeviceNumbers(this.device_numbers)
212
-        },
213
-        "template.items": function() {
214
-            // 先清除所有已有 item
215
-            var weekdays = [1, 2, 3, 4, 5, 6, 7] // 周一-周日
216
-            var time_types = [1, 2, 3] // 上下晚
217
-            for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
218
-                const op_d_n = this.opera_device_numbers[d_n_i]
219
-                const or_d_n = this.origin_device_numbers[d_n_i]
220
-
221
-                op_d_n.total = 0
222
-                or_d_n.total = 0
223
-
224
-                for (let w_i = 0; w_i < weekdays.length; w_i++) {
225
-                    const weekday = weekdays[w_i]
226
-                    for (let t_i = 0; t_i < time_types.length; t_i++) {
227
-                        const time_type = time_types[t_i]
228
-                        
229
-                        var item_key = weekday + "_" + time_type
230
-                        var op_item = op_d_n[item_key]
231
-                        var or_item = or_d_n[item_key]
232
-
233
-                        op_item.pid = 0
234
-                        op_item.name = ""
235
-                        op_item.treat_mode_id = 0
236
-                        op_item.treat_mode = ""
237
-
238
-                        or_item.pid = 0
239
-                        or_item.name = ""
240
-                        or_item.treat_mode_id = 0
241
-                        or_item.treat_mode = ""
242
-                    }
243
-                }
244
-            }
213
+    'template.items': function() {
214
+      // 先清除所有已有 item
215
+      var weekdays = [1, 2, 3, 4, 5, 6, 7] // 周一-周日
216
+      var time_types = [1, 2, 3] // 上下晚
217
+      for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
218
+        const op_d_n = this.opera_device_numbers[d_n_i]
219
+        const or_d_n = this.origin_device_numbers[d_n_i]
220
+
221
+        op_d_n.total = 0
222
+        or_d_n.total = 0
223
+
224
+        for (let w_i = 0; w_i < weekdays.length; w_i++) {
225
+          const weekday = weekdays[w_i]
226
+          for (let t_i = 0; t_i < time_types.length; t_i++) {
227
+            const time_type = time_types[t_i]
228
+
229
+            var item_key = weekday + '_' + time_type
230
+            var op_item = op_d_n[item_key]
231
+            var or_item = or_d_n[item_key]
232
+
233
+            op_item.pid = 0
234
+            op_item.name = ''
235
+            op_item.treat_mode_id = 0
236
+            op_item.treat_mode = ''
237
+
238
+            or_item.pid = 0
239
+            or_item.name = ''
240
+            or_item.treat_mode_id = 0
241
+            or_item.treat_mode = ''
242
+          }
243
+        }
244
+      }
245 245
 
246
-            for (let index = 0; index < this.template.items.length; index++) {
247
-                const template_item = this.template.items[index];
248
-
249
-                for (let d_i = 0; d_i < this.opera_device_numbers.length; d_i++) {
250
-                    const device_number = this.opera_device_numbers[d_i];
251
-                    if (device_number.id == template_item.device_number_id) {
252
-                        var weekday = template_item.weekday
253
-                        var time_type = template_item.time_type
254
-                        var cell_item = device_number[weekday + "_" + time_type]
255
-                        cell_item.pid = template_item.patient_id
256
-                        cell_item.name = template_item.patient.name
257
-                        cell_item.treat_mode_id = template_item.treat_mode
258
-                        cell_item.treat_mode = this.treat_modes[template_item.treat_mode].name
259
-                        device_number.total += 1
260
-
261
-                        // origin_device_numbers 初始化时数据应该是和 opera_device_numbers 一样的,这里就不再用一个 for 遍历 origin_device_numbers 重复 opera_device_numbers 的操作了
262
-                        const o_device_number = this.origin_device_numbers[d_i]
263
-                        var o_cell_item = o_device_number[weekday + "_" + time_type]
264
-                        o_cell_item.pid = template_item.patient_id
265
-                        o_cell_item.name = template_item.patient.name
266
-                        o_cell_item.treat_mode_id = template_item.treat_mode
267
-                        o_cell_item.treat_mode = this.treat_modes[template_item.treat_mode].name
268
-                        o_device_number.total += 1
269
-
270
-                        break
271
-                    }
272
-                }
273
-            }
246
+      for (let index = 0; index < this.template.items.length; index++) {
247
+        const template_item = this.template.items[index]
248
+        if (template_item.patient == null) {
249
+          continue
250
+        }
274 251
 
275
-            // this.$refs.table.doLayout()
276
-        },
277
-        tableHeight (val) {
278
-            if(!this.timer) {
279
-                this.tableHeight = val
280
-                this.timer = true
281
-                let that = this
282
-                setTimeout(function (){
283
-                    that.timer = false
284
-                }, 400)
285
-            }
252
+        for (let d_i = 0; d_i < this.opera_device_numbers.length; d_i++) {
253
+          const device_number = this.opera_device_numbers[d_i]
254
+          if (device_number.id == template_item.device_number_id) {
255
+            var weekday = template_item.weekday
256
+            var time_type = template_item.time_type
257
+            var cell_item = device_number[weekday + '_' + time_type]
258
+            cell_item.pid = template_item.patient_id
259
+            cell_item.name = template_item.patient.name
260
+            cell_item.treat_mode_id = template_item.treat_mode
261
+            cell_item.treat_mode = template_item.treat_mode ? this.treat_modes[template_item.treat_mode].name : ''
262
+            device_number.total += 1
263
+
264
+            // origin_device_numbers 初始化时数据应该是和 opera_device_numbers 一样的,这里就不再用一个 for 遍历 origin_device_numbers 重复 opera_device_numbers 的操作了
265
+            const o_device_number = this.origin_device_numbers[d_i]
266
+            var o_cell_item = o_device_number[weekday + '_' + time_type]
267
+            o_cell_item.pid = template_item.patient_id
268
+            o_cell_item.name = template_item.patient.name
269
+            o_cell_item.treat_mode_id = template_item.treat_mode
270
+            o_cell_item.treat_mode = template_item.treat_mode ? this.treat_modes[template_item.treat_mode].name : ''
271
+            o_device_number.total += 1
272
+
273
+            break
274
+          }
286 275
         }
276
+      }
277
+
278
+      // this.$refs.table.doLayout()
287 279
     },
288
-    mounted() {
280
+    tableHeight(val) {
281
+      if (!this.timer) {
282
+        this.tableHeight = val
283
+        this.timer = true
289 284
         const that = this
290
-        window.onresize = () => {
291
-            return (() => {
292
-                window.fullHeight = document.documentElement.clientHeight
293
-                if (window.fullHeight < 200) {
294
-                    that.tableHeight = 200
295
-                } else {
296
-                    that.tableHeight = window.fullHeight - 200
297
-                }
298
-            })()
285
+        setTimeout(function() {
286
+          that.timer = false
287
+        }, 400)
288
+      }
289
+    }
290
+  },
291
+  mounted() {
292
+    const that = this
293
+    window.onresize = () => {
294
+      return (() => {
295
+        window.fullHeight = document.documentElement.clientHeight
296
+        if (window.fullHeight < 200) {
297
+          that.tableHeight = 200
298
+        } else {
299
+          that.tableHeight = window.fullHeight - 200
300
+        }
301
+      })()
302
+    }
303
+  },
304
+  methods: {
305
+    // handleScroll: function() {
306
+    //     var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
307
+    //     console.log(scrollTop)
308
+    //     if (scrollTop >= 150) {
309
+    //         this.fixed_style = "background-color: red; position: fixed; top: 0px; left: 190px; right: 150px; z-index: 99;"
310
+    //     } else {
311
+    //         this.fixed_style = ""
312
+    //     }
313
+    // },
314
+    makeDeviceNumbers: function(device_numbers) {
315
+      var maked_device_numbers = []
316
+      var weekdays = [1, 2, 3, 4, 5, 6, 7] // 周一-周日
317
+      var time_types = [1, 2, 3] // 上下晚
318
+      for (let index = 0; index < device_numbers.length; index++) {
319
+        const device_number = device_numbers[index]
320
+        var zone = {
321
+          id: device_number.zone.id,
322
+          name: device_number.zone.name,
323
+          type: device_number.zone.type
324
+        }
325
+        var device = {
326
+          id: device_number.id,
327
+          number: device_number.number,
328
+          group_id: device_number.group_id,
329
+          zone_id: device_number.zone_id,
330
+          zone: zone
299 331
         }
300
-    },
301
-    methods: {
302
-        // handleScroll: function() {
303
-        //     var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
304
-        //     console.log(scrollTop)
305
-        //     if (scrollTop >= 150) {
306
-        //         this.fixed_style = "background-color: red; position: fixed; top: 0px; left: 190px; right: 150px; z-index: 99;"
307
-        //     } else {
308
-        //         this.fixed_style = ""
309
-        //     }
310
-        // },
311
-        makeDeviceNumbers: function(device_numbers) {
312
-            var maked_device_numbers = []
313
-            var weekdays = [1, 2, 3, 4, 5, 6, 7] // 周一-周日
314
-            var time_types = [1, 2, 3] // 上下晚
315
-            for (let index = 0; index < device_numbers.length; index++) {
316
-                const device_number = device_numbers[index];
317
-                var zone = {
318
-                    id: device_number.zone.id,
319
-                    name: device_number.zone.name,
320
-                    type: device_number.zone.type,
321
-                }
322
-                var device = {
323
-                    id: device_number.id,
324
-                    number: device_number.number,
325
-                    group_id: device_number.group_id,
326
-                    zone_id: device_number.zone_id,
327
-                    zone: zone,
328
-                }
329 332
 
330
-                // 以 weekday_timetype 为 key,{pid: 0, name: "", treat_mode_id: 0, treat_mode: ""} 为 value,加入到 maked_device_numbers 中
331
-                for (let w_i = 0; w_i < weekdays.length; w_i++) {
332
-                    const weekday = weekdays[w_i];
333
-                    for (let t_i = 0; t_i < time_types.length; t_i++) {
334
-                        const time_type = time_types[t_i];
333
+        // 以 weekday_timetype 为 key,{pid: 0, name: "", treat_mode_id: 0, treat_mode: ""} 为 value,加入到 maked_device_numbers 中
334
+        for (let w_i = 0; w_i < weekdays.length; w_i++) {
335
+          const weekday = weekdays[w_i]
336
+          for (let t_i = 0; t_i < time_types.length; t_i++) {
337
+            const time_type = time_types[t_i]
335 338
 
336
-                        var defaultValue = {}
337
-                        this.$set(defaultValue, "pid", 0)
338
-                        this.$set(defaultValue, "name", "")
339
-                        this.$set(defaultValue, "treat_mode_id", 0)
340
-                        this.$set(defaultValue, "treat_mode", "")
339
+            var defaultValue = {}
340
+            this.$set(defaultValue, 'pid', 0)
341
+            this.$set(defaultValue, 'name', '')
342
+            this.$set(defaultValue, 'treat_mode_id', 0)
343
+            this.$set(defaultValue, 'treat_mode', '')
341 344
 
342
-                        this.$set(device, weekday + "_" + time_type, defaultValue)
343
-                    }
344
-                }
345
-                this.$set(device, "total", 0) // 每个床位号每周的排班总数
345
+            this.$set(device, weekday + '_' + time_type, defaultValue)
346
+          }
347
+        }
348
+        this.$set(device, 'total', 0) // 每个床位号每周的排班总数
346 349
 
347
-                maked_device_numbers.push(device)
350
+        maked_device_numbers.push(device)
351
+      }
352
+      return maked_device_numbers
353
+    },
354
+    spanMethod({ row, column, rowIndex, columnIndex }) {
355
+      if (columnIndex == 0) {
356
+        if (rowIndex == 0) {
357
+          rowspanNoControl = -1
358
+        }
359
+        var spanRowCount = this.zone_device_counts[row.zone_id]
360
+        var isFirstRowInGroup = false
361
+        if (spanRowCount == undefined) {
362
+          var count = 0
363
+          for (let index = 0; index < this.opera_device_numbers.length; index++) {
364
+            const number = this.opera_device_numbers[index]
365
+            if (number.zone_id == row.zone_id) {
366
+              count++
348 367
             }
349
-            return maked_device_numbers
350
-        },
351
-        spanMethod({ row, column, rowIndex, columnIndex }) {
352
-            if (columnIndex == 0) {
353
-                if (rowIndex == 0) {
354
-                    rowspanNoControl = -1
355
-                }
356
-                var spanRowCount = this.zone_device_counts[row.zone_id]
357
-                var isFirstRowInGroup = false
358
-                if (spanRowCount == undefined) {
359
-                    var count = 0
360
-                    for (let index = 0; index < this.opera_device_numbers.length; index++) {
361
-                        const number = this.opera_device_numbers[index]
362
-                        if (number.zone_id == row.zone_id) {
363
-                            count ++
364
-                        }
365
-                    }
366
-                    this.zone_device_counts[row.zone_id] = count
367
-                    spanRowCount = count + 0
368
-                    isFirstRowInGroup = true
369
-
370
-                } else {
371
-                    isFirstRowInGroup = rowIndex == rowspanNoControl + 1
372
-                    if (rowspanNoControl + spanRowCount == rowIndex) {
373
-                        rowspanNoControl = rowIndex
374
-                    }
375
-                }
368
+          }
369
+          this.zone_device_counts[row.zone_id] = count
370
+          spanRowCount = count + 0
371
+          isFirstRowInGroup = true
372
+        } else {
373
+          isFirstRowInGroup = rowIndex == rowspanNoControl + 1
374
+          if (rowspanNoControl + spanRowCount == rowIndex) {
375
+            rowspanNoControl = rowIndex
376
+          }
377
+        }
376 378
 
377
-                if (isFirstRowInGroup) {
378
-                    return {
379
-                        rowspan: spanRowCount,
380
-                        colspan: 1
381
-                    }
382
-                } else {
383
-                    return {
384
-                        rowspan: 0,
385
-                        colspan: 0,
386
-                    }
379
+        if (isFirstRowInGroup) {
380
+          return {
381
+            rowspan: spanRowCount,
382
+            colspan: 1
383
+          }
384
+        } else {
385
+          return {
386
+            rowspan: 0,
387
+            colspan: 0
388
+          }
389
+        }
390
+      }
391
+    },
392
+    itemClick: function(row, column, cell, event) {
393
+      if (this.editable == false || this.is_editing == false) {
394
+        return
395
+      }
396
+
397
+      if (column.property == undefined || /^[1-7]_[1-3]$/.test(column.property) == false) {
398
+        return
399
+      }
400
+      if (row[column.property] == undefined) {
401
+        return
402
+      }
403
+
404
+      var item = row[column.property]
405
+      var weekday_timetype = column.property.split('_')
406
+      var weekday = weekday_timetype[0]
407
+      var time_type = weekday_timetype[1]
408
+      var device_number_id = row.id
409
+      if (item.pid == 0) {
410
+        this.$refs.selector_dialog.show(weekday, time_type, device_number_id)
411
+      } else {
412
+        this.$refs.selector_dialog.showWith(item.pid, item.treat_mode_id, weekday, time_type, device_number_id)
413
+      }
414
+    },
415
+    will_add_schedule_action: function(patient_id, treat_mode, weekday, time_type, device_number_id) {
416
+      var patient = null
417
+      for (let index = 0; index < this.patients.length; index++) {
418
+        const p = this.patients[index]
419
+        if (p.id == patient_id) {
420
+          patient = p
421
+          break
422
+        }
423
+      }
424
+      if (patient == null) {
425
+        this.$message.error('患者不存在')
426
+        return
427
+      }
428
+
429
+      for (let index = 0; index < this.opera_device_numbers.length; index++) {
430
+        const device_number = this.opera_device_numbers[index]
431
+        for (let t_y = 1; t_y <= 3; t_y++) {
432
+          if (t_y == time_type && device_number_id == device_number.id) {
433
+            continue
434
+          }
435
+          if (device_number[weekday + '_' + t_y].pid == patient_id) {
436
+            this.$message.error('同位患者一天内不可有两次排班')
437
+            return
438
+          }
439
+        }
440
+      }
441
+
442
+      for (let index = 0; index < this.opera_device_numbers.length; index++) {
443
+        const device_number = this.opera_device_numbers[index]
444
+        if (device_number.id == device_number_id) {
445
+          var isDiseaseSame = false
446
+          var havePatientDisease = patient.contagions.length > 0
447
+          if (patient.contagions.length > 0 || device_number.zone.type != 1) {
448
+            if (device_number.zone.type != 1) {
449
+              for (let c_i = 0; c_i < patient.contagions.length; c_i++) {
450
+                const contagion = patient.contagions[c_i]
451
+                if (contagion.disease_id == device_number.zone.type) {
452
+                  isDiseaseSame = true
387 453
                 }
454
+              }
388 455
             }
389
-        },
390
-        itemClick: function(row, column, cell, event) {
391
-            if (this.editable == false || this.is_editing == false) {
392
-                return
393
-            }
456
+          } else {
457
+            isDiseaseSame = true
458
+          }
459
+          if (isDiseaseSame == false) {
460
+            // 此患者没有传染病,与此透析机不匹配,确定在此排班吗?
461
+            // 此患者有传染病,与此透析机不匹配,确定在此排班吗?
462
+            var msg = havePatientDisease ? '此患者有传染病,与此透析机不匹配,确定在此排班吗?' : '此患者没有传染病,与此透析机不匹配,确定在此排班吗?'
463
+            this.$confirm(msg, '提示', { confirmButtonText: '是', cancelButtonText: '否', type: 'warning' })
464
+              .then(() => {
465
+                this.add_schedule(patient, device_number, treat_mode, weekday, time_type)
466
+              })
467
+          } else {
468
+            this.add_schedule(patient, device_number, treat_mode, weekday, time_type)
469
+          }
470
+          return
471
+        }
472
+      }
394 473
 
395
-            if (column.property == undefined || /^[1-7]_[1-3]$/.test(column.property) == false) {
396
-                return
474
+      this.$message.error('设备不存在')
475
+    },
476
+    cancel_schedule_action: function(weekday, time_type, device_number_id) {
477
+      for (let index = 0; index < this.opera_device_numbers.length; index++) {
478
+        const device_number = this.opera_device_numbers[index]
479
+        if (device_number.id == device_number_id) {
480
+          var item = device_number[weekday + '_' + time_type]
481
+          item.pid = 0
482
+          item.name = ''
483
+          item.treat_mode_id = 0
484
+          item.treat_mode = ''
485
+          this.$refs.selector_dialog.hide()
486
+        }
487
+      }
488
+    },
489
+    add_schedule: function(patient, device_number, treat_mode, weekday, time_type) {
490
+      var item = device_number[weekday + '_' + time_type]
491
+      var isNew = item.pid == 0
492
+
493
+      item.pid = patient.id
494
+      item.name = patient.name
495
+      item.treat_mode_id = treat_mode
496
+      item.treat_mode = this.treat_modes[treat_mode].name
497
+
498
+      if (isNew) {
499
+        device_number.total += 1
500
+      }
501
+      this.$refs.selector_dialog.hide()
502
+    },
503
+    saveAction: function() {
504
+      this.saving = true
505
+
506
+      var add_items = []
507
+      var del_items = []
508
+      var change_items = []
509
+      var weekdays = [1, 2, 3, 4, 5, 6, 7] // 周一-周日
510
+      var time_types = [1, 2, 3] // 上下晚
511
+      for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
512
+        const op_d_n = this.opera_device_numbers[d_n_i]
513
+        const or_d_n = this.origin_device_numbers[d_n_i]
514
+
515
+        for (let w_i = 0; w_i < weekdays.length; w_i++) {
516
+          const weekday = weekdays[w_i]
517
+          for (let t_i = 0; t_i < time_types.length; t_i++) {
518
+            const time_type = time_types[t_i]
519
+
520
+            var item_key = weekday + '_' + time_type
521
+            var op_item = op_d_n[item_key]
522
+            var or_item = or_d_n[item_key]
523
+            if (op_item.pid == 0 && or_item.pid == 0) {
524
+              continue
397 525
             }
398
-            if (row[column.property] == undefined) {
399
-                return
526
+            if (op_item.pid == or_item.pid && op_item.treat_mode_id == or_item.treat_mode_id) {
527
+              continue
400 528
             }
401
-            
402
-            var item = row[column.property]
403
-            var weekday_timetype = column.property.split("_")
404
-            var weekday = weekday_timetype[0]
405
-            var time_type = weekday_timetype[1]
406
-            var device_number_id = row.id
407
-            if (item.pid == 0) {
408
-                this.$refs.selector_dialog.show(weekday, time_type, device_number_id)
529
+            if (op_item.pid == 0) {
530
+              del_items.push({
531
+                device_number_id: op_d_n.id,
532
+                weekday: weekday,
533
+                time_type: time_type
534
+              })
535
+              continue
536
+            } else if (or_item.pid == 0) {
537
+              add_items.push({
538
+                device_number_id: op_d_n.id,
539
+                patient_id: op_item.pid,
540
+                mode: op_item.treat_mode_id,
541
+                weekday: weekday,
542
+                time_type: time_type
543
+              })
544
+              continue
409 545
             } else {
410
-                this.$refs.selector_dialog.showWith(item.pid, item.treat_mode_id, weekday, time_type, device_number_id)
411
-            }
412
-        },
413
-        will_add_schedule_action: function(patient_id, treat_mode, weekday, time_type, device_number_id) {
414
-            var patient = null
415
-            for (let index = 0; index < this.patients.length; index++) {
416
-                const p = this.patients[index];
417
-                if (p.id == patient_id) {
418
-                    patient = p
419
-                    break
420
-                }
421
-            }
422
-            if (patient == null) {
423
-                this.$message.error("患者不存在")
424
-                return
425
-            }
426
-
427
-            for (let index = 0; index < this.opera_device_numbers.length; index++) {
428
-                const device_number = this.opera_device_numbers[index];
429
-                for (let t_y = 1; t_y <= 3; t_y++) {
430
-                    if (t_y == time_type && device_number_id == device_number.id) {
431
-                        continue
432
-                    }
433
-                    if (device_number[weekday + "_" + t_y].pid == patient_id) {
434
-                        this.$message.error("同位患者一天内不可有两次排班")
435
-                        return
436
-                    }
437
-                }
438
-            }
439
-
440
-            for (let index = 0; index < this.opera_device_numbers.length; index++) {
441
-                const device_number = this.opera_device_numbers[index]
442
-                if (device_number.id == device_number_id) {
443
-
444
-                    var isDiseaseSame = false
445
-                    var havePatientDisease = patient.contagions.length > 0
446
-                    if (patient.contagions.length > 0 || device_number.zone.type != 1) {
447
-                        if (device_number.zone.type != 1) {
448
-                            for (let c_i = 0; c_i < patient.contagions.length; c_i++) {
449
-                                const contagion = patient.contagions[c_i]
450
-                                if (contagion.disease_id == device_number.zone.type) {
451
-                                    isDiseaseSame = true
452
-                                }
453
-                            }
454
-                        }
455
-                    } else {
456
-                        isDiseaseSame = true
457
-                    }
458
-                    if (isDiseaseSame == false) {
459
-                        // 此患者没有传染病,与此透析机不匹配,确定在此排班吗?
460
-                        // 此患者有传染病,与此透析机不匹配,确定在此排班吗?
461
-                        var msg = havePatientDisease ? "此患者有传染病,与此透析机不匹配,确定在此排班吗?" : "此患者没有传染病,与此透析机不匹配,确定在此排班吗?"
462
-                        this.$confirm(msg, '提示', {confirmButtonText: '是', cancelButtonText: '否', type: 'warning'})
463
-                        .then(() => {
464
-                            this.add_schedule(patient, device_number, treat_mode, weekday, time_type)
465
-                        })
466
-                    } else {
467
-                        this.add_schedule(patient, device_number, treat_mode, weekday, time_type)
468
-                    }
469
-                    return
470
-                }
471
-            }
472
-
473
-            this.$message.error("设备不存在")
474
-        },
475
-        cancel_schedule_action: function(weekday, time_type, device_number_id) {
476
-            for (let index = 0; index < this.opera_device_numbers.length; index++) {
477
-                const device_number = this.opera_device_numbers[index]
478
-                if (device_number.id == device_number_id) {
479
-                    var item = device_number[weekday + "_" + time_type]
480
-                    item.pid = 0
481
-                    item.name = ""
482
-                    item.treat_mode_id = 0
483
-                    item.treat_mode = ""
484
-                    this.$refs.selector_dialog.hide()
485
-                }
486
-            }
487
-        },
488
-        add_schedule: function(patient, device_number, treat_mode, weekday, time_type) {
489
-            var item = device_number[weekday + "_" + time_type]
490
-            var isNew = item.pid == 0
491
-
492
-            item.pid = patient.id
493
-            item.name = patient.name
494
-            item.treat_mode_id = treat_mode
495
-            item.treat_mode = this.treat_modes[treat_mode].name
496
-
497
-            if (isNew) {
498
-                device_number.total += 1
499
-            }
500
-            this.$refs.selector_dialog.hide()
501
-        },
502
-        saveAction: function() {
503
-            this.saving = true
504
-
505
-            var add_items = []
506
-            var del_items = []
507
-            var change_items = []
508
-            var weekdays = [1, 2, 3, 4, 5, 6, 7] // 周一-周日
509
-            var time_types = [1, 2, 3] // 上下晚
510
-            for (let d_n_i = 0; d_n_i < this.opera_device_numbers.length; d_n_i++) {
511
-                const op_d_n = this.opera_device_numbers[d_n_i]
512
-                const or_d_n = this.origin_device_numbers[d_n_i]
513
-
514
-                for (let w_i = 0; w_i < weekdays.length; w_i++) {
515
-                    const weekday = weekdays[w_i]
516
-                    for (let t_i = 0; t_i < time_types.length; t_i++) {
517
-                        const time_type = time_types[t_i]
518
-                        
519
-                        var item_key = weekday + "_" + time_type
520
-                        var op_item = op_d_n[item_key]
521
-                        var or_item = or_d_n[item_key]
522
-                        if (op_item.pid == 0 && or_item.pid == 0) {
523
-                            continue
524
-                        }
525
-                        if (op_item.pid == or_item.pid && op_item.treat_mode_id == or_item.treat_mode_id) {
526
-                            continue
527
-                        }
528
-                        if (op_item.pid == 0) {
529
-                            del_items.push({
530
-                                device_number_id: op_d_n.id,
531
-                                weekday: weekday,
532
-                                time_type: time_type,
533
-                            })
534
-                            continue
535
-                        } else if (or_item.pid == 0) {
536
-                            add_items.push({
537
-                                device_number_id: op_d_n.id,
538
-                                patient_id: op_item.pid,
539
-                                mode: op_item.treat_mode_id,
540
-                                weekday: weekday,
541
-                                time_type: time_type,
542
-                            })
543
-                            continue
544
-                        } else {
545
-                            if (op_item.pid != or_item.pid || op_item.treat_mode_id != or_item.treat_mode_id) {
546
-                                change_items.push({
547
-                                    device_number_id: op_d_n.id,
548
-                                    patient_id: op_item.pid,
549
-                                    mode: op_item.treat_mode_id,
550
-                                    weekday: weekday,
551
-                                    time_type: time_type,
552
-                                })
553
-                            }
554
-                        }
555
-                    }
556
-                }
546
+              if (op_item.pid != or_item.pid || op_item.treat_mode_id != or_item.treat_mode_id) {
547
+                change_items.push({
548
+                  device_number_id: op_d_n.id,
549
+                  patient_id: op_item.pid,
550
+                  mode: op_item.treat_mode_id,
551
+                  weekday: weekday,
552
+                  time_type: time_type
553
+                })
554
+              }
557 555
             }
558
-
559
-            updateSchedules(this.template.id, JSON.stringify(add_items), JSON.stringify(del_items), JSON.stringify(change_items)).then(rs => {
560
-                var resp = rs.data
561
-                if (resp.state == 1) {
562
-                    this.$message({
563
-                        message: "已保存",
564
-                        type: "success",
565
-                    })
566
-                } else {
567
-                    this.$message.error(resp.msg)
568
-                }
569
-                this.saving = false
570
-                this.is_editing = false
571
-            })
556
+          }
557
+        }
558
+      }
559
+
560
+      updateSchedules(this.template.id, JSON.stringify(add_items), JSON.stringify(del_items), JSON.stringify(change_items)).then(rs => {
561
+        var resp = rs.data
562
+        if (resp.state == 1) {
563
+          this.$message({
564
+            message: '已保存',
565
+            type: 'success'
566
+          })
567
+          this.template.items = resp.data.items
568
+        } else {
569
+          this.$message.error(resp.msg)
572 570
         }
571
+        this.saving = false
572
+        this.is_editing = false
573
+      })
573 574
     }
575
+  }
574 576
 }
575 577
 </script>
576 578
 

+ 13 - 13
src/xt_permission.js 查看文件

@@ -10,19 +10,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
10 10
 
11 11
 router.beforeEach((to, from, next) => {
12 12
   // 线上注释
13
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
-  //   store.dispatch('VerifyConfigList', []).then(() => {
15
-  //   next()
16
-  //   })
17
-  // }
18
-  // if (store.getters.permission_routers === undefined) {
19
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
20
-  //     next()
21
-  //   })
22
-  // } else {
23
-  //   next()
24
-  // }
25
-  // return
13
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
+    store.dispatch('VerifyConfigList', []).then(() => {
15
+      next()
16
+    })
17
+  }
18
+  if (store.getters.permission_routers === undefined) {
19
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
20
+      next()
21
+    })
22
+  } else {
23
+    next()
24
+  }
25
+  return
26 26
   // 线上注释
27 27
 
28 28
   NProgress.start()