diff --git a/src/api/report/total.js b/src/api/report/total.js index 04a8dc5..9953f18 100644 --- a/src/api/report/total.js +++ b/src/api/report/total.js @@ -2,7 +2,8 @@ import request from '@/utils/request' export function totalRpt(params) { return request({ - url: '/api/admin/chart/total', + //url: '/api/admin/chart/total', + url: '/api/admin/chart/total-v2', method: 'get', params: params }) diff --git a/src/views/dashboard/components/PanelGroup copy 1.vue b/src/views/dashboard/components/PanelGroup copy 1.vue new file mode 100644 index 0000000..ca79620 --- /dev/null +++ b/src/views/dashboard/components/PanelGroup copy 1.vue @@ -0,0 +1,361 @@ + + + + + diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index ca79620..f4f1683 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -3,94 +3,141 @@
- 预约参观人数 + 预约参观
+
总预约人数/总入场人数
- +
-
总人数
+
团队:{{totaldata.visit_list.total.appointment.team}}
+
个人:{{totaldata.visit_list.total.appointment.person}}
- +
-
今日
+
团队:{{totaldata.visit_list.total.enter.team}}
+
个人:{{totaldata.visit_list.total.enter.person}}
-
+
+ 核销比:{{toCaculateper(totaldata.visit_list.total.enter.total,totaldata.visit_list.total.appointment.total)}} +
+ +
今日预约人数/今日入场人数
+
+
+
+ +
+
团队:{{totaldata.visit_list.today.appointment.team}}
+
个人:{{totaldata.visit_list.today.appointment.person}}
+
+
+
+
+ +
+
团队:{{totaldata.visit_list.today.enter.team}}
+
个人:{{totaldata.visit_list.today.enter.person}}
+
+
+
+ 核销比:{{toCaculateper(totaldata.visit_list.today.enter.total,totaldata.visit_list.today.appointment.total)}} +
- 入场参观人次 + 活动参加
+ +
总报名人数/总核销人数
- +
-
总人数
+
团队:{{totaldata.activity_list.total.appointment.team}}
+
个人:{{totaldata.activity_list.total.appointment.person}}
- - +
-
今日
+
团队:{{totaldata.activity_list.total.enter.team}}
+
个人:{{totaldata.activity_list.total.enter.person}}
-
当日核销比:{{totaldata.visit_enter.per}}
+
+ 核销比:{{toCaculateper(totaldata.activity_list.total.enter.total,totaldata.activity_list.total.appointment.total)}} +
+ +
今日报名人数/今日核销人数
+
+
+
+ +
+
团队:{{totaldata.activity_list.today.appointment.team}}
+
个人:{{totaldata.activity_list.today.appointment.person}}
+
+
+
+
+ +
+
团队:{{totaldata.activity_list.today.enter.team}}
+
个人:{{totaldata.activity_list.today.enter.person}}
+
+
+
-
+
- 预约活动人次 + 停车预约
+
总预约数/总核销数
- +
-
总人数
+
+
- +
-
今日
-
- - -
-
-
- 参加活动人次 -
+
核销比:{{toCaculateper(totaldata.park_list.total.enter,totaldata.park_list.total.appointment)}}
+
今日预约数/今日核销数
- +
-
总人数
+
+
- +
-
今日
-
核销比:{{totaldata.activity_enter.per}}
+
核销比:{{toCaculateper(totaldata.park_list.today.enter,totaldata.park_list.today.appointment)}}
@@ -109,23 +156,67 @@ totaldata: { type: Object, default: { - "visit_total": { - "total": 0, - "today": 0 + "visit_list": { + "total": { + "appointment": { + "team": 0, + "person": 0, + "total": 0 + }, + "enter": { + "team": 0, + "person": 0, + "total": 0 + } + }, + "today": { + "appointment": { + "team": 0, + "person": 0, + "total": 0 + }, + "enter": { + "team": 0, + "person": 0, + "total": 0 + } + } }, - "visit_enter": { - "total": 0, - "today": 0, - "per": 0 + "activity_list": { + "total": { + "appointment": { + "team": 0, + "person": 126, + "total": 126 + }, + "enter": { + "team": 0, + "person": 44, + "total": 44 + } + }, + "today": { + "appointment": { + "team": 0, + "person": 0, + "total": 0 + }, + "enter": { + "team": 0, + "person": 0, + "total": 0 + } + } }, - "activity_total": { - "total": 0, - "today": 0 - }, - "activity_enter": { - "total": 0, - "today": 0, - "per": 0 + "park_list": { + "total": { + "appointment": 0, + "enter": 0 + }, + "today": { + "appointment": 0, + "enter": 0 + } } } } @@ -136,6 +227,9 @@ methods: { handleRoute(type) { this.$emit('handleRoute', type) + }, + toCaculateper(f1,f2){ + return ((f1 / (f2 == 0 ? 1 : f2)) * 100).toFixed(2) + "%" } } } @@ -162,7 +256,7 @@ .box { position: relative; - width: 24%; + width: 33%; margin-left: 0.5%; margin-right: 0.5%; margin-bottom: 2.375rem; @@ -172,11 +266,22 @@ padding: 1.25rem; opacity: 0.8; + .boxcontentsubtitle { + color: #FFFFFF; + text-align: center; + display: flex; + justify-content: center; + font-size: 1.0625rem; + margin-top: 1.25rem; + } + .boxfooter { font-size: 1.0625rem; font-family: Source Han Sans CN; font-weight: 400; color: #FFFFFF; + display: flex; + justify-content: center; } .boxtitle { @@ -208,7 +313,7 @@ font-weight: 400; color: #FFFFFF; text-align: center; - min-width: 30%; + min-width: 40%; .boxcontentitem-big { font-size: 2.625rem; diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 17f3916..a2cb9f6 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -168,10 +168,6 @@ load() { // this.showData = true; totalRpt().then(res => { - res.visit_enter.per = ((res.visit_enter.today / (res.visit_total.today == 0 ? 1 : res.visit_total - .today)) * 100).toFixed(2) + "%" - res.activity_enter.per = ((res.activity_enter.total / (res.activity_total.total == 0 ? 1 : res.activity_total - .total)) * 100).toFixed(2) + "%" this.totaldata = res; }) diff --git a/vue.config.js b/vue.config.js index 2c8688f..ce67624 100644 --- a/vue.config.js +++ b/vue.config.js @@ -46,9 +46,9 @@ module.exports = { //before: require('./mock/mock-server.js'), proxy: { [process.env.VUE_APP_BASE_API]: { - //target: 'https://leyiyuyue.szgmbwg.org.cn/', + target: 'https://leyiyuyue.szgmbwg.org.cn/', // target: 'https://dangxingjiaoyujidi.langye.net/', - target: 'http://leyitest.ali251.langye.net/', + //target: 'http://leyitest.ali251.langye.net/', changeOrigin: true, //配置跨域 pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''