Commit 75f9eea1 by chenwq

客户弹窗-标签清空

1 parent bcf2709e
......@@ -19,7 +19,7 @@
<div v-show="editForm.customerInfoList.length != 0" class="customer-box m-t-10">
<div class="customer-title">{{ condLimitObj.hasQw ? '已加' : '没加' }}企微/{{ condLimitObj.hasPhone ? '有' : '没有' }}手机号:{{ editForm.customerInfoList.length }}人</div>
<div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag v-for="(item, idx) in editForm.customerInfoList" :key="idx" :size="size" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" @close="handleDeleteCustomer(idx)">
<el-tag v-for="(item, idx) in editForm.customerInfoList" :key="idx" class="customer-tag" :size="size" type="info" :closable="!scope.scope.isDisabled" :disable-transitions="false" @close="handleDeleteCustomer(idx)">
<i class="el-icon-user-solid"></i>
{{ item.customerName }}
</el-tag>
......@@ -270,7 +270,7 @@ export default {
// 选择标签
handleSelect(obj) {
this.tagging = obj.selectedLabelList
// this.tagging = obj.selectedLabelList
this.editForm.customerInfoList = obj.selectedCustomerList
this.condLimitObj = obj.condLimitObj
if (this.markCondLimitObj.hasQw != -1) {
......@@ -282,19 +282,19 @@ export default {
hasQw: this.condLimitObj.hasQw,
hasPhone: this.condLimitObj.hasPhone
}
let arr = []
this.tagging.forEach(item => {
item.labelList.forEach(tag => {
arr.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
labelId: tag.id,
labelName: tag.name,
groupType: item.labelType
})
})
})
this.taggingList = arr
// let arr = []
// this.tagging.forEach(item => {
// item.labelList.forEach(tag => {
// arr.push({
// groupId: item.labelGroup.id,
// groupName: item.labelGroup.name,
// labelId: tag.id,
// labelName: tag.name,
// groupType: item.labelType
// })
// })
// })
// this.taggingList = arr
this.key = new Date()
this.$refs.editFormRef.$refs[this.editChildRef].validateField('customerInfoList')
},
......@@ -309,13 +309,13 @@ export default {
console.log(action)
if (action == 'confirm') {
this.isTagVisible = !this.isTagVisible
this.$refs.selectLabel.init({ condLimitObj: this.condLimitObj, tagList: this.tagging, customerInfoList: this.editForm.customerInfoList, activeName: 'customer' })
this.$refs.selectLabel.init({ condLimitObj: this.condLimitObj, tagList: [], customerInfoList: this.editForm.customerInfoList, activeName: 'customer' })
}
}
})
} else {
this.isTagVisible = !this.isTagVisible
this.$refs.selectLabel.init({ condLimitObj: this.condLimitObj, tagList: this.tagging, customerInfoList: this.editForm.customerInfoList, activeName: 'customer' })
this.$refs.selectLabel.init({ condLimitObj: this.condLimitObj, tagList: [], customerInfoList: this.editForm.customerInfoList, activeName: 'customer' })
}
},
......@@ -538,6 +538,9 @@ export default {
display: flex;
align-items: center;
font-size: 14px;
.customer-tag {
margin: 4px;
}
i {
color: #75acff;
margin-right: 3px;
......
......@@ -16,7 +16,7 @@
<div class="selected-list">
<p class="list-title p-16">已选({{ selectedSum }})</p>
<div class="list-customers" :style="{ height: heightBox + 'px' }">
<el-tag v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false">
<el-tag class="customer-tag" v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ item.customerName }}
</el-tag>
......@@ -298,6 +298,9 @@ export default {
// height: 61vh;
padding: 10px;
overflow-y: scroll;
.customer-tag {
margin: 4px;
}
}
.customer-box {
padding: 16px;
......
......@@ -145,11 +145,13 @@ export default {
},
init(item) {
this.labelGroupName = ''
this.dialogVisible = true
this.selectedCustomerList = item.customerInfoList ? JSON.parse(JSON.stringify(item.customerInfoList)) : []
this.condLimitObj = JSON.parse(JSON.stringify(item.condLimitObj))
this.querylabeltree(item.tagList)
this.labelTreeRetSelect = item.tagList
this.selectedLabelList = item.tagList
this.activeName = item.activeName
this.dialogVisible = true
},
handleSearch() {
this.searchStatus = true
......@@ -275,7 +277,7 @@ export default {
}
// 客户
this.activeName = 'tag'
this.$emit('tagSelected', { selectedLabelList: this.selectedLabelList, selectedCustomerList: this.$refs.customerRef.selectedCustomerList, condLimitObj: this.$refs.customerRef.condLimitObj })
this.$emit('tagSelected', { selectedLabelList: [], selectedCustomerList: this.$refs.customerRef.selectedCustomerList, condLimitObj: this.$refs.customerRef.condLimitObj })
this.dialogVisible = false
},
handleReset() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!