<template>
|
<el-dialog
|
:visible.sync="visible" class="position-absolute dialog-center dialog-no-header" width="560px"
|
top="0" :modal="false" :destroy-on-close="true" :close-on-press-escape="false" :close-on-click-modal="false"
|
:modal-append-to-body="false">
|
<div class="params-container params-container-flex">
|
<div class="form-title">
|
试验完成
|
</div>
|
<div class="form-wrapper">
|
<div class="form-content">
|
<img src="../images/u10489.svg">
|
<div class="form-text">{{ testLabel }}已完成</div>
|
</div>
|
</div>
|
<div class="footer-button">
|
<el-button size="small">试验数据回放</el-button>
|
<el-button type="primary" size="small" >查看试验数据</el-button>
|
<el-button type="primary" size="small" @click="newTest">开启新试验</el-button>
|
</div>
|
</div>
|
</el-dialog>
|
</template>
|
|
<script>
|
import {constTestType} from "@/pages/test/js/const";
|
import {getItemByValue, getLabel} from "@/assets/js/tools";
|
|
export default {
|
name: "completeTestDialog",
|
props: {
|
type: {
|
type: String,
|
default: ""
|
},
|
visible: {
|
type: Boolean,
|
default: false,
|
}
|
},
|
data() {
|
return {
|
testLabel: "",
|
testUrl: "",
|
}
|
},
|
methods: {
|
newTest() {
|
this.$router.push("/index/testManager");
|
}
|
},
|
mounted() {
|
let item = getItemByValue(this.type, constTestType);
|
if(item != -1) {
|
this.testLabel = item.label;
|
this.testUrl = item.router;
|
}else {
|
this.testLabel = "未知";
|
this.testUrl = "";
|
}
|
|
}
|
}
|
</script>
|
|
<style scoped>
|
.params-container {
|
padding: 0;
|
}
|
.form-title {
|
line-height: 50px;
|
background-color: rgba(102, 110, 232, 1);
|
color: #FFFFFF;
|
text-align: center;
|
}
|
.form-wrapper {
|
padding: 8px;
|
}
|
.form-content {
|
text-align: center;
|
}
|
.form-content img{
|
width: 285px;
|
height: auto;
|
}
|
.form-text {
|
font-size: 18px;
|
font-weight: 700;
|
margin-bottom: 32px;
|
}
|
.footer-button {
|
border-top: 1px solid #cccccc;
|
}
|
</style>
|