Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张浩
/
br-client
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
47e5ffd4
...
47e5ffd4b98efd28237678572f026fc7295c9e7e
authored
2022-01-21 16:47:51 +0800
by
张浩
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
9c1b121e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
0 deletions
src/page/bizDataCount.vue
src/page/toolData.vue
src/router/index.js
src/page/bizDataCount.vue
0 → 100644
View file @
47e5ffd
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<div>
<br/>
<span>
根据接口名查询请求参数
</span>
<el-table
:data=
"bizDataCounts"
border
style=
"width: 100%"
:header-cell-style=
"
{background: 'deepskyblue', color: 'snow'}">
<el-table-column
prop=
"bizData"
label=
"请求参数"
min-width=
"4"
>
</el-table-column>
<el-table-column
prop=
"sumcount"
label=
"接口累计调用次数"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"maxtime"
label=
"最近一次调用时间"
min-width=
"2"
>
</el-table-column>
</el-table>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
name
:
this
.
$route
.
query
.
name
,
beginDate
:
this
.
$route
.
query
.
beginDate
,
endDate
:
this
.
$route
.
query
.
endDate
,
bizDataCounts
:
[]
}
},
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/bizDataCount?'
+
this
.
$qs
.
stringify
({
method
:
this
.
name
,
beginDate
:
this
.
beginDate
,
endDate
:
this
.
endDate
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
.
data
)
this
.
bizDataCounts
=
res
.
data
.
bizDataCounts
loading
.
close
();
}).
catch
(
error
=>
{
console
.
log
(
error
);
loading
.
close
();
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请核对参数!'
,
type
:
'error'
});
})
}
}
}
</
script
>
src/page/toolData.vue
View file @
47e5ffd
...
...
@@ -26,6 +26,34 @@
</el-card>
</el-form>
</el-col>
<el-col
:span=
"8"
>
<el-form
ref=
"bizDataCount"
:model=
"bizDataCount"
label-width=
"0px"
>
<el-card
class=
"darkred"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
根据接口名查询请求参数
</span>
</div>
<div
class=
"text item"
>
<el-form-item>
<el-input
placeholder=
"请输入接口方法名method"
v-model=
"bizDataCount.name"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-date-picker
v-model=
"bizDataCount.showdate"
type=
"datetimerange"
value-format=
"yyyy-MM-dd HH:mm:ss"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-form-item>
<div
style=
"margin: 15px 0;"
></div>
<el-form-item>
<el-button
round
@
click=
"bizDataCountSubmit"
>
查询参数
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
</el-row>
</div>
</
template
>
...
...
@@ -100,6 +128,10 @@
return
{
methodCount
:
{
showdate
:
''
},
bizDataCount
:
{
name
:
''
,
showdate
:
''
}
}
},
...
...
@@ -130,6 +162,13 @@
const
{
href
}
=
this
.
$router
.
resolve
({
name
:
'methodCount'
,
query
:
{
beginDate
:
this
.
methodCount
.
showdate
[
0
],
endDate
:
this
.
methodCount
.
showdate
[
1
]}})
window
.
open
(
href
,
'_blank'
)
},
bizDataCountSubmit
()
{
const
{
href
}
=
this
.
$router
.
resolve
({
name
:
'bizDataCount'
,
query
:
{
name
:
this
.
methodCount
.
name
,
beginDate
:
this
.
methodCount
.
showdate
[
0
],
endDate
:
this
.
methodCount
.
showdate
[
1
]}})
window
.
open
(
href
,
'_blank'
)
}
}
}
...
...
src/router/index.js
View file @
47e5ffd
...
...
@@ -25,6 +25,7 @@ import chouJiang from '@/page/chouJiang'
import
selectActCount
from
'@/page/selectActCount'
import
toolData
from
'@/page/toolData'
import
methodCount
from
'@/page/methodCount'
import
bizDataCount
from
'@/page/bizDataCount'
Vue
.
use
(
Router
)
...
...
@@ -186,6 +187,14 @@ export default new Router({
}
},
{
path
:
'/bizDataCount'
,
component
:
bizDataCount
,
name
:
'bizDataCount'
,
meta
:
{
title
:
'测试工具平台'
}
},
{
path
:
'/selectActCount'
,
component
:
selectActCount
,
name
:
'selectActCount'
,
...
...
Please
register
or
sign in
to post a comment