|
|
|
@ -1,25 +1,14 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="fitstStep">
|
|
|
|
|
<el-form
|
|
|
|
|
:model="ruleForm"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
ref="ruleForm"
|
|
|
|
|
label-position="top"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="top">
|
|
|
|
|
<el-row :gutter="40">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="测定标准" prop="determination_standard">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="ruleForm.determination_standard"
|
|
|
|
|
placeholder="请选择测定标准"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-option v-for='item in standards' :key='item.value' :label='item.label' :value='item.value'/>
|
|
|
|
|
<!-- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
|
|
<el-option label="区域二" value="beijing"></el-option> -->
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-form-item label="样品名称" prop="material_name">
|
|
|
|
|
<el-input v-model="ruleForm.material_name" placeholder="请输入样品名称" @input="handSearch(ruleForm.material_name)">
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="预期闪点" prop="expected_flash_point">
|
|
|
|
|
<el-input v-model="ruleForm.expected_flash_point" @input="handInput" class="flash rightBorder">
|
|
|
|
@ -34,25 +23,16 @@
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="温度选择" prop="temperature_selection">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="ruleForm.temperature_selection"
|
|
|
|
|
@change="handChange"
|
|
|
|
|
:disabled="isDisabled"
|
|
|
|
|
placeholder="请选择温度"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-select v-model="ruleForm.temperature_selection" @change="handChange" :disabled="isDisabled"
|
|
|
|
|
placeholder="请选择温度" style="width: 100%">
|
|
|
|
|
<el-option v-for='item in temps' :key='item.value' :label='item.label' :value='item.value' />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="初始温度" prop="initial_temperature_set">
|
|
|
|
|
<el-input
|
|
|
|
|
class="rightBorder"
|
|
|
|
|
v-model="ruleForm.initial_temperature_set"
|
|
|
|
|
:disabled="isDisabled"
|
|
|
|
|
placeholder="≤预期闪点-18℃"
|
|
|
|
|
>
|
|
|
|
|
<el-input class="rightBorder" v-model="ruleForm.initial_temperature_set" :disabled="isDisabled"
|
|
|
|
|
placeholder="≤预期闪点-18℃">
|
|
|
|
|
|
|
|
|
|
<template slot="append">℃</template>
|
|
|
|
|
</el-input>
|
|
|
|
@ -61,19 +41,19 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="样品名称" prop="material_name">
|
|
|
|
|
<el-input v-model="ruleForm.material_name" placeholder="请输入样品名称">
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="测定标准" prop="determination_standard">
|
|
|
|
|
<el-select v-model="ruleForm.determination_standard" placeholder="请选择测定标准" style="width: 100%">
|
|
|
|
|
<el-option v-for='item in standards' :key='item.value' :label='item.label' :value='item.value' />
|
|
|
|
|
<!-- <el-option label="区域一" value="shanghai"></el-option>
|
|
|
|
|
<el-option label="区域二" value="beijing"></el-option> -->
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="最终温度" prop="final_temperature_set">
|
|
|
|
|
<el-input
|
|
|
|
|
class="rightBorder"
|
|
|
|
|
v-model="ruleForm.final_temperature_set"
|
|
|
|
|
:disabled="isDisabled"
|
|
|
|
|
placeholder="≥预期闪点+10℃"
|
|
|
|
|
>
|
|
|
|
|
<el-input class="rightBorder" v-model="ruleForm.final_temperature_set" :disabled="isDisabled"
|
|
|
|
|
placeholder="≥预期闪点+10℃">
|
|
|
|
|
<template slot="append">℃</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -108,7 +88,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { addExperiment } from "@/api/step";
|
|
|
|
|
import { addExperiment, getExperimentInfo } from "@/api/step";
|
|
|
|
|
import { getInitParams } from "@/api/setSystem";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -198,6 +178,22 @@ export default {
|
|
|
|
|
this.getInit()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handSearch(name){
|
|
|
|
|
console.log('样品名称',name)
|
|
|
|
|
getExperimentInfo({material_name:name}).then(res => {
|
|
|
|
|
console.log(res,'搜索',res.data.data)
|
|
|
|
|
if (res.data.data.length > 0) {
|
|
|
|
|
this.ruleForm.determination_standard=res.data.data[0].determination_standard;
|
|
|
|
|
this.ruleForm.temperature_selection=res.data.data[0].temperature_selection;
|
|
|
|
|
this.ruleForm.expected_flash_point=res.data.data[0].expected_flash_point;
|
|
|
|
|
this.ruleForm.initial_temperature_set=res.data.data[0].initial_temperature_set;
|
|
|
|
|
this.ruleForm.final_temperature_set=res.data.data[0].final_temperature_set;
|
|
|
|
|
this.ruleForm.material_code=res.data.data[0].material_code;
|
|
|
|
|
} else {
|
|
|
|
|
// this.$message.warning('请初始化测定标准参数')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handChange(val) {
|
|
|
|
|
if (val == '低温测试(-25~100℃)') {
|
|
|
|
|
this.isShow = true
|
|
|
|
@ -250,19 +246,24 @@ export default {
|
|
|
|
|
if (that.ruleForm.expected_flash_point != '未知' && isNaN(that.ruleForm.expected_flash_point)) {
|
|
|
|
|
return that.$message.warning('预期闪点只能设置为数值或未知!')
|
|
|
|
|
}
|
|
|
|
|
if(!isNaN(that.ruleForm.expected_flash_point)){
|
|
|
|
|
console.log(Number(that.ruleForm.expected_flash_point)-Number(that.ruleForm.initial_temperature_set),'测试')
|
|
|
|
|
|
|
|
|
|
if (Number(that.ruleForm.final_temperature_set) < Number(that.ruleForm.initial_temperature_set)) {
|
|
|
|
|
return that.$message.warning('最终温度不能小于初始温度')
|
|
|
|
|
}
|
|
|
|
|
if (that.ruleForm.temperature_selection == '高温测定(100~420℃)') {
|
|
|
|
|
if (118 <= Number(that.ruleForm.expected_flash_point) && Number(that.ruleForm.expected_flash_point) <= 402) {
|
|
|
|
|
if (Number(that.ruleForm.expected_flash_point) - Number(that.ruleForm.initial_temperature_set) < 18) {
|
|
|
|
|
return that.$message.warning('初始温度<=预期闪点18℃')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (Number(that.ruleForm.expected_flash_point) && Number(that.ruleForm.expected_flash_point) <= 410) {
|
|
|
|
|
if (Number(that.ruleForm.final_temperature_set) - Number(that.ruleForm.expected_flash_point) < 10) {
|
|
|
|
|
return that.$message.warning('最终温度>=预期闪点10℃')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(Number(that.ruleForm.final_temperature_set)<Number(that.ruleForm.initial_temperature_set)){
|
|
|
|
|
return that.$message.warning('最终温度不能小于初始温度')
|
|
|
|
|
if (that.ruleForm.expected_flash_point < 100 || that.ruleForm.initial_temperature_set > 420) {
|
|
|
|
|
return that.$message.warning('高温模式下闪电值为100~420℃')
|
|
|
|
|
}
|
|
|
|
|
if(that.ruleForm.temperature_selection=='高温测定(100~420℃)'){
|
|
|
|
|
if (that.ruleForm.initial_temperature_set < 100 || that.ruleForm.initial_temperature_set > 420) {
|
|
|
|
|
return that.$message.warning('高温模式下初始温度范围为100-420℃')
|
|
|
|
|
}
|
|
|
|
@ -271,6 +272,24 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if (that.ruleForm.temperature_selection == '低温测试(-25~100℃)') {
|
|
|
|
|
if (!isNaN(that.ruleForm.expected_flash_point)) {
|
|
|
|
|
console.log(-7 <= Number(that.ruleForm.expected_flash_point) && Number(that.ruleForm.expected_flash_point) <= 92, '测试33')
|
|
|
|
|
if (-7 <= Number(that.ruleForm.expected_flash_point) && Number(that.ruleForm.expected_flash_point) <= 92) {
|
|
|
|
|
if (Number(that.ruleForm.expected_flash_point) - Number(that.ruleForm.initial_temperature_set) < 18) {
|
|
|
|
|
return that.$message.warning('初始温度<=预期闪点18℃')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (Number(that.ruleForm.expected_flash_point) && Number(that.ruleForm.expected_flash_point) <= 90) {
|
|
|
|
|
if (Number(that.ruleForm.final_temperature_set) - Number(that.ruleForm.expected_flash_point) < 10) {
|
|
|
|
|
return that.$message.warning('最终温度>=预期闪点10℃')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (that.ruleForm.expected_flash_point < -25 || that.ruleForm.expected_flash_point > 100) {
|
|
|
|
|
return that.$message.warning('低温模式下闪点温度范围为-25~100℃')
|
|
|
|
|
}
|
|
|
|
|
if (that.ruleForm.initial_temperature_set < -25 || that.ruleForm.initial_temperature_set > 100) {
|
|
|
|
|
return that.$message.warning('低温模式下初始温度范围为-25~100℃')
|
|
|
|
|
}
|
|
|
|
@ -303,6 +322,7 @@ export default {
|
|
|
|
|
border: 2px solid #E4E4E4;
|
|
|
|
|
line-height: 68px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fitstStep {
|
|
|
|
|
.el-form {
|
|
|
|
|
margin-top: 28px;
|
|
|
|
@ -315,6 +335,7 @@ export default {
|
|
|
|
|
color: #666666;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 表格
|
|
|
|
|
.el-form-item__content {
|
|
|
|
|
// width: 440px;
|
|
|
|
@ -328,12 +349,15 @@ export default {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
color: #3a3a3a;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rightBorder .el-input__inner {
|
|
|
|
|
border-right: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flash {
|
|
|
|
|
width: 220px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-input-group__append,
|
|
|
|
|
.el-input-group__prepend {
|
|
|
|
|
background: #ffffff;
|
|
|
|
@ -343,6 +367,7 @@ export default {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.set {
|
|
|
|
|
width: 220px;
|
|
|
|
|
height: 68px;
|
|
|
|
@ -355,6 +380,7 @@ export default {
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 68px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.goBack {
|
|
|
|
|
width: 208px;
|
|
|
|
|
height: 84px;
|
|
|
|
@ -367,6 +393,7 @@ export default {
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 36px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.sampling {
|
|
|
|
|
width: 208px;
|
|
|
|
|
height: 84px;
|
|
|
|
@ -380,6 +407,7 @@ export default {
|
|
|
|
|
margin-top: 36px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
|
width: 1024px;
|
|
|
|
|
height: 40px;
|
|
|
|
@ -395,6 +423,7 @@ export default {
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.model {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 116px;
|
|
|
|
@ -404,6 +433,7 @@ export default {
|
|
|
|
|
box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.16);
|
|
|
|
|
border-radius: 8px 8px 8px 8px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
|
display: block;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
@ -415,6 +445,7 @@ export default {
|
|
|
|
|
color: #fff;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.dec {
|
|
|
|
|
margin: 70px auto 0;
|
|
|
|
|
font-size: 28px;
|
|
|
|
@ -422,6 +453,7 @@ export default {
|
|
|
|
|
color: #3A3A3A;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tip {
|
|
|
|
|
margin: 32px auto 0;
|
|
|
|
|
font-size: 24px;
|
|
|
|
@ -429,6 +461,7 @@ export default {
|
|
|
|
|
color: #C3C3C3;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.bottom {
|
|
|
|
|
margin-top: 64px;
|
|
|
|
|
display: flex;
|
|
|
|
@ -436,6 +469,7 @@ export default {
|
|
|
|
|
text-align: center;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 70px;
|
|
|
|
|
|
|
|
|
|
.button {
|
|
|
|
|
width: 136px;
|
|
|
|
|
height: 68px;
|
|
|
|
@ -443,12 +477,14 @@ export default {
|
|
|
|
|
border-radius: 8px 8px 8px 8px;
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cancel {
|
|
|
|
|
background: linear-gradient(180deg, #FFFFFF 0%, #ECECEC 100%);
|
|
|
|
|
color: #3A3A3A;
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
line-height: 68px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.continue {
|
|
|
|
|
background: linear-gradient(180deg, #FF7B83 0%, #850006 100%);
|
|
|
|
|
color: #fff;
|
|
|
|
|