Commit 1a017aed by crushh

Merge branch 'feature/6/31' into dev

parents ddaf98f9 577f7049
......@@ -352,10 +352,10 @@ export default {
}
const originData = res.result[0];
this.talkTimeData = [
{ label: '10秒以下', color: '#2d4dd1', count: originData['firstInterval'], percent: originData['firstProportion'] },
{ label: '≤10秒', color: '#2d4dd1', count: originData['firstInterval'], percent: originData['firstProportion'] },
{ label: '11-30秒', color: '#D6B38C', count: originData['secondInterval'], percent: originData['secondProportion'] },
{ label: '30-60秒', color: '#14C9C9', count: originData['thirdInterval'], percent: originData['thirdProportion'] },
{ label: '60秒以上', color: '#05B770', count: originData['fourthInterval'], percent: originData['fourthProportion'] }
{ label: '31-60秒', color: '#14C9C9', count: originData['thirdInterval'], percent: originData['thirdProportion'] },
{ label: '>60秒', color: '#05B770', count: originData['fourthInterval'], percent: originData['fourthProportion'] }
];
const data = [
this.talkTimeData.reduce(
......
......@@ -261,7 +261,8 @@
</dm-form-bottom>
</el-form>
<lib-message v-if="smsDialogVisible" :show.sync="smsDialogVisible" :useByEcm="false" @sendItem="handleSendItem"></lib-message>
<tagPop :visiable.sync="tagsDialogVisible" @save="saveTagPop" />
<!-- <tagPop :visiable.sync="tagsDialogVisible" @save="saveTagPop" /> -->
<dm-memberTag-group :visiable.sync="tagsDialogVisible" @save="saveTagPop"></dm-memberTag-group>
<el-dialog :title="tipsDialogContent.title" :visible="tipsDialogContent.visible" width="700px" @close="tipsDialogContent.visible = false">
<div class="gradeContent">
<div class="tips" style="color:#606266;">
......@@ -283,7 +284,6 @@ import birthSense from '@/views/ai/task/components/birthActiveTime.vue';
import holidaySense from '@/views/ai/task/components/holidayActiveTime.vue';
import LibMessage from '@/views/ecm/marketing-event/components/lib-message.vue';
import activeTime from '@/views/ai/task/components/activeTime.vue';
import tagPop from '@/views/ai/task/tagPop.vue';
import { formatDateTimeByType, _debounce } from '@/utils/index';
import ruleFilter from '@/components/dm-new-rule/ruleFilter.vue';
......@@ -487,8 +487,7 @@ export default {
holidaySense,
activeTime,
LibMessage,
ruleFilter,
tagPop
ruleFilter
},
methods: {
async getActivityDetail(activityId) {
......
<template>
<div class="flex">
<el-input v-model="item.tagItemName" placeholder="请输入标签值" class="w-380" maxlength="15" show-word-limit @change="onChange" />
<template>
<i v-if="currentLength < 50" class="iconfont plus icon margin icon-PlusOutlined" @click="add" />
<i v-else class="icon margin" />
</template>
<i v-if="currentLength > 1" class="iconfont delete icon icon-Delete" @click="del" />
</div>
</template>
<script>
export default {
name: 'TagValueItem',
props: {
item: Object,
currentLength: Number
},
data() {
return {
tagValue: ''
};
},
methods: {
add() {
this.$emit('add', this.item.id);
},
del() {
this.$emit('del', this.item.id);
}
}
};
</script>
<style scoped lang="scss">
@mixin flex($justify, $alignItems) {
display: flex;
justify-content: $justify;
align-items: $alignItems;
}
.flex {
@include flex(initial, center);
&:not(:last-of-type) {
margin-bottom: 20px;
}
}
.w-380 {
width: 380px;
}
.icon {
display: inline-block;
width: 24px;
height: 24px;
border-radius: 2px;
text-align: center;
line-height: 24px;
cursor: pointer;
}
.margin {
margin: 0 7px 0 16px;
}
.plus {
color: #2f54eb;
&:hover {
background: rgba(47, 84, 235, 0.1);
}
}
.delete {
color: #f5222d;
&:hover {
background: rgba(245, 34, 45, 0.1);
}
}
</style>
<template>
<div>
<el-dialog title="选择标签" :visible.sync="visiable" width="900px" :before-close="close">
<div class="container">
<el-tabs tab-position="left" @tab-click="onTabsClick" v-model="activeName">
<el-tab-pane :label="item.levelName" v-for="item in tabList" :key="item.id" :name="item.id" v-loading="tabPaneLoading">
<div class="rightContent">
<div class="searchWrap">
<div><el-input prefix-icon="el-icon-search" v-model="search" placeholder="请输入标签名称" @keyup.enter.native="getList" clearable @clear="getList"></el-input></div>
<div class="btn"><el-button size="small" type="primary" @click="showPopVisible = true">新增标签</el-button></div>
</div>
<div class="radioContainer" v-if="valueList.length">
<div v-for="item in valueList" :key="item.tagId" class="radioLine">
<div class="lineTitle">{{ item.tagName }}</div>
<el-radio v-for="value in item.itemList" :key="value.tagItemId" :label="value" v-model="selectVal" @change="val => handleChange(item.tagName, val)">{{ value.tagItemName }}</el-radio>
</div>
</div>
<div class="nonData" v-else>
暂无数据
</div>
<dm-pagination class="fr" layout="prev, pager, next" v-if="totalCount" :total="totalCount" :page-size="pageSize" :current-page.sync="currentPage" @current-change="getPageMemberTagDetail"> </dm-pagination>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
</div>
</el-dialog>
<manual-tag-edit :options="manualTagPop" :showPop.sync="showPopVisible" @save="addNewTag"></manual-tag-edit>
</div>
</template>
<script>
import { pageMemberTagDetail, platformHomePageV2 } from '@/service/api/aiApi.js';
import ManualTagEdit from './manualTagEdit';
export default {
data() {
return {
activeName: '',
search: '',
tabList: [],
valueList: [],
tabPaneLoading: false,
totalCount: 0,
currentPage: 1,
pageSize: 20,
showPopVisible: false,
manualTagPop: {
show: false,
popTitle: '',
tagId: '',
tagLevelGroupId: '',
tagTwoLevelGroupId: '',
isSync: false
},
selectVal: '',
selectedTag: ''
};
},
props: {
visiable: {
type: Boolean,
default: false
}
},
mounted() {
this.getPlatformHomePageV2();
},
components: {
ManualTagEdit
},
methods: {
handleChange(val, label) {
this.selectedTag = JSON.parse(JSON.stringify(label));
this.selectedTag.tagItemName = val + '-' + this.selectedTag.tagItemName;
},
confirm() {
if (!this.selectedTag) {
this.$message.waring('请选择标签');
return;
}
this.$emit('save', this.selectedTag);
this.close();
},
addNewTag() {
this.activeName = this.tabList[0].id;
this.currentPage = 1;
this.getPageMemberTagDetail();
},
getList() {
this.currentPage = 1;
this.getPageMemberTagDetail();
},
onTabsClick(val) {
const { name } = val;
console.log(name);
this.currentPage = 1;
this.getPageMemberTagDetail();
},
close() {
this.selectedTag = '';
this.$emit('update:visiable', false);
},
async getPageMemberTagDetail() {
const param = {
search: this.search,
tagLevelGroupId: this.activeName,
pageNum: this.currentPage,
pageSize: this.pageSize
};
const { result } = await pageMemberTagDetail(param);
if (result) {
this.totalCount = result.totalCount;
this.valueList = result.result;
}
},
async getPlatformHomePageV2() {
const param = {
tagLevelType: 2
};
const { result } = await platformHomePageV2(param);
if (result) {
this.tabList = [{ levelName: '所有活动标签', id: result[0].tagLevelGroupId }, ...result[0].children[0].children];
}
if (this.tabList.length) {
this.activeName = this.tabList[0].id;
this.getPageMemberTagDetail();
}
}
}
};
</script>
<style lang="scss" scoped>
.rightContent {
padding: 4px 0 0 16px;
box-sizing: border-box;
}
.searchWrap {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
.container {
height: 521px;
border-radius: 4px;
border: 1px solid #dcdfe6;
padding: 11px 17px 0 0;
}
.radioContainer {
height: 430px;
overflow-y: auto;
.el-radio + .el-radio {
margin-left: 0;
}
}
.nonData {
height: 430px;
display: flex;
justify-content: center;
align-items: center;
}
.radioLine {
.lineTitle {
font-weight: bolder;
margin-bottom: 16px;
width: 100%;
color: #303030;
}
display: flex;
flex-wrap: wrap;
margin-bottom: 24px;
}
.fr {
float: right;
margin: 0;
}
</style>
......@@ -79,9 +79,8 @@
</el-radio>
<el-radio :disabled="checked[0] !== 'brithday_day' || isEdit" v-model="form.brithday_dayval" :label="1">
之前
<el-input-number controls-position="right" :min="1" style="width:244px;" :disabled="checked[0] !== 'brithday_day' || isEdit" v-model="form.brithday_day"></el-input-number>
<el-input-number controls-position="right" :min="1" :max="366" style="width:115px;" :disabled="checked[0] !== 'brithday_day' || isEdit" v-model="form.brithday_day"></el-input-number>
<span style="line-height:32px;font-size: 14px;margin-left:20px">执行</span>
</el-radio>
</div>
......
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