浏览代码

Merge branch 'online' of http://git.dayaedu.com/molingzhide/dy-admin-manager into online

lex-xin 4 年之前
父节点
当前提交
8cb142a328

文件差异内容过多而无法显示
+ 0 - 0
dist/index.html


+ 1 - 1
dist/static/css/chunk-774584f6.a7f73013.css → dist/static/css/chunk-098b7750.03911591.css

@@ -1 +1 @@
-.m-core[data-v-686283d2]{margin-top:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}.m-core .el-input[data-v-686283d2]{width:180px}.m-core h4[data-v-686283d2]{font-size:16px;background-color:#ccc;color:#fff;text-align:center;width:100%;height:40px;line-height:40px;margin-bottom:20px}.m-core .center[data-v-686283d2],.m-core .right[data-v-686283d2],.m-core .vipLeft[data-v-686283d2]{width:400px}.planList[data-v-686283d2]{padding:0 25px}.planList .planTop[data-v-686283d2]{height:40px;line-height:40px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #ccc;margin-top:20px}.planList .planTop>p[data-v-686283d2]{font-size:14px}.planList .planCore .row[data-v-686283d2]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:40px;line-height:40px;font-size:14px;text-align:center}.planList .planCore .row div[data-v-686283d2]{width:87px}.okBtn[data-v-686283d2]{width:120px;height:40px;line-height:40px;text-align:center;color:#fff;border-radius:4px;margin-right:20px;cursor:pointer;background-color:#f97215;float:right}
+.m-core[data-v-e75c1960]{margin-top:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}.m-core .el-input[data-v-e75c1960]{width:180px}.m-core h4[data-v-e75c1960]{font-size:16px;background-color:#ccc;color:#fff;text-align:center;width:100%;height:40px;line-height:40px;margin-bottom:20px}.m-core .center[data-v-e75c1960],.m-core .right[data-v-e75c1960],.m-core .vipLeft[data-v-e75c1960]{width:400px}.planList[data-v-e75c1960]{padding:0 25px}.planList .planTop[data-v-e75c1960]{height:40px;line-height:40px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #ccc;margin-top:20px}.planList .planTop>p[data-v-e75c1960]{font-size:14px}.planList .planCore .row[data-v-e75c1960]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:40px;line-height:40px;font-size:14px;text-align:center}.planList .planCore .row div[data-v-e75c1960]{width:87px}.okBtn[data-v-e75c1960]{width:120px;height:40px;line-height:40px;text-align:center;color:#fff;border-radius:4px;margin-right:20px;cursor:pointer;background-color:#f97215;float:right}

文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.f73050f4.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-098b7750.c4780b3e.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/chunk-774584f6.c7b23726.js


+ 14 - 9
src/views/buildVip/index.vue

@@ -1416,9 +1416,10 @@ export default {
               result.data.rows.forEach(item => {
                 this.studentList.unshift(item)
               })
+              this.studentList = this.deweight(this.studentList, "userId");
             }
             // this.studentList = this.studentList.concat(result.data.rows);
-            this.unique(this.studentList, "userId");
+
           }
         })
         // queryStudentList({ rows: 100, search: query }).then(res => {
@@ -1431,14 +1432,18 @@ export default {
       }
     },
     // 制定属性去重
-    unique (arr, u_key) {
-      let obj = {};
-      arr.reduce((prev, next) => {
-        obj[next[u_key] + typeof next[u_key]] ?
-          "" :
-          (obj[next[u_key] + typeof next[u_key]] = true && prev.push(next));
-        return prev;
-      }, []);
+    deweight (arr, key) {
+      let res = []
+      arr.forEach((item) => {
+        let list = []
+        res.forEach((resitem) => {
+          list.push(resitem[key])
+        })
+        if (list.indexOf(item[key]) === -1) {
+          res.push(item)
+        }
+      })
+      return res
     }
   }
   // watch: {

部分文件因为文件数量过多而无法显示