Commit 4299083d by xuyl

修复群聊管理状态和查看客户bug

1 parent 9ac43841
......@@ -175,7 +175,7 @@ export default {
prop: 'delFlag',
width: 95,
formatter: cellValue => {
return cellValue.delFlag == 0 ? '正常' : cellValue.delFlag == -1 ? '解散' : ''
return cellValue.delFlag == 0 ? '正常' : cellValue.delFlag == -1 ? '已解散' : ''
},
},
{
......
......@@ -47,7 +47,7 @@
<!-- :class="[expande ? 'expande' : 'close']" -->
<div id="allTagsWrap" class="allTagsWrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelList)" :key="index" class="ellipsis-1 tag-box-wrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelList)" :key="index" class="ellipsis-1 tag-box-wrap">
<el-tooltip class="item" :content="item.name" placement="top">
<span>{{ item.name }}</span>
</el-tooltip>
......@@ -66,8 +66,8 @@
</span>
<template slot="xxx" slot-scope="scope">
<!-- //这版关掉自店标签 1.0.1允许集团的门店打字店标签,也可以编辑-->
<span @click="btnClick('edit', scope.scope)" class="blue-text" v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)">编辑标签组</span>
<!-- v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" -->
<span @click="btnClick('edit', scope.scope)" v-if="scope.scope.labelType != '系统标签' && isShowEditBtn(scope.scope)" class="blue-text" >编辑标签组</span>
<GLButton class="blue-text leftDistance" type="text" fn="查看客户" @click="toViewCustomer(scope.scope)" >查看客户</GLButton>
</template>
</GLTable>
......@@ -244,14 +244,14 @@ export default {
label: '标签',
prop: 'labelList',
addHtml: 'labelList',
align: 'left'
align: 'center'
},
{
label: '操作',
prop: 'xxx',
fixed: 'right',
addHtml: 'xxx',
width: 240
width: 180
}
]
// tableOption: {
......@@ -732,7 +732,7 @@ export default {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.leftDistance{
margin-left: 8px;
margin-left: 10px;
}
.scrm-sub-client-container {
/deep/.search-form .el-form-item__content {
......@@ -863,7 +863,8 @@ export default {
display: inline-block;
margin-right: 10px;
margin-bottom: 10px;
margin-top: 5px;
margin-bottom: 5px;
padding: 0 10px;
box-sizing: border-box;
min-width: 76px;
......
......@@ -10,7 +10,7 @@
</div>
<div class="choiceLabel">
<div class="choiceLabelLeft">
<div>标签:</div>
<div class="addLabelStyle">标签:</div>
<button class="addTagsBtn" @click="choiceLabel">选择标签</button>
</div>
<button class="backBtn" @click="goBack">返回标签管理</button>
......@@ -39,7 +39,7 @@
</div>
<div class="export" @click="handleExport">导出</div>
</div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="viewCustomers" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams">
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="viewCustomers" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams">
<span slot="carVin" slot-scope="scope">
<span>{{ myStandNo(scope.scope.carVin) }}</span>
</span>
......@@ -58,7 +58,7 @@
</div>
<el-dialog title="选择标签" width="20%" :visible="dialogVisible" class="labelDialog" :before-close="handleDialogClose">
<el-input placeholder="请输入搜索关键字" v-model="searchLabel" fixed>
<el-input placeholder="请输入搜索关键字" v-model="searchLabel" clearable>
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
<div class="labelCombination">
......@@ -66,15 +66,26 @@
<img src="@/assets/tagsManage/doc.png" alt="" />
<span class="iconLabelstext">{{ labelGroupName }}</span>
</div>
<div class="label-panle" :style="{height: boxHeight+'px'}">
<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 :title="item.labelName.length > 10 ? 'item.labelName' : '' " class="LabelsNameTxt">{{ item.labelName }}</span>
<img v-if="checkedTag.indexOf(index) > -1" class="labelChecked" src="@/assets/tagsManage/checked.png" alt="" />
</div>
</template>
<div class="label-panle" :style="{ height: boxHeight + 'px' }" v-if="items.length>0">
<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 :title="item.labelName.length > 10 ? 'item.labelName' : ''" class="LabelsNameTxt">{{ item.labelName }}</span>
<img v-if="checkedTag.indexOf(index) > -1" class="labelChecked" src="@/assets/tagsManage/checked.png" alt="" />
</div> -->
<div class="iconLabelsName" :class="{ 'active': checkedId==item.labelId }" :key="index" @click="seletLabelActive(item.labelId, item)">
<img src="@/assets/tagsManage/label.png" alt="" />
<span :title="item.labelName.length > 10 ? 'item.labelName' : ''" class="LabelsNameTxt">{{ item.labelName }}</span>
<img v-if="checkedId==item.labelId" class="labelChecked" src="@/assets/tagsManage/checked.png" alt="" />
</div>
</template>
</div>
<div class="noRelatedLabel" v-else>
<img src="@/assets/tagsManage/noData.png" alt="">
<div>无相关{{searchLabel}}数据</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="resetSearch">重置</el-button>
......@@ -92,6 +103,13 @@ export default {
components: {},
data() {
return {
checkedId: '',
allListParams:{
pageSize: 10,
pageNum: 1,
tagLists:[]
},
allLabeltags:[],
customerListsNum: 0,
checkedTag: [],
isActive: -1,
......@@ -104,10 +122,11 @@ export default {
dialogVisible: false,
labelType: '',
isReload: true,
noRelatedLabel:false,
url: url,
sloading: false,
searchForm: {},
searchForm3:{},
searchForm3: {},
searchFormTable: {},
boxHeight: 200,
clientGroupFormList: [
......@@ -142,7 +161,7 @@ export default {
{
type: 'select',
prop: 'joinQW',
label: '是否已加企微',
label: '是否加企微',
placeholder: '请选择',
options: [
{
......@@ -198,8 +217,8 @@ export default {
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
minWidth: 100
prop: 'customerName'
// width: 160
},
// {
// label: '昵称',
......@@ -208,39 +227,40 @@ export default {
// },
{
label: '手机号',
prop: 'customerPhone',
minWidth: 120
prop: 'customerPhone'
// width: 160
},
{
label: '车牌号',
prop: 'carNumber',
minWidth: 100
prop: 'carNumber'
// width: 160
},
{
label: '车架号(后6位)',
prop: 'carVin',
addHtml: 'carVin',
minWidth: 120
addHtml: 'carVin'
// width: 160
},
{
label: '车系',
prop: 'audi',
minWidth: 100
prop: 'audi'
// width: 160
},
{
label: '跟进员工',
prop: 'followStaff'
// width: 160
},
{
label: '是否加入企微',
prop: 'isJoin',
addHtml: 'isJoin',
width: 100
addHtml: 'isJoin'
// width: 160
},
{
label: '添加时间',
prop: 'addTime',
width: 95
prop: 'addTime'
// width: 160
}
]
},
......@@ -251,8 +271,6 @@ export default {
}
},
created() {
console.log(this.$route.params.info)
console.log(this.$route.params.type)
this.groupId = this.$route.params.info ? this.$route.params.info : ''
this.groupType = this.$route.params.type ? this.$route.params.type : ''
......@@ -284,13 +302,20 @@ export default {
this.labelUpdateType = '系统标签 | 自动更新'
break
}
},
searchLabel(val){
if(this.allLabeltags.indexOf(val) == -1){
this.noRelatedLabel = true
}else{
this.noRelatedLabel = false
}
}
},
computed: {
items: function () {
var _search = this.searchLabel
this.labelList.forEach(item => (item.labelName.indexOf(_search) > -1 ? (item.isHidden = true) : (item.isHidden = false)))
return this.labelList
const labelList = this.labelList.filter(item => item.labelName.indexOf(_search) > -1)
return labelList
}
},
methods: {
......@@ -311,67 +336,52 @@ export default {
getLabelList(params).then(res => {
this.labelGroupName = res.groupName
this.labelList = res.labelNameIds
this.labelType = res.groupType
this.groupId = res.groupId
this.labelList.forEach(item => {
item.isHidden = true
let res = this.getListParams(item.labelId, item.labelName)
this.tagLists.push(res)
})
console.log(this.tagLists)
// this.allLabeltags.push(item.labelName)
item.isHidden = true
let res = this.getListParams(item.labelId, item.labelName)
this.allListParams.tagLists.push(res)
})
this.searchForm = {
tagLists: this.tagLists
...this.allListParams
}
this.searchForm3 = {
...this.searchForm,
pageSize: 10,
pageNum: 1
}
this.getAllClientList(this.searchForm3)
this.searchTable()
})
},
seletLabelActive(id, index, name) {
console.log(id, index, name)
this.isActive = index
if (this.checkedTag.indexOf(index) == -1) {
let res = this.getListParams(id, name)
this.checkedTag.push(index)
this.tagLists.push(res)
} else {
let spliceIndex = this.checkedTag.indexOf(index)
this.checkedTag.splice(spliceIndex, 1)
this.tagLists.splice(spliceIndex, 1)
seletLabelActive(id, arr) {
this.checkedId = id
const labelId = arr.labelId
const labelName = arr.labelName
let res = this.getListParams(labelId, labelName)
if (this.tagLists.length > 0 ) {
// this.checkedTag.shift()
this.tagLists.shift()
}
console.log(this.checkedTag)
this.tagLists.push(res)
},
// 首次加载页面显示所有客户数据
getAllClientList(params) {
var listParams = JSON.parse(JSON.stringify(params))
if (listParams.method) delete params.method
getCustomersList(listParams).then(res => {
this.customerListsNum = res.count
})
getAllClientList(allListParams) {
this.searchForm ={
...allListParams
}
this.searchTable()
this.tagLists = []
},
// 根据标签获取客户列表
searchClientData() {
this.dialogVisible = false
if(!this.tagLists.length){
this.getAllClientList(this.searchForm3)
}else{
this.searchForm = {
tagLists: this.tagLists
}
this.searchForm2 = {
...this.searchForm,
pageSize: 10,
pageNum: 1
}
this.searchTable()
if (!this.tagLists.length) {
this.getAllClientList(this.allListParams)
} else {
this.searchForm = {
pageSize: 10,
pageNum: 1,
tagLists: this.tagLists
}
this.searchTable()
}
},
getListParams(id, name) {
const params = {}
......@@ -386,7 +396,7 @@ export default {
// 重置按钮
resetSearch() {
this.searchLabel = ''
this.checkedTag = []
this.checkedId = ''
this.tagLists = []
},
filterNode(val, labelData) {
......@@ -467,6 +477,17 @@ export default {
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.noRelatedLabel{
margin-top: 59px;
text-align: center;
div{
margin-top: 12px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
}
.active {
border: 1px solid rgba(88, 80, 255, 1) !important;
.labelChecked {
......@@ -479,12 +500,13 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 10px;
padding-top: 14px;
padding-bottom: 20px;
letter-spacing: 1px;
.clientNum {
padding: 10px 0;
// padding-top: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
font-weight: 600;
color: #333333;
font-size: 20px;
.clientNumText {
......@@ -512,12 +534,21 @@ export default {
margin-top: 0 !important;
position: relative;
}
::v-deep .el-dialog__wrapper {
margin-right: -6px;
}
::v-deep .el-dialog__footer {
position: absolute;
bottom: 0px;
width: 100%;
}
::v-deep .el-button + .el-button {
margin-left: 20px;
margin-right: 30px;
}
::v-deep .el-input {
margin-top: -10px;
}
.scrm-sub-client-container {
.pageTitle {
position: relative;
......@@ -537,12 +568,18 @@ export default {
letter-spacing: 1px;
.labelSetLeft {
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.labelSetLeftRight {
font-family: PingFangSC-Regular;
font-size: 16px;
color: #333333;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
}
}
.choiceLabel {
......@@ -554,6 +591,9 @@ export default {
display: flex;
align-items: center;
font-size: 20px;
.addLabelStyle {
font-weight: 600;
}
.addTagsBtn {
height: 32px;
background: $btnBlue;
......@@ -625,7 +665,7 @@ export default {
.iconLabelstext {
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
font-weight: 600;
color: #333333;
}
}
......@@ -635,14 +675,14 @@ export default {
}
.iconLabelsName {
position: relative;
margin-left: 10px;
margin-left: 15px;
display: flex;
align-items: center;
height: 26px;
background: #f4f6fc;
border: 1px solid rgba(232, 232, 234, 1);
border-radius: 4px;
margin-top: 8px;
margin-top: 12px;
width: fit-content;
width: -webkit-fit-content;
width: -moz-fit-content;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!