diff --git a/src/utils/index.js b/src/utils/index.js index d1ddc1d..0908660 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -131,6 +131,9 @@ export function debounce(fn, delay = 500) { // 金额分隔 export function moneyFormatter(money, precision = 2) { + if(!money){ + return 0 + } if (Number(money) === 0) { return 0 } diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index c5d31f0..7c07f52 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -970,7 +970,14 @@ export default { select: { year: '' }, - statistic: '', + statistic: { + progress:{ + money_total:0, + money_total_1:0, + money_total_2:0, + use_money_total:0 + } + }, department_id: [], userIds: [], list: [], @@ -1274,9 +1281,9 @@ export default { // this.split = Array.from({ length: Math.ceil(this.typeList/2) },() => 0.5) }, getPer(row) { - const m2 = row.money_total_2 - const m1 = row.money_total_1 - const m3 = row.use_money_total + const m2 = row.money_total_2?row.money_total_2:0 + const m1 = row.money_total_1?row.money_total_1:0 + const m3 = row.use_money_total?row.use_money_total:0 let per = 0 if (m2 != 0) { diff --git a/vue.config.js b/vue.config.js index 3ee03fa..e9eea1d 100644 --- a/vue.config.js +++ b/vue.config.js @@ -26,7 +26,7 @@ module.exports = { * Detail: https://cli.vuejs.org/config/#publicpath */ publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin', - outputDir: '/Users/mac/Documents/朗业/2025/h-苏州河道处/h-河道合同/contract-business-service/public/admin_test', + outputDir: '/Users/mac/Documents/朗业/2025/h-苏州河道处/h-河道合同/contract-business-service/public/admin', assetsDir: 'static', lintOnSave: process.env.NODE_ENV === 'development', productionSourceMap: false,