测试模版列表

This commit is contained in:
chenjianxing 2020-04-29 16:08:31 +08:00
parent 1c155bd982
commit 2124226f0f
7 changed files with 83 additions and 60 deletions

View File

@ -11,12 +11,7 @@
</template> </template>
<el-main> <el-main>
<div class="testcase-template" v-for="fit in fits" :key="fit"> <testcase-template-item v-for="fit in fits" :key="fit" :name="fit"/>
<div class="template-img">
<i class="el-icon-error"/>
</div>
<span class="demonstration">{{ fit }}</span>
</div>
</el-main> </el-main>
<test-case-report-template-edit ref="templateEdit"/> <test-case-report-template-edit ref="templateEdit"/>
@ -31,9 +26,10 @@
import MsTableHeader from "../../common/components/MsTableHeader"; import MsTableHeader from "../../common/components/MsTableHeader";
import TestCaseReportTemplateEdit from "./components/TestCaseReportTemplateEdit"; import TestCaseReportTemplateEdit from "./components/TestCaseReportTemplateEdit";
import TestcaseTemplateItem from "./components/TestcaseTemplateItem";
export default { export default {
name: "TestCaseReportTemplate", name: "TestCaseReportTemplate",
components: {TestCaseReportTemplateEdit, MsTableHeader}, components: {TestcaseTemplateItem, TestCaseReportTemplateEdit, MsTableHeader},
data() { data() {
return { return {
result: {}, result: {},
@ -44,12 +40,13 @@
'scalev-downddddddddddd', 'scalev-downddddddddddd',
'filelv', 'sontwain', 'cosgewver', 'nodegne', 'scale-dfownddddddddddd', 'filelv', 'sontwain', 'cosgewver', 'nodegne', 'scale-dfownddddddddddd',
], ],
url: '../../../../assets/template.png',
condition: {}, condition: {},
} }
}, },
methods: { methods: {
initTableData() { initData() {
// this.$get()
}, },
templateCreate() { templateCreate() {
@ -64,53 +61,6 @@
<style scoped> <style scoped>
.testcase-template {
display: inline-block;
margin: 10px 30px;
width: 150px;
}
.demonstration {
display: block;
text-align: center;
margin: 10px auto;
width: 150px;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.template-img {
height: 100px;
width: 80px;
margin: 0 auto;
box-shadow: 0 0 2px 0 rgba(31,31,31,0.15), 0 1px 2px 0 rgba(31,31,31,0.15);
border: solid 2px #fff;
box-sizing: border-box;
border-radius: 3px;
background: url(../../../../assets/template.png) no-repeat center;
}
.template-img:hover {
border: solid 1px #4b8fdf;
border-radius: 3px;
color: deepskyblue;
cursor: pointer;
}
.template-img > i {
display:none;
float: right;
color: gray;
margin: 2px;
}
.template-img > i:hover {
color: red;
}
.template-img:hover > .el-icon-error {
display: inline;
}
</style> </style>

View File

@ -14,7 +14,7 @@
<script> <script>
import CommonComponent from "./CommonComponent"; import CommonComponent from "./CommonComponent";
import MsPieChart from "../../../common/components/MsPieChart"; import MsPieChart from "../../../../common/components/MsPieChart";
export default { export default {
name: "TestResultChartComponent", name: "TestResultChartComponent",

View File

@ -104,9 +104,9 @@
import draggable from 'vuedraggable'; import draggable from 'vuedraggable';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic'; import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import BaseInfoComponent from "./BaseInfoComponent"; import BaseInfoComponent from "./TemplateComponent/BaseInfoComponent";
import TestResultComponent from "./TestResultComponent"; import TestResultComponent from "./TemplateComponent/TestResultComponent";
import TestResultChartComponent from "./TestResultChartComponent"; import TestResultChartComponent from "./TemplateComponent/TestResultChartComponent";
let idGlobal = 8; let idGlobal = 8;
export default { export default {

View File

@ -0,0 +1,73 @@
<template>
<div class="testcase-template">
<div class="template-img">
<i class="el-icon-error"/>
</div>
<span class="demonstration">{{ name }}</span>
</div>
</template>
<script>
export default {
name: "TestcaseTemplateItem",
props: {
name: {
type: String,
default: 'Template name'
}
}
}
</script>
<style scoped>
.testcase-template {
display: inline-block;
margin: 10px 30px;
width: 150px;
}
.demonstration {
display: block;
text-align: center;
margin: 10px auto;
width: 150px;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.template-img {
height: 100px;
width: 80px;
margin: 0 auto;
box-shadow: 0 0 2px 0 rgba(31,31,31,0.15), 0 1px 2px 0 rgba(31,31,31,0.15);
border: solid 2px #fff;
box-sizing: border-box;
border-radius: 3px;
background: url(../../../../../assets/template.png) no-repeat center;
}
.template-img:hover {
border: solid 1px #4b8fdf;
border-radius: 3px;
color: deepskyblue;
cursor: pointer;
}
.template-img > i {
display:none;
float: right;
color: gray;
margin: 2px;
}
.template-img > i:hover {
color: red;
}
.template-img:hover > .el-icon-error {
display: inline;
}
</style>