Commit e7d12a4b by 匡雅琴

标签筛选修改

1 parent 8f39d1e9
...@@ -697,7 +697,7 @@ export default { ...@@ -697,7 +697,7 @@ export default {
align-items: center; align-items: center;
} }
.input-tag-wrapper { .input-tag-wrapper {
max-height: 68px; max-height: 75px;
overflow: auto; overflow: auto;
position: relative; position: relative;
font-size: 14px; font-size: 14px;
......
...@@ -17,24 +17,22 @@ ...@@ -17,24 +17,22 @@
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">群发内容:</div> <div class="detail-label">群发内容:</div>
<div <div class="detail-value">[共{{ basicInfo.attachmentList ? basicInfo.attachmentList.length : '0' }}条]</div>
class="detail-value"
>[共{{basicInfo.attachmentList ? basicInfo.attachmentList.length : '0'}}条]</div>
<div class="detail-tips">详见右侧视图</div> <div class="detail-tips">详见右侧视图</div>
</div> </div>
<div class="detail-item" v-show="form == 'customer'"> <div class="detail-item" v-show="form == 'customer'">
<div class="detail-label">群发类型:</div> <div class="detail-label">群发类型:</div>
<div class="detail-value">{{basicInfo.sendType == 1 ? '立即发送': '定时发送'}}</div> <div class="detail-value">{{ basicInfo.sendType == 1 ? '立即发送' : '定时发送' }}</div>
</div> </div>
<div class="detail-item" v-show="form == 'customer'"> <div class="detail-item" v-show="form == 'customer'">
<div class="detail-label">发送状态:</div> <div class="detail-label">发送状态:</div>
<div class="detail-value">{{STATUS_TYPE[basicInfo.status]}}</div> <div class="detail-value">{{ STATUS_TYPE[basicInfo.status] }}</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">发送时间:</div> <div class="detail-label">发送时间:</div>
<div class="detail-value">{{basicInfo.sendTime ? basicInfo.sendTime : '-'}}</div> <div class="detail-value">{{ basicInfo.sendTime ? basicInfo.sendTime : '-' }}</div>
</div> </div>
<div class="detail-item" style="margin-bottom: 0;"> <div class="detail-item" style="margin-bottom: 0">
<div class="detail-label">群发对象:</div> <div class="detail-label">群发对象:</div>
<div class="detail-value"> <div class="detail-value">
在员工 在员工
...@@ -45,19 +43,14 @@ ...@@ -45,19 +43,14 @@
</el-tag> </el-tag>
<el-tag type="info" v-if="basicInfo.userList.length > 3 && index == 3"> <el-tag type="info" v-if="basicInfo.userList.length > 3 && index == 3">
<el-popover placement="top" width="300" trigger="hover"> <el-popover placement="top" width="300" trigger="hover">
<span slot="reference">...({{basicInfo.userList.length}})</span> <span slot="reference">...({{ basicInfo.userList.length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag <el-tag type="info" v-for="(i, index) in basicInfo.userList" :key="index" :disable-transitions="false">{{ i.staffName }}</el-tag>
type="info"
v-for="(i, index) in basicInfo.userList"
:key="index"
:disable-transitions="false"
>{{i.staffName}}</el-tag>
</div> </div>
</el-popover> </el-popover>
</el-tag> </el-tag>
</span> </span>
中满足以下条件中的{{basicInfo.customerCount ? basicInfo.customerCount : 0}}个{{form == 'customer' ? '客户' : '群聊'}} 中满足以下条件中的{{ basicInfo.customerCount ? basicInfo.customerCount : 0 }}个{{ form == 'customer' ? '客户' : '群聊' }}
<!-- v-if="selectType == 2" <span v-for="(item, index) in basicInfo.userList" :key="item.id"> <!-- v-if="selectType == 2" <span v-for="(item, index) in basicInfo.userList" :key="item.id">
[{{item.staffName}}] [{{item.staffName}}]
<span v-show="basicInfo.userList.length -1 != index">、</span> <span v-show="basicInfo.userList.length -1 != index">、</span>
...@@ -73,33 +66,21 @@ ...@@ -73,33 +66,21 @@
<div class="detail-condition" v-if="form == 'customer' && basicInfo.selectType == 2"> <div class="detail-condition" v-if="form == 'customer' && basicInfo.selectType == 2">
<div class="detail-condition-item"> <div class="detail-condition-item">
<span class="name">性别</span> <span class="name">性别</span>
<span>{{SEX_TYPE[basicInfo.condition.sex]}}</span> <span>{{ SEX_TYPE[basicInfo.condition.sex] }}</span>
</div> </div>
<div v-if="basicInfo.condition.startTime" class="detail-condition-item"> <div v-if="basicInfo.condition.startTime" class="detail-condition-item">
<span class="name">添加时间</span> <span class="name">添加时间</span>
<span>{{basicInfo.condition.startTime ? basicInfo.condition.startTime.split(' ')[0] : '-'}} 至 {{basicInfo.condition.endTime ? basicInfo.condition.endTime.split(' ')[0] : '-'}}</span> <span>{{ basicInfo.condition.startTime ? basicInfo.condition.startTime.split(' ')[0] : '-' }} 至 {{ basicInfo.condition.endTime ? basicInfo.condition.endTime.split(' ')[0] : '-' }}</span>
</div> </div>
<div class="detail-condition-item" v-if="basicInfo.condition.chatName"> <div class="detail-condition-item" v-if="basicInfo.condition.chatName">
<span class="name">所在群聊</span> <span class="name">所在群聊</span>
<span <span v-for="(item, index) in basicInfo.condition.chatName.split(',')" class="el-tag-item" :key="index">
v-for="(item, index) in basicInfo.condition.chatName.split(',')"
class="el-tag-item"
:key="index"
>
<el-tag v-if="index < 2" type="info" class="hidden-tag">{{ item }}</el-tag> <el-tag v-if="index < 2" type="info" class="hidden-tag">{{ item }}</el-tag>
<el-tag <el-tag type="info" v-if="basicInfo.condition.chatName.split(',').length > 2 && index == 2">
type="info"
v-if="basicInfo.condition.chatName.split(',').length > 2 && index == 2"
>
<el-popover placement="top" width="300" trigger="hover"> <el-popover placement="top" width="300" trigger="hover">
<span slot="reference">...({{basicInfo.condition.chatName.split(',').length}})</span> <span slot="reference">...({{ basicInfo.condition.chatName.split(',').length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag <el-tag type="info" v-for="(i, index) in basicInfo.condition.chatName.split(',')" :key="index" :disable-transitions="false">{{ i }}</el-tag>
type="info"
v-for="(i, index) in basicInfo.condition.chatName.split(',')"
:key="index"
:disable-transitions="false"
>{{i}}</el-tag>
</div> </div>
</el-popover> </el-popover>
</el-tag> </el-tag>
...@@ -107,25 +88,16 @@ ...@@ -107,25 +88,16 @@
</div> </div>
<div class="detail-condition-item" v-if="basicInfo.condition.tagName"> <div class="detail-condition-item" v-if="basicInfo.condition.tagName">
<span class="name">标签筛选</span> <span class="name">标签筛选</span>
<span <span v-for="(itm, idx) in basicInfo.condition.tagName.split(',')" class="el-tag-item" :key="idx">
v-for="(itm, idx) in basicInfo.condition.tagName.split(',')" <!-- <el-tag v-if="idx < 2" type="info" class="hidden-tag">{{ itm }}</el-tag> -->
class="el-tag-item" <el-tooltip class="toolTip" effect="dark" :content="itm" placement="top" :disabled="itm.length < 4 || basicInfo.condition.tagName.split(',').length > 2">
:key="idx"
>
<el-tag v-if="idx < 2" type="info" class="hidden-tag">{{ itm }}</el-tag> <el-tag v-if="idx < 2" type="info" class="hidden-tag">{{ itm }}</el-tag>
<el-tag </el-tooltip>
type="info" <el-tag type="info" v-if="basicInfo.condition.tagName.split(',').length > 2 && idx == 2">
v-if="basicInfo.condition.tagName.split(',').length > 2 && idx == 2"
>
<el-popover placement="top" width="300" trigger="hover"> <el-popover placement="top" width="300" trigger="hover">
<span slot="reference">...({{basicInfo.condition.tagName.split(',').length}})</span> <span slot="reference">...({{ basicInfo.condition.tagName.split(',').length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag <el-tag type="info" v-for="(i, index) in basicInfo.condition.tagName.split(',')" :key="index" :disable-transitions="false">{{ i }}</el-tag>
type="info"
v-for="(i, index) in basicInfo.condition.tagName.split(',')"
:key="index"
:disable-transitions="false"
>{{i}}</el-tag>
</div> </div>
</el-popover> </el-popover>
</el-tag> </el-tag>
...@@ -138,39 +110,39 @@ ...@@ -138,39 +110,39 @@
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
<div class="statistics-number"> <div class="statistics-number">
<span>{{form == 'customer' ? statistic.senderStaffCount: statistic.senderStaffCount}}</span> <span>{{ form == 'customer' ? statistic.senderStaffCount : statistic.senderStaffCount }}</span>
人 人
</div> </div>
<div class="statistics-text">已发送{{form == 'customer' ? '成员': '群主'}}</div> <div class="statistics-text">已发送{{ form == 'customer' ? '成员' : '群主' }}</div>
</div> </div>
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-number"> <div class="statistics-number">
<span>{{form == 'customer' ? statistic.senderCustomerCount :statistic.senderGroupCount}}</span> <span>{{ form == 'customer' ? statistic.senderCustomerCount : statistic.senderGroupCount }}</span>
{{form == 'customer' ? '人' : '个'}} {{ form == 'customer' ? '人' : '个' }}
</div> </div>
<div class="statistics-text">送达{{form == 'customer' ? '客户': '群聊'}}</div> <div class="statistics-text">送达{{ form == 'customer' ? '客户' : '群聊' }}</div>
</div> </div>
</div> </div>
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
<div class="statistics-number"> <div class="statistics-number">
<span>{{form == 'customer' ?statistic.unSenderStaffCount:statistic.unSenderStaffCount}}</span> <span>{{ form == 'customer' ? statistic.unSenderStaffCount : statistic.unSenderStaffCount }}</span>
人 人
</div> </div>
<div class="statistics-text">未发送{{form == 'customer' ? '成员': '群主'}}</div> <div class="statistics-text">未发送{{ form == 'customer' ? '成员' : '群主' }}</div>
</div> </div>
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-number"> <div class="statistics-number">
<span>{{form == 'customer' ?statistic.unSenderCustomerCount:statistic.unSenderGroupCount}}</span> <span>{{ form == 'customer' ? statistic.unSenderCustomerCount : statistic.unSenderGroupCount }}</span>
{{form == 'customer' ? '人' : '个'}} {{ form == 'customer' ? '人' : '个' }}
</div> </div>
<div class="statistics-text">未送达{{form == 'customer' ? '客户': '群聊'}}</div> <div class="statistics-text">未送达{{ form == 'customer' ? '客户' : '群聊' }}</div>
</div> </div>
</div> </div>
<div v-if="form == 'customer'" class="statistics-ul"> <div v-if="form == 'customer'" class="statistics-ul">
<div class="statistics-li" style="margin: 42px 28px;"> <div class="statistics-li" style="margin: 42px 28px">
<div class="statistics-number"> <div class="statistics-number">
<span>{{statistic.senderCustomerFailureCount}}</span> <span>{{ statistic.senderCustomerFailureCount }}</span>
人 人
</div> </div>
<div>客户送达失败</div> <div>客户送达失败</div>
...@@ -185,16 +157,16 @@ ...@@ -185,16 +157,16 @@
<script> <script>
const STATUS = { const STATUS = {
'-1': '创建失败', '-1': '创建失败',
'0': '创建成功', 0: '创建成功',
'1': '发送成功', 1: '发送成功',
'2': '发送失败', 2: '发送失败',
'3': '待发送' 3: '待发送'
} }
const SEX = { const SEX = {
null: '全部性别', null: '全部性别',
'1': '男', 1: '男',
'2': '女', 2: '女',
'0': '未知性别' 0: '未知性别'
} }
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
...@@ -228,12 +200,21 @@ export default { ...@@ -228,12 +200,21 @@ export default {
mounted() { mounted() {
this.getCustomerDetail(this.id) this.getCustomerDetail(this.id)
this.getStatistic() this.getStatistic()
// console.log(this.basicInfo) // console.log(this.basicInfo.condition, '----')
},
computed: {
// tagWidth() {
// var jmz = {}
// jmz.GetLength = function (str) {
// return str.replace(/[\u0391-\uFFE5]/g, 'aa').length //先把中文替换成两个字节的英文,在计算长度
// }
// }
}, },
methods: { methods: {
getCustomerDetail(id) { getCustomerDetail(id) {
this.$apis.customerTransform.customerDetail({ id }).then(res => { this.$apis.customerTransform.customerDetail({ id }).then(res => {
this.basicInfo = res this.basicInfo = res
// console.log(this.basicInfo, '123');
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss') // this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
const previewList = res.attachmentList.map(item => { const previewList = res.attachmentList.map(item => {
if (item.attType == 7 && item.attContent) item.attContent = JSON.parse(item.attContent) if (item.attType == 7 && item.attContent) item.attContent = JSON.parse(item.attContent)
......
<template> <template>
<div class="tag-main"> <div class="tag-main">
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="70%" :before-close="handleClose"> <el-dialog title="选择标签" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<div class="tag-panel"> <div class="tag-panel">
<div class="tag-panel-select"> <div class="tag-panel-select">
<div class="tag-title">预选标签</div> <div class="tag-title">预选标签</div>
<div class="tag-select-box"> <div class="tag-select-box">
<div class="tag-box-header"> <div class="tag-box-header">
<el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容"></el-input> <el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容" clearable @keydown.enter.native="handleSearch"></el-input>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button> <el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" @click="handleReset">重置</el-button>
</div> </div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }"> <div class="checkbox-group-box" :style="{ height: heightBox + 'px' }">
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index"> <div style="margin-bottom: 8px" class="checkbox-box" v-for="(item, index) in labelTreeRets" :key="index" @click="item.checked = !item.checked">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click="item.checked = !item.checked"></span> <span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click="item.checked = !item.checked"></span>
{{ item.labelGroup.name }} {{ item.labelGroup.name }}
<el-tag :size="size">{{ item.labelType }}</el-tag> <el-tag :size="size">{{ item.labelType }}</el-tag>
<div style="margin: 15px 0"></div>
<el-radio-group class="tag-group" v-model="item.tagChecked" v-show="item.checked"> <el-radio-group class="tag-group" v-model="item.tagChecked" v-show="item.checked">
<el-radio v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-radio> <div v-for="(itm, idx) in item.labelList" :key="idx" class="radio-tag">
<el-tooltip effect="dark" placement="top" :disabled="itm.name.length < 8">
<el-radio class="radio-text" :label="itm">{{itm.name}}</el-radio>
<!-- <el-radio :label="itm">{{ itm.name.length > 4 ? itm.name.slice(0, 3) + '...' : itm.name }}</el-radio> -->
<div slot="content">{{ itm.name }}</div>
</el-tooltip>
</div>
</el-radio-group> </el-radio-group>
<!-- <el-radio-group class="tag-group" v-model="item.tagChecked" @change="handleCheckedChange(item.tagChecked, index)" v-show="item.checked">
<el-radio v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-radio>
</el-radio-group> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -149,7 +152,7 @@ export default { ...@@ -149,7 +152,7 @@ export default {
this.labelTreeRets.forEach(tag => { this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) { if (item.labelGroup.id == tag.labelGroup.id) {
let labelId = item.labelList[0].id let labelId = item.labelList[0].id
let index = tag.labelList.findIndex(iem=>iem.id == labelId) let index = tag.labelList.findIndex(iem => iem.id == labelId)
console.log(index) console.log(index)
// tag.tagChecked = item.tagChecked // tag.tagChecked = item.tagChecked
tag.tagChecked = tag.labelList[index] tag.tagChecked = tag.labelList[index]
...@@ -191,6 +194,10 @@ export default { ...@@ -191,6 +194,10 @@ export default {
.filter(item => item) .filter(item => item)
console.log(labelTreeRets) console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets) this.$emit('tagSelected', labelTreeRets)
},
handleReset() {
this.labelGroupName = ''
this.querylabeltree()
} }
}, },
mounted() { mounted() {
...@@ -201,6 +208,9 @@ export default { ...@@ -201,6 +208,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// ::v-deep .el-tag{
// color: red !important;
// }
.dialog-jump { .dialog-jump {
color: #5850ff; color: #5850ff;
float: left; float: left;
...@@ -277,24 +287,47 @@ export default { ...@@ -277,24 +287,47 @@ export default {
font-size: 16px; font-size: 16px;
} }
.tag-group { .tag-group {
margin-left: 40px; margin-left: 26px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.el-checkbox { .radio-tag{
width: 40%; display: inline-block;
margin-bottom: 6px; width: 50%;
display: flex; .el-radio {
margin: 8px 0;
display: inline-flex;
align-items: center; align-items: center;
/deep/.el-radio__label {
display: inline-block;
max-width: 120px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-wrap: break-word;
}
}
} }
} }
} }
} }
.checkbox-group-box { .checkbox-group-box {
overflow: auto; overflow: auto;
.checkbox-box {
cursor: pointer;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
/deep/ {
.el-tag { .el-tag {
color: #aaa5fa !important;
font-size: 12px; font-size: 12px;
border: none; border: none;
background: rgba($color: #5850ff, $alpha: 0.3); background: rgba($color: #5850ff, $alpha: 0.1);
}
}
} }
} }
.tag-selected-box { .tag-selected-box {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!