xiaoming_global преди 5 години
родител
ревизия
7e57a62d37

+ 8 - 0
src/api/manage.js Целия файл

@@ -78,3 +78,11 @@ export function UpdateMachineInfo(data) {
78 78
     data: data
79 79
   });
80 80
 }
81
+
82
+export function getAllEquimentName(params) {
83
+  return request({
84
+    url: "/api/management/getallequimentname",
85
+    method: "Get",
86
+    params: params
87
+  });
88
+}

+ 68 - 142
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Целия файл

@@ -11,8 +11,8 @@
11 11
         <!-- <el-row :gutter="20"> -->
12 12
         <el-row :gutter="24">
13 13
           <el-col :span="8" v-if="isShows('透析模式')">
14
-            <el-form-item label="透析模式">
15
-              <el-select v-model="dialysisPrescription.mode_id">
14
+            <el-form-item label="透析模式">
15
+              <el-select v-model="dialysisPrescription.mode_id" @change="changePrescription(dialysisPrescription.mode_id)" >
16 16
                 <el-option :key="0" label="请选择" :value="0"></el-option>
17 17
                 <el-option v-for="item in treatment_mode" :label="item.name" :value="item.id"
18 18
                            :key="item.id"></el-option>
@@ -68,7 +68,7 @@
68 68
           </el-col>
69 69
 
70 70
 
71
-          <el-col :span="8" v-if="isShows('置换量')">
71
+          <el-col :span="8" v-if="isShows('置换量')" v-show="zhiShow">
72 72
             <el-form-item label="置换量(L):">
73 73
               <el-input type="number" v-model="dialysisPrescription.replacement_total"></el-input>
74 74
             </el-form-item>
@@ -230,7 +230,7 @@
230 230
 
231 231
           <el-row :gutter="20" > -->
232 232
           <el-col :span="8">
233
-            <el-form-item label="置换液:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id != 6">
233
+            <el-form-item label="置换液:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id != 6" v-show="huShow">
234 234
               <el-select v-model="dialysisPrescription.displace_liqui_part" placeholder="请选择">
235 235
                 <el-option :key="0" label="请选择" :value="0"></el-option>
236 236
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
@@ -249,7 +249,7 @@
249 249
 
250 250
           </el-col>
251 251
 
252
-          <el-col :span="8" v-if="isShows('置换液总量')">
252
+          <el-col :span="8" v-if="isShows('置换液总量')" v-show="totalShow">
253 253
             <el-form-item label="置换液总量(L)">
254 254
               <el-input v-model="dialysisPrescription.displace_liqui_value"></el-input>
255 255
             </el-form-item>
@@ -495,7 +495,7 @@
495 495
 </template>
496 496
 
497 497
 <script>
498
-  import { postPrescription, postSoulution,CreateGroupAdvice} from '@/api/dialysis'
498
+  import { postPrescription, postSoulution, CreateGroupAdvice } from '@/api/dialysis'
499 499
   import { getDataConfig } from '@/utils/data'
500 500
   import { uParseTime } from '@/utils/tools'
501 501
   import store from '@/store'
@@ -652,7 +652,10 @@
652 652
         default: function() {
653 653
           return new Array()
654 654
         }
655
-      }
655
+      },
656
+      zhiShow: false,
657
+      totalShow: false,
658
+      huShow: false
656 659
 
657 660
     },
658 661
     data() {
@@ -675,7 +678,7 @@
675 678
         special_medicine_option: [],
676 679
         displace_liqui_part_option: [],
677 680
         blood_access_option: [],
678
-        is_pre:0,
681
+        is_pre: 0,
679 682
         dialysisPrescription: {
680 683
           replacement_total: '',
681 684
           mode_id: '',
@@ -751,35 +754,31 @@
751 754
           gaijiliang_unit: ''
752 755
         },
753 756
 
754
-
755
-        doctorAdvices:[]
757
+        doctorAdvices: []
756 758
 
757 759
       }
758 760
     },
759 761
     methods: {
760
-      handleAdviceCommit(){
762
+      handleAdviceCommit() {
761 763
         let results = []
762
-        for (let i = 0; i < this.targetAdvices.length; i++){
763
-          for (let a = 0; a < this.checkedCities.length; a++){
764
-            if( this.targetAdvices[i].id == this.checkedCities[a]){
764
+        for (let i = 0; i < this.targetAdvices.length; i++) {
765
+          for (let a = 0; a < this.checkedCities.length; a++) {
766
+            if (this.targetAdvices[i].id == this.checkedCities[a]) {
765 767
               results.push(this.targetAdvices[i])
766 768
             }
767 769
           }
768 770
         }
769
-        var obj5={}
771
+        var obj5 = {}
770 772
         results = results.reduce((cur, next) => {
771 773
           obj5[next.id] ? '' : obj5[next.id] = true && cur.push(next)
772 774
           return cur
773 775
         }, [])
774 776
 
775
-        var date = new Date();
776
-        var hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
777
-        var minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
778
-
777
+        var date = new Date()
778
+        var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
779
+        var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
779 780
 
780 781
         if (results.length > 0) {
781
-
782
-
783 782
           if (this.is_pre == 1) {
784 783
             if (this.patient.id <= 0) {
785 784
               this.$message.error('没有选择患者')
@@ -803,23 +802,21 @@
803 802
                   duration: 2000
804 803
                 })
805 804
 
806
-              console.log(hour+":"+minute)
807
-                let params = {
805
+                console.log(hour + ':' + minute)
806
+                const params = {
808 807
                   advices: results,
809 808
                   advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
810 809
                   advice_doctor: results[0].advice_doctor,
811 810
                   advice_type: results[0].advice_type,
812 811
                   parent_id: this.patient_id,
813
-                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}')+" "+hour+":"+minute,
814
-                  remark: '',
812
+                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}') + ' ' + hour + ':' + minute,
813
+                  remark: ''
815 814
                 }
816 815
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
817 816
                   var resp = rs.data
818 817
                   if (resp.state == 1) {
819 818
                     this.doctorAdvices = resp.data.advices
820 819
                     this.$emit('advice')
821
-
822
-
823 820
                   } else {
824 821
 
825 822
                   }
@@ -834,8 +831,6 @@
834 831
                 this.hide()
835 832
               }
836 833
             })
837
-
838
-
839 834
           } else if (this.is_pre == 2) {
840 835
             if (this.patient.id <= 0) {
841 836
               this.$message.error('没有选择患者')
@@ -856,30 +851,27 @@
856 851
                   type: 'success',
857 852
                   duration: 2000
858 853
                 })
859
-                console.log(hour+":"+minute)
860
-
854
+                console.log(hour + ':' + minute)
861 855
 
862
-                let params = {
856
+                const params = {
863 857
                   advices: results,
864 858
                   advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
865 859
                   advice_doctor: results[0].advice_doctor,
866 860
                   advice_type: results[0].advice_type,
867 861
                   parent_id: this.patient_id,
868
-                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}')+" "+hour+":"+minute,
869
-                  remark: '',
862
+                  start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}') + ' ' + hour + ':' + minute,
863
+                  remark: ''
870 864
                 }
871 865
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
872 866
                   var resp = rs.data
873 867
                   if (resp.state == 1) {
874 868
                     // this.doctorAdvices = resp.data.advices
875 869
                     this.$emit('advice')
876
-
877 870
                   } else {
878 871
 
879 872
                   }
880 873
                 })
