遥测修改

dev_xq_0.0.1
谢庆 6 days ago
parent 0d87c182ae
commit b1d7a2a8f1

@ -312,7 +312,12 @@ leftAsideStore.registerConfig('vue四遥组件', [
showInfo: { showInfo: {
type: 'switch', type: 'switch',
val: false, val: false,
title: '显示名称' title: '显示详情'
},
showText: {
type: 'switch',
val: false,
title: '显示文字'
}, },
location: { location: {
type: 'select', type: 'select',

@ -1,7 +1,7 @@
<template> <template>
<el-row v-if="location === 'top'"> <el-row v-if="location === 'top'">
<el-col :span="24" class="flex-center"> <el-col :span="24" class="flex-center">
<el-tag type="primary" size="small" style="opacity: 0.9"> <el-tag v-if="showText" type="primary" size="small" style="opacity: 0.9">
<el-text type="primary" style="max-width: 65px" size="small" truncated> <el-text type="primary" style="max-width: 65px" size="small" truncated>
{{ modeName }} {{ modeName }}
</el-text> </el-text>
@ -11,7 +11,7 @@
<el-row justify="center"> <el-row justify="center">
<el-col :span="12" class="flex-center" v-if="location === 'left'"> <el-col :span="12" class="flex-center" v-if="location === 'left'">
<el-tag type="primary" size="small" style="opacity: 0.9"> <el-tag v-if="showText" type="primary" size="small" style="opacity: 0.9">
<el-text type="primary" style="max-width: 65px" size="small" truncated> <el-text type="primary" style="max-width: 65px" size="small" truncated>
{{ modeName }} {{ modeName }}
</el-text> </el-text>
@ -75,7 +75,7 @@
</el-col> </el-col>
<el-col :span="12" class="flex-center" v-if="location === 'right'"> <el-col :span="12" class="flex-center" v-if="location === 'right'">
<el-tag type="primary" size="small" style="opacity: 0.9"> <el-tag v-if="showText" type="primary" size="small" style="opacity: 0.9">
<el-text type="primary" style="max-width: 65px" size="small" truncated> <el-text type="primary" style="max-width: 65px" size="small" truncated>
{{ modeName }} {{ modeName }}
</el-text> </el-text>
@ -85,7 +85,7 @@
<el-row v-if="location === 'bottom'"> <el-row v-if="location === 'bottom'">
<el-col :span="24" class="flex-center"> <el-col :span="24" class="flex-center">
<el-tag type="primary" size="small" style="opacity: 0.9"> <el-tag v-if="showText" type="primary" size="small" style="opacity: 0.9">
<el-text type="primary" style="max-width: 65px; opacity: 1" size="small" truncated> <el-text type="primary" style="max-width: 65px; opacity: 1" size="small" truncated>
{{ modeName }} {{ modeName }}
</el-text> </el-text>
@ -132,6 +132,10 @@ const props = defineProps({
showInfo: { showInfo: {
type: Boolean, type: Boolean,
default: false default: false
},
showText: {
type: Boolean,
default: false
} }
}); });

@ -174,3 +174,5 @@ Rec.regex = {
modbusCfg: /^(?:25[0-4]|2[0-4]\d|1\d{2}|[1-9]\d|[1-9]):(?:[1-6]|10):(?:6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)(?::[2-9])?$/, modbusCfg: /^(?:25[0-4]|2[0-4]\d|1\d{2}|[1-9]\d|[1-9]):(?:[1-6]|10):(?:6553[0-5]|655[0-2]\d|65[0-4]\d{2}|6[0-4]\d{3}|[1-5]\d{4}|[1-9]\d{0,3}|0)(?::[2-9])?$/,
modbusParm: /^(?:\d+(?::\d+){0,2})?$/ modbusParm: /^(?:\d+(?::\d+){0,2})?$/
} }
export default Rec;

Loading…
Cancel
Save