Browse Source

Merge branch '20200710_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20200710_pc_vue_new_branch

See999 4 years ago
parent
commit
ad7f978d7a
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/xt_pages/medicalScheduling/medical_print.vue

+ 5 - 3
src/xt_pages/medicalScheduling/medical_print.vue View File

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