| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093 |
- <template>
- <div class="dataAnalysisPosAnal" :class="!theme ? 'themeDark' : 'themeLight'">
- <div class="dataAnalysisPosAnalMain">
- <div class="main_top">
- <p class="topPsty">微观选址分析</p>
- </div>
- <div class="main">
- <div class="treeDataMain">
- <tree-cop
- ref="treeCopRef"
- :data="treeData"
- @checkChange="funTreeCheckChange"
- :show-checkbox="true"
- :height="treeHeight"
- @currentChange="funCurrentChange"
- @refresh="funGetTree"
- ></tree-cop>
- </div>
- <div class="excelDataMain">
- <excel-cop
- :checkIds="excelCheckIds"
- :showCheckbox="excelCheckboxShow"
- :data="excelList"
- :theme="theme"
- :height="excelHeight"
- @excelChange="funExcelChange"
- @checkChange="funExcelCheckChange"
- >
- </excel-cop>
- </div>
- <div class="tableDataMain">
- <div class="shadow rounded-[6px] shadow-blue-500 overflow-hidden">
- <div
- :style="{
- height:
- typeof tableHeight === 'string'
- ? tableHeight
- : tableHeight + 'px',
- overflow: 'hidden',
- }"
- >
- <!-- <posChart @mapDone="funMapDone" @rightClick="funRightClick" :height="tableHeight"
- :windList="windList" :ids="excelCheckIds" v-if="showOnlineMap" /> -->
- <!-- v-if="showOnlineMap" -->
- <!-- <kMap
- :parentId="treeId"
- :ids="excelCheckIds"
- @mapDone="funMapDone"
- @rightClick="funRightClick"
- /> -->
- <leafletMap
- :windList="windList"
- :ids="excelCheckIds"
- @mapDone="funMapDone"
- @rightClick="funRightClick"
- />
- </div>
- </div>
- </div>
- </div>
- </div>
- <el-dialog
- draggable
- width="80%"
- top="10px"
- v-model="dbRateDialog"
- :title="actDiaTitle"
- modal-class="rightMenuDialog"
- >
- <el-form class="whitespace-nowrap" :inline="true" :model="queryForm">
- <el-form-item label="" class="!mb-0">
- <el-select
- style="width: 120px"
- v-model="queryForm.checkIds"
- clearable
- @clear="checkAll = false"
- collapse-tags
- multiple
- >
- <el-option
- label="全选"
- :class="{ selected: checkAll }"
- @click="funCheckAll"
- ></el-option>
- <el-option
- v-for="item in windList"
- :key="item.processId"
- :value="item.processId"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item class="!mb-0">
- <submit-btn desc="查询" @click="funDiaSubmit"></submit-btn>
- <submit-btn desc="导出" @click="funDiaExport"></submit-btn>
- </el-form-item>
- </el-form>
- <div v-loading="exportLoading">
- <div
- style="height: 600px"
- class="flex flex-wrap justify-center items-center overflow-y-auto overflow-x-hidden"
- ref="diaPanelRef"
- >
- <component
- :is="item.actCop"
- :width="`${100 / (actCopList.length || 1)}%`"
- height="100%"
- v-for="item in actCopList"
- :key="item.id"
- :xAxis="item.xAxis"
- :subtext="item.subtext"
- :isRadar="item.isRadar"
- :title="item.title"
- :series="item.series"
- :isDiaAlone="actCopList.length === 1"
- @dblclick="funDbClick(item)"
- :yAxis="item.yAxis"
- :dataset="item.dataset"
- :brush="item.isBrush"
- :count="item.count || []"
- ></component>
- </div>
- </div>
- </el-dialog>
- <el-dialog
- custom-class="windLifeDialog"
- title="对风偏差分析"
- draggable
- width="90%"
- top="25px"
- v-model="rateDialog"
- >
- <el-row :style="{ height: '793px' }">
- <el-col
- :span="12"
- v-for="(item, index) in chartData"
- :key="item.id"
- style="height: 45%"
- >
- <el-icon
- :style="!theme ? 'color: #fff' : ''"
- size="18"
- @click="funActCop(item, 'chartCop' + (index + 1))"
- >
- <ZoomIn />
- </el-icon>
- <chart-cop
- class=""
- height="100%"
- width="100%"
- :xAxis="item.xAxis"
- :isRadar="item.isRadar"
- :theme="theme"
- :echartsTheme="echartsTheme"
- :subtext="item.subtext"
- :title="item.title"
- :series="item.series"
- >
- </chart-cop>
- </el-col>
- <el-col :span="12" v-if="!!lineSeries.length" style="height: 50%">
- <el-icon
- :style="!theme ? 'color: #fff' : ''"
- size="18"
- @click="
- funActCop(
- {
- xAxis: linexAxis,
- yAxis: lineyAxis,
- series: lineSeries,
- dataset: lineDataSet,
- },
- 'lineChartCop'
- )
- "
- >
- <ZoomIn />
- </el-icon>
- <line-chart-cop
- class=""
- height="100%"
- width="100%"
- :xAxis="linexAxis"
- :yAxis="lineyAxis"
- :theme="theme"
- :echartsTheme="echartsTheme"
- :series="lineSeries"
- subtext="对风偏差分析图"
- :dataset="lineDataSet"
- ></line-chart-cop>
- </el-col>
- <el-col :span="12" v-if="!!lineSeries.length" style="height: 50%">
- <el-icon
- :style="!theme ? 'color: #fff' : ''"
- size="18"
- @click="
- funActCop(
- {
- xAxis: scatterxData,
- yAxis: scatteryData,
- series: scatterSeries,
- },
- 'scatterSingleChartCop'
- )
- "
- >
- <ZoomIn />
- </el-icon>
- <scatter-single-chart-cop
- class=""
- height="95%"
- width="100%"
- :xAxis="scatterxData"
- :theme="theme"
- :echartsTheme="echartsTheme"
- :yAxis="scatteryData"
- :series="scatterSeries"
- subtext="静态偏航对风分析图"
- >
- </scatter-single-chart-cop>
- </el-col>
- </el-row>
- </el-dialog>
- <el-dialog
- custom-class="windLifeDialog"
- title="功率曲线拟合"
- draggable
- width="90%"
- top="25px"
- modal-class="rightMenuDialog"
- v-model="combineDialog"
- >
- <combineChart
- width="100%"
- height="600px"
- :chartTitle="
- avgObj.title +
- ' ' +
- '平均Cp值:' +
- avgObj.cpavg +
- '; 静风频率:' +
- avgObj.frequency +
- '%; 曲线偏差率:' +
- avgObj.pcratio +
- '%'
- "
- :xAxisData="combine.xAxisData"
- :yAxisData="{ splitLine: { show: false } }"
- :seriesData="combine.seriesData"
- :theme="theme"
- :echartsTheme="echartsTheme"
- :showLegend="true"
- :brushSelected="!combine.isChartArea"
- :dataSet="combine.dataSet"
- @getSelected="funCombineChartSelect"
- ></combineChart>
- </el-dialog>
- <!-- 功率曲线拟合的圈选功能 -->
- <el-dialog v-model="wtDialog" draggable title="风机功率点位">
- <el-tabs v-model="wtTab">
- <el-tab-pane label="数据" name="table">
- <el-table
- :data="wtData"
- default-expand-all
- row-key="id"
- :max-height="550"
- >
- <el-table-column property="wtId" align="center" label="风机" />
- <el-table-column
- property="time"
- sortable
- :width="160"
- align="center"
- label="时间"
- />
- <el-table-column
- property="speed"
- sortable
- align="center"
- label="风速(m/s)"
- />
- <el-table-column
- property="power"
- sortable
- align="center"
- label="功率(kW)"
- />
- <el-table-column
- property="rr"
- sortable
- align="center"
- label="转速"
- />
- <el-table-column
- property="filter"
- sortable
- align="center"
- label="是否有用点"
- />
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="故障" name="problem" disabled> </el-tab-pane>
- <el-tab-pane label="预警" name="warning" disabled> </el-tab-pane>
- </el-tabs>
- </el-dialog>
- <el-dialog
- custom-class="windLifeDialog"
- title="曲线偏差率分析"
- draggable
- width="90%"
- top="25px"
- modal-class="rightMenuDialog"
- v-model="lineDialog"
- >
- <combineChart
- ref="chartRef"
- width="100%"
- height="600px"
- :chartTitle="qxLineChartTitle"
- :xAxisData="qxLineChart.xAxisData"
- :yAxisData="{ splitLine: { show: false } }"
- :seriesData="qxLineChart.seriesData"
- :showLegend="true"
- :brushSelected="false"
- :dataSet="qxLineChart.dataSet"
- :theme="theme"
- :echartsTheme="echartsTheme"
- :showToolbox="false"
- tooltipTrigger="axis"
- @getSelected="qxLineChart.funChartSelect"
- />
- </el-dialog>
- <el-dialog
- custom-class="windLifeDialog"
- title="温度与功率分析"
- draggable
- width="90%"
- top="25px"
- modal-class="rightMenuDialog"
- v-model="hotDialog"
- >
- <combineChart
- ref="chartRef"
- width="100%"
- height="600px"
- :chartTitle="
- avgObj.title +
- ' ' +
- '平均Cp值:' +
- avgObj.cpavg +
- '; 静风频率:' +
- avgObj.frequency +
- '%; 曲线偏差率:' +
- avgObj.pcratio +
- '%'
- "
- :xAxisData="hotChart.xAxisData"
- :yAxisData="{ splitLine: { show: false } }"
- :seriesData="hotChart.seriesData"
- :showLegend="true"
- :brushSelected="false"
- :maxMinData="hotChart.maxMinData"
- :theme="theme"
- :echartsTheme="echartsTheme"
- :dataSet="hotChart.dataSet"
- :showToolbox="false"
- tooltipTrigger="axis"
- @getSelected="funhotChartSelect"
- />
- </el-dialog>
- <el-dialog
- custom-class="windLifeDialog"
- title="损失电量分析"
- draggable
- width="90%"
- top="25px"
- modal-class="rightMenuDialog"
- v-model="ssDialog"
- >
- <bar-line-chart-cop
- height="600px"
- :bardata="ssChart.barData"
- :lineData="ssChart.lineData"
- :color="ssChart.barColor"
- lineName="理论发电量"
- ></bar-line-chart-cop>
- </el-dialog>
- <el-dialog
- custom-class="windLifeDialog"
- title="桨距角分析"
- draggable
- width="90%"
- top="25px"
- modal-class="rightMenuDialog"
- v-model="jjjDialog"
- >
- <div class="tableDataMain">
- <el-tabs v-model="jjjActiveTab">
- <el-tab-pane label="图表展示" name="1">
- <div style="height: 600px">
- <combineChart
- ref="chartRef"
- width="100%"
- height="100%"
- :chartTitle="''"
- style="margin-top: 3vh"
- :xAxisData="jjjChart.xAxisData"
- :yAxisData="{ splitLine: { show: false } }"
- :seriesData="jjjChart.seriesData"
- :seriesAllData="jjjChart.seriesAllData"
- :showLegend="true"
- :brushSelected="false"
- :dataSet="jjjChart.dataSet"
- :theme="theme"
- :echartsTheme="echartsTheme"
- @getSelected="funChartSelect"
- />
- </div>
- </el-tab-pane>
- <el-tab-pane label="桨距角风速曲线" name="2" v-if="false">
- <div style="height: 600px">
- <!-- <div id="speedLine" style="width:100%;height:100%"></div> -->
- <bar-chart-cop
- width="100%"
- height="100%"
- :theme="theme"
- :echartsTheme="echartsTheme"
- :xAxis="jjjChart.linexAxis"
- :yAxis="jjjChart.lineyAxis"
- :series="jjjChart.lineSeries"
- ></bar-chart-cop>
- </div>
- </el-tab-pane>
- <el-tab-pane label="表格数据" name="3">
- <div style="height: 600px">
- <table-cop
- class=""
- :data="jjjChart.tableData"
- :column="jjjChart.tableColumn"
- :theme="theme"
- height="100%"
- tableId="1"
- :tableName="jjjChart.tableName"
- :rowstyle="true"
- ></table-cop>
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- </el-dialog>
- </div>
- </template>
- <script setup name="prepare">
- import excelCop from "@/components/generatingCapacityComponent/excel.vue";
- import treeCop from "@/components/generatingCapacityComponent/tree.vue";
- import {
- ref,
- nextTick,
- onActivated,
- shallowRef,
- onMounted,
- reactive,
- watch,
- } from "vue";
- import axios from "axios";
- import { useRouter } from "vue-router";
- import { useStore } from "vuex";
- import { ElMessage } from "element-plus";
- import tools from "@tools/htmlToPdf.js";
- import posChart from "./components/posChart.vue";
- import leafletMap from "./components/leafletMap.vue";
- /**combine */
- import combineChart from "../combine/components/current-scatter-chart.vue";
- /**rateAnalysis */
- import barLineChartCop from "../combine/components/barLineChart.vue";
- import barChartCop from "../combine/components/barChart.vue";
- import chartCop from "../rateAnalysis/components/chart.vue";
- import lineChartCop from "../rateAnalysis/components/lineChart.vue";
- import scatterSingleChartCop from "../rateAnalysis/components/scatterSingleChart.vue";
- import kMap from "@/components/generatingCapacityComponent/kMap/index.vue";
- import httpRequest from "@/utils/request.js";
- import jsonData from "./components/data.json";
- const router = useRouter();
- /**配置参数 */
- const treeHeight = ref(window.innerHeight - 115 + "px"); //tree高度
- const excelHeight = ref(window.innerHeight - 115 + "px"); //excel高度
- const tableHeight = ref(window.innerHeight - 115 + "px");
- /**excel 开始 */
- const excelCheckboxShow = ref(false);
- const excelCheckIds = ref([]);
- const excelList = ref([]);
- const store = useStore();
- const showOnlineMap = ref(false);
- watch(
- () => router.currentRoute.value,
- (newValue, oldValue) => {
- // if (newValue.path === "/dataAnalysis/posAnalysis") {
- if (newValue.path.indexOf("/dataAnalysis/posAnalysis") > -1) {
- if (newValue.query.onlineMap) {
- showOnlineMap.value = newValue.query.onlineMap === "1" ? false : true;
- }
- }
- },
- {
- immediate: true,
- }
- );
- const funExcelChange = async (obj) => {
- //点击excel项时
- return false;
- };
- const funExcelCheckChange = ({ checkArr, data }) => {
- //bug
- excelCheckIds.value = checkArr;
- funSubmit();
- };
- /**prepare tree 开始 */
- const treeData = ref([]);
- const treeCopRef = ref(); //treeCop ref
- const actTreeNode = ref(null); //当前激活的treeNode
- const funRepeatMap = (arr, type = "fitting") => {
- return arr.map((o) => {
- if (o.children) {
- const findIndex = o.children.findIndex((p) => !!p.type);
- if (findIndex !== -1) {
- o.childs = o.children;
- o.children = [];
- if (!actTreeNode.value && type === "fitting") {
- //判断当且仅有process获取tree时 赋值
- actTreeNode.value = o;
- }
- }
- }
- return {
- ...o,
- children: o.children ? funRepeatMap(o.children, type) : [],
- };
- });
- };
- const funGetTree = async () => {
- actTreeNode.value = null;
- const res = await httpRequest.get("/power/fitting/tree");
- treeData.value = funRepeatMap(res.data);
- excelList.value = [];
- if (actTreeNode.value) {
- funCurrentChange({
- current: actTreeNode.value,
- currentNode: null,
- });
- if (treeCopRef.value) {
- treeCopRef.value.$refs.tree.setCheckedKeys([actTreeNode.value.id]);
- excelCheckIds.value = actTreeNode.value.childs.map((o) => o.id);
- funSubmit();
- }
- }
- };
- const treeId = ref("");
- const funCurrentChange = ({ current, currentNode }) => {
- excelCheckboxShow.value = true;
- if (current.childs) {
- excelList.value = current.childs.map((o) => {
- return {
- id: o.id,
- interval: o.interval,
- path: o.path,
- prepareid: o.prepareid,
- station: o.station,
- time: o.time,
- type: o.type,
- windturbine: o.windturbine,
- name: o.path.substring(
- o.path.indexOf(o.station + "_") + (o.station + "_").length
- ),
- };
- });
- // excelCheckIds.value = current.childs.map((o) => o.id);
- // treeId.value = current.id || "";
- funSubmit();
- } else {
- excelList.value = [];
- excelCheckIds.value = [];
- windList.value = [];
- }
- };
- const funTreeCheckChange = ({
- current,
- checkedNodes,
- checkedKeys,
- halfCheckedNodes,
- halfCheckedKeys,
- }) => {
- funCurrentChange({
- current,
- currentNode: "",
- });
- const checkIds = [];
- if (checkedNodes.checkedNodes.length) {
- let checkArr = checkedNodes.checkedNodes;
- checkArr.forEach((it) => {
- if (it.childs && it.childs.length) {
- it.childs.forEach((iv) => {
- checkIds.push(iv.id);
- });
- }
- });
- }
- excelCheckIds.value = checkIds;
- //tree change -> excel change
- // funCurrentChange({ current, currentNode: '' })
- // const checkIds = []
- // if (checkedNodes.length) {
- // for (const node of checkedNodes) {
- // if (node.childs && node.childs.length) {
- // for (const child of node.childs) {
- // checkIds.push(child.id)
- // }
- // }
- // }
- // }else{
- // windList.value = []
- // }
- // excelCheckIds.value = checkIds
- // funSubmit()
- };
- /**search 开始 */
- const funSubmit = async () => {
- // if (!excelCheckIds.value.length) {
- // ElMessage.error('请勾选要执行的项')
- // return false
- // }
- const params = {
- ids: excelCheckIds.value.join(","),
- };
- const res = await httpRequest.get("/base/location", {
- params: params,
- });
- let windList = [];
- res.data.forEach((ele) => {
- if (ele.longitude && ele.latitude) {
- windList.push(ele);
- }
- });
- windList.value = windList;
- };
- /**posChart */
- const windList = ref([]);
- const funRightClick = ({ menuIndex, current }) => {
- switch (menuIndex) {
- case 0:
- funCombineGet(current);
- break;
- case 1:
- funRateSubmit(current);
- queryForm.checkIds = windList.value.map((o) => o.processId);
- break;
- case 2:
- funLineSubmit(current);
- break;
- case 3:
- funHotSubmit(current);
- break;
- case 4:
- funSsSubmit(current);
- break;
- case 5:
- funJjjSubmit(current);
- break;
- }
- };
- const lineDialog = ref(false);
- const qxLineChartTitle = ref("");
- const qxLineChart = reactive({
- xAxisData: [],
- seriesData: [],
- dataSet: "",
- isChartArea: false,
- });
- const funLineSubmit = async (current) => {
- const params = {
- // ids: current.processId,
- ids: current.fittingId,
- };
- const res = await httpRequest.get("/power/fitting/line", {
- params: params,
- });
- if (res.code === 200) {
- qxLineChart.seriesData = [];
- if (res?.data?.bzgl) {
- qxLineChart.seriesData.push({
- name: "保证功率",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: res.data.bzgl || [],
- xAxisIndex: 0,
- });
- }
- if (res?.data?.sjgl) {
- res.data.sjgl.forEach((ele) => {
- qxLineChart.seriesData.push({
- name: "实际功率",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: ele.sjgl || [],
- xAxisIndex: 0,
- });
- });
- }
- qxLineChartTitle.value = current.name;
- lineDialog.value = true;
- }
- };
- const hotDialog = ref(false);
- const hotChart = reactive({
- xAxisData: [],
- seriesData: [],
- dataSet: "",
- isChartArea: false,
- maxMinData: [],
- });
- const funHotSubmit = async (obj) => {
- let chartRes = {
- scatterhs: [[]],
- scatterls: [[]],
- sjgl: [[]],
- llgl: [[]],
- cpz: [[]],
- };
- let chartResponse = null;
- chartResponse = await httpRequest.get("/temperature/curve/analysis", {
- params: {
- id: obj.fittingId,
- p: 1,
- },
- });
- if (chartResponse && chartResponse.code === 200) {
- chartRes = chartResponse.data;
- hotChart.maxMinData = [chartRes.maxhjwd, chartRes.minhjwd];
- avgObj.title = chartRes.obj.path
- .substring(
- chartRes.obj.path.indexOf(chartRes.obj.station + "_") +
- (chartRes.obj.station + "_").length
- )
- .split("_")[0];
- avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2);
- avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2);
- avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2);
- const color = [
- "#1C99FF",
- "#FF8700",
- "#3D54BE",
- "#fa8c16",
- "#1DA0D7",
- "#DD5044",
- ];
- hotChart.seriesData = [
- {
- name: "拟合功率",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: chartRes.sjgl,
- xAxisIndex: 0,
- },
- {
- name: "保证功率",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: chartRes.llgl,
- xAxisIndex: 0,
- },
- {
- type: "effectScatter",
- showEffectOn: "emphasis",
- rippleEffect: {
- scale: 1,
- },
- name: "数据散点",
- symbolSize: 5,
- // symbolSize: (data) => {
- // return data.s ? data.s > 10 ? 10 : data.s : 4
- // },
- // datasetIndex: 1,
- // encode: {
- // x: 'x',
- // y: 'y'
- // },
- data: chartRes.scatter,
- xAxisIndex: 0,
- yAxisIndex: 0,
- },
- ];
- hotDialog.value = true;
- }
- };
- const ssDialog = ref(false);
- const ssChart = reactive({
- barData: [],
- lineData: [],
- color: [
- "#4b55ae",
- "#e17e23",
- "#ba3237",
- "#c531c7",
- "rgb(63,177,227)",
- "#05bb4c",
- ],
- });
- const funSsSubmit = async (obj) => {
- ssChart.barData = {
- area: [],
- legend: [],
- data: [],
- };
- ssChart.lineData = [];
- const res = await httpRequest.get("/fjjxb/five/loss/cal", {
- params: {
- ids: obj.fittingId,
- },
- });
- const name = [],
- data = [],
- llfdl = [],
- legend = [
- {
- name: "实际电量",
- icon: "rect",
- },
- {
- name: "计划检修损失",
- icon: "rect",
- },
- {
- name: "非计划检修损失",
- icon: "rect",
- },
- {
- name: "限电损失",
- icon: "rect",
- },
- {
- name: "受累损失",
- icon: "rect",
- },
- {
- name: "性能损失",
- icon: "rect",
- },
- {
- name: "理论发电量",
- icon: "circle",
- },
- ],
- data2 = []; //项目列表
- res.data.data.forEach((item, index) => {
- name.push(item.name);
- data.push([item.sjfdl, item.jhjx, item.fjhjx, item.xd, item.sl, item.xn]);
- llfdl.push(item.llfdl);
- data2.push({
- index: index + 1,
- name: item.name,
- llfdl: item.llfdl,
- sjfdl: item.sjfdl,
- speed: item.speed,
- fjhjx: item.fjhjx,
- jhjx: item.jhjx,
- sl: item.sl,
- xd: item.xd,
- xn: item.xn,
- fnlly: item.fnlly,
- is_light: false,
- });
- });
- if (data.length > 0) {
- let arr1 = [];
- const length = data[0].length;
- for (var i = 0; i < length; i++) {
- let arr2 = [];
- data.forEach((ele) => {
- arr2.push(ele[i]);
- });
- arr1.push(arr2);
- }
- ssChart.lineData = llfdl;
- ssChart.barData = {
- area: name,
- legend: legend,
- data: arr1,
- };
- }
- ssChart.value = ssChart;
- console.log(123123, ssChart.value);
- ssDialog.value = true;
- };
- const jjjDialog = ref(false);
- const jjjActiveTab = ref("1");
- const jjjChart = reactive({
- tableData: [],
- tableColumn: [],
- tableName: "",
- xAxisData: [],
- seriesData: [],
- seriesAllData: [],
- linexAxis: [],
- lineyAxis: [],
- lineSeries: [],
- dataSet: [],
- });
- const funJjjSubmit = async (obj) => {
- const res = await httpRequest.get("/blade/angle", {
- params: {
- ids: obj.fittingId,
- },
- });
- let exTime = [];
- let yp1 = [],
- yp2 = [],
- yp3 = [],
- speed = [];
- res.data.bw.forEach((it) => {
- exTime.push(it.time);
- yp1.push(it.yp1);
- yp2.push(it.yp2);
- yp3.push(it.yp3);
- speed.push(it.speed);
- });
- jjjChart.tableData = res.data.bw;
- jjjChart.seriesAllData = res.data.bw;
- jjjChart.xAxisData = exTime;
- jjjChart.seriesData = [
- {
- name: "叶片1",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: false, //这个是把线变成曲线
- data: yp1,
- xAxisIndex: 0,
- },
- {
- name: "叶片2",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: false, //这个是把线变成曲线
- data: yp2,
- xAxisIndex: 0,
- },
- {
- name: "叶片3",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: false, //这个是把线变成曲线
- data: yp3,
- xAxisIndex: 0,
- },
- {
- name: "风速",
- type: "line",
- yAxisIndex: 1,
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: false, //这个是把线变成曲线
- data: speed,
- xAxisIndex: 0,
- },
- ];
- jjjDialog.value = true;
- };
- /**combine-chart */
- const combineDialog = ref(false);
- const avgObj = reactive({
- //平均cpz等
- title: "",
- cpavg: "",
- frequency: "",
- pcratio: "",
- });
- const markDot = reactive({
- //3-5 point点等
- pcl5: null,
- pcl10: null,
- pcl12: null,
- pcl25: null,
- });
- const combine = reactive({
- xAxisData: [],
- seriesData: [],
- dataSet: "",
- isChartArea: false,
- });
- const wtDialog = ref(false);
- const wtData = ref([]);
- const wtTab = ref("table");
- const funCombineChartSelect = async (batch) => {
- const wDataArr = [];
- const yDataArr = [];
- let scatterls = [];
- let scatterhs = [];
- let dataSetObj = [];
- wtData.value = [];
- if (batch.length && combine.dataSet) {
- scatterls = batch[0].selected[2].dataIndex;
- scatterhs = batch[0].selected[3].dataIndex;
- if (scatterls.length || scatterhs.length) {
- dataSetObj = JSON.parse(combine.dataSet);
- if (scatterls.length) {
- for (const scatterIndex of scatterls) {
- wDataArr.push(dataSetObj[0].source[scatterIndex].k);
- }
- }
- if (scatterhs.length) {
- for (const scatterIndex of scatterhs) {
- yDataArr.push(dataSetObj[1].source[scatterIndex].k);
- }
- }
- const wtRes = await httpRequest.get("/power/fitting/filter", {
- params: {
- yk: yDataArr.join(","),
- wk: wDataArr.join(","),
- },
- });
- if (wtRes.code === 200) {
- let id = 1;
- const tempArr = []; //用于以风机id 聚合dataArr
- if (wtRes.data.length) {
- for (const data of wtRes.data) {
- if (tempArr.length) {
- const findIndex = tempArr.findIndex((o) => o.wtId === data.wtId);
- if (findIndex !== -1) {
- if (!tempArr[findIndex].children) {
- tempArr[findIndex].children = [];
- }
- tempArr[findIndex].children.push({
- ...data,
- id: id,
- filter: data.filter === 0 ? "是" : "否",
- });
- id++;
- } else {
- tempArr.push({
- ...data,
- id: id,
- filter: data.filter === 0 ? "是" : "否",
- });
- id++;
- }
- } else {
- tempArr.push({
- ...data,
- id: id,
- filter: data.filter === 0 ? "是" : "否",
- });
- id++;
- }
- }
- wtDialog.value = true;
- nextTick(() => {
- wtTab.value = "table";
- wtData.value = tempArr;
- });
- }
- }
- }
- }
- };
- const funCombineGet = async (obj) => {
- //点击excel项时
- combine.isChartArea = false;
- let res = null;
- let chartRes = {
- scatterhs: [[]],
- scatterls: [[]],
- sjgl: [[]],
- llgl: [[]],
- cpz: [[]],
- };
- const chartResponse = await httpRequest.get("/power/fitting/curve", {
- params: {
- id: obj.fittingId,
- p: 1,
- },
- });
- if (chartResponse && chartResponse.code === 200) {
- nextTick(() => {
- chartRes = chartResponse.data;
- markDot.pcl5 = chartRes.obj.pc5ratio;
- markDot.pcl10 = chartRes.obj.pc10ratio;
- markDot.pcl12 = chartRes.obj.pc12ratio;
- markDot.pcl25 = chartRes.obj.pc25ratio;
- avgObj.title = chartRes.obj.path
- .substring(
- chartRes.obj.path.indexOf(chartRes.obj.station + "_") +
- (chartRes.obj.station + "_").length
- )
- .split("_")[0];
- avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2);
- avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2);
- avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2);
- combine.dataSet = JSON.stringify([
- {
- source: chartRes.wyd,
- // source: chartRes.scatterls
- },
- {
- source: chartRes.yyd,
- // source: chartRes.scatterhs
- },
- ]);
- const color = [
- "#1C99FF",
- "#FF8700",
- "#3D54BE",
- "#fa8c16",
- "#1DA0D7",
- "#DD5044",
- ];
- combine.seriesData = [
- {
- name: "拟合功率",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: chartRes.sjgl,
- xAxisIndex: 0,
- },
- {
- name: "保证功率",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: chartRes.llgl,
- xAxisIndex: 0,
- },
- {
- type: "effectScatter",
- showEffectOn: "emphasis",
- rippleEffect: {
- scale: 1,
- },
- name: "无用点",
- symbolSize: (data) => {
- return data.s ? (data.s > 10 ? 10 : data.s) : 4;
- },
- datasetIndex: 0,
- encode: {
- x: "x",
- y: "y",
- },
- xAxisIndex: 0,
- yAxisIndex: 0,
- },
- {
- type: "effectScatter",
- showEffectOn: "emphasis",
- rippleEffect: {
- scale: 1,
- },
- name: "有用点",
- symbolSize: (data) => {
- return data.s ? (data.s > 10 ? 10 : data.s) : 4;
- },
- datasetIndex: 1,
- encode: {
- x: "x",
- y: "y",
- },
- xAxisIndex: 0,
- yAxisIndex: 0,
- },
- {
- name: "Cp值",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: chartRes.cpz,
- xAxisIndex: 0,
- yAxisIndex: 1,
- },
- ];
- combineDialog.value = true;
- });
- }
- };
- /**rateAnalysis chart */
- const funText = (index) => {
- let str = "";
- switch (index) {
- case 0:
- str = "0-2.5";
- break;
- case 1:
- str = "2.5-5";
- break;
- case 2:
- str = "5-7.5";
- break;
- case 3:
- str = "7.5-10";
- break;
- case 4:
- str = "10-12.5";
- break;
- case 5:
- str = "12.5-15";
- break;
- case 6:
- str = "15-17.5";
- break;
- case 7:
- str = "17.5-20";
- break;
- case 8:
- str = "20-22.5";
- break;
- case 9:
- str = "22.5-25";
- break;
- case 10:
- str = "25-inf";
- break;
- }
- return str;
- };
- const scatterxData = ref([
- {
- type: "category",
- name: "度",
- data: new Array(61).fill(-30).map((o, index) => Number(o + index)),
- boundaryGap: false,
- splitLine: {
- show: true,
- },
- axisLine: {
- show: true,
- },
- },
- ]);
- const scatteryData = ref([
- {
- type: "category",
- data: [5, 6, 7, 8, 9, 10],
- axisLine: {
- show: false,
- },
- name: "m/s",
- splitLine: {
- show: false,
- },
- },
- ]);
- const scatterSeries = ref([
- {
- name: "对风偏航",
- type: "scatter",
- symbolSize: function (val) {
- return val[2];
- },
- data: [],
- markLine: {
- symbol: "none",
- label: {
- show: false,
- },
- lineStyle: {
- color: "#F72C5B",
- width: "3",
- },
- data: [
- {
- // yAxis: powerproductionNum.value,
- },
- ],
- },
- animationDelay: function (idx) {
- return idx * 5;
- },
- },
- ]);
- const chartData = ref([]); //roses的chartList
- let chartId = 1;
- /**submit */
- const funRateSubmit = async (obj) => {
- const rosesRes = await httpRequest.get("/wind/roses", {
- params: {
- ids: obj.processId,
- mode: 0,
- },
- });
- const lineRes = await httpRequest.get("/wind/deviation/ratio", {
- params: {
- ids: obj.processId,
- mode: 0,
- },
- });
- rateDialog.value = true;
- if (rosesRes.code === 200) {
- if (rosesRes.data.length) {
- chartData.value = [];
- for (const chart of rosesRes.data) {
- chartData.value.push({
- id: chartId,
- title: "",
- subtext: "风速风向玫瑰图",
- xAxis: {
- type: "category",
- boundaryGap: false,
- data: ["北", "东北", "东", "东南", "南", "西南", "西", "西北"],
- splitLine: {
- show: true,
- },
- },
- isRadar: false,
- series: chart.roses.length
- ? chart.roses.map((o, index) => {
- return {
- type: "bar",
- data: o,
- coordinateSystem: "polar",
- name: funText(index),
- stack: "a",
- emphasis: {
- focus: "series",
- },
- };
- })
- : {
- type: "bar",
- data: chart.roses,
- coordinateSystem: "polar",
- name: "方位风速",
- },
- });
- chartId++;
- chartData.value.push({
- id: chartId,
- title: "",
- subtext: "风速风向频次玫瑰图",
- isRadar: true,
- xAxis: {
- type: "category",
- boundaryGap: false,
- data: [
- "北",
- "",
- "东北",
- "",
- "东",
- "",
- "东南",
- "",
- "南",
- "",
- "西南",
- "",
- "西",
- "",
- "西北",
- "",
- ],
- splitLine: {
- show: true,
- },
- },
- series: chart.roses.length
- ? [
- ...chart.roses.map((o, index) => {
- return {
- type: "bar",
- data: o,
- coordinateSystem: "polar",
- name: funText(index),
- stack: "a",
- emphasis: {
- focus: "series",
- },
- coordinateSystem: "polar",
- };
- }),
- {
- type: "radar",
- tooltip: {
- trigger: "item",
- },
- name: "对风",
- data: [
- {
- value: chart.radar,
- },
- ],
- },
- ]
- : [],
- count: chart.count || [],
- });
- chartId++;
- scatterSeries.value[0].data = chart.frequency.data.length
- ? chart.frequency.data.map((item) => {
- return [item[1] + "", item[0] + "", (item[2] * 15).toFixed(1)];
- })
- : [];
- scatterSeries.value[0].markLine.data = [
- {
- xAxis: `${chart.frequency.avg}`,
- name: `平均偏航:${chart.frequency.avg}度`,
- },
- ];
- }
- }
- }
- if (lineRes.code === 200) {
- if (lineRes.data.length) {
- lineDataSet.value[0].source = lineRes.data[0].scatter.map((o) => {
- return [o.x + "", o.y];
- });
- const lineSeriseMax = Math.max(...lineRes.data[0].count);
- const lineSeriseMaxIndex = lineRes.data[0].count.indexOf(lineSeriseMax);
- lineSeries.value = [
- {
- name: "对风频次",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: lineRes.data[0].count,
- yAxisIndex: 1,
- markLine: {
- symbol: "none",
- label: {
- show: false,
- },
- lineStyle: {
- color: "#F72C5B",
- width: "3",
- },
- large: true,
- data: [
- {
- // name: `平均偏航:${chart.frequency.avg}度`,
- xAxis: lineSeriseMaxIndex,
- },
- ],
- },
- },
- {
- type: "effectScatter",
- showEffectOn: "emphasis",
- rippleEffect: {
- scale: 1,
- },
- legendHoverLink: false,
- name: "数据散点",
- symbolSize: 5,
- datasetIndex: 0,
- encode: {
- x: "x",
- y: "y",
- },
- yAxisIndex: 0,
- },
- ];
- }
- }
- };
- /**lineChart */
- const linexAxis = ref({
- type: "category",
- data: new Array(101)
- .fill(-50)
- .map((o, index) => Number((o + index).toFixed(1))),
- splitLine: {
- show: false,
- },
- axisTick: {
- show: true,
- },
- });
- const lineyAxis = ref([
- {
- type: "value",
- name: "m/s",
- splitLine: {
- show: false,
- },
- axisTick: {
- show: true,
- },
- },
- {
- type: "value",
- name: "频次",
- splitLine: {
- show: false,
- },
- axisTick: {
- show: true,
- },
- },
- ]);
- const lineSeries = ref([]);
- const lineDataSet = ref([
- {
- source: [],
- },
- ]);
- /** rate dialog */
- const rateDialog = ref(false);
- const dbRateDialog = ref(false);
- const actChartName = ref("");
- const actDiaTitle = ref("");
- const diaPanelRef = ref();
- const exportLoading = ref(false);
- const actCopList = ref([
- // {
- // xAxis: [],
- // subtext: '',
- // title: '',
- // isRadar: false,
- // series: [],
- // yAxis: [],
- // dataset: []
- // }
- ]);
- // 作为actCopList的备份 在actCopList赋值多个时 同时赋值, 在dialog弹出时清空. 作用: 在actCopList变化时, 重新赋值原始数据
- const actCopListBak = ref([]);
- const checkAll = ref(true);
- const queryForm = reactive({
- checkIds: [],
- });
- const funCheckAll = () => {
- checkAll.value = !checkAll.value;
- if (checkAll.value) {
- queryForm.checkIds = windList.value.map((o) => o.processId);
- } else {
- queryForm.checkIds = [];
- }
- };
- const funActCop = (obj, type) => {
- switch (type) {
- case "chartCop1":
- actChartName.value = "chartCop1";
- obj.actCop = shallowRef(chartCop);
- actDiaTitle.value = "风速风向玫瑰图";
- break;
- case "chartCop2":
- actChartName.value = "chartCop2";
- obj.actCop = shallowRef(chartCop);
- actDiaTitle.value = "风速风向频次玫瑰图";
- break;
- case "lineChartCop":
- actChartName.value = "lineChartCop";
- obj.actCop = shallowRef(lineChartCop);
- actDiaTitle.value = "对风偏差分析图";
- break;
- case "scatterSingleChartCop":
- actChartName.value = "scatterSingleChartCop";
- obj.actCop = shallowRef(scatterSingleChartCop);
- actDiaTitle.value = "静态偏航对风分析图";
- break;
- }
- obj.isBrush = type === "lineChartCop" ? false : false;
- obj.id = chartId;
- chartId++;
- dbRateDialog.value = true;
- actCopListBak.value = [];
- nextTick(() => {
- actCopList.value = [obj];
- });
- };
- const funDiaSubmit = async () => {
- let url = "";
- switch (actChartName.value) {
- case "chartCop1":
- url = "/wind/roses";
- break;
- case "chartCop2":
- url = "/wind/roses";
- break;
- case "lineChartCop":
- url = "/wind/deviation/ratio";
- break;
- case "scatterSingleChartCop":
- url = "/wind/roses";
- break;
- }
- if (url) {
- const res = await httpRequest.get(url, {
- params: {
- ids: queryForm.checkIds.join(","),
- mode: 0,
- },
- });
- if (res.code === 200) {
- actCopList.value = [];
- actCopListBak.value = []; //清空备份
- if (res.data.length) {
- for (const chart of res.data) {
- if (actChartName.value === "chartCop1") {
- actCopList.value.push({
- id: chartId,
- isBrush: false,
- actCop: shallowRef(chartCop),
- title: chart.wt,
- subtext: "风速风向玫瑰图",
- xAxis: {
- type: "category",
- boundaryGap: false,
- data: [
- "北",
- "",
- "东北",
- "",
- "东",
- "",
- "东南",
- "",
- "南",
- "",
- "西南",
- "",
- "西",
- "",
- "西北",
- "",
- ],
- splitLine: {
- show: true,
- },
- },
- isRadar: false,
- series: {
- type: "bar",
- data: chart.roses,
- coordinateSystem: "polar",
- name: "方位风速",
- },
- count: chart.ys || [],
- });
- chartId++;
- }
- if (actChartName.value === "chartCop2") {
- actCopList.value.push({
- id: chartId,
- isBrush: false,
- actCop: shallowRef(chartCop),
- title: chart.wt,
- subtext: "风速风向频次玫瑰图",
- xAxis: {
- type: "category",
- boundaryGap: false,
- data: [
- "北",
- "",
- "东北",
- "",
- "东",
- "",
- "东南",
- "",
- "南",
- "",
- "西南",
- "",
- "西",
- "",
- "西北",
- "",
- ],
- splitLine: {
- show: true,
- },
- },
- isRadar: true,
- series: chart.roses.length
- ? [
- ...chart.roses.map((o, index) => {
- return {
- type: "bar",
- data: o,
- coordinateSystem: "polar",
- name: funText(index),
- stack: "a",
- emphasis: {
- focus: "series",
- },
- coordinateSystem: "polar",
- };
- }),
- {
- type: "radar",
- tooltip: {
- trigger: "item",
- },
- name: "对风",
- data: [
- {
- value: chart.radar,
- },
- ],
- },
- ]
- : [],
- count: chart.count || [],
- });
- chartId++;
- }
- if (actChartName.value === "lineChartCop") {
- actCopList.value.push({
- id: chartId,
- isBrush: false,
- actCop: shallowRef(lineChartCop),
- title: chart.wtId,
- subtext: "对风偏差分析图",
- xAxis: linexAxis.value,
- yAxis: lineyAxis.value,
- dataset: [
- {
- source: chart.scatter.map((o) => {
- return [o.x + "", o.y];
- }),
- },
- ],
- isRadar: false,
- series: [
- {
- name: "对风频次",
- type: "line",
- symbol: "line", //设定为实心点
- symbolSize: 0, //设定实心点的大小
- smooth: true, //这个是把线变成曲线
- data: chart.count,
- yAxisIndex: 1,
- },
- {
- type: "effectScatter",
- showEffectOn: "emphasis",
- rippleEffect: {
- scale: 1,
- },
- legendHoverLink: false,
- name: "数据散点",
- symbolSize: 5,
- datasetIndex: 0,
- encode: {
- x: "x",
- y: "y",
- },
- yAxisIndex: 0,
- },
- ],
- });
- chartId++;
- }
- if (actChartName.value === "scatterSingleChartCop") {
- actCopList.value.push({
- id: chartId,
- isBrush: false,
- actCop: shallowRef(scatterSingleChartCop),
- title: chart.wt,
- subtext: "静态偏航对风分析图",
- xAxis: scatterxData.value,
- yAxis: scatteryData.value,
- isRadar: false,
- series: [
- {
- name: "对风偏航",
- type: "scatter",
- symbolSize: function (val) {
- return val[2];
- },
- markLine: {
- symbol: "none",
- label: {
- show: false,
- },
- lineStyle: {
- color: "#F72C5B",
- width: "3",
- },
- data: [
- {
- name: `平均偏航:${chart.frequency.avg}度`,
- xAxis: `${chart.frequency.avg}`,
- },
- ],
- },
- data: chart.frequency.data.length
- ? chart.frequency.data.map((item) => {
- return [
- item[1] + "",
- item[0] + "",
- (item[2] * 15).toFixed(1),
- ];
- })
- : [],
- animationDelay: function (idx) {
- return idx * 5;
- },
- },
- ],
- });
- chartId++;
- }
- }
- actCopListBak.value = actCopList.value;
- }
- }
- }
- };
- const funDiaExport = () => {
- exportLoading.value = true;
- tools.scrollToPDF(diaPanelRef.value, actDiaTitle.value, () => {
- exportLoading.value = false;
- });
- };
- const funDbClick = (obj) => {
- if (actCopListBak.value.length > 1) {
- //判断大于1时, 才有双击放大功能
- if (actCopList.value.length === 1) {
- actCopList.value = actCopListBak.value;
- } else {
- actCopList.value = [obj];
- }
- }
- };
- const theme = ref(null);
- const echartsTheme = ref("");
- watch(
- () => store.state.theme,
- (newVal, oldVal) => {
- theme.value = newVal;
- echartsTheme.value = !newVal ? "dark" : "";
- funGetTree();
- },
- {
- deep: true,
- }
- );
- const getOnline = () => {
- axios({
- method: "get",
- baseURL: "ping",
- url: "",
- })
- .then((res) => {
- showOnlineMap.value = true;
- })
- .catch((e) => {
- showOnlineMap.value = false;
- });
- };
- const initPageData = () => {
- actTreeNode.value = null;
- treeData.value = funRepeatMap(JSON.parse(JSON.stringify(jsonData.treeData)));
- excelList.value = [];
- if (actTreeNode.value) {
- if (actTreeNode.value.childs) {
- excelList.value = actTreeNode.value.childs.map((o) => {
- return {
- id: o.id,
- interval: o.interval,
- path: o.path,
- prepareid: o.prepareid,
- station: o.station,
- time: o.time,
- type: o.type,
- windturbine: o.windturbine,
- isCheck: false,
- name: o.path.substring(
- o.path.indexOf(o.station + "_") + (o.station + "_").length
- ),
- };
- });
- } else {
- excelList.value = [];
- }
- if (treeCopRef.value) {
- treeCopRef.value.$refs.tree.setCheckedKeys([actTreeNode.value.id]);
- excelCheckIds.value = actTreeNode.value.childs.map((o) => o.id);
- let windList = [];
- jsonData.locationData.forEach((ele) => {
- if (ele.longitude && ele.latitude) {
- windList.push(ele);
- }
- });
- windList.value = windList;
- }
- }
- };
- /**mounted */
- onMounted(() => {
- // getOnline();
- initPageData();
- funGetTree();
- theme.value = store.state.theme;
- echartsTheme.value = !theme.value ? "dark" : "";
- tableHeight.value = window.innerHeight - 115 + "px";
- excelHeight.value = window.innerHeight - 115 + "px";
- treeHeight.value = window.innerHeight - 115 + "px";
- window.addEventListener("resize", () => {
- tableHeight.value = window.innerHeight - 115 + "px";
- excelHeight.value = window.innerHeight - 115 + "px";
- treeHeight.value = window.innerHeight - 115 + "px";
- });
- /**test */
- // funExcelChange({
- // id: 1,
- // name: 'excel',
- // type: 'fitting',
- // })
- });
- /**activated */
- // onActivated(() => {
- // funGetTree()
- // })
- const funMapDone = (mapStatus) => {
- if (mapStatus) {
- funGetTree();
- }
- };
- </script>
- <style lang="less" scoped>
- .dataAnalysisPosAnal {
- height: 100%;
- .dataAnalysisPosAnalMain {
- height: 100%;
- .main_top {
- height: 40px;
- display: flex;
- align-items: center;
- .topPsty {
- position: relative;
- top: 5px;
- padding: 7px 20px;
- font-size: 12px;
- font-weight: 600;
- margin-left: 10px;
- border-radius: 3px;
- }
- }
- .main {
- display: flex;
- width: 100%;
- .treeDataMain,
- .excelDataMain,
- .tableDataMain {
- border-radius: 10px;
- }
- .treeDataMain {
- margin-right: 10px;
- padding: 10px 0 10px 10px;
- width: calc(19% - 20px);
- }
- .excelDataMain {
- margin-right: 10px;
- padding: 10px 0 10px 10px;
- width: calc(15% - 20px);
- .excelDataMain_top {
- height: 49%;
- padding: 5px 0;
- }
- .excelDataMain_bot {
- padding: 5px 0;
- }
- }
- .tableDataMain {
- padding: 10px;
- width: calc(66% - 20px);
- position: relative;
- .butten_com {
- position: absolute;
- right: 20px;
- z-index: 111111;
- }
- }
- }
- }
- }
- .rightMenuDialog {
- .el-overlay-dialog {
- overflow: hidden;
- }
- }
- .themeDark {
- .dataAnalysisPosAnalMain {
- .main_top {
- .topPsty {
- color: #1c99ff;
- background: #1e2126;
- }
- }
- .main {
- background: #13171e;
- .treeDataMain {
- background: transparent;
- }
- .excelDataMain {
- background: #313233;
- }
- .tableDataMain {
- margin-top: 5px;
- background: #212223;
- }
- }
- }
- }
- .themeLight {
- padding: 0;
- .dataAnalysisPosAnalMain {
- .main_top {
- .topPsty {
- color: #2778ff;
- background: #ffffff;
- }
- }
- .main {
- background: #e6e8f2;
- .treeDataMain {
- background: transparent;
- }
- .excelDataMain {
- background: #f4f6fb;
- }
- .tableDataMain {
- background: #fff;
- margin-top: 5px;
- }
- }
- }
- }
- </style>
|