881 874
 
882
-
883 875
                 const prescription_resp = response.data.data.prescription
884 876
                 const solution_resp = response.data.data.solution
885 877
                 var prescription = this.prescription
@@ -896,10 +888,8 @@
896 888
                 this.hide()
897 889
               }
898 890
             })
899
-
900 891
           }
901
-        }else{
902
-
892
+        } else {
903 893
           if (this.is_pre == 1) {
904 894
             if (this.patient.id <= 0) {
905 895
               this.$message.error('没有选择患者')
@@ -932,7 +922,6 @@
932 922
                 this.hide()
933 923
               }
934 924
             })
935
-
936 925
           } else if (this.is_pre == 2) {
937 926
             if (this.patient.id <= 0) {
938 927
               this.$message.error('没有选择患者')
@@ -969,33 +958,27 @@
969 958
                 this.hide()
970 959
               }
971 960
             })
972
-
973
-
974 961
           }
975 962
         }
976 963
 
977 964
         this.isShowRemindAdvice = false
978 965
         this.isVisibility = true
979
-
980 966
       },
981
-      handleAdviceCancle(){
967
+      handleAdviceCancle() {
982 968
         this.isShowRemindAdvice = false
983 969
         this.isVisibility = true
984
-
985 970
       },
986 971
       getTime(val) {
987 972
         return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
988
-
989 973
       },
990 974
       show() {
991 975
         this.isVisibility = true
992 976
         this.checkedCities = []
993
-        for (let i = 0; i < this.targetAdvices.length; i++){
994
-          if(this.targetAdvices[i].isCheck == 1){
995
-           this.checkedCities.push(this.targetAdvices[i].id)
977
+        for (let i = 0; i < this.targetAdvices.length; i++) {
978
+          if (this.targetAdvices[i].isCheck == 1) {
979
+            this.checkedCities.push(this.targetAdvices[i].id)
996 980
           }
997 981
         }
998
-
999 982
       },
1000 983
       hide() {
1001 984
         this.isVisibility = false
@@ -1012,8 +995,6 @@
1012 995
       }, handleCommit: function() {
1013 996
         this.is_pre = 1
1014 997
         if (this.prescription.id == 0) {
1015
-
1016
-
1017 998
           if (this.is_open == 0) {
1018 999
             if (this.patient.id <= 0) {
1019 1000
               this.$message.error('没有选择患者')
@@ -1047,12 +1028,10 @@
1047 1028
               }
1048 1029
             })
1049 1030
           } else if (this.is_open == 1) {
1050
-
1051 1031
             if (this.targetAdvices.length > 0) {
1052
-              //弹框推送提醒
1032
+              // 弹框推送提醒
1053 1033
               this.isShowRemindAdvice = true
1054 1034
               this.isVisibility = false
1055
-
1056 1035
             } else {
1057 1036
               if (this.patient.id <= 0) {
1058 1037
                 this.$message.error('没有选择患者')
@@ -1086,30 +1065,27 @@
1086 1065
                 }
1087 1066
               })
1088 1067
             }
1089
-
1090 1068
           } else if (this.is_open == 2) {
1091 1069
             if (this.waitUploadAdvices.length > 0) {
1092
-              let params = {
1070
+              const params = {
1093 1071
                 advices: this.waitUploadAdvices,
1094 1072
                 advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1095 1073
                 advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1096 1074
                 advice_type: this.waitUploadAdvices[0].advice_type,
1097 1075
                 parent_id: this.patient_id,
1098 1076
                 start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1099
-                remark: '',
1077
+                remark: ''
1100 1078
               }
1101 1079
               CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1102 1080
                 var resp = rs.data
1103 1081
                 if (resp.state == 1) {
1104 1082
                   // this.doctorAdvices = resp.data.advices
1105 1083
                   this.$emit('advice')
1106
-
1107 1084
                 } else {
1108 1085
 
1109 1086
                 }
1110 1087
               })
1111 1088
 
1112
-
1113 1089
               if (this.patient.id <= 0) {
1114 1090
                 this.$message.error('没有选择患者')
1115 1091
                 this.loading = false
@@ -1141,10 +1117,7 @@
1141 1117
                   this.hide()
1142 1118
                 }
1143 1119
               })
1144
-
1145
-
1146 1120
             } else {
1147
-
1148 1121
               if (this.patient.id <= 0) {
1149 1122
                 this.$message.error('没有选择患者')
1150 1123
                 this.loading = false
@@ -1177,11 +1150,7 @@
1177 1150
                 }
1178 1151
               })
