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

This commit is contained in:
zhaohy
2024-08-23 13:11:49 +08:00
parent 129ef8845a
commit 6c3dd401ad
5 changed files with 23 additions and 1 deletions

View File

@@ -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,