|
@@ -1187,7 +1187,7 @@
|
1187
|
1187
|
import { getDataConfig } from '@/utils/data'
|
1188
|
1188
|
|
1189
|
1189
|
let rowIndex = 1
|
1190
|
|
- let rowKey = 0
|
|
1190
|
+ const rowKey = 0
|
1191
|
1191
|
|
1192
|
1192
|
export default {
|
1193
|
1193
|
name: 'doctorAdvice',
|
|
@@ -1413,7 +1413,6 @@
|
1413
|
1413
|
duration: 2000
|
1414
|
1414
|
})
|
1415
|
1415
|
|
1416
|
|
-
|
1417
|
1416
|
this.dialogFormVisible = false
|
1418
|
1417
|
this.resetForm(formName)
|
1419
|
1418
|
var advice = response.data.data.advice
|
|
@@ -1490,8 +1489,8 @@
|
1490
|
1489
|
continue
|
1491
|
1490
|
}
|
1492
|
1491
|
if (
|
1493
|
|
- false ===
|
1494
|
|
- response.data.data.advices[index].parent_id in childMap
|
|
1492
|
+ response.data.data.advices[index].parent_id in childMap ===
|
|
1493
|
+ false
|
1495
|
1494
|
) {
|
1496
|
1495
|
childMap[response.data.data.advices[index].parent_id] = []
|
1497
|
1496
|
}
|
|
@@ -1671,19 +1670,17 @@
|
1671
|
1670
|
this.templateForm = { id: '' }
|
1672
|
1671
|
this.selectedTemp = { id: 0, name: '', org_id: 0, list: [], rows: [] }
|
1673
|
1672
|
this.selectedTemplate = []
|
1674
|
|
- if (typeof this.$refs.templatetable != 'undefined') {
|
|
1673
|
+ if (typeof this.$refs.templatetable !== 'undefined') {
|
1675
|
1674
|
this.$refs.templatetable.setCurrentRow(null)
|
1676
|
1675
|
}
|
1677
|
1676
|
this.templateFormVisible = true
|
1678
|
1677
|
},
|
1679
|
1678
|
openGroupChild() {
|
1680
|
1679
|
if (this.groupSelectRow === null) {
|
1681
|
|
-
|
1682
|
1680
|
this.$message.error('未选择医嘱内容,无法添加子药')
|
1683
|
1681
|
|
1684
|
1682
|
return
|
1685
|
1683
|
} else if (this.groupSelectRow.parent_row > 0) {
|
1686
|
|
-
|
1687
|
1684
|
this.$message.error('子药不能添加子药')
|
1688
|
1685
|
|
1689
|
1686
|
return
|
|
@@ -1712,11 +1709,9 @@
|
1712
|
1709
|
this.isChild = false
|
1713
|
1710
|
if (isEdit) {
|
1714
|
1711
|
if (this.groupSelectRow === null) {
|
1715
|
|
-
|
1716
|
1712
|
this.$message.error('未选择要修改的医嘱内容')
|
1717
|
1713
|
|
1718
|
1714
|
return
|
1719
|
|
-
|
1720
|
1715
|
}
|
1721
|
1716
|
if (this.groupSelectRow.parent_row) {
|
1722
|
1717
|
this.isChild = true
|
|
@@ -1767,7 +1762,7 @@
|
1767
|
1762
|
day_count: '',
|
1768
|
1763
|
week_days: '',
|
1769
|
1764
|
frequency_type: 0,
|
1770
|
|
- template_id:'',
|
|
1765
|
+ template_id: '',
|
1771
|
1766
|
isEdit: 0,
|
1772
|
1767
|
index: 0,
|
1773
|
1768
|
id: 0,
|
|
@@ -1790,7 +1785,7 @@
|
1790
|
1785
|
content = '确认删除此医嘱内容?'
|
1791
|
1786
|
}
|
1792
|
1787
|
|
1793
|
|
- var isChild = this.groupSelectRow.parent_row ? true : false
|
|
1788
|
+ var isChild = !!this.groupSelectRow.parent_row
|
1794
|
1789
|
var title = isChild ? '删除子药内容' : '删除医嘱内容'
|
1795
|
1790
|
var msg = isChild ? '确认删除此子药内容?' : content
|
1796
|
1791
|
this.$confirm(msg, title, {
|
|
@@ -2037,7 +2032,7 @@
|
2037
|
2032
|
if (groups[index].parent_id == 0) {
|
2038
|
2033
|
continue
|
2039
|
2034
|
}
|
2040
|
|
- if (false === groups[index].parent_id in childMap) {
|
|
2035
|
+ if (groups[index].parent_id in childMap === false) {
|
2041
|
2036
|
childMap[groups[index].parent_id] = []
|
2042
|
2037
|
}
|
2043
|
2038
|
childMap[groups[index].parent_id].push(groups[index])
|
|
@@ -2156,20 +2151,20 @@
|
2156
|
2151
|
this.adviceForm.advice_desc = this.adviceTemplateMaps[key].advice_desc
|
2157
|
2152
|
this.adviceForm.single_dose_unit = this.adviceTemplateMaps[
|
2158
|
2153
|
key
|
2159
|
|
- ].single_dose_unit
|
|
2154
|
+ ].single_dose_unit
|
2160
|
2155
|
this.adviceForm.single_dose =
|
2161
|
2156
|
this.adviceTemplateMaps[key].single_dose + ''
|
2162
|
2157
|
this.adviceForm.prescribing_number_unit = this.adviceTemplateMaps[
|
2163
|
2158
|
key
|
2164
|
|
- ].prescribing_number_unit
|
|
2159
|
+ ].prescribing_number_unit
|
2165
|
2160
|
this.adviceForm.prescribing_number =
|
2166
|
2161
|
this.adviceTemplateMaps[key].prescribing_number + ''
|
2167
|
2162
|
this.adviceForm.delivery_way = this.adviceTemplateMaps[
|
2168
|
2163
|
key
|
2169
|
|
- ].delivery_way
|
|
2164
|
+ ].delivery_way
|
2170
|
2165
|
this.adviceForm.execution_frequency = this.adviceTemplateMaps[
|
2171
|
2166
|
key
|
2172
|
|
- ].execution_frequency
|
|
2167
|
+ ].execution_frequency
|
2173
|
2168
|
}
|
2174
|
2169
|
},
|
2175
|
2170
|
indexMethod(index) {
|
|
@@ -2349,7 +2344,7 @@
|
2349
|
2344
|
var name = ''
|
2350
|
2345
|
if (
|
2351
|
2346
|
this.doctorOptions == null ||
|
2352
|
|
- typeof this.doctorOptions.length == 'undefined'
|
|
2347
|
+ typeof this.doctorOptions.length === 'undefined'
|
2353
|
2348
|
) {
|
2354
|
2349
|
return name
|
2355
|
2350
|
}
|
|
@@ -2372,7 +2367,7 @@
|
2372
|
2367
|
var name = ''
|
2373
|
2368
|
if (
|
2374
|
2369
|
this.adminUserOptions == null ||
|
2375
|
|
- typeof this.adminUserOptions.length == 'undefined'
|
|
2370
|
+ typeof this.adminUserOptions.length === 'undefined'
|
2376
|
2371
|
) {
|
2377
|
2372
|
return name
|
2378
|
2373
|
}
|
|
@@ -2389,7 +2384,6 @@
|
2389
|
2384
|
return name
|
2390
|
2385
|
},
|
2391
|
2386
|
setAdviceForm(row) {
|
2392
|
|
-
|
2393
|
2387
|
this.adviceForm = {
|
2394
|
2388
|
advice_type: row.advice_type,
|
2395
|
2389
|
advice_date: uParseTime(row.advice_date, '{y}-{m}-{d}'),
|
|
@@ -2415,6 +2409,7 @@
|
2415
|
2409
|
getDoctorAdviceList(this.listQuery).then(response => {
|
2416
|
2410
|
if (response.data.state == 1) {
|
2417
|
2411
|
this.adviceTableData = response.data.data.advices
|
|
2412
|
+ console.log('数据是什么', this.adviceTableData)
|
2418
|
2413
|
this.operators = response.data.data.operators
|
2419
|
2414
|
if (this.operators.length > 0) {
|
2420
|
2415
|
var operatorsLen = this.operators.length
|
|
@@ -2575,7 +2570,7 @@
|
2575
|
2570
|
)
|
2576
|
2571
|
}
|
2577
|
2572
|
}
|
2578
|
|
- //下面两步的作用是为了上选中的数据的输出顺序不变
|
|
2573
|
+ // 下面两步的作用是为了上选中的数据的输出顺序不变
|
2579
|
2574
|
for (const index in this.selectedTemp.list) {
|
2580
|
2575
|
this.$refs.selecttemplatetable.toggleRowSelection(
|
2581
|
2576
|
this.selectedTemp.list[index]
|
|
@@ -2651,10 +2646,10 @@
|
2651
|
2646
|
var item = {
|
2652
|
2647
|
advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2653
|
2648
|
index
|
2654
|
|
- ].advice_name,
|
|
2649
|
+ ].advice_name,
|
2655
|
2650
|
advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2656
|
2651
|
index
|
2657
|
|
- ].advice_desc,
|
|
2652
|
+ ].advice_desc,
|
2658
|
2653
|
single_dose:
|
2659
|
2654
|
'' +
|
2660
|
2655
|
this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
|
|
@@ -2667,7 +2662,7 @@
|
2667
|
2662
|
.drug_spec,
|
2668
|
2663
|
drug_spec_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2669
|
2664
|
index
|
2670
|
|
- ].drug_spec_unit,
|
|
2665
|
+ ].drug_spec_unit,
|
2671
|
2666
|
prescribing_number:
|
2672
|
2667
|
'' +
|
2673
|
2668
|
this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
|
|
@@ -2676,15 +2671,15 @@
|
2676
|
2671
|
.DoctorAdviceTemplate[index].prescribing_number_unit,
|
2677
|
2672
|
delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2678
|
2673
|
index
|
2679
|
|
- ].delivery_way,
|
|
2674
|
+ ].delivery_way,
|
2680
|
2675
|
execution_frequency: this.adviceTemplateMaps[mapid]
|
2681
|
2676
|
.DoctorAdviceTemplate[index].execution_frequency,
|
2682
|
2677
|
advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2683
|
2678
|
index
|
2684
|
|
- ].id,
|
|
2679
|
+ ].id,
|
2685
|
2680
|
selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2686
|
2681
|
index
|
2687
|
|
- ].selection,
|
|
2682
|
+ ].selection,
|
2688
|
2683
|
|
2689
|
2684
|
day_count: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].day_count,
|
2690
|
2685
|
week_days: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].week_days,
|
|
@@ -2704,7 +2699,7 @@
|
2704
|
2699
|
var parentRow = thisRowKey
|
2705
|
2700
|
var children = this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
|
2706
|
2701
|
index
|
2707
|
|
- ].children
|
|
2702
|
+ ].children
|
2708
|
2703
|
for (const key in children) {
|
2709
|
2704
|
thisRowKey++
|
2710
|
2705
|
var child = {
|
|
@@ -2740,7 +2735,7 @@
|
2740
|
2735
|
this.allSelectedTemplate = []
|
2741
|
2736
|
var thisRowKey = 0
|
2742
|
2737
|
for (const indexs in this.adviceTemplateMaps) {
|
2743
|
|
- let adviceTemplate = this.adviceTemplateMaps[indexs]
|
|
2738
|
+ const adviceTemplate = this.adviceTemplateMaps[indexs]
|
2744
|
2739
|
for (const index in adviceTemplate.DoctorAdviceTemplate) {
|
2745
|
2740
|
if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
|
2746
|
2741
|
thisRowKey++
|
|
@@ -2774,7 +2769,7 @@
|
2774
|
2769
|
day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
|
2775
|
2770
|
frequency_type: adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
|
2776
|
2771
|
week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
|
2777
|
|
- template_id:"T"+adviceTemplate.DoctorAdviceTemplate[index].id,
|
|
2772
|
+ template_id: 'T' + adviceTemplate.DoctorAdviceTemplate[index].id,
|
2778
|
2773
|
|
2779
|
2774
|
isEdit: 0,
|
2780
|
2775
|
id: 0,
|
|
@@ -2793,7 +2788,7 @@
|
2793
|
2788
|
thisRowKey++
|
2794
|
2789
|
var child = {
|
2795
|
2790
|
advice_id: children[key].id,
|
2796
|
|
- template_id:"T"+children[key].id,
|
|
2791
|
+ template_id: 'T' + children[key].id,
|
2797
|
2792
|
|
2798
|
2793
|
advice_name: children[key].advice_name,
|
2799
|
2794
|
advice_desc: children[key].advice_desc,
|
|
@@ -2903,9 +2898,8 @@
|
2903
|
2898
|
|
2904
|
2899
|
console.log(this.groupForm)
|
2905
|
2900
|
|
2906
|
|
-
|
2907
|
2901
|
this.templateFormVisible = false
|
2908
|
|
- //清除数据源的选中记录
|
|
2902
|
+ // 清除数据源的选中记录
|
2909
|
2903
|
},
|
2910
|
2904
|
addTempForm(formName) {
|
2911
|
2905
|
var _this = this
|
|
@@ -3024,41 +3018,41 @@
|
3024
|
3018
|
if (_this.groupSelectRow.row_key == children[j].row_key) {
|
3025
|
3019
|
_this.groupForm.adviceNames[index].children[
|
3026
|
3020
|
j
|
3027
|
|
- ].advice_name =
|
|
3021
|
+ ].advice_name =
|
3028
|
3022
|
_this.nameForm.advice_name
|
3029
|
3023
|
_this.groupForm.adviceNames[index].children[
|
3030
|
3024
|
j
|
3031
|
|
- ].advice_desc =
|
|
3025
|
+ ].advice_desc =
|
3032
|
3026
|
_this.nameForm.advice_desc
|
3033
|
3027
|
_this.groupForm.adviceNames[index].children[
|
3034
|
3028
|
j
|
3035
|
|
- ].single_dose =
|
|
3029
|
+ ].single_dose =
|
3036
|
3030
|
'' + _this.nameForm.single_dose
|
3037
|
3031
|
_this.groupForm.adviceNames[index].children[
|
3038
|
3032
|
j
|
3039
|
|
- ].single_dose_unit =
|
|
3033
|
+ ].single_dose_unit =
|
3040
|
3034
|
_this.nameForm.single_dose_unit
|
3041
|
3035
|
_this.groupForm.adviceNames[index].children[j].drug_spec =
|
3042
|
3036
|
'' + _this.nameForm.drug_spec
|
3043
|
3037
|
_this.groupForm.adviceNames[index].children[
|
3044
|
3038
|
j
|
3045
|
|
- ].drug_spec_unit =
|
|
3039
|
+ ].drug_spec_unit =
|
3046
|
3040
|
_this.nameForm.drug_spec_unit
|
3047
|
3041
|
_this.groupForm.adviceNames[index].children[
|
3048
|
3042
|
j
|
3049
|
|
- ].prescribing_number =
|
|
3043
|
+ ].prescribing_number =
|
3050
|
3044
|
'' + _this.nameForm.prescribing_number
|
3051
|
3045
|
_this.groupForm.adviceNames[index].children[
|
3052
|
3046
|
j
|
3053
|
|
- ].prescribing_number_unit =
|
|
3047
|
+ ].prescribing_number_unit =
|
3054
|
3048
|
_this.nameForm.prescribing_number_unit
|
3055
|
3049
|
_this.groupForm.adviceNames[index].children[
|
3056
|
3050
|
j
|
3057
|
|
- ].delivery_way =
|
|
3051
|
+ ].delivery_way =
|
3058
|
3052
|
_this.nameForm.delivery_way
|
3059
|
3053
|
_this.groupForm.adviceNames[index].children[
|
3060
|
3054
|
j
|
3061
|
|
- ].execution_frequency =
|
|
3055
|
+ ].execution_frequency =
|
3062
|
3056
|
_this.nameForm.execution_frequency
|
3063
|
3057
|
|
3064
|
3058
|
_this.$set(
|
|
@@ -3083,8 +3077,6 @@
|
3083
|
3077
|
_this.groupForm.adviceNames[index].advice_desc =
|
3084
|
3078
|
_this.nameForm.advice_desc
|
3085
|
3079
|
|
3086
|
|
-
|
3087
|
|
-
|
3088
|
3080
|
_this.groupForm.adviceNames[index].single_dose =
|
3089
|
3081
|
'' + _this.nameForm.single_dose
|
3090
|
3082
|
_this.groupForm.adviceNames[index].single_dose_unit =
|
|
@@ -3106,15 +3098,11 @@
|
3106
|
3098
|
_this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
|
3107
|
3099
|
_this.groupForm.adviceNames[index].day_count = '0'
|
3108
|
3100
|
_this.groupForm.adviceNames[index].week_days = ''
|
3109
|
|
-
|
3110
|
3101
|
} else if (_this.nameForm.frequency_type == 2) {
|
3111
|
|
-
|
3112
|
3102
|
_this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
|
3113
|
3103
|
_this.groupForm.adviceNames[index].day_count = _this.nameForm.day_count
|
3114
|
3104
|
_this.groupForm.adviceNames[index].week_days = ''
|
3115
|
|
-
|
3116
|
3105
|
} else if (_this.nameForm.frequency_type == 3) {
|
3117
|
|
-
|
3118
|
3106
|
_this.groupForm.adviceNames[index].frequency_type = _this.nameForm.frequency_type
|
3119
|
3107
|
_this.groupForm.adviceNames[index].day_count = '0'
|
3120
|
3108
|
_this.groupForm.adviceNames[index].week_days = this.weeks.filter(function(s) {
|
|
@@ -3159,28 +3147,22 @@
|
3159
|
3147
|
}
|
3160
|
3148
|
}
|
3161
|
3149
|
} else {
|
3162
|
|
-
|
3163
|
|
- _this.nameForm.template_id = "D" + new Date().getTime() + this.getRandValue()
|
|
3150
|
+ _this.nameForm.template_id = 'D' + new Date().getTime() + this.getRandValue()
|
3164
|
3151
|
|
3165
|
3152
|
if (_this.nameForm.frequency_type == 1) {
|
3166
|
3153
|
_this.nameForm.frequency_type = _this.nameForm.frequency_type
|
3167
|
3154
|
_this.nameForm.day_count = '0'
|
3168
|
3155
|
_this.nameForm.week_days = ''
|
3169
|
|
-
|
3170
|
3156
|
} else if (this.nameForm.frequency_type == 2) {
|
3171
|
|
-
|
3172
|
3157
|
_this.nameForm.frequency_type = _this.nameForm.frequency_type
|
3173
|
3158
|
_this.nameForm.day_count = _this.nameForm.day_count
|
3174
|
3159
|
_this.nameForm.week_days = ''
|
3175
|
|
-
|
3176
|
3160
|
} else if (this.nameForm.frequency_type == 3) {
|
3177
|
|
-
|
3178
|
3161
|
_this.nameForm.frequency_type = _this.nameForm.frequency_type
|
3179
|
3162
|
_this.nameForm.day_count = '0'
|
3180
|
3163
|
_this.nameForm.week_days = this.weeks.filter(function(s) {
|
3181
|
3164
|
return s && s.trim()
|
3182
|
3165
|
}).join(',')
|
3183
|
|
-
|
3184
|
3166
|
}
|
3185
|
3167
|
|
3186
|
3168
|
this.weeks = []
|
|
@@ -3287,13 +3269,13 @@
|
3287
|
3269
|
this.templateFormVisible = false
|
3288
|
3270
|
this.weeks = []
|
3289
|
3271
|
for (const indexs in this.adviceTemplateMaps) {
|
3290
|
|
- let adviceTemplate = this.adviceTemplateMaps[indexs]
|
|
3272
|
+ const adviceTemplate = this.adviceTemplateMaps[indexs]
|
3291
|
3273
|
for (const index in adviceTemplate.DoctorAdviceTemplate) {
|
3292
|
3274
|
adviceTemplate.DoctorAdviceTemplate[index].selection = false
|
3293
|
3275
|
}
|
3294
|
3276
|
}
|
3295
|
3277
|
}, changeRemind(val) {
|
3296
|
|
- let params = {
|
|
3278
|
+ const params = {
|
3297
|
3279
|
'is_open_remind': val,
|
3298
|
3280
|
'id': this.patientID
|
3299
|
3281
|
}
|
|
@@ -3307,10 +3289,8 @@
|
3307
|
3289
|
}
|
3308
|
3290
|
} else {
|
3309
|
3291
|
this.$message.error(response.data.msg)
|
3310
|
|
-
|
3311
|
3292
|
}
|
3312
|
3293
|
})
|
3313
|
|
-
|
3314
|
3294
|
}, getPatient(params) {
|
3315
|
3295
|
fetchPatient(params.id).then(response => {
|
3316
|
3296
|
if (response.data.state == 1) {
|
|
@@ -3320,18 +3300,15 @@
|
3320
|
3300
|
this.$message.error(response.data.msg)
|
3321
|
3301
|
}
|
3322
|
3302
|
})
|
|
3303
|
+ }, getRandValue() {
|
|
3304
|
+ var charactors = '1234567890'
|
3323
|
3305
|
|
3324
|
|
- },getRandValue(){
|
3325
|
|
- var charactors="1234567890";
|
3326
|
|
-
|
3327
|
|
- var value='',i;
|
3328
|
|
-
|
3329
|
|
- for(let j=1;j<=4;j++){
|
3330
|
|
-
|
3331
|
|
- i = parseInt(10*Math.random());
|
|
3306
|
+ var value = '', i
|
3332
|
3307
|
|
3333
|
|
- value = value + charactors.charAt(i);
|
|
3308
|
+ for (let j = 1; j <= 4; j++) {
|
|
3309
|
+ i = parseInt(10 * Math.random())
|
3334
|
3310
|
|
|
3311
|
+ value = value + charactors.charAt(i)
|
3335
|
3312
|
}
|
3336
|
3313
|
return value
|
3337
|
3314
|
}
|
|
@@ -3388,7 +3365,7 @@
|
3388
|
3365
|
this.fetchAllAdminUsers()
|
3389
|
3366
|
// this.getAdviceConfig()
|
3390
|
3367
|
this.getList()
|
3391
|
|
- let params = {
|
|
3368
|
+ const params = {
|
3392
|
3369
|
id: this.patientID
|
3393
|
3370
|
|
3394
|
3371
|
}
|