fix: 修复采集器断开文案以及PLC地址回显
This commit is contained in:
parent
62bd45e624
commit
32e78e9fc0
|
@ -57,8 +57,18 @@
|
|||
v-model:value="formData.pointKey"
|
||||
:min="0"
|
||||
:max="255"
|
||||
:precision="0"
|
||||
/>
|
||||
</j-form-item>
|
||||
<p
|
||||
style="color: #616161"
|
||||
v-if="formData.configuration.function && formData.pointKey"
|
||||
>
|
||||
PLC地址:{{
|
||||
InitAddress[formData.configuration.function] +
|
||||
formData.pointKey
|
||||
}}
|
||||
</p>
|
||||
<j-form-item
|
||||
label="寄存器数量"
|
||||
:name="['configuration', 'parameter', 'quantity']"
|
||||
|
@ -70,6 +80,7 @@
|
|||
v-model:value="formData.configuration.parameter.quantity"
|
||||
:min="1"
|
||||
:max="255"
|
||||
:precision="0"
|
||||
@blur="changeQuantity"
|
||||
/>
|
||||
</j-form-item>
|
||||
|
@ -258,6 +269,12 @@ const collectorId = props.data.collectorId;
|
|||
const provider = props.data.provider;
|
||||
const oldPointKey = props.data.pointKey;
|
||||
|
||||
const InitAddress = {
|
||||
Coils: 1,
|
||||
HoldingRegisters: 40001,
|
||||
InputRegisters: 30001,
|
||||
};
|
||||
|
||||
const formData = ref({
|
||||
name: '',
|
||||
configuration: {
|
||||
|
@ -371,9 +388,20 @@ const getProviderList = async () => {
|
|||
value: item.id,
|
||||
label: item.name,
|
||||
}));
|
||||
|
||||
setProviderList(formData.value.configuration.function);
|
||||
};
|
||||
getProviderList();
|
||||
|
||||
const setProviderList = (value: string | undefined) => {
|
||||
providerList.value =
|
||||
value === 'HoldingRegisters'
|
||||
? providerListAll.value
|
||||
: providerListAll.value.filter(
|
||||
(item: any) => item.value !== 'bool',
|
||||
);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => formData.value.configuration.parameter.quantity,
|
||||
(value) => {
|
||||
|
@ -384,14 +412,9 @@ watch(
|
|||
watch(
|
||||
() => formData.value.configuration.function,
|
||||
(value) => {
|
||||
providerList.value =
|
||||
value === 'HoldingRegisters'
|
||||
? providerListAll.value
|
||||
: providerListAll.value.filter(
|
||||
(item: any) => item.value !== 'bool',
|
||||
);
|
||||
setProviderList(value);
|
||||
},
|
||||
{ deep: true },
|
||||
{ immediate: true, deep: true },
|
||||
);
|
||||
watch(
|
||||
() => props.data,
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
v-model:value="formData.circuitBreaker.type"
|
||||
:options="[
|
||||
{ label: '降频', value: 'LowerFrequency' },
|
||||
{ label: '熔断', value: 'Break' },
|
||||
{ label: '断开', value: 'Break' },
|
||||
{ label: '忽略', value: 'Ignore' },
|
||||
]"
|
||||
@change="changeCardSelectType"
|
||||
|
@ -203,7 +203,7 @@ const getTypeTooltip = (value: string) =>
|
|||
value === 'LowerFrequency'
|
||||
? '连续20次异常,降低连接频率至原有频率的1/10(重试间隔不超过1分钟),故障处理后自动恢复至设定连接频率'
|
||||
: value === 'Break'
|
||||
? '连续10分钟异常,停止采集数据进入熔断状态,设备重新启用后恢复采集状态'
|
||||
? '连续10分钟异常,停止采集数据进入断开状态,设备重新启用后恢复采集状态'
|
||||
: '忽略异常,保持原采集频率超时时间为5s';
|
||||
|
||||
const handleCancel = () => {
|
||||
|
|
Loading…
Reference in New Issue