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
 <template>
1
 <template>
2
   <div id="app">
2
   <div id="app">
3
-    <router-view></router-view>
3
+    <router-view  v-if="isRouterAlive"></router-view>
4
   </div>
4
   </div>
5
 </template>
5
 </template>
6
 
6
 
7
 <script>
7
 <script>
8
 export default {
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
 </script>
23
 </script>
12
 
24
 

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

18
         title: '透析记录'
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
       path: '/dialysis/record/:id',
38
       path: '/dialysis/record/:id',
23
       component: () => import('@/xt_pages/dialysis/dialysisPage'),
39
       component: () => import('@/xt_pages/dialysis/dialysisPage'),
43
 
59
 
44
     // { path: 'advice', component: () => import('@/xt_pages/dialysis/doctorAdvice'), name: 'advice', meta: { title: 'advice' }},
60
     // { path: 'advice', component: () => import('@/xt_pages/dialysis/doctorAdvice'), name: 'advice', meta: { title: 'advice' }},
45
     // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
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
       path: '/dialysis/details',
64
       path: '/dialysis/details',
56
       component: () => import('@/xt_pages/dialysis/details'),
65
       component: () => import('@/xt_pages/dialysis/details'),
189
         noCache: true
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
       </div>
64
       </div>
65
     </el-menu>-->
65
     </el-menu>-->
66
     <div class="dropdownBox">
66
     <div class="dropdownBox">
67
-      <!--<el-dropdown trigger="click" @command="handleOrgCommand">-->
67
+      <el-dropdown trigger="click" @command="handleOrgCommand">
68
         <span class="el-dropdown-link">
68
         <span class="el-dropdown-link">
69
           {{ org_name }}
69
           {{ org_name }}
70
           <i class="el-icon-arrow-down el-icon--right"></i>
70
           <i class="el-icon-arrow-down el-icon--right"></i>
71
         </span>
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
     </div>
76
     </div>
79
     <div class="navRight">
77
     <div class="navRight">
80
       <!-- <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
78
       <!-- <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
137
   getOrgs,changeOrg
135
   getOrgs,changeOrg
138
 } from '@/api/config'
136
 } from '@/api/config'
139
 export default {
137
 export default {
138
+  inject:['reload'],
140
   data() {
139
   data() {
141
     return {
140
     return {
142
       orgs:[],
141
       orgs:[],
207
               // console.log(this.$store.getters.xt_permission.addRouters)
206
               // console.log(this.$store.getters.xt_permission.addRouters)
208
               this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
207
               this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
209
               //        next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
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
         }else{
220
         }else{
216
           this.$message.success(response.data.msg)
221
           this.$message.success(response.data.msg)
217
         }
222
         }

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

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

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

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

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

761
         const ParamsQuery = this.assessmentBeforeDislysis
761
         const ParamsQuery = this.assessmentBeforeDislysis
762
         ParamsQuery['patient'] = this.patient.id
762
         ParamsQuery['patient'] = this.patient.id
763
         ParamsQuery['record_date'] = this.record_date
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
         postAssessmentBeforeDislysis(ParamsQuery).then(response => {
785
         postAssessmentBeforeDislysis(ParamsQuery).then(response => {
765
           if (response.data.state == 0) {
786
           if (response.data.state == 0) {
766
             this.$message.error(response.data.msg)
787
             this.$message.error(response.data.msg)

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

1907
                   advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1907
                   advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1908
                   advice_type: this.waitUploadAdvices[0].advice_type,
1908
                   advice_type: this.waitUploadAdvices[0].advice_type,
1909
                   parent_id: this.patient_id,
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
                   remark: ''
1911
                   remark: ''
1912
                 }
1912
                 }
1913
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1913
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {

+ 13 - 13
src/xt_permission.js View File

10
 
10
 
11
 router.beforeEach((to, from, next) => {
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
   NProgress.start();
28
   NProgress.start();