Browse Source

新功能

csx 5 years ago
parent
commit
07a398dc96

+ 1 - 1
config/index.js View File

20
     // host: 'xt.test.sgjyun.com',
20
     // host: 'xt.test.sgjyun.com',
21
     // host: 'xt.kuyicloud.com',
21
     // host: 'xt.kuyicloud.com',
22
     host: 'xt.test.sgjyun.com',
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
     autoOpenBrowser: true,
24
     autoOpenBrowser: true,
25
     errorOverlay: true,
25
     errorOverlay: true,
26
     notifyOnErrors: false,
26
     notifyOnErrors: false,

+ 15 - 4
src/api/advice.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
-export function getAdviceConfig(){
3
+export function getAdviceConfig(type){
4
     return request({
4
     return request({
5
-        url:'/api/getadviceconfigs',
5
+        url:'/api/getadviceconfigs?type='+type,
6
         method:'get',
6
         method:'get',
7
     })
7
     })
8
 }
8
 }
197
 }
197
 }
198
 
198
 
199
 export function CreateGroupAdvice(id, groupno, advices){
199
 export function CreateGroupAdvice(id, groupno, advices){
200
-  return request({
200
+  if(advices.remind > 0){
201
+    return request({
201
       url:'/api/patients/advice/creategroup?id='+id + '&groupno=' + groupno,
202
       url:'/api/patients/advice/creategroup?id='+id + '&groupno=' + groupno,
202
       method:'post',
203
       method:'post',
203
       data:advices,
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
 export function DeleteGroupAdvice(groupno){
217
 export function DeleteGroupAdvice(groupno){
207
   return request({
218
   return request({

+ 0 - 1
src/api/dialysis.js View File

244
 
244
 
245
 
245
 
246
 
246
 
247
-

+ 10 - 0
src/api/patient.js View File

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 View File

47
                 width="100"
47
                 width="100"
48
               >
48
               >
49
                 <template slot-scope="scope">
49
                 <template slot-scope="scope">
50
-                  <div>{{scope.row.advice_type == 1 ? "长期" : "临时"}}</div>
50
+                  <div>{{scope.row.advice_type == 1 ? '长期' : '临时'}}</div>
51
                 </template>
51
                 </template>
52
 
52
 
53
               </el-table-column>
53
               </el-table-column>
142
               </el-table-column>
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
               <el-table-column
153
               <el-table-column
146
                 align="center"
154
                 align="center"
147
                 label="操作"
155
                 label="操作"
184
 
192
 
185
                   <el-form-item label="模版类型" prop="advice_type">
193
                   <el-form-item label="模版类型" prop="advice_type">
186
                     <el-radio-group v-model="form.advice_type">
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
                     </el-radio-group>
197
                     </el-radio-group>
190
                   </el-form-item>
198
                   </el-form-item>
191
 
199
 
239
                     </template>
247
                     </template>
240
                   </el-table-column>
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
                 </el-table>
258
                 </el-table>
243
               </div>
259
               </div>
244
               <div slot="footer" class="dialog-footer">
260
               <div slot="footer" class="dialog-footer">
375
                       </el-select>
391
                       </el-select>
376
                     </el-form-item>
392
                     </el-form-item>
377
                   </el-col>
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
                 </el-row>
427
                 </el-row>
379
               </el-form>
428
               </el-form>
380
               <div slot="footer" class="dialog-footer">
429
               <div slot="footer" class="dialog-footer">
382
                 <el-button type="primary" @click="submitTemplate('templateForm')">保 存</el-button>
431
                 <el-button type="primary" @click="submitTemplate('templateForm')">保 存</el-button>
383
               </div>
432
               </div>
384
             </el-dialog>
433
             </el-dialog>
434
+            <!--TODO-->
435
+
436
+
385
             <el-dialog :title="editDialogTitle" :visible.sync="templateEditFormVisible" width="700px">
437
             <el-dialog :title="editDialogTitle" :visible.sync="templateEditFormVisible" width="700px">
386
               <el-form
438
               <el-form
387
                 ref="templateFormEdit"
439
                 ref="templateFormEdit"
510
                       </el-select>
562
                       </el-select>
511
                     </el-form-item>
563
                     </el-form-item>
512
                   </el-col>
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
                 </el-row>
600
                 </el-row>
514
               </el-form>
601
               </el-form>
515
               <div slot="footer" class="dialog-footer">
602
               <div slot="footer" class="dialog-footer">
555
                       {{scope.row.prescribing_number}}{{scope.row.prescribing_number_unit}}
642
                       {{scope.row.prescribing_number}}{{scope.row.prescribing_number_unit}}
556
                     </template>
643
                     </template>
557
                   </el-table-column>
644
                   </el-table-column>
558
-                  <el-table-column prop="pulse_frequency" align="center" label="单次用量">
645
+                  <el-table-column  align="center" label="单次用量">
559
                     <template slot-scope="scope" v-if="scope.row.single_dose != ''">
646
                     <template slot-scope="scope" v-if="scope.row.single_dose != ''">
560
                       {{scope.row.single_dose}}{{scope.row.single_dose_unit}}
647
                       {{scope.row.single_dose}}{{scope.row.single_dose_unit}}
561
                     </template>
648
                     </template>
562
 
649
 
563
                   </el-table-column>
650
                   </el-table-column>
564
-                  <el-table-column prop="breathing_rate" align="center" label="给药途径">
651
+                  <el-table-column  align="center" label="给药途径">
565
                     <template slot-scope="scope">
652
                     <template slot-scope="scope">
566
                       <span v-if="scope.row.parent_id == 0">{{scope.row.delivery_way}}</span>
653
                       <span v-if="scope.row.parent_id == 0">{{scope.row.delivery_way}}</span>
567
                     </template>
654
                     </template>
568
 
655
 
569
                   </el-table-column>
656
                   </el-table-column>
570
-                  <el-table-column prop="blood_flow_volume" align="center" label="执行频率">
657
+                  <el-table-column  align="center" label="执行频率">
571
                     <template slot-scope="scope">
658
                     <template slot-scope="scope">
572
                       <span v-if="scope.row.parent_id == 0">{{scope.row.execution_frequency}}</span>
659
                       <span v-if="scope.row.parent_id == 0">{{scope.row.execution_frequency}}</span>
573
                     </template>
660
                     </template>
574
                   </el-table-column>
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
                 </el-table>
670
                 </el-table>
576
               </div>
671
               </div>
577
               <div slot="footer" class="dialog-footer">
672
               <div slot="footer" class="dialog-footer">
579
                 <el-button type="primary" @click="modifyTemplateName">保 存</el-button>
674
                 <el-button type="primary" @click="modifyTemplateName">保 存</el-button>
580
               </div>
675
               </div>
581
             </el-dialog>
676
             </el-dialog>
677
+
678
+
679
+
680
+
681
+
682
+
582
             <el-dialog title="新增医嘱" :visible.sync="templateFormTwoVisible" width="700px">
683
             <el-dialog title="新增医嘱" :visible.sync="templateFormTwoVisible" width="700px">
583
               <el-form
684
               <el-form
584
                 ref="templateForm"
685
                 ref="templateForm"
705
                       </el-select>
806
                       </el-select>
706
                     </el-form-item>
807
                     </el-form-item>
707
                   </el-col>
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
                 </el-row>
843
                 </el-row>
844
+
845
+
709
               </el-form>
846
               </el-form>
710
               <div slot="footer" class="dialog-footer">
847
               <div slot="footer" class="dialog-footer">
711
                 <el-button @click="cancelHandleTwo">取消</el-button>
848
                 <el-button @click="cancelHandleTwo">取消</el-button>
1033
     components: { BreadCrumb },
1170
     components: { BreadCrumb },
1034
     data() {
1171
     data() {
1035
       return {
1172
       return {
1173
+        day_count: '',
1174
+
1036
         crumbs: [
1175
         crumbs: [
1037
           { path: false, name: '数据字典' },
1176
           { path: false, name: '数据字典' },
1038
           { path: 'data/druguse', name: '医嘱模版' }
1177
           { path: 'data/druguse', name: '医嘱模版' }
1103
           advice_name: [{ required: true, message: '请填写医嘱内容' }]
1242
           advice_name: [{ required: true, message: '请填写医嘱内容' }]
1104
         },
1243
         },
1105
         templateForm: {
1244
         templateForm: {
1245
+          frequency_type: 1,
1246
+          day_count: '',
1247
+          weekday: [],
1106
           drug_spec: '',
1248
           drug_spec: '',
1107
           drug_spec_unit: '',
1249
           drug_spec_unit: '',
1108
           advice_name: '',
1250
           advice_name: '',
1117
         },
1259
         },
1118
 
1260
 
1119
         templateFormEdit: {
1261
         templateFormEdit: {
1262
+          frequency_type: '',
1263
+          day_count: '',
1264
+          weekday: [],
1265
+          week_days:'',
1120
           drug_spec: '',
1266
           drug_spec: '',
1121
           drug_spec_unit: '',
1267
           drug_spec_unit: '',
1122
           advice_name: '',
1268
           advice_name: '',
1139
         },
1285
         },
1140
         form: {
1286
         form: {
1141
           name: '',
1287
           name: '',
1142
-          advice_type: '0'
1288
+          advice_type: 0
1143
 
1289
 
1144
         },
1290
         },
1145
         drugwayForm: {
1291
         drugwayForm: {
1225
         }
1371
         }
1226
       },
1372
       },
1227
       handleCreateTemplate() {
1373
       handleCreateTemplate() {
1374
+        this.form.advice_type = 0
1228
         this.templateTableVisible = true
1375
         this.templateTableVisible = true
1229
       },
1376
       },
1230
       newRecordAction() {
1377
       newRecordAction() {
1235
         this.isAddChild = false
1382
         this.isAddChild = false
1236
         this.templateTableVisible = false
1383
         this.templateTableVisible = false
1237
         this.templateFormVisible = true
1384
         this.templateFormVisible = true
1385
+
1238
       }, deleteRecordAction: function() {
1386
       }, deleteRecordAction: function() {
1239
         if (this.table_current_index == -1) {
1387
         if (this.table_current_index == -1) {
1240
           this.$message.error('请选择一条医嘱记录')
1388
           this.$message.error('请选择一条医嘱记录')
1262
         }
1410
         }
1263
 
1411
 
1264
         this.isEdit = true
1412
         this.isEdit = true
1265
-
1266
         const adviceTable = this.adviceTableData[this.table_current_index]
1413
         const adviceTable = this.adviceTableData[this.table_current_index]
1267
-
1268
         for (var index in adviceTable) {
1414
         for (var index in adviceTable) {
1269
           this.templateForm[index] = adviceTable[index]
1415
           this.templateForm[index] = adviceTable[index]
1270
         }
1416
         }
1417
+        this.templateForm.weekday = adviceTable.weekdays.split(',')
1418
+
1271
         this.templateFormVisible = true
1419
         this.templateFormVisible = true
1272
         this.templateTableVisible = false
1420
         this.templateTableVisible = false
1273
         this.dialogTitle = '编辑医嘱内容'
1421
         this.dialogTitle = '编辑医嘱内容'
1280
         }).then(() => {
1428
         }).then(() => {
1281
           this.adviceTableData = []
1429
           this.adviceTableData = []
1282
           this.form.name = ''
1430
           this.form.name = ''
1283
-          this.form.advice_type = ''
1284
           this.templateFormVisible = false
1431
           this.templateFormVisible = false
1285
           this.templateTableVisible = false
1432
           this.templateTableVisible = false
1286
         }).catch(() => {
1433
         }).catch(() => {
1317
             this.handleSpanTempArr()
1464
             this.handleSpanTempArr()
1318
 
1465
 
1319
             this.form.name = ''
1466
             this.form.name = ''
1320
-            this.form.advice_type = ''
1321
             this.adviceTableData = []
1467
             this.adviceTableData = []
1322
             this.templateFormVisible = false
1468
             this.templateFormVisible = false
1323
             this.templateTableVisible = false
1469
             this.templateTableVisible = false
1432
           if (isNaN(this.templateForm.prescribing_number)) {
1578
           if (isNaN(this.templateForm.prescribing_number)) {
1433
             this.templateForm.prescribing_number = 0
1579
             this.templateForm.prescribing_number = 0
1434
           }
1580
           }
1581
+
1582
+
1583
+
1435
           if (valid) {
1584
           if (valid) {
1436
             const templateFormTwo = {}
1585
             const templateFormTwo = {}
1437
             templateFormTwo.template_id = this.current_template_id
1586
             templateFormTwo.template_id = this.current_template_id
1487
                 }
1636
                 }
1488
               })
1637
               })
1489
             } else {
1638
             } else {
1639
+
1490
               const templateFormTwo = {}
1640
               const templateFormTwo = {}
1491
               templateFormTwo.advice_name = this.templateForm.advice_name
1641
               templateFormTwo.advice_name = this.templateForm.advice_name
1492
               templateFormTwo.advice_desc = this.templateForm.advice_desc
1642
               templateFormTwo.advice_desc = this.templateForm.advice_desc
1500
               templateFormTwo.execution_frequency = this.templateForm.execution_frequency
1650
               templateFormTwo.execution_frequency = this.templateForm.execution_frequency
1501
               templateFormTwo.parent_id = this.parent_id
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
               if (this.isEdit) {
1680
               if (this.isEdit) {
1504
                 for (let i = 0; i < this.adviceTableData.length; i++) {
1681
                 for (let i = 0; i < this.adviceTableData.length; i++) {
1505
                   if (i == this.table_current_index) {
1682
                   if (i == this.table_current_index) {
1513
                     this.adviceTableData[i].prescribing_number_unit = templateFormTwo.prescribing_number_unit
1690
                     this.adviceTableData[i].prescribing_number_unit = templateFormTwo.prescribing_number_unit
1514
                     this.adviceTableData[i].delivery_way = templateFormTwo.delivery_way
1691
                     this.adviceTableData[i].delivery_way = templateFormTwo.delivery_way
1515
                     this.adviceTableData[i].execution_frequency = templateFormTwo.execution_frequency
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
               } else {
1698
               } else {
1519
                 this.adviceTableData.unshift(templateFormTwo)
1699
                 this.adviceTableData.unshift(templateFormTwo)
1700
+                console.log(this.adviceTableData)
1520
               }
1701
               }
1521
               this.templateFormVisible = false
1702
               this.templateFormVisible = false
1522
               this.templateTableVisible = true
1703
               this.templateTableVisible = true
1752
             this.templateFormEdit.prescribing_number = 0
1933
             this.templateFormEdit.prescribing_number = 0
1753
           }
1934
           }
1754
           if (valid) {
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
             UpdateAdviceTemplate(this.templateFormEdit.id, this.templateFormEdit).then(
1954
             UpdateAdviceTemplate(this.templateFormEdit.id, this.templateFormEdit).then(
1756
               response => {
1955
               response => {
1757
                 if (response.data.state == 0) {
1956
                 if (response.data.state == 0) {
1772
                   this.adviceTemplates[this.currentIndex].execution_frequency = template.execution_frequency
1971
                   this.adviceTemplates[this.currentIndex].execution_frequency = template.execution_frequency
1773
                   this.adviceTemplates[this.currentIndex].prescribing_number = template.prescribing_number
1972
                   this.adviceTemplates[this.currentIndex].prescribing_number = template.prescribing_number
1774
                   this.adviceTemplates[this.currentIndex].prescribing_number_unit = template.prescribing_number_unit
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
                   this.currentIndex = -1
1977
                   this.currentIndex = -1
1776
                   return false
1978
                   return false
1777
                 }
1979
                 }
1866
         this.templateFormTwoVisible = false
2068
         this.templateFormTwoVisible = false
1867
       }, submitTemplateTwo(formName) {
2069
       }, submitTemplateTwo(formName) {
1868
         this.templateForm['template_id'] = this.current_template_id
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
         CreateSingleAdviceTemplate(this.templateForm).then(response => {
2085
         CreateSingleAdviceTemplate(this.templateForm).then(response => {
1870
           if (response.data.state == 0) {
2086
           if (response.data.state == 0) {
1871
             this.$message.error(response.data.msg)
2087
             this.$message.error(response.data.msg)
1879
             objects['name'] = this.current_template_name
2095
             objects['name'] = this.current_template_name
1880
             objects['isNoSub'] = 2
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
             this.getAdviceConfig()
2101
             this.getAdviceConfig()
1887
             this.resetForm(formName)
2102
             this.resetForm(formName)
1888
             this.templateFormTwoVisible = false
2103
             this.templateFormTwoVisible = false
1889
-
1890
             this.$message.success('添加成功')
2104
             this.$message.success('添加成功')
2105
+            this.templateForm.day_count = ''
2106
+            this.templateForm.weekday = []
2107
+            this.templateForm.frequency_type = 1
2108
+
1891
 
2109
 
1892
             return false
2110
             return false
1893
           }
2111
           }
1952
           }
2170
           }
1953
         })
2171
         })
1954
       }, merge({ row, column, rowIndex, columnIndex }) {
2172
       }, merge({ row, column, rowIndex, columnIndex }) {
1955
-        if (columnIndex === 0 || columnIndex === 1 || columnIndex === 8) {
2173
+        if (columnIndex === 0 || columnIndex === 1 || columnIndex === 9) {
1956
           const _row = this.tempArr[rowIndex]
2174
           const _row = this.tempArr[rowIndex]
1957
           const _col = _row > 0 ? 1 : 0
2175
           const _col = _row > 0 ? 1 : 0
1958
           return {
2176
           return {
1986
       }, cellMouseLeave: function(row, column, cell, event) {
2204
       }, cellMouseLeave: function(row, column, cell, event) {
1987
         this.hoverOrderArr = []
2205
         this.hoverOrderArr = []
1988
       }, openEdit(index, row) {
2206
       }, openEdit(index, row) {
2207
+        console.log(row)
1989
         this.hoverOrderArr = []
2208
         this.hoverOrderArr = []
1990
         this.currentIndex = index
2209
         this.currentIndex = index
1991
         this.templateFormEdit.drug_spec_unit = row.drug_spec_unit
2210
         this.templateFormEdit.drug_spec_unit = row.drug_spec_unit
2000
         this.templateFormEdit.single_dose_unit = row.single_dose_unit
2219
         this.templateFormEdit.single_dose_unit = row.single_dose_unit
2001
         this.templateFormEdit.id = row.id
2220
         this.templateFormEdit.id = row.id
2002
         this.templateFormEdit.parent_id = row.parent_id
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
         this.templateEditFormVisible = true
2226
         this.templateEditFormVisible = true
2004
         if (row.parent_id > 0) {
2227
         if (row.parent_id > 0) {
2005
           this.editDialogTitle = '编辑子药'
2228
           this.editDialogTitle = '编辑子药'
2175
         this.current_template_id = row.template_id
2398
         this.current_template_id = row.template_id
2176
         this.current_template_name = row.name
2399
         this.current_template_name = row.name
2177
         this.form.name = row.name
2400
         this.form.name = row.name
2401
+        this.form.advice_type = row.advice_type
2178
         this.templateTableTwoVisible = true
2402
         this.templateTableTwoVisible = true
2179
         this.adviceTableDataTwo = []
2403
         this.adviceTableDataTwo = []
2180
         for (let i = 0; i < this.adviceTemplates.length; i++) {
2404
         for (let i = 0; i < this.adviceTemplates.length; i++) {

+ 124 - 25
src/xt_pages/user/components/EditGroupAdvice.vue View File

4
       <el-form ref="groupForm" :rules="groupRules" :model="groupForm" label-width="90px">
4
       <el-form ref="groupForm" :rules="groupRules" :model="groupForm" label-width="90px">
5
         <el-row>
5
         <el-row>
6
           <el-col :span="12">
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
                 <el-option
9
                 <el-option
10
                   :label="item.label"
10
                   :label="item.label"
11
                   :key="item.value"
11
                   :key="item.value"
19
             <el-form-item label="开始时间 :" required prop="start_time">
19
             <el-form-item label="开始时间 :" required prop="start_time">
20
               <el-date-picker
20
               <el-date-picker
21
                 type="datetime"
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
                 placeholder="选择时间"
24
                 placeholder="选择时间"
25
                 v-model="groupForm.start_time"
25
                 v-model="groupForm.start_time"
26
               ></el-date-picker>
26
               ></el-date-picker>
27
             </el-form-item>
27
             </el-form-item>
28
           </el-col>
28
           </el-col>
29
         </el-row>
29
         </el-row>
30
+
31
+
32
+
30
         <el-row>
33
         <el-row>
31
           <el-col :span="12">
34
           <el-col :span="12">
32
             <el-form-item label="开嘱医生 :">
35
             <el-form-item label="开嘱医生 :">
41
         </el-row>
44
         </el-row>
42
         <el-row style="margin-bottom: 20px">
45
         <el-row style="margin-bottom: 20px">
43
           <el-col :span="2">&nbsp;</el-col>
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
           <el-col :span="5">
57
           <el-col :span="5">
54
             <el-button
58
             <el-button
102
                 label="规格"
106
                 label="规格"
103
                 property="advice_desc"
107
                 property="advice_desc"
104
               ></el-table-column>
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
               <el-table-column label="开药数量" min-width="80" property="prescribing_number" align="center">
110
               <el-table-column label="开药数量" min-width="80" property="prescribing_number" align="center">
116
                 <template slot-scope="scope">
111
                 <template slot-scope="scope">
117
                   <span
112
                   <span
141
                   <span v-if="scope.row.parent_row==0">{{scope.row.execution_frequency}}</span>
136
                   <span v-if="scope.row.parent_row==0">{{scope.row.execution_frequency}}</span>
142
                 </template>
137
                 </template>
143
               </el-table-column>
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
             </el-table>
149
             </el-table>
145
           </el-col>
150
           </el-col>
146
         </el-row>
151
         </el-row>
397
               </el-select>
402
               </el-select>
398
             </el-form-item>
403
             </el-form-item>
399
           </el-col>
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
         </el-row>
441
         </el-row>
401
       </el-form>
442
       </el-form>
402
       <div slot="footer" class="dialog-footer">
443
       <div slot="footer" class="dialog-footer">
430
     name: 'EditGroupAdvice',
471
     name: 'EditGroupAdvice',
431
     data() {
472
     data() {
432
       return {
473
       return {
474
+        weeks:[],
433
         editRowKey: 0,
475
         editRowKey: 0,
434
         templateFormVisible: false,
476
         templateFormVisible: false,
435
         oldTemplateFormVisible: false,
477
         oldTemplateFormVisible: false,
495
           return []
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
       groupFormVisible: false,
551
       groupFormVisible: false,
499
       groupForm: {
552
       groupForm: {
500
         advice_type: "",
553
         advice_type: "",
504
         advice_doctor: "",
557
         advice_doctor: "",
505
         remark: "",
558
         remark: "",
506
         parent_id: 0,
559
         parent_id: 0,
560
+        remind:0,
561
+        frequency_type:0,
562
+        day_count:'',
563
+
507
       },
564
       },
508
       adviceTypeOptions: {
565
       adviceTypeOptions: {
509
         type: Array,
566
         type: Array,
643
                 start_time: _this.groupForm.start_time,
700
                 start_time: _this.groupForm.start_time,
644
                 advice_name: _this.nameForm.advice_name,
701
                 advice_name: _this.nameForm.advice_name,
645
                 advice_desc: _this.nameForm.advice_desc,
702
                 advice_desc: _this.nameForm.advice_desc,
646
-
647
                 single_dose: '' + _this.nameForm.single_dose,
703
                 single_dose: '' + _this.nameForm.single_dose,
648
                 single_dose_unit: _this.nameForm.single_dose_unit,
704
                 single_dose_unit: _this.nameForm.single_dose_unit,
649
                 drug_spec: '' + _this.nameForm.drug_spec,
705
                 drug_spec: '' + _this.nameForm.drug_spec,
658
                 remark: _this.groupForm.remark,
714
                 remark: _this.groupForm.remark,
659
                 parent_id: _this.groupSelectRow.parent_id,
715
                 parent_id: _this.groupSelectRow.parent_id,
660
                 groupno: _this.groupForm.groupno,
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
               EditDoctorAdvice(this.patientID, this.groupSelectRow.id, submitForm).then(response => {
723
               EditDoctorAdvice(this.patientID, this.groupSelectRow.id, submitForm).then(response => {
663
                 if (response.data.state == 0) {
724
                 if (response.data.state == 0) {
672
                   });
733
                   });
673
                   var ale = _this.groupForm.adviceNames.length;
734
                   var ale = _this.groupForm.adviceNames.length;
674
                   var atle = _this.adviceTableData.length;
735
                   var atle = _this.adviceTableData.length;
675
-
736
+                  this.weeks = []
676
                   for (let index = 0; index < atle; index++) {
737
                   for (let index = 0; index < atle; index++) {
677
                     if (_this.groupSelectRow.id == _this.adviceTableData[index].id) {
738
                     if (_this.groupSelectRow.id == _this.adviceTableData[index].id) {
678
                       var advice = response.data.data.advice;
739
                       var advice = response.data.data.advice;
687
                       _this.adviceTableData[index].execution_frequency = advice.execution_frequency;
748
                       _this.adviceTableData[index].execution_frequency = advice.execution_frequency;
688
                       _this.adviceTableData[index].prescribing_number = advice.prescribing_number;
749
                       _this.adviceTableData[index].prescribing_number = advice.prescribing_number;
689
                       _this.adviceTableData[index].prescribing_number_unit = advice.prescribing_number_unit;
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
                       break;
756
                       break;
691
                     }
757
                     }
692
                   }
758
                   }
728
                         _this.groupForm.adviceNames[index].delivery_way = _this.nameForm.delivery_way;
794
                         _this.groupForm.adviceNames[index].delivery_way = _this.nameForm.delivery_way;
729
                         _this.groupForm.adviceNames[index].execution_frequency = _this.nameForm.execution_frequency;
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
                         _this.$set(_this.groupForm.adviceNames, index, _this.groupForm.adviceNames[index]);
804
                         _this.$set(_this.groupForm.adviceNames, index, _this.groupForm.adviceNames[index]);
732
                         break;
805
                         break;
733
                       }
806
                       }
808
                 });
881
                 });
809
 
882
 
810
               } else {
883
               } else {
884
+                _this.nameForm.week_days= this.weeks.filter(function(s) {
885
+                  return s && s.trim()
886
+                }).join(',')
811
                 _this.submitGroupForm = {
887
                 _this.submitGroupForm = {
812
                   advice_type: _this.groupForm.advice_type,
888
                   advice_type: _this.groupForm.advice_type,
813
                   advice_date: _this.groupForm.advice_date,
889
                   advice_date: _this.groupForm.advice_date,
824
                       prescribing_number_unit: _this.nameForm.prescribing_number_unit,
900
                       prescribing_number_unit: _this.nameForm.prescribing_number_unit,
825
                       delivery_way: _this.nameForm.delivery_way,
901
                       delivery_way: _this.nameForm.delivery_way,
826
                       execution_frequency: _this.nameForm.execution_frequency,
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
                       isEdit: 0,
908
                       isEdit: 0,
828
                       id: 0,
909
                       id: 0,
829
                       children: [],
910
                       children: [],
834
                   remark: _this.groupForm.remark,
915
                   remark: _this.groupForm.remark,
835
                   parent_id: 0,
916
                   parent_id: 0,
836
                 };
917
                 };
918
+
919
+
920
+
837
                 CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm).then(response => {
921
                 CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm).then(response => {
838
                   if (response.data.state == 0) {
922
                   if (response.data.state == 0) {
839
                     _this.$message.error(response.data.msg);
923
                     _this.$message.error(response.data.msg);
845
                       type: "success",
929
                       type: "success",
846
                       duration: 2000
930
                       duration: 2000
847
                     });
931
                     });
932
+                    this.weeks = []
848
                     if (_this.adviceType == _this.groupForm.advice_type || _this.adviceType == 0) {
933
                     if (_this.adviceType == _this.groupForm.advice_type || _this.adviceType == 0) {
849
 
934
 
850
                       // var alen = response.data.data.advices.length
935
                       // var alen = response.data.data.advices.length
907
                           prescribing_number_unit: groups[index].prescribing_number_unit,
992
                           prescribing_number_unit: groups[index].prescribing_number_unit,
908
                           delivery_way: groups[index].delivery_way,
993
                           delivery_way: groups[index].delivery_way,
909
                           execution_frequency: groups[index].execution_frequency,
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
                           isEdit: 0,
1000
                           isEdit: 0,
911
                           index: 0,
1001
                           index: 0,
912
                           id: groups[index].id,
1002
                           id: groups[index].id,
1016
             id: this.groupSelectRow.id,
1106
             id: this.groupSelectRow.id,
1017
             children: [],
1107
             children: [],
1018
             parent_row: this.groupSelectRow.parent_row,
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
           this.nameFormTitle = '修改医嘱内容';
1117
           this.nameFormTitle = '修改医嘱内容';
1022
         } else {
1118
         } else {
1023
           this.nameForm = {
1119
           this.nameForm = {
1036
             id: 0,
1132
             id: 0,
1037
             children: [],
1133
             children: [],
1038
             parent_row: 0,
1134
             parent_row: 0,
1135
+            day_count: '',
1136
+            week_days: '',
1137
+            frequency_type: '',
1039
           };
1138
           };
1040
           this.nameFormTitle = '新增医嘱内容';
1139
           this.nameFormTitle = '新增医嘱内容';
1041
         }
1140
         }

+ 21 - 21
src/xt_pages/user/components/PatientForm.vue View File

975
               this.form.age = parseInt(this.form.age)
975
               this.form.age = parseInt(this.form.age)
976
               createPatient(this.form)
976
               createPatient(this.form)
977
                 .then(response => {
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
                 .catch(err => {
1000
                 .catch(err => {
1001
                   this.$message.error('网络异常')
1001
                   this.$message.error('网络异常')

File diff suppressed because it is too large
+ 3261 - 2894
src/xt_pages/user/doctorAdvice.vue


+ 4 - 3
src/xt_pages/user/inspection.vue View File

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