| | |
| | | msg: "损坏", |
| | | value: 3, |
| | | max: 59, |
| | | min: 0, |
| | | min: -Infinity, |
| | | } |
| | | ] |
| | | for(let i=0; i<statusList.length;i++) { |
| | |
| | | color: item.hColor, |
| | | }; |
| | | } else { |
| | | if(this.$CFG.clientName.name == "cdsh"){//成都石化定制 |
| | | if(this.$CFG.clientName.name === "cdsh"){//成都石化定制 |
| | | // 设置背景 |
| | | item.itemStyle = { |
| | | color: function (value) { |
| | |
| | | return maxColor; |
| | | } else{ |
| | | return minColor; |
| | | } |
| | | }, |
| | | }; |
| | | }else if(this.$CFG.clientName.name === "sxty") { |
| | | // 设置背景 |
| | | item.itemStyle = { |
| | | color: function (value) { |
| | | let val = value.value[1]; |
| | | if (val < item.markLine.data[0].yAxis) { |
| | | return minColor; |
| | | } else if(val > item.markLine.data[1].yAxis) { |
| | | return maxColor; |
| | | } |
| | | }, |
| | | }; |
| | |
| | | }, |
| | | }; |
| | | } |
| | | |
| | | |
| | | } |
| | | return item; |
| | | }); |
| | |
| | | }, |
| | | methods: { |
| | | getOption(opt) { |
| | | let unit = this.unit; |
| | | // 整体配置项 |
| | | let option = { |
| | | return { |
| | | animation: false, |
| | | color: this.getColor(opt), |
| | | title: this.getTitle(opt), |
| | |
| | | yAxis: this.getYAxis(opt), |
| | | series: this.getSeries(opt), |
| | | }; |
| | | return option; |
| | | }, |
| | | setOption(opt) { |
| | | let option = this.getOption(opt); |
| | |
| | | <template> |
| | | <content-box :title="fullStationName" class="mgl8"> |
| | | <div slot="box-tools" class="box-tools"> |
| | | <el-button type="danger" size="mini" @click="powerRemarksDialog=true">数据异常备注</el-button> |
| | | <el-button type="warning" size="mini" @click="alarmSourceManageDialog=true">告警来源设置</el-button> |
| | | </div> |
| | | <flex-layout> |
| | |
| | | :modal-append-to-body="false"> |
| | | <alarm-source-manage v-if="alarmSourceManageDialog" :id="powerInfo.powerDeviceId"></alarm-source-manage> |
| | | </el-dialog> |
| | | <power-remarks :visible.sync="powerRemarksDialog" v-if="powerRemarksDialog" :num="info.num"></power-remarks> |
| | | </content-box> |
| | | </template> |
| | | <script> |
| | |
| | | import { getInfoById, getACDCData } from "@/views/dataMager/js/power"; |
| | | import createWs from "@/assets/js/websocket"; |
| | | import AlarmSourceManage from "@/views/dataTest/components/alarmSourceManage.vue"; |
| | | import PowerRemarks from "@/views/dataMager/components/powerRemarks.vue"; |
| | | const WSMixin = createWs("RealTime"); |
| | | |
| | | export default { |
| | | components: { |
| | | PowerRemarks, |
| | | AlarmSourceManage, |
| | | ContentBox, |
| | | StateTabPane, |
| | |
| | | data() { |
| | | return { |
| | | alarmSourceManageDialog: false, |
| | | powerRemarksDialog: false, |
| | | timer: new Timeout(), |
| | | acTabs: "analog", |
| | | info: getPowerInfo(), |
| | |
| | | padding: 4px 4px 0 4px; |
| | | box-sizing: border-box; |
| | | } |
| | | .box-tools { |
| | | width: 220px; |
| | | } |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <flex-layout> |
| | | <div class="test-details"> |
| | | <!-- <div class="test-tools">--> |
| | | <!-- <el-button type="primary" size="mini">切换到数据模式</el-button>--> |
| | | <!-- </div>--> |
| | | <line-chart :start-zero="true" ref="lineChart" unit="AH"></line-chart> |
| | | </div> |
| | | <div class="footer"> |
| | | <el-button type="primary" size="mini" @click="goToRealTime">实时监控</el-button> |
| | | <el-button size="mini" type="success" @click="gotToHistory">历史监控</el-button> |
| | | </div> |
| | | </flex-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import LineChart from "@/components/myCharts/LineChart.vue"; |
| | | |
| | | export default { |
| | | name: "testDetails", |
| | | props: { |
| | | list: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | url: { |
| | | type: String, |
| | | default: "" |
| | | } |
| | | }, |
| | | components: {LineChart}, |
| | | chartOption() { |
| | | return { |
| | | series: [ |
| | | { |
| | | name: "实际容量", |
| | | data: [] |
| | | } |
| | | ], |
| | | }; |
| | | }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | methods: { |
| | | setOption() { |
| | | let chartOption = this.$options.chartOption(); |
| | | chartOption.series[0].data = this.list; |
| | | this.$refs.lineChart.setOption(chartOption); |
| | | }, |
| | | goToRealTime() { |
| | | this.$router.push("/dataTest/movingRingSystem" + this.url); |
| | | }, |
| | | gotToHistory() { |
| | | this.$router.push("/dataTest/history" + this.url); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.setOption(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .test-details { |
| | | position: relative; |
| | | width: 1200px; |
| | | height: 500px; |
| | | |
| | | .test-tools { |
| | | position: absolute; |
| | | top: 8px; |
| | | right: 16px; |
| | | z-index: 99; |
| | | } |
| | | } |
| | | .footer { |
| | | text-align: right; |
| | | padding: 8px; |
| | | } |
| | | </style> |
| | |
| | | <el-table-column fixed="right" label="操作" width="80" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="showDetails(scope)" |
| | | @click="showDetails(scope.row)" |
| | | type="primary" |
| | | size="mini">详情</el-button> |
| | | </template> |
| | |
| | | <el-pagination class="pagess" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pageCurr" :page-sizes="[10, 20,30, 50,100]" :page-size="queryInfo.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> |
| | | </div> |
| | | </div> |
| | | <!-- 修改机房名 --> |
| | | <el-dialog |
| | | title="详情" |
| | | width="auto" |
| | | :visible.sync="detailsDialog" |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | class="dialog-center" |
| | | :modal-append-to-body="false"> |
| | | <test-details v-if="detailsDialog" :list="testList" :url="pageLoadUrl"></test-details> |
| | | </el-dialog> |
| | | </flex-layout> |
| | | </template> |
| | | |
| | |
| | | export_json_to_excel |
| | | } from '@/assets/js/excel/Export2Excel.js' |
| | | import getBattGroupStatus from "@/assets/js/tools/getBattGroupStatus"; |
| | | import TestDetails from "@/views/reportStatistics/dialog/testDetails.vue"; |
| | | export default { |
| | | name: 'eleAssess', |
| | | components: {TestDetails}, |
| | | data() { |
| | | let thistime = new Date(); |
| | | let yy = thistime.getFullYear(); |
| | |
| | | let dd = thistime.getDate(); |
| | | let day1 = yy + "-" + MM + "-" + dd + ' 23:59:59'; |
| | | return { |
| | | detailsDialog: false, |
| | | queryInfo: { |
| | | pageCurr: 1, |
| | | pageSize: 20 |
| | |
| | | selectValue3: "", |
| | | monVolStd: 3, |
| | | starttype: 3, |
| | | testList: [], |
| | | pageLoadUrl: "" |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }, |
| | | methods: { |
| | | showDetails(data) { |
| | | console.log(data); |
| | | let list = []; |
| | | for(let i=(data.testList.length-1); i>=0; i--) { |
| | | let item = data.testList[i]; |
| | | list.push([item.testStarttime, item.realCap.toHold(1)]); |
| | | } |
| | | this.testList = list; |
| | | this.pageLoadUrl = data.pageLoadUrl; |
| | | this.detailsDialog = true; |
| | | }, |
| | | // 导出表格 |
| | | exportFile() { |
| | |
| | | let tableObj = {}; |
| | | tableObj.tableNum = (pageCurr - 1) * pageSize + i + 1; //记录编号 |
| | | let stationNames = data.list[i].battinf.stationName.split("-"); |
| | | |
| | | tableObj.pageLoadUrl = "?province=" + |
| | | stationNames[0] + |
| | | "&city=" + |
| | | stationNames[1] + |
| | | "&county=" + |
| | | stationNames[2] + |
| | | "&home=" + |
| | | stationNames[3] + |
| | | "&batt=" + |
| | | data.list[i].battinf.battGroupId + |
| | | // list组件重载 |
| | | "&listReload=1"; |
| | | tableObj.battGroupId = data.list[i].battinf.battGroupId; |
| | | tableObj.fbsdeviceId = data.list[i].battinf.fbsdeviceId; |
| | | tableObj.testList = data.list[i].battTestDataInf[6] |
| | | tableObj.stationName = stationNames[2]+"-"+stationNames[3]+stationNames[4]; //机房名称 |
| | | tableObj.battGroupName = data.list[i].battinf.battGroupName; //电池组名称 |
| | | tableObj.monCapStd = data.list[i].battinf.monCapStd; //标称容量 |