index.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086
  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">
  52. <div class="leftContent"><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. import dataJson from "./dataJson.json"
  328. export default {
  329. name: "comprehensiveAnalysis",
  330. data() {
  331. return {
  332. companyVal: "",
  333. companyOptions: [],
  334. pickerTimer: "",
  335. comAnalysisData: [],
  336. comAnalysisDataCompare: {},
  337. samePeriodOfTheMonth: [],
  338. samePeriodOfTheYear: [],
  339. showBtn: true,
  340. tabIndex: -1,
  341. tabOptions: [
  342. { id: -1, name: "风电" },
  343. { id: -2, name: "光伏" },
  344. ],
  345. tableHeaderMonth: [
  346. { title: "理论发电量", code: "yllfdl" },
  347. { title: "实际发电量", code: "ysjfdl" },
  348. { title: "风能利用率(%)", code: "yfnlyl" },
  349. { title: "维护损失电量", code: "ywhssdl" },
  350. { title: "维护损失率(%)", code: "ywhssl" },
  351. { title: "故障损失电量", code: "ygzssdl" },
  352. { title: "故障损失率(%)", code: "ygzssl" },
  353. { title: "限电损失电量", code: "yxdssdl" },
  354. { title: "限电损失率(%)", code: "yxdssl" },
  355. { title: "性能损失电量", code: "yxnssdl" },
  356. { title: "性能损失率(%)", code: "yxnssl" },
  357. { title: "受累损失电量", code: "yslssdl" },
  358. { title: "受累损失率(%)", code: "yslssl" },
  359. ],
  360. tableHeaderYear: [
  361. { title: "理论发电量", code: "nllfdl" },
  362. { title: "实际发电量", code: "nsjfdl" },
  363. { title: "风能利用率(%)", code: "nfnlyl" },
  364. { title: "维护损失电量", code: "nwhssdl" },
  365. { title: "维护损失率(%)", code: "nwhssl" },
  366. { title: "故障损失电量", code: "ngzssdl" },
  367. { title: "故障损失率(%)", code: "ngzssl" },
  368. { title: "限电损失电量", code: "nxdssdl" },
  369. { title: "限电损失率(%)", code: "nxdssl" },
  370. { title: "性能损失电量", code: "nxnssdl" },
  371. { title: "性能损失率(%)", code: "nxnssl" },
  372. { title: "受累损失电量", code: "nslssdl" },
  373. { title: "受累损失率(%)", code: "nslssl" },
  374. ],
  375. tableHeaderBot: [
  376. {
  377. title: "复位及时率(%)",
  378. code1: "fwjsl",
  379. code2: "tqfwjsl",
  380. code3: "fwjslCompare",
  381. },
  382. {
  383. title: "状态转换率(%)",
  384. code1: "ztzhl",
  385. code2: "tqztzhl",
  386. code3: "ztzhlCompare",
  387. },
  388. {
  389. title: "消缺及时率(%)",
  390. code1: "xqjsl",
  391. code2: "tqxqjsl",
  392. code3: "xqjslCompare",
  393. },
  394. { title: "MTBF", code1: "mtbf", code2: "tqmtbf", code3: "mtbfCompare" },
  395. { title: "MTTR", code1: "mttr", code2: "tqmttr", code3: "mttrCompare" },
  396. ],
  397. tableHeaderBot1: [
  398. {
  399. title: "系统效率(%)",
  400. code1: "fwjsl",
  401. code2: "tqfwjsl",
  402. code3: "fwjslCompare",
  403. },
  404. {
  405. title: "离散率(%)",
  406. code1: "ztzhl",
  407. code2: "tqztzhl",
  408. code3: "ztzhlCompare",
  409. },
  410. {
  411. title: "转换率(%)",
  412. code1: "xqjsl",
  413. code2: "tqxqjsl",
  414. code3: "xqjslCompare",
  415. },
  416. { title: "MTBF", code1: "mtbf", code2: "tqmtbf", code3: "mtbfCompare" },
  417. { title: "MTTR", code1: "mttr", code2: "tqmttr", code3: "mttrCompare" },
  418. ],
  419. };
  420. },
  421. created() {
  422. this.getCompanyData();
  423. },
  424. watch: {
  425. tabIndex(val) {
  426. this.tableHeaderMonth = this.tableHeaderMonth.map((item) => {
  427. if (val == -1) {
  428. if (item.code == "yfnlyl") {
  429. item.title = "风能利用率(%)";
  430. }
  431. } else {
  432. if (item.code == "yfnlyl") {
  433. item.title = "光能利用率(%)";
  434. }
  435. }
  436. return item;
  437. });
  438. this.tableHeaderYear = this.tableHeaderYear.map((item) => {
  439. if (val == -1) {
  440. if (item.code == "nfnlyl") {
  441. item.title = "风能利用率(%)";
  442. }
  443. } else {
  444. if (item.code == "nfnlyl") {
  445. item.title = "光能利用率(%)";
  446. }
  447. }
  448. return item;
  449. });
  450. },
  451. },
  452. mounted() {
  453. this.dataChange(dataJson.data)
  454. this.tabledataChange(dataJson.data)
  455. this.changePieData();
  456. },
  457. methods: {
  458. // 获取公司列表
  459. async getCompanyData() {
  460. this.companyOptions = [];
  461. this.pickerTimer = this.getchangeTime(new Date());
  462. const { data: datas } = await getApicompanyslist();
  463. this.companyOptions = datas.data;
  464. this.companyVal = datas.data[0]?.id;
  465. this.getTableTopData();
  466. this.getTableCenterData();
  467. },
  468. changeCompan(val) {
  469. this.companyVal = val;
  470. this.seachData();
  471. },
  472. tabClick(data) {
  473. this.tabIndex = data;
  474. if (data == -2) {
  475. this.companyVal = "SXJ_KGDL_GFFD_ZGS";
  476. } else {
  477. this.companyVal = this.companyOptions[0].id;
  478. }
  479. this.seachData();
  480. },
  481. changeBtn(id) {
  482. this.tabIndex = id;
  483. this.seachData();
  484. },
  485. seachData() {
  486. this.getTableTopData();
  487. this.getTableCenterData();
  488. },
  489. async getTableTopData() {
  490. let params = {
  491. companys: this.companyVal,
  492. type: this.tabIndex,
  493. month: this.pickerTimer,
  494. };
  495. this.comAnalysisData = [];
  496. this.comAnalysisDataCompare = {};
  497. const { data: datas } = await getApimaintoplist(params);
  498. this.dataChange(datas)
  499. this.changePieData();
  500. },
  501. dataChange(datas) {
  502. if (datas.data.length > 0) {
  503. datas.data.forEach((it) => {
  504. if (it.type !== "比较") {
  505. this.comAnalysisData.push(it);
  506. } else {
  507. this.comAnalysisDataCompare = it;
  508. }
  509. });
  510. }
  511. },
  512. async getTableCenterData() {
  513. this.samePeriodOfTheMonth = [];
  514. this.samePeriodOfTheYear = [];
  515. let params = {
  516. companys: this.companyVal,
  517. type: this.tabIndex,
  518. month: this.pickerTimer,
  519. };
  520. const { data: datas } = await getApimaincenterlist(params);
  521. this.tabledataChange(datas)
  522. },
  523. tabledataChange(datas) {
  524. if (datas.code === 200) {
  525. if (datas && datas.data) {
  526. this.samePeriodOfTheMonth = datas.data["当月"];
  527. this.samePeriodOfTheYear = datas.data["当年"];
  528. }
  529. } else {
  530. if (datas && datas.tabledata) {
  531. this.samePeriodOfTheMonth = datas.tabledata["当月"];
  532. this.samePeriodOfTheYear = datas.tabledata["当年"];
  533. }
  534. }
  535. },
  536. // 处理饼状图数据
  537. changePieData() {
  538. let lenged = ["性能损失", "维护损失", "故障损失", "限电损失", "受累损失"];
  539. let series = [];
  540. let series2 = [];
  541. let series3 = [];
  542. let series4 = [];
  543. this.comAnalysisData.forEach((it) => {
  544. if (it.type === "本期") {
  545. series = [
  546. { name: "性能损失", value: it.yxnssdl },
  547. { name: "维护损失", value: it.ywhssl },
  548. { name: "故障损失", value: it.ygzssdl },
  549. { name: "限电损失", value: it.yxdssdl },
  550. { name: "受累损失", value: it.yslssdl },
  551. ];
  552. series3 = [
  553. { name: "性能损失", value: it.nxnssdl },
  554. { name: "维护损失", value: it.nwhssl },
  555. { name: "故障损失", value: it.ngzssdl },
  556. { name: "限电损失", value: it.nxdssdl },
  557. { name: "受累损失", value: it.nslssdl },
  558. ];
  559. } else if (it.type === "同期") {
  560. series2 = [
  561. { name: "性能损失", value: it.yxnssdl },
  562. { name: "维护损失", value: it.ywhssl },
  563. { name: "故障损失", value: it.ygzssdl },
  564. { name: "限电损失", value: it.yxdssdl },
  565. { name: "受累损失", value: it.yslssdl },
  566. ];
  567. series4 = [
  568. { name: "性能损失", value: it.nxnssdl },
  569. { name: "维护损失", value: it.nwhssl },
  570. { name: "故障损失", value: it.ngzssdl },
  571. { name: "限电损失", value: it.nxdssdl },
  572. { name: "受累损失", value: it.nslssdl },
  573. ];
  574. }
  575. });
  576. this.getPieChart("当月电量分析", lenged, series, "monthChart");
  577. this.getPieChart("同期电量分析", lenged, series2, "monthTqChart");
  578. this.getPieChart("当年电量分析", lenged, series3, "yearChart");
  579. this.getPieChart("同期电量分析", lenged, series4, "yearTqChart");
  580. },
  581. //转换时间
  582. getchangeTime(date) {
  583. var y = date.getFullYear();
  584. var m = date.getMonth() + 1;
  585. m = m < 10 ? "0" + m : m;
  586. return y + "-" + m;
  587. },
  588. headerArr(label) {
  589. let arr = label.split("");
  590. let Newarr = [];
  591. let num = 0;
  592. let str = "";
  593. arr.forEach((it, index) => {
  594. num++;
  595. str += it;
  596. if (label.indexOf(it) + 1 !== label.length) {
  597. if (num % 3 === 0) {
  598. Newarr.push(str);
  599. str = "";
  600. }
  601. } else {
  602. Newarr.push(str);
  603. }
  604. });
  605. return Newarr;
  606. },
  607. getPieChart(nameTit, lenged, series, name) {
  608. let option = {
  609. color: ["#05bb4c", "#ba3237", "#e17e23", "#fff", "#c531c7"],
  610. legend: {
  611. type: "scroll",
  612. orient: "vertical",
  613. right: 15,
  614. top: "30%",
  615. itemWidth: 8,
  616. itemHeight: 8,
  617. textStyle: {
  618. color: "#fff",
  619. fontSize: 12,
  620. },
  621. formatter(params) {
  622. switch (params) {
  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. case "维护损失":
  636. return (
  637. params +
  638. " " +
  639. series.find((val) => val.name === params)?.value
  640. );
  641. case "受累损失":
  642. return (
  643. params +
  644. " " +
  645. series.find((val) => val.name === params)?.value
  646. );
  647. case "限电损失":
  648. return (
  649. params +
  650. " " +
  651. series.find((val) => val.name === params)?.value
  652. );
  653. case "性能损失":
  654. return (
  655. params +
  656. " " +
  657. series.find((val) => val.name === params)?.value
  658. );
  659. }
  660. },
  661. data: lenged,
  662. },
  663. radar: [
  664. {
  665. indicator: [{ text: "" }],
  666. center: ["38%", "50%"],
  667. radius: [0, 79],
  668. startAngle: 60,
  669. splitNumber: 5,
  670. shape: "circle",
  671. name: {
  672. formatter: "",
  673. textStyle: {
  674. color: "#0000FF",
  675. },
  676. },
  677. splitArea: {
  678. areaStyle: {
  679. color: "rgba(0, 0, 0, 0)",
  680. },
  681. },
  682. axisLine: {
  683. lineStyle: {
  684. color: "rgba(0, 0, 0, 0)",
  685. },
  686. },
  687. splitLine: {
  688. lineStyle: {
  689. color: "#0a389c",
  690. shadowColor: "#0a389c",
  691. shadowBlur: 10,
  692. },
  693. },
  694. },
  695. ],
  696. tooltip: {
  697. trigger: "item",
  698. },
  699. toolbox: {
  700. show: true,
  701. },
  702. series: [
  703. {
  704. // name: nameTit,
  705. type: "pie",
  706. radius: [0, 80],
  707. center: ["38%", "50%"],
  708. roseType: "area",
  709. label: {
  710. normal: {
  711. color: "#fff",
  712. formatter: "{d}%",
  713. },
  714. },
  715. itemStyle: {
  716. normal: {
  717. // 阴影的大小
  718. shadowBlur: 20,
  719. // 阴影水平方向上的偏移
  720. shadowOffsetX: 0,
  721. // 阴影垂直方向上的偏移
  722. shadowOffsetY: 0,
  723. // 阴影颜色
  724. shadowColor: "rgba(0,70,199, 0.8)",
  725. },
  726. borderRadius: 2,
  727. },
  728. labelLine: {
  729. length: 0,
  730. length2: 10,
  731. maxSurfaceAngle: 80,
  732. },
  733. data: series,
  734. },
  735. ],
  736. };
  737. let dom = document.getElementById(name);
  738. dom.removeAttribute("_echarts_instance_");
  739. let myChart = echarts.init(dom);
  740. myChart.clear();
  741. myChart.setOption(option);
  742. window.addEventListener("resize", function () {
  743. myChart.resize();
  744. });
  745. },
  746. downXlsxFn() {
  747. // Get_PDF.downloadPDF(document.querySelector(".comAnalysis"), "综合分析"+new Date(), false);
  748. Get_PDF.downloadPDF(
  749. document.getElementById("downPdf"),
  750. "综合分析" + new Date(),
  751. false
  752. );
  753. },
  754. },
  755. };
  756. </script>
  757. <style lang="less">
  758. .comAnalysis {
  759. padding: 0 20px;
  760. height: 100%;
  761. .comAnalysis_title {
  762. background: rgba(0, 0, 0, 0.45);
  763. .leftContent {
  764. width: 242px;
  765. height: 45px;
  766. line-height: 45px;
  767. background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
  768. span {
  769. font-size: 16px;
  770. font-family: Microsoft YaHei;
  771. font-weight: 400;
  772. color: #05bb4c;
  773. margin-left: 25px;
  774. }
  775. }
  776. }
  777. .comAnalysis_top {
  778. display: flex;
  779. flex-direction: row;
  780. align-items: center;
  781. padding-top: 10px;
  782. padding-bottom: 10px;
  783. .station {
  784. display: flex;
  785. flex-direction: row;
  786. align-items: center;
  787. font-size: 14px;
  788. font-family: Microsoft YaHei;
  789. font-weight: 400;
  790. color: #b3b3b3;
  791. margin-right: 10px;
  792. margin-left: 10px;
  793. }
  794. .tabCut {
  795. display: inline-block;
  796. margin: 0 10px;
  797. div {
  798. display: inline-block;
  799. width: 60px;
  800. height: 27px;
  801. border: 1px solid #274934;
  802. text-align: center;
  803. line-height: 25px;
  804. cursor: pointer;
  805. }
  806. div:nth-child(1) {
  807. border-radius: 13px 0px 0px 13px;
  808. }
  809. div:nth-child(2) {
  810. border-radius: 0px 13px 13px 0px;
  811. // cursor: not-allowed;
  812. }
  813. .active {
  814. background-color: rgba(5, 187, 76, 0.9);
  815. color: #fff;
  816. }
  817. }
  818. .search-input {
  819. margin-left: 10px;
  820. .el-input__inner {
  821. width: 175px;
  822. }
  823. .el-input__suffix {
  824. right: -50px;
  825. }
  826. }
  827. .but {
  828. display: flex;
  829. flex-direction: row;
  830. align-content: center;
  831. margin-left: 20px;
  832. .buttons:nth-child(1) {
  833. background: rgba(5, 187, 76, 0.6);
  834. border: 1px solid #3b6c53;
  835. border-radius: 13px;
  836. color: #fff;
  837. &:hover {
  838. background: rgba(5, 187, 76, 0.9);
  839. border-radius: 13px;
  840. color: #fff;
  841. }
  842. }
  843. .buttons:nth-child(2) {
  844. background: rgba(67, 81, 107, 0.3);
  845. border: 1px solid #3b6c53;
  846. border-radius: 13px;
  847. font-size: 14px;
  848. color: #b3b3b3;
  849. }
  850. }
  851. }
  852. .downPdf {
  853. height: calc(100% - 58px - 32px);
  854. padding-bottom: 10px;
  855. .comAnalysis_Table {
  856. padding-bottom: 10px;
  857. display: flex;
  858. height: calc(100% - 300px);
  859. .table_month,
  860. .table_year {
  861. width: 50%;
  862. height: 100%;
  863. background: rgba(0, 0, 0, 0.45);
  864. .table_top {
  865. height: 174px;
  866. .el-table--mini {
  867. .el-table__header-wrapper {
  868. tr {
  869. background: rgba(83, 89, 104, 0.3) !important;
  870. th {
  871. vertical-align: top !important;
  872. }
  873. .cell {
  874. color: #b3b3b3;
  875. font-family: MicrosoftYaHei;
  876. font-size: 14px;
  877. }
  878. }
  879. }
  880. .el-table__body-wrapper {
  881. tr {
  882. .cell {
  883. color: #d8d8d9;
  884. font-family: ArialMT;
  885. font-size: 13px;
  886. height: 25px !important;
  887. }
  888. }
  889. }
  890. }
  891. .columFlex {
  892. display: flex;
  893. justify-content: space-between;
  894. .topSvg {
  895. width: 1em;
  896. height: 1em;
  897. color: #1c99ff;
  898. }
  899. .botSvg {
  900. width: 1em;
  901. height: 1em;
  902. color: #ff8300;
  903. }
  904. }
  905. .table_top_tit {
  906. text-align: center;
  907. height: 30px;
  908. background: rgba(22, 31, 30, 1);
  909. span:nth-child(1) {
  910. font-size: 16px;
  911. color: #fff;
  912. line-height: 30px;
  913. font-family: MicrosoftYaHei;
  914. }
  915. span:nth-child(2) {
  916. float: right;
  917. font-family: MicrosoftYaHei;
  918. font-size: 12px;
  919. color: #b3b3b3;
  920. line-height: 30px;
  921. margin-right: 10px;
  922. }
  923. }
  924. }
  925. .table_bot {
  926. height: calc(100% - 174px - 20px);
  927. margin-top: 20px;
  928. .el-table--mini .el-table__cell {
  929. padding: 3px 0;
  930. }
  931. .el-table--mini {
  932. .el-table__header-wrapper {
  933. tr {
  934. .cell {
  935. color: #b3b3b3;
  936. font-family: MicrosoftYaHei;
  937. font-size: 14px;
  938. }
  939. }
  940. tr:nth-child(1) {
  941. background: rgba(83, 89, 104, 0.3) !important;
  942. }
  943. }
  944. .el-table__body-wrapper {
  945. tr {
  946. .cell {
  947. color: #d8d8d9;
  948. font-family: ArialMT;
  949. font-size: 13px;
  950. }
  951. }
  952. }
  953. }
  954. .columFlex {
  955. display: flex;
  956. justify-content: space-between;
  957. .topSvg {
  958. width: 1em;
  959. height: 1em;
  960. color: #1c99ff;
  961. }
  962. .botSvg {
  963. width: 1em;
  964. height: 1em;
  965. color: #ff8300;
  966. }
  967. }
  968. }
  969. }
  970. }
  971. .comAnalysis_Echarts {
  972. height: 300px;
  973. display: flex;
  974. .echarts_month,
  975. .echarts_year {
  976. width: 50%;
  977. display: flex;
  978. height: 100%;
  979. .echartsWid {
  980. width: calc(50% - 10px);
  981. background: rgba(0, 0, 0, 0.45);
  982. position: relative;
  983. height: 100%;
  984. // border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  985. font-size: 16px;
  986. font-family: Microsoft YaHei;
  987. font-weight: 400;
  988. color: #ffffff;
  989. .chart-name {
  990. display: flex;
  991. align-items: center;
  992. padding: 0 5px 0 20px;
  993. position: relative;
  994. height: 39px;
  995. width: 100%;
  996. border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  997. font-size: 16px;
  998. font-family: Microsoft YaHei;
  999. font-weight: 400;
  1000. color: #ffffff;
  1001. background: rgba(22, 31, 30, 1);
  1002. }
  1003. p {
  1004. font-size: 16px;
  1005. font-family: Microsoft YaHei;
  1006. color: #fff;
  1007. margin-left: 20px;
  1008. margin-top: 10px;
  1009. }
  1010. .echartsSty {
  1011. width: 100%;
  1012. height: calc(100% - 39px);
  1013. background: rgba(96, 103, 105, 0.2);
  1014. }
  1015. .point {
  1016. width: 6px;
  1017. height: 1px;
  1018. background-color: #ffffff;
  1019. position: absolute;
  1020. &.point-left {
  1021. left: 0;
  1022. }
  1023. &.point-right {
  1024. right: 0;
  1025. }
  1026. &.top {
  1027. top: -1px;
  1028. }
  1029. &.bottom {
  1030. bottom: -1px;
  1031. }
  1032. }
  1033. }
  1034. }
  1035. }
  1036. }
  1037. }
  1038. </style>