| | |
| | | <template> |
| | | <content-box style="margin-left: 4px; margin-right: 4px;" :title="battFullName"> |
| | | <div slot="box-tools" class="box-tools"> |
| | | <el-tooltip class="item" effect="dark" content="历史数据" placement="bottom"> |
| | | <i class="iconfont el-icon-jinru" @click="syncPage"></i> |
| | | </el-tooltip> |
| | | </div> |
| | | <div slot="box-tools" class="box-tools" style="right: 40px;"> |
| | | <el-tooltip class="item" effect="dark" content="历史实时数据" placement="bottom"> |
| | | <i class="el-iconfont el-icon-s-marketing"></i> |
| | | </el-tooltip> |
| | | </div> |
| | | <flex-layout :no-bg="true"> |
| | | <div class="content-header" slot="header"> |
| | | <div class="table-layout"> |
| | |
| | | } |
| | | }); |
| | | }, |
| | | // 向父级发送同步页面的指令 |
| | | syncPage() { |
| | | let batt = this.batt; |
| | | let search = |
| | | "?province=" + |
| | | batt.StationName1 + |
| | | "&city=" + |
| | | batt.StationName2 + |
| | | "&county=" + |
| | | batt.StationName5 + |
| | | "&home=" + |
| | | batt.StationName3 + |
| | | "&batt=" + |
| | | batt.BattGroupId; |
| | | window.parent.postMessage({ |
| | | cmd: "syncPage", |
| | | params: { |
| | | pageInfo: { |
| | | label: "历史数据", |
| | | name: "history", |
| | | src: "#/history" + search, |
| | | closable: true, |
| | | }, |
| | | }, |
| | | }, |
| | | "*" |
| | | ); |
| | | }, |
| | | }, |
| | | computed: { |
| | | battFullName() { |
| | |
| | | .wrap-item { |
| | | margin-right: 16px; |
| | | } |
| | | |
| | | .box-tools { |
| | | line-height: 32px; |
| | | } |
| | | |
| | | .box-tools .iconfont, |
| | | .box-tools .el-iconfont { |
| | | font-size: 24px; |
| | | } |
| | | |
| | | .box-tools .iconfont:hover, |
| | | .box-tools .el-iconfont:hover { |
| | | cursor: pointer; |
| | | color: #cfcfcf; |
| | | } |
| | | |
| | | .box-tools .iconfont:active, |
| | | .box-tools .el-iconfont:active { |
| | | color: #ff0000; |
| | | } |
| | | </style> |