From 51e18e190dafdec70dc1f4a3a9ecd76fb2116726 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期六, 12 十月 2024 16:25:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/views/index.vue | 114 +++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 87 insertions(+), 27 deletions(-)
diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index a391765..16c38ad 100644
--- a/admin/src/views/index.vue
+++ b/admin/src/views/index.vue
@@ -65,7 +65,7 @@
<div class="funcs">
<div class="home_title">甯哥敤鍔熻兘</div>
<div class="list">
- <div v-for="item in funcList" :key="item.name" class="item">
+ <div v-for="item in funcList" @click="funcClick(item)" :key="item.name" class="item">
<img class="mb10" :src="item.url" alt="" />
<div>{{ item.name }}</div>
</div>
@@ -226,60 +226,68 @@
import * as echarts from 'echarts'
import { weeks } from '@/utils/config'
import {
- getWorkbenchBody,
- getWorkbenchHead
+ getWorkbenchData,
+ getAppHeaderNav
} from '@/api'
const colors = ['#52a4f7', '#7678f7', '#5fc6d5']
export default {
- data () {
+ data() {
return {
colors,
nowDate: '',
nowWeek: '',
funcList: [
- { name: '璁垮鎶ュ', path: '', url: require('@/assets/icons/home_func1.png') },
- { name: '闅愭偅闅忔墜鎷�', path: '', url: require('@/assets/icons/home_func2.png') },
- { name: '棰勭害浼氳瀹�', path: '', url: require('@/assets/icons/home_func3.png') },
+ { name: '璁垮鎶ュ', path: '', url: require('@/assets/icons/home_func1.png'), path: '/business/reportRecord' },
+ { name: '闅愭偅闅忔墜鎷�', path: '', url: require('@/assets/icons/home_func2.png'), path: '/operation/danger/record' },
+ { name: '棰勭害浼氳瀹�', path: '', url: require('@/assets/icons/home_func3.png'), path: '/meeting/bookings' },
{ name: '鑰冨嫟宸ヤ綔鍙�', path: '', url: require('@/assets/icons/home_func4.png') }
]
}
},
computed: {
- userInfo(){
+ userInfo() {
return this.$store.state.userInfo
}
},
- created () {
-
+ created() {
this.updateDate()
setInterval(() => {
this.updateDate()
}, 1000 * 60 * 60)
},
- mounted () {
+ mounted() {
this.initData()
},
methods: {
- updateDate () {
+ funcClick(item) {
+ if (item.name == '鑰冨嫟宸ヤ綔鍙�') {
+ getAppHeaderNav(4).then(res => {
+ window.open(res, "_blank")
+ return
+ })
+ }
+ this.$router.push(item.path)
+ },
+ updateDate() {
this.nowDate = dayjs().format('YYYY骞碝鏈圖鏃�')
this.nowWeek = weeks[new Date().getDay()]
},
- initData () {
+ initData() {
this.getWorkBody() //涓讳綋鏁版嵁
this.getWorkHead() //涓讳綋鏁版嵁
-
+
this.initEchart1()
this.initEchart2()
this.initEchart3()
this.initEchart4()
},
getWorkBody() {
- getWorkbenchBody()
+ getWorkbenchData({queryType: 2})
},
getWorkHead() {
- getWorkbenchHead()
+ getWorkbenchData({queryType: 1})
},
- initEchart1 () {
+ initEchart1() {
const myChart = echarts.init(document.getElementById('echart1'))
const option = {
series: [
@@ -307,7 +315,7 @@
myChart.resize()
})
},
- initEchart2 () {
+ initEchart2() {
const myChart = echarts.init(document.getElementById('echart2'))
myChart.setOption({
grid: {
@@ -362,7 +370,7 @@
myChart.resize()
})
},
- initEchart3 () {
+ initEchart3() {
const myChart = echarts.init(document.getElementById('echart3'))
myChart.setOption({
tooltip: {
@@ -449,9 +457,9 @@
symbol: 'circle',
symbolSize: 10,
itemStyle: {
- normal: {
- color: '#207FF7' // 鎶樼嚎鐐圭殑棰滆壊
- }
+ borderWidth: 1,
+ borderColor: '#fff',
+ color: '#207FF7'
},
smooth: false
}
@@ -461,7 +469,7 @@
myChart.resize()
})
},
- initEchart4 () {
+ initEchart4() {
const myChart = echarts.init(document.getElementById('echart4'))
myChart.setOption({
tooltip: {
@@ -548,9 +556,9 @@
symbol: 'circle',
symbolSize: 10,
itemStyle: {
- normal: {
- color: '#42D49D' // 鎶樼嚎鐐圭殑棰滆壊
- }
+ borderWidth: 1,
+ borderColor: '#fff',
+ color: '#42D49D' // 鎶樼嚎鐐圭殑棰滆壊
},
smooth: false
}
@@ -568,23 +576,28 @@
div {
box-sizing: border-box;
}
+
.home_title {
font-weight: 600;
font-size: 16px;
color: #222222;
line-height: 22px;
}
+
.main {
display: flex;
position: relative;
z-index: 99;
+
.app_content {
flex: 1;
+
.static_card {
height: 187px;
color: #fff;
display: flex;
justify-content: space-between;
+
.card {
flex: 1;
height: 187px;
@@ -592,16 +605,20 @@
box-shadow: 0px 2px 10px 0px rgba(32, 127, 247, 0.4);
border-radius: 8px;
margin-right: 14px;
+
&:nth-of-type(2) {
background: linear-gradient(270deg, #8383ff 0%, #6b6eff 100%);
}
+
&:nth-of-type(3) {
background: linear-gradient(270deg, #42d49d 0%, #12bb8b 100%);
}
+
&:nth-of-type(4) {
margin-right: 0;
background: linear-gradient(270deg, #30d3de 0%, #04b7cd 100%);
}
+
.header {
height: 103px;
display: flex;
@@ -609,16 +626,19 @@
align-items: center;
padding: 20px 20px 12px;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
+
img {
width: 40px;
height: 40px;
}
+
.num {
font-weight: 600;
font-size: 30px;
margin-top: 12px;
}
}
+
.content {
height: 82px;
display: flex;
@@ -629,20 +649,25 @@
}
}
}
+
.funcs {
height: 149px;
padding: 20px;
background: #fff;
margin: 10px 0;
+
.list {
display: flex;
padding-top: 20px;
+
.item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-right: 24px;
+ cursor: pointer;
+
img {
width: 44px;
height: 44px;
@@ -651,9 +676,11 @@
}
}
}
+
.app_side {
width: 408px;
margin-left: 10px;
+
.task {
background: #fff;
border-radius: 2px;
@@ -661,6 +688,7 @@
padding: 20px;
height: 346px;
margin-bottom: 10px;
+
.header {
.num {
position: relative;
@@ -675,27 +703,33 @@
border-radius: 8px;
margin-left: 13px;
}
+
.more {
font-size: 13px;
color: #999999;
}
}
+
.list {
.item {
display: flex;
align-items: center;
margin-top: 15px;
+
.content {
flex: 1;
+
.title {
color: #222222;
margin-bottom: 5px;
}
+
.time {
color: #999999;
font-size: 12px;
}
}
+
.btn {
margin-left: 10px;
width: 58px;
@@ -711,12 +745,14 @@
}
}
}
+
.warnning {
background: #fff;
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 20px;
height: 508px;
+
.header {
.num {
position: relative;
@@ -731,13 +767,16 @@
border-radius: 8px;
margin-left: 13px;
}
+
.more {
font-size: 13px;
color: #999999;
}
}
+
.list {
padding-top: 6px;
+
.item {
margin-top: 10px;
padding: 15px;
@@ -745,29 +784,35 @@
height: 140px;
background: rgba(32, 127, 247, 0.05);
border-radius: 4px;
+
.name_wrap {
margin-bottom: 10px;
+
.name {
font-weight: 600;
color: #222222;
}
+
.identity {
font-size: 13px;
color: #207ff7;
}
}
+
.line {
color: #666666;
margin-bottom: 8px;
font-size: 13px;
}
+
.auth {
.time {
font-weight: 600;
font-size: 13px;
color: #ee3821;
}
- .btn{
+
+ .btn {
margin-left: 10px;
width: 58px;
text-align: center;
@@ -784,6 +829,7 @@
}
}
}
+
.static_wrap {
.wrap {
background: #fff;
@@ -792,30 +838,37 @@
border: 1px solid #eeeeee;
height: 250px;
flex: 1;
+
&:nth-of-type(2n) {
margin-left: 10px;
}
+
.echart {
width: 100%;
height: 190px;
}
+
.header {
display: flex;
justify-content: space-between;
align-items: center;
+
.more {
font-size: 13px;
color: #999999;
}
}
}
+
.static1 {
.content {
display: flex;
justify-content: center;
align-items: center;
+
.echart_wrap {
position: relative;
+
.pie_text {
position: absolute;
left: 50%;
@@ -824,16 +877,20 @@
z-index: 999;
}
}
+
.echart {
width: 150px;
height: 150px;
}
+
.list {
margin-left: 36px;
+
.item {
display: flex;
align-items: center;
margin: 8px 0;
+
.icon {
width: 16px;
height: 16px;
@@ -841,6 +898,7 @@
margin-right: 6px;
background: linear-gradient(270deg, #29aeff 0%, #207ff7 100%);
}
+
.text {
margin-right: 6px;
}
@@ -850,6 +908,7 @@
}
}
}
+
.main_home {
background: #f4f7fc;
position: relative;
@@ -858,6 +917,7 @@
overflow: auto;
padding: 20px;
padding-top: 92px;
+
.home_header {
position: absolute;
top: 0;
--
Gitblit v1.9.3