Commit 0ee03ae2 by crushh

Merge branch 'feature/3月迭代' into dev

parents 1c2d7eff 0465c6db
import gicNewMemberGroup from './index.vue'; // 导入组件
// gicNewMemberGroup.install = function(Vue) {
// Vue.component(gicNewMemberGroup.name, gicNewMemberGroup);
// };
// if (typeof window !== 'undefined' && window.Vue) {
// window.Vue.use(gicNewMemberGroup);
// }
export let baseUrl = '';
export default gicNewMemberGroup;
<template>
<div>
<div class="echo-member-group" v-if="echo">
<div class="subTitle">
<div class="line"></div>
<div class="text">
<div class="space-between">
已选分组
<span><el-button type="text" class="delBtn" @click="del">删除</el-button><el-button type="text" @click="edit">编辑</el-button></span>
</div>
</div>
</div>
<div class="echoLine" v-for="item in defaltSelected" :key="item.memberTagGroupId">
<div class="dot"></div>
<el-tag size="mini" v-if="item.isRealTime">实时</el-tag>
<el-tag size="mini" type="warning" v-else>非实时</el-tag>
<span class="groupName"> {{ item.groupName }}</span>
</div>
</div>
<el-dialog title="选择客户分组" :visible.sync="visiable" width="1000px">
<div class="member-group">
<div class="left">
<el-tabs v-model="activeName">
<el-tab-pane label="我的客户分组" name="0" v-if="!onlyFixedType">
<dm-table ref="table0" name="0" :creatorId="creatorId" :effectiveStatus="effectiveStatus" :readonly="readonly" :realTimeType="realTimeType" :activeName="activeName" :selected="selectedArray" @handleSelectionChange="handleSelectionChange" @deleteRow="deleteRow" />
</el-tab-pane>
<el-tab-pane label="固化分组" name="1">
<dm-table ref="table1" name="1" :creatorId="creatorId" :effectiveStatus="effectiveStatus" :readonly="readonly" :realTimeType="realTimeType" :activeName="activeName" :selected="selectedArray" @handleSelectionChange="handleSelectionChange" @deleteRow="deleteRow" />
</el-tab-pane>
<el-tab-pane label="金字塔会员分层" name="2" v-if="!onlyFixedType">
<dm-table ref="table2" name="2" :creatorId="creatorId" :effectiveStatus="effectiveStatus" :readonly="readonly" :realTimeType="realTimeType" :activeName="activeName" :selected="selectedArray" @handleSelectionChange="handleSelectionChange" @deleteRow="deleteRow" />
</el-tab-pane>
</el-tabs>
</div>
<div class="right">
<div class="right-top">
已选分组
</div>
<ul class="right-content">
<li class="contact-li" v-for="item in selectedArray" :key="item.memberTagGroupId">
<div class="li-cell cursor-pointer">
<div>
<el-tag size="mini" v-if="item.isRealTime">实时</el-tag>
<el-tag size="mini" type="warning" v-else>非实时</el-tag>
<span class="groupName"> {{ item.groupName }}</span>
</div>
<i v-if="!readonly" class="el-icon-close" @click="deleteRow(item)"></i>
</div>
</li>
</ul>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="visiable = false">取消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { baseUrl } from './index.js';
import table from './table';
export default {
name: 'gic-new-member-group',
props: {
defaltSelected: {
type: Array,
default() {
return [];
}
},
visiable: {
type: Boolean,
default: false
},
height: {
type: Number,
default: 543
},
projectName: {
type: String,
default: 'memberTag'
},
creatorId: {
type: String,
default: ''
},
effectiveStatus: {
type: [String, Number],
default: 1
},
maxLimit: {
type: Number,
default: 5
},
onlyFixedType: {
// 仅展示固化分组
type: Boolean,
default: false
},
readonly: {
// 只读
type: Boolean,
default: false
},
realTimeType: {
// 实时与非实时分组的可选
// 0:可选非实时分组 1:可选实时分组
type: Array,
default: () => [0, 1]
},
echo: {
// 使用回显样式
type: Boolean,
default: false
}
},
components: {
'dm-table': table
},
data() {
return {
activeName: '0', //0 我的客户分组 1固化分组 2金字塔会员分层
baseUrl,
showEcho: false,
selected: {}
};
},
mounted() {
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.$refs[`table${this.activeName}`] && this.$refs[`table${this.activeName}`].getGroupList();
}
});
if (this.defaltSelected.length) {
this.handleSelectionChange(this.defaltSelected);
}
if (this.onlyFixedType) {
this.activeName = '1';
}
},
watch: {
selected(val) {
console.log(val);
let arr = [];
Object.keys(val).forEach(key => {
arr.push(val[key]);
});
this.$emit('change', arr);
},
echo(val) {
console.log('echo-->', val);
this.showEcho = val;
}
},
computed: {
selectedArray() {
let arr = [];
Object.keys(this.selected).forEach(item => {
arr.push(this.selected[item]);
});
return arr;
}
},
methods: {
confirm() {
let arr = [];
Object.keys(this.selected).forEach(key => {
arr.push(this.selected[key]);
});
const str = arr.map(item => item.memberTagGroupId).join(',');
this.$emit('update:visiable', false);
this.$emit('confirm', str);
},
del() {
this.selected = {};
},
edit() {
this.$emit('update:visiable', true);
},
handleSelectionChange(val) {
const obj = JSON.parse(JSON.stringify(this.selected));
if (val.length) {
val.forEach(item => {
obj[item.memberTagGroupId] = item;
});
if (Object.keys(obj).length > this.maxLimit) {
this.deleteRow(val[val.length - 1]);
this.$message.error(`最多支持选择${this.maxLimit}个分组`);
return false;
}
}
this.selected = obj;
},
deleteRow(row) {
delete this.selected[row.memberTagGroupId];
this.selected = Object.assign({}, this.selected);
this.$refs[`table${this.activeName}`].$refs.table.toggleRowSelection(row, false);
}
}
};
</script>
<style lang="scss" scoped>
.delBtn {
color: #f5222d;
}
.space-between {
display: flex;
justify-content: space-between;
}
.subTitle {
width: 100%;
height: 40px;
display: flex;
box-sizing: border-box;
align-items: center;
.line {
width: 2px;
height: 14px;
background: #2f54eb;
margin-right: 8px;
}
.text {
font-size: 14px;
color: #303133;
width: 100%;
}
}
.echo-member-group {
width: 400px;
background: #f7f8fa;
border-radius: 4px;
padding: 12px 15px;
box-sizing: border-box;
.echoLine {
margin-bottom: 8px;
line-height: 20px;
.dot {
display: inline-block;
width: 6px;
height: 6px;
background: #2f54eb;
border-radius: 3px;
margin-right: 6px;
}
.groupName {
font-weight: 400;
margin-left: 5px;
}
&:first-child {
margin-top: 20px;
}
}
}
.member-group {
background: #ffffff;
display: flex;
.left {
width: 666px;
height: 582px;
border-radius: 4px;
border: 1px solid #dcdfe6;
padding: 5px 17px;
}
.right {
width: 274px;
height: 582px;
border-radius: 4px;
border: 1px solid #dcdfe6;
margin-left: 12px;
.right-top {
padding: 20px 15px;
display: flex;
justify-content: space-between;
color: #303133;
box-sizing: border-box;
line-height: 20px;
background: #fff;
}
.right-content {
color: #303133;
overflow-y: auto;
height: 89%;
}
.contact-li {
padding: 0 12px 0 16px;
margin-top: 4px;
&:hover {
background: #f7f8fa;
}
&:first-child {
margin-top: 0;
}
.li-cell {
border-radius: 2px;
line-height: 32px;
display: inline-flex;
width: 100%;
justify-content: space-between;
padding: 0 4px;
align-items: center;
box-sizing: border-box;
i {
width: 20px;
height: 20px;
border-radius: 10px;
cursor: pointer;
font-size: 12px;
display: inline-flex;
justify-content: center;
align-items: center;
&:hover {
background: #e5e6eb;
}
}
}
}
.contact-li + .contact-li {
margin-top: 4px;
}
}
}
</style>
客户分组
\ No newline at end of file
<template>
<div>
<div class="leftHead">
<div class="tips">
<li><span class="dots"></span> 选择多个分组时,会自动去重分组下的客户;</li>
<li><span class="dots"></span> 非实时分组到期后,客户数据会清空,任务将不在继续执行;</li>
</div>
<div class="searchWrap">
<div><el-input prefix-icon="el-icon-search" v-model="dataSearch" placeholder="请输入分组名称" @keyup.enter.native="search" clearable @clear="search"></el-input></div>
<div class="btn"><el-button size="small" type="primary" @click="addGroup">新增分组</el-button></div>
</div>
</div>
<el-table :data="tableData" ref="table" v-loading="loading" @select="handleSelect" @selection-change="handleSelectionChange" row-key="memberTagGroupId" @row-click="selectRow">
<el-table-column type="selection" width="55" :selectable="selectable"> </el-table-column>
<el-table-column label="分组名称" min-width="180px" prop="groupName">
<template slot-scope="{ row }">
<el-tag size="mini" :type="!row.isRealTime ? 'warning' : ''"> {{ !row.isRealTime ? '非实时' : '实时' }}</el-tag>
{{ row.groupName }}
</template>
</el-table-column>
<el-table-column label="覆盖人群" prop="memberCount" />
<el-table-column label="最近更新时间" min-width="120px" prop="latestUpdateTime">
<template slot-scope="scope">
<p class="h-18">{{ scope.row.latestUpdateTime | formatTimeYMD }}</p>
<p class="h-18">{{ scope.row.latestUpdateTime | formatTimeHMS }}</p>
</template>
</el-table-column>
<el-table-column label="到期时间" v-if="activeName != 2" min-width="120px" prop="recentUpdateDate">
<template slot-scope="scope">
<p class="h-18">{{ scope.row.recentUpdateDate | formatTimeYMD }}</p>
<p class="h-18">{{ scope.row.recentUpdateDate | formatTimeHMS }}</p>
</template>
</el-table-column>
</el-table>
<div class="pageBtn">
<el-pagination layout="prev, pager, next" v-if="totalCount" :total="totalCount" :page-size="pageSize" :current-page.sync="currentPage" @current-change="getGroupList"> </el-pagination>
</div>
</div>
</template>
<script>
import { baseUrl } from './index.js';
export default {
props: {
realTimeType: {
type: Array,
default: () => [0, 1]
},
selected: {
type: Array,
default: () => []
},
activeName: {
type: String,
default: ''
},
projectName: {
type: String,
default: 'memberTag'
},
creatorId: {
type: String,
default: ''
},
effectiveStatus: {
type: [String, Number],
default: 1
},
maxLimit: {
type: Number
},
readonly: {
// 只读
type: Boolean,
default: false
},
name: {
type: String,
default: '0'
}
},
data() {
return {
baseUrl,
loading: false,
tableData: [],
totalCount: 0,
pageSize: 5,
currentPage: 1,
dataSearch: '',
fixedType: 0 // 0普通的分组, 1固化分组 3固化分组分堆
};
},
filters: {
formatTimeYMD(data) {
return data && data != '- -' ? String(data).split(' ')[0] : '--';
},
formatTimeHMS(data) {
return data && data != '- -' ? String(data).split(' ')[1] : '--';
}
},
mounted() {
console.log('mounted');
},
watch: {
tableData(val) {
if (val.length) {
this.$nextTick(() => {
this.selected.forEach(item => {
val.forEach(row => {
if (item.memberTagGroupId == row.memberTagGroupId) {
// 必须要传入从this.tableData里查询到的对象才能出现被勾选样式
this.$refs.table.toggleRowSelection(
this.tableData.find(row => {
return row.memberTagGroupId == item.memberTagGroupId;
}),
true
);
}
});
});
});
}
},
activeName: {
handler(val) {
if (val == '0' && this.name == '0') {
this.fixedType = 0;
this.getGroupList();
} else if (val == '1' && this.name == '1') {
this.fixedType = 1;
this.getGroupList();
} else if (val == '2' && this.name == '2') {
this.getGroupList();
}
},
immediate: true
}
},
methods: {
selectable(row) {
if (this.readonly) {
return false;
} else if (!this.realTimeType.includes(row.isRealTime)) {
return false;
} else {
return true;
}
},
addGroup() {
window.open('http://gicdev.demogic.com/member-tag/#/memberGroupEdit?refresh', '_blank');
},
selectRow(row) {
if (this.realTimeType.some(el => el == row.isRealTime)) {
if (this.selected.length && this.selected.find(item => item.memberTagGroupId == row.memberTagGroupId)) {
this.$emit('deleteRow', row);
} else {
this.$refs.table.toggleRowSelection(row);
}
}
},
handleSelectionChange(val) {
if (val.length) {
this.$emit('handleSelectionChange', val);
}
},
handleSelect(selection, row) {
if (this.selected.length && this.selected.find(item => item.memberTagGroupId == row.memberTagGroupId)) {
this.$emit('deleteRow', row);
}
},
search() {
this.currentPage = 1;
this.getGroupList();
},
/**
* 获取 列表数据
*/
getGroupList() {
this.loading = true;
this.tableData = [];
this.totalCount = 0;
let url = `${this.baseUrl}/gic-member-tag-web/member-tag-group/findList.json?requestProject=${this.projectName}&fixedType=${this.fixedType}&creatorId=${this.creatorId}&pageSize=${this.pageSize}&pageNum=${this.currentPage}&groupName=${this.dataSearch}&effectiveStatus=${this.effectiveStatus}`;
if (this.activeName == '2') {
url = `${this.baseUrl}/gic-member-tag-web/memberTagGrade/gradeGroupList?requestProject=${this.projectName}&pageSize=${this.pageSize}&pageNum=${this.currentPage}&groupName=${this.dataSearch}`;
}
this.axios
.get(url)
.then(res => {
if (res.data.errorCode == 1) {
this.tableData = res.data.result.result;
this.totalCount = res.data.result.totalCount;
return;
}
this.$message.error({
duration: 2000,
message: res.data.message
});
})
.catch(error => {
this.$message.error({
duration: 2000,
message: error.message
});
})
.finally(() => {
this.loading = false;
});
}
}
};
</script>
<style lang="scss" scoped>
.leftHead {
.tips {
padding-bottom: 15px;
li {
display: flex;
align-items: center;
line-height: 17px;
&:last-child {
margin-top: 4px;
}
}
.dots {
width: 5px;
height: 5px;
background: #c4c6cf;
display: inline-block;
border-radius: 2.5px;
margin-right: 6px;
}
}
.searchWrap {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
}
.pageBtn {
float: right;
margin: 13px 0 18px 0;
}
.h-18 {
line-height: 18px;
}
</style>
......@@ -34,6 +34,11 @@ export default {
meta: {
type: 'info'
}
},
{
path: 'rule',
name: '规则筛选器',
component: () => import('../../views/ai/ruleFilter.vue')
}
]
};
......@@ -26,5 +26,13 @@ export const startActivityPlan = params => requests(PREFIX + 'start-activity-pla
//查看计划详情
export const getActivityDetail = params => requests(PREFIX + 'get-activity-detail', params, true, false, 'get');
export const tempPageStatistics = params => requests('/api-marketing/template/page-statistics', params, true, false, 'post');
export const tempDetail = params => requests('/api-marketing/template/query', params, true, false, 'get');
//节日分类信息
export const listAllHolidays = params => requests('/api-marketing/list-all-holidays', params, true, false, 'get');
//获取活动计划预估人数
export const getMemberCount = params => requests(PREFIX + '/get-member-count', params, true, false, 'get');
......@@ -116,6 +116,7 @@ export default {
},
watch: {
data(val) {
console.log('--->data');
if (val) {
this.form = JSON.parse(JSON.stringify(val));
}
......@@ -190,4 +191,12 @@ export default {
};
</script>
<style></style>
<style scoped>
.tips {
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 17px;
margin-left: 20px;
}
</style>
<template>
<el-form :model="form" ref="form" label-width="100px" :rules="rules">
<el-form-item label="节日名称" prop="holiday_type" required>
<el-radio v-model="form.holiday_type" :label="1">推荐节日</el-radio>
<el-radio v-model="form.holiday_type" :label="2">自定义节日</el-radio>
<span class="tips">为保证触达率,节日活动需要提前创建,不支持创建节日日期为活动创建日的活动</span>
<div>
<el-tag type="mini">{{ form.holiday_name }}</el-tag>
<el-button type="text" v-show="form.holiday_type == 1" @click="visible = true">选择节日</el-button>
</div>
</el-form-item>
<el-form-item label="节日日期" prop="holiday_date" required>
<span class="tips" v-if="!form.holiday_date">未选择节日</span>
<span v-else>{{ form.holiday_date }}</span>
</el-form-item>
<el-form-item label="外呼时间" prop="holiday_day" required>
节日前
<el-input-number class="w100" style="margin:0 5px;" v-model="form.holiday_day" controls-position="right" :max="30" :min="1" size="small" />
......@@ -18,23 +31,100 @@
<span v-if="!activeTime" class="tips" style="font-size: 14px;margin:0">设置【节日日期】和【外呼时间】后自动生成</span>
<span v-else>{{ activeTime }}</span>
</el-form-item>
<el-dialog title="选择节日" :visible.sync="visible" width="700px" :before-close="close">
<div class="tips">
仅支持选择节日日期为最近1-60天内的节日
</div>
<div class="holiday" v-for="item in holidayData" :key="item.id">
<dm-sub-title>{{ item.id }}</dm-sub-title>
<div class="radioLine">
<el-radio v-model="selectedData" :label="val" v-for="val in item.holidaysList" :key="val.id">{{ val.name }}</el-radio>
</div>
</div>
<span slot="footer">
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="addItem">确定</el-button>
</span>
</el-dialog>
</el-form>
</template>
<script>
import defineTime from './defineTime.vue';
import { formatDateTimeByType } from '@/utils/index';
import { formatDateTimeByType, getTimesByReq } from '@/utils/index';
import { listAllHolidays } from '@/service/api/aiApi.js';
export default {
data() {
return {
formatDateTimeByType,
getTimesByReq,
form: {
holiday_day: '', // 节日时间
holiday_type: 1, // 节日活动场景特有值 节日类型 1推荐 2自定义
holiday_name: '国庆节', // 节日活动场景特有值 节日名称
holiday_date: '2022-10-01', //节日活动场景特有值 节日日期
holiday_day: '', // 外呼时间
callFlag: 0, //外呼时段 0 默认 1 自定义
callTime: [{}] // 自定义时段
},
rules: {}
rules: {},
holidayData: [
{
id: 'S', //节日分类ID
name: '', //节日分类名称
holidaysList: [
{
id: '1', // 节日配置ID
name: '妇女节', //节日配置名称
date: '2020-03-08' //节日配置日期
},
{
id: '2', // 节日配置ID
name: '618', //节日配置名称
date: '2020-06-18' //节日配置日期
},
{
id: '3', // 节日配置ID
name: '端午节端午节端午', //节日配置名称
date: '2020-10-01' //节日配置日期
}
]
},
{
id: 'A', //节日分类ID
name: '', //节日分类名称
holidaysList: [
{
id: '4', // 节日配置ID
name: '端午节', //节日配置名称
date: '2020-05-05' //节日配置日期
},
{
id: '5', // 节日配置ID
name: '中秋节', //节日配置名称
date: '2020-07-15' //节日配置日期
},
{
id: '6', // 节日配置ID
name: '愚人节', //节日配置名称
date: '2020-04-01' //节日配置日期
}
]
},
{
id: 'B', //节日分类ID
name: '', //节日分类名称
holidaysList: [
{
id: '7', // 节日配置ID
name: '元宵节', //节日配置名称
date: '2020-01-01' //节日配置日期
}
]
}
],
selectedData: '',
visible: false
};
},
props: {
......@@ -43,16 +133,25 @@ export default {
default: () => {}
}
},
mounted() {
this.getListAllHolidays();
},
watch: {
data(val) {
if (val) {
this.form = JSON.parse(JSON.stringify(val));
this.handleHolidayDay();
}
}
},
computed: {
activeTime() {
let str = '';
if (this.form.holiday_date && this.form.holiday_day) {
let startTimestamp = getTimesByReq(this.form.holiday_date) - this.form.holiday_day * 24 * 60 * 60 * 1000;
let endTimestamp = getTimesByReq(this.form.holiday_date) - 24 * 60 * 60 * 1000;
str = formatDateTimeByType(startTimestamp, 'yyyy-MM-dd') + ' 至 ' + formatDateTimeByType(endTimestamp, 'yyyy-MM-dd');
}
return str;
}
},
......@@ -60,6 +159,32 @@ export default {
defineTime
},
methods: {
handleHolidayDay() {
// 回显时 根据活动有效期和节日日期 算出外呼时间
this.form.holiday_day = ((getTimesByReq(this.form.holiday_date) - this.form.startDate) / 24) * 60 * 60 * 1000;
},
async getListAllHolidays() {
const { result } = await listAllHolidays();
console.log(result);
if (result) {
// this.holidayData = result;
}
},
addItem() {
if (!this.selectedData) {
this.$message({ type: 'warning', message: '未选择节日' });
return;
}
const { date, name } = this.selectedData;
this.form.holiday_name = name;
this.form.holiday_date = date;
this.close();
},
close() {
this.selectedData = '';
this.visible = false;
},
submit() {
return new Promise(async resolve => {
const res = await this.$refs.defineTime.submit();
......@@ -72,11 +197,17 @@ export default {
});
this.$refs.form.validate(val => {
if (val) {
const { callFlag, callTime } = this.form;
const { callFlag, callTime, holiday_date, holiday_type, holiday_name, holiday_day } = this.form;
const obj = {
startDate: getTimesByReq(holiday_date) - holiday_day * 24 * 60 * 60 * 1000,
endDate: getTimesByReq(holiday_date) - 24 * 60 * 60 * 1000,
callFlag,
callTime
callTime,
holiday_date,
holiday_type,
holiday_name
};
console.log(obj);
if (arr.length) {
obj.callTime = arr;
}
......@@ -91,4 +222,21 @@ export default {
};
</script>
<style></style>
<style lang="scss" scoped>
.tips {
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 17px;
margin-left: 20px;
}
.radioLine {
padding: 12px 0 24px 0;
display: flex;
flex-wrap: wrap;
gap: 15px;
.el-radio {
margin: 0;
}
}
</style>
<template>
<el-dialog title="设置规则" :visible.sync="tagsDialogVisible" width="900px">
<div class="ruleContainer">
<el-tabs tab-position="left" style="height: 200px;" @tab-click="onTabsClick">
<el-tab-pane :label="item.chainNodeName" v-for="item in conditionTypeList" :key="item.esScreeningWidgetChainId" :name="item.esScreeningWidgetChainId">{{ item.chainNodeName }}</el-tab-pane>
</el-tabs>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="tagsDialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirmTagsDialog">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import qs from 'qs';
export default {
data() {
return {
conditionTypeList: [],
tagsDialogVisible: true
};
},
mounted() {
this.getDataList();
},
methods: {
onTabsClick(val) {
console.log(val);
const { name } = val;
this.getNode(name);
},
// 获取列表
getDataList() {
let para = {
sceneCode: 'member02',
requestProject: 'gic-web'
};
this.axios
.post('/api-plug/get-screening-init-data', qs.stringify(para))
.then(res => {
let resData = res.data;
if (resData.errorCode == 0) {
this.conditionTypeList = resData.result;
return;
}
this.$message.error({
duration: 1000,
message: resData.message
});
})
.catch(error => {
this.$message.error({
duration: 1000,
message: error.message
});
});
},
getNode(widgetChainId) {
this.axios.get(`/api-plug/get-screening-widget-chain-detail?requestProject=gic-web&widgetChainId=${widgetChainId}`).then(res => {
const result = res.data.result; // 返回的结果 从第一层开始
console.log(result);
});
}
}
};
</script>
<style></style>
<template>
<el-dialog title="选择标签" :visible.sync="tagsDialogVisible" width="690px">
<div slot="footer" class="dialog-footer">
<el-button @click="tagsDialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirmTagsDialog">确定</el-button>
</div>
</el-dialog>
</template>
<script>
export default {};
</script>
<style></style>
......@@ -195,6 +195,12 @@ export default {
content: '节日活动邀约,会员专享权益,提升门店营业额'
},
{
title: '加企微好友',
scene: 3,
iconName: 'icon-qiweihaoyou',
content: '针对未添加企微好友的客户进行营销,添加企微好友'
},
{
title: '客户复购',
scene: 4,
iconName: 'icon-kehufugouguanli',
......
<template>
<el-dialog title="" :visible.sync="show" width="800px" :before-close="close">
<el-dialog title="" :visible.sync="show" width="900px" :before-close="close">
<span slot="title">
<span class="el-dialog__title">选择短信</span>
<span class="pl10 fz13 gray"><i class="el-icon-info pr10"></i>短信运营商限制:为避免骚扰用户,营销短信只允许在8点到22点发送</span>
<span class="pl10 fz13 gray" v-if="useByEcm"><i class="el-icon-info pr10"></i>短信运营商限制:为避免骚扰用户,营销短信只允许在8点到22点发送</span>
<span class="pl10 fz13 gray" v-else>仅展示审核通过的短信模板</span>
</span>
<div class="pb22 clearfix">
<div class="fl">
<span class="pr10">{{ total }}</span><el-input clearable v-model="listParams.search" class="w200" placeholder="请输入标题/作者" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-input clearable v-model="listParams.search" class="w260" placeholder="请输入短信模板名称" @change="refresh"><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
</div>
<div class="fr">
<div class="fr" v-if="useByEcm">
<el-button type="primary" @click="add">新建短信</el-button>
<el-button @click="refresh">刷新列表</el-button>
</div>
</div>
<el-table tooltipEffect="light" :data="smsTempList" height="400" style="width: 100%" row-class-name="cursor-pointer" v-loading="loading" @row-click="rowClick">
<el-table tooltipEffect="light" :data="smsTempList" height="420" style="width: 100%" row-class-name="cursor-pointer" v-loading="loading" @row-click="rowClick">
<el-table-column :show-overflow-tooltip="false" :width="60" align="center" prop="smsTemplateId">
<template slot-scope="scope">
<div class="label-hidden">
......@@ -21,19 +22,19 @@
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="200" :min-width="200" align="left" prop="title" label="模板名称"></el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="200" :min-width="200" align="left" prop="content" label="模板类型">
<el-table-column :show-overflow-tooltip="false" :width="180" align="left" prop="title" label="模板名称"></el-table-column>
<el-table-column :show-overflow-tooltip="false" :width="120" align="left" prop="content" label="模板类型">
<template slot-scope="scope">
<div>{{ scope.row.type === 0 ? '普通短信' : scope.row.type === 1 ? '营销短信' : '验证码' }}</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="false" :min-width="200" align="left" prop="content" label="模板内容">
<template slot-scope="scope">
<div class="ellipsis-l3">{{ scope.row.content }}</div>
<div class="ellipsis-l2">{{ scope.row.content }}</div>
</template>
</el-table-column>
</el-table>
<dm-pagination v-show="smsTempList.length" class="dm-pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="prev, pager, next" :total="total"></dm-pagination>
<dm-pagination v-show="smsTempList.length" class="dm-pagination" style="margin-top: 12px" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="listParams.currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="listParams.pageSize" layout="prev, pager, next" :total="total"></dm-pagination>
<span slot="footer" class="dialog-footer">
<el-button @click="close">关 闭</el-button>
<el-button type="primary" @click="addItem">确 定</el-button>
......@@ -49,6 +50,10 @@ export default {
show: {
type: Boolean,
default: false
},
useByEcm: {
type: Boolean,
default: true
}
},
data() {
......
......@@ -121,7 +121,7 @@
<script>
import { getEntepriseList } from '../assets/api';
import MaterialItem from './material-item.vue';
import LibMessage from './lib-Message.vue';
import LibMessage from './lib-message.vue';
import LibTeltask from './lib-teltask.vue';
export default {
......
......@@ -50,7 +50,7 @@ import itemWxa from './components/item-wxa.vue';
import itemCard from './components/item-card.vue';
import itemText from './components/item-text.vue';
import itemImage from './components/item-image.vue';
import itemMessage from './components/item-Message.vue';
import itemMessage from './components/item-message.vue';
import itemTeltask from './components/item-teltask.vue';
import itemIntegral from './components/item-integral.vue';
import itemGrade from './components/item-grade';
......@@ -58,7 +58,7 @@ import itemQywx from './components/item-qywx';
import itemQfxx from './components/item-qfxx';
//弹窗组件
import libTeletext from './components/lib-teletext.vue';
import libMessage from './components/lib-Message.vue';
import libMessage from './components/lib-message.vue';
import libCard from './components/lib-card.vue';
import libText from './components/lib-text.vue';
import libWxa from './components/lib-wxa.vue';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment