| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375 |
- <template>
- <div class="dashboard-container" v-if="render">
- <div class="header">
- <div class="title">
- 变电配电大数据可视化系统
- </div>
- <div class="r-title">
- {{ dateTitle }}
- </div>
- </div>
- <div class="content-wrap">
- <div class="coner left">
- <div class="o-item map">
- <ChartMap/>
- <div class="jryl-wrap">
- <CardWrap>
- <span slot="title" @click="openDrawer('变电-电力异常信息')">今日遗留</span>
- <div slot="content">
- <Jryl/>
- </div>
- </CardWrap>
- </div>
- </div>
- <div class="o-item">
- <CardWrap>
- <span slot="title" @click="openDrawer('试验计划本月兑现情况')">试验计划兑现情况</span>
- <div slot="content">
- <SyjhdxqkChart/>
- </div>
- </CardWrap>
- </div>
- <div class="o-item">
- <CardWrap>
- <span slot="title" @click="openDrawer('电力远动调试本月兑现情况')">电力远动调试兑现情况</span>
- <div slot="content">
- <Dlydtssx/>
- </div>
- </CardWrap>
- </div>
- <div class="o-item b-r-3">
- <div class="t-1">
- <CardWrap>
- <span slot="title" @click="openDrawer('电力远动调试本月兑现情况')">电力受电线路</span>
- <div slot="content">
- <Dlsdxl/>
- </div>
- </CardWrap>
- </div>
- <div class="t-2">
- <CardWrap>
- <span slot="title" @click="openDrawer('电力远动调试本月兑现情况')">电力变配电所</span>
- <div slot="content">
- <Dlbpds/>
- </div>
- </CardWrap>
- </div>
- </div>
- </div>
- <div class="coner right">
- <div class="sop sop-1">
- <CardWrap>
- <span slot="title" @click="openDrawer('待办事项')">重要待办事项</span>
- <div slot="content">
- <Zydbsx/>
- </div>
- </CardWrap>
- </div>
- <div class="sop sop-2">
- <CardWrap>
- <span slot="title" @click="openDrawer('检修兑现情况')">检修兑现情况</span>
- <div slot="content">
- <Jxdxqk/>
- </div>
- </CardWrap>
- </div>
- <div class="sop sop-3">
- <CardWrap>
- <span slot="title" @click="openDrawer('设备巡检兑现情况')">牵变、电力设备巡视兑现(本月)</span>
- <div slot="content">
- <QbDlsbxjdx/>
- </div>
- </CardWrap>
- </div>
- </div>
- </div>
- <el-drawer
- custom-class="drawer-wrap"
- :title="drawer.title"
- :visible.sync="drawer.visible"
- :with-header="true"
- size="100%"
- :direction="drawer.direction"
- >
- <component :is="drawer.comp"/>
- </el-drawer>
- </div>
- </template>
- <script>
- import CardWrap from '@/views/dashboard-screen/chard-wrap/card-wrap.vue'
- import SyjhdxqkChart from '@/views/dashboard-screen/syjhdxqk/index.vue'
- import Dlydtssx from '@/views/dashboard-screen/dlydtssx/index.vue'
- import Dlsdxl from '@/views/dashboard-screen/dlsdxl/index.vue'
- import Dlbpds from '@/views/dashboard-screen/dlbpds/index.vue'
- import Zydbsx from '@/views/dashboard-screen/zydbsx/index.vue'
- import Jxdxqk from '@/views/dashboard-screen/jxdxqk/index.vue'
- import QbDlsbxjdx from '@/views/dashboard-screen/qb-dlsbxjdx/index.vue'
- import Jryl from '@/views/dashboard-screen/jryl/index.vue'
- import ChartMap from '@/views/dashboard-screen/chart-map/chartMap.vue'
- import dayjs from 'dayjs'
- import ScreenBdDlYcxx from '@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/ScreenBdDlYcxx.vue'
- import ScreenJxdxqk from '@/views/dashboard-screen/screen/screenJxdxqk.vue'
- import ScreenSyjhbydxqk from '@/views/dashboard-screen/screen/ScreenSyjhbydxqk.vue'
- import ScreenDbsx from '@/views/dashboard-screen/screen/screenDbsx/ScreenDbsx.vue'
- import ScreenDlts from '@/views/dashboard-screen/screen/screenDlts/screenDlts.vue'
- import ScreenSbxjdxqk from '@/views/dashboard-screen/screen/screenSbxjdxqk/screenSbxjdxqk.vue'
- import * as _ from 'lodash'
- require('dayjs/locale/zh-cn')
- export default {
- name: 'Dashboard',
- components: {ChartMap, Jryl, QbDlsbxjdx, Jxdxqk, Zydbsx, Dlbpds, Dlsdxl, CardWrap, SyjhdxqkChart, Dlydtssx},
- data() {
- return {
- render: true,
- dateTitle: dayjs().locale('zh-cn').format('YYYY年MM月DD日 d'),
- drawer: {
- title: '',
- visible: false,
- direction: 'btt',
- comp: null
- }
- }
- },
- watch: {
- $route: {
- handler: (route) => {
- // this.redirect = route.query && route.query.redirect
- },
- immediate: true
- }
- },
- created() {
- const doResize = _.debounce(() => {
- console.log('doResize')
- this.render = false;
- setTimeout(() => {
- this.render = true
- }, 100)
- }, 500)
- window.addEventListener('resize', doResize)
- setInterval(() => {
- this.dateTitle = dayjs().locale('zh-cn').format('YYYY年MM月DD日 星期dd')
- }, 1000)
- },
- methods: {
- openDrawer(title) {
- const map = {
- '检修兑现情况': ScreenJxdxqk,
- '变电-电力异常信息': ScreenBdDlYcxx,
- '试验计划本月兑现情况': ScreenSyjhbydxqk,
- '待办事项': ScreenDbsx,
- '电力远动调试本月兑现情况': ScreenDlts,
- '设备巡检兑现情况': ScreenSbxjdxqk
- }
- this.drawer.title = title
- this.drawer.visible = true
- this.drawer.comp = map[title]
- this.drawer = Object.assign({}, this.drawer)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @font-face {
- font-family: "hxb";
- src: url("hxb.woff2") format('woff2'),;
- font-weight: 400;
- font-style: normal;
- }
- @font-face {
- font-family: "shr";
- src: url("shr.woff2") format('woff2'),;
- font-weight: 400;
- font-style: normal;
- }
- * {
- font: 400 auto shr;
- }
- .hxbFont {
- font: 400 auto hxb;
- }
- .dashboard-container {
- width: 100%;
- height: 100%;
- min-height: fit-content;
- //min-width: 1920px;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: flex-start;
- background-image: url("/static/images/bg.png");
- background-repeat: no-repeat;
- background-size: cover;
- .header {
- width: 100%;
- height: 88px;
- flex-shrink: 0;
- background-image: url("/static/images/header@2x.png");
- background-repeat: no-repeat;
- background-size: 100% 100%;
- display: flex;
- .title {
- width: 30%;
- height: 100%;
- flex-shrink: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 36px;
- font-weight: bold;
- color: white;
- }
- .r-title {
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-left: auto;
- width: fit-content;
- padding-right: 3vw;
- font-size: 36px;
- font-weight: bold;
- color: white;
- font: normal 36px hxb;
- }
- }
- .content-wrap {
- width: 100%;
- height: 100%;
- flex-grow: 1;
- display: flex;
- .coner {
- &.left {
- flex: 6.3;
- flex-shrink: 0;
- height: 100%;
- display: grid;
- grid-template-rows: 2fr 1fr;
- grid-template-columns: 1fr 1fr 2fr;
- grid-auto-flow: row;
- .o-item {
- &.map {
- grid-column-start: 1;
- grid-column-end: 5;
- position: relative;
- .jryl-wrap {
- width: 25%;
- height: 20vh;
- position: absolute;
- z-index: 1;
- bottom: 0;
- left: 0;
- }
- }
- &.b-r-3 {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: flex-start;
- .t-1 {
- flex: 1.5;
- width: 100%;
- flex-shrink: 0;
- }
- .t-2 {
- flex: 1;
- width: 100%;
- flex-shrink: 0;
- }
- }
- }
- }
- &.right {
- flex: 1.3;
- flex-shrink: 0;
- overflow: hidden;
- width: 100%;
- height: 100%;
- display: flex;
- flex-direction: column;
- .sop {
- width: 100%;
- height: 100%;
- flex-direction: 0;
- overflow: hidden;
- //border: 1px solid teal;
- &.sop-1 {
- flex: 1.5;
- ::v-deep {
- .card-wrap {
- .content {
- height: calc(100% - 20px);
- overflow-y: auto;
- }
- }
- }
- }
- &.sop-2 {
- flex: 1.2
- }
- &.sop-3 {
- flex: 2
- }
- }
- }
- }
- }
- }
- ::v-deep {
- .drawer-wrap {
- background-image: url("/static/images/bg.png");
- background-repeat: no-repeat;
- background-size: cover;
- header {
- color: #fff;
- font-size: 1.3vw;
- span {
- outline: none !important;
- }
- }
- }
- }
- </style>
|