Commit 20887552 by liuchenxi

触达效果提交

parent 2efacd3e
......@@ -29,7 +29,6 @@
<script src="//web-1251519181.file.myqcloud.com/components/member-group.2.2.30.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/store-card.2.0.30.js"></script><!-- 门店选择器 -->
<script src="//web-1251519181.file.myqcloud.com/components/store-new.2.0.71.js"></script><!-- 新版门店选择器 -->
<script src="//web-1251519181.file.myqcloud.com/components/store-group.2.0.10.js"></script><!-- 门店选择器 -->
<script src="//web-1251519181.file.myqcloud.com/components/confirm-people.2.0.06.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/people.2.0.43.js"></script>
<script src="//web-1251519181.file.myqcloud.com/components/export-excel.2.0.16.js"></script><!-- 数据导出 -->
......
......@@ -8,7 +8,7 @@
<div class="dm-wrap area">
<div class="areatitle">
<span class="txt">区域详情</span>
<vue-gic-store-group :options="options" :isAdd="isAdd" :uuid.sync="uuid" ref="storeGroup"></vue-gic-store-group>
<vue-gic-store-new :options="options" :isAdd="isAdd" :uuid.sync="uuid" ref="storeNew" @store-change="storeChange"></vue-gic-store-new>
</div>
<div class="tabs" v-if="type == 1">
<div class="tab1">
......@@ -141,10 +141,12 @@ export default {
this.taskTabIndex = index;
}
}
this.currentPage = 1;
this.getTableFirstData();
},
changeListTab(index) {
this.listTabsIndex = index;
this.currentPage = 1;
this.$refs.table.clearSort();
this.getTableList();
},
......@@ -330,6 +332,10 @@ export default {
this.taskOrderBy = prop + ' ' + orderby;
}
this.getTableList();
},
storeChange(val) {
this.uuid = val;
this.getTableList();
}
},
beforeRouteEnter: (to, from, next) => {
......@@ -352,7 +358,7 @@ export default {
},
watch: {
uuid(val) {
console.log(val);
this.uuid = val;
}
}
};
......
......@@ -112,6 +112,7 @@ export default {
else if (this.type == 1) meth = ecmGuideCluesColumnDiagram;
else meth = ecmHeadCluesColumnDiagram;
meth({ ecmPlanId: this.$route.query.id || this.$route.params.id }).then(res => {
if (!res.result) res.result = [];
this.chartData = res.result.map(item => {
if (item.name == '线索转化收益') {
item.rate = item.vaule * 1;
......@@ -130,12 +131,14 @@ export default {
let date = new Date().getTime();
let oneDay = 86400000;
for (let i = 1; i <= 15; i++) {
let item = new Date(date - oneDay * i).toLocaleString('chinese', { hour12: false, year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' });
item = item.replace(/[\/]/g, '-').split(' ');
let year = new Date(date - oneDay * i).getFullYear();
let month = String(new Date(date - oneDay * i).getMonth() + 1).padStart('2', '0');
let day = String(new Date(date - oneDay * i).getDate()).padStart('2', '0');
let item = year + '-' + month + '-' + day;
let obj = [
{ date: item[0], value: 0, name: '触达人数' },
{ date: item[0], value: 0, name: '转化人数' },
{ date: item[0], rate: 0, name: '线索转化收益' }
{ date: item, value: 0, name: '触达人数' },
{ date: item, value: 0, name: '转化人数' },
{ date: item, rate: 0, name: '线索转化收益' }
];
arr.unshift(...obj);
}
......
......@@ -9,7 +9,7 @@
</div>
<div class="dm-wrap table">
<div class="title">
<span>触达方式对比</span>
<span>线索转化对比</span>
</div>
<div class="content">
<div class="left">
......
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