Commit 4299083d by xuyl

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

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