|
@@ -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>
|
|
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>
|
|
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>
|
|
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++) {
|