|
@ -25,7 +25,7 @@ |
|
|
<ButtonGradient class="btn" style="margin-left: 5px;" @click.native="isEditor=false"> |
|
|
<ButtonGradient class="btn" style="margin-left: 5px;" @click.native="isEditor=false"> |
|
|
<i class="el-icon-refresh-left"></i> |
|
|
<i class="el-icon-refresh-left"></i> |
|
|
</ButtonGradient> |
|
|
</ButtonGradient> |
|
|
<ButtonGradient class="btn" style="margin-left: 5px;" @click.native="isEditor=false;openingPoint=openingPoint1;"> |
|
|
<ButtonGradient class="btn" style="margin-left: 5px;" @click="validateAndCloseEditor"> |
|
|
<i class="el-icon-check"></i> |
|
|
<i class="el-icon-check"></i> |
|
|
</ButtonGradient> |
|
|
</ButtonGradient> |
|
|
</div> |
|
|
</div> |
|
@ -127,6 +127,22 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
|
|
|
validateAndCloseEditor(){ |
|
|
|
|
|
// console.log(this.controlObject) |
|
|
|
|
|
// console.log(this.openingPoint1) |
|
|
|
|
|
const limits = this.rangeLimits[this.controlObject]; |
|
|
|
|
|
const numberValue = Number(this.openingPoint1); |
|
|
|
|
|
// console.log(numberValue) |
|
|
|
|
|
// console.log(limits.min) |
|
|
|
|
|
// console.log( limits.max) |
|
|
|
|
|
// console.log(numberValue < limits.min || numberValue > limits.max) |
|
|
|
|
|
if(numberValue < limits.min || numberValue > limits.max){ |
|
|
|
|
|
alert('输入的值不在合理范围内'); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.openingPoint=this.openingPoint1; |
|
|
|
|
|
this.isEditor = false; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
submitForm(){ |
|
|
submitForm(){ |
|
|
if((this.controlObject==null||this.controlObject=='')||(this.openingPoint==null||this.openingPoint=='')){ |
|
|
if((this.controlObject==null||this.controlObject=='')||(this.openingPoint==null||this.openingPoint=='')){ |
|
|
return null; |
|
|
return null; |
|
|