Browse Source

fix:根据需求去除.00展示

temp
zhaohy 3 months ago
parent
commit
6c3dd401ad
  1. 10
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue
  2. 1
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue
  3. 2
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue
  4. 10
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue
  5. 1
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue

10
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue

@ -11,6 +11,9 @@
}"
@click="clickSwitch({ enableRules: record.enableRules, record: record })" />
</template>
<template v-if="column.dataIndex === 'conditionalJudgment'">
{{ getConditionalJudgment(record) }}
</template>
<template v-if="column.dataIndex === 'comparisonType'">
{{ getcomparisonType(record) }}
</template>
@ -69,6 +72,12 @@
}
}
};
const getConditionalJudgment = (data: any) => {
const formattedValue = data.conditionalJudgment.replace(/(\d+)\.00/g, '$1');
//
console.log(formattedValue, 'value');
return formattedValue;
};
const clickSwitch = (data: any) => {
NsModal.confirm({
title: '启用状态',
@ -315,6 +324,7 @@
getcomparisonType,
orgId,
tableConfig,
getConditionalJudgment,
editConfigureEnergyAlarms,
setconfigureDeviceAlarmsData,
};

1
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue

@ -111,6 +111,7 @@
:min="-9999999999.99"
:max="9999999999.99"
:precision="2"
:formatter="(value) => `${value}`.replace(/\.00$/, '')"
v-model:value="infoObject.alarmList[index - 1].num" />
<div
v-if="index > 1 && index === infoObject.alarmList?.length"

2
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue

@ -32,7 +32,7 @@
<a-form-item v-if="infoObject.alarmFrequency === 2" name="repetitions" label="重复次数">
<ns-input-number
v-model:value="infoObject.repetitions"
:min="0"
:min="1"
:max="99"
placeholder="请输入重复次数" />
</a-form-item>

10
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/configureDeviceAlarms.vue

@ -14,6 +14,9 @@
<template v-if="column.dataIndex === 'valueType'">
{{ record.valueType.label }}
</template>
<template v-if="column.dataIndex === 'conditionalJudgment'">
{{ getConditionalJudgment(record) }}
</template>
</template>
</ns-view-list-table>
<!-- 新增or编辑界面 -->
@ -296,6 +299,12 @@
rowKey: 'id',
};
};
const getConditionalJudgment = (data: any) => {
const formattedValue = data.conditionalJudgment.replace(/(\d+)\.00/g, '$1');
//
console.log(formattedValue, 'value');
return formattedValue;
};
return {
configureDeviceAlarmsData,
show,
@ -303,6 +312,7 @@
doWnload,
tableConfig,
orgId,
getConditionalJudgment,
mainRef,
editObject,
editConfigureDeviceAlarms,

1
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue

@ -122,6 +122,7 @@
:min="-9999999999.99"
:max="9999999999.99"
:precision="2"
:formatter="(value) => `${value}`.replace(/\.00$/, '')"
v-model:value="infoObject.alarmList[index - 1].num" />
<div
v-if="index > 1 && index === infoObject.alarmList?.length"

Loading…
Cancel
Save