25609
This commit is contained in:
		| @@ -39,8 +39,8 @@ | |||||||
|       </ai-search-bar> |       </ai-search-bar> | ||||||
|       <ai-search-bar> |       <ai-search-bar> | ||||||
|         <template slot="left"> |         <template slot="left"> | ||||||
|           <el-button type="primary" icon="iconfont iconAdd" @click="isShow = true" :disabled="!ids.length">批量打标签</el-button> |           <el-button type="primary" icon="iconfont iconAdd" @click="isRemove = false, isShow = true" :disabled="!ids.length">批量打标签</el-button> | ||||||
|           <!-- <el-button type="primary" icon="iconfont iconDelete" @click="onConfirm(1)" :disabled="!ids.length">批量移除群标签</el-button> --> |           <el-button type="primary" icon="iconfont iconDelete" @click="isRemove = true, isShow = true" :disabled="!ids.length">批量移除标签</el-button> | ||||||
|         </template> |         </template> | ||||||
|         <template slot="right"> |         <template slot="right"> | ||||||
|           <el-button type="primary" icon="iconfont iconResetting" @click="update" :loading="btnLoading">更新数据</el-button> |           <el-button type="primary" icon="iconfont iconResetting" @click="update" :loading="btnLoading">更新数据</el-button> | ||||||
| @@ -100,7 +100,7 @@ | |||||||
|       <ai-dialog |       <ai-dialog | ||||||
|         :visible.sync="isShow" |         :visible.sync="isShow" | ||||||
|         width="800px" |         width="800px" | ||||||
|         title="批量打标签" |         :title="isRemove ? '批量移除标签' : '批量打标签'" | ||||||
|         @close="onClose" |         @close="onClose" | ||||||
|         @onConfirm="onConfirm"> |         @onConfirm="onConfirm"> | ||||||
|         <div class="tags"> |         <div class="tags"> | ||||||
| @@ -143,6 +143,7 @@ | |||||||
|           wxUserId: '', |           wxUserId: '', | ||||||
|           isRealName: '' |           isRealName: '' | ||||||
|         }, |         }, | ||||||
|  |         isRemove: false, | ||||||
|         btnLoading: false, |         btnLoading: false, | ||||||
|         isLoading: false, |         isLoading: false, | ||||||
|         isShow: false, |         isShow: false, | ||||||
| @@ -277,15 +278,29 @@ | |||||||
|           return this.$message.error('请选择标签') |           return this.$message.error('请选择标签') | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         this.instance.post(`/app/wxcp/wxcorptag/markTagForWeb`, { |         if (this.isRemove) { | ||||||
|           addTagIds: this.chooseTags, |           this.instance.post(`/app/wxcp/wxcorptag/markTagForWeb`, { | ||||||
|           customerIds: this.ids.map(v => v.id) |             delTagIds: this.chooseTags, | ||||||
|         }).then(res => { |             customerIds: this.ids.map(v => v.id) | ||||||
|           if (res.code == 0) { |           }).then(res => { | ||||||
|             this.isShow = false |             if (res.code == 0) { | ||||||
|             this.getList() |               this.isShow = false | ||||||
|           } |               this.$message.success('移除成功') | ||||||
|         }) |               this.getList() | ||||||
|  |             } | ||||||
|  |           }) | ||||||
|  |         } else { | ||||||
|  |           this.instance.post(`/app/wxcp/wxcorptag/markTagForWeb`, { | ||||||
|  |             addTagIds: this.chooseTags, | ||||||
|  |             customerIds: this.ids.map(v => v.id) | ||||||
|  |           }).then(res => { | ||||||
|  |             if (res.code == 0) { | ||||||
|  |               this.isShow = false | ||||||
|  |               this.getList() | ||||||
|  |               this.$message.success('添加标签成功') | ||||||
|  |             } | ||||||
|  |           }) | ||||||
|  |         } | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|       getTags () { |       getTags () { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user