1179 1152
             }
1180
-
1181 1153
           }
1182
-
1183
-
1184
-
1185 1154
         } else {
1186 1155
           if (this.prescription.creater == 0) {
1187 1156
             if (this.is_open == 0) {
@@ -1217,12 +1186,10 @@
1217 1186
                 }
1218 1187
               })
1219 1188
             } else if (this.is_open == 1) {
1220
-
1221 1189
               if (this.targetAdvices.length > 0) {
1222
-                //弹框推送提醒
1190
+                // 弹框推送提醒
1223 1191
                 this.isShowRemindAdvice = true
1224 1192
                 this.isVisibility = false
1225
-
1226 1193
               } else {
1227 1194
                 if (this.patient.id <= 0) {
1228 1195
                   this.$message.error('没有选择患者')
@@ -1256,24 +1223,22 @@
1256 1223
                   }
1257 1224
                 })
1258 1225
               }
1259
-
1260 1226
             } else if (this.is_open == 2) {
1261 1227
               if (this.waitUploadAdvices.length > 0) {
1262
-                let params = {
1228
+                const params = {
1263 1229
                   advices: this.waitUploadAdvices,
1264 1230
                   advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1265 1231
                   advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1266 1232
                   advice_type: this.waitUploadAdvices[0].advice_type,
1267 1233
                   parent_id: this.patient_id,
1268 1234
                   start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1269
-                  remark: '',
1235
+                  remark: ''
1270 1236
                 }
1271 1237
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1272 1238
                   var resp = rs.data
1273 1239
                   if (resp.state == 1) {
1274 1240
                     // this.doctorAdvices = resp.data.advices
1275 1241
                     this.$emit('advice')
1276
-
1277 1242
                   } else {
1278 1243
 
1279 1244
                   }
@@ -1310,10 +1275,7 @@
1310 1275
                     this.hide()
1311 1276
                   }
1312 1277
                 })
1313
-
1314
-
1315 1278
               } else {
1316
-
1317 1279
                 if (this.patient.id <= 0) {
1318 1280
                   this.$message.error('没有选择患者')
1319 1281
                   this.loading = false
@@ -1346,12 +1308,8 @@
1346 1308
                   }
1347 1309
                 })
1348 1310
               }
1349
-
1350 1311
             }
1351
-
1352
-
1353 1312
           } else {
1354
-
1355 1313
             if (this.patient.id <= 0) {
1356 1314
               this.$message.error('没有选择患者')
1357 1315
               this.loading = false
@@ -1383,12 +1341,8 @@
1383 1341
                 this.hide()
1384 1342
               }
1385 1343
             })
1386
-
1387
-
1388 1344
           }
1389
-
1390 1345
         }
1391
-
1392 1346
       }, handleCancle: function() {
1393 1347
         this.hide()
1394 1348
       }, handleSolution: function() {
@@ -1396,7 +1350,6 @@
1396 1350
 
1397 1351
         if (this.prescription.id == 0) {
1398 1352
           if (this.is_open == 0) {
1399
-
1400 1353
             if (this.patient.id <= 0) {
1401 1354
               this.$message.error('没有选择患者')
1402 1355
               this.loading = false
@@ -1433,12 +1386,10 @@
1433 1386
               }
1434 1387
             })
1435 1388
           } else if (this.is_open == 1) {
1436
-
1437 1389
             if (this.targetAdvices.length > 0) {
1438
-              //弹框推送提醒
1390
+              // 弹框推送提醒
1439 1391
               this.isShowRemindAdvice = true
1440 1392
               this.isVisibility = false
1441
-
1442 1393
             } else {
1443 1394
               if (this.patient.id <= 0) {
1444 1395
                 this.$message.error('没有选择患者')
@@ -1476,30 +1427,27 @@
1476 1427
                 }
1477 1428
               })
1478 1429
             }
1479
-
1480 1430
           } else if (this.is_open == 2) {
1481 1431
             if (this.waitUploadAdvices.length > 0) {
1482
-              let params = {
1432
+              const params = {
1483 1433
                 advices: this.waitUploadAdvices,
1484 1434
                 advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1485 1435
                 advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1486 1436
                 advice_type: this.waitUploadAdvices[0].advice_type,
1487 1437
                 parent_id: this.patient_id,
1488 1438
                 start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
1489
-                remark: '',
1439
+                remark: ''
1490 1440
               }
1491 1441
               CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1492 1442
                 var resp = rs.data
1493 1443
                 if (resp.state == 1) {
1494 1444
                   // this.doctorAdvices = resp.data.advices
1495 1445
                   this.$emit('advice')
1496
-
1497 1446
                 } else {
1498 1447
 
1499 1448
                 }
1500 1449
               })
1501 1450
 
1502
-
1503 1451
               if (this.patient.id <= 0) {
1504 1452
                 this.$message.error('没有选择患者')
1505 1453
                 this.loading = false
@@ -1531,10 +1479,7 @@
1531 1479
                   this.hide()
1532 1480
                 }
1533 1481
               })
1534
-
1535
-
1536 1482
             } else {
1537
-
1538 1483
               if (this.patient.id <= 0) {
1539 1484
                 this.$message.error('没有选择患者')
1540 1485
                 this.loading = false
@@ -1571,11 +1516,7 @@
1571 1516
                 }
1572 1517
               })
1573 1518
             }
1574
-
1575 1519
           }
1576
-
1577
-
1578
-
1579 1520
         } else {
1580 1521
           if (this.prescription.creater == 0) {
1581 1522
             if (this.is_open == 0) {
@@ -1615,14 +1556,11 @@
1615 1556
                 }
1616 1557
               })
