瀏覽代碼

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

XMLWAN 5 年之前
父節點
當前提交
54120c6899

+ 1 - 8
src/xt_pages/dialysis/details/dialog/computer_dialog.vue 查看文件

@@ -43,7 +43,7 @@
43 43
           <el-button v-if="dialysis_order.id == 0" @click="submit" type="primary" :loading="loading">执行上机</el-button>
44 44
           <el-button v-else type="info" :disabled="true">已上机</el-button>
45 45
           <el-button
46
-            v-if="dialysis_order.id > 0 && (isPremission || this.$store.getters.xt_user.user.id == this.creator)"
46
+            v-if="dialysis_order.id > 0"
47 47
             type="primary" @click="editOrder">修改上机
48 48
           </el-button>
49 49
 
@@ -252,13 +252,6 @@
252 252
           this.schedual_type = this.dialysis_order.schedual_type
253 253
         }
254 254
 
255
-        if (this.dialysis_order.id > 0) {
256
-          for (let i = 0; i < this.special_premission.length; i++) {
257
-            if (this.$store.getters.xt_user.user.id == this.special_premission[i].admin_user_id) {
258
-              this.isPremission = true
259
-            }
260
-          }
261
-        }
262 255
 
263 256
         if (this.dialysis_order.id > 0) {
264 257
           if (this.dialysis_order.creator == 0) {

+ 111 - 70
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

@@ -1016,8 +1016,11 @@
1016 1016
                   type: 'success',
1017 1017
                   duration: 2000
1018 1018
                 })
1019
+                var date = new Date()
1020
+
1021
+                var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
1022
+                var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
1019 1023
 
1020
-                console.log(hour + ':' + minute)
1021 1024
                 const params = {
1022 1025
                   advices: results,
1023 1026
                   advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
@@ -1067,6 +1070,10 @@
1067 1070
                   duration: 2000
1068 1071
                 })
1069 1072
                 console.log(hour + ':' + minute)
1073
+                var date = new Date()
1074
+
1075
+                var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
1076
+                var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
1070 1077
 
1071 1078
                 const params = {
1072 1079
                   advices: results,
@@ -1323,25 +1330,13 @@
1323 1330
               })
1324 1331
             }
1325 1332
           } else if (this.is_open == 2) {
1333
+            var date = new Date()
1334
+
1335
+            var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
1336
+            var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
1337
+
1326 1338
             if (this.waitUploadAdvices.length > 0) {
1327
-              const params = {
1328
-                advices: this.waitUploadAdvices,
1329
-                advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1330
-                advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1331
-                advice_type: this.waitUploadAdvices[0].advice_type,
1332
-                parent_id: this.patient_id,
1333
-                start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1334
-                remark: ''
1335
-              }
1336
-              CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1337
-                var resp = rs.data
1338
-                if (resp.state == 1) {
1339
-                  // this.doctorAdvices = resp.data.advices
1340
-                  this.$emit('advice')
1341
-                } else {
1342 1339
 
1343
-                }
1344
-              })
1345 1340
 
1346 1341
               if (this.patient.id <= 0) {
1347 1342
                 this.$message.error('没有选择患者')
@@ -1366,6 +1361,27 @@
1366 1361
                     duration: 2000
1367 1362
                   })
1368 1363
 
1364
+                  const params = {
1365
+                    advices: this.waitUploadAdvices,
1366
+                    advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1367
+                    advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1368
+                    advice_type: this.waitUploadAdvices[0].advice_type,
1369
+                    parent_id: this.patient_id,
1370
+                    // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1371
+                    start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}') + ' ' + hour + ':' + minute,
1372
+
1373
+                    remark: ''
1374
+                  }
1375
+                  CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1376
+                    var resp = rs.data
1377
+                    if (resp.state == 1) {
1378
+                      // this.doctorAdvices = resp.data.advices
1379
+                      this.$emit('advice')
1380
+                    } else {
1381
+
1382
+                    }
1383
+                  })
1384
+
1369 1385
                   const prescription_resp = response.data.data.prescription
1370 1386
                   var prescription = this.prescription
1371 1387
                   for (var index in prescription_resp) {
@@ -1491,25 +1507,12 @@
1491 1507
                 })
1492 1508
               }
