已添加7个文件
已修改138个文件
已删除4个文件
| | |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'App' |
| | | } |
| | | name: "App" |
| | | }; |
| | | </script> |
| | |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | |
| | | // æ¥è¯¢electricityå表 |
| | | export function getStatisticsList(query) { |
| | |
| | | if(query.timeType=='YEAR'){ |
| | | query.timeType="MONTH" |
| | | }*/ |
| | | query.timeType="HOUR" |
| | | query.timeType = "HOUR"; |
| | | return request({ |
| | | url: '/electricityPrice/statistics/getStatisticsList', |
| | | method: 'get', |
| | | url: "/electricityPrice/statistics/getStatisticsList", |
| | | method: "get", |
| | | params: query |
| | | }) |
| | | }); |
| | | } |
| | | // æ¥è¯¢electricityå表 |
| | | export function getDataStatistics(query) { |
| | | return request({ |
| | | url: '/electricityPrice/statistics/getDataStatistics', |
| | | method: 'get', |
| | | url: "/electricityPrice/statistics/getDataStatistics", |
| | | method: "get", |
| | | params: query |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // å°å³°å¹³è°· ç»è®¡ æ¥è¯¢ |
| | | // æ¥å£ ï¼ electricityDataItem/getDataStatistics?modelCode=1&nodeId=1&timeType=DAY&queryTime=2024-08 |
| | | export function getElectricityDataItemStatistics(query) { |
| | | return request({ |
| | | url: "/electricityDataItem/getDataStatistics", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | } |
| | |
| | | left: 0; |
| | | position: relative; |
| | | margin: 0 auto; |
| | | background: #001233; |
| | | .el-dialog__title{ |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | // refine element ui upload |
| | |
| | | .el-range-editor.el-input__inner { |
| | | display: inline-flex !important; |
| | | } |
| | | |
| | | .el-form-item__label { |
| | | color: #fff; |
| | | } |
| | | |
| | | .el-table { |
| | | background: none |
| | | } |
| | | |
| | | .el-table .el-table__header-wrapper th, .el-table th { |
| | | background-color: #054586 !important; |
| | | color: #fff !important; |
| | | } |
| | | |
| | | .el-table tr { |
| | | color: #fff; |
| | | background-color: #021441; |
| | | } |
| | | |
| | | .el-table th.is-leaf, .el-table td { |
| | | border-bottom: 1px solid rgba(255, 255, 255, 0.15); |
| | | } |
| | | |
| | | .el-table__footer-wrapper td { |
| | | border-top: 1px solid rgba(255, 255, 255, 0.15); |
| | | |
| | | } |
| | | |
| | | .el-table__header-wrapper tbody td, .el-table__footer-wrapper tbody td { |
| | | color: #fff; |
| | | background-color: #021441; |
| | | } |
| | | |
| | | .el-table--group, .el-table--border { |
| | | border: 1px solid #366cb9; |
| | | } |
| | | |
| | | .el-table--border th, .el-table--border td { |
| | | border-right: 1px solid #366cb9 !important; |
| | | } |
| | | |
| | | .el-table--border th { |
| | | border-bottom: 1px solid #366cb9; |
| | | } |
| | | |
| | | .el-table::before, .el-table--group::after, .el-table--border::after { |
| | | background-color: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | .el-table__empty-block { |
| | | color: #fff; |
| | | background-color: #021441; |
| | | } |
| | | |
| | | .el-table tbody tr:hover > .is-center { |
| | | background-color: rgba(5, 64, 149, 0.5) !important; |
| | | } |
| | | |
| | | .el-loading-mask { |
| | | background-color: rgba(5, 64, 149, 0.3) |
| | | } |
| | | |
| | | .el-tabs--card > .el-tabs__header .el-tabs__nav { |
| | | border: 1px solid #366CB9; |
| | | } |
| | | |
| | | .el-tabs--card > .el-tabs__header { |
| | | border-bottom: 1px solid #366CB9; |
| | | } |
| | | |
| | | .el-table__fixed::before { |
| | | background-color: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | .el-card__body{ |
| | | .el-tabs--card { |
| | | .el-tabs__header { |
| | | .el-tabs__item{ |
| | | border-left:0; |
| | | color: #95c1fd; |
| | | } |
| | | .el-tabs__item.is-active { |
| | | color: #fff; |
| | | background: #24CAFF; |
| | | border-bottom: 0; |
| | | border-left: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | display: block; |
| | | } |
| | | |
| | | .flex{ |
| | | display: flex; |
| | | } |
| | | |
| | | .pointer { |
| | | cursor: pointer; |
| | | } |
| | |
| | | .components-container { |
| | | margin: 30px 50px; |
| | | position: relative; |
| | | } |
| | | |
| | | .pagination-container { |
| | | margin-top: 30px; |
| | | } |
| | | |
| | | .text-center { |
| | |
| | | .multiselect--active { |
| | | z-index: 1000 !important; |
| | | } |
| | | |
| | | .search-wrapper { |
| | | // padding-bottom: 12px; |
| | | } |
| | | |
| | | .el-dialog__footer { |
| | | border-top: 1px solid #366cb9 ; |
| | | } |
| | | |
| | | .el-dialog__header { |
| | | border-bottom: 1px solid #366cb9; |
| | | } |
| | | .el-drawer { |
| | | background: #061844; |
| | | } |
| | | .el-drawer__header { |
| | | color: #fff; |
| | | } |
| | | .el-input__inner, .el-textarea__inner, .vue-treeselect__control { |
| | | background: rgb(54, 108, 185, 0.2) !important; |
| | | background-color: rgb(54, 108, 185, 0.2) !important; |
| | | border: 1px solid #366cb9 !important; |
| | | color: #fff !important; |
| | | } |
| | | .vue-treeselect__input { |
| | | background-color: rgb(54, 108, 185, 0.2); |
| | | border: 1px solid #366cb9; |
| | | color: #fff; |
| | | } |
| | | .el-date-editor .el-range-input { |
| | | background-color: transparent; |
| | | color: #fff; |
| | | } |
| | | .el-date-editor .el-range-separator { |
| | | color: #fff; |
| | | } |
| | | .vue-treeselect__single-value { |
| | | color: #fff; |
| | | } |
| | | .el-pagination__total { |
| | | color: #fff; |
| | | } |
| | | .el-pagination__jump { |
| | | color: #fff; |
| | | } |
| | | |
| | | aside { |
| | | background: transparent; |
| | | } |
| | | .el-tabs__item { |
| | | color: #fff; |
| | | } |
| | | .el-tabs__item.is-active { |
| | | color: $primary-color; |
| | | } |
| | | .el-collapse-item__header { |
| | | background-color: #061844; |
| | | color: #fff; |
| | | } |
| | |
| | | * Copyright (c) 2019 ruoyi |
| | | */ |
| | | .el-table tbody tr:hover > td { |
| | | background-color: #CFDCF5 !important |
| | | background-color: rgba(5,64,149,.5) !important; |
| | | } |
| | | |
| | | .el-table .el-table__header-wrapper th { |
| | |
| | | } |
| | | |
| | | |
| | | .el-table th { |
| | | background: #D5D5D5; |
| | | color: #515a6e; |
| | | } |
| | | |
| | | |
| | | /** åºç¡éç¨ **/ |
| | | .pt5 { |
| | |
| | | padding-bottom: 5px |
| | | } |
| | | |
| | | /** è¡¨æ ¼å¸å± **/ |
| | | .pagination-container { |
| | | position: relative; |
| | | height: 25px; |
| | | margin-bottom: 10px; |
| | | margin-top: 15px; |
| | | padding: 10px 20px !important; |
| | | } |
| | | |
| | | .pagination-container .el-pagination { |
| | | right: 0; |
| | |
| | | width: inherit; |
| | | } |
| | | |
| | | .el-button{ |
| | | background: #0083CF; |
| | | border-radius: 6px 6px 6px 6px; |
| | | color: #FFFFFF; |
| | | border: none; |
| | | } |
| | | .el-button--text { |
| | | background: transparent !important; |
| | | } |
| | | .el-button--primary{ |
| | | background: #24CAFF; |
| | | } |
| | | .el-button--primary:hover{ |
| | | background: #24CAFF; |
| | | } |
| | | .treeBg{ |
| | | background: url("../image/treeBg.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | .el-tree{ |
| | | background: rgba(0,0,0,0); |
| | | color: #A3CBFF; |
| | | } |
| | | .el-tree-node:focus>.el-tree-node__content{ |
| | | background-color: rgba(5, 64, 149,0.3); |
| | | } |
| | | |
| | | .el-tree-node__content:hover { |
| | | background-color: rgba(5, 64, 149,0.3); |
| | | } |
| | | |
| | | .el-collapse-item__wrap{ |
| | | background: #001233; |
| | | border-bottom: none; |
| | | } |
| | | .el-button, |
| | | .el-tree-node__content > .el-checkbox { |
| | | margin-right: 8px; |
| | | } |
| | |
| | | } |
| | | |
| | | .list-group { |
| | | padding-left: 0px; |
| | | padding-left: 0; |
| | | list-style: none; |
| | | } |
| | | |
| | |
| | | border-bottom: 1px solid #e7eaec; |
| | | border-top: 1px solid #e7eaec; |
| | | margin-bottom: -1px; |
| | | padding: 11px 0px; |
| | | padding: 11px 0; |
| | | font-size: 13px; |
| | | } |
| | | |
| | |
| | | float: right !important; |
| | | } |
| | | |
| | | .el-card__header { |
| | | padding: 14px 15px 7px; |
| | | min-height: 40px; |
| | | .el-card{ |
| | | border: none; |
| | | background-color: #061844; |
| | | overflow: hidden; |
| | | color: #fff; |
| | | } |
| | | |
| | | .el-card__body { |
| | | padding: 27px 20px; |
| | | } |
| | | // .el-card__body { |
| | | // padding: 27px 20px; |
| | | // } |
| | | |
| | | .card-box { |
| | | padding-right: 15px; |
| | |
| | | overflow: auto; |
| | | } |
| | | } |
| | | .el-card__header{ |
| | | border-bottom: none; |
| | | background: #09256B; |
| | | } |
| | | |
| | | .modelnode-tree { |
| | | margin-top: 8px; |
| | | // margin-top: 8px; |
| | | |
| | | .custom-tree-node { |
| | | flex: 1; |
| | | padding-right: 8px; |
| | | // line-height: 26px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .node-opt { |
| | |
| | | .model-node-setting { |
| | | .el-card__body { |
| | | padding: 8px 10px 10px 10px; |
| | | height: calc(100vh - 220px); |
| | | height: calc(100vh - 270px); |
| | | overflow: auto; |
| | | } |
| | | } |
| | |
| | | margin-top: calc(50vh - 180px); |
| | | } |
| | | } |
| | | .shrink-col-block { |
| | | position: absolute; |
| | | top: 20px; |
| | | right: 16px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | // ç¾åæ»å¨æ¡ |
| | | ::-webkit-scrollbar { |
| | | width: 11px; |
| | | height: 10px; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-track { |
| | | width: 6px; |
| | | background: rgba(#101F1C, 0.1) ; |
| | | -webkit-border-radius: 2em; |
| | | -moz-border-radius: 2em; |
| | | border-radius: 2em; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-thumb { |
| | | background-color:#4E6BBA; |
| | | background-clip: padding-box; |
| | | min-height: 28px; |
| | | -webkit-border-radius: 2em; |
| | | -moz-border-radius: 2em; |
| | | border-radius: 2em; |
| | | transition: background-color .3s; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-thumb:hover { |
| | | background-color: rgba(144,147,153,.3); |
| | | } |
| | | ::-webkit-scrollbar-track-piece { |
| | | background-color: #021441 |
| | | } |
| | | ::-webkit-scrollbar-corner { |
| | | background-color: #061844 ; |
| | | } |
| | | |
| | |
| | | #app { |
| | | |
| | | .main-container { |
| | | height: 100vh; |
| | | // height: 100vh; //æå¼ä¸æ¾ç¤ºæ»å¨æ¡ |
| | | overflow: hidden; |
| | | transition: margin-left .28s; |
| | | margin-left: $sideBarWidth; |
| | | position: relative; |
| | | background: rgba(235, 237, 240, 1); |
| | | // background: rgba(235, 237, 240, 1); |
| | | background: #001233; |
| | | } |
| | | |
| | | .sidebar-container { |
| | |
| | | bottom: 0; |
| | | left: 0; |
| | | z-index: 1001; |
| | | overflow: hidden; |
| | | // overflow: hidden; |
| | | |
| | | // background: url("../image/navbar/Group.png") no-repeat;background-size: 100% 100%; |
| | | // padding-left: 13px; |
| | | // padding-right: 31px; |
| | | // padding-top: 27px; |
| | | // margin-top: 10px; |
| | | |
| | | // reset element-ui css |
| | | .horizontal-collapse-transition { |
| | |
| | | } |
| | | |
| | | .scrollbar-wrapper { |
| | | overflow-x: hidden !important; |
| | | // overflow-x: hidden !important; æ»å¨æ¡ |
| | | // overflow: auto; |
| | | height: 100%; |
| | | } |
| | | ::-webkit-scrollbar { |
| | | width: 5px; |
| | | } |
| | | |
| | | |
| | | .el-scrollbar__bar.is-vertical { |
| | | right: 0px; |
| | | width: 0; |
| | | } |
| | | |
| | | .el-scrollbar { |
| | | height: 100%; |
| | | background: url("../image/navbar/Group.png") no-repeat;background-size: 100% 100%; |
| | | padding-left: 3px; |
| | | padding-right: 24px; |
| | | padding-top: 13px; |
| | | } |
| | | |
| | | &.has-logo { |
| | |
| | | } |
| | | |
| | | .svg-icon { |
| | | margin-right: 16px; |
| | | margin-right: 12px; |
| | | } |
| | | |
| | | .el-menu { |
| | | border: none; |
| | | height: 100%; |
| | | width: 100% !important; |
| | | background-color: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | // menu hover |
| | | .submenu-title-noDropdown, |
| | | .el-submenu__title { |
| | | font-size: 16px; |
| | | height: 44px; |
| | | line-height: 44px; |
| | | &:hover { |
| | | background-color: $menuHover !important; |
| | | } |
| | | } |
| | | |
| | | .is-active>.el-submenu__title { |
| | | font-size: 16px; |
| | | // color: rgba(11, 107, 241, 1) !important; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | & .nest-menu .el-submenu>.el-submenu__title, |
| | | & .el-submenu .el-menu-item { |
| | | height: 44px; |
| | | line-height: 44px; |
| | | min-width: $sideBarWidth !important; |
| | | margin-left: 8px; |
| | | padding-left: 32px !important; |
| | | &:hover { |
| | | background-color: $subMenuHover !important; |
| | | } |
| | |
| | | .el-menu--vertical { |
| | | &>.el-menu { |
| | | .svg-icon { |
| | | margin-right: 16px; |
| | | margin-right: 12px; |
| | | } |
| | | } |
| | | |
| | | .nest-menu .el-submenu>.el-submenu__title, |
| | | .el-menu-item { |
| | | height: 44px; |
| | | line-height: 44px; |
| | | &:hover { |
| | | // you can use $subMenuHover |
| | | background-color: $menuHover !important; |
| | | } |
| | | } |
| | | .is-active { |
| | | color: #38bcbf !important; |
| | | } |
| | | |
| | | // the scroll bar appears when the subMenu is too long |
| | | >.el-menu--popup { |
| | |
| | | // // base color |
| | | // $primary-color: #38BCBF; |
| | | // $blue:#324157; |
| | | // $light-blue:#3A71A8; |
| | | // $red:#C03639; |
| | | // $pink: #E65D6E; |
| | | // $green: #30B08F; |
| | | // $tiffany: #4AB7BD; |
| | | // $yellow:#FEC171; |
| | | // $panGreen: #30B08F; |
| | | |
| | | // // sidebar |
| | | // $menuText:#629FF2; |
| | | // $menuActiveText: #fff; |
| | | // $subMenuActiveText:#38BCBF; // https://github.com/ElemeFE/element/issues/12951 |
| | | |
| | | // $menuBg:rgba(255, 255, 255, 1); |
| | | // $menuHover:rgba(246, 250, 255, 1); |
| | | |
| | | // $subMenuBg:#38BCBF; |
| | | // $subMenuHover:rgba(246, 250, 255, 1)s; |
| | | // $tabBarHeight: 40px; //é¢å
å±é«åº¦ |
| | | // $sideBarWidth: 220px; |
| | | // base color |
| | | $primary-color: #38BCBF; |
| | | $blue:#324157; |
| | |
| | | $tiffany: #4AB7BD; |
| | | $yellow:#FEC171; |
| | | $panGreen: #30B08F; |
| | | $Backgroundcolor: #001233; |
| | | |
| | | // sidebar |
| | | $menuText:#333; |
| | | $subMenuActiveText:#14CC8F; // https://github.com/ElemeFE/element/issues/12951 |
| | | $menuText:#629FF2; |
| | | $menuActiveText: #fff; |
| | | $subMenuActiveText:#38BCBF; // https://github.com/ElemeFE/element/issues/12951 |
| | | |
| | | $menuBg:rgba(255, 255, 255, 1); |
| | | $menuHover:rgba(246, 250, 255, 1); |
| | | $menuBg:#001233;; |
| | | $menuHover:rgba(0, 0, 0, 0); //ç¶ |
| | | |
| | | $subMenuBg:#38BCBF; |
| | | $subMenuHover:rgba(246, 250, 255, 1)s; |
| | | $subMenuBg:#14CC8F; |
| | | $subMenuHover:rgba(0, 0, 0, 0); //å |
| | | |
| | | $sideBarWidth: 220px; |
| | | $sideBarWidth: 230px; |
| | | $tabBarHeight: 32px; //é¢å
å±é«åº¦ |
| | | |
| | | // the :export directive is the magic sauce for webpack |
| | | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass |
| | |
| | | subMenuHover: $subMenuHover; |
| | | sideBarWidth: $sideBarWidth; |
| | | primary-color: $primary-color; |
| | | tabBarHeight: $tabBarHeight; |
| | | } |
| | |
| | | <!-- @author zhengjie --> |
| | | <template> |
| | | <div class="icon-body"> |
| | | <el-input v-model="name" style="position: relative;" clearable placeholder="请è¾å
¥å¾æ åç§°" @clear="filterIcons" @input.native="filterIcons"> |
| | | <el-input |
| | | v-model="name" |
| | | style="position: relative;color: #333;" |
| | | clearable |
| | | placeholder="请è¾å
¥å¾æ åç§°" |
| | | @clear="filterIcons" |
| | | @input.native="filterIcons" |
| | | > |
| | | <i slot="suffix" class="el-icon-search el-input__icon" /> |
| | | </el-input> |
| | | <div class="icon-list"> |
| | | <div v-for="(item, index) in iconList" :key="index" @click="selectedIcon(item)"> |
| | | <div |
| | | v-for="(item, index) in iconList" |
| | | :key="index" |
| | | @click="selectedIcon(item)" |
| | | > |
| | | <svg-icon :icon-class="item" style="height: 30px;width: 16px;" /> |
| | | <span>{{ item }}</span> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import icons from './requireIcons' |
| | | import icons from "./requireIcons"; |
| | | export default { |
| | | name: 'IconSelect', |
| | | name: "IconSelect", |
| | | data() { |
| | | return { |
| | | name: '', |
| | | name: "", |
| | | iconList: icons |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | filterIcons() { |
| | | if (this.name) { |
| | | this.iconList = this.iconList.filter(item => item.includes(this.name)) |
| | | this.iconList = this.iconList.filter(item => item.includes(this.name)); |
| | | } else { |
| | | this.iconList = icons |
| | | this.iconList = icons; |
| | | } |
| | | }, |
| | | selectedIcon(name) { |
| | | this.$emit('selected', name) |
| | | document.body.click() |
| | | this.$emit("selected", name); |
| | | document.body.click(); |
| | | }, |
| | | reset() { |
| | | this.name = '' |
| | | this.iconList = icons |
| | | this.name = ""; |
| | | this.iconList = icons; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style rel="stylesheet/scss" lang="scss" scoped> |
| | | .icon-body { |
| | | width: 100%; |
| | | padding: 10px; |
| | | z-index: 999; |
| | | .icon-list { |
| | | height: 200px; |
| | | overflow-y: scroll; |
| | |
| | | overflow: hidden; |
| | | } |
| | | } |
| | | .el-input__inner { |
| | | color: #333; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div :class="{'hidden':hidden}" class="pagination-container"> |
| | | <div :class="{ hidden: hidden }" class="pagination-container"> |
| | | <el-pagination |
| | | :background="background" |
| | | :current-page.sync="currentPage" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { scrollTo } from '@/utils/scroll-to' |
| | | import { scrollTo } from "@/utils/scroll-to"; |
| | | |
| | | export default { |
| | | name: 'Pagination', |
| | | name: "Pagination", |
| | | props: { |
| | | total: { |
| | | required: true, |
| | |
| | | pageSizes: { |
| | | type: Array, |
| | | default() { |
| | | return [10, 20, 30, 50] |
| | | return [10, 20, 30, 50]; |
| | | } |
| | | }, |
| | | layout: { |
| | | type: String, |
| | | default: 'total, sizes, prev, pager, next, jumper' |
| | | default: "total, sizes, prev, pager, next, jumper" |
| | | }, |
| | | background: { |
| | | type: Boolean, |
| | |
| | | computed: { |
| | | currentPage: { |
| | | get() { |
| | | return this.page |
| | | return this.page; |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:page', val) |
| | | this.$emit("update:page", val); |
| | | } |
| | | }, |
| | | pageSize: { |
| | | get() { |
| | | return this.limit |
| | | return this.limit; |
| | | }, |
| | | set(val) { |
| | | this.$emit('update:limit', val) |
| | | this.$emit("update:limit", val); |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | this.$emit('pagination', { page: this.currentPage, limit: val }) |
| | | this.$emit("pagination", { page: this.currentPage, limit: val }); |
| | | if (this.autoScroll) { |
| | | scrollTo(0, 800) |
| | | scrollTo(0, 800); |
| | | } |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.$emit('pagination', { page: val, limit: this.pageSize }) |
| | | this.$emit("pagination", { page: val, limit: this.pageSize }); |
| | | if (this.autoScroll) { |
| | | scrollTo(0, 800) |
| | | scrollTo(0, 800); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .pagination-container { |
| | | background: #fff; |
| | | padding: 32px 16px; |
| | | background: transparent; |
| | | padding: 12px 20px; |
| | | position: relative; |
| | | } |
| | | .pagination-container.hidden { |
| | | display: none; |
| | | } |
| | | .el-pagination__total { |
| | | color: #fff !important; |
| | | } |
| | | .el-pagination__jump { |
| | | color: #fff; |
| | | } |
| | | </style> |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "~@/assets/styles/variables.scss"; |
| | | .basic-container { |
| | | height: 100%; |
| | | box-sizing: border-box; |
| | | margin-bottom: 5px; |
| | | // margin-bottom: 5px; |
| | | |
| | | .card-header { |
| | | font-size: 18px; |
| | | font-weight: 500; |
| | | height: 34px; |
| | | color: #272727; |
| | | color: #a3cbff; |
| | | position: relative; |
| | | padding-left: 10px; |
| | | |
| | |
| | | position: absolute; |
| | | display: block; |
| | | width: 4px; |
| | | height: 17px; |
| | | background-color: #38bcbf; |
| | | height: 16px; |
| | | background-color: $primary-color; |
| | | border-radius: 3px; |
| | | top: 2px; |
| | | left: 0; |
| | |
| | | } |
| | | } |
| | | |
| | | .basic-container:first-child { |
| | | margin-top: 5px; |
| | | } |
| | | // .basic-container:first-child { |
| | | // margin-top: 5px; |
| | | // } |
| | | </style> |
| | |
| | | <template> |
| | | <el-col class="shrink-col"> |
| | | <div class="click-img"> |
| | | <img src="~@/assets/image/rectangle.png" alt="" |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | style="transform:rotate(180deg)" |
| | | @click="toggleCollapse"> |
| | | @click="toggleCollapse" |
| | | /> |
| | | </div> |
| | | </el-col> |
| | | </template> |
| | |
| | | export default { |
| | | methods: { |
| | | toggleCollapse() { |
| | | this.$emit('toggleCollapse') |
| | | this.$emit("toggleCollapse"); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .shrink-col { |
| | | width: 48px; |
| | | background: white; |
| | | margin: 5px 20px 5px 0; |
| | | background: #09256b; |
| | | margin: 0 12px 0 0; |
| | | box-sizing: border-box; |
| | | box-shadow: 0 2px 12px 0 #0000001a; |
| | | padding-top: 22px; |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'AppMain', |
| | | name: "AppMain", |
| | | computed: { |
| | | cachedViews() { |
| | | return this.$store.state.tagsView.cachedViews |
| | | return this.$store.state.tagsView.cachedViews; |
| | | }, |
| | | key() { |
| | | return this.$route.path |
| | | return this.$route.path; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "~@/assets/styles/variables.scss"; |
| | | .app-main { |
| | | /* 50= navbar 50 */ |
| | | min-height: calc(100vh - 160px); |
| | | min-height: calc(100vh - 160px - #{$tabBarHeight}); |
| | | width: 100%; |
| | | position: relative; |
| | | overflow: hidden; |
| | | padding: 12px 20px; |
| | | padding: 12px; |
| | | } |
| | | |
| | | .fixed-header+.app-main { |
| | |
| | | .hasTagsView { |
| | | .app-main { |
| | | /* 84 = navbar + tags-view = 50 + 34 */ |
| | | min-height: calc(100vh - 84px); |
| | | min-height: calc(100vh - 84px - #{$tabBarHeight}); |
| | | } |
| | | |
| | | .fixed-header+.app-main { |
| | | padding-top: 84px; |
| | | padding-top: 106px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | height: 64px; |
| | | overflow: hidden; |
| | | position: relative; |
| | | background: #16a5b6; |
| | | background: #001233; |
| | | box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); |
| | | border-bottom: 1px solid #061844; |
| | | |
| | | .hamburger-container { |
| | | line-height: 64px; |
| | |
| | | <router-link |
| | | v-if="collapse" |
| | | key="expand" |
| | | class="sidebar-logo-link" |
| | | class="sidebar-logo-link-collapse" |
| | | to="/" |
| | | > |
| | | <div class="collapse-logo"> |
| | | <img v-if="logoImg2" :src="logoImg2" style="width: 44px" /> |
| | | <img |
| | | v-if="logoImg2" |
| | | :src="logoImg2" |
| | | style="width: 40px;height: 40px;" |
| | | /> |
| | | </div> |
| | | </router-link> |
| | | <router-link v-else key="expand" class="sidebar-logo-link" to="/"> |
| | | <img v-if="logo" :src="logo" class="sidebar-logo" /> |
| | | <img v-if="logoImg2" :src="logoImg2" class="sidebar-logo" /> |
| | | {{ title }} |
| | | </router-link> |
| | | </transition> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import logoImg2 from "@/assets/logo/toray_group_icon.png"; |
| | | import { title } from "../../../settings"; |
| | | |
| | | import logoImg2 from "@/assets/logo/logo.png"; |
| | | |
| | | export default { |
| | | name: "SidebarLogo", |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | title: "ä¸ä¸½å»çè½æºç®¡çç³»ç»", |
| | | logo: "https://www.toray.cn/shared/images/toray_logo_ch.svg", |
| | | logoImg2: "https://www.toray.cn/shared/images/toray_logo_ch.svg" |
| | | title: "综åè½æºç®¡ç", |
| | | logoImg2, |
| | | logo: "https://www.toray.cn/shared/images/toray_logo_ch.svg" |
| | | // logoImg2: "http://yunlu.com.cn/template/pc/skin/images/index/u21.png" |
| | | }; |
| | | } |
| | | }; |
| | |
| | | width: 100%; |
| | | height: 64px; |
| | | line-height: 64px; |
| | | background: #16a5b6; |
| | | background: #001233; |
| | | text-align: center; |
| | | overflow: hidden; |
| | | .sidebar-logo-link-collapse { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 100%; |
| | | width: 100%; |
| | | .collapse-logo { |
| | | display: flex; |
| | | align-items: center; |
| | | text-align: center; |
| | | justify-content: center; |
| | | height: 100%; |
| | | width: 100%; |
| | | } |
| | | } |
| | | |
| | | & .sidebar-logo-link { |
| | | height: 100%; |
| | | width: 100%; |
| | | color: #fff; |
| | | font-weight: 600; |
| | | font-size: 20px; |
| | | |
| | | .collapse-logo { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100%; |
| | | text-align: center; |
| | | width: 100%; |
| | | justify-content: center; |
| | | height: 100%; |
| | | width: 100%; |
| | | } |
| | | |
| | | & .sidebar-logo { |
| | | width: 190px; |
| | | width: 40px; |
| | | vertical-align: middle; |
| | | margin-right: 12px; |
| | | margin-right: 6px; |
| | | } |
| | | |
| | | & .sidebar-title { |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .el-menu-item.is-active { |
| | | // background: rgba(246, 250, 255, 1) !important; |
| | | background: linear-gradient(90deg, #4fdac9 0%, #32b5cb 100%) !important; |
| | | // background: linear-gradient(90deg, #4fdac9 0%, #32b5cb 100%) !important; |
| | | background: linear-gradient( |
| | | 90deg, |
| | | #0559c8 0%, |
| | | rgba(5, 89, 200, 0) 97% |
| | | ) !important; |
| | | } |
| | | </style> |
| | |
| | | import Vue from 'vue' |
| | | import Router from 'vue-router' |
| | | import Vue from "vue"; |
| | | import Router from "vue-router"; |
| | | |
| | | Vue.use(Router) |
| | | Vue.use(Router); |
| | | |
| | | /* Layout */ |
| | | import Layout from '@/layout' |
| | | import Layout from "@/layout"; |
| | | |
| | | /** |
| | | * Note: è·¯ç±é
置项 |
| | |
| | | */ |
| | | |
| | | // å
Œ
±è·¯ç± |
| | | export const constantRoutes = [{ |
| | | path: '/redirect', |
| | | export const constantRoutes = [ |
| | | { |
| | | path: "/redirect", |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [{ |
| | | path: '/redirect/:path*', |
| | | component: () => import('@/views/redirect') |
| | | }] |
| | | children: [ |
| | | { |
| | | path: "/redirect/:path*", |
| | | component: () => import("@/views/redirect") |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/login', |
| | | component: () => import('@/views/login'), |
| | | path: "/login", |
| | | component: () => import("@/views/login"), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/404', |
| | | component: () => import('@/views/error/404'), |
| | | path: "/404", |
| | | component: () => import("@/views/error/404"), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '/401', |
| | | component: () => import('@/views/error/401'), |
| | | path: "/401", |
| | | component: () => import("@/views/error/401"), |
| | | hidden: true |
| | | }, |
| | | { |
| | | path: '', |
| | | path: "", |
| | | component: Layout, |
| | | redirect: 'index', |
| | | children: [{ |
| | | path: 'index', |
| | | component: () => import('@/views/index'), |
| | | name: 'é¦é¡µ', |
| | | redirect: "index", |
| | | children: [ |
| | | { |
| | | path: "index", |
| | | component: () => import("@/views/index"), |
| | | name: "é¦é¡µ", |
| | | meta: { |
| | | title: 'é¦é¡µ', |
| | | icon: 'dashboard', |
| | | title: "é¦é¡µ", |
| | | icon: "dashboard", |
| | | noCache: true, |
| | | affix: true |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | path: '/indexdev', |
| | | component: () => import('@/views/index_dev'), |
| | | hidden: 'true' |
| | | }, |
| | | { |
| | | path: '/user', |
| | | component: Layout, |
| | | hidden: true, |
| | | redirect: 'noredirect', |
| | | children: [{ |
| | | path: 'profile', |
| | | component: () => import('@/views/system/user/profile/index'), |
| | | name: 'Profile', |
| | | meta: { |
| | | title: '个人ä¸å¿', |
| | | icon: 'user' |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | path: '/dict', |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [{ |
| | | path: 'type/data/:dictId(\\d+)', |
| | | component: () => import('@/views/system/dict/data'), |
| | | name: 'Data', |
| | | meta: { |
| | | title: 'åå
¸æ°æ®', |
| | | icon: '' |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | path: '/gen', |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [{ |
| | | path: 'edit', |
| | | component: () => import('@/views/tool/gen/editTable'), |
| | | name: 'GenEdit', |
| | | meta: { |
| | | title: 'ä¿®æ¹çæé
ç½®' |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | path: '/model', |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [{ |
| | | path: '', |
| | | component: () => import('@/views/basicsetting/model/index'), |
| | | name: 'modelManage', |
| | | meta: { |
| | | title: '模å管ç' |
| | | } |
| | | }] |
| | | }, { |
| | | path: '/electricityPrice', |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [{ |
| | | path: 'listHistory', |
| | | component: () => import('@/views/electricityPrice/electricity/history'), |
| | | name: 'electricity', |
| | | meta: { |
| | | title: '峰平谷åå²è®°å½', |
| | | icon: '' |
| | | } |
| | | }] |
| | | }, { |
| | | path: '/energyConsumption', |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [{ |
| | | path: 'listEnergyConsumption/:timeType/:beginTime/:endTime/:indexCode/:id/:titleName', |
| | | component: () => import('@/views/energyStatistics/energyConsumption/consumptionCost'), |
| | | name: 'listEnergyConsumption', |
| | | meta: { |
| | | title: 'è½æºæ¶è´¹ææ¬åæ¶åææ¥è¡¨' |
| | | } |
| | | }] |
| | | }, |
| | | { |
| | | path: '/rosteringSchemeitem', |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [{ |
| | | path: 'list/:id', |
| | | component: () => import('@/views/workforce/management/schemeItem'), |
| | | name: 'list', |
| | | meta: { |
| | | title: 'è½®å¼æ¹æ¡ç»å' |
| | | } |
| | | }] |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: "/indexdev", |
| | | component: () => import("@/views/index"), |
| | | hidden: "true" |
| | | }, |
| | | { |
| | | path: "/user", |
| | | component: Layout, |
| | | hidden: true, |
| | | redirect: "noredirect", |
| | | children: [ |
| | | { |
| | | path: "profile", |
| | | component: () => import("@/views/system/user/profile/index"), |
| | | name: "Profile", |
| | | meta: { |
| | | title: "个人ä¸å¿", |
| | | icon: "user" |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: "/dict", |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: "type/data/:dictId(\\d+)", |
| | | component: () => import("@/views/system/dict/data"), |
| | | name: "Data", |
| | | meta: { |
| | | title: "åå
¸æ°æ®", |
| | | icon: "" |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: "/gen", |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: "edit", |
| | | component: () => import("@/views/tool/gen/editTable"), |
| | | name: "GenEdit", |
| | | meta: { |
| | | title: "ä¿®æ¹çæé
ç½®" |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: "/model", |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: "", |
| | | component: () => import("@/views/basicsetting/model/index"), |
| | | name: "modelManage", |
| | | meta: { |
| | | title: "模å管ç" |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: "/electricityPrice", |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: "listHistory", |
| | | component: () => import("@/views/electricityPrice/electricity/history"), |
| | | name: "electricity", |
| | | meta: { |
| | | title: "峰平谷åå²è®°å½", |
| | | icon: "" |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: "/energyConsumption", |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: |
| | | "listEnergyConsumption/:timeType/:beginTime/:endTime/:indexCode/:id/:titleName", |
| | | component: () => |
| | | import("@/views/energyStatistics/energyConsumption/consumptionCost"), |
| | | name: "listEnergyConsumption", |
| | | meta: { |
| | | title: "è½æºæ¶è´¹ææ¬åæ¶åææ¥è¡¨" |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: "/rosteringSchemeitem", |
| | | component: Layout, |
| | | hidden: true, |
| | | children: [ |
| | | { |
| | | path: "list/:id", |
| | | component: () => import("@/views/workforce/management/schemeItem"), |
| | | name: "list", |
| | | meta: { |
| | | title: "è½®å¼æ¹æ¡ç»å" |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ]; |
| | | |
| | | export default new Router({ |
| | | mode: 'history', // 廿urlä¸ç# |
| | | mode: "history", // 廿urlä¸ç# |
| | | scrollBehavior: () => ({ |
| | | y: 0 |
| | | }), |
| | | routes: constantRoutes |
| | | }) |
| | | }); |
| | |
| | | module.exports = { |
| | | title: 'ä¸ä¸½å»çè½æºç®¡çç³»ç»', |
| | | title: "综åè½æºç®¡ç", |
| | | |
| | | /** |
| | | * æ¯å¦ç³»ç»å¸å±é
ç½® |
| | |
| | | /** |
| | | * æ¯å¦åºå®å¤´é¨ |
| | | */ |
| | | fixedHeader: false, |
| | | fixedHeader: true, |
| | | |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºlogo |
| | |
| | | * The default is only used in the production env |
| | | * If you want to also use it in dev, you can pass ['production', 'development'] |
| | | */ |
| | | errorLog: 'production' |
| | | } |
| | | errorLog: "production" |
| | | }; |
| | |
| | | */ |
| | | export function formatDate(cellValue) { |
| | | if (cellValue == null || cellValue == "") return ""; |
| | | var date = new Date(cellValue) |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 |
| | | var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() |
| | | var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() |
| | | var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() |
| | | var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() |
| | | return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds |
| | | var date = new Date(cellValue); |
| | | var year = date.getFullYear(); |
| | | var month = |
| | | date.getMonth() + 1 < 10 |
| | | ? "0" + (date.getMonth() + 1) |
| | | : date.getMonth() + 1; |
| | | var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); |
| | | var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(); |
| | | var minutes = |
| | | date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); |
| | | var seconds = |
| | | date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); |
| | | return ( |
| | | year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds |
| | | ); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {string} |
| | | */ |
| | | export function formatTime(time, option) { |
| | | if (('' + time).length === 10) { |
| | | time = parseInt(time) * 1000 |
| | | if (("" + time).length === 10) { |
| | | time = parseInt(time) * 1000; |
| | | } else { |
| | | time = +time |
| | | time = +time; |
| | | } |
| | | const d = new Date(time) |
| | | const now = Date.now() |
| | | const d = new Date(time); |
| | | const now = Date.now(); |
| | | |
| | | const diff = (now - d) / 1000 |
| | | const diff = (now - d) / 1000; |
| | | |
| | | if (diff < 30) { |
| | | return 'åå' |
| | | return "åå"; |
| | | } else if (diff < 3600) { |
| | | // less 1 hour |
| | | return Math.ceil(diff / 60) + 'åéå' |
| | | return Math.ceil(diff / 60) + "åéå"; |
| | | } else if (diff < 3600 * 24) { |
| | | return Math.ceil(diff / 3600) + 'å°æ¶å' |
| | | return Math.ceil(diff / 3600) + "å°æ¶å"; |
| | | } else if (diff < 3600 * 24 * 2) { |
| | | return '1天å' |
| | | return "1天å"; |
| | | } |
| | | if (option) { |
| | | return parseTime(time, option) |
| | | return parseTime(time, option); |
| | | } else { |
| | | return ( |
| | | d.getMonth() + |
| | | 1 + |
| | | 'æ' + |
| | | "æ" + |
| | | d.getDate() + |
| | | 'æ¥' + |
| | | "æ¥" + |
| | | d.getHours() + |
| | | 'æ¶' + |
| | | "æ¶" + |
| | | d.getMinutes() + |
| | | 'å' |
| | | ) |
| | | "å" |
| | | ); |
| | | } |
| | | } |
| | | |
| | |
| | | * @returns {Object} |
| | | */ |
| | | export function getQueryObject(url) { |
| | | url = url == null ? window.location.href : url |
| | | const search = url.substring(url.lastIndexOf('?') + 1) |
| | | const obj = {} |
| | | const reg = /([^?&=]+)=([^?&=]*)/g |
| | | url = url == null ? window.location.href : url; |
| | | const search = url.substring(url.lastIndexOf("?") + 1); |
| | | const obj = {}; |
| | | const reg = /([^?&=]+)=([^?&=]*)/g; |
| | | search.replace(reg, (rs, $1, $2) => { |
| | | const name = decodeURIComponent($1) |
| | | let val = decodeURIComponent($2) |
| | | val = String(val) |
| | | obj[name] = val |
| | | return rs |
| | | }) |
| | | return obj |
| | | const name = decodeURIComponent($1); |
| | | let val = decodeURIComponent($2); |
| | | val = String(val); |
| | | obj[name] = val; |
| | | return rs; |
| | | }); |
| | | return obj; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function byteLength(str) { |
| | | // returns the byte length of an utf8 string |
| | | let s = str.length |
| | | let s = str.length; |
| | | for (var i = str.length - 1; i >= 0; i--) { |
| | | const code = str.charCodeAt(i) |
| | | if (code > 0x7f && code <= 0x7ff) s++ |
| | | else if (code > 0x7ff && code <= 0xffff) s += 2 |
| | | if (code >= 0xDC00 && code <= 0xDFFF) i-- |
| | | const code = str.charCodeAt(i); |
| | | if (code > 0x7f && code <= 0x7ff) s++; |
| | | else if (code > 0x7ff && code <= 0xffff) s += 2; |
| | | if (code >= 0xdc00 && code <= 0xdfff) i--; |
| | | } |
| | | return s |
| | | return s; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Array} |
| | | */ |
| | | export function cleanArray(actual) { |
| | | const newArray = [] |
| | | const newArray = []; |
| | | for (let i = 0; i < actual.length; i++) { |
| | | if (actual[i]) { |
| | | newArray.push(actual[i]) |
| | | newArray.push(actual[i]); |
| | | } |
| | | } |
| | | return newArray |
| | | return newArray; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Array} |
| | | */ |
| | | export function param(json) { |
| | | if (!json) return '' |
| | | if (!json) return ""; |
| | | return cleanArray( |
| | | Object.keys(json).map(key => { |
| | | if (json[key] === undefined) return '' |
| | | return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) |
| | | if (json[key] === undefined) return ""; |
| | | return encodeURIComponent(key) + "=" + encodeURIComponent(json[key]); |
| | | }) |
| | | ).join('&') |
| | | ).join("&"); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Object} |
| | | */ |
| | | export function param2Obj(url) { |
| | | const search = url.split('?')[1] |
| | | const search = url.split("?")[1]; |
| | | if (!search) { |
| | | return {} |
| | | return {}; |
| | | } |
| | | return JSON.parse( |
| | | '{"' + |
| | |
| | | .replace(/"/g, '\\"') |
| | | .replace(/&/g, '","') |
| | | .replace(/=/g, '":"') |
| | | .replace(/\+/g, ' ') + |
| | | .replace(/\+/g, " ") + |
| | | '"}' |
| | | ) |
| | | ); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {string} |
| | | */ |
| | | export function html2Text(val) { |
| | | const div = document.createElement('div') |
| | | div.innerHTML = val |
| | | return div.textContent || div.innerText |
| | | const div = document.createElement("div"); |
| | | div.innerHTML = val; |
| | | return div.textContent || div.innerText; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Object} |
| | | */ |
| | | export function objectMerge(target, source) { |
| | | if (typeof target !== 'object') { |
| | | target = {} |
| | | if (typeof target !== "object") { |
| | | target = {}; |
| | | } |
| | | if (Array.isArray(source)) { |
| | | return source.slice() |
| | | return source.slice(); |
| | | } |
| | | Object.keys(source).forEach(property => { |
| | | const sourceProperty = source[property] |
| | | if (typeof sourceProperty === 'object') { |
| | | target[property] = objectMerge(target[property], sourceProperty) |
| | | const sourceProperty = source[property]; |
| | | if (typeof sourceProperty === "object") { |
| | | target[property] = objectMerge(target[property], sourceProperty); |
| | | } else { |
| | | target[property] = sourceProperty |
| | | target[property] = sourceProperty; |
| | | } |
| | | }) |
| | | return target |
| | | }); |
| | | return target; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function toggleClass(element, className) { |
| | | if (!element || !className) { |
| | | return |
| | | return; |
| | | } |
| | | let classString = element.className |
| | | const nameIndex = classString.indexOf(className) |
| | | let classString = element.className; |
| | | const nameIndex = classString.indexOf(className); |
| | | if (nameIndex === -1) { |
| | | classString += '' + className |
| | | classString += "" + className; |
| | | } else { |
| | | classString = |
| | | classString.substr(0, nameIndex) + |
| | | classString.substr(nameIndex + className.length) |
| | | classString.substr(nameIndex + className.length); |
| | | } |
| | | element.className = classString |
| | | element.className = classString; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Date} |
| | | */ |
| | | export function getTime(type) { |
| | | if (type === 'start') { |
| | | return new Date().getTime() - 3600 * 1000 * 24 * 90 |
| | | if (type === "start") { |
| | | return new Date().getTime() - 3600 * 1000 * 24 * 90; |
| | | } else { |
| | | return new Date(new Date().toDateString()) |
| | | return new Date(new Date().toDateString()); |
| | | } |
| | | } |
| | | |
| | |
| | | * @return {*} |
| | | */ |
| | | export function debounce(func, wait, immediate) { |
| | | let timeout, args, context, timestamp, result |
| | | let timeout, args, context, timestamp, result; |
| | | |
| | | const later = function() { |
| | | // æ®ä¸ä¸æ¬¡è§¦åæ¶é´é´é |
| | | const last = +new Date() - timestamp |
| | | const last = +new Date() - timestamp; |
| | | |
| | | // 䏿¬¡è¢«å
è£
彿°è¢«è°ç¨æ¶é´é´é last å°äºè®¾å®æ¶é´é´é wait |
| | | if (last < wait && last > 0) { |
| | | timeout = setTimeout(later, wait - last) |
| | | timeout = setTimeout(later, wait - last); |
| | | } else { |
| | | timeout = null |
| | | timeout = null; |
| | | // å¦æè®¾å®ä¸ºimmediate===trueï¼å 为å¼å§è¾¹çå·²ç»è°ç¨è¿äºæ¤å¤æ éè°ç¨ |
| | | if (!immediate) { |
| | | result = func.apply(context, args) |
| | | if (!timeout) context = args = null |
| | | result = func.apply(context, args); |
| | | if (!timeout) context = args = null; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | return function(...args) { |
| | | context = this |
| | | timestamp = +new Date() |
| | | const callNow = immediate && !timeout |
| | | context = this; |
| | | timestamp = +new Date(); |
| | | const callNow = immediate && !timeout; |
| | | // 妿延æ¶ä¸åå¨ï¼éæ°è®¾å®å»¶æ¶ |
| | | if (!timeout) timeout = setTimeout(later, wait) |
| | | if (!timeout) timeout = setTimeout(later, wait); |
| | | if (callNow) { |
| | | result = func.apply(context, args) |
| | | context = args = null |
| | | result = func.apply(context, args); |
| | | context = args = null; |
| | | } |
| | | |
| | | return result |
| | | } |
| | | return result; |
| | | }; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Object} |
| | | */ |
| | | export function deepClone(source) { |
| | | if (!source && typeof source !== 'object') { |
| | | throw new Error('error arguments', 'deepClone') |
| | | if (!source && typeof source !== "object") { |
| | | throw new Error("error arguments", "deepClone"); |
| | | } |
| | | const targetObj = source.constructor === Array ? [] : {} |
| | | const targetObj = source.constructor === Array ? [] : {}; |
| | | Object.keys(source).forEach(keys => { |
| | | if (source[keys] && typeof source[keys] === 'object') { |
| | | targetObj[keys] = deepClone(source[keys]) |
| | | if (source[keys] && typeof source[keys] === "object") { |
| | | targetObj[keys] = deepClone(source[keys]); |
| | | } else { |
| | | targetObj[keys] = source[keys] |
| | | targetObj[keys] = source[keys]; |
| | | } |
| | | }) |
| | | return targetObj |
| | | }); |
| | | return targetObj; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {Array} |
| | | */ |
| | | export function uniqueArr(arr) { |
| | | return Array.from(new Set(arr)) |
| | | return Array.from(new Set(arr)); |
| | | } |
| | | |
| | | /** |
| | | * @returns {string} |
| | | */ |
| | | export function createUniqueString() { |
| | | const timestamp = +new Date() + '' |
| | | const randomNum = parseInt((1 + Math.random()) * 65536) + '' |
| | | return (+(randomNum + timestamp)).toString(32) |
| | | const timestamp = +new Date() + ""; |
| | | const randomNum = parseInt((1 + Math.random()) * 65536) + ""; |
| | | return (+(randomNum + timestamp)).toString(32); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @returns {boolean} |
| | | */ |
| | | export function hasClass(ele, cls) { |
| | | return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) |
| | | return !!ele.className.match(new RegExp("(\\s|^)" + cls + "(\\s|$)")); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param {string} cls |
| | | */ |
| | | export function addClass(ele, cls) { |
| | | if (!hasClass(ele, cls)) ele.className += ' ' + cls |
| | | if (!hasClass(ele, cls)) ele.className += " " + cls; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | export function removeClass(ele, cls) { |
| | | if (hasClass(ele, cls)) { |
| | | const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') |
| | | ele.className = ele.className.replace(reg, ' ') |
| | | const reg = new RegExp("(\\s|^)" + cls + "(\\s|$)"); |
| | | ele.className = ele.className.replace(reg, " "); |
| | | } |
| | | } |
| | | |
| | | export function getTimePeriod(num) { |
| | | let s1 = ""; |
| | | let s2 = ""; |
| | | let e1 = ""; |
| | | let e2 = ""; |
| | | |
| | | if (num % 2 === 0) { |
| | | s2 = "30"; |
| | | s1 = ~~(num / 2 - 1) < 10 ? "0" + ~~(num / 2 - 1) : ~~(num / 2 - 1); |
| | | e1 = ~~(num / 2) < 10 ? "0" + ~~(num / 2) : ~~(num / 2); |
| | | e2 = "00"; |
| | | } else { |
| | | s1 = ~~(num / 2) < 10 ? "0" + ~~(num / 2) : ~~(num / 2); |
| | | s2 = "00"; |
| | | e1 = s1; |
| | | e2 = "30"; |
| | | } |
| | | return s1 + ":" + s2 + "-" + e1 + ":" + e2; |
| | | } |
| | |
| | | <template> |
| | | <div class="app-container" style="padding:0"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="query-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | class="query-form" |
| | | > |
| | | <el-form-item label="ææ ç¼ç " prop="code"> |
| | | <el-input |
| | | v-model="queryParams.code" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row :gutter="10" class="mb8"> |
| | |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="tableData" v-loading="loading" border @selection-change="" @cell-click="openDlg" > |
| | | <el-table |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | border |
| | | @selection-change="" |
| | | @cell-click="openDlg" |
| | | > |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="name"/> |
| | | <el-table-column label="ææ åç§°" align="center" prop="number"/> |
| | | <el-table-column label="å®é
å¼" align="center" prop="value"/> |
| | |
| | | <el-table-column label="ä¸éå¼" align="center" prop="code"/> |
| | | <el-table-column label="æ¥è¦æ¬¡æ°" align="center" prop="what"> |
| | | <template slot-scope="scope"> |
| | | <div style="color:blue;text-decoration:underline ;cursor:pointer">{{scope.row.what}}</div> |
| | | <div style="color:blue;text-decoration:underline ;cursor:pointer"> |
| | | {{ scope.row.what }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!--å¼¹æ¡--> |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" :close-on-click-modal="false" > |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <line-chart :chart-data="lineChartData" /> |
| | | </el-row> |
| | | <el-table :data="tableData" :show-header="hiddenTableHeader" border="1px" > |
| | |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | const lineChartData = { |
| | | newVisitis: { |
| | | } |
| | | } |
| | | newVisitis: {} |
| | | }; |
| | | import { |
| | | addEnergyindex, |
| | | delEnergyindex, |
| | |
| | | listEnergyindex, |
| | | updateEnergyindex |
| | | } from "@/api/basicsetting/energyindex"; |
| | | import LineChart from './LiChart' |
| | | |
| | | |
| | | import LineChart from "./LiChart"; |
| | | |
| | | export default { |
| | | name: 'energyIndex', |
| | | name: "energyIndex", |
| | | components: { |
| | | LineChart |
| | | }, |
| | |
| | | unitIdOptions: [], |
| | | // æ¥è¯¢åæ° |
| | | lineChartData:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | }, |
| | | |
| | | tableData: [], |
| | | datas: [{ |
| | | name: 'BUG', |
| | | number: '98013', |
| | | value: '500', |
| | | values: '450', |
| | | code: '480', |
| | | what: '5', |
| | | one: 'æ¥è¦æ¶é´', |
| | | two: '0ç¹', |
| | | three: '1ç¹', |
| | | four : '2ç¹', |
| | | five :'3ç¹', |
| | | six : '4ç¹', |
| | | seven :'5ç¹', |
| | | eieght:'6ç¹', |
| | | datas: [ |
| | | { |
| | | name: "BUG", |
| | | number: "98013", |
| | | value: "500", |
| | | values: "450", |
| | | code: "480", |
| | | what: "5", |
| | | one: "æ¥è¦æ¶é´", |
| | | two: "0ç¹", |
| | | three: "1ç¹", |
| | | four: "2ç¹", |
| | | five: "3ç¹", |
| | | six: "4ç¹", |
| | | seven: "5ç¹", |
| | | eieght: "6ç¹" |
| | | }, |
| | | { |
| | | name: 'BUG', |
| | | number: '98013', |
| | | value : '500', |
| | | values : '450', |
| | | code : '480', |
| | | what: '5', |
| | | one :'æ¥è¦éå¼', |
| | | two :'210', |
| | | three :'172', |
| | | four : '181', |
| | | five :'224', |
| | | six : '280', |
| | | seven :'310', |
| | | eieght:'300', |
| | | name: "BUG", |
| | | number: "98013", |
| | | value: "500", |
| | | values: "450", |
| | | code: "480", |
| | | what: "5", |
| | | one: "æ¥è¦éå¼", |
| | | two: "210", |
| | | three: "172", |
| | | four: "181", |
| | | five: "224", |
| | | six: "280", |
| | | seven: "310", |
| | | eieght: "300" |
| | | }, |
| | | { |
| | | name: 'BUG', |
| | | number: '98013', |
| | | value : '500', |
| | | values : '450', |
| | | code : '480' , |
| | | what: '5', |
| | | one :'æ¥è¦æ¶å¼', |
| | | two :'300', |
| | | three :'182', |
| | | four : '191', |
| | | five :'234', |
| | | six : '290', |
| | | seven :'330', |
| | | eieght:'310', |
| | | name: "BUG", |
| | | number: "98013", |
| | | value: "500", |
| | | values: "450", |
| | | code: "480", |
| | | what: "5", |
| | | one: "æ¥è¦æ¶å¼", |
| | | two: "300", |
| | | three: "182", |
| | | four: "191", |
| | | five: "234", |
| | | six: "290", |
| | | seven: "330", |
| | | eieght: "310" |
| | | } |
| | | ], |
| | | |
| | |
| | | rules: { |
| | | name: [ |
| | | {required: true, message: "ææ åç§°ä¸è½ä¸ºç©º", trigger: "blur"}, |
| | | {min: 2, max: 20, message: 'é¿åº¦å¨ 2 å° 20 个å符', trigger: 'blur'} |
| | | ], code: [ |
| | | { min: 2, max: 20, message: "é¿åº¦å¨ 2 å° 20 个å符", trigger: "blur" } |
| | | ], |
| | | code: [ |
| | | {required: true, message: "ææ ç¼ç ä¸è½ä¸ºç©º", trigger: "blur"}, |
| | | {min: 2, max: 20, message: 'é¿åº¦å¨ 2 å° 20 个å符', trigger: 'blur'}, |
| | | {pattern: /^[a-zA-Z][A-Za-z0-9_-]+$/, message: 'å¿
须为æ°åã忝ã- æ_ ï¼ä¸é¦å符åªè½ä¸ºåæ¯'} |
| | | ], indexCategory: [ |
| | | { |
| | | min: 2, |
| | | max: 20, |
| | | message: "é¿åº¦å¨ 2 å° 20 个å符", |
| | | trigger: "blur" |
| | | }, |
| | | { |
| | | pattern: /^[a-zA-Z][A-Za-z0-9_-]+$/, |
| | | message: "å¿
须为æ°åã忝ã- æ_ ï¼ä¸é¦å符åªè½ä¸ºåæ¯" |
| | | } |
| | | ], |
| | | indexCategory: [ |
| | | {required: true, message: "è¯·éæ©ææ åç±»", trigger: "blur"} |
| | | ] |
| | | }, |
| | |
| | | /* this.getList();*/ |
| | | this.getDicts("sys_index_category").then(response => { |
| | | this.indexCategoryOptions = response.data; |
| | | this.indexCategoryDefaultVal = this.indexCategoryOptions.find(f => f.isDefault === 'Y'); |
| | | this.indexCategoryDefaultVal = this.indexCategoryOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ); |
| | | }); |
| | | this.getDicts("sys_unit").then(response => { |
| | | this.unitIdOptions = response.data; |
| | | this.unitDefaultVal = this.unitIdOptions.find(f => f.isDefault === 'Y'); |
| | | this.unitDefaultVal = this.unitIdOptions.find(f => f.isDefault === "Y"); |
| | | }); |
| | | setInterval(this.getList(), 30000); |
| | | |
| | | this.bpy() |
| | | |
| | | this.bpy(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ææ ä¿¡æ¯å表 */ |
| | |
| | | } else { |
| | | this.energyindexList = []; |
| | | } |
| | | |
| | | }, |
| | | bpy() { |
| | | this.tableData = this.datas; |
| | |
| | | this.open=true; |
| | | } |
| | | } |
| | | |
| | | }; |
| | | </script> |
| | |
| | | setDevice, |
| | | setEnergy, |
| | | setProduct |
| | | } from '@/api/basicsetting/modelNode' |
| | | } from "@/api/basicsetting/modelNode"; |
| | | import zbIndex from "./zbIndex"; |
| | | import cjdIndex from "./cjdIndex"; |
| | | |
| | |
| | | components: {zbIndex, cjdIndex}, |
| | | data() { |
| | | return { |
| | | currentNode: '', |
| | | currentNode: "", |
| | | deviceDialog: false, |
| | | energyDialog: false, |
| | | productDialog: false, |
| | |
| | | settingProductList: [], |
| | | settingIndexList: [], |
| | | disabledSetting: true |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | modelNodeChange(modelNode) { |
| | | this.settingDeviceList = []; |
| | | this.settingIndexList = []; |
| | | this.disabledSetting = modelNode === undefined || modelNode === '' || modelNode === null; |
| | | this.disabledSetting = |
| | | modelNode === undefined || modelNode === "" || modelNode === null; |
| | | this.$refs.zbIndex.setModelNode(modelNode); |
| | | this.$refs.cjdIndex.setModelNode(modelNode); |
| | | if (modelNode) { |
| | | this.currentNode = modelNode; |
| | | this.deviceLoading = true; |
| | | getSettingDevice(modelNode.id).then((response) => { |
| | | getSettingDevice(modelNode.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.settingDeviceList = response.data; |
| | | } else { |
| | |
| | | }); |
| | | |
| | | this.energyLoading = true; |
| | | getSettingEnergy(modelNode.id).then((response) => { |
| | | getSettingEnergy(modelNode.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.settingEnergyList = response.data; |
| | | } else { |
| | |
| | | }); |
| | | |
| | | this.productLoading = true; |
| | | getSettingProduct(modelNode.id).then((response) => { |
| | | getSettingProduct(modelNode.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.settingProductList = response.data; |
| | | } else { |
| | |
| | | }); |
| | | |
| | | this.indexLoading = true; |
| | | getSettingIndex(modelNode.id).then((response) => { |
| | | getSettingIndex(modelNode.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.settingIndexList = response.data; |
| | | } else { |
| | |
| | | }, |
| | | showCollectIndexDialog() { |
| | | this.$nextTick(() => { |
| | | this.$refs.collectIndexSetting.init(this.currentNode, this.settingIndexList); |
| | | }) |
| | | }, |
| | | this.$refs.collectIndexSetting.init( |
| | | this.currentNode, |
| | | this.settingIndexList |
| | | ); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | <template> |
| | | <div class="trendLineChart-right"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="query-form" |
| | | style="margin-bottom: 20px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | class="query-form" |
| | | style="margin-bottom: 20px" |
| | | > |
| | | <el-select v-model="value" placeholder="è¯·éæ©" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-form-item label="" prop="minute" :rules="rules.numRule"> |
| | | ææ° |
| | | <el-input v-model="queryParams.minute" :min="1" :max="120" style="width: 120px" type="number"></el-input> |
| | | <el-input |
| | | v-model="queryParams.minute" |
| | | :min="1" |
| | | :max="120" |
| | | style="width: 120px" |
| | | type="number" |
| | | ></el-input> |
| | | åé |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="tableStyle" v-if="value=='tableOpen'"> |
| | | <el-table :data="tableData" ref="dataTable" border style="margin-top: 20px" |
| | | <el-table |
| | | :data="tableData" |
| | | ref="dataTable" |
| | | border |
| | | style="margin-top: 20px" |
| | | :height="height" |
| | | @selection-change="handleSelectionChange"> |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" align="center"></el-table-column> |
| | | <el-table-column prop="statusName" align="center" label="åæ è½´"> |
| | | <template slot-scope="scope"> |
| | |
| | | v-model="scope.row.yValue" |
| | | @change="selectNumber(scope.row,scope.$index)" |
| | | > |
| | | |
| | | <el-option |
| | | v-for="(item,index) in addTableSelect" |
| | | :key="item.yValue" |
| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="meteName" |
| | | align="center" |
| | | label="表å
·åç§°"> |
| | | <el-table-column prop="meteName" align="center" label="表å
·åç§°"> |
| | | </el-table-column> |
| | | <el-table-column prop="indexName" align="center" label="ç¹ä½åç§°"/> |
| | | <el-table-column prop="indexUnit" align="center" label="åä½" :formatter="unitFormat"/> |
| | | <el-table-column |
| | | prop="indexUnit" |
| | | align="center" |
| | | label="åä½" |
| | | :formatter="unitFormat" |
| | | /> |
| | | <el-table-column prop="value" align="center" label="å½åå¼"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="openDialog(scope.row,'line')">è¶å¿å¾ |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="openDialog(scope.row, 'line')" |
| | | >è¶å¿å¾ |
| | | </el-button> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="openDialog(scope.row,'table')">æ°æ® |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="openDialog(scope.row, 'table')" |
| | | >æ°æ® |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <component ref="lincharVue" :is="vuename" :chart-data="liveLineChartData" style="margin-top: 20px"></component> |
| | | <component |
| | | ref="lincharVue" |
| | | :is="vuename" |
| | | :chart-data="liveLineChartData" |
| | | style="margin-top: 20px" |
| | | ></component> |
| | | <!--å岿²çº¿dialog--> |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" :close-on-click-modal="false" @close="closeDialog"> |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <history-alarm-view ref="historyAlarmView" :code="code" :activeName="activeName" v-if="dialogType==='line'"/> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | | @close="closeDialog" |
| | | > |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <history-alarm-view |
| | | ref="historyAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | v-if="dialogType === 'line'" |
| | | /> |
| | | <TableDialog :code="code" v-else :open="open"/> |
| | | </el-row> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | import { |
| | | getTrendSettingIndexLineData, |
| | | getSvgTrendSettingIndex |
| | | } from '@/api/dataMonitoring/realTimeTrend/realTimeTrend' |
| | | import historyAlarmView from '../../energyAlarm/realTimeAlarm/historyAlarmView' |
| | | import mixins from '@/layout/mixin/getHeight' |
| | | import TableDialog from './tableDialog' |
| | | } from "@/api/dataMonitoring/realTimeTrend/realTimeTrend"; |
| | | import historyAlarmView from "../../energyAlarm/realTimeAlarm/historyAlarmView"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import TableDialog from "./tableDialog"; |
| | | |
| | | let timers |
| | | let timers; |
| | | export default { |
| | | name: 'energyIndex', |
| | | name: "energyIndex", |
| | | components: { |
| | | lincharVue: () => import('../../dataMonitoring/realTimeTrend/LineChart.vue'), |
| | | lincharVue: () => |
| | | import("../../dataMonitoring/realTimeTrend/LineChart.vue"), |
| | | historyAlarmView, |
| | | TableDialog |
| | | }, |
| | | mixins: [mixins], |
| | | data() { |
| | | const checkNum = (rule, value, callback) => { |
| | | let reg = /(^([-]?)[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^([-]?)(0){1}$)|(^([-]?)[0-9]\.[0-9]([0-9])?$)/ |
| | | if ('' === value && !reg.test(value)) { |
| | | callback(new Error('åééæ°åå¹¶ä¸ä¸è½ä¸ºç©º')) |
| | | let reg = /(^([-]?)[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^([-]?)(0){1}$)|(^([-]?)[0-9]\.[0-9]([0-9])?$)/; |
| | | if ("" === value && !reg.test(value)) { |
| | | callback(new Error("åééæ°åå¹¶ä¸ä¸è½ä¸ºç©º")); |
| | | } else if (0 > value || 120 < value) { |
| | | callback(new Error('æ°åèå´1~120çæ£æ´æ°')) |
| | | callback(new Error("æ°åèå´1~120çæ£æ´æ°")); |
| | | } else { |
| | | callback() |
| | | callback(); |
| | | } |
| | | } |
| | | }; |
| | | return { |
| | | value: 'tableOpen', |
| | | yValue: '', |
| | | value: "tableOpen", |
| | | yValue: "", |
| | | minute: undefined, |
| | | count: undefined, |
| | | pickerOptions: { |
| | |
| | | minute: undefined, |
| | | nodeId: undefined, |
| | | //ææ index |
| | | indexType: 'COLLECT', |
| | | params: [{ |
| | | 'minute': undefined, |
| | | 'count': undefined |
| | | }] |
| | | indexType: "COLLECT", |
| | | params: [ |
| | | { |
| | | minute: undefined, |
| | | count: undefined |
| | | } |
| | | ] |
| | | }, |
| | | tableData: [], |
| | | lineData: [], |
| | |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | numRule: [ |
| | | { type: 'number', validator: checkNum, trigger: 'change' } |
| | | ] |
| | | numRule: [{ type: "number", validator: checkNum, trigger: "change" }] |
| | | }, |
| | | options: [{ |
| | | value: 'tableOpen', |
| | | label: 'åæ°æå¼' |
| | | }, { |
| | | value: 'tableClose', |
| | | label: 'åæ°æ¶ç¼©' |
| | | }], |
| | | options: [ |
| | | { |
| | | value: "tableOpen", |
| | | label: "åæ°æå¼" |
| | | }, |
| | | { |
| | | value: "tableClose", |
| | | label: "åæ°æ¶ç¼©" |
| | | } |
| | | ], |
| | | addTableSelect: [], |
| | | liveLineChartData: { |
| | | datas: [], |
| | |
| | | legendNameArr: [] |
| | | }, |
| | | selectYaxis: [], |
| | | activeName: 'second', |
| | | activeName: "second", |
| | | code: undefined, |
| | | rows: [], |
| | | //åä½ |
| | |
| | | unitDefaultVal: undefined, |
| | | intervalTime: undefined, |
| | | timer: undefined, |
| | | vuename: '', |
| | | vuename: "", |
| | | height: null |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getConfigKey('dataMonitoring.realTimeTrend.pastMinute').then(response => { |
| | | this.queryParams.minute = response.msg |
| | | }) |
| | | this.getConfigKey('dataMonitoring.realTimeTrend.piontCount').then(response => { |
| | | this.count = response.msg |
| | | }) |
| | | this.getDicts('sys_unit').then(response => { |
| | | this.unitOptions = response.data |
| | | }) |
| | | this.getConfigKey("dataMonitoring.realTimeTrend.pastMinute").then( |
| | | response => { |
| | | this.queryParams.minute = response.msg; |
| | | } |
| | | ); |
| | | this.getConfigKey("dataMonitoring.realTimeTrend.piontCount").then( |
| | | response => { |
| | | this.count = response.msg; |
| | | } |
| | | ); |
| | | this.getDicts("sys_unit").then(response => { |
| | | this.unitOptions = response.data; |
| | | }); |
| | | }, |
| | | mounted() { |
| | | clearInterval(this.timer) |
| | | clearInterval(timers) |
| | | timers = setInterval(this.setTimer, 50) |
| | | this.getConfigKey('dataMonitoring.realTimeTrend.intervalTime').then(response => { |
| | | clearInterval(this.timer); |
| | | clearInterval(timers); |
| | | timers = setInterval(this.setTimer, 50); |
| | | this.getConfigKey("dataMonitoring.realTimeTrend.intervalTime").then( |
| | | response => { |
| | | if (response.code === 200) { |
| | | this.intervalTime = response.msg |
| | | this.timer = setInterval(this.getLineDataList, this.intervalTime) |
| | | this.intervalTime = response.msg; |
| | | this.timer = setInterval(this.getLineDataList, this.intervalTime); |
| | | } |
| | | }) |
| | | } |
| | | ); |
| | | }, |
| | | beforeDestroy() { |
| | | // 页é¢éæ¯æ¶ è¦åæ¢è®¡æ¶å¨ï¼å¦åé项å¡åæ¢è®¡æ¶å¨ä¸åæ¢ï¼ä¼è¶æ¥è¶å¿«ï¼å¤ä¸ªçº¿ç¨ |
| | | clearInterval(this.timer) |
| | | clearInterval(timers) |
| | | clearInterval(this.timer); |
| | | clearInterval(timers); |
| | | }, |
| | | methods: { |
| | | setTimer() { |
| | | let that = this |
| | | let that = this; |
| | | this.$nextTick(() => { |
| | | that.$refs.dataTable && that.$refs.dataTable.doLayout() |
| | | }) |
| | | that.$refs.dataTable && that.$refs.dataTable.doLayout(); |
| | | }); |
| | | }, |
| | | setCharts() { |
| | | this.height = window.innerHeight - 300 + 'px' |
| | | this.height = window.innerHeight - 300 + "px"; |
| | | }, |
| | | modelNodeChange(modelNode) { |
| | | this.queryParams.nodeId = modelNode |
| | | this.getList() |
| | | this.disabledSetting = modelNode === undefined || modelNode === '' || modelNode === null |
| | | this.queryParams.nodeId = modelNode; |
| | | this.getList(); |
| | | this.disabledSetting = |
| | | modelNode === undefined || modelNode === "" || modelNode === null; |
| | | if (modelNode) { |
| | | this.currentNode = modelNode |
| | | this.currentNode = modelNode; |
| | | } |
| | | if (this.$refs.lincharVue != undefined && this.$refs.lincharVue != null) { |
| | | this.$refs.lincharVue.closeLineChar() |
| | | this.$refs.lincharVue.closeLineChar(); |
| | | } |
| | | }, |
| | | /** æ¥è¯¢ææ ä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.$refs['queryForm'].validate(valid => { |
| | | this.$refs["queryForm"].validate(valid => { |
| | | if (valid) { |
| | | this.loading = true |
| | | var search = this.queryParams |
| | | search.params[0].minute = this.queryParams.minute |
| | | search.params[0].count = this.count |
| | | this.loading = true; |
| | | var search = this.queryParams; |
| | | search.params[0].minute = this.queryParams.minute; |
| | | search.params[0].count = this.count; |
| | | //è¡¨æ ¼æ°æ® |
| | | getSvgTrendSettingIndex(search).then(response => { |
| | | this.tableData = response.data |
| | | this.total = response.total |
| | | this.addTableSelect = [] |
| | | this.tableData = response.data; |
| | | this.total = response.total; |
| | | this.addTableSelect = []; |
| | | //è¡¨æ ¼ä¸æéæ© |
| | | for (let j = 0; j < 5 && j < this.tableData.length; j++) { |
| | | let optionItem = { |
| | | yValue: 'y' + j, |
| | | yLable: 'Y' + j |
| | | yValue: "y" + j, |
| | | yLable: "Y" + j |
| | | }; |
| | | this.addTableSelect.push(optionItem); |
| | | } |
| | | this.addTableSelect.push(optionItem) |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | this.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1 |
| | | this.getList() |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | getTime() { |
| | | //æ¾ç¤ºæ¶é´ |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.drawChars(selection) |
| | | this.drawChars(selection); |
| | | // if(selection.length > 1){ //åéæ¶ä¸º1ï¼éè¦éæ©né¡¹æ¹æ°å¼ä¸ºnå°±å¯ä»¥ |
| | | // this.$refs.dataTable.toggleRowSelection(selection[0],false);//è¶
åºæå®éæ©ä¸ªæ°åï¼æç¬¬ä¸ä¸ªéä¸çselection设为false |
| | | // selection.splice(0,1);//åæ¶è¦æéä¸ç¬¬ä¸é¡¹ç§»é¤ |
| | | // } |
| | | }, |
| | | drawChars(selection) { |
| | | this.codes = selection.map(item => item.code) |
| | | this.indexNames = selection.map(item => item.indexName) |
| | | this.selectYaxis = selection.map(item => item.yValue ? item.yValue : '') |
| | | this.codes = selection.map(item => item.code); |
| | | this.indexNames = selection.map(item => item.indexName); |
| | | this.selectYaxis = selection.map(item => |
| | | item.yValue ? item.yValue : "" |
| | | ); |
| | | if (this.codes.length > 0) { |
| | | this.cleanLineData() |
| | | this.vuename = 'lincharVue' |
| | | this.getLineDataList() |
| | | this.cleanLineData(); |
| | | this.vuename = "lincharVue"; |
| | | this.getLineDataList(); |
| | | } else { |
| | | this.cleanLineData() |
| | | if (this.$refs.lincharVue != undefined && this.$refs.lincharVue != null) { |
| | | this.$refs.lincharVue.closeLineChar() |
| | | this.cleanLineData(); |
| | | if ( |
| | | this.$refs.lincharVue != undefined && |
| | | this.$refs.lincharVue != null |
| | | ) { |
| | | this.$refs.lincharVue.closeLineChar(); |
| | | } |
| | | } |
| | | }, |
| | | getLineDataList() { |
| | | let that = this |
| | | let that = this; |
| | | this.$nextTick(() => { |
| | | that.$refs.dataTable.doLayout() |
| | | }) |
| | | that.$refs.dataTable.doLayout(); |
| | | }); |
| | | if (this.codes.length > 0) { |
| | | this.cleanLineData() |
| | | this.cleanLineData(); |
| | | //æçº¿å¾æ°æ® |
| | | getTrendSettingIndexLineData(this.codes, this.queryParams.minute, this.count).then(response => { |
| | | getTrendSettingIndexLineData( |
| | | this.codes, |
| | | this.queryParams.minute, |
| | | this.count |
| | | ).then(response => { |
| | | //æ°æ®æ·»å |
| | | this.liveLineChartData.datas = response.data |
| | | this.liveLineChartData.datas = response.data; |
| | | this.$nextTick(() => { |
| | | that.$refs.dataTable.doLayout() |
| | | }) |
| | | that.$refs.dataTable.doLayout(); |
| | | }); |
| | | // xè½´æ¶é´æ·»å |
| | | for (let i = 0; i < this.liveLineChartData.datas[0].length; i++) { |
| | | this.liveLineChartData.timeList.push(this.liveLineChartData.datas[0][i].showDataTime) |
| | | this.liveLineChartData.timeList.push( |
| | | this.liveLineChartData.datas[0][i].showDataTime |
| | | ); |
| | | } |
| | | //æ²çº¿åç§°æ·»å |
| | | this.liveLineChartData.legendNameArr = this.indexNames |
| | | this.liveLineChartData.legendArr = this.selectYaxis |
| | | }) |
| | | this.liveLineChartData.legendNameArr = this.indexNames; |
| | | this.liveLineChartData.legendArr = this.selectYaxis; |
| | | }); |
| | | } |
| | | }, |
| | | selectNumber(row, index) { |
| | | let selection = this.$refs.dataTable.selection |
| | | this.drawChars(selection) |
| | | let selection = this.$refs.dataTable.selection; |
| | | this.drawChars(selection); |
| | | }, |
| | | cleanLineData() { |
| | | this.liveLineChartData.legendArr = [] |
| | | this.liveLineChartData.timeList = [] |
| | | this.liveLineChartData.datas = [] |
| | | this.liveLineChartData.legendNameArr = [] |
| | | this.liveLineChartData.legendArr = []; |
| | | this.liveLineChartData.timeList = []; |
| | | this.liveLineChartData.datas = []; |
| | | this.liveLineChartData.legendNameArr = []; |
| | | }, |
| | | closeDialog() { |
| | | this.activeName = '' |
| | | this.activeName = ""; |
| | | }, |
| | | openDialog(e, type) { |
| | | this.dialogType = type |
| | | this.dialogType = type; |
| | | if (e) { |
| | | this.code = e.code |
| | | this.open = true |
| | | this.activeName = 'second' |
| | | this.title = type === 'line' ? 'å岿²çº¿æ¥è¯¢' : 'å岿°æ®' |
| | | this.code = e.code; |
| | | this.open = true; |
| | | this.activeName = "second"; |
| | | this.title = type === "line" ? "å岿²çº¿æ¥è¯¢" : "å岿°æ®"; |
| | | } |
| | | }, |
| | | cancelDialog() { |
| | | this.open = false |
| | | this.open = false; |
| | | }, |
| | | // åä½åå
¸ç¿»è¯ |
| | | unitFormat(row, column) { |
| | | return this.selectDictLabel(this.unitOptions, row.indexUnit) |
| | | } |
| | | |
| | | return this.selectDictLabel(this.unitOptions, row.indexUnit); |
| | | } |
| | | } |
| | | |
| | | }; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .tableStyle .el-table__header-wrapper .el-checkbox { |
| | | display: none |
| | | display: none; |
| | | } |
| | | |
| | | .trendLineChart-right { |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'280px'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | 设å¤å¯å管ç |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-containercard title="设å¤å¯å管ç" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | :showOpt="false" |
| | | ></ModelNode> |
| | | </basic-containercard> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container class="search-wrapper" :style="bodyStyleRight"> |
| | | <deviceTabSetting ref="deviceTabSetting"></deviceTabSetting> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import deviceTabSetting from "./deviceTabSetting"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | |
| | | export default { |
| | | components: {deviceTabSetting, ModelNode}, |
| | | components: { deviceTabSetting, ModelNode, ShrinkCol }, |
| | | mixins: [mixins], |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | | data() { |
| | | return { |
| | | modelData: '', |
| | | bodyStyleRight: {}, |
| | | modelData: "", |
| | | modelInfoOptions: [], |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | isCollapse: false |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 105 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.deviceTabSetting.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <div class="app-container" style="padding:0"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="0" |
| | | class="query-form"> |
| | | <div class="app-container" style="padding:0 0 30px 0"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="0" |
| | | class="query-form" |
| | | > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="5"> |
| | | <el-form-item> |
| | | <el-select v-model="queryParams.indexCategory" placeholder="è¯·éæ©ææ åç±»" clearable |
| | | <el-select |
| | | v-model="queryParams.indexCategory" |
| | | placeholder="è¯·éæ©ææ åç±»" |
| | | clearable |
| | | size="small" |
| | | @change="handleQuery"> |
| | | @change="handleQuery" |
| | | > |
| | | <el-option |
| | | v-for="dict in indexCategoryOptions" |
| | | :key="dict.dictValue" |
| | |
| | | @click="handleImport" |
| | | >导å
¥ |
| | | </el-button> |
| | | <el-button type="text" |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-setting" |
| | | @click="collectIndexSetting" |
| | | v-if="!statisticIndex"> |
| | | v-if="!statisticIndex" |
| | | > |
| | | é
ç½®ééç¹ |
| | | </el-button> |
| | | </el-form-item> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | <el-table v-loading="loading" :data="energyindexList" border |
| | | @selection-change="handleSelectionChange"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="energyindexList" |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center"/> |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="code"/> |
| | | <el-table-column label="ææ åç§°" align="center" prop="name"/> |
| | | <el-table-column label="ç³»ç»ææ åç±»" align="center" prop="indexCategory" |
| | | :formatter="indexCategoryFormat"/> |
| | | <el-table-column label="åä½" align="center" prop="unitId" :formatter="unitIdFormat"/> |
| | | <el-table-column label="æä½" width="200" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column |
| | | label="ç³»ç»ææ åç±»" |
| | | align="center" |
| | | prop="indexCategory" |
| | | :formatter="indexCategoryFormat" |
| | | /> |
| | | <el-table-column |
| | | label="åä½" |
| | | align="center" |
| | | prop="unitId" |
| | | :formatter="unitIdFormat" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | width="200" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹ææ ä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="500px" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="ææ åç§°" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥ææ åç§°"/> |
| | |
| | | <el-input v-model="form.code" placeholder="请è¾å
¥ææ ç¼ç "/> |
| | | </el-form-item> |
| | | <el-form-item label="ææ åç±»"> |
| | | <el-select v-model="form.indexCategory" placeholder="è¯·éæ©ææ åç±»" prop="indexCategory"> |
| | | <el-select |
| | | v-model="form.indexCategory" |
| | | placeholder="è¯·éæ©ææ åç±»" |
| | | prop="indexCategory" |
| | | > |
| | | <el-option |
| | | v-for="dict in indexCategoryOptions" |
| | | :key="dict.dictValue" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="顺åºå·"> |
| | | <el-input-number v-model="form.orderNum" controls-position="right" :min="0"/> |
| | | <el-input-number |
| | | v-model="form.orderNum" |
| | | controls-position="right" |
| | | :min="0" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤"> |
| | | <el-select v-model="form.equipment" placeholder="è¯·éæ©è®¾å¤"> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-drawer title="é
ç½®ææ åå¨" :visible.sync="indexStorageShow" direction="rtl" |
| | | <el-drawer |
| | | title="é
ç½®ææ åå¨" |
| | | :visible.sync="indexStorageShow" |
| | | direction="rtl" |
| | | @open="showIndexStorageDialog" |
| | | size="45%" |
| | | :wrapperClosable="false"> |
| | | <IndexStorage ref="indexStorage" |
| | | :nodeId="currentNode===undefined?'':currentNode.id"></IndexStorage> |
| | | :wrapperClosable="false" |
| | | > |
| | | <IndexStorage |
| | | ref="indexStorage" |
| | | :nodeId="currentNode === undefined ? '' : currentNode.id" |
| | | ></IndexStorage> |
| | | </el-drawer> |
| | | <!--éæ©ééææ --> |
| | | <el-drawer title="éæ©ééææ " :visible.sync="collectIndexDialog" direction="rtl" |
| | | <el-drawer |
| | | title="éæ©ééææ " |
| | | :visible.sync="collectIndexDialog" |
| | | direction="rtl" |
| | | @open="showCollectIndexDialog" |
| | | size="45%"> |
| | | <CollectIndexSetting ref="collectIndexSetting" |
| | | @collectIndexConfirmSelect="collectIndexConfirmSelect"></CollectIndexSetting> |
| | | size="45%" |
| | | > |
| | | <CollectIndexSetting |
| | | ref="collectIndexSetting" |
| | | @collectIndexConfirmSelect="collectIndexConfirmSelect" |
| | | ></CollectIndexSetting> |
| | | </el-drawer> |
| | | |
| | | <!-- 导å
¥å¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" :visible.sync="upload.open" :destroy-on-close="true" |
| | | width="400px"> |
| | | <el-dialog |
| | | :title="upload.title" |
| | | :visible.sync="upload.open" |
| | | :destroy-on-close="true" |
| | | width="400px" |
| | | > |
| | | <el-upload |
| | | ref="upload" |
| | | :limit="1" |
| | |
| | | <div class="el-upload__tip" slot="tip"> |
| | | <el-checkbox v-model="upload.updateSupport"/> |
| | | æ¯å¦æ´æ°å·²ç»åå¨çç¨æ·æ°æ® |
| | | <el-link type="info" style="font-size:12px" @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> |
| | | <el-link type="info" style="font-size:12px" @click="importTemplate" |
| | | >ä¸è½½æ¨¡æ¿</el-link |
| | | > |
| | | </div> |
| | | <div class="el-upload__tip" style="color:red" slot="tip">æç¤ºï¼ä»
å
许导å
¥âxlsâæâxlsxâæ ¼å¼æä»¶ï¼</div> |
| | | <div class="el-upload__tip" style="color:red" slot="tip"> |
| | | æç¤ºï¼ä»
å
许导å
¥âxlsâæâxlsxâæ ¼å¼æä»¶ï¼ |
| | | </div> |
| | | </el-upload> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> |
| | |
| | | updateEnergyindex |
| | | } from "../../../api/basicsetting/energyindex"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import {setNodeToIndex} from '@/api/basicsetting/modelNode' |
| | | import { setNodeToIndex } from "@/api/basicsetting/modelNode"; |
| | | import IndexStorage from "./indexStorage"; |
| | | import CollectIndexSetting from "../nodeSetting/collectIndexSetting"; |
| | | import {getPointFacility} from "@/api/comprehensiveStatistics/comprehensive"; |
| | | |
| | | export default { |
| | | name: 'EnergyIndex', |
| | | name: "EnergyIndex", |
| | | components: {CollectIndexSetting, IndexStorage}, |
| | | props: ["indexType"], |
| | | data() { |
| | |
| | | rules: { |
| | | name: [ |
| | | {required: true, message: "ææ åç§°ä¸è½ä¸ºç©º", trigger: "blur"}, |
| | | {min: 2, max: 20, message: 'é¿åº¦å¨ 2 å° 20 个å符', trigger: 'blur'} |
| | | ], code: [ |
| | | { min: 2, max: 20, message: "é¿åº¦å¨ 2 å° 20 个å符", trigger: "blur" } |
| | | ], |
| | | code: [ |
| | | {required: true, message: "ææ ç¼ç ä¸è½ä¸ºç©º", trigger: "blur"}, |
| | | {min: 2, max: 20, message: 'é¿åº¦å¨ 2 å° 30 个å符', trigger: 'blur'}, |
| | | {pattern: /^[a-zA-Z][A-Za-z0-9#_-]+$/, message: 'å¿
须为æ°åã忝ã#ã- æ_ ï¼ä¸é¦å符åªè½ä¸ºåæ¯'} |
| | | ], indexCategory: [ |
| | | { |
| | | min: 2, |
| | | max: 20, |
| | | message: "é¿åº¦å¨ 2 å° 30 个å符", |
| | | trigger: "blur" |
| | | }, |
| | | { |
| | | pattern: /^[a-zA-Z][A-Za-z0-9#_-]+$/, |
| | | message: "å¿
须为æ°åã忝ã#ã- æ_ ï¼ä¸é¦å符åªè½ä¸ºåæ¯" |
| | | } |
| | | ], |
| | | indexCategory: [ |
| | | {required: true, message: "è¯·éæ©ææ åç±»", trigger: "blur"} |
| | | ] |
| | | }, |
| | |
| | | // 设置ä¸ä¼ ç请æ±å¤´é¨ |
| | | headers: {Authorization: "Bearer " + getToken()}, |
| | | // ä¸ä¼ çå°å |
| | | url: process.env.VUE_APP_BASE_API + "/basicsetting/energyindex/importData" |
| | | }, |
| | | url: |
| | | process.env.VUE_APP_BASE_API + "/basicsetting/energyindex/importData" |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getDicts("sys_index_category").then(response => { |
| | | this.indexCategoryOptions = response.data; |
| | | this.indexCategoryDefaultVal = this.indexCategoryOptions.find(f => f.isDefault === 'Y'); |
| | | this.indexCategoryDefaultVal = this.indexCategoryOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ); |
| | | }); |
| | | this.getDicts("sys_unit").then(response => { |
| | | this.unitIdOptions = response.data; |
| | | this.unitDefaultVal = this.unitIdOptions.find(f => f.isDefault === 'Y'); |
| | | this.unitDefaultVal = this.unitIdOptions.find(f => f.isDefault === "Y"); |
| | | }); |
| | | this.statisticIndex = this.$props.indexType === 'STATISTIC'; |
| | | this.statisticIndex = this.$props.indexType === "STATISTIC"; |
| | | this.getDicts("energy_type").then(response => { |
| | | this.energyIdList = response.data; |
| | | }); |
| | |
| | | this.ids = selection.map(item => item.indexId); |
| | | this.names = selection.map(item => item.name); |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length |
| | | this.multiple = !selection.length; |
| | | }, |
| | | getFacilityArchivesList() { |
| | | getPointFacility().then(response => { |
| | |
| | | handleDelete(row) { |
| | | const indexIds = row.indexId || this.ids; |
| | | const indexNames = row.name || this.names; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å 餿æ å为"' + indexNames + '"çæ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm( |
| | | 'æ¯å¦ç¡®è®¤å 餿æ å为"' + indexNames + '"çæ°æ®é¡¹?', |
| | | "è¦å", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | } |
| | | ) |
| | | .then(() => { |
| | | return delEnergyindex(this.currentNode.id, indexIds); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(this.currentNode); |
| | | this.msgSuccess("å 餿å"); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºææææ ä¿¡æ¯æ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºææææ ä¿¡æ¯æ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | return exportEnergyindex(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | dataStorage(row) { |
| | | this.indexStorageShow = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.indexStorage.getIndexStorage(row.indexId); |
| | | }) |
| | | }); |
| | | }, |
| | | showIndexStorageDialog() { |
| | | }, |
| | | showIndexStorageDialog() {}, |
| | | collectIndexSetting() { |
| | | this.collectIndexDialog = true; |
| | | }, |
| | | showCollectIndexDialog() { |
| | | this.$nextTick(() => { |
| | | this.$refs.collectIndexSetting.init(this.currentNode); |
| | | }) |
| | | }); |
| | | }, |
| | | collectIndexConfirmSelect(selectedIndex) { |
| | | let indexIds = selectedIndex.map(item => item.indexId); |
| | | setNodeToIndex(this.currentNode.id, indexIds, "COLLECT").then((response) => { |
| | | setNodeToIndex(this.currentNode.id, indexIds, "COLLECT") |
| | | .then(response => { |
| | | if (response.code !== 200) { |
| | | this.$message.error(response.msg); |
| | | } |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(this.currentNode); |
| | | }); |
| | | }, |
| | |
| | | <template> |
| | | <el-row type="flex"> |
| | | <el-col :style="{width:isCollapse?'0': '280px',position:'relative'}" v-show="!isCollapse"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="ææ åºç®¡ç" :bodyStyle="bodyStyle"> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | modelCode="statistic_index_model" |
| | | :showOpt="true" |
| | | :auth="false"/> |
| | | :auth="false" |
| | | /> |
| | | </basic-container> |
| | | <img src="~@/assets/image/rectangle.png" alt="" |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse"> |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse"/> |
| | | <el-col :style="{width:isCollapse? 'calc(100% - 48px)':'calc(100% - 280px)',paddingLeft:isCollapse? 0:'14px'}"> |
| | | <basic-container :title="currentNode ? currentNode.label+'--èç¹é
ç½®' : 'èç¹é
ç½®'" :bodyStyle="bodyStyleRight"> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container |
| | | :title="currentNode ? currentNode.label + '--èç¹é
ç½®' : 'èç¹é
ç½®'" |
| | | :bodyStyle="bodyStyleRight" |
| | | > |
| | | <IndexNodeSetting ref="modelNodeSetting"/> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </template> |
| | | <script> |
| | | import ModelNode from "../modelNode/modelNode"; |
| | | import IndexNodeSetting from "./indexNodeSetting"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from '@/components/shrink/index.vue' |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: {IndexNodeSetting, ModelNode,ShrinkCol}, |
| | | mixins: [mixins], |
| | | created() { |
| | | }, |
| | | created() {}, |
| | | data() { |
| | | return { |
| | | modelData: '', |
| | | modelData: "", |
| | | isCollapse: false, |
| | | bodyStyleRight: {}, |
| | | currentNode: '' |
| | | } |
| | | currentNode: "" |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + 'px'; |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 155 + 'px' |
| | | height: window.innerHeight - 185 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | if (node) { |
| | | this.currentNode = node |
| | | this.currentNode = node; |
| | | } |
| | | this.$refs.modelNodeSetting.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse() { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <div> |
| | | <basic-container> |
| | | <el-form :model="queryParams" ref="queryForm" label-width="120px" class="special-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | label-width="120px" |
| | | class="special-form" |
| | | > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="éå¼ç±»ååç§°" prop="limitName"> |
| | |
| | | </el-col> |
| | | <el-col :span="18"> |
| | | <el-form-item class="operation"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <!-- >导åº</el-button>--> |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | <el-table :height="height" v-loading="loading" :data="limitTypeList" @selection-change="handleSelectionChange"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="limitTypeList" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center"/> |
| | | <el-table-column label="éå¼ç±»ååç§°" align="center" prop="limitName"/> |
| | | <el-table-column label="éå¼ç±»åç¼å·" align="center" prop="limitCode"/> |
| | | <el-table-column label="æ¥è¦éå¶ç±»å" align="center" prop="alarmType" :formatter="typeFormat"/> |
| | | <el-table-column |
| | | label="æ¥è¦éå¶ç±»å" |
| | | align="center" |
| | | prop="alarmType" |
| | | :formatter="typeFormat" |
| | | /> |
| | | <el-table-column label="è²å·" align="center" prop="colorNumber"> |
| | | <template slot-scope="scope"> |
| | | <el-tag :color="scope.row.colorNumber" disable-transitions></el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯è¾è¿ç®ç¬¦" align="center" prop="comparatorOperator"/> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column |
| | | label="æ¯è¾è¿ç®ç¬¦" |
| | | align="center" |
| | | prop="comparatorOperator" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | <el-input v-model="form.limitCode" placeholder="请è¾å
¥éå¼ç±»åç¼ç "/> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥è¦éå¶ç±»å" prop="alarmType"> |
| | | <el-select v-model="form.alarmType" placeholder="è¯·éæ©æ¥è¦éå¶ç±»å" clearable size="small"> |
| | | <el-select |
| | | v-model="form.alarmType" |
| | | placeholder="è¯·éæ©æ¥è¦éå¶ç±»å" |
| | | clearable |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in alarmTypeList" |
| | | :key="item.dictValue" |
| | | :label="item.dictLabel" |
| | | :value="item.dictValue"> |
| | | :value="item.dictValue" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-color-picker |
| | | v-model="form.colorNumber" |
| | | color-format="hex" |
| | | :predefine="predefineColors"> |
| | | :predefine="predefineColors" |
| | | > |
| | | </el-color-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯è¾è¿ç®ç¬¦" prop="comparatorOperator"> |
| | | <el-select v-model="form.comparatorOperator" placeholder="æ¯è¾è¿ç®ç¬¦" clearable size="small"> |
| | | <el-select |
| | | v-model="form.comparatorOperator" |
| | | placeholder="æ¯è¾è¿ç®ç¬¦" |
| | | clearable |
| | | size="small" |
| | | > |
| | | <el-option label="大äº" value=">"/> |
| | | <el-option label="大äºçäº" value=">="/> |
| | | <el-option label="å°äº" value="<"/> |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | limitName: undefined, |
| | | limitName: undefined |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | |
| | | ], |
| | | limitCode: [ |
| | | {required: true, message: "éå¼ç±»åç¼ç ä¸è½ä¸ºç©º", trigger: "blur"} |
| | | ], |
| | | ] |
| | | }, |
| | | //è²å·éæ©å¨ |
| | | predefineColors: [ |
| | | '#ff4500', |
| | | '#ff8c00', |
| | | '#ffd700', |
| | | '#90ee90', |
| | | '#00ced1', |
| | | '#1e90ff', |
| | | '#c71585' |
| | | "#ff4500", |
| | | "#ff8c00", |
| | | "#ffd700", |
| | | "#90ee90", |
| | | "#00ced1", |
| | | "#1e90ff", |
| | | "#c71585" |
| | | ] |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getDicts("alarm_type").then(response => { |
| | | this.alarmTypeList = response.data; |
| | | this.alarmTypeDefaultVal = this.alarmTypeList.find(f => f.isDefault === 'Y'); |
| | | this.alarmTypeDefaultVal = this.alarmTypeList.find( |
| | | f => f.isDefault === "Y" |
| | | ); |
| | | }); |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle = { |
| | | height: window.innerHeight - 210 + 'px', |
| | | overflow: 'hidden' |
| | | } |
| | | this.height = window.innerHeight - 370; |
| | | height: window.innerHeight - 220 + "px", |
| | | overflow: "hidden" |
| | | }; |
| | | // this.height = window.innerHeight - 370; |
| | | }, |
| | | /** æ¥è¯¢æ¥è¦éå¼ç±»åç»´æ¤å表 */ |
| | | getList() { |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.limitName = selection.map(item => item.limitName) |
| | | this.single = selection.length != 1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map(item => item.id); |
| | | this.limitName = selection.map(item => item.limitName); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | console.log(JSON.stringify(selection)); |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | const id = row.id || this.ids; |
| | | getLimitType(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å 餿¥è¦éå¼ç±»åç»´æ¤å称为"' + ids + '"çæ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm( |
| | | 'æ¯å¦ç¡®è®¤å 餿¥è¦éå¼ç±»åç»´æ¤å称为"' + ids + '"çæ°æ®é¡¹?', |
| | | "è¦å", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | } |
| | | ) |
| | | .then(function() { |
| | | return delLimitType(ids); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.msgSuccess("å 餿å"); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¦éå¼ç±»åç»´æ¤æ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¦éå¼ç±»åç»´æ¤æ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | return exportLimitType(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | initAlarmType() { |
| | | for (let i = 0; i < this.model.energyindexList.length; i++) { |
| | | let ndy = ""; |
| | | getAlarmType(this.model.energyindexList[i].indexId).then(response => { |
| | | if (response.code == '200') { |
| | | if (response.code == "200") { |
| | | if (response.msg == "1") { |
| | | this.model.energyindexList[i].indexCategory = "å¯å¨"; |
| | | } else if (response.msg == "2") { |
| | |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <el-row type="flex"> |
| | | <el-col :style="{width:isCollapse?'0': '280px',position:'relative'}" v-show="!isCollapse"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="æ°æ®æ¨¡å管ç" :bodyStyle="bodyStyle"> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="20"> |
| | | <el-select v-model="modelData" placeholder="è¯·éæ©æ¨¡å" |
| | | <el-select |
| | | v-model="modelData" |
| | | placeholder="è¯·éæ©æ¨¡å" |
| | | size="small" |
| | | filterable |
| | | @change="changeModel"> |
| | | @change="changeModel" |
| | | > |
| | | <el-option |
| | | v-for="model in modelInfoOptions" |
| | | :key="model.modelCode" |
| | |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="4" style="margin-bottom: 16px"> |
| | | <el-button icon="el-icon-setting" circle title="ç®¡çæ¨¡å" style="float:right;padding:8px" |
| | | @click="manageModel"></el-button> |
| | | <el-button |
| | | icon="el-icon-setting" |
| | | circle |
| | | title="ç®¡çæ¨¡å" |
| | | style="float:right;padding:8px" |
| | | @click="manageModel" |
| | | ></el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" :auth="false"></ModelNode> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :auth="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img src="~@/assets/image/rectangle.png" alt="" |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse"> |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse"/> |
| | | <el-col :style="{width:isCollapse? 'calc(100% - 48px)':'calc(100% - 280px)',paddingLeft:isCollapse? 0:'14px'}"> |
| | | <basic-container :title="currentNode ? currentNode.label+'--èç¹é
ç½®' : 'èç¹é
ç½®'" :bodyStyle="bodyStyleRight"> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container |
| | | :title="currentNode ? currentNode.label + '--èç¹é
ç½®' : 'èç¹é
ç½®'" |
| | | :bodyStyle="bodyStyleRight" |
| | | > |
| | | <ModelNodeSetting ref="modelNodeSetting"/> |
| | | </basic-container> |
| | | </el-col> |
| | |
| | | import {listModel} from "@/api/basicsetting/model"; |
| | | import ModelNodeSetting from "./modelNodeSetting"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from '@/components/shrink/index.vue' |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: {ModelNodeSetting, ModelNode,ShrinkCol}, |
| | |
| | | mixins: [mixins], |
| | | data() { |
| | | return { |
| | | modelData: '', |
| | | modelData: "", |
| | | modelInfoOptions: [], |
| | | isCollapse: false, |
| | | bodyStyleRight: {}, |
| | | currentNode: '' |
| | | } |
| | | currentNode: "" |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight -155 + 'px' |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 155 + 'px' |
| | | height: window.innerHeight - 185 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | |
| | | this.$refs.modelNodeSetting.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse() { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | @import "~@/assets/styles/variables.scss"; |
| | | .shrink-col-block { |
| | | position: absolute; |
| | | top: 20px; |
| | | right: 16px; |
| | | cursor: pointer; |
| | | } |
| | | ::v-deep { |
| | | .el-tabs__item { |
| | | color: #fff; |
| | | } |
| | | .el-tabs__item.is-active { |
| | | color: $primary-color; |
| | | } |
| | | .el-collapse-item__header { |
| | | background-color: #061844; |
| | | color: #fff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | margin-top: 10px; |
| | | height: 35px; |
| | | } |
| | | // .is-current { |
| | | // .el-tree-node__content { |
| | | // border: 1px solid red; |
| | | // } |
| | | // } |
| | | |
| | | .el-tree--highlight-current |
| | | .el-tree-node.is-current |
| | | > .el-tree-node__content { |
| | | background-color: #f7f7f7; |
| | | border: 1px solid #38bcbf; |
| | | background-color: #213d7a; |
| | | border: 1px solid #3d5b9b; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') |
| | | import resize from '../../dashboard/mixins/resize' |
| | | const animationDuration = 6000 |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | } |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData,actualData,expecteData} = {}) { |
| | | this.chart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | title: { |
| | | x: 'center', |
| | | y: 'top', |
| | | x: "center", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data:['æ æå¼','å®é
å¼'], |
| | | left: '60%', |
| | | data: ["æ æå¼", "å®é
å¼"], |
| | | left: "60%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: actualData, |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | type: "shadow" |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | //name: '综åè½è', |
| | | type: 'value', |
| | | type: "value", |
| | | nameTextStyle: { |
| | | color: "#333", |
| | | color: "#333" |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | }], |
| | | series: [{ |
| | | } |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name:"æ æå¼", |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: expectedData, |
| | | //stack: 'vistors', |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | },{ |
| | | animationEasing: "quadraticOut" |
| | | }, |
| | | { |
| | | name:"å®é
å¼", |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: expecteData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }] |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="æ¥è¡¨ç±»å"> |
| | | <el-radio-group v-model="queryParams.timeType"> |
| | | <el-radio v-for="dict in dateTypeOptions" :key="dict.dictValue" :label="dict.dictValue" @change="handleTime(dict.dictValue)">{{dict.dictLabel}}</el-radio> |
| | | <el-radio |
| | | v-for="dict in dateTypeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | @change="handleTime(dict.dictValue)" |
| | | >{{ dict.dictLabel }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="ç»è®¡åºé´"> |
| | |
| | | :value-format="valueFormat" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="ææ åç§°"> |
| | | <el-select v-model="queryParams.indexId" placeholder="è¯·éæ©ææ "> |
| | | <el-option style="width: 150px" |
| | | <el-option |
| | | style="width: 150px" |
| | | v-for="dict in arraylist" |
| | | :key="dict.indexId" |
| | | :label="dict.name" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <line-chart ref="LineChart" :chart-data="lineChartData"/> |
| | | </el-row> |
| | | <el-table :data="energyEenchmarkingList"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ææ åç§°" align="center" prop="indexName" /> |
| | | <el-table-column label="ææ åä½" align="center" prop="unitId" :formatter="unitIdFormat" /> |
| | | <el-table-column |
| | | label="ææ åä½" |
| | | align="center" |
| | | prop="unitId" |
| | | :formatter="unitIdFormat" |
| | | /> |
| | | <el-table-column label="æ æå¼" align="center" prop="value"/> |
| | | <el-table-column label="å®é
å¼" align="center" prop="actualValue"/> |
| | | </el-table> |
| | |
| | | |
| | | <script> |
| | | import { listPhaseBenchmarking} from "@/api/benchmarking/phaseBenchmarking"; |
| | | import LineChart from './LineChart' |
| | | import {getSettingIndex} from '@/api/basicsetting/modelNode' |
| | | import LineChart from "./LineChart"; |
| | | import { getSettingIndex } from "@/api/basicsetting/modelNode"; |
| | | export default { |
| | | components: {LineChart}, |
| | | name: 'enchmarking', |
| | | name: 'Index', |
| | | name: "enchmarking", |
| | | name: "Index", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | |
| | | form: {}, |
| | | label:"", |
| | | lineChartData:{}, |
| | | dateTypes: 'daterange', |
| | | valueFormat:"yyyy-MM-dd", |
| | | dateTypes: "daterange", |
| | | valueFormat: "yyyy-MM-dd" |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }); |
| | | this.getDicts("energyPlan").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | }, |
| | | methods: { |
| | |
| | | modelNodeChange(modelNode) { |
| | | this.queryParams.indexId=modelNode.id; |
| | | this.label=modelNode.label; |
| | | this.getList(this.queryParams) |
| | | this.getList(this.queryParams); |
| | | //è·å模åè·åææ |
| | | getSettingIndex(modelNode.id).then(response => { |
| | | if(response.data.length>0){ |
| | | this.arraylist=response.data; |
| | | this.queryParams.indexId=this.arraylist[0].indexId; |
| | | } |
| | | }) |
| | | }); |
| | | }, |
| | | getList() { |
| | | listPhaseBenchmarking(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | this.energyEenchmarkingList=response.data |
| | | listPhaseBenchmarking( |
| | | this.addDateRange(this.queryParams, this.dateRange) |
| | | ).then(response => { |
| | | this.energyEenchmarkingList = response.data; |
| | | let actualData=[]; |
| | | let expectedData=[]; |
| | | let expecteData=[]; |
| | |
| | | actualData.push(this.parseTime(item.dateTime)); |
| | | expectedData.push(item.value); |
| | | expecteData.push(item.actualValue); |
| | | }) |
| | | }); |
| | | this.lineChartData.actualData=actualData; |
| | | this.lineChartData.expectedData=expectedData; |
| | | this.lineChartData.expecteData=expecteData; |
| | |
| | | this.handleQuery(); |
| | | }, |
| | | getTime(){ |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | let startTime = year + '-' + month + '-' + (date-1) |
| | | let endTime = year + '-' + month + '-' + date |
| | | this.dateRange=[startTime,endTime] |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | let startTime = year + "-" + month + "-" + (date - 1); |
| | | let endTime = year + "-" + month + "-" + date; |
| | | this.dateRange = [startTime, endTime]; |
| | | }, |
| | | handleTime(date){ |
| | | if(date=='YEAR'){ |
| | | this.dateTypes= 'year', |
| | | this.valueFormat='yyyy' |
| | | }else if(date=='MONTH'){ |
| | | this.dateTypes= 'monthrange', |
| | | this.valueFormat='yyyy-MM' |
| | | if (date == "YEAR") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (date == "MONTH") { |
| | | (this.dateTypes = "monthrange"), (this.valueFormat = "yyyy-MM"); |
| | | }else{ |
| | | this.dateTypes= 'daterange', |
| | | this.valueFormat='yyyy-MM-dd' |
| | | (this.dateTypes = "daterange"), (this.valueFormat = "yyyy-MM-dd"); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') |
| | | import resize from '../../dashboard/mixins/resize' |
| | | const animationDuration = 6000 |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | } |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData,actualData,expecteData} = {}) { |
| | | this.chart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | title: { |
| | | x: 'center', |
| | | y: 'top', |
| | | x: "center", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data:['æ æå¼','å®é
å¼'], |
| | | left: '60%', |
| | | data: ["æ æå¼", "å®é
å¼"], |
| | | left: "60%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: actualData, |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | type: "shadow" |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | //name: '综åè½è', |
| | | type: 'value', |
| | | type: "value", |
| | | nameTextStyle: { |
| | | color: "#333", |
| | | color: "#333" |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | }], |
| | | series: [{ |
| | | } |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name:"æ æå¼", |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: expectedData, |
| | | //stack: 'vistors', |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | },{ |
| | | animationEasing: "quadraticOut" |
| | | }, |
| | | { |
| | | name:"å®é
å¼", |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: expecteData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }] |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <line-chart ref="LineChart" :chart-data="lineChartData"/> |
| | | </el-row> |
| | | <el-table :data="energyEenchmarkingList"> |
| | | <el-table-column label="åä½åç§°" align="center" prop="label">{{label}}</el-table-column> |
| | | <el-table-column label="åä½åç§°" align="center" prop="label">{{ |
| | | label |
| | | }}</el-table-column> |
| | | <el-table-column label="ææ åç§°" align="center" prop="indexName" /> |
| | | <el-table-column label="ææ åä½" align="center" prop="unitId" :formatter="unitIdFormat" /> |
| | | <el-table-column |
| | | label="ææ åä½" |
| | | align="center" |
| | | prop="unitId" |
| | | :formatter="unitIdFormat" |
| | | /> |
| | | <el-table-column label="æ æå¼" align="center" prop="value"/> |
| | | <el-table-column label="å®é
å¼" align="center" prop="actualValue"/> |
| | | </el-table> |
| | |
| | | |
| | | <script> |
| | | import { listRealTimeListrealTime} from "@/api/benchmarking/phaseBenchmarking"; |
| | | import LineChart from './LineChart' |
| | | import LineChart from "./LineChart"; |
| | | export default { |
| | | components: {LineChart}, |
| | | name: 'enchmarking', |
| | | name: 'Index', |
| | | name: "enchmarking", |
| | | name: "Index", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | |
| | | // 表ååæ° |
| | | form: {}, |
| | | label:"", |
| | | lineChartData:{}, |
| | | lineChartData: {} |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }); |
| | | this.getDicts("energyPlan").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | }, |
| | | methods: { |
| | |
| | | modelNodeChange(modelNode) { |
| | | this.queryParams.indexId=modelNode.id; |
| | | this.label=modelNode.label; |
| | | this.getList(this.queryParams) |
| | | this.getList(this.queryParams); |
| | | }, |
| | | getList() { |
| | | listRealTimeListrealTime(this.queryParams).then(response => { |
| | | this.energyEenchmarkingList=response.data |
| | | this.energyEenchmarkingList = response.data; |
| | | let actualData=[]; |
| | | let expectedData=[]; |
| | | let expecteData=[]; |
| | |
| | | actualData.push(item.indexName); |
| | | expectedData.push(item.value); |
| | | expecteData.push(item.actualValue); |
| | | }) |
| | | }); |
| | | this.lineChartData.actualData=actualData; |
| | | this.lineChartData.expectedData=expectedData; |
| | | this.lineChartData.expecteData=expecteData; |
| | |
| | | return this.selectDictLabel(this.unitIdOptions, row.unitId); |
| | | }, |
| | | getTime(){ |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.queryParams.dateTime = year + '-' + month + '-' + date |
| | | }, |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.queryParams.dateTime = year + "-" + month + "-" + date; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#606266" |
| | | } |
| | | }, |
| | | xAxis: { |
| | | data: actualData, |
| | | type: 'category', |
| | | type: "category" |
| | | }, |
| | | grid: { |
| | | left: 10, |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: [] |
| | | data: [], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | name: title, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | }) |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="è½æºç±»å"> |
| | | <el-select v-model="queryParams.indexStorageId" placeholder="è¯·éæ©è½æºåç§"> |
| | | <el-select |
| | | v-model="queryParams.indexStorageId" |
| | | placeholder="è¯·éæ©è½æºåç§" |
| | | > |
| | | <el-option |
| | | v-for="dict in indexCategoryOptions" |
| | | :key="dict.dictValue" |
| | |
| | | </el-radio-group> |
| | | </el-form-item>--> |
| | | <el-form-item label="ç»è®¡æ¶é´"> |
| | | <el-date-picker clearable size="small" style="width: 200px" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 200px" |
| | | v-model="queryParams.dataTime" |
| | | :type="dateTypes" |
| | | :value-format="valueFormat" |
| | | placeholder="éæ©æ¥æ"> |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | <!--<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导åº</el-button>--> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table :data="energyList" border style="width: 100%; margin-top: 20px" class="tableList" > |
| | | <el-table |
| | | :data="energyList" |
| | | border |
| | | style="width: 100%; margin-top: 20px" |
| | | class="tableList" |
| | | > |
| | | <el-table-column label="æ²çº¿éæ©"> |
| | | <template slot-scope="scope"> |
| | | <el-button icon="el-icon-search" circle @click="selectChange(scope.row.indexId)" style="font-size: 10px"></el-button> |
| | | <el-button |
| | | icon="el-icon-search" |
| | | circle |
| | | @click="selectChange(scope.row.indexId)" |
| | | style="font-size: 10px" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="indexName" align="center" label="è½æºåç§°" min-width="240px"></el-table-column> |
| | | <el-table-column label="1æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value1)}}</template></el-table-column> |
| | | <el-table-column label="2æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value2)}}</template></el-table-column> |
| | | <el-table-column label="3æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value3)}}</template></el-table-column> |
| | | <el-table-column label="4æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value4)}}</template></el-table-column> |
| | | <el-table-column label="5æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value5)}}</template></el-table-column> |
| | | <el-table-column label="6æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value6)}}</template></el-table-column> |
| | | <el-table-column label="7æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value7)}}</template></el-table-column> |
| | | <el-table-column label="8æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value8)}}</template></el-table-column> |
| | | <el-table-column label="9æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value9)}}</template></el-table-column> |
| | | <el-table-column label="10æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value10)}}</template></el-table-column> |
| | | <el-table-column label="11æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value11)}}</template></el-table-column> |
| | | <el-table-column label="12æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value12)}}</template></el-table-column> |
| | | <el-table-column label="13æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value13)}}</template></el-table-column> |
| | | <el-table-column label="14æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value14)}}</template></el-table-column> |
| | | <el-table-column label="15æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value15)}}</template></el-table-column> |
| | | <el-table-column label="16æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value16)}}</template></el-table-column> |
| | | <el-table-column label="17æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value17)}}</template></el-table-column> |
| | | <el-table-column label="18æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value18)}}</template></el-table-column> |
| | | <el-table-column label="19æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value19)}}</template></el-table-column> |
| | | <el-table-column label="10æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value20)}}</template></el-table-column> |
| | | <el-table-column label="21æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value21)}}</template></el-table-column> |
| | | <el-table-column label="22æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value22)}}</template></el-table-column> |
| | | <el-table-column label="23æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value23)}}</template></el-table-column> |
| | | <el-table-column label="24æ¶" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value24)}}</template></el-table-column> |
| | | <el-table-column |
| | | prop="indexName" |
| | | align="center" |
| | | label="è½æºåç§°" |
| | | min-width="240px" |
| | | ></el-table-column> |
| | | <el-table-column label="1æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value1) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="2æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value2) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="3æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value3) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="4æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value4) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="5æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value5) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="6æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value6) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="7æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value7) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="8æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value8) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="9æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value9) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="10æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value10) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="11æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value11) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="12æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value12) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="13æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value13) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="14æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value14) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="15æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value15) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="16æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value16) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="17æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value17) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="18æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value18) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="19æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value19) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="10æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value20) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="21æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value21) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="22æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value22) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="23æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value23) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="24æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value24) |
| | | }}</template></el-table-column |
| | | > |
| | | </el-table> |
| | | <!--<div class="el-table el-table--fit el-table--scrollable-x el-table--enable-row-hover el-table--medium" > |
| | | <div class="el-table__body-wrapper is-scrolling-left"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getDataList,exportList,getlistChart} from "@/api/comprehensiveStatistics/comprehensive"; |
| | | import LineChart from './LineChart' |
| | | import { |
| | | getDataList, |
| | | exportList, |
| | | getlistChart |
| | | } from "@/api/comprehensiveStatistics/comprehensive"; |
| | | import LineChart from "./LineChart"; |
| | | import BarChart from "./BarChart"; |
| | | export default { |
| | | components: { |
| | |
| | | dataTime:undefined, |
| | | timeType:"HOUR", |
| | | indexType:undefined, |
| | | indexStorageId:undefined, |
| | | indexStorageId: undefined |
| | | }, |
| | | skinName:"", |
| | | dateTypes: 'date', |
| | | dateTypes: "date", |
| | | valueFormat:"yyyy-MM-dd", |
| | | lineChartData:{expectedData: [],actualData: []}, |
| | | lineChartData: { expectedData: [], actualData: [] } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getDicts("report_form").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | this.getConfigKey("comprehensive").then(response => { |
| | | this.skinName=response.msg; |
| | |
| | | /*this.tableData=response.data.tabledata; |
| | | this.tableHead=response.data.tablehead;*/ |
| | | this.energyList = response.data; |
| | | }) |
| | | }); |
| | | }, |
| | | selectChange(data){ |
| | | this.queryParams.indexId=data; |
| | |
| | | let title=""; |
| | | response.data.forEach(item => { |
| | | expectedData.push(this.numFilter(item.value)); |
| | | actualData.push(item.timeCode.slice(item.timeCode.length-2,item.timeCode.length)); |
| | | actualData.push( |
| | | item.timeCode.slice(item.timeCode.length - 2, item.timeCode.length) |
| | | ); |
| | | title=item.indexName; |
| | | }) |
| | | }); |
| | | this.lineChartData.actualData=actualData; |
| | | this.lineChartData.expectedData=expectedData; |
| | | this.lineChartData.title=title |
| | | this.lineChartData.title = title; |
| | | this.$refs.LineChart.initChart(this.lineChartData); |
| | | this.$refs.BarChart.initChart(this.lineChartData); |
| | | }) |
| | | }); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length != 1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map(item => item.id); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºç»¼åè½è?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºç»¼åè½è?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | return exportList(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | getSummaries(param) { |
| | | const {columns, data} = param; |
| | | const sums = []; |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = ''; |
| | | sums[index] = ""; |
| | | return; |
| | | } |
| | | if (index === 1) { |
| | | sums[index] = 'å计'; |
| | | sums[index] = "å计"; |
| | | return; |
| | | } |
| | | const values = data.map(item => Number(item[column.property])); |
| | |
| | | } |
| | | }, 0); |
| | | //sums[index]; |
| | | sums[index] = this.numFilter(sums[index]) |
| | | sums[index] = this.numFilter(sums[index]); |
| | | } else { |
| | | sums[index] = '0'; |
| | | sums[index] = "0"; |
| | | } |
| | | }); |
| | | return sums; |
| | | }, |
| | | numFilter(value) {// æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ''; |
| | | if (!isNaN(value) && value !== '') { |
| | | realVal = parseFloat(value).toFixed(this.skinName) |
| | | numFilter(value) { |
| | | // æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ""; |
| | | if (!isNaN(value) && value !== "") { |
| | | realVal = parseFloat(value).toFixed(this.skinName); |
| | | } else { |
| | | realVal = '0' |
| | | realVal = "0"; |
| | | } |
| | | return realVal |
| | | return realVal; |
| | | }, |
| | | getTime() { |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.queryParams.dataTime=year + '-' + month + '-' + date |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.queryParams.dataTime = year + "-" + month + "-" + date; |
| | | /*let startTime = year + '-' + month + '-' + date |
| | | let endTime = year + '-' + month + '-' + (date + 1) |
| | | this.dateRange = [startTime, endTime]*/ |
| | | }, |
| | | |
| | | handleTime(date){ |
| | | if(date=='MONTH'){ |
| | | this.dateTypes= 'year', |
| | | this.valueFormat='yyyy' |
| | | }else if(date=='DAY'){ |
| | | this.dateTypes= 'month', |
| | | this.valueFormat='yyyy-MM' |
| | | if (date == "MONTH") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (date == "DAY") { |
| | | (this.dateTypes = "month"), (this.valueFormat = "yyyy-MM"); |
| | | }else{ |
| | | this.dateTypes= 'date', |
| | | this.valueFormat='yyyy-MM-dd' |
| | | (this.dateTypes = "date"), (this.valueFormat = "yyyy-MM-dd"); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | .el-table__body{ |
| | | border: 1px solid #000000 !important; |
| | | } |
| | | .el-table th.is-leaf, .el-table td { |
| | | .el-table th.is-leaf, |
| | | .el-table td { |
| | | border-bottom: 1px solid #000000 !important; |
| | | border-right: 1px solid #000000 !important; |
| | | } |
| | |
| | | } |
| | | .dashboard-editor-container { |
| | | padding: 32px; |
| | | background-color: rgb(240, 242, 245); |
| | | // background-color: rgb(240, 242, 245); |
| | | position: relative; |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | |
| | | } |
| | | @keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | @-webkit-keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | text: title, |
| | | left: "left", |
| | | textStyle: { |
| | | color: "#606266" |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | |
| | | text: title, |
| | | left: "left", |
| | | textStyle: { |
| | | color: "#606266" |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: { |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: [] |
| | | data: [], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | fixed |
| | | prop="indexName" |
| | | label="ææ åç§°" |
| | | min-width="180px" |
| | | min-width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <div style="width: 100%; text-align: left"> |
| | |
| | | icon="el-icon-search" |
| | | circle |
| | | @click="selectChange(scope.row)" |
| | | style="margin-right: 8px" |
| | | style="margin-right: 8px;background: #999;" |
| | | ></el-button> |
| | | <el-tooltip |
| | | v-if="scope.row.indexName.length > 9" |
| | |
| | | :key="index" |
| | | :label="index - 1 + 'æ¶'" |
| | | align="center" |
| | | min-width="50" |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row[`value${index - 1}`]) |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | |
| | | top: 40, |
| | | containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: actualData, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | type: 'value', |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: "value", |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }], |
| | | series: [{ |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: title, |
| | | type: 'bar', |
| | | stack: 'vistors', |
| | | barWidth: '60%', |
| | | type: "bar", |
| | | stack: "vistors", |
| | | barWidth: "60%", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: { |
| | | data: actualData, |
| | | type: 'category', |
| | | type: "category" |
| | | }, |
| | | grid: { |
| | | left: 10, |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: [] |
| | | data: [], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | name: title, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | }) |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | prop="indexName" |
| | | align="left" |
| | | label="ææ åç§°" |
| | | width="130px" |
| | | min-width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <div style="width: 100%; text-align: left"> |
| | |
| | | icon="el-icon-search" |
| | | circle |
| | | @click="selectChange(scope.row)" |
| | | style="margin-right: 4px" |
| | | style="margin-right: 4px; background: #999;" |
| | | ></el-button> |
| | | <el-tooltip |
| | | v-if="scope.row.indexName.length > 5" |
| | | v-if="scope.row.indexName.length > 8" |
| | | class="item" |
| | | effect="dark" |
| | | :content="scope.row.indexName" |
| | | placement="top-end" |
| | | > |
| | | <span> |
| | | {{ scope.row.indexName.substr(0, 5) + "..." }} |
| | | {{ scope.row.indexName.substr(0, 8) + "..." }} |
| | | </span> |
| | | </el-tooltip> |
| | | <span v-else>{{ scope.row.indexName }}</span> |
| | |
| | | :key="index" |
| | | :label="`${index}æ¥`" |
| | | align="center" |
| | | min-width="40" |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span style="font-size: 12px"> |
| | |
| | | position: relative; |
| | | |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | |
| | | top: 40, |
| | | containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | data: ['1æ','2æ','3æ','4æ','5æ','6æ','7æ','8æ','9æ','10æ','11æ','12æ'], |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: [ |
| | | "1æ", |
| | | "2æ", |
| | | "3æ", |
| | | "4æ", |
| | | "5æ", |
| | | "6æ", |
| | | "7æ", |
| | | "8æ", |
| | | "9æ", |
| | | "10æ", |
| | | "11æ", |
| | | "12æ" |
| | | ], |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | type: 'value', |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: "value", |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }], |
| | | series: [{ |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: title, |
| | | type: 'bar', |
| | | stack: 'vistors', |
| | | barWidth: '60%', |
| | | type: "bar", |
| | | stack: "vistors", |
| | | barWidth: "60%", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: { |
| | | data: ['1æ','2æ','3æ','4æ','5æ','6æ','7æ','8æ','9æ','10æ','11æ','12æ'], |
| | | type: 'category', |
| | | data: [ |
| | | "1æ", |
| | | "2æ", |
| | | "3æ", |
| | | "4æ", |
| | | "5æ", |
| | | "6æ", |
| | | "7æ", |
| | | "8æ", |
| | | "9æ", |
| | | "10æ", |
| | | "11æ", |
| | | "12æ" |
| | | ], |
| | | type: "category" |
| | | }, |
| | | grid: { |
| | | left: 10, |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: [] |
| | | data: [], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | name: title, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | }) |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | icon="el-icon-search" |
| | | circle |
| | | @click="selectChange(scope.row)" |
| | | style="font-size: 10px" |
| | | style="font-size: 10px;background: #999;" |
| | | ></el-button> |
| | | <span>{{ scope.row.indexName }}</span> |
| | | </div> |
| | |
| | | position: relative; |
| | | |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | right: "1" |
| | | right: "1", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | grid: { |
| | | left: "1", |
| | |
| | | }, |
| | | yAxis: { |
| | | type: "value", |
| | | boundaryGap: [0, 0.01] |
| | | boundaryGap: [0, 0.01], |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: "rgba(32, 121, 160, 0.5)" // yè½´åå²çº¿é¢è² |
| | | } |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from './mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "./mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData } = {}) { |
| | | this.chart.setOption({ |
| | | xAxis: { |
| | | data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], |
| | | data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], |
| | | boundaryGap: false, |
| | | axisTick: { |
| | | show: false |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: ['expected', 'actual'] |
| | | data: ["expected", "actual"], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [{ |
| | | name: 'expected', itemStyle: { |
| | | series: [ |
| | | { |
| | | name: "expected", |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | animationEasing: "cubicInOut" |
| | | }, |
| | | { |
| | | name: 'actual', |
| | | name: "actual", |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#3888fa', |
| | | color: "#3888fa", |
| | | lineStyle: { |
| | | color: '#3888fa', |
| | | color: "#3888fa", |
| | | width: 2 |
| | | }, |
| | | areaStyle: { |
| | | color: '#f3f8ff' |
| | | color: "#f3f8ff" |
| | | } |
| | | } |
| | | }, |
| | | data: actualData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }] |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <div class="card-panel-text"> |
| | | 访客 |
| | | </div> |
| | | <count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> |
| | | <count-to |
| | | :start-val="0" |
| | | :end-val="102400" |
| | | :duration="2600" |
| | | class="card-panel-num" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | |
| | | <div class="card-panel-text"> |
| | | æ¶æ¯ |
| | | </div> |
| | | <count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" /> |
| | | <count-to |
| | | :start-val="0" |
| | | :end-val="81212" |
| | | :duration="3000" |
| | | class="card-panel-num" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | |
| | | <div class="card-panel-text"> |
| | | éé¢ |
| | | </div> |
| | | <count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" /> |
| | | <count-to |
| | | :start-val="0" |
| | | :end-val="9280" |
| | | :duration="3200" |
| | | class="card-panel-num" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | |
| | | <div class="card-panel-text"> |
| | | 订å |
| | | </div> |
| | | <count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" /> |
| | | <count-to |
| | | :start-val="0" |
| | | :end-val="13600" |
| | | :duration="3600" |
| | | class="card-panel-num" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import CountTo from 'vue-count-to' |
| | | import CountTo from "vue-count-to"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | }, |
| | | methods: { |
| | | handleSetLineChartData(type) { |
| | | this.$emit('handleSetLineChartData', type) |
| | | this.$emit("handleSetLineChartData", type); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | position: relative; |
| | | overflow: hidden; |
| | | color: #666; |
| | | background: #fff; |
| | | box-shadow: 4px 4px 40px rgba(0, 0, 0, .05); |
| | | border-color: rgba(0, 0, 0, .05); |
| | | box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05); |
| | | border-color: rgba(0, 0, 0, 0.05); |
| | | |
| | | &:hover { |
| | | .card-panel-icon-wrapper { |
| | |
| | | } |
| | | |
| | | .icon-shopping { |
| | | background: #34bfa3 |
| | | background: #34bfa3; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .icon-shopping { |
| | | color: #34bfa3 |
| | | color: #34bfa3; |
| | | } |
| | | |
| | | .card-panel-icon-wrapper { |
| | |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "./mixins/resize"; |
| | | import { color } from "echarts/lib/export"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: "363px" |
| | | default: "300px" |
| | | }, |
| | | chartData: { |
| | | type: Array, |
| | |
| | | left: this.legend == "right" ? "auto" : "center", |
| | | top: "0", |
| | | right: this.legend == "right" ? "40" : "auto", |
| | | orient: this.legend == "right" ? "vertical" : "horizontal" |
| | | orient: this.legend == "right" ? "vertical" : "horizontal", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | // data: ["Industries", "Technology", "Forex", "Gold", "Forecasts"] |
| | | }, |
| | | label: { |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from './mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "./mixins/resize"; |
| | | |
| | | const animationDuration = 3000 |
| | | const animationDuration = 3000; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | |
| | | this.chart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | radar: { |
| | | radius: '66%', |
| | | center: ['50%', '42%'], |
| | | radius: "66%", |
| | | center: ["50%", "42%"], |
| | | splitNumber: 8, |
| | | splitArea: { |
| | | areaStyle: { |
| | | color: 'rgba(127,95,132,.3)', |
| | | color: "rgba(127,95,132,.3)", |
| | | opacity: 1, |
| | | shadowBlur: 45, |
| | | shadowColor: 'rgba(0,0,0,.5)', |
| | | shadowColor: "rgba(0,0,0,.5)", |
| | | shadowOffsetX: 0, |
| | | shadowOffsetY: 15 |
| | | } |
| | | }, |
| | | indicator: [ |
| | | { name: 'Sales', max: 10000 }, |
| | | { name: 'Administration', max: 20000 }, |
| | | { name: 'Information Techology', max: 20000 }, |
| | | { name: 'Customer Support', max: 20000 }, |
| | | { name: 'Development', max: 20000 }, |
| | | { name: 'Marketing', max: 20000 } |
| | | { name: "Sales", max: 10000 }, |
| | | { name: "Administration", max: 20000 }, |
| | | { name: "Information Techology", max: 20000 }, |
| | | { name: "Customer Support", max: 20000 }, |
| | | { name: "Development", max: 20000 }, |
| | | { name: "Marketing", max: 20000 } |
| | | ] |
| | | }, |
| | | legend: { |
| | | left: 'center', |
| | | bottom: '10', |
| | | data: ['Allocated Budget', 'Expected Spending', 'Actual Spending'] |
| | | left: "center", |
| | | bottom: "10", |
| | | data: ["Allocated Budget", "Expected Spending", "Actual Spending"], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [{ |
| | | type: 'radar', |
| | | series: [ |
| | | { |
| | | type: "radar", |
| | | symbolSize: 0, |
| | | areaStyle: { |
| | | normal: { |
| | | shadowBlur: 13, |
| | | shadowColor: 'rgba(0,0,0,.2)', |
| | | shadowColor: "rgba(0,0,0,.2)", |
| | | shadowOffsetX: 0, |
| | | shadowOffsetY: 10, |
| | | opacity: 1 |
| | |
| | | data: [ |
| | | { |
| | | value: [5000, 7000, 12000, 11000, 15000, 14000], |
| | | name: 'Allocated Budget' |
| | | name: "Allocated Budget" |
| | | }, |
| | | { |
| | | value: [4000, 9000, 15000, 15000, 13000, 11000], |
| | | name: 'Expected Spending' |
| | | name: "Expected Spending" |
| | | }, |
| | | { |
| | | value: [5500, 11000, 12000, 15000, 12000, 12000], |
| | | name: 'Actual Spending' |
| | | name: "Actual Spending" |
| | | } |
| | | ], |
| | | animationDuration: animationDuration |
| | | }] |
| | | }) |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | this.handleQuery(); |
| | | }, |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + "px"; |
| | | this.bodyStyle.height = window.innerHeight - 195 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 100 + "px" |
| | |
| | | this.handleQuery(); |
| | | }, |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + "px"; |
| | | this.bodyStyle.height = window.innerHeight - 195 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 100 + "px" |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "~@/assets/styles/variables.scss"; |
| | | .dashboard-editor-container { |
| | | margin-bottom: 16px; |
| | | ::v-deep { |
| | |
| | | } |
| | | .table-wrapper { |
| | | margin-top: 16px; |
| | | background: #fff; |
| | | // background: #fff; |
| | | } |
| | | } |
| | | .table-wrapper { |
| | | // margin-top: 16px; |
| | | padding-top: 16px; |
| | | background: #fff; |
| | | padding-top: 0px; |
| | | background: #061844; |
| | | .demo-tabs { |
| | | padding: 0 16px; |
| | | } |
| | |
| | | .el-card { |
| | | border: none; |
| | | } |
| | | .el-tabs__item { |
| | | color: #fff; |
| | | } |
| | | .el-tabs__item.is-active { |
| | | color: $primary-color; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | right: "center" |
| | | right: "center", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | grid: { |
| | | left: "1", |
| | |
| | | }, |
| | | yAxis: { |
| | | type: "value", |
| | | boundaryGap: [0, 0.01] |
| | | boundaryGap: [0, 0.01], |
| | | splitLine: { |
| | | lineStyle: { |
| | | color: "rgba(32, 121, 160, 0.5)" // yè½´åå²çº¿é¢è² |
| | | } |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: titleName, |
| | | type: "line", |
| | | data: legendArr |
| | | // color: "#919191" |
| | | data: legendArr, |
| | | color: "#e6e6e6" |
| | | } |
| | | ] |
| | | }; |
| | |
| | | align-items: center; |
| | | height: 100px; |
| | | z-index: 1000; |
| | | background: #fff; |
| | | background: #061844; |
| | | border-radius: 4px; |
| | | margin-bottom: 12px; |
| | | padding: 0 24px; |
| | |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + "px"; |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 212 + "px" |
| | | height: window.innerHeight - 248 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function(node) { |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | right: "1" |
| | | right: "1", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | grid: { |
| | | left: "1", |
| | |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + "px"; |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 100 + "px" |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function(node) { |
| | |
| | | <style scoped> |
| | | .el-row { |
| | | margin-bottom: 20px; |
| | | } |
| | | .el-col { |
| | | border-radius: 4px; |
| | | } |
| | | .row-bg { |
| | | padding: 10px 0; |
| | | background-color: #f9fafc; |
| | | } |
| | | </style> |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="forms" label-width="100px"> |
| | | <el-row :gutter="24" class="mb8"> |
| | | <el-col :span="16"> |
| | | <el-form-item prop="effective_date" label="çææ¶é´ï¼" label-width="100px"> |
| | | <el-form-item |
| | | prop="effective_date" |
| | | label="çææ¶é´ï¼" |
| | | label-width="100px" |
| | | > |
| | | <!--{{changeTime(parseTime(effective_date))}}--> |
| | | <el-date-picker clearable size="small" style="width: 200px" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 200px" |
| | | v-model="forms.effectiveDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | :picker-options="pickerOptions" |
| | | placeholder="è®¾ç½®çææ¶é´"> |
| | | placeholder="è®¾ç½®çææ¶é´" |
| | | > |
| | | </el-date-picker> |
| | | <!-- <el-input :disabled="isDisabled" v-model="item.effectiveDate"></el-input>--> |
| | | <!--<el-button size="mini" @click="addDate">è®¾ç½®çææ¶é´</el-button>--> |
| | |
| | | size="mini" |
| | | @click="handleAdd()" |
| | | v-hasPermi="['electricityPrice:electricity:add']" |
| | | >æ°å¢æ¶æ®µ</el-button> |
| | | >æ°å¢æ¶æ®µ</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button plain |
| | | <el-button |
| | | plain |
| | | size="mini" |
| | | @click="handlePrice()" |
| | | v-hasPermi="['electricityPrice:price:add']" |
| | | >设置åä»·</el-button> |
| | | >设置åä»·</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <router-link :to="'/electricityPrice/listHistory'" class="link-type"> |
| | |
| | | </router-link> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table v-loading="loading" :data="electricityList" @selection-change="handleSelectionChange"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="electricityList" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="æ¶æ®µåç§°" align="center" prop="effectiveName" :formatter="effectiveNameFormat" /> |
| | | <el-table-column |
| | | label="æ¶æ®µåç§°" |
| | | align="center" |
| | | prop="effectiveName" |
| | | :formatter="effectiveNameFormat" |
| | | /> |
| | | <el-table-column label="åä»·" align="center" prop="price"/> |
| | | <el-table-column label="æ¶æ®µå¼å§æ¶é´" align="center" prop="beginDate" width="180"/> |
| | | <el-table-column label="æ¶æ®µç»ææ¶é´" align="center" prop="endDate" width="180"/> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column |
| | | label="æ¶æ®µå¼å§æ¶é´" |
| | | align="center" |
| | | prop="beginDate" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | label="æ¶æ®µç»ææ¶é´" |
| | | align="center" |
| | | prop="endDate" |
| | | width="180" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['electricityPrice:electricity:remove']" |
| | | >å é¤</el-button> |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | /> |
| | | <!-- æ·»å æä¿®æ¹electricityPriceå¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="time" width="500px"> |
| | | <el-form ref="form" :model="form" :rulesTime="rulesTime" label-width="120px"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | :rulesTime="rulesTime" |
| | | label-width="120px" |
| | | > |
| | | <el-form-item label="çææ¥æ" prop="effectiveDate"> |
| | | <el-date-picker clearable size="small" style="width: 200px" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 200px" |
| | | v-model="form.effectiveDate" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | :picker-options="pickerOptions" |
| | | placeholder="éæ©çææ¥æ"> |
| | | placeholder="éæ©çææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | <!-- æ·»å æä¿®æ¹electricityPriceå¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-form-item label="çææ¶é´" prop="effectiveDate">{{changeTime(parseTime(form.effectiveDate))}}</el-form-item> |
| | | <el-form-item label="çææ¶é´" prop="effectiveDate">{{ |
| | | changeTime(parseTime(form.effectiveDate)) |
| | | }}</el-form-item> |
| | | <el-form-item label="æ¶æ®µåç§°" prop="effectiveName"> |
| | | <el-select v-model="form.effectiveName" placeholder="è¯·éæ©æ¶æ®µåç§°"> |
| | | <el-option |
| | |
| | | <el-time-picker |
| | | v-model="form.beginDate" |
| | | class="date-box" |
| | | format='HH:mm' |
| | | format="HH:mm" |
| | | value-format="HH:mm" |
| | | placeholder="éæ©æ¶æ®µå¼å§æ¶é´" |
| | | > |
| | |
| | | <el-time-picker |
| | | v-model="form.endDate" |
| | | class="date-box" |
| | | format='HH:mm' |
| | | format="HH:mm" |
| | | value-format="HH:mm" |
| | | placeholder="éæ©æ¶æ®µå¼å§æ¶é´" |
| | | ></el-time-picker> |
| | |
| | | <el-dialog :title="title" :visible.sync="openPrice" width="500px"> |
| | | <el-form ref="formPrice" :model="formPrice" :rulesPrice="rulesPrice"> |
| | | <el-input type="hidden" v-model="formPrice.effectiveDate"></el-input> |
| | | <el-table :data="effective_name" ref="multipleTable" tooltip-effect="dark"> |
| | | <el-table-column align="center" property="dictLabel" label="æ¶æ®µåç§°" ></el-table-column> |
| | | <el-table |
| | | :data="effective_name" |
| | | ref="multipleTable" |
| | | tooltip-effect="dark" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | property="dictLabel" |
| | | label="æ¶æ®µåç§°" |
| | | ></el-table-column> |
| | | <el-table-column align="center" property="price" label="åä»·(å
)"> |
| | | <template scope="scope"> |
| | | <el-input step="0.1" v-model="scope.row.price" placeholder="请è¾å
¥åä»·(å
)"></el-input> |
| | | <el-input |
| | | step="0.1" |
| | | v-model="scope.row.price" |
| | | placeholder="请è¾å
¥åä»·(å
)" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listElectricity, getElectricity, delElectricity, addElectricity, updateElectricity, exportElectricity,listDate} from "@/api/electricityPrice/electricity"; |
| | | import { |
| | | listElectricity, |
| | | getElectricity, |
| | | delElectricity, |
| | | addElectricity, |
| | | updateElectricity, |
| | | exportElectricity, |
| | | listDate |
| | | } from "@/api/electricityPrice/electricity"; |
| | | |
| | | import { listPrice, getPrice, delPrice, addPrice, updatePrice ,EdictType,dictTypeList } from "@/api/electricityPrice/price"; |
| | | import { |
| | | listPrice, |
| | | getPrice, |
| | | delPrice, |
| | | addPrice, |
| | | updatePrice, |
| | | EdictType, |
| | | dictTypeList |
| | | } from "@/api/electricityPrice/price"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | effective_name: [], |
| | | ifeffective: [], |
| | | effective:{ |
| | | dictLabel:'', |
| | | dictValue:'', |
| | | price:'' |
| | | dictLabel: "", |
| | | dictValue: "", |
| | | price: "" |
| | | }, |
| | | dictType:"", |
| | | effective_date:"", |
| | |
| | | beginDate: undefined, |
| | | endDate: undefined, |
| | | effectiveName: undefined, |
| | | dictType: undefined, |
| | | dictType: undefined |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | |
| | | ], |
| | | price:[{ required: true, message: "åä»·ä¸è½ä¸ºç©º", trigger: "blur" }] |
| | | }, |
| | | pickerOptions: { // ä¸è®©éæ©ä»å¤©ä»¥åç |
| | | pickerOptions: { |
| | | // ä¸è®©éæ©ä»å¤©ä»¥åç |
| | | disabledDate(time) { |
| | | return time.getTime() < Date.now() - 24 * 60 * 60 * 1000 |
| | | return time.getTime() < Date.now() - 24 * 60 * 60 * 1000; |
| | | } |
| | | } |
| | | }; |
| | |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | console.log(selection); |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!=1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map(item => item.id); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | |
| | | }); |
| | | }, |
| | | handlePrice(){ |
| | | this.queryParams.effectiveDate = this.forms.effectiveDate.substring(0, 10); |
| | | this.queryParams.dictType="electricity_price", |
| | | this.queryParams.effectiveDate = this.forms.effectiveDate.substring( |
| | | 0, |
| | | 10 |
| | | ); |
| | | (this.queryParams.dictType = "electricity_price"), |
| | | dictTypeList(this.queryParams).then(response => { |
| | | this.reset(); |
| | | this.formPrice.effectiveDate=this.forms.effectiveDate; |
| | |
| | | submitPrice: function() { |
| | | this.formPrice.effectiveDate; |
| | | this.$nextTick(() => { |
| | | this.formPrice.TimeJson=this.$refs['multipleTable'].data |
| | | let tourId = ''; |
| | | let tourLabels = ''; |
| | | let tourValue = ''; |
| | | let tourPrice = ''; |
| | | this.formPrice.TimeJson = this.$refs["multipleTable"].data; |
| | | let tourId = ""; |
| | | let tourLabels = ""; |
| | | let tourValue = ""; |
| | | let tourPrice = ""; |
| | | for (let i = 0; i < this.formPrice.TimeJson.length; i++) { |
| | | tourLabels +=this.formPrice.TimeJson[i].dictLabel+","; |
| | | tourValue +=this.formPrice.TimeJson[i].dictValue+","; |
| | | tourPrice +=this.formPrice.TimeJson[i].price+","; |
| | | tourId +=this.formPrice.TimeJson[i].id+","; |
| | | } |
| | | this.formPrice.dictLabel=tourLabels.substring(0, tourLabels.lastIndexOf(',')); |
| | | this.formPrice.dictValue=tourValue.substring(0, tourValue.lastIndexOf(',')); |
| | | this.formPrice.price=tourPrice.substring(0, tourPrice.lastIndexOf(',')); |
| | | this.formPrice.id=tourId.substring(0, tourId.lastIndexOf(',')); |
| | | this.formPrice.dictLabel = tourLabels.substring( |
| | | 0, |
| | | tourLabels.lastIndexOf(",") |
| | | ); |
| | | this.formPrice.dictValue = tourValue.substring( |
| | | 0, |
| | | tourValue.lastIndexOf(",") |
| | | ); |
| | | this.formPrice.price = tourPrice.substring( |
| | | 0, |
| | | tourPrice.lastIndexOf(",") |
| | | ); |
| | | this.formPrice.id = tourId.substring(0, tourId.lastIndexOf(",")); |
| | | //console.log(this.formPrice.TimeJson[0].id); |
| | | if (this.formPrice.TimeJson[0].id != undefined) { |
| | | updatePrice(this.formPrice).then(response => { |
| | |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | }); |
| | | this.loading = false; |
| | | }, |
| | | addDate() { |
| | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate() { |
| | | this.reset(); |
| | | const id =this.ids |
| | | const id = this.ids; |
| | | getElectricity(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å 餿°å¢æ¶æ®µç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm( |
| | | 'æ¯å¦ç¡®è®¤å 餿°å¢æ¶æ®µç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹?', |
| | | "è¦å", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function() { |
| | | } |
| | | ) |
| | | .then(function() { |
| | | return delElectricity(ids); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.getLists(); |
| | | this.msgSuccess("å 餿å"); |
| | | }).catch(function() {}); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºææelectricityPriceæ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºææelectricityPriceæ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function() { |
| | | }) |
| | | .then(function() { |
| | | return exportElectricity(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function() {}); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | changeTime(time) { |
| | | if (time !== null && time !== undefined && time !== "") { |
| | |
| | | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | å³°å¹³è°·æ°æ®ç»è®¡ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" :showOpt="false" :modelCode="modelCode"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <electricityIndex ref="electricityIndex" style="padding:10px"></electricityIndex> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="å³°å¹³è°·æ°æ®ç»è®¡" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :showOpt="false" |
| | | :modelCode="modelCode" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container :bodyStyle="bodyStyleRight"> |
| | | <electricityIndexNew |
| | | ref="electricityIndex" |
| | | style="padding:10px" |
| | | ></electricityIndexNew> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import electricityIndex from "./electricityIndex"; |
| | | import electricityIndexNew from "./electricityIndexNew"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: { ModelNode,electricityIndex}, |
| | | components: { ModelNode, electricityIndexNew, ShrinkCol }, |
| | | mixins: [mixins], |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | | data() { |
| | | return { |
| | | bodyStyleRight: {}, |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | isCollapse: false |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.electricityIndex.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from './mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "./mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | //required: true |
| | | } |
| | | }, |
| | |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({legend,data} = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: 'æ°æ®åæ', |
| | | left: 'left', |
| | | text: "æ°æ®åæ", |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#606266" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: '{a} <br/>{b} : {c} ({d}%)' |
| | | trigger: "item", |
| | | formatter: "{a} <br/>{b} : {c} ({d}%)" |
| | | }, |
| | | legend: { |
| | | //bottom: 10, |
| | | top:"30", |
| | | orient: 'vertical', |
| | | left: '10', |
| | | orient: "vertical", |
| | | left: "10", |
| | | data: legend, |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | type: 'pie', |
| | | radius: '65%', |
| | | center: ['50%', '50%'], |
| | | selectedMode: 'single', |
| | | type: "pie", |
| | | radius: "65%", |
| | | center: ["50%", "50%"], |
| | | selectedMode: "single", |
| | | data:data, |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | shadowColor: "rgba(0, 0, 0, 0.5)" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div :class="className" :style="{height:height,width:width}" /> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | /*import resize from './mixins/resize'*/ |
| | | |
| | | export default { |
| | |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData } = {}) { |
| | | this.chart.setOption({ |
| | | xAxis: { |
| | | data: ['04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00' , '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'], |
| | | data: [ |
| | | "04:00", |
| | | "05:00", |
| | | "06:00", |
| | | "07:00", |
| | | "08:00", |
| | | "09:00", |
| | | "10:00", |
| | | "11:00", |
| | | "12:00", |
| | | "13:00", |
| | | "14:00", |
| | | "15:00", |
| | | "16:00", |
| | | "17:00", |
| | | "18:00", |
| | | "19:00", |
| | | "20:00", |
| | | "21:00", |
| | | "22:00", |
| | | "23:00" |
| | | ], |
| | | boundaryGap: false, |
| | | axisTick: { |
| | | show: false |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: ['é¢è¦å¼','éå¼'] |
| | | data: ["é¢è¦å¼", "éå¼"], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [{ |
| | | name: 'é¢è¦å¼', itemStyle: { |
| | | series: [ |
| | | { |
| | | name: "é¢è¦å¼", |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | width: 2, |
| | | |
| | | }, |
| | | |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | data:[200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200], |
| | | type: "line", |
| | | data: [ |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200, |
| | | 200 |
| | | ], |
| | | animationDuration: 1000, |
| | | animationEasing: 'cubicInOut' |
| | | animationEasing: "cubicInOut" |
| | | }, |
| | | { |
| | | name: 'éå¼', |
| | | name: "éå¼", |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#3888fa', |
| | | color: "#3888fa", |
| | | lineStyle: { |
| | | color: '#3888fa', |
| | | color: "#3888fa", |
| | | width: 2 |
| | | }, |
| | | areaStyle: { |
| | | color: '#f3f8ff' |
| | | color: "#f3f8ff" |
| | | } |
| | | } |
| | | }, |
| | | data:[200, 200, 181, 224,210, 172, 181, 224,210, 172, 181, 224,210, 172, 181, 224,210, 172, 181, 224,210, 172, 181], |
| | | data: [ |
| | | 200, |
| | | 200, |
| | | 181, |
| | | 224, |
| | | 210, |
| | | 172, |
| | | 181, |
| | | 224, |
| | | 210, |
| | | 172, |
| | | 181, |
| | | 224, |
| | | 210, |
| | | 172, |
| | | 181, |
| | | 224, |
| | | 210, |
| | | 172, |
| | | 181, |
| | | 224, |
| | | 210, |
| | | 172, |
| | | 181 |
| | | ], |
| | | animationDuration: 800, |
| | | animationEasing: 'quadraticOut' |
| | | }] |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding:0"> |
| | | <el-card class="box-card"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="query-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | class="query-form" |
| | | > |
| | | <el-form-item label="éå¼ç±»å" prop="limitType"> |
| | | <el-select v-model="queryParams.limitType" placeholder="éå¼ç±»å" clearable> |
| | | <el-select |
| | | v-model="queryParams.limitType" |
| | | placeholder="éå¼ç±»å" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in limitTypeOptions" |
| | | :key="dict.limitCode" |
| | | :label="dict.limitName" |
| | | :value="dict.limitCode"> |
| | | :value="dict.limitCode" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥è¦çº§å«" prop="alarmLevel"> |
| | | <el-select v-model="queryParams.alarmLevel" placeholder="æ¥è¦çº§å«" clearable> |
| | | <el-select |
| | | v-model="queryParams.alarmLevel" |
| | | placeholder="æ¥è¦çº§å«" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in alarmLevelOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue"> |
| | | :value="dict.dictValue" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <!-- <el-col :span="1.5">--> |
| | |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | <el-form> |
| | | <el-table :data="JkHistoryAlarmList" v-loading="loading" border @selection-change="" @cell-click="openDialog" > |
| | | <el-table |
| | | :data="JkHistoryAlarmList" |
| | | v-loading="loading" |
| | | border |
| | | @selection-change="" |
| | | @cell-click="openDialog" |
| | | > |
| | | <el-table-column label="åºå·" type="index" align="center"/> |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="code"/> |
| | | <el-table-column label="ææ åç§°" align="center" prop="indexName"> |
| | | <template slot-scope="scope"> |
| | | <div style="color:blue;text-decoration:underline ;cursor:pointer">{{scope.row.indexName}}</div> |
| | | <div style="color:blue;text-decoration:underline ;cursor:pointer"> |
| | | {{ scope.row.indexName }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ææ åä½" align="center" prop="unitId" /> |
| | | <el-table-column label="æ¥è¦çº§å«" align="center" prop="alarmLevel" /> |
| | | <el-table-column label="éå¼ç±»å" align="center" prop="limitType" /> |
| | | <el-table-column label="éå¼" align="center" prop="limitingValue"/> |
| | | <el-table-column label="æ¥è¦æ¶é´èµ·" align="center" prop="alarmBeginTime"/> |
| | | <el-table-column label="æ¥è¦æ¶é´æ¢" align="center" prop="alarmEndTime"/> |
| | | <el-table-column |
| | | label="æ¥è¦æ¶é´èµ·" |
| | | align="center" |
| | | prop="alarmBeginTime" |
| | | /> |
| | | <el-table-column |
| | | label="æ¥è¦æ¶é´æ¢" |
| | | align="center" |
| | | prop="alarmEndTime" |
| | | /> |
| | | <el-table-column label="æ¥è¦å¼" align="center" prop="alarmValue" /> |
| | | <el-table-column label="æç»æ¶é¿(åé)" align="center" prop="duration" width="96px" /> |
| | | <el-table-column |
| | | label="æç»æ¶é¿(åé)" |
| | | align="center" |
| | | prop="duration" |
| | | width="96px" |
| | | /> |
| | | </el-table> |
| | | </el-form> |
| | | <pagination |
| | |
| | | @pagination="getList" |
| | | /> |
| | | <!--å¼¹æ¡--> |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" :close-on-click-modal="false"> |
| | | <el-row style="background:#fff;margin-bottom:32px;"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-row style="margin-bottom:32px;"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick" > |
| | | <el-tab-pane label="å岿°æ®æ²çº¿å¾" name="second"> |
| | | <history-alarm-view ref="historyAlarmView" :code="code" :activeName="activeName" :limitVal="limitVal"></history-alarm-view> |
| | | <history-alarm-view |
| | | ref="historyAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | :limitVal="limitVal" |
| | | ></history-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å岿°æ®æ¥è¯¢" name="third"> |
| | | <history-alarm-table ref="historyAlarmTable" :code="code" :indexName="indexName" :activeName="activeName" :indexUnit="indexUnit" :limitVal="limitVal"></history-alarm-table> |
| | | <history-alarm-table |
| | | ref="historyAlarmTable" |
| | | :code="code" |
| | | :indexName="indexName" |
| | | :activeName="activeName" |
| | | :indexUnit="indexUnit" |
| | | :limitVal="limitVal" |
| | | ></history-alarm-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import {listHistoryAlarmNote,exportHistoricalAlarm } from "@/api/basicsetting/historyAlarm"; |
| | | import {listLimitType} from "@/api/basicsetting/limitType" |
| | | import historyAlarmView from "../realTimeAlarm/historyAlarmView" |
| | | import historyAlarmTable from "../realTimeAlarm/historyAlarmTable" |
| | | import { |
| | | listHistoryAlarmNote, |
| | | exportHistoricalAlarm |
| | | } from "@/api/basicsetting/historyAlarm"; |
| | | import { listLimitType } from "@/api/basicsetting/limitType"; |
| | | import historyAlarmView from "../realTimeAlarm/historyAlarmView"; |
| | | import historyAlarmTable from "../realTimeAlarm/historyAlarmTable"; |
| | | |
| | | export default { |
| | | components: {historyAlarmView,historyAlarmTable}, |
| | | name: 'historyAlarmNote', |
| | | props:['svgId','tagId'], |
| | | name: "historyAlarmNote", |
| | | props: ["svgId", "tagId"], |
| | | data() { |
| | | return { |
| | | num: 20, |
| | | num1:5, |
| | | code:undefined, |
| | | value:'', |
| | | value: "", |
| | | options:undefined, |
| | | radio: 'B', |
| | | activeName: 'second', |
| | | radio: "B", |
| | | activeName: "second", |
| | | indexId:undefined, |
| | | indexName:undefined, |
| | | indexUnit:undefined, |
| | |
| | | unitIdOptions: [], |
| | | // æ¥è¯¢åæ° |
| | | lineChartData:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | indexType:'COLLECT', |
| | | indexType: "COLLECT", |
| | | code: undefined, |
| | | indexName:undefined, |
| | | limitType: undefined, |
| | |
| | | beginTime: undefined, |
| | | endTime:undefined, |
| | | svgId:undefined, |
| | | nodeId:undefined, |
| | | nodeId: undefined |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | |
| | | }); |
| | | }, |
| | | methods: { |
| | | show(nodeId) |
| | | { |
| | | show(nodeId) { |
| | | this.queryParams.nodeId = nodeId; |
| | | this.getList(); |
| | | }, |
| | | getList() { |
| | | this.loading = true; |
| | | listHistoryAlarmNote(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | listHistoryAlarmNote( |
| | | this.addDateRange(this.queryParams, this.dateRange) |
| | | ).then(response => { |
| | | this.JkHistoryAlarmList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | |
| | | let date = new Date(value); |
| | | let y = date.getFullYear(); |
| | | let MM = date.getMonth() + 1; |
| | | MM = MM < 10 ? ('0' + MM) : MM; |
| | | MM = MM < 10 ? "0" + MM : MM; |
| | | let d = date.getDate(); |
| | | d = d < 10 ? ('0' + d) : d; |
| | | d = d < 10 ? "0" + d : d; |
| | | let h = date.getHours(); |
| | | h = h < 10 ? ('0' + h) : h; |
| | | h = h < 10 ? "0" + h : h; |
| | | let m = date.getMinutes(); |
| | | m = m < 10 ? ('0' + m) : m; |
| | | m = m < 10 ? "0" + m : m; |
| | | let s = date.getSeconds(); |
| | | s = s < 10 ? ('0' + s) : s; |
| | | return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; |
| | | s = s < 10 ? "0" + s : s; |
| | | return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s; |
| | | }, |
| | | |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | |
| | | this.resetForm("queryForm"); |
| | | }, |
| | | |
| | | handleSelectionChange() { |
| | | }, |
| | | handleSelectionChange() {}, |
| | | openDialog(row,column,event,cell){ |
| | | if("indexName"==column.property){ |
| | | this.open = true; |
| | |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¦æ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¦æ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function() { |
| | | }) |
| | | .then(function() { |
| | | return exportHistoricalAlarm(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function() {}); |
| | | |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | //éå¶ç±»åç¿»è¯ |
| | | limitTypeFormat(row,column){ |
| | | var actions = []; |
| | | Object.keys(this.limitTypeOptions).map((key) => { |
| | | if (this.limitTypeOptions[key].limitCode == ('' + row.limitType)) { |
| | | Object.keys(this.limitTypeOptions).map(key => { |
| | | if (this.limitTypeOptions[key].limitCode == "" + row.limitType) { |
| | | actions.push(this.limitTypeOptions[key].limitName); |
| | | } |
| | | }); |
| | | return actions.join(''); |
| | | return actions.join(""); |
| | | }, |
| | | handleClick(tab, event){ |
| | | this.activeName = tab.name; |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="historicalAlarm-right"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="query-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | class="query-form" |
| | | > |
| | | <el-form-item> |
| | | <el-radio-group v-model="queryParams.eierarchyFlag"> |
| | | <el-radio label="B" style="margin-right: 10px!important;" onselect="true">æ¬çº§</el-radio> |
| | | <el-radio |
| | | label="B" |
| | | style="margin-right: 10px!important;" |
| | | onselect="true" |
| | | >æ¬çº§</el-radio |
| | | > |
| | | <el-radio label="ALL">å
å«ä¸çº§</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="éå¼ç±»å" prop="limitType"> |
| | | <el-select v-model="queryParams.limitType" placeholder="éå¼ç±»å" clearable> |
| | | <el-select |
| | | v-model="queryParams.limitType" |
| | | placeholder="éå¼ç±»å" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in limitTypeOptions" |
| | | :key="dict.limitCode" |
| | | :label="dict.limitName" |
| | | :value="dict.limitCode"> |
| | | :value="dict.limitCode" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥è¦çº§å«" prop="alarmLevel"> |
| | | <el-select v-model="queryParams.alarmLevel" placeholder="æ¥è¦çº§å«" clearable> |
| | | <el-select |
| | | v-model="queryParams.alarmLevel" |
| | | placeholder="æ¥è¦çº§å«" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in alarmLevelOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictLabel" |
| | | :value="dict.dictValue"> |
| | | :value="dict.dictValue" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button |
| | | type="warning" |
| | | icon="el-icon-download" |
| | |
| | | >å¯¼åº |
| | | </el-button> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <el-form> |
| | | <el-table :data="JkHistoryAlarmList" v-loading="loading" border @selection-change="" @cell-click="openDialog" |
| | | <el-table |
| | | :data="JkHistoryAlarmList" |
| | | v-loading="loading" |
| | | border |
| | | @selection-change="" |
| | | @cell-click="openDialog" |
| | | :height="height" |
| | | > |
| | | <el-table-column label="åºå·" type="index" align="center"/> |
| | |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="code"/> |
| | | <el-table-column label="ææ åç§°" align="center" prop="indexName"> |
| | | <template slot-scope="scope"> |
| | | <div style="color:blue;text-decoration:underline ;cursor:pointer">{{ scope.row.indexName }}</div> |
| | | <div style="color:blue;text-decoration:underline ;cursor:pointer"> |
| | | {{ scope.row.indexName }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ææ åä½" align="center" prop="unitId" :formatter="unitIdFormat"/> |
| | | <el-table-column label="æ¥è¦çº§å«" align="center" prop="alarmLevel" :formatter="alarmLevelFormat"/> |
| | | <el-table-column label="éå¼ç±»å" align="center" prop="limitType" :formatter="limitTypeFormat"/> |
| | | <el-table-column |
| | | label="ææ åä½" |
| | | align="center" |
| | | prop="unitId" |
| | | :formatter="unitIdFormat" |
| | | /> |
| | | <el-table-column |
| | | label="æ¥è¦çº§å«" |
| | | align="center" |
| | | prop="alarmLevel" |
| | | :formatter="alarmLevelFormat" |
| | | /> |
| | | <el-table-column |
| | | label="éå¼ç±»å" |
| | | align="center" |
| | | prop="limitType" |
| | | :formatter="limitTypeFormat" |
| | | /> |
| | | <el-table-column label="éå¼" align="center" prop="limitingValue"/> |
| | | <el-table-column label="æ¥è¦æ¶é´èµ·" align="center" prop="alarmBeginTime"/> |
| | | <el-table-column label="æ¥è¦æ¶é´æ¢" align="center" prop="alarmEndTime"/> |
| | | <el-table-column |
| | | label="æ¥è¦æ¶é´èµ·" |
| | | align="center" |
| | | prop="alarmBeginTime" |
| | | /> |
| | | <el-table-column |
| | | label="æ¥è¦æ¶é´æ¢" |
| | | align="center" |
| | | prop="alarmEndTime" |
| | | /> |
| | | <el-table-column label="é¢è¦å¼" align="center" prop="alarmValue"/> |
| | | <el-table-column label="æç»æ¶é¿(åé)" align="center" prop="duration" width="96px"/> |
| | | <el-table-column |
| | | label="æç»æ¶é¿(åé)" |
| | | align="center" |
| | | prop="duration" |
| | | width="96px" |
| | | /> |
| | | </el-table> |
| | | </el-form> |
| | | <pagination |
| | |
| | | @pagination="getList" |
| | | /> |
| | | <!--å¼¹æ¡--> |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" :close-on-click-modal="false"> |
| | | <el-row style="background:#fff;margin-bottom:32px;"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-row style="margin-bottom:32px;"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="å岿°æ®æ²çº¿å¾" name="second"> |
| | | <history-alarm-view ref="historyAlarmView" :code="code" :activeName="activeName" |
| | | :limitVal="limitVal"></history-alarm-view> |
| | | <history-alarm-view |
| | | ref="historyAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | :limitVal="limitVal" |
| | | ></history-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å岿°æ®æ¥è¯¢" name="third"> |
| | | <history-alarm-table ref="historyAlarmTable" :code="code" :indexName="indexName" :activeName="activeName" |
| | | :indexUnit="indexUnit" :limitVal="limitVal"></history-alarm-table> |
| | | <history-alarm-table |
| | | ref="historyAlarmTable" |
| | | :code="code" |
| | | :indexName="indexName" |
| | | :activeName="activeName" |
| | | :indexUnit="indexUnit" |
| | | :limitVal="limitVal" |
| | | ></history-alarm-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import {listHistoryAlarm, exportHistoricalAlarm, getHistoricalAlarm} from "@/api/basicsetting/historyAlarm"; |
| | | import {listLimitType} from "@/api/basicsetting/limitType" |
| | | import historyAlarmView from "../realTimeAlarm/historyAlarmView" |
| | | import historyAlarmTable from "../realTimeAlarm/historyAlarmTable" |
| | | import { |
| | | listHistoryAlarm, |
| | | exportHistoricalAlarm, |
| | | getHistoricalAlarm |
| | | } from "@/api/basicsetting/historyAlarm"; |
| | | import { listLimitType } from "@/api/basicsetting/limitType"; |
| | | import historyAlarmView from "../realTimeAlarm/historyAlarmView"; |
| | | import historyAlarmTable from "../realTimeAlarm/historyAlarmTable"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | |
| | | export default { |
| | | components: {historyAlarmView, historyAlarmTable}, |
| | | name: 'historyAlarm', |
| | | name: "historyAlarm", |
| | | mixins: [mixins], |
| | | data() { |
| | | return { |
| | |
| | | /* value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],*/ |
| | | }, |
| | | code: undefined, |
| | | value: '', |
| | | value: "", |
| | | options: undefined, |
| | | // handleClick:'simple', |
| | | radio: 'B', |
| | | activeName: 'second', |
| | | radio: "B", |
| | | activeName: "second", |
| | | indexId: undefined, |
| | | indexName: undefined, |
| | | indexUnit: undefined, |
| | |
| | | unitIdOptions: [], |
| | | // æ¥è¯¢åæ° |
| | | lineChartData: { |
| | | newVisitis: null, |
| | | newVisitis: null |
| | | }, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | eierarchyFlag: 'B', |
| | | indexType: 'COLLECT', |
| | | eierarchyFlag: "B", |
| | | indexType: "COLLECT", |
| | | code: undefined, |
| | | indexName: undefined, |
| | | /* unitId: undefined,*/ |
| | |
| | | /* limitingValue:undefined,*/ |
| | | nodeId: undefined, |
| | | beginTime: undefined, |
| | | endTime: undefined, |
| | | |
| | | endTime: undefined |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.height = window.innerHeight - 370 + 'px' |
| | | this.height = window.innerHeight - 370 + "px"; |
| | | }, |
| | | getList() { |
| | | this.loading = true; |
| | | listHistoryAlarm(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | listHistoryAlarm( |
| | | this.addDateRange(this.queryParams, this.dateRange) |
| | | ).then(response => { |
| | | this.JkHistoryAlarmList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | |
| | | this.queryParams.nodeId = modelNode.id; |
| | | this.settingDeviceList = []; |
| | | this.settingIndexList = []; |
| | | this.disabledSetting = modelNode === undefined || modelNode === '' || modelNode === null; |
| | | this.disabledSetting = |
| | | modelNode === undefined || modelNode === "" || modelNode === null; |
| | | if (modelNode) { |
| | | this.currentNode = modelNode; |
| | | this.deviceLoading = true; |
| | |
| | | // return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; |
| | | // }, |
| | | |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.getList(); |
| | |
| | | this.resetForm("queryForm"); |
| | | }, |
| | | |
| | | handleSelectionChange() { |
| | | }, |
| | | handleSelectionChange() {}, |
| | | openDialog(row, column, event, cell) { |
| | | if ("indexName" == column.property) { |
| | | this.open = true; |
| | |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¦æ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¦æ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | return exportHistoricalAlarm(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | //éå¶ç±»åç¿»è¯ |
| | | limitTypeFormat(row, column) { |
| | | var actions = []; |
| | | Object.keys(this.limitTypeOptions).map((key) => { |
| | | if (this.limitTypeOptions[key].limitCode == ('' + row.limitType)) { |
| | | Object.keys(this.limitTypeOptions).map(key => { |
| | | if (this.limitTypeOptions[key].limitCode == "" + row.limitType) { |
| | | actions.push(this.limitTypeOptions[key].limitName); |
| | | } |
| | | }); |
| | | return actions.join(''); |
| | | return actions.join(""); |
| | | }, |
| | | handleClick(tab, event) { |
| | | this.activeName = tab.name; |
| | | }, |
| | | getTime() { |
| | | var myDate = new Date(); |
| | | var monthFirst = new Date(myDate.getFullYear(), parseInt(myDate.getMonth()), 1); |
| | | var monthFirst = new Date( |
| | | myDate.getFullYear(), |
| | | parseInt(myDate.getMonth()), |
| | | 1 |
| | | ); |
| | | this.dateRange = [this.formatDate(monthFirst), this.formatDate(myDate)]; |
| | | }, |
| | | formatDate: function (value) { |
| | | let date = new Date(value); |
| | | let y = date.getFullYear(); |
| | | let MM = date.getMonth() + 1; |
| | | MM = MM < 10 ? ('0' + MM) : MM; |
| | | MM = MM < 10 ? "0" + MM : MM; |
| | | let d = date.getDate(); |
| | | d = d < 10 ? ('0' + d) : d; |
| | | d = d < 10 ? "0" + d : d; |
| | | let h = date.getHours(); |
| | | h = h < 10 ? ('0' + h) : h; |
| | | h = h < 10 ? "0" + h : h; |
| | | let m = date.getMinutes(); |
| | | m = m < 10 ? ('0' + m) : m; |
| | | m = m < 10 ? "0" + m : m; |
| | | let s = date.getSeconds(); |
| | | s = s < 10 ? ('0' + s) : s; |
| | | return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; |
| | | }, |
| | | s = s < 10 ? "0" + s : s; |
| | | return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons'); // echarts theme |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | // import resize from './mixins/resize' |
| | | |
| | | export default { |
| | |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | chartData: { |
| | | type: Object, |
| | | type: Object |
| | | // required: true |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | alarmLimitName:undefined |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose(); |
| | | this.chart = null |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons'); |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,timeList } = {}) { |
| | | if(expectedData.length>0){ |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: [this.alarmLimitName, '宿¶å¼'] |
| | | data: [this.alarmLimitName, "宿¶å¼"], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | symbol: "none", |
| | | name: 'æ¥è¦éå¼', |
| | | name: "æ¥è¦éå¼", |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | animationEasing: "cubicInOut" |
| | | }, |
| | | { |
| | | name: '宿¶å¼', |
| | | name: "宿¶å¼", |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#3888fa', |
| | | color: "#3888fa", |
| | | lineStyle: { |
| | | color: '#3888fa', |
| | | color: "#3888fa", |
| | | width: 2 |
| | | }, |
| | | areaStyle: { |
| | | color: '#f3f8ff' |
| | | color: "#f3f8ff" |
| | | } |
| | | } |
| | | }, |
| | | data: actualData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }] |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <el-row type="flex"> |
| | | <el-col :style="{width:isCollapse?'0': '280px',position:'relative'}" v-show="!isCollapse"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="宿¶æ¥è¦" :bodyStyle="bodyStyle"> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" :showOpt="false" :modelCode="modelCode"/> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :showOpt="false" |
| | | :modelCode="modelCode" |
| | | /> |
| | | </basic-container> |
| | | <img src="~@/assets/image/rectangle.png" alt="" |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse"> |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse"/> |
| | | <el-col :style="{width:isCollapse? 'calc(100% - 48px)':'calc(100% - 280px)',paddingLeft:isCollapse? 0:'14px'}"> |
| | | <basic-container :title="currentNode ? currentNode.label+'--èç¹é
ç½®' : 'èç¹é
ç½®'" :bodyStyle="bodyStyleRight"> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container |
| | | :title="currentNode ? currentNode.label + '--èç¹é
ç½®' : 'èç¹é
ç½®'" |
| | | :bodyStyle="bodyStyleRight" |
| | | > |
| | | <realTimeSetting ref="realTimeSetting"/> |
| | | </basic-container> |
| | | </el-col> |
| | |
| | | import realTimeSetting from "./modelRealTimeAlarmSetting"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from '@/components/shrink/index.vue' |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: {realTimeSetting, ModelNode,ShrinkCol}, |
| | |
| | | mixins: [mixins], |
| | | data() { |
| | | return { |
| | | modelData: '', |
| | | modelData: "", |
| | | modelInfoOptions: [], |
| | | modelCode: undefined, |
| | | isCollapse: false, |
| | | bodyStyleRight: {}, |
| | | currentNode: '' |
| | | } |
| | | currentNode: "" |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight -155 + 'px' |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 155 + 'px' |
| | | height: window.innerHeight - 185 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | if (node) { |
| | | this.currentNode = node |
| | | this.currentNode = node; |
| | | } |
| | | this.$refs.realTimeSetting.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | // this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse() { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <el-tabs> |
| | | <el-tab-pane :disabled="disabledSetting"> |
| | | <span slot="label"><i class="el-icon-setting"></i>宿¶æ¥è¦</span> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="query-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | class="query-form" |
| | | > |
| | | <el-form-item> |
| | | <el-radio-group v-model="queryParams.eierarchyFlag"> |
| | | <el-radio label="B" style="margin-right: 10px!important;" onselect="true">æ¬çº§</el-radio> |
| | | <el-radio |
| | | label="B" |
| | | style="margin-right: 10px!important;" |
| | | onselect="true" |
| | | >æ¬çº§</el-radio |
| | | > |
| | | <el-radio label="ALL">å
å«ä¸çº§</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="éå¼åç§°" prop="limitValName"> |
| | | <el-select v-model="queryParams.limitType" placeholder="éå¼åç§°" clearable |
| | | <el-select |
| | | v-model="queryParams.limitType" |
| | | placeholder="éå¼åç§°" |
| | | clearable |
| | | style="width:100px" |
| | | size="mini"> |
| | | size="mini" |
| | | > |
| | | <el-option |
| | | v-for="dict in limitTypeOptions" |
| | | :key="dict.limitCode" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥è¦çº§å«" prop="alarmLevel"> |
| | | <el-select v-model="queryParams.alarmLevel" placeholder="æ¥è¦çº§å«" clearable |
| | | <el-select |
| | | v-model="queryParams.alarmLevel" |
| | | placeholder="æ¥è¦çº§å«" |
| | | clearable |
| | | style="width:100px" |
| | | size="mini"> |
| | | size="mini" |
| | | > |
| | | <el-option |
| | | v-for="dict in alarmLevelOptions" |
| | | :key="dict.dictValue" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ææ åç§°"> |
| | | <el-input style="width: 120px" |
| | | <el-input |
| | | style="width: 120px" |
| | | v-model="queryParams.indexName" |
| | | placeholder="ææ åç§°" |
| | | clearable |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="selectList">æ¥è¯¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="selectList" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <!--<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button>--> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!--è¡¨æ ¼--> |
| | | <el-form :model="model" ref="form" class="mainTable"> |
| | | <el-table v-loading="loading" :data="model.tableOptions" border @selection-change="handleSelectionChange" |
| | | :default-sort="{prop: 'date', order: 'descending'}" @cell-click="openDialog" |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="model.tableOptions" |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | :default-sort="{ prop: 'date', order: 'descending' }" |
| | | @cell-click="openDialog" |
| | | :height="height" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" show-overflow-tooltip/> |
| | | <el-table-column label="åºå·" type="index" align="center" show-overflow-tooltip/> |
| | | <el-table-column label="åä½åç§°" align="center" width="100" prop="modelName" show-overflow-tooltip/> |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="code" show-overflow-tooltip/> |
| | | <el-table-column label="ææ åç§°" align="center" width="100" prop="indexName" show-overflow-tooltip> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | align="center" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="åºå·" |
| | | type="index" |
| | | align="center" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="åä½åç§°" |
| | | align="center" |
| | | width="100" |
| | | prop="modelName" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ææ ç¼ç " |
| | | align="center" |
| | | prop="code" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ææ åç§°" |
| | | align="center" |
| | | width="100" |
| | | prop="indexName" |
| | | show-overflow-tooltip |
| | | > |
| | | <template slot-scope="scope"> |
| | | <div style="color:blue;text-decoration:underline;cursor:pointer">{{ scope.row.indexName }}</div> |
| | | <div |
| | | style="color:blue;text-decoration:underline;cursor:pointer" |
| | | > |
| | | {{ scope.row.indexName }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ææ åä½" align="center" prop="unitId" :formatter="unitFormat" show-overflow-tooltip/> |
| | | <el-table-column label="æ¥è¦çº§å«" align="center" prop="alarmLevel" width="100" :formatter="alarmLevelFormat" show-overflow-tooltip/> |
| | | <el-table-column label="éå¼ç±»å" align="center" prop="limitType" width="100" :formatter="limitTypeFormat" show-overflow-tooltip/> |
| | | <el-table-column label="éå¼" align="center" prop="limitingValue" show-overflow-tooltip/> |
| | | <el-table-column label="æ¥è¦å¼å§æ¶é´" align="center" prop="alarmBeginTime" width="180" show-overflow-tooltip/> |
| | | <el-table-column label="æ¥è¦å¼" align="center" prop="alarmValue" show-overflow-tooltip/> |
| | | |
| | | <el-table-column |
| | | label="ææ åä½" |
| | | align="center" |
| | | prop="unitId" |
| | | :formatter="unitFormat" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="æ¥è¦çº§å«" |
| | | align="center" |
| | | prop="alarmLevel" |
| | | width="100" |
| | | :formatter="alarmLevelFormat" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="éå¼ç±»å" |
| | | align="center" |
| | | prop="limitType" |
| | | width="100" |
| | | :formatter="limitTypeFormat" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="éå¼" |
| | | align="center" |
| | | prop="limitingValue" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="æ¥è¦å¼å§æ¶é´" |
| | | align="center" |
| | | prop="alarmBeginTime" |
| | | width="180" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="æ¥è¦å¼" |
| | | align="center" |
| | | prop="alarmValue" |
| | | show-overflow-tooltip |
| | | /> |
| | | </el-table> |
| | | <pagination |
| | | :total="total" |
| | |
| | | /> |
| | | </el-form> |
| | | </el-tab-pane> |
| | | |
| | | </el-tabs> |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" :close-on-click-modal="false" @close="closeDialog"> |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | | @close="closeDialog" |
| | | > |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="宿¶æ°æ®æ²çº¿å¾" name="first"> |
| | | <live-alarm-view ref="liveAlarmView" :code="code" :activeName="activeName" |
| | | :limitVal="limitVal"></live-alarm-view> |
| | | <live-alarm-view |
| | | ref="liveAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | :limitVal="limitVal" |
| | | ></live-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å岿°æ®æ²çº¿å¾" name="second"> |
| | | <history-alarm-view ref="historyAlarmView" :code="code" :activeName="activeName" |
| | | :limitVal="limitVal"></history-alarm-view> |
| | | <history-alarm-view |
| | | ref="historyAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | :limitVal="limitVal" |
| | | ></history-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å岿°æ®æ¥è¯¢" name="third"> |
| | | <history-alarm-table ref="historyAlarmTable" :code="code" :indexName="indexName" :activeName="activeName" |
| | | :indexUnit="indexUnit"></history-alarm-table> |
| | | <history-alarm-table |
| | | ref="historyAlarmTable" |
| | | :code="code" |
| | | :indexName="indexName" |
| | | :activeName="activeName" |
| | | :indexUnit="indexUnit" |
| | | ></history-alarm-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getRealTimeAlarmList} from "@/api/energyAlarm/realTimeAlarm/realTimeAlarm" |
| | | import {listLimitType} from "@/api/basicsetting/limitType" |
| | | import liveAlarmView from "./liveAlarmView" |
| | | import historyAlarmView from "./historyAlarmView" |
| | | import historyAlarmTable from "./historyAlarmTable" |
| | | import { getRealTimeAlarmList } from "@/api/energyAlarm/realTimeAlarm/realTimeAlarm"; |
| | | import { listLimitType } from "@/api/basicsetting/limitType"; |
| | | import liveAlarmView from "./liveAlarmView"; |
| | | import historyAlarmView from "./historyAlarmView"; |
| | | import historyAlarmTable from "./historyAlarmTable"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | |
| | | export default { |
| | |
| | | indexName: undefined, |
| | | indexUnit: undefined, |
| | | //计æ¶å¨å¯¹è±¡ |
| | | timer: '', |
| | | timer: "", |
| | | //计æ¶å¨é´é |
| | | intervalTime: 30000, |
| | | currentNode: '', |
| | | currentNode: "", |
| | | deviceDialog: false, |
| | | energyDialog: false, |
| | | productDialog: false, |
| | |
| | | limitType: undefined, |
| | | indexType: "COLLECT", |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | pageSize: 10 |
| | | }, |
| | | height: null, |
| | | //æ¥è¦çº§å« |
| | |
| | | unitOptions: [], |
| | | //è¡¨æ ¼æ¨¡å |
| | | model: { |
| | | tableOptions: [], |
| | | }, |
| | | tableOptions: [] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getDicts("alarm_level").then(response => { |
| | |
| | | }); |
| | | }, |
| | | mounted() { |
| | | this.getConfigKey("energyAlarm.realTimeAlarm.intervalTime").then(response => { |
| | | this.getConfigKey("energyAlarm.realTimeAlarm.intervalTime").then( |
| | | response => { |
| | | this.intervalTime = response.msg; |
| | | this.timer = setInterval(this.getList, this.intervalTime); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | beforeDestroy() { |
| | | //页é¢éæ¯æ¶ è¦åæ¢è®¡æ¶å¨ï¼å¦åé项å¡åæ¢è®¡æ¶å¨ä¸åæ¢ï¼ä¼è¶æ¥è¶å¿«ï¼å¤ä¸ªçº¿ç¨ |
| | |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.height = window.innerHeight - 380 + 'px' |
| | | this.height = window.innerHeight - 390 + "px"; |
| | | }, |
| | | modelNodeChange(modelNode) { |
| | | this.queryParams.nodeId = modelNode.id; |
| | | this.disabledSetting = modelNode === undefined || modelNode === '' || modelNode === null; |
| | | this.disabledSetting = |
| | | modelNode === undefined || modelNode === "" || modelNode === null; |
| | | if (modelNode) { |
| | | this.currentNode = modelNode; |
| | | this.getList(); |
| | |
| | | this.ids = selection.map(item => item.indexId); |
| | | this.names = selection.map(item => item.name); |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length |
| | | this.multiple = !selection.length; |
| | | }, |
| | | |
| | | getList() { |
| | |
| | | // éå¼ç±»ååå
¸ç¿»è¯ |
| | | limitTypeFormat(row, column) { |
| | | var actions = []; |
| | | Object.keys(this.limitTypeOptions).map((key) => { |
| | | if (this.limitTypeOptions[key].limitCode == ('' + row.limitType)) { |
| | | Object.keys(this.limitTypeOptions).map(key => { |
| | | if (this.limitTypeOptions[key].limitCode == "" + row.limitType) { |
| | | actions.push(this.limitTypeOptions[key].limitName); |
| | | } |
| | | }); |
| | | return actions.join(''); |
| | | return actions.join(""); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.selectList(); |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '600px' |
| | | default: "600px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | //required: true |
| | | } |
| | | }, |
| | |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({actualData,expectedData,title} = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: 'è½æºå¹³è¡¡åæ', |
| | | x:'left', |
| | | y: 'top', |
| | | text: "è½æºå¹³è¡¡åæ", |
| | | x: "left", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333", |
| | | color: "#fff", |
| | | fontSize:16 |
| | | }, |
| | | } |
| | | }, |
| | | xAxis: { |
| | | data: actualData, |
| | | type: 'category', |
| | | type: "category" |
| | | }, |
| | | grid: { |
| | | left: 10, |
| | | right: 10, |
| | | bottom: 20, |
| | | top: '15%', |
| | | top: "15%", |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: [] |
| | | data: [], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | name: title, |
| | | smooth: true, |
| | | type: 'bar', |
| | | barWidth: '60%', |
| | | type: "bar", |
| | | barWidth: "60%", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | }) |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | //required: true |
| | | } |
| | | }, |
| | |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({actualData,expectedData,title} = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: 'è½æºå¹³è¡¡åæ', |
| | | x:'left', |
| | | y: 'top', |
| | | text: "è½æºå¹³è¡¡åæ", |
| | | x: "left", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | trigger: "item", |
| | | formatter: actualData |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | // orient 设置å¸å±æ¹å¼ï¼é»è®¤æ°´å¹³å¸å±ï¼å¯éå¼ï¼'horizontal'ï¼æ°´å¹³ï¼ ¦ 'vertical'ï¼åç´ï¼ |
| | | orient: 'vertical', |
| | | orient: "vertical", |
| | | // x è®¾ç½®æ°´å¹³å®æ¾ä½ç½®ï¼é»è®¤å
¨å¾å±
ä¸ï¼å¯éå¼ï¼'center' ¦ 'left' ¦ 'right' ¦ {number}ï¼xåæ ï¼åä½pxï¼ |
| | | x: 'left', |
| | | x: "left", |
| | | // y 设置åç´å®æ¾ä½ç½®ï¼é»è®¤å
¨å¾é¡¶ç«¯ï¼å¯éå¼ï¼'top' ¦ 'bottom' ¦ 'center' ¦ {number}ï¼yåæ ï¼åä½pxï¼ |
| | | y: '10%', |
| | | y: "10%", |
| | | //left: 10, |
| | | itemWidth: 24, // 设置å¾ä¾å¾å½¢ç宽 |
| | | itemHeight: 18, // 设置å¾ä¾å¾å½¢çé« |
| | | textStyle: { |
| | | color: '#666' // å¾ä¾æåé¢è² |
| | | color: "#fff" // å¾ä¾æåé¢è² |
| | | }, |
| | | // itemGap设置å个itemä¹é´çé´éï¼åä½pxï¼é»è®¤ä¸º10ï¼æ¨ªåå¸å±æ¶ä¸ºæ°´å¹³é´éï¼çºµåå¸å±æ¶ä¸ºçºµåé´é |
| | | // itemGap: 30, |
| | | backgroundColor: '#eee', // 设置æ´ä¸ªå¾ä¾åºåèæ¯é¢è² |
| | | data: actualData, |
| | | backgroundColor: "#eee", // 设置æ´ä¸ªå¾ä¾åºåèæ¯é¢è² |
| | | data: actualData |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | //name: 'è½æº', |
| | | type: 'pie', |
| | | radius: ['50%', '80%'], // 设置ç¯å½¢é¥¼ç¶å¾ï¼ 第ä¸ä¸ªç¾åæ°è®¾ç½®å
å大å°ï¼ç¬¬äºä¸ªç¾åæ°è®¾ç½®å¤åå¤§å° |
| | | center: ['50%', '50%'], // 设置饼ç¶å¾ä½ç½®ï¼ç¬¬ä¸ä¸ªç¾åæ°è°æ°´å¹³ä½ç½®ï¼ç¬¬äºä¸ªç¾åæ°è°åç´ä½ç½® |
| | | type: "pie", |
| | | radius: ["50%", "80%"], // 设置ç¯å½¢é¥¼ç¶å¾ï¼ 第ä¸ä¸ªç¾åæ°è®¾ç½®å
å大å°ï¼ç¬¬äºä¸ªç¾åæ°è®¾ç½®å¤åå¤§å° |
| | | center: ["50%", "50%"], // 设置饼ç¶å¾ä½ç½®ï¼ç¬¬ä¸ä¸ªç¾åæ°è°æ°´å¹³ä½ç½®ï¼ç¬¬äºä¸ªç¾åæ°è°åç´ä½ç½® |
| | | data: expectedData, |
| | | // itemStyle 设置饼ç¶å¾æå½¢åºåæ ·å¼ |
| | | itemStyle: { |
| | |
| | | emphasis: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(30, 144, 255ï¼0.5)' |
| | | shadowColor: "rgba(30, 144, 255ï¼0.5)" |
| | | } |
| | | }, |
| | | // 设置å¼åç飿å线 |
| | |
| | | // 设置å¼åçæ ç¾ |
| | | label: { |
| | | normal: { |
| | | position: 'inner', // 设置æ ç¾ä½ç½®ï¼é»è®¤å¨é¥¼ç¶å¾å¤ å¯éå¼ï¼'outer' ¦ 'innerï¼é¥¼ç¶å¾ä¸ï¼' |
| | | position: "inner", // 设置æ ç¾ä½ç½®ï¼é»è®¤å¨é¥¼ç¶å¾å¤ å¯éå¼ï¼'outer' ¦ 'innerï¼é¥¼ç¶å¾ä¸ï¼' |
| | | // formatter: '{a} {b} : {c}个 ({d}%)' 设置æ ç¾æ¾ç¤ºå
容 ï¼é»è®¤æ¾ç¤º{b} |
| | | // {a}æseries.name {b}æseries.dataçname |
| | | // {c}æseries.dataçvalue {d}%æè¿ä¸é¨åå æ»æ°çç¾åæ¯ |
| | | formatter: '{b} : ({d}%)' |
| | | formatter: "{b} : ({d}%)" |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | }) |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="æ¥è¡¨ç±»å"> |
| | | <el-radio-group v-model="queryParams.timeType"> |
| | | <el-radio v-for="dict in dateTypeOptions" :key="dict.dictValue" :label="dict.dictValue" @change="handleTime(dict.dictValue)">{{dict.dictLabel}}</el-radio> |
| | | <el-radio |
| | | v-for="dict in dateTypeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | @change="handleTime(dict.dictValue)" |
| | | >{{ dict.dictLabel }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-date-picker clearable size="small" style="width: 200px" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 200px" |
| | | v-model="queryParams.dataTime" |
| | | :type="dateTypes" |
| | | :value-format="valueFormat" |
| | | placeholder="éæ©æ¥æ"> |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row :gutter="20"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="list" border> |
| | | <el-table-column label="åç§°" align="center" prop="label">{{label}}</el-table-column> |
| | | <el-table-column label="产åº" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_CC)}}</template></el-table-column> |
| | | <el-table-column label="æ¶è" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_XH)}}</template></el-table-column> |
| | | <el-table-column label="å¤ä¾" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_WG)}}</template></el-table-column> |
| | | <el-table-column label="æè" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_SH)}}</template></el-table-column> |
| | | <el-table-column label="åç§°" align="center" prop="label">{{ |
| | | label |
| | | }}</el-table-column> |
| | | <el-table-column label="产åº" align="center"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value_CC) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="æ¶è" align="center"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value_XH) |
| | | }}</template></el-table-column |
| | | > |
| | | <!-- <el-table-column label="å¤ä¾" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_WG)}}</template></el-table-column> --> |
| | | <el-table-column label="æè" align="center"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value_SH) |
| | | }}</template></el-table-column |
| | | > |
| | | </el-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {energyBalanceList,energyBalanceTable} from '@/api/energyBalance/energyBalance' |
| | | import LineChart from './LineChart' |
| | | import { |
| | | energyBalanceList, |
| | | energyBalanceTable |
| | | } from "@/api/energyBalance/energyBalance"; |
| | | import LineChart from "./LineChart"; |
| | | export default { |
| | | components: {LineChart}, |
| | | data() { |
| | |
| | | pageSize: 10, |
| | | indexCode: undefined, |
| | | timeType:"DAY", |
| | | dataTime: undefined, |
| | | dataTime: undefined |
| | | }, |
| | | dateTypes: 'date', |
| | | dateTypes: "date", |
| | | valueFormat:"yyyy-MM-dd", |
| | | skinName:"", |
| | | label:"", |
| | | lineChartData:{expectedData: [], |
| | | actualData: [],label:""}, |
| | | lineChartData: { expectedData: [], actualData: [], label: "" } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getTime(); |
| | | this.getDicts("energyBalance").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | this.getConfigKey("energyBalance").then(response => { |
| | | this.skinName=response.msg; |
| | |
| | | modelNodeChange(modelNode) { |
| | | this.queryParams.indexCode=modelNode.id; |
| | | this.label=modelNode.label; |
| | | this.getList(this.queryParams) |
| | | this.getList(this.queryParams); |
| | | }, |
| | | getList() { |
| | | energyBalanceList(this.queryParams).then(response => { |
| | |
| | | let actualData=[]; |
| | | let total=""; |
| | | response.data.forEach(item => { |
| | | actualData.push(item.indexName) |
| | | expectedData.push({"name":item.indexName,"value":this.numFilter(item.value)}); |
| | | }) |
| | | actualData.push(item.indexName); |
| | | expectedData.push({ |
| | | name: item.indexName, |
| | | value: this.numFilter(item.value) |
| | | }); |
| | | }); |
| | | this.lineChartData.actualData=actualData; |
| | | this.lineChartData.expectedData=expectedData; |
| | | this.lineChartData.title=this.label; |
| | |
| | | this.handleQuery(); |
| | | }, |
| | | handleTime(date){ |
| | | if(date=='YEAR'){ |
| | | this.dateTypes= 'year', |
| | | this.valueFormat='yyyy' |
| | | }else if(date=='MONTH'){ |
| | | this.dateTypes= 'month', |
| | | this.valueFormat='yyyy-MM' |
| | | if (date == "YEAR") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (date == "MONTH") { |
| | | (this.dateTypes = "month"), (this.valueFormat = "yyyy-MM"); |
| | | }else{ |
| | | this.dateTypes= 'date', |
| | | this.valueFormat='yyyy-MM-dd' |
| | | (this.dateTypes = "date"), (this.valueFormat = "yyyy-MM-dd"); |
| | | } |
| | | }, |
| | | getTime(){ |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.queryParams.dataTime = year + '-' + month + '-' + (date-1) |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.queryParams.dataTime = year + "-" + month + "-" + (date - 1); |
| | | }, |
| | | numFilter(value) {// æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = '' ; |
| | | if (!isNaN(value) && value !== '' && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName) |
| | | numFilter(value) { |
| | | // æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ""; |
| | | if (!isNaN(value) && value !== "" && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName); |
| | | } else { |
| | | realVal = '--' |
| | | realVal = "--"; |
| | | } |
| | | return realVal |
| | | }, |
| | | return realVal; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | @keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | @-webkit-keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | è½æºå¹³è¡¡åæ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½æºå¹³è¡¡åæ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | :showOpt="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <div> |
| | | <energyBalance |
| | | ref="energyBalance" |
| | | style="padding:10px" |
| | | ></energyBalance> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <energyBalance ref="energyBalance" style="padding:10px"></energyBalance> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import energyBalance from "./energyBalance"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: { ModelNode,energyBalance}, |
| | | mixins: [mixins], |
| | | components: { ModelNode, energyBalance, ShrinkCol }, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.energyBalance.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: 'è¾åºè½éåæ', |
| | | left: '25%', |
| | | textAlign: 'center', |
| | | text: "è¾åºè½éåæ", |
| | | left: "25%", |
| | | textAlign: "center", |
| | | textStyle: { |
| | | fontStyle: 'normal', |
| | | "color": "#333", |
| | | }, |
| | | fontStyle: "normal", |
| | | color: "#333" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: '{a} <br/>{b}: {c} ({d}%)' |
| | | trigger: "item", |
| | | formatter: "{a} <br/>{b}: {c} ({d}%)" |
| | | }, |
| | | grid: { |
| | | left: '3%', |
| | | right: '4%', |
| | | bottom: '3%', |
| | | left: "3%", |
| | | right: "4%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | orient: "vertical", |
| | | left: 10, |
| | | top:'10%', |
| | | data: ['æ°´è¾å
¥é', 'çµè¾å
¥é'] |
| | | top: "10%", |
| | | data: ["æ°´è¾å
¥é", "çµè¾å
¥é"], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'è½éè¾åº', |
| | | type: 'pie', |
| | | radius: ['30%', '60%'], |
| | | name: "è½éè¾åº", |
| | | type: "pie", |
| | | radius: ["30%", "60%"], |
| | | avoidLabelOverlap: false, |
| | | label: { |
| | | show: false, |
| | | position: 'center' |
| | | position: "center" |
| | | }, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: '16', |
| | | fontWeight: 'bold' |
| | | fontSize: "16", |
| | | fontWeight: "bold" |
| | | } |
| | | }, |
| | | labelLine: { |
| | | show: false |
| | | }, |
| | | data: [ |
| | | {value: 340, name: 'æ°´è¾å
¥é'}, |
| | | {value: 150, name: 'çµè¾å
¥é'} |
| | | { value: 340, name: "æ°´è¾å
¥é" }, |
| | | { value: 150, name: "çµè¾å
¥é" } |
| | | ] |
| | | } |
| | | ] |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '600px' |
| | | default: "600px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | //required: true |
| | | } |
| | | }, |
| | |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({actualData,expectedData,title,total} = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title+"产åºï¼"+total, |
| | | x:'left', |
| | | y: 'top', |
| | | text: (title || "") + " " + total, |
| | | x: "left", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | trigger: "item", |
| | | formatter: actualData |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | // orient 设置å¸å±æ¹å¼ï¼é»è®¤æ°´å¹³å¸å±ï¼å¯éå¼ï¼'horizontal'ï¼æ°´å¹³ï¼ ¦ 'vertical'ï¼åç´ï¼ |
| | | orient: 'vertical', |
| | | orient: "vertical", |
| | | // x è®¾ç½®æ°´å¹³å®æ¾ä½ç½®ï¼é»è®¤å
¨å¾å±
ä¸ï¼å¯éå¼ï¼'center' ¦ 'left' ¦ 'right' ¦ {number}ï¼xåæ ï¼åä½pxï¼ |
| | | x: 'left', |
| | | x: "left", |
| | | // y 设置åç´å®æ¾ä½ç½®ï¼é»è®¤å
¨å¾é¡¶ç«¯ï¼å¯éå¼ï¼'top' ¦ 'bottom' ¦ 'center' ¦ {number}ï¼yåæ ï¼åä½pxï¼ |
| | | y: '10%', |
| | | y: "10%", |
| | | //left: 10, |
| | | itemWidth: 24, // 设置å¾ä¾å¾å½¢ç宽 |
| | | itemHeight: 18, // 设置å¾ä¾å¾å½¢çé« |
| | | textStyle: { |
| | | color: '#666' // å¾ä¾æåé¢è² |
| | | color: "#fff" // å¾ä¾æåé¢è² |
| | | }, |
| | | // itemGap设置å个itemä¹é´çé´éï¼åä½pxï¼é»è®¤ä¸º10ï¼æ¨ªåå¸å±æ¶ä¸ºæ°´å¹³é´éï¼çºµåå¸å±æ¶ä¸ºçºµåé´é |
| | | // itemGap: 30, |
| | | backgroundColor: '#eee', // 设置æ´ä¸ªå¾ä¾åºåèæ¯é¢è² |
| | | data: actualData, |
| | | // backgroundColor: "#eee", // 设置æ´ä¸ªå¾ä¾åºåèæ¯é¢è² |
| | | data: actualData |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | //name: 'è½æº', |
| | | type: 'pie', |
| | | radius: ['50%', '80%'], // 设置ç¯å½¢é¥¼ç¶å¾ï¼ 第ä¸ä¸ªç¾åæ°è®¾ç½®å
å大å°ï¼ç¬¬äºä¸ªç¾åæ°è®¾ç½®å¤åå¤§å° |
| | | center: ['50%', '50%'], // 设置饼ç¶å¾ä½ç½®ï¼ç¬¬ä¸ä¸ªç¾åæ°è°æ°´å¹³ä½ç½®ï¼ç¬¬äºä¸ªç¾åæ°è°åç´ä½ç½® |
| | | type: "pie", |
| | | radius: ["50%", "80%"], // 设置ç¯å½¢é¥¼ç¶å¾ï¼ 第ä¸ä¸ªç¾åæ°è®¾ç½®å
å大å°ï¼ç¬¬äºä¸ªç¾åæ°è®¾ç½®å¤åå¤§å° |
| | | center: ["50%", "50%"], // 设置饼ç¶å¾ä½ç½®ï¼ç¬¬ä¸ä¸ªç¾åæ°è°æ°´å¹³ä½ç½®ï¼ç¬¬äºä¸ªç¾åæ°è°åç´ä½ç½® |
| | | data: expectedData, |
| | | // itemStyle 设置饼ç¶å¾æå½¢åºåæ ·å¼ |
| | | itemStyle: { |
| | |
| | | emphasis: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(30, 144, 255ï¼0.5)' |
| | | shadowColor: "rgba(30, 144, 255ï¼0.5)" |
| | | }, |
| | | normal: { |
| | | label:{ |
| | | fontSize:25, |
| | | fontSize: 25 |
| | | } |
| | | } |
| | | }, |
| | | // 设置å¼åç飿å线 |
| | | labelLine: { |
| | | normal: { |
| | | show: false , // show设置线æ¯å¦æ¾ç¤ºï¼é»è®¤ä¸ºtrueï¼å¯éå¼ï¼true ¦ false |
| | | show: false // show设置线æ¯å¦æ¾ç¤ºï¼é»è®¤ä¸ºtrueï¼å¯éå¼ï¼true ¦ false |
| | | } |
| | | }, |
| | | avoidLabelOverlap: false, |
| | | emphasis: { |
| | | label: { |
| | | show: true, |
| | | fontSize: '40', |
| | | fontWeight: 'bold' |
| | | fontSize: "40", |
| | | fontWeight: "bold" |
| | | } |
| | | }, |
| | | // 设置å¼åçæ ç¾ |
| | | label: { |
| | | normal: { |
| | | position: 'inner', // 设置æ ç¾ä½ç½®ï¼é»è®¤å¨é¥¼ç¶å¾å¤ å¯éå¼ï¼'outer' ¦ 'innerï¼é¥¼ç¶å¾ä¸ï¼' |
| | | position: "inner", // 设置æ ç¾ä½ç½®ï¼é»è®¤å¨é¥¼ç¶å¾å¤ å¯éå¼ï¼'outer' ¦ 'innerï¼é¥¼ç¶å¾ä¸ï¼' |
| | | // formatter: '{a} {b} : {c}个 ({d}%)' 设置æ ç¾æ¾ç¤ºå
容 ï¼é»è®¤æ¾ç¤º{b} |
| | | // {a}æseries.name {b}æseries.dataçname |
| | | // {c}æseries.dataçvalue {d}%æè¿ä¸é¨åå æ»æ°çç¾åæ¯ |
| | | formatter: '{b} : ({d}%)' |
| | | }, |
| | | } |
| | | } |
| | | ], |
| | | }) |
| | | formatter: "{b} : ({d}%)" |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="æ¥è¡¨ç±»å"> |
| | | <el-radio-group v-model="queryParams.timeType"> |
| | | <el-radio v-for="dict in dateTypeOptions" :key="dict.dictValue" :label="dict.dictValue" @change="handleTime(dict.dictValue)">{{dict.dictLabel}}</el-radio> |
| | | <el-radio |
| | | v-for="dict in dateTypeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | @change="handleTime(dict.dictValue)" |
| | | >{{ dict.dictLabel }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-date-picker clearable size="small" style="width: 200px" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 200px" |
| | | v-model="queryParams.dataTime" |
| | | :type="dateTypes" |
| | | :value-format="valueFormat" |
| | | placeholder="éæ©æ¥æ"> |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row :gutter="20"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="list" border> |
| | | <el-table-column label="åç§°" align="center" prop="label">{{label}}</el-table-column> |
| | | <el-table-column label="åç§°" align="center" prop="label">{{ |
| | | label |
| | | }}</el-table-column> |
| | | <el-table-column label="æ»é" align="center" |
| | | ><template slot-scope="scope">{{ |
| | | numFilter(scope.row.value_total) |
| | | }}</template></el-table-column |
| | | > |
| | | <!--<el-table-column label="产åº" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_CC)}}</template></el-table-column>--> |
| | | <el-table-column label="æ¶è" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_XH)}}</template></el-table-column> |
| | | <el-table-column label="å¤ä¾" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_WG)}}</template></el-table-column> |
| | | <el-table-column label="æè" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_SH)}}</template></el-table-column> |
| | | <el-table-column label="æ»é" align="center"><template slot-scope="scope">{{numFilter(scope.row.value_total)}}</template></el-table-column> |
| | | <el-table-column label="æ¶è" align="center"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value_XH) |
| | | }}</template></el-table-column |
| | | > |
| | | <!-- <el-table-column label="å¤ä¾" align="center"> <template slot-scope="scope">{{numFilter(scope.row.value_WG)}}</template></el-table-column> --> |
| | | <el-table-column label="æè" align="center"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value_SH) |
| | | }}</template></el-table-column |
| | | > |
| | | </el-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {lossAnalysisList,energyLossTable} from '@/api/energyBalance/energyBalance' |
| | | import PieChart from './PieChart' |
| | | import { |
| | | lossAnalysisList, |
| | | energyLossTable |
| | | } from "@/api/energyBalance/energyBalance"; |
| | | import PieChart from "./PieChart"; |
| | | export default { |
| | | components: {PieChart}, |
| | | data() { |
| | |
| | | pageSize: 10, |
| | | indexCode: undefined, |
| | | timeType:"DAY", |
| | | dataTime: undefined, |
| | | dataTime: undefined |
| | | }, |
| | | dateTypes: 'date', |
| | | dateTypes: "date", |
| | | valueFormat:"yyyy-MM-dd", |
| | | skinName:"", |
| | | label:"", |
| | | lineChartData:{expectedData: [], |
| | | actualData: [],label:""}, |
| | | lineChartData: { expectedData: [], actualData: [], label: "" } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getTime(); |
| | | this.getDicts("energyBalance").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | this.getConfigKey("energyBalance").then(response => { |
| | | this.skinName=response.msg; |
| | |
| | | modelNodeChange(modelNode) { |
| | | this.queryParams.indexCode=modelNode.id; |
| | | this.label=modelNode.label; |
| | | this.getList(this.queryParams) |
| | | this.getList(this.queryParams); |
| | | }, |
| | | getList() { |
| | | lossAnalysisList(this.queryParams).then(response => { |
| | |
| | | let total=""; |
| | | response.data.forEach(item => { |
| | | if(item.indexCode.indexOf("_total")==-1){ |
| | | actualData.push(item.indexName) |
| | | expectedData.push({"name":item.indexName,"value":this.numFilter(item.value)}); |
| | | actualData.push(item.indexName); |
| | | expectedData.push({ |
| | | name: item.indexName, |
| | | value: this.numFilter(item.value) |
| | | }); |
| | | }else{ |
| | | total=this.numFilter(item.value) |
| | | total = this.numFilter(item.value); |
| | | } |
| | | }) |
| | | }); |
| | | this.lineChartData.total=total; |
| | | this.lineChartData.actualData=actualData; |
| | | this.lineChartData.expectedData=expectedData; |
| | |
| | | this.handleQuery(); |
| | | }, |
| | | handleTime(date){ |
| | | if(date=='YEAR'){ |
| | | this.dateTypes= 'year', |
| | | this.valueFormat='yyyy' |
| | | }else if(date=='MONTH'){ |
| | | this.dateTypes= 'month', |
| | | this.valueFormat='yyyy-MM' |
| | | if (date == "YEAR") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (date == "MONTH") { |
| | | (this.dateTypes = "month"), (this.valueFormat = "yyyy-MM"); |
| | | }else{ |
| | | this.dateTypes= 'date', |
| | | this.valueFormat='yyyy-MM-dd' |
| | | (this.dateTypes = "date"), (this.valueFormat = "yyyy-MM-dd"); |
| | | } |
| | | }, |
| | | getTime(){ |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.queryParams.dataTime = year + '-' + month + '-' + (date-1) |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.queryParams.dataTime = year + "-" + month + "-" + (date - 1); |
| | | }, |
| | | numFilter(value) {// æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = '' ; |
| | | if (!isNaN(value) && value !== '' && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName) |
| | | numFilter(value) { |
| | | // æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ""; |
| | | if (!isNaN(value) && value !== "" && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName); |
| | | } else { |
| | | realVal = '--' |
| | | realVal = "--"; |
| | | } |
| | | return realVal |
| | | }, |
| | | return realVal; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | @keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | @-webkit-keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | è½æºæå¤±åæ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½æºæå¤±åæ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | :showOpt="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <div> |
| | | <energyLoss ref="energyLoss" style="padding:10px"></energyLoss> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import energyLoss from "./energyLoss"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | export default { |
| | | components: { ModelNode,energyLoss}, |
| | | components: { ModelNode, energyLoss, ShrinkCol }, |
| | | mixins: [mixins], |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.energyLoss.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <div class="app-container" style="padding:0"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{moNode?moNode.label:''}}--è½æµåæ</span> |
| | | <span>{{ moNode ? moNode.label : "" }}--è½æµåæ</span> |
| | | </div> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="query-form"> |
| | | <el-date-picker clearable size="small" style="width: 200px" |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | class="query-form" |
| | | > |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 200px" |
| | | v-model="queryParams.dataTime" |
| | | :type="dateTypes" |
| | | :value-format="valueFormat" |
| | | placeholder="éæ©æ¥æ"> |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | <el-form-item label="å°æ¶" prop="selectHour"> |
| | | <el-select v-model="queryParams.selectHour" placeholder="è¯·éæ©å°æ¶" clearable size="small"> |
| | | <el-select |
| | | v-model="queryParams.selectHour" |
| | | placeholder="è¯·éæ©å°æ¶" |
| | | clearable |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="dict in selectHourOptions" |
| | | :key="dict.dictValue" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-table :data="energyPicList" v-loading="loading" border style="width: 100%; margin-top: 20px"> |
| | | <el-table-column label="åä½åç§°" align="center" prop="modename" min-width="200px"/> |
| | | <el-table |
| | | :data="energyPicList" |
| | | v-loading="loading" |
| | | border |
| | | style="width: 100%; margin-top: 20px" |
| | | > |
| | | <el-table-column |
| | | label="åä½åç§°" |
| | | align="center" |
| | | prop="modename" |
| | | min-width="200px" |
| | | /> |
| | | <el-table-column label="产åº" align="center" prop="a1"/> |
| | | <el-table-column label="æ¶è" align="center" prop="a2"/> |
| | | <el-table-column label="å¤ä¾" align="center" prop="a3"/> |
| | | <!-- <el-table-column label="å¤ä¾" align="center" prop="a3"/> --> |
| | | <el-table-column label="æè" align="center" prop="a4"/> |
| | | </el-table> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {selectEnergyPicList} from "@/api/energyBalance/energyPic" |
| | | import { selectEnergyPicList } from "@/api/energyBalance/energyPic"; |
| | | |
| | | export default { |
| | | name: 'energyIndex', |
| | | name: "energyIndex", |
| | | |
| | | data() { |
| | | return { |
| | | timeArr:[], |
| | | currentNode: '', |
| | | currentNode: "", |
| | | deviceCategory:undefined, |
| | | // é®ç½©å± |
| | | loading: false, |
| | |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | selectHour:"01", |
| | | selectHourOptions:[{"dictLabel":"01","dictValue":"01","dictType":"selecthour"}, |
| | | {"dictLabel":"02","dictValue":"02","dictType":"selecthour"}, |
| | | {"dictLabel":"03","dictValue":"03","dictType":"selecthour"}, |
| | | {"dictLabel":"04","dictValue":"04","dictType":"selecthour"}, |
| | | {"dictLabel":"05","dictValue":"05","dictType":"selecthour"}, |
| | | {"dictLabel":"06","dictValue":"06","dictType":"selecthour"}, |
| | | {"dictLabel":"07","dictValue":"07","dictType":"selecthour"}, |
| | | {"dictLabel":"08","dictValue":"08","dictType":"selecthour"}, |
| | | {"dictLabel":"09","dictValue":"09","dictType":"selecthour"}, |
| | | {"dictLabel":"10","dictValue":"10","dictType":"selecthour"}, |
| | | {"dictLabel":"11","dictValue":"11","dictType":"selecthour"}, |
| | | {"dictLabel":"12","dictValue":"12","dictType":"selecthour"}, |
| | | {"dictLabel":"13","dictValue":"13","dictType":"selecthour"}, |
| | | {"dictLabel":"14","dictValue":"14","dictType":"selecthour"}, |
| | | {"dictLabel":"15","dictValue":"15","dictType":"selecthour"}, |
| | | {"dictLabel":"16","dictValue":"16","dictType":"selecthour"}, |
| | | {"dictLabel":"17","dictValue":"17","dictType":"selecthour"}, |
| | | {"dictLabel":"18","dictValue":"18","dictType":"selecthour"}, |
| | | {"dictLabel":"19","dictValue":"19","dictType":"selecthour"}, |
| | | {"dictLabel":"20","dictValue":"20","dictType":"selecthour"}, |
| | | {"dictLabel":"21","dictValue":"21","dictType":"selecthour"}, |
| | | {"dictLabel":"22","dictValue":"22","dictType":"selecthour"}, |
| | | {"dictLabel":"23","dictValue":"23","dictType":"selecthour"} |
| | | selectHourOptions: [ |
| | | { dictLabel: "01", dictValue: "01", dictType: "selecthour" }, |
| | | { dictLabel: "02", dictValue: "02", dictType: "selecthour" }, |
| | | { dictLabel: "03", dictValue: "03", dictType: "selecthour" }, |
| | | { dictLabel: "04", dictValue: "04", dictType: "selecthour" }, |
| | | { dictLabel: "05", dictValue: "05", dictType: "selecthour" }, |
| | | { dictLabel: "06", dictValue: "06", dictType: "selecthour" }, |
| | | { dictLabel: "07", dictValue: "07", dictType: "selecthour" }, |
| | | { dictLabel: "08", dictValue: "08", dictType: "selecthour" }, |
| | | { dictLabel: "09", dictValue: "09", dictType: "selecthour" }, |
| | | { dictLabel: "10", dictValue: "10", dictType: "selecthour" }, |
| | | { dictLabel: "11", dictValue: "11", dictType: "selecthour" }, |
| | | { dictLabel: "12", dictValue: "12", dictType: "selecthour" }, |
| | | { dictLabel: "13", dictValue: "13", dictType: "selecthour" }, |
| | | { dictLabel: "14", dictValue: "14", dictType: "selecthour" }, |
| | | { dictLabel: "15", dictValue: "15", dictType: "selecthour" }, |
| | | { dictLabel: "16", dictValue: "16", dictType: "selecthour" }, |
| | | { dictLabel: "17", dictValue: "17", dictType: "selecthour" }, |
| | | { dictLabel: "18", dictValue: "18", dictType: "selecthour" }, |
| | | { dictLabel: "19", dictValue: "19", dictType: "selecthour" }, |
| | | { dictLabel: "20", dictValue: "20", dictType: "selecthour" }, |
| | | { dictLabel: "21", dictValue: "21", dictType: "selecthour" }, |
| | | { dictLabel: "22", dictValue: "22", dictType: "selecthour" }, |
| | | { dictLabel: "23", dictValue: "23", dictType: "selecthour" } |
| | | ], |
| | | queryParams: { |
| | | eierarchyFlag:"B", |
| | |
| | | selectHour:"01", |
| | | nodeid:"" |
| | | }, |
| | | dateTypes: 'date', |
| | | dateTypes: "date", |
| | | valueFormat:"yyyy-MM-dd", |
| | | tableData: [], |
| | | datas: [], |
| | | // 表ååæ° |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | }, |
| | | moNode: undefined, |
| | | rules: {}, |
| | | moNode: undefined |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | let date = { |
| | | year: nowDate.getFullYear(), |
| | | month: nowDate.getMonth() + 1, |
| | | day: nowDate.getDate(), |
| | | } |
| | | this.queryParams.dataTime = date.year + '-' + this.gshRq(date.month) + '-' +this.gshRq(date.day); |
| | | day: nowDate.getDate() |
| | | }; |
| | | this.queryParams.dataTime = |
| | | date.year + "-" + this.gshRq(date.month) + "-" + this.gshRq(date.day); |
| | | }, |
| | | gshRq(rq) |
| | | { |
| | | return ((rq*1)<10)?'0'+rq:rq; |
| | | gshRq(rq) { |
| | | return rq * 1 < 10 ? "0" + rq : rq; |
| | | }, |
| | | /** æ¥è¯¢ææ ä¿¡æ¯å表 */ |
| | | getList() { |
| | |
| | | this.endTime = new Date().setHours(0, 0, 0, 0) + 24 * 60 * 60 * 1000 - 1; |
| | | //æ¾ç¤ºæ¶é´ |
| | | this.timeArr = [this.startTime,this.endTime]; |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½æµåæ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :showOpt="false" |
| | | :auth="false" |
| | | :modelCode="modelCode" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <div :style="bodyStyleRight"> |
| | | <energyPic ref="energyPic"></energyPic> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | è½æµåæ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" :showOpt="false" :auth="false" :modelCode="modelCode"></ModelNode> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :showOpt="false" |
| | | :auth="false" |
| | | :modelCode="modelCode" |
| | | ></ModelNode> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <energyPic ref="energyPic"></energyPic> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </el-container> --> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import energyPic from "./energyPic"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | export default { |
| | | components: {energyPic, ModelNode}, |
| | | components: { energyPic, ModelNode, ShrinkCol }, |
| | | mixins: [mixins], |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | this.deviceCategory = this.$route.query.device_category; |
| | | }, |
| | | data() { |
| | | return { |
| | | modelData: '', |
| | | modelData: "", |
| | | modelInfoOptions: [], |
| | | modelCode:undefined, |
| | | deviceCategory:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | changeNode: function (node) { |
| | | this.$refs.energyPic.modelNodeChange(node,this.deviceCategory); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | }, |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <!-- <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content"> |
| | |
| | | </el-container> |
| | | </el-container> |
| | | </div> |
| | | </template> --> |
| | | <template> |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½èçæµæ¥è¦" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :showOpt="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <div> |
| | | <MonitorAlarmSetting ref="MonitorAlarmSetting"></MonitorAlarmSetting> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MonitorAlarmSetting from "./monitorAlarmSetting"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import {listModel} from "@/api/basicsetting/model"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | |
| | | export default { |
| | | mixins: [mixins], |
| | | components: {MonitorAlarmSetting, ModelNode}, |
| | | created() { |
| | | listModel({isShow: 1}).then(response => { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | modelData: '', |
| | | bodyStyleRight: {}, |
| | | modelData: "", |
| | | modelInfoOptions: [] |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.MonitorAlarmSetting.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | |
| | | <template> |
| | | <!-- 导å
¥è¡¨ --> |
| | | <el-dialog :title="title" :visible.sync="open" :destroy-on-close="true" :append-to-body="true" width="800px" top="5vh"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | :destroy-on-close="true" |
| | | :append-to-body="true" |
| | | width="800px" |
| | | top="5vh" |
| | | > |
| | | <!-- |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form-item> |
| | |
| | | </el-form-item> |
| | | </el-form>--> |
| | | |
| | | |
| | | <el-row> |
| | | <el-table v-loading="loading" :data="impIndexList" @selection-change="handleSelectionChange" stripe max-height="350"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="impIndexList" |
| | | @selection-change="handleSelectionChange" |
| | | max-height="350" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="code" /> |
| | | <el-table-column label="ææ åç§°" align="center" prop="name" /> |
| | |
| | | data() { |
| | | return { |
| | | //模åèç¹ |
| | | modeNode:'', |
| | | modeNode: "", |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // é䏿°ç» |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | implementId:'', |
| | | implementId: "", |
| | | tableName: undefined |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | // æ¾ç¤ºå¼¹æ¡ |
| | | show(modeNode) { |
| | |
| | | this.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | implementId:'', |
| | | implementId: "", |
| | | tableName: undefined |
| | | }; |
| | | //æ¸
空ä¸ä¼ ç»ä»¶çæä»¶å表 |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.indexId) |
| | | this.ids = selection.map(item => item.indexId); |
| | | }, |
| | | /** ä¿åæé®æä½ */ |
| | | handsave() |
| | | { |
| | | handsave() { |
| | | if(this.ids==null || this.ids.length<=0){ |
| | | this.msgSuccess("è¯·éæ©ææ !"); |
| | | return; |
| | | } |
| | | addIndex(this.ids,this.modeNode.id).then(response => { |
| | | if(response!=null && response.code=="200") |
| | | { |
| | | if (response != null && response.code == "200") { |
| | | this.msgSuccess(response.msg); |
| | | this.open=false; |
| | | }else{ |
| | |
| | | }); |
| | | }, |
| | | /** å
³éæé®æä½ */ |
| | | handclose() |
| | | { |
| | | handclose() { |
| | | this.open=false; |
| | | }, |
| | | |
| | | } |
| | | } |
| | | }; |
| | | |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | èæ ¸æ å管ç |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="èæ ¸æ å管ç" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false" |
| | | :auth="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <assessmentIndex ref="assessmentIndex" style="padding:10px"></assessmentIndex> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | :auth="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container :bodyStyle="bodyStyleRight"> |
| | | <assessmentIndex |
| | | ref="assessmentIndex" |
| | | style="padding:10px" |
| | | ></assessmentIndex> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | // import assessmentIndex from "./assessmentIndex"; |
| | | import assessmentIndex from "./create_index"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | export default { |
| | | components: { ModelNode,assessmentIndex}, |
| | | mixins: [mixins], |
| | | components: { ModelNode, assessmentIndex, ShrinkCol }, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | | data() { |
| | | return { |
| | | modelData: '', |
| | | modelData: "", |
| | | modelInfoOptions: [], |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.assessmentIndex.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item> |
| | | <el-radio v-model="radio" label="1">å½ååå
</el-radio> |
| | | <el-radio v-model="radio" label="2">å
å«ä¸ä¸çº§</el-radio> |
| | |
| | | type="daterange" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="èæ ¸ä¾æ®"> |
| | |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini">æç´¢</el-button> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" |
| | | >æç´¢</el-button |
| | | > |
| | | <el-button icon="el-icon-download" size="mini">导åº</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="margin: 20px;text-align: center;font-weight: 600;"> |
| | | <div style="margin: 20px;text-align: center;font-weight: 600;color:#fff"> |
| | | <span style="float: left;">ç»è®¡èå´ï¼å
¨å</span> |
| | | <span>è½æèæ ¸ç»æ</span> |
| | | <span style="float: right;">ç»è®¡åºé´ï¼{{times}}</span> |
| | | </div> |
| | | <el-table :data="energyEenchmarkingList" @selection-change="handleSelectionChange"> |
| | | <el-table |
| | | :data="energyEenchmarkingList" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column label="æ¥æ" align="center" prop="time"/> |
| | | <el-table-column label="çµèé" align="center"> |
| | | <el-table-column label="å®é
é" align="center" prop="dsjl"/> |
| | |
| | | multiple: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | radio: '1', |
| | | checkList: ['è½è计å'], |
| | | radio: "1", |
| | | checkList: ["è½è计å"], |
| | | // energy_benchmarkingè¡¨æ ¼æ°æ® |
| | | energyEenchmarkingList:[{ |
| | | "time": "2019-02-01", |
| | | "dsjl":"-", |
| | | "dnhjh":"-", |
| | | "tsjl":"244.42", |
| | | "tnhjh":"-", |
| | | "ssjl":"343.42", |
| | | "snhjh":"-", |
| | | "jsjl":"196.12", |
| | | "jnhjh":"-", |
| | | "ysjl":"358.44", |
| | | "ynhjh":"-", |
| | | "zsjl":"1716.39", |
| | | "znhjh":"-", |
| | | "createBy": null, |
| | | "createTime": "", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "remark": "", |
| | | energyEenchmarkingList: [ |
| | | { |
| | | time: "2019-02-01", |
| | | dsjl: "-", |
| | | dnhjh: "-", |
| | | tsjl: "244.42", |
| | | tnhjh: "-", |
| | | ssjl: "343.42", |
| | | snhjh: "-", |
| | | jsjl: "196.12", |
| | | jnhjh: "-", |
| | | ysjl: "358.44", |
| | | ynhjh: "-", |
| | | zsjl: "1716.39", |
| | | znhjh: "-", |
| | | createBy: null, |
| | | createTime: "", |
| | | updateBy: null, |
| | | updateTime: null, |
| | | remark: "" |
| | | }, |
| | | { |
| | | "time": "2019-02-02", |
| | | "dsjl":"-", |
| | | "dnhjh":"-", |
| | | "tsjl":"392.13", |
| | | "tnhjh":"-", |
| | | "ssjl":"382.95", |
| | | "snhjh":"-", |
| | | "jsjl":"164.3", |
| | | "jnhjh":"-", |
| | | "ysjl":"278.17", |
| | | "ynhjh":"-", |
| | | "zsjl":"1813.69", |
| | | "znhjh":"-", |
| | | "createBy": null, |
| | | "createTime": "", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "remark": "", |
| | | time: "2019-02-02", |
| | | dsjl: "-", |
| | | dnhjh: "-", |
| | | tsjl: "392.13", |
| | | tnhjh: "-", |
| | | ssjl: "382.95", |
| | | snhjh: "-", |
| | | jsjl: "164.3", |
| | | jnhjh: "-", |
| | | ysjl: "278.17", |
| | | ynhjh: "-", |
| | | zsjl: "1813.69", |
| | | znhjh: "-", |
| | | createBy: null, |
| | | createTime: "", |
| | | updateBy: null, |
| | | updateTime: null, |
| | | remark: "" |
| | | }, |
| | | { |
| | | "time": "2019-02-03", |
| | | "dsjl":"-", |
| | | "dnhjh":"-", |
| | | "tsjl":"213.91", |
| | | "tnhjh":"-", |
| | | "ssjl":"263.23", |
| | | "snhjh":"-", |
| | | "jsjl":"308.81", |
| | | "jnhjh":"-", |
| | | "ysjl":"327.49", |
| | | "ynhjh":"-", |
| | | "zsjl":"1698.82", |
| | | "znhjh":"-", |
| | | "createBy": null, |
| | | "createTime": "", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "remark": "", |
| | | time: "2019-02-03", |
| | | dsjl: "-", |
| | | dnhjh: "-", |
| | | tsjl: "213.91", |
| | | tnhjh: "-", |
| | | ssjl: "263.23", |
| | | snhjh: "-", |
| | | jsjl: "308.81", |
| | | jnhjh: "-", |
| | | ysjl: "327.49", |
| | | ynhjh: "-", |
| | | zsjl: "1698.82", |
| | | znhjh: "-", |
| | | createBy: null, |
| | | createTime: "", |
| | | updateBy: null, |
| | | updateTime: null, |
| | | remark: "" |
| | | }, |
| | | { |
| | | "time": "2019-02-04", |
| | | "dsjl":"-", |
| | | "dnhjh":"-", |
| | | "tsjl":"355.44", |
| | | "tnhjh":"-", |
| | | "ssjl":"260.75", |
| | | "snhjh":"-", |
| | | "jsjl":"232.01", |
| | | "jnhjh":"-", |
| | | "ysjl":"253.9", |
| | | "ynhjh":"-", |
| | | "zsjl":"1486.82", |
| | | "znhjh":"-", |
| | | "createBy": null, |
| | | "createTime": "", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "remark": "", |
| | | }], |
| | | time: "2019-02-04", |
| | | dsjl: "-", |
| | | dnhjh: "-", |
| | | tsjl: "355.44", |
| | | tnhjh: "-", |
| | | ssjl: "260.75", |
| | | snhjh: "-", |
| | | jsjl: "232.01", |
| | | jnhjh: "-", |
| | | ysjl: "253.9", |
| | | ynhjh: "-", |
| | | zsjl: "1486.82", |
| | | znhjh: "-", |
| | | createBy: null, |
| | | createTime: "", |
| | | updateBy: null, |
| | | updateTime: null, |
| | | remark: "" |
| | | } |
| | | ], |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | type: undefined, |
| | | value: undefined, |
| | | termValidity: undefined, |
| | | modelNode:"", |
| | | modelNode: "" |
| | | }, |
| | | times:"", |
| | | times: "" |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | // åæ¶æé® |
| | | cancel() { |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!=1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map(item => item.id); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | getTime(){ |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.times = year + '-' + month + '-' + date |
| | | }, |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.times = year + "-" + month + "-" + date; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | è½æèæ ¸ç»æ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½æèæ ¸ç»æ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false" |
| | | :auth="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <assessmentResults ref="assessmentResults" style="padding:10px"></assessmentResults> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | :auth="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container :bodyStyle="bodyStyleRight"> |
| | | <assessmentResults |
| | | ref="assessmentResults" |
| | | style="padding:10px" |
| | | ></assessmentResults> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import assessmentResults from "./assessmentResults"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | export default { |
| | | mixins: [mixins], |
| | | components: { ModelNode,assessmentResults}, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | //this.$refs.EnergyActual.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | 宿¶æ°æ®ç»æå¾ |
| | | </div> |
| | | <el-input |
| | | placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" |
| | | v-model="filterText"> |
| | | <el-input placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText"> |
| | | </el-input> |
| | | |
| | | <el-tree |
| | |
| | | :props="defaultProps" |
| | | default-expand-all |
| | | :filter-node-method="filterNode" |
| | | ref="tree"> |
| | | ref="tree" |
| | | > |
| | | </el-tree> |
| | | </el-card> |
| | | </el-aside> |
| | |
| | | <!-- <el-tab-pane label="è¶å¿å¾" name="third">è§è²ç®¡ç</el-tab-pane>--> |
| | | <!-- <el-tab-pane label="æ¥è¦è®°å½" name="fourth">宿¶ä»»å¡è¡¥å¿</el-tab-pane>--> |
| | | <!-- </el-tabs>--> |
| | | <svg-icon v-bind:iconClass="imgShow.realName" className='icon'></svg-icon> |
| | | <svg-icon |
| | | v-bind:iconClass="imgShow.realName" |
| | | className="icon" |
| | | ></svg-icon> |
| | | </el-main> |
| | | <!-- <el-main style="padding:0">--> |
| | | <!-- <realTimeSetting ref="realTimeSetting"></realTimeSetting>--> |
| | |
| | | } |
| | | </style> |
| | | <script> |
| | | import { |
| | | listEquipmentfile, |
| | | } from "@/api/basicSetup/equipmentfile"; |
| | | import { listEquipmentfile } from "@/api/basicSetup/equipmentfile"; |
| | | export default { |
| | | watch: { |
| | | filterText(val) { |
| | |
| | | var realName = "2020-03-12-275a44966506b783f033058f9e0e3472"; |
| | | return { |
| | | //å³è¾¹èåæ |
| | | activeName: '宿¶çæµ', |
| | | activeName: "宿¶çæµ", |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // é䏿°ç» |
| | |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // |
| | | imgShow:[ |
| | | realName="" |
| | | ], |
| | | imgShow: [(realName = "")], |
| | | // ç»æå¾è¡¨æ ¼æ°æ® |
| | | equipmentfileList: [], |
| | | //æµç¹è¡¨æ ¼æ°æ® |
| | | equipmentfilecdList: [ |
| | | choiceIndex = "" |
| | | ], |
| | | equipmentfilecdList: [(choiceIndex = "")], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | |
| | | rules: { |
| | | filename: [ |
| | | {required: true, message: "æä»¶åç§°ä¸è½ä¸ºç©º", trigger: "blur"} |
| | | ], fileno: [ |
| | | {required: true, message: "æä»¶ç¼å·ä¸è½ä¸ºç©º", trigger: "blur"} |
| | | ], |
| | | fileno: [ |
| | | { required: true, message: "æä»¶ç¼å·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | }, |
| | | filterText: '', |
| | | svgData:[{ |
| | | filterText: "", |
| | | svgData: [ |
| | | { |
| | | id:1, |
| | | label:"ç产ä¼ä¸", |
| | | children:[{ |
| | | children: [ |
| | | { |
| | | id:2, |
| | | label:"æ°´ç³»ç»", |
| | | },{ |
| | | id:3, |
| | | label: "çµç³»ç»", |
| | | }], |
| | | }], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'label' |
| | | label: "æ°´ç³»ç»" |
| | | }, |
| | | { |
| | | id: 3, |
| | | label: "çµç³»ç»" |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "label" |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | //åæ¢ç»æå¾æ¥ç |
| | | updateImg(row){ |
| | | var pos = row.filepath.lastIndexOf('/'); |
| | | var pos = row.filepath.lastIndexOf("/"); |
| | | var str = row.filepath.substr(pos+1); |
| | | this.imgShow.realName = str.substring(0,str.length-4); |
| | | console.log(this.imgShow.realName) |
| | | console.log(this.imgShow.realName); |
| | | }, |
| | | //éè¿å
³é®åè¿è¡è¿æ»¤ç»æå¾ |
| | | filterNode(value, data) { |
| | |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | 计å产é |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="å®é
产é" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | :showOpt="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container :bodyStyle="bodyStyleRight"> |
| | | <EnergyActual ref="EnergyActual" style="padding:10px"></EnergyActual> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import EnergyActual from "./EnergyActual"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: { ModelNode,EnergyActual}, |
| | | mixins: [mixins], |
| | | components: { ModelNode, EnergyActual, ShrinkCol }, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | console.log(node); |
| | | //this.$refs.EnergyActual.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | è½æºæ¶è计å |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½æºæ¶è计å" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <energyEstablishment ref="energyEstablishment" style="padding:10px"></energyEstablishment> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | :showOpt="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container :bodyStyle="bodyStyleRight"> |
| | | <energyEstablishment |
| | | ref="energyEstablishment" |
| | | style="padding:10px" |
| | | ></energyEstablishment> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import energyEstablishment from "./energyEstablishment"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | export default { |
| | | components: { ModelNode,energyEstablishment}, |
| | | components: { ModelNode, energyEstablishment, ShrinkCol }, |
| | | mixins: [mixins], |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.energyEstablishment.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | const animationDuration = 6000 |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | } |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | |
| | | this.chart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | title: { |
| | | x:'center', |
| | | y: 'top', |
| | | x: "center", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data:['ç¦å°','ç²ç¢æº'], |
| | | left: '60%', |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | data: ['12æ¥','13æ¥','14æ¥','15æ¥','16æ¥','17æ¥','18æ¥','19æ¥','20æ¥'], |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | data: ["ç¦å°", "ç²ç¢æº"], |
| | | left: "60%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | name: '', |
| | | type: 'value', |
| | | nameTextStyle:{ |
| | | color:"#333", |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | },{ |
| | | name: '', |
| | | type: 'value', |
| | | nameTextStyle:{ |
| | | color:"#333", |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: [ |
| | | "12æ¥", |
| | | "13æ¥", |
| | | "14æ¥", |
| | | "15æ¥", |
| | | "16æ¥", |
| | | "17æ¥", |
| | | "18æ¥", |
| | | "19æ¥", |
| | | "20æ¥" |
| | | ], |
| | | axisPointer: { |
| | | type: "shadow" |
| | | } |
| | | } |
| | | ], |
| | | series:[{ |
| | | type: 'bar', |
| | | yAxis: [ |
| | | { |
| | | name: "", |
| | | type: "value", |
| | | nameTextStyle: { |
| | | color: "#333" |
| | | }, |
| | | axisLabel: { |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: "", |
| | | type: "value", |
| | | nameTextStyle: { |
| | | color: "#333" |
| | | }, |
| | | axisLabel: { |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | type: "bar", |
| | | data: [289,430,350,375,374,204,300,194,184], |
| | | smooth: true,//线æ¡å¹³æ» |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | },{ |
| | | type: 'line', |
| | | animationEasing: "quadraticOut" |
| | | }, |
| | | { |
| | | type: "line", |
| | | yAxisIndex: 1, |
| | | data: [289,430,350,375,374,204,300,194,184], |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }] |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item> |
| | | <el-radio v-model="radio" label="1">ææ¥</el-radio> |
| | | <el-radio v-model="radio" label="2">ææ</el-radio> |
| | |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-select v-model="values" placeholder="è¯·éæ©"> |
| | |
| | | v-for="item in optionList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini">颿µ</el-button> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" |
| | | >颿µ</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini">导åº</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <line-chart/> |
| | | </el-row> |
| | | <div> |
| | | <span>ç»è®¡èå´ï¼å
¨å</span> |
| | | <span style="float: right;">ç»è®¡åºé´ï¼{{times}}</span> |
| | | </div> |
| | | <el-table :data="energyEenchmarkingList" @selection-change="handleSelectionChange"> |
| | | <el-table |
| | | :data="energyEenchmarkingList" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column prop="date" align="center" label="æ¥æ" width="150"/> |
| | | <el-table-column label="计å产é" align="center"> |
| | | <el-table-column label="产åç§ç±»" align="center" prop="cpname"/> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import LineChart from './LineChart' |
| | | import LineChart from "./LineChart"; |
| | | export default { |
| | | components: { |
| | | LineChart |
| | |
| | | multiple: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | radio: '1', |
| | | value: '', |
| | | values: '', |
| | | options: [{ |
| | | value: 'é项1', |
| | | label: 'æªæ¥ä¸å¤©' |
| | | }, { |
| | | value: 'é项2', |
| | | label: 'æªæ¥äºå¤©' |
| | | }, { |
| | | value: 'é项3', |
| | | label: 'æªæ¥ä¸å¤©' |
| | | }], |
| | | optionList: [{ |
| | | value: 'é项1', |
| | | label: 'çµè' |
| | | }, { |
| | | value: 'é项2', |
| | | label: 'æ°´è' |
| | | }], |
| | | radio: "1", |
| | | value: "", |
| | | values: "", |
| | | options: [ |
| | | { |
| | | value: "é项1", |
| | | label: "æªæ¥ä¸å¤©" |
| | | }, |
| | | { |
| | | value: "é项2", |
| | | label: "æªæ¥äºå¤©" |
| | | }, |
| | | { |
| | | value: "é项3", |
| | | label: "æªæ¥ä¸å¤©" |
| | | } |
| | | ], |
| | | optionList: [ |
| | | { |
| | | value: "é项1", |
| | | label: "çµè" |
| | | }, |
| | | { |
| | | value: "é项2", |
| | | label: "æ°´è" |
| | | } |
| | | ], |
| | | // energy_benchmarkingè¡¨æ ¼æ°æ® |
| | | energyEenchmarkingList: [{ |
| | | "date":"2020-11-20", |
| | | "cpname": "ç
¤æ°", |
| | | "jldw":"ç«æ¹ç±³", |
| | | "jhcl":"12212121", |
| | | "dian":"99", |
| | | "shui":"20", |
| | | "zq":"60", |
| | | "createBy": null, |
| | | "createTime": "", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "remark": "", |
| | | energyEenchmarkingList: [ |
| | | { |
| | | date: "2020-11-20", |
| | | cpname: "ç
¤æ°", |
| | | jldw: "ç«æ¹ç±³", |
| | | jhcl: "12212121", |
| | | dian: "99", |
| | | shui: "20", |
| | | zq: "60", |
| | | createBy: null, |
| | | createTime: "", |
| | | updateBy: null, |
| | | updateTime: null, |
| | | remark: "" |
| | | }, |
| | | { |
| | | "date":"2020-11-20", |
| | | "cpname": "ç²è¯", |
| | | "jldw":"å¨", |
| | | "jhcl":"22212", |
| | | "dian":"79", |
| | | "shui":"26", |
| | | "zq":"50", |
| | | "createBy": null, |
| | | "createTime": "", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "remark": "", |
| | | date: "2020-11-20", |
| | | cpname: "ç²è¯", |
| | | jldw: "å¨", |
| | | jhcl: "22212", |
| | | dian: "79", |
| | | shui: "26", |
| | | zq: "50", |
| | | createBy: null, |
| | | createTime: "", |
| | | updateBy: null, |
| | | updateTime: null, |
| | | remark: "" |
| | | }, |
| | | { |
| | | "date":"2020-11-20", |
| | | "cpname": "ç¦æ²¹", |
| | | "jldw":"å¨", |
| | | "jhcl":"1211212", |
| | | "dian":"109", |
| | | "shui":"30", |
| | | "zq":"85", |
| | | "createBy": null, |
| | | "createTime": "", |
| | | "updateBy": null, |
| | | "updateTime": null, |
| | | "remark": "", |
| | | }], |
| | | date: "2020-11-20", |
| | | cpname: "ç¦æ²¹", |
| | | jldw: "å¨", |
| | | jhcl: "1211212", |
| | | dian: "109", |
| | | shui: "30", |
| | | zq: "85", |
| | | createBy: null, |
| | | createTime: "", |
| | | updateBy: null, |
| | | updateTime: null, |
| | | remark: "" |
| | | } |
| | | ], |
| | | // å¼¹åºå±æ é¢ |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | |
| | | type: undefined, |
| | | value: undefined, |
| | | termValidity: undefined, |
| | | modelNode:"", |
| | | modelNode: "" |
| | | }, |
| | | times:"", |
| | | times: "" |
| | | }; |
| | | }, |
| | | created() {this.getTime()}, |
| | | created() { |
| | | this.getTime(); |
| | | }, |
| | | methods: { |
| | | getTime(){ |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.times = year + '-' + month + '-' + date |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.times = year + "-" + month + "-" + date; |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!=1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | this.ids = selection.map(item => item.id); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | @keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | @-webkit-keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | è½æºé¢æµ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½æºé¢æµ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false" |
| | | :auth="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <energyForecast ref="energyForecast" style="padding:10px"></energyForecast> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | :auth="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container :bodyStyle="bodyStyleRight"> |
| | | <energyForecast |
| | | ref="energyForecast" |
| | | style="padding:10px" |
| | | ></energyForecast> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import energyForecast from "./energyForecast"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: { ModelNode,energyForecast}, |
| | | components: { ModelNode, energyForecast, ShrinkCol }, |
| | | mixins: [mixins], |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | //this.$refs.EnergyActual.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') |
| | | import resize from '../../dashboard/mixins/resize' |
| | | const animationDuration = 6000 |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | } |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData,actualData,expecteData} = {}) { |
| | | this.chart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | title: { |
| | | x: 'center', |
| | | y: 'top', |
| | | x: "center", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | /*legend: { |
| | | data:['',''], |
| | | left: '60%', |
| | | },*/ |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: actualData, |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | type: "shadow" |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | //name: '综åè½è', |
| | | type: 'value', |
| | | type: "value", |
| | | nameTextStyle: { |
| | | color: "#333", |
| | | color: "#333" |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | }], |
| | | series: [{ |
| | | } |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | //name:"综åè½è", |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: expectedData, |
| | | //stack: 'vistors', |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | },{ |
| | | animationEasing: "quadraticOut" |
| | | }, |
| | | { |
| | | //name:"è½æºå æ¯", |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: expecteData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }] |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="æ¥è¡¨ç±»å"> |
| | | <el-radio-group v-model="queryParams.timeType"> |
| | | <el-radio v-for="dict in dateTypeOptions" :key="dict.dictValue" :label="dict.dictValue" @change="handleTime(dict.dictValue)">{{dict.dictLabel}}</el-radio> |
| | | <el-radio |
| | | v-for="dict in dateTypeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | @change="handleTime(dict.dictValue)" |
| | | >{{ dict.dictLabel }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="ç»è®¡åºé´"> |
| | | <el-date-picker clearable size="small" style="width: 200px" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 200px" |
| | | v-model="queryParams.dataTime" |
| | | :type="dateTypes" |
| | | :value-format="valueFormat" |
| | | placeholder="éæ©æ¥æ"> |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <line-chart ref="LineChart" :chart-data="lineChartData"/> |
| | | </el-row> |
| | | <el-table :data="energyEenchmarkingList" @selection-change="handleSelectionChange"> |
| | | <el-table-column prop="label" align="center" label="ç¨è½åå
">{{label}}</el-table-column> |
| | | <el-table |
| | | :data="energyEenchmarkingList" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column prop="label" align="center" label="ç¨è½åå
">{{ |
| | | label |
| | | }}</el-table-column> |
| | | <el-table-column label="产å产é" align="center"> |
| | | <el-table-column label="产åç§ç±»" align="center" prop="productname"/> |
| | | <el-table-column label="计éåä½" align="center" prop="muid" :formatter="unitIdFormat"/> |
| | | <el-table-column |
| | | label="计éåä½" |
| | | align="center" |
| | | prop="muid" |
| | | :formatter="unitIdFormat" |
| | | /> |
| | | <el-table-column label="计åå¼" align="center" prop="planValue" /> |
| | | <el-table-column label="å®é
å¼" align="center" prop="actualValue" /> |
| | | </el-table-column> |
| | |
| | | |
| | | <script> |
| | | import { listEnergyMonitoring } from "@/api/plannedOutput/energyMonitoring"; |
| | | import LineChart from './LineChart' |
| | | import LineChart from "./LineChart"; |
| | | export default { |
| | | components: {LineChart}, |
| | | data() { |
| | |
| | | //loading: true, |
| | | // é䏿°ç» |
| | | ids: [], |
| | | radio: '1', |
| | | radio: "1", |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | dataTime: undefined, |
| | | timeType:"DAY", |
| | | timeType: "DAY" |
| | | }, |
| | | dateTypes: 'date', |
| | | dateTypes: "date", |
| | | valueFormat:"yyyy-MM-dd", |
| | | label:"", |
| | | lineChartData:{expectedData: [],actualData: [],expecteData:[]}, |
| | | lineChartData: { expectedData: [], actualData: [], expecteData: [] } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }); |
| | | this.getDicts("energyPlan").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | }, |
| | | methods: { |
| | | modelNodeChange(modelNode) { |
| | | this.queryParams.indexCode=modelNode.id; |
| | | this.label=modelNode.label |
| | | this.getList(this.queryParams) |
| | | this.label = modelNode.label; |
| | | this.getList(this.queryParams); |
| | | }, |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | actualData.push(item.productname); |
| | | expectedData.push(item.planValue); |
| | | expecteData.push(item.actualValue); |
| | | }) |
| | | }); |
| | | this.lineChartData.actualData=actualData; |
| | | this.lineChartData.expectedData=expectedData; |
| | | this.lineChartData.expecteData=expecteData; |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!=1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map(item => item.id); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | handleTime(date){ |
| | | if(date=='YEAR'){ |
| | | this.dateTypes= 'year', |
| | | this.valueFormat='yyyy' |
| | | }else if(date=='MONTH'){ |
| | | this.dateTypes= 'month', |
| | | this.valueFormat='yyyy-MM' |
| | | if (date == "YEAR") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (date == "MONTH") { |
| | | (this.dateTypes = "month"), (this.valueFormat = "yyyy-MM"); |
| | | }else{ |
| | | this.dateTypes= 'date', |
| | | this.valueFormat='yyyy-MM-dd' |
| | | (this.dateTypes = "date"), (this.valueFormat = "yyyy-MM-dd"); |
| | | } |
| | | }, |
| | | getTime(){ |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.queryParams.dataTime = year + '-' + month + '-' + date |
| | | }, |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.queryParams.dataTime = year + "-" + month + "-" + date; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | 计åäºå®ç»©å¯¹æ¯åæ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="计åäºå®é
对æ¯åæ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <energyMonitoring ref="energyMonitoring" style="padding:10px"></energyMonitoring> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | :showOpt="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container :bodyStyle="bodyStyleRight"> |
| | | <energyMonitoring |
| | | ref="energyMonitoring" |
| | | style="padding:10px" |
| | | ></energyMonitoring> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import energyMonitoring from "./energyMonitoring"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | export default { |
| | | components: { ModelNode,energyMonitoring}, |
| | | mixins: [mixins], |
| | | components: { ModelNode, energyMonitoring, ShrinkCol }, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.energyMonitoring.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | 计å产é |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="计å产é" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :modelCode="modelCode" |
| | | :showOpt="false"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | :showOpt="false" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <basic-container :bodyStyle="bodyStyleRight"> |
| | | <EnergyPlan ref="EnergyPlan" style="padding:10px"></EnergyPlan> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </basic-container> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import EnergyPlan from "./EnergyPlan"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | export default { |
| | | components: { ModelNode,EnergyPlan}, |
| | | mixins: [mixins], |
| | | components: { ModelNode, EnergyPlan, ShrinkCol }, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.EnergyPlan.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | import ruleApi from "@/api/energyPrice/price"; |
| | | import { getTimePeriod } from "@/utils/index"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import moment from "moment"; |
| | | export default { |
| | | name: "energyPrice", |
| | | mixins: [mixins], |
| | |
| | | name: this.form.name, |
| | | id: this.form.id, |
| | | remark: this.form.remark, |
| | | effectiveDate: this.form.effectiveDate, |
| | | effectiveDate: moment(this.form.effectiveDate).format("yyyy-MM-DD"), |
| | | sharpFee: this.priceTypeList[0].price, //å°æ¶æ®µ |
| | | peakFee: this.priceTypeList[1].price, //å³°æ¶æ®µ |
| | | flatFee: this.priceTypeList[2].price, //å¹³æ¶æ®µ |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../mixins/resize' |
| | | const animationDuration = 6000 |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../mixins/resize"; |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | //required: true |
| | | } |
| | | }, |
| | |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({newVisitis,xAxis,actualData} = {}) { |
| | | var series=[]; |
| | |
| | | newVisitis.forEach(rowData => { |
| | | series.push({ |
| | | name: actualData, |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: newVisitis, |
| | | smooth: true,//线æ¡å¹³æ» |
| | | stack: 'vistors', |
| | | stack: "vistors", |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }, |
| | | ); |
| | | animationEasing: "quadraticOut" |
| | | }); |
| | | }); |
| | | /*for(var i=0;i<newVisitis.length;i++){ |
| | | series.push({ |
| | |
| | | } |
| | | this.chart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '1%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "1%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data:actualData, |
| | | left: '60%', |
| | | left: "60%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: xAxis, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | }, |
| | | }], |
| | | yAxis: [{ |
| | | name: '卿 ç
¤', |
| | | type: 'value', |
| | | } |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | name: "卿 ç
¤", |
| | | type: "value", |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | }], |
| | | series:series,/*[{ |
| | | } |
| | | } |
| | | ], |
| | | series: series /*[{ |
| | | name: 'æ¬æ', |
| | | type: 'bar', |
| | | data: [ |
| | |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }]*/ |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../mixins/resize' |
| | | const animationDuration = 6000 |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../mixins/resize"; |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | //required: true |
| | | } |
| | | }, |
| | |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({newVisitis,xAxis,actualData} = {}) { |
| | | var series=[]; |
| | |
| | | for(var j=0;j<aa.length;j++) { |
| | | series.push({ |
| | | name: actualData[i], |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: aa[j], |
| | | smooth: true,//线æ¡å¹³æ» |
| | | //stack: 'vistors', |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | } |
| | | ); |
| | | animationEasing: "quadraticOut" |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | this.chart.setOption({ |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '1%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "1%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data:actualData, |
| | | left: '40%', |
| | | left: "40%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: xAxis, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | }, |
| | | }], |
| | | yAxis: [{ |
| | | name: 'ä¸å
', |
| | | type: 'value', |
| | | } |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | name: "ä¸å
", |
| | | type: "value", |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | }], |
| | | } |
| | | } |
| | | ], |
| | | series: series |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | //required: true |
| | | } |
| | | }, |
| | |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({newVisitis,title,datas } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: 'è½æºæ¶è´¹ç»æææ', |
| | | x:'left', |
| | | y: 'top', |
| | | text: "è½æºæ¶è´¹ç»æææ", |
| | | x: "left", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | trigger: "item", |
| | | formatter: title |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | // orient 设置å¸å±æ¹å¼ï¼é»è®¤æ°´å¹³å¸å±ï¼å¯éå¼ï¼'horizontal'ï¼æ°´å¹³ï¼ ¦ 'vertical'ï¼åç´ï¼ |
| | | orient: 'vertical', |
| | | orient: "vertical", |
| | | // x è®¾ç½®æ°´å¹³å®æ¾ä½ç½®ï¼é»è®¤å
¨å¾å±
ä¸ï¼å¯éå¼ï¼'center' ¦ 'left' ¦ 'right' ¦ {number}ï¼xåæ ï¼åä½pxï¼ |
| | | x: 'left', |
| | | x: "left", |
| | | // y 设置åç´å®æ¾ä½ç½®ï¼é»è®¤å
¨å¾é¡¶ç«¯ï¼å¯éå¼ï¼'top' ¦ 'bottom' ¦ 'center' ¦ {number}ï¼yåæ ï¼åä½pxï¼ |
| | | y: '10%', |
| | | y: "10%", |
| | | //left: 10, |
| | | itemWidth: 24, // 设置å¾ä¾å¾å½¢ç宽 |
| | | itemHeight: 18, // 设置å¾ä¾å¾å½¢çé« |
| | | textStyle: { |
| | | color: '#666' // å¾ä¾æåé¢è² |
| | | color: "#fff" // å¾ä¾æåé¢è² |
| | | }, |
| | | // itemGap设置å个itemä¹é´çé´éï¼åä½pxï¼é»è®¤ä¸º10ï¼æ¨ªåå¸å±æ¶ä¸ºæ°´å¹³é´éï¼çºµåå¸å±æ¶ä¸ºçºµåé´é |
| | | // itemGap: 30, |
| | | backgroundColor: '#eee', // 设置æ´ä¸ªå¾ä¾åºåèæ¯é¢è² |
| | | backgroundColor: "#eee", // 设置æ´ä¸ªå¾ä¾åºåèæ¯é¢è² |
| | | data: title, |
| | | formatter:function(item){ |
| | | let target; |
| | |
| | | for(let i=0;i<newVisitis.length;i++){ |
| | | if(datas[i].name===item){ |
| | | target=datas[i].value; |
| | | unitId=datas[i].unitId |
| | | unitId = datas[i].unitId; |
| | | } |
| | | } |
| | | let arr=[item+ +target+ unitId]/*["{a|"+target+"}","{b|"+item+"}"]*/ |
| | | return arr/*.join("\n")*/ |
| | | let arr = [ |
| | | item + +target + unitId |
| | | ]; /*["{a|"+target+"}","{b|"+item+"}"]*/ |
| | | return arr; /*.join("\n")*/ |
| | | } |
| | | }, |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | //name: 'è½æº', |
| | | type: 'pie', |
| | | radius: '60%', // 设置饼ç¶å¾å¤§å°ï¼100%æ¶ï¼æå¤§ç´å¾=æ´ä¸ªå¾å½¢çmin(宽ï¼é«) |
| | | type: "pie", |
| | | radius: "60%", // 设置饼ç¶å¾å¤§å°ï¼100%æ¶ï¼æå¤§ç´å¾=æ´ä¸ªå¾å½¢çmin(宽ï¼é«) |
| | | //radius: ['30%', '60%'], // 设置ç¯å½¢é¥¼ç¶å¾ï¼ 第ä¸ä¸ªç¾åæ°è®¾ç½®å
å大å°ï¼ç¬¬äºä¸ªç¾åæ°è®¾ç½®å¤åå¤§å° |
| | | center: ['65%', '50%'], // 设置饼ç¶å¾ä½ç½®ï¼ç¬¬ä¸ä¸ªç¾åæ°è°æ°´å¹³ä½ç½®ï¼ç¬¬äºä¸ªç¾åæ°è°åç´ä½ç½® |
| | | center: ["65%", "50%"], // 设置饼ç¶å¾ä½ç½®ï¼ç¬¬ä¸ä¸ªç¾åæ°è°æ°´å¹³ä½ç½®ï¼ç¬¬äºä¸ªç¾åæ°è°åç´ä½ç½® |
| | | data: newVisitis,//[{value:335, name:'æ´ç²¾ç
¤' },{value:310, name:'å·¥ä¸ç¨çµ'}],/*selected: true*/ |
| | | // itemStyle 设置饼ç¶å¾æå½¢åºåæ ·å¼ |
| | | itemStyle: { |
| | |
| | | emphasis: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(30, 144, 255ï¼0.5)' |
| | | shadowColor: "rgba(30, 144, 255ï¼0.5)" |
| | | } |
| | | }, |
| | | // 设置å¼åç飿å线 |
| | |
| | | // 设置å¼åçæ ç¾ |
| | | label: { |
| | | normal: { |
| | | position: 'inner', // 设置æ ç¾ä½ç½®ï¼é»è®¤å¨é¥¼ç¶å¾å¤ å¯éå¼ï¼'outer' ¦ 'innerï¼é¥¼ç¶å¾ä¸ï¼' |
| | | position: "inner", // 设置æ ç¾ä½ç½®ï¼é»è®¤å¨é¥¼ç¶å¾å¤ å¯éå¼ï¼'outer' ¦ 'innerï¼é¥¼ç¶å¾ä¸ï¼' |
| | | // formatter: '{a} {b} : {c}个 ({d}%)' 设置æ ç¾æ¾ç¤ºå
容 ï¼é»è®¤æ¾ç¤º{b} |
| | | // {a}æseries.name {b}æseries.dataçname |
| | | // {c}æseries.dataçvalue {d}%æè¿ä¸é¨åå æ»æ°çç¾åæ¯ |
| | | formatter: '{c}' |
| | | formatter: "{c}" |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | }) |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="dashboard-editor-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="æ¥æ"> |
| | | <el-radio-group v-model="queryParams.timeType"> |
| | | <el-radio style="margin-right: 10px" v-for="dict in dateTypeOptions" :key="dict.dictValue" :label="dict.dictValue" @change="handleTime(dict.dictValue)">{{dict.dictLabel}}</el-radio> |
| | | <el-radio |
| | | style="margin-right: 10px" |
| | | v-for="dict in dateTypeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | @change="handleTime(dict.dictValue)" |
| | | >{{ dict.dictLabel }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | <el-date-picker |
| | | v-model="queryParams.beginTime" |
| | | :type="dateTypes" |
| | | :value-format="valueFormat" |
| | | placeholder="å¼å§æ¥æ"> |
| | | placeholder="å¼å§æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | å° |
| | | <el-date-picker |
| | | v-model="queryParams.endTime" |
| | | :type="dateTypes" |
| | | :value-format="valueFormat" |
| | | placeholder="ç»ææ¥æ"> |
| | | placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <router-link :to="'/energyConsumption/listEnergyConsumption/'+queryParams.timeType+'/'+queryParams.beginTime+'/'+queryParams.endTime+'/'+queryParams.indexCode+'/'+queryParams.id+'/'+titleName" class="link-type"> |
| | | <router-link |
| | | :to=" |
| | | '/energyConsumption/listEnergyConsumption/' + |
| | | queryParams.timeType + |
| | | '/' + |
| | | queryParams.beginTime + |
| | | '/' + |
| | | queryParams.endTime + |
| | | '/' + |
| | | queryParams.indexCode + |
| | | '/' + |
| | | queryParams.id + |
| | | '/' + |
| | | titleName |
| | | " |
| | | class="link-type" |
| | | > |
| | | <el-button size="mini">è½æºæ¶è´¹ææ¬åæ¶åææ¥è¡¨</el-button> |
| | | </router-link> |
| | | </el-form-item> |
| | | </el-form> |
| | | <h4 style="float: left; text-align:center;padding: 0;margin: 0px 0px 10px;width: 90%;">ç产ä¼ä¸è½æºæ¶èææ¬åæ</h4> |
| | | <h4 |
| | | style="color:#fff;float: left; text-align:center;padding: 0;margin: 0px 0px 10px;width: 90%;" |
| | | > |
| | | ç产ä¼ä¸è½æºæ¶èææ¬åæ |
| | | </h4> |
| | | <el-row :gutter="32"> |
| | | <el-col :xs="24" :sm="24" :lg="12" style="padding-right: 0"> |
| | | <div class="chart-wrapper" > |
| | |
| | | <el-row :gutter="32"> |
| | | <el-col :xs="24" :sm="24" :lg="12" style="padding-right: 0"> |
| | | <div class="chart-wrapper" > |
| | | <span style="display: block;color: #333;">è½æºæ¶è´¹ç»ææ
åµå¯¹æ¯</span> |
| | | <el-checkbox-group v-model="checkList1" style="padding: 10px;border: 1px solid #ddd;margin:10px 0;" @change="handleCheckedCitiesChange1"><!--clickMe --> |
| | | <el-checkbox :indeterminate="isIndeterminate1" v-model="checkAll1" @change="handleCheckAllChange1">å
¨é</el-checkbox> |
| | | <el-checkbox v-for="dict in list" :key="dict.code" :label="dict.code">{{dict.name}}</el-checkbox> |
| | | <span style="display: block;color: #fff;">è½æºæ¶è´¹ç»ææ
åµå¯¹æ¯</span> |
| | | <el-checkbox-group |
| | | v-model="checkList1" |
| | | style="padding: 10px;border: 1px solid #ddd;margin:10px 0;" |
| | | @change="handleCheckedCitiesChange1" |
| | | ><!--clickMe --> |
| | | <el-checkbox |
| | | :indeterminate="isIndeterminate1" |
| | | v-model="checkAll1" |
| | | @change="handleCheckAllChange1" |
| | | >å
¨é</el-checkbox |
| | | > |
| | | <el-checkbox |
| | | v-for="dict in list" |
| | | :key="dict.code" |
| | | :label="dict.code" |
| | | >{{ dict.name }}</el-checkbox |
| | | > |
| | | </el-checkbox-group> |
| | | <bar-chart ref="BarChart" :chart-data="lineChartData2"/> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :lg="12" style="padding-right: 0"> |
| | | <div class="chart-wrapper"> |
| | | <span style="display: block;color: #333;">è½æºæ¶è´¹ææ¬æ
åµå¯¹æ¯</span> |
| | | <el-checkbox-group v-model="checkList2" style="padding: 10px;border: 1px solid #ddd;margin:10px 0;" @change="handleCheckedCitiesChange2"><!--clickMe --> |
| | | <el-checkbox :indeterminate="isIndeterminate2" v-model="checkAll2" @change="handleCheckAllChange2">å
¨é</el-checkbox> |
| | | <el-checkbox v-for="dict in list" :key="dict.code" :label="dict.code">{{dict.name}}</el-checkbox> |
| | | <span style="display: block;color: #fff;">è½æºæ¶è´¹ææ¬æ
åµå¯¹æ¯</span> |
| | | <el-checkbox-group |
| | | v-model="checkList2" |
| | | style="padding: 10px;border: 1px solid #ddd;margin:10px 0;" |
| | | @change="handleCheckedCitiesChange2" |
| | | ><!--clickMe --> |
| | | <el-checkbox |
| | | :indeterminate="isIndeterminate2" |
| | | v-model="checkAll2" |
| | | @change="handleCheckAllChange2" |
| | | >å
¨é</el-checkbox |
| | | > |
| | | <el-checkbox |
| | | v-for="dict in list" |
| | | :key="dict.code" |
| | | :label="dict.code" |
| | | >{{ dict.name }}</el-checkbox |
| | | > |
| | | </el-checkbox-group> |
| | | <!-- <el-checkbox-group v-model="checkList2" style="padding: 10px;border: 1px solid #ddd;margin:10px 0;" @change="clickMe(2)"> |
| | | <el-checkbox v-for="dict in list" :key="dict.code" :label="dict.code">{{dict.name}}</el-checkbox> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import BarChart from './BarChart' |
| | | import BarCharts from './BarCharts' |
| | | import PieChart from './PieChart' |
| | | import pieChartCost from './pieChartCost' |
| | | import {getEnergyConstitute,getEnergyConsumption,getSettingIndex} from "@/api/energyStatistics/statistics"; |
| | | import BarChart from "./BarChart"; |
| | | import BarCharts from "./BarCharts"; |
| | | import PieChart from "./PieChart"; |
| | | import pieChartCost from "./pieChartCost"; |
| | | import { |
| | | getEnergyConstitute, |
| | | getEnergyConsumption, |
| | | getSettingIndex |
| | | } from "@/api/energyStatistics/statistics"; |
| | | export default { |
| | | name: 'consumption', |
| | | name: 'Index', |
| | | name: "consumption", |
| | | name: "Index", |
| | | components: {BarChart,BarCharts,PieChart,pieChartCost}, |
| | | props: ["modelCode"], |
| | | data() { |
| | |
| | | beginTime: undefined, |
| | | endTime: undefined, |
| | | dataTime: undefined, |
| | | timeType:'MONTH', |
| | | timeType: "MONTH", |
| | | indexId: undefined, |
| | | procedure: undefined, |
| | | indexCode: "", |
| | | id: undefined, |
| | | id: undefined |
| | | }, |
| | | list:[], |
| | | arraylist1:[], |
| | |
| | | xAxisListXFCB:[], |
| | | xAxisListZBL:[], |
| | | lineChartData:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | lineChartData1:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | lineChartData2:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | lineChartData3:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | lineChartData4:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | //dateTypes: 'monthrange',//æ¶é´èå´ |
| | | dateTypes: 'month', |
| | | valueFormat:'yyyy-MM', |
| | | dateTypes: "month", |
| | | valueFormat: "yyyy-MM", |
| | | title:"", |
| | | titleName: "", |
| | | checkAll1: false, |
| | | checkAll2: false, |
| | | isIndeterminate1: true, |
| | | isIndeterminate2: true, |
| | | } |
| | | isIndeterminate2: true |
| | | }; |
| | | }, |
| | | watch: { |
| | | modelCode: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.getList(val) |
| | | this.getList(val); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | //this.getList(); |
| | | this.getDicts("timeType").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | this.getConfigKey("energyStatistics.energyStatisticConsum").then(response => { |
| | | this.getConfigKey("energyStatistics.energyStatisticConsum").then( |
| | | response => { |
| | | this.skinName=response.msg; |
| | | }); |
| | | let endTtime=(new Date().getFullYear()) +'-' +((new Date().getMonth() + 1)>9?(new Date().getMonth() + 1):"0"+(new Date().getMonth() + 1)); |
| | | let starTtime= (new Date().getFullYear()-1)+'-' +((new Date().getMonth() + 1)>9?(new Date().getMonth() + 1):"0"+(new Date().getMonth() + 1)); |
| | | } |
| | | ); |
| | | let endTtime = |
| | | new Date().getFullYear() + |
| | | "-" + |
| | | (new Date().getMonth() + 1 > 9 |
| | | ? new Date().getMonth() + 1 |
| | | : "0" + (new Date().getMonth() + 1)); |
| | | let starTtime = |
| | | new Date().getFullYear() - |
| | | 1 + |
| | | "-" + |
| | | (new Date().getMonth() + 1 > 9 |
| | | ? new Date().getMonth() + 1 |
| | | : "0" + (new Date().getMonth() + 1)); |
| | | this.queryParams.beginTime=starTtime; |
| | | this.queryParams.endTime=endTtime; |
| | | }, |
| | |
| | | let title=[]; |
| | | for (let i=0; i<this.arraylist1.length;i++){ |
| | | title.push(this.arraylist1[i].indexName); |
| | | unitId.push({"name":this.arraylist1[i].indexName,"value":this.numFilter(this.arraylist1[i].value),"unitId":this.arraylist1[i].unitId}); |
| | | }; |
| | | unitId.push({ |
| | | name: this.arraylist1[i].indexName, |
| | | value: this.numFilter(this.arraylist1[i].value), |
| | | unitId: this.arraylist1[i].unitId |
| | | }); |
| | | } |
| | | for (let i=0; i<this.arraylist2.length;i++){ |
| | | source.push({"name":this.arraylist2[i].indexName,"value":this.numFilter(this.arraylist2[i].value)}); |
| | | source.push({ |
| | | name: this.arraylist2[i].indexName, |
| | | value: this.numFilter(this.arraylist2[i].value) |
| | | }); |
| | | } |
| | | this.lineChartData.datas=unitId; |
| | | this.lineChartData.title=title; |
| | |
| | | let sourceXFCB=[]; |
| | | let titleXFCB=[]; |
| | | for (let i=0; i<this.arraylist4.length;i++){ |
| | | sourceXFCB.push({"name":this.arraylist4[i].indexName,"value":this.numFilter(this.arraylist4[i].value)}); |
| | | unitIdXFCB.push({"name":this.arraylist4[i].indexName,"value":this.numFilter(this.arraylist4[i].value),"unitId":"ä¸å
"}); |
| | | sourceXFCB.push({ |
| | | name: this.arraylist4[i].indexName, |
| | | value: this.numFilter(this.arraylist4[i].value) |
| | | }); |
| | | unitIdXFCB.push({ |
| | | name: this.arraylist4[i].indexName, |
| | | value: this.numFilter(this.arraylist4[i].value), |
| | | unitId: "ä¸å
" |
| | | }); |
| | | titleXFCB +=this.numFilter(this.arraylist4[i].value); |
| | | } |
| | | this.lineChartData1.title=titleXFCB; |
| | |
| | | let xAxis=[]; |
| | | for(let i=0; i<this.arraylist3.length; i++){ |
| | | currentValue.push(this.numFilter(this.arraylist3[i].currentValue)); |
| | | lastYearValue.push(this.numFilter(this.arraylist3[i].lastYearValue)); |
| | | lastYearValue.push( |
| | | this.numFilter(this.arraylist3[i].lastYearValue) |
| | | ); |
| | | } |
| | | resultZBL.push(currentValue); |
| | | resultZBL.push(lastYearValue); |
| | |
| | | } |
| | | this.lineChartData2.xAxis=xAxis; |
| | | this.lineChartData2.newVisitis=resultZBL; |
| | | this.lineChartData2.actualData=['æ¬æ','åæ']; |
| | | this.lineChartData2.actualData = ["æ¬æ", "åæ"]; |
| | | this.$refs.BarChart.initChart(this.lineChartData2); |
| | | //è½èæ¶è´¹ææ¬ å¯¹æ¯ |
| | | let resultXFCB=[]; |
| | |
| | | } |
| | | this.lineChartData3.xAxis=xAxisXFCB; |
| | | this.lineChartData3.newVisitis=resultXFCB; |
| | | this.lineChartData3.actualData=['æ¬æ','åæ','é¢ç®']; |
| | | this.lineChartData3.actualData = ["æ¬æ", "åæ", "é¢ç®"]; |
| | | this.$refs.BarCharts.initChart(this.lineChartData3); |
| | | }) |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | |
| | | handleCheckedCitiesChange1(value) { |
| | | let checkedCount = value.length; |
| | | this.checkAll1 = checkedCount === this.list.length; |
| | | this.isIndeterminate1 = checkedCount > 0 && checkedCount < this.list.length; |
| | | this.isIndeterminate1 = |
| | | checkedCount > 0 && checkedCount < this.list.length; |
| | | this.resultListZBL(value); |
| | | }, |
| | | handleCheckAllChange2(val) { |
| | |
| | | this.resultListXFCB(value); |
| | | let checkedCount = value.length; |
| | | this.checkAll2 = checkedCount === this.list.length; |
| | | this.isIndeterminate2 = checkedCount > 0 && checkedCount < this.list.length; |
| | | this.isIndeterminate2 = |
| | | checkedCount > 0 && checkedCount < this.list.length; |
| | | }, |
| | | resultListZBL(value){ |
| | | this.queryParams.indexName=value.join(','); |
| | | this.queryParams.indexName = value.join(","); |
| | | getEnergyConsumption(this.queryParams).then(response => { |
| | | this.arraylist3=response.data.resultListZBL;//ææ é |
| | | //è½èæ¶è´¹ç»æ å¯¹æ¯ |
| | |
| | | } |
| | | this.lineChartData2.xAxis=xAxis; |
| | | this.lineChartData2.newVisitis=resultZBL; |
| | | this.lineChartData2.actualData=['æ¬æ','åæ']; |
| | | this.lineChartData2.actualData = ["æ¬æ", "åæ"]; |
| | | this.$refs.BarChart.initChart(this.lineChartData2); |
| | | }); |
| | | }, |
| | | resultListXFCB(value){ |
| | | this.queryParams.indexName=value.join(','); |
| | | this.queryParams.indexName = value.join(","); |
| | | //è½æºæ¶è´¹ææ¬æ
åµ |
| | | getEnergyConsumption(this.queryParams).then(response => { |
| | | this.arraylist5=response.data.resultListXFCB;//ææ é |
| | |
| | | } |
| | | this.lineChartData3.xAxis=xAxisXFCB; |
| | | this.lineChartData3.newVisitis=resultXFCB; |
| | | this.lineChartData3.actualData=['æ¬æ','åæ','é¢ç®']; |
| | | this.lineChartData3.actualData = ["æ¬æ", "åæ", "é¢ç®"]; |
| | | this.$refs.BarCharts.initChart(this.lineChartData3); |
| | | }); |
| | | }, |
| | |
| | | let date = { |
| | | year: nowDate.getFullYear(), |
| | | month: nowDate.getMonth() + 1, |
| | | frontMonth: nowDate.getMonth(), |
| | | } |
| | | if(data=='YEAR'){ |
| | | this.dateTypes= 'year', |
| | | this.valueFormat='yyyy' |
| | | }else if(data=='MONTH'){ |
| | | frontMonth: nowDate.getMonth() |
| | | }; |
| | | if (data == "YEAR") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (data == "MONTH") { |
| | | //this.dateTypes='monthrange' |
| | | this.dateTypes= 'month', |
| | | this.valueFormat='yyyy-MM' |
| | | (this.dateTypes = "month"), (this.valueFormat = "yyyy-MM"); |
| | | } |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºææè½èææ è¶å¿åææ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºææè½èææ è¶å¿åææ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | //return exportEnergyindex(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | numFilter(value) {// æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = '' ; |
| | | if (!isNaN(value) && value !== '') { |
| | | realVal = parseFloat(value).toFixed(this.skinName) |
| | | numFilter(value) { |
| | | // æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ""; |
| | | if (!isNaN(value) && value !== "") { |
| | | realVal = parseFloat(value).toFixed(this.skinName); |
| | | } else { |
| | | realVal = '--' |
| | | realVal = "--"; |
| | | } |
| | | return realVal |
| | | }, |
| | | return realVal; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .dashboard-editor-container { |
| | | padding: 32px; |
| | | background-color: rgb(240, 242, 245); |
| | | // background-color: rgb(240, 242, 245); |
| | | position: relative; |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | // background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | è½èæ¶è´¹ææ¬åæ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" :showOpt="false" :modelCode="modelCode"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½èæ¶è´¹ææ¬åæ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :showOpt="false" |
| | | :modelCode="modelCode" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <div> |
| | | <consumption ref="consumption" style="padding:10px"></consumption> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import consumption from "./consumption"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | export default { |
| | | components: { ModelNode,consumption}, |
| | | mixins: [mixins], |
| | | components: { ModelNode, consumption, ShrinkCol }, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.consumption.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | //required: true |
| | | } |
| | | }, |
| | |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({newVisitis,datas,title } = {}) { |
| | | let scale = 1; |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: 'è½æºæ¶è´¹ææ¬åæ', |
| | | x:'left', |
| | | y: 'top', |
| | | text: "è½æºæ¶è´¹ææ¬åæ", |
| | | x: "left", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333", |
| | | }, |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item', |
| | | trigger: "item", |
| | | formatter: datas |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | // orient 设置å¸å±æ¹å¼ï¼é»è®¤æ°´å¹³å¸å±ï¼å¯éå¼ï¼'horizontal'ï¼æ°´å¹³ï¼ ¦ 'vertical'ï¼åç´ï¼ |
| | | orient: 'vertical', |
| | | orient: "vertical", |
| | | // x è®¾ç½®æ°´å¹³å®æ¾ä½ç½®ï¼é»è®¤å
¨å¾å±
ä¸ï¼å¯éå¼ï¼'center' ¦ 'left' ¦ 'right' ¦ {number}ï¼xåæ ï¼åä½pxï¼ |
| | | x: 'left', |
| | | x: "left", |
| | | // y 设置åç´å®æ¾ä½ç½®ï¼é»è®¤å
¨å¾é¡¶ç«¯ï¼å¯éå¼ï¼'top' ¦ 'bottom' ¦ 'center' ¦ {number}ï¼yåæ ï¼åä½pxï¼ |
| | | y: '10%', |
| | | y: "10%", |
| | | //left: 10, |
| | | itemWidth: 24, // 设置å¾ä¾å¾å½¢ç宽 |
| | | itemHeight: 18, // 设置å¾ä¾å¾å½¢çé« |
| | | textStyle: { |
| | | color: '#666' // å¾ä¾æåé¢è² |
| | | color: "#fff" // å¾ä¾æåé¢è² |
| | | }, |
| | | // itemGap设置å个itemä¹é´çé´éï¼åä½pxï¼é»è®¤ä¸º10ï¼æ¨ªåå¸å±æ¶ä¸ºæ°´å¹³é´éï¼çºµåå¸å±æ¶ä¸ºçºµåé´é |
| | | // itemGap: 30, |
| | | backgroundColor: '#eee', // 设置æ´ä¸ªå¾ä¾åºåèæ¯é¢è² |
| | | backgroundColor: "#eee", // 设置æ´ä¸ªå¾ä¾åºåèæ¯é¢è² |
| | | data: datas, |
| | | formatter:function(item){ |
| | | let target; |
| | |
| | | for(let i=0;i<newVisitis.length;i++){ |
| | | if(datas[i].name===item){ |
| | | target=datas[i].value; |
| | | unitId=datas[i].unitId |
| | | unitId = datas[i].unitId; |
| | | } |
| | | } |
| | | let arr=[item+ +target+ unitId]/*["{a|"+target+"}","{b|"+item+"}"]*/ |
| | | return arr/*.join("\n")*/ |
| | | let arr = [ |
| | | item + +target + unitId |
| | | ]; /*["{a|"+target+"}","{b|"+item+"}"]*/ |
| | | return arr; /*.join("\n")*/ |
| | | } |
| | | }, |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | //name: 'ç¨æ°´', |
| | | type: 'pie', |
| | | type: "pie", |
| | | avoidLabelOverlap: false, |
| | | radius: ['40%', '60%'], // 设置ç¯å½¢é¥¼ç¶å¾ï¼ 第ä¸ä¸ªç¾åæ°è®¾ç½®å
å大å°ï¼ç¬¬äºä¸ªç¾åæ°è®¾ç½®å¤åå¤§å° |
| | | center: ['65%', '50%'], // 设置饼ç¶å¾ä½ç½®ï¼ç¬¬ä¸ä¸ªç¾åæ°è°æ°´å¹³ä½ç½®ï¼ç¬¬äºä¸ªç¾åæ°è°åç´ä½ç½® |
| | | radius: ["40%", "60%"], // 设置ç¯å½¢é¥¼ç¶å¾ï¼ 第ä¸ä¸ªç¾åæ°è®¾ç½®å
å大å°ï¼ç¬¬äºä¸ªç¾åæ°è®¾ç½®å¤åå¤§å° |
| | | center: ["65%", "50%"], // 设置饼ç¶å¾ä½ç½®ï¼ç¬¬ä¸ä¸ªç¾åæ°è°æ°´å¹³ä½ç½®ï¼ç¬¬äºä¸ªç¾åæ°è°åç´ä½ç½® |
| | | data: newVisitis,//[{value:335, name:'ç¨æ°´' },{value:310, name:'ç¨çµ'},{value:234, name:'ç¨ç
¤'}],/*selected: true*/ |
| | | // itemStyle 设置饼ç¶å¾æå½¢åºåæ ·å¼ |
| | | itemStyle: { |
| | |
| | | emphasis: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(30, 144, 255ï¼0.5)' |
| | | shadowColor: "rgba(30, 144, 255ï¼0.5)" |
| | | } |
| | | }, |
| | | // 设置å¼åç飿å线 |
| | |
| | | label: { |
| | | normal: { |
| | | show: true, |
| | | position: 'center', |
| | | formatter: ['ç´¯è®¡ææ¬',title].join('\n'), |
| | | position: "center", |
| | | formatter: ["ç´¯è®¡ææ¬", title].join("\n") |
| | | }, |
| | | emphasis: { |
| | | show: true, |
| | | }, |
| | | }, |
| | | show: true |
| | | } |
| | | } |
| | | /*label: { |
| | | normal: { |
| | | position: 'inner', // 设置æ ç¾ä½ç½®ï¼é»è®¤å¨é¥¼ç¶å¾å¤ å¯éå¼ï¼'outer' ¦ 'innerï¼é¥¼ç¶å¾ä¸ï¼' |
| | |
| | | } |
| | | }*/ |
| | | } |
| | | ], |
| | | }) |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="dashboard-editor-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="æ¥çææ "> |
| | | <el-select v-model="queryParams.procedure" placeholder="è¯·éæ©ææ " @change="currentSel"> |
| | | <el-option style="width: 150px" |
| | | <el-select |
| | | v-model="queryParams.procedure" |
| | | placeholder="è¯·éæ©ææ " |
| | | @change="currentSel" |
| | | > |
| | | <el-option |
| | | style="width: 150px" |
| | | v-for="dict in list" |
| | | :key="dict.indexId" |
| | | :label="dict.name" |
| | |
| | | </el-form-item> |
| | | <el-form-item label="æ¥æ" label-width="40px"> |
| | | <el-radio-group v-model="queryParams.timeType"> |
| | | <el-radio style="margin-right: 10px" v-for="dict in dateTypeOptions" :key="dict.dictValue" :label="dict.dictValue" @change="handleTime(dict.dictValue)">{{dict.dictLabel}}</el-radio> |
| | | <el-radio |
| | | style="margin-right: 10px" |
| | | v-for="dict in dateTypeOptions" |
| | | :key="dict.dictValue" |
| | | :label="dict.dictValue" |
| | | @change="handleTime(dict.dictValue)" |
| | | >{{ dict.dictLabel }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | <el-date-picker |
| | | v-model="queryParams.beginTime" |
| | | :type="dateTypes" |
| | | style="width: 150px" |
| | | :value-format="valueFormat" |
| | | placeholder="å¼å§æ¥æ"> |
| | | placeholder="å¼å§æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | å° |
| | | <el-date-picker |
| | |
| | | :type="dateTypes" |
| | | style="width: 150px" |
| | | :value-format="valueFormat" |
| | | placeholder="ç»ææ¥æ"> |
| | | placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | <!--<el-date-picker |
| | | v-model="dateRange" |
| | |
| | | ></el-date-picker>--> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-row :gutter="32"> |
| | |
| | | <el-row :gutter="32"> |
| | | <el-col :xs="24" :sm="24" :lg="24" > |
| | | <div class="chart-wrapper" > |
| | | <h4 style="float: left; text-align:center;padding: 0;margin: 0;width: 90%;">{{title}}1</h4> |
| | | <el-button type="warning" icon="el-icon-download" size="mini" style="float: right" @click="handleExport" >导åº</el-button><!--v-hasPermi="['system:post:export']"--> |
| | | <h4 |
| | | style="float: left; text-align:center;padding: 0;margin: 0;width: 90%;" |
| | | > |
| | | {{ title }}1 |
| | | </h4> |
| | | <el-button |
| | | type="warning" |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | style="float: right" |
| | | @click="handleExport" |
| | | >导åº</el-button |
| | | ><!--v-hasPermi="['system:post:export']"--> |
| | | <el-table v-loading="loading" :data="arraylist"> |
| | | <el-table-column prop="dataTime" label="æ¥æ" align="center" width="150" show-overflow-tooltip> |
| | | <el-table-column |
| | | prop="dataTime" |
| | | label="æ¥æ" |
| | | align="center" |
| | | width="150" |
| | | show-overflow-tooltip |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ changeTime(parseTime(scope.row.dataTime)) }}</span> |
| | | </template> |
| | |
| | | <span>{{numFilter(scope.row.yoy)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="queryParams.timeType ==='MONTH'" prop="qoq" label="ç¯æ¯" align="center"> |
| | | <el-table-column |
| | | v-if="queryParams.timeType === 'MONTH'" |
| | | prop="qoq" |
| | | label="ç¯æ¯" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{numFilter(scope.row.qoq)}}</span> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import LineChart from './lineChart' |
| | | import {getSettingIndex,getSettingEnergy,exportEnergyindex,getEnergyStatisticsTrend} from "@/api/energyStatistics/statistics"; |
| | | import LineChart from "./lineChart"; |
| | | import { |
| | | getSettingIndex, |
| | | getSettingEnergy, |
| | | exportEnergyindex, |
| | | getEnergyStatisticsTrend |
| | | } from "@/api/energyStatistics/statistics"; |
| | | |
| | | export default { |
| | | name: 'EnergyIndex', |
| | | name: 'Index', |
| | | name: "EnergyIndex", |
| | | name: "Index", |
| | | components: {LineChart}, |
| | | props: ["modelCode"], |
| | | data() { |
| | |
| | | dataTime: undefined, |
| | | timeType:undefined, |
| | | indexId: undefined, |
| | | procedure: undefined, |
| | | procedure: undefined |
| | | }, |
| | | list:[], |
| | | arraylist:[], |
| | | lineChartData:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | //dateTypes: 'monthrange',//æ¶é´èå´ |
| | | dateTypes: 'month', |
| | | valueFormat:'yyyy-MM', |
| | | dateTypes: "month", |
| | | valueFormat: "yyyy-MM", |
| | | title:"", |
| | | skinName:"", |
| | | } |
| | | skinName: "" |
| | | }; |
| | | }, |
| | | watch: { |
| | | modelCode: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.getList(val) |
| | | this.getList(val); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | //this.getList(); |
| | | this.getDicts("timeType").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | this.getConfigKey("energyStatistics.energyStatisticsTrend").then(response => { |
| | | this.getConfigKey("energyStatistics.energyStatisticsTrend").then( |
| | | response => { |
| | | this.skinName=response.msg; |
| | | }); |
| | | let endTtime=(new Date().getFullYear()) +'-' +((new Date().getMonth() + 1)>9?(new Date().getMonth() + 1):"0"+(new Date().getMonth() + 1)); |
| | | let starTtime= (new Date().getFullYear()-1)+'-' +((new Date().getMonth() + 1)>9?(new Date().getMonth() + 1):"0"+(new Date().getMonth() + 1)); |
| | | } |
| | | ); |
| | | let endTtime = |
| | | new Date().getFullYear() + |
| | | "-" + |
| | | (new Date().getMonth() + 1 > 9 |
| | | ? new Date().getMonth() + 1 |
| | | : "0" + (new Date().getMonth() + 1)); |
| | | let starTtime = |
| | | new Date().getFullYear() - |
| | | 1 + |
| | | "-" + |
| | | (new Date().getMonth() + 1 > 9 |
| | | ? new Date().getMonth() + 1 |
| | | : "0" + (new Date().getMonth() + 1)); |
| | | this.queryParams.beginTime=starTtime; |
| | | this.queryParams.endTime=endTtime; |
| | | }, |
| | |
| | | this.loading = true; |
| | | getSettingIndex(this.queryParams.id).then(response => { |
| | | let result=response.data; |
| | | this.list = result.filter(f => f.indexType === 'STATISTIC'); |
| | | this.list = result.filter(f => f.indexType === "STATISTIC"); |
| | | this.loading = false; |
| | | if (this.list.length > 0) { |
| | | this.queryParams.procedure = this.list[0].indexId; |
| | |
| | | this.queryParams.procedure = ""; |
| | | this.title=""; |
| | | } |
| | | if(this.queryParams.timeType=='YEAR'){ |
| | | this.queryParams.beginTime=this.queryParams.beginTime.substring(0, 4)+'-01-01'; |
| | | this.queryParams.endTime=this.queryParams.endTime.substring(0, 4)+'-01-01'; |
| | | }else if(this.queryParams.timeType=='MONTH'){ |
| | | this.queryParams.beginTime=this.queryParams.beginTime.substring(0, 7)+'-01'; |
| | | this.queryParams.endTime=this.queryParams.endTime.substring(0, 7)+'-01'; |
| | | if (this.queryParams.timeType == "YEAR") { |
| | | this.queryParams.beginTime = |
| | | this.queryParams.beginTime.substring(0, 4) + "-01-01"; |
| | | this.queryParams.endTime = |
| | | this.queryParams.endTime.substring(0, 4) + "-01-01"; |
| | | } else if (this.queryParams.timeType == "MONTH") { |
| | | this.queryParams.beginTime = |
| | | this.queryParams.beginTime.substring(0, 7) + "-01"; |
| | | this.queryParams.endTime = |
| | | this.queryParams.endTime.substring(0, 7) + "-01"; |
| | | } |
| | | this.getList(); |
| | | }); |
| | |
| | | currentValue.push(this.arraylist[i].currentValue); |
| | | lastYearValue.push(this.arraylist[i].lastYearValue); |
| | | minValue.push(this.arraylist[i].minValue); |
| | | if(this.queryParams.timeType=='MONTH') { |
| | | xAxis.push(this.arraylist[i].dataTime.substring(0, 7)) |
| | | }else if(this.queryParams.timeType=='YEAR'){ |
| | | xAxis.push(this.arraylist[i].dataTime.substring(0, 4)) |
| | | if (this.queryParams.timeType == "MONTH") { |
| | | xAxis.push(this.arraylist[i].dataTime.substring(0, 7)); |
| | | } else if (this.queryParams.timeType == "YEAR") { |
| | | xAxis.push(this.arraylist[i].dataTime.substring(0, 4)); |
| | | } |
| | | } |
| | | source.push(currentValue); |
| | | source.push(lastYearValue); |
| | | let yAxis=""; |
| | | if(this.arraylist.length>0){ |
| | | this.title=this.arraylist[0].indexName+"("+this.arraylist[0].unitId+")"; |
| | | yAxis=this.arraylist[0].unitId |
| | | this.title = |
| | | this.arraylist[0].indexName + "(" + this.arraylist[0].unitId + ")"; |
| | | yAxis = this.arraylist[0].unitId; |
| | | } |
| | | this.lineChartData.newVisitis=source; |
| | | this.lineChartData.actualData=['æ¬æå¼','åæå¼']; |
| | | this.lineChartData.actualData = ["æ¬æå¼", "åæå¼"]; |
| | | this.lineChartData.actual=minValue; |
| | | this.lineChartData.xAxis=xAxis; |
| | | this.lineChartData.title=this.title; |
| | |
| | | this.$refs.lineChart.initChart(this.lineChartData); |
| | | }); |
| | | }, |
| | | numFilter(value) {// æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = '' ; |
| | | if (!isNaN(value) && value !== '') { |
| | | realVal = parseFloat(value).toFixed(this.skinName) |
| | | numFilter(value) { |
| | | // æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ""; |
| | | if (!isNaN(value) && value !== "") { |
| | | realVal = parseFloat(value).toFixed(this.skinName); |
| | | } else { |
| | | realVal = '--' |
| | | realVal = "--"; |
| | | } |
| | | return realVal |
| | | return realVal; |
| | | }, |
| | | currentSel(selVal) {//è·å䏿æ¡çtext |
| | | currentSel(selVal) { |
| | | //è·å䏿æ¡çtext |
| | | let obj = {}; |
| | | obj = this.list.find((item) => { |
| | | return item.indexId === selVal |
| | | obj = this.list.find(item => { |
| | | return item.indexId === selVal; |
| | | }); |
| | | this.title=obj.name; |
| | | this.queryParams.procedure=obj.indexId; |
| | | }, |
| | | handleTime(date){ |
| | | if(date=='YEAR'){ |
| | | this.dateTypes= 'year', |
| | | this.valueFormat='yyyy' |
| | | }else if(date=='MONTH'){ |
| | | if (date == "YEAR") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (date == "MONTH") { |
| | | //this.dateTypes='monthrange' |
| | | this.dateTypes= 'month', |
| | | this.valueFormat='yyyy-MM' |
| | | (this.dateTypes = "month"), (this.valueFormat = "yyyy-MM"); |
| | | } |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºææè½èææ è¶å¿åææ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºææè½èææ è¶å¿åææ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | return exportEnergyindex(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | changeTime(time) { |
| | | if (time !== null && time !== undefined && time !== "") { |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .dashboard-editor-container { |
| | | padding: 32px; |
| | | background-color: rgb(240, 242, 245); |
| | | position: relative; |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | | } |
| | | .chart-title{ |
| | | display: block; |
| | | background: #f2f6fc; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | padding: 0 10px; |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | è½èææ è¶å¿åæ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" :showOpt="false" :modelCode="modelCode"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="è½èææ è¶å¿åæ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :showOpt="false" |
| | | :modelCode="modelCode" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <div> |
| | | <EnergyIndex ref="EnergyIndex" style="padding:10px"></EnergyIndex> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import EnergyIndex from "./EnergyIndex"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: { ModelNode,EnergyIndex}, |
| | | mixins: [mixins], |
| | | components: { ModelNode, EnergyIndex, ShrinkCol }, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.EnergyIndex.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from './mixins/resize' |
| | | const animationDuration = 6000 |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "./mixins/resize"; |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | } |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({newVisitis,xAxis,actualData,actual,title,yAxis} = {}) { |
| | | var series=[]; |
| | |
| | | for(var i=0;i<newVisitis.length;i++){ |
| | | series.push({ |
| | | name: actualData[i], |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: newVisitis[i], |
| | | smooth: true,//线æ¡å¹³æ» |
| | | //stack: 'vistors', |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | } |
| | | ); |
| | | animationEasing: "quadraticOut" |
| | | }); |
| | | } |
| | | series.push({ |
| | | name:'å岿ä¼' , |
| | | type: 'line', |
| | | name: "å岿ä¼", |
| | | type: "line", |
| | | data: actual, |
| | | smooth: true,//线æ¡å¹³æ» |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | }); |
| | | } |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | x:'center', |
| | | y: 'top', |
| | | x: "center", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data:['æ¬æå¼', 'åæå¼','å岿ä¼'], |
| | | left: '60%', |
| | | data: ["æ¬æå¼", "åæå¼", "å岿ä¼"], |
| | | left: "60%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: xAxis, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | }, |
| | | }], |
| | | yAxis: [{ |
| | | } |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | name: yAxis, |
| | | type: 'value', |
| | | type: "value", |
| | | nameTextStyle:{ |
| | | color:"#333", |
| | | color: "#333" |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | } |
| | | } |
| | | ], |
| | | series:series |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <style lang="scss" scoped> |
| | | .dashboard-editor-container { |
| | | padding: 32px; |
| | | background-color: rgb(240, 242, 245); |
| | | position: relative; |
| | | .chart-wrapper { |
| | | background: #fff; |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | } |
| | | } |
| | | .chart-title { |
| | | display: block; |
| | | background: #f2f6fc; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | padding: 0 10px; |
| | | color: #fff; |
| | | } |
| | | @media (max-width: 1024px) { |
| | | .chart-wrapper { |
| | |
| | | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <el-container class="split-container"> |
| | | <el-aside class="left-content" :width="isCollapse?'0px':'20%'"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix" style="height:32px"> |
| | | ç¨è½åå
è½èåæ |
| | | </div> |
| | | <ModelNode ref="modelNode" @changeNode="changeNode" :showOpt="false" :modelCode="modelCode"></ModelNode> |
| | | </el-card> |
| | | </el-aside> |
| | | <el-container> |
| | | <div style="cursor:pointer;" @click="toggleCollapse"> |
| | | <img src="@/assets/image/configureChart.png" style="width: 100%;height: 100%"> |
| | | </div> |
| | | <el-main style="padding:0"> |
| | | <div> |
| | | <el-row type="flex"> |
| | | <el-col |
| | | :style="{ width: isCollapse ? '0' : '280px', position: 'relative' }" |
| | | v-show="!isCollapse" |
| | | > |
| | | <basic-container title="ç¨è½åå
è½èåæ" :bodyStyle="bodyStyle"> |
| | | <ModelNode |
| | | ref="modelNode" |
| | | @changeNode="changeNode" |
| | | :showOpt="false" |
| | | :modelCode="modelCode" |
| | | ></ModelNode> |
| | | </basic-container> |
| | | <img |
| | | src="~@/assets/image/rectangle.png" |
| | | alt="" |
| | | class="shrink-col-block" |
| | | @click="toggleCollapse" |
| | | /> |
| | | </el-col> |
| | | <ShrinkCol @toggleCollapse="toggleCollapse" v-show="isCollapse" /> |
| | | <el-col |
| | | :style="{ |
| | | width: isCollapse ? 'calc(100% - 48px)' : 'calc(100% - 280px)', |
| | | paddingLeft: isCollapse ? 0 : '14px' |
| | | }" |
| | | > |
| | | <div> |
| | | <EnergyIndex ref="EnergyIndex" style="padding:10px"></EnergyIndex> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import EnergyIndex from "./EnergyIndex"; |
| | | import ModelNode from "../../basicsetting/modelNode/modelNode"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import ShrinkCol from "@/components/shrink/index.vue"; |
| | | |
| | | export default { |
| | | components: { ModelNode,EnergyIndex}, |
| | | mixins: [mixins], |
| | | components: { ModelNode, EnergyIndex, ShrinkCol }, |
| | | created() { |
| | | this.modelCode=this.$route.query.modelCode; |
| | | }, |
| | |
| | | return { |
| | | modelCode:undefined, |
| | | isCollapse: false, |
| | | } |
| | | bodyStyleRight: {} |
| | | }; |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 130 + "px" |
| | | }; |
| | | }, |
| | | changeNode: function (node) { |
| | | this.$refs.EnergyIndex.modelNodeChange(node); |
| | | }, |
| | | manageModel: function () { |
| | | this.$router.push('/model'); |
| | | this.$router.push("/model"); |
| | | }, |
| | | changeModel: function (item) { |
| | | this.$refs.modelNode.getList(item); |
| | | }, |
| | | // ç¹å»æé®ï¼åæ¢æå ä¸å±å¼ |
| | | toggleCollapse () { |
| | | this.isCollapse = !this.isCollapse |
| | | this.isCollapse = !this.isCollapse; |
| | | } |
| | | } |
| | | }; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../mixins/resize' |
| | | const animationDuration = 6000 |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../mixins/resize"; |
| | | import { color } from "echarts/lib/export"; |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | } |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({currentValue,xAxis,lastYearValue,title} = {}) { |
| | | var series=[]; |
| | |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | x:'center', |
| | | y: 'top', |
| | | x: "center", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data:['æ¶è´¹é', '产é'], |
| | | left: '60%', |
| | | data: ["æ¶è´¹é", "产é"], |
| | | left: "60%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: xAxis, |
| | | axisPointer: { |
| | | type: 'shadow' |
| | | type: "shadow" |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | name: 'æ¶è´¹é', |
| | | type: 'value', |
| | | nameTextStyle:{ |
| | | color:"#333", |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | },{ |
| | | name: '产é', |
| | | type: 'value', |
| | | nameTextStyle:{ |
| | | color:"#333", |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | } |
| | | ], |
| | | series:[{ |
| | | yAxis: [ |
| | | { |
| | | name: "æ¶è´¹é", |
| | | type: 'bar', |
| | | type: "value", |
| | | nameTextStyle: { |
| | | color: "#fff" |
| | | }, |
| | | axisLabel: { |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | | name: "产é", |
| | | type: "value", |
| | | nameTextStyle: { |
| | | color: "#fff" |
| | | }, |
| | | axisLabel: { |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: "æ¶è´¹é", |
| | | type: "bar", |
| | | data: currentValue, |
| | | smooth: true,//线æ¡å¹³æ» |
| | | //stack: 'vistors', |
| | | barMaxWidth:30,//æå¤§å®½åº¦ |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | },{ |
| | | name: '产é', |
| | | type: 'line', |
| | | animationEasing: "quadraticOut" |
| | | }, |
| | | { |
| | | name: "产é", |
| | | type: "line", |
| | | yAxisIndex: 1, |
| | | data: lastYearValue, |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | }] |
| | | }) |
| | | animationEasing: "quadraticOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | import echarts from "echarts"; |
| | | import resize from "../../energyStatistics/mixins/resize"; |
| | | require('echarts/theme/macarons') // echarts theme |
| | | const animationDuration = 6000 |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | const animationDuration = 6000; |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | chartData: { |
| | | type:Object, |
| | | type: Object |
| | | } |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | seriesData: [], |
| | | } |
| | | seriesData: [] |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({newVisitis,xAxis,actualData,title,yAxis} = {}) { |
| | | var series=[]; |
| | |
| | | for(var i=0;i<newVisitis.length;i++){ |
| | | series.push({ |
| | | name: actualData[i], |
| | | type: 'bar', |
| | | type: "bar", |
| | | data: newVisitis[i], |
| | | smooth: true,//线æ¡å¹³æ» |
| | | //stack: 'vistors', |
| | | animationDuration: 2800, |
| | | animationEasing: 'quadraticOut' |
| | | } |
| | | ); |
| | | animationEasing: "quadraticOut" |
| | | }); |
| | | } |
| | | } |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | x:'center', |
| | | y: 'top', |
| | | x: "center", |
| | | y: "top", |
| | | textStyle: { |
| | | color: "#333" |
| | | }, |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' line为ç´çº¿ shadow为æ±ç¶é´å½± |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' line为ç´çº¿ shadow为æ±ç¶é´å½± |
| | | } |
| | | }, |
| | | grid: { |
| | | top: 40, |
| | | left: '2%', |
| | | right: '2%', |
| | | bottom: '3%', |
| | | left: "2%", |
| | | right: "2%", |
| | | bottom: "3%", |
| | | containLabel: true |
| | | }, |
| | | legend: { |
| | | data:['设å¤1','设å¤2'], |
| | | left: '60%', |
| | | data: ["设å¤1", "设å¤2"], |
| | | left: "60%", |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: xAxis, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | }, |
| | | }], |
| | | yAxis: [{ |
| | | } |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | name: yAxis, |
| | | type: 'value', |
| | | type: "value", |
| | | nameTextStyle:{ |
| | | color:"#333", |
| | | color: "#333" |
| | | }, |
| | | axisLabel: { |
| | | formatter: '{value}' |
| | | formatter: "{value}" |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | } |
| | | } |
| | | ], |
| | | series:series |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons'); // echarts theme |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | // import resize from './mixins/resize' |
| | | |
| | | export default { |
| | |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '350px' |
| | | default: "350px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | chartData: { |
| | | type: Object, |
| | | type: Object |
| | | // required: true |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null, |
| | | alarmLimitName:undefined |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose(); |
| | | this.chart = null |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons'); |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ datas,legendArr,timeList,legendNameArr } = {}) { |
| | |
| | | for(let i = 0;i<datas.length;i++){ |
| | | //yè½´ |
| | | let yAxisItem = { |
| | | type: 'value', |
| | | type: "value", |
| | | // name:legendNameArr[i], |
| | | minInterval : 1, |
| | | boundaryGap : [ 0, 0.2 ], |
| | | boundaryGap: [0, 0.2] |
| | | }; |
| | | if(i>1){ |
| | | let positionKey = "position"; |
| | |
| | | } |
| | | let seriesItem = { |
| | | name:legendNameArr[i], |
| | | type: 'line', |
| | | type: "line", |
| | | data: datas[i], |
| | | yAxisIndex:yAxisIndexArr.indexOf(yAxisNumArr[i]), |
| | | yAxisIndex: yAxisIndexArr.indexOf(yAxisNumArr[i]) |
| | | }; |
| | | seriesArr.push(seriesItem); |
| | | }else { |
| | | let seriesItem = { |
| | | name:legendNameArr[i], |
| | | type: 'line', |
| | | data: datas[i], |
| | | type: "line", |
| | | data: datas[i] |
| | | }; |
| | | if(i>0){ |
| | | let key = "yAxisIndex"; |
| | |
| | | } |
| | | }, |
| | | grid: { |
| | | left: '2%', |
| | | right: '18%', |
| | | left: "2%", |
| | | right: "18%", |
| | | bottom: 20, |
| | | top: 30, |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | | yAxis: yAxisDataArr, |
| | | legend: { |
| | | data: legendNameArr, |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: seriesArr |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | closeLineChar(){ |
| | | this.chart.clear(); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons'); // echarts theme |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | // import resize from './mixins/resize' |
| | | |
| | | export default { |
| | |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '130px' |
| | | default: "130px" |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose(); |
| | | this.chart = null |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons'); |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | |
| | | this.chart.setOption({ |
| | | tooltip: { |
| | | trigger: 'item', |
| | | formatter: '{a} <br/>{b} : {c} ({d}%)' |
| | | trigger: "item", |
| | | formatter: "{a} <br/>{b} : {c} ({d}%)" |
| | | }, |
| | | // legend: { |
| | | // left: 'center', |
| | |
| | | // data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts'] |
| | | // }, |
| | | legend: { |
| | | type: 'scroll', |
| | | orient: 'vertical', |
| | | type: "scroll", |
| | | orient: "vertical", |
| | | right: 10, |
| | | top: 20, |
| | | bottom: 20, |
| | | data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts'], |
| | | data: ["Industries", "Technology", "Forex", "Gold", "Forecasts"], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'WEEKLY WRITE ARTICLES', |
| | | type: 'pie', |
| | | radius: '55%', |
| | | center: ['40%', '50%'], |
| | | name: "WEEKLY WRITE ARTICLES", |
| | | type: "pie", |
| | | radius: "55%", |
| | | center: ["40%", "50%"], |
| | | data: [ |
| | | { value: 320, name: 'Industries' }, |
| | | { value: 240, name: 'Technology' }, |
| | | { value: 149, name: 'Forex' }, |
| | | { value: 100, name: 'Gold' }, |
| | | { value: 59, name: 'Forecasts' } |
| | | { value: 320, name: "Industries" }, |
| | | { value: 240, name: "Technology" }, |
| | | { value: 149, name: "Forex" }, |
| | | { value: 100, name: "Gold" }, |
| | | { value: 59, name: "Forecasts" } |
| | | ], |
| | | // animationEasing: 'cubicInOut', |
| | | animationDuration: 2600 |
| | | } |
| | | ] |
| | | }) |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <div class="app-container" style="padding:0"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{currentNode?currentNode.label+'--èç¹é
ç½®':'èç¹é
ç½®'</span> |
| | | <span>{{ |
| | | currentNode ? currentNode.label + "--èç¹é
ç½®" : "èç¹é
ç½®" |
| | | }}</span> |
| | | </div> |
| | | |
| | | <el-tabs> |
| | |
| | | <span slot="label"><i class="el-icon-setting"></i>宿¶è½è</span> |
| | | <!--è¡¨æ ¼--> |
| | | <el-form :model="model" ref="form"> |
| | | <el-table v-loading="loading" :data="model.tableOptions" border @selection-change="handleSelectionChange" |
| | | :default-sort = "{prop: 'date', order: 'descending'}"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="model.tableOptions" |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | :default-sort="{ prop: 'date', order: 'descending' }" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center"/> |
| | | <el-table-column label="åºå·" align="center" prop="index"/> |
| | | <el-table-column label="åç§°" align="center" prop="name"/> |
| | | <el-table-column label="æ°æ®" align="center" prop="data" class-name="small-padding fixed-width"/> |
| | | <el-table-column |
| | | label="æ°æ®" |
| | | align="center" |
| | | prop="data" |
| | | class-name="small-padding fixed-width" |
| | | /> |
| | | <el-table-column label="åä½" align="center" prop="unit"/> |
| | | </el-table> |
| | | </el-form> |
| | | </el-tab-pane> |
| | | |
| | | </el-tabs> |
| | | </el-card> |
| | | </div> |
| | |
| | | setDevice, |
| | | setEnergy, |
| | | setProduct |
| | | } from '@/api/basicsetting/modelNode' |
| | | } from "@/api/basicsetting/modelNode"; |
| | | |
| | | export default { |
| | | name: "modelMonitorSetting", |
| | | data() { |
| | | return { |
| | | currentNode: '', |
| | | currentNode: "", |
| | | deviceDialog: false, |
| | | energyDialog: false, |
| | | productDialog: false, |
| | |
| | | data:"30000", |
| | | unit:"WH" |
| | | } |
| | | ], |
| | | ] |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | // setInterval(alert("åååï¼ï¼"),5000); |
| | |
| | | modelNodeChange(modelNode) { |
| | | this.settingDeviceList = []; |
| | | this.settingIndexList = []; |
| | | this.disabledSetting = modelNode === undefined || modelNode === '' || modelNode === null; |
| | | this.disabledSetting = |
| | | modelNode === undefined || modelNode === "" || modelNode === null; |
| | | if (modelNode) { |
| | | this.currentNode = modelNode; |
| | | this.deviceLoading = true; |
| | | getSettingDevice(modelNode.id).then((response) => { |
| | | getSettingDevice(modelNode.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.settingDeviceList = response.data; |
| | | } else { |
| | |
| | | this.deviceLoading = false; |
| | | }); |
| | | this.energyLoading = true; |
| | | getSettingEnergy(modelNode.id).then((response) => { |
| | | getSettingEnergy(modelNode.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.settingEnergyList = response.data; |
| | | } else { |
| | |
| | | this.energyLoading = false; |
| | | }); |
| | | this.productLoading = true; |
| | | getSettingProduct(modelNode.id).then((response) => { |
| | | getSettingProduct(modelNode.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.settingProductList = response.data; |
| | | } else { |
| | |
| | | this.productLoading = false; |
| | | }); |
| | | this.indexLoading = true; |
| | | getSettingIndex(modelNode.id).then((response) => { |
| | | getSettingIndex(modelNode.id).then(response => { |
| | | if (response.code === 200) { |
| | | this.settingIndexList = response.data; |
| | | } else { |
| | |
| | | }, |
| | | showCollectIndexDialog() { |
| | | this.$nextTick(() => { |
| | | this.$refs.collectIndexSetting.init(this.currentNode, this.settingIndexList); |
| | | }) |
| | | this.$refs.collectIndexSetting.init( |
| | | this.currentNode, |
| | | this.settingIndexList |
| | | ); |
| | | }); |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.indexId); |
| | | this.names = selection.map(item => item.name); |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length |
| | | this.multiple = !selection.length; |
| | | }, |
| | | getList() { |
| | | // console.log(this.myModelNode) |
| | |
| | | // } else { |
| | | this.model.tableOptions = []; |
| | | // } |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | <template> |
| | | <div class="app-container" style="padding: 0"> |
| | | <div style="margin-bottom:10px;"> |
| | | <span>{{currentNode?currentNode.label:''}}æµç¹åæ°å表</span> |
| | | <span>{{ currentNode ? currentNode.label : "" }}æµç¹åæ°å表</span> |
| | | </div> |
| | | <el-table |
| | | :data="parameterTableData" |
| | | border |
| | | style="width: 100%" |
| | | @cell-click="openDialog"> |
| | | <el-table-column |
| | | prop="code" |
| | | label="ææ ç¼ç " |
| | | width="180" |
| | | align="center"> |
| | | @cell-click="openDialog" |
| | | > |
| | | <el-table-column prop="code" label="ææ ç¼ç " width="180" align="center"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="indexName" |
| | | label="ææ åç§°" |
| | | align="center"> |
| | | <el-table-column prop="indexName" label="ææ åç§°" align="center"> |
| | | <template slot-scope="scope"> |
| | | <div style="color:blue;text-decoration:underline;cursor:pointer">{{scope.row.indexName}}</div> |
| | | <div style="color:blue;text-decoration:underline;cursor:pointer"> |
| | | {{ scope.row.indexName }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="indexUnit" |
| | | label="ææ åä½" |
| | | align="center" |
| | | :formatter="unitFormat"> |
| | | :formatter="unitFormat" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="value" |
| | | label="ææ å¼(宿¶å¼)" |
| | | align="center"> |
| | | <el-table-column prop="value" label="ææ å¼(宿¶å¼)" align="center"> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <!--æ²çº¿å¾ä¸è¡¨æ ¼--> |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" :close-on-click-modal="false" @close="closeDialog"> |
| | | <el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | | @close="closeDialog" |
| | | > |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick" > |
| | | <el-tab-pane label="宿¶æ°æ®æ²çº¿å¾" name="first"> |
| | | <live-alarm-view ref="liveAlarmView" :code="code" :activeName="activeName"></live-alarm-view> |
| | | <live-alarm-view |
| | | ref="liveAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | ></live-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å岿°æ®æ²çº¿å¾" name="second"> |
| | | <history-alarm-view ref="historyAlarmView" :code="code" :activeName="activeName"></history-alarm-view> |
| | | <history-alarm-view |
| | | ref="historyAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | ></history-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å岿°æ®æ¥è¯¢" name="third"> |
| | | <history-alarm-table ref="historyAlarmTable" :code="code" :indexName="indexName" :activeName="activeName" :indexUnit="indexUnit"></history-alarm-table> |
| | | <history-alarm-table |
| | | ref="historyAlarmTable" |
| | | :code="code" |
| | | :indexName="indexName" |
| | | :activeName="activeName" |
| | | :indexUnit="indexUnit" |
| | | ></history-alarm-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-row> |
| | |
| | | queryParams:{ |
| | | nodeId:undefined, |
| | | //ææ index |
| | | indexType:"COLLECT", |
| | | indexType: "COLLECT" |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getDicts("sys_unit").then(response => { |
| | | this.unitOptions = response.data; |
| | | }); |
| | | }, |
| | | mounted() |
| | | { |
| | | this.getConfigKey("equipmentMonitor.realTimeMonitoring.intervalTime").then(response => { |
| | | mounted() { |
| | | this.getConfigKey("equipmentMonitor.realTimeMonitoring.intervalTime").then( |
| | | response => { |
| | | this.intervalTime = response.msg; |
| | | this.timer = setInterval(this.getList, this.intervalTime); |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | | beforeDestroy() { |
| | | //页é¢éæ¯æ¶ è¦åæ¢è®¡æ¶å¨ï¼å¦åé项å¡åæ¢è®¡æ¶å¨ä¸åæ¢ï¼ä¼è¶æ¥è¶å¿«ï¼å¤ä¸ªçº¿ç¨ |
| | |
| | | }, |
| | | handleClick(tab, event){ |
| | | this.activeName = tab.name; |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |
| | |
| | | |
| | | <template> |
| | | <div class="app-container" style="padding:0"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{currentNode?currentNode.label:''}}--èç¹è®¾ç½®</span> |
| | | <span>{{ currentNode ? currentNode.label : "" }}--èç¹è®¾ç½®</span> |
| | | </div> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" class="query-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | class="query-form" |
| | | > |
| | | <el-form-item label="èµ·æ¢æ¶é´"> |
| | | <el-date-picker |
| | | v-model="dateRange" |
| | |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <!--<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button>--> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-form> |
| | | <el-table :data="JkHistoryAlarmList" v-loading="loading" border @selection-change="" @cell-click="openDialog" > |
| | | <el-table |
| | | :data="JkHistoryAlarmList" |
| | | v-loading="loading" |
| | | border |
| | | @selection-change="" |
| | | @cell-click="openDialog" |
| | | > |
| | | <el-table-column label="åºå·" type="index" align="center"/> |
| | | <el-table-column label="åä½åç§°" align="center" prop="modelName"/> |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="code"/> |
| | | <el-table-column label="ææ åç§°" align="center" prop="indexName"> |
| | | <template slot-scope="scope"> |
| | | <div style="color:blue;text-decoration:underline ;cursor:pointer">{{scope.row.indexName}}</div> |
| | | <div style="color:blue;text-decoration:underline ;cursor:pointer"> |
| | | {{ scope.row.indexName }} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ææ åä½" align="center" prop="unitId" :formatter="unitIdFormat" /> |
| | | <el-table-column |
| | | label="ææ åä½" |
| | | align="center" |
| | | prop="unitId" |
| | | :formatter="unitIdFormat" |
| | | /> |
| | | <!-- <el-table-column label="æ¥è¦çº§å«" align="center" prop="alarmLevel" :formatter="alarmLevelFormat"/> |
| | | <el-table-column label="éå¼ç±»å" align="center" prop="limitType" :formatter="limitTypeFormat"/> |
| | | <el-table-column label="éå¼" align="center" prop="limitingValue"/> |
| | |
| | | @pagination="getList" |
| | | /> |
| | | <!--å¼¹æ¡--> |
| | | <el-dialog :title="title" :visible.sync="open" width="1500px" :close-on-click-modal="false"> |
| | | <el-row style="background:#fff;margin-bottom:32px;"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1500px" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-row style="margin-bottom:32px;"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick" > |
| | | <el-tab-pane label="å岿°æ®æ²çº¿å¾" name="second"> |
| | | <history-alarm-view ref="historyAlarmView" :code="code" :activeName="activeName" :limitVal="limitVal"></history-alarm-view> |
| | | <history-alarm-view |
| | | ref="historyAlarmView" |
| | | :code="code" |
| | | :activeName="activeName" |
| | | :limitVal="limitVal" |
| | | ></history-alarm-view> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="å岿°æ®æ¥è¯¢" name="third"> |
| | | <history-alarm-table ref="historyAlarmTable" :code="code" :indexName="indexName" :activeName="activeName" :indexUnit="indexUnit" :limitVal="limitVal"></history-alarm-table> |
| | | <history-alarm-table |
| | | ref="historyAlarmTable" |
| | | :code="code" |
| | | :indexName="indexName" |
| | | :activeName="activeName" |
| | | :indexUnit="indexUnit" |
| | | :limitVal="limitVal" |
| | | ></history-alarm-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import {listHistoryAlarm,exportHistoricalAlarm , getHistoricalAlarm} from "@/api/basicsetting/historyAlarm"; |
| | | import {listLimitType} from "@/api/basicsetting/limitType" |
| | | import historyAlarmView from "../../energyAlarm/realTimeAlarm/historyAlarmView" |
| | | import historyAlarmTable from "../../energyAlarm/realTimeAlarm/historyAlarmTable" |
| | | import { |
| | | listHistoryAlarm, |
| | | exportHistoricalAlarm, |
| | | getHistoricalAlarm |
| | | } from "@/api/basicsetting/historyAlarm"; |
| | | import { listLimitType } from "@/api/basicsetting/limitType"; |
| | | import historyAlarmView from "../../energyAlarm/realTimeAlarm/historyAlarmView"; |
| | | import historyAlarmTable from "../../energyAlarm/realTimeAlarm/historyAlarmTable"; |
| | | |
| | | export default { |
| | | components: {historyAlarmView,historyAlarmTable}, |
| | | name: 'historyAlarm', |
| | | name: "historyAlarm", |
| | | |
| | | data() { |
| | | return { |
| | |
| | | /* value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],*/ |
| | | }, |
| | | code:undefined, |
| | | value:'', |
| | | value: "", |
| | | options:undefined, |
| | | // handleClick:'simple', |
| | | radio: 'B', |
| | | activeName: 'second', |
| | | radio: "B", |
| | | activeName: "second", |
| | | indexId:undefined, |
| | | indexName:undefined, |
| | | indexUnit:undefined, |
| | | currentNode: '', |
| | | currentNode: "", |
| | | limitVal:undefined, |
| | | hiddenTableHeader:false, |
| | | /* lineChartData: lineChartData.newVisitis,*/ |
| | |
| | | unitIdOptions: [], |
| | | // æ¥è¯¢åæ° |
| | | lineChartData:{ |
| | | newVisitis:null, |
| | | newVisitis: null |
| | | }, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | eierarchyFlag:'B', |
| | | indexType:'COLLECT', |
| | | eierarchyFlag: "B", |
| | | indexType: "COLLECT", |
| | | code: undefined, |
| | | indexName:undefined, |
| | | /* unitId: undefined,*/ |
| | |
| | | /* limitingValue:undefined,*/ |
| | | nodeId:undefined, |
| | | beginTime: undefined, |
| | | endTime:undefined, |
| | | |
| | | endTime: undefined |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | |
| | | listLimitType(this.queryParams).then(response => { |
| | | this.limitTypeOptions = response.rows; |
| | | }); |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | getList() { |
| | | this.loading = true; |
| | | listHistoryAlarm(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | listHistoryAlarm( |
| | | this.addDateRange(this.queryParams, this.dateRange) |
| | | ).then(response => { |
| | | this.JkHistoryAlarmList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | |
| | | this.queryParams.nodeId = modelNode.id; |
| | | this.settingDeviceList = []; |
| | | this.settingIndexList = []; |
| | | this.disabledSetting = modelNode === undefined || modelNode === '' || modelNode === null; |
| | | this.disabledSetting = |
| | | modelNode === undefined || modelNode === "" || modelNode === null; |
| | | if (modelNode) { |
| | | this.currentNode = modelNode; |
| | | this.deviceLoading = true; |
| | |
| | | let date = new Date(value); |
| | | let y = date.getFullYear(); |
| | | let MM = date.getMonth() + 1; |
| | | MM = MM < 10 ? ('0' + MM) : MM; |
| | | MM = MM < 10 ? "0" + MM : MM; |
| | | let d = date.getDate(); |
| | | d = d < 10 ? ('0' + d) : d; |
| | | d = d < 10 ? "0" + d : d; |
| | | let h = date.getHours(); |
| | | h = h < 10 ? ('0' + h) : h; |
| | | h = h < 10 ? "0" + h : h; |
| | | let m = date.getMinutes(); |
| | | m = m < 10 ? ('0' + m) : m; |
| | | m = m < 10 ? "0" + m : m; |
| | | let s = date.getSeconds(); |
| | | s = s < 10 ? ('0' + s) : s; |
| | | return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s; |
| | | s = s < 10 ? "0" + s : s; |
| | | return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s; |
| | | }, |
| | | |
| | | |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | |
| | | this.resetForm("queryForm"); |
| | | }, |
| | | |
| | | handleSelectionChange() { |
| | | }, |
| | | handleSelectionChange() {}, |
| | | openDialog(row,column,event,cell){ |
| | | if("indexName"==column.property){ |
| | | this.open = true; |
| | |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¦æ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¦æ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function() { |
| | | }) |
| | | .then(function() { |
| | | return exportHistoricalAlarm(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function() {}); |
| | | |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | //éå¶ç±»åç¿»è¯ |
| | | limitTypeFormat(row,column){ |
| | | var actions = []; |
| | | Object.keys(this.limitTypeOptions).map((key) => { |
| | | if (this.limitTypeOptions[key].limitCode == ('' + row.limitType)) { |
| | | Object.keys(this.limitTypeOptions).map(key => { |
| | | if (this.limitTypeOptions[key].limitCode == "" + row.limitType) { |
| | | actions.push(this.limitTypeOptions[key].limitName); |
| | | } |
| | | }); |
| | | return actions.join(''); |
| | | return actions.join(""); |
| | | }, |
| | | handleClick(tab, event){ |
| | | this.activeName = tab.name; |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="home-show"> |
| | | <!-- <el-card :bordered="false"> |
| | | <div class="home-head"> |
| | | <div class="home-select-label">æ¥æåæ¢</div> |
| | | <div> |
| | | <el-button |
| | | :type="dateType === 'DAY' ? 'primary' : ''" |
| | | @click="dateClickHandle('DAY')" |
| | | >æ¥</el-button |
| | | <div class="app-container" style="padding: 0;margin: 10px;"> |
| | | <div |
| | | class="dashboard-editor-container" |
| | | style="width: 100%;height: 100%;display: block;margin: 0 auto;" |
| | | > |
| | | <el-button |
| | | :type="dateType === 'MONTH' ? 'primary' : ''" |
| | | @click="dateClickHandle('MONTH')" |
| | | class="select-month" |
| | | >æ |
| | | </el-button> |
| | | <el-button |
| | | :type="dateType === 'YEAR' ? 'primary' : ''" |
| | | @click="dateClickHandle('YEAR')" |
| | | >å¹´</el-button |
| | | > |
| | | <div class="title">欢è¿ä½¿ç¨äºè·¯ç»¼åè½æºç®¡çå¹³å°</div> |
| | | <!-- <img src="@/assets/image/index3.png" style="width: 55%;" /> --> |
| | | <img src="@/assets/image/image.png" style="height: 80vh;" /> |
| | | </div> |
| | | </div> |
| | | </el-card> --> |
| | | <el-card |
| | | class="body-left-title" |
| | | :bordered="false" |
| | | style="margin-bottom: 12px;" |
| | | > |
| | | <div slot="header" class="clearfix"> |
| | | <span>彿¥åæ§æ°æ®ææ æ»è§</span> |
| | | </div> |
| | | <el-row class="double-data-show-content"> |
| | | <el-col :span="5" class="total"> |
| | | <img alt="" src="~@/assets/home/zonghe.svg" /> |
| | | <div class="left-title-style"> |
| | | <div> |
| | | <div>å
¨å综åè½è</div> |
| | | <div class="unit">{{ summation }} tce</div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col |
| | | :span="5" |
| | | class="co2" |
| | | v-for="(item, index) in energyStatistic" |
| | | :key="index" |
| | | style="border-left: 1px solid #999;" |
| | | > |
| | | <img |
| | | v-if="item.item.includes('çµ')" |
| | | src="~@/assets/home/haodian.svg" |
| | | alt="" |
| | | /> |
| | | <img |
| | | v-if="item.item.includes('æ°´')" |
| | | src="~@/assets/home/haoshui.svg" |
| | | alt="" |
| | | /> |
| | | <img |
| | | v-if="item.item.includes('æ°')" |
| | | src="~@/assets/home/haoqi.svg" |
| | | alt="" |
| | | /> |
| | | <img |
| | | v-if="item.item.includes('è¸æ±½')" |
| | | src="~@/assets/home/haozhengqi.svg" |
| | | alt="" |
| | | /> |
| | | <div class="left-title-style"> |
| | | <div> |
| | | <div> |
| | | è{{ |
| | | item.item.indexOf("天ç¶") !== -1 |
| | | ? item.item.replace("天ç¶", "") |
| | | : item.item |
| | | }}é |
| | | {{ item.unit ? `ï¼${item.unit}ï¼` : "" }} |
| | | </div> |
| | | <div class="unit"> |
| | | {{ item.count || 0 }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5" class="total" style="border-left: 1px solid #999;"> |
| | | <img alt="" src="~@/assets/home/wen.png" /> |
| | | <div class="left-title-style"> |
| | | <div> |
| | | <div>室夿¸©åº¦</div> |
| | | <div class="unit">{{ temperature }}</div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5" class="total" style="border-left: 1px solid #999;"> |
| | | <img alt="" src="~@/assets/home/shi.png" /> |
| | | <div class="left-title-style"> |
| | | <div> |
| | | <div>室夿¹¿åº¦</div> |
| | | <div class="unit">{{ humidity }}</div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | <el-row type="flex" class="data-indicator-overview"> |
| | | <el-col class="home-body-left"> |
| | | <el-card :bordered="false" class="body-left-title"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>è½æºå®æ¶çæµ</span> |
| | | </div> |
| | | <div class="chart-wrapper"> |
| | | <span class="chart-left-unit">{{ |
| | | `çµ/åä½${monitoringUnit}` |
| | | }}</span> |
| | | <BarChart class="line-content" :chartData="chartDataObj" /> |
| | | </div> |
| | | <div class="chart-wrapper" style="border-top: 1px solid #999"> |
| | | <span class="chart-left-unit">{{ |
| | | `æ°´/åä½${monitoringWaterUnit}` |
| | | }}</span> |
| | | <BarChart class="line-content" :chartData="chartDataWaterObj" /> |
| | | </div> |
| | | </el-card> |
| | | <!-- <div class="left-line-style"> |
| | | <div>è½æºå®æ¶çæµ</div> |
| | | <el-row type="flex" justify="space-between"> |
| | | <el-col class="radio-list"> |
| | | <div class="radio-list-content"> |
| | | <el-radio-group |
| | | v-model="energyType" |
| | | @change="onPowerTypeChange" |
| | | > |
| | | <el-radio |
| | | :style="radioStyle" |
| | | :label="item.value" |
| | | v-for="item in powerTypeOptions" |
| | | :key="item.value" |
| | | > |
| | | {{ item.label }} |
| | | </el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> --> |
| | | </el-col> |
| | | <el-col class="home-body-right"> |
| | | <el-card :bordered="false" class="right-first-card-title"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>综åè½èå æ¯åæ</span> |
| | | </div> |
| | | <PieChart |
| | | class="first-chat" |
| | | :chartData="firstPieData" |
| | | pieTitle="综åè½èå æ¯åæ" |
| | | /> |
| | | </el-card> |
| | | <el-card :bordered="false" class="second-card-title"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>è½è设å¤å æ¯</span> |
| | | </div> |
| | | <PieChart |
| | | class="second-chat" |
| | | :chartData="secondPieData" |
| | | pieTitle="è½è设å¤å æ¯" |
| | | height="280px" |
| | | /> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getEnergyConsumptionRatio, |
| | | getEnergyConsumptionSummation, |
| | | getEnergyStatistic, |
| | | getHomeEnergyMonitoring, |
| | | listEnergyType, |
| | | getHomeEnergyUnitConsumptionRatio, |
| | | getHomeOutdoorTemperature |
| | | } from "@/api/home/home"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import PieChart from "./dashboard/PieChart"; |
| | | import LineChart from "./dashboard/LineChart"; |
| | | import BarChart from "./dashboard/BarChart"; |
| | | |
| | | export default { |
| | | components: { |
| | | LineChart, |
| | | BarChart, |
| | | PieChart |
| | | }, |
| | | mixins: [mixins], |
| | | |
| | | data() { |
| | | return { |
| | | firstPieData: [], |
| | | secondPieData: [], |
| | | monitoringUnit: "kWh", |
| | | chartDataObj: {}, |
| | | monitoringWaterUnit: "m³", |
| | | chartDataWaterObj: {}, |
| | | energyType: "electric", |
| | | energyTypeName: "çµ", |
| | | dateType: "DAY", |
| | | powerTypeOptions: [ |
| | | { |
| | | label: "çµ", |
| | | value: "electric", |
| | | energyUnit: "kWh" |
| | | }, |
| | | { label: "水", value: "Water", energyUnit: "m³" }, |
| | | { label: "è¸æ±½", value: "Steam", energyUnit: "å¨" }, |
| | | { label: "å¤©ç¶æ°", value: "Gas", energyUnit: "Nm³" } |
| | | ], |
| | | isClick: true, |
| | | radioStyle: { |
| | | display: "block", |
| | | height: "30px", |
| | | lineHeight: "30px" |
| | | }, |
| | | chart1: null, |
| | | chart2: null, |
| | | data: [], |
| | | pieDta: [], |
| | | pieDtatwo: [], |
| | | energyCostSum: 0, |
| | | energyStatistic: [], |
| | | summation: 10776, |
| | | totalCo2Emissions: 0, |
| | | humidity: "", |
| | | temperature: "", |
| | | timer: null, |
| | | timer30: null |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getEnergyType(); |
| | | this.getSummationData(); |
| | | this.getEnergyConsumptionRatioData(); |
| | | this.getEnergyStatisticData(); |
| | | this.getHomeEnergyUnitConsumptionRatioData(); |
| | | |
| | | const ele = document.createEvent("Event"); |
| | | ele.initEvent("resize", true, true); |
| | | window.dispatchEvent(ele); |
| | | |
| | | clearInterval(this.timer); |
| | | clearInterval(this.timer30); |
| | | this.getHomeOutdoorTemperatureData(); |
| | | // this.timer = setInterval(() => { |
| | | // this.getHomeOutdoorTemperatureData(); |
| | | // }, 12000); |
| | | this.timer30 = setInterval(() => { |
| | | // this.getEnergyType(); |
| | | this.getSummationData(); |
| | | this.getEnergyConsumptionRatioData(); |
| | | this.getEnergyStatisticData(); |
| | | this.getHomeEnergyUnitConsumptionRatioData(); |
| | | }, 180000); |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timer); |
| | | clearInterval(this.timer30); |
| | | }, |
| | | methods: { |
| | | getHomeOutdoorTemperatureData() { |
| | | getHomeOutdoorTemperature().then(res => { |
| | | this.temperature = res.data.temperature; |
| | | this.humidity = res.data.humidity; |
| | | }); |
| | | }, |
| | | getEnergyType() { |
| | | listEnergyType() |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.powerTypeOptions = |
| | | res.data.map(item => ({ |
| | | ...item, |
| | | value: item.energy, |
| | | label: item.energyName |
| | | })) || []; |
| | | this.energyType = |
| | | this.powerTypeOptions.length > 0 |
| | | ? this.powerTypeOptions[0].value |
| | | : ""; |
| | | this.energyTypeName = |
| | | this.powerTypeOptions.length > 0 |
| | | ? this.powerTypeOptions[0].label |
| | | : ""; |
| | | for (let i = 0; i < this.powerTypeOptions.length; i++) { |
| | | this.getEnergyMonitoring(this.powerTypeOptions[i].value); |
| | | } |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è·åè½æºç±»åå表", e); |
| | | }); |
| | | }, |
| | | // 碳æéæ ¸ç®æ¥è¯¢ |
| | | getCarbonEmission() { |
| | | getHomeCarbonEmission(this.dateType).then(res => { |
| | | this.totalCo2Emissions = res.result.totalCo2Emissions; |
| | | }); |
| | | }, |
| | | // è·åå
¨å综åè½è |
| | | getSummationData() { |
| | | getEnergyConsumptionSummation(this.dateType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.summation = res.data; |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è·åå
¨å综åè½è", e); |
| | | }); |
| | | }, |
| | | // è·å综åè½èå æ¯ç¯å½¢å¾åææ°æ® |
| | | getEnergyConsumptionRatioData() { |
| | | getEnergyConsumptionRatio(this.dateType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.firstPieData = res.data.map(item => { |
| | | return { |
| | | ...item, |
| | | name: item.item, |
| | | value: item.count || 0 |
| | | // unit: filterUint |
| | | }; |
| | | }); |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è·å综åè½èå æ¯ç¯å½¢å¾åææ°æ®", e); |
| | | }); |
| | | }, |
| | | |
| | | // è½æºè®¾å¤ç¯å½¢å¾æ°æ®æ°æ® |
| | | getHomeEnergyUnitConsumptionRatioData() { |
| | | getHomeEnergyUnitConsumptionRatio(this.dateType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.secondPieData = res.data.map(item => { |
| | | return { |
| | | ...item, |
| | | name: item.name, |
| | | value: item.value || 0 |
| | | // unit: filterUint |
| | | }; |
| | | }); |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è½æºè®¾å¤åæç¯å½¢å¾æ°æ®æ°æ®", e); |
| | | }); |
| | | }, |
| | | |
| | | // åç±»è½æºç»è®¡æ°æ® |
| | | getEnergyStatisticData() { |
| | | getEnergyStatistic(this.dateType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.energyStatistic = res.data; |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("åç±»è½æºç»è®¡æ°æ®", e); |
| | | }); |
| | | }, |
| | | |
| | | // è½æºçæµæ±ç¶å¾æ°æ® |
| | | getEnergyMonitoring(energyType) { |
| | | getHomeEnergyMonitoring(this.dateType, energyType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | let chartData = res.data.chartData.sort((a, b) => { |
| | | return a.date - b.date; |
| | | }); |
| | | let nameList = Array.from( |
| | | new Set( |
| | | chartData.map(item => { |
| | | return item.name; |
| | | }) |
| | | ) |
| | | ).sort((a, b) => { |
| | | return new Date(b.date).getTime() - new Date(a.date).getTime(); |
| | | }); |
| | | // è¡¥å
¨æ°æ® |
| | | let oneArr = chartData.filter(item => { |
| | | return item.name === nameList[0]; |
| | | }); |
| | | let twoArr = chartData.filter(item => { |
| | | return item.name === nameList[1]; |
| | | }); |
| | | |
| | | let maxDate = |
| | | this.dateType === "DAY" |
| | | ? 23 |
| | | : Math.max( |
| | | ...chartData.map(item => { |
| | | return item.date; |
| | | }) |
| | | ); |
| | | oneArr.forEach(element => { |
| | | if (this.dateType === "DAY") { |
| | | let hour = new Date("2022 " + element.date).getHours() + "æ¶"; |
| | | element.date = hour; |
| | | } else { |
| | | element.date = |
| | | this.dateType === "MONTH" |
| | | ? element.date + "æ¥" |
| | | : element.date + "æ"; |
| | | } |
| | | }); |
| | | twoArr.forEach(element => { |
| | | if (this.dateType === "DAY") { |
| | | let hour = new Date("2022 " + element.date).getHours() + "æ¶"; |
| | | element.date = hour; |
| | | } else { |
| | | element.date = |
| | | this.dateType === "MONTH" |
| | | ? element.date + "æ¥" |
| | | : element.date + "æ"; |
| | | } |
| | | }); |
| | | if (oneArr.length < maxDate) { |
| | | if (this.dateType === "DAY") { |
| | | for (let d = oneArr.length; d < maxDate + 1; d++) { |
| | | oneArr.push({ |
| | | date: d + "æ¶", |
| | | name: nameList[0], |
| | | count: 0, |
| | | value: null |
| | | }); |
| | | } |
| | | } else { |
| | | console.log("one111111111"); |
| | | for (let d = oneArr.length + 1; d < maxDate + 1; d++) { |
| | | oneArr.push({ |
| | | date: this.dateType === "MONTH" ? d + "æ¥" : d + "æ", |
| | | name: nameList[0], |
| | | count: 0, |
| | | value: null |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | if (twoArr.length < maxDate) { |
| | | if (this.dateType === "DAY") { |
| | | for (let d = twoArr.length; d < maxDate + 1; d++) { |
| | | twoArr.push({ |
| | | date: d + "æ¶", |
| | | name: nameList[1], |
| | | count: 0, |
| | | value: 0 |
| | | }); |
| | | } |
| | | } else { |
| | | for (let d = twoArr.length + 1; d < maxDate + 1; d++) { |
| | | twoArr.push({ |
| | | date: this.dateType === "MONTH" ? d + "æ¥" : d + "æ", |
| | | name: nameList[1], |
| | | count: 0, |
| | | value: 0 |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | let chartData2 = oneArr |
| | | .concat(twoArr) |
| | | .map(item => { |
| | | return { |
| | | ...item, |
| | | len: item.date, |
| | | count: item.value === "--" ? null : +item.value |
| | | }; |
| | | }) |
| | | .sort((a, b) => { |
| | | return new Date(a.name).getTime() - new Date(b.name).getTime(); |
| | | }); |
| | | this.data = chartData2; |
| | | if (energyType == "water") { |
| | | this.monitoringWaterUnit = res.data.unit; |
| | | this.chartDataWaterObj = { |
| | | expectedData: twoArr.map(one => { |
| | | return one.value; |
| | | }), |
| | | actualData: oneArr.map(e => { |
| | | return e.value; |
| | | }), |
| | | xData: oneArr.map(one => { |
| | | return one.date; |
| | | }) |
| | | }; |
| | | } else if (energyType == "electric") { |
| | | this.monitoringUnit = res.data.unit; |
| | | this.chartDataObj = { |
| | | expectedData: twoArr.map(one => { |
| | | return one.value; |
| | | }), |
| | | actualData: oneArr.map(e => { |
| | | return e.value; |
| | | }), |
| | | xData: oneArr.map(one => { |
| | | return one.date; |
| | | }) |
| | | }; |
| | | } |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è½æºçæµæ±ç¶å¾æ°æ®", e); |
| | | }); |
| | | }, |
| | | |
| | | dateClickHandle(type) { |
| | | this.dateType = type; |
| | | this.isClick = !this.isClick; |
| | | this.getSummationData(); |
| | | this.getEnergyConsumptionRatioData(); |
| | | this.getEnergyCostRatioData(); |
| | | this.getEnergyStatisticData(); |
| | | this.getEnergyMonitoring(); |
| | | this.getCarbonEmission(); |
| | | }, |
| | | |
| | | onPowerTypeChange(e) { |
| | | this.energyType = e; |
| | | for (let i = 0; i < this.powerTypeOptions.length; i++) { |
| | | if (this.energyType === this.powerTypeOptions[i].value) { |
| | | this.energyTypeName = this.powerTypeOptions[i].label; |
| | | this.monitoringUnit = this.powerTypeOptions[i].energyUnit || ""; |
| | | } |
| | | } |
| | | this.getEnergyMonitoring(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .home-show { |
| | | overflow: hidden; |
| | | overflow-y: scroll; |
| | | // height: calc(100vh - 88px); |
| | | .home-head { |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .home-select-label { |
| | | margin-right: 10px; |
| | | color: #fff; |
| | | // http://yunlu.com.cn/template/pc/skin/images/index/u21.png |
| | | .dashboard-editor-container { |
| | | text-align: center; |
| | | .title { |
| | | color: #999; |
| | | font-size: 30px; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .select-month { |
| | | margin: 0 8px; |
| | | } |
| | | } |
| | | .double-data-show-content { |
| | | display: flex; |
| | | align-items: center; |
| | | // border-bottom: 1px solid #e9e9e9; |
| | | // padding: 23px 0 24px 40px; |
| | | .el-col { |
| | | padding: 23px 0 24px 10px; |
| | | } |
| | | |
| | | & > div { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | img { |
| | | width: 20px; |
| | | height: 20px; |
| | | } |
| | | |
| | | .left-title-style { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 10px; |
| | | // border-right: 1px solid #e9e9e9; |
| | | |
| | | .unit { |
| | | font-size: 22px; |
| | | color: #fff; |
| | | margin-top: 4px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .chart-wrapper { |
| | | padding: 10px 24px; |
| | | position: relative; |
| | | .chart-left-unit { |
| | | position: absolute; |
| | | top: 16px; |
| | | left: 24px; |
| | | color: #fff; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .line-content { |
| | | margin: 4px 0 0 0; |
| | | height: 300px; |
| | | } |
| | | } |
| | | |
| | | .data-indicator-overview { |
| | | ::v-deep .el-card__body { |
| | | padding: 0 !important; |
| | | } |
| | | |
| | | .home-body-left { |
| | | width: 66.3%; |
| | | height: 100%; |
| | | |
| | | .body-left-title { |
| | | margin: 0 16px 0px 0; |
| | | } |
| | | |
| | | .left-line-style { |
| | | padding: 24px; |
| | | color: #fff; |
| | | |
| | | .radio-list { |
| | | width: 122px; |
| | | |
| | | .radio-list-content { |
| | | margin: 16px 12px 0 0; |
| | | background: #f3f7f7; |
| | | padding: 21px 9px; |
| | | border-radius: 2px; |
| | | overflow: auto; |
| | | height: 360px; |
| | | } |
| | | } |
| | | |
| | | .right-line { |
| | | width: calc(100% - 122px); |
| | | position: relative; |
| | | |
| | | .chart-left-unit { |
| | | position: absolute; |
| | | top: 16px; |
| | | left: 0; |
| | | color: #fff; |
| | | } |
| | | |
| | | .line-content { |
| | | margin: 12px 0 0 0; |
| | | height: 300px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .left-bottom-type { |
| | | margin: 16px 16px 16px 0; |
| | | |
| | | .card-list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | height: 100%; |
| | | |
| | | .classify-energy { |
| | | border-left: 1px solid #e9e9e9; |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 0 0 24px; |
| | | |
| | | &:first-child { |
| | | border-left: none; |
| | | } |
| | | |
| | | .img-list { |
| | | display: flex; |
| | | align-items: center; |
| | | img { |
| | | width: 20px; |
| | | height: 20px; |
| | | } |
| | | |
| | | .text-describe { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 18px; |
| | | |
| | | .number { |
| | | font-size: 24px; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .home-body-right { |
| | | width: 33.7%; |
| | | height: 100%; |
| | | |
| | | .right-first-card-title { |
| | | margin: 0 0 16px 0; |
| | | |
| | | .first-chat { |
| | | margin: 10px 0 0 0; |
| | | height: 300px; |
| | | } |
| | | } |
| | | |
| | | .second-card-title { |
| | | // padding-top: 16px; |
| | | |
| | | .second-chat { |
| | | margin: 10px 0 0 0; |
| | | height: 290px; |
| | | } |
| | | |
| | | .bottom-description-list { |
| | | display: flex; |
| | | padding: 0 23px 16px 10px; |
| | | height: 106px; |
| | | align-items: center; |
| | | |
| | | .total { |
| | | border-right: 1px solid #e9e9e9; |
| | | padding-left: 10px; |
| | | min-width: 180px; |
| | | max-width: 180px; |
| | | |
| | | .energy-cost-sum { |
| | | font-size: 24px; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .legend { |
| | | padding: 6px 0 0 20px; |
| | | |
| | | .legend-list { |
| | | display: flex; |
| | | // width: 280px; |
| | | flex-wrap: wrap; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .power-cost { |
| | | width: 8px; |
| | | height: 8px; |
| | | border-radius: 50%; |
| | | display: inline-block; |
| | | margin-right: 4px; |
| | | margin: 40px auto 50px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="dashboard-editor-container"> |
| | | <panel-group @handleSetLineChartData="handleSetLineChartData" /> |
| | | |
| | | <el-row style="padding:16px 16px 0;margin-bottom:32px;"> |
| | | <line-chart :chart-data="lineChartData" /> |
| | | </el-row> |
| | | |
| | | <el-row :gutter="32"> |
| | | <el-col :xs="24" :sm="24" :lg="8"> |
| | | <div class="chart-wrapper"> |
| | | <raddar-chart /> |
| | | <div class="home-show"> |
| | | <!-- <el-card :bordered="false"> |
| | | <div class="home-head"> |
| | | <div class="home-select-label">æ¥æåæ¢</div> |
| | | <div> |
| | | <el-button |
| | | :type="dateType === 'DAY' ? 'primary' : ''" |
| | | @click="dateClickHandle('DAY')" |
| | | >æ¥</el-button |
| | | > |
| | | <el-button |
| | | :type="dateType === 'MONTH' ? 'primary' : ''" |
| | | @click="dateClickHandle('MONTH')" |
| | | class="select-month" |
| | | >æ |
| | | </el-button> |
| | | <el-button |
| | | :type="dateType === 'YEAR' ? 'primary' : ''" |
| | | @click="dateClickHandle('YEAR')" |
| | | >å¹´</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | </el-card> --> |
| | | <el-card |
| | | class="body-left-title" |
| | | :bordered="false" |
| | | style="margin-bottom: 12px;" |
| | | > |
| | | <div slot="header" class="clearfix"> |
| | | <span>彿¥åæ§æ°æ®ææ æ»è§</span> |
| | | </div> |
| | | <el-row class="double-data-show-content"> |
| | | <el-col :span="5" class="total"> |
| | | <img alt="" src="~@/assets/home/zonghe.svg" /> |
| | | <div class="left-title-style"> |
| | | <div> |
| | | <div>å
¨å综åè½è</div> |
| | | <div class="unit">{{ summation }} tce</div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :lg="8"> |
| | | <div class="chart-wrapper"> |
| | | <pie-chart /> |
| | | <el-col |
| | | :span="5" |
| | | class="co2" |
| | | v-for="(item, index) in energyStatistic" |
| | | :key="index" |
| | | style="border-left: 1px solid #999;" |
| | | > |
| | | <img |
| | | v-if="item.item.includes('çµ')" |
| | | src="~@/assets/home/haodian.svg" |
| | | alt="" |
| | | /> |
| | | <img |
| | | v-if="item.item.includes('æ°´')" |
| | | src="~@/assets/home/haoshui.svg" |
| | | alt="" |
| | | /> |
| | | <img |
| | | v-if="item.item.includes('æ°')" |
| | | src="~@/assets/home/haoqi.svg" |
| | | alt="" |
| | | /> |
| | | <img |
| | | v-if="item.item.includes('è¸æ±½')" |
| | | src="~@/assets/home/haozhengqi.svg" |
| | | alt="" |
| | | /> |
| | | <div class="left-title-style"> |
| | | <div> |
| | | <div> |
| | | è{{ |
| | | item.item.indexOf("天ç¶") !== -1 |
| | | ? item.item.replace("天ç¶", "") |
| | | : item.item |
| | | }}é |
| | | {{ item.unit ? `ï¼${item.unit}ï¼` : "" }} |
| | | </div> |
| | | <div class="unit"> |
| | | {{ item.count || 0 }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :lg="8"> |
| | | <div class="chart-wrapper"> |
| | | <bar-chart /> |
| | | <el-col :span="5" class="total" style="border-left: 1px solid #999;"> |
| | | <img alt="" src="~@/assets/home/wen.png" /> |
| | | <div class="left-title-style"> |
| | | <div> |
| | | <div>室夿¸©åº¦</div> |
| | | <div class="unit">{{ temperature }}</div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5" class="total" style="border-left: 1px solid #999;"> |
| | | <img alt="" src="~@/assets/home/shi.png" /> |
| | | <div class="left-title-style"> |
| | | <div> |
| | | <div>室夿¹¿åº¦</div> |
| | | <div class="unit">{{ humidity }}</div> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!--<!–宿¶–>--> |
| | | <!--<div class="live">--> |
| | | <!--<div class="live_content">宿¶æ¥è¦</div>--> |
| | | <!--<div class="live_number">35</div>--> |
| | | <!--</div>--> |
| | | </el-card> |
| | | <el-row type="flex" class="data-indicator-overview"> |
| | | <el-col class="home-body-left"> |
| | | <el-card :bordered="false" class="body-left-title"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>è½æºå®æ¶çæµ</span> |
| | | </div> |
| | | <div class="chart-wrapper"> |
| | | <span class="chart-left-unit">{{ |
| | | `çµ/åä½${monitoringUnit}` |
| | | }}</span> |
| | | <BarChart class="line-content" :chartData="chartDataObj" /> |
| | | </div> |
| | | <div class="chart-wrapper" style="border-top: 1px solid #999"> |
| | | <span class="chart-left-unit">{{ |
| | | `æ°´/åä½${monitoringWaterUnit}` |
| | | }}</span> |
| | | <BarChart class="line-content" :chartData="chartDataWaterObj" /> |
| | | </div> |
| | | </el-card> |
| | | <!-- <div class="left-line-style"> |
| | | <div>è½æºå®æ¶çæµ</div> |
| | | <el-row type="flex" justify="space-between"> |
| | | <el-col class="radio-list"> |
| | | <div class="radio-list-content"> |
| | | <el-radio-group |
| | | v-model="energyType" |
| | | @change="onPowerTypeChange" |
| | | > |
| | | <el-radio |
| | | :style="radioStyle" |
| | | :label="item.value" |
| | | v-for="item in powerTypeOptions" |
| | | :key="item.value" |
| | | > |
| | | {{ item.label }} |
| | | </el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> --> |
| | | </el-col> |
| | | <el-col class="home-body-right"> |
| | | <el-card :bordered="false" class="right-first-card-title"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>综åè½èå æ¯åæ</span> |
| | | </div> |
| | | <PieChart |
| | | class="first-chat" |
| | | :chartData="firstPieData" |
| | | pieTitle="综åè½èå æ¯åæ" |
| | | /> |
| | | </el-card> |
| | | <el-card :bordered="false" class="second-card-title"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>è½è设å¤å æ¯</span> |
| | | </div> |
| | | <PieChart |
| | | class="second-chat" |
| | | :chartData="secondPieData" |
| | | pieTitle="è½è设å¤å æ¯" |
| | | height="280px" |
| | | /> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import PanelGroup from "./dashboard/PanelGroup"; |
| | | import LineChart from "./dashboard/LineChart"; |
| | | import RaddarChart from "./dashboard/RaddarChart"; |
| | | import { |
| | | getEnergyConsumptionRatio, |
| | | getEnergyConsumptionSummation, |
| | | getEnergyStatistic, |
| | | getHomeEnergyMonitoring, |
| | | listEnergyType, |
| | | getHomeEnergyUnitConsumptionRatio, |
| | | getHomeOutdoorTemperature |
| | | } from "@/api/home/home"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | import PieChart from "./dashboard/PieChart"; |
| | | import LineChart from "./dashboard/LineChart"; |
| | | import BarChart from "./dashboard/BarChart"; |
| | | |
| | | const lineChartData = { |
| | | newVisitis: { |
| | | expectedData: [100, 120, 161, 134, 105, 160, 165], |
| | | actualData: [120, 82, 91, 154, 162, 140, 145] |
| | | }, |
| | | messages: { |
| | | expectedData: [200, 192, 120, 144, 160, 130, 140], |
| | | actualData: [180, 160, 151, 106, 145, 150, 130] |
| | | }, |
| | | purchases: { |
| | | expectedData: [80, 100, 121, 104, 105, 90, 100], |
| | | actualData: [120, 90, 100, 138, 142, 130, 130] |
| | | }, |
| | | shoppings: { |
| | | expectedData: [130, 140, 141, 142, 145, 150, 160], |
| | | actualData: [120, 82, 91, 154, 162, 140, 130] |
| | | } |
| | | }; |
| | | |
| | | export default { |
| | | name: "Index", |
| | | components: { |
| | | PanelGroup, |
| | | LineChart, |
| | | RaddarChart, |
| | | PieChart, |
| | | BarChart |
| | | BarChart, |
| | | PieChart |
| | | }, |
| | | mixins: [mixins], |
| | | |
| | | data() { |
| | | return { |
| | | lineChartData: lineChartData.newVisitis |
| | | firstPieData: [], |
| | | secondPieData: [], |
| | | monitoringUnit: "kWh", |
| | | chartDataObj: {}, |
| | | monitoringWaterUnit: "m³", |
| | | chartDataWaterObj: {}, |
| | | energyType: "electric", |
| | | energyTypeName: "çµ", |
| | | dateType: "DAY", |
| | | powerTypeOptions: [ |
| | | { |
| | | label: "çµ", |
| | | value: "electric", |
| | | energyUnit: "kWh" |
| | | }, |
| | | { label: "水", value: "Water", energyUnit: "m³" }, |
| | | { label: "è¸æ±½", value: "Steam", energyUnit: "å¨" }, |
| | | { label: "å¤©ç¶æ°", value: "Gas", energyUnit: "Nm³" } |
| | | ], |
| | | isClick: true, |
| | | radioStyle: { |
| | | display: "block", |
| | | height: "30px", |
| | | lineHeight: "30px" |
| | | }, |
| | | chart1: null, |
| | | chart2: null, |
| | | data: [], |
| | | pieDta: [], |
| | | pieDtatwo: [], |
| | | energyCostSum: 0, |
| | | energyStatistic: [], |
| | | summation: 10776, |
| | | totalCo2Emissions: 0, |
| | | humidity: "", |
| | | temperature: "", |
| | | timer: null, |
| | | timer30: null |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getEnergyType(); |
| | | this.getSummationData(); |
| | | this.getEnergyConsumptionRatioData(); |
| | | this.getEnergyStatisticData(); |
| | | this.getHomeEnergyUnitConsumptionRatioData(); |
| | | |
| | | const ele = document.createEvent("Event"); |
| | | ele.initEvent("resize", true, true); |
| | | window.dispatchEvent(ele); |
| | | |
| | | clearInterval(this.timer); |
| | | clearInterval(this.timer30); |
| | | this.getHomeOutdoorTemperatureData(); |
| | | // this.timer = setInterval(() => { |
| | | // this.getHomeOutdoorTemperatureData(); |
| | | // }, 12000); |
| | | this.timer30 = setInterval(() => { |
| | | // this.getEnergyType(); |
| | | this.getSummationData(); |
| | | this.getEnergyConsumptionRatioData(); |
| | | this.getEnergyStatisticData(); |
| | | this.getHomeEnergyUnitConsumptionRatioData(); |
| | | }, 180000); |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timer); |
| | | clearInterval(this.timer30); |
| | | }, |
| | | methods: { |
| | | handleSetLineChartData(type) { |
| | | this.lineChartData = lineChartData[type]; |
| | | getHomeOutdoorTemperatureData() { |
| | | getHomeOutdoorTemperature().then(res => { |
| | | this.temperature = res.data.temperature; |
| | | this.humidity = res.data.humidity; |
| | | }); |
| | | }, |
| | | getEnergyType() { |
| | | listEnergyType() |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.powerTypeOptions = |
| | | res.data.map(item => ({ |
| | | ...item, |
| | | value: item.energy, |
| | | label: item.energyName |
| | | })) || []; |
| | | this.energyType = |
| | | this.powerTypeOptions.length > 0 |
| | | ? this.powerTypeOptions[0].value |
| | | : ""; |
| | | this.energyTypeName = |
| | | this.powerTypeOptions.length > 0 |
| | | ? this.powerTypeOptions[0].label |
| | | : ""; |
| | | for (let i = 0; i < this.powerTypeOptions.length; i++) { |
| | | this.getEnergyMonitoring(this.powerTypeOptions[i].value); |
| | | } |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è·åè½æºç±»åå表", e); |
| | | }); |
| | | }, |
| | | // 碳æéæ ¸ç®æ¥è¯¢ |
| | | getCarbonEmission() { |
| | | getHomeCarbonEmission(this.dateType).then(res => { |
| | | this.totalCo2Emissions = res.result.totalCo2Emissions; |
| | | }); |
| | | }, |
| | | // è·åå
¨å综åè½è |
| | | getSummationData() { |
| | | getEnergyConsumptionSummation(this.dateType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.summation = res.data; |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è·åå
¨å综åè½è", e); |
| | | }); |
| | | }, |
| | | // è·å综åè½èå æ¯ç¯å½¢å¾åææ°æ® |
| | | getEnergyConsumptionRatioData() { |
| | | getEnergyConsumptionRatio(this.dateType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.firstPieData = res.data.map(item => { |
| | | return { |
| | | ...item, |
| | | name: item.item, |
| | | value: item.count || 0 |
| | | // unit: filterUint |
| | | }; |
| | | }); |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è·å综åè½èå æ¯ç¯å½¢å¾åææ°æ®", e); |
| | | }); |
| | | }, |
| | | |
| | | // è½æºè®¾å¤ç¯å½¢å¾æ°æ®æ°æ® |
| | | getHomeEnergyUnitConsumptionRatioData() { |
| | | getHomeEnergyUnitConsumptionRatio(this.dateType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.secondPieData = res.data.map(item => { |
| | | return { |
| | | ...item, |
| | | name: item.name, |
| | | value: item.value || 0 |
| | | // unit: filterUint |
| | | }; |
| | | }); |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è½æºè®¾å¤åæç¯å½¢å¾æ°æ®æ°æ®", e); |
| | | }); |
| | | }, |
| | | |
| | | // åç±»è½æºç»è®¡æ°æ® |
| | | getEnergyStatisticData() { |
| | | getEnergyStatistic(this.dateType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.energyStatistic = res.data; |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("åç±»è½æºç»è®¡æ°æ®", e); |
| | | }); |
| | | }, |
| | | |
| | | // è½æºçæµæ±ç¶å¾æ°æ® |
| | | getEnergyMonitoring(energyType) { |
| | | getHomeEnergyMonitoring(this.dateType, energyType) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | let chartData = res.data.chartData.sort((a, b) => { |
| | | return a.date - b.date; |
| | | }); |
| | | let nameList = Array.from( |
| | | new Set( |
| | | chartData.map(item => { |
| | | return item.name; |
| | | }) |
| | | ) |
| | | ).sort((a, b) => { |
| | | return new Date(b.date).getTime() - new Date(a.date).getTime(); |
| | | }); |
| | | // è¡¥å
¨æ°æ® |
| | | let oneArr = chartData.filter(item => { |
| | | return item.name === nameList[0]; |
| | | }); |
| | | let twoArr = chartData.filter(item => { |
| | | return item.name === nameList[1]; |
| | | }); |
| | | |
| | | let maxDate = |
| | | this.dateType === "DAY" |
| | | ? 23 |
| | | : Math.max( |
| | | ...chartData.map(item => { |
| | | return item.date; |
| | | }) |
| | | ); |
| | | oneArr.forEach(element => { |
| | | if (this.dateType === "DAY") { |
| | | let hour = new Date("2022 " + element.date).getHours() + "æ¶"; |
| | | element.date = hour; |
| | | } else { |
| | | element.date = |
| | | this.dateType === "MONTH" |
| | | ? element.date + "æ¥" |
| | | : element.date + "æ"; |
| | | } |
| | | }); |
| | | twoArr.forEach(element => { |
| | | if (this.dateType === "DAY") { |
| | | let hour = new Date("2022 " + element.date).getHours() + "æ¶"; |
| | | element.date = hour; |
| | | } else { |
| | | element.date = |
| | | this.dateType === "MONTH" |
| | | ? element.date + "æ¥" |
| | | : element.date + "æ"; |
| | | } |
| | | }); |
| | | if (oneArr.length < maxDate) { |
| | | if (this.dateType === "DAY") { |
| | | for (let d = oneArr.length; d < maxDate + 1; d++) { |
| | | oneArr.push({ |
| | | date: d + "æ¶", |
| | | name: nameList[0], |
| | | count: 0, |
| | | value: null |
| | | }); |
| | | } |
| | | } else { |
| | | console.log("one111111111"); |
| | | for (let d = oneArr.length + 1; d < maxDate + 1; d++) { |
| | | oneArr.push({ |
| | | date: this.dateType === "MONTH" ? d + "æ¥" : d + "æ", |
| | | name: nameList[0], |
| | | count: 0, |
| | | value: null |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | if (twoArr.length < maxDate) { |
| | | if (this.dateType === "DAY") { |
| | | for (let d = twoArr.length; d < maxDate + 1; d++) { |
| | | twoArr.push({ |
| | | date: d + "æ¶", |
| | | name: nameList[1], |
| | | count: 0, |
| | | value: 0 |
| | | }); |
| | | } |
| | | } else { |
| | | for (let d = twoArr.length + 1; d < maxDate + 1; d++) { |
| | | twoArr.push({ |
| | | date: this.dateType === "MONTH" ? d + "æ¥" : d + "æ", |
| | | name: nameList[1], |
| | | count: 0, |
| | | value: 0 |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | let chartData2 = oneArr |
| | | .concat(twoArr) |
| | | .map(item => { |
| | | return { |
| | | ...item, |
| | | len: item.date, |
| | | count: item.value === "--" ? null : +item.value |
| | | }; |
| | | }) |
| | | .sort((a, b) => { |
| | | return new Date(a.name).getTime() - new Date(b.name).getTime(); |
| | | }); |
| | | this.data = chartData2; |
| | | if (energyType == "water") { |
| | | this.monitoringWaterUnit = res.data.unit; |
| | | this.chartDataWaterObj = { |
| | | expectedData: twoArr.map(one => { |
| | | return one.value; |
| | | }), |
| | | actualData: oneArr.map(e => { |
| | | return e.value; |
| | | }), |
| | | xData: oneArr.map(one => { |
| | | return one.date; |
| | | }) |
| | | }; |
| | | } else if (energyType == "electric") { |
| | | this.monitoringUnit = res.data.unit; |
| | | this.chartDataObj = { |
| | | expectedData: twoArr.map(one => { |
| | | return one.value; |
| | | }), |
| | | actualData: oneArr.map(e => { |
| | | return e.value; |
| | | }), |
| | | xData: oneArr.map(one => { |
| | | return one.date; |
| | | }) |
| | | }; |
| | | } |
| | | } |
| | | }) |
| | | .catch(e => { |
| | | console.log("è½æºçæµæ±ç¶å¾æ°æ®", e); |
| | | }); |
| | | }, |
| | | |
| | | dateClickHandle(type) { |
| | | this.dateType = type; |
| | | this.isClick = !this.isClick; |
| | | this.getSummationData(); |
| | | this.getEnergyConsumptionRatioData(); |
| | | this.getEnergyCostRatioData(); |
| | | this.getEnergyStatisticData(); |
| | | this.getEnergyMonitoring(); |
| | | this.getCarbonEmission(); |
| | | }, |
| | | |
| | | onPowerTypeChange(e) { |
| | | this.energyType = e; |
| | | for (let i = 0; i < this.powerTypeOptions.length; i++) { |
| | | if (this.energyType === this.powerTypeOptions[i].value) { |
| | | this.energyTypeName = this.powerTypeOptions[i].label; |
| | | this.monitoringUnit = this.powerTypeOptions[i].energyUnit || ""; |
| | | } |
| | | } |
| | | this.getEnergyMonitoring(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .dashboard-editor-container { |
| | | padding: 32px; |
| | | .home-show { |
| | | overflow: hidden; |
| | | overflow-y: scroll; |
| | | // height: calc(100vh - 88px); |
| | | .home-head { |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .home-select-label { |
| | | margin-right: 10px; |
| | | color: #fff; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .select-month { |
| | | margin: 0 8px; |
| | | } |
| | | } |
| | | .double-data-show-content { |
| | | display: flex; |
| | | align-items: center; |
| | | // border-bottom: 1px solid #e9e9e9; |
| | | // padding: 23px 0 24px 40px; |
| | | .el-col { |
| | | padding: 23px 0 24px 10px; |
| | | } |
| | | |
| | | & > div { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | img { |
| | | width: 20px; |
| | | height: 20px; |
| | | } |
| | | |
| | | .left-title-style { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 10px; |
| | | // border-right: 1px solid #e9e9e9; |
| | | |
| | | .unit { |
| | | font-size: 22px; |
| | | color: #fff; |
| | | margin-top: 4px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .chart-wrapper { |
| | | padding: 10px 24px; |
| | | position: relative; |
| | | .chart-left-unit { |
| | | position: absolute; |
| | | top: 16px; |
| | | left: 24px; |
| | | color: #fff; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .line-content { |
| | | margin: 4px 0 0 0; |
| | | height: 300px; |
| | | } |
| | | } |
| | | |
| | | .data-indicator-overview { |
| | | ::v-deep .el-card__body { |
| | | padding: 0 !important; |
| | | } |
| | | |
| | | .home-body-left { |
| | | width: 66.3%; |
| | | height: 100%; |
| | | |
| | | .body-left-title { |
| | | margin: 0 16px 0px 0; |
| | | } |
| | | |
| | | .left-line-style { |
| | | padding: 24px; |
| | | color: #fff; |
| | | |
| | | .radio-list { |
| | | width: 122px; |
| | | |
| | | .radio-list-content { |
| | | margin: 16px 12px 0 0; |
| | | background: #f3f7f7; |
| | | padding: 21px 9px; |
| | | border-radius: 2px; |
| | | overflow: auto; |
| | | height: 360px; |
| | | } |
| | | } |
| | | |
| | | .right-line { |
| | | width: calc(100% - 122px); |
| | | position: relative; |
| | | |
| | | .chart-wrapper { |
| | | padding: 16px 16px 0; |
| | | margin-bottom: 32px; |
| | | .chart-left-unit { |
| | | position: absolute; |
| | | top: 16px; |
| | | left: 0; |
| | | color: #fff; |
| | | } |
| | | |
| | | .line-content { |
| | | margin: 12px 0 0 0; |
| | | height: 300px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | @media (max-width: 1024px) { |
| | | .chart-wrapper { |
| | | padding: 8px; |
| | | } |
| | | } |
| | | .live { |
| | | position: fixed; |
| | | right: 0px; |
| | | top: 70px; |
| | | .left-bottom-type { |
| | | margin: 16px 16px 16px 0; |
| | | |
| | | .card-list { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | flex-wrap: wrap; |
| | | height: 100%; |
| | | |
| | | .classify-energy { |
| | | border-left: 1px solid #e9e9e9; |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | width: 100px; |
| | | height: 60px; |
| | | background-color: red; |
| | | animation: fade 600ms infinite; |
| | | -webkit-animation: fade 600ms infinite; |
| | | padding: 0 0 0 24px; |
| | | |
| | | &:first-child { |
| | | border-left: none; |
| | | } |
| | | .live_content { |
| | | font-size: 18px; |
| | | color: white; |
| | | font-weight: bold; |
| | | |
| | | .img-list { |
| | | display: flex; |
| | | align-items: center; |
| | | img { |
| | | width: 20px; |
| | | height: 20px; |
| | | } |
| | | .live_number { |
| | | font-size: 32px; |
| | | color: white; |
| | | font-weight: bolder; |
| | | |
| | | .text-describe { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: 18px; |
| | | |
| | | .number { |
| | | font-size: 24px; |
| | | color: #fff; |
| | | } |
| | | @keyframes fade { |
| | | from { |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @-webkit-keyframes fade { |
| | | from { |
| | | opacity: 1; |
| | | .home-body-right { |
| | | width: 33.7%; |
| | | height: 100%; |
| | | |
| | | .right-first-card-title { |
| | | margin: 0 0 16px 0; |
| | | |
| | | .first-chat { |
| | | margin: 10px 0 0 0; |
| | | height: 300px; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1; |
| | | |
| | | .second-card-title { |
| | | // padding-top: 16px; |
| | | |
| | | .second-chat { |
| | | margin: 10px 0 0 0; |
| | | height: 290px; |
| | | } |
| | | |
| | | .bottom-description-list { |
| | | display: flex; |
| | | padding: 0 23px 16px 10px; |
| | | height: 106px; |
| | | align-items: center; |
| | | |
| | | .total { |
| | | border-right: 1px solid #e9e9e9; |
| | | padding-left: 10px; |
| | | min-width: 180px; |
| | | max-width: 180px; |
| | | |
| | | .energy-cost-sum { |
| | | font-size: 24px; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .legend { |
| | | padding: 6px 0 0 20px; |
| | | |
| | | .legend-list { |
| | | display: flex; |
| | | // width: 280px; |
| | | flex-wrap: wrap; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .power-cost { |
| | | width: 8px; |
| | | height: 8px; |
| | | border-radius: 50%; |
| | | display: inline-block; |
| | | margin-right: 4px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | |
| | | top: 40, |
| | | containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: actualData, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | type: 'value', |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: "value", |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }], |
| | | series: [{ |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: title, |
| | | type: 'bar', |
| | | stack: 'vistors', |
| | | barWidth: '60%', |
| | | type: "bar", |
| | | stack: "vistors", |
| | | barWidth: "60%", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: { |
| | | data: actualData, |
| | | type: 'category', |
| | | type: "category" |
| | | }, |
| | | grid: { |
| | | left: 10, |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | legend: { |
| | | data: [] |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | name: title, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | }) |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div> |
| | | <basic-container> |
| | | <el-form :model="queryParams" ref="queryForm" label-width="68px" class="special-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | label-width="68px" |
| | | class="special-form" |
| | | > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="éç¹è®¾å¤"> |
| | | <el-select v-model="queryParams.indexStorageId" placeholder="è¯·éæ©éç¹è®¾å¤" size="small" style="width: 100%"> |
| | | <el-select |
| | | v-model="queryParams.indexStorageId" |
| | | placeholder="è¯·éæ©éç¹è®¾å¤" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="dict in indexCategoryOptions" |
| | | :key="dict.id" |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ç»è®¡åºé´" prop="dataTime"> |
| | | <el-date-picker clearable size="small" style="width: 100%" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="queryParams.dataTime" |
| | | :type="dateTypes" |
| | | :clearable="false" |
| | | :value-format="valueFormat" |
| | | placeholder="éæ©æ¥æ"> |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item class="operation"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </basic-container> |
| | | <basic-container :bodyStyle="bodyStyle" style="margin-top: 16px"> |
| | | <el-table :data="energyList" border style="width: 100%;" class="tableList"> |
| | | <el-table |
| | | :data="energyList" |
| | | border |
| | | style="width: 100%;" |
| | | class="tableList" |
| | | > |
| | | <el-table-column fixed label="æ²çº¿éæ©"> |
| | | <template slot-scope="scope"> |
| | | <el-button icon="el-icon-search" circle @click="selectChange(scope.row)" |
| | | style="font-size: 10px"></el-button> |
| | | <el-button |
| | | icon="el-icon-search" |
| | | circle |
| | | @click="selectChange(scope.row)" |
| | | style="font-size: 10px" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed prop="indexName" align="center" label="è½æºåç§°" min-width="240px"></el-table-column> |
| | | <el-table-column |
| | | fixed |
| | | prop="indexName" |
| | | align="center" |
| | | label="è½æºææ åç§°" |
| | | min-width="240px" |
| | | ></el-table-column> |
| | | <el-table-column label="0æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value0) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value0) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="1æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value1) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value1) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="2æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value2) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value2) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="3æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value3) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value3) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="4æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value4) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value4) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="5æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value5) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value5) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="6æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value6) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value6) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="7æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value7) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value7) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="8æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value8) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value8) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="9æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value9) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value9) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="20æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value20) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value20) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="11æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value11) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value11) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="12æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value12) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value12) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="13æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value13) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value13) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="14æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value14) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value14) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="15æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value15) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value15) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="16æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value16) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value16) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="17æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value17) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value17) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="18æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value18) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value18) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="19æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value19) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value19) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="20æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value20) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value20) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="21æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value21) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value21) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="22æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value22) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value22) |
| | | }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="23æ¶" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ numFilter(scope.row.value23) }}</template> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value23) |
| | | }}</template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getDataList, getlistChart, getPointFacility} from "@/api/keyEquipment/dailykeyEquipment/dailykeyEquipment"; |
| | | import LineChart from './LineChart' |
| | | import { |
| | | getDataList, |
| | | getlistChart, |
| | | getPointFacility |
| | | } from "@/api/keyEquipment/dailykeyEquipment/dailykeyEquipment"; |
| | | import LineChart from "./LineChart"; |
| | | import BarChart from "./BarChart"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | |
| | |
| | | dataTime: undefined, |
| | | timeType: "HOUR", |
| | | indexType: undefined, |
| | | indexStorageId: undefined, |
| | | indexStorageId: undefined |
| | | }, |
| | | skinName: "", |
| | | dateTypes: 'date', |
| | | dateTypes: "date", |
| | | valueFormat: "yyyy-MM-dd", |
| | | lineChartData: {expectedData: [], actualData: []}, |
| | | lineChartData: { expectedData: [], actualData: [] } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.getTime(); |
| | | this.getDicts("report_form").then(response => { |
| | | this.dateTypeOptions = response.data; |
| | | this.queryParams.timeType = this.dateTypeOptions.find(f => f.isDefault === 'Y').dictValue; |
| | | this.queryParams.timeType = this.dateTypeOptions.find( |
| | | f => f.isDefault === "Y" |
| | | ).dictValue; |
| | | }); |
| | | this.getConfigKey("processEnergy").then(response => { |
| | | this.skinName = response.msg; |
| | |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 210+ 'px' |
| | | this.bodyStyle.height = window.innerHeight - 210 + "px"; |
| | | }, |
| | | getList() { |
| | | this.queryParams.indexCode = this.$route.query.modelCode; |
| | | getDataList(this.queryParams).then(response => { |
| | | this.energyList = response.rows; |
| | | this.total = response.total; |
| | | }) |
| | | }); |
| | | getPointFacility().then(response => { |
| | | this.indexCategoryOptions = response.data; |
| | | }); |
| | |
| | | let title = ""; |
| | | response.data.forEach(item => { |
| | | expectedData.push(this.numFilter(item.value)); |
| | | actualData.push(item.timeCode.slice(item.timeCode.length - 2, item.timeCode.length) + "æ¶"); |
| | | actualData.push( |
| | | item.timeCode.slice( |
| | | item.timeCode.length - 2, |
| | | item.timeCode.length |
| | | ) + "æ¶" |
| | | ); |
| | | title = item.indexName + "(" + item.unitId + ")"; |
| | | }) |
| | | }); |
| | | this.lineChartData.actualData = actualData; |
| | | this.lineChartData.expectedData = expectedData; |
| | | this.lineChartData.title = title |
| | | this.lineChartData.title = title; |
| | | this.$refs.LineChart.initChart(this.lineChartData); |
| | | this.$refs.BarChart.initChart(this.lineChartData); |
| | | }) |
| | | }); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.queryParams.indexStorageId = ''; |
| | | this.queryParams.indexStorageId = ""; |
| | | this.handleQuery(); |
| | | }, |
| | | numFilter(value) {// æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ''; |
| | | if (!isNaN(value) && value !== '' && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName) |
| | | numFilter(value) { |
| | | // æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ""; |
| | | if (!isNaN(value) && value !== "" && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName); |
| | | } else { |
| | | realVal = '0' |
| | | realVal = "0"; |
| | | } |
| | | return realVal |
| | | return realVal; |
| | | }, |
| | | getTime() { |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.queryParams.dataTime = year + '-' + month + '-' + date |
| | | }, |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.queryParams.dataTime = year + "-" + month + "-" + date; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | |
| | | @keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | @-webkit-keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | |
| | | top: 40, |
| | | containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: actualData, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | type: 'value', |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: "value", |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }], |
| | | series: [{ |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: title, |
| | | type: 'bar', |
| | | stack: 'vistors', |
| | | barWidth: '60%', |
| | | type: "bar", |
| | | stack: "vistors", |
| | | barWidth: "60%", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: { |
| | | data: actualData, |
| | | type: 'category', |
| | | type: "category" |
| | | }, |
| | | grid: { |
| | | left: 10, |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | legend: { |
| | | data: [] |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | name: title, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | }) |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div> |
| | | <basic-container> |
| | | <el-form :model="queryParams" ref="queryForm" label-width="68px" class="special-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | label-width="68px" |
| | | class="special-form" |
| | | > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="éç¹è®¾å¤"> |
| | | <el-select v-model="queryParams.indexStorageId" placeholder="è¯·éæ©éç¹è®¾å¤" size="small" style="width: 100%"> |
| | | <el-select |
| | | v-model="queryParams.indexStorageId" |
| | | placeholder="è¯·éæ©éç¹è®¾å¤" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="dict in indexCategoryOptions" |
| | | :key="dict.id" |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ç»è®¡æ¶é´"> |
| | | <el-date-picker clearable size="small" style="width: 100%" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="queryParams.dataTime" |
| | | type="month" |
| | | :clearable="false" |
| | | value-format="yyyy-MM" |
| | | placeholder="éæ©æ¥æ"> |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item class="operation"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | <!--<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导åº</el-button>--> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form-item>--> |
| | | </basic-container> |
| | | <basic-container :bodyStyle="bodyStyle" style="margin-top: 16px"> |
| | | <div class="el-table el-table--fit el-table--scrollable-x el-table--enable-row-hover el-table--medium"> |
| | | <div class="el-table__body-wrapper is-scrolling-left"> |
| | | <table class="el-table__body tableList" cellspacing="0" cellpadding="0" style="width: 2600px"> |
| | | <tr v-for="item in tableHead"> |
| | | <td style="background: #D5D5D5;width: 80px">æ²çº¿éæ©</td> |
| | | <td style="background: #D5D5D5;width: 240px">è½æºææ åç§°</td> |
| | | <td style="background: #D5D5D5;">{{ item.value1 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value2 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value3 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value4 }}</td> |
| | | <td style="background: #D5D5D5">{{ item.value5 }}</td> |
| | | <td style="background: #D5D5D5">{{ item.value6 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value7 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value8 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value9 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value10 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value11 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value12 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value13 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value14 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value15 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value16 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value17 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value18 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value19 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value20 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value21 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value22 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value23 }}</td> |
| | | <td style="background: #D5D5D5">{{ item.value24 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value25 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value26 }}</td> |
| | | <td style="background: #D5D5D5;">{{ item.value27 }}</td> |
| | | <td style="background: #D5D5D5;" v-if="item.value29 !=null">{{ item.value28 }}</td> |
| | | <td style="background: #D5D5D5;" v-if="item.value29 !=null">{{ item.value29 }}</td> |
| | | <td style="background: #D5D5D5;" v-if="item.value30 !=null">{{ item.value30 }}</td> |
| | | <td style="background: #D5D5D5;" v-if="item.value31 !=null">{{ item.value31 }}</td> |
| | | </tr> |
| | | <tr v-for="data in tableData"> |
| | | <td style="width: 80px"> |
| | | <el-button icon="el-icon-search" circle @click="selectChange(data.indexId)" |
| | | style="font-size: 10px"></el-button> |
| | | </td> |
| | | <td style="width: 240px">{{ data.indexName }}</td> |
| | | <td>{{ numFilter(data.value1) }}</td> |
| | | <td>{{ numFilter(data.value2) }}</td> |
| | | <td>{{ numFilter(data.value3) }}</td> |
| | | <td>{{ numFilter(data.value4) }}</td> |
| | | <td>{{ numFilter(data.value5) }}</td> |
| | | <td>{{ numFilter(data.value6) }}</td> |
| | | <td>{{ numFilter(data.value7) }}</td> |
| | | <td>{{ numFilter(data.value8) }}</td> |
| | | <td>{{ numFilter(data.value9) }}</td> |
| | | <td>{{ numFilter(data.value10) }}</td> |
| | | <td>{{ numFilter(data.value11) }}</td> |
| | | <td>{{ numFilter(data.value12) }}</td> |
| | | <td>{{ numFilter(data.value13) }}</td> |
| | | <td>{{ numFilter(data.value14) }}</td> |
| | | <td>{{ numFilter(data.value15) }}</td> |
| | | <td>{{ numFilter(data.value16) }}</td> |
| | | <td>{{ numFilter(data.value17) }}</td> |
| | | <td>{{ numFilter(data.value18) }}</td> |
| | | <td>{{ numFilter(data.value19) }}</td> |
| | | <td>{{ numFilter(data.value20) }}</td> |
| | | <td>{{ numFilter(data.value21) }}</td> |
| | | <td>{{ numFilter(data.value22) }}</td> |
| | | <td>{{ numFilter(data.value23) }}</td> |
| | | <td>{{ numFilter(data.value24) }}</td> |
| | | <td>{{ numFilter(data.value25) }}</td> |
| | | <td>{{ numFilter(data.value26) }}</td> |
| | | <td>{{ numFilter(data.value27) }}</td> |
| | | <td v-if="data.count>=28">{{ numFilter(data.value28) }}</td> |
| | | <td v-if="data.count>=29">{{ numFilter(data.value29) }}</td> |
| | | <td v-if="data.count>=30">{{ numFilter(data.value30) }}</td> |
| | | <td v-if="data.count==31">{{ numFilter(data.value31) }}</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="energyList" |
| | | border |
| | | style="width: 100%;" |
| | | class="tableList" |
| | | > |
| | | <el-table-column fixed label="æ²çº¿éæ©"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | icon="el-icon-search" |
| | | circle |
| | | @click="selectChange(scope.row.indexId)" |
| | | style="font-size: 10px" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed |
| | | prop="indexName" |
| | | align="center" |
| | | label="è½æºææ åç§°" |
| | | min-width="240px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | v-for="index in 31" |
| | | :key="index" |
| | | :label="`${index}æ¥`" |
| | | align="center" |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span style="font-size: 12px"> |
| | | {{ numFilter(scope.row[`value${index}`]) || "--" }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getDataList, exportList, getlistChart} from "@/api/keyEquipment/monthlykeyEquipment/monthlykeyEquipment"; |
| | | import { |
| | | getDataList, |
| | | exportList, |
| | | getlistChart |
| | | } from "@/api/keyEquipment/monthlykeyEquipment/monthlykeyEquipment"; |
| | | import {getPointFacility} from "@/api/keyEquipment/dailykeyEquipment/dailykeyEquipment"; |
| | | import LineChart from './LineChart' |
| | | import LineChart from "./LineChart"; |
| | | import BarChart from "./BarChart"; |
| | | import mixins from "@/layout/mixin/getHeight"; |
| | | |
| | |
| | | dataTime: undefined, |
| | | timeType: "DAY", |
| | | indexType: undefined, |
| | | indexStorageId: undefined, |
| | | indexStorageId: undefined |
| | | }, |
| | | skinName: "", |
| | | lineChartData: {expectedData: [], actualData: []}, |
| | | lineChartData: { expectedData: [], actualData: [] } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 210+ 'px' |
| | | this.bodyStyle.height = window.innerHeight - 210 + "px"; |
| | | }, |
| | | getList() { |
| | | this.queryParams.indexCode = this.$route.query.modelCode; |
| | | getDataList(this.queryParams).then(response => { |
| | | this.tableData = response.data.tabledata; |
| | | this.tableHead = response.data.tablehead; |
| | | this.total = response.data.total |
| | | }) |
| | | this.total = response.data.total; |
| | | }); |
| | | getPointFacility().then(response => { |
| | | this.indexCategoryOptions = response.data; |
| | | }); |
| | |
| | | let title = ""; |
| | | response.data.forEach(item => { |
| | | expectedData.push(this.numFilter(item.value)); |
| | | actualData.push(item.timeCode.slice(item.timeCode.length - 2, item.timeCode.length) + "æ¥"); |
| | | actualData.push( |
| | | item.timeCode.slice( |
| | | item.timeCode.length - 2, |
| | | item.timeCode.length |
| | | ) + "æ¥" |
| | | ); |
| | | title = item.indexName + "(" + item.unitId + ")"; |
| | | }) |
| | | }); |
| | | this.lineChartData.actualData = actualData; |
| | | this.lineChartData.expectedData = expectedData; |
| | | this.lineChartData.title = title |
| | | this.lineChartData.title = title; |
| | | this.$refs.LineChart.initChart(this.lineChartData); |
| | | this.$refs.BarChart.initChart(this.lineChartData); |
| | | }) |
| | | }); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.queryParams.indexStorageId = ''; |
| | | this.queryParams.indexStorageId = ""; |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length != 1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map(item => item.id); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºç»¼åè½è?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºç»¼åè½è?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | return exportList(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | numFilter(value) {// æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ''; |
| | | if (!isNaN(value) && value !== '' && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName) |
| | | numFilter(value) { |
| | | // æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ""; |
| | | if (!isNaN(value) && value !== "" && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName); |
| | | } else { |
| | | realVal = '0' |
| | | realVal = "0"; |
| | | } |
| | | return realVal |
| | | return realVal; |
| | | }, |
| | | getTime() { |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.queryParams.dataTime = year + '-' + month |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.queryParams.dataTime = year + "-" + month; |
| | | /*let startTime = year + '-' + month + '-' + date |
| | | let endTime = year + '-' + month + '-' + (date + 1) |
| | | this.dateRange = [startTime, endTime]*/ |
| | | }, |
| | | |
| | | handleTime(date) { |
| | | if (date == 'MONTH') { |
| | | this.dateTypes = 'year', |
| | | this.valueFormat = 'yyyy' |
| | | } else if (date == 'DAY') { |
| | | this.dateTypes = 'month', |
| | | this.valueFormat = 'yyyy-MM' |
| | | if (date == "MONTH") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (date == "DAY") { |
| | | (this.dateTypes = "month"), (this.valueFormat = "yyyy-MM"); |
| | | } else { |
| | | this.dateTypes = 'date', |
| | | this.valueFormat = 'yyyy-MM-dd' |
| | | (this.dateTypes = "date"), (this.valueFormat = "yyyy-MM-dd"); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | |
| | | @keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | @-webkit-keyframes fade { |
| | | from { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | 50% { |
| | | opacity: 0.4; |
| | | } |
| | | to { |
| | | opacity: 1.0; |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .el-table--enable-row-hover .el-table__body tr:hover > td { |
| | | background: #CFDCF5; |
| | | background: #cfdcf5; |
| | | } |
| | | .special-form { |
| | | @import "~@/assets/styles/common-table-form.scss"; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: 'shadow' // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | // åæ è½´æç¤ºå¨ï¼åæ è½´è§¦åææ |
| | | type: "shadow" // é»è®¤ä¸ºç´çº¿ï¼å¯é为ï¼'line' | 'shadow' |
| | | } |
| | | }, |
| | | grid: { |
| | |
| | | top: 40, |
| | | containLabel: true |
| | | }, |
| | | xAxis: [{ |
| | | type: 'category', |
| | | xAxis: [ |
| | | { |
| | | type: "category", |
| | | data: actualData, |
| | | axisTick: { |
| | | alignWithLabel: true |
| | | } |
| | | }], |
| | | yAxis: [{ |
| | | type: 'value', |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: "value", |
| | | axisTick: { |
| | | show: false |
| | | } |
| | | }], |
| | | series: [{ |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | name: title, |
| | | type: 'bar', |
| | | stack: 'vistors', |
| | | barWidth: '60%', |
| | | type: "bar", |
| | | stack: "vistors", |
| | | barWidth: "60%", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts' |
| | | require('echarts/theme/macarons') // echarts theme |
| | | import resize from '../../dashboard/mixins/resize' |
| | | import echarts from "echarts"; |
| | | require("echarts/theme/macarons"); // echarts theme |
| | | import resize from "../../dashboard/mixins/resize"; |
| | | |
| | | export default { |
| | | mixins: [resize], |
| | | props: { |
| | | className: { |
| | | type: String, |
| | | default: 'chart' |
| | | default: "chart" |
| | | }, |
| | | width: { |
| | | type: String, |
| | | default: '100%' |
| | | default: "100%" |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: '300px' |
| | | default: "300px" |
| | | }, |
| | | autoResize: { |
| | | type: Boolean, |
| | |
| | | data() { |
| | | return { |
| | | chart: null |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | chartData: { |
| | | deep: true, |
| | | handler(val) { |
| | | this.setOptions(val) |
| | | this.setOptions(val); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initChart() |
| | | }) |
| | | this.initChart(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | if (!this.chart) { |
| | | return |
| | | return; |
| | | } |
| | | this.chart.dispose() |
| | | this.chart = null |
| | | this.chart.dispose(); |
| | | this.chart = null; |
| | | }, |
| | | methods: { |
| | | initChart() { |
| | | this.chart = echarts.init(this.$el, 'macarons') |
| | | this.setOptions(this.chartData) |
| | | this.chart = echarts.init(this.$el, "macarons"); |
| | | this.setOptions(this.chartData); |
| | | }, |
| | | setOptions({ expectedData, actualData,title } = {}) { |
| | | this.chart.setOption({ |
| | | title: { |
| | | text: title, |
| | | left: 'left', |
| | | left: "left", |
| | | textStyle: { |
| | | color: '#606266', |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | xAxis: { |
| | | data: actualData, |
| | | type: 'category', |
| | | type: "category" |
| | | }, |
| | | grid: { |
| | | left: 10, |
| | |
| | | containLabel: true |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | trigger: "axis", |
| | | axisPointer: { |
| | | type: 'cross' |
| | | type: "cross" |
| | | }, |
| | | padding: [5, 10] |
| | | }, |
| | |
| | | legend: { |
| | | data: [] |
| | | }, |
| | | series: [{ |
| | | series: [ |
| | | { |
| | | name: title, |
| | | itemStyle: { |
| | | normal: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | lineStyle: { |
| | | color: '#FF005A', |
| | | color: "#FF005A", |
| | | width: 2 |
| | | } |
| | | } |
| | | }, |
| | | smooth: true, |
| | | type: 'line', |
| | | type: "line", |
| | | data: expectedData, |
| | | animationDuration: 2800, |
| | | animationEasing: 'cubicInOut' |
| | | }] |
| | | }) |
| | | animationEasing: "cubicInOut" |
| | | } |
| | | ] |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <div class="logo-page"> |
| | | <div class="logo-png"> |
| | | <img |
| | | style="width: 208px;margin-right: 30px " |
| | | :src="'https://www.toray.cn/shared/images/toray_logo_ch.svg'" |
| | | style="width: 80px;margin-right: 30px " |
| | | src="@/assets/logo/logo.png" |
| | | alt="" |
| | | /> |
| | | <div>综åè½æºç®¡çç³»ç»</div> |
| | | <div>äºè·¯ç»¼åè½æºç®¡çç³»ç»</div> |
| | | </div> |
| | | <div class="login"> |
| | | <!-- <div class="demo-image"> |
| | | <el-image style="width: 75%;" :src="logo"></el-image> |
| | | </div> --> |
| | | <div class="demo-image"> |
| | | <el-image style="width: 80%;" :src="logo"></el-image> |
| | | </div> |
| | | <div class="login-form"> |
| | | <el-form ref="loginForm" :model="loginForm" :rules="loginRules"> |
| | | <!-- <div class="title">ç¨æ·ç»å½</div> --> |
| | | <div class="logo-view title"> |
| | | <div class="title">ç¨æ·ç»å½</div> |
| | | <!-- <div class="logo-view title"> |
| | | <img |
| | | style="width: 100px;margin-right: 30px " |
| | | :src="'https://www.toray.cn/shared/images/toray_logo_ch.svg'" |
| | | alt="" |
| | | /> |
| | | <div>综åè½æºç®¡çç³»ç»</div> |
| | | </div> |
| | | </div> --> |
| | | <el-form-item prop="username" style="margin-bottom: 21px"> |
| | | <el-input |
| | | v-model="loginForm.username" |
| | |
| | | <style rel="stylesheet/scss" lang="scss" scoped> |
| | | .logo-page { |
| | | height: 100%; |
| | | background-image: url("../assets/image/bg.jpg"); |
| | | // background-image: url("../assets/image/login-background.png"); |
| | | // background-image: url("../assets/image/bg.jpg"); |
| | | background-image: url("../assets/image/login-background.png"); |
| | | background-size: cover; |
| | | overflow: hidden; |
| | | // background: ; |
| | |
| | | // background: linear-gradient(90deg, #101d32 0%, rgba(0, 0, 0, 0.5) 100%); |
| | | |
| | | .logo-png { |
| | | font-size: 24px; |
| | | font-size: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | font-weight: bold; |
| | | color: #fff; |
| | | color: #333; |
| | | padding: 3.4% 0 0 74px; |
| | | position: absolute; |
| | | } |
| | |
| | | border-radius: 4px; |
| | | // box-shadow: 0 7px 14px 6px #2f4b9a; |
| | | margin-top: 6px; |
| | | border: 1px solid #061844; |
| | | background: rgba($color: #ffffff, $alpha: 0.06); |
| | | // border: 1px solid #061844; |
| | | background: rgba($color: #437ed0, $alpha: 0.06); |
| | | |
| | | .logo-view { |
| | | display: flex; |
| | |
| | | font-weight: 600; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | background: rgb(255, 255, 255, 0.6) !important; |
| | | background-color: rgb(255, 255, 255, 0.6) !important; |
| | | border: 1px solid #dcdfe6 !important; |
| | | color: #606266 !important; |
| | | } |
| | | |
| | | .el-input { |
| | | height: 38px; |
| | | |
| | |
| | | <template> |
| | | <!-- 导å
¥è¡¨ --> |
| | | <el-dialog :title="title" :visible.sync="open" :destroy-on-close="true" :append-to-body="true" width="800px" top="5vh"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | :destroy-on-close="true" |
| | | :append-to-body="true" |
| | | width="800px" |
| | | top="5vh" |
| | | > |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="createIndex">çæææ </el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="createIndex" |
| | | >çæææ </el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | |
| | | <el-row> |
| | | <el-table v-loading="loading" :data="impIndexList" stripe max-height="350"> |
| | | <el-table v-loading="loading" :data="impIndexList" max-height="350"> |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="code" /> |
| | | <el-table-column label="ææ åç§°" align="center" prop="name" /> |
| | | <el-table-column label="ææ ç±»å" align="center" prop="indexType" :formatter="indexTypeFormat" /> |
| | | <el-table-column label="åä½" align="center" prop="unitId" :formatter="unitIdFormat" /> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column |
| | | label="ææ ç±»å" |
| | | align="center" |
| | | prop="indexType" |
| | | :formatter="indexTypeFormat" |
| | | /> |
| | | <el-table-column |
| | | label="åä½" |
| | | align="center" |
| | | prop="unitId" |
| | | :formatter="unitIdFormat" |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['meter:annex:remove']" |
| | | >å é¤</el-button> |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | implementId:'', |
| | | implementId: "", |
| | | tableName: undefined |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.queryParams.implementId = impid; |
| | | this.meterid = impid; |
| | | this.getList(); |
| | | this.title='ç¼å· '+code+' ææ '; |
| | | this.title = "ç¼å· " + code + " ææ "; |
| | | this.open = true; |
| | | }, |
| | | // ææ ç±»ååå
¸ç¿»è¯ |
| | |
| | | this.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | implementId:'', |
| | | implementId: "", |
| | | tableName: undefined |
| | | }; |
| | | //æ¸
空ä¸ä¼ ç»ä»¶çæä»¶å表 |
| | |
| | | createIndex() { |
| | | let aa = this.meterid; |
| | | console.log("aa==="+aa); |
| | | this.$confirm('æ¯å¦ç¡®è®¤éæ°çæå¨å
·ç¼ç 为"' + this.qjcode + '"çææ å?éæ°çæåææææ ä¼è¿åå°æ¨¡æ¿ç¶æ', "è¦å", { |
| | | this.$confirm( |
| | | 'æ¯å¦ç¡®è®¤éæ°çæå¨å
·ç¼ç 为"' + |
| | | this.qjcode + |
| | | '"çææ å?éæ°çæåææææ ä¼è¿åå°æ¨¡æ¿ç¶æ', |
| | | "è¦å", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function() { |
| | | } |
| | | ) |
| | | .then(function() { |
| | | return addIndex(aa); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.msgSuccess("ææ çææå"); |
| | | }).catch(function() {}); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | /** å
³éæé®æä½ */ |
| | | handclose() |
| | | { |
| | | handclose() { |
| | | this.open=false; |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å 餿æ ç¼ç 为"' + row.code + '"çææ å?', "è¦å", { |
| | | this.$confirm( |
| | | 'æ¯å¦ç¡®è®¤å 餿æ ç¼ç 为"' + row.code + '"çææ å?', |
| | | "è¦å", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function() { |
| | | } |
| | | ) |
| | | .then(function() { |
| | | return delIndex(row.indexId); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.msgSuccess("ææ å 餿å"); |
| | | }).catch(function() {}); |
| | | }, |
| | | }) |
| | | .catch(function() {}); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | </script> |
| | |
| | | <template> |
| | | <div> |
| | | <basic-container> |
| | | <el-form :model="queryParams" ref="queryForm" label-width="72px" class="special-form"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | label-width="72px" |
| | | class="special-form" |
| | | > |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ç¼ç " prop="code"> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="ç§ç±»" prop="meterType"> |
| | | <el-select v-model="queryParams.meterType" placeholder="è¯·éæ©ç§ç±»" clearable size="small" style="width: 100%"> |
| | | <el-select |
| | | v-model="queryParams.meterType" |
| | | placeholder="è¯·éæ©ç§ç±»" |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="dict in meterTypeOptions" |
| | | :key="dict.dictValue" |
| | |
| | | <!-- </el-col>--> |
| | | <el-col :span="6"> |
| | | <el-form-item class="operation"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table v-loading="loading" :data="implementList" :height="height" @selection-change="handleSelectionChange"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="implementList" |
| | | :height="height" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center"/> |
| | | <el-table-column label="ç¼ç " align="center" prop="code" show-overflow-tooltip/> |
| | | <el-table-column label="å¨å
·åç§°" align="center" prop="meterName" show-overflow-tooltip/> |
| | | <el-table-column label="ç§ç±»" align="center" prop="meterType" :formatter="meterTypeFormat" show-overflow-tooltip/> |
| | | <el-table-column label="è§æ ¼åå·" align="center" prop="modelNumber" show-overflow-tooltip/> |
| | | <el-table-column label="æµéèå´" align="center" prop="measureRange" show-overflow-tooltip/> |
| | | <el-table-column label="ç产åå" align="center" prop="manufacturer" show-overflow-tooltip/> |
| | | <el-table-column label="å®è£
ä½ç½®" align="center" prop="installactionLocation" show-overflow-tooltip/> |
| | | <el-table-column label="ç¶æ" align="center" prop="meterStatus" :formatter="meterStatusFormat" show-overflow-tooltip/> |
| | | <el-table-column label="æä½" align="center" width="240" class-name="small-padding fixed-width"> |
| | | <el-table-column |
| | | label="ç¼ç " |
| | | align="center" |
| | | prop="code" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="å¨å
·åç§°" |
| | | align="center" |
| | | prop="meterName" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ç§ç±»" |
| | | align="center" |
| | | prop="meterType" |
| | | :formatter="meterTypeFormat" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="è§æ ¼åå·" |
| | | align="center" |
| | | prop="modelNumber" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="æµéèå´" |
| | | align="center" |
| | | prop="measureRange" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ç产åå" |
| | | align="center" |
| | | prop="manufacturer" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="å®è£
ä½ç½®" |
| | | align="center" |
| | | prop="installactionLocation" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="ç¶æ" |
| | | align="center" |
| | | prop="meterStatus" |
| | | :formatter="meterStatusFormat" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | width="240" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | /> |
| | | </basic-container> |
| | | <!-- æ·»å æä¿®æ¹è®¡éå¨å
·æ¡£æ¡ç»´æ¤å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="820px" class="dialog-form-row"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="820px" |
| | | class="dialog-form-row" |
| | | > |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="8"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è§æ ¼åå·" prop="modelNumber" label-width="110px"> |
| | | <el-input v-model="form.modelNumber" placeholder="请è¾å
¥è§æ ¼åå·"/> |
| | | <el-form-item |
| | | label="è§æ ¼åå·" |
| | | prop="modelNumber" |
| | | label-width="110px" |
| | | > |
| | | <el-input |
| | | v-model="form.modelNumber" |
| | | placeholder="请è¾å
¥è§æ ¼åå·" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æµéèå´" prop="measureRange"> |
| | | <el-input v-model="form.measureRange" placeholder="请è¾å
¥æµéèå´"/> |
| | | <el-input |
| | | v-model="form.measureRange" |
| | | placeholder="请è¾å
¥æµéèå´" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="ç产åå" prop="manufacturer"> |
| | | <el-input v-model="form.manufacturer" placeholder="请è¾å
¥ç产åå"/> |
| | | <el-input |
| | | v-model="form.manufacturer" |
| | | placeholder="请è¾å
¥ç产åå" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="è´è´£äºº" prop="personCharge" label-width="110px"> |
| | | <el-input v-model="form.personCharge" placeholder="请è¾å
¥è´è´£äºº"/> |
| | | <el-form-item |
| | | label="è´è´£äºº" |
| | | prop="personCharge" |
| | | label-width="110px" |
| | | > |
| | | <el-input |
| | | v-model="form.personCharge" |
| | | placeholder="请è¾å
¥è´è´£äºº" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="å®è£
ä½ç½®" prop="installactionLocation"> |
| | | <el-input v-model="form.installactionLocation" placeholder="请è¾å
¥å®è£
ä½ç½®"/> |
| | | <el-input |
| | | v-model="form.installactionLocation" |
| | | placeholder="请è¾å
¥å®è£
ä½ç½®" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="èµ·å§æ¶é´" prop="startTime"> |
| | | <el-date-picker clearable size="small" style="width: 100%" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="form.startTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="éæ©èµ·å§æ¶é´"> |
| | | placeholder="éæ©èµ·å§æ¶é´" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æ£å®å¨æ(天)" prop="checkCycle" label-width="110px"> |
| | | <el-input v-model="form.checkCycle" placeholder="请è¾å
¥æ£å®å¨æ" |
| | | oninput="if(value.length>4)value=value.slice(0,4)"/> |
| | | <el-form-item |
| | | label="æ£å®å¨æ(天)" |
| | | prop="checkCycle" |
| | | label-width="110px" |
| | | > |
| | | <el-input |
| | | v-model="form.checkCycle" |
| | | placeholder="请è¾å
¥æ£å®å¨æ" |
| | | oninput="if(value.length>4)value=value.slice(0,4)" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æè¿æ¶é´" prop="putrunTime"> |
| | | <el-date-picker clearable size="small" style="width: 100%" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 100%" |
| | | v-model="form.putrunTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="éæ©æè¿æ¶é´"> |
| | | placeholder="éæ©æè¿æ¶é´" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="æé卿(天)" prop="reminderCycle" label-width="110px"> |
| | | <el-input v-model="form.reminderCycle" placeholder="请è¾å
¥æé卿" |
| | | oninput="if(value.length>4)value=value.slice(0,4)"/> |
| | | <el-form-item |
| | | label="æé卿(天)" |
| | | prop="reminderCycle" |
| | | label-width="110px" |
| | | > |
| | | <el-input |
| | | v-model="form.reminderCycle" |
| | | placeholder="请è¾å
¥æé卿" |
| | | oninput="if(value.length>4)value=value.slice(0,4)" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨" prop="remark" label-width="110px"> |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请è¾å
¥å
容"></el-input> |
| | | <el-input |
| | | v-model="form.remark" |
| | | type="textarea" |
| | | placeholder="请è¾å
¥å
容" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-dialog> |
| | | |
| | | <!-- 计éå¨å
·æ¡£æ¡ 导å
¥å¯¹è¯æ¡ --> |
| | | <el-dialog :title="upload.title" :visible.sync="upload.open" :destroy-on-close="true" width="400px"> |
| | | <el-dialog |
| | | :title="upload.title" |
| | | :visible.sync="upload.open" |
| | | :destroy-on-close="true" |
| | | width="400px" |
| | | > |
| | | <el-upload |
| | | ref="upload" |
| | | :limit="1" |
| | |
| | | <em>ç¹å»ä¸ä¼ </em> |
| | | </div> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | <el-link type="info" style="font-size:12px;color:blue;" @click="importTemplate">ä¸è½½æ¨¡æ¿</el-link> |
| | | <el-link |
| | | type="info" |
| | | style="font-size:12px;color:blue;" |
| | | @click="importTemplate" |
| | | >ä¸è½½æ¨¡æ¿</el-link |
| | | > |
| | | </div> |
| | | <div class="el-upload__tip" style="color:red" slot="tip"> |
| | | 导å
¥æç¤ºï¼<br>1ãæ°å¢å¯¼å
¥,ä»
å
许导å
¥âxlsâæâxlsxâæ ¼å¼æä»¶ï¼ |
| | | <br>2ãç¼ç å¿
é¡»å¯ä¸,é夿°æ®æ æ³å¯¼å
¥ |
| | | <br>3ãç§ç±»åç¶æå¡«åéè¯¯çæ°æ®æ æ³å¯¼å
¥ |
| | | <br>4ãæ£å®å¨æãæé卿大äº0æ£æ´æ°,å¡«åé误åé»è®¤ä¸º1 |
| | | <br>5ãèµ·å§æ¶é´å¡«åé误æä¸å¡«åé»è®¤ä¸ºç©º |
| | | 导å
¥æç¤ºï¼<br />1ãæ°å¢å¯¼å
¥,ä»
å
许导å
¥âxlsâæâxlsxâæ ¼å¼æä»¶ï¼ |
| | | <br />2ãç¼ç å¿
é¡»å¯ä¸,é夿°æ®æ æ³å¯¼å
¥ |
| | | <br />3ãç§ç±»åç¶æå¡«åéè¯¯çæ°æ®æ æ³å¯¼å
¥ |
| | | <br />4ãæ£å®å¨æãæé卿大äº0æ£æ´æ°,å¡«åé误åé»è®¤ä¸º1 |
| | | <br />5ãèµ·å§æ¶é´å¡«åé误æä¸å¡«åé»è®¤ä¸ºç©º |
| | | </div> |
| | | |
| | | </el-upload> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">ç¡® å®</el-button> |
| | |
| | | <importFileTable ref="importFile" @ok="handleFjQuery"/> |
| | | |
| | | <importIndexTable ref="importIndex" @ok="handleFjQuery"/> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | meterType: undefined, |
| | | measureRange: undefined, |
| | | manufacturer: undefined, |
| | | installactionLocation: undefined, |
| | | installactionLocation: undefined |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | code: [ |
| | | {required: true, message: "ç¼ç ä¸è½ä¸ºç©º", trigger: "blur"} |
| | | ], |
| | | code: [{ required: true, message: "ç¼ç ä¸è½ä¸ºç©º", trigger: "blur" }], |
| | | meterName: [ |
| | | {required: true, message: "å¨å
·åç§°ä¸è½ä¸ºç©º", trigger: "blur"} |
| | | ], |
| | |
| | | {required: true, message: "æè¿æ¶é´ä¸è½ä¸ºç©º", trigger: "blur"} |
| | | ], |
| | | checkCycle: [ |
| | | {required: true, pattern: /^\+?[1-9]\d*$/, message: "æ£å®å¨æå¿
é¡»æ¯å¤§äº0çæ£æ´æ°", trigger: "blur"} |
| | | { |
| | | required: true, |
| | | pattern: /^\+?[1-9]\d*$/, |
| | | message: "æ£å®å¨æå¿
é¡»æ¯å¤§äº0çæ£æ´æ°", |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | reminderCycle: [ |
| | | {required: true, pattern: /^\+?[1-9]\d*$/, message: "æé卿å¿
é¡»æ¯å¤§äº0çæ£æ´æ°", trigger: "blur"} |
| | | ], |
| | | { |
| | | required: true, |
| | | pattern: /^\+?[1-9]\d*$/, |
| | | message: "æé卿å¿
é¡»æ¯å¤§äº0çæ£æ´æ°", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getDicts("sys_device_type").then(response => { |
| | | |
| | | for (let i = 0; i < response.data.length; i++) { |
| | | if (response.data[i].isDefault == "Y") { |
| | | this.myType = response.data[i].dictValue; |
| | |
| | | for (let i = 0; i < response.data.length; i++) { |
| | | if (response.data[i].isDefault == "Y") { |
| | | this.mystatus = response.data[i].dictValue; |
| | | |
| | | } |
| | | } |
| | | this.meterStatusOptions = response.data; |
| | |
| | | methods: { |
| | | setCharts() { |
| | | this.bodyStyle = { |
| | | height: window.innerHeight - 210 + 'px', |
| | | overflow: 'hidden' |
| | | } |
| | | this.height = window.innerHeight - 370; |
| | | height: window.innerHeight - 224 + "px", |
| | | overflow: "hidden" |
| | | }; |
| | | this.height = window.innerHeight - 360; |
| | | }, |
| | | /** æ¥è¯¢è®¡éå¨å
·æ¡£æ¡ç»´æ¤å表 */ |
| | | getList() { |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.codes = selection.map(item => item.code) |
| | | this.single = selection.length != 1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map(item => item.id); |
| | | this.codes = selection.map(item => item.code); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | const id = row.id || this.ids; |
| | | getImplement(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | const codes = row.code || this.codes; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤è®¡éå¨å
·æ¡£æ¡ç»´æ¤ç¼å·ä¸º"' + codes + '"ç计éå¨å
·æ¡£æ¡?', "è¦å", { |
| | | this.$confirm( |
| | | 'æ¯å¦ç¡®è®¤å é¤è®¡éå¨å
·æ¡£æ¡ç»´æ¤ç¼å·ä¸º"' + codes + '"ç计éå¨å
·æ¡£æ¡?', |
| | | "è¦å", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | } |
| | | ) |
| | | .then(function() { |
| | | return delImplement(ids); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.msgSuccess("å 餿å"); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºææè®¡éå¨å
·æ¡£æ¡ç»´æ¤æ°æ®é¡¹?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºææè®¡éå¨å
·æ¡£æ¡ç»´æ¤æ°æ®é¡¹?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | return exportImplement(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | /** 导å
¥æé®æä½ */ |
| | | handleImport() { |
| | | //this.$refs.upload.clearFiles(); |
| | | this.upload.title = "计éå¨å
·æ¡£æ¡å¯¼å
¥"; |
| | | this.upload.accept = ".xlsx, .xls"; |
| | | this.upload.url = process.env.VUE_APP_BASE_API + "/meter/implement/importData?updateSupport=0"; |
| | | this.upload.url = |
| | | process.env.VUE_APP_BASE_API + |
| | | "/meter/implement/importData?updateSupport=0"; |
| | | this.upload.open = true; |
| | | }, |
| | | /** ä¸è½½æ¨¡æ¿æä½ */ |
| | |
| | | <template> |
| | | <!-- 导å
¥è¡¨ --> |
| | | <el-dialog :title="title" :visible.sync="open" :destroy-on-close="true" :append-to-body="true" width="800px" top="5vh"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | :destroy-on-close="true" |
| | | :append-to-body="true" |
| | | width="800px" |
| | | top="5vh" |
| | | > |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item> |
| | | <!-- <el-button icon="el-icon-refresh" size="mini" @click="createIndex">çæææ </el-button>--> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | |
| | | <el-row> |
| | | <el-table v-loading="loading" :data="impIndexList" stripe max-height="350"> |
| | | <el-table v-loading="loading" :data="impIndexList" max-height="350"> |
| | | <el-table-column label="ææ ç¼ç " align="center" prop="code" /> |
| | | <el-table-column label="ææ åç§°" align="center" prop="name" /> |
| | | <el-table-column label="ææ ç±»å" align="center" prop="indexType" :formatter="indexTypeFormat" /> |
| | | <el-table-column label="åä½" align="center" prop="unitId" :formatter="unitIdFormat" /> |
| | | <el-table-column |
| | | label="ææ ç±»å" |
| | | align="center" |
| | | prop="indexType" |
| | | :formatter="indexTypeFormat" |
| | | /> |
| | | <el-table-column |
| | | label="åä½" |
| | | align="center" |
| | | prop="unitId" |
| | | :formatter="unitIdFormat" |
| | | /> |
| | | <!-- <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <!–<el-button |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | implementId:'', |
| | | implementId: "", |
| | | tableName: undefined |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.queryParams.implementId = impid; |
| | | this.meterid = impid; |
| | | this.getList(); |
| | | this.title='ç¼å· '+code+' ææ '; |
| | | this.title = "ç¼å· " + code + " ææ "; |
| | | this.open = true; |
| | | }, |
| | | // ææ ç±»ååå
¸ç¿»è¯ |
| | |
| | | this.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | implementId:'', |
| | | implementId: "", |
| | | tableName: undefined |
| | | }; |
| | | //æ¸
空ä¸ä¼ ç»ä»¶çæä»¶å表 |
| | |
| | | createIndex() { |
| | | let aa = this.meterid; |
| | | console.log("aa==="+aa); |
| | | this.$confirm('æ¯å¦ç¡®è®¤éæ°çæå¨å
·ç¼ç 为"' + this.qjcode + '"çææ å?éæ°çæåææææ ä¼è¿åå°æ¨¡æ¿ç¶æ', "è¦å", { |
| | | this.$confirm( |
| | | 'æ¯å¦ç¡®è®¤éæ°çæå¨å
·ç¼ç 为"' + |
| | | this.qjcode + |
| | | '"çææ å?éæ°çæåææææ ä¼è¿åå°æ¨¡æ¿ç¶æ', |
| | | "è¦å", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function() { |
| | | } |
| | | ) |
| | | .then(function() { |
| | | return addIndex(aa); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.msgSuccess("ææ çææå"); |
| | | }).catch(function() {}); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | /** å
³éæé®æä½ */ |
| | | handclose() |
| | | { |
| | | handclose() { |
| | | this.open=false; |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å 餿æ ç¼ç 为"' + row.code + '"çææ å?', "è¦å", { |
| | | this.$confirm( |
| | | 'æ¯å¦ç¡®è®¤å 餿æ ç¼ç 为"' + row.code + '"çææ å?', |
| | | "è¦å", |
| | | { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function() { |
| | | } |
| | | ) |
| | | .then(function() { |
| | | return delIndex(row.indexId); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.msgSuccess("ææ å 餿å"); |
| | | }).catch(function() {}); |
| | | }, |
| | | }) |
| | | .catch(function() {}); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | </script> |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | right: 0 |
| | | right: 0, |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | grid: { |
| | | left: 10, |
| | | right: 10, |
| | | bottom: "10%", |
| | | top: 30, |
| | | top: 50, |
| | | containLabel: true |
| | | }, |
| | | xAxis: [ |
| | |
| | | type: "value", |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | splitLine: { |
| | | show: false |
| | | } |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | legend: { |
| | | data: [] |
| | | data: [], |
| | | textStyle: { |
| | | color: "#fff" |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | }); |
| | | }, |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + "px"; |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 105 + "px" |
| | | height: window.innerHeight - 155 + "px" |
| | | }; |
| | | }, |
| | | |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | .chart-list { |
| | | margin-top: 16px; |
| | | // margin-top: 16px; |
| | | ::v-deep .el-card__body { |
| | | padding: 10px 12px; |
| | | } |
| | |
| | | }); |
| | | }, |
| | | setCharts() { |
| | | this.bodyStyle.height = window.innerHeight - 155 + "px"; |
| | | this.bodyStyle.height = window.innerHeight - 185 + "px"; |
| | | this.bodyStyleRight = { |
| | | ...this.bodyStyle, |
| | | height: window.innerHeight - 105 + "px" |
| | | height: window.innerHeight - 155 + "px" |
| | | }; |
| | | }, |
| | | |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | .chart-list { |
| | | margin-top: 16px; |
| | | // margin-top: 16px; |
| | | ::v-deep .el-card__body { |
| | | padding: 10px 12px; |
| | | } |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | :inline="true" |
| | | label-width="68px" |
| | | > |
| | | <el-form-item label="è½æºç±»å"> |
| | | <el-select v-model="queryParams.indexStorageId" placeholder="è¯·éæ©è½æºåç§"> |
| | | <el-select |
| | | v-model="queryParams.indexStorageId" |
| | | placeholder="è¯·éæ©è½æºåç§" |
| | | > |
| | | <el-option |
| | | v-for="dict in indexCategoryOptions" |
| | | :key="dict.dictValue" |
| | |
| | | </el-radio-group> |
| | | </el-form-item>--> |
| | | <el-form-item label="ç»è®¡æ¶é´"> |
| | | <el-date-picker clearable size="small" style="width: 200px" |
| | | <el-date-picker |
| | | clearable |
| | | size="small" |
| | | style="width: 200px" |
| | | v-model="queryParams.dataTime" |
| | | type="year" |
| | | value-format="yyyy" |
| | | placeholder="éæ©æ¥æ"> |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导åº</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æç´¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >éç½®</el-button |
| | | > |
| | | <el-button |
| | | type="warning" |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | >导åº</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-table :data="list" border style="width: 100%; margin-top: 20px" class="tableList" > |
| | | <el-table-column fixed prop="indexName" align="center" label="è½æºåç§°" min-width="240px"></el-table-column> |
| | | <el-table-column label="1æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value1)}}</template></el-table-column> |
| | | <el-table-column label="2æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value2)}}</template></el-table-column> |
| | | <el-table-column label="3æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value3)}}</template></el-table-column> |
| | | <el-table-column label="4æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value4)}}</template></el-table-column> |
| | | <el-table-column label="5æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value5)}}</template></el-table-column> |
| | | <el-table-column label="6æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value6)}}</template></el-table-column> |
| | | <el-table-column label="7æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value7)}}</template></el-table-column> |
| | | <el-table-column label="8æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value8)}}</template></el-table-column> |
| | | <el-table-column label="9æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value9)}}</template></el-table-column> |
| | | <el-table-column label="10æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value10)}}</template></el-table-column> |
| | | <el-table-column label="11æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value11)}}</template></el-table-column> |
| | | <el-table-column label="12æ" align="center" min-width="140px"> <template slot-scope="scope">{{numFilter(scope.row.value12)}}</template></el-table-column> |
| | | <el-table :data="list" border style="width: 100%; margin-top: 20px"> |
| | | <el-table-column |
| | | fixed |
| | | prop="indexName" |
| | | align="center" |
| | | label="è½æºææ åç§°" |
| | | min-width="240px" |
| | | ></el-table-column> |
| | | <el-table-column label="1æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value1) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="2æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value2) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="3æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value3) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="4æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value4) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="5æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value5) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="6æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value6) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="7æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value7) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="8æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value8) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="9æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value9) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="10æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value10) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="11æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value11) |
| | | }}</template></el-table-column |
| | | > |
| | | <el-table-column label="12æ" align="center" min-width="140px"> |
| | | <template slot-scope="scope">{{ |
| | | numFilter(scope.row.value12) |
| | | }}</template></el-table-column |
| | | > |
| | | </el-table> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { reportStatisticsList,exportList} from "@/api/reportForm/annualReport/annualReport"; |
| | | import { |
| | | reportStatisticsList, |
| | | exportList |
| | | } from "@/api/reportForm/annualReport/annualReport"; |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | beginTime:undefined, |
| | | endTime:undefined, |
| | | indexCode:undefined, |
| | | indexStorageId:undefined, |
| | | indexStorageId: undefined |
| | | }, |
| | | indexCategoryOptions:[], |
| | | indexCategoryOptions: [] |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | //this.loading = true; |
| | | this.queryParams.indexCode=this.modelCode; |
| | | let times=this.queryParams.dataTime.slice(0,4); |
| | | this.queryParams.beginTime=times+"-01-01 00:00:00" |
| | | this.queryParams.endTime=times+"-12-31 00:00:00" |
| | | this.queryParams.beginTime = times + "-01-01 00:00:00"; |
| | | this.queryParams.endTime = times + "-12-31 00:00:00"; |
| | | reportStatisticsList(this.queryParams).then(response => { |
| | | this.list=response.data; |
| | | this.loading = false; |
| | |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | |
| | | handleExport() { |
| | | const queryParams = this.queryParams; |
| | | queryParams.dataTime=queryParams.dataTime+"-01-01"; |
| | | this.$confirm('æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¡¨æ°æ®?', "è¦å", { |
| | | this.$confirm("æ¯å¦ç¡®è®¤å¯¼åºæææ¥è¡¨æ°æ®?", "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(function () { |
| | | }) |
| | | .then(function() { |
| | | return exportList(queryParams); |
| | | }).then(response => { |
| | | }) |
| | | .then(response => { |
| | | this.download(response.msg); |
| | | }).catch(function () { |
| | | }); |
| | | }) |
| | | .catch(function() {}); |
| | | }, |
| | | handleTime(date){ |
| | | if(date=='MONTH'){ |
| | | this.dateTypes= 'year', |
| | | this.valueFormat='yyyy' |
| | | }else if(date=='DAY'){ |
| | | this.dateTypes= 'month', |
| | | this.valueFormat='yyyy-MM' |
| | | if (date == "MONTH") { |
| | | (this.dateTypes = "year"), (this.valueFormat = "yyyy"); |
| | | } else if (date == "DAY") { |
| | | (this.dateTypes = "month"), (this.valueFormat = "yyyy-MM"); |
| | | }else{ |
| | | this.dateTypes= 'date', |
| | | this.valueFormat='yyyy-MM-dd' |
| | | (this.dateTypes = "date"), (this.valueFormat = "yyyy-MM-dd"); |
| | | } |
| | | }, |
| | | getTime(){ |
| | | var date = new Date() |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var date = date.getDate() |
| | | month = month < 10 ? '0' + month : month |
| | | date = date < 10 ? '0' + date : date |
| | | this.queryParams.dataTime=year + '-' + month |
| | | var date = new Date(); |
| | | var year = date.getFullYear(); |
| | | var month = date.getMonth() + 1; |
| | | var date = date.getDate(); |
| | | month = month < 10 ? "0" + month : month; |
| | | date = date < 10 ? "0" + date : date; |
| | | this.queryParams.dataTime = year + "-" + month; |
| | | }, |
| | | numFilter(value) {// æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = '' ; |
| | | if (!isNaN(value) && value !== '' && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName) |
| | | numFilter(value) { |
| | | // æªåå½åæ°æ®å°å°æ°ç¹åçå ä½ |
| | | let realVal = ""; |
| | | if (!isNaN(value) && value !== "" && value !== null) { |
| | | realVal = parseFloat(value).toFixed(this.skinName); |
| | | } else { |
| | | realVal = '--' |
| | | realVal = "--"; |
| | | } |
| | | return realVal |
| | | }, |
| | | return realVal; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .tableList th.is-leaf, .tableList td{ |
| | | border-bottom: 1px solid #000000 !important; |
| | | border-right: 1px solid #000000 !important; |
| | | } |
| | | .tableList{ |
| | | border: 1px solid #000000 !important; |
| | | } |
| | | </style> |
| | | <style scoped></style> |
energy_management_ui/src/views/reportForm/dailyReport/index.vue
energy_management_ui/src/views/reportForm/monthlyReport/index.vue
energy_management_ui/src/views/reportForm/statements/BarChart.vue
energy_management_ui/src/views/reportForm/statements/index.vue
energy_management_ui/src/views/stage/alarm/LinChart.vue
energy_management_ui/src/views/stage/alarm/alarmIndex.vue
energy_management_ui/src/views/system/menu/index.vue
energy_management_ui/src/views/workingProcedure/dailyWorkingProcedure/LineChart.vue
energy_management_ui/src/views/workingProcedure/monthlyWorkingProcedure/BarChart.vue
energy_management_ui/src/views/workingProcedure/monthlyWorkingProcedure/LineChart.vue
energy_management_ui/src/views/workingProcedure/monthlyWorkingProcedure/index.vue
energy_management_ui/src/views/workingProcedure/yearWorkingProcedure/BarChart.vue
energy_management_ui/src/views/workingProcedure/yearWorkingProcedure/LineChart.vue |