Commit 860c2d66 authored by mzx's avatar mzx

测试类型库管理、测试场景库管理接口对接

parent edb23bcd
<template> <template>
<page-standard> <page-standard>
<div class="container">
<div>
<el-form <el-form
v-show="showSearch" v-show="showSearch"
ref="queryForm" ref="queryForm"
...@@ -9,17 +11,22 @@ ...@@ -9,17 +11,22 @@
> >
<el-form-item prop="status"> <el-form-item prop="status">
<el-select <el-select
v-model="queryParams.ask" v-model="queryParams.standardClassification"
placeholder="标准分类" placeholder="标准分类"
clearable clearable
style="width: 100%" style="width: 100%"
@change="loadData"
> >
<el-option
v-for="dict in dict.type.sys_detailed_classification"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="status"> <el-form-item prop="status">
<el-input <el-input
v-model="queryParams.deptName" v-model="queryParams.testScenario"
placeholder="测试场景" placeholder="测试场景"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
...@@ -42,13 +49,14 @@ ...@@ -42,13 +49,14 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<el-row :gutter="10" class="mb10"> <div>
<right-toolbar <right-toolbar
:show-search.sync="showSearch" :show-search.sync="showSearch"
@queryTable="loadData" @queryTable="loadData"
></right-toolbar> ></right-toolbar>
</el-row> </div>
</div>
<el-table <el-table
v-if="refreshTable" v-if="refreshTable"
v-loading="loading" v-loading="loading"
...@@ -65,82 +73,48 @@ ...@@ -65,82 +73,48 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="标准分类" label="标准分类"
prop="type" prop="standardClassification"
width="240" width="240"
sortable sortable
align="left" align="left"
> >
<template slot-scope="scope">
<div v-for="dict in classFicationList" :key="dict.dictValue">
<div
v-if="dict.dictValue == scope.row.standardClassification"
style="display: flex"
>
{{ dict.dictLabel }}
</div>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="测试场景" label="测试场景"
prop="content" prop="testScenario"
min-width="200" min-width="200"
sortable sortable
align="left" align="left"
> >
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- label="测试类型"-->
<!-- prop="testType"-->
<!-- min-width="200"-->
<!-- sortable-->
<!-- align="left"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="更新人员"-->
<!-- prop="user"-->
<!-- min-width="200"-->
<!-- align="left"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column <el-table-column
label="入库时间" label="入库时间"
prop="createTime" prop="storageTime"
width="200" width="200"
align="left" align="left"
sortable sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.storageTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- label="操作"-->
<!-- align="left"-->
<!-- width="160"-->
<!-- fixed="right"-->
<!-- class-name="fixed-width"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- v-hasPermi="['setting:scene:update']"-->
<!-- plain-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改</el-button-->
<!-- >-->
<!-- <el-button-->
<!-- v-hasPermi="['setting:scene:delete']"-->
<!-- plain-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >删除</el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.page" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.size" :limit.sync="queryParams.pageSize"
@pagination="loadData" @pagination="loadData"
> >
</pagination> </pagination>
...@@ -159,10 +133,10 @@ export default { ...@@ -159,10 +133,10 @@ export default {
'yan-dialog': dialog 'yan-dialog': dialog
}, },
mixins: [page], mixins: [page],
dicts: ['sys_scene_type'], dicts: ['sys_detailed_classification'],
data() { data() {
return { return {
listUrl: '/scene-list', listUrl: '/system/scenario/getList',
showSearch: true, showSearch: true,
tableData: [], tableData: [],
dialogManger: { dialogManger: {
...@@ -170,12 +144,9 @@ export default { ...@@ -170,12 +144,9 @@ export default {
refreshList: false, refreshList: false,
source: {} source: {}
}, },
form: { form: {}
ask: '1'
}
} }
}, },
watch: { watch: {
'dialogManger.refreshList'(val) { 'dialogManger.refreshList'(val) {
if (val) { if (val) {
...@@ -184,13 +155,18 @@ export default { ...@@ -184,13 +155,18 @@ export default {
} }
} }
}, },
mounted() {
this.getDicts('sys_detailed_classification').then(response => {
this.classFicationList = response.data
})
},
methods: { methods: {
loadData() { loadData() {
this.loading = true this.loading = true
console.log(this.queryParams) console.log(this.queryParams)
request({ request({
url: this.listUrl, url: this.listUrl,
method: 'get', method: 'post',
params: this.queryParams params: this.queryParams
}) })
.then(res => { .then(res => {
...@@ -231,3 +207,10 @@ export default { ...@@ -231,3 +207,10 @@ export default {
} }
} }
</script> </script>
<style scoped>
.container {
display: flex;
justify-content: space-between;
height: 50px;
}
</style>
<template> <template>
<page-standard> <page-standard>
<div class="container">
<div>
<el-form <el-form
v-show="showSearch" v-show="showSearch"
ref="queryForm" ref="queryForm"
...@@ -9,17 +11,22 @@ ...@@ -9,17 +11,22 @@
> >
<el-form-item prop="status"> <el-form-item prop="status">
<el-select <el-select
v-model="queryParams.ask" v-model="queryParams.standardClassification"
placeholder="标准分类" placeholder="标准分类"
clearable clearable
style="width: 100%" style="width: 100%"
@change="loadData"
> >
<el-option
v-for="dict in dict.type.sys_detailed_classification"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="status"> <el-form-item prop="status">
<el-input <el-input
v-model="queryParams.deptName" v-model="queryParams.testType"
placeholder="测试类型" placeholder="测试类型"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
...@@ -42,13 +49,14 @@ ...@@ -42,13 +49,14 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
</div>
<el-row :gutter="10" class="mb10"> <div>
<right-toolbar <right-toolbar
:show-search.sync="showSearch" :show-search.sync="showSearch"
@queryTable="loadData" @queryTable="loadData"
></right-toolbar> ></right-toolbar>
</el-row> </div>
</div>
<el-table <el-table
v-if="refreshTable" v-if="refreshTable"
v-loading="loading" v-loading="loading"
...@@ -65,15 +73,25 @@ ...@@ -65,15 +73,25 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="标准分类" label="标准分类"
prop="type" prop="standardClassification"
width="240" width="240"
sortable sortable
align="left" align="left"
> >
<template slot-scope="scope">
<div v-for="dict in classFicationList" :key="dict.dictValue">
<div
v-if="dict.dictValue == scope.row.standardClassification"
style="display: flex"
>
{{ dict.dictLabel }}
</div>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="测试类型" label="测试类型"
prop="content" prop="testType"
min-width="200" min-width="200"
sortable sortable
align="left" align="left"
...@@ -82,13 +100,13 @@ ...@@ -82,13 +100,13 @@
<el-table-column <el-table-column
label="入库时间" label="入库时间"
prop="createTime" prop="storageTime"
width="200" width="200"
align="left" align="left"
sortable sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.storageTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -96,8 +114,8 @@ ...@@ -96,8 +114,8 @@
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.page" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.size" :limit.sync="queryParams.pageSize"
@pagination="loadData" @pagination="loadData"
> >
</pagination> </pagination>
...@@ -108,25 +126,28 @@ import page from '@/mixins/page' ...@@ -108,25 +126,28 @@ import page from '@/mixins/page'
import request from '@/utils/request' import request from '@/utils/request'
export default { export default {
mixins: [page], mixins: [page],
dicts: ['sys_scene_type'], dicts: ['sys_detailed_classification'],
data() { data() {
return { return {
listUrl: '/scene-list', classFicationList: undefined,
listUrl: '/system/type/getList',
showSearch: true, showSearch: true,
tableData: [], tableData: [],
form: { form: {}
ask: '1'
}
} }
}, },
mounted() {
this.getDicts('sys_detailed_classification').then(response => {
this.classFicationList = response.data
})
},
methods: { methods: {
loadData() { loadData() {
this.loading = true this.loading = true
console.log(this.queryParams) console.log(this.queryParams)
request({ request({
url: this.listUrl, url: this.listUrl,
method: 'get', method: 'post',
params: this.queryParams params: this.queryParams
}) })
.then(res => { .then(res => {
...@@ -147,3 +168,10 @@ export default { ...@@ -147,3 +168,10 @@ export default {
} }
} }
</script> </script>
<style scoped>
.container {
display: flex;
justify-content: space-between;
height: 50px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment