Browse Source

更新代码

XMLWAN 4 years ago
parent
commit
226334bb4d
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/xt_pages/medicalScheduling/medical_print.vue

+ 8 - 2
src/xt_pages/medicalScheduling/medical_print.vue View File

@@ -112,6 +112,8 @@ export default {
112 112
                     list: [{class_name:staffList[i].class_name,schedule_week:staffList[i].schedule_week}]
113 113
                   })
114 114
                   tempArr.push(staffList[i].user_name);
115
+                  console.log("temArr",tempArr)
116
+                  console.log("newARR",newArr)
115 117
                 } else {
116 118
                   for (let j = 0; j < newArr.length; j++) {
117 119
                     if (newArr[j].user_name == staffList[i].user_name) {
@@ -121,12 +123,12 @@ export default {
121 123
                 }
122 124
               }
123 125
               let arr = [...newArr]
126
+              console.log("arr====",arr)
124 127
               this.doctorlist.map((item,index) => {
125 128
                 if(!(arr[index] && item.admin_user_id == arr[index].admin_user_id)){
126 129
                   arr.splice(index,0,{user_name:item.user_name,admin_user_id: item.admin_user_id,list: []})
127 130
                 }
128 131
               })
129
-              console.log(arr)
130 132
               this.tableData = arr
131 133
               
132 134
             }
@@ -163,7 +165,11 @@ export default {
163 165
         }
164 166
         var currentdate = year + seperator1 + month + seperator1 + strDate;
165 167
         return currentdate;
166
-      }
168
+      },
169
+     unique(arr) { 
170
+        const res = new Map();
171
+        return arr.filter((arr) => !res.has(arr.admin_user_id) && res.set(arr.admin_user_id, 1))
172
+     },
167 173
     },
168 174
     created(){
169 175
       var starttime =  this.$route.query.starttime