1493 1509
             } else if (this.is_open == 2) {
1494
-              if (this.waitUploadAdvices.length > 0) {
1495
-                const params = {
1496
-                  advices: this.waitUploadAdvices,
1497
-                  advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1498
-                  advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1499
-                  advice_type: this.waitUploadAdvices[0].advice_type,
1500
-                  parent_id: this.patient_id,
1501
-                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1502
-                  remark: ''
1503
-                }
1504
-                CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1505
-                  var resp = rs.data
1506
-                  if (resp.state == 1) {
1507
-                    // this.doctorAdvices = resp.data.advices
1508
-                    this.$emit('advice')
1509
-                  } else {
1510
+              var date = new Date()
1510 1511
 
1511
-                  }
1512
-                })
1512
+              var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
1513
+              var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
1514
+
1515
+              if (this.waitUploadAdvices.length > 0) {
1513 1516
 
1514 1517
                 if (this.patient.id <= 0) {
1515 1518
                   this.$message.error('没有选择患者')
@@ -1534,6 +1537,28 @@
1534 1537
                       duration: 2000
1535 1538
                     })
1536 1539
 
1540
+                    const params = {
1541
+                      advices: this.waitUploadAdvices,
1542
+                      advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1543
+                      advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1544
+                      advice_type: this.waitUploadAdvices[0].advice_type,
1545
+                      parent_id: this.patient_id,
1546
+                      // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1547
+                      start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}') + ' ' + hour + ':' + minute,
1548
+
1549
+                      remark: ''
1550
+                    }
1551
+                    CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1552
+                      var resp = rs.data
1553
+                      if (resp.state == 1) {
1554
+                        // this.doctorAdvices = resp.data.advices
1555
+                        this.$emit('advice')
1556
+                      } else {
1557
+
1558
+                      }
1559
+                    })
1560
+
1561
+
1537 1562
                     const prescription_resp = response.data.data.prescription
1538 1563
                     var prescription = this.prescription
1539 1564
                     for (var index in prescription_resp) {
@@ -1720,25 +1745,13 @@
1720 1745
               })
1721 1746
             }
1722 1747
           } else if (this.is_open == 2) {
1748
+            var date = new Date()
1749
+
1750
+            var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
1751
+            var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
1752
+
1723 1753
             if (this.waitUploadAdvices.length > 0) {
1724
-              const params = {
1725
-                advices: this.waitUploadAdvices,
1726
-                advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1727
-                advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1728
-                advice_type: this.waitUploadAdvices[0].advice_type,
1729
-                parent_id: this.patient_id,
1730
-                start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1731
-                remark: ''
1732
-              }
1733
-              CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1734
-                var resp = rs.data
1735
-                if (resp.state == 1) {
1736
-                  // this.doctorAdvices = resp.data.advices
1737
-                  this.$emit('advice')
1738
-                } else {
1739 1754
 
1740
-                }
1741
-              })
1742 1755
 
1743 1756
               if (this.patient.id <= 0) {
1744 1757
                 this.$message.error('没有选择患者')
@@ -1765,6 +1778,26 @@
1765 1778
                     type: 'success',
1766 1779
                     duration: 2000
1767 1780
                   })
1781
+                  const params = {
1782
+                    advices: this.waitUploadAdvices,
1783
+                    advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1784
+                    advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1785
+                    advice_type: this.waitUploadAdvices[0].advice_type,
1786
+                    parent_id: this.patient_id,
1787
+                    // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1788
+                    start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}') + ' ' + hour + ':' + minute,
1789
+
1790
+                    remark: ''
1791
+                  }
1792
+                  CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1793
+                    var resp = rs.data
1794
+                    if (resp.state == 1) {
1795
+                      // this.doctorAdvices = resp.data.advices
1796
+                      this.$emit('advice')
1797
+                    } else {
1798
+
1799
+                    }
1800
+                  })
1768 1801
 
1769 1802
                   const prescription_resp = response.data.data.prescription
1770 1803
                   var prescription = this.prescription
@@ -1900,25 +1933,13 @@
1900 1933
                 })
1901 1934
               }
1902 1935
             } else if (this.is_open == 2) {
1936
+              var date = new Date()
1937
+
1938
+              var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
1939
+              var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
1940
+
1903 1941
               if (this.waitUploadAdvices.length > 0) {
1904
-                const params = {
1905
-                  advices: this.waitUploadAdvices,
1906
-                  advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1907
-                  advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1908
-                  advice_type: this.waitUploadAdvices[0].advice_type,
1909
-                  parent_id: this.patient_id,
1910
-                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
1911
-                  remark: ''
1912
-                }
1913
-                CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1914
-                  var resp = rs.data
1915
-                  if (resp.state == 1) {
1916
-                    // this.doctorAdvices = resp.data.advices
1917
-                    this.$emit('advice')
1918
-                  } else {
1919 1942
 
1920
-                  }
1921
-                })
1922 1943
 
