index.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083
  1. <template>
  2. <div class="comAnalysis">
  3. <div class="comAnalysis_top">
  4. <el-select
  5. size="mini"
  6. v-model="companyVal"
  7. placeholder="请选择"
  8. @change="changeCompan"
  9. >
  10. <el-option
  11. v-for="item in companyOptions"
  12. :key="item.id"
  13. :label="item.aname"
  14. :value="item.id"
  15. >
  16. </el-option>
  17. </el-select>
  18. <div class="tabCut">
  19. <div
  20. @click="tabClick(val.id)"
  21. :class="tabIndex === val.id ? 'active' : ''"
  22. v-for="val in tabOptions"
  23. :key="val.id"
  24. >
  25. <span>{{ val.name }}</span>
  26. </div>
  27. </div>
  28. <div class="station">
  29. 时间:
  30. <div class="">
  31. <el-date-picker
  32. size="mini"
  33. v-model="pickerTimer"
  34. type="month"
  35. value-format="YYYY-MM"
  36. placeholder="选择日期"
  37. popper-class="date-select"
  38. >
  39. </el-date-picker>
  40. </div>
  41. </div>
  42. <div class="but">
  43. <el-button round size="mini" class="buttons" @click="seachData"
  44. >搜索</el-button
  45. >
  46. <el-button round size="mini" class="buttons" @click="downXlsxFn"
  47. >导出</el-button
  48. >
  49. </div>
  50. </div>
  51. <div class="comAnalysis_title clearfix">
  52. <div class="leftContent floatLeft"><span>综合分析</span></div>
  53. </div>
  54. <div class="downPdf" id="downPdf">
  55. <div class="comAnalysis_Table">
  56. <div class="table_month" style="margin-right: 5px">
  57. <div class="table_top">
  58. <div class="table_top_tit">
  59. <span>月度</span>
  60. <span>万kWh</span>
  61. </div>
  62. <!-- :cell-style="{ padding: '6px' }" :row-style="{ height: '0' }" -->
  63. <el-table
  64. :data="comAnalysisData"
  65. size="mini"
  66. stripe
  67. ref="stand_table"
  68. style="width: 100%"
  69. height="100%"
  70. >
  71. <el-table-column prop="type" align="center"> </el-table-column>
  72. <el-table-column
  73. v-for="(item, index) in tableHeaderMonth"
  74. :key="index"
  75. width="64"
  76. :prop="item.code"
  77. :label="item.title"
  78. align="center"
  79. >
  80. <template #header="scope">
  81. <div v-if="scope.column.label.indexOf('(') > 0">
  82. <div>
  83. {{
  84. scope.column.label.slice(
  85. 0,
  86. scope.column.label.indexOf("(")
  87. )
  88. }}
  89. </div>
  90. <div>
  91. {{
  92. scope.column.label.slice(
  93. scope.column.label.indexOf("(")
  94. )
  95. }}
  96. </div>
  97. </div>
  98. <div v-else>{{ scope.column.label }}</div>
  99. </template>
  100. <template #default="scope">
  101. <div class="columFlex">
  102. <div style="width: 80%">
  103. <span>{{ scope.row[item.code] }}</span>
  104. </div>
  105. <div>
  106. <Bottom
  107. class="botSvg"
  108. v-if="comAnalysisDataCompare[item.code] * 1 === 2"
  109. />
  110. <Top
  111. class="topSvg"
  112. v-else-if="comAnalysisDataCompare[item.code] * 1 === 1"
  113. />
  114. </div>
  115. </div>
  116. </template>
  117. </el-table-column>
  118. </el-table>
  119. </div>
  120. <div class="table_bot">
  121. <el-table
  122. :data="samePeriodOfTheMonth"
  123. size="mini"
  124. height="100%"
  125. stripe
  126. ref="stand_table"
  127. class="lvTable"
  128. style="width: 100%"
  129. >
  130. <el-table-column prop="wpid" align="center">
  131. <el-table-column prop="wpid" align="center"></el-table-column>
  132. </el-table-column>
  133. <el-table-column
  134. v-for="(item, index) in tabIndex === -1
  135. ? tableHeaderBot
  136. : tableHeaderBot1"
  137. :key="index"
  138. width="64"
  139. :label="item.title"
  140. align="center"
  141. >
  142. <el-table-column :prop="item.code1" label="当月" align="center">
  143. <template #default="scope">
  144. <div class="columFlex">
  145. <div style="width: 80%">
  146. <span>{{ scope.row[item.code1] }}</span>
  147. </div>
  148. <div>
  149. <Bottom
  150. class="botSvg"
  151. v-if="scope.row[item.code3] * 1 === 2"
  152. />
  153. <Top class="topSvg" v-else />
  154. </div>
  155. </div>
  156. </template>
  157. </el-table-column>
  158. <el-table-column :prop="item.code2" label="同期" align="center">
  159. <template #default="scope">
  160. <span>{{ scope.row[item.code2] }}</span>
  161. </template>
  162. </el-table-column>
  163. </el-table-column>
  164. </el-table>
  165. </div>
  166. </div>
  167. <div class="table_year" style="margin-left: 5px">
  168. <div class="table_top">
  169. <div class="table_top_tit">
  170. <span>年度</span>
  171. <span>万kWh</span>
  172. </div>
  173. <!-- :cell-style="{ padding: '6px' }" :row-style="{ height: '0' }" -->
  174. <el-table
  175. :data="comAnalysisData"
  176. size="mini"
  177. stripe
  178. ref="stand_table"
  179. style="width: 100%"
  180. height="calc(100% - 24px)"
  181. >
  182. <el-table-column prop="type" align="center"> </el-table-column>
  183. <el-table-column
  184. v-for="(item, index) in tableHeaderYear"
  185. :key="index"
  186. width="63"
  187. :prop="item.code"
  188. :label="item.title"
  189. align="center"
  190. >
  191. <template #header="scope">
  192. <div v-if="scope.column.label.indexOf('(') > 0">
  193. <div>
  194. {{
  195. scope.column.label.slice(
  196. 0,
  197. scope.column.label.indexOf("(")
  198. )
  199. }}
  200. </div>
  201. <div>
  202. {{
  203. scope.column.label.slice(
  204. scope.column.label.indexOf("(")
  205. )
  206. }}
  207. </div>
  208. </div>
  209. <div v-else>{{ scope.column.label }}</div>
  210. </template>
  211. <template #default="scope">
  212. <div class="columFlex">
  213. <div style="width: 80%">
  214. <span>{{ scope.row[item.code] }}</span>
  215. </div>
  216. <div>
  217. <Bottom
  218. class="botSvg"
  219. v-if="comAnalysisDataCompare[item.code] * 1 === 2"
  220. />
  221. <Top
  222. class="topSvg"
  223. v-else-if="comAnalysisDataCompare[item.code] * 1 === 1"
  224. />
  225. </div>
  226. </div>
  227. </template>
  228. </el-table-column>
  229. </el-table>
  230. </div>
  231. <div class="table_bot">
  232. <el-table
  233. :data="samePeriodOfTheYear"
  234. size="mini"
  235. height="100%"
  236. stripe
  237. ref="stand_table"
  238. style="width: 100%"
  239. >
  240. <el-table-column prop="wpid" align="center">
  241. <el-table-column prop="wpid" align="center"></el-table-column>
  242. </el-table-column>
  243. <el-table-column
  244. v-for="(item, index) in tabIndex === -1
  245. ? tableHeaderBot
  246. : tableHeaderBot1"
  247. :key="index"
  248. width="64"
  249. :label="item.title"
  250. align="center"
  251. >
  252. <el-table-column :prop="item.code1" label="当月" align="center">
  253. <template #default="scope">
  254. <div class="columFlex">
  255. <div style="width: 80%">
  256. <span>{{ scope.row[item.code1] }}</span>
  257. </div>
  258. <div>
  259. <Bottom
  260. class="botSvg"
  261. v-if="scope.row[item.code3] * 1 === 2"
  262. />
  263. <Top class="topSvg" v-else />
  264. </div>
  265. </div>
  266. </template>
  267. </el-table-column>
  268. <el-table-column :prop="item.code2" label="同期" align="center">
  269. <template #default="scope">
  270. <span>{{ scope.row[item.code2] }}</span>
  271. </template>
  272. </el-table-column>
  273. </el-table-column>
  274. </el-table>
  275. </div>
  276. </div>
  277. </div>
  278. <div class="comAnalysis_Echarts">
  279. <div class="echarts_month">
  280. <div class="echartsWid" style="margin-right: 15px">
  281. <div class="chart-name">
  282. <div class="point point-left bottom"></div>
  283. <div class="point point-right bottom"></div>
  284. <span>当月电量分析</span>
  285. </div>
  286. <div id="monthChart" class="echartsSty"></div>
  287. </div>
  288. <div class="echartsWid">
  289. <div class="chart-name">
  290. <div class="point point-left bottom"></div>
  291. <div class="point point-right bottom"></div>
  292. <span>同期电量分析</span>
  293. </div>
  294. <div id="monthTqChart" class="echartsSty"></div>
  295. </div>
  296. </div>
  297. <div class="echarts_year">
  298. <div class="echartsWid" style="margin: 0 15px 0 5px">
  299. <div class="chart-name">
  300. <div class="point point-left bottom"></div>
  301. <div class="point point-right bottom"></div>
  302. <span>当年电量分析</span>
  303. </div>
  304. <div id="yearChart" class="echartsSty"></div>
  305. </div>
  306. <div class="echartsWid">
  307. <div class="chart-name">
  308. <div class="point point-left bottom"></div>
  309. <div class="point point-right bottom"></div>
  310. <span>同期电量分析</span>
  311. </div>
  312. <div id="yearTqChart" class="echartsSty"></div>
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. </template>
  319. <script>
  320. import {
  321. getApicompanyslist,
  322. getApimaintoplist,
  323. getApimaincenterlist,
  324. } from "@/api/monthlyPerformanceAnalysis";
  325. import Get_PDF from "@/tools/htmlToPdf.js";
  326. import * as echarts from "echarts";
  327. export default {
  328. name: "comprehensiveAnalysis",
  329. data() {
  330. return {
  331. companyVal: "",
  332. companyOptions: [],
  333. pickerTimer: "",
  334. comAnalysisData: [],
  335. comAnalysisDataCompare: {},
  336. samePeriodOfTheMonth: [],
  337. samePeriodOfTheYear: [],
  338. showBtn: true,
  339. tabIndex: -1,
  340. tabOptions: [
  341. { id: -1, name: "风电" },
  342. { id: -2, name: "光伏" },
  343. ],
  344. tableHeaderMonth: [
  345. { title: "理论发电量", code: "yllfdl" },
  346. { title: "实际发电量", code: "ysjfdl" },
  347. { title: "风能利用率(%)", code: "yfnlyl" },
  348. { title: "维护损失电量", code: "ywhssdl" },
  349. { title: "维护损失率(%)", code: "ywhssl" },
  350. { title: "故障损失电量", code: "ygzssdl" },
  351. { title: "故障损失率(%)", code: "ygzssl" },
  352. { title: "限电损失电量", code: "yxdssdl" },
  353. { title: "限电损失率(%)", code: "yxdssl" },
  354. { title: "性能损失电量", code: "yxnssdl" },
  355. { title: "性能损失率(%)", code: "yxnssl" },
  356. { title: "受累损失电量", code: "yslssdl" },
  357. { title: "受累损失率(%)", code: "yslssl" },
  358. ],
  359. tableHeaderYear: [
  360. { title: "理论发电量", code: "nllfdl" },
  361. { title: "实际发电量", code: "nsjfdl" },
  362. { title: "风能利用率(%)", code: "nfnlyl" },
  363. { title: "维护损失电量", code: "nwhssdl" },
  364. { title: "维护损失率(%)", code: "nwhssl" },
  365. { title: "故障损失电量", code: "ngzssdl" },
  366. { title: "故障损失率(%)", code: "ngzssl" },
  367. { title: "限电损失电量", code: "nxdssdl" },
  368. { title: "限电损失率(%)", code: "nxdssl" },
  369. { title: "性能损失电量", code: "nxnssdl" },
  370. { title: "性能损失率(%)", code: "nxnssl" },
  371. { title: "受累损失电量", code: "nslssdl" },
  372. { title: "受累损失率(%)", code: "nslssl" },
  373. ],
  374. tableHeaderBot: [
  375. {
  376. title: "复位及时率(%)",
  377. code1: "fwjsl",
  378. code2: "tqfwjsl",
  379. code3: "fwjslCompare",
  380. },
  381. {
  382. title: "状态转换率(%)",
  383. code1: "ztzhl",
  384. code2: "tqztzhl",
  385. code3: "ztzhlCompare",
  386. },
  387. {
  388. title: "消缺及时率(%)",
  389. code1: "xqjsl",
  390. code2: "tqxqjsl",
  391. code3: "xqjslCompare",
  392. },
  393. { title: "MTBF", code1: "mtbf", code2: "tqmtbf", code3: "mtbfCompare" },
  394. { title: "MTTR", code1: "mttr", code2: "tqmttr", code3: "mttrCompare" },
  395. ],
  396. tableHeaderBot1: [
  397. {
  398. title: "系统效率(%)",
  399. code1: "fwjsl",
  400. code2: "tqfwjsl",
  401. code3: "fwjslCompare",
  402. },
  403. {
  404. title: "离散率(%)",
  405. code1: "ztzhl",
  406. code2: "tqztzhl",
  407. code3: "ztzhlCompare",
  408. },
  409. {
  410. title: "转换率(%)",
  411. code1: "xqjsl",
  412. code2: "tqxqjsl",
  413. code3: "xqjslCompare",
  414. },
  415. { title: "MTBF", code1: "mtbf", code2: "tqmtbf", code3: "mtbfCompare" },
  416. { title: "MTTR", code1: "mttr", code2: "tqmttr", code3: "mttrCompare" },
  417. ],
  418. };
  419. },
  420. created() {
  421. this.getCompanyData();
  422. },
  423. watch: {
  424. tabIndex(val) {
  425. this.tableHeaderMonth = this.tableHeaderMonth.map((item) => {
  426. if (val == -1) {
  427. if (item.code == "yfnlyl") {
  428. item.title = "风能利用率(%)";
  429. }
  430. } else {
  431. if (item.code == "yfnlyl") {
  432. item.title = "光能利用率(%)";
  433. }
  434. }
  435. return item;
  436. });
  437. this.tableHeaderYear = this.tableHeaderYear.map((item) => {
  438. if (val == -1) {
  439. if (item.code == "nfnlyl") {
  440. item.title = "风能利用率(%)";
  441. }
  442. } else {
  443. if (item.code == "nfnlyl") {
  444. item.title = "光能利用率(%)";
  445. }
  446. }
  447. return item;
  448. });
  449. },
  450. },
  451. methods: {
  452. // 获取公司列表
  453. async getCompanyData() {
  454. this.companyOptions = [];
  455. this.pickerTimer = this.getchangeTime(new Date());
  456. const { data: datas } = await getApicompanyslist();
  457. this.companyOptions = datas.data;
  458. this.companyVal = datas.data[0]?.id;
  459. this.getTableTopData();
  460. this.getTableCenterData();
  461. },
  462. changeCompan(val) {
  463. this.companyVal = val;
  464. this.seachData();
  465. },
  466. tabClick(data) {
  467. this.tabIndex = data;
  468. this.seachData();
  469. },
  470. changeBtn(id) {
  471. this.tabIndex = id;
  472. this.seachData();
  473. },
  474. seachData() {
  475. this.getTableTopData();
  476. this.getTableCenterData();
  477. },
  478. async getTableTopData() {
  479. let params = {
  480. companys: this.companyVal,
  481. type: this.tabIndex,
  482. month: this.pickerTimer,
  483. };
  484. const { data: datas } = await getApimaintoplist(params);
  485. this.comAnalysisData = [];
  486. this.comAnalysisDataCompare = {};
  487. if (datas.data.length > 0) {
  488. datas.data.forEach((it) => {
  489. if (it.type !== "比较") {
  490. this.comAnalysisData.push(it);
  491. } else {
  492. this.comAnalysisDataCompare = it;
  493. }
  494. });
  495. }
  496. this.changePieData();
  497. },
  498. async getTableCenterData() {
  499. this.samePeriodOfTheMonth = [];
  500. this.samePeriodOfTheYear = [];
  501. let params = {
  502. companys: this.companyVal,
  503. type: this.tabIndex,
  504. month: this.pickerTimer,
  505. };
  506. const { data: datas } = await getApimaincenterlist(params);
  507. if (datas && datas.data) {
  508. this.samePeriodOfTheMonth = datas.data["当月"];
  509. this.samePeriodOfTheYear = datas.data["当年"];
  510. }
  511. },
  512. // 处理饼状图数据
  513. changePieData() {
  514. let lenged = ["性能损失", "维护损失", "故障损失", "限电损失", "受累损失"];
  515. let series = [];
  516. let series2 = [];
  517. let series3 = [];
  518. let series4 = [];
  519. this.comAnalysisData.forEach((it) => {
  520. if (it.type === "本期") {
  521. series = [
  522. { name: "性能损失", value: it.yxnssdl },
  523. { name: "维护损失", value: it.ywhssl },
  524. { name: "故障损失", value: it.ygzssdl },
  525. { name: "限电损失", value: it.yxdssdl },
  526. { name: "受累损失", value: it.yslssdl },
  527. ];
  528. series3 = [
  529. { name: "性能损失", value: it.nxnssdl },
  530. { name: "维护损失", value: it.nwhssl },
  531. { name: "故障损失", value: it.ngzssdl },
  532. { name: "限电损失", value: it.nxdssdl },
  533. { name: "受累损失", value: it.nslssdl },
  534. ];
  535. } else if (it.type === "同期") {
  536. series2 = [
  537. { name: "性能损失", value: it.yxnssdl },
  538. { name: "维护损失", value: it.ywhssl },
  539. { name: "故障损失", value: it.ygzssdl },
  540. { name: "限电损失", value: it.yxdssdl },
  541. { name: "受累损失", value: it.yslssdl },
  542. ];
  543. series4 = [
  544. { name: "性能损失", value: it.nxnssdl },
  545. { name: "维护损失", value: it.nwhssl },
  546. { name: "故障损失", value: it.ngzssdl },
  547. { name: "限电损失", value: it.nxdssdl },
  548. { name: "受累损失", value: it.nslssdl },
  549. ];
  550. }
  551. });
  552. this.getPieChart("当月电量分析", lenged, series, "monthChart");
  553. this.getPieChart("同期电量分析", lenged, series2, "monthTqChart");
  554. this.getPieChart("当年电量分析", lenged, series3, "yearChart");
  555. this.getPieChart("同期电量分析", lenged, series4, "yearTqChart");
  556. },
  557. //转换时间
  558. getchangeTime(date) {
  559. var y = date.getFullYear();
  560. var m = date.getMonth() + 1;
  561. m = m < 10 ? "0" + m : m;
  562. return y + "-" + m;
  563. },
  564. headerArr(label) {
  565. let arr = label.split("");
  566. let Newarr = [];
  567. let num = 0;
  568. let str = "";
  569. arr.forEach((it, index) => {
  570. num++;
  571. str += it;
  572. if (label.indexOf(it) + 1 !== label.length) {
  573. if (num % 3 === 0) {
  574. Newarr.push(str);
  575. str = "";
  576. }
  577. } else {
  578. Newarr.push(str);
  579. }
  580. });
  581. return Newarr;
  582. },
  583. getPieChart(nameTit, lenged, series, name) {
  584. let option = {
  585. color: ["#05bb4c", "#ba3237", "#e17e23", "#fff", "#c531c7"],
  586. legend: {
  587. type: "scroll",
  588. orient: "vertical",
  589. right: 15,
  590. top: "30%",
  591. itemWidth: 8,
  592. itemHeight: 8,
  593. textStyle: {
  594. color: "#fff",
  595. fontSize: 12,
  596. },
  597. formatter(params) {
  598. switch (params) {
  599. case "实发电量":
  600. return (
  601. params +
  602. " " +
  603. series.find((val) => val.name === params)?.value
  604. );
  605. case "故障损失":
  606. return (
  607. params +
  608. " " +
  609. series.find((val) => val.name === params)?.value
  610. );
  611. case "维护损失":
  612. return (
  613. params +
  614. " " +
  615. series.find((val) => val.name === params)?.value
  616. );
  617. case "受累损失":
  618. return (
  619. params +
  620. " " +
  621. series.find((val) => val.name === params)?.value
  622. );
  623. case "限电损失":
  624. return (
  625. params +
  626. " " +
  627. series.find((val) => val.name === params)?.value
  628. );
  629. case "性能损失":
  630. return (
  631. params +
  632. " " +
  633. series.find((val) => val.name === params)?.value
  634. );
  635. }
  636. },
  637. data: lenged,
  638. },
  639. radar: [
  640. {
  641. indicator: [{ text: "" }],
  642. center: ["38%", "50%"],
  643. radius: [0, 79],
  644. startAngle: 60,
  645. splitNumber: 5,
  646. shape: "circle",
  647. name: {
  648. formatter: "",
  649. textStyle: {
  650. color: "#0000FF",
  651. },
  652. },
  653. splitArea: {
  654. areaStyle: {
  655. color: "rgba(0, 0, 0, 0)",
  656. },
  657. },
  658. axisLine: {
  659. lineStyle: {
  660. color: "rgba(0, 0, 0, 0)",
  661. },
  662. },
  663. splitLine: {
  664. lineStyle: {
  665. color: "#0a389c",
  666. shadowColor: "#0a389c",
  667. shadowBlur: 10,
  668. },
  669. },
  670. },
  671. ],
  672. tooltip: {
  673. trigger: "item",
  674. },
  675. toolbox: {
  676. show: true,
  677. },
  678. series: [
  679. {
  680. // name: nameTit,
  681. type: "pie",
  682. radius: [0, 80],
  683. center: ["38%", "50%"],
  684. roseType: "area",
  685. label: {
  686. normal: {
  687. color: "#fff",
  688. formatter: "{d}%",
  689. },
  690. },
  691. itemStyle: {
  692. normal: {
  693. // 阴影的大小
  694. shadowBlur: 20,
  695. // 阴影水平方向上的偏移
  696. shadowOffsetX: 0,
  697. // 阴影垂直方向上的偏移
  698. shadowOffsetY: 0,
  699. // 阴影颜色
  700. shadowColor: "rgba(0,70,199, 0.8)",
  701. },
  702. borderRadius: 2,
  703. },
  704. labelLine: {
  705. length: 0,
  706. length2: 10,
  707. maxSurfaceAngle: 80,
  708. },
  709. data: series,
  710. },
  711. ],
  712. };
  713. let dom = document.getElementById(name);
  714. dom.removeAttribute("_echarts_instance_");
  715. let myChart = echarts.init(dom);
  716. myChart.clear();
  717. myChart.setOption(option);
  718. window.addEventListener("resize", function () {
  719. myChart.resize();
  720. });
  721. },
  722. downXlsxFn() {
  723. // Get_PDF.downloadPDF(document.querySelector(".comAnalysis"), "综合分析"+new Date(), false);
  724. Get_PDF.downloadPDF(
  725. document.getElementById("downPdf"),
  726. "综合分析" + new Date(),
  727. false
  728. );
  729. },
  730. },
  731. };
  732. </script>
  733. <style lang="less">
  734. .comAnalysis {
  735. padding: 0 20px;
  736. height: 100%;
  737. .comAnalysis_title {
  738. background: rgba(0, 0, 0, 0.45);
  739. .leftContent {
  740. width: 242px;
  741. height: 41px;
  742. line-height: 41px;
  743. background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
  744. span {
  745. font-size: 16px;
  746. font-family: Microsoft YaHei;
  747. font-weight: 400;
  748. color: #ffffff;
  749. margin-left: 25px;
  750. }
  751. }
  752. .floatLeft {
  753. float: left;
  754. }
  755. .floatRight {
  756. float: right;
  757. }
  758. }
  759. .clearfix::after {
  760. content: "";
  761. clear: both;
  762. height: 0;
  763. line-height: 0;
  764. visibility: hidden;
  765. display: block;
  766. }
  767. .clearfix {
  768. zoom: 1;
  769. }
  770. .comAnalysis_top {
  771. display: flex;
  772. flex-direction: row;
  773. align-items: center;
  774. padding-top: 10px;
  775. padding-bottom: 10px;
  776. .station {
  777. display: flex;
  778. flex-direction: row;
  779. align-items: center;
  780. font-size: 14px;
  781. font-family: Microsoft YaHei;
  782. font-weight: 400;
  783. color: #b3b3b3;
  784. margin-right: 10px;
  785. margin-left: 10px;
  786. }
  787. .tabCut {
  788. display: inline-block;
  789. margin: 0 10px;
  790. div {
  791. display: inline-block;
  792. width: 60px;
  793. height: 27px;
  794. border: 1px solid #274934;
  795. text-align: center;
  796. line-height: 25px;
  797. cursor: pointer;
  798. }
  799. div:nth-child(1) {
  800. border-radius: 13px 0px 0px 13px;
  801. }
  802. div:nth-child(2) {
  803. border-radius: 0px 13px 13px 0px;
  804. // cursor: not-allowed;
  805. }
  806. .active {
  807. background-color: rgba(5, 187, 76, 0.9);
  808. color: #fff;
  809. }
  810. }
  811. .search-input {
  812. margin-left: 10px;
  813. .el-input__inner {
  814. width: 175px;
  815. }
  816. .el-input__suffix {
  817. right: -50px;
  818. }
  819. }
  820. .but {
  821. display: flex;
  822. flex-direction: row;
  823. align-content: center;
  824. margin-left: 20px;
  825. .buttons:nth-child(1) {
  826. background: rgba(5, 187, 76, 0.6);
  827. border: 1px solid #3b6c53;
  828. border-radius: 13px;
  829. color: #fff;
  830. &:hover {
  831. background: rgba(5, 187, 76, 0.9);
  832. border-radius: 13px;
  833. color: #fff;
  834. }
  835. }
  836. .buttons:nth-child(2) {
  837. background: rgba(67, 81, 107, 0.3);
  838. border: 1px solid #3b6c53;
  839. border-radius: 13px;
  840. font-size: 14px;
  841. color: #b3b3b3;
  842. }
  843. }
  844. }
  845. .downPdf {
  846. height: calc(100% - 58px - 32px);
  847. padding-bottom: 10px;
  848. .comAnalysis_Table {
  849. padding-bottom: 10px;
  850. display: flex;
  851. height: calc(100% - 300px);
  852. .table_month,
  853. .table_year {
  854. width: 50%;
  855. height: 100%;
  856. background: rgba(0, 0, 0, 0.45);
  857. .table_top {
  858. height: 174px;
  859. .el-table--mini {
  860. .el-table__header-wrapper {
  861. tr {
  862. background: rgba(83, 89, 104, 0.3) !important;
  863. th {
  864. vertical-align: top !important;
  865. }
  866. .cell {
  867. color: #b3b3b3;
  868. font-family: MicrosoftYaHei;
  869. font-size: 14px;
  870. }
  871. }
  872. }
  873. .el-table__body-wrapper {
  874. tr {
  875. .cell {
  876. color: #d8d8d9;
  877. font-family: ArialMT;
  878. font-size: 13px;
  879. height: 25px !important;
  880. }
  881. }
  882. }
  883. }
  884. .columFlex {
  885. display: flex;
  886. justify-content: space-between;
  887. .topSvg {
  888. width: 1em;
  889. height: 1em;
  890. color: #1c99ff;
  891. }
  892. .botSvg {
  893. width: 1em;
  894. height: 1em;
  895. color: #ff8300;
  896. }
  897. }
  898. .table_top_tit {
  899. text-align: center;
  900. height: 30px;
  901. background: rgba(22, 31, 30, 1);
  902. span:nth-child(1) {
  903. font-size: 16px;
  904. color: #fff;
  905. line-height: 30px;
  906. font-family: MicrosoftYaHei;
  907. }
  908. span:nth-child(2) {
  909. float: right;
  910. font-family: MicrosoftYaHei;
  911. font-size: 12px;
  912. color: #b3b3b3;
  913. line-height: 30px;
  914. margin-right: 10px;
  915. }
  916. }
  917. }
  918. .table_bot {
  919. height: calc(100% - 174px - 20px);
  920. margin-top: 20px;
  921. .el-table--mini .el-table__cell {
  922. padding: 3px 0;
  923. }
  924. .el-table--mini {
  925. .el-table__header-wrapper {
  926. tr {
  927. .cell {
  928. color: #b3b3b3;
  929. font-family: MicrosoftYaHei;
  930. font-size: 14px;
  931. }
  932. }
  933. tr:nth-child(1) {
  934. background: rgba(83, 89, 104, 0.3) !important;
  935. }
  936. }
  937. .el-table__body-wrapper {
  938. tr {
  939. .cell {
  940. color: #d8d8d9;
  941. font-family: ArialMT;
  942. font-size: 13px;
  943. }
  944. }
  945. }
  946. }
  947. .columFlex {
  948. display: flex;
  949. justify-content: space-between;
  950. .topSvg {
  951. width: 1em;
  952. height: 1em;
  953. color: #1c99ff;
  954. }
  955. .botSvg {
  956. width: 1em;
  957. height: 1em;
  958. color: #ff8300;
  959. }
  960. }
  961. }
  962. }
  963. }
  964. .comAnalysis_Echarts {
  965. height: 300px;
  966. display: flex;
  967. .echarts_month,
  968. .echarts_year {
  969. width: 50%;
  970. display: flex;
  971. height: 100%;
  972. .echartsWid {
  973. width: calc(50% - 10px);
  974. background: rgba(0, 0, 0, 0.45);
  975. position: relative;
  976. height: 100%;
  977. // border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  978. font-size: 16px;
  979. font-family: Microsoft YaHei;
  980. font-weight: 400;
  981. color: #ffffff;
  982. .chart-name {
  983. display: flex;
  984. align-items: center;
  985. padding: 0 5px 0 20px;
  986. position: relative;
  987. height: 39px;
  988. width: 100%;
  989. border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  990. font-size: 16px;
  991. font-family: Microsoft YaHei;
  992. font-weight: 400;
  993. color: #ffffff;
  994. background: rgba(22, 31, 30, 1);
  995. }
  996. p {
  997. font-size: 16px;
  998. font-family: Microsoft YaHei;
  999. color: #fff;
  1000. margin-left: 20px;
  1001. margin-top: 10px;
  1002. }
  1003. .echartsSty {
  1004. width: 100%;
  1005. height: calc(100% - 39px);
  1006. background: rgba(96, 103, 105, 0.2);
  1007. }
  1008. .point {
  1009. width: 6px;
  1010. height: 1px;
  1011. background-color: #ffffff;
  1012. position: absolute;
  1013. &.point-left {
  1014. left: 0;
  1015. }
  1016. &.point-right {
  1017. right: 0;
  1018. }
  1019. &.top {
  1020. top: -1px;
  1021. }
  1022. &.bottom {
  1023. bottom: -1px;
  1024. }
  1025. }
  1026. }
  1027. }
  1028. }
  1029. }
  1030. }
  1031. </style>