1617 1558
             } else if (this.is_open == 1) {
1618
-
1619 1559
               if (this.targetAdvices.length > 0) {
1620
-                //弹框推送提醒
1560
+                // 弹框推送提醒
1621 1561
                 this.isShowRemindAdvice = true
1622 1562
                 this.isVisibility = false
1623
-
1624 1563
               } else {
1625
-
1626 1564
                 if (this.patient.id <= 0) {
1627 1565
                   this.$message.error('没有选择患者')
1628 1566
                   this.loading = false
@@ -1659,24 +1597,22 @@
1659 1597
                   }
1660 1598
                 })
1661 1599
               }
1662
-
1663 1600
             } else if (this.is_open == 2) {
1664 1601
               if (this.waitUploadAdvices.length > 0) {
1665
-                let params = {
1602
+                const params = {
1666 1603
                   advices: this.waitUploadAdvices,
1667 1604
                   advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1668 1605
                   advice_doctor: this.waitUploadAdvices[0].advice_doctor,
1669 1606
                   advice_type: this.waitUploadAdvices[0].advice_type,
1670 1607
                   parent_id: this.patient_id,
1671 1608
                   start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
1672
-                  remark: '',
1609
+                  remark: ''
1673 1610
                 }
1674 1611
                 CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
1675 1612
                   var resp = rs.data
1676 1613
                   if (resp.state == 1) {
1677 1614
                     // this.doctorAdvices = resp.data.advices
1678 1615
                     this.$emit('advice')
1679
-
1680 1616
                   } else {
1681 1617
 
1682 1618
                   }
@@ -1717,10 +1653,7 @@
1717 1653
                     this.hide()
1718 1654
                   }
1719 1655
                 })
1720
-
1721
-
1722 1656
               } else {
1723
-
1724 1657
                 if (this.patient.id <= 0) {
1725 1658
                   this.$message.error('没有选择患者')
1726 1659
                   this.loading = false
@@ -1757,12 +1690,8 @@
1757 1690
                   }
1758 1691
                 })
1759 1692
               }
1760
-
1761 1693
             }
1762
-
1763
-
1764 1694
           } else {
1765
-
1766 1695
             if (this.patient.id <= 0) {
1767 1696
               this.$message.error('没有选择患者')
1768 1697
               this.loading = false
@@ -1798,20 +1727,8 @@
1798 1727
                 this.hide()
1799 1728
               }
1800 1729
             })
1801
-
1802 1730
           }
1803
-
1804 1731
         }
1805
-
1806
-
1807
-
1808
-
1809
-
1810
-
1811
-
1812
-
1813
-
1814
-
1815 1732
       }, isShows(name) {
1816 1733
         var filedList = store.getters.xt_user.fileds
1817 1734
         for (let i = 0; i < filedList.length; i++) {
@@ -1856,23 +1773,32 @@
1856 1773
             } else {
1857 1774
               val.child[i]['single'] = ''
1858 1775
             }
1859
-            name = name + '▲' + val.child[i].advice_name + ''
1860
-              + val.child[i].advice_desc
1861
-              + val.child[i].drug_spec_unit
1862
-              + val.child[i].presc
1863
-              + val.child[i].single
1776
+            name = name + '▲' + val.child[i].advice_name + '' +
1777
+            val.child[i].advice_desc +
1778
+            val.child[i].drug_spec_unit +
1779
+            val.child[i].presc +
1780
+            val.child[i].single
1864 1781
           }
1865
-          return val.advice_name + '  ' + advice_desc + ' '
1866
-            + val.drug_spec_unit
1867
-            + prescribing_number
1868
-            + ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark + name
1869
-
1782
+          return val.advice_name + '  ' + advice_desc + ' ' +
1783
+          val.drug_spec_unit +
1784
+          prescribing_number +
1785
+          ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark + name
1870 1786
         } else {
1871
-          return val.advice_name + '  ' + advice_desc
1872
-            + prescribing_number
1873
-            + ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark
1787
+          return val.advice_name + '  ' + advice_desc +
1788
+          prescribing_number +
1789
+          ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark
1790
+        }
1791
+      },
1792
+      changePrescription(id) {
1793
+        if (id === 1 || id === 3 || id === 4 || id === 6 || id === 7 || id === 8 || id === 9 || id === 10 || id === 11 || id === 13 || id === 14 || id === 15 || id === 16) {
1794
+          this.zhiShow = false
1795
+          this.huShow = false
1796
+          this.totalShow = false
1797
+        } else {
1798
+          this.zhiShow = true
1799
+          this.huShow = true
1800
+          this.totalShow = true
1874 1801
         }
1875
-
1876 1802
       }
1877 1803
     },
