commit
Showing
4 changed files
with
152 additions
and
14 deletions
| ... | @@ -15,7 +15,7 @@ | ... | @@ -15,7 +15,7 @@ |
| 15 | </el-submenu> | 15 | </el-submenu> |
| 16 | <el-submenu index="2"> | 16 | <el-submenu index="2"> |
| 17 | <template slot="title">AIME健康</template> | 17 | <template slot="title">AIME健康</template> |
| 18 | <el-menu-item index="/nlp">NLP测试用例</el-menu-item> | 18 | <el-menu-item index="/toolAime">测试工具</el-menu-item> |
| 19 | </el-submenu> | 19 | </el-submenu> |
| 20 | <el-submenu index="3"> | 20 | <el-submenu index="3"> |
| 21 | <template slot="title">统计平台</template> | 21 | <template slot="title">统计平台</template> | ... | ... |
| 1 | <template xmlns:el-col="http://www.w3.org/1999/html"> | 1 | <template xmlns:el-col="http://www.w3.org/1999/html"> |
| 2 | <div> | 2 | <div> |
| 3 | <br/> | 3 | <br/> |
| 4 | <span>统计平台-线上账号</span> | 4 | <span>NLP测试用例</span> |
| 5 | <el-table | 5 | <el-table |
| 6 | :data="tjUsers" | 6 | :data="nlpTestcases" |
| 7 | border | 7 | border |
| 8 | style="width: 100%" | 8 | style="width: 100%" |
| 9 | :header-cell-style="{background: 'deepskyblue', color: 'snow'}"> | 9 | :header-cell-style="{background: 'deepskyblue', color: 'snow'}"> |
| 10 | <el-table-column | 10 | <el-table-column |
| 11 | prop="username" | 11 | prop="name" |
| 12 | label="用户名" | 12 | label="domain名称" |
| 13 | min-width="1"> | 13 | min-width="1"> |
| 14 | </el-table-column> | 14 | </el-table-column> |
| 15 | <el-table-column | 15 | <el-table-column |
| 16 | prop="code" | 16 | prop="tag" |
| 17 | label="机构code" | 17 | label="domain标识" |
| 18 | min-width="1"> | 18 | min-width="1"> |
| 19 | </el-table-column> | 19 | </el-table-column> |
| 20 | <el-table-column | 20 | <el-table-column |
| 21 | prop="clues" | 21 | prop="keyword" |
| 22 | label="测试用例执行配置项" | 22 | label="NLP问题" |
| 23 | min-width="2"> | ||
| 24 | </el-table-column> | ||
| 25 | <el-table-column | ||
| 26 | prop="assert_text" | ||
| 27 | label="NLP断言" | ||
| 23 | min-width="3"> | 28 | min-width="3"> |
| 24 | </el-table-column> | 29 | </el-table-column> |
| 25 | <el-table-column | 30 | <el-table-column |
| 26 | prop="mark" | 31 | prop="data_type" |
| 27 | label="备注" | 32 | label="data_type" |
| 33 | min-width="1"> | ||
| 34 | </el-table-column> | ||
| 35 | <el-table-column | ||
| 36 | prop="input_type" | ||
| 37 | label="input_type" | ||
| 28 | min-width="1"> | 38 | min-width="1"> |
| 29 | </el-table-column> | 39 | </el-table-column> |
| 30 | </el-table> | 40 | </el-table> |
| ... | @@ -35,7 +45,9 @@ | ... | @@ -35,7 +45,9 @@ |
| 35 | export default { | 45 | export default { |
| 36 | data() { | 46 | data() { |
| 37 | return { | 47 | return { |
| 38 | tjUsers: [] | 48 | myplatform: this.$route.query.myplatform, |
| 49 | runtime: this.$route.query.runtime, | ||
| 50 | nlpTestcases: [] | ||
| 39 | } | 51 | } |
| 40 | }, | 52 | }, |
| 41 | mounted() { | 53 | mounted() { |
| ... | @@ -54,10 +66,12 @@ | ... | @@ -54,10 +66,12 @@ |
| 54 | 'Content-Type': 'application/x-www-form-urlencoded' | 66 | 'Content-Type': 'application/x-www-form-urlencoded' |
| 55 | } | 67 | } |
| 56 | } | 68 | } |
| 57 | this.$http.get('/tool/tjUser?'+this.$qs.stringify({ | 69 | this.$http.get('/tool/nlpTestCase?'+this.$qs.stringify({ |
| 70 | runtime: this.runtime, | ||
| 71 | platform: this.myplatform, | ||
| 58 | }),config).then((res)=>{ | 72 | }),config).then((res)=>{ |
| 59 | console.log(res.data) | 73 | console.log(res.data) |
| 60 | this.tjUsers=res.data.tjUsers | 74 | this.nlpTestcases=res.data.nlpTestcases |
| 61 | loading.close(); | 75 | loading.close(); |
| 62 | }).catch(error=>{ | 76 | }).catch(error=>{ |
| 63 | console.log(error); | 77 | console.log(error); | ... | ... |
src/page/toolAime.vue
0 → 100644
| 1 | <template xmlns:el-col="http://www.w3.org/1999/html"> | ||
| 2 | <div> | ||
| 3 | <el-row style="margin-bottom: 15px; margin-top: 5px"> | ||
| 4 | <el-col :span="8"> | ||
| 5 | <el-form ref="nlpTestCase" :model="nlpTestCase" label-width="0px"> | ||
| 6 | <el-card class="darkred" shadow="always"> | ||
| 7 | <div slot="header" class="clearfix"> | ||
| 8 | <span>查询NLP测试用例</span> | ||
| 9 | </div> | ||
| 10 | <div class="text item"> | ||
| 11 | <el-form-item> | ||
| 12 | <el-select v-model="nlpTestCase.myplatform" placeholder="请选择APP平台"> | ||
| 13 | <el-option | ||
| 14 | v-for="item in nlpTestCaseMyplatformOptions" | ||
| 15 | :key="item.value" | ||
| 16 | :label="item.label"s | ||
| 17 | :value="item.value"> | ||
| 18 | </el-option> | ||
| 19 | </el-select> | ||
| 20 | </el-form-item> | ||
| 21 | <el-form-item> | ||
| 22 | <el-select v-model="nlpTestCase.runtime" placeholder="请选择执行环境"> | ||
| 23 | <el-option | ||
| 24 | v-for="item in nlpTestCaseRuntimeOptions" | ||
| 25 | :key="item.value" | ||
| 26 | :label="item.label" | ||
| 27 | :value="item.value"> | ||
| 28 | </el-option> | ||
| 29 | </el-select> | ||
| 30 | </el-form-item> | ||
| 31 | <div style="margin: 15px 0;"></div> | ||
| 32 | <el-form-item> | ||
| 33 | <el-button round @click="nlpTestCaseSubmit">查询NLP测试用例</el-button> | ||
| 34 | </el-form-item> | ||
| 35 | </div> | ||
| 36 | </el-card> | ||
| 37 | </el-form> | ||
| 38 | </el-col> | ||
| 39 | </el-row> | ||
| 40 | </div> | ||
| 41 | </template> | ||
| 42 | |||
| 43 | <style> | ||
| 44 | .text { | ||
| 45 | font-size: 14px; | ||
| 46 | } | ||
| 47 | |||
| 48 | .item { | ||
| 49 | margin-bottom: 18px; | ||
| 50 | } | ||
| 51 | |||
| 52 | .clearfix:before, | ||
| 53 | .clearfix:after { | ||
| 54 | display: table; | ||
| 55 | content: ""; | ||
| 56 | } | ||
| 57 | .clearfix:after { | ||
| 58 | clear: both | ||
| 59 | } | ||
| 60 | |||
| 61 | .darkred { | ||
| 62 | width: calc(100% - 20px); | ||
| 63 | padding: 0px; | ||
| 64 | background-color: darkkhaki; | ||
| 65 | } | ||
| 66 | </style> | ||
| 67 | |||
| 68 | <script> | ||
| 69 | export default { | ||
| 70 | data() { | ||
| 71 | return { | ||
| 72 | nlpTestCase: { | ||
| 73 | myplatform: [], | ||
| 74 | runtime: [] | ||
| 75 | }, | ||
| 76 | nlpTestCaseMyplatformOptions: [{ | ||
| 77 | value: '1', | ||
| 78 | label: '国寿AI健康' | ||
| 79 | }, { | ||
| 80 | value: '2', | ||
| 81 | label: 'AIME健康' | ||
| 82 | }], | ||
| 83 | nlpTestCaseRuntimeOptions: [{ | ||
| 84 | value: '1', | ||
| 85 | label: '测试环境' | ||
| 86 | }, { | ||
| 87 | value: '2', | ||
| 88 | label: '线上环境' | ||
| 89 | }] | ||
| 90 | } | ||
| 91 | }, | ||
| 92 | mounted() { | ||
| 93 | this.openToolPage() | ||
| 94 | }, | ||
| 95 | methods: { | ||
| 96 | openToolPage() { | ||
| 97 | let config = { | ||
| 98 | headers: { | ||
| 99 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 100 | } | ||
| 101 | } | ||
| 102 | this.$http.get('/tool/openToolPage',config).then((res)=>{ | ||
| 103 | console.log(res); | ||
| 104 | }).catch(error=>{ | ||
| 105 | console.log(error); | ||
| 106 | }) | ||
| 107 | }, | ||
| 108 | nlpTestCaseSubmit() { | ||
| 109 | const {href} = this.$router.resolve({ name:'nlp', query: | ||
| 110 | {myplatform: this.nlpTestCase.myplatform.toString(), runtime: this.nlpTestCase.runtime.toString()}}) | ||
| 111 | window.open(href, '_blank') | ||
| 112 | } | ||
| 113 | } | ||
| 114 | } | ||
| 115 | </script> |
| ... | @@ -8,6 +8,7 @@ import userInfo from '@/page/userInfo' | ... | @@ -8,6 +8,7 @@ import userInfo from '@/page/userInfo' |
| 8 | import apiTest from '@/page/apiTest' | 8 | import apiTest from '@/page/apiTest' |
| 9 | import tjUser from '@/page/tjUser' | 9 | import tjUser from '@/page/tjUser' |
| 10 | import nlp from '@/page/nlp' | 10 | import nlp from '@/page/nlp' |
| 11 | import toolAime from '@/page/toolAime' | ||
| 11 | 12 | ||
| 12 | Vue.use(Router) | 13 | Vue.use(Router) |
| 13 | 14 | ||
| ... | @@ -73,6 +74,14 @@ export default new Router({ | ... | @@ -73,6 +74,14 @@ export default new Router({ |
| 73 | meta: { | 74 | meta: { |
| 74 | title: '测试工具平台' | 75 | title: '测试工具平台' |
| 75 | } | 76 | } |
| 77 | }, | ||
| 78 | { | ||
| 79 | path: '/toolAime', | ||
| 80 | component: toolAime, | ||
| 81 | name: 'toolAime', | ||
| 82 | meta: { | ||
| 83 | title: '测试工具平台' | ||
| 84 | } | ||
| 76 | } | 85 | } |
| 77 | ] | 86 | ] |
| 78 | }, | 87 | }, | ... | ... |
-
Please register or sign in to post a comment