ll
liukangdong
2024-09-24 e1c24d5ac92e89b214efe5a313b31459ddab537f
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,7 +227,8 @@
import { weeks } from '@/utils/config'
import {
  getWorkbenchBody,
  getWorkbenchHead
  getWorkbenchHead,
  getAppHeaderNav
} from '@/api'
const colors = ['#52a4f7', '#7678f7', '#5fc6d5']
export default {
@@ -237,9 +238,9 @@
      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') }
      ]
    }
@@ -250,7 +251,6 @@
    }
  },
  created () {
    this.updateDate()
    setInterval(() => {
      this.updateDate()
@@ -260,6 +260,15 @@
    this.initData()
  },
  methods: {
    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年M月D日')
      this.nowWeek = weeks[new Date().getDay()]
@@ -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,28 +785,34 @@
          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{
              margin-left: 10px;
              width: 58px;
@@ -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;