From d3c376f9aaf578e3870d9934fd30e902792f9c5d Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期五, 06 三月 2026 10:38:27 +0800
Subject: [PATCH] 海康电表维护
---
admin/src/api/workbench/index.js | 4
admin/src/views/login.vue | 5
server/visits/dmvisit_admin/src/main/resources/bootstrap.yml | 2
admin/src/views/business/admissionStatistics.vue | 872 +++++++++++-----------
server/system_gateway/src/main/resources/bootstrap.yml | 2
admin/src/views/business/carStatistics.vue | 1349 +++++++++++++++++-----------------
admin/public/index.html | 6
admin/src/store/index.js | 23
8 files changed, 1,137 insertions(+), 1,126 deletions(-)
diff --git a/admin/public/index.html b/admin/public/index.html
index 8ed5c0a..ad0417d 100644
--- a/admin/public/index.html
+++ b/admin/public/index.html
@@ -8,9 +8,9 @@
<title>鏅烘収鍥尯瀹夋秷涓�浣撳寲绯荤粺</title>
</head>
<body>
-<noscript>
- <strong>We're sorry but 鏅烘収鍥尯瀹夋秷涓�浣撳寲绯荤粺 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
-</noscript>
+ <noscript>
+ <strong>We're sorry but 鏅烘収鍥尯瀹夋秷涓�浣撳寲绯荤粺 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+ </noscript>
<div id="app"></div>
</body>
</html>
diff --git a/admin/src/api/workbench/index.js b/admin/src/api/workbench/index.js
index c0b3f7e..2340d64 100644
--- a/admin/src/api/workbench/index.js
+++ b/admin/src/api/workbench/index.js
@@ -30,5 +30,7 @@
}
// pc宸ヤ綔鍙�
export function getWorkbenchData (data) {
- return request.get('/visitsAdmin/cloudService/business/staging/pCWorkPlatformData', data)
+ return request.get('/visitsAdmin/cloudService/business/staging/pCWorkPlatformData', {
+ params: {...data }
+ })
}
diff --git a/admin/src/store/index.js b/admin/src/store/index.js
index f76eee9..f2fb2f1 100644
--- a/admin/src/store/index.js
+++ b/admin/src/store/index.js
@@ -1,11 +1,13 @@
import Vue from 'vue'
import Vuex from 'vuex'
+import router from '../router'
Vue.use(Vuex)
const state = {
// 鐧诲綍鐢ㄦ埛淇℃伅
userInfo: null,
tableHeightNew: 300,
+ sysConfig: { title: '', subtitle: '' },
primaryColor: '#2080f7',
// 棣栭〉
homePage: null,
@@ -27,10 +29,21 @@
// tags鏁扮粍
tags: [],
// tagsview鏍囩鏄剧ず闅愯棌
- isCollapse: false
+ isCollapse: false,
+ // 椤堕儴鑿滃崟绱㈠紩
+ currentIndex: 0
}
const mutations = {
+ // 璁剧疆椤堕儴鑿滃崟绱㈠紩
+ setCurrentIndex (state, index) {
+ console.log('璁剧疆椤堕儴鑿滃崟绱㈠紩', index)
+ state.currentIndex = index
+ },
+ setSysconfig (state, config) {
+ state.sysConfig = { title: config.title || '', subtitle: config.subtitle || '' }
+ document.title = state.sysConfig.title+ state.sysConfig.subtitle
+ },
// 鍒囨崲鑿滃崟鐘舵��
switchCollapseMenu (state, value) {
if (value != null) {
@@ -60,8 +73,8 @@
},
// 璁剧疆棣栭〉璺敱淇℃伅
setTopMenuCurrent (state, current) {
- console.log("setTopMenuCurrent",current)
- if(current.id !== state.topMenuCurrent.id){
+ console.log('setTopMenuCurrent', current)
+ if (current.id !== state.topMenuCurrent.id) {
state.topMenuList.list.forEach(item => {
console.log(item.id, item.id)
if (current.id == item.id) {
@@ -73,7 +86,7 @@
},
// 閲嶇疆鑿滃崟
resetMenus: (state) => {
- state.topMenuId=null;
+ state.topMenuId = null
state.menuData.list = []
},
// tags
@@ -82,7 +95,7 @@
// findindex鎵捐鏍囷紝寰幆鍒ゆ柇涓�涓嬶紝濡傛灉绛変簬閭d箞灏变唬琛ㄦ湁鐩稿悓鐨勶紝灏变笉蹇呮坊鍔狅紝濡傛灉鎵句笉鍒伴偅灏辨槸-1.灏辨坊鍔�
// state.tags = [{ ...val, keepAlive: false }]
const result = state.tags.findIndex(item => item.index === val.index)
- if (result === -1) {
+ if (result === -1) {
state.tags.push({ ...val, keepAlive: false })
} else {
state.tags[result] = { ...val, keepAlive: false }
diff --git a/admin/src/views/business/admissionStatistics.vue b/admin/src/views/business/admissionStatistics.vue
index 72a9752..36a9199 100644
--- a/admin/src/views/business/admissionStatistics.vue
+++ b/admin/src/views/business/admissionStatistics.vue
@@ -1,123 +1,123 @@
<template>
- <div class="main_app1" v-if="info">
- <div class="main_head">
- <div class="main_head_title">
- <span>鍏ュ洯浜哄憳缁熻鎬昏</span>
- <el-radio-group v-model="isGroupBy" @change="getData(), getRataLists(), getReportLists()">
- <el-radio-button :label="0">鎸変汉娆$粺璁�</el-radio-button>
- <el-radio-button :label="1">鎸変汉鍛樼粺璁�</el-radio-button>
- </el-radio-group>
- </div>
- <div class="main_head_bottom">
- <div class="main_head_item blue">
- <span>{{info.todayTotal}}</span>
- <span>浠婃棩</span>
- </div>
- <div class="main_head_item red">
- <span>{{info.yesterdayTotal}}</span>
- <span>鏄ㄦ棩</span>
- </div>
- <div class="main_head_item yellow">
- <span>{{info.weekTotal}}</span>
- <span>鏈懆</span>
- </div>
- <div class="main_head_item orange">
- <span>{{info.monthTotal}}</span>
- <span>鏈湀</span>
- </div>
- <div class="main_head_item darkBlue">
- <span>{{info.yearTotal}}</span>
- <span>鏈勾</span>
- </div>
- </div>
+ <div class="main_app1" v-if="info">
+ <div class="main_head">
+ <div class="main_head_title">
+ <span>鍏ュ洯浜哄憳缁熻鎬昏</span>
+ <el-radio-group v-model="isGroupBy" @change="getData(), getRataLists(), getReportLists()">
+ <el-radio-button :label="0">鎸変汉娆$粺璁�</el-radio-button>
+ <el-radio-button :label="1">鎸変汉鍛樼粺璁�</el-radio-button>
+ </el-radio-group>
+ </div>
+ <div class="main_head_bottom">
+ <div class="main_head_item blue">
+ <span>{{info.todayTotal}}</span>
+ <span>浠婃棩</span>
</div>
- <div class="main_content">
- <div class="type_wrap">
- <div class="title">鍏ㄥ勾鍏ュ洯浜哄憳瓒嬪娍</div>
- <div class="echart1" ref="typeRef" v-show="info.cumulativeDataList"></div>
- <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!info.cumulativeDataList">
- <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt="">
- </div>
- </div>
- <div class="dept_wrap">
- <div class="title">
- <span>浜哄憳鍒嗙被缁熻</span>
- <el-radio-group style="margin-left: 43px;" v-model="dateType" @change="changeDateType">
- <el-radio-button label="month">鏈堝害</el-radio-button>
- <el-radio-button label="year">骞村害</el-radio-button>
- </el-radio-group>
- <el-date-picker
- v-model="value"
- :type="dateType"
- :clearable="false"
- @change="getRataLists()"
- :value-format="dateType === 'month' ? 'yyyy-MM' : 'yyyy'"
- style="margin-left: 10px; width: 130px;"
- placeholder="璇烽�夋嫨">
- </el-date-picker>
- </div>
- <div id="echart2" v-show="listZB.length > 0"></div>
- <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="listZB.length === 0">
- <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt="">
- </div>
- </div>
+ <div class="main_head_item red">
+ <span>{{info.yesterdayTotal}}</span>
+ <span>鏄ㄦ棩</span>
</div>
- <div class="main_table">
- <div class="main_table_list">
- <div class="title" style="display: flex; align-items: center; justify-content: space-between;">
- <div style="display: flex; align-items: center;">
- <span>鍏ュ洯浜哄憳缁熻琛�</span>
- <el-radio-group style="margin-left: 43px;" v-model="radio" @change="changeBB">
- <el-radio-button label="month">鏈堝害</el-radio-button>
- <el-radio-button label="year">骞村害</el-radio-button>
- </el-radio-group>
- <el-date-picker
- v-model="date1"
- :type="radio"
- :clearable="false"
- @change="getReportLists()"
- :value-format="radio === 'month' ? 'yyyy-MM' : 'yyyy'"
- style="margin-left: 10px; width: 130px;"
- placeholder="璇烽�夋嫨">
- </el-date-picker>
- </div>
- <el-button type="primary" icon="el-icon-upload2" style="margin-left: 20px;" @click="daochu">瀵煎嚭</el-button>
- </div>
- <template v-if="column.length > 0">
- <el-table
- style="width: 100%; margin-top: 15px;"
- :data="list"
- :header-row-style="{ backgroundColor: '#F7F7F7' }"
- border
- >
- <el-table-column :prop="item" :label="item" align="center" :fixed="index === 0 ? true : index === column.length - 1 ? 'right' : false" v-for="(item, index) in column" :key="index"></el-table-column>
- </el-table>
- </template>
- <div class="list_wu" v-else>鏆傛棤鏁版嵁</div>
- </div>
- <div class="main_table_list1">
- <div class="title">
- <span>鏈勾浜哄憳绱鍏ュ洯缁熻</span>
- </div>
- <el-table
- style="width: 100%; margin-top: 15px;"
- :data="info.yearSortList"
- :header-row-style="{ backgroundColor: '#F7F7F7' }"
- border
- >
- <el-table-column prop="name" label="浜哄憳鍒嗙被" align="center"></el-table-column>
- <el-table-column prop="total" label="鍏ュ洯娆℃暟" align="center"></el-table-column>
- </el-table>
- </div>
+ <div class="main_head_item yellow">
+ <span>{{info.weekTotal}}</span>
+ <span>鏈懆</span>
</div>
+ <div class="main_head_item orange">
+ <span>{{info.monthTotal}}</span>
+ <span>鏈湀</span>
+ </div>
+ <div class="main_head_item darkBlue">
+ <span>{{info.yearTotal}}</span>
+ <span>鏈勾</span>
+ </div>
+ </div>
</div>
+ <div class="main_content">
+ <div class="type_wrap">
+ <div class="title">鍏ㄥ勾鍏ュ洯浜哄憳瓒嬪娍</div>
+ <div class="echart1" ref="typeRef" v-show="info.cumulativeDataList"></div>
+ <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!info.cumulativeDataList">
+ <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt="">
+ </div>
+ </div>
+ <div class="dept_wrap">
+ <div class="title">
+ <span>浜哄憳鍒嗙被缁熻</span>
+ <el-radio-group style="margin-left: 43px;" v-model="dateType" @change="changeDateType">
+ <el-radio-button label="month">鏈堝害</el-radio-button>
+ <el-radio-button label="year">骞村害</el-radio-button>
+ </el-radio-group>
+ <el-date-picker
+ v-model="value"
+ :type="dateType"
+ :clearable="false"
+ @change="getRataLists()"
+ :value-format="dateType === 'month' ? 'yyyy-MM' : 'yyyy'"
+ style="margin-left: 10px; width: 130px;"
+ placeholder="璇烽�夋嫨">
+ </el-date-picker>
+ </div>
+ <div id="echart2" v-show="listZB.length > 0"></div>
+ <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="listZB.length === 0">
+ <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt="">
+ </div>
+ </div>
+ </div>
+ <div class="main_table">
+ <div class="main_table_list">
+ <div class="title" style="display: flex; align-items: center; justify-content: space-between;">
+ <div style="display: flex; align-items: center;">
+ <span>鍏ュ洯浜哄憳缁熻琛�</span>
+ <el-radio-group style="margin-left: 43px;" v-model="radio" @change="changeBB">
+ <el-radio-button label="month">鏈堝害</el-radio-button>
+ <el-radio-button label="year">骞村害</el-radio-button>
+ </el-radio-group>
+ <el-date-picker
+ v-model="date1"
+ :type="radio"
+ :clearable="false"
+ @change="getReportLists()"
+ :value-format="radio === 'month' ? 'yyyy-MM' : 'yyyy'"
+ style="margin-left: 10px; width: 130px;"
+ placeholder="璇烽�夋嫨">
+ </el-date-picker>
+ </div>
+ <el-button type="primary" icon="el-icon-upload2" style="margin-left: 20px;" @click="daochu">瀵煎嚭</el-button>
+ </div>
+ <template v-if="column.length > 0">
+ <el-table
+ style="width: 100%; margin-top: 15px;"
+ :data="list"
+ header-row-style="background-color: #F7F7F7;"
+ border
+ >
+ <el-table-column :prop="item" :label="item" align="center" :fixed="index === 0 ? true : index === column.length - 1 ? 'right' : false" v-for="(item, index) in column" :key="index"></el-table-column>
+ </el-table>
+ </template>
+ <div class="list_wu" v-else>鏆傛棤鏁版嵁</div>
+ </div>
+ <div class="main_table_list1">
+ <div class="title">
+ <span>鏈勾浜哄憳绱鍏ュ洯缁熻</span>
+ </div>
+ <el-table
+ style="width: 100%; margin-top: 15px;"
+ :data="info.yearSortList"
+ header-row-style="background-color: #F7F7F7;"
+ border
+ >
+ <el-table-column prop="name" label="浜哄憳鍒嗙被" align="center"></el-table-column>
+ <el-table-column prop="total" label="鍏ュ洯娆℃暟" align="center"></el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </div>
</template>
<script>
import * as echarts from 'echarts'
import { getInParkUserData, getRataList, getReportList, reportExportExcel } from '@/api/business'
export default {
- data () {
+ data() {
return {
info: null,
isGroupBy: 0,
@@ -132,10 +132,10 @@
list: []
}
},
- mounted () {
- var now = new Date()
- var year = now.getFullYear()
- var month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`
+ mounted() {
+ var now = new Date();
+ var year = now.getFullYear();
+ var month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
this.value = `${year}-${month}`
this.date1 = `${year}-${month}`
@@ -145,79 +145,80 @@
},
methods: {
// 瀵煎嚭
- daochu () {
+ daochu() {
reportExportExcel({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 1 }).then(res => {
this.download(res)
})
},
- changeBB () {
+ changeBB() {
if (this.radio === 'month') {
- const now = new Date()
- const year = now.getFullYear()
- const month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`
+ let now = new Date();
+ let year = now.getFullYear();
+ let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
this.date1 = `${year}-${month}`
} else {
- const now = new Date()
- const year = now.getFullYear()
+ let now = new Date();
+ let year = now.getFullYear();
this.date1 = `${year}`
}
this.getReportLists()
},
// 鍏ュ洯杞﹁締缁熻琛�
- getReportLists () {
+ getReportLists() {
getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 1 })
- .then(res => {
- if (!res || res.length === 0) {
- this.column = []
- this.list = []
- return
- }
- this.column = res[0]
- this.list = res.slice(1).map(row => {
- const obj = {}
- this.column.forEach((header, index) => {
- obj[header] = row[index]
- })
- return obj
+ .then(res => {
+ if (!res || res.length === 0) {
+ this.column = []
+ this.list = []
+ return
+ }
+ this.column = res[0]
+
+ this.list = res.slice(1).map(row => {
+ const obj = {};
+ this.column.forEach((header, index) => {
+ obj[header] = row[index];
+ });
+ return obj;
+ });
+ // if (res.length === 0) {
+ // this.column = []
+ // this.list = []
+ // return
+ // }
+ //
+ // this.column = res[0]
+ // this.list = res.slice(1, res.length);
})
- // if (res.length === 0) {
- // this.column = []
- // this.list = []
- // return
- // }
- //
- // this.column = res[0]
- // this.list = res.slice(1, res.length);
- })
},
- changeDateType () {
+ changeDateType() {
if (this.dateType === 'month') {
- const now = new Date()
- const year = now.getFullYear()
- const month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`
+ let now = new Date();
+ let year = now.getFullYear();
+ let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
this.value = `${year}-${month}`
} else {
- const now = new Date()
- const year = now.getFullYear()
+ let now = new Date();
+ let year = now.getFullYear();
this.value = `${year}`
}
this.getRataLists()
},
// 杞﹁締鍒嗙被缁熻
- getRataLists () {
+ getRataLists() {
getRataList({ dateStr: this.value, isGroupBy: this.isGroupBy, type: 1 })
- .then(res => {
- this.listZB = res
- // this.$nextTick(() => {
- // this.initDept()
- // })
- setTimeout(() => {
- this.initDept()
- }, 1000)
- })
+ .then(res => {
+ this.listZB = res
+ // this.$nextTick(() => {
+ // this.initDept()
+ // })
+ setTimeout(() => {
+ this.initDept()
+ }, 1000)
+ })
},
// 鍩虹鏁版嵁
- getData () {
+ getData() {
getInParkUserData({ isGroupBy: this.isGroupBy, type: 1 }).then(res => {
this.info = res
// this.$nextTick(() => {
@@ -229,15 +230,15 @@
})
},
// 鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍
- initType () {
+ initType() {
if (!this.info.cumulativeDataList) return
const myChart = echarts.init(document.querySelector('.echart1'))
- const names = this.info.cumulativeDataList.map(item => item.name)
- const datas = this.info.cumulativeDataList.map(item => item.total)
+ let names = this.info.cumulativeDataList.map(item => item.name)
+ let datas = this.info.cumulativeDataList.map(item => item.total)
- const option = {
+ let option = {
grid: {
left: '0%',
right: '5%',
@@ -263,7 +264,7 @@
axisLabel: {
formatter: function (value) {
// 鍥涜垗浜斿叆鍒版渶杩戠殑鏁存暟
- return Math.round(value)
+ return Math.round(value);
}
}
},
@@ -335,30 +336,30 @@
})
},
// 杞﹁締鍒嗙被缁熻
- initDept () {
+ initDept() {
if (!this.listZB) return
const dom = document.getElementById('echart2')
console.log(dom)
const myChart = echarts.init(dom)
- const data = this.listZB.map(item => {
+ let data = this.listZB.map(item => {
return {
value: item.total,
name: item.name
}
})
- const option = {
+ let option = {
tooltip: {
- trigger: 'item'
+ trigger: 'item',
},
legend: {
show: false,
orient: 'vertical',
left: 'left'
},
- series: [
+ series : [
{
name: '璁块棶鏉ユ簮',
type: 'pie',
@@ -366,11 +367,11 @@
labelLine: {
normal: {
length: 30,
- length2: 70
+ length2: 70,
}
},
label: {
- formatter: '{a|{b}} {d}%',
+ formatter: "{a|{b}} {d}%",
rich: {
a: {
color: '#333333',
@@ -378,7 +379,7 @@
fontWeight: 500
}
},
- padding: [0, -50, 20, -100]
+ padding: [0,-50,20,-100]
},
data: data
}
@@ -389,10 +390,10 @@
myChart.resize()
})
},
- initDept3 () {
+ initDept3() {
const myChart = echarts.init(document.querySelector('#echart3'))
- const option = {
+ let option = {
grid: {
left: '5%',
right: '10%',
@@ -424,265 +425,266 @@
</script>
<style lang="scss" scoped>
- .main_app1 {
- width: 100%;
- height: calc(100% - 44px);
- overflow-y: auto;
- overflow-x: hidden;
- padding: 15px;
- box-sizing: border-box;
- background-color: #F4F7FC;
- .main_head {
- width: 100%;
- display: flex;
- align-items: center;
- flex-direction: column;
- margin-bottom: 10px;
- background-color: #ffffff;
- padding: 20px;
- box-sizing: border-box;
- .main_head_title {
- width: 100%;
- display: flex;
- align-items: center;
- margin-bottom: 20px;
- span {
- font-weight: 500;
- font-size: 18px;
- color: #222222;
- margin-right: 30px;
- }
- }
- .main_head_bottom {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .blue {
- border-left: 8px solid #12BB8B;
- }
- .red {
- border-left: 8px solid #F6CF46;
- }
- .yellow {
- border-left: 8px solid #5DC9FB;
- }
- .orange {
- border-left: 8px solid #FF9E56;
- }
- .darkBlue {
- border-left: 8px solid #6B6EFF;
- }
- .main_head_item {
- width: 19%;
- height: 112px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- border-radius: 5px;
- background-color: #F4F7FC;
- span {
- &:nth-child(1) {
- font-weight: 600;
- font-size: 30px;
- color: #222222;
- }
- &:nth-child(2) {
- font-weight: 400;
- font-size: 14px;
- color: #222222;
- }
- }
- }
- }
- }
-
- .main_table {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- margin-top: 10px;
- .main_table_list {
- background-color: #ffffff;
- padding: 20px;
- box-sizing: border-box;
- width: 69%;
- .title {
- display: flex;
- align-items: center;
- span {
- font-weight: 500;
- font-size: 18px;
- color: #222222;
- }
- }
- .list_wu {
- width: 100%;
- height: 100px;
- line-height: 100px;
- text-align: center;
- font-size: 16px;
- color: #222222;
- }
- .list_head {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- background-color: #F7F7F7;
- border-left: 1px solid #DFE2E8;
- border-top: 1px solid #DFE2E8;
- margin-top: 15px;
- .list_head_item {
- flex: 1;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 13px;
- color: #222222;
- font-weight: 500;
- border-right: 1px solid #DFE2E8;
- }
- }
- .table_box {
- width: 100%;
- border-bottom: 1px solid #DFE2E8;
- .list_content {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- border-left: 1px solid #DFE2E8;
- border-top: 1px solid #DFE2E8;
- .list_head_item {
- flex: 1;
- height: 100%;
- display: flex;
- border-right: 1px solid #DFE2E8;
- align-items: center;
- justify-content: center;
- font-size: 13px;
- color: #222222;
- }
- }
- }
- }
- .main_table_list1 {
- margin-left: 10px;
- width: 30%;
- padding: 20px;
- box-sizing: border-box;
- flex-shrink: 0;
- background-color: #ffffff;
- .title {
- font-weight: 500;
- font-size: 18px;
- color: #222222;
- }
- .list_wu {
- width: 100%;
- height: 100px;
- line-height: 100px;
- text-align: center;
- font-size: 16px;
- color: #222222;
- }
- .list_head {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- background-color: #F7F7F7;
- border-left: 1px solid #DFE2E8;
- border-top: 1px solid #DFE2E8;
- margin-top: 15px;
- .list_head_item {
- flex: 1.8;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 13px;
- color: #222222;
- font-weight: 500;
- border-right: 1px solid #DFE2E8;
- &:last-child {
- flex: 1;
- }
- }
- }
- .table_box {
- width: 100%;
- border-bottom: 1px solid #DFE2E8;
- .list_content {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- border-left: 1px solid #DFE2E8;
- border-top: 1px solid #DFE2E8;
- .list_head_item {
- flex: 1.8;
- height: 100%;
- display: flex;
- align-items: center;
- border-right: 1px solid #DFE2E8;
- justify-content: center;
- text-align: center;
- font-size: 13px;
- color: #222222;
- &:last-child {
- flex: 1;
- }
- }
- }
- }
- }
- }
-
- .main_content {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 350px;
-
- .title {
- font-weight: 500;
- font-size: 18px;
- color: #222222;
- }
-
- .type_wrap {
- flex: 1;
- height: 100%;
- background-color: #ffffff;
- padding: 20px;
- box-sizing: border-box;
- /*border-right: 12px solid #f7f7f7;*/
-
- .echart1 {
- width: 100%;
- height: 100%;
- margin-top: 18px;
- }
- }
-
- .dept_wrap {
- width: 520px;
- flex-shrink: 0;
- height: 100%;
- background-color: #ffffff;
- padding: 20px;
- box-sizing: border-box;
- margin-left: 10px;
- #echart2 {
- width: 100%;
- height: 100%;
- }
- }
- }
+.main_app1 {
+ width: 100%;
+ height: calc(100% - 44px);
+ overflow-y: auto;
+ overflow-x: hidden;
+ padding: 15px;
+ box-sizing: border-box;
+ background-color: #F4F7FC;
+ .main_head {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ margin-bottom: 10px;
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ .main_head_title {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 20px;
+ span {
+ font-weight: 500;
+ font-size: 18px;
+ color: #222222;
+ margin-right: 30px;
+ }
}
+ .main_head_bottom {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .blue {
+ border-left: 8px solid #12BB8B;
+ }
+ .red {
+ border-left: 8px solid #F6CF46;
+ }
+ .yellow {
+ border-left: 8px solid #5DC9FB;
+ }
+ .orange {
+ border-left: 8px solid #FF9E56;
+ }
+ .darkBlue {
+ border-left: 8px solid #6B6EFF;
+ }
+ .main_head_item {
+ width: 19%;
+ height: 112px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ border-radius: 5px;
+ background-color: #F4F7FC;
+ span {
+ &:nth-child(1) {
+ font-weight: 600;
+ font-size: 30px;
+ color: #222222;
+ }
+ &:nth-child(2) {
+ font-weight: 400;
+ font-size: 14px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ }
+
+ .main_table {
+ display: flex;
+ align-items: start;
+ justify-content: space-between;
+ margin-top: 10px;
+ .main_table_list {
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ width: 69%;
+ .title {
+ display: flex;
+ align-items: center;
+ span {
+ font-weight: 500;
+ font-size: 18px;
+ color: #222222;
+ }
+ }
+ .list_wu {
+ width: 100%;
+ height: 100px;
+ line-height: 100px;
+ text-align: center;
+ font-size: 16px;
+ color: #222222;
+ }
+ .list_head {
+ width: 100%;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ background-color: #F7F7F7;
+ border-left: 1px solid #DFE2E8;
+ border-top: 1px solid #DFE2E8;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ font-weight: 500;
+ border-right: 1px solid #DFE2E8;
+ }
+ }
+ .table_box {
+ width: 100%;
+ border-bottom: 1px solid #DFE2E8;
+ .list_content {
+ width: 100%;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ border-left: 1px solid #DFE2E8;
+ border-top: 1px solid #DFE2E8;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ border-right: 1px solid #DFE2E8;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ .main_table_list1 {
+ margin-left: 10px;
+ width: 30%;
+ padding: 20px;
+ box-sizing: border-box;
+ flex-shrink: 0;
+ background-color: #ffffff;
+ .title {
+ font-weight: 500;
+ font-size: 18px;
+ color: #222222;
+ }
+ .list_wu {
+ width: 100%;
+ height: 100px;
+ line-height: 100px;
+ text-align: center;
+ font-size: 16px;
+ color: #222222;
+ }
+ .list_head {
+ width: 100%;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ background-color: #F7F7F7;
+ border-left: 1px solid #DFE2E8;
+ border-top: 1px solid #DFE2E8;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1.8;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ font-weight: 500;
+ border-right: 1px solid #DFE2E8;
+ &:last-child {
+ flex: 1;
+ }
+ }
+ }
+ .table_box {
+ width: 100%;
+ border-bottom: 1px solid #DFE2E8;
+ .list_content {
+ width: 100%;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ border-left: 1px solid #DFE2E8;
+ border-top: 1px solid #DFE2E8;
+ .list_head_item {
+ flex: 1.8;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ border-right: 1px solid #DFE2E8;
+ justify-content: center;
+ text-align: center;
+ font-size: 13px;
+ color: #222222;
+ &:last-child {
+ flex: 1;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .main_content {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 350px;
+
+ .title {
+ font-weight: 500;
+ font-size: 18px;
+ color: #222222;
+ }
+
+ .type_wrap {
+ flex: 1;
+ height: 100%;
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ /*border-right: 12px solid #f7f7f7;*/
+
+
+ .echart1 {
+ width: 100%;
+ height: 100%;
+ margin-top: 18px;
+ }
+ }
+
+ .dept_wrap {
+ width: 520px;
+ flex-shrink: 0;
+ height: 100%;
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ margin-left: 10px;
+ #echart2 {
+ width: 100%;
+ height: 100%;
+ }
+ }
+ }
+}
</style>
diff --git a/admin/src/views/business/carStatistics.vue b/admin/src/views/business/carStatistics.vue
index 99bab1c..b74dce4 100644
--- a/admin/src/views/business/carStatistics.vue
+++ b/admin/src/views/business/carStatistics.vue
@@ -1,718 +1,713 @@
<template>
- <div class="main_app1" v-if="info">
- <div class="main_head">
- <div class="main_head_title">
- <span>鍏ュ洯杞﹁締缁熻鎬昏</span>
- <el-radio-group v-model="isGroupBy" @change="getData(), getRataLists(), getReportLists()">
- <el-radio-button :label="0">鎸夎溅娆$粺璁�</el-radio-button>
- <el-radio-button :label="1">鎸夎溅杈嗙粺璁�</el-radio-button>
- </el-radio-group>
- </div>
- <div class="main_head_bottom">
- <div class="main_head_item blue">
- <span>{{info.todayTotal}}</span>
- <span>浠婃棩</span>
- </div>
- <div class="main_head_item red">
- <span>{{info.yesterdayTotal}}</span>
- <span>鏄ㄦ棩</span>
- </div>
- <div class="main_head_item yellow">
- <span>{{info.weekTotal}}</span>
- <span>鏈懆</span>
- </div>
- <div class="main_head_item orange">
- <span>{{info.monthTotal}}</span>
- <span>鏈湀</span>
- </div>
- <div class="main_head_item darkBlue">
- <span>{{info.yearTotal}}</span>
- <span>鏈勾</span>
- </div>
- </div>
+ <div class="main_app1" v-if="info">
+ <div class="main_head">
+ <div class="main_head_title">
+ <span>鍏ュ洯杞﹁締缁熻鎬昏</span>
+ <el-radio-group v-model="isGroupBy" @change="getData(), getRataLists(), getReportLists()">
+ <el-radio-button :label="0">鎸夎溅娆$粺璁�</el-radio-button>
+ <el-radio-button :label="1">鎸夎溅杈嗙粺璁�</el-radio-button>
+ </el-radio-group>
+ </div>
+ <div class="main_head_bottom">
+ <div class="main_head_item blue">
+ <span>{{info.todayTotal}}</span>
+ <span>浠婃棩</span>
</div>
- <div class="main_content">
- <div class="type_wrap">
- <div class="title">鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍</div>
- <div id="echart1" ref="typeRef" v-show="info.cumulativeDataList"></div>
- <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!info.cumulativeDataList">
- <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt="">
- </div>
- </div>
- <div class="dept_wrap">
- <div class="title">
- <span>杞﹁締鍒嗙被缁熻</span>
- <el-radio-group style="margin-left: 20px;" v-model="dateType" @change="changeDateType">
- <el-radio-button label="month">鏈堝害</el-radio-button>
- <el-radio-button label="year">骞村害</el-radio-button>
- </el-radio-group>
- <el-date-picker
- v-model="value"
- :type="dateType"
- :clearable="false"
- @change="getRataLists()"
- :value-format="dateType === 'month' ? 'yyyy-MM' : 'yyyy'"
- style="margin-left: 10px; width: 120px;"
- placeholder="璇烽�夋嫨">
- </el-date-picker>
- </div>
- <div id="echart_2" v-show="listZB.length > 0"></div>
- <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="listZB.length === 0">
- <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt="">
- </div>
- </div>
+ <div class="main_head_item red">
+ <span>{{info.yesterdayTotal}}</span>
+ <span>鏄ㄦ棩</span>
</div>
- <div class="main_table">
- <div class="main_table_list">
- <div class="title" style="display: flex; align-items: center; justify-content: space-between;">
- <div style="display: flex; align-items: center;">
- <span>鍏ュ洯杞﹁締缁熻琛�</span>
- <el-radio-group style="margin-left: 20px;" v-model="radio" @change="changeBB">
- <el-radio-button label="month">鏈堝害</el-radio-button>
- <el-radio-button label="year">骞村害</el-radio-button>
- </el-radio-group>
- <el-date-picker
- v-model="date1"
- :type="radio"
- :clearable="false"
- @change="getReportLists()"
- :value-format="radio === 'month' ? 'yyyy-MM' : 'yyyy'"
- style="margin-left: 10px; width: 120px;"
- placeholder="璇烽�夋嫨">
- </el-date-picker>
- </div>
- <el-button type="primary" style="margin-left: 20px;" icon="el-icon-upload2" @click="daochu">瀵煎嚭</el-button>
- </div>
- <template v-if="column.length > 0">
- <el-table
- style="width: 100%; margin-top: 15px;"
- :data="list"
- :header-row-style="{ backgroundColor: '#F7F7F7' }"
- border
- >
- <el-table-column :prop="item" :label="item" align="center" :fixed="index === 0 ? true : index === column.length - 1 ? 'right' : false" v-for="(item, index) in column" :key="index"></el-table-column>
- </el-table>
- </template>
- <div class="list_wu" v-else>鏆傛棤鏁版嵁</div>
- </div>
- <div class="main_table_list1">
- <div class="title">
- <span>鏈勾杞﹁締绱鍏ュ洯缁熻</span>
- </div>
- <el-table
- style="width: 100%; margin-top: 15px;"
- :data="info.yearSortList"
- :header-row-style="{ backgroundColor: '#F7F7F7' }"
- border
- >
- <el-table-column prop="name" label="杞﹁締鍒嗙被" align="center"></el-table-column>
- <el-table-column prop="total" label="鍏ュ洯娆℃暟" align="center"></el-table-column>
- </el-table>
- </div>
+ <div class="main_head_item yellow">
+ <span>{{info.weekTotal}}</span>
+ <span>鏈懆</span>
</div>
+ <div class="main_head_item orange">
+ <span>{{info.monthTotal}}</span>
+ <span>鏈湀</span>
+ </div>
+ <div class="main_head_item darkBlue">
+ <span>{{info.yearTotal}}</span>
+ <span>鏈勾</span>
+ </div>
+ </div>
</div>
+ <div class="main_content">
+ <div class="type_wrap">
+ <div class="title">鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍</div>
+ <div id="echart1" ref="typeRef" v-show="info.cumulativeDataList"></div>
+ <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!info.cumulativeDataList">
+ <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt="">
+ </div>
+ </div>
+ <div class="dept_wrap">
+ <div class="title">
+ <span>杞﹁締鍒嗙被缁熻</span>
+ <el-radio-group style="margin-left: 20px;" v-model="dateType" @change="changeDateType">
+ <el-radio-button label="month">鏈堝害</el-radio-button>
+ <el-radio-button label="year">骞村害</el-radio-button>
+ </el-radio-group>
+ <el-date-picker
+ v-model="value"
+ :type="dateType"
+ :clearable="false"
+ @change="getRataLists()"
+ :value-format="dateType === 'month' ? 'yyyy-MM' : 'yyyy'"
+ style="margin-left: 10px; width: 120px;"
+ placeholder="璇烽�夋嫨">
+ </el-date-picker>
+ </div>
+ <div id="echart_2" v-show="listZB.length > 0"></div>
+ <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="listZB.length === 0">
+ <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt="">
+ </div>
+ </div>
+ </div>
+ <div class="main_table">
+ <div class="main_table_list">
+ <div class="title" style="display: flex; align-items: center; justify-content: space-between;">
+ <div style="display: flex; align-items: center;">
+ <span>鍏ュ洯杞﹁締缁熻琛�</span>
+ <el-radio-group style="margin-left: 20px;" v-model="radio" @change="changeBB">
+ <el-radio-button label="month">鏈堝害</el-radio-button>
+ <el-radio-button label="year">骞村害</el-radio-button>
+ </el-radio-group>
+ <el-date-picker
+ v-model="date1"
+ :type="radio"
+ :clearable="false"
+ @change="getReportLists()"
+ :value-format="radio === 'month' ? 'yyyy-MM' : 'yyyy'"
+ style="margin-left: 10px; width: 120px;"
+ placeholder="璇烽�夋嫨">
+ </el-date-picker>
+ </div>
+ <el-button type="primary" style="margin-left: 20px;" icon="el-icon-upload2" @click="daochu">瀵煎嚭</el-button>
+ </div>
+ <template v-if="column.length > 0">
+ <el-table
+ style="width: 100%; margin-top: 15px;"
+ :data="list"
+ header-row-style="background-color: #F7F7F7;"
+ border
+ >
+ <el-table-column :prop="item" :label="item" align="center" :fixed="index === 0 ? true : index === column.length - 1 ? 'right' : false" v-for="(item, index) in column" :key="index"></el-table-column>
+ </el-table>
+ </template>
+ <div class="list_wu" v-else>鏆傛棤鏁版嵁</div>
+ </div>
+ <div class="main_table_list1">
+ <div class="title">
+ <span>鏈勾杞﹁締绱鍏ュ洯缁熻</span>
+ </div>
+ <el-table
+ style="width: 100%; margin-top: 15px;"
+ :data="info.yearSortList"
+ header-row-style="background-color: #F7F7F7;"
+ border
+ >
+ <el-table-column prop="name" label="杞﹁締鍒嗙被" align="center"></el-table-column>
+ <el-table-column prop="total" label="鍏ュ洯娆℃暟" align="center"></el-table-column>
+ </el-table>
+ </div>
+ </div>
+ </div>
</template>
<script>
- import * as echarts from 'echarts'
- import { getInParkUserData, getRataList, getReportList, reportExportExcel } from '@/api/business'
- export default {
- data() {
- return {
- info: null,
- isGroupBy: 0,
- radio: 'month',
- value: '',
- dateType: 'month',
- date: '',
- date1: '',
+import * as echarts from 'echarts'
+import { getInParkUserData, getRataList, getReportList, reportExportExcel } from '@/api/business'
+export default {
+ data() {
+ return {
+ info: null,
+ isGroupBy: 0,
+ radio: 'month',
+ value: '',
+ dateType: 'month',
+ date: '',
+ date1: '',
- listZB: [],
- column: [],
- list: []
+ listZB: [],
+ column: [],
+ list: []
+ }
+ },
+ mounted() {
+ var now = new Date();
+ var year = now.getFullYear();
+ var month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
+ this.value = `${year}-${month}`
+ this.date1 = `${year}-${month}`
+
+ this.getData()
+ this.getRataLists()
+ this.getReportLists()
+ },
+ methods: {
+ // 瀵煎嚭
+ daochu() {
+ reportExportExcel({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 0 }).then(res => {
+ this.download(res)
+ console.log(res.data)
+ })
+ },
+ changeBB() {
+ if (this.radio === 'month') {
+ let now = new Date();
+ let year = now.getFullYear();
+ let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
+ this.date1 = `${year}-${month}`
+ } else {
+ let now = new Date();
+ let year = now.getFullYear();
+ this.date1 = `${year}`
}
+ this.getReportLists()
},
- mounted() {
- var now = new Date();
- var year = now.getFullYear();
- var month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
- this.value = `${year}-${month}`
- this.date1 = `${year}-${month}`
+ // 鍏ュ洯杞﹁締缁熻琛�
+ getReportLists() {
+ getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 0 })
+ .then(res => {
- this.getData()
- this.getRataLists()
- this.getReportLists()
- },
- methods: {
- // 瀵煎嚭
- daochu() {
- reportExportExcel({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 0 }).then(res => {
- this.download(res)
- console.log(res.data)
- })
- },
- changeBB() {
- if (this.radio === 'month') {
- let now = new Date();
- let year = now.getFullYear();
- let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
- this.date1 = `${year}-${month}`
- } else {
- let now = new Date();
- let year = now.getFullYear();
- this.date1 = `${year}`
- }
- this.getReportLists()
- },
- // 鍏ュ洯杞﹁締缁熻琛�
- getReportLists() {
- getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 0 })
- .then(res => {
- if (res.length === 0) {
- this.column = []
- this.list = []
- return
- }
+ if (!res || res.length === 0) {
+ this.column = []
+ this.list = []
+ return
+ }
- if (!res || res.length === 0) {
- this.column = []
- this.list = []
- return
- }
+ this.column = res[0]
- this.column = res[0]
-
- this.list = res.slice(1).map(row => {
- const obj = {};
- this.column.forEach((header, index) => {
- obj[header] = row[index];
- });
- return obj;
+ this.list = res.slice(1).map(row => {
+ const obj = {};
+ this.column.forEach((header, index) => {
+ obj[header] = row[index];
});
- // const keys = res.map(row => row[0]); // 鑾峰彇閿悕
- // const values = res.map(row => row.slice(1, row.length)); // 鑾峰彇鍊�
- //
- // this.list = values[0].map((_, index) => {
- // return keys.reduce((obj, key, i) => {
- // obj[key] = values[i][index];
- // return obj;
- // }, {});
- // });
+ return obj;
+ });
+ // const keys = res.map(row => row[0]); // 鑾峰彇閿悕
+ // const values = res.map(row => row.slice(1, row.length)); // 鑾峰彇鍊�
+ //
+ // this.list = values[0].map((_, index) => {
+ // return keys.reduce((obj, key, i) => {
+ // obj[key] = values[i][index];
+ // return obj;
+ // }, {});
+ // });
- // console.log(this.column)
- // console.log(this.list)
+ console.log(this.column)
+ console.log(this.list)
- // if (res.length === 0) {
- // this.column = []
- // this.list = []
- // return
- // }
- //
- // this.column = res[0]
- // this.list = res.slice(1, res.length);
- //
- // console.log(res)
- })
- },
- changeDateType() {
- if (this.dateType === 'month') {
- let now = new Date();
- let year = now.getFullYear();
- let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
- this.value = `${year}-${month}`
- } else {
- let now = new Date();
- let year = now.getFullYear();
- this.value = `${year}`
- }
- this.getRataLists()
- },
- // 杞﹁締鍒嗙被缁熻
- getRataLists() {
- getRataList({ dateStr: this.value, isGroupBy: this.isGroupBy, type: 0 })
- .then(res => {
- this.listZB = res
- // this.$nextTick(() => {
- // this.initDept()
- // })
- setTimeout(() => {
- this.initDept()
- },1000)
- })
- },
- // 鍩虹鏁版嵁
- getData() {
- getInParkUserData({ isGroupBy: this.isGroupBy, type: 0 }).then(res => {
- this.info = res
- // this.$nextTick(() => {
- // this.initType()
- // })
- setTimeout(() => {
- this.initType()
- }, 1000)
- })
- },
- // 鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍
- initType() {
- if (!this.info.cumulativeDataList) return
+ // if (res.length === 0) {
+ // this.column = []
+ // this.list = []
+ // return
+ // }
+ //
+ // this.column = res[0]
+ // this.list = res.slice(1, res.length);
+ //
+ // console.log(res)
+ })
+ },
+ changeDateType() {
+ if (this.dateType === 'month') {
+ let now = new Date();
+ let year = now.getFullYear();
+ let month = now.getMonth() + 1 > 9 ? now.getMonth() + 1 : `0${now.getMonth() + 1}`;
+ this.value = `${year}-${month}`
+ } else {
+ let now = new Date();
+ let year = now.getFullYear();
+ this.value = `${year}`
+ }
+ this.getRataLists()
+ },
+ // 杞﹁締鍒嗙被缁熻
+ getRataLists() {
+ getRataList({ dateStr: this.value, isGroupBy: this.isGroupBy, type: 0 })
+ .then(res => {
+ this.listZB = res
+ // this.$nextTick(() => {
+ // this.initDept()
+ // })
+ setTimeout(() => {
+ this.initDept()
+ },1000)
+ })
+ },
+ // 鍩虹鏁版嵁
+ getData() {
+ getInParkUserData({ isGroupBy: this.isGroupBy, type: 0 }).then(res => {
+ this.info = res
+ // this.$nextTick(() => {
+ // this.initType()
+ // })
+ setTimeout(() => {
+ this.initType()
+ }, 1000)
+ })
+ },
+ // 鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍
+ initType() {
+ if (!this.info.cumulativeDataList) return
- const myChart = echarts.init(document.querySelector('#echart1'))
+ const myChart = echarts.init(document.querySelector('#echart1'))
- let names = this.info.cumulativeDataList.map(item => item.name)
- let datas = this.info.cumulativeDataList.map(item => item.total)
+ let names = this.info.cumulativeDataList.map(item => item.name)
+ let datas = this.info.cumulativeDataList.map(item => item.total)
- let option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'line'
- }
- },
- legend: {
- show: false,
- orient: 'vertical',
- left: 'left'
- },
- graphic: {
- elements: [
- {
- type: 'text',
- left: 'left',
- top: 'top',
- style: {
- text: '杞﹁締鏁�',
- textAlign: 'center',
- fill: '#333'
- }
- }
- ]
- },
- grid: {
- left: '0%',
- right: '5%',
- bottom: '10%',
- top: '20%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: names
- },
- yAxis: {
- type: 'value',
- axisLine: {
- show: true
- },
- axisLabel: {
- formatter: function (value) {
- // 鍥涜垗浜斿叆鍒版渶杩戠殑鏁存暟
- return Math.round(value);
- }
- }
- },
- series: [
+ let option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'line'
+ }
+ },
+ legend: {
+ show: false,
+ orient: 'vertical',
+ left: 'left'
+ },
+ graphic: {
+ elements: [
{
- data: datas,
- name: '鍏ュ洯杞﹁締',
- type: 'line',
- areaStyle: {
- normal: {
- color: {
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0,
- color: '#207FF7' // 0% 澶勭殑棰滆壊
- }, {
- offset: 1,
- color: 'rgba(255,255,255,.2)' // 100% 澶勭殑棰滆壊
- }],
- globalCoord: false // 缂虹渷涓� false
- }
- }
- },
- lineStyle: { // 绾挎潯鏍峰紡
+ type: 'text',
+ left: 'left',
+ top: 'top',
+ style: {
+ text: '杞﹁締鏁�',
+ textAlign: 'center',
+ fill: '#333'
+ }
+ }
+ ]
+ },
+ grid: {
+ left: '0%',
+ right: '5%',
+ bottom: '10%',
+ top: '20%',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'category',
+ data: names
+ },
+ yAxis: {
+ type: 'value',
+ axisLine: {
+ show: true
+ },
+ axisLabel: {
+ formatter: function (value) {
+ // 鍥涜垗浜斿叆鍒版渶杩戠殑鏁存暟
+ return Math.round(value);
+ }
+ }
+ },
+ series: [
+ {
+ data: datas,
+ name: '鍏ュ洯杞﹁締',
+ type: 'line',
+ areaStyle: {
+ normal: {
color: {
- type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
- offset: 0, color: '#207FF7' // 0% 澶勭殑棰滆壊
+ offset: 0,
+ color: '#207FF7' // 0% 澶勭殑棰滆壊
}, {
- offset: 1, color: '#207FF7' // 100% 澶勭殑棰滆壊
- }]
- },
- width: 2 // 绾挎潯绮楃粏
+ offset: 1,
+ color: 'rgba(255,255,255,.2)' // 100% 澶勭殑棰滆壊
+ }],
+ globalCoord: false // 缂虹渷涓� false
+ }
+ }
+ },
+ lineStyle: { // 绾挎潯鏍峰紡
+ color: {
+ type: 'linear',
+ x: 0,
+ y: 0,
+ x2: 0,
+ y2: 1,
+ colorStops: [{
+ offset: 0, color: '#207FF7' // 0% 澶勭殑棰滆壊
+ }, {
+ offset: 1, color: '#207FF7' // 100% 澶勭殑棰滆壊
+ }]
},
- symbol: 'circle',
- symbolSize: 10,
- itemStyle: {
- borderWidth: 1,
- borderColor: '#fff',
- color: '#207FF7'
- },
- smooth: false
- }
- ]
- }
- myChart.setOption(option)
- window.addEventListener('resize', function () { // 鎵ц
- myChart.resize()
- })
- },
- // 杞﹁締鍒嗙被缁熻
- initDept() {
- if (this.listZB.length === 0) return
-
- const dom = document.getElementById('echart_2')
- console.log(dom)
- const myChart = echarts.init(dom)
-
- let data = this.listZB.map(item => {
- return {
- value: item.total,
- name: item.name
+ width: 2 // 绾挎潯绮楃粏
+ },
+ symbol: 'circle',
+ symbolSize: 10,
+ itemStyle: {
+ borderWidth: 1,
+ borderColor: '#fff',
+ color: '#207FF7'
+ },
+ smooth: false
}
- })
+ ]
+ }
+ myChart.setOption(option)
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ },
+ // 杞﹁締鍒嗙被缁熻
+ initDept() {
+ if (this.listZB.length === 0) return
- let option = {
- tooltip: {
- trigger: 'item'
- },
- legend: {
- show: false,
- orient: 'vertical',
- left: 'left'
- },
- series : [
- {
- name: '璁块棶鏉ユ簮',
- type: 'pie',
- radius: ['34%', '50%'],
- labelLine: {
- normal: {
- length: 30,
- length2: 70,
+ const dom = document.getElementById('echart_2')
+ console.log(dom)
+ const myChart = echarts.init(dom)
+
+ let data = this.listZB.map(item => {
+ return {
+ value: item.total,
+ name: item.name
+ }
+ })
+
+ let option = {
+ tooltip: {
+ trigger: 'item'
+ },
+ legend: {
+ show: false,
+ orient: 'vertical',
+ left: 'left'
+ },
+ series : [
+ {
+ name: '璁块棶鏉ユ簮',
+ type: 'pie',
+ radius: ['34%', '50%'],
+ labelLine: {
+ normal: {
+ length: 30,
+ length2: 70,
+ }
+ },
+ label: {
+ formatter: "{a|{b}} {d}%",
+ rich: {
+ a: {
+ color: '#333333',
+ fontSize: 14,
+ fontWeight: 500
}
},
- label: {
- formatter: "{a|{b}} {d}%",
- rich: {
- a: {
- color: '#333333',
- fontSize: 14,
- fontWeight: 500
- }
- },
- padding: [0,-50,20,-100]
- },
- data: data
- }
- ]
- }
- myChart.setOption(option)
- window.addEventListener('resize', function () { // 鎵ц
- myChart.resize()
- })
- },
- initDept3() {
- const myChart = echarts.init(document.querySelector('#echart3'))
-
- let option = {
- grid: {
- left: '5%',
- right: '10%',
- bottom: '0%',
- top: '20%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- data: [150, 230, 224, 218, 135, 147, 260],
- type: 'line'
- }
- ]
- }
- myChart.setOption(option)
- window.addEventListener('resize', function () { // 鎵ц
- myChart.resize()
- })
+ padding: [0,-50,20,-100]
+ },
+ data: data
+ }
+ ]
}
+ myChart.setOption(option)
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ },
+ initDept3() {
+ const myChart = echarts.init(document.querySelector('#echart3'))
+
+ let option = {
+ grid: {
+ left: '5%',
+ right: '10%',
+ bottom: '0%',
+ top: '20%',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'category',
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ data: [150, 230, 224, 218, 135, 147, 260],
+ type: 'line'
+ }
+ ]
+ }
+ myChart.setOption(option)
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
}
}
+}
</script>
<style lang="scss" scoped>
- .main_app1 {
- width: 100%;
- height: calc(100% - 44px);
- overflow-y: auto;
- overflow-x: hidden;
- padding: 15px;
- box-sizing: border-box;
- background-color: #F4F7FC;
- .main_head {
- width: 100%;
- display: flex;
- align-items: center;
- flex-direction: column;
- margin-bottom: 10px;
- background-color: #ffffff;
- padding: 20px;
- box-sizing: border-box;
- .main_head_title {
- width: 100%;
- display: flex;
- align-items: center;
- margin-bottom: 20px;
- span {
- font-weight: 500;
- font-size: 18px;
- color: #222222;
- margin-right: 30px;
- }
- }
- .main_head_bottom {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .blue {
- border-left: 8px solid #12BB8B;
- }
- .red {
- border-left: 8px solid #F6CF46;
- }
- .yellow {
- border-left: 8px solid #5DC9FB;
- }
- .orange {
- border-left: 8px solid #FF9E56;
- }
- .darkBlue {
- border-left: 8px solid #6B6EFF;
- }
- .main_head_item {
- width: 19%;
- height: 112px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- border-radius: 5px;
- background-color: #F4F7FC;
- span {
- &:nth-child(1) {
- font-weight: 600;
- font-size: 30px;
- color: #222222;
- }
- &:nth-child(2) {
- font-weight: 400;
- font-size: 14px;
- color: #222222;
- }
- }
- }
- }
- }
-
- .main_table {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- margin-top: 10px;
- .main_table_list {
- background-color: #ffffff;
- padding: 20px;
- box-sizing: border-box;
- width: 69%;
- .title {
- display: flex;
- align-items: center;
- span {
- font-weight: 500;
- font-size: 18px;
- color: #222222;
- }
- }
- .list_wu {
- width: 100%;
- height: 100px;
- line-height: 100px;
- text-align: center;
- font-size: 16px;
- color: #222222;
- }
- .list_head {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- background-color: #F7F7F7;
- border-left: 1px solid #DFE2E8;
- border-top: 1px solid #DFE2E8;
- margin-top: 15px;
- .list_head_item {
- flex: 1;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 13px;
- color: #222222;
- font-weight: 500;
- border-right: 1px solid #DFE2E8;
- }
- }
- .table_box {
- width: 100%;
- border-bottom: 1px solid #DFE2E8;
- .list_content {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- border-left: 1px solid #DFE2E8;
- border-top: 1px solid #DFE2E8;
- .list_head_item {
- flex: 1;
- height: 100%;
- display: flex;
- border-right: 1px solid #DFE2E8;
- align-items: center;
- justify-content: center;
- font-size: 13px;
- color: #222222;
- }
- }
- }
- }
- .main_table_list1 {
- width: 30%;
- padding: 20px;
- box-sizing: border-box;
- flex-shrink: 0;
- background-color: #ffffff;
- .title {
- font-weight: 500;
- font-size: 18px;
- color: #222222;
- }
- .list_wu {
- width: 100%;
- height: 100px;
- line-height: 100px;
- text-align: center;
- font-size: 16px;
- color: #222222;
- }
- .list_head {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- background-color: #F7F7F7;
- border-left: 1px solid #DFE2E8;
- border-top: 1px solid #DFE2E8;
- margin-top: 15px;
- .list_head_item {
- flex: 1.8;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 13px;
- color: #222222;
- font-weight: 500;
- border-right: 1px solid #DFE2E8;
- &:last-child {
- flex: 1;
- }
- }
- }
- .table_box {
- width: 100%;
- border-bottom: 1px solid #DFE2E8;
- .list_content {
- width: 100%;
- height: 50px;
- display: flex;
- align-items: center;
- border-left: 1px solid #DFE2E8;
- border-top: 1px solid #DFE2E8;
- .list_head_item {
- flex: 1.8;
- height: 100%;
- display: flex;
- align-items: center;
- border-right: 1px solid #DFE2E8;
- justify-content: center;
- text-align: center;
- font-size: 13px;
- color: #222222;
- &:last-child {
- flex: 1;
- }
- }
- }
- }
- }
- }
-
- .main_content {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 350px;
-
- .title {
- font-weight: 500;
- font-size: 18px;
- color: #222222;
- }
-
- .type_wrap {
- flex: 1;
- height: 100%;
- background-color: #ffffff;
- padding: 20px;
- box-sizing: border-box;
- /*border-right: 12px solid #f7f7f7;*/
-
-
- #echart1 {
- width: 100%;
- height: 100%;
- margin-top: 18px;
- }
- }
-
- .dept_wrap {
- width: 420px;
- flex-shrink: 0;
- height: 100%;
- background-color: #ffffff;
- padding: 20px;
- box-sizing: border-box;
- margin-left: 10px;
- #echart_2 {
- width: 100%;
- height: 100%;
- }
- }
- }
+.main_app1 {
+ width: 100%;
+ height: calc(100% - 44px);
+ overflow-y: auto;
+ overflow-x: hidden;
+ padding: 15px;
+ box-sizing: border-box;
+ background-color: #F4F7FC;
+ .main_head {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ margin-bottom: 10px;
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ .main_head_title {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 20px;
+ span {
+ font-weight: 500;
+ font-size: 18px;
+ color: #222222;
+ margin-right: 30px;
+ }
}
+ .main_head_bottom {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .blue {
+ border-left: 8px solid #12BB8B;
+ }
+ .red {
+ border-left: 8px solid #F6CF46;
+ }
+ .yellow {
+ border-left: 8px solid #5DC9FB;
+ }
+ .orange {
+ border-left: 8px solid #FF9E56;
+ }
+ .darkBlue {
+ border-left: 8px solid #6B6EFF;
+ }
+ .main_head_item {
+ width: 19%;
+ height: 112px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ border-radius: 5px;
+ background-color: #F4F7FC;
+ span {
+ &:nth-child(1) {
+ font-weight: 600;
+ font-size: 30px;
+ color: #222222;
+ }
+ &:nth-child(2) {
+ font-weight: 400;
+ font-size: 14px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ }
+
+ .main_table {
+ display: flex;
+ align-items: start;
+ justify-content: space-between;
+ margin-top: 10px;
+ .main_table_list {
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ width: 69%;
+ .title {
+ display: flex;
+ align-items: center;
+ span {
+ font-weight: 500;
+ font-size: 18px;
+ color: #222222;
+ }
+ }
+ .list_wu {
+ width: 100%;
+ height: 100px;
+ line-height: 100px;
+ text-align: center;
+ font-size: 16px;
+ color: #222222;
+ }
+ .list_head {
+ width: 100%;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ background-color: #F7F7F7;
+ border-left: 1px solid #DFE2E8;
+ border-top: 1px solid #DFE2E8;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ font-weight: 500;
+ border-right: 1px solid #DFE2E8;
+ }
+ }
+ .table_box {
+ width: 100%;
+ border-bottom: 1px solid #DFE2E8;
+ .list_content {
+ width: 100%;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ border-left: 1px solid #DFE2E8;
+ border-top: 1px solid #DFE2E8;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ border-right: 1px solid #DFE2E8;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ .main_table_list1 {
+ width: 30%;
+ padding: 20px;
+ box-sizing: border-box;
+ flex-shrink: 0;
+ background-color: #ffffff;
+ .title {
+ font-weight: 500;
+ font-size: 18px;
+ color: #222222;
+ }
+ .list_wu {
+ width: 100%;
+ height: 100px;
+ line-height: 100px;
+ text-align: center;
+ font-size: 16px;
+ color: #222222;
+ }
+ .list_head {
+ width: 100%;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ background-color: #F7F7F7;
+ border-left: 1px solid #DFE2E8;
+ border-top: 1px solid #DFE2E8;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1.8;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ font-weight: 500;
+ border-right: 1px solid #DFE2E8;
+ &:last-child {
+ flex: 1;
+ }
+ }
+ }
+ .table_box {
+ width: 100%;
+ border-bottom: 1px solid #DFE2E8;
+ .list_content {
+ width: 100%;
+ height: 50px;
+ display: flex;
+ align-items: center;
+ border-left: 1px solid #DFE2E8;
+ border-top: 1px solid #DFE2E8;
+ .list_head_item {
+ flex: 1.8;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ border-right: 1px solid #DFE2E8;
+ justify-content: center;
+ text-align: center;
+ font-size: 13px;
+ color: #222222;
+ &:last-child {
+ flex: 1;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .main_content {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 350px;
+
+ .title {
+ font-weight: 500;
+ font-size: 18px;
+ color: #222222;
+ }
+
+ .type_wrap {
+ flex: 1;
+ height: 100%;
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ /*border-right: 12px solid #f7f7f7;*/
+
+
+ #echart1 {
+ width: 100%;
+ height: 100%;
+ margin-top: 18px;
+ }
+ }
+wor
+ .dept_wrap {
+ width: 420px;
+ flex-shrink: 0;
+ height: 100%;
+ background-color: #ffffff;
+ padding: 20px;
+ box-sizing: border-box;
+ margin-left: 10px;
+ #echart_2 {
+ width: 100%;
+ height: 100%;
+ }
+ }
+ }
+}
</style>
diff --git a/admin/src/views/login.vue b/admin/src/views/login.vue
index 8af0572..9ba9b70 100644
--- a/admin/src/views/login.vue
+++ b/admin/src/views/login.vue
@@ -104,18 +104,17 @@
...mapState(['sysConfig'])
},
mounted () {
- alert(1)
this.username = localStorage.getItem('username') || ''
this.password = localStorage.getItem('password') || ''
this.phone = localStorage.getItem('phone') || ''
const isRemPsd = localStorage.getItem('isRemPsd') || false
this.isRemPsd = JSON.parse(isRemPsd)
this.refreshCaptcha()
- this.getSystemConfig()
+ this.getSystemConfigDo()
},
methods: {
...mapMutations(['setUserInfo', 'setSysconfig']),
- getSystemConfig () {
+ getSystemConfigDo () {
getSystemConfig()
.then((res) => {
if (res && res.subtitle) {
diff --git a/server/system_gateway/src/main/resources/bootstrap.yml b/server/system_gateway/src/main/resources/bootstrap.yml
index 3d2cb09..02ca26f 100644
--- a/server/system_gateway/src/main/resources/bootstrap.yml
+++ b/server/system_gateway/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
profiles:
- active: pro
+ active: dev
application:
name: system_gateway
# 瀹夊叏閰嶇疆
diff --git a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
index 2df12af..9dc10e9 100644
--- a/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
+++ b/server/visits/dmvisit_admin/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
spring:
profiles:
- active: pro
+ active: dev
application:
name: visitsAdmin
# 瀹夊叏閰嶇疆
--
Gitblit v1.9.3