123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137 |
- <template>
- <el-dialog width="70%" @open="opened" @closed="closed" :fullscreen="true" :show-close="true" class="dialogs">
- <template #title>
- <div class="showTitles currentShowTitles">
- <div class="titles">风机矩阵</div>
- </div>
- </template>
- <div class="body" @contextmenu="contextmenu">
- <div class="titleList">
- <div class="title">
- <div :class="current === item.id ? 'title-onItem' : 'title-item'" v-for="(item, index) in stationList"
- :key="index" @click="handleChange(item.id)">
- {{ item.name }}
- </div>
- </div>
- <div class="infoMsg">
- <div class="infoTitle">
- <span>欠发电量</span>
- </div>
- <div v-for="item in showpieColor" :key="item.name" class="infoMainCV">
- <span class="colorLine" :style="{'background': item.value}"></span>
- <span class="colorValue">{{item.name}}</span>
- </div>
- </div>
- </div>
- <div class="content">
- <box-select node=".box" @selectList="selectList">
- <div class="windStation" v-for="(item, index) in stationArr" :key="index">
- <div class="stationTitle" v-if="item[0].stationId">
- <div class="stationName">
- {{getStationName(item)}}
- </div>
- <div class="num">
- <div class="jrts">接入台数</div>
- <!-- <div class="jrts_num">{{ item.length }}</div> -->
- <div class="jrts_num">{{ getStatus(item, 'jr') }}</div>
- </div>
- <div class="num">
- <div class="djts">待机台数</div>
- <div class="djts_num">
- <!-- {{ item.filter((val) => val.status === 2)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'dj') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="bwts">并网台数</div>
- <div class="bwts_num">
- <!-- {{ item.filter((val) => val.status === 4)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'bw') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="gzts">故障台数</div>
- <div class="gzts_num">
- <!-- {{ item.filter((val) => val.status === 5)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'gz') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="jxts">检修台数</div>
- <div class="jxts_num">
- <!-- {{ item.filter((val) => val.status === 6)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'jx') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="lxts">离线台数</div>
- <div class="lxts_num">
- <!-- {{ item.filter((val) => val.status === 7)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'lx') }}</div>
- </div>
- </div>
- <div class="stationInfo">
- <div class="name">实时功率</div>
- <div class="nums">
- <!-- {{
- $store.state.titleInfo.stationOverviewInfos[
- item[0].stationId
- ]?.realTimePower?.value.toFixed(2)
- }}MW -->
- {{getseeting($store.state.titleInfo.stationOverviewInfos, item[0], 'power')}}MW
- </div>
- </div>
- <div class="stationInfo">
- <div class="name">平均风速</div>
- <div class="nums">
- <!-- {{
- $store.state.titleInfo.stationOverviewInfos[
- item[0].stationId
- ]?.averageWindSpeed?.value.toFixed(2)
- }}m/s -->
- {{getseeting($store.state.titleInfo.stationOverviewInfos, item[0], 'wind')}}m/s
- </div>
- </div>
- </div>
- <div class="stationTitle" v-else>
- <div class="stationName">
- {{getStationName(item)}}
- </div>
- <div class="num">
- <div class="jrts">接入台数</div>
- <!-- <div class="jrts_num">{{ item.length }}</div> -->
- <div class="jrts_num">{{ getStatus(item, 'jr') }}</div>
- </div>
- <div class="num">
- <div class="djts">待机台数</div>
- <div class="djts_num">
- <!-- {{ item.filter((val) => val.status === 2)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'dj') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="bwts">并网台数</div>
- <div class="bwts_num">
- <!-- {{ item.filter((val) => val.status === 4)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'bw') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="gzts">故障台数</div>
- <div class="gzts_num">
- <!-- {{ item.filter((val) => val.status === 5)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'gz') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="jxts">离线台数</div>
- <div class="jxts_num">
- <!-- {{ item.filter((val) => val.status === 6)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'lx') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="lxts">维护台数</div>
- <div class="lxts_num">
- <!-- {{ item.filter((val) => val.status === 7)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'wh') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="gzts">限电台数</div>
- <div class="gzts_num">
- <!-- {{ item.filter((val) => val.status === 7)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'xd') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="gzts">限电停机台数</div>
- <div class="gzts_num">
- <!-- {{ item.filter((val) => val.status === 5)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'xdtj') }}</div>
- </div>
- </div>
- <div class="num">
- <div class="lxts">未知台数</div>
- <div class="lxts_num">
- <!-- {{ item.filter((val) => val.status === 6)?.length }} -->
- <div class="jrts_num">{{ getStatus(item, 'wz') }}</div>
- </div>
- </div>
- <div class="stationInfo">
- <div class="name">实时功率</div>
- <div class="nums">
- <!-- {{
- $store.state.titleInfo.stationOverviewInfos[
- item[0].stationId
- ]?.realTimePower?.value.toFixed(2)
- }}MW -->
- {{getseeting($store.state.titleInfo.stationOverviewInfos, item[0], 'power')}}MW
- </div>
- </div>
- <div class="stationInfo">
- <div class="name">日照强度</div>
- <div class="nums">
- <!-- {{
- $store.state.titleInfo.stationOverviewInfos[
- item[0].stationId
- ]?.averageWindSpeed?.value.toFixed(2)
- }}m/s -->
- {{getseeting($store.state.titleInfo.stationOverviewInfos, 'wind')}}m/s
- </div>
- </div>
- </div>
- <div class="block" v-if="showWh(item)">
- <UnpaidMatrixBlock @on-click="handleDetial" @choose-click="handleClick" :dataList="item">
- </UnpaidMatrixBlock>
- </div>
- <div class="block" v-else>
- <UnpaidMatrixBlockPv @on-click="handleDetialPv" @choose-click="handleClickPv" :dataList="item">
- </UnpaidMatrixBlockPv>
- </div>
- </div>
- </box-select>
- </div>
- </div>
- <WindturbineDetailPages v-model="dialogVisible" @close="handleClose" :windturbine="currentWindturbine">
- </WindturbineDetailPages>
- <PvDetailPages v-model="dialogPvDia" @close="handleClose" :windturbine="currentWindturbinePv">
- </PvDetailPages>
- <ParametersContrast :chooseList="chooseList" v-model="parametersDisplay"></ParametersContrast>
- </el-dialog>
- </template>
- <script>
- import BackgroundData from "utils/BackgroundData";
- import UnpaidMatrixBlock from "components/unpaidMatrixBlock.vue";
- import UnpaidMatrixBlockPv from "components/unpaidMatrixBlockPv.vue";
- import WindturbineDetailPages from "components/WindturbineDetailPages.vue";
- import PvDetailPages from "components/PvDetailPages.vue";
- import boxSelect from "components/boxSelect.vue";
- import ParametersContrast from "./control/parametersContrast.vue";
- import MessageBridge from "../utils/MessageBridge";
- import api from "api/index";
- export default {
- components: {
- UnpaidMatrixBlock,
- UnpaidMatrixBlockPv,
- WindturbineDetailPages,
- PvDetailPages,
- boxSelect,
- ParametersContrast,
- },
- data() {
- return {
- current: "all",
- windterbin: {},
- stationObj: {},
- cache: {},
- stationArr: [],
- dialogVisible: false,
- dialogPvDia: false,
- currentWindturbine: {},
- currentWindturbinePv: {},
- chooseList: [],
- lockValues: [],
- parametersDisplay: false,
- intervals: null,
- showpieColor: [
- {
- name: '×5: 0%~5%',
- value: '#05bb4c'
- },
- {
- name: '×4: 5%~10%',
- value: '#0ec7dc'
- },
- {
- name: '×3: 10%~20%',
- value: '#4b55ae'
- },
- {
- name: '×2: 20%~40%',
- value: '#e17d24'
- },
- {
- name: '×1: >40%',
- value: '#ba3237'
- },
- ]
- };
- },
- created() {
- this.getLocks();
- },
- mounted() { },
- methods: {
- showWh(item) {
- let show = false
- if (item[0].stationId) {
- show = true
- }
- return show
- },
- getStatus(item, type) {
- let num = 0
- if (item[0].stationId) {
- if (type === 'jr') {
- num = item.length
- } else if (type === 'dj') {
- num = item.filter((val) => val.status === 2)?.length
- } else if (type === 'bw') {
- num = item.filter((val) => val.status === 4)?.length
- } else if (type === 'gz') {
- num = item.filter((val) => val.status === 5)?.length
- } else if (type === 'jx') {
- num = item.filter((val) => val.status === 6)?.length
- } else if (type === 'lx') {
- num = item.filter((val) => val.status === 7)?.length
- }
- } else {
- if (type === 'jr') {
- num = item.length
- } else if (type === 'dj') {
- num = item.filter((val) => val.status === 0)?.length
- } else if (type === 'bw') {
- num = item.filter((val) => val.status === 1)?.length
- } else if (type === 'gz') {
- num = item.filter((val) => val.status === 2)?.length
- } else if (type === 'lx') {
- num = item.filter((val) => val.status === 3)?.length
- } else if (type === 'wh') {
- num = item.filter((val) => val.status === 4)?.length
- } else if (type === 'xd') {
- num = item.filter((val) => val.status === 5)?.length
- } else if (type === 'xdtj') {
- num = item.filter((val) => val.status === 6)?.length
- } else if (type === 'wz') {
- num = item.filter((val) => val.status === -1)?.length
- }
- }
- return num
- },
- getStationName(item) {
- let name = ''
- if (item[0]) {
- this.stationList.forEach(val =>{
- if (item[0].stationId) {
- if (item[0].stationId === val.id) {
- name = val.name
- }
- } else if (item[0].station) {
- if (item[0].station === val.id) {
- name = val.name
- }
- }
- })
- }
- return name
- },
- getseeting(arr, item, type) {
- let num = ''
- if (arr[item.stationId]) {
- if (arr[item.stationId].realTimePower) {
- if (type === 'power') {
- num = arr[item.stationId].realTimePower.value.toFixed(2)
- } else {
- num = arr[item.stationId].averageWindSpeed.value.toFixed(2)
- }
- }
- }
- return num
- },
- opened() {
- let stationList = [
- {
- id: "all",
- name: "全部",
- },
- ];
- let stations = this.$store.state.stationList;
- stations.forEach((item) => {
- if (item.id.indexOf("FDC") != -1 || item.id.indexOf("GDC") != -1) {
- stationList.push(item);
- this.stationObj[item.id] = [];
- }
- });
- this.stationList = stationList;
- this.handleWindturbineChange();
- // this.intervals = setInterval(this.handleWindturbineChange, 3000);
- },
- closed() {
- this.chooseList = [];
- clearInterval(this.intervals);
- this.intervals = null;
- },
- handleChange(val) {
- let stationArr = [];
- this.current = val;
- let stationObj = {};
- let stations = this.$store.state.stationList;
- stations.forEach((item) => {
- if (val === "all") {
- if (item.id.indexOf("FDC") != -1 || item.id.indexOf("GDC") != -1) {
- stationObj[item.id] = [];
- }
- } else if (item.id === val) {
- stationObj[item.id] = [];
- }
- });
- if (val === "all") {
- stationObj = this.cache;
- } else {
- stationObj[val] = this.cache[val];
- }
- let list = Object.keys(stationObj).sort();
- for (const id of list) {
- stationArr.push(stationObj[id]);
- }
- this.stationObj = stationObj;
- this.stationArr = stationArr;
- },
- //风场回调
- handleDetial(itm) {
- this.dialogVisible = true;
- this.currentWindturbine = itm;
- },
- handleClick(values) {
- if (values.active) {
- let showIndex = null;
- this.chooseList.forEach((item, index) => {
- if (item.windturbineId === values.windturbineId) {
- showIndex = index;
- }
- });
- this.chooseList.splice(showIndex, 1);
- } else {
- this.chooseList.push(values);
- }
- this.stationArr.forEach((item) => {
- item.forEach((val) => {
- if (val.windturbineId === values.windturbineId) {
- val.active = !val.active;
- }
- });
- });
- },
- handleClose() {
- this.dialogVisible = false;
- this.getLocks();
- },
- //光伏回调
- handleDetialPv(item) {
- this.dialogPvDia = true;
- this.currentWindturbinePv = item;
- console.log('item', item)
- },
- handleClickPv(values) {
- if (values.active) {
- let showIndex = null;
- this.chooseList.forEach((item, index) => {
- if (item.windturbineId === values.windturbineId) {
- showIndex = index;
- }
- });
- this.chooseList.splice(showIndex, 1);
- } else {
- this.chooseList.push(values);
- }
- this.stationArr.forEach((item) => {
- item.forEach((val) => {
- if (val.id === values.id) {
- val.active = !val.active;
- }
- });
- });
- },
- handleClosePv() {
- this.dialogPvDia = false;
- },
- selectList(val) {
- val.forEach((item) => {
- this.handleClick(this.windterbin[item.id]);
- });
- },
- getLocks() {
- api.getCustomerLock().then((res) => {
- if (res) {
- this.lockValues = res.data;
- }
- });
- },
- /* 右键菜单 */
- contextmenu() {
- const remote = require("electron").remote;
- let that = this;
- let menuTemplate = [];
- menuTemplate = [
- {
- label: "启动",
- click() {
- that.sendCommand({ controlType: "1", deviceType: "Manual" });
- },
- },
- {
- label: "停机",
- click() {
- that.sendCommand({ controlType: "2", deviceType: "Manual" });
- },
- },
- {
- label: "复位",
- click() {
- that.sendCommand({ controlType: "5", deviceType: "Manual" });
- },
- },
- {
- label: "维护",
- click() {
- that.sendCommand({ controlType: "6", deviceType: "Manual" });
- },
- },
- {
- label: "取消维护",
- click() {
- that.sendCommand({ controlType: "8", deviceType: "Manual" });
- },
- },
- {
- label: "挂牌",
- submenu: [
- {
- label: "检修",
- click() {
- that.sendLock({ value: "CheckLock" });
- },
- },
- {
- label: "故障维修",
- click() {
- that.sendLock({ value: "FaultLock" });
- },
- },
- {
- label: "场内受累检修",
- click() {
- that.sendLock({ value: "StationCheckLock" });
- },
- },
- {
- label: "场内受累故障",
- click() {
- that.sendLock({ value: "StationFaulLock" });
- },
- },
- {
- label: "场外受累电网",
- click() {
- that.sendLock({ value: "StationPowerLineLock" });
- },
- },
- {
- label: "场外受累天气",
- click() {
- that.sendLock({ value: "StationWeatherLock" });
- },
- },
- ],
- },
- {
- label: "取消挂牌",
- click() {
- that.sendLock({ value: "UnLock" });
- },
- },
- {
- label: "参数对比",
- click() {
- that.parametersContrast();
- },
- },
- ];
- const menu = remote.Menu.buildFromTemplate(menuTemplate);
- menu.popup(remote.getCurrentWindow());
- },
- sendCommand(msg, windturbine) {
- let bd = BackgroundData.getInstance();
- if (!bd.LoginUser) {
- this.$notify({
- title: "请登录",
- message: "控制风机需要先登录!",
- type: "warning",
- position: "bottom-right",
- offset: 60,
- duration: 3000,
- });
- return;
- }
- let sendList = [];
- if (windturbine) {
- sendList = windturbine;
- } else {
- this.chooseList.forEach((item) => {
- item.controlType = Number(msg.controlType);
- });
- sendList = this.chooseList;
- }
- if (sendList.length > 0) {
- bd.checkout(sendList);
- this.chooseList = [];
- let pairs = {};
- sendList.forEach((item) => {
- let ct = {
- windturbineId: item.windturbineId,
- stationId: item.stationId,
- projectId: item.projectId,
- modelId: item.modelId,
- controlType: item.controlType,
- lockType: item.lockType,
- userName: `system_${bd.LoginUser.name}`,
- userId: 0,
- auto: false,
- deviceType: msg.deviceType,
- };
- pairs[ct.windturbineId] = ct;
- });
- api.windturbControl(pairs).then((res) => {
- if (res) {
- this.controlSuccess(res);
- }
- });
- }
- },
- sendLock(msg, windturbine) {
- let bd = BackgroundData.getInstance();
- if (!bd.LoginUser) {
- this.$notify({
- title: "请登录",
- message: "控制风机需要先登录!",
- type: "warning",
- position: "bottom-right",
- offset: 60,
- duration: 3000,
- });
- return;
- }
- let sendList = [];
- if (windturbine) {
- windturbine.lockType = msg.value;
- sendList.push(windturbine);
- } else {
- this.chooseList.forEach((item) => {
- item.lockType = msg.value;
- });
- sendList = this.chooseList;
- }
- if (sendList.length > 0) {
- this.chooseList = [];
- let pairs = {};
- sendList.forEach((item) => {
- let ct = {
- windturbineId: item.windturbineId,
- stationId: item.stationId,
- projectId: item.projectId,
- modelId: item.modelId,
- controlType: item.controlType,
- lockType: item.lockType,
- userName: `system_${bd.LoginUser.name}`,
- userId: 0,
- };
- pairs[ct.windturbineId] = ct;
- });
- api.windturbControlLock(pairs).then((res) => {
- if (res) {
- this.controlSuccess(res);
- }
- });
- }
- },
- /* 控制成功 */
- controlSuccess(msg) {
- let bd = BackgroundData.getInstance();
- for (let id in msg.data) {
- let val = msg.data[id];
- if (val.errorCode !== "0") {
- bd.removeCheckouts(val);
- }
- }
- let mss = ""; // 信息
- let iserror = false; // 是否有控制错误的风机
- for (let v in msg.data) {
- let val = msg.data[v];
- if (val.errorCode > 0) {
- iserror = true;
- mss += `${val.windturbineId} ${this.controlErorCodes[val.errorCode]
- }\n`;
- }
- }
- let tp = iserror ? "warning" : "success";
- // if (!iserror) {
- // mss = "控制成功";
- // }
- this.$notify({
- title: "控制",
- message: mss,
- type: tp,
- position: "bottom-right",
- offset: 60,
- duration: 3000,
- });
- },
- /* 控制失败 */
- controlError(err) {
- this.$notify({
- title: "控制出现错误",
- message: err.message,
- type: "warning",
- position: "bottom-right",
- offset: 60,
- duration: 3000,
- });
- },
- parametersContrast() {
- if (this.chooseList.length > 0) {
- this.parametersDisplay = true;
- }
- },
- getPvMsg(msg) {
- window.sessionStorage.removeItem('pv')
- // let jsonMsg = JSON.parse(msg)
- window.sessionStorage.setItem('pv', msg)
- this.changeData()
- },
- getWindMsg(msg) {
- window.sessionStorage.removeItem('wind')
- // let jsonMsg = JSON.parse(msg)
- window.sessionStorage.setItem('wind', msg)
- this.changeData()
- },
- changeData() {
- let wswind = JSON.parse(window.sessionStorage.getItem('wind'))
- let pv = JSON.parse(window.sessionStorage.getItem('pv'))
- let msg = {}
- if (wswind && pv) {
- msg = {...wswind, ...pv}
- let stationArr = [];
- for (const key in this.stationObj) {
- this.stationObj[key] = [];
- }
- this.windterbin = msg;
- let arr = Object.keys(msg).sort();
- for (const id of arr) {
- let val = msg[id];
-
- //风机
- if (val.stationId) {
- if (val.lockValue === 9) {
- val.lockValues = this.lockValues.filter(
- (item) => val.windturbineId === item.windturbineID
- )[0]?.value;
- }
- this.chooseList.forEach((item) => {
- if (item.windturbineId === val.windturbineId) {
- val.active = true;
- }
- });
- if (this.current === "all") {
- this.stationObj[val.stationId]?.push(val);
- } else {
- if (this.current === val.stationId) {
- this.stationObj[val.stationId]?.push(val);
- }
- }
- }
- // 光伏
- if(val.station) {
- if (this.current === "all") {
- this.stationObj[val.station]?.push(val);
- } else {
- if (this.current === val.station) {
- this.stationObj[val.station]?.push(val);
- }
- }
- }
- }
- this.current === "all" &&
- (this.cache = JSON.parse(JSON.stringify(this.stationObj)));
- let list = Object.keys(this.stationObj).sort();
- for (const id of list) {
- stationArr.push(this.stationObj[id]);
- }
- // this.stationArr = stationArr;
- this.stationArr = this.sortStarionArr(stationArr);
- }
- },
- // 按照场站排序
- sortStarionArr(arr) {
- let newArr = []
- for (let i = 0; i<this.stationList.length; i++) {
- let item = this.stationList[i]
- for (let j = 0; j<arr.length; j++) {
- let itn = arr[j]
- if (itn[0].stationId && itn[0].stationId === item.id) {
- newArr.push(itn)
- } else if (itn[0].station && itn[0].station === item.id) {
- newArr.push(itn)
- }
- }
- }
- return newArr
- },
- handleWindturbineChange() {
- let ws = MessageBridge.getInstance();
- let wind = [
- { key: "/topic/windturbine", action: this.getWindMsg },
- ];
- let guangfu = [
- { key: "/topic/pv", action: this.getPvMsg },
- ];
- ws.register(wind);
- ws.register(guangfu);
- // api.getWindturbine().then((res) => {
- // if (res.data) {
- // let stationArr = [];
- // for (const key in this.stationObj) {
- // this.stationObj[key] = [];
- // }
- // this.windterbin = res.data;
- // let arr = Object.keys(res.data).sort();
- // for (const id of arr) {
- // let val = res.data[id];
- // if (val.lockValue === 9) {
- // val.lockValues = this.lockValues.filter(
- // (item) => val.windturbineId === item.windturbineID
- // )[0]?.value;
- // }
- // this.chooseList.forEach((item) => {
- // if (item.windturbineId === val.windturbineId) {
- // val.active = true;
- // }
- // });
- // if (this.current === "all") {
- // this.stationObj[val.stationId]?.push(val);
- // } else {
- // if (this.current === val.stationId) {
- // this.stationObj[val.stationId]?.push(val);
- // }
- // }
- // }
- // this.current === "all" &&
- // (this.cache = JSON.parse(JSON.stringify(this.stationObj)));
- // let list = Object.keys(this.stationObj).sort();
- // for (const id of list) {
- // stationArr.push(this.stationObj[id]);
- // }
- // this.stationArr = stationArr;
- // }
- // });
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .body {
- display: flex;
- flex-direction: column;
- background-color: #000000;
- height: 90vh;
- width: 102%;
- margin-left: -1%;
- margin-top: -40px;
- overflow-y: auto;
- }
- .body::-webkit-scrollbar {
- /*隐藏滚轮*/
- display: none;
- }
- .titleList {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- margin-left: 3vw;
- padding-top: 8px;
- position: absolute;
- width: 96%;
- background-color: #000000;
- padding-bottom: 10px;
- .infoMsg{
- display: flex;
- border-radius: 10px;
- height: 34px;
- padding: 0 10px;
- margin-right: 20px;
- position: relative;
- top: 5px;
- .infoTitle{
- position: relative;
- top: 2px;
- color: #fff;
- font-weight: 600;
- padding: 0 10px;
- span{
- margin-right: 10px;
- }
- }
- .infoMainCV{
- .colorLine{
- width:25px;
- height:14px;
- border-radius:3px;
- display:inline-block;
- margin-top:2px;
- position: relative;
- top: 3px;
- }
- .colorValue{
- font-size: 12px;
- margin: 0 15px 0 5px;
- color: #fff;
- }
- }
- .infoMain{
- padding: 0 20px;
- color: #fff;
- .infoMain_top{
- display: flex;
- justify-content: end;
- .whiteBox{
- display: inline-block;
- width: 15px;
- height: 5px;
- background: #fff;
- position: relative;
- top: 5px;
- }
- .infoMainMsg{
- }
- }
- .infoMain_bot{
- position: relative;
- top: -3px;
- }
- }
- .item9 {
- background-color: rgba(05, 187, 76, 1);
- }
- .item8 {
- background-color: #0ec7dc;
- }
- .item7 {
- background-color: rgba(75, 85, 174, 1);
- }
- .item6 {
- background-color: rgba(225, 125, 36, 1);
- }
- .item5 {
- background-color: rgba(186, 50, 55, 1);
- }
- }
- }
- .title {
- display: flex;
- flex-direction: row;
- align-items: center;
- .title-item {
- background-color: #242424;
- border-radius: 4px;
- padding: 8px 27px 7px 25px;
- font-size: 14px;
- color: #b4bdc0;
- margin-right: 10px;
- }
- .title-onItem {
- background-color: rgba(37, 116, 219, 1);
- border-radius: 4px;
- padding: 8px 27px 7px 25px;
- font-size: 14px;
- color: #b4bdc0;
- margin-right: 10px;
- }
- }
- .content {
- display: flex;
- flex-direction: column;
- margin-top: 50px;
- }
- .block {
- padding-left: 10px;
- }
- .windStation {
- display: flex;
- flex-direction: column;
- background-color: #242424;
- border-radius: 4px;
- width: 95%;
- margin-left: 3vw;
- padding-bottom: 20px;
- padding-left: 10px;
- margin-bottom: 20px;
- .stationTitle {
- display: flex;
- flex-direction: row;
- // align-items: center;
- margin-top: 10px;
- .stationName {
- font-size: 14px;
- margin-left: 10px;
- color: #b4bdc0;
- }
- .num {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- margin-left: 25px;
- width: 90px;
- .jrts {
- font-size: 12px;
- color: #606769;
- }
- .jrts_num {
- font-size: 16px;
- color: #ffffff;
- }
- .djts {
- font-size: 12px;
- color: #05bb4c;
- }
- .djts_num {
- font-size: 16px;
- color: #05bb4c;
- }
- .bwts {
- font-size: 12px;
- color: #4b55ae;
- }
- .bwts_num {
- font-size: 16px;
- color: #4b55ae;
- }
- .gzts {
- font-size: 12px;
- color: #ba3237;
- }
- .gzts_num {
- font-size: 16px;
- color: #ba3237;
- }
- .jxts {
- font-size: 12px;
- color: #e17d24;
- }
- .jxts_num {
- font-size: 16px;
- color: #e17d24;
- }
- .lxts {
- font-size: 12px;
- color: #606769;
- }
- .lxts_num {
- font-size: 16px;
- color: #606769;
- }
- }
- }
- .stationInfo {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-left: 30px;
- font-size: 16px;
- .name {
- color: #ffffff;
- margin-right: 25px;
- }
- .nums {
- color: #05bb4c;
- }
- }
- }
- .item2 {
- flex: 1;
- display: flex;
- width: 20%;
- flex-wrap: wrap;
- .name {
- color: #fff;
- width: 50%;
- text-align: center;
- }
- .num2 {
- width: 50%;
- color: #fff;
- text-align: left;
- }
- .num1 {
- width: 50%;
- color: #fff;
- text-align: center;
- position: relative;
- &::after {
- content: "";
- position: absolute;
- width: 1.481vh;
- height: 0.556vh;
- background-color: #fff;
- left: 1.204vh;
- top: 0.741vh;
- }
- }
- .num3 {
- width: 50%;
- color: #fff;
- text-align: left;
- }
- }
- </style>
|