1878 1804
     created() {

+ 74 - 19
src/xt_pages/management/components/ManageForm.vue Целия файл

@@ -1,17 +1,29 @@
1 1
 <template>
2 2
   <div id="manage-form">
3
-    <el-dialog title="新增设备" :visible.sync="dialogVisible" width="50%" align="center">
3
+    <el-dialog
4
+      title="新增设备"
5
+      :visible.sync="dialogVisible"
6
+      width="50%"
7
+      align="center"
8
+    >
4 9
       <el-form ref="form" :model="form" :rules="rules">
5 10
         <el-row>
6 11
           <el-col :span="8">
7 12
             <el-form-item label="序列号:" required prop="serial_number">
8
-              <el-input style="width:135px" v-model="form.serial_number"></el-input>
13
+              <el-input
14
+                style="width:135px"
15
+                v-model="form.serial_number"
16
+              ></el-input>
9 17
             </el-form-item>
10 18
           </el-col>
11 19
 
12 20
           <el-col :span="8">
13 21
             <el-form-item label="设备类型:" required prop="device_type">
14
-              <el-select style="width:135px" v-model="form.device_type" @change="changeDeviceType">
22
+              <el-select
23
+                style="width:135px"
24
+                v-model="form.device_type"
25
+                @change="changeDeviceType"
26
+              >
15 27
                 <el-option
16 28
                   v-for="item in this.DeviceType"
17 29
                   :key="item.id"
@@ -28,7 +40,7 @@
28 40
                 <el-option
29 41
                   v-for="item in this.bedNumber"
30 42
                   :key="item.id"
31
-                  :label="item.zone_name + item.number +'号机'"
43
+                  :label="item.zone_name + item.number"
32 44
                   :value="item.id"
33 45
                 ></el-option>
34 46
               </el-select>
@@ -38,17 +50,26 @@
38 50
         <el-row>
39 51
           <el-col :span="8">
40 52
             <el-form-item label="设备名称:" required prop="device_name">
41
-              <el-input style="width:135px" v-model="form.device_name"></el-input>
53
+              <el-input
54
+                style="width:135px"
55
+                v-model="form.device_name"
56
+              ></el-input>
42 57
             </el-form-item>
43 58
           </el-col>
44 59
           <el-col :span="8">
45 60
             <el-form-item label="生产厂家:" prop="manufacture_factory">
46
-              <el-input style="width:135px" v-model="form.manufacture_factory"></el-input>
61
+              <el-input
62
+                style="width:135px"
63
+                v-model="form.manufacture_factory"
64
+              ></el-input>
47 65
             </el-form-item>
48 66
           </el-col>
49 67
           <el-col :span="8">
50 68
             <el-form-item label="维修厂家:" prop="service_manufacturer">
51
-              <el-input style="width:135px" v-model="form.service_manufacturer"></el-input>
69
+              <el-input
70
+                style="width:135px"
71
+                v-model="form.service_manufacturer"
72
+              ></el-input>
52 73
             </el-form-item>
53 74
           </el-col>
54 75
         </el-row>
@@ -60,12 +81,18 @@
60 81
           </el-col>
61 82
           <el-col :span="8">
62 83
             <el-form-item label="使用科室:" prop="use_section">
63
-              <el-input style="width:135px" v-model="form.use_section"></el-input>
84
+              <el-input
85
+                style="width:135px"
86
+                v-model="form.use_section"
87
+              ></el-input>
64 88
             </el-form-item>
65 89
           </el-col>
66 90
           <el-col :span="8">
67 91
             <el-form-item label="科室编号:" prop="section_number">
68
-              <el-input style="width:135px" v-model="form.section_number"></el-input>
92
+              <el-input
93
+                style="width:135px"
94
+                v-model="form.section_number"
95
+              ></el-input>
69 96
             </el-form-item>
70 97
           </el-col>
71 98
         </el-row>
@@ -113,7 +140,10 @@
113 140
         <el-row>
114 141
           <el-col :span="8">
115 142
             <el-form-item label="维修工程师:" prop="maintenance_engineer">
116
-              <el-input style="width:135px" v-model="form.maintenance_engineer"></el-input>
143
+              <el-input
144
+                style="width:135px"
145
+                v-model="form.maintenance_engineer"
146
+              ></el-input>
117 147
             </el-form-item>
118 148
           </el-col>
119 149
           <el-col :span="8">
@@ -123,7 +153,10 @@
123 153
           </el-col>
124 154
           <el-col :span="8">
125 155
             <el-form-item label="保修期限:" prop="guarantee_date">
126
-              <el-input style="width:135px" v-model="form.guarantee_date"></el-input>
156
+              <el-input
157
+                style="width:135px"
158
+                v-model="form.guarantee_date"
159
+              ></el-input>
127 160
             </el-form-item>
128 161
           </el-col>
129 162
         </el-row>
@@ -145,8 +178,15 @@
145 178
             </el-form-item>
146 179
           </el-col>
147 180
           <el-col :span="8">
148
-            <el-form-item label="初次使用次数:" prop="user_total" v-show="totalShow">
149
-              <el-input v-model="form.user_total" style="width:135px"></el-input>
181
+            <el-form-item
182
+              label="初次使用次数:"
183
+              prop="user_total"
184
+              v-show="totalShow"
185
+            >
186
+              <el-input
187
+                v-model="form.user_total"
188
+                style="width:135px"
189
+              ></el-input>
150 190
             </el-form-item>
151 191
           </el-col>
152 192
           <el-col :span="8" v-show="DisinfectionShow">
@@ -223,11 +263,18 @@
223 263
         </el-row>
224 264
         <el-row>
225 265
           <el-col :span="24">
226
-            <el-form-item label="治疗模式:" prop="treat_mode" v-show="treatShow">
227
-              <el-checkbox-group v-model="form.treat_mode" @change="changetreatmentmode">
266
+            <el-form-item
267
+              label="治疗模式:"
268
+              prop="treat_mode"
269
+              v-show="treatShow"
270
+            >
271
+              <el-checkbox-group
272
+                v-model="form.treat_mode"
273
+                @change="changetreatmentmode"
274
+              >
228 275
                 <el-checkbox
229 276
                   style="min-width:50px"
230
-                  v-for="item in  treatmentmode"
277
+                  v-for="item in treatmentmode"
231 278
                   :key="item"
232 279
                   :label="item"
233 280
                   :value="item"
@@ -242,13 +289,16 @@
242 289
               :indeterminate="isIndeterminate"
243 290
               v-model="checkAll"
244 291
               @change="handleCheckAllChange"
245
-            >全选</el-checkbox>
292
+              >全选</el-checkbox
293
+            >
246 294
           </el-col>
247 295
         </el-row>
248 296
       </el-form>
249 297
       <span slot="footer" class="dialog-footer">
250 298
         <el-button @click="dialogVisible = false">取 消</el-button>
251
-        <el-button type="primary" @click="SaveManageInfo('form')">保存</el-button>
299
+        <el-button type="primary" @click="SaveManageInfo('form')"
300
+          >保存</el-button
301
+        >
252 302
       </span>
253 303
     </el-dialog>
254 304
   </div>
@@ -344,7 +394,10 @@ export default {
344 394
         { id: 2, name: "水处理机" },
345 395
         { id: 3, name: "其他" }
346 396
       ],
347
-      reverseMode: [{ id: 1, name: "单级反渗" }, { id: 2, name: "双级反渗" }],
397
+      reverseMode: [
398
+        { id: 1, name: "单级反渗" },
399
+        { id: 2, name: "双级反渗" }
400
+      ],
348 401
       rules: {
349 402
         serial_number: [{ required: true, message: "请填写序列号" }],
350 403
         device_name: [{ required: true, message: "请填写序列号" }],
@@ -480,6 +533,8 @@ export default {
480 533
               console.log("addmacher", addmacher);
481 534
               this.dialogVisible = false;
482 535
               this.$emit("getAllMachineInfo");
536
+            } else {
537
+              this.$message.error("添加失败");
483 538
             }
484 539
           });
