|
@@ -42,8 +42,8 @@
|
42
|
42
|
</div>
|
43
|
43
|
<div class="schedulingTable" style="display:flex;justify-content: space-between;">
|
44
|
44
|
<div style="width: 70%">
|
45
|
|
- <el-table :data="tableData" border
|
46
|
|
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
|
|
45
|
+ <el-table :data="tableData" border
|
|
46
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
|
47
|
47
|
:row-style="{ color: '#303133' }" @cell-click="clickThis" :cell-style="tableCellStyle"
|
48
|
48
|
@cell-mouse-enter="hoverMouse" @cell-mouse-leave="leavemouse">
|
49
|
49
|
<!-- @cell-mouse-enter="hoverMouse" @cell-mouse-leave="leavemouse" -->
|
|
@@ -56,10 +56,12 @@
|
56
|
56
|
<template slot-scope="scope">
|
57
|
57
|
<div v-if="name==scope.row.user_name&&column_lie =='周一' ? true:false">
|
58
|
58
|
<div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true" >
|
59
|
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
60
|
|
- circle @click.stop=""
|
|
59
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
60
|
+ circle @click.stop=""
|
61
|
61
|
></el-button>
|
62
|
62
|
</div>
|
|
63
|
+ <div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
|
64
|
+ <el-button type="danger" size="mini" icon="el-icon-close" circle @click.stop="toClick(scope.row,scope.$index)"></el-button>
|
63
|
65
|
</div>
|
64
|
66
|
<div @click="hangdleClick(scope.row,scope.$index,0)">
|
65
|
67
|
<el-dropdown trigger="click" @command="changeSchedule" >
|
|
@@ -80,12 +82,12 @@
|
80
|
82
|
<template slot-scope="scope">
|
81
|
83
|
<div v-if="name==scope.row.user_name&&column_lie =='周二' ? true:false">
|
82
|
84
|
<div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
83
|
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
84
|
|
- circle @click.stop=""
|
|
85
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
86
|
+ circle @click.stop=""
|
85
|
87
|
></el-button>
|
86
|
88
|
</div>
|
87
|
89
|
</div>
|
88
|
|
-
|
|
90
|
+
|
89
|
91
|
<div @click="hangdleClick(scope.row,scope.$index,1)">
|
90
|
92
|
<el-dropdown trigger="click" @command="changeSchedule">
|
91
|
93
|
<span class="el-dropdown-link" v-if='getClassAttributes(scope.row.user_name,2) == 2' style="color:red">
|
|
@@ -105,8 +107,8 @@
|
105
|
107
|
<template slot-scope="scope">
|
106
|
108
|
<div v-if="name==scope.row.user_name&&column_lie =='周三' ? true:false">
|
107
|
109
|
<div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
108
|
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
109
|
|
- circle @click.stop=""
|
|
110
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
111
|
+ circle @click.stop=""
|
110
|
112
|
></el-button>
|
111
|
113
|
</div>
|
112
|
114
|
</div>
|
|
@@ -129,8 +131,8 @@
|
129
|
131
|
<template slot-scope="scope">
|
130
|
132
|
<div v-if="name==scope.row.user_name&&column_lie =='周四' ? true:false">
|
131
|
133
|
<div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
132
|
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
133
|
|
- circle @click.stop=""
|
|
134
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
135
|
+ circle @click.stop=""
|
134
|
136
|
></el-button>
|
135
|
137
|
</div>
|
136
|
138
|
</div>
|
|
@@ -153,8 +155,8 @@
|
153
|
155
|
<template slot-scope="scope">
|
154
|
156
|
<div v-if="name==scope.row.user_name&&column_lie =='周五' ? true:false">
|
155
|
157
|
<div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
156
|
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
157
|
|
- circle @click.stop=""
|
|
158
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
159
|
+ circle @click.stop=""
|
158
|
160
|
></el-button>
|
159
|
161
|
</div>
|
160
|
162
|
</div>
|
|
@@ -177,8 +179,8 @@
|
177
|
179
|
<template slot-scope="scope">
|
178
|
180
|
<div v-if="name==scope.row.user_name&&column_lie =='周六' ? true:false">
|
179
|
181
|
<div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
180
|
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
181
|
|
- circle @click.stop=""
|
|
182
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
183
|
+ circle @click.stop=""
|
182
|
184
|
></el-button>
|
183
|
185
|
</div>
|
184
|
186
|
</div>
|
|
@@ -201,8 +203,8 @@
|
201
|
203
|
<template slot-scope="scope">
|
202
|
204
|
<div v-if="name==scope.row.user_name&&column_lie =='周日' ? true:false">
|
203
|
205
|
<div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
204
|
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
205
|
|
- circle @click.stop=""
|
|
206
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
207
|
+ circle @click.stop=""
|
206
|
208
|
></el-button>
|
207
|
209
|
</div>
|
208
|
210
|
</div>
|
|
@@ -400,7 +402,7 @@
|
400
|
402
|
<script>
|
401
|
403
|
const moment = require('moment')
|
402
|
404
|
import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
403
|
|
-import { getDoctorList,getScheduleList,addSchedule,getStaffScheduleList,getNextWeekList,getScheduleByDoctorId,toSearchScheduleList,DeleteStaffSchedule,copyStaffSchedule,UpdateContinusSchedule,SaveNurseSort,SaveIsSchedule } from '@/api/doctorSchedule'
|
|
405
|
+import { getDoctorList,getScheduleList,addSchedule,getStaffScheduleList,getNextWeekList,getScheduleByDoctorId,toSearchScheduleList,DeleteStaffSchedule,copyStaffSchedule,UpdateContinusSchedule,SaveNurseSort,SaveIsSchedule,DeleteStaffScheduleById } from '@/api/doctorSchedule'
|
404
|
406
|
import { constants } from 'crypto'
|
405
|
407
|
export default {
|
406
|
408
|
components:{
|
|
@@ -499,7 +501,7 @@ export default {
|
499
|
501
|
this.getStaffScheduleList()
|
500
|
502
|
|
501
|
503
|
var doctorlist = response.data.data.doctorlist
|
502
|
|
-
|
|
504
|
+
|
503
|
505
|
for(let i=0;i<doctorlist.length;i++){
|
504
|
506
|
if(doctorlist[i].sort == 0){
|
505
|
507
|
doctorlist[i].sort = ""
|
|
@@ -747,7 +749,7 @@ export default {
|
747
|
749
|
})
|
748
|
750
|
sevenStr = zeroStr
|
749
|
751
|
}
|
750
|
|
-
|
|
752
|
+
|
751
|
753
|
if(staffList[i].schedule_week == 1){
|
752
|
754
|
staffList[i].class_index = 1
|
753
|
755
|
var arr = []
|
|
@@ -859,7 +861,7 @@ export default {
|
859
|
861
|
fourStr = strFour
|
860
|
862
|
}
|
861
|
863
|
|
862
|
|
-
|
|
864
|
+
|
863
|
865
|
if(staffList[i].schedule_week == 5){
|
864
|
866
|
staffList[i].class_index = 5
|
865
|
867
|
|
|
@@ -917,10 +919,12 @@ export default {
|
917
|
919
|
sixStr = strSix
|
918
|
920
|
}
|
919
|
921
|
}
|
|
922
|
+
|
920
|
923
|
let tempArr = [], newArr = []
|
921
|
924
|
for (let i = 0; i < staffList.length; i++) {
|
922
|
925
|
if (tempArr.indexOf(staffList[i].user_name) == -1) {
|
923
|
926
|
newArr.push({
|
|
927
|
+ id:staffList[i].id,
|
924
|
928
|
user_name: staffList[i].user_name,
|
925
|
929
|
admin_user_id:staffList[i].admin_user_id,
|
926
|
930
|
user_type:staffList[i].doctor_type,
|
|
@@ -938,7 +942,7 @@ export default {
|
938
|
942
|
}
|
939
|
943
|
}
|
940
|
944
|
}
|
941
|
|
-
|
|
945
|
+
|
942
|
946
|
let arrTen = [...newArr]
|
943
|
947
|
console.log("newArr22o2o2o2o2wo",arrTen)
|
944
|
948
|
let newNurse = []
|
|
@@ -970,7 +974,7 @@ export default {
|
970
|
974
|
}
|
971
|
975
|
})
|
972
|
976
|
newNurse.sort(this.compare('sort'))
|
973
|
|
-
|
|
977
|
+
|
974
|
978
|
// //医生
|
975
|
979
|
newDoctor.sort(this.compare('admin_user_id'))
|
976
|
980
|
let newDoctorTableData = []
|
|
@@ -991,7 +995,7 @@ export default {
|
991
|
995
|
|
992
|
996
|
|
993
|
997
|
let arr2 = []
|
994
|
|
-
|
|
998
|
+
|
995
|
999
|
arr2.push({class_name:oneStr,schedule_week:1})
|
996
|
1000
|
arr2.push({class_name:twoStr,schedule_week:2})
|
997
|
1001
|
arr2.push({class_name:threeStr,schedule_week:3})
|
|
@@ -1007,12 +1011,12 @@ export default {
|
1007
|
1011
|
arr.push(obj)
|
1008
|
1012
|
|
1009
|
1013
|
let data = []
|
1010
|
|
-
|
|
1014
|
+
|
1011
|
1015
|
data.push(...newNurse)
|
1012
|
1016
|
data.push(...newDoctor)
|
1013
|
1017
|
data.push(obj)
|
1014
|
1018
|
console.log("data2o2oo2o2o2o22o",data)
|
1015
|
|
-
|
|
1019
|
+
|
1016
|
1020
|
// this.tableData = this.distinct(data)
|
1017
|
1021
|
this.tableData = data
|
1018
|
1022
|
|
|
@@ -2050,10 +2054,34 @@ export default {
|
2050
|
2054
|
return jsonData.map(v => filterVal.map(j => v[j]))
|
2051
|
2055
|
},
|
2052
|
2056
|
|
|
2057
|
+ toClick(row,index){
|
|
2058
|
+ this.$confirm(
|
|
2059
|
+ '是否要清除当前排班? <br>清除后,信息将无法恢复',
|
|
2060
|
+ '删除提示',
|
|
2061
|
+ {
|
|
2062
|
+ dangerouslyUseHTMLString: true,
|
|
2063
|
+ confirmButtonText: '确定',
|
|
2064
|
+ cancelButtonText: '取消',
|
|
2065
|
+ type: 'warning'
|
|
2066
|
+ }
|
|
2067
|
+ ).then(()=>{
|
|
2068
|
+
|
|
2069
|
+ DeleteStaffScheduleById(row.id).then(response=>{
|
|
2070
|
+ if(response.data.state == 1){
|
|
2071
|
+ var msg = response.data.data.msg
|
|
2072
|
+ this.$message.success("清除成功")
|
|
2073
|
+ this.getStaffScheduleList()
|
|
2074
|
+
|
|
2075
|
+ }
|
|
2076
|
+ })
|
|
2077
|
+ })
|
|
2078
|
+ }
|
|
2079
|
+
|
|
2080
|
+
|
2053
|
2081
|
hoverMouse(row,column, cell, event){
|
2054
|
2082
|
this.name=row.user_name
|
2055
|
2083
|
this.column_lie= column.label.split('\n')[0]
|
2056
|
|
-
|
|
2084
|
+
|
2057
|
2085
|
},
|
2058
|
2086
|
leavemouse(row, column, cell, event){
|
2059
|
2087
|
this.name=''
|