fix: add black
This commit is contained in:
@@ -54,6 +54,8 @@ instance.interceptors.request.use(
|
||||
}
|
||||
if (store.getters['user/appId']) {
|
||||
config.headers['x-app-id'] = store.getters['user/appId']
|
||||
} else {
|
||||
config.headers['x-app-id'] = '69665538a49b8ae3be50fe5d'
|
||||
}
|
||||
if (config.method === 'get' && config.params) {
|
||||
config.params = Vue.prototype.$baseLodash.pickBy(config.params, Vue.prototype.$baseLodash.identity)
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button :type="excludeAcquaintance ? 'primary' : 'default'" @click="toggleExcludeAcquaintance">去掉熟人</el-button>
|
||||
<el-button :type="onlyUserId === true ? 'primary' : 'default'" @click="toggleOnlyUserId(true)">只显示有用户请求</el-button>
|
||||
<el-button :type="onlyUserId === false ? 'primary' : 'default'" @click="toggleOnlyUserId(false)">只显示无用户请求</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@@ -183,6 +186,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
excludeAcquaintance: false,
|
||||
onlyUserId: null, // null: all, true: only with user, false: only without user
|
||||
eventNameMap,
|
||||
eventTypeMap,
|
||||
appMap,
|
||||
@@ -281,6 +286,13 @@
|
||||
pageSize: 10000, // 获取足够多的数据进行前端统计,或者应该依赖后端聚合接口
|
||||
}
|
||||
|
||||
if (this.excludeAcquaintance) {
|
||||
params.excludeAcquaintance = true
|
||||
}
|
||||
if (this.onlyUserId !== null) {
|
||||
params.onlyUserId = this.onlyUserId
|
||||
}
|
||||
|
||||
const { data } = await getTrackingLogsList(params)
|
||||
this.list = data.list || []
|
||||
|
||||
@@ -322,6 +334,18 @@
|
||||
this.pageSize = val
|
||||
this.currentPage = 1
|
||||
},
|
||||
toggleExcludeAcquaintance() {
|
||||
this.excludeAcquaintance = !this.excludeAcquaintance
|
||||
this.fetchData()
|
||||
},
|
||||
toggleOnlyUserId(value) {
|
||||
if (this.onlyUserId === value) {
|
||||
this.onlyUserId = null // Toggle off if already selected
|
||||
} else {
|
||||
this.onlyUserId = value
|
||||
}
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user