Commit 860c2d66 authored by mzx's avatar mzx

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

parent edb23bcd
<template>
<page-standard>
<el-form
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
>
<el-form-item prop="status">
<el-select
v-model="queryParams.ask"
placeholder="标准分类"
clearable
style="width: 100%"
@change="loadData"
>
</el-select>
</el-form-item>
<el-form-item prop="status">
<el-input
v-model="queryParams.deptName"
placeholder="测试场景"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
type="default"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
<div class="container">
<div>
<el-form
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb10">
<right-toolbar
:show-search.sync="showSearch"
@queryTable="loadData"
></right-toolbar>
</el-row>
<el-form-item prop="status">
<el-select
v-model="queryParams.standardClassification"
placeholder="标准分类"
clearable
style="width: 100%"
>
<el-option
v-for="dict in dict.type.sys_detailed_classification"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item prop="status">
<el-input
v-model="queryParams.testScenario"
placeholder="测试场景"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
type="default"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div>
<right-toolbar
:show-search.sync="showSearch"
@queryTable="loadData"
></right-toolbar>
</div>
</div>
<el-table
v-if="refreshTable"
v-loading="loading"
......@@ -65,82 +73,48 @@
</el-table-column>
<el-table-column
label="标准分类"
prop="type"
prop="standardClassification"
width="240"
sortable
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
label="测试场景"
prop="content"
prop="testScenario"
min-width="200"
sortable
align="left"
>
</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
label="入库时间"
prop="createTime"
prop="storageTime"
width="200"
align="left"
sortable
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<span>{{ parseTime(scope.row.storageTime) }}</span>
</template>
</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>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.size"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="loadData"
>
</pagination>
......@@ -159,10 +133,10 @@ export default {
'yan-dialog': dialog
},
mixins: [page],
dicts: ['sys_scene_type'],
dicts: ['sys_detailed_classification'],
data() {
return {
listUrl: '/scene-list',
listUrl: '/system/scenario/getList',
showSearch: true,
tableData: [],
dialogManger: {
......@@ -170,12 +144,9 @@ export default {
refreshList: false,
source: {}
},
form: {
ask: '1'
}
form: {}
}
},
watch: {
'dialogManger.refreshList'(val) {
if (val) {
......@@ -184,13 +155,18 @@ export default {
}
}
},
mounted() {
this.getDicts('sys_detailed_classification').then(response => {
this.classFicationList = response.data
})
},
methods: {
loadData() {
this.loading = true
console.log(this.queryParams)
request({
url: this.listUrl,
method: 'get',
method: 'post',
params: this.queryParams
})
.then(res => {
......@@ -231,3 +207,10 @@ export default {
}
}
</script>
<style scoped>
.container {
display: flex;
justify-content: space-between;
height: 50px;
}
</style>
<template>
<page-standard>
<el-form
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
>
<el-form-item prop="status">
<el-select
v-model="queryParams.ask"
placeholder="标准分类"
clearable
style="width: 100%"
@change="loadData"
>
</el-select>
</el-form-item>
<el-form-item prop="status">
<el-input
v-model="queryParams.deptName"
placeholder="测试类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
type="default"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
<div class="container">
<div>
<el-form
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb10">
<right-toolbar
:show-search.sync="showSearch"
@queryTable="loadData"
></right-toolbar>
</el-row>
<el-form-item prop="status">
<el-select
v-model="queryParams.standardClassification"
placeholder="标准分类"
clearable
style="width: 100%"
>
<el-option
v-for="dict in dict.type.sys_detailed_classification"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item prop="status">
<el-input
v-model="queryParams.testType"
placeholder="测试类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
type="default"
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div>
<right-toolbar
:show-search.sync="showSearch"
@queryTable="loadData"
></right-toolbar>
</div>
</div>
<el-table
v-if="refreshTable"
v-loading="loading"
......@@ -65,15 +73,25 @@
</el-table-column>
<el-table-column
label="标准分类"
prop="type"
prop="standardClassification"
width="240"
sortable
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
label="测试类型"
prop="content"
prop="testType"
min-width="200"
sortable
align="left"
......@@ -82,13 +100,13 @@
<el-table-column
label="入库时间"
prop="createTime"
prop="storageTime"
width="200"
align="left"
sortable
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<span>{{ parseTime(scope.row.storageTime) }}</span>
</template>
</el-table-column>
</el-table>
......@@ -96,8 +114,8 @@
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.size"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="loadData"
>
</pagination>
......@@ -108,25 +126,28 @@ import page from '@/mixins/page'
import request from '@/utils/request'
export default {
mixins: [page],
dicts: ['sys_scene_type'],
dicts: ['sys_detailed_classification'],
data() {
return {
listUrl: '/scene-list',
classFicationList: undefined,
listUrl: '/system/type/getList',
showSearch: true,
tableData: [],
form: {
ask: '1'
}
form: {}
}
},
mounted() {
this.getDicts('sys_detailed_classification').then(response => {
this.classFicationList = response.data
})
},
methods: {
loadData() {
this.loading = true
console.log(this.queryParams)
request({
url: this.listUrl,
method: 'get',
method: 'post',
params: this.queryParams
})
.then(res => {
......@@ -147,3 +168,10 @@ export default {
}
}
</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