| | |
| | | <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> |
| | |
| | | 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年M月D日') |
| | | this.nowWeek = weeks[new Date().getDay()] |
| | | }, |
| | | initData () { |
| | | initData() { |
| | | this.getWorkBody() //主体数据 |
| | | this.getWorkHead() //主体数据 |
| | | |
| | | |
| | | this.initEchart1() |
| | | this.initEchart2() |
| | | this.initEchart3() |
| | |
| | | getWorkHead() { |
| | | getWorkbenchHead() |
| | | }, |
| | | initEchart1 () { |
| | | initEchart1() { |
| | | const myChart = echarts.init(document.getElementById('echart1')) |
| | | const option = { |
| | | series: [ |
| | |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | initEchart2 () { |
| | | initEchart2() { |
| | | const myChart = echarts.init(document.getElementById('echart2')) |
| | | myChart.setOption({ |
| | | grid: { |
| | |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | initEchart3 () { |
| | | initEchart3() { |
| | | const myChart = echarts.init(document.getElementById('echart3')) |
| | | myChart.setOption({ |
| | | tooltip: { |
| | |
| | | myChart.resize() |
| | | }) |
| | | }, |
| | | initEchart4 () { |
| | | initEchart4() { |
| | | const myChart = echarts.init(document.getElementById('echart4')) |
| | | myChart.setOption({ |
| | | tooltip: { |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .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; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .app_side { |
| | | width: 408px; |
| | | margin-left: 10px; |
| | | |
| | | .task { |
| | | background: #fff; |
| | | border-radius: 2px; |
| | |
| | | padding: 20px; |
| | | height: 346px; |
| | | margin-bottom: 10px; |
| | | |
| | | .header { |
| | | .num { |
| | | position: relative; |
| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .warnning { |
| | | background: #fff; |
| | | border-radius: 2px; |
| | | border: 1px solid #eeeeee; |
| | | padding: 20px; |
| | | height: 508px; |
| | | |
| | | .header { |
| | | .num { |
| | | position: relative; |
| | |
| | | border-radius: 8px; |
| | | margin-left: 13px; |
| | | } |
| | | |
| | | .more { |
| | | font-size: 13px; |
| | | color: #999999; |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | padding-top: 6px; |
| | | |
| | | .item { |
| | | margin-top: 10px; |
| | | padding: 15px; |
| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .static_wrap { |
| | | .wrap { |
| | | background: #fff; |
| | |
| | | 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%; |
| | |
| | | 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; |
| | |
| | | margin-right: 6px; |
| | | background: linear-gradient(270deg, #29aeff 0%, #207ff7 100%); |
| | | } |
| | | |
| | | .text { |
| | | margin-right: 6px; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .main_home { |
| | | background: #f4f7fc; |
| | | position: relative; |
| | |
| | | overflow: auto; |
| | | padding: 20px; |
| | | padding-top: 92px; |
| | | |
| | | .home_header { |
| | | position: absolute; |
| | | top: 0; |