|
@@ -17,13 +17,7 @@
|
|
|
</div>
|
|
|
<div class="filter-control">
|
|
|
<span>IP:</span>
|
|
|
- <el-input
|
|
|
- v-model="listQuery.ip"
|
|
|
- placeholder="IP"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="getList"
|
|
|
- @clear="getList"
|
|
|
- />
|
|
|
+ <el-input v-model="listQuery.ip" placeholder="IP" clearable @keyup.enter.native="getList" @clear="getList" />
|
|
|
</div>
|
|
|
<div class="filter-control">
|
|
|
<span>手机号:</span>
|
|
@@ -31,7 +25,7 @@
|
|
|
v-model="listQuery.phoneNumber"
|
|
|
placeholder="手机号"
|
|
|
clearable
|
|
|
- style="width:160px;"
|
|
|
+ style="width: 160px"
|
|
|
@keyup.enter.native="getList"
|
|
|
@clear="getList"
|
|
|
/>
|
|
@@ -42,7 +36,7 @@
|
|
|
v-model="listQuery.contacts"
|
|
|
placeholder="联系人"
|
|
|
clearable
|
|
|
- style="width:160px;"
|
|
|
+ style="width: 160px"
|
|
|
@keyup.enter.native="getList"
|
|
|
@clear="getList"
|
|
|
/>
|
|
@@ -53,14 +47,14 @@
|
|
|
v-model="listQuery.spName"
|
|
|
placeholder="协销"
|
|
|
clearable
|
|
|
- style="width:120px;"
|
|
|
+ style="width: 120px"
|
|
|
@keyup.enter.native="getList"
|
|
|
@clear="getList"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="filter-control">
|
|
|
<span>公司类型:</span>
|
|
|
- <el-select v-model="listQuery.companyType" style="width:120px;" clearable @change="getList">
|
|
|
+ <el-select v-model="listQuery.companyType" style="width: 120px" clearable @change="getList">
|
|
|
<el-option value="" label="请选择" />
|
|
|
<el-option :value="1" label="游客" />
|
|
|
<el-option :value="2" label="机构" />
|
|
@@ -69,7 +63,7 @@
|
|
|
</div>
|
|
|
<div class="filter-control">
|
|
|
<span>访问客户端:</span>
|
|
|
- <el-select v-model="listQuery.accessClient" style="width:120px;" clearable @change="getList">
|
|
|
+ <el-select v-model="listQuery.accessClient" style="width: 120px" clearable @change="getList">
|
|
|
<el-option value="" label="请选择" />
|
|
|
<el-option :value="0" label="网站" />
|
|
|
<el-option :value="1" label="小程序" />
|
|
@@ -78,23 +72,13 @@
|
|
|
<div class="filter-control">
|
|
|
<span>关联供应商:</span>
|
|
|
<el-select v-model="listQuery.relevanceShop" clearable @change="getList">
|
|
|
- <el-option
|
|
|
- v-for="item in supplierList"
|
|
|
- :key="item.shopId"
|
|
|
- :label="item.shopName"
|
|
|
- :value="item.shopName"
|
|
|
- />
|
|
|
+ <el-option v-for="item in supplierList" :key="item.shopId" :label="item.shopName" :value="item.shopName" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="filter-control">
|
|
|
<span>供应商标签:</span>
|
|
|
<el-select v-model="tagsList" multiple filterable placeholder="请选择" @change="handleTagsOptions">
|
|
|
- <el-option
|
|
|
- v-for="item in tagsOptions"
|
|
|
- :key="item.id"
|
|
|
- :label="item.value"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
+ <el-option v-for="item in tagsOptions" :key="item.id" :label="item.value" :value="item.value" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div v-if="tabsCurrent === 1" class="filter-control">
|
|
@@ -112,13 +96,11 @@
|
|
|
</div>
|
|
|
<div class="filter-control">
|
|
|
<el-button type="primary" @click="getList">查询</el-button>
|
|
|
- <el-button v-permission="'keyword:list:export'" type="primary" @click="handleExport">
|
|
|
- 导出
|
|
|
- </el-button>
|
|
|
+ <el-button v-permission="'keyword:list:export'" type="primary" @click="handleExport"> 导出 </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 关键词列表 -->
|
|
|
- <el-table v-loading="isLoading" :data="list" border style="width:100%;" :height="tableHeight">
|
|
|
+ <el-table v-loading="isLoading" :data="list" border style="width: 100%" :height="tableHeight">
|
|
|
<el-table-column prop="ip" fixed label="IP" align="center" width="80" />
|
|
|
<el-table-column prop="region" fixed label="地区" align="center" width="100" />
|
|
|
<el-table-column prop="accessClient" fixed label="访问客户端" align="center" width="70">
|
|
@@ -134,7 +116,7 @@
|
|
|
<el-table-column prop="corporateName" label="公司名称" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<template v-if="row.companyType === '2'">
|
|
|
- <a style="color:#2fa4e7;" target="_blank" :href="handleClubHrefLink(row)">
|
|
|
+ <a style="color: #2fa4e7" target="_blank" :href="handleClubHrefLink(row)">
|
|
|
{{ row.corporateName ? row.corporateName : '---' }}
|
|
|
</a>
|
|
|
</template>
|
|
@@ -146,7 +128,7 @@
|
|
|
<el-table-column prop="contacts" label="联系人" align="center">
|
|
|
<template slot-scope="{ row }">
|
|
|
<template v-if="row.companyType === '2'">
|
|
|
- <a style="color:#2fa4e7;" target="_blank" :href="handleClubHrefLink(row)">
|
|
|
+ <a style="color: #2fa4e7" target="_blank" :href="handleClubHrefLink(row)">
|
|
|
{{ row.contacts ? row.contacts : '---' }}
|
|
|
</a>
|
|
|
</template>
|
|
@@ -177,13 +159,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="spName" label="供应商标签" align="center" width="120">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-popover
|
|
|
- placement="top-start"
|
|
|
- width="400"
|
|
|
- trigger="hover"
|
|
|
- >
|
|
|
+ <el-popover placement="top-start" width="400" trigger="hover">
|
|
|
<span>{{ row.label ? row.label : '---' }}</span>
|
|
|
- <span slot="reference">{{ row.label ? row.label.substr(0,9) + '...' : '--' }}</span>
|
|
|
+ <span slot="reference">{{ row.label ? row.label.substr(0, 9) + '...' : '--' }}</span>
|
|
|
</el-popover>
|
|
|
<!-- {{ row.label ? row.label : '---' }} -->
|
|
|
</template>
|
|
@@ -248,17 +226,17 @@ export default {
|
|
|
companyTypeFilters(value) {
|
|
|
// 公司类型
|
|
|
const map = {
|
|
|
- '1': '游客',
|
|
|
- '2': '机构',
|
|
|
- '3': '供应商'
|
|
|
+ 1: '游客',
|
|
|
+ 2: '机构',
|
|
|
+ 3: '供应商'
|
|
|
}
|
|
|
return map[value]
|
|
|
},
|
|
|
accessClientFilters(value) {
|
|
|
// 访问客户端
|
|
|
const map = {
|
|
|
- '0': '网站',
|
|
|
- '1': '小程序'
|
|
|
+ 0: '网站',
|
|
|
+ 1: '小程序'
|
|
|
}
|
|
|
return map[value]
|
|
|
}
|
|
@@ -337,9 +315,7 @@ export default {
|
|
|
screenHeight: window.innerHeight // 内容区域高度
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
-
|
|
|
- },
|
|
|
+ computed: {},
|
|
|
watch: {
|
|
|
// 监听screenHeight从而改变table的高度
|
|
|
screenHeight(val) {
|
|
@@ -438,11 +414,17 @@ export default {
|
|
|
},
|
|
|
// 机构跳转
|
|
|
handleClubHrefLink(row) {
|
|
|
- return process.env.VUE_APP_ADMIN_URL + `/a/user/jumpLink/toOldAdmin?type=1&clubId=${row.clubId}&clubName=${row.corporateName}`
|
|
|
+ return (
|
|
|
+ process.env.VUE_APP_ADMIN_URL +
|
|
|
+ `/a/user/jumpLink/toOldAdmin?type=1&clubId=${row.clubId}&clubName=${row.corporateName}`
|
|
|
+ )
|
|
|
},
|
|
|
// 查看详情
|
|
|
handleRecordDetail(row) {
|
|
|
- this.$router.push({ path: '/user/detail-list', query: { ip: row.ip, accessDate: row.accessDate, userId: row.userId }})
|
|
|
+ this.$router.push({
|
|
|
+ path: '/user/detail-list',
|
|
|
+ query: { ip: row.ip, accessDate: row.accessDate, userId: row.userId }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// 导出
|
|
@@ -452,7 +434,9 @@ export default {
|
|
|
const url = process.env.VUE_APP_BASE_API + '/user/behavior/exportToday?todayType=0'
|
|
|
downloadWithUrl(url, '用户行为记录')
|
|
|
} else {
|
|
|
- const url = process.env.VUE_APP_BASE_API + '/user/behavior/exportToday?todayType=1'
|
|
|
+ const url =
|
|
|
+ process.env.VUE_APP_BASE_API +
|
|
|
+ `/user/behavior/exportToday?todayType=1&ip=${this.listQuery.ip}&corporateName=${this.listQuery.corporateName}&companyType=${this.listQuery.companyType}&accessClient=${this.listQuery.accessClient}&relevanceShop=${this.listQuery.relevanceShop}&labe=${this.listQuery.labe}&contacts=${this.listQuery.contacts}&phoneNumber=${this.listQuery.phoneNumber}&spName=${this.listQuery.spName}&startTime=${this.listQuery.startTime}&endTime=${this.listQuery.endTime}`
|
|
|
downloadWithUrl(url, '用户行为记录')
|
|
|
// 导出以往当前数据
|
|
|
}
|
|
@@ -466,10 +450,40 @@ export default {
|
|
|
type: 'warning'
|
|
|
})
|
|
|
// 导出数据格式化
|
|
|
- const filterVal = ['ip', 'region', 'accessClient', 'companyType', 'corporateName', 'contacts', 'phoneNumber', 'spName', 'relevanceShop', 'label', 'addTime', 'numbers', 'accessDuration', 'accessDate']
|
|
|
+ const filterVal = [
|
|
|
+ 'ip',
|
|
|
+ 'region',
|
|
|
+ 'accessClient',
|
|
|
+ 'companyType',
|
|
|
+ 'corporateName',
|
|
|
+ 'contacts',
|
|
|
+ 'phoneNumber',
|
|
|
+ 'spName',
|
|
|
+ 'relevanceShop',
|
|
|
+ 'label',
|
|
|
+ 'addTime',
|
|
|
+ 'numbers',
|
|
|
+ 'accessDuration',
|
|
|
+ 'accessDate'
|
|
|
+ ]
|
|
|
const data = this.formatJson(filterVal, this.list.slice(0))
|
|
|
export_json_to_excel({
|
|
|
- header: ['IP', '地区', '访问客户端', '公司类型', '公司名称', '联系人', '手机号', '所属协销', '关联供应商', '供应商标签', '注册时间', '访问页面数量', '总时长', '访问日期'],
|
|
|
+ header: [
|
|
|
+ 'IP',
|
|
|
+ '地区',
|
|
|
+ '访问客户端',
|
|
|
+ '公司类型',
|
|
|
+ '公司名称',
|
|
|
+ '联系人',
|
|
|
+ '手机号',
|
|
|
+ '所属协销',
|
|
|
+ '关联供应商',
|
|
|
+ '供应商标签',
|
|
|
+ '注册时间',
|
|
|
+ '访问页面数量',
|
|
|
+ '总时长',
|
|
|
+ '访问日期'
|
|
|
+ ],
|
|
|
data,
|
|
|
filename: '用户行为记录'
|
|
|
})
|
|
@@ -495,7 +509,9 @@ export default {
|
|
|
},
|
|
|
handleRelevanceShop(value) {
|
|
|
const array = []
|
|
|
- if (!value) { return array }
|
|
|
+ if (!value) {
|
|
|
+ return array
|
|
|
+ }
|
|
|
return value.split(',')
|
|
|
}
|
|
|
}
|