index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <template>
  2. <div class="dashboard-container" v-if="render">
  3. <div class="header">
  4. <div class="title clickScoop" @click="openDrawer('数据管理')">
  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 ScreenDlts from '@/views/dashboard-screen/screen/screenDlts/screenDlts.vue'
  114. import ScreenSbxjdxqk from '@/views/dashboard-screen/screen/screenSbxjdxqk/screenSbxjdxqk.vue'
  115. import ScreenSjdr from '@/views/dashboard-screen/screen/sjdr/index.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: ScreenSjdr
  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. '数据管理': ScreenSjdr
  164. }
  165. if (!map[title]) {
  166. return
  167. }
  168. this.drawer.title = title
  169. this.drawer.visible = true
  170. this.drawer.comp = map[title]
  171. this.drawer = Object.assign({}, this.drawer)
  172. }
  173. }
  174. }
  175. </script>
  176. <style>
  177. ::-webkit-scrollbar {
  178. background-color: transparent;
  179. width: 8px;
  180. height: 8px;
  181. background-clip: padding-box;
  182. }
  183. /*滚动条两端方向按钮*/
  184. ::-webkit-scrollbar-button {
  185. height: 0px;
  186. width: 0px;
  187. }
  188. /*滚动条中间滑动部分*/
  189. ::-webkit-scrollbar-thumb {
  190. background-color: #dbdbdb;
  191. border-radius: 4px;
  192. }
  193. /*滚动条右下角区域*/
  194. ::-webkit-scrollbar-corner {
  195. background-color: transparent;
  196. }
  197. </style>
  198. <style lang="scss" scoped>
  199. @font-face {
  200. font-family: "hxb";
  201. src: url("hxb.woff2") format('woff2'),;
  202. font-weight: 400;
  203. font-style: normal;
  204. }
  205. @font-face {
  206. font-family: "shr";
  207. src: url("shr.woff2") format('woff2'),;
  208. font-weight: 400;
  209. font-style: normal;
  210. }
  211. * {
  212. font: 400 auto shr;
  213. }
  214. .hxbFont {
  215. font: 400 auto hxb;
  216. }
  217. .dashboard-container {
  218. width: 100%;
  219. height: 100%;
  220. min-height: fit-content;
  221. //min-width: 1920px;
  222. display: flex;
  223. flex-direction: column;
  224. align-items: flex-start;
  225. justify-content: flex-start;
  226. background-image: url("/static/images/bg.png");
  227. background-repeat: no-repeat;
  228. background-size: cover;
  229. padding-bottom: 13px;
  230. .clickScoop {
  231. pointer-events: all;
  232. cursor: pointer;
  233. }
  234. .header {
  235. width: 100%;
  236. height: 88px;
  237. flex-shrink: 0;
  238. background-image: url("/static/images/header@2x.png");
  239. background-repeat: no-repeat;
  240. background-size: 100% 100%;
  241. display: flex;
  242. .title {
  243. width: 30%;
  244. height: 100%;
  245. flex-shrink: 0;
  246. display: flex;
  247. align-items: center;
  248. justify-content: center;
  249. font-size: 36px;
  250. font-weight: bold;
  251. color: white;
  252. }
  253. .r-title {
  254. height: 100%;
  255. display: flex;
  256. align-items: center;
  257. justify-content: center;
  258. margin-left: auto;
  259. width: fit-content;
  260. padding-right: 3vw;
  261. font-size: 36px;
  262. font-weight: bold;
  263. color: white;
  264. font: normal 36px hxb;
  265. }
  266. }
  267. .content-wrap {
  268. width: 100%;
  269. height: 100%;
  270. flex-grow: 1;
  271. display: flex;
  272. .coner {
  273. &.left {
  274. flex: 147;
  275. flex-shrink: 0;
  276. overflow: hidden;
  277. height: 100%;
  278. display: grid;
  279. grid-template-rows: 2fr 1fr;
  280. grid-template-columns: 1fr 1fr 2fr;
  281. grid-auto-flow: row;
  282. .o-item {
  283. width: 100%;
  284. overflow: hidden;
  285. &.map {
  286. grid-column-start: 1;
  287. grid-column-end: 4;
  288. position: relative;
  289. .jryl-wrap {
  290. width: 25%;
  291. height: 20vh;
  292. position: absolute;
  293. z-index: 1;
  294. bottom: 0;
  295. left: 0;
  296. }
  297. }
  298. &.b-r-3 {
  299. display: flex;
  300. flex-direction: column;
  301. align-items: flex-start;
  302. justify-content: flex-start;
  303. .t-1 {
  304. flex: 1.5;
  305. width: 100%;
  306. flex-shrink: 0;
  307. }
  308. .t-2 {
  309. flex: 1;
  310. width: 100%;
  311. flex-shrink: 0;
  312. }
  313. }
  314. }
  315. }
  316. &.right {
  317. flex: 43;
  318. flex-shrink: 0;
  319. overflow: hidden;
  320. width: 100%;
  321. height: 100%;
  322. display: flex;
  323. flex-direction: column;
  324. .sop {
  325. width: 100%;
  326. height: 100%;
  327. flex-direction: 0;
  328. overflow: hidden;
  329. //border: 1px solid teal;
  330. &.sop-1 {
  331. flex: 1.5;
  332. ::v-deep {
  333. .card-wrap {
  334. .content {
  335. height: calc(100% - 20px);
  336. overflow-y: auto;
  337. }
  338. }
  339. }
  340. }
  341. &.sop-2 {
  342. flex: 1.2
  343. }
  344. &.sop-3 {
  345. flex: 2
  346. }
  347. }
  348. }
  349. }
  350. }
  351. }
  352. ::v-deep {
  353. .drawer-wrap {
  354. background-image: url("/static/images/bg.png");
  355. background-repeat: no-repeat;
  356. background-size: cover;
  357. height: 100vh;
  358. width: 100vw;
  359. .screen-common-wrap {
  360. max-height: calc(100vh - 100px);
  361. overflow: hidden;
  362. overflow-y: auto;
  363. height: fit-content;
  364. background-color: #fff;
  365. border-radius: 0.5vw;
  366. }
  367. header {
  368. color: #fff;
  369. font-size: 35px;
  370. font-weight: bold;
  371. span {
  372. outline: none !important;
  373. }
  374. }
  375. .el-drawer__body {
  376. height: calc(100% - 100px);
  377. }
  378. }
  379. .el-drawer__wrapper {
  380. //z-index: 1 !important;
  381. }
  382. ::v-deep {
  383. .el-drawer__wrapper {
  384. //z-index: 1 !important;
  385. }
  386. }
  387. }
  388. </style>