485 540
         }

+ 223 - 0
src/xt_pages/management/components/PlanForm.vue Целия файл

@@ -0,0 +1,223 @@
1
+<template>
2
+  <div id="plan-form">
3
+    <el-dialog
4
+      title="新增计划"
5
+      :visible.sync="dialogVisible"
6
+      width="44%"
7
+      center
8
+    >
9
+      <el-form>
10
+        <el-row>
11
+          <el-col :span="10">
12
+            <el-form-item label="设备型号:">
13
+              <el-select
14
+                style="width:135px"
15
+                v-model="form.device_type"
16
+                @change="changeDeviceType"
17
+              >
18
+                <el-option
19
+                  v-for="item in this.DeviceType"
20
+                  :key="item.id"
21
+                  :label="item.equitment_name"
22
+                  :value="item.id"
23
+                ></el-option>
24
+              </el-select>
25
+            </el-form-item>
26
+          </el-col>
27
+          <el-col :span="10">
28
+            <el-form-item label="消毒时长:">
29
+              <el-input style="width:135px"></el-input>
30
+            </el-form-item>
31
+          </el-col>
32
+        </el-row>
33
+        <el-row>
34
+          <el-col :span="10">
35
+            <el-form-item label="时间:">
36
+              <el-select
37
+                style="width:135px"
38
+                v-model="form.device_type"
39
+                @change="changeDeviceType"
40
+              >
41
+                <el-option
42
+                  v-for="item in this.timeType"
43
+                  :key="item.id"
44
+                  :label="item.name"
45
+                  :value="item.id"
46
+                ></el-option>
47
+              </el-select>
48
+            </el-form-item>
49
+          </el-col>
50
+          <el-col :span="10">
51
+            <el-form-item label="班次:">
52
+              <el-select
53
+                style="width:135px"
54
+                v-model="form.device_type"
55
+                @change="changeDeviceType"
56
+              >
57
+                <el-option
58
+                  v-for="item in this.classType"
59
+                  :key="item.id"
60
+                  :label="item.name"
61
+                  :value="item.id"
62
+                ></el-option>
63
+              </el-select>
64
+            </el-form-item>
65
+          </el-col>
66
+        </el-row>
67
+        <el-row>
68
+          <el-col :span="10">
69
+            <el-form-item label="机表消毒方式:">
70
+              <el-select
71
+                style="width:135px"
72
+                v-model="form.device_type"
73
+                @change="changeDeviceType"
74
+              >
75
+                <el-option
76
+                  v-for="item in this.disinfectType"
77
+                  :key="item.id"
78
+                  :label="item.name"
79
+                  :value="item.id"
80
+                ></el-option>
81
+              </el-select>
82
+            </el-form-item>
83
+          </el-col>
84
+          <el-col :span="10">
85
+            <el-form-item label="机表消毒液:">
86
+              <el-select
87
+                style="width:135px"
88
+                v-model="form.device_type"
89
+                @change="changeDeviceType"
90
+              >
91
+                <el-option
92
+                  v-for="item in this.disinfectantType"
93
+                  :key="item.id"
94
+                  :label="item.name"
95
+                  :value="item.id"
96
+                ></el-option>
97
+              </el-select>
98
+            </el-form-item>
99
+          </el-col>
100
+        </el-row>
101
+        <el-row>
102
+          <el-col :span="10">
103
+            <el-form-item label="液路消毒方式:">
104
+              <el-select
105
+                style="width:135px"
106
+                v-model="form.device_type"
107
+                @change="changeDeviceType"
108
+              >
109
+                <el-option
110
+                  v-for="item in this.sterilizeType"
111
+                  :key="item.id"
112
+                  :label="item.name"
113
+                  :value="item.id"
114
+                ></el-option>
115
+              </el-select>
116
+            </el-form-item>
117
+          </el-col>
118
+          <el-col :span="10">
119
+            <el-form-item label="液路消毒液:">
120
+              <el-select
121
+                style="width:135px"
122
+                v-model="form.device_type"
123
+                @change="changeDeviceType"
124
+              >
125
+                <el-option
126
+                  v-for="item in this.fluidPathType"
127
+                  :key="item.id"
128
+                  :label="item.name"
129
+                  :value="item.id"
130
+                ></el-option>
131
+              </el-select>
132
+            </el-form-item>
133
+          </el-col>
134
+        </el-row>
135
+      </el-form>
136
+      <span slot="footer" class="dialog-footer">
137
+        <el-button @click="dialogVisible = false">取 消</el-button>
138
+        <el-button type="primary" @click="dialogVisible = false"
139
+          >确 定</el-button
140
+        >
141
+      </span>
142
+    </el-dialog>
143
+  </div>
144
+</template>
145
+
146
+<script>
147
+import { getAllEquimentName } from "@/api/manage";
148
+export default {
149
+  name: "PlanForm",
150
+  data() {
151
+    return {
152
+      dialogVisible: false,
153
+      form: {
154
+        device_type: ""
155
+      },
156
+      timeType: [
157
+        { id: 1, name: "周一" },
158
+        { id: 2, name: "周二" },
159
+        { id: 3, name: "周三" },
160
+        { id: 4, name: "周四" },
161
+        { id: 5, name: "周五" },
162
+        { id: 6, name: "周六" },
163
+        { id: 7, name: "周日" }
164
+      ],
165
+      classType: [
166
+        { id: 1, name: "上午" },
167
+        { id: 2, name: "下午" },
168
+        { id: 3, name: "晚上" }
169
+      ],
170
+      disinfectType: [
171
+        { id: 1, name: "擦拭" },
172
+        { id: 2, name: "化学消毒" }
173
+      ],
174
+      disinfectantType: [
175
+        { id: 1, name: "0.22%季铵盐" },
176
+        { id: 2, name: "500mg/l含氯消毒剂" },
177
+        { id: 3, name: "1000mg/l含氯消毒剂" },
178
+        { id: 4, name: "1500mg/l含氯消毒剂" }
179
+      ],
180
+      sterilizeType: [
181
+        { id: 1, name: "热化学消毒" },
182
+        { id: 2, name: "化学消毒 + 除钙" },
183
+        { id: 3, name: "热化学消毒 + 除钙" },
184
+        { id: 4, name: "热消毒" },
185
+        { id: 5, name: "化学消毒" },
186
+        { id: 6, name: "除钙" },
187
+        { id: 7, name: "清洗" }
188
+      ],
189
+      fluidPathType: [
190
+        { id: 1, name: "20%柠檬酸" },
191
+        { id: 2, name: "25%柠檬酸" },
192
+        { id: 3, name: "50%柠檬酸" },
193
+        { id: 4, name: "50%柠檬酸 + 5%次氯酸钠" },
194
+        { id: 5, name: "20%柠檬酸 + 10%冰醋酸" },
195
+        { id: 6, name: "0.2%过氧化乙酸" },
196
+        { id: 7, name: "10%冰醋酸" },
197
+        { id: 8, name: "50%冰醋酸" },
198
+        { id: 9, name: "5%次氯酸钠" }
199
+      ],
200
+      DeviceType: []
201
+    };
202
+  },
203
+  methods: {
204
+    open: function() {
205
+      this.dialogVisible = true;
206
+    },
207
+    getAllEquimentName() {
208
+      getAllEquimentName().then(response => {
209
+        if (response.data.state === 1) {
210
+          var equit = response.data.data.equit;
211
+          console.log("equit", equit);
212
+          this.DeviceType = equit;
213
+        }
214
+      });
215
+    }
216
+  },
217
+  created() {
218
+    this.getAllEquimentName();
219
+  }
220
+};
221
+</script>
222
+
223
+<style scoped></style>

