Commit 75f9eea1 by chenwq

客户弹窗-标签清空

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