|
@@ -107,6 +107,7 @@ export default {
|
107
|
107
|
for (let i = 0; i < staffList.length; i++) {
|
108
|
108
|
if(tempArr.indexOf(staffList[i].user_name) === -1) {
|
109
|
109
|
newArr.push({
|
|
110
|
+ user_type:staffList[i].doctor_type,
|
110
|
111
|
user_name: staffList[i].user_name,
|
111
|
112
|
admin_user_id:staffList[i].admin_user_id,
|
112
|
113
|
list: [{class_name:staffList[i].class_name,schedule_week:staffList[i].schedule_week}]
|
|
@@ -115,7 +116,7 @@ export default {
|
115
|
116
|
} else {
|
116
|
117
|
for (let j = 0; j < newArr.length; j++) {
|
117
|
118
|
if (newArr[j].user_name == staffList[i].user_name) {
|
118
|
|
- newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week})
|
|
119
|
+ newArr[j].list.push({class_name:staffList[i].class_name,admin_user_id:staffList[i].admin_user_id,schedule_week:staffList[i].schedule_week,user_type:staffList[i].doctor_type})
|
119
|
120
|
}
|
120
|
121
|
}
|
121
|
122
|
}
|
|
@@ -127,10 +128,11 @@ export default {
|
127
|
128
|
if (arr[index] && item.admin_user_id == arr[index].admin_user_id) {
|
128
|
129
|
|
129
|
130
|
}else{
|
130
|
|
- arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: []})
|
|
131
|
+ arr.splice(index, 0, {user_name: item.user_name, admin_user_id: item.admin_user_id, list: [],user_type:item.user_type})
|
131
|
132
|
// console.log("arr",arr)
|
132
|
133
|
}
|
133
|
134
|
})
|
|
135
|
+ arr.sort(this.compare('user_type'))
|
134
|
136
|
this.tableData = arr
|
135
|
137
|
|
136
|
138
|
}
|
|
@@ -172,7 +174,7 @@ export default {
|
172
|
174
|
return function(a,b){
|
173
|
175
|
var value1 = a[property];
|
174
|
176
|
var value2 = b[property];
|
175
|
|
- return value1 - value2;
|
|
177
|
+ return value2 - value1;
|
176
|
178
|
}
|
177
|
179
|
},
|
178
|
180
|
},
|