+ 13 - 4
src/xt_pages/management/home.vue Целия файл

@@ -114,7 +114,7 @@
114 114
                               <el-col :span="7">
115 115
                                   <el-form-item label="机位号:">
116 116
                                        <el-select style="width:150px" v-model="form.bed_number">
117
-                                          <el-option v-for="item in this.bedNumber" :key="item.id" :label="item.zone_name + item.number +'号机'" :value="item.id"></el-option>
117
+                                          <el-option v-for="item in this.bedNumber" :key="item.id" :label="item.zone_name + item.number" :value="item.id"></el-option>
118 118
                                        </el-select>
119 119
                                   </el-form-item>
120 120
                               </el-col>
@@ -294,7 +294,7 @@
294 294
                           <div class="newButton">
295 295
                             <el-button
296 296
                              size="small"
297
-                             @click="addTab(editableTabsValue)"
297
+                             @click="addPlan"
298 298
                             >
299 299
                             新增计划
300 300
                            </el-button>
@@ -697,6 +697,9 @@
697 697
           </el-container>
698 698
         </el-container>
699 699
       </el-container>
700
+
701
+         <!-- 新增计划 -->
702
+        <plan-form ref="planForm"></plan-form>
700 703
         </div>
701 704
     </div>
702 705
 
@@ -706,11 +709,13 @@
706 709
   import BreadCrumb from '../components/bread-crumb'
707 710
   import { getAllSubregion, getAllMachine, getMachineDetailById, UpdateMachineInfo } from '@/api/manage'
708 711
   import { uParseTime } from '@/utils/tools'
709
-  const cityOptions = ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF', 'HFHD+HP', 'HFR', 'HDF+HP', 'GRRT', '腹水回收']
712
+  import PlanForm from './components/PlanForm'
713
+const cityOptions = ['HD', 'HDF', 'HD+HP', 'HP', 'HF', 'SCUF', 'IUF', 'HFHD+HP', 'HFR', 'HDF+HP', 'GRRT', '腹水回收']
710 714
 export default {
711 715
     name: 'home',
712 716
     components: {
713
-      BreadCrumb
717
+      BreadCrumb,
718
+      PlanForm
714 719
     },
715 720
     data() {
716 721
       return {
@@ -1017,6 +1022,9 @@ export default {
1017 1022
             }
1018 1023
           })
1019 1024
         })
1025
+      },
1026
+      addPlan() {
1027
+        this.$refs.planForm.open()
1020 1028
       }
1021 1029
 
1022 1030
     },
@@ -1039,6 +1047,7 @@ export default {
1039 1047
         position: absolute;
1040 1048
         right: 0;
1041 1049
         top:0;
1050
+        z-index: 9;
1042 1051
       }
1043 1052
     }
