|
@@ -1188,7 +1188,7 @@
|
1188
|
1188
|
import { getDataConfig } from '@/utils/data'
|
1189
|
1189
|
|
1190
|
1190
|
let rowIndex = 1
|
1191
|
|
- let rowKey = 0
|
|
1191
|
+ const rowKey = 0
|
1192
|
1192
|
|
1193
|
1193
|
export default {
|
1194
|
1194
|
name: 'doctorAdvice',
|
|
@@ -1415,7 +1415,6 @@
|
1415
|
1415
|
duration: 2000
|
1416
|
1416
|
})
|
1417
|
1417
|
|
1418
|
|
-
|
1419
|
1418
|
this.dialogFormVisible = false
|
1420
|
1419
|
this.resetForm(formName)
|
1421
|
1420
|
var advice = response.data.data.advice
|
|
@@ -1498,8 +1497,8 @@
|
1498
|
1497
|
continue
|
1499
|
1498
|
}
|
1500
|
1499
|
if (
|
1501
|
|
- false ===
|
1502
|
|
- response.data.data.advices[index].parent_id in childMap
|
|
1500
|
+ response.data.data.advices[index].parent_id in childMap ===
|
|
1501
|
+ false
|
1503
|
1502
|
) {
|
1504
|
1503
|
childMap[response.data.data.advices[index].parent_id] = []
|
1505
|
1504
|
}
|
|
@@ -1687,19 +1686,17 @@
|
1687
|
1686
|
this.templateForm = { id: '' }
|
1688
|
1687
|
this.selectedTemp = { id: 0, name: '', org_id: 0, list: [], rows: [] }
|
1689
|
1688
|
this.selectedTemplate = []
|
1690
|
|
- if (typeof this.$refs.templatetable != 'undefined') {
|
|
1689
|
+ if (typeof this.$refs.templatetable !== 'undefined') {
|
1691
|
1690
|
this.$refs.templatetable.setCurrentRow(null)
|
1692
|
1691
|
}
|
1693
|
1692
|
this.templateFormVisible = true
|
1694
|
1693
|
},
|
1695
|
1694
|
openGroupChild() {
|
1696
|
1695
|
if (this.groupSelectRow === null) {
|
1697
|
|
-
|
1698
|
1696
|
this.$message.error('未选择医嘱内容,无法添加子药')
|
1699
|
1697
|
|
1700
|
1698
|
return
|
1701
|
1699
|
} else if (this.groupSelectRow.parent_row > 0) {
|
1702
|
|
-
|
1703
|
1700
|
this.$message.error('子药不能添加子药')
|
1704
|
1701
|
|
1705
|
1702
|
return
|
|
@@ -1728,11 +1725,9 @@
|
1728
|
1725
|
this.isChild = false
|
1729
|
1726
|
if (isEdit) {
|
1730
|
1727
|
if (this.groupSelectRow === null) {
|
1731
|
|
-
|
1732
|
1728
|
this.$message.error('未选择要修改的医嘱内容')
|
1733
|
1729
|
|
1734
|
1730
|
return
|
1735
|
|
-
|
1736
|
1731
|
}
|
1737
|
1732
|
if (this.groupSelectRow.parent_row) {
|
1738
|
1733
|
this.isChild = true
|
|
@@ -1783,7 +1778,7 @@
|
1783
|
1778
|
day_count: '',
|
1784
|
1779
|
week_days: '',
|
1785
|
1780
|
frequency_type: 0,
|
1786
|
|
- template_id:'',
|
|
1781
|
+ template_id: '',
|
1787
|
1782
|
isEdit: 0,
|
1788
|
1783
|
index: 0,
|
1789
|
1784
|
id: 0,
|
|
@@ -1806,7 +1801,7 @@
|
1806
|
1801
|
content = '确认删除此医嘱内容?'
|
1807
|
1802
|
}
|
1808
|
1803
|
|
1809
|
|
- var isChild = this.groupSelectRow.parent_row ? true : false
|
|
1804
|
+ var isChild = !!this.groupSelectRow.parent_row
|
1810
|
1805
|
var title = isChild ? '删除子药内容' : '删除医嘱内容'
|
1811
|
1806
|
var msg = isChild ? '确认删除此子药内容?' : content
|
1812
|
1807
|
this.$confirm(msg, title, {
|
|
@@ -2053,7 +2048,7 @@
|
2053
|
2048
|
if (groups[index].parent_id == 0) {
|
2054
|
2049
|
continue
|
2055
|
2050
|
}
|
2056
|
|
- if (false === groups[index].parent_id in childMap) {
|
|
2051
|
+ if (groups[index].parent_id in childMap === false) {
|
2057
|
2052
|
childMap[groups[index].parent_id] = []
|
2058
|
2053
|
}
|
2059
|
2054
|
childMap[groups[index].parent_id].push(groups[index])
|
|
@@ -2172,20 +2167,20 @@
|
2172
|
2167
|
this.adviceForm.advice_desc = this.adviceTemplateMaps[key].advice_desc
|
2173
|
2168
|
this.adviceForm.single_dose_unit = this.adviceTemplateMaps[
|
2174
|
2169
|
key
|
2175
|
|
- ].single_dose_unit
|
|
2170
|
+ ].single_dose_unit
|
2176
|
2171
|
this.adviceForm.single_dose =
|
2177
|
2172
|
this.adviceTemplateMaps[key].single_dose + ''
|
2178
|
2173
|
this.adviceForm.prescribing_number_unit = this.adviceTemplateMaps[
|
2179
|
2174
|
key
|
2180
|
|
- ].prescribing_number_unit
|
|
2175
|
+ ].prescribing_number_unit
|
2181
|
2176
|
this.adviceForm.prescribing_number =
|
2182
|
2177
|
this.adviceTemplateMaps[key].prescribing_number + ''
|
2183
|
2178
|
this.adviceForm.delivery_way = this.adviceTemplateMaps[
|
2184
|
2179
|
key
|
2185
|
|
- ].delivery_way
|
|
2180
|
+ ].delivery_way
|
2186
|
2181
|
this.adviceForm.execution_frequency = this.adviceTemplateMaps[
|
2187
|
2182
|
key
|
2188
|
|
- ].execution_frequency
|
|
2183
|
+ ].execution_frequency
|
2189
|
2184
|
}
|
2190
|
2185
|
},
|
2191
|
2186
|
indexMethod(index) {
|
|
@@ -2365,7 +2360,7 @@
|
2365
|
2360
|
var name = ''
|
2366
|
2361
|
if (
|
2367
|
2362
|
this.doctorOptions == null ||
|
2368
|
|
- typeof this.doctorOptions.length == 'undefined'
|
|
2363
|
+ typeof this.doctorOptions.length === 'undefined'
|
2369
|
2364
|
) {
|
2370
|
2365
|
return name
|
2371
|
2366
|
}
|
|
@@ -2388,7 +2383,7 @@
|
2388
|
2383
|
var name = ''
|
2389
|
2384
|
if (
|
2390
|
2385
|
this.adminUserOptions == null ||
|
2391
|
|
- typeof this.adminUserOptions.length == 'undefined'
|
|
2386
|
+ typeof this.adminUserOptions.length === 'undefined'
|
2392
|
2387
|
) {
|
2393
|
2388
|
return name
|
2394
|
2389
|
}
|
|
@@ -2405,7 +2400,6 @@
|
2405
|
2400
|
return name
|
2406
|
2401
|
},
|
2407
|
2402
|
setAdviceForm(row) {
|
2408
|
|
-
|
2409
|
2403
|
this.adviceForm = {
|
2410
|
2404
|
advice_type: row.advice_type,
|
2411
|
2405
|
advice_date: uParseTime(row.advice_date, '{y}-{m}-{d}'),
|
|
@@ -2431,6 +2425,7 @@
|
2431
|
2425
|
getDoctorAdviceList(this.listQuery).then(response => {
|
2432
|
2426
|
if (response.data.state == 1) {
|
2433
|
2427
|
this.adviceTableData = response.data.data.advices
|
|
2428
|
+ console.log('数据是什么', this.adviceTableData)
|
2434
|
2429
|
this.operators = response.data.data.operators
|
2435
|
2430
|
if (this.operators.length > 0) {
|
2436
|
2431
|
var operatorsLen = this.operators.length
|
|
@@ -2591,7 +2586,7 @@
|
2591
|
2586
|
)
|
2592
|
2587
|
}
|
2593
|
2588
|
}
|
2594
|
|
- //下面两步的作用是为了上选中的数据的输出顺序不变
|
|
2589
|
+ // 下面两步的作用是为了上选中的数据的输出顺序不变
|
2595
|
2590
|
for (const index in this.selectedTemp.list) {
|
2596
|
2591
|
this.$refs.selecttemplatetable.toggleRowSelection(
|
2597
|
2592
|
this.selectedTemp.list[index]
|
|
@@ -2667,10 +2662,10 @@
|
2667
|
2662
|
var item = {
|
2668
|
2663
|
advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2669
|
2664
|
index
|
2670
|
|
- ].advice_name,
|
|
2665
|
+ ].advice_name,
|
2671
|
2666
|
advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2672
|
2667
|
index
|
2673
|
|
- ].advice_desc,
|
|
2668
|
+ ].advice_desc,
|
2674
|
2669
|
single_dose:
|
2675
|
2670
|
'' +
|
2676
|
2671
|
this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
|
|
@@ -2683,7 +2678,7 @@
|
2683
|
2678
|
.drug_spec,
|
2684
|
2679
|
drug_spec_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2685
|
2680
|
index
|
2686
|
|
- ].drug_spec_unit,
|
|
2681
|
+ ].drug_spec_unit,
|
2687
|
2682
|
prescribing_number:
|
2688
|
2683
|
'' +
|
2689
|
2684
|
this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
|
|
@@ -2692,15 +2687,15 @@
|
2692
|
2687
|
.DoctorAdviceTemplate[index].prescribing_number_unit,
|
2693
|
2688
|
delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2694
|
2689
|
index
|
2695
|
|
- ].delivery_way,
|
|
2690
|
+ ].delivery_way,
|
2696
|
2691
|
execution_frequency: this.adviceTemplateMaps[mapid]
|
2697
|
2692
|
.DoctorAdviceTemplate[index].execution_frequency,
|
2698
|
2693
|
advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2699
|
2694
|
index
|
2700
|
|
- ].id,
|
|
2695
|
+ ].id,
|
2701
|
2696
|
selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2702
|
2697
|
index
|
2703
|
|
- ].selection,
|
|
2698
|
+ ].selection,
|
2704
|
2699
|
|
2705
|
2700
|
day_count: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].day_count,
|
2706
|
2701
|
week_days: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].week_days,
|
|
@@ -2720,7 +2715,7 @@
|
2720
|
2715
|
var parentRow = thisRowKey
|
2721
|
2716
|
var children = this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2722
|
2717
|
index
|
2723
|
|
- ].children
|
|
2718
|
+ ].children
|
2724
|
2719
|
for (const key in children) {
|
2725
|
2720
|
thisRowKey++
|
2726
|
2721
|
var child = {
|
|
@@ -2756,7 +2751,7 @@
|
2756
|
2751
|
this.allSelectedTemplate = []
|
2757
|
2752
|
var thisRowKey = 0
|
2758
|
2753
|
for (const indexs in this.adviceTemplateMaps) {
|
2759
|
|
- let adviceTemplate = this.adviceTemplateMaps[indexs]
|
|
2754
|
+ const adviceTemplate = this.adviceTemplateMaps[indexs]
|
2760
|
2755
|
for (const index in adviceTemplate.DoctorAdviceTemplate) {
|
2761
|
2756
|
if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
|
2762
|
2757
|
thisRowKey++
|
|
@@ -2790,7 +2785,7 @@
|
2790
|
2785
|
day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
|
2791
|
2786
|
frequency_type: adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
|
2792
|
2787
|
week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
|
2793
|
|
- template_id:"T"+adviceTemplate.DoctorAdviceTemplate[index].id,
|
|
2788
|
+ template_id: 'T' + adviceTemplate.DoctorAdviceTemplate[index].id,
|
2794
|
2789
|
|
2795
|
2790
|
isEdit: 0,
|
2796
|
2791
|
id: 0,
|
|
@@ -2809,7 +2804,7 @@
|
2809
|
2804
|
thisRowKey++
|
2810
|
2805
|
var child = {
|
2811
|
2806
|
advice_id: children[key].id,
|
2812
|
|
- template_id:"T"+children[key].id,
|
|
2807
|
+ template_id: 'T' + children[key].id,
|
2813
|
2808
|
|
2814
|
2809
|
advice_name: children[key].advice_name,
|
2815
|
2810
|
advice_desc: children[key].advice_desc,
|
|
@@ -2919,9 +2914,8 @@
|
2919
|
2914
|
|
2920
|
2915
|
console.log(this.groupForm)
|
2921
|
2916
|
|
2922
|
|
-
|
2923
|
2917
|
this.templateFormVisible = false
|
2924
|
|
- //清除数据源的选中记录
|
|
2918
|
+ // 清除数据源的选中记录
|
2925
|
2919
|
},
|
2926
|
2920
|
addTempForm(formName) {
|
2927
|
2921
|
var _this = this
|
|
@@ -3040,41 +3034,41 @@
|
3040
|
3034
|
if (_this.groupSelectRow.row_key == children[j].row_key) {
|
3041
|
3035
|
_this.groupForm.adviceNames[index].children[
|
3042
|
3036
|
j
|
3043
|
|
- ].advice_name =
|
|
3037
|
+ ].advice_name =
|
3044
|
3038
|
_this.nameForm.advice_name
|
3045
|
3039
|
_this.groupForm.adviceNames[index].children[
|
3046
|
3040
|
j
|
3047
|
|
- ].advice_desc =
|
|
3041
|
+ ].advice_desc =
|
3048
|
3042
|
_this.nameForm.advice_desc
|
3049
|
3043
|
_this.groupForm.adviceNames[index].children[
|
3050
|
3044
|
j
|
3051
|
|
- ].single_dose =
|
|
3045
|
+ ].single_dose =
|
3052
|
3046
|
'' + _this.nameForm.single_dose
|
3053
|
3047
|
_this.groupForm.adviceNames[index].children[
|
3054
|
3048
|
j
|
3055
|
|
- ].single_dose_unit =
|
|
3049
|
+ ].single_dose_unit =
|
3056
|
3050
|
_this.nameForm.single_dose_unit
|
3057
|
3051
|
_this.groupForm.adviceNames[index].children[j].drug_spec =
|
3058
|
3052
|
'' + _this.nameForm.drug_spec
|
3059
|
3053
|
_this.groupForm.adviceNames[index].children[
|
3060
|
3054
|
j
|
3061
|
|
- ].drug_spec_unit =
|
|
3055
|
+ ].drug_spec_unit =
|
3062
|
3056
|
_this.nameForm.drug_spec_unit
|
3063
|
3057
|
_this.groupForm.adviceNames[index].children[
|
3064
|
3058
|
j
|
3065
|
|
- ].prescribing_number =
|
|
3059
|
+ ].prescribing_number =
|
3066
|
3060
|
'' + _this.nameForm.prescribing_number
|
3067
|
3061
|
_this.groupForm.adviceNames[index].children[
|
3068
|
3062
|
j
|
3069
|
|
- ].prescribing_number_unit =
|
|
3063
|
+ ].prescribing_number_unit =
|
3070
|
3064
|
_this.nameForm.prescribing_number_unit
|
3071
|
3065
|
_this.groupForm.adviceNames[index].children[
|
3072
|
3066
|
j
|
3073
|
|
- ].delivery_way =
|
|
3067
|
+ ].delivery_way =
|
3074
|
3068
|
_this.nameForm.delivery_way
|
3075
|
3069
|
_this.groupForm.adviceNames[index].children[
|
3076
|
3070
|
j
|
3077
|
|
- ].execution_frequency =
|
|
3071
|
+ ].execution_frequency =
|
3078
|
3072
|
_this.nameForm.execution_frequency
|
3079
|
3073
|
|
3080
|
3074
|
_this.$set(
|
|
@@ -3099,8 +3093,6 @@
|
3099
|
3093
|
_this.groupForm.adviceNames[index].advice_desc =
|
3100
|
3094
|
_this.nameForm.advice_desc
|
3101
|
3095
|
|
3102
|
|
-
|
3103
|
|
-
|
3104
|
3096
|
_this.groupForm.adviceNames[index].single_dose =
|
3105
|
3097
|
'' + _this.nameForm.single_dose
|
3106
|
3098
|
_this.groupForm.adviceNames[index].single_dose_unit =
|
|
@@ -3122,15 +3114,11 @@
|
3122
|
3114
|
_this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
|
3123
|
3115
|
_this.groupForm.adviceNames[index].day_count = '0'
|
3124
|
3116
|
_this.groupForm.adviceNames[index].week_days = ''
|
3125
|
|
-
|
3126
|
3117
|
} else if (_this.nameForm.frequency_type == 2) {
|
3127
|
|
-
|
3128
|
3118
|
_this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
|
3129
|
3119
|
_this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count
|
3130
|
3120
|
_this.groupForm.adviceNames[index].week_days = ''
|
3131
|
|
-
|
3132
|
3121
|
} else if (_this.nameForm.frequency_type == 3) {
|
3133
|
|
-
|
3134
|
3122
|
_this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
|
3135
|
3123
|
_this.groupForm.adviceNames[index].day_count = '0'
|
3136
|
3124
|
_this.groupForm.adviceNames[index].week_days = this.weeks.filter(function(s) {
|
|
@@ -3175,28 +3163,22 @@
|
3175
|
3163
|
}
|
3176
|
3164
|
}
|
3177
|
3165
|
} else {
|
3178
|
|
-
|
3179
|
|
- _this.nameForm.template_id = "D" + new Date().getTime() + this.getRandValue()
|
|
3166
|
+ _this.nameForm.template_id = 'D' + new Date().getTime() + this.getRandValue()
|
3180
|
3167
|
|
3181
|
3168
|
if (_this.nameForm.frequency_type == 1) {
|
3182
|
3169
|
_this.nameForm.frequency_type = _this.nameForm.frequency_type
|
3183
|
3170
|
_this.nameForm.day_count = '0'
|
3184
|
3171
|
_this.nameForm.week_days = ''
|
3185
|
|
-
|
3186
|
3172
|
} else if (this.nameForm.frequency_type == 2) {
|
3187
|
|
-
|
3188
|
3173
|
_this.nameForm.frequency_type = _this.nameForm.frequency_type
|
3189
|
3174
|
_this.nameForm.day_count = _this.nameForm.day_count
|
3190
|
3175
|
_this.nameForm.week_days = ''
|
3191
|
|
-
|
3192
|
3176
|
} else if (this.nameForm.frequency_type == 3) {
|
3193
|
|
-
|
3194
|
3177
|
_this.nameForm.frequency_type = _this.nameForm.frequency_type
|
3195
|
3178
|
_this.nameForm.day_count = '0'
|
3196
|
3179
|
_this.nameForm.week_days = this.weeks.filter(function(s) {
|
3197
|
3180
|
return s && s.trim()
|
3198
|
3181
|
}).join(',')
|
3199
|
|
-
|
3200
|
3182
|
}
|
3201
|
3183
|
|
3202
|
3184
|
this.weeks = []
|
|
@@ -3302,13 +3284,13 @@
|
3302
|
3284
|
this.templateFormVisible = false
|
3303
|
3285
|
this.weeks = []
|
3304
|
3286
|
for (const indexs in this.adviceTemplateMaps) {
|
3305
|
|
- let adviceTemplate = this.adviceTemplateMaps[indexs]
|
|
3287
|
+ const adviceTemplate = this.adviceTemplateMaps[indexs]
|
3306
|
3288
|
for (const index in adviceTemplate.DoctorAdviceTemplate) {
|
3307
|
3289
|
adviceTemplate.DoctorAdviceTemplate[index].selection = false
|
3308
|
3290
|
}
|
3309
|
3291
|
}
|
3310
|
3292
|
}, changeRemind(val) {
|
3311
|
|
- let params = {
|
|
3293
|
+ const params = {
|
3312
|
3294
|
'is_open_remind': val,
|
3313
|
3295
|
'id': this.patientID
|
3314
|
3296
|
}
|
|
@@ -3322,10 +3304,8 @@
|
3322
|
3304
|
}
|
3323
|
3305
|
} else {
|
3324
|
3306
|
this.$message.error(response.data.msg)
|
3325
|
|
-
|
3326
|
3307
|
}
|
3327
|
3308
|
})
|
3328
|
|
-
|
3329
|
3309
|
}, getPatient(params) {
|
3330
|
3310
|
fetchPatient(params.id).then(response => {
|
3331
|
3311
|
if (response.data.state == 1) {
|
|
@@ -3335,18 +3315,15 @@
|
3335
|
3315
|
this.$message.error(response.data.msg)
|
3336
|
3316
|
}
|
3337
|
3317
|
})
|
|
3318
|
+ }, getRandValue() {
|
|
3319
|
+ var charactors = '1234567890'
|
3338
|
3320
|
|
3339
|
|
- },getRandValue(){
|
3340
|
|
- var charactors="1234567890";
|
3341
|
|
-
|
3342
|
|
- var value='',i;
|
3343
|
|
-
|
3344
|
|
- for(let j=1;j<=4;j++){
|
3345
|
|
-
|
3346
|
|
- i = parseInt(10*Math.random());
|
|
3321
|
+ var value = '', i
|
3347
|
3322
|
|
3348
|
|
- value = value + charactors.charAt(i);
|
|
3323
|
+ for (let j = 1; j <= 4; j++) {
|
|
3324
|
+ i = parseInt(10 * Math.random())
|
3349
|
3325
|
|
|
3326
|
+ value = value + charactors.charAt(i)
|
3350
|
3327
|
}
|
3351
|
3328
|
return value
|
3352
|
3329
|
},getAllAdviceConfig:function() {
|
|
@@ -3416,7 +3393,7 @@
|
3416
|
3393
|
this.fetchAllAdminUsers()
|
3417
|
3394
|
this.getAllAdviceConfig()
|
3418
|
3395
|
this.getList()
|
3419
|
|
- let params = {
|
|
3396
|
+ const params = {
|
3420
|
3397
|
id: this.patientID
|
3421
|
3398
|
|
3422
|
3399
|
}
|