<template>
|
<div class="params-container params-container-flex">
|
<div class="form-title">
|
试验步骤结果
|
</div>
|
<div class="form-wrapper">
|
<el-form ref="ruleForm" class="params-dialog" label-width="100px" size="small">
|
<div class="test-explain">
|
<p class="p-h">当前已完成步骤</p>
|
<p class="text-indent-two">② 在{{ point.name }},测取三相线电流,输入功率,输出功率或者输出载距,转速,定子绕组,直流电阻或温度</p>
|
<div class="point-wrapper">
|
<el-row :gutter="16">
|
<el-col :span="9">
|
<el-form-item :label="point.name" class="more-input">
|
<el-input placeholder="" :value="point.percentage">
|
<template slot="append">%</template>
|
</el-input>
|
<el-input placeholder="" :value="point.duration">
|
<template slot="append">min</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
<p class="p-h">当前结果</p>
|
<el-row :gutter="layout.gutter">
|
<el-col :span="layout.span">
|
<el-form-item label="电机电流">
|
<el-input placeholder="" :value="params.curr">
|
<template slot="append">A</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="layout.span">
|
<el-form-item label="电机电压">
|
<el-input placeholder="" :value="params.curr">
|
<template slot="append">V</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="layout.gutter">
|
<el-col :span="layout.span">
|
<el-form-item label="输入功率">
|
<el-input placeholder="" :value="params.inPower">
|
<template slot="append">W</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="layout.span">
|
<el-form-item label="输出功率">
|
<el-input placeholder="" :value="params.outPower">
|
<template slot="append">W</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="layout.gutter">
|
<el-col :span="layout.span">
|
<el-form-item label="直流电阻">
|
<el-input placeholder="" :value="params.res">
|
<template slot="append">Ω</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="layout.span">
|
<el-form-item label="当前定子温度">
|
<el-input placeholder="" :value="params.temp">
|
<template slot="append">℃</template>
|
</el-input>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</div>
|
</el-form>
|
</div>
|
<div class="footer-button">
|
<el-button type="primary" size="small" @click="preStep">重做当前步骤</el-button>
|
<el-button type="primary" size="small" @click="completeTest" v-if="end">完成试验</el-button>
|
<el-button type="primary" size="small" @click="nextStep" v-else>开始下一步</el-button>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import {redoTestPoint} from "@/pages/test/js/api";
|
|
export default {
|
name: "pointResultTest",
|
props: {
|
point: {
|
type: Object,
|
default() {
|
return {
|
duration: 0,
|
name: '',
|
percentage: 0,
|
}
|
}
|
},
|
end: {
|
type: Boolean,
|
default: false,
|
},
|
},
|
data() {
|
return {
|
layout: {
|
gutter: 16,
|
span: 8,
|
},
|
params: {
|
curr: 10,
|
vol: 500,
|
inPower: 5000,
|
outPower: 5000,
|
res: 45,
|
temp: 40
|
}
|
}
|
},
|
methods: {
|
nextStep() {
|
this.$emit('nextStep');
|
},
|
preStep() {
|
this.$confirm("确定重做当前步骤", "系统提示", {
|
type: "warning",
|
}).then(()=>{
|
let point = this.point;
|
redoTestPoint(point.id).then(res=>{
|
let rs = res.data;
|
if(rs.code == 1) {
|
this.$emit('preStep');
|
}
|
this.$layer.msg(rs.msg);
|
}).catch(error=>{
|
console.log(error);
|
});
|
}).catch(error=>{
|
|
});
|
|
},
|
completeTest() {
|
this.$emit('completeTest', this.point);
|
}
|
}
|
}
|
</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;
|
}
|
|
.p-h {
|
font-size: 18px;
|
font-weight: 700;
|
}
|
</style>
|