From 5d4d8a0512b05e6371d8fccecad929daddebf279 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Thu, 29 Feb 2024 14:34:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 3 --- .env.staging | 6 +++++- src/views/dashboard/index.vue | 38 +++++++++++++++++++++++++++++++---- vue.config.js | 8 ++++++-- 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/.env.production b/.env.production index 2d81aaf..788deaf 100644 --- a/.env.production +++ b/.env.production @@ -6,6 +6,3 @@ VUE_APP_DOMIAN=http://192.168.60.99:9003/ VUE_APP_BASE_API = '' VUE_APP_OUT_URL = http://192.168.60.18:2021 VUE_APP_UPLOAD=http://192.168.60.99:9003/api/admin/upload-file -#VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/ -#VUE_APP_BASE_API = '' -#VUE_APP_UPLOAD=http://hdcontract.ali251.langye.net/api/admin/upload-file diff --git a/.env.staging b/.env.staging index a8793a0..a5121e9 100644 --- a/.env.staging +++ b/.env.staging @@ -4,5 +4,9 @@ NODE_ENV = production ENV = 'staging' # base api -VUE_APP_BASE_API = '/stage-api' +VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/ +VUE_APP_BASE_API = '' +VUE_APP_UPLOAD=http://hdcontract.ali251.langye.net/api/admin/upload-file + +VUE_APP_OUT_URL = http://suzhouhedaooa.langye.net diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index f35074d..68763c7 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -698,6 +698,8 @@ export default { { - console.log(response); this.user = response; this.isShowNoPay =!(this.user.username=="zhongaicheng"); }) @@ -1353,6 +1368,24 @@ export default { }, methods: { //合计 + summaryDetail (param) { + const { + columns, + data + } = param + return columns.map((column, index) => { + if (column.property === 'name') { + return '合计合同金额' + } + if (column.property === 'money') { + return `¥ ${data.reduce((pre,cur) => (pre + Number(cur.money)),0).toFixed(2)}`.replace( + /\B(?=(\d{3})+(?!\d))/g, + "," + ); + } + return '' + }) + }, summary(param) { this.$nextTick(() => { this.$refs['xyTable'].$children[0].doLayout() @@ -1362,7 +1395,6 @@ export default { data } = param const sums = [] - console.log(columns) columns.forEach((column, index) => { if (index === 1) { sums[index] = '总计' @@ -1454,7 +1486,6 @@ export default { }, async getStatistic() { const res = await statistic(this.select); - console.log(res); this.statistic = res; if (res.typeList) { var arr = []; @@ -1472,7 +1503,6 @@ export default { this.typeList = arr; } //this.split = Array.from({ length: Math.ceil(this.typeList/2) },() => 0.5) - console.log(123, this.typeList); }, getPer(row) { let m2 = row.money_total_2; diff --git a/vue.config.js b/vue.config.js index 7a8e1e3..d9ada8c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -25,8 +25,8 @@ module.exports = { * In most cases please use '/' !!! * Detail: https://cli.vuejs.org/config/#publicpath */ - publicPath: '/admin/', - outputDir: '/Users/mac/Documents/Work/s-苏州河道/code/contract-business-service/public/admin', + publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin', + outputDir: './dist', assetsDir: 'static', lintOnSave: process.env.NODE_ENV === 'development', productionSourceMap: false, @@ -70,6 +70,10 @@ module.exports = { alias: { '@': resolve('src') } + }, + output: { + filename: `js/[name]-test-${new Date().getTime()}.js`, + chunkFilename: `js/[name]-test-${new Date().getTime()}.js` } }, chainWebpack(config) {