|
@@ -868,6 +868,21 @@ export default {
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ userIds: {
|
|
|
|
|
+ handler() {
|
|
|
|
|
+ if (this.form.userType === 1 && this.form.isUserLimit === 1) {
|
|
|
|
|
+ this.userChange();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ deep: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ 'form.isUserLimit'(val) {
|
|
|
|
|
+ if (val === 1 && this.form.userType === 1) {
|
|
|
|
|
+ this.userChange();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
created() {
|
|
created() {
|
|
|
informationList().then(response => {
|
|
informationList().then(response => {
|
|
|
this.informationList = response.data;
|
|
this.informationList = response.data;
|
|
@@ -1190,18 +1205,14 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
userChange(){
|
|
userChange(){
|
|
|
-
|
|
|
|
|
for (let i = 0; i < this.userIds.length; i++) {
|
|
for (let i = 0; i < this.userIds.length; i++) {
|
|
|
- if(!this.userLimitJson.find(item => item.userId == this.userIds[i])){
|
|
|
|
|
- this.userLimitJson.push({userId:this.userIds[i],limitCount:100})
|
|
|
|
|
- console.log(this.userLimitJson)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- for (let i = 0; i < this.userLimitJson.length; i++) {
|
|
|
|
|
- if(!this.userIds.find(item => item== this.userLimitJson[i].userId)){
|
|
|
|
|
- this.userLimitJson.splice(i,1)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (!this.userLimitJson.find(item => item.userId == this.userIds[i])) {
|
|
|
|
|
+ this.userLimitJson.push({ userId: this.userIds[i], limitCount: 100 });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ this.userLimitJson = this.userLimitJson.filter(item =>
|
|
|
|
|
+ this.userIds.some(id => id == item.userId)
|
|
|
|
|
+ );
|
|
|
},
|
|
},
|
|
|
showInput() {
|
|
showInput() {
|
|
|
this.inputVisible = true;
|
|
this.inputVisible = true;
|