|
@@ -302,11 +302,24 @@ export default {
|
|
|
if (val.length == 0) {
|
|
|
const res = this.FormData.UseLists;
|
|
|
this.FormData.UseList = res;
|
|
|
+ console.log(this.FormData.UseLists);
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ RemoveArr(arr) {
|
|
|
+ for (var i = 0; i < arr.length; i++) {
|
|
|
+ for (var j = i + 1; j < arr.length; ) {
|
|
|
+ if (arr[i].UserId == arr[j].UserId) {
|
|
|
+ arr.splice(j, 1);
|
|
|
+ } else {
|
|
|
+ j++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return arr;
|
|
|
+ },
|
|
|
compare(property) {
|
|
|
return function (a, b) {
|
|
|
var value1 = a[property];
|
|
@@ -326,7 +339,8 @@ export default {
|
|
|
search
|
|
|
);
|
|
|
} else {
|
|
|
- this.FormData.UseList = this.FormData.UseLists;
|
|
|
+ const res = this.FormData.UseLists;
|
|
|
+ this.FormData.UseList = res;
|
|
|
}
|
|
|
},
|
|
|
queryData() {
|
|
@@ -453,7 +467,8 @@ export default {
|
|
|
that.FormData.Unuselist.forEach((res, index) => {
|
|
|
res.indexname = index;
|
|
|
});
|
|
|
- that.FormData.UseLists = that.FormData.UseList;
|
|
|
+ const res = that.FormData.UseList;
|
|
|
+ that.FormData.UseLists = res;
|
|
|
that.FormData.Unuselists = that.FormData.Unuselist;
|
|
|
that.Unuselist = that.FormData.Unuselist;
|
|
|
that.boxArr = _.cloneDeep(that.FormData.Unuselist);
|
|
@@ -469,6 +484,12 @@ export default {
|
|
|
this.checkList = false;
|
|
|
this.FormData.UseList.push(val);
|
|
|
this.FormData.UseLists.push(val);
|
|
|
+ this.FormData.UseLists = this.RemoveArr(this.FormData.UseLists);
|
|
|
+ // this.FormData.UseLists.forEach((res) => {
|
|
|
+ // if (res.UserId !== val.UserId) {
|
|
|
+ // this.FormData.UseLists.push(val);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
// const res = this.FormData.UseList;
|
|
|
// this.FormData.UseLists = res;
|
|
|
this.FormData.Unuselist.splice(index, 1);
|