|
@@ -77,12 +77,14 @@
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="thresholdTime">
|
|
|
- <a-input v-model="model.thresholdTime" placeholder="请输入时间"></a-input>
|
|
|
+ <a-input v-model="model.thresholdTime" suffix="S" placeholder="请输入时间"></a-input>
|
|
|
+ <!-- suffix="S" -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
|
- <a-form-model-item label="阈值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="thresholdValue">
|
|
|
- <a-input v-model="model.thresholdValue" placeholder="请输入阈值"></a-input>
|
|
|
+ <a-form-model-item label="阈值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="thresholdValueN">
|
|
|
+ <a-input v-model="model.thresholdValueN" suffix="%" placeholder="请输入阈值"></a-input>
|
|
|
+ <!-- addon-after="%" -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
@@ -135,8 +137,8 @@
|
|
|
</template>
|
|
|
<template v-if="model.ifBypass === '0'">
|
|
|
<a-col :span="24">
|
|
|
- <a-form-model-item label="旁路状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bypass">
|
|
|
- <a-input v-model="model.bypass" placeholder="无旁路"></a-input>
|
|
|
+ <a-form-model-item label="旁路状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bypassNo">
|
|
|
+ <a-input v-model="model.bypassNo" default-value="无旁路" placeholder="无旁路"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
@@ -198,8 +200,8 @@
|
|
|
data () {
|
|
|
return {
|
|
|
model:{
|
|
|
- instrumentStatusJuge: 1,
|
|
|
- ifBypass: 1,
|
|
|
+ instrumentStatusJuge: '0',
|
|
|
+ ifBypass: '1',
|
|
|
},
|
|
|
labelCol: {
|
|
|
xs: { span: 24 },
|
|
@@ -220,6 +222,24 @@
|
|
|
instrumentStatusData: [{
|
|
|
required: true, message: '请选择仪表状态位号!',
|
|
|
}],
|
|
|
+ // 高低限
|
|
|
+ ysmnlData: [{
|
|
|
+ required: true, message: '请选择原始模拟量位号!',
|
|
|
+ }],
|
|
|
+ upperLimit: [{
|
|
|
+ required: true, message: '请输入高限值!',
|
|
|
+ }],
|
|
|
+ lowerLimit: [{
|
|
|
+ required: true, message: '请输入低限值!',
|
|
|
+ }],
|
|
|
+ // 突变超限
|
|
|
+ thresholdTime: [{
|
|
|
+ required: true, message: '请输入时间!',
|
|
|
+ }],
|
|
|
+ thresholdValueN: [{
|
|
|
+ required: true, message: '请输入阈值!',
|
|
|
+ }],
|
|
|
+
|
|
|
description: [{
|
|
|
required: true, message: '请输入描述!',
|
|
|
}],
|
|
@@ -303,10 +323,20 @@
|
|
|
this.model.interlockConditionData = [record.interlockConditionDeviceId, record.interlockConditionModuleName, record.interlockConditionTag+'&'+record.interlockSetValue]
|
|
|
// 仪表状态-仪表状态位号
|
|
|
this.model.instrumentStatusData = [record.instrumentStatusDeviceId, record.instrumentStatusModuleName, record.instrumentStatusTag+'&'+record.instrumentStatusValue]
|
|
|
+ // 仪表状态-原始模拟量位号
|
|
|
+ this.model.ysmnlData = [record.ysmnlDeviceId, record.ysmnlModuleName, record.ysmnlTag+'&'+record.ysmnlValue]
|
|
|
+ // 仪表状态-阈值Math.round解决相乘会出现很多小数的情况
|
|
|
+ this.model.thresholdValueN = Math.round(parseInt(record.thresholdValue)*100)
|
|
|
+ // this.model.thresholdValueN = (parseInt(record.thresholdValue)*100).toFixed(0)
|
|
|
// 当前值
|
|
|
this.model.currentValueData = [record.currentValueDeviceId, record.currentValueModuleName, record.currentValueTag+'&'+record.currentValue]
|
|
|
// 旁路
|
|
|
- this.model.bypassData = [record.bypassDeviceId, record.bypassModuleName, record.bypassTag+'&'+record.bypass]
|
|
|
+ if(record.ifBypass === '0'){
|
|
|
+ this.model.bypassNo = record.bypass
|
|
|
+ }
|
|
|
+ if(record.ifBypass === '1'){
|
|
|
+ this.model.bypassData = [record.bypassDeviceId, record.bypassModuleName, record.bypassTag+'&'+record.bypass]
|
|
|
+ }
|
|
|
// 输入卡件状态
|
|
|
this.model.inputStatusData = [record.inputStatusDeviceId, record.inputStatusModuleName, record.inputStatusTag+'&'+record.inputStatus]
|
|
|
// 输出卡件状态
|
|
@@ -333,6 +363,13 @@
|
|
|
this.model.instrumentStatusModuleName = this.model.instrumentStatusData[1]
|
|
|
this.model.instrumentStatusTag = (this.model.instrumentStatusData[2].split('&'))[0]
|
|
|
this.model.instrumentStatusValue = (this.model.instrumentStatusData[2].split('&'))[1]
|
|
|
+ // 仪表状态-原始模拟量位号
|
|
|
+ this.model.ysmnlDeviceId = this.model.ysmnlData[0]
|
|
|
+ this.model.ysmnlModuleName = this.model.ysmnlData[1]
|
|
|
+ this.model.ysmnlTag = (this.model.ysmnlData[2].split('&'))[0]
|
|
|
+ this.model.ysmnlValue = (this.model.ysmnlData[2].split('&'))[1]
|
|
|
+ // 仪表状态-阈值--设置thresholdValueN是防止自身转换出现问题
|
|
|
+ this.model.thresholdValue = parseInt(this.model.thresholdValueN)/100
|
|
|
|
|
|
// 当前值
|
|
|
this.model.currentValueDeviceId = this.model.currentValueData[0]
|
|
@@ -340,11 +377,18 @@
|
|
|
this.model.currentValueTag = (this.model.currentValueData[2].split('&'))[0]
|
|
|
this.model.currentValue = (this.model.currentValueData[2].split('&'))[1]
|
|
|
|
|
|
- // 旁路
|
|
|
- this.model.bypassDeviceId = this.model.bypassData[0]
|
|
|
- this.model.bypassModuleName = this.model.bypassData[1]
|
|
|
- this.model.bypassTag = (this.model.bypassData[2].split('&'))[0]
|
|
|
- this.model.bypass = (this.model.bypassData[2].split('&'))[1]
|
|
|
+ // 旁路位号
|
|
|
+ if(this.model.ifBypass === '0'){
|
|
|
+ // 否
|
|
|
+ this.bypass = this.model.bypassNo
|
|
|
+ }
|
|
|
+ if(this.model.ifBypass === '0'){
|
|
|
+ // 是
|
|
|
+ this.model.bypassDeviceId = this.model.bypassData[0]
|
|
|
+ this.model.bypassModuleName = this.model.bypassData[1]
|
|
|
+ this.model.bypassTag = (this.model.bypassData[2].split('&'))[0]
|
|
|
+ this.model.bypass = (this.model.bypassData[2].split('&'))[1]
|
|
|
+ }
|
|
|
|
|
|
// 输入卡件状态
|
|
|
this.model.inputStatusDeviceId = this.model.inputStatusData[0]
|