|
@@ -206,7 +206,7 @@
|
206
|
206
|
|
207
|
207
|
</div>
|
208
|
208
|
|
209
|
|
- <!-- <el-table
|
|
209
|
+ <el-table
|
210
|
210
|
v-if="his_is_open !=1 && is_advice_open!=1"
|
211
|
211
|
:header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
|
212
|
212
|
:data="doctor_advices"
|
|
@@ -240,7 +240,8 @@
|
240
|
240
|
<template slot-scope="scope">
|
241
|
241
|
<el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
|
242
|
242
|
<span class="el-dropdown-link">
|
243
|
|
- {{ getAdviceContent(scope.row, 1)}}
|
|
243
|
+ <!-- {{ getAdviceContent(scope.row, 1)}} -->
|
|
244
|
+ {{ scope.row.advice_name }}
|
244
|
245
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
245
|
246
|
</span>
|
246
|
247
|
<el-dropdown-menu slot="dropdown">
|
|
@@ -252,7 +253,9 @@
|
252
|
253
|
|
253
|
254
|
<el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
|
254
|
255
|
<span class="el-dropdown-link">
|
255
|
|
-  {{ getAdviceContent(scope.row, 2)}}
|
|
256
|
+  
|
|
257
|
+ {{ scope.row.advice_name }}
|
|
258
|
+ <!-- {{ getAdviceContent(scope.row, 2)}} -->
|
256
|
259
|
|
257
|
260
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
258
|
261
|
</span>
|
|
@@ -299,103 +302,11 @@
|
299
|
302
|
</span>
|
300
|
303
|
</template>
|
301
|
304
|
</el-table-column>
|
302
|
|
- </el-table> -->
|
303
|
|
-
|
|
305
|
+ </el-table>
|
304
|
306
|
|
305
|
307
|
|
306
|
|
- <el-table
|
307
|
|
- v-if="his_is_open !=1 && is_advice_open!=1"
|
308
|
|
- :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
|
309
|
|
- :data="doctor_advices_one"
|
310
|
|
- border
|
311
|
|
- style="width: 100%"
|
312
|
|
- v-show="showAdvicePanel"
|
313
|
|
- ref="advices_list"
|
314
|
|
- @row-click="cellMouseEnter"
|
315
|
|
- :row-class-name="tableRowClassName"
|
316
|
|
-
|
317
|
|
- :cell-class-name="adviceNameShow"
|
318
|
|
- :modal-append-to-body="false"
|
319
|
|
- highlight-current-row
|
320
|
308
|
|
321
|
|
- >
|
322
|
|
-
|
323
|
|
- <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
|
324
|
|
- <template slot-scope="scope">
|
325
|
|
- <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
|
326
|
|
- </template>
|
327
|
|
- </el-table-column>
|
328
|
|
-
|
329
|
|
- <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
|
330
|
|
- <template slot-scope="scope">
|
331
|
|
- <span>
|
332
|
|
- {{scope.row.start_time | parseTime('{y}-{m}-{d} {h}:{i}')}}
|
333
|
|
- </span>
|
334
|
|
- </template>
|
335
|
|
- </el-table-column>
|
336
|
|
- <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
|
337
|
|
- <template slot-scope="scope">
|
338
|
|
- <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
|
339
|
|
- <span class="el-dropdown-link">
|
340
|
|
- {{ getAdviceContent(scope.row, 1)}}
|
341
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
342
|
|
- </span>
|
343
|
|
- <el-dropdown-menu slot="dropdown">
|
344
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改医嘱</el-dropdown-item>
|
345
|
|
- <el-dropdown-item v-if=" his_is_open != 1 " @click.native="openDelete(scope.$index, scope.row)">删除医嘱</el-dropdown-item>
|
346
|
|
- <el-dropdown-item v-if=" his_is_open != 1 " @click.native="openNewChildTwo(scope.$index, scope.row)">新增子药</el-dropdown-item>
|
347
|
|
- </el-dropdown-menu>
|
348
|
|
- </el-dropdown>
|
349
|
|
-
|
350
|
|
- <el-dropdown trigger="click">
|
351
|
|
- <span class="el-dropdown-link" v-for="(it,index) in scope.row.children" :key="index">
|
352
|
|
-  {{ getAdviceContentOne(it, 2)}}
|
353
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
354
|
|
- </span>
|
355
|
|
- <el-dropdown-menu slot="dropdown">
|
356
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openEdit(scope.$index, scope.row)">修改子药</el-dropdown-item>
|
357
|
|
- <el-dropdown-item v-if=" his_is_open != 1" @click.native="openDelete(scope.$index, scope.row)">删除子药</el-dropdown-item>
|
358
|
|
- </el-dropdown-menu>
|
359
|
|
- </el-dropdown>
|
360
|
|
- </template>
|
361
|
|
- </el-table-column>
|
362
|
|
-
|
363
|
|
- <el-table-column
|
364
|
|
- prop="execution_time"
|
365
|
|
- align="center"
|
366
|
|
- min-width="30px"
|
367
|
|
- label="执行时间"
|
368
|
|
- sortable
|
369
|
|
- >
|
370
|
|
- <template slot-scope="scope">
|
371
|
|
- <span v-if="scope.row.execution_time != 0">
|
372
|
|
- {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
|
373
|
|
- </span>
|
374
|
|
- <span v-else></span>
|
375
|
|
- </template>
|
376
|
|
- </el-table-column>
|
377
|
|
- <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士"><!--bug642-->
|
378
|
|
- <template slot-scope="scope">
|
379
|
|
- <span>
|
380
|
|
- {{getXuserName(scope.row.execution_staff)}}
|
381
|
|
- </span>
|
382
|
|
-
|
383
|
|
- </template>
|
384
|
|
- </el-table-column>
|
385
|
|
- <el-table-column
|
386
|
|
- v-if="(template_id != 6 && org_id!=10223 && org_id!=10445) || org_id == 10460"
|
387
|
|
- prop="checker"
|
388
|
|
- min-width="30px"
|
389
|
|
- align="center"
|
390
|
|
- label="核对人员"
|
391
|
|
- >
|
392
|
|
- <template slot-scope="scope">
|
393
|
|
- <span>
|
394
|
|
- {{getXuserName(scope.row.checker)}}
|
395
|
|
- </span>
|
396
|
|
- </template>
|
397
|
|
- </el-table-column>
|
398
|
|
- </el-table>
|
|
309
|
+
|
399
|
310
|
|
400
|
311
|
<el-table
|
401
|
312
|
v-if="his_is_open == 1 || is_advice_open == 1"
|
|
@@ -889,18 +800,17 @@
|
889
|
800
|
|
890
|
801
|
},
|
891
|
802
|
methods: {
|
|
803
|
+
|
892
|
804
|
handleSpanTempArrOne() {
|
893
|
805
|
this.tempArrOne = [];
|
894
|
|
-
|
|
806
|
+ console.log("数据哦噢#",this.doctor_advices)
|
895
|
807
|
for (let i = 0; i < this.doctor_advices.length; i++) {
|
896
|
808
|
if (i === 0) {
|
897
|
809
|
this.tempArrOne.push(1);
|
898
|
810
|
this.pos = 0;
|
899
|
811
|
} else {
|
900
|
812
|
// 判断当前元素与上一个元素是否相同
|
901
|
|
- if (
|
902
|
|
- this.doctor_advices[i].groupno ===
|
903
|
|
- this.doctor_advices[i - 1].groupno
|
|
813
|
+ if (this.doctor_advices[i].groupno === this.doctor_advices[i - 1].groupno
|
904
|
814
|
) {
|
905
|
815
|
this.tempArrOne[this.pos] += 1;
|
906
|
816
|
this.tempArrOne.push(0);
|
|
@@ -909,6 +819,7 @@
|
909
|
819
|
this.pos = i;
|
910
|
820
|
}
|
911
|
821
|
}
|
|
822
|
+ console.log("thiswowoowow",this.tempArrOne)
|
912
|
823
|
}
|
913
|
824
|
},
|
914
|
825
|
handleSelectionChange(){
|
|
@@ -2160,36 +2071,36 @@
|
2160
|
2071
|
}
|
2161
|
2072
|
,
|
2162
|
2073
|
show(his_is_open,is_advice_open) {
|
2163
|
|
-
|
2164
|
|
- var childMap = {}
|
2165
|
|
- for (const index in this.doctor_advices) {
|
2166
|
|
- if (this.doctor_advices[index].parent_id == 0) {
|
2167
|
|
- continue
|
2168
|
|
- }
|
2169
|
|
- if (!(this.doctor_advices[index].parent_id in childMap)) {
|
2170
|
|
- childMap[this.doctor_advices[index].parent_id] = []
|
2171
|
|
- }
|
2172
|
|
- childMap[this.doctor_advices[index].parent_id].push(this.doctor_advices[index])
|
2173
|
|
- }
|
|
2074
|
+ this.handleSpanTempArrOne()
|
|
2075
|
+ // var childMap = {}
|
|
2076
|
+ // for (const index in this.doctor_advices) {
|
|
2077
|
+ // if (this.doctor_advices[index].parent_id == 0) {
|
|
2078
|
+ // continue
|
|
2079
|
+ // }
|
|
2080
|
+ // if (!(this.doctor_advices[index].parent_id in childMap)) {
|
|
2081
|
+ // childMap[this.doctor_advices[index].parent_id] = []
|
|
2082
|
+ // }
|
|
2083
|
+ // childMap[this.doctor_advices[index].parent_id].push(this.doctor_advices[index])
|
|
2084
|
+ // }
|
2174
|
2085
|
|
2175
|
|
- var advices = [];
|
2176
|
|
- for (const index in this.doctor_advices) {
|
2177
|
|
- if (this.doctor_advices[index].parent_id > 0) {
|
2178
|
|
- continue;
|
2179
|
|
- }
|
2180
|
|
- var item = this.doctor_advices[index];
|
2181
|
|
- if (item.id in childMap) {
|
2182
|
|
- item.children = childMap[item.id];
|
2183
|
|
- } else {
|
2184
|
|
- item.children = [];
|
2185
|
|
- }
|
2186
|
|
- advices.push(item);
|
2187
|
|
- }
|
|
2086
|
+ // var advices = [];
|
|
2087
|
+ // for (const index in this.doctor_advices) {
|
|
2088
|
+ // if (this.doctor_advices[index].parent_id > 0) {
|
|
2089
|
+ // continue;
|
|
2090
|
+ // }
|
|
2091
|
+ // var item = this.doctor_advices[index];
|
|
2092
|
+ // if (item.id in childMap) {
|
|
2093
|
+ // item.children = childMap[item.id];
|
|
2094
|
+ // } else {
|
|
2095
|
+ // item.children = [];
|
|
2096
|
+ // }
|
|
2097
|
+ // advices.push(item);
|
|
2098
|
+ // }
|
2188
|
2099
|
|
2189
|
2100
|
|
2190
|
|
- console.log("我的世纪东方",advices)
|
2191
|
|
- this.doctor_advices_one = []
|
2192
|
|
- this.doctor_advices_one = advices
|
|
2101
|
+ // console.log("我的世纪东方",advices)
|
|
2102
|
+ // this.doctor_advices_one = []
|
|
2103
|
+ // this.doctor_advices_one = advices
|
2193
|
2104
|
|
2194
|
2105
|
this.his_is_open = his_is_open
|
2195
|
2106
|
this.is_advice_open = is_advice_open
|
|
@@ -2461,33 +2372,44 @@
|
2461
|
2372
|
},
|
2462
|
2373
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
2463
|
2374
|
|
2464
|
|
- if (columnIndex === 0) {
|
2465
|
|
- if (rowIndex % 2 === 0) {
|
2466
|
|
- return {
|
2467
|
|
- rowspan: 2,
|
2468
|
|
- colspan: 1
|
2469
|
|
- }
|
2470
|
|
- } else {
|
2471
|
|
- return {
|
2472
|
|
- rowspan: 0,
|
2473
|
|
- colspan: 0
|
2474
|
|
- }
|
2475
|
|
- }
|
2476
|
|
- }
|
|
2375
|
+ // columnIndex 代表列
|
|
2376
|
+ if (columnIndex === 0 || columnIndex === 1) {
|
|
2377
|
+ const _row = this.tempArrOne[rowIndex];
|
|
2378
|
+ const _col = _row > 0 ? 1 : 0;
|
|
2379
|
+ // console.log("_row--------------",_row)
|
|
2380
|
+ // console.log("_col",_col)
|
|
2381
|
+ return {
|
|
2382
|
+ rowspan: _row,
|
|
2383
|
+ colspan: _col
|
|
2384
|
+ };
|
|
2385
|
+
|
|
2386
|
+ // if (columnIndex === 0) {
|
|
2387
|
+ // if (rowIndex % 2 === 0) {
|
|
2388
|
+ // return {
|
|
2389
|
+ // rowspan: 2,
|
|
2390
|
+ // colspan: 1
|
|
2391
|
+ // }
|
|
2392
|
+ // } else {
|
|
2393
|
+ // return {
|
|
2394
|
+ // rowspan: 0,
|
|
2395
|
+ // colspan: 0
|
|
2396
|
+ // }
|
|
2397
|
+ // }
|
|
2398
|
+ // }
|
2477
|
2399
|
|
2478
|
|
- if (columnIndex === 1) {
|
2479
|
|
- if (rowIndex % 2 === 0) {
|
2480
|
|
- return {
|
2481
|
|
- rowspan: 2,
|
2482
|
|
- colspan: 1
|
2483
|
|
- }
|
2484
|
|
- } else {
|
2485
|
|
- return {
|
2486
|
|
- rowspan: 0,
|
2487
|
|
- colspan: 0
|
2488
|
|
- }
|
2489
|
|
- }
|
2490
|
|
- }
|
|
2400
|
+ // if (columnIndex === 1) {
|
|
2401
|
+ // if (rowIndex % 2 === 0) {
|
|
2402
|
+ // return {
|
|
2403
|
+ // rowspan: 2,
|
|
2404
|
+ // colspan: 1
|
|
2405
|
+ // }
|
|
2406
|
+ // } else {
|
|
2407
|
+ // return {
|
|
2408
|
+ // rowspan: 0,
|
|
2409
|
+ // colspan: 0
|
|
2410
|
+ // }
|
|
2411
|
+ // }
|
|
2412
|
+ }
|
2491
|
2413
|
}
|
2492
|
2414
|
,
|
2493
|
2415
|
GetLastOrNextDoctorAdvice(params) {
|