Browse Source

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

csx 5 years ago
parent
commit
bae87e4284

+ 14 - 2
src/App.vue View File

@@ -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
 

+ 18 - 16
src/router/modules/dialysis.js View File

@@ -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
 }

+ 13 - 8
src/views/layout/components/Navbar.vue View File

@@ -64,17 +64,15 @@
64 64
       </div>
65 65
     </el-menu>-->
66 66
     <div class="dropdownBox">
67
-      <!--<el-dropdown trigger="click" @command="handleOrgCommand">-->
67
+      <el-dropdown trigger="click" @command="handleOrgCommand">
68 68
         <span class="el-dropdown-link">
69 69
           {{ org_name }}
70 70
           <i class="el-icon-arrow-down el-icon--right"></i>
71 71
         </span>
72
-        <!--<el-dropdown-menu slot="dropdown">-->
73
-          <!--&lt;!&ndash;<el-dropdown-item   icon="el-icon-plus">{{item.org_name}}</el-dropdown-item>&ndash;&gt;-->
74
-
75
-          <!--<el-dropdown-item   icon="el-icon-plus" v-for="(item,index) in orgs" :key="index"  :command="item.id">{{item.org_name}}</el-dropdown-item>-->
76
-        <!--</el-dropdown-menu>-->
77
-      <!--</el-dropdown>-->
72
+        <el-dropdown-menu slot="dropdown">
73
+          <el-dropdown-item   icon="el-icon-plus" v-for="(item,index) in orgs" :key="index"  :command="item.id">{{item.org_name}}</el-dropdown-item>
74
+        </el-dropdown-menu>
75
+      </el-dropdown>
78 76
     </div>
79 77
     <div class="navRight">
80 78
       <!-- <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
@@ -137,6 +135,7 @@ import {
137 135
   getOrgs,changeOrg
138 136
 } from '@/api/config'
139 137
 export default {
138
+  inject:['reload'],
140 139
   data() {
141 140
     return {
142 141
       orgs:[],
@@ -207,11 +206,17 @@ export default {
207 206
               // console.log(this.$store.getters.xt_permission.addRouters)
208 207
               this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
209 208
               //        next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
210
-              this.$router.replace({ path: '/' })
209
+              // this.$router.replace({ path: '/' })
210
+              // window.location.reload()
211
+              // this.$router.go(0)
212
+              this.reload()
211 213
             })
212 214
           })
213 215
 
214 216
 
217
+
218
+
219
+
215 220
         }else{
216 221
           this.$message.success(response.data.msg)
217 222
         }

+ 8 - 2
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

@@ -437,7 +437,10 @@
437 437
           return false
438 438
         }
439 439
         console.log(this.form)
440
-        let mode = 2
440
+        let mode = "2"
441
+        if(this.form.advice_doctor != this.$store.getters.xt_user.user.id){
442
+           mode = "3"
443
+        }
441 444
         EditDoctorAdvice(this.patient.id, this.form.id, this.form,mode).then(response => {
442 445
           if (response.data.state == 0) {
443 446
             this.$message.error(response.data.msg)
@@ -674,7 +677,7 @@
674 677
 
675 678
         ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime,mode).then(response => {
676 679
           if (response.data.state == 0) {
677
-            this.$message.error('执行失败!')
680
+            this.$message.error(response.data.msg)
678 681
             this.exceLoading = false
679 682
             return false
680 683
           } else {
@@ -1026,6 +1029,9 @@
1026 1029
           type: 'warning'
1027 1030
         }).then(() => {
1028 1031
           let mode ="4"
1032
+          if(this.currentRow.advice_doctor != this.$store.getters.xt_user.user.id){
1033
+            mode = "5"
1034
+          }
1029 1035
           DeleteGroupAdvice(groupno,mode).then(response => {
1030 1036
             if (response.data.state == 0) {
1031 1037
               this.$message.error(response.data.msg)

+ 6 - 0
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue View File

@@ -609,6 +609,9 @@ export default {
609 609
           type: 'warning'
610 610
         }).then(() => {
611 611
           let mode = "4"
612
+          if (this.groupSelectRow.advice_doctor != this.$store.getters.xt_user.user.id){
613
+             mode = "5"
614
+          }
612 615
           DeleteDoctorAdvice(this.groupSelectRow.id,mode).then(response => {
613 616
             if (response.data.state == 0) {
614 617
               this.$message.error(response.data.msg)
@@ -703,6 +706,9 @@ export default {
703 706
                 groupno: _this.groupForm.groupno
704 707
               }
705 708
               let mode = "2"
709
+              if (this.groupSelectRow.advice_doctor != this.$store.getters.xt_user.user.id){
710
+                mode = "3"
711
+              }
706 712
 
707 713
               EditDoctorAdvice(this.patientID, this.groupSelectRow.id, submitForm,mode).then(response => {
708 714
                 if (response.data.state == 0) {

+ 21 - 0
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue View File

@@ -761,6 +761,27 @@
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"
765
+
766
+        console.log(this.predialysis_evaluation)
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
+
780
+          }
781
+
782
+
783
+        }
784
+
764 785
         postAssessmentBeforeDislysis(ParamsQuery).then(response => {
765 786
           if (response.data.state == 0) {
766 787
             this.$message.error(response.data.msg)

+ 1 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

@@ -1907,7 +1907,7 @@
1907 1907
                   advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1908 1908
                   advice_type: this.waitUploadAdvices[0].advice_type,
1909 1909
                   parent_id: this.patient_id,
1910
-                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1910
+                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
1911 1911
                   remark: ''
1912 1912
                 }
1913 1913
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {

+ 13 - 13
src/xt_permission.js View File

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