Commit 5ad3fd69 by huaying

fix: 客户日志

parent 4e0ab839
......@@ -133,21 +133,15 @@
<img class="channel-icon" v-if="channel.parentSourceCode == 1700" src="../../../static/img/channel-icon/qiyeweixin-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1303" src="../../../static/img/channel-icon/weimen-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1302" src="../../../static/img/channel-icon/tianmao-1.png" alt="">
<!-- <img class="channel-icon" v-if="channel.parentSourceCode == 1304" src="../../../static/img/channel-icon/douyin-1.png" alt=""> -->
</template>
<template v-if="channel.activeFlag == 1">
<img class="channel-icon" v-if="channel.parentSourceCode == 1304" src="../../../static/img/channel-icon/douyin-1.png" alt="">
</template>
<template v-if="channel.activeFlag != 1">
<img class="channel-icon" v-if="channel.parentSourceCode == 1304" src="../../../static/img/channel-icon/douyin-2.png" alt="">
</template>
</template>
<template v-if="channel.highlight == 2">
<img class="channel-icon" v-if="channel.parentSourceCode == 1100" src="../../../static/img/channel-icon/weixin-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1600" src="../../../static/img/channel-icon/xiaochengxu-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1700" src="../../../static/img/channel-icon/qiyeweixin-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1303" src="../../../static/img/channel-icon/weimen-2.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1302" src="../../../static/img/channel-icon/tianmao-2.png" alt="">
<!-- <img class="channel-icon" v-if="channel.parentSourceCode == 1304" src="../../../static/img/channel-icon/douyin-2.png" alt=""> -->
<img class="channel-icon" v-if="channel.parentSourceCode == 1304" src="../../../static/img/channel-icon/douyin-2.png" alt="">
</template>
</span>
</template>
......
......@@ -2,10 +2,16 @@
<div style="padding:20px">
<div class="logTop">
<el-cascader
style="width:260px;"
style="width:260px;"
placeholder="全部类型/全部事由"
:options="options"
filterable>
filterable
clearable
:props="{ checkStrictly: true }"
@change="filterMethod">
<template slot-scope="{data}">
<span>{{data.operTypeName || data.openReasonName}}</span>
</template>
</el-cascader>
<el-date-picker style="width: 256px; margin-left:10px;" v-model="dateDefault" type="daterange" range-separator="~" start-placeholder="创建开始日期" end-placeholder="创建结束日期" :default-time="['00:00:00', '23:59:59']" :picker-options="pickerOptions()" value-format="yyyy-MM-dd" @change="handleSearch"> </el-date-picker>
<p class="font14 tip-p" v-if="!memberId">展示近一年的日志</p>
......@@ -32,6 +38,7 @@
</el-table>
<div class="page mTop20" v-if="totalCount > 0">
<dm-pagination
v-if="!memberId"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
......@@ -41,6 +48,16 @@
layout="total, sizes, prev, pager, next"
:total="totalCount"
/>
<dm-pagination
v-else
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="logPageParam.currentPage"
:page-size="logPageParam.pageSize"
layout="prev, pager, next"
:total="totalCount"
/>
</div>
</div>
</template>
......@@ -48,7 +65,7 @@
<script>
import mixin from '../../wechatmembers/cardMixin';
import url from '../../axios/url';
import { doFetch } from '../../axios/api';
import { doFetch, doFetchGet } from '../../axios/api';
export default {
name: 'customerLog',
mixins: [mixin],
......@@ -65,16 +82,71 @@ export default {
logPageParam: {
pageSize: 20,
currentPage: 1,
operReason: null,
operType: null,
beginTime: '',
endTime: ''
},
totalCount: 0,
options: [
// {
// value: 'zhinan',
// label: '指南',
// children: [{
// value: 'shejiyuanze',
// label: '设计原则',
// children: [{
// value: 'yizhi',
// label: '一致'
// }, {
// value: 'fankui',
// label: '反馈'
// }, {
// value: 'xiaolv',
// label: '效率'
// }, {
// value: 'kekong',
// label: '可控'
// }]
// }, {
// value: 'daohang',
// label: '导航',
// children: [{
// value: 'cexiangdaohang',
// label: '侧向导航'
// }, {
// value: 'dingbudaohang',
// label: '顶部导航'
// }]
// }]
// }
]
};
},
created() {
this.setDefalutTime()
this.getLogPage();
this.getLogTypeData();
},
methods: {
// 级联搜索
filterMethod(e) {
console.log(e);
},
// 客户日志类型列表
getLogTypeData() {
doFetchGet(url.getMemberLogType,{}).then(res=>{
if(res.data.errorCode == 0) {
this.options = res.data.result || [];
console.log(this.options,'999');
}
})
},
// 客户日志列表
getLogPage () {
this.tableLoading = true;
this.logPageParam.beginTime = this.dateDefault[0];
this.logPageParam.endTime = this.dateDefault[1];
doFetch(url.logPage, {
...this.logPageParam,
memberId: this.memberId || this.$route.query.memberId,
......@@ -122,8 +194,8 @@ export default {
<style lang="scss" scoped>
.logTop {
margin-bottom: 20px;
display: flex;
align-items: center;
display: flex !important;
align-items: center !important;
margin-right: 10px;
}
.tip-p{
......
......@@ -171,7 +171,7 @@ export default {
this.otherTagsList = this.formatTagsList(otherTagsList);
this.weimobTagsList = this.formatTagsList(weimobTagsList);
this.weimobTagFlag = weimobTagFlag;
console.log(this.tagsList);
// console.log(this.tagsList);
} else {
checkFalse(res.data.message);
}
......@@ -211,7 +211,7 @@ export default {
},
// 切换选中
changeCheck (item, isMultiple = true) {
console.log(item, 'item');
// console.log(item, 'item');
let count = 0;
this.$nextTick(_ => {
// 站位
......@@ -259,7 +259,7 @@ export default {
if (ele.checkBox) tagIds.push(ele.checkBox);
}
});
console.log(tagIds);
// console.log(tagIds);
let curtagIds = '';
if (tagIds.length > 0) {
curtagIds = tagIds.join(',');
......
......@@ -60,7 +60,7 @@
<!-- {{member.memberSources}} -->
<el-popover popper-class="channel-info-popover" v-if="channel.highlight == 1" trigger="hover" placement="top">
<div class="channel-info">
<div class="channel-title">{{ channel.sourceName }}<span v-if="channel.parentSourceCode == 1304 && channel.activeFlag !=1">(未激活)</span></div>
<div class="channel-title">{{ channel.sourceName }}</div>
<div class="channel-info-item" v-if="!channel.event || channel.event != '-'">
<span class="channel-info-label">来 源:</span>
<span class="channel-info-value">{{ channel.event || '--' }}</span>
......@@ -76,11 +76,7 @@
<img class="channel-icon" v-if="channel.parentSourceCode == 1700" src="../../../static/img/channel-icon/qiyeweixin-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1303" src="../../../static/img/channel-icon/weimen-1.png" alt="">
<img class="channel-icon" v-if="channel.parentSourceCode == 1302" src="../../../static/img/channel-icon/tianmao-1.png" alt="">
<!-- <img class="channel-icon" v-if="channel.parentSourceCode == 1304" src="../../../static/img/channel-icon/douyin-1.png" alt=""> -->
<span v-if="channel.parentSourceCode == 1304">
<img class="channel-icon" v-if="channel.activeFlag == 1" src="../../../static/img/channel-icon/douyin-1.png" alt="">
<img class="channel-icon" v-else src="../../../static/img/channel-icon/douyin-2.png" alt="">
</span>
<img class="channel-icon" v-if="channel.parentSourceCode == 1304" src="../../../static/img/channel-icon/douyin-1.png" alt="">
</template>
</el-popover>
<template v-if="channel.highlight == 2">
......
......@@ -248,7 +248,7 @@ export default {
dom.innerText = text;
document.body.appendChild(dom);
const result = dom.offsetWidth >= 72;
console.log(dom.offsetWidth)
// console.log(dom.offsetWidth)
document.body.removeChild(dom);
return result;
},
......@@ -473,7 +473,7 @@ export default {
const res = await doFetchGet(url.getMarketingRecordNum, param);
if (res.data.errorCode == 0) {
this.marketingRecordNum = res.data.result || 0;
console.log(this.marketingRecordNum);
// console.log(this.marketingRecordNum);
} else {
checkFalse(res.data.message);
}
......
......@@ -99,7 +99,9 @@ const urlConfig = {
getMarketingRecordNum: '/api-marketing/member/marketing-count',
aiLogPage: '/api-marketing/member/page-ai-member-log',
getOrderList: '/api-member/member-all-order-page',
getMemberSourceList: '/api-plug/member-source-list'
getMemberSourceList: '/api-plug/member-source-list',
getMemberLogType: '/api-plug/member-oper-type-list',
getMemberLogReason: '/api-plug/member-oper-reason-list'
}
const defaultUrl = Object.assign({}, urlConfig);
......
......@@ -27,12 +27,12 @@ export default {
methods: {
setDefalutTime(){
let start = new Date();
start.setFullYear(start.getFullYear() - 1);
start.setDate(start.getDate() + 1);
start.setFullYear(start.getFullYear());
start.setDate(start.getDate());
start = `${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`;
let end = new Date();
end = `${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()}`;
this.dateDefault = [formatYMD(new Date(start).getTime()), formatYMD(new Date(end).getTime())]
end = `${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()-1}`;
this.dateDefault = [formatYMD(new Date(end).getTime()), formatYMD(new Date(start).getTime())]
},
}
};
\ No newline at end of file
......@@ -27,12 +27,12 @@ export default {
methods: {
setDefalutTime(){
let start = new Date();
start.setFullYear(start.getFullYear() - 2);
start.setFullYear(start.getFullYear());
start.setDate(start.getDate() + 1);
start = `${start.getFullYear()}-${start.getMonth() + 1}-${start.getDate()}`;
let end = new Date();
end = `${end.getFullYear()}-${end.getMonth() + 1}-${end.getDate()}`;
this.dateDefault = [formatYMD(new Date(start).getTime()), formatYMD(new Date(end).getTime())]
this.dateDefault = [formatYMD(new Date(end).getTime()), formatYMD(new Date(start).getTime())]
},
}
};
\ No newline at end of file
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