Bläddra i källkod

Merge branch 'master' of http://git.shengws.com/csx/Vue_New

See999 5 år sedan
förälder
incheckning
062f9d52f0
32 ändrade filer med 3840 tillägg och 1975 borttagningar
  1. 4 4
      config/dev.env.js
  2. 1 1
      config/index.js
  3. 42 23
      package-lock.json
  4. 1 1
      package.json
  5. 14 2
      src/App.vue
  6. 41 22
      src/api/advice.js
  7. 3 4
      src/api/manage.js
  8. 12 0
      src/api/role/role.js
  9. 18 16
      src/router/modules/dialysis.js
  10. 2074 532
      src/store/modules/globalConfig.js
  11. 39 44
      src/store/modules/xt_user.js
  12. 32 7
      src/views/layout/components/Navbar.vue
  13. 1 1
      src/xt_pages/data/components/tableson.vue
  14. 395 398
      src/xt_pages/dialysis/details/assessmentBefore.vue
  15. 657 498
      src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue
  16. 35 22
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  17. 3 1
      src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue
  18. 23 6
      src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue
  19. 52 39
      src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue
  20. 35 78
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  21. 5 0
      src/xt_pages/dialysis/details/dialog/monitor_dialog.vue
  22. 12 15
      src/xt_pages/management/components/MultipleForm.vue
  23. 20 23
      src/xt_pages/management/components/UserForm.vue
  24. 14 11
      src/xt_pages/management/home.vue
  25. 0 1
      src/xt_pages/role/admin.vue
  26. 16 17
      src/xt_pages/role/components/AdminInfoForm.vue
  27. 2 2
      src/xt_pages/role/components/AdminRoleInfoForm.vue
  28. 60 14
      src/xt_pages/role/components/EditRole.vue
  29. 44 4
      src/xt_pages/role/components/UserManagement.vue
  30. 1 1
      src/xt_pages/sign/index.vue
  31. 161 172
      src/xt_pages/user/dialysisSolution.vue
  32. 23 16
      src/xt_permission.js

+ 4 - 4
config/dev.env.js Visa fil

@@ -6,11 +6,11 @@
6 6
 module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9
-  BASE_API:  '"http://new_mobile.xt.api.sgjyun.com"',// //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  // BASE_API:'"http://localhost:9531"',
9
+  BASE_API: '"http://api.xt.test.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
+  //BASE_API:'"http://localhost:9529"',
11 11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 13
   XT_HOST: '"http://xt.test.sgjyun.com"',
14 14
   MIRCO_MALL_HOST: '"http://mall.test.sgjyun.com"',
15
-  CDM_HOST: '"http://cdm.test.sgjyun.com"',
16
-}
15
+  CDM_HOST: '"http://cdm.test.sgjyun.com"'
16
+};

+ 1 - 1
config/index.js Visa fil

@@ -20,7 +20,7 @@ module.exports = {
20 20
     // host: 'xt.test.sgjyun.com',
21 21
     // host: 'xt.kuyicloud.com',
22 22
     host: 'xt.test.sgjyun.com',
23
-    // host:'localhost',
23
+    //host:'localhost',
24 24
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
25 25
     autoOpenBrowser: true,
26 26
     errorOverlay: true,

+ 42 - 23
package-lock.json Visa fil

@@ -477,8 +477,8 @@
477 477
     },
478 478
     "async-validator": {
479 479
       "version": "1.8.5",
480
-      "resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz",
481
-      "integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
480
+      "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
481
+      "integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
482 482
       "requires": {
483 483
         "babel-runtime": "6.x"
484 484
       }
@@ -3187,8 +3187,8 @@
3187 3187
     },
3188 3188
     "deepmerge": {
3189 3189
       "version": "1.5.2",
3190
-      "resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz",
3191
-      "integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
3190
+      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
3191
+      "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
3192 3192
     },
3193 3193
     "define-properties": {
3194 3194
       "version": "1.1.3",
@@ -3515,9 +3515,9 @@
3515 3515
       "dev": true
3516 3516
     },
