| | |
| | | |
| | | .page-history-aio .el-table thead th { |
| | | background: #031a46; |
| | | } |
| | | |
| | | .dialog-table { |
| | | background: url("./img/science-black/dw_bg.jpg") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | |
| | | } |
| | | .page-history-aio .el-table thead th { |
| | | background: #0c3688; |
| | | } |
| | | |
| | | .dialog-table { |
| | | background: url("./img/science-blue/dw_bg.jpg") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | |
| | | margin-top: 16px; |
| | | margin-left: 8px; |
| | | margin-right: 8px; |
| | | } |
| | | |
| | | .dialog-table { |
| | | background: url("./img/science-green/dw_bg.jpg") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | |
| | | return axios({ |
| | | method: "post", |
| | | url: 'Battmon_testcapAction!add', |
| | | data: "json="+JSON.stringify(data) |
| | | data: "json=" + JSON.stringify(data) |
| | | }); |
| | | }, |
| | | /** |
| | |
| | | return axios({ |
| | | method: "post", |
| | | url: 'Battmon_testcapAction!serchByCondition', |
| | | data: "json="+JSON.stringify(data) |
| | | data: "json=" + JSON.stringify(data) |
| | | }); |
| | | }, |
| | | /** |
| | |
| | | return axios({ |
| | | method: "post", |
| | | url: 'Battmon_standardcurveAction!serchByCondition', |
| | | data: "json="+JSON.stringify(data) |
| | | data: "json=" + JSON.stringify(data) |
| | | }); |
| | | }, |
| | | /** |
| | |
| | | return axios({ |
| | | method: "post", |
| | | url: 'PwrdevDataHistoryAction_power_getPwrdevDataHistory', |
| | | data: "json="+JSON.stringify(data) |
| | | data: "json=" + JSON.stringify(data) |
| | | }); |
| | | }, |
| | | } |
| | | |
| | | /** |
| | | * 历史内阻数据查询 |
| | | * |
| | | * @param {[Number]} id 参数 |
| | | * |
| | | * @return {[Promise]} 返回结果 |
| | | */ |
| | | historyResData(id) { |
| | | return axios({ |
| | | method: "post", |
| | | url: 'BattresdataAction!getResInfoByBattGroupId', |
| | | data: "json=" + JSON.stringify({ |
| | | BattGroupId: id |
| | | }) |
| | | }); |
| | | } |
| | | }; |
New file |
| | |
| | | import { export_json_to_excel } from "@/assets/js/excel/Export2Excel"; |
| | | |
| | | function ExportFile(headers, list, name) { |
| | | let tHeader = []; |
| | | let filterVal = []; |
| | | headers.map((item, index) => { |
| | | tHeader.push(item.label); |
| | | filterVal.push(item.prop); |
| | | }); |
| | | let excelData = formatJson(filterVal, list); |
| | | |
| | | export_json_to_excel(tHeader, excelData, name); |
| | | } |
| | | |
| | | function formatJson(filterVal, jsonData) { |
| | | return jsonData.map(v => filterVal.map(j => v[j])); |
| | | } |
| | | |
| | | export default ExportFile; |
New file |
| | |
| | | <template> |
| | | <div class="tbl-container dialog-table" v-loading="loading"> |
| | | <flex-layout no-bg> |
| | | <el-table :data="tblData" height="100%"> |
| | | <el-table-column |
| | | v-for="item in tblHeader" :key="item.prop" |
| | | :label="item.label" :prop="item.prop" |
| | | align="center" :min-width="item.minWidth"></el-table-column> |
| | | </el-table> |
| | | <div class="flex-page-footer" slot="footer"> |
| | | <div class="el-pagination-btns"> |
| | | <el-button type="primary" round size="mini" icon="el-icon-search" @click="searchData">查询</el-button> |
| | | <el-button type="primary" round size="mini" icon="el-icon-wallet" @click="ExportFile">导出</el-button> |
| | | </div> |
| | | </div> |
| | | </flex-layout> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import exportFile from '@/assets/js/tools/exportFile'; |
| | | |
| | | export default { |
| | | props: { |
| | | batt: { |
| | | type: Object, |
| | | default() { |
| | | return {} |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | tblHeader: [ |
| | | { |
| | | label: '测试日期', |
| | | prop: 'time', |
| | | minWidth: 180 |
| | | } |
| | | ], |
| | | tblData: [] |
| | | } |
| | | }, |
| | | methods: { |
| | | historyResData(id) { |
| | | this.loading = true; |
| | | this.$apis.dataTest.history.historyResData(id).then(res=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | this.loading = false; |
| | | let list = []; |
| | | if(rs.code == 1) { |
| | | let data = rs.data; |
| | | let time = ""; |
| | | for(let i=0; i<data.length; i++) { |
| | | let item = data[i]; |
| | | if(time == item.test_starttime) { |
| | | let tmp = list[list.length-1]; |
| | | tmp.time = time; |
| | | tmp['mon'+item.mon_num] = item.mon_res; |
| | | }else { |
| | | time = item.test_starttime; |
| | | let tmp = {}; |
| | | tmp.time = time; |
| | | tmp['mon'+item.mon_num] = item.mon_res; |
| | | list.push(tmp); |
| | | } |
| | | } |
| | | }else { |
| | | this.$layer.msg(rs.msg); |
| | | } |
| | | this.tblData = list; |
| | | }).catch(error=>{ |
| | | this.loading = false; |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | searchData() { |
| | | let batt = this.batt; |
| | | this.historyResData(batt.BattGroupId); |
| | | }, |
| | | ExportFile() { |
| | | let batt = this.batt; |
| | | let text = batt.StationName+"-"+batt.BattGroupName+"-内阻信息"; |
| | | exportFile(this.tblHeader, this.tblData, text); |
| | | } |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | | mounted() { |
| | | let batt = this.batt; |
| | | let monCount = batt.MonCount?batt.MonCount:0; |
| | | for(let i=0; i<monCount; i++) { |
| | | let temp = { |
| | | label: '#'+(i+1), |
| | | prop: 'mon'+(i+1)+"1", |
| | | minWidth: 80 |
| | | }; |
| | | this.tblHeader.push(temp); |
| | | } |
| | | |
| | | // 查询历史数据 |
| | | //this.historyResData(batt.BattGroupId); |
| | | this.searchData(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .tbl-container { |
| | | height: 560px; |
| | | } |
| | | </style> |
| | |
| | | top="0" class="dialog-center" :modal-append-to-body="false"> |
| | | <ez-video v-if="esVideoDialog" :sn="esVideoSn"></ez-video> |
| | | </el-dialog> |
| | | <el-dialog title="历史内阻数据" width="1200px" :visible.sync="hisResDialog" :close-on-click-modal="false" |
| | | top="0" class="dialog-center" :modal-append-to-body="false"> |
| | | <history-res v-if="hisResDialog" :batt="batt"></history-res> |
| | | </el-dialog> |
| | | <right-menu :visible.sync="rightMenu.show" :x="rightMenu.x" :y="rightMenu.y"> |
| | | <div class="right-menu-list"> |
| | | <ul> |
| | | <li><a href="javascript:;" @click="payAttentionMon">添加关注单体</a></li> |
| | | <li><a href="javascript:;" @click="hisResDialog=true">导出历史内阻数据</a></li> |
| | | </ul> |
| | | </div> |
| | | </right-menu> |
| | |
| | | import HdwLight from '../dataMager/components/HdwLight.vue'; |
| | | import EzVideo from "@/components/ezVideo"; |
| | | import getDevType from "@/assets/js/tools/getDevType"; |
| | | import historyRes from '@/pages/dataTest/components/historyRes' |
| | | /* import moment from "moment"; */ |
| | | let vol, resChart, temp, conduct, currChart, leakVol; |
| | | let tblData = []; |
| | |
| | | NiBianInfoTab, |
| | | JggdInfoTab, |
| | | HdwLight, |
| | | historyRes, |
| | | // NiBianInfo, |
| | | }, |
| | | watch: { |
| | |
| | | let stateList = const_61850.stateList; |
| | | let historyStateList = const_61850.historyStateList; |
| | | return { |
| | | hisResDialog: false, |
| | | esVideoDialog: false, |
| | | esVideoSn: "", |
| | | maskShow: false, |