|
@@ -99,15 +99,15 @@
|
|
|
v-model.trim="keyWordsUp"
|
|
|
@keyup.enter.native="queryDatas"
|
|
|
></el-input>
|
|
|
- <el-button @click="queryDatas()">搜索</el-button>
|
|
|
+ <el-button @click="queryDatas">搜索</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="center-box fpBox">
|
|
|
<el-row class="scCont" :gutter="16">
|
|
|
<el-col
|
|
|
:span="4"
|
|
|
- v-for="(item, index) in FormData.UseList"
|
|
|
- :key="index"
|
|
|
+ v-for="item in FormData.UseList"
|
|
|
+ :key="item.UserId"
|
|
|
>
|
|
|
<el-card class="box-card">
|
|
|
<div class="lineTop"></div>
|
|
@@ -130,7 +130,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-empty
|
|
|
- v-if="FormData.UseList.length == 0"
|
|
|
+ v-if="FormData.UseList && FormData.UseList.length == 0"
|
|
|
description="没有选取"
|
|
|
style="margin: 0 auto"
|
|
|
></el-empty>
|
|
@@ -147,7 +147,7 @@
|
|
|
v-model.trim="keyWords"
|
|
|
@keyup.enter.native="queryData"
|
|
|
></el-input>
|
|
|
- <el-button @click="queryData()">搜索</el-button>
|
|
|
+ <el-button @click="queryData">搜索</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="center-box">
|
|
@@ -178,7 +178,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-empty
|
|
|
- v-if="FormData.Unuselist.length == 0"
|
|
|
+ v-if="FormData.Unuselist && FormData.Unuselist.length == 0"
|
|
|
description="没有内容"
|
|
|
style="margin: 0 auto"
|
|
|
></el-empty>
|
|
@@ -289,14 +289,19 @@ export default {
|
|
|
},
|
|
|
components: { Dialog },
|
|
|
watch: {
|
|
|
- keyWords(val) {
|
|
|
- if (this.keyWords.length == 0) {
|
|
|
- this.FormData.Unuselist = this.FormData.Unuselists;
|
|
|
+ keyWords: {
|
|
|
+ handler(val) {
|
|
|
+ if (val.length == 0) {
|
|
|
+ this.FormData.Unuselist = this.FormData.Unuselists;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- keyWordsUp() {
|
|
|
- if (this.keyWordsUp.length == 0) {
|
|
|
- this.FormData.UseList = this.FormData.UseLists;
|
|
|
+ keyWordsUp: {
|
|
|
+ handler(val) {
|
|
|
+ if (val.length == 0) {
|
|
|
+ console.log(this.FormData)
|
|
|
+ this.FormData.UseList = this.FormData.UseLists;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -426,6 +431,7 @@ export default {
|
|
|
that.FormData.Unuselist.forEach((res, index) => {
|
|
|
res.indexname = index;
|
|
|
});
|
|
|
+ that.FormData.UseLists = that.FormData.UseList;
|
|
|
that.FormData.Unuselists = that.FormData.Unuselist;
|
|
|
that.Unuselist = that.FormData.Unuselist;
|
|
|
that.boxArr = _.cloneDeep(that.FormData.Unuselist);
|
|
@@ -460,7 +466,7 @@ export default {
|
|
|
this.FormData.UseList.splice(index, 1);
|
|
|
// this.FormData.UseLists.splice(index, 1);
|
|
|
this.FormData.UseLists = this.FormData.UseLists.filter(
|
|
|
- (i) => i.UserName !== val.UserName
|
|
|
+ (i) => i.UserId !== val.UserId
|
|
|
);
|
|
|
},
|
|
|
dataChange: function (data) {
|