3517 3517
     "element-ui": {
3518
-      "version": "2.12.0",
3519
-      "resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.12.0.tgz",
3520
-      "integrity": "sha1-qJO8Ea5Pfbt+nVQWBvI+ZD8THuQ=",
3518
+      "version": "2.13.0",
3519
+      "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.13.0.tgz",
3520
+      "integrity": "sha512-KYsHWsBXYbLELS8cdfvgJTOMSUby3UEjvsPV1V1VmgJ/DdkOAS4z3MiOrPxrT9w2Cc5lZ4eVSQiGhYFR5NVChw==",
3521 3521
       "requires": {
3522 3522
         "async-validator": "~1.8.1",
3523 3523
         "babel-helper-vue-jsx-merge-props": "^2.0.0",
@@ -4740,7 +4740,8 @@
4740 4740
         "ansi-regex": {
4741 4741
           "version": "2.1.1",
4742 4742
           "bundled": true,
4743
-          "dev": true
4743
+          "dev": true,
4744
+          "optional": true
4744 4745
         },
4745 4746
         "aproba": {
4746 4747
           "version": "1.2.0",
@@ -4763,13 +4764,15 @@
4763 4764
         "balanced-match": {
4764 4765
           "version": "1.0.0",
4765 4766
           "bundled": true,
4766
-          "dev": true
4767
+          "dev": true,
4768
+          "optional": true
4767 4769
         },
4768 4770
         "brace-expansion": {
4769 4771
           "version": "1.1.11",
4770 4772
           "resolved": false,
4771 4773
           "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
4772 4774
           "dev": true,
4775
+          "optional": true,
4773 4776
           "requires": {
4774 4777
             "balanced-match": "^1.0.0",
4775 4778
             "concat-map": "0.0.1"
@@ -4785,19 +4788,22 @@
4785 4788
         "code-point-at": {
4786 4789
           "version": "1.1.0",
4787 4790
           "bundled": true,
4788
-          "dev": true
4791
+          "dev": true,
4792
+          "optional": true
4789 4793
         },
4790 4794
         "concat-map": {
4791 4795
           "version": "0.0.1",
4792 4796
           "resolved": false,
4793 4797
           "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
4794
-          "dev": true
4798
+          "dev": true,
4799
+          "optional": true
4795 4800
         },
4796 4801
         "console-control-strings": {
4797 4802
           "version": "1.1.0",
4798 4803
           "resolved": false,
4799 4804
           "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
4800
-          "dev": true
4805
+          "dev": true,
4806
+          "optional": true
4801 4807
         },
4802 4808
         "core-util-is": {
4803 4809
           "version": "1.0.2",
@@ -4927,7 +4933,8 @@
4927 4933
         "inherits": {
4928 4934
           "version": "2.0.3",
4929 4935
           "bundled": true,
4930
-          "dev": true
4936
+          "dev": true,
4937
+          "optional": true
4931 4938
         },
4932 4939
         "ini": {
4933 4940
           "version": "1.3.5",
@@ -4941,6 +4948,7 @@
4941 4948
           "resolved": false,
4942 4949
           "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
4943 4950
           "dev": true,
4951
+          "optional": true,
4944 4952
           "requires": {
4945 4953
             "number-is-nan": "^1.0.0"
4946 4954
           }
@@ -4957,6 +4965,7 @@
4957 4965
           "resolved": false,
4958 4966
           "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
4959 4967
           "dev": true,
4968
+          "optional": true,
4960 4969
           "requires": {
4961 4970
             "brace-expansion": "^1.1.7"
4962 4971
           }
@@ -4964,13 +4973,15 @@
4964 4973
         "minimist": {
4965 4974
           "version": "0.0.8",
4966 4975
           "bundled": true,
4967
-          "dev": true
4976
+          "dev": true,
4977
+          "optional": true
4968 4978
         },
4969 4979
         "minipass": {
4970 4980
           "version": "2.3.5",
4971 4981
           "resolved": false,
4972 4982
           "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
4973 4983
           "dev": true,
4984
+          "optional": true,
4974 4985
           "requires": {
4975 4986
             "safe-buffer": "^5.1.2",
4976 4987
             "yallist": "^3.0.0"
@@ -4991,6 +5002,7 @@
4991 5002
           "resolved": false,
4992 5003
           "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
4993 5004
           "dev": true,
5005
+          "optional": true,
4994 5006
           "requires": {
4995 5007
             "minimist": "0.0.8"
4996 5008
           }
@@ -5078,7 +5090,8 @@
5078 5090
         "number-is-nan": {
5079 5091
           "version": "1.0.1",
5080 5092
           "bundled": true,
5081
-          "dev": true
5093
+          "dev": true,
5094
+          "optional": true
5082 5095
         },
5083 5096
         "object-assign": {
5084 5097
           "version": "4.1.1",
@@ -5092,6 +5105,7 @@
5092 5105
           "resolved": false,
5093 5106
           "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
5094 5107
           "dev": true,
5108
+          "optional": true,
5095 5109
           "requires": {
5096 5110
             "wrappy": "1"
5097 5111
           }
@@ -5186,7 +5200,8 @@
5186 5200
         "safe-buffer": {
5187 5201
           "version": "5.1.2",
5188 5202
           "bundled": true,
5189
-          "dev": true
5203
+          "dev": true,
5204
+          "optional": true
5190 5205
         },
5191 5206
         "safer-buffer": {
5192 5207
           "version": "2.1.2",
@@ -5228,6 +5243,7 @@
5228 5243
           "resolved": false,
5229 5244
           "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
5230 5245
           "dev": true,
5246
+          "optional": true,
5231 5247
           "requires": {
5232 5248
             "code-point-at": "^1.0.0",
5233 5249
             "is-fullwidth-code-point": "^1.0.0",
@@ -5249,6 +5265,7 @@
5249 5265
           "resolved": false,
5250 5266
           "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
5251 5267
           "dev": true,
5268
+          "optional": true,
5252 5269
           "requires": {
5253 5270
             "ansi-regex": "^2.0.0"
5254 5271
           }
@@ -5296,13 +5313,15 @@
5296 5313
         "wrappy": {
5297 5314
           "version": "1.0.2",
5298 5315
           "bundled": true,
5299
-          "dev": true
5316
+          "dev": true,
5317
+          "optional": true
5300 5318
         },
5301 5319
         "yallist": {
5302 5320
           "version": "3.0.3",
5303 5321
           "resolved": false,
5304 5322
           "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
5305
-          "dev": true
5323
+          "dev": true,
5324
+          "optional": true
5306 5325
         }
5307 5326
       }
5308 5327
     },
@@ -7924,7 +7943,7 @@
7924 7943
     },
7925 7944
     "normalize-wheel": {
7926 7945
       "version": "1.0.1",
7927
-      "resolved": "http://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
7946
+      "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
7928 7947
       "integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
7929 7948
     },
7930 7949
     "normalize.css": {
@@ -11881,8 +11900,8 @@
11881 11900
     },
11882 11901
     "resize-observer-polyfill": {
11883 11902
       "version": "1.5.1",
11884
-      "resolved": "http://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz",
11885
-      "integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
11903
+      "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
11904
+      "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
11886 11905
     },
11887 11906
     "resolve": {
11888 11907
       "version": "1.10.0",
@@ -13537,8 +13556,8 @@
13537 13556
     },
13538 13557
     "throttle-debounce": {
13539 13558
       "version": "1.1.0",
13540
-      "resolved": "http://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
13541
-      "integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
13559
+      "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
13560
+      "integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
13542 13561
     },
13543 13562
     "through": {
13544 13563
       "version": "2.3.8",

+ 1 - 1
package.json Visa fil

@@ -46,7 +46,7 @@
46 46
     "driver.js": "0.5.2",
47 47
     "dropzone": "5.2.0",
48 48
     "echarts": "3.8.5",
49
-    "element-ui": "^2.12.0",
49
+    "element-ui": "^2.13.0",
50 50
     "file-saver": "1.3.3",
51 51
     "font-awesome": "4.7.0",
52 52
     "js-cookie": "2.2.0",

+ 14 - 2
src/App.vue Visa fil

@@ -1,12 +1,24 @@
1 1
 <template>
2 2
   <div id="app">
3
-    <router-view></router-view>
3
+    <router-view  v-if="isRouterAlive"></router-view>
4 4
   </div>
5 5
 </template>
6 6
 
7 7
 <script>
8 8
 export default {
9
-  name: "App"
9
+  name: "App",
10
+  data () {
11
+    return {
12
+      isRouterAlive: true
13
+    }
14
+  }, methods: {
15
+    reload () {
16
+      this.isRouterAlive = false
17
+      this.$nextTick(function () {
18
+        this.isRouterAlive = true
19
+      })
20
+    }
21
+  }
10 22
 };
11 23
 </script>
12 24
 

+ 41 - 22
src/api/advice.js Visa fil

@@ -14,19 +14,23 @@ export function getAllAdviceConfig() {
14 14
   })
15 15
 }
16 16
 
17
-export function CreateDoctorAdvice(id, advice) {
17
+export function CreateDoctorAdvice(id, advice,mode) {
18 18
   return request({
19
-    url: '/api/patients/advice/create?id=' + id,
19
+    url: '/api/patients/advice/create?id=' + id+"&mode="+mode,
20 20
     method: 'post',
21
-    data: advice
21
+    data: advice,
22
+    headers:{"Permission":3},
23
+
22 24
   })
23 25
 }
24 26
 
25
-export function EditDoctorAdvice(patient, id, advice) {
27
+export function EditDoctorAdvice(patient, id, advice,mode) {
26 28
   return request({
27
-    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient,
29
+    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient+"&mode="+mode,
28 30
     method: 'Put',
29
-    data: advice
31
+    data: advice,
32
+    headers:{"Permission":2},
33
+
30 34
   })
31 35
 }
32 36
 
@@ -40,7 +44,9 @@ export function ExecDoctorAdvice(patient, id, time,mode) {
40 44
   return request({
41 45
     url: '/api/patients/advice/exec',
42 46
     method: 'Post',
43
-    params: params
47
+    params: params,
48
+    headers:{"Permission":2},
49
+
44 50
   })
45 51
 }
46 52
 export function CheckDoctorAdvice(patient, id,mode) {
@@ -53,17 +59,22 @@ export function CheckDoctorAdvice(patient, id,mode) {
53 59
   return request({
54 60
     url: '/api/patients/advice/check',
55 61
     method: 'Post',
56
-    params: params
62
+    params: params,
63
+    headers:{"Permission":2},
64
+
57 65
   })
58 66
 }
59
-export function CheckGroupAdvice(groupno) {
67
+export function CheckGroupAdvice(groupno,mode) {
60 68
   var params = {
61
-    groupno: groupno
69
+    groupno: groupno,
70
+    mode: mode,
62 71
   }
63 72
   return request({
64 73
     url: '/api/patients/advice/checkgroup',
65 74
     method: 'Post',
66
-    params: params
75
+    params: params,
76
+    headers:{"Permission":2},
77
+
67 78
   })
68 79
 }
69 80
 
@@ -98,10 +109,12 @@ export function ExecGroupAdvice(groupno, time) {
98 109
   })
99 110
 }
100 111
 
101
-export function DeleteDoctorAdvice(id) {
112
+export function DeleteDoctorAdvice(id,mode) {
102 113
   return request({
103
-    url: '/api/patients/advice/delete?id=' + id,
104
-    method: 'Delete'
114
+    url: '/api/patients/advice/delete?id=' + id+"&mode="+mode,
115
+    method: 'Delete',
116
+    headers:{"Permission":2},
117
+
105 118
   })
106 119
 }
107 120
 
@@ -199,25 +212,31 @@ export function postAdviceTemplate(params, name, advice_type) {
199 212
   })
200 213
 }
201 214
 
202
-export function CreateGroupAdvice(id, groupno, advices) {
215
+export function CreateGroupAdvice(id, groupno, advices,mode) {
203 216
   if (advices.remind > 0) {
204 217
     return request({
205
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
218
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno+"&mode="+mode,
206 219
       method: 'post',
207
-      data: advices
220
+      data: advices,
221
+      headers:{"Permission":2},
222
+
208 223
     })
209 224
   } else {
210 225
     return request({
211
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
226
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno+"&mode="+mode,
212 227
       method: 'post',
213
-      data: advices
228
+      data: advices,
229
+      headers:{"Permission":2},
230
+
214 231
     })
215 232
   }
216 233
 }
217
-export function DeleteGroupAdvice(groupno) {
234
+export function DeleteGroupAdvice(groupno,mode) {
218 235
   return request({
219
-    url: '/api/patients/advice/deletegroup?groupno=' + groupno,
220
-    method: 'delete'
236
+    url: '/api/patients/advice/deletegroup?groupno=' + groupno+"&mode="+mode,
237
+    method: 'delete',
238
+    headers:{"Permission":3},
239
+
221 240
   })
222 241
 }
223 242
 

+ 3 - 4
src/api/manage.js Visa fil

@@ -150,6 +150,7 @@ export function EditPlanDetail(id, params) {
150 150
 }
151 151
 
152 152
 export function UpdatePlanInfo(data) {
153
+  console.log('data', data)
153 154
   return request({
154 155
     url: '/api/manage/updateplaninfo',
155 156
     method: 'Post',
@@ -451,9 +452,6 @@ export function UpdateForm(data) {
451 452
 }
452 453
 
453 454
 export function queryInfo(zone, bed, startime, endtime, limit, page) {
454
-  console.log('开始时间', startime)
455
-  console.log('结束时间', endtime)
456
-  console.log('床位好', bed)
457 455
   const params = {
458 456
     zone: zone,
459 457
     bed: bed,
@@ -462,6 +460,7 @@ export function queryInfo(zone, bed, startime, endtime, limit, page) {
462 460
     limit: limit,
463 461
     page: page
464 462
   }
463
+  console.log('params', params)
465 464
   return request({
466 465
     url: '/api/manage/queryinfo',
467 466
     method: 'Get',
@@ -486,7 +485,6 @@ export function getAllEquitType(params) {
486 485
 }
487 486
 
488 487
 export function getUserForm(id, limit, page) {
489
-  console.log('limit', limit)
490 488
   const params = {
491 489
     id: id,
492 490
     limit: limit,
@@ -508,6 +506,7 @@ export function UpdateMacheineTwo(data) {
508 506
 }
509 507
 
510 508
 export function getBedForm(id, params) {
509
+  console.log('设备-id', id)
511 510
   return request({
512 511
     url: '/api/manage/getbedform?id=' + id,
513 512
     method: 'get',

+ 12 - 0
src/api/role/role.js Visa fil

@@ -101,3 +101,15 @@ export function getRoleStaff() {
101 101
   })
102 102
 }
103 103
 
104
+
105
+
106
+export function getRoleInfo(params) {
107
+  return request({
108
+    url: '/api/role',
109
+    method: 'get',
110
+    params:params
111
+  })
112
+}
113
+
114
+
115
+

+ 18 - 16
src/router/modules/dialysis.js Visa fil

@@ -18,6 +18,22 @@ export default {
18 18
         title: '透析记录'
19 19
       }
20 20
     },
21
+    {
22
+      path: '/dialysis/watch',
23
+      component: () => import('@/xt_pages/dialysis/bloodPresssWatch'),
24
+      name: 'watch',
25
+      meta: {
26
+        title: 'watch'
27
+      }
28
+    },
29
+    {
30
+      path: '/dialysis/board',
31
+      component: () => import('@/xt_pages/dialysis/bulletinBoard'),
32
+      name: '数据看板',
33
+      meta: {
34
+        title: '数据看板'
35
+      }
36
+    },
21 37
     {
22 38
       path: '/dialysis/record/:id',
23 39
       component: () => import('@/xt_pages/dialysis/dialysisPage'),
@@ -43,14 +59,7 @@ export default {
43 59
 
44 60
     // { path: 'advice', component: () => import('@/xt_pages/dialysis/doctorAdvice'), name: 'advice', meta: { title: 'advice' }},
45 61
     // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
46
-    {
47
-      path: '/dialysis/watch',
48
-      component: () => import('@/xt_pages/dialysis/bloodPresssWatch'),
49
-      name: 'watch',
50
-      meta: {
51
-        title: 'watch'
52
-      }
53
-    },
62
+
54 63
     {
55 64
       path: '/dialysis/details',
56 65
       component: () => import('@/xt_pages/dialysis/details'),
@@ -189,13 +198,6 @@ export default {
189 198
         noCache: true
190 199
       }
191 200
     },
192
-    {
193
-      path: '/dialysis/board',
194
-      component: () => import('@/xt_pages/dialysis/bulletinBoard'),
195
-      name: '数据看板',
196
-      meta: {
197
-        title: '数据看板'
198
-      }
199
-    }
201
+
200 202
   ]
201 203
 }

Filskillnaden har hållits tillbaka eftersom den är för stor
+ 2074 - 532
src/store/modules/globalConfig.js


+ 39 - 44
src/store/modules/xt_user.js Visa fil

@@ -1,14 +1,7 @@
1
-import {
2
-  verifyToken,
3
-  modifyAdminInfo
4
-} from '@/api/login/login'
1
+import { modifyAdminInfo, verifyToken } from '@/api/login/login'
5 2
 // import { mapGetters } from 'vuex'
6 3
 // import { getToken, setToken, removeToken } from '@/utils/auth'
7
-import {
8
-  getAdminUserInfoCache,
9
-  cacheAdminUserInfo,
10
-  removeAdminUserInfoCache
11
-} from '@/utils/admin_info_cache'
4
+import { cacheAdminUserInfo, getAdminUserInfoCache, removeAdminUserInfoCache } from '@/utils/admin_info_cache'
12 5
 import { getFiledConfigList, setFiledConfigList } from '@/utils/data_config' // getConfigList from sessionStorage
13 6
 
14 7
 const xt_user = {
@@ -26,10 +19,10 @@ const xt_user = {
26 19
       user_type: 0, // 用户类型(1.管理员;2.医生;3.护士;4.运营)
27 20
       user_title: 0 // 用户职称(1.医士;2.医师;3.住院医师;4.主治医师;5.副主任医师;6.主任医师;7.护士;8.护师;9.主管护师;10.副主任护师;11.主任护师;12.运营专员;13.运营主管)
28 21
     },
29
-    template_info:{
22
+    template_info: {
30 23
       id: 0,
31
-      org_id:0,
32
-      template_id:0,
24
+      org_id: 0,
25
+      template_id: 0
33 26
     },
34 27
 
35 28
     org: {
@@ -57,7 +50,7 @@ const xt_user = {
57 50
 
58 51
     // 示例: ['', '',]
59 52
     urlfors: [],
60
-    fileds:[],
53
+    fileds: []
61 54
   },
62 55
 
63 56
   mutations: {
@@ -102,19 +95,16 @@ const xt_user = {
102 95
       state.cdm_role_exist = cur_info.cdm_role_exist
103 96
       state.mall_role_exist = cur_info.mall_role_exist
104 97
 
105
-
106 98
       state.template_info.id = cur_info.template_info.id
107 99
       state.template_info.org_id = cur_info.template_info.org_id
108 100
       state.template_info.template_id = cur_info.template_info.template_id
109 101
 
110
-
111 102
     },
112 103
 
113 104
     SET_FILEDS: (state, payload) => {
114 105
       state.fileds = payload.fileds
115 106
     },
116 107
 
117
-
118 108
     SET_URLFORS: (state, payload) => {
119 109
       state.urlfors = payload.urlfors
120 110
     },
@@ -123,7 +113,7 @@ const xt_user = {
123 113
       state.user.user_name = payload.user_name
124 114
       state.user.avatar = payload.avatar
125 115
     },
126
-    MODIFY_ORG_INFO:(state, payload) => {
116
+    MODIFY_ORG_INFO: (state, payload) => {
127 117
       state.org.org_name = payload.org_name
128 118
       state.org.org_short_name = payload.org_short_name
129 119
     },
@@ -180,23 +170,23 @@ const xt_user = {
180 170
   },
181 171
 
182 172
   actions: {
183
-    SetScheduleTypeSelected({commit }, schedule_type_selected) {
173
+    SetScheduleTypeSelected({ commit }, schedule_type_selected) {
184 174
       commit('SET_SCHEDULE_TYPE_SELECTED', schedule_type_selected)
185 175
     },
186 176
     SetZoneSelected({ commit }, zone_selected) {
187 177
       commit('SET_ZONE_SELECTED', zone_selected)
188 178
     },
189 179
     SetSubscibePatients({
190
-      commit,
191
-      state
192
-    }) {
180
+                          commit,
181
+                          state
182
+                        }) {
193 183
       commit('SET_SUBSCIBE_PATIENT')
194 184
     },
195 185
 
196 186
     VerifyToken({
197
-      commit,
198
-      state
199
-    }, token) {
187
+                  commit,
188
+                  state
189
+                }, token) {
200 190
 
201 191
       // console.log('验证 token 之前:token = ' + token)
202 192
       return new Promise((resolve, reject) => {
@@ -218,7 +208,7 @@ const xt_user = {
218 208
             cur_app_id: infoJSON.current_app_id,
219 209
             org: infoJSON.org,
220 210
             subscibe: infoJSON.subscibe,
221
-            template_info:infoJSON.template_info,
211
+            template_info: infoJSON.template_info,
222 212
             scrm_role_exist: infoJSON.scrm_role_exist,
223 213
             cdm_role_exist: infoJSON.cdm_role_exist,
224 214
             mall_role_exist: infoJSON.mall_role_exist
@@ -228,7 +218,6 @@ const xt_user = {
228 218
             urlfors: infoJSON.urlfors
229 219
           })
230 220
 
231
-
232 221
           resolve(infoJSON.user.user_id)
233 222
         } else {
234 223
           verifyToken(token).then(response => {
@@ -242,10 +231,10 @@ const xt_user = {
242 231
                 cur_app_id: data.current_app_id,
243 232
                 org: data.org,
244 233
                 subscibe: data.subscibe,
245
-                template_info:data.template_info,
234
+                template_info: data.template_info,
246 235
                 scrm_role_exist: data.scrm_role_exist,
247 236
                 cdm_role_exist: data.cdm_role_exist,
248
-                mall_role_exist: data.mall_role_exist,
237
+                mall_role_exist: data.mall_role_exist
249 238
               })
250 239
 
251 240
               this.commit('SET_URLFORS', {
@@ -271,9 +260,9 @@ const xt_user = {
271 260
       })
272 261
     },
273 262
     ModifyAdminUserInfo({
274
-      commit,
275
-      state
276
-    }, params) {
263
+                          commit,
264
+                          state
265
+                        }, params) {
277 266
       commit('MODIFY_USER_INFO', {
278 267
         user_name: params.user_name,
279 268
         avatar: params.avatar
@@ -286,17 +275,17 @@ const xt_user = {
286 275
           current_app_id: state.app_id,
287 276
           urlfors: state.urlfors,
288 277
           subscibe: state.subscibe,
289
-          template_info:state.template_info,
278
+          template_info: state.template_info,
290 279
           scrm_role_exist: state.scrm_role_exist,
291 280
           cdm_role_exist: state.cdm_role_exist,
292
-          mall_role_exist: state.mall_role_exist,
281
+          mall_role_exist: state.mall_role_exist
293 282
         })
294 283
       )
295 284
     },
296 285
     ModifyOrgInfo({
297
-      commit,
298
-      state
299
-    }, params) {
286
+                    commit,
287
+                    state
288
+                  }, params) {
300 289
       commit('MODIFY_ORG_INFO', {
301 290
         org_name: params.org_name,
302 291
         org_short_name: params.org_short_name
@@ -309,7 +298,7 @@ const xt_user = {
309 298
           current_app_id: state.app_id,
310 299
           urlfors: state.urlfors,
311 300
           subscibe: state.subscibe,
312
-          template_info:state.template_info,
301
+          template_info: state.template_info,
313 302
           scrm_role_exist: state.scrm_role_exist,
314 303
           cdm_role_exist: state.cdm_role_exist,
315 304
           mall_role_exist: state.mall_role_exist
@@ -337,8 +326,8 @@ const xt_user = {
337 326
     // }
338 327
     // 登出
339 328
     FrontendLogout({
340
-      commit
341
-    }) {
329
+                     commit
330
+                   }) {
342 331
       commit('CLEAR_USER_INFO')
343 332
       removeAdminUserInfoCache()
344 333
     }, updateFiledConfigList({ commit }, object) {
@@ -346,9 +335,9 @@ const xt_user = {
346 335
       var oldFiledList = getFiledConfigList()
347 336
       var infoJSON = JSON.parse(oldFiledList)
348 337
       console.log(object)
349
-      return new Promise((resolve, reject) =>{
350
-        for (let i = 0; i < infoJSON.length; i++){
351
-          if(infoJSON[i].id == object.id){
338
+      return new Promise((resolve, reject) => {
339
+        for (let i = 0; i < infoJSON.length; i++) {
340
+          if (infoJSON[i].id == object.id) {
352 341
             infoJSON[i].is_show = object.is_show
353 342
           }
354 343
         }
@@ -357,16 +346,22 @@ const xt_user = {
357 346
         commit('SET_FILEDS_LIST', infoJSON)
358 347
         resolve()
359 348
       })
360
-    },updateAllFiledConfigList({ commit }, object) {
349
+    }, updateAllFiledConfigList({ commit }, object) {
361 350
       var oldFiledList = getFiledConfigList()
362 351
       var infoJSON = JSON.parse(oldFiledList)
363 352
 
364
-      return new Promise((resolve, reject) =>{
353
+      return new Promise((resolve, reject) => {
365 354
         infoJSON = object
366 355
         setFiledConfigList(JSON.stringify(infoJSON))
367 356
         commit('SET_FILEDS_LIST', infoJSON)
368 357
         resolve()
369 358
       })
359
+    }, ModifyAdminUserOrgInfo({ commit, state }, obj) {
360
+        this.commit('SET_CURRENT_INFO',obj)
361
+    },ModifyUrlInfo({ commit, state }, obj) {
362
+      this.commit('SET_URLFORS', obj)
363
+    },ModifyFiled({ commit, state }, obj) {
364
+      commit('SET_FILEDS', obj)
370 365
     }
371 366
   }
372 367
 }

+ 32 - 7
src/views/layout/components/Navbar.vue Visa fil

@@ -135,6 +135,7 @@ import {
135 135
   getOrgs,changeOrg
136 136
 } from '@/api/config'
137 137
 export default {
138
+  inject:['reload'],
138 139
   data() {
139 140
     return {
140 141
       orgs:[],
@@ -165,33 +166,57 @@ export default {
165 166
       }
166 167
       changeOrg(params).then(response => {
167 168
         if (response.data.state === 1) {
168
-          window.location.reload()
169
+          // window.location.reload()
169 170
 
170 171
           this.$message.success('切换成功')
171 172
           let data = response.data.data
172 173
           this.org_id = data.org.id
173 174
           this.org_name = data.org.org_name
174 175
 
175
-          this.commit('SET_CURRENT_INFO', {
176
+          this.$store.dispatch("ModifyAdminUserOrgInfo", {
176 177
             user: data.user,
177 178
             cur_org_id: data.current_org_id,
178 179
             cur_app_id: data.current_app_id,
179 180
             org: data.org,
180 181
             subscibe: data.subscibe,
181 182
             template_info:data.template_info,
182
-          })
183
+          });
183 184
 
184
-          this.commit('SET_URLFORS', {
185
+          this.$store.dispatch("ModifyUrlInfo", {
185 186
             urlfors: data.urlfors
186
-          })
187 187
 
188
-          this.commit('SET_FILEDS', {
188
+          });
189
+
190
+          this.$store.dispatch("ModifyFiled", {
189 191
             fileds: data.fileds
190
-          })
192
+
193
+
194
+          });
195
+
196
+
197
+
198
+
191 199
           setFiledConfigList(JSON.stringify(data.fileds))
192 200
           cacheAdminUserInfo(JSON.stringify(data))
193 201
 
194 202
 
203
+          this.$store.dispatch('xt_GenerateRoutes', this.$store.getters.current_role_urls).then(() => {
204
+            this.$store.dispatch('VerifyConfigList').then(() => {
205
+              // alert('token 验证成功')
206
+              // console.log(this.$store.getters.xt_permission.addRouters)
207
+              this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
208
+              //        next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
209
+              // this.$router.replace({ path: '/' })
210
+              // window.location.reload()
211
+              // this.$router.go(0)
212
+              this.reload()
213
+            })
214
+          })
215
+
216
+
217
+
218
+
219
+
195 220
         }else{
196 221
           this.$message.success(response.data.msg)
197 222
         }

+ 1 - 1
src/xt_pages/data/components/tableson.vue Visa fil

@@ -78,7 +78,7 @@
78 78
             <el-form-item label="排序" prop="order">
79 79
               <el-input
80 80
                 type="age"
81
-                v-model="temp.order"
81
+                v-model.number="temp.order"
82 82
                 placeholder="请输入排序值,数值越大,排序越靠前"
83 83
               ></el-input>
84 84
             </el-form-item>

Filskillnaden har hållits tillbaka eftersom den är för stor
+ 395 - 398
src/xt_pages/dialysis/details/assessmentBefore.vue


Filskillnaden har hållits tillbaka eftersom den är för stor
+ 657 - 498
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue


+ 35 - 22
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Visa fil

@@ -9,33 +9,33 @@
9 9
     >
10 10
       <div class="txsj" v-show="showAdvicePanel">
11 11
         <el-button round @click="openGroupFrom" :loading="deleLoading"
12
-                   v-if="this.$store.getters.xt_user.user.user_type == 1 || this.$store.getters.xt_user.user.user_type == 2">
12
+                   >
13 13
           新增医嘱
14 14
         </el-button>
15 15
         <el-button round @click="openGroupFrom" :loading="deleLoading"
16
-                   v-if="this.$store.getters.xt_user.user.user_type == 3" disabled>新增医嘱
16
+                   disabled>新增医嘱
17 17
         </el-button>
18 18
 
19 19
 
20
-        <el-button v-if="currentRow != null && this.$store.getters.xt_user.user.user_type == 3" round
20
+        <el-button v-if="currentRow != null" round
21 21
                    @click="execAdvice" :loading="deleLoading">执行医嘱
22 22
         </el-button>
23 23
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
24 24
 
25
-        <el-button v-if="currentRow != null && this.$store.getters.xt_user.user.user_type == 3" round
25
+        <el-button v-if="currentRow != null" round
26 26
                    @click="checkAdvice" :loading="deleLoading">医嘱核对
27 27
         </el-button>
28 28
         <el-button v-else disabled round @click="checkAdvice" :loading="deleLoading">医嘱核对</el-button>
29 29
 
30 30
         <el-button
31
-          v-if="groupSelectRow != null&& (this.$store.getters.xt_user.user.user_type == 1  || this.$store.getters.xt_user.user.user_type == 2)"
31
+          v-if="groupSelectRow != null"
32 32
           round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱
33 33
         </el-button>
34 34
         <el-button v-else disabled round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱</el-button>
35 35
 
36 36
 
37 37
         <el-button
38
-          v-if="groupSelectRow != null&& (this.$store.getters.xt_user.user.user_type == 1  || this.$store.getters.xt_user.user.user_type == 2)"
38
+          v-if="groupSelectRow != null"
39 39
           round @click="openDeleteGroupAdvice" :loading="deleLoading">删除医嘱
40 40
         </el-button>
41 41
         <el-button v-else disabled round @click="openDeleteGroupAdvice" :loading="deleLoading">删除医嘱</el-button>
@@ -61,7 +61,7 @@
61 61
 
62 62
         </el-table-column>
63 63
         <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center"
64
-                         v-if="(this.$store.getters.xt_user.user.user_type == 1 || this.$store.getters.xt_user.user.user_type == 2)">
64
+                         >
65 65
           <template slot-scope="scope">
66 66
 
67 67
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0 ">
@@ -89,14 +89,14 @@
89 89
           </template>
90 90
         </el-table-column>
91 91
 
92
-        <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center"
93
-                         v-else>
94
-          <template slot-scope="scope">
95
-            <span v-if="scope.row.parent_id == 0 " class="el-dropdown-link">{{getAdviceContent(scope.row,1)}}</span>
96
-            <span v-if="scope.row.parent_id > 0 "
97
-                  class="el-dropdown-link">&emsp;{{getAdviceContent(scope.row,2)}}</span>
98
-          </template>
99
-        </el-table-column>
92
+        <!--<el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center"-->
93
+                         <!--v-else>-->
94
+          <!--<template slot-scope="scope">-->
95
+            <!--<span v-if="scope.row.parent_id == 0 " class="el-dropdown-link">{{getAdviceContent(scope.row,1)}}</span>-->
96
+            <!--<span v-if="scope.row.parent_id > 0 "-->
97
+                  <!--class="el-dropdown-link">&emsp;{{getAdviceContent(scope.row,2)}}</span>-->
98
+          <!--</template>-->
99
+        <!--</el-table-column>-->
100 100
 
101 101
         <el-table-column prop="execution_time" align="center" min-width="30px" label="执行时间">
102 102
           <template slot-scope="scope">
@@ -436,7 +436,12 @@
436 436
           this.$message.error('没有选择患者')
437 437
           return false
438 438
         }
439
-        EditDoctorAdvice(this.patient.id, this.form.id, this.form).then(response => {
439
+        console.log(this.form)
440
+        let mode = "2"
441
+        if(this.form.advice_doctor != this.$store.getters.xt_user.user.id){
442
+           mode = "3"
443
+        }
444
+        EditDoctorAdvice(this.patient.id, this.form.id, this.form,mode).then(response => {
440 445
           if (response.data.state == 0) {
441 446
             this.$message.error(response.data.msg)
442 447
             return false
@@ -668,10 +673,11 @@
668 673
           return false
669 674
         }
670 675
         this.exceLoading = true
676
+        let mode = "6"
671 677
 
672
-        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime).then(response => {
678
+        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime,mode).then(response => {
673 679
           if (response.data.state == 0) {
674
-            this.$message.error('执行失败!')
680
+            this.$message.error(response.data.msg)
675 681
             this.exceLoading = false
676 682
             return false
677 683
           } else {
@@ -722,8 +728,9 @@
722 728
           this.$message.error('没有选择患者')
723 729
           return false
724 730
         }
731
+        let mode ="1"
725 732
 
726
-        CreateDoctorAdvice(this.patient.id, this.form).then(response => {
733
+        CreateDoctorAdvice(this.patient.id, this.form,mode).then(response => {
727 734
           this.loading = false
728 735
           if (response.data.state == 0) {
729 736
             this.$message.error(response.data.msg)
@@ -1021,7 +1028,11 @@
1021 1028
           cancelButtonText: '取消',
1022 1029
           type: 'warning'
1023 1030
         }).then(() => {
1024
-          DeleteGroupAdvice(groupno).then(response => {
1031
+          let mode ="4"
1032
+          if(this.currentRow.advice_doctor != this.$store.getters.xt_user.user.id){
1033
+            mode = "5"
1034
+          }
1035
+          DeleteGroupAdvice(groupno,mode).then(response => {
1025 1036
             if (response.data.state == 0) {
1026 1037
               this.$message.error(response.data.msg)
1027 1038
               return false
@@ -1054,7 +1065,8 @@
1054 1065
           type: 'warning'
1055 1066
         }).then(() => {
1056 1067
           this.deleLoading = true
1057
-          DeleteDoctorAdvice(this.currentRow.id).then(response => {
1068
+          let mode = "4"
1069
+          DeleteDoctorAdvice(this.currentRow.id,mode).then(response => {
1058 1070
             this.deleLoading = false
1059 1071
             if (response.data.state == 0) {
1060 1072
               this.$message.error(response.data.msg)
@@ -1087,7 +1099,8 @@
1087 1099
           type: 'warning'
1088 1100
         }).then(() => {
1089 1101
           this.deleLoading = true
1090
-          DeleteDoctorAdvice(this.currentRow.id).then(response => {
1102
+          let mode ="4"
1103
+          DeleteDoctorAdvice(this.currentRow.id,mode).then(response => {
1091 1104
             this.deleLoading = false
1092 1105
             if (response.data.state == 0) {
1093 1106
               this.$message.error(response.data.msg)

+ 3 - 1
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Visa fil

@@ -674,7 +674,9 @@ export default {
674 674
             adviceNames.unshift(this.groupForm.adviceNames[index]);
675 675
           }
676 676
           submitForm.adviceNames = adviceNames;
677
-          CreateGroupAdvice(this.patientID, 0, submitForm).then(response => {
677
+          let mode = "1"
678
+
679
+          CreateGroupAdvice(this.patientID, 0, submitForm,mode).then(response => {
678 680
             if (response.data.state == 0) {
679 681
               this.$message.error(response.data.msg);
680 682
               return false;

+ 23 - 6
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue Visa fil

@@ -594,6 +594,7 @@ export default {
594 594
         }
595 595
         console.log(this.groupSelectRow)
596 596
         var content = ''
597
+
597 598
         if (this.groupSelectRow.children.length > 0) {
598 599
           content = '确认删除此医嘱内容,包括它的子药?'
599 600
         } else {
@@ -607,7 +608,11 @@ export default {
607 608
           cancelButtonText: '取消',
608 609
           type: 'warning'
609 610
         }).then(() => {
610
-          DeleteDoctorAdvice(this.groupSelectRow.id).then(response => {
611
+          let mode = "4"
612
+          if (this.groupSelectRow.advice_doctor != this.$store.getters.xt_user.user.id){
613
+             mode = "5"
614
+          }
615
+          DeleteDoctorAdvice(this.groupSelectRow.id,mode).then(response => {
611 616
             if (response.data.state == 0) {
612 617
               this.$message.error(response.data.msg)
613 618
               return false
@@ -700,7 +705,12 @@ export default {
700 705
                 parent_id: _this.groupSelectRow.parent_id,
701 706
                 groupno: _this.groupForm.groupno
702 707
               }
703
-              EditDoctorAdvice(this.patientID, this.groupSelectRow.id, submitForm).then(response => {
708
+              let mode = "2"
709
+              if (this.groupSelectRow.advice_doctor != this.$store.getters.xt_user.user.id){
710
+                mode = "3"
711
+              }
712
+
713
+              EditDoctorAdvice(this.patientID, this.groupSelectRow.id, submitForm,mode).then(response => {
704 714
                 if (response.data.state == 0) {
705 715
                   this.$message.error(response.data.msg)
706 716
                   return false
@@ -799,8 +809,9 @@ export default {
799 809
                   parent_id: _this.groupSelectRow.id,
800 810
                   groupno: _this.groupForm.groupno
801 811
                 }
812
+                let mode = "1"
802 813
 
803
-                CreateDoctorAdvice(this.patientID, submitForm).then(response => {
814
+                CreateDoctorAdvice(this.patientID, submitForm,mode).then(response => {
804 815
                   if (response.data.state == 0) {
805 816
                     this.$message.error(response.data.msg)
806 817
                     return false
@@ -871,7 +882,9 @@ export default {
871 882
                   remark: _this.groupForm.remark,
872 883
                   parent_id: 0
873 884
                 }
874
-                CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm).then(response => {
885
+                let mode = "1"
886
+
887
+                CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm, mode).then(response => {
875 888
                   if (response.data.state == 0) {
876 889
                     _this.$message.error(response.data.msg)
877 890
                     return false
@@ -1371,8 +1384,10 @@ export default {
1371 1384
           }
1372 1385
           this.submitGroupForm.adviceNames.unshift(item)
1373 1386
         }
1387
+        let mode = "1"
1388
+
1374 1389
 
1375
-        CreateGroupAdvice(this.patientID, this.groupForm.groupno, this.submitGroupForm).then(response => {
1390
+        CreateGroupAdvice(this.patientID, this.groupForm.groupno, this.submitGroupForm,mode).then(response => {
1376 1391
           if (response.data.state == 0) {
1377 1392
             this.$message.error(response.data.msg)
1378 1393
             return false
@@ -1537,8 +1552,10 @@ export default {
1537 1552
 
1538 1553
                 _this.submitGroupForm.adviceNames.push(item)
1539 1554
               }
1555
+              let mode = "1"
1556
+
1540 1557
 
1541
-              CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm).then(response => {
1558
+              CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm,mode).then(response => {
1542 1559
                 if (response.data.state == 0) {
1543 1560
                   _this.$message.error(response.data.msg)
1544 1561
                   return false

+ 52 - 39
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue Visa fil

@@ -161,7 +161,7 @@
161 161
             </el-form-item>
162 162
           </el-col>
163 163
           <el-col :span="8">
164
-            <el-form-item label="血管通路操作: " v-if="isShow('血管通路操作')">
164
+            <el-form-item label="血管通路: " v-if="isShow('血管通路')">
165 165
               <el-select v-model="assessmentBeforeDislysis.blood_access_part_opera_id">
166 166
                 <el-option :key="0" label="请选择" :value="0"></el-option>
167 167
 
@@ -215,14 +215,14 @@
215 215
             </el-form-item>
216 216
           </el-col>
217 217
 
218
-          <el-col :span="8" v-if="isShow('血管通路(内瘘)')">
219
-            <el-form-item label="血管通路(内瘘):">
220
-              <div>
221
-                <el-input v-model="assessmentBeforeDislysis.blood_access_internal_fistula"
222
-                          @focus="showInnerDialog('9')"></el-input>
223
-              </div>
224
-            </el-form-item>
225
-          </el-col>
218
+<!--          <el-col :span="8" v-if="isShow('血管通路(内瘘)')">-->
219
+<!--            <el-form-item label="血管通路(内瘘):">-->
220
+<!--              <div>-->
221
+<!--                <el-input v-model="assessmentBeforeDislysis.blood_access_internal_fistula"-->
222
+<!--                          @focus="showInnerDialog('9')"></el-input>-->
223
+<!--              </div>-->
224
+<!--            </el-form-item>-->
225
+<!--          </el-col>-->
226 226
 
227 227
           <el-col :span="8">
228 228
             <el-form-item label="血管通路(内瘘)其他:" v-if="isShow('血管通路(内瘘)其他')">
@@ -276,18 +276,18 @@
276 276
           </el-col>
277 277
 
278 278
 
279
-          <el-col :span="8">
279
+<!--          <el-col :span="8">-->
280 280
 
281
-            <el-form-item label="位置: " v-if="isShow('位置')">
282
-              <el-select v-model="assessmentBeforeDislysis.venous_catheterization_part">
283
-                <el-option :key="0" label="请选择" :value="0"></el-option>
281
+<!--            <el-form-item label="位置: " v-if="isShow('位置')">-->
282
+<!--              <el-select v-model="assessmentBeforeDislysis.venous_catheterization_part">-->
283
+<!--                <el-option :key="0" label="请选择" :value="0"></el-option>-->
284 284
 
285
-                <el-option v-for="item in this.$store.getters.venous_catheterization_part" :label="item.name"
286
-                           :value="item.id"
287
-                           :key="item.id"></el-option>
288
-              </el-select>
289
-            </el-form-item>
290
-          </el-col>
285
+<!--                <el-option v-for="item in this.$store.getters.venous_catheterization_part" :label="item.name"-->
286
+<!--                           :value="item.id"-->
287
+<!--                           :key="item.id"></el-option>-->
288
+<!--              </el-select>-->
289
+<!--            </el-form-item>-->
290
+<!--          </el-col>-->
291 291
 
292 292
           <el-col :span="8">
293 293
             <el-form-item label="其他位置:" v-if="isShow('其他位置')">
@@ -296,13 +296,13 @@
296 296
           </el-col>
297 297
 
298 298
 
299
-          <el-col :span="8" v-if="isShow('中心静脉导管')">
300
-            <el-form-item label="中心静脉导管:">
301
-              <div>
302
-                <el-input v-model="assessmentBeforeDislysis.ductus_arantii" @focus="showInnerDialog('10')"></el-input>
303
-              </div>
304
-            </el-form-item>
305
-          </el-col>
299
+<!--          <el-col :span="8" v-if="isShow('导管')">-->
300
+<!--            <el-form-item label="导管:">-->
301
+<!--              <div>-->
302
+<!--                <el-input v-model="assessmentBeforeDislysis.ductus_arantii" @focus="showInnerDialog('10')"></el-input>-->
303
+<!--              </div>-->
304
+<!--            </el-form-item>-->
305
+<!--          </el-col>-->
306 306
 
307 307
 
308 308
           <el-col :span="8" v-if="isShow('其他中心静脉导管')">
@@ -390,16 +390,16 @@
390 390
 
391 391
           <el-row :gutter="20"> -->
392 392
           <!--<el-col :span="8">-->
393
-            <!--<el-form-item label="穿刺方法: " v-if="isShow('穿刺方法')">-->
393
+          <!--<el-form-item label="穿刺方法: " v-if="isShow('穿刺方法')">-->
394 394
 
395
-              <!--<el-select v-model="assessmentBeforeDislysis.puncture_method">-->
396
-                <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
395
+          <!--<el-select v-model="assessmentBeforeDislysis.puncture_method">-->
396
+          <!--<el-option :key="0" label="请选择" :value="0"></el-option>-->
397 397
 
398
-                <!--<el-option v-for="item in puncture_method" :label="item.name" :value="item.name"-->
399
-                           <!--:key="item.id"></el-option>-->
400
-              <!--</el-select>-->
398
+          <!--<el-option v-for="item in puncture_method" :label="item.name" :value="item.name"-->
399
+          <!--:key="item.id"></el-option>-->
400
+          <!--</el-select>-->
401 401
 
402
-            <!--</el-form-item>-->
402
+          <!--</el-form-item>-->
403 403
           <!--</el-col>-->
404 404
 
405 405
         </el-row>
@@ -594,7 +594,7 @@
594 594
         if (this.predialysis_evaluation.id == 0){
595 595
           if (this.lastDryWeightDislysis != null){
596 596
             this.weight_adjust.weight = this.lastDryWeightDislysis.dry_weight
597
-             this.assessmentBeforeDislysis.dry_weight = this.lastDryWeightDislysis.dry_weight
597
+            this.assessmentBeforeDislysis.dry_weight = this.lastDryWeightDislysis.dry_weight
598 598
 
599 599
           }else{
600 600
             if(this.lastPredialysisEvaluation != null){
@@ -761,13 +761,25 @@
761 761
         const ParamsQuery = this.assessmentBeforeDislysis
762 762
         ParamsQuery['patient'] = this.patient.id
763 763
         ParamsQuery['record_date'] = this.record_date
764
-        ParamsQuery['mode'] = 1
764
+        ParamsQuery['mode'] = "1"
765
+
765 766
         console.log(this.predialysis_evaluation)
766
-        if (this.predialysis_evaluation.creator > 0){
767
-          ParamsQuery['mode'] = 2
768
-          if(this.predialysis_evaluation.creator != this.$store.getters.xt_user.user.id){
769
-            ParamsQuery['mode'] = 3
767
+
768
+        if(this.predialysis_evaluation.id == 0){
769
+          ParamsQuery['mode'] = "1"
770
+
771
+        }else{
772
+          if (this.predialysis_evaluation.creater == 0){
773
+            ParamsQuery['mode'] = "1"
774
+          }else{
775
+            ParamsQuery['mode'] = "2"
776
+            if (this.predialysis_evaluation.creater != this.$store.getters.xt_user.user.id){
777
+              ParamsQuery['mode'] = "3"
778
+            }
779
+
770 780
           }
781
+
782
+
771 783
         }
772 784
 
773 785
         postAssessmentBeforeDislysis(ParamsQuery).then(response => {
@@ -810,6 +822,7 @@
810 822
           dry_weight: this.weight_adjust.weight,
811 823
           remark: this.weight_adjust.remark,
812 824
           doctor_id: this.weight_adjust.doctor,
825
+          mode : "1",
813 826
         };
814 827
         CreateDryWeight(params).then(response => {
815 828
           if (response.data.state == 0) {

+ 35 - 78
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Visa fil

@@ -838,8 +838,7 @@
838 838
           no_anticoagulant_weichi: '0',
839 839
           no_anticoagulant_zongliang: '0',
840 840
 
841
-
842
-          creater:0,
841
+          creater: 0
843 842
 
844 843
         },
845 844
 
@@ -1000,13 +999,12 @@
1000 999
 
1001 1000
             console.log(this.prescription)
1002 1001
 
1003
-            if(this.prescription.creater <= 0){
1002
+            if (this.prescription.creater <= 0) {
1004 1003
               mode = 1
1005
-            }else {
1004
+            } else {
1006 1005
               mode = 2
1007 1006
             }
1008 1007
 
1009
-
1010 1008
             postPrescription(ParamsQuery).then(response => {
1011 1009
               if (response.data.state == 0) {
1012 1010
                 this.$message.error(response.data.msg)
@@ -1119,13 +1117,12 @@
1119 1117
             ParamsQuery['record_date'] = this.record_date
1120 1118
             console.log(this.prescription)
1121 1119
 
1122
-            if(this.prescription.creater <= 0){
1120
+            if (this.prescription.creater <= 0) {
1123 1121
               mode = 1
1124
-            }else {
1122
+            } else {
1125 1123
               mode = 2
1126 1124
             }
1127 1125
 
1128
-
1129 1126
             postPrescription(ParamsQuery).then(response => {
1130 1127
               if (response.data.state == 0) {
1131 1128
                 this.$message.error(response.data.msg)
@@ -1263,14 +1260,7 @@
1263 1260
             const ParamsQuery = this.dialysisPrescription
1264 1261
             ParamsQuery['patient'] = this.patient.id
1265 1262
             ParamsQuery['record_date'] = this.record_date
1266
-            console.log(this.prescription)
1267
-
1268
-            if(this.prescription.creater <= 0){
1269
-              mode = 1
1270
-            }else {
1271
-              mode = 2
1272
-            }
1273
-
1263
+            ParamsQuery['mode'] = '1'
1274 1264
 
1275 1265
             postPrescription(ParamsQuery).then(response => {
1276 1266
               if (response.data.state == 0) {
@@ -1308,14 +1298,7 @@
1308 1298
               const ParamsQuery = this.dialysisPrescription
1309 1299
               ParamsQuery['patient'] = this.patient.id
1310 1300
               ParamsQuery['record_date'] = this.record_date
1311
-              console.log(this.prescription)
1312
-
1313
-              if(this.prescription.creater <= 0){
1314
-                mode = 1
1315
-              }else {
1316
-                mode = 2
1317
-              }
1318
-
1301
+              ParamsQuery['mode'] = '1'
1319 1302
 
1320 1303
               postPrescription(ParamsQuery).then(response => {
1321 1304
                 if (response.data.state == 0) {
@@ -1369,14 +1352,7 @@
1369 1352
               const ParamsQuery = this.dialysisPrescription
1370 1353
               ParamsQuery['patient'] = this.patient.id
1371 1354
               ParamsQuery['record_date'] = this.record_date
1372
-              console.log(this.prescription)
1373
-
1374
-              if(this.prescription.creater <= 0){
1375
-                mode = 1
1376
-              }else {
1377
-                mode = 2
1378
-              }
1379
-
1355
+              ParamsQuery['mode'] = '1'
1380 1356
 
1381 1357
               postPrescription(ParamsQuery).then(response => {
1382 1358
                 if (response.data.state == 0) {
@@ -1411,13 +1387,12 @@
1411 1387
               ParamsQuery['record_date'] = this.record_date
1412 1388
               console.log(this.prescription)
1413 1389
 
1414
-              if(this.prescription.creater <= 0){
1390
+              if (this.prescription.creater <= 0) {
1415 1391
                 mode = 1
1416
-              }else {
1392
+              } else {
1417 1393
                 mode = 2
1418 1394
               }
1419 1395
 
1420
-
1421 1396
               postPrescription(ParamsQuery).then(response => {
1422 1397
                 if (response.data.state == 0) {
1423 1398
                   this.$message.error(response.data.msg)
@@ -1453,14 +1428,7 @@
1453 1428
               const ParamsQuery = this.dialysisPrescription
1454 1429
               ParamsQuery['patient'] = this.patient.id
1455 1430
               ParamsQuery['record_date'] = this.record_date
1456
-              console.log(this.prescription)
1457
-
1458
-              if(this.prescription.creater <= 0){
1459
-                mode = 1
1460
-              }else {
1461
-                mode = 2
1462
-              }
1463
-
1431
+              ParamsQuery['mode'] = '1'
1464 1432
 
1465 1433
               postPrescription(ParamsQuery).then(response => {
1466 1434
                 if (response.data.state == 0) {
@@ -1498,14 +1466,7 @@
1498 1466
                 const ParamsQuery = this.dialysisPrescription
1499 1467
                 ParamsQuery['patient'] = this.patient.id
1500 1468
                 ParamsQuery['record_date'] = this.record_date
1501
-                console.log(this.prescription)
1502
-
1503
-                if(this.prescription.creater <= 0){
1504
-                  mode = 1
1505
-                }else {
1506
-                  mode = 2
1507
-                }
1508
-
1469
+                ParamsQuery['mode'] = '1'
1509 1470
 
1510 1471
                 postPrescription(ParamsQuery).then(response => {
1511 1472
                   if (response.data.state == 0) {
@@ -1559,14 +1520,7 @@
1559 1520
                 const ParamsQuery = this.dialysisPrescription
1560 1521
                 ParamsQuery['patient'] = this.patient.id
1561 1522
                 ParamsQuery['record_date'] = this.record_date
1562
-                console.log(this.prescription)
1563
-
1564
-                if(this.prescription.creater <= 0){
1565
-                  mode = 1
1566
-                }else {
1567
-                  mode = 2
1568
-                }
1569
-
1523
+                ParamsQuery['mode'] = '1'
1570 1524
 
1571 1525
                 postPrescription(ParamsQuery).then(response => {
1572 1526
                   if (response.data.state == 0) {
@@ -1599,13 +1553,7 @@
1599 1553
                 const ParamsQuery = this.dialysisPrescription
1600 1554
                 ParamsQuery['patient'] = this.patient.id
1601 1555
                 ParamsQuery['record_date'] = this.record_date
1602
-                console.log(this.prescription)
1603
-
1604
-                if(this.prescription.creater <= 0){
1605
-                  mode = 1
1606
-                }else {
1607
-                  mode = 2
1608
-                }
1556
+                ParamsQuery['mode'] = '1'
1609 1557
 
1610 1558
 
1611 1559
                 postPrescription(ParamsQuery).then(response => {
@@ -1641,15 +1589,12 @@
1641 1589
             const ParamsQuery = this.dialysisPrescription
1642 1590
             ParamsQuery['patient'] = this.patient.id
1643 1591
             ParamsQuery['record_date'] = this.record_date
1644
-            console.log(this.prescription)
1592
+            ParamsQuery['mode'] = "2"
1645 1593
 
1646
-            if(this.prescription.creater <= 0){
1647
-              mode = 1
1648
-            }else {
1649
-              mode = 2
1594
+            if (this.$store.getters.xt_user.user.id  != this.dialysisPrescription.creater){
1595
+              ParamsQuery['mode'] = "3"
1650 1596
             }
1651 1597
 
1652
-
1653 1598
             postPrescription(ParamsQuery).then(response => {
1654 1599
               if (response.data.state == 0) {
1655 1600
                 this.$message.error(response.data.msg)
@@ -1701,6 +1646,8 @@
1701 1646
             const ParamsQuery = this.dialysisPrescription
1702 1647
             ParamsQuery['patient'] = this.patient.id
1703 1648
             ParamsQuery['record_date'] = this.record_date
1649
+            ParamsQuery['mode'] = "1"
1650
+
1704 1651
             postSoulution(ParamsQuery).then(response => {
1705 1652
               if (response.data.state == 0) {
1706 1653
                 this.$message.error(response.data.msg)
@@ -1742,6 +1689,8 @@
1742 1689
               const ParamsQuery = this.dialysisPrescription
1743 1690
               ParamsQuery['patient'] = this.patient.id
1744 1691
               ParamsQuery['record_date'] = this.record_date
1692
+              ParamsQuery['mode'] = "1"
1693
+
1745 1694
               postSoulution(ParamsQuery).then(response => {
1746 1695
                 if (response.data.state == 0) {
1747 1696
                   this.$message.error(response.data.msg)
@@ -1802,11 +1751,7 @@
1802 1751
               ParamsQuery['record_date'] = this.record_date
1803 1752
               console.log(this.prescription)
1804 1753
 
1805
-              if(this.prescription.creater <= 0){
1806
-                mode = 1
1807
-              }else {
1808
-                mode = 2
1809
-              }
1754
+              ParamsQuery['mode'] = "1"
1810 1755
 
1811 1756
 
1812 1757
               postPrescription(ParamsQuery).then(response => {
@@ -1839,6 +1784,8 @@
1839 1784
               const ParamsQuery = this.dialysisPrescription
1840 1785
               ParamsQuery['patient'] = this.patient.id
1841 1786
               ParamsQuery['record_date'] = this.record_date
1787
+              ParamsQuery['mode'] = "1"
1788
+
1842 1789
               postSoulution(ParamsQuery).then(response => {
1843 1790
                 if (response.data.state == 0) {
1844 1791
                   this.$message.error(response.data.msg)
@@ -1879,6 +1826,8 @@
1879 1826
               const ParamsQuery = this.dialysisPrescription
1880 1827
               ParamsQuery['patient'] = this.patient.id
1881 1828
               ParamsQuery['record_date'] = this.record_date
1829
+              ParamsQuery['mode'] = "1"
1830
+
1882 1831
               postSoulution(ParamsQuery).then(response => {
1883 1832
                 if (response.data.state == 0) {
1884 1833
                   this.$message.error(response.data.msg)
@@ -1920,6 +1869,8 @@
1920 1869
                 const ParamsQuery = this.dialysisPrescription
1921 1870
                 ParamsQuery['patient'] = this.patient.id
1922 1871
                 ParamsQuery['record_date'] = this.record_date
1872
+                ParamsQuery['mode'] = "1"
1873
+
1923 1874
                 postSoulution(ParamsQuery).then(response => {
1924 1875
                   if (response.data.state == 0) {
1925 1876
                     this.$message.error(response.data.msg)
@@ -1956,7 +1907,7 @@
1956 1907
                   advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1957 1908
                   advice_type: this.waitUploadAdvices[0].advice_type,
1958 1909
                   parent_id: this.patient_id,
1959
-                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1910
+                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
1960 1911
                   remark: ''
1961 1912
                 }
1962 1913
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
@@ -1977,6 +1928,8 @@
1977 1928
                 const ParamsQuery = this.dialysisPrescription
1978 1929
                 ParamsQuery['patient'] = this.patient.id
1979 1930
                 ParamsQuery['record_date'] = this.record_date
1931
+                ParamsQuery['mode'] = "1"
1932
+
1980 1933
                 postSoulution(ParamsQuery).then(response => {
1981 1934
                   if (response.data.state == 0) {
1982 1935
                     this.$message.error(response.data.msg)
@@ -2013,6 +1966,8 @@
2013 1966
                 const ParamsQuery = this.dialysisPrescription
2014 1967
                 ParamsQuery['patient'] = this.patient.id
2015 1968
                 ParamsQuery['record_date'] = this.record_date
1969
+                ParamsQuery['mode'] = "1"
1970
+
2016 1971
                 postSoulution(ParamsQuery).then(response => {
2017 1972
                   if (response.data.state == 0) {
2018 1973
                     this.$message.error(response.data.msg)
@@ -2051,6 +2006,8 @@
2051 2006
             const ParamsQuery = this.dialysisPrescription
2052 2007
             ParamsQuery['patient'] = this.patient.id
2053 2008
             ParamsQuery['record_date'] = this.record_date
2009
+            ParamsQuery['mode'] = "1"
2010
+
2054 2011
             postSoulution(ParamsQuery).then(response => {
2055 2012
               if (response.data.state == 0) {
2056 2013
                 this.$message.error(response.data.msg)

+ 5 - 0
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Visa fil

@@ -1052,9 +1052,14 @@ export default {
1052 1052
         type: "warning"
1053 1053
       })
1054 1054
         .then(() => {
1055
+          let mode = "4"
1056
+          // if(this.table_current_row)
1057
+
1058
+
1055 1059
           const params = {
1056 1060
             patient_id: this.patient_id,
1057 1061
             record_id: this.table_current_row.id
1062
+
1058 1063
           };
1059 1064
 
1060 1065
           postDelMonitorInfo(params).then(response => {

+ 12 - 15
src/xt_pages/management/components/MultipleForm.vue Visa fil

@@ -6,11 +6,11 @@
6 6
       width="95%"
7 7
       center
8 8
     >
9
-      <el-form style="height:100%">
9
+      <el-form style="height: 100%;">
10 10
         <el-row :gutter="20">
11 11
           <el-col :span="4">
12 12
             <el-form-item label="透析分区:">
13
-              <el-select style="width:110px" v-model="form.zone">
13
+              <el-select style="width: 110px;" v-model="form.zone">
14 14
                 <el-option
15 15
                   v-for="item in this.DeviceType"
16 16
                   :key="item.id"
@@ -22,7 +22,7 @@
22 22
           </el-col>
23 23
           <el-col :span="4">
24 24
             <el-form-item label="机号:">
25
-              <el-select style="width:110px" v-model="form.device_number">
25
+              <el-select style="width: 110px;" v-model="form.device_number">
26 26
                 <el-option
27 27
                   v-for="item in this.Numbers"
28 28
                   :key="item.id"
@@ -34,7 +34,7 @@
34 34
           </el-col>
35 35
           <el-col :span="4">
36 36
             <el-form-item label="设备类型:">
37
-              <el-select style="width:110px" v-model="form.device_type">
37
+              <el-select style="width: 110px;" v-model="form.device_type">
38 38
                 <el-option
39 39
                   v-for="item in this.EquitmentType"
40 40
                   :key="item.id"
@@ -46,7 +46,7 @@
46 46
           </el-col>
47 47
           <el-col :span="4">
48 48
             <el-form-item label="设备型号:">
49
-              <el-select style="width:110px" v-model="form.device_model">
49
+              <el-select style="width: 110px;" v-model="form.device_model">
50 50
                 <el-option
51 51
                   v-for="item in this.EquitmentName"
52 52
                   :key="item.id"
@@ -58,7 +58,7 @@
58 58
           </el-col>
59 59
           <el-col :span="4">
60 60
             <el-form-item label="使用年限:">
61
-              <el-select style="width:110px" v-model="form.user_year">
61
+              <el-select style="width: 110px;" v-model="form.user_year">
62 62
                 <el-option
63 63
                   v-for="item in this.userYear"
64 64
                   :key="item.id"
@@ -122,8 +122,8 @@
122 122
         <el-table
123 123
           :data="tableData"
124 124
           border
125
-          style="width:100%"
126
-          height="80%"
125
+          style="width: 100%;"
126
+          height="330"
127 127
           :row-style="{ color: '#303133' }"
128 128
           :header-cell-style="{
129 129
             backgroundColor: 'rgb(245, 247, 250)',
@@ -184,7 +184,7 @@
184 184
             width="100"
185 185
             align="center"
186 186
           >
187
-            <template slot-scope="scope">{{ scope.row.unit_type }}</template>
187
+            <template slot-scope="scope">{{ scope.row.device_mode }}</template>
188 188
           </el-table-column>
189 189
           <el-table-column
190 190
             prop="address"
@@ -328,10 +328,7 @@ export default {
328 328
       DeviceType: [{ id: 0, name: "不限" }],
329 329
       Numbers: [{ id: 0, number: "不限" }],
330 330
       EquitmentName: [{ id: 0, equitment_name: "全部" }],
331
-      runOptions: [
332
-        { value: "1", label: "正常" },
333
-        { value: "2", label: "故障" }
334
-      ]
331
+      runOptions: [{ value: "1", label: "正常" }, { value: "2", label: "故障" }]
335 332
     };
336 333
   },
337 334
   methods: {
@@ -384,7 +381,7 @@ export default {
384 381
       getComprehensive(params).then(response => {
385 382
         if (response.data.state === 1) {
386 383
           var macher = response.data.data.macher;
387
-          console.log("设备型号5555", macher);
384
+
388 385
           for (let index = 0; index < macher.length; index++) {
389 386
             if (macher[index].device_type === 1) {
390 387
               macher[index].device_type = "透析机";
@@ -428,7 +425,7 @@ export default {
428 425
       getTotalCount().then(response => {
429 426
         if (response.data.state === 1) {
430 427
           var total = response.data.data.total;
431
-          // console.log('total ========', total)
428
+
432 429
           this.failure_times = total;
433 430
         }
434 431
       });

+ 20 - 23
src/xt_pages/management/components/UserForm.vue Visa fil

@@ -1002,6 +1002,7 @@ export default {
1002 1002
       limit: 10,
1003 1003
       page: 1,
1004 1004
       total: 0,
1005
+      value: "",
1005 1006
       classType: [
1006 1007
         { id: 1, name: "上午" },
1007 1008
         { id: 2, name: "下午" },
@@ -1066,14 +1067,8 @@ export default {
1066 1067
         { id: 8, name: "50%冰醋酸" },
1067 1068
         { id: 9, name: "5%次氯酸钠" }
1068 1069
       ],
1069
-      runOption: [
1070
-        { id: 1, name: "正常" },
1071
-        { id: 2, name: "故障" }
1072
-      ],
1073
-      runOptions: [
1074
-        { id: 1, name: "达标" },
1075
-        { id: 2, name: "未达标" }
1076
-      ],
1070
+      runOption: [{ id: 1, name: "正常" }, { id: 2, name: "故障" }],
1071
+      runOptions: [{ id: 1, name: "达标" }, { id: 2, name: "未达标" }],
1077 1072
       faultPhase: [
1078 1073
         { id: 1, name: "开机启动" },
1079 1074
         { id: 2, name: "自检" },
@@ -1081,14 +1076,8 @@ export default {
1081 1076
         { id: 4, name: "治疗" },
1082 1077
         { id: 5, name: "消毒" }
1083 1078
       ],
1084
-      Disinfectant: [
1085
-        { id: 1, name: "有" },
1086
-        { id: 2, name: "无" }
1087
-      ],
1088
-      potency: [
1089
-        { id: 1, name: "达标" },
1090
-        { id: 2, name: "未达标" }
1091
-      ],
1079
+      Disinfectant: [{ id: 1, name: "有" }, { id: 2, name: "无" }],
1080
+      potency: [{ id: 1, name: "达标" }, { id: 2, name: "未达标" }],
1092 1081
       disinfection: [
1093 1082
         { id: 1, name: "已消毒" },
1094 1083
         { id: 2, name: "未消毒" },
@@ -1153,7 +1142,8 @@ export default {
1153 1142
         germ_number: "", // 数量
1154 1143
         clean: "", // 清洁
1155 1144
         sign_name: "", // 签名
1156
-        patient_id: ""
1145
+        patient_id: "",
1146
+        equiment_id: ""
1157 1147
       },
1158 1148
       hiddenShow: false,
1159 1149
       searchArray: [],
@@ -1438,11 +1428,13 @@ export default {
1438 1428
     },
1439 1429
     handleSizeChange(limit) {
1440 1430
       this.limit = limit;
1441
-      this.queryInfo();
1431
+      //this.queryInfo();
1432
+      this.getUserForm(this.value);
1442 1433
     },
1443 1434
     handleCurrentChange(page) {
1444 1435
       this.page = page;
1445
-      this.queryInfo();
1436
+      // this.queryInfo();
1437
+      this.getUserForm(this.value);
1446 1438
     },
1447 1439
     getTime(time) {
1448 1440
       return uParseTime(time, "{y}-{m}-{d}");
@@ -1474,7 +1466,7 @@ export default {
1474 1466
       EditUser(id, patientid).then(response => {
1475 1467
         if (response.data.state === 1) {
1476 1468
           var device = response.data.data.device;
1477
-          // console.log('device', device)
1469
+          console.log("device", device);
1478 1470
           var patients = response.data.data.patients;
1479 1471
           // console.log('patients', patients)
1480 1472
           // eslint-disable-next-line no-sequences
@@ -1485,7 +1477,7 @@ export default {
1485 1477
             ));
1486 1478
           this.userform.patient_id = device.patient_id;
1487 1479
           this.userform.classtype = device.class;
1488
-          this.userform.zone = device.zone;
1480
+          this.userform.zone = device.zone_id;
1489 1481
           this.userform.bed_number = device.bed_number;
1490 1482
           this.userform.contagion = device.contagion;
1491 1483
           this.userform.patient_name = patients.name;
@@ -1531,6 +1523,7 @@ export default {
1531 1523
           // )
1532 1524
           this.userform.starttime = this.updateTimes(device.disinfec_startime);
1533 1525
           this.userform.endtime = this.updateTimes(device.disinfec_endtime);
1526
+          this.userform.equiment_id = device.equiment_id;
1534 1527
           if (device.dialysis_checked === 1) {
1535 1528
             this.userform.dialysis_checked = true;
1536 1529
           }
@@ -1701,6 +1694,7 @@ export default {
1701 1694
       ).then(response => {
1702 1695
         if (response.data.state === 1) {
1703 1696
           var information = response.data.data.infor;
1697
+          console.log("information", information);
1704 1698
           for (let index = 0; index < information.length; index++) {
1705 1699
             if (information[index].class === 0) {
1706 1700
               information[index].class = "";
@@ -2231,6 +2225,7 @@ export default {
2231 2225
             // this.form.bed = information[index].bed_number
2232 2226
           }
2233 2227
           var total = response.data.data.total;
2228
+          console.log("total", total);
2234 2229
           this.tableData = information;
2235 2230
           this.total = total;
2236 2231
         }
@@ -2242,8 +2237,9 @@ export default {
2242 2237
           var addmacher = response.data.data.addmacher;
2243 2238
           console.log("addmacher=============", addmacher);
2244 2239
           var number = response.data.data.number;
2245
-          // console.log('number', number)
2246
-          this.form.zone = addmacher.zone_id;
2240
+          console.log("number", number);
2241
+          //改动
2242
+          this.form.zone = number[0].zone_id;
2247 2243
           this.form.bed = addmacher.bed_id;
2248 2244
 
2249 2245
           var bed = [{ id: 0, number: "全部" }];
@@ -2360,6 +2356,7 @@ export default {
2360 2356
       console.log("newvalue是什么", newvalue);
2361 2357
       this.getUserForm(newvalue);
2362 2358
       this.getBedForm(newvalue);
2359
+      this.value = newvalue;
2363 2360
     }
2364 2361
   }
2365 2362
 };

+ 14 - 11
src/xt_pages/management/home.vue Visa fil

@@ -493,7 +493,7 @@
493 493
                                         </el-select>
494 494
                                      </el-form-item>
495 495
                                 </el-col>
496
-                                 <el-col :span="7">      
496
+                                 <el-col :span="7">
497 497
                                     <el-form-item label="使用年限(年):">
498 498
                                       <el-input style="width:150px" v-model="form.user_year" :disabled="disableFour"></el-input>
499 499
                                     </el-form-item>
@@ -2685,7 +2685,7 @@ export default {
2685 2685
                 this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
2686 2686
                 break
2687 2687
               }
2688
-              
2688
+
2689 2689
             }
2690 2690
             // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[this.tabIndex])
2691 2691
           }
@@ -3004,7 +3004,7 @@ export default {
3004 3004
                       //   this.$forceUpdate()
3005 3005
                     }
3006 3006
                   }
3007
-  
3007
+
3008 3008
                   this.tableDatatwo[i] = addmacher
3009 3009
                   // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
3010 3010
                 }
@@ -3013,6 +3013,8 @@ export default {
3013 3013
               // this.getAllSubregion()
3014 3014
               this.$refs.singleTable.setCurrentRow(addmacher)
3015 3015
               this.$forceUpdate()
3016
+            }else{
3017
+             this.$message.error("修改失败");
3016 3018
             }
3017 3019
           })
3018 3020
         })
@@ -3059,7 +3061,7 @@ export default {
3059 3061
                       //   this.$forceUpdate()
3060 3062
                       }
3061 3063
                     }
3062
-  
3064
+
3063 3065
                     this.tableDatatwo[i] = addmacher
3064 3066
                   // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
3065 3067
                   }
@@ -3103,7 +3105,7 @@ export default {
3103 3105
                       //   this.$forceUpdate()
3104 3106
                     }
3105 3107
                   }
3106
-  
3108
+
3107 3109
                   this.tableDatatwo[i] = addmacher
3108 3110
                   // this.$refs.singleTable.setCurrentRow(this.tableDatatwo[i])
3109 3111
                 }
@@ -3449,7 +3451,7 @@ export default {
3449 3451
             this.machineform.machine_disinfectant = plan.machine_disinfectant
3450 3452
             this.machineform.disinfectant_way = plan.disinfectan_way
3451 3453
             this.machineform.disinfectant = plan.disinfectant
3452
-            this.getPatientDetail(this.unitType, this.$route.query.bedid)
3454
+           // this.getPatientDetail(this.unitType, this.$route.query.bedid)
3453 3455
           }
3454 3456
         })
3455 3457
       },
@@ -3457,7 +3459,7 @@ export default {
3457 3459
         var devicetype = this.machineform.device_type
3458 3460
         var devicetypes = parseInt(devicetype)
3459 3461
         this.machineform.device_type = devicetypes
3460
-  
3462
+
3461 3463
         if (this.machineform.disinfec_time === '') {
3462 3464
           this.machineform.disinfec_time = ''
3463 3465
         }
@@ -3466,7 +3468,7 @@ export default {
3466 3468
           var disinfectime = parseInt(disinfectimes)
3467 3469
           this.machineform.disinfec_time = disinfectime
3468 3470
         }
3469
-  
3471
+
3470 3472
         var times = this.machineform.time
3471 3473
         var time = parseInt(times)
3472 3474
         this.machineform.time = time
@@ -3874,7 +3876,7 @@ export default {
3874 3876
         getUserRegister(id).then(response => {
3875 3877
           if (response.data.state === 1) {
3876 3878
             var information = response.data.data.information
3877
-            // console.log('产讯使用登记', information)
3879
+             console.log('产讯使用登记', information)
3878 3880
             // eslint-disable-next-line no-unused-vars
3879 3881
             var role = response.data.data.role
3880 3882
             // console.log('role', role)
@@ -3936,7 +3938,7 @@ export default {
3936 3938
             this.userform.machine_run = information.machine_run
3937 3939
             this.userform.fluid_path = information.fluid_path
3938 3940
             this.userform.disinfectant = information.disinfectant
3939
-            this.userform.disinfectant = information.disinfection_status
3941
+            this.userform.disinfection_status = information.disinfection_status
3940 3942
             this.userform.disinfection_residue = information.disinfection_residue
3941 3943
             this.userform.longtime = information.long_time
3942 3944
             this.userform.starttime = this.updateTimes(information.disinfec_startime)
@@ -4386,7 +4388,7 @@ export default {
4386 4388
             }
4387 4389
 
4388 4390
             var timeDataThree = response.data.data.timeDataThree
4389
-            console.log('timeDataThree', timeDataThree)
4391
+            //console.log('timeDataThree', timeDataThree)
4390 4392
             if (timeDataThree.length === 0) {
4391 4393
               this.warnShowThree = true
4392 4394
             }
@@ -4410,6 +4412,7 @@ export default {
4410 4412
       getAllMode() {
4411 4413
         getAllMode().then(response => {
4412 4414
           var mode = response.data.data.mode
4415
+
4413 4416
           this.deviceMode = mode
4414 4417
         })
4415 4418
       },

+ 0 - 1
src/xt_pages/role/admin.vue Visa fil

@@ -176,7 +176,6 @@ export default {
176 176
   },
177 177
   created: function() {
178 178
     this.local_user_id = this.$store.getters.xt_user.user.id
179
-    this.local_user_id = 597
180 179
     let page = 1
181 180
     this.getRoles(page)
182 181
     adminMainView()

+ 16 - 17
src/xt_pages/role/components/AdminInfoForm.vue Visa fil

@@ -177,16 +177,6 @@
177 177
                   }
178 178
                 }
179 179
 
180
-
181
-
182
-
183
-
184
-
185
-
186
-                // if (this.roles.length > 0) {
187
-                //   this.form.role = this.roles[0].id;
188
-                //   console.log("国庆快乐",this.form.role)
189
-                // }
190 180
               } else {
191 181
                 this.$message.error(resp.msg)
192 182
               }
@@ -228,20 +218,29 @@
228 218
                 this.form.intro = admin.intro
229 219
                 this.form.user_title_name = admin.user_title_name
230 220
 
231
-
221
+                this.isSubSuperAdmin = resp.data.isSubSuperAdmin
222
+                this.org = resp.data.org
232 223
 
233 224
                 //如果当前用户是超级管理员而且编辑自己的信息
234
-                if(this.isSubSuperAdmin || this.admin_id == org.creator){
235
-                  for (let i =0 ; i < this.roles.length; i++){
236
-                    if(this.roles[i].is_system == 1 && this.roles[i].role_name == "子管理员"){
225
+
226
+                if(!this.isSubSuperAdmin) {
227
+                  if (this.form.id == org.creator) {
228
+                    for (let i = 0; i < this.roles.length; i++) {
229
+                      if (this.roles[i].is_system == 1 && this.roles[i].name == "子管理员") {
230
+                        this.roles.splice(i, 1)
231
+                        i--
232
+                      }
233
+                    }
234
+                  }
235
+                }else{
236
+                  for (let i = 0; i < this.roles.length; i++) {
237
+                    if (this.roles[i].is_system == 1 && this.roles[i].name == "子管理员") {
237 238
                       this.roles.splice(i, 1)
238 239
                       i--
239 240
                     }
240 241
                   }
241
-                }
242
-
243
-
244 242
 
243
+                }
245 244
 
246 245
               } else {
247 246
                 this.$message.error('该用户不存在')

+ 2 - 2
src/xt_pages/role/components/AdminRoleInfoForm.vue Visa fil

@@ -129,7 +129,6 @@
129 129
           return
130 130
         }
131 131
         let local_user_id = this.$store.getters.xt_user.user.id
132
-        local_user_id = 597
133 132
         this.form.id = this.admin_id
134 133
         this.formTitle = '编辑用户'
135 134
         getModifyAdminInitData(this.form.id)
@@ -206,6 +205,7 @@
206 205
                     }, 500)
207 206
 
208 207
                     this.$emit('did-edit-admin')
208
+                    this.$refs.form.resetFields();
209 209
 
210 210
                   } else {
211 211
                     this.$message.error(resp.msg)
@@ -231,8 +231,8 @@
231 231
                   this.loading = false
232 232
                   var resp = rs.data
233 233
                   if (resp.state === 1) {
234
-                   console.log("11111111")
235 234
                     this.$emit('did-edit-admin')
235
+                    this.$refs.form.resetFields();
236 236
 
237 237
                   } else {
238 238
                     this.$message.error(resp.msg)

+ 60 - 14
src/xt_pages/role/components/EditRole.vue Visa fil

@@ -121,7 +121,7 @@
121 121
 </template>
122 122
 
123 123
 <script>
124
-  import { addRole, AddUserRole, getStaffsList, modifyRole } from '@/api/role/role'
124
+  import { addRole, AddUserRole, getStaffsList, modifyRole,getRoleInfo } from '@/api/role/role'
125 125
   import { addAdmin, getAddAdminInitData, getModifyAdminInitData, modifyAdmin } from '@/api/role/admin'
126 126
 
127 127
   export default {
@@ -146,8 +146,10 @@
146 146
       }
147 147
 
148 148
       return {
149
+        org:null,
149 150
         submitLoading:false,
150 151
         loading:true,
152
+        local_user_id:0,
151 153
         form: {
152 154
           id: 0,
153 155
           name: '',
@@ -253,24 +255,21 @@
253 255
 
254 256
       },
255 257
       change(val) {
256
-
257 258
         if (this.checkedCities.length == this.admin_user.length) {
258
-
259 259
           this.checkAll = true
260 260
         } else {
261 261
           this.checkAll = false
262
-
263 262
         }
264
-
265
-      }
266
-
267
-      ,
263
+      },
268 264
       GetAllStaff: function() {
269 265
         getStaffsList()
270 266
           .then(rs => {
271 267
             var resp = rs.data
272 268
             if (resp.state === 1) {
273 269
               this.admin_user = resp.data.admins
270
+              this.org = resp.data.org
271
+              this.isSubSuperAdmin = resp.data.isSubSuperAdmin;
272
+
274 273
               for (let i = 0; i < this.admin_user.length; i++) {
275 274
                 if (this.admin_user[i].role_ids.length > 0) {
276 275
                   let isExist = -1
@@ -283,13 +282,35 @@
283 282
                   }
284 283
                 }
285 284
               }
285
+              console.log(this.admin_user)
286
+
287
+
286 288
               for (let i = 0; i < this.admin_user.length; i++) {
287
-                if (this.admin_user[i].user_id == resp.data.org.creator) {
289
+                if (this.isSubSuperAdmin) { //如果当前用户是子管理员,则将管理员剔除到待添加员工列表
290
+                  console.log(this.admin_user[i].user_id)
291
+                  console.log(this.org.creator)
288 292
 
289
-                  this.admin_user.splice(i, 1)
290
-                  i = i - 1
293
+                  if (this.admin_user[i].user_id == this.org.creator) {
294
+                    this.admin_user.splice(i, 1);
295
+                    i = i - 1;
296
+                  } else {
297
+                    if (this.admin_user[i].is_sub_admin && this.admin_user[i].user_id != this.local_user_id) {
298
+                      this.admin_user.splice(i, 1);
299
+                      i = i - 1;
300
+                    }
301
+                  }
302
+                } else { //如果当前用户是超级管理员,而且当前编辑角色是子管理员的话,需要将超级管理员剔除到待添加员工列表
303
+                  if (this.role.name == "子管理员" && this.role.is_system == 1) {
304
+                    if (this.admin_user[i].user_id == this.org.creator) {
305
+                      this.admin_user.splice(i, 1);
306
+                      i = i - 1;
307
+                    }
308
+                  }
291 309
                 }
292 310
               }
311
+
312
+
313
+
293 314
               this.loading = false
294 315
 
295 316
             } else {
@@ -321,9 +342,34 @@
321 342
         this.admin_user = []
322 343
         this.is_check_admin_user = []
323 344
         this.checkedCities = []
324
-        this.GetAllStaff()
325
-      },
326
-      hide() {
345
+        this.local_user_id = this.$store.getters.xt_user.user.id
346
+
347
+        this.getRoleInfo(role_id)
348
+      },getRoleInfo(id){
349
+        let params = {
350
+          role_id: id
351
+        }
352
+        getRoleInfo(params)
353
+          .then(rs => {
354
+            var resp = rs.data
355
+            if (resp.state === 1) {
356
+              this.role = resp.data.role
357
+              this.loading = true
358
+              this.GetAllStaff()
359
+
360
+
361
+            } else {
362
+              this.$message.error(resp.msg)
363
+
364
+            }
365
+          })
366
+          .catch(err => {
367
+            this.$message.error(err)
368
+          })
369
+
370
+
371
+
372
+      }, hide() {
327 373
         this.clear()
328 374
         this.visible = false
329 375
       },

+ 44 - 4
src/xt_pages/role/components/UserManagement.vue Visa fil

@@ -38,7 +38,7 @@
38 38
           <template slot-scope="scope" style="text-align: center">
39 39
             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
40 40
               <el-button  type="primary" icon="el-icon-edit-outline" size="small"
41
-                         v-if="org.creator != scope.row.user_id && (scope.row.user_id != local_user_id) && !scope.row.is_sub_super_admin"
41
+                         v-if="isShow(scope.row.is_sub_super_admin,scope.row.user_id)"
42 42
                          @click="openForm(scope.row.user_id, role_id)" ></el-button>
43 43
             </el-tooltip>
44 44
 
@@ -52,7 +52,7 @@
52 52
                 type="danger"
53 53
                 size="small"
54 54
                 icon="el-icon-delete"
55
-                v-if="scope.row.status == 1 && org.creator != scope.row.user_id && (scope.row.user_id != local_user_id) && !scope.row.is_sub_super_admin"
55
+                v-if="scope.row.status == 1 && isShowDel(scope.row.is_sub_super_admin, scope.row.user_id) "
56 56
                 @click="disableAdminAction(scope.row)"
57 57
               ></el-button>
58 58
             </el-tooltip>
@@ -67,7 +67,7 @@
67 67
                 size="small"
68 68
                 type="info"
69 69
                 icon="el-icon-refresh"
70
-                v-if="scope.row.status == 0 && org.creator != scope.row.user_id  && (scope.row.user_id != local_user_id ) && !scope.row.is_sub_super_admin"
70
+                v-if="scope.row.status == 0 && isShowDel(scope.row.is_sub_super_admin, scope.row.user_id)"
71 71
                 @click="recoverAdminAction(scope.row)"
72 72
               ></el-button>
73 73
             </el-tooltip>
@@ -100,10 +100,50 @@
100 100
         local_user_id: 0,
101 101
         org:null,
102 102
         loading:false,
103
+        isSubSuperAdmin:false,
103 104
 
104 105
       }
105 106
     },
106 107
     methods: {
108
+      isShowDel:function(is_sub_admin,user_id){
109
+        if(this.isSubSuperAdmin){ //子管理员
110
+          if(is_sub_admin){ //当前操作的用户是否为子管理员
111
+            return false
112
+          }else{
113
+            if(this.org.creator != user_id){
114
+              return true
115
+            }else{
116
+              return false
117
+            }
118
+          }
119
+        }else{ //超级管理员
120
+          if(this.org.creator == user_id){
121
+            return false
122
+          }else{
123
+            return true
124
+          }
125
+        }
126
+      },
127
+      isShow:function(is_sub_admin,user_id){
128
+        if (!this.isSubSuperAdmin){
129
+          return true
130
+        }else {
131
+          if (is_sub_admin) {
132
+            if (user_id == this.local_user_id) {
133
+              return true
134
+            }else{
135
+              return false
136
+            }
137
+          } else {
138
+            if (user_id != this.org.creator) {
139
+              return true
140
+            } else {
141
+              return false
142
+            }
143
+          }
144
+        }
145
+      },
146
+
107 147
       didModifyAdmin(){
108 148
         this.GetAllStaff()
109 149
         this.$refs["admininfoform"].close();
@@ -184,6 +224,7 @@
184 224
           if (response.data.state === 1) {
185 225
             this.admin_user = response.data.data.admins
186 226
             this.org = response.data.data.org
227
+            this.isSubSuperAdmin = response.data.data.isSubSuperAdmin
187 228
 
188 229
             for (let i = 0; i < this.admin_user.length; i++) {
189 230
               if (this.admin_user[i].role_ids.length > 0) {
@@ -213,7 +254,6 @@
213 254
         this.role_id = role_id
214 255
         this.admin_user = []
215 256
         this.local_user_id = this.$store.getters.xt_user.user.id
216
-        this.local_user_id = 597
217 257
         this.GetAllStaff()
218 258
       }
219 259
     }

+ 1 - 1
src/xt_pages/sign/index.vue Visa fil

@@ -154,7 +154,7 @@ export default {
154 154
         id: '',
155 155
         weight_before: '', // 透前体重
156 156
         temperature: '', // 体温
157
-        pulse_frequency: '', // 脉搏
157
+        pulse_frequency: '',
158 158
         breathing_rate: '', // 呼吸频率
159 159
         dry_weight: '', // 干体重
160 160
         systolic_blood_pressure: '', // 收缩压

+ 161 - 172
src/xt_pages/user/dialysisSolution.vue Visa fil

@@ -1,75 +1,77 @@
1 1
 <template>
2 2
   <div class="patient-container">
3
-   <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
4
-   <div class="patient-app-container app-container">
5
-    <div class="Total">
6
-      <!-- <div class="plan" >透析计划</div> -->
7
-      <!-- <table-title title="长期透析处方"></table-title> -->
8
-      <div class="sum">
9
-        <!-- <span>透析总频率:<el-input :value="totalrate" disabled style="width:180px"></el-input></span> -->
10
-        <el-button type="primary" size="small" icon="el-icon-plus"  @click="openNew" :disabled="$store.getters.xt_user.subscibe.state==3?true:false">新增透析处方</el-button>
3
+    <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
4
+    <div class="patient-app-container app-container">
5
+      <div class="Total">
6
+        <!-- <div class="plan" >透析计划</div> -->
7
+        <!-- <table-title title="长期透析处方"></table-title> -->
8
+        <div class="sum">
9
+          <!-- <span>透析总频率:<el-input :value="totalrate" disabled style="width:180px"></el-input></span> -->
10
+          <el-button type="primary" size="small" icon="el-icon-plus" @click="openNew"
11
+                     :disabled="$store.getters.xt_user.subscibe.state==3?true:false">新增透析处方
12
+          </el-button>
13
+        </div>
11 14
       </div>
12
-    </div>
13
-    <el-table ref="solutionTable" :data="tableData" border fit highlight-current-row
14
-     @current-change="tableCurrentChange" :header-cell-style="{
15
+      <el-table ref="solutionTable" :data="tableData" border fit highlight-current-row
16
+                @current-change="tableCurrentChange" :header-cell-style="{
15 17
                   backgroundColor: 'rgb(245, 247, 250)',
16 18
                   color: '#606266'
17 19
                 }"
18 20
                 :row-style="{ color: '#303133' }"
19
-     style="width: 100%">
20
-      <el-table-column
21
-        type="index"
22
-        align="center"
23
-        label="序号"
24
-        width="60">
25
-      </el-table-column>
26
-       <el-table-column
27
-        prop="mode_name"
28
-        align="center"
29
-        label="透析模式"
30
-        min-width="50">
31
-        <template slot-scope="scope" >
32
-          {{modeOptions[scope.row.mode_id].name}}
33
-        </template>
34
-      </el-table-column>
35
-       <el-table-column
36
-        prop="dialysis_duration"
37
-        align="center"
38
-        label="透析时长"
39
-        min-width="50">
40
-        <template slot-scope="scope" >
41
-          {{scope.row.dialysis_duration_hour}} 小时 {{scope.row.dialysis_duration_minute}} 分钟
42
-        </template>
43
-      </el-table-column>
44
-      <!-- <el-table-column
45
-        prop="period"
46
-        label="频率"
47
-        align="center"
48
-        min-width="50">
49
-        <template slot-scope="scope" >
50
-            <span v-if="scope.row.parent_id === 0" >{{scope.row.period}}{{scope.row.times}}</span>
51
-            <span v-else >--</span>
52
-        </template>
53
-      </el-table-column> -->
54
-      <!-- <el-table-column
55
-        prop="name"
56
-        label="处方名"
57
-        align="center"
58
-        min-width="50">
59
-        <template slot-scope="scope" >
60
-            <span >{{scope.row.name}}{{scope.row.sub_name}}</span>
61
-        </template>
62
-      </el-table-column> -->
63
-      <el-table-column
64
-        prop="doctor"
65
-        label="医生"
66
-        align="center"
67
-        min-width="110">
68
-        <template slot-scope="scope" >
69
-            <span >{{getAdminUserName(scope.row.registrars_id)}}</span>
70
-        </template>
71
-
72
-     </el-table-column>
21
+                style="width: 100%">
22
+        <el-table-column
23
+          type="index"
24
+          align="center"
25
+          label="序号"
26
+          width="60">
27
+        </el-table-column>
28
+        <el-table-column
29
+          prop="mode_name"
30
+          align="center"
31
+          label="透析模式"
32
+          min-width="50">
33
+          <template slot-scope="scope">
34
+            {{modeOptions[scope.row.mode_id].name}}
35
+          </template>
36
+        </el-table-column>
37
+        <el-table-column
38
+          prop="dialysis_duration"
39
+          align="center"
40
+          label="透析时长"
41
+          min-width="50">
42
+          <template slot-scope="scope">
43
+            {{scope.row.dialysis_duration_hour}} 小时 {{scope.row.dialysis_duration_minute}} 分钟
44
+          </template>
45
+        </el-table-column>
46
+        <!-- <el-table-column
47
+          prop="period"
48
+          label="频率"
49
+          align="center"
50
+          min-width="50">
51
+          <template slot-scope="scope" >
52
+              <span v-if="scope.row.parent_id === 0" >{{scope.row.period}}{{scope.row.times}}</span>
53
+              <span v-else >--</span>
54
+          </template>
55
+        </el-table-column> -->
56
+        <!-- <el-table-column
57
+          prop="name"
58
+          label="处方名"
59
+          align="center"
60
+          min-width="50">
61
+          <template slot-scope="scope" >
62
+              <span >{{scope.row.name}}{{scope.row.sub_name}}</span>
63
+          </template>
64
+        </el-table-column> -->
65
+        <el-table-column
66
+          prop="doctor"
67
+          label="医生"
68
+          align="center"
69
+          min-width="110">
70
+          <template slot-scope="scope">
71
+            <span>{{getAdminUserName(scope.row.registrars_id)}}</span>
72
+          </template>
73
+
74
+        </el-table-column>
73 75
 
74 76
         <el-table-column
75 77
           prop="updated_time"
@@ -189,20 +191,20 @@
189 191
             </el-form-item>
190 192
           </el-col>
191 193
           <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id == 6">-->
192
-            <!--<el-form-item label="目标超滤量(ml) : ">-->
193
-              <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
194
-            <!--</el-form-item>-->
194
+          <!--<el-form-item label="目标超滤量(ml) : ">-->
195
+          <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
196
+          <!--</el-form-item>-->
195 197
           <!--</el-col>-->
196 198
 
197 199
           <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id != 6">-->
198
-            <!--<el-form-item label="目标超滤量(L) : ">-->
199
-              <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
200
-            <!--</el-form-item>-->
200
+          <!--<el-form-item label="目标超滤量(L) : ">-->
201
+          <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
202
+          <!--</el-form-item>-->
201 203
           <!--</el-col>-->
202 204
 
203 205
 
204 206
           <el-col :span="8" v-if="isShows('透析液配方')">
205
-            <el-form-item label="透析液配方:" >
207
+            <el-form-item label="透析液配方:">
206 208
               <el-select v-model="addPlan.dialysate_formulation">
207 209
                 <el-option v-for="item in dialysate_formulation" :label="item.name" :key="item.id"
208 210
                            :value="item.id"></el-option>
@@ -259,7 +261,7 @@
259 261
             </el-form-item>
260 262
           </el-col>
261 263
           <el-col :span="8" v-if="anticoagulant.gaijiliang != -1&&isShows('钙剂量')">
262
-            <el-form-item  :label="'钙剂量('+anticoagulant.gaimingcheng_unit+'): '"  prop="anticoagulant_gaijiliang">
264
+            <el-form-item :label="'钙剂量('+anticoagulant.gaimingcheng_unit+'): '" prop="anticoagulant_gaijiliang">
263 265
               <el-input v-model="addPlan.anticoagulant_gaijiliang" :disabled="anticoagulant.gaijiliang==1?false:true"
264 266
                         placeholder="钙剂量"></el-input>
265 267
             </el-form-item>
@@ -359,7 +361,8 @@
359 361
 
360 362
 
361 363
           <el-col :span="8">
362
-            <el-form-item label="置换液:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id != 6">
364
+            <el-form-item label="置换液:"
365
+                          v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id != 6">
363 366
               <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
364 367
                 <el-option :key="0" label="请选择" :value="0"></el-option>
365 368
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
@@ -368,7 +371,8 @@
368 371
             </el-form-item>
369 372
 
370 373
 
371
-            <el-form-item label="置换方式:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id == 6">
374
+            <el-form-item label="置换方式:"
375
+                          v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id == 6">
372 376
               <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
373 377
                 <el-option :key="0" label="请选择" :value="0"></el-option>
374 378
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
@@ -454,12 +458,7 @@
454 458
     fetchPatientDialysisSolutions
455 459
   } from '@/api/patient'
456 460
 
457
-  import {
458
-    getSystemPrescription,
459
-  } from '@/api/config'
460
-
461
-
462
-
461
+  import { getSystemPrescription } from '@/api/config'
463 462
 
464 463
   import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
465 464
   import store from '@/store'
@@ -537,6 +536,7 @@
537 536
           id: 0,
538 537
           mode: '',
539 538
           mode_name: '',
539
+          registrars_id: 0,
540 540
           dialyzer: '',
541 541
           dialysis_duration: '',
542 542
           dialysis_duration_hour: '',
@@ -564,10 +564,10 @@
564 564
           dialysate_temperature: '',
565 565
           conductivity: '',
566 566
           doctor: '',
567
-          dialysate_formulation:'',
567
+          dialysate_formulation: '',
568 568
           remark: '',
569
-          target_ktv:'',
570
-          target_ultrafiltration:'',
569
+          target_ktv: '',
570
+          target_ultrafiltration: '',
571 571
           dialyzer_perfusion_apparatus: '',
572 572
           body_fluid: '',
573 573
           body_fluid_other: '',
@@ -576,7 +576,7 @@
576 576
           displace_liqui_part: '',
577 577
           displace_liqui_value: '',
578 578
           ultrafiltration: '',
579
-          blood_access: '',
579
+          blood_access: ''
580 580
         },
581 581
         childPlan: {
582 582
           mode: '',
@@ -701,26 +701,26 @@
701 701
       }
702 702
     },
703 703
     watch: {
704
-      "addPlan.dialysis_duration":function(){
705
-        this.addPlan.anticoagulant_zongliang=calculateAnticoagulantZL(1,
704
+      'addPlan.dialysis_duration': function() {
705
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
706 706
           this.addPlan.anticoagulant_shouji,
707 707
           this.addPlan.dialysis_duration,
708 708
           this.addPlan.anticoagulant_weichi
709
-        );
709
+        )
710 710
       },
711
-      "addPlan.anticoagulant_shouji":function(){
712
-        this.addPlan.anticoagulant_zongliang=calculateAnticoagulantZL(1,
711
+      'addPlan.anticoagulant_shouji': function() {
712
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
713 713
           this.addPlan.anticoagulant_shouji,
714 714
           this.addPlan.dialysis_duration,
715 715
           this.addPlan.anticoagulant_weichi
716
-        );
716
+        )
717 717
       },
718
-      "addPlan.anticoagulant_weichi":function(){
719
-        this.addPlan.anticoagulant_zongliang=calculateAnticoagulantZL(1,
718
+      'addPlan.anticoagulant_weichi': function() {
719
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
720 720
           this.addPlan.anticoagulant_shouji,
721 721
           this.addPlan.dialysis_duration,
722 722
           this.addPlan.anticoagulant_weichi
723
-        );
723
+        )
724 724
       }
725 725
     },
726 726
     components: {
@@ -966,7 +966,14 @@
966 966
       submitEditSolution(formName) {
967 967
         this.$refs[formName].validate(valid => {
968 968
           if (valid) {
969
-            editPatientDialysisSolution(this.patientID, this.addPlan.id, this.addPlan).then(response => {
969
+
970
+            let mode = '2'
971
+
972
+            if (this.addPlan.registrars_id != this.$store.getters.xt_user.user.id) {
973
+              mode = '3'
974
+            }
975
+
976
+            editPatientDialysisSolution(this.patientID, this.addPlan.id, this.addPlan, mode).then(response => {
970 977
               if (response.data.state == 0) {
971 978
                 this.$message.error(response.data.msg)
972 979
                 return false
@@ -1002,7 +1009,8 @@
1002 1009
         this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
1003 1010
         this.$refs[formName].validate(valid => {
1004 1011
           if (valid) {
1005
-            createPatientDialysisSolution(this.patientID, this.addPlan).then(response => {
1012
+            let mode = '1'
1013
+            createPatientDialysisSolution(this.patientID, this.addPlan, mode).then(response => {
1006 1014
               if (response.data.state == 0) {
1007 1015
                 this.$message.error(response.data.msg)
1008 1016
                 return false
@@ -1050,42 +1058,41 @@
1050 1058
         this.addPlan.dialysis_duration = '' + row.dialysis_duration
1051 1059
         this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
1052 1060
         this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
1053
-        this.addPlan.hemodialysis_machine = row.hemodialysis_machine + '';
1054
-        this.addPlan.perfusion_apparatus = row.perfusion_apparatus + '';
1055
-        this.addPlan.blood_flow_volume = row.blood_flow_volume.toString();
1056
-        this.addPlan.anticoagulant = row.anticoagulant;
1057
-        this.addPlan.replacement_total = row.replacement_total;
1058
-
1059
-        this.addPlan.target_ktv = row.target_ktv.toString();
1060
-        this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString();
1061
-
1062
-
1063
-        this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString();
1064
-        this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString();
1065
-        this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString();
1066
-        this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString();
1067
-        this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString();
1068
-        this.addPlan.kalium = row.kalium.toString();
1069
-        this.addPlan.sodium = row.sodium.toString();
1070
-        this.addPlan.calcium = row.calcium.toString();
1071
-        this.addPlan.bicarbonate = row.bicarbonate.toString();
1072
-        this.addPlan.glucose = row.glucose.toString();
1073
-        this.addPlan.dialysate_flow = row.dialysate_flow.toString();
1074
-        this.addPlan.dialysate_temperature = row.dialysate_temperature.toString();
1075
-        this.addPlan.conductivity = row.conductivity.toString();
1076
-        this.addPlan.remark = row.remark;
1077
-
1078
-
1079
-        this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString();
1061
+        this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
1062
+        this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
1063
+        this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
1064
+        this.addPlan.anticoagulant = row.anticoagulant
1065
+        this.addPlan.replacement_total = row.replacement_total
1066
+
1067
+        this.addPlan.target_ktv = row.target_ktv.toString()
1068
+        this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
1069
+
1070
+        this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
1071
+        this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
1072
+        this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
1073
+        this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
1074
+        this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
1075
+        this.addPlan.kalium = row.kalium.toString()
1076
+        this.addPlan.sodium = row.sodium.toString()
1077
+        this.addPlan.calcium = row.calcium.toString()
1078
+        this.addPlan.bicarbonate = row.bicarbonate.toString()
1079
+        this.addPlan.glucose = row.glucose.toString()
1080
+        this.addPlan.dialysate_flow = row.dialysate_flow.toString()
1081
+        this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
1082
+        this.addPlan.conductivity = row.conductivity.toString()
1083
+        this.addPlan.remark = row.remark
1084
+
1085
+        this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
1080 1086
         this.addPlan.body_fluid = row.body_fluid
1081
-        this.addPlan.body_fluid_other = row.body_fluid_other.toString();
1082
-        this.addPlan.special_medicine = row.special_medicine;
1083
-        this.addPlan.special_medicine_other = row.special_medicine_other.toString();
1084
-        this.addPlan.displace_liqui_part = row.displace_liqui_part;
1085
-        this.addPlan.displace_liqui_value = row.displace_liqui_value.toString();
1086
-        this.addPlan.ultrafiltration = row.ultrafiltration.toString();
1087
-        this.addPlan.blood_access = row.blood_access;
1087
+        this.addPlan.body_fluid_other = row.body_fluid_other.toString()
1088
+        this.addPlan.special_medicine = row.special_medicine
1089
+        this.addPlan.special_medicine_other = row.special_medicine_other.toString()
1090
+        this.addPlan.displace_liqui_part = row.displace_liqui_part
1091
+        this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
1092
+        this.addPlan.ultrafiltration = row.ultrafiltration.toString()
1093
+        this.addPlan.blood_access = row.blood_access
1088 1094
 
1095
+        this.addPlan.registrars_id = row.registrars_id
1089 1096
 
1090 1097
         this.dialogVisible = true
1091 1098
         this.isEdit = true
@@ -1115,10 +1122,8 @@
1115 1122
           doctor: '',
1116 1123
           first_dialysis: '',
1117 1124
 
1118
-
1119
-
1120 1125
           dialyzer: '',
1121
-          dialysate_formulation:'',
1126
+          dialysate_formulation: '',
1122 1127
           hemodialysis_machine: '',
1123 1128
           perfusion_apparatus: '',
1124 1129
           blood_flow_volume: '',
@@ -1142,8 +1147,8 @@
1142 1147
           dialysate_temperature: '',
1143 1148
           conductivity: '',
1144 1149
           remark: '',
1145
-          target_ktv:'',
1146
-          target_ultrafiltration:'',
1150
+          target_ktv: '',
1151
+          target_ultrafiltration: '',
1147 1152
           dialyzer_perfusion_apparatus: '',
1148 1153
           body_fluid: '',
1149 1154
           body_fluid_other: '',
@@ -1154,14 +1159,6 @@
1154 1159
           ultrafiltration: '',
1155 1160
           blood_access: '',
1156 1161
 
1157
-
1158
-
1159
-
1160
-
1161
-
1162
-
1163
-
1164
-
1165 1162
           dialysis_duration: '3.30',
1166 1163
           dialysis_duration_hour: '3',
1167 1164
           dialysis_duration_minute: '30'
@@ -1258,29 +1255,25 @@
1258 1255
           id: thismode
1259 1256
         }
1260 1257
 
1261
-
1262
-
1263 1258
         getSystemPrescription(params).then(response => {
1264 1259
           if (response.data.state == 1) {
1265
-            if(response.data.data.prescription.id > 0) {
1260
+            if (response.data.data.prescription.id > 0) {
1266 1261
               for (const key in  response.data.data.prescription) {
1267 1262
                 //因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
1268 1263
                 this.$set(this.addPlan, key, response.data.data.prescription[key].toString())
1269 1264
               }
1270 1265
 
1271 1266
               //因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
1272
-              this.$set(this.addPlan, "dialysate_formulation", response.data.data.prescription['dialysate_formulation'])
1273
-              this.$set(this.addPlan, "anticoagulant", response.data.data.prescription['anticoagulant'])
1274
-              this.$set(this.addPlan, "body_fluid", response.data.data.prescription['body_fluid'])
1275
-              this.$set(this.addPlan, "special_medicine", response.data.data.prescription['special_medicine'])
1276
-              this.$set(this.addPlan, "displace_liqui_part", response.data.data.prescription['displace_liqui_part'])
1277
-              this.$set(this.addPlan, "blood_access", response.data.data.prescription['blood_access'])
1278
-
1279
-
1267
+              this.$set(this.addPlan, 'dialysate_formulation', response.data.data.prescription['dialysate_formulation'])
1268
+              this.$set(this.addPlan, 'anticoagulant', response.data.data.prescription['anticoagulant'])
1269
+              this.$set(this.addPlan, 'body_fluid', response.data.data.prescription['body_fluid'])
1270
+              this.$set(this.addPlan, 'special_medicine', response.data.data.prescription['special_medicine'])
1271
+              this.$set(this.addPlan, 'displace_liqui_part', response.data.data.prescription['displace_liqui_part'])
1272
+              this.$set(this.addPlan, 'blood_access', response.data.data.prescription['blood_access'])
1280 1273
 
1281 1274
               this.dialysisTimeShow = new Date(2018, 1, 1, this.addPlan.dialysis_duration_hour, this.addPlan.dialysis_duration_minute)
1282 1275
 
1283
-            }else{
1276
+            } else {
1284 1277
               var tempAddPlan = {
1285 1278
                 id: 0,
1286 1279
                 dialyzer: '',
@@ -1288,7 +1281,7 @@
1288 1281
                 dialysis_duration_hour: '',
1289 1282
                 dialysis_duration_minute: '',
1290 1283
                 hemodialysis_machine: '',
1291
-                dialysate_formulation:'',
1284
+                dialysate_formulation: '',
1292 1285
                 perfusion_apparatus: '',
1293 1286
                 blood_flow_volume: '',
1294 1287
                 dewater: '',
@@ -1329,7 +1322,6 @@
1329 1322
                 this.addPlan[key] = tempAddPlan[key]
1330 1323
               }
1331 1324
 
1332
-
1333 1325
             }
1334 1326
           }
1335 1327
         })
@@ -1385,8 +1377,6 @@
1385 1377
     },
1386 1378
     created() {
1387 1379
 
1388
-
1389
-
1390 1380
       const id = this.$route.params && this.$route.params.id
1391 1381
       this.patientID = parseInt(id)
1392 1382
       if (isNaN(this.patientID) || this.patientID <= 0) {
@@ -1413,8 +1403,6 @@
1413 1403
       this.displace_liqui_part_option = this.$store.getters.displace_liqui
1414 1404
       this.blood_access_option = this.$store.getters.blood_access
1415 1405
 
1416
-
1417
-
1418 1406
       this.queryParams.id = this.patientID
1419 1407
       // this.fetchAllDoctorAndNurse();
1420 1408
       this.fetchAllAdminUsers()
@@ -1475,15 +1463,16 @@
1475 1463
   }
1476 1464
 </style>
1477 1465
 <style>
1478
-.el-table td,
1479
-.el-table th.is-leaf,
1480
-.el-table--border,
1481
-.el-table--group {
1482
-  border-color: #d0d3da;
1483
-}
1484
-.el-table--border::after,
1485
-.el-table--group::after,
1486
-.el-table::before {
1487
-  background-color: #d0d3da;
1488
-}
1466
+  .el-table td,
1467
+  .el-table th.is-leaf,
1468
+  .el-table--border,
1469
+  .el-table--group {
1470
+    border-color: #d0d3da;
1471
+  }
1472
+
1473
+  .el-table--border::after,
1474
+  .el-table--group::after,
1475
+  .el-table::before {
1476
+    background-color: #d0d3da;
1477
+  }
1489 1478
 </style>

+ 23 - 16
src/xt_permission.js Visa fil

@@ -1,12 +1,14 @@
1
-import router from "./router";
2
-import store from "./store";
3
-import NProgress from "nprogress"; // progress bar
4
-import "nprogress/nprogress.css"; // progress bar style
1
+import router from './router'
2
+import store from './store'
3
+import NProgress from 'nprogress' // progress bar
4
+import 'nprogress/nprogress.css' // progress bar style
5 5
 
6
-NProgress.configure({ showSpinner: false }); // NProgress Configuration
6
+NProgress.configure({
7
+  showSpinner: false
8
+}) // NProgress Configuration
7 9
 
8
-const loginWhiteList = ["/token/verify", "/401", "/404"]; // 登录验证白名单
9
-const permissionWhiteList = loginWhiteList.concat(["/"]); // 权限验证白名单
10
+const loginWhiteList = ['/token/verify', '/401', '/404'] // 登录验证白名单
11
+const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名单
10 12
 
11 13
 router.beforeEach((to, from, next) => {
12 14
   // 线上注释
@@ -25,28 +27,33 @@ router.beforeEach((to, from, next) => {
25 27
   // return
26 28
   // 线上注释
27 29
 
28
-  NProgress.start();
30
+  NProgress.start()
29 31
   // console.log(store.getters.current_role_urls.indexOf(to.path))
30 32
   // alert('path:' + to.path)
31 33
   // 如果 url 带有 lt (login_token)参数,则跳转到验证 token 时等待的页面
32 34
   if (to.query.lt != null && to.query.lt.length > 0) {
33 35
     // alert('will go to verify token: ' + to.query.lt)
34
-    next({ path: "/token/verify", query: { token: to.query.lt } });
36
+    next({
37
+      path: '/token/verify',
38
+      query: {
39
+        token: to.query.lt
40
+      }
41
+    })
35 42
 
36 43
     // 否则 如果没有 user 信息,则前往 sso 登录
37 44
   } else if (store.getters.xt_user.user.id === 0) {
38 45
     if (loginWhiteList.indexOf(to.path) !== -1) {
39 46
       // alert('登录白名单内,跳过登录')
40
-      next();
47
+      next()
41 48
     } else {
42 49
       // alert('前往登录')
43
-      window.location.href = process.env.BASE_API + "/login"; // sso 地址
50
+      window.location.href = process.env.BASE_API + '/login' // sso 地址
44 51
     }
45 52
 
46 53
     // 否则 如果当前 url 不需要验证访问权限,则通过
47 54
   } else if (permissionWhiteList.indexOf(to.path) !== -1) {
48 55
     // alert('权限验证白名单内,直接进入')
49
-    next();
56
+    next()
50 57
 
51 58
     // 否则 如果拥有当前 url 的权限,则通过
52 59
     // } else if (store.getters.current_role_urls.indexOf(to.path) !== -1) {
@@ -58,11 +65,11 @@ router.beforeEach((to, from, next) => {
58 65
     // console.log(store.getters.current_role_urls)
59 66
     // console.log(store.getters.current_role_urls.indexOf(to.path))
60 67
     // alert('401')
61
-    next();
68
+    next()
62 69
     // next({ path: '/404' })
63 70
   }
64
-});
71
+})
65 72
 
66 73
 router.afterEach(() => {
67
-  NProgress.done();
68
-});
74
+  NProgress.done()
75
+})