首页统计

master
xy 2 years ago
parent f452872342
commit 5d4d8a0512

@ -6,6 +6,3 @@ VUE_APP_DOMIAN=http://192.168.60.99:9003/
VUE_APP_BASE_API = '' VUE_APP_BASE_API = ''
VUE_APP_OUT_URL = http://192.168.60.18:2021 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_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

@ -4,5 +4,9 @@ NODE_ENV = production
ENV = 'staging' ENV = 'staging'
# base api # 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

@ -698,6 +698,8 @@ export default {
<xy-table <xy-table
list={row.government.huowu} list={row.government.huowu}
height={300} height={300}
show-summary={true}
summary-method={this.summaryDetail}
table-item={[ table-item={[
{ {
prop: "name", prop: "name",
@ -759,6 +761,8 @@ export default {
<xy-table <xy-table
list={row.government.fuwu} list={row.government.fuwu}
height={300} height={300}
show-summary={true}
summary-method={this.summaryDetail}
table-item={[ table-item={[
{ {
prop: "name", prop: "name",
@ -821,6 +825,8 @@ export default {
<xy-table <xy-table
list={row.government.gongchen} list={row.government.gongchen}
height={300} height={300}
show-summary={true}
summary-method={this.summaryDetail}
table-item={[ table-item={[
{ {
prop: "name", prop: "name",
@ -888,6 +894,8 @@ export default {
<xy-table <xy-table
list={row.small.huowu} list={row.small.huowu}
height={300} height={300}
show-summary={true}
summary-method={this.summaryDetail}
table-item={[ table-item={[
{ {
prop: "name", prop: "name",
@ -950,6 +958,8 @@ export default {
<xy-table <xy-table
list={row.small.fuwu} list={row.small.fuwu}
height={300} height={300}
show-summary={true}
summary-method={this.summaryDetail}
table-item={[ table-item={[
{ {
prop: "name", prop: "name",
@ -1012,6 +1022,8 @@ export default {
<xy-table <xy-table
list={row.small.gongchen} list={row.small.gongchen}
height={300} height={300}
show-summary={true}
summary-method={this.summaryDetail}
table-item={[ table-item={[
{ {
prop: "name", prop: "name",
@ -1075,6 +1087,8 @@ export default {
<xy-table <xy-table
list={row.month_total} list={row.month_total}
height={300} height={300}
show-summary={true}
summary-method={this.summaryDetail}
table-item={[ table-item={[
{ {
prop: "name", prop: "name",
@ -1136,6 +1150,8 @@ export default {
<xy-table <xy-table
list={row.year_total} list={row.year_total}
height={300} height={300}
show-summary={true}
summary-method={this.summaryDetail}
table-item={[ table-item={[
{ {
prop: "name", prop: "name",
@ -1345,7 +1361,6 @@ export default {
getInfo() getInfo()
.then((response) => { .then((response) => {
console.log(response);
this.user = response; this.user = response;
this.isShowNoPay =!(this.user.username=="zhongaicheng"); this.isShowNoPay =!(this.user.username=="zhongaicheng");
}) })
@ -1353,6 +1368,24 @@ export default {
}, },
methods: { 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) { summary(param) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['xyTable'].$children[0].doLayout() this.$refs['xyTable'].$children[0].doLayout()
@ -1362,7 +1395,6 @@ export default {
data data
} = param } = param
const sums = [] const sums = []
console.log(columns)
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 1) { if (index === 1) {
sums[index] = '总计' sums[index] = '总计'
@ -1454,7 +1486,6 @@ export default {
}, },
async getStatistic() { async getStatistic() {
const res = await statistic(this.select); const res = await statistic(this.select);
console.log(res);
this.statistic = res; this.statistic = res;
if (res.typeList) { if (res.typeList) {
var arr = []; var arr = [];
@ -1472,7 +1503,6 @@ export default {
this.typeList = arr; this.typeList = arr;
} }
//this.split = Array.from({ length: Math.ceil(this.typeList/2) },() => 0.5) //this.split = Array.from({ length: Math.ceil(this.typeList/2) },() => 0.5)
console.log(123, this.typeList);
}, },
getPer(row) { getPer(row) {
let m2 = row.money_total_2; let m2 = row.money_total_2;

@ -25,8 +25,8 @@ module.exports = {
* In most cases please use '/' !!! * In most cases please use '/' !!!
* Detail: https://cli.vuejs.org/config/#publicpath * Detail: https://cli.vuejs.org/config/#publicpath
*/ */
publicPath: '/admin/', publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/Work/s-苏州河道/code/contract-business-service/public/admin', outputDir: './dist',
assetsDir: 'static', assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development', lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false, productionSourceMap: false,
@ -70,6 +70,10 @@ module.exports = {
alias: { alias: {
'@': resolve('src') '@': resolve('src')
} }
},
output: {
filename: `js/[name]-test-${new Date().getTime()}.js`,
chunkFilename: `js/[name]-test-${new Date().getTime()}.js`
} }
}, },
chainWebpack(config) { chainWebpack(config) {

Loading…
Cancel
Save