diff --git a/public/static/videos/01.webm b/public/static/videos/01.webm index 9f019980..92b557bc 100644 Binary files a/public/static/videos/01.webm and b/public/static/videos/01.webm differ diff --git a/src/filter/code-filter.js b/src/filter/code-filter.js index 003d2792..1488f5e5 100644 --- a/src/filter/code-filter.js +++ b/src/filter/code-filter.js @@ -91,4 +91,4 @@ export default function (dictTable) { return function (val) { return table?.[dictTable]?.[val] } -} +} \ No newline at end of file diff --git a/src/main.js b/src/main.js index eb160008..752a78f2 100644 --- a/src/main.js +++ b/src/main.js @@ -21,6 +21,7 @@ import { handleTree, addBeginAndEndTime, divide, + formatThousands } from '@/utils/ruoyi'; import Pagination from '@/components/Pagination'; // 自定义表格工具扩展 @@ -45,6 +46,7 @@ Vue.prototype.resetForm = resetForm; Vue.prototype.getDictDatas = getDictDatas; Vue.prototype.getDictDatas2 = getDictDatas2; Vue.prototype.getDictDataLabel = getDictDataLabel; +Vue.prototype.formatThousands = formatThousands; Vue.prototype.DICT_TYPE = DICT_TYPE; Vue.prototype.handleTree = handleTree; Vue.prototype.addBeginAndEndTime = addBeginAndEndTime; diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index 7df60e4b..8e45a986 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -295,3 +295,15 @@ export function getPath(path) { } return Math.floor(divisor/dividend*100)/100; } + +// 通用千分位格式化函数 +export function formatThousands(value) { + if (value === null || value === undefined) return '0' + + // 清理已有逗号并转为数字 + const numValue = Number(String(value).replace(/,/g, '')) + if (isNaN(numValue)) return '0' + + // 支持小数处理 + return numValue.toLocaleString('en-US') +} \ No newline at end of file diff --git a/src/views/base/dataBoard/components/CenterBottomL.vue b/src/views/base/dataBoard/components/CenterBottomL.vue index d09e7ceb..9b026dbd 100644 --- a/src/views/base/dataBoard/components/CenterBottomL.vue +++ b/src/views/base/dataBoard/components/CenterBottomL.vue @@ -7,18 +7,20 @@

总投入片数 - -18% - + {{monthData?.inputNumChange || '-'}}% + +

-

261,938,984

+

{{monthData?.inputNum ? formatThousands(monthData.inputNum) : '-'}}

总生产片数 - +18% - + {{monthData?.outputNumChange || '-'}}% + +

-

82,261,938,984

+

{{monthData?.outputNum ? formatThousands(monthData.outputNum) : '-'}}

@@ -26,8 +28,25 @@