|
@@ -351,12 +351,12 @@
|
|
|
</div>
|
|
|
<div class="mainModules" v-if="whether === true">
|
|
|
<el-form-item label="设置温度(℃)">
|
|
|
- <el-input style="width:80%;" v-model="list.fTemperature" @input="temperature" onkeyup="this.value= this.value.match(/^[1-9]\d*$/)"/>
|
|
|
+ <el-input style="width:80%;" v-model="list.fTemperature" @input="temperature" oninput='this.value=this.value.replace(/[^\-?\d.]/g,"")'/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="mainModules" v-if="whether === true">
|
|
|
<el-form-item label="风门开度(%)">
|
|
|
- <el-input style="width:80%;" v-model="list.fDraught"/>
|
|
|
+ <el-input style="width:80%;" v-model.number="list.fDraught" @input="throttleOpening" oninput='this.value=this.value.replace(/[^\d.]/g,"")'/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="mainModules" v-if="whether === true">
|
|
@@ -731,11 +731,28 @@ export default {
|
|
|
methods: {
|
|
|
temperature(res){
|
|
|
console.log(res);
|
|
|
- if (res < 20 || res > -30){
|
|
|
- console.log("1111");
|
|
|
- return
|
|
|
+ if (res < 20 && res > -30){
|
|
|
+ }else if(res == '-'){
|
|
|
}else {
|
|
|
- this.$message.error('冷藏箱温度为-30℃至20℃之间的整数');
|
|
|
+ this.list.fTemperature = ''
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '冷藏箱温度为-30℃至20℃之间的整数',
|
|
|
+ type: 'error',
|
|
|
+ offset:90
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ throttleOpening(res){
|
|
|
+ if (res <= 100){
|
|
|
+ }else {
|
|
|
+ this.list.fDraught = ''
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '不能大于100%或小于0%',
|
|
|
+ type: 'error',
|
|
|
+ offset:90
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
newlyAdded() {
|