From e1c24d5ac92e89b214efe5a313b31459ddab537f Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 24 九月 2024 16:43:51 +0800
Subject: [PATCH] ll

---
 admin/src/views/index.vue |   97 +++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 79 insertions(+), 18 deletions(-)

diff --git a/admin/src/views/index.vue b/admin/src/views/index.vue
index a391765..2fbeab3 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>
@@ -227,47 +227,56 @@
 import { weeks } from '@/utils/config'
 import {
   getWorkbenchBody,
-  getWorkbenchHead
+  getWorkbenchHead,
+  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()
@@ -279,7 +288,7 @@
     getWorkHead() {
       getWorkbenchHead()
     },
-    initEchart1 () {
+    initEchart1() {
       const myChart = echarts.init(document.getElementById('echart1'))
       const option = {
         series: [
@@ -307,7 +316,7 @@
         myChart.resize()
       })
     },
-    initEchart2 () {
+    initEchart2() {
       const myChart = echarts.init(document.getElementById('echart2'))
       myChart.setOption({
         grid: {
@@ -362,7 +371,7 @@
         myChart.resize()
       })
     },
-    initEchart3 () {
+    initEchart3() {
       const myChart = echarts.init(document.getElementById('echart3'))
       myChart.setOption({
         tooltip: {
@@ -461,7 +470,7 @@
         myChart.resize()
       })
     },
-    initEchart4 () {
+    initEchart4() {
       const myChart = echarts.init(document.getElementById('echart4'))
       myChart.setOption({
         tooltip: {
@@ -568,23 +577,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 +606,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 +627,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 +650,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 +677,11 @@
       }
     }
   }
+
   .app_side {
     width: 408px;
     margin-left: 10px;
+
     .task {
       background: #fff;
       border-radius: 2px;
@@ -661,6 +689,7 @@
       padding: 20px;
       height: 346px;
       margin-bottom: 10px;
+
       .header {
         .num {
           position: relative;
@@ -675,27 +704,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 +746,14 @@
         }
       }
     }
+
     .warnning {
       background: #fff;
       border-radius: 2px;
       border: 1px solid #eeeeee;
       padding: 20px;
       height: 508px;
+
       .header {
         .num {
           position: relative;
@@ -731,13 +768,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 +785,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 +830,7 @@
       }
     }
   }
+
   .static_wrap {
     .wrap {
       background: #fff;
@@ -792,30 +839,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 +878,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 +899,7 @@
               margin-right: 6px;
               background: linear-gradient(270deg, #29aeff 0%, #207ff7 100%);
             }
+
             .text {
               margin-right: 6px;
             }
@@ -850,6 +909,7 @@
     }
   }
 }
+
 .main_home {
   background: #f4f7fc;
   position: relative;
@@ -858,6 +918,7 @@
   overflow: auto;
   padding: 20px;
   padding-top: 92px;
+
   .home_header {
     position: absolute;
     top: 0;

--
Gitblit v1.9.3