fix:告警设置修改逻辑
This commit is contained in:
@@ -27,7 +27,10 @@
|
||||
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
|
||||
<ns-input-number v-model:value="infoObject.repetitions" placeholder="请输入重复次数" />
|
||||
</a-form-item>
|
||||
<a-form-item v-if="infoObject.alarmFrequency === 2" name="intervalDuration" label="间隔时长">
|
||||
<a-form-item
|
||||
v-if="infoObject.alarmFrequency === 2 || infoObject.alarmFrequency === 3"
|
||||
name="intervalDuration"
|
||||
label="间隔时长">
|
||||
<ns-input-number
|
||||
style="width: 100%"
|
||||
v-model:value="infoObject.intervalDuration"
|
||||
@@ -87,9 +90,12 @@
|
||||
const visible = ref(false);
|
||||
// 间隔单位 默认值
|
||||
const handleChangeAlarmFrequency = () => {
|
||||
if (infoObject.value.alarmFrequency === 2 && !infoObject.value.intervalDurationUnit) {
|
||||
if (infoObject.value.alarmFrequency !== 1 && !infoObject.value.intervalDurationUnit) {
|
||||
infoObject.value.intervalDurationUnit = 1;
|
||||
}
|
||||
if (infoObject.value.alarmFrequency === 3) {
|
||||
infoObject.value.repetitions = null;
|
||||
}
|
||||
};
|
||||
//组织id
|
||||
const orgId = ref('');
|
||||
@@ -217,7 +223,7 @@
|
||||
data.orgId = orgId.value;
|
||||
}
|
||||
data.createWorkOrder = Number(data.createWorkOrder);
|
||||
if (data.alarmFrequency !== 2) {
|
||||
if (data.alarmFrequency === 1) {
|
||||
data.repetitions = null;
|
||||
data.intervalDuration = null;
|
||||
data.intervalDurationUnit = null;
|
||||
|
Reference in New Issue
Block a user