浏览代码

新功能

csx 5 年前
父节点
当前提交
07a398dc96

+ 1 - 1
config/index.js 查看文件

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

+ 15 - 4
src/api/advice.js 查看文件

@@ -1,8 +1,8 @@
1 1
 import request from '@/utils/request'
2 2
 
3
-export function getAdviceConfig(){
3
+export function getAdviceConfig(type){
4 4
     return request({
5
-        url:'/api/getadviceconfigs',
5
+        url:'/api/getadviceconfigs?type='+type,
6 6
         method:'get',
7 7
     })
8 8
 }
@@ -197,11 +197,22 @@ export function postAdviceTemplate(params,name,advice_type){
197 197
 }
198 198
 
199 199
 export function CreateGroupAdvice(id, groupno, advices){
200
-  return request({
200
+  if(advices.remind > 0){
201
+    return request({
201 202
       url:'/api/patients/advice/creategroup?id='+id + '&groupno=' + groupno,
202 203
       method:'post',
203 204
       data:advices,
204
-  })
205
+    })
206
+
207
+  }else{
208
+    return request({
209
+      url:'/api/patients/advice/creategroup?id='+id + '&groupno=' + groupno,
210
+      method:'post',
211
+      data:advices,
212
+    })
213
+
214
+  }
215
+
205 216
 }
206 217
 export function DeleteGroupAdvice(groupno){
207 218
   return request({

+ 0 - 1
src/api/dialysis.js 查看文件

@@ -244,4 +244,3 @@ export function postDelMonitorInfo(params) {
244 244
 
245 245
 
246 246
 
247
-

+ 10 - 0
src/api/patient.js 查看文件

@@ -286,6 +286,16 @@ export function GetRemind(params) {
286 286
 }
287 287
 
288 288
 
289
+export function PostRemind(params) {
290
+  return request({
291
+    url: '/api/remind/is_open',
292
+    method: 'Post',
293
+    params:params,
294
+  })
295
+}
296
+
297
+
298
+
289 299
 
290 300
 
291 301
 

+ 240 - 16
src/xt_pages/data/druguseTemplate.vue 查看文件

@@ -47,7 +47,7 @@
47 47
                 width="100"
48 48
               >
49 49
                 <template slot-scope="scope">
50
-                  <div>{{scope.row.advice_type == 1 ? "长期" : "临时"}}</div>
50
+                  <div>{{scope.row.advice_type == 1 ? '长期' : '临时'}}</div>
51 51
                 </template>
52 52
 
53 53
               </el-table-column>
@@ -142,6 +142,14 @@
142 142
               </el-table-column>
143 143
 
144 144
 
145
+              <el-table-column prop="blood_flow_volume" align="center" label="提醒频率">
146
+                <template slot-scope="scope">
147
+                  <span v-if="scope.row.frequency_type == 1">每次必推</span>
148
+                  <span v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/1次</span>
149
+                  <span v-if="scope.row.frequency_type == 3">每周{{scope.row.week_days}}</span>
150
+                </template>
151
+              </el-table-column>
152
+
145 153
               <el-table-column
146 154
                 align="center"
147 155
                 label="操作"
@@ -184,8 +192,8 @@
184 192
 
185 193
                   <el-form-item label="模版类型" prop="advice_type">
186 194
                     <el-radio-group v-model="form.advice_type">
187
-                      <el-radio label="0">临时</el-radio>
188
-                      <el-radio label="1">长期</el-radio>
195
+                      <el-radio :label="0">临时</el-radio>
196
+                      <el-radio :label="1">长期</el-radio>
189 197
                     </el-radio-group>
190 198
                   </el-form-item>
191 199
 
@@ -239,6 +247,14 @@
239 247
                     </template>
240 248
                   </el-table-column>
241 249
 
250
+                  <el-table-column prop="blood_flow_volume" align="center" label="提醒频率" v-if="form.advice_type == 1">
251
+                    <template slot-scope="scope">
252
+                      <span v-if="scope.row.frequency_type == 1">每次必推</span>
253
+                      <span v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/1次</span>
254
+                      <span v-if="scope.row.frequency_type == 3">每周{{scope.row.weekdays}}</span>
255
+                    </template>
256
+                  </el-table-column>
257
+
242 258
                 </el-table>
243 259
               </div>
244 260
               <div slot="footer" class="dialog-footer">
@@ -375,6 +391,39 @@
375 391
                       </el-select>
376 392
                     </el-form-item>
377 393
                   </el-col>
394
+
395
+                  <el-col :span="24" v-if="form.advice_type&&!isAddChild">
396
+                    <el-form-item label="周期提醒 :">
397
+                      <el-radio-group v-model="templateForm.frequency_type">
398
+                        <el-radio :label="1">每次必推</el-radio>
399
+                        <el-radio :label="2">天数频率</el-radio>
400
+                        <el-radio :label="3">星期频率</el-radio>
401
+                      </el-radio-group>
402
+                    </el-form-item>
403
+                  </el-col>
404
+
405
+
406
+                  <el-col :span="12" v-if="templateForm.frequency_type == 2">
407
+                    <el-form-item prop="day_count">
408
+                      <el-input style="width: 50px" v-model="templateForm.day_count"></el-input>&nbsp;
409
+                      天/一次
410
+                    </el-form-item>
411
+                  </el-col>
412
+
413
+                  <el-col :span="24" v-if="templateForm.frequency_type == 3">
414
+                    <el-form-item prop="weekday">
415
+                      <el-checkbox-group v-model="templateForm.weekday">
416
+                        <el-checkbox label="周一" name="type"></el-checkbox>
417
+                        <el-checkbox label="周二" name="type"></el-checkbox>
418
+                        <el-checkbox label="周三" name="type"></el-checkbox>
419
+                        <el-checkbox label="周四" name="type"></el-checkbox>
420
+                        <el-checkbox label="周五" name="type"></el-checkbox>
421
+                        <el-checkbox label="周六" name="type"></el-checkbox>
422
+                        <el-checkbox label="周日" name="type"></el-checkbox>
423
+                      </el-checkbox-group>
424
+                    </el-form-item>
425
+                  </el-col>
426
+
378 427
                 </el-row>
379 428
               </el-form>
380 429
               <div slot="footer" class="dialog-footer">
@@ -382,6 +431,9 @@
382 431
                 <el-button type="primary" @click="submitTemplate('templateForm')">保 存</el-button>
383 432
               </div>
384 433
             </el-dialog>
434
+            <!--TODO-->
435
+
436
+
385 437
             <el-dialog :title="editDialogTitle" :visible.sync="templateEditFormVisible" width="700px">
386 438
               <el-form
387 439
                 ref="templateFormEdit"
@@ -510,6 +562,41 @@
510 562
                       </el-select>
511 563
                     </el-form-item>
512 564
                   </el-col>
565
+
566
+
567
+                  <el-col :span="24">
568
+                    <el-form-item label="周期提醒 :">
569
+                      <el-radio-group v-model="templateFormEdit.frequency_type">
570
+                        <el-radio :label="1">每次必推</el-radio>
571
+                        <el-radio :label="2">天数频率</el-radio>
572
+                        <el-radio :label="3">星期频率</el-radio>
573
+                      </el-radio-group>
574
+                    </el-form-item>
575
+                  </el-col>
576
+
577
+
578
+                  <el-col :span="12" v-if="templateFormEdit.frequency_type == 2">
579
+                    <el-form-item prop="day_count">
580
+                      <el-input style="width: 50px" v-model="templateFormEdit.day_count"></el-input>&nbsp;
581
+                      天/一次
582
+                    </el-form-item>
583
+                  </el-col>
584
+
585
+                  <el-col :span="24" v-if="templateFormEdit.frequency_type == 3">
586
+                    <el-form-item >
587
+                      <el-checkbox-group v-model="templateFormEdit.weekday">
588
+                        <el-checkbox label="周一" name="type"></el-checkbox>
589
+                        <el-checkbox label="周二" name="type"></el-checkbox>
590
+                        <el-checkbox label="周三" name="type"></el-checkbox>
591
+                        <el-checkbox label="周四" name="type"></el-checkbox>
592
+                        <el-checkbox label="周五" name="type"></el-checkbox>
593
+                        <el-checkbox label="周六" name="type"></el-checkbox>
594
+                        <el-checkbox label="周日" name="type"></el-checkbox>
595
+                      </el-checkbox-group>
596
+                    </el-form-item>
597
+                  </el-col>
598
+
599
+
513 600
                 </el-row>
514 601
               </el-form>
515 602
               <div slot="footer" class="dialog-footer">
@@ -555,23 +642,31 @@
555 642
                       {{scope.row.prescribing_number}}{{scope.row.prescribing_number_unit}}
556 643
                     </template>
557 644
                   </el-table-column>
558
-                  <el-table-column prop="pulse_frequency" align="center" label="单次用量">
645
+                  <el-table-column  align="center" label="单次用量">
559 646
                     <template slot-scope="scope" v-if="scope.row.single_dose != ''">
560 647
                       {{scope.row.single_dose}}{{scope.row.single_dose_unit}}
561 648
                     </template>
562 649
 
563 650
                   </el-table-column>
564
-                  <el-table-column prop="breathing_rate" align="center" label="给药途径">
651
+                  <el-table-column  align="center" label="给药途径">
565 652
                     <template slot-scope="scope">
566 653
                       <span v-if="scope.row.parent_id == 0">{{scope.row.delivery_way}}</span>
567 654
                     </template>
568 655
 
569 656
                   </el-table-column>
570
-                  <el-table-column prop="blood_flow_volume" align="center" label="执行频率">
657
+                  <el-table-column  align="center" label="执行频率">
571 658
                     <template slot-scope="scope">
572 659
                       <span v-if="scope.row.parent_id == 0">{{scope.row.execution_frequency}}</span>
573 660
                     </template>
574 661
                   </el-table-column>
662
+
663
+                  <el-table-column  align="center" label="提醒频率" v-if="form.advice_type == 1">
664
+                    <template slot-scope="scope">
665
+                      <span v-if="scope.row.frequency_type == 1">每次必推</span>
666
+                      <span v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/1次</span>
667
+                      <span v-if="scope.row.frequency_type == 3">每周{{scope.row.week_days}}</span>
668
+                    </template>
669
+                  </el-table-column>
575 670
                 </el-table>
576 671
               </div>
577 672
               <div slot="footer" class="dialog-footer">
@@ -579,6 +674,12 @@
579 674
                 <el-button type="primary" @click="modifyTemplateName">保 存</el-button>
580 675
               </div>
581 676
             </el-dialog>
677
+
678
+
679
+
680
+
681
+
682
+
582 683
             <el-dialog title="新增医嘱" :visible.sync="templateFormTwoVisible" width="700px">
583 684
               <el-form
584 685
                 ref="templateForm"
@@ -705,7 +806,43 @@
705 806
                       </el-select>
706 807
                     </el-form-item>
707 808
                   </el-col>
809
+
810
+
811
+
812
+                  <el-col :span="24" v-if="form.advice_type == 1">
813
+                    <el-form-item label="周期提醒 :">
814
+                      <el-radio-group v-model="templateForm.frequency_type">
815
+                        <el-radio :label="1">每次必推</el-radio>
816
+                        <el-radio :label="2">天数频率</el-radio>
817
+                        <el-radio :label="3">星期频率</el-radio>
818
+                      </el-radio-group>
819
+                    </el-form-item>
820
+                  </el-col>
821
+
822
+
823
+                  <el-col :span="12" v-if="templateForm.frequency_type == 2">
824
+                    <el-form-item prop="day_count">
825
+                      <el-input style="width: 50px" v-model="templateForm.day_count"></el-input>&nbsp;
826
+                      天/一次
827
+                    </el-form-item>
828
+                  </el-col>
829
+
830
+                  <el-col :span="24" v-if="templateForm.frequency_type == 3">
831
+                    <el-form-item >
832
+                      <el-checkbox-group v-model="templateForm.weekday">
833
+                        <el-checkbox label="周一" name="type"></el-checkbox>
834
+                        <el-checkbox label="周二" name="type"></el-checkbox>
835
+                        <el-checkbox label="周三" name="type"></el-checkbox>
836
+                        <el-checkbox label="周四" name="type"></el-checkbox>
837
+                        <el-checkbox label="周五" name="type"></el-checkbox>
838
+                        <el-checkbox label="周六" name="type"></el-checkbox>
839
+                        <el-checkbox label="周日" name="type"></el-checkbox>
840
+                      </el-checkbox-group>
841
+                    </el-form-item>
842
+                  </el-col>
708 843
                 </el-row>
844
+
845
+
709 846
               </el-form>
710 847
               <div slot="footer" class="dialog-footer">
711 848
                 <el-button @click="cancelHandleTwo">取消</el-button>
@@ -1033,6 +1170,8 @@
1033 1170
     components: { BreadCrumb },
1034 1171
     data() {
1035 1172
       return {
1173
+        day_count: '',
1174
+
1036 1175
         crumbs: [
1037 1176
           { path: false, name: '数据字典' },
1038 1177
           { path: 'data/druguse', name: '医嘱模版' }
@@ -1103,6 +1242,9 @@
1103 1242
           advice_name: [{ required: true, message: '请填写医嘱内容' }]
1104 1243
         },
1105 1244
         templateForm: {
1245
+          frequency_type: 1,
1246
+          day_count: '',
1247
+          weekday: [],
1106 1248
           drug_spec: '',
1107 1249
           drug_spec_unit: '',
1108 1250
           advice_name: '',
@@ -1117,6 +1259,10 @@
1117 1259
         },
1118 1260
 
1119 1261
         templateFormEdit: {
1262
+          frequency_type: '',
1263
+          day_count: '',
1264
+          weekday: [],
1265
+          week_days:'',
1120 1266
           drug_spec: '',
1121 1267
           drug_spec_unit: '',
1122 1268
           advice_name: '',
@@ -1139,7 +1285,7 @@
1139 1285
         },
1140 1286
         form: {
1141 1287
           name: '',
1142
-          advice_type: '0'
1288
+          advice_type: 0
1143 1289
 
1144 1290
         },
1145 1291
         drugwayForm: {
@@ -1225,6 +1371,7 @@
1225 1371
         }
1226 1372
       },
1227 1373
       handleCreateTemplate() {
1374
+        this.form.advice_type = 0
1228 1375
         this.templateTableVisible = true
1229 1376
       },
1230 1377
       newRecordAction() {
@@ -1235,6 +1382,7 @@
1235 1382
         this.isAddChild = false
1236 1383
         this.templateTableVisible = false
1237 1384
         this.templateFormVisible = true
1385
+
1238 1386
       }, deleteRecordAction: function() {
1239 1387
         if (this.table_current_index == -1) {
1240 1388
           this.$message.error('请选择一条医嘱记录')
@@ -1262,12 +1410,12 @@
1262 1410
         }
1263 1411
 
1264 1412
         this.isEdit = true
1265
-
1266 1413
         const adviceTable = this.adviceTableData[this.table_current_index]
1267
-
1268 1414
         for (var index in adviceTable) {
1269 1415
           this.templateForm[index] = adviceTable[index]
1270 1416
         }
1417
+        this.templateForm.weekday = adviceTable.weekdays.split(',')
1418
+
1271 1419
         this.templateFormVisible = true
1272 1420
         this.templateTableVisible = false
1273 1421
         this.dialogTitle = '编辑医嘱内容'
@@ -1280,7 +1428,6 @@
1280 1428
         }).then(() => {
1281 1429
           this.adviceTableData = []
1282 1430
           this.form.name = ''
1283
-          this.form.advice_type = ''
1284 1431
           this.templateFormVisible = false
1285 1432
           this.templateTableVisible = false
1286 1433
         }).catch(() => {
@@ -1317,7 +1464,6 @@
1317 1464
             this.handleSpanTempArr()
1318 1465
 
1319 1466
             this.form.name = ''
1320
-            this.form.advice_type = ''
1321 1467
             this.adviceTableData = []
1322 1468
             this.templateFormVisible = false
1323 1469
             this.templateTableVisible = false
@@ -1432,6 +1578,9 @@
1432 1578
           if (isNaN(this.templateForm.prescribing_number)) {
1433 1579
             this.templateForm.prescribing_number = 0
1434 1580
           }
1581
+
1582
+
1583
+
1435 1584
           if (valid) {
1436 1585
             const templateFormTwo = {}
1437 1586
             templateFormTwo.template_id = this.current_template_id
@@ -1487,6 +1636,7 @@
1487 1636
                 }
1488 1637
               })
1489 1638
             } else {
1639
+
1490 1640
               const templateFormTwo = {}
1491 1641
               templateFormTwo.advice_name = this.templateForm.advice_name
1492 1642
               templateFormTwo.advice_desc = this.templateForm.advice_desc
@@ -1500,6 +1650,33 @@
1500 1650
               templateFormTwo.execution_frequency = this.templateForm.execution_frequency
1501 1651
               templateFormTwo.parent_id = this.parent_id
1502 1652
 
1653
+              if(this.templateForm.frequency_type == 1){
1654
+                templateFormTwo.frequency_type = this.templateForm.frequency_type
1655
+                templateFormTwo.day_count = '0'
1656
+                templateFormTwo.weekdays = ''
1657
+
1658
+              }else if(this.templateForm.frequency_type == 2){
1659
+
1660
+                templateFormTwo.frequency_type = this.templateForm.frequency_type
1661
+                templateFormTwo.day_count = this.templateForm.day_count
1662
+                templateFormTwo.weekdays = ''
1663
+
1664
+              }else if(this.templateForm.frequency_type == 3){
1665
+                templateFormTwo.frequency_type = this.templateForm.frequency_type
1666
+                templateFormTwo.day_count = '0'
1667
+                templateFormTwo.weekdays = this.templateForm.weekday.filter(function (s) {
1668
+                  return s && s.trim();
1669
+                }).join(',')
1670
+
1671
+              }
1672
+
1673
+              this.templateForm.advice_name = ""
1674
+              this.templateForm.advice_desc = ""
1675
+              this.templateForm.frequency_type = 1
1676
+              this.templateForm.day_count = ''
1677
+              this.templateForm.weekday = []
1678
+
1679
+              console.log(templateFormTwo)
1503 1680
               if (this.isEdit) {
1504 1681
                 for (let i = 0; i < this.adviceTableData.length; i++) {
1505 1682
                   if (i == this.table_current_index) {
@@ -1513,10 +1690,14 @@
1513 1690
                     this.adviceTableData[i].prescribing_number_unit = templateFormTwo.prescribing_number_unit
1514 1691
                     this.adviceTableData[i].delivery_way = templateFormTwo.delivery_way
1515 1692
                     this.adviceTableData[i].execution_frequency = templateFormTwo.execution_frequency
1693
+                    this.adviceTableData[i].frequency_type = templateFormTwo.frequency_type
1694
+                    this.adviceTableData[i].day_count = templateFormTwo.day_count
1695
+                    this.adviceTableData[i].weekdays = templateFormTwo.weekdays
1516 1696
                   }
1517 1697
                 }
1518 1698
               } else {
1519 1699
                 this.adviceTableData.unshift(templateFormTwo)
1700
+                console.log(this.adviceTableData)
1520 1701
               }
1521 1702
               this.templateFormVisible = false
1522 1703
               this.templateTableVisible = true
@@ -1752,6 +1933,24 @@
1752 1933
             this.templateFormEdit.prescribing_number = 0
1753 1934
           }
1754 1935
           if (valid) {
1936
+            console.log(this.templateFormEdit)
1937
+
1938
+            if(this.templateFormEdit.frequency_type == 1 ){
1939
+
1940
+              this.templateFormEdit.day_count = 0
1941
+              this.templateFormEdit.week_days = ''
1942
+
1943
+            }else if(this.templateFormEdit.frequency_type == 2){
1944
+              this.templateFormEdit.day_count = parseInt(this.templateFormEdit.day_count)
1945
+              this.templateFormEdit.week_days = ''
1946
+
1947
+            }else if(this.templateFormEdit.frequency_type == 3){
1948
+              this.templateFormEdit.day_count = 0
1949
+              this.templateFormEdit.week_days = this.templateFormEdit.weekday.filter(function (s) {
1950
+                return s && s.trim();
1951
+              }).join(',')
1952
+            }
1953
+
1755 1954
             UpdateAdviceTemplate(this.templateFormEdit.id, this.templateFormEdit).then(
1756 1955
               response => {
1757 1956
                 if (response.data.state == 0) {
@@ -1772,6 +1971,9 @@
1772 1971
                   this.adviceTemplates[this.currentIndex].execution_frequency = template.execution_frequency
1773 1972
                   this.adviceTemplates[this.currentIndex].prescribing_number = template.prescribing_number
1774 1973
                   this.adviceTemplates[this.currentIndex].prescribing_number_unit = template.prescribing_number_unit
1974
+                  this.adviceTemplates[this.currentIndex].day_count = template.day_count
1975
+                  this.adviceTemplates[this.currentIndex].week_days = template.week_days
1976
+                  this.adviceTemplates[this.currentIndex].frequency_type = template.frequency_type
1775 1977
                   this.currentIndex = -1
1776 1978
                   return false
1777 1979
                 }
@@ -1866,6 +2068,20 @@
1866 2068
         this.templateFormTwoVisible = false
1867 2069
       }, submitTemplateTwo(formName) {
1868 2070
         this.templateForm['template_id'] = this.current_template_id
2071
+        this.templateForm['advice_type'] = this.form.advice_type
2072
+
2073
+        if(this.templateForm.frequency_type == 1 ){
2074
+          this.templateForm.day_count = 0
2075
+          this.templateForm.week_days = ''
2076
+        }else if(this.templateForm.frequency_type == 2){
2077
+          this.templateForm.day_count = parseInt(this.templateForm.day_count)
2078
+          this.templateForm.week_days = ''
2079
+        }else if(this.templateForm.frequency_type == 3){
2080
+          this.templateForm.day_count = 0
2081
+          this.templateForm.week_days = this.templateForm.weekday.filter(function (s) {
2082
+            return s && s.trim();
2083
+          }).join(',')
2084
+        }
1869 2085
         CreateSingleAdviceTemplate(this.templateForm).then(response => {
1870 2086
           if (response.data.state == 0) {
1871 2087
             this.$message.error(response.data.msg)
@@ -1879,15 +2095,17 @@
1879 2095
             objects['name'] = this.current_template_name
1880 2096
             objects['isNoSub'] = 2
1881 2097
 
1882
-            this.adviceTableDataTwo.unshift(response.data.data.template)
1883
-            // this.adviceTemplates.unshift(objects)
1884
-            // this.handleSpanTempArr()
1885 2098
 
2099
+
2100
+            this.adviceTableDataTwo.unshift(response.data.data.template)
1886 2101
             this.getAdviceConfig()
1887 2102
             this.resetForm(formName)
1888 2103
             this.templateFormTwoVisible = false
1889
-
1890 2104
             this.$message.success('添加成功')
2105
+            this.templateForm.day_count = ''
2106
+            this.templateForm.weekday = []
2107
+            this.templateForm.frequency_type = 1
2108
+
1891 2109
 
1892 2110
             return false
1893 2111
           }
@@ -1952,7 +2170,7 @@
1952 2170
           }
1953 2171
         })
1954 2172
       }, merge({ row, column, rowIndex, columnIndex }) {
1955
-        if (columnIndex === 0 || columnIndex === 1 || columnIndex === 8) {
2173
+        if (columnIndex === 0 || columnIndex === 1 || columnIndex === 9) {
1956 2174
           const _row = this.tempArr[rowIndex]
1957 2175
           const _col = _row > 0 ? 1 : 0
1958 2176
           return {
@@ -1986,6 +2204,7 @@
1986 2204
       }, cellMouseLeave: function(row, column, cell, event) {
1987 2205
         this.hoverOrderArr = []
1988 2206
       }, openEdit(index, row) {
2207
+        console.log(row)
1989 2208
         this.hoverOrderArr = []
1990 2209
         this.currentIndex = index
1991 2210
         this.templateFormEdit.drug_spec_unit = row.drug_spec_unit
@@ -2000,6 +2219,10 @@
2000 2219
         this.templateFormEdit.single_dose_unit = row.single_dose_unit
2001 2220
         this.templateFormEdit.id = row.id
2002 2221
         this.templateFormEdit.parent_id = row.parent_id
2222
+        this.templateFormEdit.day_count = row.day_count
2223
+        this.templateFormEdit.frequency_type = row.frequency_type
2224
+        this.templateFormEdit.weekday = row.week_days.split(",")
2225
+
2003 2226
         this.templateEditFormVisible = true
2004 2227
         if (row.parent_id > 0) {
2005 2228
           this.editDialogTitle = '编辑子药'
@@ -2175,6 +2398,7 @@
2175 2398
         this.current_template_id = row.template_id
2176 2399
         this.current_template_name = row.name
2177 2400
         this.form.name = row.name
2401
+        this.form.advice_type = row.advice_type
2178 2402
         this.templateTableTwoVisible = true
2179 2403
         this.adviceTableDataTwo = []
2180 2404
         for (let i = 0; i < this.adviceTemplates.length; i++) {

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

@@ -4,8 +4,8 @@
4 4
       <el-form ref="groupForm" :rules="groupRules" :model="groupForm" label-width="90px">
5 5
         <el-row>
6 6
           <el-col :span="12">
7
-            <el-form-item label="医嘱类型 :" required prop="advice_type">
8
-              <el-select v-model="groupForm.advice_type" placeholder="请选择">
7
+            <el-form-item label="医嘱类型 :" >
8
+              <el-select v-model="groupForm.advice_type" placeholder="请选择" disabled>
9 9
                 <el-option
10 10
                   :label="item.label"
11 11
                   :key="item.value"
@@ -19,14 +19,17 @@
19 19
             <el-form-item label="开始时间 :" required prop="start_time">
20 20
               <el-date-picker
21 21
                 type="datetime"
22
-                format="yyyy-MM-dd HH:mm:ss"
23
-                value-format="yyyy-MM-dd HH:mm:ss"
22
+                format="yyyy-MM-dd HH:mm"
23
+                value-format="yyyy-MM-dd HH:mm"
24 24
                 placeholder="选择时间"
25 25
                 v-model="groupForm.start_time"
26 26
               ></el-date-picker>
27 27
             </el-form-item>
28 28
           </el-col>
29 29
         </el-row>
30
+
31
+
32
+
30 33
         <el-row>
31 34
           <el-col :span="12">
32 35
             <el-form-item label="开嘱医生 :">
@@ -41,14 +44,15 @@
41 44
         </el-row>
42 45
         <el-row style="margin-bottom: 20px">
43 46
           <el-col :span="2">&nbsp;</el-col>
44
-          <el-col :span="5">
45
-            <el-button
46
-              :disabled="$store.getters.xt_user.subscibe.state==3?true:false"
47
-              @click="openAdviceTemplate()"
48
-              round
49
-            >选择医嘱模板
50
-            </el-button>
51
-          </el-col>
47
+          <!--<el-col :span="5">-->
48
+            <!--<el-button-->
49
+              <!--:disabled="$store.getters.xt_user.subscibe.state==3?true:false"-->
50
+              <!--@click="openAdviceTemplate()"-->
51
+              <!--round-->
52
+              <!---->
53
+            <!--&gt;选择医嘱模板-->
54
+            <!--</el-button>-->
55
+          <!--</el-col>-->
52 56
 
53 57
           <el-col :span="5">
54 58
             <el-button
@@ -102,16 +106,7 @@
102 106
                 label="规格"
103 107
                 property="advice_desc"
104 108
               ></el-table-column>
105
-              <!-- <el-table-column label="药品规格*数量" min-width="80" property="drug_spec" align="center">
106
-                <template slot-scope="scope">
107
-                  <span
108
-                    v-if="scope.row.drug_spec!=0"
109
-                  >{{scope.row.drug_spec}}{{scope.row.drug_spec_unit}}</span>
110
-                  <span
111
-                    v-if="scope.row.prescribing_number!=0"
112
-                  >*{{scope.row.prescribing_number}}{{scope.row.prescribing_number_unit}}</span>
113
-                </template>
114
-              </el-table-column> -->
109
+
115 110
               <el-table-column label="开药数量" min-width="80" property="prescribing_number" align="center">
116 111
                 <template slot-scope="scope">
117 112
                   <span
@@ -141,6 +136,16 @@
141 136
                   <span v-if="scope.row.parent_row==0">{{scope.row.execution_frequency}}</span>
142 137
                 </template>
143 138
               </el-table-column>
139
+
140
+
141
+              <el-table-column label="提醒频率" min-width="80" property="execution_frequency" align="center">
142
+                <template slot-scope="scope">
143
+                  <span v-if="scope.row.frequency_type == 1">每次必推</span>
144
+                  <span v-if="scope.row.frequency_type == 2">{{scope.row.day_count}}天/1次</span>
145
+                  <span v-if="scope.row.frequency_type == 3">每周{{scope.row.week_day}}</span>
146
+                </template>
147
+              </el-table-column>
148
+
144 149
             </el-table>
145 150
           </el-col>
146 151
         </el-row>
@@ -397,6 +402,42 @@
397 402
               </el-select>
398 403
             </el-form-item>
399 404
           </el-col>
405
+
406
+
407
+          <el-col :span="24" v-if="groupForm.advice_type == 1&&!isChild">
408
+            <el-form-item label="周期提醒 :">
409
+              <el-radio-group v-model="nameForm.frequency_type">
410
+                <el-radio :label="1">每次必推</el-radio>
411
+                <el-radio :label="2">天数频率</el-radio>
412
+                <el-radio :label="3">星期频率</el-radio>
413
+              </el-radio-group>
414
+            </el-form-item>
415
+          </el-col>
416
+
417
+
418
+          <el-col :span="12" v-if="nameForm.frequency_type == 2">
419
+            <el-form-item prop="day_count">
420
+              <el-input style="width: 50px" v-model="nameForm.day_count"></el-input>&nbsp;
421
+              天/一次
422
+            </el-form-item>
423
+          </el-col>
424
+
425
+          <el-col :span="24" v-if="nameForm.frequency_type == 3">
426
+            <el-form-item prop="weekday">
427
+              <el-checkbox-group v-model="weeks">
428
+                <el-checkbox label="周一" name="type"></el-checkbox>
429
+                <el-checkbox label="周二" name="type"></el-checkbox>
430
+                <el-checkbox label="周三" name="type"></el-checkbox>
431
+                <el-checkbox label="周四" name="type"></el-checkbox>
432
+                <el-checkbox label="周五" name="type"></el-checkbox>
433
+                <el-checkbox label="周六" name="type"></el-checkbox>
434
+                <el-checkbox label="周日" name="type"></el-checkbox>
435
+              </el-checkbox-group>
436
+            </el-form-item>
437
+          </el-col>
438
+
439
+
440
+
400 441
         </el-row>
401 442
       </el-form>
402 443
       <div slot="footer" class="dialog-footer">
@@ -430,6 +471,7 @@
430 471
     name: 'EditGroupAdvice',
431 472
     data() {
432 473
       return {
474
+        weeks:[],
433 475
         editRowKey: 0,
434 476
         templateFormVisible: false,
435 477
         oldTemplateFormVisible: false,
@@ -495,6 +537,17 @@
495 537
           return []
496 538
         }
497 539
       },
540
+      weekList: [
541
+        { id: 1, name: '周一' },
542
+        { id: 2, name: '周二' },
543
+        { id: 3, name: '周三' },
544
+        { id: 4, name: '周四' },
545
+        { id: 5, name: '周五' },
546
+        { id: 6, name: '周六' },
547
+        { id: 7, name: '周日' }
548
+
549
+      ],
550
+      weekday:[],
498 551
       groupFormVisible: false,
499 552
       groupForm: {
500 553
         advice_type: "",
@@ -504,6 +557,10 @@
504 557
         advice_doctor: "",
505 558
         remark: "",
506 559
         parent_id: 0,
560
+        remind:0,
561
+        frequency_type:0,
562
+        day_count:'',
563
+
507 564
       },
508 565
       adviceTypeOptions: {
509 566
         type: Array,
@@ -643,7 +700,6 @@
643 700
                 start_time: _this.groupForm.start_time,
644 701
                 advice_name: _this.nameForm.advice_name,
645 702
                 advice_desc: _this.nameForm.advice_desc,
646
-
647 703
                 single_dose: '' + _this.nameForm.single_dose,
648 704
                 single_dose_unit: _this.nameForm.single_dose_unit,
649 705
                 drug_spec: '' + _this.nameForm.drug_spec,
@@ -658,6 +714,11 @@
658 714
                 remark: _this.groupForm.remark,
659 715
                 parent_id: _this.groupSelectRow.parent_id,
660 716
                 groupno: _this.groupForm.groupno,
717
+                frequency_type: _this.nameForm.frequency_type,
718
+                day_count:_this.nameForm.day_count.toString(),
719
+                week_days:this.weeks.filter(function(s) {
720
+                  return s && s.trim()
721
+                }).join(','),
661 722
               };
662 723
               EditDoctorAdvice(this.patientID, this.groupSelectRow.id, submitForm).then(response => {
663 724
                 if (response.data.state == 0) {
@@ -672,7 +733,7 @@
672 733
                   });
673 734
                   var ale = _this.groupForm.adviceNames.length;
674 735
                   var atle = _this.adviceTableData.length;
675
-
736
+                  this.weeks = []
676 737
                   for (let index = 0; index < atle; index++) {
677 738
                     if (_this.groupSelectRow.id == _this.adviceTableData[index].id) {
678 739
                       var advice = response.data.data.advice;
@@ -687,6 +748,11 @@
687 748
                       _this.adviceTableData[index].execution_frequency = advice.execution_frequency;
688 749
                       _this.adviceTableData[index].prescribing_number = advice.prescribing_number;
689 750
                       _this.adviceTableData[index].prescribing_number_unit = advice.prescribing_number_unit;
751
+
752
+                      _this.adviceTableData[index].frequency_type = advice.frequency_type;
753
+                      _this.adviceTableData[index].day_count = advice.day_count;
754
+                      _this.adviceTableData[index].week_day = advice.week_day;
755
+
690 756
                       break;
691 757
                     }
692 758
                   }
@@ -728,6 +794,13 @@
728 794
                         _this.groupForm.adviceNames[index].delivery_way = _this.nameForm.delivery_way;
729 795
                         _this.groupForm.adviceNames[index].execution_frequency = _this.nameForm.execution_frequency;
730 796
 
797
+
798
+                        _this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type;
799
+                        _this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count;
800
+                        _this.groupForm.adviceNames[index].week_day = _this.nameForm.week_day;
801
+
802
+
803
+
731 804
                         _this.$set(_this.groupForm.adviceNames, index, _this.groupForm.adviceNames[index]);
732 805
                         break;
733 806
                       }
@@ -808,6 +881,9 @@
808 881
                 });
809 882
 
810 883
               } else {
884
+                _this.nameForm.week_days= this.weeks.filter(function(s) {
885
+                  return s && s.trim()
886
+                }).join(',')
811 887
                 _this.submitGroupForm = {
812 888
                   advice_type: _this.groupForm.advice_type,
813 889
                   advice_date: _this.groupForm.advice_date,
@@ -824,6 +900,11 @@
824 900
                       prescribing_number_unit: _this.nameForm.prescribing_number_unit,
825 901
                       delivery_way: _this.nameForm.delivery_way,
826 902
                       execution_frequency: _this.nameForm.execution_frequency,
903
+
904
+                      frequency_type: _this.nameForm.frequency_type,
905
+                      day_count: _this.nameForm.day_count.toString(),
906
+                      week_days: _this.nameForm.week_days,
907
+
827 908
                       isEdit: 0,
828 909
                       id: 0,
829 910
                       children: [],
@@ -834,6 +915,9 @@
834 915
                   remark: _this.groupForm.remark,
835 916
                   parent_id: 0,
836 917
                 };
918
+
919
+
920
+
837 921
                 CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm).then(response => {
838 922
                   if (response.data.state == 0) {
839 923
                     _this.$message.error(response.data.msg);
@@ -845,6 +929,7 @@
845 929
                       type: "success",
846 930
                       duration: 2000
847 931
                     });
932
+                    this.weeks = []
848 933
                     if (_this.adviceType == _this.groupForm.advice_type || _this.adviceType == 0) {
849 934
 
850 935
                       // var alen = response.data.data.advices.length
@@ -907,6 +992,11 @@
907 992
                           prescribing_number_unit: groups[index].prescribing_number_unit,
908 993
                           delivery_way: groups[index].delivery_way,
909 994
                           execution_frequency: groups[index].execution_frequency,
995
+
996
+                          frequency_type: groups[index].frequency_type,
997
+                          day_count: groups[index].day_count,
998
+                          week_day: groups[index].week_day,
999
+
910 1000
                           isEdit: 0,
911 1001
                           index: 0,
912 1002
                           id: groups[index].id,
@@ -1016,8 +1106,14 @@
1016 1106
             id: this.groupSelectRow.id,
1017 1107
             children: [],
1018 1108
             parent_row: this.groupSelectRow.parent_row,
1019
-            // row_key:this.groupSelectRow.row_key,
1109
+
1110
+            day_count: this.groupSelectRow.day_count,
1111
+            week_days: this.groupSelectRow.week_day,
1112
+            frequency_type: this.groupSelectRow.frequency_type
1113
+
1020 1114
           };
1115
+          console.log( this.groupSelectRow)
1116
+          this.weeks = this.groupSelectRow.week_day.split(",")
1021 1117
           this.nameFormTitle = '修改医嘱内容';
1022 1118
         } else {
1023 1119
           this.nameForm = {
@@ -1036,6 +1132,9 @@
1036 1132
             id: 0,
1037 1133
             children: [],
1038 1134
             parent_row: 0,
1135
+            day_count: '',
1136
+            week_days: '',
1137
+            frequency_type: '',
1039 1138
           };
1040 1139
           this.nameFormTitle = '新增医嘱内容';
1041 1140
         }

+ 21 - 21
src/xt_pages/user/components/PatientForm.vue 查看文件

@@ -975,27 +975,27 @@
975 975
               this.form.age = parseInt(this.form.age)
976 976
               createPatient(this.form)
977 977
                 .then(response => {
978
-                  // if (response.data.state == 0) {
979
-                  //   this.$message.error(response.data.msg)
980
-                  //   this.formSubmit = true
981
-                  //   return false
982
-                  // } else {
983
-                  //   this.formSubmit = true
984
-                  //   this.$notify({
985
-                  //     title: '成功',
986
-                  //     message: this.submitMsg,
987
-                  //     type: 'success',
988
-                  //     duration: 2000
989
-                  //   })
990
-                  //   this.$refs[formName].resetFields()
991
-                  //   this.$store.dispatch('SetSubscibePatients')
992
-                  //   var sub = this.$store.getters.xt_user.subscibe
993
-                  //   console.log(sub)
994
-                  //   if (action !== 'renew') {
995
-                  //     this.$router.back(-1)
996
-                  //   }
997
-                  //   return false
998
-                  // }
978
+                  if (response.data.state == 0) {
979
+                    this.$message.error(response.data.msg)
980
+                    this.formSubmit = true
981
+                    return false
982
+                  } else {
983
+                    this.formSubmit = true
984
+                    this.$notify({
985
+                      title: '成功',
986
+                      message: this.submitMsg,
987
+                      type: 'success',
988
+                      duration: 2000
989
+                    })
990
+                    this.$refs[formName].resetFields()
991
+                    this.$store.dispatch('SetSubscibePatients')
992
+                    var sub = this.$store.getters.xt_user.subscibe
993
+                    console.log(sub)
994
+                    if (action !== 'renew') {
995
+                      this.$router.back(-1)
996
+                    }
997
+                    return false
998
+                  }
999 999
                 })
1000 1000
                 .catch(err => {
1001 1001
                   this.$message.error('网络异常')

文件差异内容过多而无法显示
+ 3261 - 2894
src/xt_pages/user/doctorAdvice.vue


+ 4 - 3
src/xt_pages/user/inspection.vue 查看文件

@@ -86,8 +86,8 @@
86 86
 
87 87
       <el-form :model="form"  ref="form" label-position="top">
88 88
 
89
-        <el-row v-if="form.formItem[0].project_id == 14">
90
-          <el-col :span="24">
89
+        <el-row >
90
+          <el-col :span="24" v-if="form.formItem[0].project_id == 14">
91 91
             <el-form-item label="传染病周期提醒: " >
92 92
               <el-radio-group v-model="form.remind_cycle">
93 93
                 <el-radio :label="1">一月一次</el-radio>
@@ -304,6 +304,7 @@ export default {
304 304
           select_options: this.project.inspection_reference[index].range_options.split(","),
305 305
           unit: this.project.inspection_reference[index].unit,
306 306
         });
307
+
307 308
       }
308 309
 
309 310
       this.dialogFormVisible = true;
@@ -550,7 +551,7 @@ export default {
550 551
                 var range_max = parseFloat(item.range_max);
551 552
                 if (value < range_min) {
552 553
                   item.value_direction = "↓";
553
-                }else if (value > range_max) {
554
+                } else if (value > range_max) {
554 555
                   item.value_direction = "↑";
555 556
                 }
556 557
               }