1923 1944
                 if (this.patient.id <= 0) {
1924 1945
                   this.$message.error('没有选择患者')
@@ -1941,6 +1962,26 @@
1941 1962
                       type: 'success',
1942 1963
                       duration: 2000
1943 1964
                     })
1965
+                    const params = {
1966
+                      advices: this.waitUploadAdvices,
1967
+                      advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1968
+                      advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1969
+                      advice_type: this.waitUploadAdvices[0].advice_type,
1970
+                      parent_id: this.patient_id,
1971
+                      // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
1972
+                      start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}') + ' ' + hour + ':' + minute,
1973
+
1974
+                      remark: ''
1975
+                    }
1976
+                    CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1977
+                      var resp = rs.data
1978
+                      if (resp.state == 1) {
1979
+                        // this.doctorAdvices = resp.data.advices
1980
+                        this.$emit('advice')
1981
+                      } else {
1982
+
1983
+                      }
1984
+                    })
1944 1985
                     const prescription_resp = response.data.data.prescription
1945 1986
                     const solution_resp = response.data.data.solution
1946 1987
                     var prescription = this.prescription

+ 1 - 1
src/xt_pages/dialysis/details/dialog/finish_dialog.vue 查看文件

@@ -30,7 +30,7 @@
30 30
           <!--</el-button>-->
31 31
           <!--<el-button v-else :disabled="true" type="info">未上机</el-button>-->
32 32
           <el-button
33
-            v-if="dialysis_order.stage == 2 && (isPremission || this.$store.getters.xt_user.user.id == this.creator)"
33
+            v-if="dialysis_order.stage == 2 "
34 34
             type="primary" @click="modifyFinish">修改下机
35 35
           </el-button>
36 36
 

+ 4 - 3
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue 查看文件

