|
@@ -15,65 +15,56 @@
|
|
|
/>
|
|
|
</el-aside>
|
|
|
<el-container>
|
|
|
- <el-header style="background:#ffffff;height:auto; width:98%;margin: 1%; font-size:13px; border-radius:8px;">
|
|
|
+ <el-header style="background:#ffffff; height: auto; width: 98%; margin: 1%; font-size: 14px; border-radius: 8px;">
|
|
|
<el-row>
|
|
|
- <el-col :span="23" style="white-space:nowrap;margin:2% 0;">
|
|
|
- <el-date-picker v-model="createParticipation.createTime" style="width:19%;margin-right:0px;" type="datetime" placeholder="开始日期" /> -
|
|
|
- <el-date-picker v-model="createParticipation.modifyTime" style="width:19%;margin-right:5px;" type="datetime" placeholder="结束日期" />
|
|
|
- <el-input v-model="createParticipation.folderName" placeholder="用例名" clearable style="width: 20%;margin-right:5px;" class="filter-item" />
|
|
|
- <el-select v-model="createParticipation.casePriority" style="width: 8%;margin-right:5px;" clearable placeholder="优先级">
|
|
|
- <el-option v-for="item in priorityStrings" :key="item.value" :label="item.name" :value="item.value" />
|
|
|
+ <el-col :span="24" style="white-space:nowrap;">
|
|
|
+ 序列号
|
|
|
+ <el-input v-model="test_plan.id" placeholder="请填写" style="width: 20%; margin: 4% 2%" />
|
|
|
+ 测试计划状态
|
|
|
+ <el-select v-model="test_plan.region" placeholder="活动区域" style="width: 20%; margin: 4% 2%">
|
|
|
+ <el-option label="区域一" value="shanghai" />
|
|
|
</el-select>
|
|
|
- <el-input v-model="createParticipation.api" placeholder="api接口" clearable style="width: 16%;margin-right:5px;" class="filter-item" />
|
|
|
- <el-input v-model="createParticipation.creator" placeholder="创建人" clearable style="width: 14%;" class="filter-item" />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="23" style="white-space:nowrap;text-align:center;">
|
|
|
- <el-button class="headerStyle" type="primary" icon="el-icon-search" @click="queryCaseData(createParticipation)">查询</el-button>
|
|
|
- <el-button type="primary" icon="el-icon-circle-plus-outline" @click="createGetShow">新增</el-button>
|
|
|
+ <el-button type="primary" @click="queryCaseData(test_plan)">查询</el-button>
|
|
|
+ <el-button type="primary" style="margin: 4% 2%" @click="createGetShow">新增</el-button>
|
|
|
+ <el-button>执行结果</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-header>
|
|
|
+ <div style="background:#ffffff; width: 98%; margin: 0 1% 1% 1%; font-size: 14px; border-radius: 8px;">
|
|
|
+ <el-radio-group v-model="radio" style="margin: 3%; width: 100%; display: flex;">
|
|
|
+ <el-radio style="margin: 0 3%; flex: 1; border-right: 1px solid #D8D8D8;" :label="3">通过{{ 13 }}个</el-radio>
|
|
|
+ <el-radio style="margin: 0 3%; flex: 1; border-right: 1px solid #D8D8D8;" :label="6">失败{{ 3 }}个</el-radio>
|
|
|
+ <el-radio style="margin: 0 3%; flex: 1; border-right: 1px solid #D8D8D8;" :label="9">阻塞{{ 3 }}个</el-radio>
|
|
|
+ <el-radio style="margin: 0 3%; flex: 1" :label="11">未执行{{ 44 }}个</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
<el-main style="background:#ffffff; width:98%;margin:0% 1% 1% 1%; font-size:14px;border-radius:8px;">
|
|
|
<!-- 主页table -->
|
|
|
- <el-table :data="gridData" fit height="570vh" tooltip-effect="dark" style="width: 100%" @select-all="clickAllData" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" @change="clickAllData(gridData)" />
|
|
|
- <el-table-column prop="id" label="ID" width="60px" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.id }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="caseName" label="用例名" width="150" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.caseName }}
|
|
|
- </template>
|
|
|
+ <el-table :data="gridData" :header-cell-style="{ background: '#F0F2F4', color: '#333B4A' }" border tooltip-effect="dark" style="width: 100%" @select-all="clickAllData">
|
|
|
+ <el-table-column prop="id" label="序列号" min-width="80px" align="center">
|
|
|
+ <template slot-scope="scope">{{ scope.row.id }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="expectedResult" label="期望结果" width="150" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.expectedResult }}
|
|
|
- </template>
|
|
|
+
|
|
|
+ <el-table-column prop="caseName" label="前置条件" min-width="150" align="center">
|
|
|
+ <template slot-scope="scope">{{ scope.row.caseName }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="casePriorityName" label="优先级" width="80" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.casePriorityName }}
|
|
|
- </template>
|
|
|
+
|
|
|
+ <el-table-column prop="expectedResult" label="API" min-width="150" align="center">
|
|
|
+ <template slot-scope="scope">{{ scope.row.expectedResult }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="creatorName" label="创建人" width="100" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-tag type="success">{{ scope.row.creatorName }}</el-tag>
|
|
|
- </template>
|
|
|
+
|
|
|
+ <el-table-column prop="casePriorityName" label="执行步骤" min-width="80" align="center">
|
|
|
+ <template slot-scope="scope">{{ scope.row.casePriorityName }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="modifierName" label="修改人" width="100" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.modifierName }}
|
|
|
- </template>
|
|
|
+
|
|
|
+ <el-table-column prop="creatorName" label="执行状态" min-width="100" align="center">
|
|
|
+ <template slot-scope="scope">{{ scope.row.creatorName }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="createTime" label="创建时间" width="200" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.createTime }}
|
|
|
- </template>
|
|
|
+
|
|
|
+ <el-table-column prop="modifierName" label="操作人" min-width="100" align="center">
|
|
|
+ <template slot-scope="scope">{{ scope.row.modifierName }}</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<el-table-column label="操作" min-width="220px" align="center" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" type="primary" @click="queryGetShow(gridData)">查看</el-button>
|
|
@@ -82,24 +73,11 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <!-- 导出文件内容 -->
|
|
|
- <el-table v-show="false" id="out-table" :data="tableData" fit height="570vh" tooltip-effect="dark" style="width: 100%">
|
|
|
- <el-table-column type="index" prop="ids" label="序号" width="50" />
|
|
|
- <!-- <el-table-column prop="ids" label="序号" /> -->
|
|
|
- <el-table-column prop="caseName" label="用例名" />
|
|
|
- <el-table-column prop="description" label="用例描述" />
|
|
|
- <el-table-column prop="expectedResult" label="期望结果" />
|
|
|
- <el-table-column prop="api" label="对应api" />
|
|
|
- <el-table-column prop="projectTypeName" label="项目类型" />
|
|
|
- <el-table-column prop="taskTypeName" label="平台类型" />
|
|
|
- <el-table-column prop="casePriorityName" label="用例优先级" />
|
|
|
- <el-table-column prop="moduleTypeName" label="模块名" />
|
|
|
- <el-table-column prop="creatorName" label="创建人" />
|
|
|
- <el-table-column prop="modifierName" label="修改人" />
|
|
|
- <el-table-column prop="remark" label="备注" />
|
|
|
- <el-table-column prop="createTime" label="创建时间" />
|
|
|
- </el-table>
|
|
|
- <el-pagination :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="100" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
|
+
|
|
|
+ <div align="center"> <!--分页-->
|
|
|
+ <el-pagination :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="100" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
@@ -108,8 +86,8 @@
|
|
|
<el-form ref="caseData" :model="caseData" label-width="90pt" :rules="createFormData">
|
|
|
<div style="display:flex;">
|
|
|
<div style="flex:1;">
|
|
|
- <el-form-item label="用例名" prop="caseName"><el-input v-model="caseData.caseName" clearable autocomplete="off" style="width: 200px" /></el-form-item>
|
|
|
- <el-form-item label="期望结果" prop="expectedResult"><el-input v-model="caseData.expectedResult" clearable autocomplete="off" style="width: 200px" /></el-form-item>
|
|
|
+ <el-form-item label="序列号" prop="caseName"><el-input v-model="caseData.caseName" clearable autocomplete="off" style="width: 200px" /></el-form-item>
|
|
|
+ <el-form-item label="前置条件" prop="expectedResult"><el-input v-model="caseData.expectedResult" clearable autocomplete="off" style="width: 200px" /></el-form-item>
|
|
|
<el-form-item label="对应api" prop="api"><el-input v-model="caseData.api" clearable autocomplete="off" style="width: 200px" /></el-form-item>
|
|
|
</div>
|
|
|
<div style="flex:1;">
|
|
@@ -182,6 +160,8 @@ export default {
|
|
|
name: 'TestCaseProject',
|
|
|
data() {
|
|
|
return {
|
|
|
+ test_plan: {},
|
|
|
+ radio: 3,
|
|
|
dialogFormVisibleQuery: false,
|
|
|
moduleTypeShow: false,
|
|
|
dataShow: true,
|
|
@@ -242,7 +222,6 @@ export default {
|
|
|
formData: {},
|
|
|
formLabelWidth: '120px',
|
|
|
data1: [],
|
|
|
- tableData: [],
|
|
|
excelData: [],
|
|
|
imFile: '',
|
|
|
failNum: '',
|
|
@@ -269,7 +248,7 @@ export default {
|
|
|
num.id = b.id
|
|
|
arr.push(num)
|
|
|
}
|
|
|
- this.data1.push({ id: a.id, label: a.projectName, children: num })
|
|
|
+ // this.data1.push({ id: a.id, label: a.projectName, children: num })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -296,14 +275,6 @@ export default {
|
|
|
this.gridData = res.data
|
|
|
})
|
|
|
},
|
|
|
- clickAllData(rows) {
|
|
|
- this.formData = {
|
|
|
- caseFolderId: this.startId
|
|
|
- }
|
|
|
- queryCasesData(this.formData).then(res => {
|
|
|
- this.tableData = res.data
|
|
|
- })
|
|
|
- },
|
|
|
taskTypeChange(ele) {
|
|
|
if (ele === 2) {
|
|
|
this.moduleTypeShow = true
|
|
@@ -391,7 +362,6 @@ export default {
|
|
|
this.$notify({ title: '提示', message: '请选择目录', duration: 2000 })
|
|
|
} else {
|
|
|
this.dialogFormVisibleUpdate = true
|
|
|
- // this.caseData = {}
|
|
|
this.moduleTypeShow = false
|
|
|
// this.$refs['caseData'].resetFields()
|
|
|
if (this.$refs['caseData'] !== undefined) {
|
|
@@ -399,9 +369,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- handleSelectionChange(val) {
|
|
|
- this.tableData = val
|
|
|
- },
|
|
|
createUpdate(e, ele) {
|
|
|
this.startId = ele.id
|
|
|
this.codeId = ele.id
|