|
|
|
|
42
|
</div>
|
42
|
</div>
|
43
|
<div class="schedulingTable" style="display:flex;justify-content: space-between;">
|
43
|
<div class="schedulingTable" style="display:flex;justify-content: space-between;">
|
44
|
<div style="width: 70%">
|
44
|
<div style="width: 70%">
|
45
|
- <el-table :data="tableData" border :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}" :row-style="{ color: '#303133' }" @cell-click="clickThis" :cell-style="tableCellStyle">
|
|
|
|
|
45
|
+ <el-table :data="tableData" border
|
|
|
46
|
+ :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
|
|
|
47
|
+ :row-style="{ color: '#303133' }" @cell-click="clickThis" :cell-style="tableCellStyle"
|
|
|
48
|
+ @cell-mouse-enter="hoverMouse" @cell-mouse-leave="leavemouse">
|
|
|
49
|
+ <!-- @cell-mouse-enter="hoverMouse" @cell-mouse-leave="leavemouse" -->
|
46
|
<el-table-column prop="name" label="医护姓名" style="width:16%" align="center">
|
50
|
<el-table-column prop="name" label="医护姓名" style="width:16%" align="center">
|
47
|
<template slot-scope="scope">
|
51
|
<template slot-scope="scope">
|
48
|
<span>{{scope.row.user_name}}</span>
|
52
|
<span>{{scope.row.user_name}}</span>
|
|
|
|
|
50
|
</el-table-column>
|
54
|
</el-table-column>
|
51
|
<el-table-column :label="'周一\n(' + weekDayArr[0] + ')'" style="width:200px" align="center">
|
55
|
<el-table-column :label="'周一\n(' + weekDayArr[0] + ')'" style="width:200px" align="center">
|
52
|
<template slot-scope="scope">
|
56
|
<template slot-scope="scope">
|
|
|
57
|
+ <div v-if="name==scope.row.user_name&&column_lie =='周一' ? true:false">
|
|
|
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=""
|
|
|
61
|
+ ></el-button>
|
|
|
62
|
+ </div>
|
53
|
<div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
63
|
<div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
54
|
<el-button type="danger" size="mini" icon="el-icon-close" circle @click.stop="toClick(scope.row,scope.$index)"></el-button>
|
64
|
<el-button type="danger" size="mini" icon="el-icon-close" circle @click.stop="toClick(scope.row,scope.$index)"></el-button>
|
55
|
</div>
|
65
|
</div>
|
56
|
<div @click="hangdleClick(scope.row,scope.$index,0)">
|
66
|
<div @click="hangdleClick(scope.row,scope.$index,0)">
|
57
|
- <el-dropdown trigger="click" @command="changeSchedule">
|
|
|
|
|
67
|
+ <el-dropdown trigger="click" @command="changeSchedule" >
|
58
|
<span class="el-dropdown-link" v-if='getClassAttributes(scope.row.user_name,1) == 2' style="color:red">
|
68
|
<span class="el-dropdown-link" v-if='getClassAttributes(scope.row.user_name,1) == 2' style="color:red">
|
59
|
<span>{{ getClass(scope.row.user_name,1) }}</span><i v-if="getTimestamp(weekDayArr[0])>=timeNow && scope.row.admin_user_id!=1000000?true:false" class="el-icon-arrow-down el-icon--right"></i>
|
69
|
<span>{{ getClass(scope.row.user_name,1) }}</span><i v-if="getTimestamp(weekDayArr[0])>=timeNow && scope.row.admin_user_id!=1000000?true:false" class="el-icon-arrow-down el-icon--right"></i>
|
60
|
</span>
|
70
|
</span>
|
|
|
|
|
70
|
</el-table-column>
|
80
|
</el-table-column>
|
71
|
<el-table-column prop="name" :label="'周二\n(' + weekDayArr[1] + ')'" style="width:14%" align="center">
|
81
|
<el-table-column prop="name" :label="'周二\n(' + weekDayArr[1] + ')'" style="width:14%" align="center">
|
72
|
<template slot-scope="scope">
|
82
|
<template slot-scope="scope">
|
73
|
- <div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
74
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
75
|
- circle @click.stop=""
|
|
|
|
|
83
|
+ <div v-if="name==scope.row.user_name&&column_lie =='周二' ? true:false">
|
|
|
84
|
+ <div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
85
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
86
|
+ circle @click.stop=""
|
76
|
></el-button>
|
87
|
></el-button>
|
77
|
</div>
|
88
|
</div>
|
|
|
89
|
+ </div>
|
|
|
90
|
+
|
78
|
<div @click="hangdleClick(scope.row,scope.$index,1)">
|
91
|
<div @click="hangdleClick(scope.row,scope.$index,1)">
|
79
|
<el-dropdown trigger="click" @command="changeSchedule">
|
92
|
<el-dropdown trigger="click" @command="changeSchedule">
|
80
|
<span class="el-dropdown-link" v-if='getClassAttributes(scope.row.user_name,2) == 2' style="color:red">
|
93
|
<span class="el-dropdown-link" v-if='getClassAttributes(scope.row.user_name,2) == 2' style="color:red">
|
|
|
|
|
92
|
</el-table-column>
|
105
|
</el-table-column>
|
93
|
<el-table-column prop="name" :label="'周三\n(' + weekDayArr[2] + ')'" style="width:14%" align="center">
|
106
|
<el-table-column prop="name" :label="'周三\n(' + weekDayArr[2] + ')'" style="width:14%" align="center">
|
94
|
<template slot-scope="scope">
|
107
|
<template slot-scope="scope">
|
95
|
- <div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
96
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
97
|
- circle @click.stop=""
|
|
|
98
|
- ></el-button>
|
|
|
|
|
108
|
+ <div v-if="name==scope.row.user_name&&column_lie =='周三' ? true:false">
|
|
|
109
|
+ <div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
110
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
111
|
+ circle @click.stop=""
|
|
|
112
|
+ ></el-button>
|
|
|
113
|
+ </div>
|
99
|
</div>
|
114
|
</div>
|
100
|
<div @click="hangdleClick(scope.row,scope.$index,2)">
|
115
|
<div @click="hangdleClick(scope.row,scope.$index,2)">
|
101
|
<el-dropdown trigger="click" @command="changeSchedule">
|
116
|
<el-dropdown trigger="click" @command="changeSchedule">
|
|
|
|
|
114
|
</el-table-column>
|
129
|
</el-table-column>
|
115
|
<el-table-column prop="name" :label="'周四\n(' + weekDayArr[3] + ')'" style="width:14%" align="center">
|
130
|
<el-table-column prop="name" :label="'周四\n(' + weekDayArr[3] + ')'" style="width:14%" align="center">
|
116
|
<template slot-scope="scope">
|
131
|
<template slot-scope="scope">
|
117
|
- <div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
118
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
119
|
- circle @click.stop=""
|
|
|
120
|
- ></el-button>
|
|
|
|
|
132
|
+ <div v-if="name==scope.row.user_name&&column_lie =='周四' ? true:false">
|
|
|
133
|
+ <div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
134
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
135
|
+ circle @click.stop=""
|
|
|
136
|
+ ></el-button>
|
|
|
137
|
+ </div>
|
121
|
</div>
|
138
|
</div>
|
122
|
<div @click="hangdleClick(scope.row,scope.$index,3)">
|
139
|
<div @click="hangdleClick(scope.row,scope.$index,3)">
|
123
|
<el-dropdown trigger="click" @command="changeSchedule">
|
140
|
<el-dropdown trigger="click" @command="changeSchedule">
|
|
|
|
|
136
|
</el-table-column>
|
153
|
</el-table-column>
|
137
|
<el-table-column prop="name" :label="'周五\n(' + weekDayArr[4] + ')'" style="width:14%" align="center">
|
154
|
<el-table-column prop="name" :label="'周五\n(' + weekDayArr[4] + ')'" style="width:14%" align="center">
|
138
|
<template slot-scope="scope">
|
155
|
<template slot-scope="scope">
|
139
|
- <div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
140
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
141
|
- circle @click.stop=""
|
|
|
142
|
- ></el-button>
|
|
|
|
|
156
|
+ <div v-if="name==scope.row.user_name&&column_lie =='周五' ? true:false">
|
|
|
157
|
+ <div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
158
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
159
|
+ circle @click.stop=""
|
|
|
160
|
+ ></el-button>
|
|
|
161
|
+ </div>
|
143
|
</div>
|
162
|
</div>
|
144
|
<div @click="hangdleClick(scope.row,scope.$index,4)">
|
163
|
<div @click="hangdleClick(scope.row,scope.$index,4)">
|
145
|
<el-dropdown trigger="click" @command="changeSchedule">
|
164
|
<el-dropdown trigger="click" @command="changeSchedule">
|
|
|
|
|
158
|
</el-table-column>
|
177
|
</el-table-column>
|
159
|
<el-table-column prop="name" :label="'周六\n(' + weekDayArr[5] + ')'" style="width:14%" align="center">
|
178
|
<el-table-column prop="name" :label="'周六\n(' + weekDayArr[5] + ')'" style="width:14%" align="center">
|
160
|
<template slot-scope="scope">
|
179
|
<template slot-scope="scope">
|
161
|
- <div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
162
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
163
|
- circle @click.stop=""
|
|
|
164
|
- ></el-button>
|
|
|
|
|
180
|
+ <div v-if="name==scope.row.user_name&&column_lie =='周六' ? true:false">
|
|
|
181
|
+ <div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
182
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
183
|
+ circle @click.stop=""
|
|
|
184
|
+ ></el-button>
|
|
|
185
|
+ </div>
|
165
|
</div>
|
186
|
</div>
|
166
|
<div @click="hangdleClick(scope.row,scope.$index,5)">
|
187
|
<div @click="hangdleClick(scope.row,scope.$index,5)">
|
167
|
<el-dropdown trigger="click" @command="changeSchedule">
|
188
|
<el-dropdown trigger="click" @command="changeSchedule">
|
|
|
|
|
180
|
</el-table-column>
|
201
|
</el-table-column>
|
181
|
<el-table-column prop="name" :label="'周日\n(' + weekDayArr[6] + ')'" style="width:14%" align="center">
|
202
|
<el-table-column prop="name" :label="'周日\n(' + weekDayArr[6] + ')'" style="width:14%" align="center">
|
182
|
<template slot-scope="scope">
|
203
|
<template slot-scope="scope">
|
183
|
- <div class="del_table_btn" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
184
|
- <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
185
|
- circle @click.stop=""
|
|
|
186
|
- ></el-button>
|
|
|
|
|
204
|
+ <div v-if="name==scope.row.user_name&&column_lie =='周日' ? true:false">
|
|
|
205
|
+ <div class="del_table_btns" v-show="scope.row.user_name=='合计'? false : true">
|
|
|
206
|
+ <el-button type="danger" size="mini" icon="el-icon-close"
|
|
|
207
|
+ circle @click.stop=""
|
|
|
208
|
+ ></el-button>
|
|
|
209
|
+ </div>
|
187
|
</div>
|
210
|
</div>
|
188
|
<div @click="hangdleClick(scope.row,scope.$index,6)">
|
211
|
<div @click="hangdleClick(scope.row,scope.$index,6)">
|
189
|
<el-dropdown trigger="click" @command="changeSchedule">
|
212
|
<el-dropdown trigger="click" @command="changeSchedule">
|
|
|
|
|
444
|
nurseTableData:[],
|
467
|
nurseTableData:[],
|
445
|
doctorTableData:[],
|
468
|
doctorTableData:[],
|
446
|
exportDialogVisible:false,
|
469
|
exportDialogVisible:false,
|
447
|
- month_time:""
|
|
|
|
|
470
|
+ month_time:"",
|
|
|
471
|
+ name:'',
|
|
|
472
|
+ column_lie:''
|
448
|
}
|
473
|
}
|
449
|
},
|
474
|
},
|
450
|
methods:{
|
475
|
methods:{
|
|
|
|
|
476
|
this.getStaffScheduleList()
|
501
|
this.getStaffScheduleList()
|
477
|
|
502
|
|
478
|
var doctorlist = response.data.data.doctorlist
|
503
|
var doctorlist = response.data.data.doctorlist
|
479
|
-
|
|
|
|
|
504
|
+
|
480
|
for(let i=0;i<doctorlist.length;i++){
|
505
|
for(let i=0;i<doctorlist.length;i++){
|
481
|
if(doctorlist[i].sort == 0){
|
506
|
if(doctorlist[i].sort == 0){
|
482
|
doctorlist[i].sort = ""
|
507
|
doctorlist[i].sort = ""
|
|
|
|
|
724
|
})
|
749
|
})
|
725
|
sevenStr = zeroStr
|
750
|
sevenStr = zeroStr
|
726
|
}
|
751
|
}
|
727
|
-
|
|
|
|
|
752
|
+
|
728
|
if(staffList[i].schedule_week == 1){
|
753
|
if(staffList[i].schedule_week == 1){
|
729
|
staffList[i].class_index = 1
|
754
|
staffList[i].class_index = 1
|
730
|
var arr = []
|
755
|
var arr = []
|
|
|
|
|
836
|
fourStr = strFour
|
861
|
fourStr = strFour
|
837
|
}
|
862
|
}
|
838
|
|
863
|
|
839
|
-
|
|
|
|
|
864
|
+
|
840
|
if(staffList[i].schedule_week == 5){
|
865
|
if(staffList[i].schedule_week == 5){
|
841
|
staffList[i].class_index = 5
|
866
|
staffList[i].class_index = 5
|
842
|
|
867
|
|
|
|
|
|
894
|
sixStr = strSix
|
919
|
sixStr = strSix
|
895
|
}
|
920
|
}
|
896
|
}
|
921
|
}
|
897
|
-
|
|
|
|
|
922
|
+
|
898
|
let tempArr = [], newArr = []
|
923
|
let tempArr = [], newArr = []
|
899
|
for (let i = 0; i < staffList.length; i++) {
|
924
|
for (let i = 0; i < staffList.length; i++) {
|
900
|
if (tempArr.indexOf(staffList[i].user_name) == -1) {
|
925
|
if (tempArr.indexOf(staffList[i].user_name) == -1) {
|
|
|
|
|
917
|
}
|
942
|
}
|
918
|
}
|
943
|
}
|
919
|
}
|
944
|
}
|
920
|
-
|
|
|
|
|
945
|
+
|
921
|
let arrTen = [...newArr]
|
946
|
let arrTen = [...newArr]
|
922
|
console.log("newArr22o2o2o2o2wo",arrTen)
|
947
|
console.log("newArr22o2o2o2o2wo",arrTen)
|
923
|
let newNurse = []
|
948
|
let newNurse = []
|
|
|
|
|
949
|
}
|
974
|
}
|
950
|
})
|
975
|
})
|
951
|
newNurse.sort(this.compare('sort'))
|
976
|
newNurse.sort(this.compare('sort'))
|
952
|
-
|
|
|
|
|
977
|
+
|
953
|
// //医生
|
978
|
// //医生
|
954
|
newDoctor.sort(this.compare('admin_user_id'))
|
979
|
newDoctor.sort(this.compare('admin_user_id'))
|
955
|
let newDoctorTableData = []
|
980
|
let newDoctorTableData = []
|
|
|
|
|
970
|
|
995
|
|
971
|
|
996
|
|
972
|
let arr2 = []
|
997
|
let arr2 = []
|
973
|
-
|
|
|
|
|
998
|
+
|
974
|
arr2.push({class_name:oneStr,schedule_week:1})
|
999
|
arr2.push({class_name:oneStr,schedule_week:1})
|
975
|
arr2.push({class_name:twoStr,schedule_week:2})
|
1000
|
arr2.push({class_name:twoStr,schedule_week:2})
|
976
|
arr2.push({class_name:threeStr,schedule_week:3})
|
1001
|
arr2.push({class_name:threeStr,schedule_week:3})
|
|
|
|
|
986
|
arr.push(obj)
|
1011
|
arr.push(obj)
|
987
|
|
1012
|
|
988
|
let data = []
|
1013
|
let data = []
|
989
|
-
|
|
|
|
|
1014
|
+
|
990
|
data.push(...newNurse)
|
1015
|
data.push(...newNurse)
|
991
|
data.push(...newDoctor)
|
1016
|
data.push(...newDoctor)
|
992
|
data.push(obj)
|
1017
|
data.push(obj)
|
993
|
console.log("data2o2oo2o2o2o22o",data)
|
1018
|
console.log("data2o2oo2o2o2o22o",data)
|
994
|
-
|
|
|
|
|
1019
|
+
|
995
|
// this.tableData = this.distinct(data)
|
1020
|
// this.tableData = this.distinct(data)
|
996
|
this.tableData = data
|
1021
|
this.tableData = data
|
997
|
|
1022
|
|
|
|
|
|
2040
|
type: 'warning'
|
2065
|
type: 'warning'
|
2041
|
}
|
2066
|
}
|
2042
|
).then(()=>{
|
2067
|
).then(()=>{
|
2043
|
-
|
|
|
|
|
2068
|
+
|
2044
|
DeleteStaffScheduleById(row.id).then(response=>{
|
2069
|
DeleteStaffScheduleById(row.id).then(response=>{
|
2045
|
if(response.data.state == 1){
|
2070
|
if(response.data.state == 1){
|
2046
|
var msg = response.data.data.msg
|
2071
|
var msg = response.data.data.msg
|
2047
|
this.$message.success("清除成功")
|
2072
|
this.$message.success("清除成功")
|
2048
|
this.getStaffScheduleList()
|
2073
|
this.getStaffScheduleList()
|
2049
|
-
|
|
|
|
|
2074
|
+
|
2050
|
}
|
2075
|
}
|
2051
|
})
|
2076
|
})
|
2052
|
})
|
2077
|
})
|
2053
|
}
|
2078
|
}
|
2054
|
|
2079
|
|
2055
|
|
2080
|
|
|
|
2081
|
+ hoverMouse(row,column, cell, event){
|
|
|
2082
|
+ this.name=row.user_name
|
|
|
2083
|
+ this.column_lie= column.label.split('\n')[0]
|
|
|
2084
|
+
|
|
|
2085
|
+ },
|
|
|
2086
|
+ leavemouse(row, column, cell, event){
|
|
|
2087
|
+ this.name=''
|
|
|
2088
|
+ }
|
2056
|
},
|
2089
|
},
|
2057
|
created(){
|
2090
|
created(){
|
2058
|
//获取医护人员
|
2091
|
//获取医护人员
|
|
|
|
|
2145
|
max-height:96%;
|
2178
|
max-height:96%;
|
2146
|
overflow-y: auto;
|
2179
|
overflow-y: auto;
|
2147
|
}
|
2180
|
}
|
2148
|
-.del_table_btn {
|
|
|
|
|
2181
|
+.del_table_btns {
|
2149
|
position: absolute;
|
2182
|
position: absolute;
|
2150
|
right: 0px;
|
2183
|
right: 0px;
|
2151
|
top: -3px;
|
2184
|
top: -3px;
|