|
@@ -136,14 +136,14 @@
|
136
|
136
|
<div class="txsj">
|
137
|
137
|
<el-button
|
138
|
138
|
round
|
139
|
|
- v-if="his_is_open != 1"
|
|
139
|
+ v-if="his_is_open != 1 || is_advice_open == 1"
|
140
|
140
|
@click="openLast(1)"
|
141
|
141
|
>上一方
|
142
|
142
|
</el-button>
|
143
|
143
|
|
144
|
144
|
<el-button
|
145
|
145
|
round
|
146
|
|
- v-if="his_is_open != 1"
|
|
146
|
+ v-if="his_is_open != 1 || is_advice_open == 1"
|
147
|
147
|
@click="openNext(2)"
|
148
|
148
|
>下一方
|
149
|
149
|
</el-button>
|
|
@@ -154,7 +154,7 @@
|
154
|
154
|
round
|
155
|
155
|
@click="openGroupFrom"
|
156
|
156
|
:loading="deleLoading"
|
157
|
|
- v-if="his_is_open != 1"
|
|
157
|
+ v-if="his_is_open != 1 || is_advice_open == 1"
|
158
|
158
|
:disabled="!is_has_create"
|
159
|
159
|
>新增医嘱
|
160
|
160
|
</el-button>
|
|
@@ -189,6 +189,7 @@
|
189
|
189
|
:loading="deleLoading"
|
190
|
190
|
>修改医嘱
|
191
|
191
|
</el-button>
|
|
192
|
+
|
192
|
193
|
<el-button v-else disabled round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱</el-button>
|
193
|
194
|
|
194
|
195
|
<el-button
|
|
@@ -207,7 +208,7 @@
|
207
|
208
|
<!-- @row-click="cellMouseEnter" -->
|
208
|
209
|
<!--<!–:header-cell-style="{ backgroundColor: 'rgb(64, 158, 255)', color: 'white'}"–>@current-change="selectRow"-->
|
209
|
210
|
<el-table
|
210
|
|
- v-if="his_is_open == 0"
|
|
211
|
+ v-if="his_is_open !=1"
|
211
|
212
|
:header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
|
212
|
213
|
:data="doctor_advices"
|
213
|
214
|
border
|
|
@@ -242,8 +243,8 @@
|
242
|
243
|
</span>
|
243
|
244
|
<el-dropdown-menu slot="dropdown">
|
244
|
245
|
<el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改医嘱</el-dropdown-item>
|
245
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openDelete(scope.$index, scope.row)">删除医嘱</el-dropdown-item>
|
246
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openNewChildTwo(scope.$index, scope.row)">新增子药</el-dropdown-item>
|
|
246
|
+ <el-dropdown-item v-if=" his_is_open != 1 " @click.native="openDelete(scope.$index, scope.row)">删除医嘱</el-dropdown-item>
|
|
247
|
+ <el-dropdown-item v-if=" his_is_open != 1 " @click.native="openNewChildTwo(scope.$index, scope.row)">新增子药</el-dropdown-item>
|
247
|
248
|
</el-dropdown-menu>
|
248
|
249
|
</el-dropdown>
|
249
|
250
|
|
|
@@ -300,7 +301,7 @@
|
300
|
301
|
|
301
|
302
|
|
302
|
303
|
<el-table
|
303
|
|
- v-else
|
|
304
|
+ v-if="his_is_open == 1 || is_advice_open == 1"
|
304
|
305
|
:header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
|
305
|
306
|
:data="doctor_advices"
|
306
|
307
|
border
|
|
@@ -325,7 +326,7 @@
|
325
|
326
|
</span>
|
326
|
327
|
</template>
|
327
|
328
|
</el-table-column>
|
328
|
|
- <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
|
|
329
|
+ <el-table-column prop="advice_name" min-width="50px" label="医嘱内容32323" align="center">
|
329
|
330
|
<template slot-scope="scope">
|
330
|
331
|
<el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
|
331
|
332
|
<span class="el-dropdown-link">
|
|
@@ -333,9 +334,9 @@
|
333
|
334
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
334
|
335
|
</span>
|
335
|
336
|
<el-dropdown-menu slot="dropdown">
|
336
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改医嘱</el-dropdown-item>
|
337
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openDelete(scope.$index, scope.row)">删除医嘱</el-dropdown-item>
|
338
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openNewChildTwo(scope.$index, scope.row)">新增子药</el-dropdown-item>
|
|
337
|
+ <el-dropdown-item v-if=" his_is_open == 1 && scope.row.origin == 1 " @click.native="openEdit(scope.$index, scope.row)">修改医嘱</el-dropdown-item>
|
|
338
|
+ <el-dropdown-item v-if=" his_is_open == 1 && scope.row.origin == 1" @click.native="openDelete(scope.$index, scope.row)">删除医嘱</el-dropdown-item>
|
|
339
|
+ <el-dropdown-item v-if=" his_is_open == 1 && scope.row.origin == 1" @click.native="openNewChildTwo(scope.$index, scope.row)">新增子药</el-dropdown-item>
|
339
|
340
|
</el-dropdown-menu>
|
340
|
341
|
</el-dropdown>
|
341
|
342
|
|
|
@@ -345,8 +346,8 @@
|
345
|
346
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
346
|
347
|
</span>
|
347
|
348
|
<el-dropdown-menu slot="dropdown">
|
348
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改子药</el-dropdown-item>
|
349
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openDelete(scope.$index, scope.row)">删除子药</el-dropdown-item>
|
|
349
|
+ <el-dropdown-item v-if=" his_is_open == 1 && scope.row.origin == 1" @click.native="openEdit(scope.$index, scope.row)">修改子药</el-dropdown-item>
|
|
350
|
+ <el-dropdown-item v-if=" his_is_open == 1 && scope.row.origin == 1" @click.native="openDelete(scope.$index, scope.row)">删除子药</el-dropdown-item>
|
350
|
351
|
</el-dropdown-menu>
|
351
|
352
|
</el-dropdown>
|
352
|
353
|
</template>
|
|
@@ -763,6 +764,7 @@
|
763
|
764
|
title: '临时医嘱',
|
764
|
765
|
add_title: '新增医嘱',
|
765
|
766
|
his_is_open:0,
|
|
767
|
+ is_advice_open:0,
|
766
|
768
|
showAdviceForm: false,
|
767
|
769
|
showAdvicePanel: true,
|
768
|
770
|
showNameForm: false,
|
|
@@ -926,8 +928,7 @@
|
926
|
928
|
adviceNames: this.other_doctor_advices,
|
927
|
929
|
remark: ''
|
928
|
930
|
}
|
929
|
|
- console.log("2223333",submitForm)
|
930
|
|
-
|
|
931
|
+
|
931
|
932
|
let mode = '1'
|
932
|
933
|
CreateGroupAdvice(this.patientid, 0, submitForm, mode).then(
|
933
|
934
|
response => {
|
|
@@ -980,7 +981,7 @@
|
980
|
981
|
this.$message.error('没有选择患者')
|
981
|
982
|
return false
|
982
|
983
|
}
|
983
|
|
- // console.log(this.form)
|
|
984
|
+
|
984
|
985
|
let mode = '2'
|
985
|
986
|
if (this.form.advice_doctor != this.$store.getters.xt_user.user.id) {
|
986
|
987
|
mode = '3'
|
|
@@ -1160,11 +1161,16 @@
|
1160
|
1161
|
}
|
1161
|
1162
|
,
|
1162
|
1163
|
openDeleteGroupAdvice(val) {
|
1163
|
|
- console.log("val2323233232",this.groupSelectRow)
|
1164
|
1164
|
if (this.groupSelectRow === null) {
|
1165
|
1165
|
this.$message.error('未选择要删除的医嘱内容')
|
1166
|
1166
|
return
|
1167
|
1167
|
}
|
|
1168
|
+ if(this.groupSelectRow!=null){
|
|
1169
|
+ if(this.groupSelectRow.origin == 2){
|
|
1170
|
+ this.$message.error('处方医嘱不能删除')
|
|
1171
|
+ return
|
|
1172
|
+ }
|
|
1173
|
+ }
|
1168
|
1174
|
if(this.groupSelectRow.execution_state == 1){
|
1169
|
1175
|
this.$message.error("已执行的医嘱无法删除!")
|
1170
|
1176
|
return
|
|
@@ -1203,7 +1209,7 @@
|
1203
|
1209
|
isEdit: 1,
|
1204
|
1210
|
index: this.groupSelectRow.index
|
1205
|
1211
|
}
|
1206
|
|
- console.log("88888888",this.nameForm)
|
|
1212
|
+
|
1207
|
1213
|
} else {
|
1208
|
1214
|
this.nameForm = {
|
1209
|
1215
|
advice_name: '',
|
|
@@ -1261,7 +1267,7 @@
|
1261
|
1267
|
}
|
1262
|
1268
|
,
|
1263
|
1269
|
submitExce() {
|
1264
|
|
- console.log(this.currentRow.origin)
|
|
1270
|
+
|
1265
|
1271
|
if (this.currentRow == null) {
|
1266
|
1272
|
this.$message.error('请先选择要执行的医嘱!')
|
1267
|
1273
|
return false
|
|
@@ -1368,8 +1374,7 @@
|
1368
|
1374
|
this.form.advice_name = arr[0]
|
1369
|
1375
|
}
|
1370
|
1376
|
|
1371
|
|
- console.log("新增医嘱子药",this.form)
|
1372
|
|
-
|
|
1377
|
+
|
1373
|
1378
|
CreateDoctorAdvice(this.patient.id, this.form, mode)
|
1374
|
1379
|
.then(response => {
|
1375
|
1380
|
this.loading = false
|
|
@@ -1412,14 +1417,14 @@
|
1412
|
1417
|
var swapData = this.doctor_advices.splice(spliceIndex)
|
1413
|
1418
|
this.doctor_advices.push(response.data.data.advice)
|
1414
|
1419
|
for (var index in swapData) {
|
1415
|
|
- this.doctor_advices.push(swapData[index]) // = this.doctor_advices.concat(swapData);
|
|
1420
|
+ this.doctor_advices.push(swapData[index])
|
1416
|
1421
|
}
|
1417
|
1422
|
}
|
1418
|
1423
|
}
|
1419
|
1424
|
} else {
|
1420
|
1425
|
this.doctor_advices.unshift(response.data.data.advice)
|
1421
|
1426
|
}
|
1422
|
|
- // this.$emit("new_create", response.data.data.advice);
|
|
1427
|
+
|
1423
|
1428
|
return false
|
1424
|
1429
|
}
|
1425
|
1430
|
})
|
|
@@ -1552,17 +1557,22 @@
|
1552
|
1557
|
,
|
1553
|
1558
|
|
1554
|
1559
|
openEditGroupAdvice() {
|
1555
|
|
- console.log("医嘱泪奔23332233223",this.groupSelectRow)
|
1556
|
1560
|
if (this.groupSelectRow === null) {
|
1557
|
1561
|
this.$message.error('未选择要修改的医嘱内容')
|
1558
|
1562
|
return
|
1559
|
1563
|
}
|
1560
|
|
- console.log("22222",this.groupSelectRow.groupno)
|
|
1564
|
+ if(this.groupSelectRow!=null){
|
|
1565
|
+ if(this.groupSelectRow.origin == 2){
|
|
1566
|
+ this.$message.error("处方医嘱不能修改")
|
|
1567
|
+ return
|
|
1568
|
+ }
|
|
1569
|
+ }
|
1561
|
1570
|
this.$refs.editGroupForm.open(this.groupSelectRow.groupno)
|
1562
|
1571
|
}
|
1563
|
1572
|
,
|
1564
|
1573
|
|
1565
|
1574
|
openGroupFrom() {
|
|
1575
|
+
|
1566
|
1576
|
this.$refs.addGroupForm.open()
|
1567
|
1577
|
|
1568
|
1578
|
// this.title="新增医嘱";
|
|
@@ -1596,8 +1606,6 @@
|
1596
|
1606
|
}
|
1597
|
1607
|
,
|
1598
|
1608
|
checkAdvice() {
|
1599
|
|
- console.log(this.currentRow)
|
1600
|
|
- // console.log(this.$store.getters.xt_user)
|
1601
|
1609
|
if (this.currentRow == null) {
|
1602
|
1610
|
this.$message.error('请先选择要核对的医嘱!')
|
1603
|
1611
|
return false
|
|
@@ -1788,9 +1796,8 @@
|
1788
|
1796
|
confirmButtonText: '确定',
|
1789
|
1797
|
cancelButtonText: '取消',
|
1790
|
1798
|
type: 'warning'
|
1791
|
|
- })
|
1792
|
|
- .then(() => {
|
1793
|
|
- console.log(this.currentRow)
|
|
1799
|
+ }).then(() => {
|
|
1800
|
+
|
1794
|
1801
|
let mode = '4'
|
1795
|
1802
|
if (
|
1796
|
1803
|
this.currentRow.advice_doctor != this.$store.getters.xt_user.user.id
|
|
@@ -2030,9 +2037,10 @@
|
2030
|
2037
|
this.$refs.addGroupForm.open()
|
2031
|
2038
|
}
|
2032
|
2039
|
,
|
2033
|
|
- show(his_is_open) {
|
|
2040
|
+ show(his_is_open,is_advice_open) {
|
|
2041
|
+
|
2034
|
2042
|
this.his_is_open = his_is_open
|
2035
|
|
- console.log(this.his_is_open)
|
|
2043
|
+ this.is_advice_open = is_advice_open
|
2036
|
2044
|
this.isVisibility = true
|
2037
|
2045
|
this.getPermission()
|
2038
|
2046
|
}
|
|
@@ -2136,7 +2144,6 @@
|
2136
|
2144
|
}
|
2137
|
2145
|
},
|
2138
|
2146
|
cellMouseEnter: function(row, column, event) {
|
2139
|
|
- console.log("数据是",row)
|
2140
|
2147
|
this.currentRow = row
|
2141
|
2148
|
this.groupSelectRow = row
|
2142
|
2149
|
// this.sameRowArr.forEach((arr, i) => {
|
|
@@ -2238,9 +2245,7 @@
|
2238
|
2245
|
check_url: '/api/patients/advice/check?mode=7',
|
2239
|
2246
|
module: 4
|
2240
|
2247
|
}
|
2241
|
|
- })
|
2242
|
|
- .then(res => {
|
2243
|
|
- console.log(res)
|
|
2248
|
+ }).then(res => {
|
2244
|
2249
|
if (res.data.state == 0) {
|
2245
|
2250
|
this.hasPermission = false
|
2246
|
2251
|
} else if (res.data.state == 1) {
|
|
@@ -2312,8 +2317,7 @@
|
2312
|
2317
|
if (response.data.state == 1) {
|
2313
|
2318
|
|
2314
|
2319
|
var doctor_advices = response.data.data.advices
|
2315
|
|
- console.log("doctor_advices",doctor_advices)
|
2316
|
|
-
|
|
2320
|
+
|
2317
|
2321
|
this.other_doctor_advices = doctor_advices
|
2318
|
2322
|
this.request_record_date = uParseTime(this.other_doctor_advices[0].record_date, '{y}-{m}-{d}')
|
2319
|
2323
|
this.sch = response.data.data.schedule
|
|
@@ -2325,15 +2329,27 @@
|
2325
|
2329
|
|
2326
|
2330
|
},
|
2327
|
2331
|
getDialysisScheduleDetail() {
|
2328
|
|
- console.log("触发伏组件")
|
2329
|
2332
|
if(this.$route.query.showView && this.$route.query.showView == true){
|
2330
|
2333
|
return
|
2331
|
2334
|
}
|
2332
|
2335
|
getDialysisScheduleDetail(this.patientid, this.record_date).then(response => {
|
2333
|
2336
|
if (response.data.state == 1) {
|
|
2337
|
+ this.doctor_advices = []
|
2334
|
2338
|
var doctor_advices = response.data.data.doctor_advices
|
2335
|
2339
|
this.doctorAdvices = doctor_advices
|
2336
|
|
- this.doctor_advices = doctor_advices
|
|
2340
|
+ if(doctor_advices !=undefined && doctor_advices.length > 0){
|
|
2341
|
+ for(let i=0;i<doctor_advices.length;i++){
|
|
2342
|
+ doctor_advices[i]['origin'] = 1
|
|
2343
|
+ this.doctor_advices.push(doctor_advices[i])
|
|
2344
|
+ }
|
|
2345
|
+ }
|
|
2346
|
+ var his_advices = response.data.data.his_advices
|
|
2347
|
+ if(his_advices!=undefined && his_advices.length > 0){
|
|
2348
|
+ for(let i=0;i<his_advices.length;i++){
|
|
2349
|
+ his_advices[i]['origin'] = 2
|
|
2350
|
+ this.doctor_advices.push(his_advices[i])
|
|
2351
|
+ }
|
|
2352
|
+ }
|
2337
|
2353
|
}
|
2338
|
2354
|
})
|
2339
|
2355
|
}
|
|
@@ -2433,7 +2449,6 @@
|
2433
|
2449
|
obj.type = 2
|
2434
|
2450
|
obj.custom_id = this.rand(10000000, 99999999)
|
2435
|
2451
|
obj.drug_specs = medicalList[i].drug_specs
|
2436
|
|
- // console.log("222",this.all_drug)
|
2437
|
2452
|
this.all_drug.push(obj)
|
2438
|
2453
|
}
|
2439
|
2454
|
}
|
|
@@ -2470,7 +2485,6 @@
|
2470
|
2485
|
obj.custom_id = this.rand(10000000, 99999999)
|
2471
|
2486
|
obj.drug_specs = base_drug_list[i].drug_specs
|
2472
|
2487
|
this.all_drug.push(obj)
|
2473
|
|
- // console.log("2222",this.all_drug)
|
2474
|
2488
|
}
|
2475
|
2489
|
}
|
2476
|
2490
|
})
|
|
@@ -2518,14 +2532,14 @@
|
2518
|
2532
|
},
|
2519
|
2533
|
|
2520
|
2534
|
querySearch(queryString, cb) {
|
2521
|
|
- console.log('queryString',queryString)
|
|
2535
|
+
|
2522
|
2536
|
var restaurants = this.all_drug;
|
2523
|
2537
|
restaurants.map(item => {
|
2524
|
2538
|
item.value = item.drug_name
|
2525
|
2539
|
})
|
2526
|
2540
|
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
2527
|
2541
|
// 调用 callback 返回建议列表的数据
|
2528
|
|
- console.log('results',results)
|
|
2542
|
+
|
2529
|
2543
|
cb(results);
|
2530
|
2544
|
},
|
2531
|
2545
|
|
|
@@ -2536,15 +2550,14 @@
|
2536
|
2550
|
},
|
2537
|
2551
|
|
2538
|
2552
|
querySearch1(queryString, cb) {
|
2539
|
|
- console.log('queryString',queryString)
|
|
2553
|
+
|
2540
|
2554
|
var restaurants = this.drugSpec;
|
2541
|
|
- console.log(restaurants)
|
|
2555
|
+
|
2542
|
2556
|
restaurants.map(item => {
|
2543
|
2557
|
item.value = item.drug_spec
|
2544
|
2558
|
})
|
2545
|
2559
|
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
2546
|
2560
|
// 调用 callback 返回建议列表的数据
|
2547
|
|
- console.log('results',results)
|
2548
|
2561
|
cb(results);
|
2549
|
2562
|
},
|
2550
|
2563
|
handleSelect(){
|
|
@@ -2561,16 +2574,11 @@
|
2561
|
2574
|
this.org_id = this.$store.getters.xt_user.org.id
|
2562
|
2575
|
this.patientid = this.$route.query.patient_id
|
2563
|
2576
|
this.request_record_date = this.record_date
|
2564
|
|
-
|
|
2577
|
+
|
|
2578
|
+
|
2565
|
2579
|
// this.getDialysisScheduleDetail()
|
2566
|
2580
|
//获取自备药
|
2567
|
2581
|
this.getSelfMedicalList()
|
2568
|
|
- },mounted(){
|
2569
|
|
- console.log("~~~~~")
|
2570
|
|
- console.log(this.his_is_open)
|
2571
|
|
- console.log("~~~~~")
|
2572
|
|
-
|
2573
|
|
-
|
2574
|
2582
|
},
|
2575
|
2583
|
components: {
|
2576
|
2584
|
AddGroupAdvice,
|