1044 1053
     .but{

+ 37 - 23
src/xt_pages/management/index.vue Целия файл

@@ -9,7 +9,8 @@
9 9
         icon="el-icon-circle-plus-outline"
10 10
         size="small"
11 11
         @click="AddManage()"
12
-      >新增</el-button>
12
+        >新增</el-button
13
+      >
13 14
     </div>
14 15
     <div class="app-container">
15 16
       <div class="cell clearfix">
@@ -26,7 +27,8 @@
26 27
           icon="el-icon-search"
27 28
           size="small"
28 29
           @click="seahcerMacherInfo()"
29
-        >搜索</el-button>
30
+          >搜索</el-button
31
+        >
30 32
       </div>
31 33
 
32 34
       <div class="cell clearfix">
@@ -36,11 +38,13 @@
36 38
         <div class="time">
37 39
           <ul class>
38 40
             <li
39
-              :class="item.id==schedulType?'active':''"
41
+              :class="item.id == schedulType ? 'active' : ''"
40 42
               v-for="item in this.zones"
41 43
               :key="item.id"
42 44
               @click="selectSchedulType(item.id)"
43
-            >{{item.name}}</li>
45
+            >
46
+              {{ item.name }}
47
+            </li>
44 48
           </ul>
45 49
         </div>
46 50
       </div>
@@ -52,11 +56,13 @@
52 56
         <div class="time">
53 57
           <ul class>
54 58
             <li
55
-              :class="item.id==schedulTypeone?'active':''"
59
+              :class="item.id == schedulTypeone ? 'active' : ''"
56 60
               v-for="item in this.DeviceType"
57 61
               :key="item.id"
58 62
               @click="selectSchedulTypeOne(item.id)"
59
-            >{{item.name}}</li>
63
+            >
64
+              {{ item.name }}
65
+            </li>
60 66
           </ul>
61 67
         </div>
62 68
       </div>
@@ -68,53 +74,60 @@
68 74
         <div class="time">
69 75
           <ul class>
70 76
             <li
71
-              :class="item.id==schedulTypetwo?'active':''"
77
+              :class="item.id == schedulTypetwo ? 'active' : ''"
72 78
               v-for="item in this.AllStatus"
73 79
               :key="item.id"
74 80
               @click="selectSchedulTypeTwo(item.id)"
75
-            >{{item.name}}</li>
81
+            >
82
+              {{ item.name }}
83
+            </li>
76 84
           </ul>
77 85
         </div>
78 86
       </div>
79 87
 
80 88
       <el-table :data="tableData" border style="width: 100%">
81 89
         <el-table-column label="序号" width="180" align="center">
82
-          <template slot-scope="scope">{{scope.row.id}}</template>
90
+          <template slot-scope="scope">{{ scope.row.id }}</template>
83 91
         </el-table-column>
84 92
 
85 93
         <el-table-column label="序列号" width="180" align="center">
86
-          <template slot-scope="scope">{{scope.row.serial_number}}</template>
94
+          <template slot-scope="scope">{{ scope.row.serial_number }}</template>
87 95
         </el-table-column>
88 96
 
89 97
         <el-table-column label="设备类型" width="180" align="center">
90
-          <template slot-scope="scope">{{scope.row.device_type}}</template>
98
+          <template slot-scope="scope">{{ scope.row.device_type }}</template>
91 99
         </el-table-column>
92 100
         <el-table-column label="设备名称" width="180" align="center">
93
-          <template slot-scope="scope">{{scope.row.device_name}}</template>
101
+          <template slot-scope="scope">{{ scope.row.device_name }}</template>
94 102
         </el-table-column>
95 103
         <el-table-column label="设备型号" align="center">
96
-          <template slot-scope="scope">{{scope.row.unit_type}}</template>
104
+          <template slot-scope="scope">{{ scope.row.unit_type }}</template>
97 105
         </el-table-column>
98 106
 
99 107
         <el-table-column label="分区" align="center">
100
-          <template slot-scope="scope">{{scope.row.name}}</template>
108
+          <template slot-scope="scope">{{ scope.row.name }}</template>
101 109
         </el-table-column>
102 110
 
103 111
         <el-table-column label="床位号" align="center">
104
-          <template slot-scope="scope">{{scope.row.bed_number}}</template>
112
+          <template slot-scope="scope">{{ scope.row.bed_number }}</template>
105 113
         </el-table-column>
106 114
 
107 115
         <el-table-column label="机器状态" align="center">
108
-          <template slot-scope="scope">{{scope.row.machine_status}}</template>
116
+          <template slot-scope="scope">{{ scope.row.machine_status }}</template>
109 117
         </el-table-column>
110 118
 
111 119
         <el-table-column label="使用次数" align="center">
112
-          <template slot-scope="scope">{{scope.row.user_total}}</template>
120
+          <template slot-scope="scope">{{ scope.row.user_total }}</template>
113 121
         </el-table-column>
114 122
 
115 123
         <el-table-column label="操作" align="center">
116 124
           <template slot-scope="scope">
117
-            <el-button @click="handleClick(scope.row.id,scope.$index)" type="text" size="small">查看</el-button>
125
+            <el-button
126
+              @click="handleClick(scope.row.id, scope.$index)"
127
+              type="text"
128
+              size="small"
129
+              >查看</el-button
130
+            >
118 131
           </template>
119 132
         </el-table-column>
120 133
       </el-table>
@@ -122,7 +135,7 @@
122 135
       <el-pagination
123 136
         @size-change="handleSizeChange"
124 137
         @current-change="handleCurrentChange"
125
-        :page-sizes="[10,20,50,100]"
138
+        :page-sizes="[10, 20, 50, 100]"
126 139
         :page-size="10"
127 140
         background
128 141
         style="margin-top:20px;float: right"
@@ -130,7 +143,10 @@
130 143
         :total="total"
131 144
       ></el-pagination>
132 145
       <!-- 新增设备 -->
133
-      <manage-form ref="manageForm" v-on:getAllMachineInfo="getAllMachineInfo"></manage-form>
146
+      <manage-form
147
+        ref="manageForm"
148
+        v-on:getAllMachineInfo="getAllMachineInfo"
149
+      ></manage-form>
134 150
     </div>
135 151
   </div>
136 152
 </template>
@@ -217,7 +233,6 @@ export default {
217 233
       this.getAllMachineInfo();
218 234
     },
219 235
     AddManage() {
220
-      console.log(this.$refs.ManageForm);
221 236
       this.$refs.manageForm.open();
222 237
     },
223 238
     getAllMachineInfo() {
@@ -285,5 +300,4 @@ export default {
285 300
 };
286 301
 </script>
287 302
 
288
-<style scoped>
289
-</style>
303
+<style scoped></style>