| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476 |
- <template>
- <div class="dashboard-container" v-if="render" >
- <div class="header">
- <div class="title clickScoop" @click="openDrawer('数据管理')">
- 变电配电大数据可视化系统
- </div>
- <div class="r-title">
- <span @click="$refs.datePicker.open = true" style="cursor: pointer"> {{ dateTitle }}</span>
- <a-date-picker :showToday="true" :locale="locale"
- @click="$refs.datePicker.open = false"
- style="position: absolute;right:20px;top:10px;z-index: -1"
- ref="datePicker"
- value-format="YYYY-MM-DD"
- :value="date"
- @change="timeChange"
- placeholder="时间"
- />
- </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 ScreenDlts from '@/views/dashboard-screen/screen/screenDlts/screenDlts.vue'
- import ScreenSbxjdxqk from '@/views/dashboard-screen/screen/screenSbxjdxqk/screenSbxjdxqk.vue'
- import ScreenSjdr from '@/views/dashboard-screen/screen/sjdr/index.vue'
- // import 'moment/dist/locale/zh-cn'
- // import 'dayjs/locale/zh-cn'
- 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,
- date: dayjs().locale('zh-cn'),
- dateTitle: dayjs().locale('zh-cn').format('YYYY年MM月DD日 星期dd'),
- drawer: {
- title: '数据管理',
- visible: false,
- direction: 'btt',
- comp: ScreenSjdr
- }
- }
- },
- 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)
- window['is'] = this
- // setInterval(() => {
- // this.dateTitle = dayjs().locale('zh-cn').format('YYYY年MM月DD日 星期dd')
- // this.date = dayjs().locale('zh-cn')
- // }, 1000)
- },
- methods: {
- timeChange(evt) {
- console.log('evt', evt)
- this.date = dayjs(evt).locale('zh-cn')
- this.dateTitle = dayjs(evt).locale('zh-cn').format('YYYY年MM月DD日 星期dd')
- this.$refs.datePicker.open = false
- },
- openDrawer(title) {
- const map = {
- '检修兑现情况': ScreenJxdxqk,
- '变电-电力异常信息': ScreenBdDlYcxx,
- '试验计划本月兑现情况': ScreenSyjhbydxqk,
- // '待办事项': ScreenDbsx,
- '电力远动调试本月兑现情况': ScreenDlts,
- '设备巡检兑现情况': ScreenSbxjdxqk,
- '数据管理': ScreenSjdr
- }
- if (!map[title]) {
- return
- }
- this.drawer.title = title
- this.drawer.visible = true
- this.drawer.comp = map[title]
- this.drawer = Object.assign({}, this.drawer)
- }
- }
- }
- </script>
- <style>
- ::-webkit-scrollbar {
- background-color: transparent;
- width: 8px;
- height: 8px;
- background-clip: padding-box;
- }
- /*滚动条两端方向按钮*/
- ::-webkit-scrollbar-button {
- height: 0px;
- width: 0px;
- }
- /*滚动条中间滑动部分*/
- ::-webkit-scrollbar-thumb {
- background-color: #dbdbdb;
- border-radius: 4px;
- }
- /*滚动条右下角区域*/
- ::-webkit-scrollbar-corner {
- background-color: transparent;
- }
- </style>
- <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;
- padding-bottom: 13px;
- .clickScoop {
- pointer-events: all;
- cursor: pointer;
- }
- .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: 147;
- flex-shrink: 0;
- overflow: hidden;
- height: 100%;
- display: grid;
- grid-template-rows: 2fr 1fr;
- grid-template-columns: 1fr 1fr 2fr;
- grid-auto-flow: row;
- .o-item {
- width: 100%;
- overflow: hidden;
- &.map {
- grid-column-start: 1;
- grid-column-end: 4;
- 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: 43;
- 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;
- height: 100vh;
- width: 100vw;
- .screen-common-wrap {
- max-height: calc(100vh - 100px);
- overflow: hidden;
- overflow-y: auto;
- height: fit-content;
- background-color: #fff;
- border-radius: 0.5vw;
- }
- header {
- color: #fff;
- font-size: 35px;
- font-weight: bold;
- span {
- outline: none !important;
- }
- }
- .el-drawer__body {
- height: calc(100% - 100px);
- }
- }
- .el-drawer__wrapper {
- //z-index: 1 !important;
- }
- ::v-deep {
- .el-drawer__wrapper {
- //z-index: 1 !important;
- }
- }
- }
- </style>
|