Commit 0b60db22 0b60db22c4fa534ffcfd39f1a2785527f6c53311 by zhanghao

commit

1 parent b218e140
<template xmlns:el-col="http://www.w3.org/1999/html">
<div>
<br/>
<span>根据UID查询接口response</span>
<el-table
:data="bizDataResponseUids"
border
style="width: 100%"
:header-cell-style="{background: 'deepskyblue', color: 'snow'}">
<el-table-column
prop="method"
label="接口名称"
min-width="2">
</el-table-column>
<el-table-column
prop="bizData"
label="请求参数"
min-width="3">
</el-table-column>
<el-table-column
prop="response"
label="接口返回值"
min-width="5">
</el-table-column>
<el-table-column
prop="timestamp"
label="最近一次调用时间"
min-width="1">
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
data() {
return {
uid: this.$route.query.uid,
beginDate: this.$route.query.beginDate,
endDate: this.$route.query.endDate,
type: this.$route.query.type,
bizDataResponseUids: []
}
},
mounted() {
this.activity()
},
methods: {
activity() {
const loading = this.$loading({
lock: true,
text: '加载中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/bigdata/bizDataByUid?'+this.$qs.stringify({
uid: this.uid,
beginDate: this.beginDate,
endDate: this.endDate,
type: this.type
}),config).then((res)=>{
console.log(res.data)
this.bizDataResponseUids=res.data.bizDataResponseUids
loading.close();
}).catch(error=>{
console.log(error);
loading.close();
this.$message({
showClose: true,
message: '服务器处理失败,请核对参数!',
type: 'error'
});
})
}
}
}
</script>
......@@ -142,6 +142,44 @@
</el-card>
</el-form>
</el-col>
<el-col :span="8">
<el-form ref="bizDataByUid" :model="bizDataByUid" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>根据UID查询接口response</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="请输入UID" v-model="bizDataByUid.uid" clearable></el-input>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="bizDataByUid.showdate"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-select v-model="bizDataByUid.huanjing" placeholder="请选择执行环境">
<el-option
v-for="item in bizDataByUidOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-button round @click="bizDataByUidSubmit">查询参数</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
</el-row>
</div>
</template>
......@@ -250,6 +288,18 @@
value: '1',
label: '线上环境'
}],
bizDataByUid: {
uid: '',
showdate: '',
huanjing: []
},
bizDataByUidOptions: [{
value: '0',
label: '测试环境'
}, {
value: '1',
label: '线上环境'
}],
bigdataReport: {
project: [{
project_value: '',
......@@ -307,6 +357,14 @@
type: this.bizDataResponse.huanjing.toString()}})
window.open(href, '_blank')
},
bizDataByUidSubmit() {
const {href} = this.$router.resolve({ name:'bizDataByUid', query:
{ uid: this.bizDataByUid.uid,
beginDate: this.bizDataByUid.showdate[0],
endDate: this.bizDataByUid.showdate[1],
type: this.bizDataByUid.huanjing.toString()}})
window.open(href, '_blank')
},
bigdataReportSubmit() {
const {href} = this.$router.resolve({ name:'bigdataReport', query:
{ project: this.bigdataReport.project.toString()}})
......
......@@ -28,6 +28,7 @@ import methodCount from '@/page/methodCount'
import bizDataCount from '@/page/bizDataCount'
import bizDataResponse from '@/page/bizDataResponse'
import bigdataReport from '@/page/bigdataReport'
import bizDataByUid from '@/page/bizDataByUid'
Vue.use(Router)
......@@ -205,6 +206,14 @@ export default new Router({
}
},
{
path: '/bizDataByUid',
component: bizDataByUid,
name: 'bizDataByUid',
meta: {
title: '测试工具平台'
}
},
{
path: '/bigdataReport',
component: bigdataReport,
name: 'bigdataReport',
......