|
@ -4,36 +4,42 @@ |
|
|
<!-- <DeviceParams :dialogData="dialogData" /> --> |
|
|
<!-- <DeviceParams :dialogData="dialogData" /> --> |
|
|
<div class="control-unit"> |
|
|
<div class="control-unit"> |
|
|
<span>监控控制开关:</span> |
|
|
<span>监控控制开关:</span> |
|
|
<el-switch active-color="#13ce66" inactive-color="#ff4949" v-model="swicthLight" active-text="开启" |
|
|
<el-switch active-color="#01AAFD" inactive-color="#bbbbbb" v-model="swicthLight" active-text="开启" |
|
|
inactive-text="关闭" @change="switchTopState" > </el-switch> |
|
|
inactive-text="关闭" @change="switchTopState" > </el-switch> |
|
|
</div> |
|
|
</div> |
|
|
<el-select v-model="controlObject" placeholder="请选择" @change="onControlObjectChange"> |
|
|
<el-select v-model="controlObject" placeholder="请选择" @change="onControlObjectChange"> |
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-input type="text" v-model="openingPoint" @input="validateInput" maxlength="3" |
|
|
<!-- <el-input type="text" v-model="openingPoint" @input="validateInput" maxlength="3" |
|
|
show-word-limit placeholder="请输入" clearable ></el-input> |
|
|
show-word-limit placeholder="请输入" clearable ></el-input> --> |
|
|
<p v-if="errorMessage" style="color: yellow; font-size: 16px;">{{ errorMessage }}</p> |
|
|
|
|
|
<ButtonGradient @click.native="submitForm"> |
|
|
<div class="contentValue" v-if="isEditor === false"> |
|
|
确认 |
|
|
<div class="contentBoard" >{{ openingPoint }}</div> |
|
|
|
|
|
<ButtonGradient class="btn" @click.native="isEditor=true;openingPoint1=openingPoint"> |
|
|
|
|
|
<i class="el-icon-edit"></i> |
|
|
</ButtonGradient> |
|
|
</ButtonGradient> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="contentValue" v-else> |
|
|
|
|
|
<input class="contentBoard" placeholder="请输入文字" v-model="openingPoint1"></input> |
|
|
</Dialog> |
|
|
<ButtonGradient class="btn" style="margin-left: 5px;" @click.native="isEditor=false"> |
|
|
</template> |
|
|
|
|
|
<!-- <input class="contentBoard" type="text" v-model="openingPoint" @input="validateInput" maxlength="3" |
|
|
|
|
|
show-word-limit placeholder="请输入" clearable ></input> --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-col :span="24"> |
|
|
|
|
|
<input class="contentBoard" placeholder="请输入文字" v-model="openingPoint"></input> |
|
|
|
|
|
<ButtonGradient class="btn" style="margin-left: 5px;" @click.native="$emit('onContentEdit', {field:'executeConfig',index,type:'cancel'})"> |
|
|
|
|
|
<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="$emit('onContentEdit', {field:'executeConfig',index,type:'confirm'})"> |
|
|
<ButtonGradient class="btn" style="margin-left: 5px;" @click.native="isEditor=false;openingPoint=openingPoint1;"> |
|
|
<i class="el-icon-check"></i> |
|
|
<i class="el-icon-check"></i> |
|
|
</ButtonGradient> |
|
|
</ButtonGradient> |
|
|
</el-col> --> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<p v-if="errorMessage" style="color: yellow; font-size: 16px;">{{ errorMessage }}{{ errorMessage!==''?openingPoint:''}}</p> |
|
|
|
|
|
<div style="width:100%;"> |
|
|
|
|
|
<ButtonGradient style="width:100px;float:right;" @click.native="submitForm"> |
|
|
|
|
|
确认 |
|
|
|
|
|
</ButtonGradient> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</Dialog> |
|
|
|
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import Button from "@screen/components/Buttons/Button.vue"; |
|
|
import Button from "@screen/components/Buttons/Button.vue"; |
|
|
import Dialog from "@screen/components/Dialog/index.vue"; |
|
|
import Dialog from "@screen/components/Dialog/index.vue"; |
|
@ -76,6 +82,7 @@ |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
isEditor:false, |
|
|
OOODValue:'', |
|
|
OOODValue:'', |
|
|
OOOEValue:'', |
|
|
OOOEValue:'', |
|
|
OOOFValue:'', |
|
|
OOOFValue:'', |
|
@ -95,6 +102,7 @@ |
|
|
}], |
|
|
}], |
|
|
controlObject: '', |
|
|
controlObject: '', |
|
|
openingPoint:'', |
|
|
openingPoint:'', |
|
|
|
|
|
openingPoint1:'', |
|
|
errorMessage:'', |
|
|
errorMessage:'', |
|
|
rangeLimits: { |
|
|
rangeLimits: { |
|
|
'000D': { min: 20, max: 55 }, |
|
|
'000D': { min: 20, max: 55 }, |
|
@ -147,15 +155,20 @@ |
|
|
this.errorMessage = `请输入 ${limits.min}-${limits.max} 之间的数字`; |
|
|
this.errorMessage = `请输入 ${limits.min}-${limits.max} 之间的数字`; |
|
|
if(this.controlObject=='000D'&&this.OOODValue!=''){ |
|
|
if(this.controlObject=='000D'&&this.OOODValue!=''){ |
|
|
this.errorMessage += ` 当前值为:`+this.OOODValue; |
|
|
this.errorMessage += ` 当前值为:`+this.OOODValue; |
|
|
|
|
|
this.openingPoint = this.OOODValue; |
|
|
}else if(this.controlObject=='000E'&&this.OOOEValue!=''){ |
|
|
}else if(this.controlObject=='000E'&&this.OOOEValue!=''){ |
|
|
this.errorMessage += ` 当前值为:`+this.OOOEValue; |
|
|
this.errorMessage += ` 当前值为:`+this.OOOEValue; |
|
|
|
|
|
this.openingPoint = this.OOOEValue; |
|
|
}else if(this.controlObject=='000F'&&this.OOOFValue!=''){ |
|
|
}else if(this.controlObject=='000F'&&this.OOOFValue!=''){ |
|
|
this.errorMessage += ` 当前值为:`+this.OOOFValue; |
|
|
this.errorMessage += ` 当前值为:`+this.OOOFValue; |
|
|
|
|
|
this.openingPoint = this.OOOFValue; |
|
|
}else if(this.controlObject=='0010'&&this.OO1OValue!=''){ |
|
|
}else if(this.controlObject=='0010'&&this.OO1OValue!=''){ |
|
|
this.errorMessage += ` 当前值为:`+this.OO1OValue; |
|
|
this.errorMessage += ` 当前值为:`+this.OO1OValue; |
|
|
|
|
|
this.openingPoint = this.OO1OValue; |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.errorMessage = ''; |
|
|
this.errorMessage = ''; |
|
|
|
|
|
this.openingPoint = ''; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onControlObjectChange(value) { |
|
|
onControlObjectChange(value) { |
|
@ -167,17 +180,21 @@ |
|
|
if (isNaN(inputValue) || inputValue < limits.min || inputValue > limits.max) { |
|
|
if (isNaN(inputValue) || inputValue < limits.min || inputValue > limits.max) { |
|
|
this.errorMessage = `请选择 ${limits.min}-${limits.max} 之间的数字`; |
|
|
this.errorMessage = `请选择 ${limits.min}-${limits.max} 之间的数字`; |
|
|
if(value=='000D'&&this.OOODValue!=''){ |
|
|
if(value=='000D'&&this.OOODValue!=''){ |
|
|
this.errorMessage += ` 当前值为:`+this.OOODValue; |
|
|
this.errorMessage += ` 当前值为:` |
|
|
|
|
|
this.openingPoint = this.OOODValue; |
|
|
}else if(value=='000E'&&this.OOOEValue!=''){ |
|
|
}else if(value=='000E'&&this.OOOEValue!=''){ |
|
|
this.errorMessage += ` 当前值为:`+this.OOOEValue; |
|
|
this.errorMessage += ` 当前值为:` |
|
|
|
|
|
this.openingPoint = this.OOOEValue; |
|
|
}else if(value=='000F'&&this.OOOFValue!=''){ |
|
|
}else if(value=='000F'&&this.OOOFValue!=''){ |
|
|
this.errorMessage += ` 当前值为:`+this.OOOFValue; |
|
|
this.errorMessage += ` 当前值为:` |
|
|
|
|
|
this.openingPoint = this.OOOFValue; |
|
|
}else if(value=='0010'&&this.OO1OValue!=''){ |
|
|
}else if(value=='0010'&&this.OO1OValue!=''){ |
|
|
this.errorMessage += ` 当前值为:`+this.OO1OValue; |
|
|
this.errorMessage += ` 当前值为:` |
|
|
|
|
|
this.openingPoint = this.OO1OValue; |
|
|
} |
|
|
} |
|
|
this.openingPoint = ''; // 清空超出范围的输入 |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.errorMessage = ''; |
|
|
this.errorMessage = ''; |
|
|
|
|
|
this.openingPoint = ''; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
AddMethods() { |
|
|
AddMethods() { |
|
@ -265,6 +282,26 @@ |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.contentValue{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
width:100%; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
.contentBoard{ |
|
|
|
|
|
flex:1; |
|
|
|
|
|
background-color: #19425c; |
|
|
|
|
|
color:#dfdfdf; |
|
|
|
|
|
padding: 9px 0px; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
} |
|
|
|
|
|
.btn{ |
|
|
|
|
|
height:40px; |
|
|
|
|
|
} |
|
|
.DeviceControlDialog { |
|
|
.DeviceControlDialog { |
|
|
width: 510px; |
|
|
width: 510px; |
|
|
display: flex; |
|
|
display: flex; |
|
@ -283,6 +320,7 @@ |
|
|
padding: 9px 0px; |
|
|
padding: 9px 0px; |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
|
|
|
height:40px; |
|
|
} |
|
|
} |
|
|
.control-wrapper { |
|
|
.control-wrapper { |
|
|
display: flex; |
|
|
display: flex; |
|
|