fix:根据需求去除.00展示
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user