index.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. <template>
  2. <div class="dashboard-container" v-if="render">
  3. <div class="header">
  4. <div class="title">
  5. 变电配电大数据可视化系统
  6. </div>
  7. <div class="r-title">
  8. {{ dateTitle }}
  9. </div>
  10. </div>
  11. <div class="content-wrap">
  12. <div class="coner left">
  13. <div class="o-item map">
  14. <ChartMap/>
  15. <div class="jryl-wrap">
  16. <CardWrap>
  17. <span slot="title" @click="openDrawer('变电-电力异常信息')">今日遗留</span>
  18. <div slot="content">
  19. <Jryl/>
  20. </div>
  21. </CardWrap>
  22. </div>
  23. </div>
  24. <div class="o-item">
  25. <CardWrap>
  26. <span slot="title" @click="openDrawer('试验计划本月兑现情况')">试验计划兑现情况</span>
  27. <div slot="content">
  28. <SyjhdxqkChart/>
  29. </div>
  30. </CardWrap>
  31. </div>
  32. <div class="o-item">
  33. <CardWrap>
  34. <span slot="title" @click="openDrawer('电力远动调试本月兑现情况')">电力远动调试兑现情况</span>
  35. <div slot="content">
  36. <Dlydtssx/>
  37. </div>
  38. </CardWrap>
  39. </div>
  40. <div class="o-item b-r-3">
  41. <div class="t-1">
  42. <CardWrap>
  43. <span slot="title" @click="openDrawer('电力远动调试本月兑现情况')">电力受电线路</span>
  44. <div slot="content">
  45. <Dlsdxl/>
  46. </div>
  47. </CardWrap>
  48. </div>
  49. <div class="t-2">
  50. <CardWrap>
  51. <span slot="title" @click="openDrawer('电力远动调试本月兑现情况')">电力变配电所</span>
  52. <div slot="content">
  53. <Dlbpds/>
  54. </div>
  55. </CardWrap>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="coner right">
  60. <div class="sop sop-1">
  61. <CardWrap>
  62. <span slot="title" @click="openDrawer('待办事项')">重要待办事项</span>
  63. <div slot="content">
  64. <Zydbsx/>
  65. </div>
  66. </CardWrap>
  67. </div>
  68. <div class="sop sop-2">
  69. <CardWrap>
  70. <span slot="title" @click="openDrawer('检修兑现情况')">检修兑现情况</span>
  71. <div slot="content">
  72. <Jxdxqk/>
  73. </div>
  74. </CardWrap>
  75. </div>
  76. <div class="sop sop-3">
  77. <CardWrap>
  78. <span slot="title" @click="openDrawer('设备巡检兑现情况')">牵变、电力设备巡视兑现(本月)</span>
  79. <div slot="content">
  80. <QbDlsbxjdx/>
  81. </div>
  82. </CardWrap>
  83. </div>
  84. </div>
  85. </div>
  86. <el-drawer
  87. custom-class="drawer-wrap"
  88. :title="drawer.title"
  89. :visible.sync="drawer.visible"
  90. :with-header="true"
  91. size="100%"
  92. :direction="drawer.direction"
  93. >
  94. <component :is="drawer.comp"/>
  95. </el-drawer>
  96. </div>
  97. </template>
  98. <script>
  99. import CardWrap from '@/views/dashboard-screen/chard-wrap/card-wrap.vue'
  100. import SyjhdxqkChart from '@/views/dashboard-screen/syjhdxqk/index.vue'
  101. import Dlydtssx from '@/views/dashboard-screen/dlydtssx/index.vue'
  102. import Dlsdxl from '@/views/dashboard-screen/dlsdxl/index.vue'
  103. import Dlbpds from '@/views/dashboard-screen/dlbpds/index.vue'
  104. import Zydbsx from '@/views/dashboard-screen/zydbsx/index.vue'
  105. import Jxdxqk from '@/views/dashboard-screen/jxdxqk/index.vue'
  106. import QbDlsbxjdx from '@/views/dashboard-screen/qb-dlsbxjdx/index.vue'
  107. import Jryl from '@/views/dashboard-screen/jryl/index.vue'
  108. import ChartMap from '@/views/dashboard-screen/chart-map/chartMap.vue'
  109. import dayjs from 'dayjs'
  110. import ScreenBdDlYcxx from '@/views/dashboard-screen/screen/screen_Bd_Dl_Ycxx/ScreenBdDlYcxx.vue'
  111. import ScreenJxdxqk from '@/views/dashboard-screen/screen/screenJxdxqk.vue'
  112. import ScreenSyjhbydxqk from '@/views/dashboard-screen/screen/ScreenSyjhbydxqk.vue'
  113. import ScreenDbsx from '@/views/dashboard-screen/screen/screenDbsx/ScreenDbsx.vue'
  114. import ScreenDlts from '@/views/dashboard-screen/screen/screenDlts/screenDlts.vue'
  115. import ScreenSbxjdxqk from '@/views/dashboard-screen/screen/screenSbxjdxqk/screenSbxjdxqk.vue'
  116. import * as _ from 'lodash'
  117. require('dayjs/locale/zh-cn')
  118. export default {
  119. name: 'Dashboard',
  120. components: {ChartMap, Jryl, QbDlsbxjdx, Jxdxqk, Zydbsx, Dlbpds, Dlsdxl, CardWrap, SyjhdxqkChart, Dlydtssx},
  121. data() {
  122. return {
  123. render: true,
  124. dateTitle: dayjs().locale('zh-cn').format('YYYY年MM月DD日 d'),
  125. drawer: {
  126. title: '',
  127. visible: false,
  128. direction: 'btt',
  129. comp: null
  130. }
  131. }
  132. },
  133. watch: {
  134. $route: {
  135. handler: (route) => {
  136. // this.redirect = route.query && route.query.redirect
  137. },
  138. immediate: true
  139. }
  140. },
  141. created() {
  142. const doResize = _.debounce(() => {
  143. console.log('doResize')
  144. this.render = false
  145. setTimeout(() => {
  146. this.render = true
  147. }, 100)
  148. }, 500)
  149. window.addEventListener('resize', doResize)
  150. setInterval(() => {
  151. this.dateTitle = dayjs().locale('zh-cn').format('YYYY年MM月DD日 星期dd')
  152. }, 1000)
  153. },
  154. methods: {
  155. openDrawer(title) {
  156. const map = {
  157. '检修兑现情况': ScreenJxdxqk,
  158. '变电-电力异常信息': ScreenBdDlYcxx,
  159. '试验计划本月兑现情况': ScreenSyjhbydxqk,
  160. '待办事项': ScreenDbsx,
  161. '电力远动调试本月兑现情况': ScreenDlts,
  162. '设备巡检兑现情况': ScreenSbxjdxqk
  163. }
  164. this.drawer.title = title
  165. this.drawer.visible = true
  166. this.drawer.comp = map[title]
  167. this.drawer = Object.assign({}, this.drawer)
  168. }
  169. }
  170. }
  171. </script>
  172. <style>
  173. ::-webkit-scrollbar {
  174. background-color: transparent;
  175. width: 8px;
  176. height: 8px;
  177. background-clip: padding-box;
  178. }
  179. /*滚动条两端方向按钮*/
  180. ::-webkit-scrollbar-button {
  181. height: 0px;
  182. width: 0px;
  183. }
  184. /*滚动条中间滑动部分*/
  185. ::-webkit-scrollbar-thumb {
  186. background-color: #dbdbdb;
  187. border-radius: 4px;
  188. }
  189. /*滚动条右下角区域*/
  190. ::-webkit-scrollbar-corner {
  191. background-color: transparent;
  192. }
  193. </style>
  194. <style lang="scss" scoped>
  195. @font-face {
  196. font-family: "hxb";
  197. src: url("hxb.woff2") format('woff2'),;
  198. font-weight: 400;
  199. font-style: normal;
  200. }
  201. @font-face {
  202. font-family: "shr";
  203. src: url("shr.woff2") format('woff2'),;
  204. font-weight: 400;
  205. font-style: normal;
  206. }
  207. * {
  208. font: 400 auto shr;
  209. }
  210. .hxbFont {
  211. font: 400 auto hxb;
  212. }
  213. .dashboard-container {
  214. width: 100%;
  215. height: 100%;
  216. min-height: fit-content;
  217. //min-width: 1920px;
  218. display: flex;
  219. flex-direction: column;
  220. align-items: flex-start;
  221. justify-content: flex-start;
  222. background-image: url("/static/images/bg.png");
  223. background-repeat: no-repeat;
  224. background-size: cover;
  225. padding-bottom: 7 vh;
  226. .header {
  227. width: 100%;
  228. height: 88px;
  229. flex-shrink: 0;
  230. background-image: url("/static/images/header@2x.png");
  231. background-repeat: no-repeat;
  232. background-size: 100% 100%;
  233. display: flex;
  234. .title {
  235. width: 30%;
  236. height: 100%;
  237. flex-shrink: 0;
  238. display: flex;
  239. align-items: center;
  240. justify-content: center;
  241. font-size: 36px;
  242. font-weight: bold;
  243. color: white;
  244. }
  245. .r-title {
  246. height: 100%;
  247. display: flex;
  248. align-items: center;
  249. justify-content: center;
  250. margin-left: auto;
  251. width: fit-content;
  252. padding-right: 3vw;
  253. font-size: 36px;
  254. font-weight: bold;
  255. color: white;
  256. font: normal 36px hxb;
  257. }
  258. }
  259. .content-wrap {
  260. width: 100%;
  261. height: 100%;
  262. flex-grow: 1;
  263. display: flex;
  264. .coner {
  265. &.left {
  266. flex: 147;
  267. flex-shrink: 0;
  268. height: 100%;
  269. display: grid;
  270. grid-template-rows: 2fr 1fr;
  271. grid-template-columns: 1fr 1fr 2fr;
  272. grid-auto-flow: row;
  273. .o-item {
  274. &.map {
  275. grid-column-start: 1;
  276. grid-column-end: 5;
  277. position: relative;
  278. .jryl-wrap {
  279. width: 25%;
  280. height: 20vh;
  281. position: absolute;
  282. z-index: 1;
  283. bottom: 0;
  284. left: 0;
  285. }
  286. }
  287. &.b-r-3 {
  288. display: flex;
  289. flex-direction: column;
  290. align-items: flex-start;
  291. justify-content: flex-start;
  292. .t-1 {
  293. flex: 1.5;
  294. width: 100%;
  295. flex-shrink: 0;
  296. }
  297. .t-2 {
  298. flex: 1;
  299. width: 100%;
  300. flex-shrink: 0;
  301. }
  302. }
  303. }
  304. }
  305. &.right {
  306. flex: 43;
  307. flex-shrink: 0;
  308. overflow: hidden;
  309. width: 100%;
  310. height: 100%;
  311. display: flex;
  312. flex-direction: column;
  313. .sop {
  314. width: 100%;
  315. height: 100%;
  316. flex-direction: 0;
  317. overflow: hidden;
  318. //border: 1px solid teal;
  319. &.sop-1 {
  320. flex: 1.5;
  321. ::v-deep {
  322. .card-wrap {
  323. .content {
  324. height: calc(100% - 20px);
  325. overflow-y: auto;
  326. }
  327. }
  328. }
  329. }
  330. &.sop-2 {
  331. flex: 1.2
  332. }
  333. &.sop-3 {
  334. flex: 2
  335. }
  336. }
  337. }
  338. }
  339. }
  340. }
  341. ::v-deep {
  342. .drawer-wrap {
  343. background-image: url("/static/images/bg.png");
  344. background-repeat: no-repeat;
  345. background-size: cover;
  346. height: 100vh;
  347. width: 100vw;
  348. .screen-common-wrap {
  349. max-height: calc(100vh - 100px);
  350. overflow: hidden;
  351. overflow-y: auto;
  352. height: fit-content;
  353. background-color: #fff;
  354. border-radius: 0.5vw;
  355. }
  356. header {
  357. color: #fff;
  358. font-size: 1.3vw;
  359. span {
  360. outline: none !important;
  361. }
  362. }
  363. }
  364. }
  365. </style>