From 569c6b3e6b28b2808d22af4656c8f65a973c345e Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 07 五月 2025 09:07:11 +0800
Subject: [PATCH] 提交
---
admin/src/components/business/OperaPlatformWindow.vue | 7
pda/api/index.js | 8
admin/src/views/business/admissionStatistics.vue | 537 ++++++++++++++++++++
admin/src/views/business/visits.vue | 33 +
admin/src/api/platform/index.js | 4
admin/src/views/business/carStatistics.vue | 537 ++++++++++++++++++++
screen/index.html | 2
admin/src/views/index.vue | 23
admin/src/views/business/dangerStatic.vue | 319 ++++++++++-
admin/src/views/platform/index.vue | 16
pda/pages/index/center.vue | 19
admin/.env.development | 4
admin/src/api/business/index.js | 17
13 files changed, 1,467 insertions(+), 59 deletions(-)
diff --git a/admin/.env.development b/admin/.env.development
index ec01dc7..94f985b 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -2,7 +2,7 @@
NODE_ENV = 'development'
# VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface'
-# VUE_APP_API_URL = 'http://localhost:10010'
-VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface'
+VUE_APP_API_URL = 'http://192.168.0.103:10010'
+# VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface'
# VUE_APP_API_URL = 'http://10.50.250.253:8088/gateway_interface'
diff --git a/admin/src/api/business/index.js b/admin/src/api/business/index.js
index e77b0cd..9c09cf5 100644
--- a/admin/src/api/business/index.js
+++ b/admin/src/api/business/index.js
@@ -14,4 +14,21 @@
export function approveTemplById (id) {
return request.get(`/visitsAdmin/cloudService/business/approveTempl/findById/${id}`)
}
+// 鍩虹鏁版嵁
+export function getInParkUserData (data) {
+ return request.post('/visitsAdmin/cloudService/business/inoutRecord/getInParkUserData', data)
+}
+// 鍗犳瘮鏁版嵁
+export function getRataList (data) {
+ return request.post('/visitsAdmin/cloudService/business/inoutRecord/getRataList', data)
+}
+// 鎶ヨ〃鏁版嵁
+export function getReportList (data) {
+ return request.post('/visitsAdmin/cloudService/business/inoutRecord/getReportList', data)
+}
+// 鍏ュ洯鏁版嵁鍒嗘瀽-瀵煎嚭Excel
+export function reportExportExcel (data) {
+ return request.post('/visitsAdmin/cloudService/business/inoutRecord/reportExportExcel', data)
+}
+
export const uploadUrl = 'visitsAdmin/cloudService/public/upload'
diff --git a/admin/src/api/platform/index.js b/admin/src/api/platform/index.js
index 3f5ff28..5a5811f 100644
--- a/admin/src/api/platform/index.js
+++ b/admin/src/api/platform/index.js
@@ -132,3 +132,7 @@
export function dealJobFinish (data) {
return request.post('/visitsAdmin/cloudService/business/platformJob/dealJobFinish', data)
}
+// 鎭㈠浣滀笟
+export function restoreWork (data) {
+ return request.post('/visitsAdmin/cloudService/business/platformJob/restoreWork', data)
+}
diff --git a/admin/src/components/business/OperaPlatformWindow.vue b/admin/src/components/business/OperaPlatformWindow.vue
index a8bcd00..ea0d065 100644
--- a/admin/src/components/business/OperaPlatformWindow.vue
+++ b/admin/src/components/business/OperaPlatformWindow.vue
@@ -41,6 +41,9 @@
<el-form-item label="鍋滅暀瓒呮椂鎶ヨ鏃堕棿(鍒嗛挓锛夛細" prop="stayTimeoutAlarmTime">
<el-input type="number" v-model="form.stayTimeoutAlarmTime" placeholder="璇疯緭鍏ュ仠鐣欒秴鏃舵姤璀︽椂闂�(鍒嗛挓)" v-trim />
</el-form-item>
+ <el-form-item label="鎺掑簭鐮�" prop="sortnum">
+ <el-input type="number" v-model="form.sortnum" placeholder="璇疯緭鍏ユ帓搴忕爜" v-trim />
+ </el-form-item>
</el-form>
</GlobalWindow>
</template>
@@ -75,10 +78,12 @@
workRate: '',
stayTimeoutAlarmTime: '',
workTimeoutAlarmTime: '',
+ sortnum: ''
},
// 楠岃瘉瑙勫垯
rules: {
- workingNum: [{ required: true, validator: numRuleGtZero, message: '璇疯緭鍏ュ悓鏃朵綔涓氭暟閲�,蹇呴』澶т簬0! ', trigger: 'blur' }]
+ workingNum: [{ required: true, validator: numRuleGtZero, message: '璇疯緭鍏ュ悓鏃朵綔涓氭暟閲�,蹇呴』澶т簬0! ', trigger: 'blur' }],
+ sortnum: [{ required: true, message: '鎺掑簭鐮佷笉鑳戒负绌猴紒', trigger: 'blur' }]
}
}
},
diff --git a/admin/src/views/business/admissionStatistics.vue b/admin/src/views/business/admissionStatistics.vue
new file mode 100644
index 0000000..624046c
--- /dev/null
+++ b/admin/src/views/business/admissionStatistics.vue
@@ -0,0 +1,537 @@
+<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" size="mini" @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>
+ <div class="main_content">
+ <div class="type_wrap">
+ <div class="title">鍏ㄥ勾鍏ュ洯浜哄憳瓒嬪娍</div>
+ <div class="echart1" ref="typeRef" v-if="info.cumulativeDataList"></div>
+ <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-else>
+ <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" size="mini" @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"
+ size="mini"
+ @change="getRataLists()"
+ :value-format="dateType === 'month' ? 'yyyy-MM' : 'yyyy'"
+ style="margin-left: 20px; width: 130px;"
+ placeholder="璇烽�夋嫨">
+ </el-date-picker>
+ </div>
+ <div id="echart2" ref="deptRef" v-if="listZB.length > 0"></div>
+ <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-else>
+ <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>
+ <span>鍏ュ洯浜哄憳缁熻琛�</span>
+ <el-radio-group style="margin-left: 20px;" v-model="radio" size="mini" @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"
+ size="mini"
+ @change="getReportLists()"
+ :value-format="radio === 'month' ? 'yyyy-MM' : 'yyyy'"
+ style="margin-left: 20px; width: 130px;"
+ placeholder="璇烽�夋嫨">
+ </el-date-picker>
+ </div>
+ <el-button type="primary" size="mini" style="margin-left: 20px;" @click="daochu">瀵煎嚭</el-button>
+ </div>
+ <div class="list_head">
+ <div class="list_head_item" v-for="(item, index) in column" :key="index">{{item}}</div>
+ </div>
+ <div class="table_box">
+ <div class="list_content" v-for="(item, index) in list" :key="index">
+ <div class="list_head_item">鍌ㄨ繍绉�</div>
+ <div class="list_head_item">鑱斿悎宸ユ埧</div>
+ <div class="list_head_item">232</div>
+ <div class="list_head_item">鍌ㄨ繍绉�</div>
+ <div class="list_head_item">鑱斿悎宸ユ埧</div>
+ <div class="list_head_item">232</div>
+ <div class="list_head_item">鍌ㄨ繍绉�</div>
+ <div class="list_head_item">鑱斿悎宸ユ埧</div>
+ <div class="list_head_item">232</div>
+ <div class="list_head_item">232</div>
+ </div>
+ </div>
+ </div>
+ <div class="main_table_list1">
+ <div class="title">
+ <span>鏈勾浜哄憳绱鍏ュ洯缁熻</span>
+ </div>
+ <div class="list_head">
+ <div class="list_head_item">杞﹁締鍒嗙被</div>
+ <div class="list_head_item">鍏ュ眬娆℃暟</div>
+ </div>
+ <div class="table_box">
+ <div class="list_content" v-for="(item, index) in info.yearSortList" :key="index">
+ <div class="list_head_item">{{item.name}}</div>
+ <div class="list_head_item">{{item.total}}</div>
+ </div>
+ </div>
+ </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: '',
+
+ 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: 1 }).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: 1 })
+ .then(res => {
+ console.log(res)
+
+ this.column = res.data.map(item => item[0])
+
+ const keys = res.data.map(row => row[0]); // 鑾峰彇閿悕
+ const values = res.data.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;
+ }, {});
+ });
+ })
+ },
+ 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: 1 })
+ .then(res => {
+ console.log(res)
+ this.listZB = res
+ this.$nextTick(() => {
+ this.initDept()
+ })
+ })
+ },
+ // 鍩虹鏁版嵁
+ getData() {
+ getInParkUserData({ isGroupBy: this.isGroupBy, type: 1 }).then(res => {
+ this.info = res
+ this.$nextTick(() => {
+ this.initType()
+ })
+ })
+ },
+ // 鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍
+ initType() {
+ if (!this.info.cumulativeDataList) return
+
+ 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 option = {
+ grid: {
+ left: '5%',
+ right: '10%',
+ bottom: '0%',
+ top: '20%',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'category',
+ data: names
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ data: datas,
+ type: 'line'
+ }
+ ]
+ }
+ myChart.setOption(option)
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ },
+ // 杞﹁締鍒嗙被缁熻
+ initDept() {
+ if (!this.listZB) return
+
+ const myChart = echarts.init(document.querySelector('#echart2'))
+
+ let data = this.listZB.map(item => {
+ return {
+ value: item.total,
+ name: item.name
+ }
+ })
+
+ let option = {
+ series : [
+ {
+ name: '璁块棶鏉ユ簮',
+ type: 'pie',
+ radius: '55%',
+ 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: #ffffff;
+ .main_head {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ margin-bottom: 20px;
+ .main_head_title {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 20px;
+ span {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ margin-right: 30px;
+ }
+ }
+ .main_head_bottom {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .blue {
+ border-left: 5px solid blue;
+ }
+ .red {
+ border-left: 5px solid red;
+ }
+ .yellow {
+ border-left: 5px solid yellow;
+ }
+ .orange {
+ border-left: 5px solid orange;
+ }
+ .darkBlue {
+ border-left: 5px solid #0000a8;
+ }
+ .main_head_item {
+ width: 19%;
+ height: 70px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ border-radius: 5px;
+ background-color: #ffffff;
+ span {
+ &:nth-child(1) {
+ font-size: 22px;
+ color: black;
+ font-weight: bold;
+ }
+ &:nth-child(2) {
+ font-size: 16px;
+ color: black;
+ }
+ }
+ }
+ }
+ }
+
+ .main_table {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 300px;
+ .main_table_list {
+ margin-left: 20px;
+ flex: 1;
+ .title {
+ display: flex;
+ align-items: center;
+ span {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ }
+ }
+ .list_head {
+ width: 100%;
+ height: 35px;
+ display: flex;
+ align-items: center;
+ background-color: #ececec;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ .table_box {
+ width: 100%;
+ height: 234px;
+ .list_content {
+ width: 100%;
+ height: 40px;
+ display: flex;
+ align-items: center;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ .main_table_list1 {
+ margin-left: 20px;
+ width: 300px;
+ flex-shrink: 0;
+ .title {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ }
+ .list_head {
+ width: 100%;
+ height: 35px;
+ display: flex;
+ align-items: center;
+ background-color: #ececec;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ .table_box {
+ width: 100%;
+ height: 234px;
+ .list_content {
+ width: 100%;
+ height: 40px;
+ display: flex;
+ align-items: center;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ }
+
+ .main_content {
+ display: flex;
+ height: 400px;
+
+ .title {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ /*margin-bottom: 20px;*/
+ margin-top: 20px;
+ }
+
+ .type_wrap {
+ flex: 11;
+ flex-shrink: 0;
+ height: calc(100% - 20px);
+ /*border-right: 12px solid #f7f7f7;*/
+
+
+ .echart1 {
+ width: 100%;
+ height: calc(100% - 60px);
+ }
+ }
+
+ .dept_wrap {
+ flex: 8;
+ flex-shrink: 0;
+ height: calc(100% - 20px);
+ padding-left: 20px;
+
+ #echart2 {
+ width: 100%;
+ height: calc(100% - 60px);
+ }
+ }
+ }
+ }
+</style>
diff --git a/admin/src/views/business/carStatistics.vue b/admin/src/views/business/carStatistics.vue
new file mode 100644
index 0000000..6efb20e
--- /dev/null
+++ b/admin/src/views/business/carStatistics.vue
@@ -0,0 +1,537 @@
+<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" size="mini" @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>
+ <div class="main_content">
+ <div class="type_wrap">
+ <div class="title">鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍</div>
+ <div id="echart1" ref="typeRef" v-if="info.cumulativeDataList"></div>
+ <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-else>
+ <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" size="mini" @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"
+ size="mini"
+ @change="getRataLists()"
+ :value-format="dateType === 'month' ? 'yyyy-MM' : 'yyyy'"
+ style="margin-left: 20px; width: 130px;"
+ placeholder="璇烽�夋嫨">
+ </el-date-picker>
+ </div>
+ <div id="echart2" ref="deptRef" v-if="listZB.length > 0"></div>
+ <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-else>
+ <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>
+ <span>鍏ュ洯杞﹁締缁熻琛�</span>
+ <el-radio-group style="margin-left: 20px;" v-model="radio" size="mini" @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"
+ size="mini"
+ @change="getReportLists()"
+ :value-format="radio === 'month' ? 'yyyy-MM' : 'yyyy'"
+ style="margin-left: 20px; width: 130px;"
+ placeholder="璇烽�夋嫨">
+ </el-date-picker>
+ </div>
+ <el-button type="primary" size="mini" style="margin-left: 20px;" @click="daochu">瀵煎嚭</el-button>
+ </div>
+ <div class="list_head">
+ <div class="list_head_item" v-for="(item, index) in column" :key="index">{{item}}</div>
+ </div>
+ <div class="table_box">
+ <div class="list_content" v-for="(item, index) in list" :key="index">
+ <div class="list_head_item">鍌ㄨ繍绉�</div>
+ <div class="list_head_item">鑱斿悎宸ユ埧</div>
+ <div class="list_head_item">232</div>
+ <div class="list_head_item">鍌ㄨ繍绉�</div>
+ <div class="list_head_item">鑱斿悎宸ユ埧</div>
+ <div class="list_head_item">232</div>
+ <div class="list_head_item">鍌ㄨ繍绉�</div>
+ <div class="list_head_item">鑱斿悎宸ユ埧</div>
+ <div class="list_head_item">232</div>
+ <div class="list_head_item">232</div>
+ </div>
+ </div>
+ </div>
+ <div class="main_table_list1">
+ <div class="title">
+ <span>鏈勾杞﹁締绱鍏ュ洯缁熻</span>
+ </div>
+ <div class="list_head">
+ <div class="list_head_item">杞﹁締鍒嗙被</div>
+ <div class="list_head_item">鍏ュ眬娆℃暟</div>
+ </div>
+ <div class="table_box">
+ <div class="list_content" v-for="(item, index) in info.yearSortList" :key="index">
+ <div class="list_head_item">{{item.name}}</div>
+ <div class="list_head_item">{{item.total}}</div>
+ </div>
+ </div>
+ </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: '',
+
+ 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()
+ },
+ // 鍏ュ洯杞﹁締缁熻琛�
+ getReportLists() {
+ getReportList({ dateStr: this.date1, isGroupBy: this.isGroupBy, type: 0 })
+ .then(res => {
+ console.log(res)
+
+ this.column = res.data.map(item => item[0])
+
+ const keys = res.data.map(row => row[0]); // 鑾峰彇閿悕
+ const values = res.data.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;
+ }, {});
+ });
+ })
+ },
+ 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 => {
+ console.log(res)
+ this.listZB = res
+ this.$nextTick(() => {
+ this.initDept()
+ })
+ })
+ },
+ // 鍩虹鏁版嵁
+ getData() {
+ getInParkUserData({ isGroupBy: this.isGroupBy, type: 0 }).then(res => {
+ this.info = res
+ this.$nextTick(() => {
+ this.initType()
+ })
+ })
+ },
+ // 鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍
+ initType() {
+ if (!this.info.cumulativeDataList) return
+
+ 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 option = {
+ grid: {
+ left: '5%',
+ right: '10%',
+ bottom: '0%',
+ top: '20%',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'category',
+ data: names
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ data: datas,
+ type: 'line'
+ }
+ ]
+ }
+ myChart.setOption(option)
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ },
+ // 杞﹁締鍒嗙被缁熻
+ initDept() {
+ if (!this.listZB) return
+
+ const myChart = echarts.init(document.querySelector('#echart2'))
+
+ let data = this.listZB.map(item => {
+ return {
+ value: item.total,
+ name: item.name
+ }
+ })
+
+ let option = {
+ series : [
+ {
+ name: '璁块棶鏉ユ簮',
+ type: 'pie',
+ radius: '55%',
+ 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: #ffffff;
+ .main_head {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ margin-bottom: 20px;
+ .main_head_title {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ margin-bottom: 20px;
+ span {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ margin-right: 30px;
+ }
+ }
+ .main_head_bottom {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .blue {
+ border-left: 5px solid blue;
+ }
+ .red {
+ border-left: 5px solid red;
+ }
+ .yellow {
+ border-left: 5px solid yellow;
+ }
+ .orange {
+ border-left: 5px solid orange;
+ }
+ .darkBlue {
+ border-left: 5px solid #0000a8;
+ }
+ .main_head_item {
+ width: 19%;
+ height: 70px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ border-radius: 5px;
+ background-color: #ffffff;
+ span {
+ &:nth-child(1) {
+ font-size: 22px;
+ color: black;
+ font-weight: bold;
+ }
+ &:nth-child(2) {
+ font-size: 16px;
+ color: black;
+ }
+ }
+ }
+ }
+ }
+
+ .main_table {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ height: 300px;
+ .main_table_list {
+ margin-left: 20px;
+ flex: 1;
+ .title {
+ display: flex;
+ align-items: center;
+ span {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ }
+ }
+ .list_head {
+ width: 100%;
+ height: 35px;
+ display: flex;
+ align-items: center;
+ background-color: #ececec;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ .table_box {
+ width: 100%;
+ height: 234px;
+ .list_content {
+ width: 100%;
+ height: 40px;
+ display: flex;
+ align-items: center;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ .main_table_list1 {
+ margin-left: 20px;
+ width: 300px;
+ flex-shrink: 0;
+ .title {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ }
+ .list_head {
+ width: 100%;
+ height: 35px;
+ display: flex;
+ align-items: center;
+ background-color: #ececec;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ .table_box {
+ width: 100%;
+ height: 234px;
+ .list_content {
+ width: 100%;
+ height: 40px;
+ display: flex;
+ align-items: center;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ }
+
+ .main_content {
+ display: flex;
+ height: 400px;
+
+ .title {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ /*margin-bottom: 20px;*/
+ margin-top: 20px;
+ }
+
+ .type_wrap {
+ flex: 11;
+ flex-shrink: 0;
+ height: calc(100% - 20px);
+ /*border-right: 12px solid #f7f7f7;*/
+
+
+ #echart1 {
+ width: 100%;
+ height: calc(100% - 60px);
+ }
+ }
+
+ .dept_wrap {
+ flex: 8;
+ flex-shrink: 0;
+ height: calc(100% - 20px);
+ padding-left: 20px;
+
+ #echart2 {
+ width: 100%;
+ height: calc(100% - 60px);
+ }
+ }
+ }
+ }
+</style>
diff --git a/admin/src/views/business/dangerStatic.vue b/admin/src/views/business/dangerStatic.vue
index 09678dd..d1ea42c 100644
--- a/admin/src/views/business/dangerStatic.vue
+++ b/admin/src/views/business/dangerStatic.vue
@@ -1,15 +1,37 @@
<template>
- <div class="main_app">
- <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getData(1)" @clear="clear"
- @changeForm='changeForm'>
- <template #fastdate>
- <el-radio-group v-model="filters.fastdate" size="small" @input="changeRadio">
- <el-radio-button label="0">褰撳ぉ</el-radio-button>
- <el-radio-button label="6">杩�7澶�</el-radio-button>
- <el-radio-button label="29">杩�30澶�</el-radio-button>
- </el-radio-group>
- </template>
- </QueryForm>
+ <div class="main_app1">
+ <div class="main_head">
+ <div class="main_head_item blue">
+ <span>{{totalList.total}}</span>
+ <span>鎬婚殣鎮f暟</span>
+ </div>
+ <div class="main_head_item red">
+ <span>{{totalList.waitDeal}}</span>
+ <span>寰呭鐞�</span>
+ </div>
+ <div class="main_head_item yellow">
+ <span>{{totalList.dealFinish}}</span>
+ <span>宸叉暣鏀�</span>
+ </div>
+ <div class="main_head_item orange">
+ <span>{{totalList.back}}</span>
+ <span>宸查��鍥�</span>
+ </div>
+ <div class="main_head_item darkBlue">
+ <span>{{totalList.todayNew}}</span>
+ <span>浠婃棩鏂板</span>
+ </div>
+ </div>
+<!-- <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getData(1)" @clear="clear"-->
+<!-- @changeForm='changeForm'>-->
+<!-- <template #fastdate>-->
+<!-- <el-radio-group v-model="filters.fastdate" size="small" @input="changeRadio">-->
+<!-- <el-radio-button label="0">褰撳ぉ</el-radio-button>-->
+<!-- <el-radio-button label="6">杩�7澶�</el-radio-button>-->
+<!-- <el-radio-button label="29">杩�30澶�</el-radio-button>-->
+<!-- </el-radio-group>-->
+<!-- </template>-->
+<!-- </QueryForm>-->
<div class="main_content">
<div class="type_wrap">
<div class="title">闅愭偅绫诲瀷缁熻</div>
@@ -24,6 +46,30 @@
<div v-show="deptList && deptList.length > 0" class="echart2" ref="deptRef"></div>
<div v-show="deptList.length == 0" style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;">
<img style="width: 240px;" src="@/assets/images/default_homeimg.png" alt="">
+ </div>
+ </div>
+ </div>
+ <div class="main_table">
+ <div class="main_table_echart">
+ <div class="title">鏈勾闅愭偅瓒嬪娍</div>
+ <div id="echart3" v-if="yearList.length > 0"></div>
+ <div v-else style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;">
+ <img style="width: 240px;" src="@/assets/images/default_homeimg.png" alt="">
+ </div>
+ </div>
+ <div class="main_table_list">
+ <div class="title">鏈湀棰戠箒鍙戠敓闅愭偅鍖哄煙Top10</div>
+ <div class="list_head">
+ <div class="list_head_item">璐d换閮ㄩ棬</div>
+ <div class="list_head_item">闅愭偅鍖哄煙</div>
+ <div class="list_head_item">闅愭偅鏁伴噺</div>
+ </div>
+ <div class="table_box">
+ <div class="list_content" v-for="(item, index) in departmentList" :key="index">
+ <div class="list_head_item">{{item.name}}</div>
+ <div class="list_head_item">{{item.categoryName}}</div>
+ <div class="list_head_item">{{item.total}}</div>
+ </div>
</div>
</div>
</div>
@@ -74,10 +120,20 @@
},
typeList: [],
deptList: [],
+ totalList: {
+ total: 0,
+ waitDeal: 0,
+ dealFinish: 0,
+ back: 0,
+ todayNew: 0
+ },
+ yearList: [],
+ departmentList: []
}
},
mounted() {
this.changeRadio('29')
+ this.initDept3()
// this.getData()
},
methods: {
@@ -90,11 +146,22 @@
getData(page) {
hiddenDangerDataPost({ ...this.filters }).then(res => {
if (res) {
+ this.totalList.total = res.total || 0
+ this.totalList.waitDeal = res.waitDeal || 0
+ this.totalList.dealFinish = res.dealFinish || 0
+ this.totalList.back = res.back || 0
+ this.totalList.todayNew = res.todayNew || 0
+
+ this.yearList = res.yearList
+
+ this.departmentList = res.departmentList.slice(0, 10)
+
this.typeList = res.cateList || []
this.deptList = res.departmentList || []
this.$nextTick(() => {
this.initType()
this.initDept()
+ this.initDept3()
})
}
@@ -114,8 +181,8 @@
let option = {
grid: {
left: '0%',
- // right: '4%',
- // bottom: '3%',
+ right: '0%',
+ bottom: '0%',
top: '0%',
containLabel: true
},
@@ -126,7 +193,7 @@
left: '45%',
textStyle: {
color: '#666666',
- fontSize: 16,
+ fontSize: 13,
},
}, {
text: total,
@@ -134,7 +201,7 @@
left: '47.6%',
textStyle: {
color: '#080404',
- fontSize: 24,
+ fontSize: 16,
fontWeight: 'bold',
},
}],
@@ -157,7 +224,7 @@
series: [
{
type: 'pie',
- radius: ['24%', '40%'],
+ radius: ['34%', '50%'],
label: {
formatter: "{a|{b}}\n\n{c} | {d}%",
rich: {
@@ -198,6 +265,13 @@
const myChart = echarts.init(document.querySelector('.echart2'))
let option = {
+ grid: {
+ left: '10%',
+ right: '10%',
+ bottom: '0%',
+ top: '20%',
+ containLabel: true
+ },
xAxis: {
type: 'category',
data: this.deptList.map(i => i.name),
@@ -241,6 +315,41 @@
myChart.resize()
})
},
+ initDept3() {
+ if (this.yearList.length === 0) return
+
+ const myChart = echarts.init(document.querySelector('#echart3'))
+
+ let names = this.yearList.map(item => item.name)
+ let datas = this.yearList.map(item => item.total)
+
+ let option = {
+ grid: {
+ left: '5%',
+ right: '10%',
+ bottom: '0%',
+ top: '20%',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'category',
+ data: names
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ data: datas,
+ type: 'line'
+ }
+ ]
+ }
+ myChart.setOption(option)
+ window.addEventListener('resize', function () { // 鎵ц
+ myChart.resize()
+ })
+ },
clear() {
this.filters = {}
this.getData()
@@ -253,42 +362,160 @@
/*.main_app {
height: 100%;
}*/
-
-.main_content {
- display: flex;
- height: calc(100% - 100px);
-
- .title {
- font-weight: 600;
- font-size: 16px;
- color: #222222;
+.main_app1 {
+ width: 100%;
+ height: calc(100% - 44px);
+ overflow-y: auto;
+ overflow-x: hidden;
+ padding: 15px;
+ box-sizing: border-box;
+ background-color: #ffffff;
+ .main_head {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
margin-bottom: 20px;
- margin-top: 20px;
- }
-
- .type_wrap {
- flex: 11;
- flex-shrink: 0;
- height: calc(100% - 20px);
- border-right: 12px solid #f7f7f7;
-
-
- .echart1 {
- width: 100%;
- height: calc(100% - 60px);
+ .blue {
+ border-left: 5px solid blue;
+ }
+ .red {
+ border-left: 5px solid red;
+ }
+ .yellow {
+ border-left: 5px solid yellow;
+ }
+ .orange {
+ border-left: 5px solid orange;
+ }
+ .darkBlue {
+ border-left: 5px solid #0000a8;
+ }
+ .main_head_item {
+ width: 19%;
+ height: 70px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ border-radius: 5px;
+ background-color: #ffffff;
+ span {
+ &:nth-child(1) {
+ font-size: 22px;
+ color: black;
+ font-weight: bold;
+ }
+ &:nth-child(2) {
+ font-size: 16px;
+ color: black;
+ }
+ }
}
}
- .dept_wrap {
- flex: 10;
- flex-shrink: 0;
- height: calc(100% - 20px);
- padding-left: 20px;
+ .main_table {
+ display: flex;
+ align-items: start;
+ justify-content: space-between;
+ .main_table_echart {
+ flex: 1;
+ height: 400px;
+ .title {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ }
+ #echart3 {
+ width: 100%;
+ height: calc(100% - 33px);
+ }
+ }
+ .main_table_list {
+ margin-left: 20px;
+ flex-shrink: 0;
+ width: 500px;
+ .title {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ }
+ .list_head {
+ width: 100%;
+ height: 35px;
+ display: flex;
+ align-items: center;
+ background-color: #ececec;
+ margin-top: 15px;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ .table_box {
+ width: 100%;
+ .list_content {
+ width: 100%;
+ height: 35px;
+ display: flex;
+ align-items: center;
+ .list_head_item {
+ flex: 1;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 13px;
+ color: #222222;
+ }
+ }
+ }
+ }
+ }
- .echart2 {
- width: 100%;
- height: calc(100% - 60px);
+ .main_content {
+ display: flex;
+ height: 500px;
+
+ .title {
+ font-weight: 600;
+ font-size: 16px;
+ color: #222222;
+ /*margin-bottom: 20px;*/
+ margin-top: 20px;
+ }
+
+ .type_wrap {
+ flex: 11;
+ flex-shrink: 0;
+ height: calc(100% - 20px);
+ /*border-right: 12px solid #f7f7f7;*/
+
+
+ .echart1 {
+ width: 100%;
+ height: calc(100% - 60px);
+ }
+ }
+
+ .dept_wrap {
+ flex: 10;
+ flex-shrink: 0;
+ height: calc(100% - 20px);
+ padding-left: 20px;
+
+ .echart2 {
+ width: 100%;
+ height: calc(100% - 60px);
+ }
}
}
}
+
</style>
diff --git a/admin/src/views/business/visits.vue b/admin/src/views/business/visits.vue
index 1b59993..00d7881 100644
--- a/admin/src/views/business/visits.vue
+++ b/admin/src/views/business/visits.vue
@@ -12,6 +12,17 @@
<el-form-item label="璁垮鍗曚綅" prop="companyName">
<el-input v-model="searchForm.companyName" placeholder="璇疯緭鍏ヨ瀹㈠崟浣�" @keypress.enter.native="search"></el-input>
</el-form-item>
+ <el-form-item label="璧峰鏃堕棿" prop="date">
+ <el-date-picker
+ v-model="searchForm.date"
+ type="daterange"
+ @change="changeDate"
+ value-format="yyyy-MM-dd"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡">
+ </el-date-picker>
+ </el-form-item>
<el-form-item label="瀹℃壒鐘舵��" prop="status">
<el-select v-model="searchForm.status" placeholder="璇烽�夋嫨">
<el-option label="寰呮彁浜ゅ鎵�" value="0"></el-option>
@@ -128,7 +139,10 @@
companyName: '',
idcardNo: '',
status: '',
- type: 0
+ type: 0,
+ queryStarttime: '',
+ queryEndtime: '',
+ date: []
}
}
},
@@ -150,6 +164,23 @@
})
},
methods: {
+ // 鎼滅储妗嗛噸缃�
+ reset () {
+ this.$refs.searchForm.resetFields()
+ this.searchForm.queryStarttime = ''
+ this.searchForm.queryEndtime = ''
+ this.search()
+ },
+ changeDate(e) {
+ if (e) {
+ this.searchForm.queryStarttime = e[0]
+ this.searchForm.queryEndtime = e[1]
+ } else {
+ this.searchForm.queryStarttime = ''
+ this.searchForm.queryEndtime = ''
+ }
+ this.search()
+ },
handleDetail(row) {
this.isShowDetail = true
console.log('row', row)
diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index 623c258..865605b 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -32,8 +32,8 @@
<img src="@/assets/icons/home_icon2.png" alt="" />
</div>
<div class="content">
- <div>璁垮浜烘(浜�)锛歿{ headerData.visitUserNum }}</div>
- <div>绛剧浜烘(浜�)锛歿{ headerData.signLevelNum }}</div>
+ <div>鍏ュ洯浜烘(浜�)锛歿{ headerData.visitUserNum }}</div>
+ <div>鍑哄洯浜烘(浜�)锛歿{ headerData.signLevelNum }}</div>
</div>
</div>
<div class="card">
@@ -100,7 +100,11 @@
</div>
<div class="wrap static2">
<div class="header">
- <div class="home_title">闀挎湡鐩稿叧鏂瑰垎甯�</div>
+<!-- <div class="home_title">闀挎湡鐩稿叧鏂瑰垎甯�</div>-->
+ <el-radio-group v-model="tabPosition" @change="changeType">
+ <el-radio-button label="top">闀挎湡鐩稿叧鏂瑰垎甯�</el-radio-button>
+ <el-radio-button label="right">鍐呴儴浜哄憳鍒嗗竷</el-radio-button>
+ </el-radio-group>
<!-- <div class="df_ac more">
鏇村<i class="el-icon-arrow-right"></i>
</div> -->
@@ -226,6 +230,7 @@
},
data () {
return {
+ tabPosition: 'top',
colors,
nowDate: '',
nowWeek: '',
@@ -264,6 +269,10 @@
this.initData()
},
methods: {
+ changeType(e) {
+ console.log(e)
+ this.initEchart2()
+ },
getNoticeList(){
syncHkNotice().then(res => {
@@ -393,8 +402,9 @@
this.headerData = res || {}
const arr = []
arr.push({ name: '璁垮', value: this.headerData.inParkVisitUserNum })
- arr.push({ name: '鍐呴儴鍛樺伐', value: this.headerData.todayInParkUserNum - this.headerData.inParkLwUserNum - this.headerData.inParkVisitUserNum })
+ arr.push({ name: '鍐呴儴鍛樺伐', value: this.headerData.todayInParkUserNum - this.headerData.inParkLwUserNum - this.headerData.inParkVisitUserNum - this.headerData.inParkDriverUserNum })
arr.push({ name: '闀挎湡鐩稿叧鏂�', value: this.headerData.inParkLwUserNum })
+ arr.push({ name: '璐ц繍鍙告満', value: this.headerData.inParkDriverUserNum })
arr.sort((a, b) => b.value - a.value)
this.manningRatio = arr
this.initEchart1()
@@ -497,6 +507,7 @@
})
},
initEchart2 () {
+ console.log('initEchart2')
const myChart = echarts.init(document.getElementById('echart2'))
const that = this
myChart.setOption({
@@ -526,11 +537,11 @@
},
yAxis: {
type: 'category',
- data: that.staticData.lwList.map(i => i.name)
+ data: that.tabPosition === 'top' ? that.staticData.lwList.map(i => i.name) : that.staticData.internalList.map(i => i.name)
},
series: [
{
- data: that.staticData.lwList.map(i => i.num),
+ data: that.tabPosition === 'top' ? that.staticData.lwList.map(i => i.num) : that.staticData.internalList.map(i => i.num),
type: 'bar',
barWidth: 10,
itemStyle: {
diff --git a/admin/src/views/platform/index.vue b/admin/src/views/platform/index.vue
index 2e55a8a..ff9dd46 100644
--- a/admin/src/views/platform/index.vue
+++ b/admin/src/views/platform/index.vue
@@ -95,6 +95,7 @@
</div>
<div class="right">
<el-button v-if="task.status == 5" plain @click="handleErr(task)">寮傚父鎸傝捣</el-button>
+ <el-button v-if="task.status == 8" plain @click="restore(task)">鎭㈠浣滀笟</el-button>
<el-button v-if="task.status == 5 || task.status == 8" plain
@click="handleTransform(item, task)">杞Щ鏈堝彴</el-button>
<el-button v-if="task.status == 4" plain @click="handlePass(task)">杩囧彿</el-button>
@@ -163,7 +164,8 @@
platformMove,
updUserPlatformConfig,
- listByGroupId
+ listByGroupId,
+ restoreWork
} from '@/api'
import PlatformQueuing from './components/PlatformQueuing.vue'
import WaybillDetail from './components/WaybillDetail.vue'
@@ -280,6 +282,18 @@
})
})
},
+ restore(item) {
+ this.$confirm('鎮ㄧ‘璁よ瀵硅浠诲姟杩涜鎭㈠浣滀笟鍚�', '娓╅Θ鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ restoreWork({ jobId: item.id }).then(ress => {
+ Message.success('鎭㈠浣滀笟鎴愬姛')
+ this.getPlatGroupList()
+ })
+ })
+ },
platgroupClick(item) {
this.activeGroup = { ...item }
this.circulInitTaskList()
diff --git a/pda/api/index.js b/pda/api/index.js
index 48febec..3eb94df 100644
--- a/pda/api/index.js
+++ b/pda/api/index.js
@@ -166,4 +166,12 @@
method: 'get',
data
})
+}
+// 鎭㈠浣滀笟
+export const restoreWork = (data) => {
+ return http({
+ url: 'visitsAdmin/cloudService/web/platformJob/restoreWork',
+ method: 'post',
+ data
+ })
}
\ No newline at end of file
diff --git a/pda/pages/index/center.vue b/pda/pages/index/center.vue
index 3b64e25..ad0c9c2 100644
--- a/pda/pages/index/center.vue
+++ b/pda/pages/index/center.vue
@@ -63,6 +63,7 @@
<view v-if="item.status == 4" class="btn active" @click="handleWork(item)">寮�濮嬩綔涓�</view>
<view v-if="item.status == 5" class="btn" @click="handleErr(item)">寮傚父鎸傝捣</view>
+ <view v-if="item.status == 8" class="btn" @click="restore(item)">寮傚父鎸傝捣</view>
<view v-if="item.status == 5 || item.status == 8" class="btn" @click="handleTransform(item)">杞Щ鏈堝彴</view>
<view v-if="item.status == 5 || item.status == 8" class="btn active" @click="handleFinish(item)">浣滀笟瀹屾垚</view>
</view>
@@ -227,7 +228,8 @@
platformMove,
platformErr,
platformOverNumber,
- wmsJobDetail
+ wmsJobDetail,
+ restoreWork
} from '@/api'
import {
statusMap
@@ -565,6 +567,21 @@
}
}
})
+ },
+ restore(item) {
+ uni.showModal({
+ content: '鎮ㄧ‘璁よ瀵硅浠诲姟杩涜鎭㈠浣滀笟鍚�',
+ success: (res) => {
+ if (res.confirm) {
+ restoreWork({
+ jobId: item.id
+ }).then(ress => {
+ this.showToast('鎭㈠浣滀笟鎴愬姛')
+ this.getPlatformTask()
+ })
+ }
+ }
+ })
}
}
}
diff --git a/screen/index.html b/screen/index.html
index 307a090..d510228 100644
--- a/screen/index.html
+++ b/screen/index.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>瀹夋嘲鐗╂祦鏈堝彴鍙彿澶у睆</title>
+ <title>瀹夋嘲鏅烘収鐗╂祦鍥尯绯荤粺</title>
</head>
<body>
<div id="app"></div>
--
Gitblit v1.9.3