|
@@ -296,8 +296,11 @@ export default {
|
|
|
watch: {
|
|
|
keyWords(val) {
|
|
|
if (this.keyWords.length == 0) {
|
|
|
- const res = this.FormData.Unuselists;
|
|
|
- this.FormData.Unuselist = res;
|
|
|
+ this.getUserList({
|
|
|
+ QueryName: this.keyWords,
|
|
|
+ PageSize: this.PageSize,
|
|
|
+ PageIndex: 1,
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
keyWordsUp() {
|
|
@@ -374,13 +377,14 @@ export default {
|
|
|
GetUserList(obj)
|
|
|
.then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
+ this.arrList = [];
|
|
|
const datas = res.returnData.records;
|
|
|
const num = res.returnData.pages;
|
|
|
this.arrList.push(datas);
|
|
|
const arrs = this.arrList.flat();
|
|
|
const msgs = _.unionBy(arrs, "UserId");
|
|
|
this.FormData.Unuselist = msgs;
|
|
|
- this.FormData.Unuselists = msgs;
|
|
|
+ // this.FormData.Unuselists = msgs;
|
|
|
this.copyList = msgs;
|
|
|
this.FormData.Unuselist = this.FormData.Unuselist.filter(
|
|
|
(i) => i.UserName
|
|
@@ -388,6 +392,15 @@ export default {
|
|
|
this.FormData.Unuselist.forEach((res, index) => {
|
|
|
res.indexname = index;
|
|
|
});
|
|
|
+ if (this.FormData.UseLists.length > 0) {
|
|
|
+ this.FormData.UseLists.forEach((element) => {
|
|
|
+ this.FormData.Unuselist.forEach((res, index) => {
|
|
|
+ if (element.UserId == res.UserId) {
|
|
|
+ this.FormData.Unuselist.splice(index, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
this.FormData.Unuselists = this.FormData.Unuselists.filter(
|
|
|
(i) => i.UserName
|
|
|
);
|
|
@@ -460,6 +473,8 @@ export default {
|
|
|
this.keyWordsUp = this.keyWordsUp.replace(/\s+/g, "");
|
|
|
const search = this.keyWordsUp;
|
|
|
if (search) {
|
|
|
+ let res = this.FormData.UseLists;
|
|
|
+ this.FormData.UseList = res;
|
|
|
this.FormData.UseList = findarrays(
|
|
|
this.FormData.UseList,
|
|
|
"UserName",
|
|
@@ -472,18 +487,18 @@ export default {
|
|
|
getUserData(val) {
|
|
|
this.keyWords = this.keyWords.replace(/\s+/g, "");
|
|
|
const search = this.keyWords;
|
|
|
- // this.getUserList({
|
|
|
- // QueryName: this.keyWords,
|
|
|
- // PageSize: this.PageSize,
|
|
|
- // PageIndex: this.pageNum,
|
|
|
- // });
|
|
|
- if (search) {
|
|
|
- this.FormData.Unuselist = findarrays(
|
|
|
- this.FormData.Unuselist,
|
|
|
- "UserName",
|
|
|
- search
|
|
|
- );
|
|
|
- }
|
|
|
+ this.getUserList({
|
|
|
+ QueryName: this.keyWords,
|
|
|
+ PageSize: this.PageSize,
|
|
|
+ PageIndex: 1,
|
|
|
+ });
|
|
|
+ // if (search) {
|
|
|
+ // this.FormData.Unuselist = findarrays(
|
|
|
+ // this.FormData.Unuselist,
|
|
|
+ // "UserName",
|
|
|
+ // search
|
|
|
+ // );
|
|
|
+ // }
|
|
|
},
|
|
|
clearData() {
|
|
|
this.arrList = [];
|