Commit 8c104f03 by 王志慧

commit

1 parent 2cb13ac4
......@@ -96,7 +96,7 @@ export default {
}
]
},
describeData: ['潜在意向客户数', '潜在意向客户&已加企微客户数', '潜在意向客户&未加企微客户数', '基盘客户数', '基盘客户&已加企微客户数', '基盘客户&未加企微客户数', '新车客户数', '车险待续保客户数', '新车待首保客户数', '沉默客户数']
describeData: ['潜在意向客户', '潜在意向客户,且已加企微客户', '潜在意向客户,且未加企微客户', '基盘客户', '基盘客户,且已加企微客户', '基盘客户,且未加企微客户', '新车客户', '新车待续保客户', '新车待首保客户', '沉默客户']
}
},
created() {
......@@ -123,7 +123,7 @@ export default {
pageSize: 10,
pageNum: 1
}).then(res => {
console.log('res', res)
// console.log('res', res)
this.totalCount = res.count
})
......
......@@ -35,7 +35,7 @@
<div class="clientNum">
<!-- {{ labelGroupName }} -->
标签组客户列表
<span class="clientNumText">{{customerListsNum}}个</span>
<span class="clientNumText">{{ customerListsNum }}个</span>
</div>
<div class="export" @click="handleExport">导出</div>
</div>
......@@ -63,11 +63,13 @@
<img src="@/assets/tagsManage/doc.png" alt="" />
<span class="iconLabelstext">{{ labelGroupName }}</span>
</div>
<div class="iconLabelsName" :class="{ active: checkedTag.indexOf(index) > -1 }" v-for="(item, index) in items" :key="index" @click="seletLabelActive(item.labelId, index, item.labelName)">
<template v-for="(item, index) in items">
<div class="iconLabelsName" :class="{ active: checkedTag.indexOf(index) > -1 }" v-if="item.isHidden" :key="index" @click="seletLabelActive(item.labelId, index, item.labelName)">
<img src="@/assets/tagsManage/label.png" alt="" />
<span class="LabelsNameTxt">{{ item.labelName }}</span>
<img v-if="checkedTag.indexOf(index) > -1" class="labelChecked" src="@/assets/tagsManage/checked.png" alt="" />
</div>
</template>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="resetSearch">重置</el-button>
......@@ -78,18 +80,18 @@
</template>
<script>
import { getCustomersList, getLabelList,exportLabelList } from '@/api/modules/tagsManage'
import { getCustomersList, getLabelList, exportLabelList } from '@/api/modules/tagsManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'viewCustomers',
components: {},
data() {
return {
customerListsNum:0,
customerListsNum: 0,
checkedTag: [],
isActive: -1,
groupId: '',
groupType:'',
groupType: '',
tagLists: [], //查询
searchLabel: '', //搜索标签
labelGroupName: '', //标签组名称
......@@ -99,7 +101,7 @@ export default {
isReload: true,
url: url,
sloading: false,
searchForm: { },
searchForm: {},
searchFormTable: {},
clientGroupFormList: [
{
......@@ -277,9 +279,11 @@ export default {
computed: {
items: function () {
var _search = this.searchLabel
if (_search) {
return this.labelList.filter(item => item.labelName.indexOf(_search) > -1)
}
// if (_search) {
// console.log()
// return this.labelList.filter(item => item.labelName.indexOf(_search) > -1)
// }
this.labelList.forEach(item => (item.labelName.indexOf(_search) > -1 ? (item.isHidden = true) : (item.isHidden = false)))
return this.labelList
}
},
......@@ -289,18 +293,21 @@ export default {
let params = {
// 'labelByGroupIdReq.labelGroupId': this.groupId
'labelByGroupIdReq.labelGroupId': this.groupId,
'labelByGroupIdReq.labelGroupType':this.groupType
'labelByGroupIdReq.labelGroupType': this.groupType
}
getLabelList(params).then(res => {
console.log(res)
console.log(res.data)
this.labelGroupName = res.groupName
this.labelList = res.labelNameIds
this.labelType = res.groupType
this.groupId = res.groupId
this.labelList.forEach(item => {
item.isHidden = true
})
})
},
seletLabelActive(id, index, name) {
console.log(id, index, name)
this.isActive = index
if (this.checkedTag.indexOf(index) == -1) {
let res = this.getListParams(id, name)
......@@ -311,6 +318,7 @@ export default {
this.checkedTag.splice(spliceIndex, 1)
this.tagLists.splice(spliceIndex, 1)
}
console.log(this.checkedTag)
},
// 根据标签获取客户列表
searchClientData() {
......@@ -323,27 +331,27 @@ export default {
pageSize: 10,
pageNum: 1
}
getCustomersList( this.searchForm2).then(res => {
getCustomersList(this.searchForm2).then(res => {
this.customerListsNum = res.count
})
this.searchTable()
},
getListParams(id, name) {
const params = {}
;(params.groupId = this.groupId),
(params.groupName = this.labelGroupName),
(params.groupType = this.labelType),
(params.labelId = id),
(params.labelName = name)
console.log(params)
params.groupId = this.groupId
params.groupName = this.labelGroupName
params.groupType = this.labelType
params.labelId = id
params.labelName = name
// console.log(params)
return params
},
// 重置按钮
resetSearch() {
this.searchLabel = ''
this.checkedTag=[]
this.tagLists=[]
this.checkedTag = []
this.tagLists = []
},
filterNode(val, labelData) {
if (!val) return true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!