Commit 938beb4d by 胡悦

群发人群修改

1 parent a79526fc
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
<span v-show="isSelectCrowd" class="tips-text">锁定人群无法添加其他账号。</span> <span v-show="isSelectCrowd" class="tips-text">锁定人群无法添加其他账号。</span>
<div class="sale-select" v-show="basicForm.userList && basicForm.userList.length != 0"> <div class="sale-select" v-show="basicForm.userList && basicForm.userList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper"> <div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag effect="plain" type="info" v-for="(tag, idx) in basicForm.userList" :key="idx" closable :disable-transitions="false" @close="remove(tag, idx)"> <el-tag effect="plain" type="info" v-for="(tag, idx) in basicForm.userList" :key="idx" closable
:disable-transitions="false" @close="remove(tag, idx)">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
...@@ -56,12 +57,16 @@ ...@@ -56,12 +57,16 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="所在群聊"> <el-form-item label="所在群聊">
<el-select v-model="basicForm.condition.chat" @change="valueChange" @focus="groupFocus" :size="size" value-key="id" multiple collapse-tags placeholder="请选择"> <el-select v-model="basicForm.condition.chat" @change="valueChange" @focus="groupFocus"
<el-option v-for="item in groupList" :key="item.id" :label="item.groupName" :value="item"></el-option> :size="size" value-key="id" multiple collapse-tags placeholder="请选择">
<el-option v-for="item in groupList" :key="item.id" :label="item.groupName" :value="item">
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="添加客户时间"> <el-form-item label="添加客户时间">
<el-date-picker v-model="basicForm.condition.date" @change="valueChange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :size="size" style="width: 320px"></el-date-picker> <el-date-picker v-model="basicForm.condition.date" @change="valueChange" type="daterange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :size="size"
style="width: 320px"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="标签筛选"> <el-form-item label="标签筛选">
<el-button size="small" @click="openLabel"> <el-button size="small" @click="openLabel">
...@@ -70,12 +75,16 @@ ...@@ -70,12 +75,16 @@
</el-button> </el-button>
<div v-show="tagging.length != 0" :key="key" class="el-input-tag input-tag-wrapper"> <div v-show="tagging.length != 0" :key="key" class="el-input-tag input-tag-wrapper">
<span v-for="(tag, idx) in tagging" :key="idx"> <span v-for="(tag, idx) in tagging" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" closable :disable-transitions="false" @close="removeTag(tag, idx1, idx)">{{ tagItem.name }}</el-tag> <el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info"
closable :disable-transitions="false" @close="removeTag(tag, idx1, idx)">{{ tagItem.name
}}</el-tag>
</span> </span>
</div> </div>
<div class="sale-select" v-show="basicForm.condition.labelList"> <div class="sale-select" v-show="basicForm.condition.labelList">
<div :key="key" class="el-input-tag input-tag-wrapper"> <div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag v-for="(tag, idx) in basicForm.condition.labelList" :key="idx" :size="size" type="info" closable :disable-transitions="false" @close="remove(tag)">{{ tag.staffName }}</el-tag> <el-tag v-for="(tag, idx) in basicForm.condition.labelList" :key="idx" :size="size"
type="info" closable :disable-transitions="false" @close="remove(tag)">{{ tag.staffName }}
</el-tag>
<el-input size="small" style="outline: none; border: none"></el-input> <el-input size="small" style="outline: none; border: none"></el-input>
</div> </div>
</div> </div>
...@@ -84,10 +93,12 @@ ...@@ -84,10 +93,12 @@
</div> </div>
</div> </div>
<div v-show="basicForm.selectType == 3" style="line-height: 32px; padding-bottom: 10px"> <div v-show="basicForm.selectType == 3" style="line-height: 32px; padding-bottom: 10px">
<el-button :size="size" icon="el-icon-plus" @click="selectCrowd">{{isSelectCrowd ? '继续选择' : '选择人群'}}</el-button> <el-button :size="size" icon="el-icon-plus" @click="selectCrowd">{{ isSelectCrowd ? '继续选择' : '选择人群' }}
</el-button>
<div class="sale-select" v-show="basicForm.crowdList && basicForm.crowdList.length != 0"> <div class="sale-select" v-show="basicForm.crowdList && basicForm.crowdList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper"> <div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag effect="plain" type="info" v-for="(t, i) in basicForm.crowdList" :key="i" closable :disable-transitions="false" @close="removeCrowd(t, i)"> <el-tag effect="plain" type="info" v-for="(t, i) in basicForm.crowdList" :key="i" closable
:disable-transitions="false" @close="removeCrowd(t, i)">
{{ t.crowdName }} {{ t.crowdName }}
</el-tag> </el-tag>
</div> </div>
...@@ -119,9 +130,11 @@ ...@@ -119,9 +130,11 @@
<el-radio :label="2">定时发送</el-radio> <el-radio :label="2">定时发送</el-radio>
</el-radio-group> </el-radio-group>
<div v-show="basicForm.sendType == 2" class="date-picker"> <div v-show="basicForm.sendType == 2" class="date-picker">
<el-date-picker v-model="basicForm.sendTime" size="small" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" :picker-options="dateOptions" @change="changeValue"></el-date-picker> <el-date-picker v-model="basicForm.sendTime" size="small" type="date" value-format="yyyy-MM-dd"
placeholder="选择日期" :picker-options="dateOptions" @change="changeValue"></el-date-picker>
- -
<el-time-picker v-model="basicForm.sendDate" size="small" value-format="HH:mm:ss" placeholder="选择时间" :picker-options="timeOptions"></el-time-picker> <el-time-picker v-model="basicForm.sendDate" size="small" value-format="HH:mm:ss" placeholder="选择时间"
:picker-options="timeOptions"></el-time-picker>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -132,18 +145,16 @@ ...@@ -132,18 +145,16 @@
</div> </div>
</div> </div>
</div> </div>
<glsx-dialog :title="'选择成员'" :width="'1142px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible"> <glsx-dialog :title="'选择成员'" :width="'1142px'" :isVisible="membersVisible" @confirmDialog="handleConfirm"
@closeDialog="membersVisible = !membersVisible">
<!-- <SelectMembers islord="false" :selectData="selectData" ref="membersForm"></SelectMembers> --> <!-- <SelectMembers islord="false" :selectData="selectData" ref="membersForm"></SelectMembers> -->
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData"></SelectMember> <SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData"></SelectMember>
</glsx-dialog> </glsx-dialog>
</div> </div>
<div <div class="footer-panel" :style="{
class="footer-panel" left: footerLeft + 'px',
:style="{ width: footerWidth + 'px'
left: footerLeft + 'px', }">
width: footerWidth + 'px'
}"
>
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">确定</el-button> <el-button type="primary" v-loading="addLoading" @click="handleSubmit">确定</el-button>
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
</div> </div>
...@@ -153,6 +164,10 @@ ...@@ -153,6 +164,10 @@
</template> </template>
<script> <script>
const combineType = {
label: 2,
crowd: 1
}
import Vue from 'vue' import Vue from 'vue'
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
import WelcomeWords from './components/welcomeWords.vue' import WelcomeWords from './components/welcomeWords.vue'
...@@ -339,7 +354,7 @@ export default { ...@@ -339,7 +354,7 @@ export default {
.then(() => { .then(() => {
this.$router.push('/customerTransform/index') this.$router.push('/customerTransform/index')
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.$router.push('/customerTransform/index') this.$router.push('/customerTransform/index')
} }
...@@ -514,7 +529,11 @@ export default { ...@@ -514,7 +529,11 @@ export default {
// 删除人群 // 删除人群
removeCrowd(item, index) { removeCrowd(item, index) {
this.basicForm.crowdList.splice(index, 1) this.basicForm.crowdList.splice(index, 1)
console.log(this.basicForm.crowdList) if (!this.basicForm.crowdList.length) {
this.basicForm.userList = []
this.selectData = this.basicForm.userList
this.isUpdate = true
}
this.key = new Date() this.key = new Date()
}, },
valueChange(val) { valueChange(val) {
...@@ -544,7 +563,7 @@ export default { ...@@ -544,7 +563,7 @@ export default {
chatId: chatFlag ? this.basicForm.condition.chat.map(item => item.id).join(',') : '', chatId: chatFlag ? this.basicForm.condition.chat.map(item => item.id).join(',') : '',
chatName: chatFlag ? this.basicForm.condition.chat.map(item => item.groupName).join(',') : '', chatName: chatFlag ? this.basicForm.condition.chat.map(item => item.groupName).join(',') : '',
labelList: this.taggingList, labelList: this.taggingList,
combineType: 2 combineType: combineType.label
} }
if (this.basicForm.condition.date) { if (this.basicForm.condition.date) {
let endTime = new Date(this.basicForm.condition.date[1]) let endTime = new Date(this.basicForm.condition.date[1])
...@@ -554,7 +573,7 @@ export default { ...@@ -554,7 +573,7 @@ export default {
} }
} else if (params.selectType == 3) { } else if (params.selectType == 3) {
params.crowdCondition = this.basicForm.crowdList params.crowdCondition = this.basicForm.crowdList
params.combineType = 1 params.combineType = combineType.crowd
} }
if (this.basicForm.userList && this.basicForm.userList.length) { if (this.basicForm.userList && this.basicForm.userList.length) {
params.userList = this.basicForm.userList.map(item => { params.userList = this.basicForm.userList.map(item => {
...@@ -647,7 +666,7 @@ export default { ...@@ -647,7 +666,7 @@ export default {
this.isSelectCrowd = true this.isSelectCrowd = true
this.basicForm.crowdList = val this.basicForm.crowdList = val
const params = { const params = {
combineType: 1, combineType: combineType.crowd,
crowdCondition: val crowdCondition: val
} }
this.$apis.customerTransform.followerEcho(params).then(res => { this.$apis.customerTransform.followerEcho(params).then(res => {
...@@ -669,6 +688,7 @@ export default { ...@@ -669,6 +688,7 @@ export default {
margin-bottom: 84px; margin-bottom: 84px;
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// padding: 20px; // padding: 20px;
.title { .title {
padding: 20px 0 17px 20px; padding: 20px 0 17px 20px;
...@@ -677,21 +697,26 @@ export default { ...@@ -677,21 +697,26 @@ export default {
font-weight: 600; font-weight: 600;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
} }
.info-box { .info-box {
display: inline-flex; display: inline-flex;
width: 100%; width: 100%;
padding-bottom: 30px; padding-bottom: 30px;
align-items: flex-end; align-items: flex-end;
justify-content: space-between; justify-content: space-between;
.info-content { .info-content {
width: calc(100% - 360px); width: calc(100% - 360px);
.filter-box { .filter-box {
// margin-left: 120px; // margin-left: 120px;
margin-bottom: 10px; margin-bottom: 10px;
min-width: 656px; min-width: 656px;
background-color: #f7f7f7; background-color: #f7f7f7;
.filter-memeber { .filter-memeber {
padding: 20px 0; padding: 20px 0;
// border-bottom: 1px solid #dcdfe6; // border-bottom: 1px solid #dcdfe6;
.el-form { .el-form {
padding: 0; padding: 0;
...@@ -706,20 +731,24 @@ export default { ...@@ -706,20 +731,24 @@ export default {
align-items: center; align-items: center;
color: #999; color: #999;
font-size: 14px; font-size: 14px;
.filter-number { .filter-number {
display: inline-block; display: inline-block;
line-height: 20px; line-height: 20px;
padding: 7px 14px; padding: 7px 14px;
background-color: #e6e9ff; background-color: #e6e9ff;
color: #333; color: #333;
span { span {
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
} }
} }
} }
.basic-form { .basic-form {
padding: 32px 0 20px 20px; padding: 32px 0 20px 20px;
/deep/.el-input { /deep/.el-input {
width: 320px; width: 320px;
} }
...@@ -731,11 +760,13 @@ export default { ...@@ -731,11 +760,13 @@ export default {
font-size: 12px; font-size: 12px;
color: #999; color: #999;
} }
.preview { .preview {
margin-right: 24px; margin-right: 24px;
margin-bottom: 100px; margin-bottom: 100px;
} }
} }
.footer-panel { .footer-panel {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -747,17 +778,21 @@ export default { ...@@ -747,17 +778,21 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
} }
.label-text { .label-text {
margin-left: 10px; margin-left: 10px;
font-size: 14px; font-size: 14px;
span { span {
color: #5850ff; color: #5850ff;
} }
} }
.sale-select { .sale-select {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.input-tag-wrapper { .input-tag-wrapper {
max-height: 75px; max-height: 75px;
overflow: auto; overflow: auto;
...@@ -779,12 +814,14 @@ export default { ...@@ -779,12 +814,14 @@ export default {
align-items: center; align-items: center;
margin-top: 6px; margin-top: 6px;
font-size: 14px; font-size: 14px;
i { i {
color: #75acff; color: #75acff;
margin-right: 3px; margin-right: 3px;
font-size: 14px; font-size: 14px;
} }
} }
.el-tag { .el-tag {
margin-right: 4px; margin-right: 4px;
height: 26px; height: 26px;
...@@ -792,6 +829,7 @@ export default { ...@@ -792,6 +829,7 @@ export default {
margin-bottom: 5px; margin-bottom: 5px;
// background: #fff !important; // background: #fff !important;
} }
.tag-input { .tag-input {
background: transparent; background: transparent;
border: none !important; border: none !important;
...@@ -801,35 +839,43 @@ export default { ...@@ -801,35 +839,43 @@ export default {
padding-left: 0; padding-left: 0;
width: 100px; width: 100px;
} }
.form-error { .form-error {
color: #f56c6c; color: #f56c6c;
font-size: 12px; font-size: 12px;
margin-left: 186px; margin-left: 186px;
margin-top: 10px; margin-top: 10px;
} }
/deep/ { /deep/ {
.el-form-item .el-form-item { .el-form-item .el-form-item {
margin-bottom: 22px; margin-bottom: 22px;
} }
.required { .required {
display: inline-block; display: inline-block;
line-height: 40px; line-height: 40px;
} }
.required::before { .required::before {
content: '*'; content: '*';
color: #f56c6c; color: #f56c6c;
margin-right: 4 px; margin-right: 4 px;
} }
.el-loading-spinner { .el-loading-spinner {
transform: translateY(8px); transform: translateY(8px);
} }
.el-scrollbar { .el-scrollbar {
padding-bottom: 10px; padding-bottom: 10px;
} }
} }
.group-content { .group-content {
padding: 22px 0 20px 20px; padding: 22px 0 20px 20px;
} }
.tips-text { .tips-text {
color: 12px; color: 12px;
color: #f56c6c; color: #f56c6c;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-05-24 18:18:53 * @Date: 2022-05-24 18:18:53
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-05-31 15:09:10 * @LastEditTime: 2022-06-08 17:50:43
--> -->
<template> <template>
<div> <div>
...@@ -16,14 +16,17 @@ ...@@ -16,14 +16,17 @@
<div class="member-content"> <div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent> <el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="人群名称" style="margin-bottom: 0" size="small"> <el-form-item label="人群名称" style="margin-bottom: 0" size="small">
<el-input :size="size" v-model.trim="searchForm.req.keyword" @keyup.enter.native="search" clearable placeholder="请输入关键字搜索"></el-input> <el-input :size="size" v-model.trim="searchForm.req.keyword" @keyup.enter.native="search" clearable
placeholder="请输入关键字搜索"></el-input>
</el-form-item> </el-form-item>
<el-form-item label style="margin-bottom: 0;margin-left:10px" size="small"> <el-form-item label style="margin-bottom: 0;margin-left:10px" size="small">
<el-button type="primary" :size="size" @click="search">搜索</el-button> <el-button type="primary" :size="size" @click="search">搜索</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="table-content"> <div class="table-content">
<GLTable v-loading="loading" ref="crowdTable" :getListApi="getCrowdList" :tableParams="crowdTableParams" :hasNum="true" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :beforeSearchFn="beforeSearchFn" @selectionTable="selectionTable" @row-click="rowClick"></GLTable> <GLTable v-loading="loading" ref="crowdTable" :getListApi="getCrowdList" :tableParams="crowdTableParams"
:hasNum="true" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url"
:beforeSearchFn="beforeSearchFn" @selectionTable="selectionTable" @row-click="rowClick"></GLTable>
</div> </div>
</div> </div>
</div> </div>
...@@ -32,7 +35,8 @@ ...@@ -32,7 +35,8 @@
<div class="member-name">人群({{ innerTags.length }}项)</div> <div class="member-name">人群({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper"> <div class="input-tag-wrapper">
<div class="tag-box"> <div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag)"> <el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false"
@close="remove(tag)">
{{ tag.crowdName }} {{ tag.crowdName }}
</el-tag> </el-tag>
</div> </div>
...@@ -89,8 +93,8 @@ export default { ...@@ -89,8 +93,8 @@ export default {
watch: { watch: {
selectCrowdData(val) { selectCrowdData(val) {
this.$emit('crowdData', val) this.$emit('crowdData', val)
this.$refs.crowdTable.$refs.crowdlistMutiTable.clearSelection()
if (val.length) { if (val.length) {
this.$refs.crowdTable.$refs.crowdlistMutiTable.clearSelection()
val.forEach(item => { val.forEach(item => {
this.rowClick(item) this.rowClick(item)
}) })
...@@ -133,12 +137,14 @@ export default { ...@@ -133,12 +137,14 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.member-wrapper { .member-wrapper {
display: flex; display: flex;
.member-title { .member-title {
font-size: 16px; font-size: 16px;
color: #333; color: #333;
font-weight: 600; font-weight: 600;
line-height: 22px; line-height: 22px;
margin-bottom: 6px; margin-bottom: 6px;
span { span {
display: inline-block; display: inline-block;
padding-left: 5px; padding-left: 5px;
...@@ -147,35 +153,42 @@ export default { ...@@ -147,35 +153,42 @@ export default {
font-weight: 500; font-weight: 500;
} }
} }
.member-left { .member-left {
width: 780px; width: 780px;
.member-content { .member-content {
border: 1px solid #eee; border: 1px solid #eee;
padding-bottom: 20px; padding-bottom: 20px;
/deep/ { /deep/ {
.el-table { .el-table {
height: 40vh; height: 40vh;
overflow-y: auto; overflow-y: auto;
} }
} }
.member-form { .member-form {
padding: 10px 20px; padding: 10px 20px;
} }
.table-content { .table-content {
max-height: 456px; max-height: 456px;
overflow: auto; overflow: auto;
border-top: 1px solid #eee; border-top: 1px solid #eee;
} }
} }
.member-checked { .member-checked {
text-align: right; text-align: right;
margin-top: 10px; margin-top: 10px;
} }
} }
.member-right { .member-right {
width: 248px; width: 248px;
margin-left: 14px; margin-left: 14px;
.member-name { .member-name {
font-size: 14px; font-size: 14px;
color: #333; color: #333;
...@@ -185,10 +198,12 @@ export default { ...@@ -185,10 +198,12 @@ export default {
} }
} }
} }
.tag-box { .tag-box {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
.input-tag-wrapper { .input-tag-wrapper {
position: relative; position: relative;
font-size: 14px; font-size: 14px;
...@@ -206,24 +221,28 @@ export default { ...@@ -206,24 +221,28 @@ export default {
align-items: center; align-items: center;
max-height: 500px; max-height: 500px;
overflow: auto; overflow: auto;
// margin-bottom: 10px; // margin-bottom: 10px;
i { i {
color: #75acff; color: #75acff;
margin-right: 3px; margin-right: 3px;
font-size: 14px; font-size: 14px;
} }
/deep/ input { /deep/ input {
/* input { */ /* input { */
/* background-color: red!important; 调试用的样式 */ /* background-color: red!important; 调试用的样式 */
outline: none !important; outline: none !important;
border: none !important; border: none !important;
} }
/deep/ .el-input { /deep/ .el-input {
min-width: 150px; min-width: 150px;
width: auto; width: auto;
flex: 1; flex: 1;
} }
} }
.el-tag { .el-tag {
margin-right: 10px; margin-right: 10px;
line-height: 22px; line-height: 22px;
...@@ -231,6 +250,7 @@ export default { ...@@ -231,6 +250,7 @@ export default {
height: 24px; height: 24px;
background: #FAFBFE !important; background: #FAFBFE !important;
} }
/deep/.el-dialog__title { /deep/.el-dialog__title {
font-weight: 600; font-weight: 600;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!