@@ -965,7 +965,7 @@ export default {
965 965
       let mode = "1"
966 966
        if(this.form.id > 0){
967 967
          mode = "2"
968
-         if(this.form.creator > 0 && this.form.creator != this.$store.getters.xt_user.user.id){
968
+         if(this.form.monitoring_nurse > 0 && this.form.monitoring_nurse != this.$store.getters.xt_user.user.id){
969 969
           mode = "3"
970 970
          }
971 971
       }
@@ -1053,8 +1053,9 @@ export default {
1053 1053
       })
1054 1054
         .then(() => {
1055 1055
           let mode = "4"
1056
-          // if(this.table_current_row)
1057
-
1056
+          if(this.table_current_row.creator > 0 && this.table_current_row.creator != this.$store.getters.xt_user.user.id){
1057
+            mode = "5"
1058
+          }
1058 1059
 
1059 1060
           const params = {
1060 1061
             patient_id: this.patient_id,

+ 40 - 40
src/xt_pages/user/components/EditGroupAdvice.vue 查看文件

@@ -656,7 +656,8 @@
656 656
         parent_id: 0,
657 657
         remind: 0,
658 658
         frequency_type: 0,
659
-        day_count: ''
659
+        day_count: '',
660
+        doctor:0,
660 661
       },
661 662
       adviceTypeOptions: {
662 663
         type: Array,
@@ -685,7 +686,6 @@
685 686
 
686 687
           return
687 688
         }
688
-        console.log(this.groupSelectRow)
689 689
         var content = ''
690 690
         if (this.groupSelectRow.children.length > 0) {
691 691
           content = '确认删除此医嘱内容,包括它的子药?'
@@ -702,20 +702,17 @@
702 702
         })
703 703
           .then(() => {
704 704
 
705
-            console.log(this.groupForm.advice_type)
706
-            console.log(this.$store.getters.xt_user.user.id)
707
-            console.log(this.$store.getters.xt_user.user.id)
708 705
 
709 706
 
710 707
             let mode = ''
711 708
             if (this.groupForm.advice_type == 1) {
712 709
               mode = '1-6'
713
-              if (this.groupForm.advice_doctor != this.$store.getters.xt_user.user.id) {
710
+              if (this.groupForm.doctor != this.$store.getters.xt_user.user.id) {
714 711
                 mode = '1-7'
715 712
               }
716 713
             } else if (this.groupForm.advice_type == 3) {
717 714
               mode = '4-1'
718
-              if (this.groupForm.advice_doctor != this.$store.getters.xt_user.user.id) {
715
+              if (this.groupForm.doctor != this.$store.getters.xt_user.user.id) {
719 716
                 mode = '5-1'
720 717
               }
721 718
             }
@@ -723,6 +720,7 @@
723 720
               if (response.data.state == 0) {
724 721
                 this.$message.error(response.data.msg)
725 722
                 return false
723
+
726 724
               } else {
727 725
                 this.$notify({
728 726
                   title: '成功',
@@ -776,46 +774,46 @@
776 774
                     }
777 775
                   }
778 776
                 }
779
-              }
780
-            })
781 777
 
782
-            if (isChild) {
783
-              for (const index in this.groupForm.adviceNames) {
784
-                if (
785
-                  this.groupForm.adviceNames[index].row_key ==
786
-                  this.groupSelectRow.parent_row
787
-                ) {
788
-                  for (const j in this.groupForm.adviceNames[index].children) {
778
+                if (isChild) {
779
+                  for (const index in this.groupForm.adviceNames) {
780
+                    if (
781
+                      this.groupForm.adviceNames[index].row_key ==
782
+                      this.groupSelectRow.parent_row
783
+                    ) {
784
+                      for (const j in this.groupForm.adviceNames[index].children) {
785
+                        if (
786
+                          this.groupForm.adviceNames[index].children[j].row_key ==
787
+                          this.groupSelectRow.row_key
788
+                        ) {
789
+                          this.groupForm.adviceNames[index].children.splice(j, 1)
790
+                          this.$set(
791
+                            this.groupForm.adviceNames,
792
+                            index,
793
+                            this.groupForm.adviceNames[index]
794
+                          )
795
+                          this.toggleRowExpansion()
796
+                          break
797
+                        }
798
+                      }
799
+                    }
800
+                  }
801
+                } else {
802
+                  for (const index in this.groupForm.adviceNames) {
789 803
                     if (
790
-                      this.groupForm.adviceNames[index].children[j].row_key ==
804
+                      this.groupForm.adviceNames[index].row_key ==
791 805
                       this.groupSelectRow.row_key
792 806
                     ) {
793
-                      this.groupForm.adviceNames[index].children.splice(j, 1)
794
-                      this.$set(
795
-                        this.groupForm.adviceNames,
796
-                        index,
797
-                        this.groupForm.adviceNames[index]
798
-                      )
807
+                      this.groupForm.adviceNames.splice(index, 1)
799 808
                       this.toggleRowExpansion()
800 809
                       break
801 810
                     }
802 811
                   }
803 812
                 }
804 813
               }
805
-            } else {
806
-              for (const index in this.groupForm.adviceNames) {
807
-                if (
808
-                  this.groupForm.adviceNames[index].row_key ==
809
-                  this.groupSelectRow.row_key
810
-                ) {
811
-                  this.groupForm.adviceNames.splice(index, 1)
812
-                  this.toggleRowExpansion()
813
-                  break
814
-                }
815
-              }
816
-            }
817
-          })
818
-          .catch(() => {
814
+            })
815
+
816
+          }).catch(() => {
819 817
           })
820 818
       },
821 819
       submitNameForm(formName) {
@@ -853,16 +851,18 @@
853 851
               }
854 852
               let mode = ''
855 853
 
856
-              //TODO 修改他人
854
+
855
+
856
+
857 857
               if (_this.groupForm.advice_type == 1) {
858 858
                 // if(_this.nameForm.)
859 859
                 mode = '1-3'
860
-                if (_this.groupForm.advice_doctor != _this.$store.getters.xt_user.user.id) {
860
+                if (_this.groupForm.doctor != _this.$store.getters.xt_user.user.id) {
861 861
                   mode = '1-4'
862 862
                 }
863 863
               } else if (_this.groupForm.advice_type == 3) {
864 864
                 mode = '2-1'
865
-                if (_this.groupForm.advice_doctor != _this.$store.getters.xt_user.user.id) {
865
+                if (_this.groupForm.doctor != _this.$store.getters.xt_user.user.id) {
866 866
                   mode = '3-1'
867 867
                 }
868 868
               }

+ 3 - 0
src/xt_pages/user/doctorAdvice.vue 查看文件

@@ -2863,9 +2863,12 @@
2863 2863
           start_time: uParseTime(groups[0].start_time, '{y}-{m}-{d} {h}:{i}'),
2864 2864
           adviceNames: [],
2865 2865
           advice_doctor: groups[0].user_name,
2866
+          doctor: groups[0].advice_doctor,
2867
+
2866 2868
           remark: groups[0].remark,
2867 2869
           groupno: groupno
2868 2870
         }
2871
+        console.log(groups[0])
2869 2872
 
2870 2873
         var childMap = {}
2871 2874
         for (const index in groups) {