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
af1e3548
...
af1e3548826078d3cd490e855d7bfa1c917c0f38
authored
2021-01-27 18:36:15 +0800
by
zhanghao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
d73e83e5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
152 additions
and
14 deletions
src/page/index.vue
src/page/nlp.vue
src/page/toolAime.vue
src/router/index.js
src/page/index.vue
View file @
af1e354
...
...
@@ -15,7 +15,7 @@
</el-submenu>
<el-submenu
index=
"2"
>
<
template
slot=
"title"
>
AIME健康
</
template
>
<el-menu-item
index=
"/
nlp"
>
NLP测试用例
</el-menu-item>
<el-menu-item
index=
"/
toolAime"
>
测试工具
</el-menu-item>
</el-submenu>
<el-submenu
index=
"3"
>
<
template
slot=
"title"
>
统计平台
</
template
>
...
...
src/page/nlp.vue
View file @
af1e354
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<div>
<br/>
<span>
统计平台-线上账号
</span>
<span>
NLP测试用例
</span>
<el-table
:data=
"
tjUser
s"
:data=
"
nlpTestcase
s"
border
style=
"width: 100%"
:header-cell-style=
"
{background: 'deepskyblue', color: 'snow'}">
<el-table-column
prop=
"
user
name"
label=
"
用户名
"
prop=
"name"
label=
"
domain名称
"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"
code
"
label=
"
机构code
"
prop=
"
tag
"
label=
"
domain标识
"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"clues"
label=
"测试用例执行配置项"
prop=
"keyword"
label=
"NLP问题"
min-width=
"2"
>
</el-table-column>
<el-table-column
prop=
"assert_text"
label=
"NLP断言"
min-width=
"3"
>
</el-table-column>
<el-table-column
prop=
"mark"
label=
"备注"
prop=
"data_type"
label=
"data_type"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"input_type"
label=
"input_type"
min-width=
"1"
>
</el-table-column>
</el-table>
...
...
@@ -35,7 +45,9 @@
export
default
{
data
()
{
return
{
tjUsers
:
[]
myplatform
:
this
.
$route
.
query
.
myplatform
,
runtime
:
this
.
$route
.
query
.
runtime
,
nlpTestcases
:
[]
}
},
mounted
()
{
...
...
@@ -54,10 +66,12 @@
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool/tjUser?'
+
this
.
$qs
.
stringify
({
this
.
$http
.
get
(
'/tool/nlpTestCase?'
+
this
.
$qs
.
stringify
({
runtime
:
this
.
runtime
,
platform
:
this
.
myplatform
,
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
.
data
)
this
.
tjUsers
=
res
.
data
.
tjUser
s
this
.
nlpTestcases
=
res
.
data
.
nlpTestcase
s
loading
.
close
();
}).
catch
(
error
=>
{
console
.
log
(
error
);
...
...
src/page/toolAime.vue
0 → 100644
View file @
af1e354
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<div>
<el-row
style=
"margin-bottom: 15px; margin-top: 5px"
>
<el-col
:span=
"8"
>
<el-form
ref=
"nlpTestCase"
:model=
"nlpTestCase"
label-width=
"0px"
>
<el-card
class=
"darkred"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
查询NLP测试用例
</span>
</div>
<div
class=
"text item"
>
<el-form-item>
<el-select
v-model=
"nlpTestCase.myplatform"
placeholder=
"请选择APP平台"
>
<el-option
v-for=
"item in nlpTestCaseMyplatformOptions"
:key=
"item.value"
:label=
"item.label"
s
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model=
"nlpTestCase.runtime"
placeholder=
"请选择执行环境"
>
<el-option
v-for=
"item in nlpTestCaseRuntimeOptions"
: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=
"nlpTestCaseSubmit"
>
查询NLP测试用例
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
</el-row>
</div>
</
template
>
<
style
>
.text
{
font-size
:
14px
;
}
.item
{
margin-bottom
:
18px
;
}
.clearfix
:before
,
.clearfix
:after
{
display
:
table
;
content
:
""
;
}
.clearfix
:after
{
clear
:
both
}
.darkred
{
width
:
calc
(
100%
-
20px
);
padding
:
0px
;
background-color
:
darkkhaki
;
}
</
style
>
<
script
>
export
default
{
data
()
{
return
{
nlpTestCase
:
{
myplatform
:
[],
runtime
:
[]
},
nlpTestCaseMyplatformOptions
:
[{
value
:
'1'
,
label
:
'国寿AI健康'
},
{
value
:
'2'
,
label
:
'AIME健康'
}],
nlpTestCaseRuntimeOptions
:
[{
value
:
'1'
,
label
:
'测试环境'
},
{
value
:
'2'
,
label
:
'线上环境'
}]
}
},
mounted
()
{
this
.
openToolPage
()
},
methods
:
{
openToolPage
()
{
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool/openToolPage'
,
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
}).
catch
(
error
=>
{
console
.
log
(
error
);
})
},
nlpTestCaseSubmit
()
{
const
{
href
}
=
this
.
$router
.
resolve
({
name
:
'nlp'
,
query
:
{
myplatform
:
this
.
nlpTestCase
.
myplatform
.
toString
(),
runtime
:
this
.
nlpTestCase
.
runtime
.
toString
()}})
window
.
open
(
href
,
'_blank'
)
}
}
}
</
script
>
src/router/index.js
View file @
af1e354
...
...
@@ -8,6 +8,7 @@ import userInfo from '@/page/userInfo'
import
apiTest
from
'@/page/apiTest'
import
tjUser
from
'@/page/tjUser'
import
nlp
from
'@/page/nlp'
import
toolAime
from
'@/page/toolAime'
Vue
.
use
(
Router
)
...
...
@@ -73,6 +74,14 @@ export default new Router({
meta
:
{
title
:
'测试工具平台'
}
},
{
path
:
'/toolAime'
,
component
:
toolAime
,
name
:
'toolAime'
,
meta
:
{
title
:
'测试工具平台'
}
}
]
},
...
...
Please
register
or
sign in
to post a comment