card.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404
  1. <template>
  2. <div style="height: 100%; overflow-y: auto">
  3. <!-- 加入对标弹窗-->
  4. <!-- 加入对标弹窗-->
  5. <div
  6. @mouseenter="leaveList(true)"
  7. @mouseleave="leaveList(false)"
  8. style="z-index: 9; width: 200px; background: #0c0f15"
  9. v-if="
  10. theme === 'maintenance' &&
  11. disBenchList === true &&
  12. benchmarkingVal !== 'bench2' &&
  13. benchmarkingVal !== 'bench1'
  14. "
  15. class="window sunList"
  16. :style="{ left: eventx - 100 + 'px', top: eventY + 10 + 'px' }"
  17. >
  18. <div class="stitBorder"></div>
  19. <p class="ststTit header">加入对标</p>
  20. <div class="lines"></div>
  21. <div>
  22. <div class="overTit" v-if="benchmarkingVal === 'bench3'">
  23. <div style="display: flex">
  24. <p class="dot"></p>
  25. <p>
  26. {{ stationEG?.aname }}
  27. </p>
  28. </div>
  29. <div>
  30. <div
  31. class="overHidd"
  32. v-for="(items, index) in stationEG.children"
  33. :key="index"
  34. >
  35. <div class="dots"></div>
  36. <el-checkbox-group v-model="checkedEG" @change="handChangeChouse">
  37. <el-checkbox
  38. @click="changeCheck"
  39. :label="items.nemCode"
  40. :key="index"
  41. >{{ items.aname }}
  42. </el-checkbox>
  43. </el-checkbox-group>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="overTit" v-if="benchmarkingVal === 'bench4'">
  48. <div style="display: flex">
  49. <p class="dot"></p>
  50. <p>
  51. {{ stationEG?.aname }}
  52. </p>
  53. </div>
  54. <div
  55. class="overLeft"
  56. v-for="(items, index) in stationEG.children"
  57. :key="index"
  58. >
  59. <div class="overHidd">
  60. <div class="dots"></div>
  61. <div class="overAname" @click="handOverIndex(index)">
  62. {{ items.aname }}
  63. </div>
  64. <div style="margin-left: 20px">
  65. <i
  66. style="color: #1c99ff"
  67. class="icon-bottom"
  68. @click="handOverIndex(index)"
  69. v-if="overIndex === index"
  70. ></i>
  71. <i
  72. style="color: #434e5f"
  73. class="icon-right1"
  74. v-else
  75. @click="handOverIndex(index)"
  76. ></i>
  77. </div>
  78. </div>
  79. <div v-if="overIndex === index">
  80. <div
  81. class="overHidden"
  82. v-for="(val, index) in items.children"
  83. :key="index"
  84. >
  85. <div class="dots"></div>
  86. <div>
  87. <el-checkbox-group
  88. v-model="checkedEG"
  89. @change="handChangeChouses"
  90. >
  91. <el-checkbox
  92. @click="changeCheck"
  93. :label="val.nemCode"
  94. :key="index"
  95. >{{ val.aname }}
  96. </el-checkbox>
  97. </el-checkbox-group>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="overTit" v-if="benchmarkingVal === 'bench5'">
  104. <div style="display: flex">
  105. <p class="dot"></p>
  106. <p>
  107. {{ stationEG?.aname }}
  108. </p>
  109. </div>
  110. <div
  111. class="overLeft"
  112. v-for="(items, index) in stationEG.children"
  113. :key="index"
  114. >
  115. <div class="overHidd">
  116. <div class="dots"></div>
  117. <div class="overAname" @click="handOverIndex(index)">
  118. {{ items.aname }}
  119. </div>
  120. <div style="margin-left: 20px">
  121. <i
  122. style="color: #1c99ff"
  123. class="icon-bottom"
  124. @click="handOverIndex(index)"
  125. v-if="overIndex === index"
  126. ></i>
  127. <i
  128. style="color: #434e5f"
  129. class="icon-right1"
  130. v-else
  131. @click="handOverIndex(index)"
  132. ></i>
  133. </div>
  134. </div>
  135. <div v-if="overIndex === index">
  136. <div
  137. class="overHeader"
  138. v-for="(val, indexe) in items.children"
  139. :key="indexe"
  140. >
  141. <div class="overHidds">
  142. <div class="dots"></div>
  143. <div class="overAname" @click="handOverIndexs(indexe)">
  144. {{ val.aname }}
  145. </div>
  146. <div style="margin-left: 70px">
  147. <i
  148. style="color: #1c99ff"
  149. class="icon-bottom"
  150. @click="handOverIndexs(indexe)"
  151. v-if="overIndexs === indexe"
  152. ></i>
  153. <i
  154. style="color: #434e5f"
  155. class="icon-right1"
  156. v-else
  157. @click="handOverIndexs(indexe)"
  158. ></i>
  159. </div>
  160. </div>
  161. <div v-if="overIndexs === indexe">
  162. <div
  163. class="overHidded"
  164. v-for="(vals, index) in val.children"
  165. :key="index"
  166. >
  167. <div class="dots"></div>
  168. <div>
  169. <el-checkbox-group
  170. v-model="checkedEG"
  171. @change="
  172. (value) => handChangeChoused(value, stationEG.aname)
  173. "
  174. >
  175. <el-checkbox
  176. @click.native="changeCheck(vals.nemCode)"
  177. :label="vals.nemCode"
  178. :key="index"
  179. >{{ vals.aname }}
  180. </el-checkbox>
  181. </el-checkbox-group>
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. <div class="photovoltaicCard" id="photovoltaicCard">
  192. <el-row :gutter="20">
  193. <div v-if="dataSourceList?.length > 0" class="data-cards">
  194. <el-col :span="6" v-for="item in dataSourceList" :key="item?.id">
  195. <el-checkbox-group
  196. class="el-checkbox_tit"
  197. v-if="
  198. benchmarkingVal !== '' &&
  199. benchmarkingVal !== '-1' &&
  200. theme === 'maintenance' &&
  201. benchmarkingVal === 'bench2'
  202. "
  203. v-model="checkedCities"
  204. @change="handleCheckAllChange"
  205. >
  206. <el-checkbox :label="item.name" :key="item.id">
  207. &nbsp;</el-checkbox
  208. >
  209. </el-checkbox-group>
  210. <div class="card-list" >
  211. <!-- 加入购物车图标-->
  212. <div
  213. v-if="
  214. benchmarkingVal !== '' &&
  215. benchmarkingVal !== '-1' &&
  216. theme === 'maintenance' &&
  217. benchmarkingVal !== 'bench2'
  218. "
  219. class="check-button"
  220. >
  221. <img
  222. @click="addBenchmarking(item, index)"
  223. v-if="
  224. checkedEG.length !== 0 &&
  225. this.stationName.find((s) => {
  226. return s == item.name;
  227. })
  228. "
  229. src="@assets/img/images/checkbenched.png"
  230. />
  231. <img
  232. v-else-if="
  233. benchmarkingVal === 'bench1' && stationName == item.name
  234. "
  235. src="@assets/img/images/checkbenched.png"
  236. />
  237. <img
  238. v-else
  239. src="@assets/img/images/checkbench.png"
  240. @click="addBenchmarking(item, index)"
  241. />
  242. </div>
  243. <div class="benchIndex" v-if="benchmarkingVal === 'bench1'">
  244. <el-date-picker
  245. ref="datePicker"
  246. size="mini"
  247. type="daterange"
  248. range-separator="To"
  249. v-model="searchObj"
  250. :editable="false"
  251. format="YYYY-MM-DD"
  252. value-format="YYYY-MM-DD"
  253. placeholder=" "
  254. popper-class="benchRange"
  255. @blur="blurDate(item)"
  256. @focus="getDate(item)"
  257. :disabled-date="pickerOptions"
  258. @change="
  259. (value) => {
  260. hangDate(value, item);
  261. }
  262. "
  263. >
  264. </el-date-picker>
  265. </div>
  266. <img
  267. :src="
  268. item?.image
  269. ? item?.image
  270. : isStation
  271. ? require('@assets/img/images/level-two_power-plant.png')
  272. : require('@assets/img/images/level-one_company.png')
  273. "
  274. class="card-img"
  275. @click="jumpLevelTwo(item)"
  276. />
  277. <div class="card-data">
  278. <div class="card-company">
  279. <div
  280. class="company-name card-hover"
  281. :title="item?.name"
  282. @click="jumpLevelTwo(item)"
  283. >
  284. <i
  285. :class="
  286. isStation ? 'icon-Photovoltaic-pv' : 'icon-enterprise'
  287. "
  288. ></i>
  289. {{ item?.name }}
  290. </div>
  291. </div>
  292. <ul class="data-list" v-show="theme === 'operate'">
  293. <li>
  294. <div class="data-prop">故障损失</div>
  295. <div class="data-num">
  296. <div>
  297. <span>{{ item?.gzssdl?.toFixed(2) || 0 }}</span> 万kWh
  298. </div>
  299. </div>
  300. </li>
  301. <li>
  302. <div class="data-prop">维护损失</div>
  303. <div class="data-num">
  304. <div>
  305. <span>{{ item?.whssdl?.toFixed(2) || 0 }}</span> 万kWh
  306. </div>
  307. </div>
  308. </li>
  309. <li>
  310. <div class="data-prop">限电损失</div>
  311. <div class="data-num">
  312. <div>
  313. <span>{{ item?.xdssdl?.toFixed(2) || 0 }}</span> 万kWh
  314. </div>
  315. </div>
  316. </li>
  317. <li>
  318. <div class="data-prop">性能损失</div>
  319. <div class="data-num">
  320. <div>
  321. <span>{{ item?.xnssdl?.toFixed(2) || 0 }}</span> 万kWh
  322. </div>
  323. </div>
  324. </li>
  325. <li>
  326. <div class="data-prop">受累损失</div>
  327. <div class="data-num">
  328. <div>
  329. <span>{{ item?.slssdl?.toFixed(2) || 0 }}</span>
  330. 万kWh
  331. </div>
  332. </div>
  333. </li>
  334. </ul>
  335. <ul class="data-maintenance" v-show="theme === 'maintenance'">
  336. <li>
  337. <div class="maintenance-item">
  338. <div class="text-wrapper">
  339. <span class="name">{{
  340. typeStr == -1 ? "风能利用率" : "光能利用率"
  341. }}</span>
  342. <span class="count" :class="typeStr == -1 ? 'fd' : 'gf'"
  343. >{{ item?.gnlyl }}%
  344. <i class="text">(100%)</i>
  345. </span>
  346. </div>
  347. <div class="process-wrapper">
  348. <div
  349. class="process-bar"
  350. :style="{ width: item?.gnlyl + '%' }"
  351. :class="typeStr == -1 ? 'fd' : 'gf'"
  352. >
  353. <span class="img"></span>
  354. </div>
  355. </div>
  356. </div>
  357. </li>
  358. <li>
  359. <div class="data-prop">发电量</div>
  360. <div class="data-num">
  361. <span>{{ item?.fdl?.toFixed(2) || 0 }}</span> 万kWh
  362. </div>
  363. </li>
  364. <li>
  365. <div class="data-prop">理论发电量</div>
  366. <div class="data-num">
  367. <div>
  368. <span>{{ item?.llfdl?.toFixed(2) || 0 }}</span> 万kWh
  369. </div>
  370. </div>
  371. </li>
  372. <li>
  373. <div class="data-prop">损失电量</div>
  374. <div class="data-num">
  375. <div>
  376. <span>{{
  377. item?.ssdl
  378. ? item?.ssdl <= 0
  379. ? 0
  380. : item?.ssdl?.toFixed(2)
  381. : 0
  382. }}</span>
  383. 万kWh
  384. </div>
  385. </div>
  386. </li>
  387. <!-- <li>
  388. <div class="maintenance-item">
  389. <div class="name">健康状态</div>
  390. <div class="process-bar"></div>
  391. </div>
  392. </li> -->
  393. </ul>
  394. </div>
  395. </div>
  396. </el-col>
  397. </div>
  398. <div v-else class="empty-data">
  399. <el-col :span="24">暂无数据</el-col>
  400. </div>
  401. </el-row>
  402. </div>
  403. </div>
  404. </template>
  405. <script>
  406. import { GetTreeList } from "@/api/headerNav.js";
  407. export default {
  408. name: "photovoltaicCard", // 公司首页-卡片
  409. components: {},
  410. props: {
  411. dataSource: {
  412. type: Array,
  413. required: true,
  414. },
  415. chooseCom: {
  416. type: Boolean,
  417. default: false,
  418. },
  419. isStation: {
  420. type: Boolean,
  421. default: false,
  422. },
  423. theme: {
  424. type: String,
  425. default: "operate",
  426. },
  427. typeStr: {
  428. type: String,
  429. default: "-1",
  430. },
  431. benchmarkingVal: {
  432. type: String,
  433. default: "-1",
  434. },
  435. electTarget: {
  436. type: Array,
  437. },
  438. },
  439. data() {
  440. return {
  441. loading: true,
  442. dataSourceList: [],
  443. page: {
  444. pagesize: 8,
  445. currentPage: 2,
  446. total: 0,
  447. },
  448. searchObj: null,
  449. benchVal: [],
  450. values: null,
  451. checkList: null,
  452. checkedCities: [],
  453. checkedEG: [],
  454. disBenchList: false,
  455. benchIndex: "",
  456. eventx: null,
  457. eventY: null,
  458. stationEG: [],
  459. stationEGAll: [],
  460. stationGan: [],
  461. stationGans: [],
  462. stationGansd: [],
  463. overIndex: 0,
  464. overIndexs: 0,
  465. cilent: "", //区分点击事件触发条件
  466. stationName: [],
  467. stationNames: [],
  468. searchDate: [],
  469. };
  470. },
  471. methods: {
  472. // 限制可选日期
  473. pickerOptions(time) {
  474. return time.getTime() > Date.now();
  475. },
  476. // 选择日期
  477. hangDate(val, data) {
  478. if (val !== [] && val?.length == 2) {
  479. this.stationName = data.name;
  480. this.searchDate = val;
  481. }
  482. },
  483. // 获取焦点
  484. getDate(val) {
  485. if (this.stationName !== val.name) {
  486. this.searchObj = [];
  487. } else {
  488. this.searchObj = this.searchDate;
  489. }
  490. },
  491. blurDate(vales) {
  492. if (this.searchObj !== [] && this.searchObj?.length > 0) {
  493. this.$parent.setdataed(this.searchObj, vales);
  494. }
  495. },
  496. jumpLevelTwo(param) {
  497. if (param.id.includes("STA")) {
  498. // debugger;
  499. // console.log({
  500. // companyCode: param.code,
  501. // stationCode: param.code,
  502. // type: this.typeStr,
  503. // });
  504. // 场站跳转详情
  505. // this.$router.push({
  506. // name: "lighthome",
  507. // query: {
  508. // companyCode: param.code,
  509. // stationCode: param.code,
  510. // type: this.typeStr,
  511. // },
  512. // });
  513. } else {
  514. // 公司跳转场站
  515. if (this.typeStr == -1) {
  516. this.$router.push({
  517. path: "/economicsOperation/comphomepage",
  518. query: { companyCode: param.id },
  519. });
  520. } else {
  521. this.$router.push({
  522. path: "/economicsOperation/comphomepageGf",
  523. query: { companyCode: param.id },
  524. });
  525. }
  526. }
  527. },
  528. deepClone(ob) {
  529. var obj = JSON.stringify(ob);
  530. var objClone = JSON.parse(obj);
  531. return objClone;
  532. },
  533. addRollListener() {
  534. const dom = document.getElementById("photovoltaicCard");
  535. dom.addEventListener("scroll", () => {
  536. const scrollTop = dom.scrollTop;
  537. const offsetHeight = dom.offsetHeight;
  538. const clientHeight = dom.clientHeight;
  539. const scrollHeight = dom.scrollHeight;
  540. if (clientHeight + scrollTop + 1 > scrollHeight) {
  541. if (
  542. this.page.total + this.page.currentPage <
  543. this.page.pagesize * this.page.currentPage
  544. ) {
  545. return;
  546. }
  547. this.page.currentPage = this.page.currentPage + 1;
  548. let arr = this.deepClone(this.dataSource);
  549. this.dataSourceList = arr.splice(
  550. 0,
  551. this.page.pagesize * this.page.currentPage
  552. );
  553. }
  554. });
  555. },
  556. // 购物车添加场站
  557. handleCheckAllChange(val) {
  558. this.$parent.setdata(val);
  559. },
  560. // 购物车添加期数
  561. handChangeChouse(val) {
  562. this.stationEG.children.forEach((s) => {
  563. this.stationGan.push(s);
  564. });
  565. let srd = [];
  566. let sta = [];
  567. this.stationGan.forEach((n) => {
  568. val.forEach((z) => {
  569. if (z === n.id) {
  570. srd.push(n.aname);
  571. sta.push(n.parentCode);
  572. }
  573. });
  574. });
  575. this.stationName = srd;
  576. this.$parent.setdatas(val, this.stationGan, [...new Set(sta)]);
  577. },
  578. // 购物车添加线路
  579. handChangeChouses(val) {
  580. let proarr = [];
  581. this.stationEGAll.forEach((item) => {
  582. item.children.forEach((s) => {
  583. proarr.push(s);
  584. s.children.forEach((z) => {
  585. this.stationGans.push(z);
  586. });
  587. });
  588. });
  589. let srd = [];
  590. let sta = [];
  591. let pro = [];
  592. this.stationGans.forEach((n) => {
  593. val.forEach((z) => {
  594. if (z === n.id) {
  595. srd.push(n.aname);
  596. pro.push(n.parentCode);
  597. }
  598. });
  599. });
  600. proarr.forEach((s) => {
  601. pro.forEach((p) => {
  602. if (s.id == p) {
  603. sta.push(s.parentCode);
  604. }
  605. });
  606. });
  607. this.stationName = srd;
  608. this.$parent.setdatas(
  609. val,
  610. this.stationGans,
  611. [...new Set(sta)],
  612. [...new Set(pro)]
  613. );
  614. },
  615. // 购物车添加阵区
  616. handChangeChoused(val, vals) {
  617. let linearr = [];
  618. let proarr = [];
  619. this.stationEGAll.forEach((item) => {
  620. item.children.forEach((s) => {
  621. proarr.push(s);
  622. s.children.forEach((z) => {
  623. linearr.push(z);
  624. z.children.forEach((vals) => {
  625. this.stationGansd.push(vals);
  626. });
  627. });
  628. });
  629. });
  630. let srd = [];
  631. let sta = [];
  632. let pro = [];
  633. let lin = [];
  634. this.stationGansd.forEach((n) => {
  635. val.forEach((z) => {
  636. if (z === n.nemCode) {
  637. srd.push(n.stationName);
  638. lin.push(n.parentCode);
  639. }
  640. });
  641. });
  642. linearr.forEach((l) => {
  643. lin.forEach((m) => {
  644. if (l.id == m) {
  645. pro.push(l.parentCode);
  646. }
  647. });
  648. });
  649. proarr.forEach((l) => {
  650. pro.forEach((m) => {
  651. if (l.id == m) {
  652. sta.push(l.parentCode);
  653. }
  654. });
  655. });
  656. this.stationName = srd;
  657. this.$parent.setdatas(
  658. val,
  659. this.stationGansd,
  660. [...new Set(sta)],
  661. [...new Set(pro)],
  662. [...new Set(lin)]
  663. );
  664. },
  665. // 点击修改线路阵区名加场站
  666. changeCheck(val) {
  667. this.stationEG.children.forEach((s) => {
  668. s.stationName = this.stationEG.aname;
  669. s.children.forEach((n) => {
  670. n.names = this.stationEG.aname + n.aname;
  671. n.stationName = this.stationEG.aname;
  672. n.children.forEach((z) => {
  673. z.names = this.stationEG.aname + z.aname;
  674. z.stationName = this.stationEG.aname;
  675. });
  676. });
  677. });
  678. },
  679. // 鼠标移出加入对标弹窗消失
  680. leaveList(val) {
  681. this.disBenchList = val;
  682. },
  683. // 加入对标弹框期次点击收合
  684. handOverIndex(index) {
  685. if (this.overIndex == index) {
  686. this.overIndex = -1;
  687. } else {
  688. this.overIndex = index;
  689. }
  690. this.overIndexs = 0;
  691. },
  692. // 加入对标弹框线路点击收合
  693. handOverIndexs(index) {
  694. if (this.overIndexs == index) {
  695. this.overIndexs = -1;
  696. } else {
  697. this.overIndexs = index;
  698. }
  699. },
  700. // 添加对标数据
  701. async addBenchmarking(val, index, event) {
  702. this.stationEG = [];
  703. let eveent = event || window.event;
  704. this.eventx = eveent.pageX;
  705. this.eventY = eveent.pageY;
  706. this.benchIndex = index;
  707. this.disBenchList = !this.disBenchList;
  708. this.values = val;
  709. if (this.benchmarkingVal === "bench3") {
  710. await this.getTreeList(val, "EG");
  711. } else if (this.benchmarkingVal === "bench4") {
  712. this.overIndex = 0;
  713. await this.getTreeList(val, "LN");
  714. } else if (this.benchmarkingVal === "bench5") {
  715. this.overIndex = 0;
  716. this.overIndexs = 0;
  717. await this.getTreeList(val, "AG");
  718. }
  719. },
  720. // 获取对应树型结构
  721. async getTreeList(val, orgType) {
  722. const { data } = await GetTreeList({
  723. wpId: val.id,
  724. treeType: orgType,
  725. });
  726. this.stationEG = data;
  727. this.stationEGAll = [...this.stationEGAll, this.stationEG];
  728. },
  729. // 加入对标
  730. openCurvDatase() {
  731. this.disBenchList = false;
  732. },
  733. // 切换对标方式
  734. changenums() {
  735. this.checkedCities = [];
  736. this.benchVal = [];
  737. this.checkedEG = [];
  738. this.disBenchList = false;
  739. this.stationName = [];
  740. this.stationEGAll = [];
  741. this.$parent.setdata(this.benchVal);
  742. },
  743. changenBenchs(data, val) {
  744. this.searchObj = data;
  745. this.searchDate = data;
  746. if (val === "") {
  747. this.stationName = [];
  748. } else {
  749. this.stationName = val?.name;
  750. }
  751. },
  752. changenDate(data) {
  753. this.searchObj = data;
  754. this.searchDate = data;
  755. },
  756. // 购物车删除
  757. changenBench(data, val) {
  758. if (val != undefined) {
  759. let arr = [];
  760. val.forEach((z) => {
  761. arr.push(z.stationName);
  762. });
  763. this.stationName = arr;
  764. if (this.benchmarkingVal === "bench5") {
  765. this.stationGansd = val;
  766. } else if (this.benchmarkingVal === "bench4") {
  767. this.stationGans = val;
  768. } else if (this.benchmarkingVal === "bench3") {
  769. this.stationGan = val;
  770. }
  771. }
  772. this.benchVal = data;
  773. this.checkedCities = data;
  774. this.checkedEG = data;
  775. this.stationEGAll = [];
  776. },
  777. },
  778. mounted() {},
  779. unmounted() {},
  780. computed: {},
  781. watch: {
  782. dataSource() {
  783. this.page.total = this.dataSource.length;
  784. let arr = this.deepClone(this.dataSource);
  785. this.dataSourceList = arr.splice(
  786. 0,
  787. this.page.pagesize * this.page.currentPage
  788. );
  789. // const dom = document.getElementById('photovoltaicCard')
  790. // dom.scrollTop=0;
  791. // this.page.currentPage=2;
  792. this.$nextTick(() => this.addRollListener());
  793. },
  794. },
  795. };
  796. </script>
  797. <style lang="less" scoped>
  798. .sunList {
  799. /deep/ .el-checkbox {
  800. height: 20px;
  801. }
  802. }
  803. .window {
  804. position: fixed;
  805. min-height: 220px;
  806. border: 1px solid #094493;
  807. border-image: linear-gradient(
  808. 0deg,
  809. rgba(28, 156, 255, 0),
  810. rgba(28, 156, 255, 0.6),
  811. rgba(28, 156, 255, 0.8)
  812. )
  813. 1 1;
  814. background: rgba(29, 34, 43, 0.9) !important;
  815. border-radius: 3px;
  816. box-shadow: 0 0 22px rgba(0, 70, 199, 0.2) inset !important;
  817. .stitBorder {
  818. position: absolute;
  819. width: 70%;
  820. height: 2px;
  821. top: 0;
  822. background-image: linear-gradient(to right, #1c99ff, rgba(0, 70, 199, 0));
  823. }
  824. //box-shadow: 0 0 22px rgb(0 70 199 / 20%) inset !important;
  825. }
  826. .ststTit {
  827. width: 100%;
  828. text-align: center;
  829. height: 25px;
  830. color: #1c99ff;
  831. font-size: 16px;
  832. line-height: 25px;
  833. box-sizing: border-box;
  834. //cursor: move;
  835. }
  836. .lines {
  837. width: 99%;
  838. height: 1px;
  839. margin-left: 1px;
  840. position: relative;
  841. background: #3a3f43;
  842. &:after {
  843. content: "";
  844. display: block;
  845. width: 8px;
  846. height: 1px;
  847. background-color: #fff;
  848. position: absolute;
  849. right: 0;
  850. }
  851. &:before {
  852. content: "";
  853. display: block;
  854. width: 8px;
  855. height: 1px;
  856. background-color: #fff;
  857. position: absolute;
  858. left: 0;
  859. }
  860. }
  861. .overHidd {
  862. padding-left: 20px;
  863. display: flex;
  864. position: relative;
  865. .overAname {
  866. width: 100px;
  867. white-space: nowrap;
  868. }
  869. &:before {
  870. content: "";
  871. display: block;
  872. width: 20px;
  873. height: 20px;
  874. border-bottom: 1px dashed rgba(28, 153, 255, 0.5);
  875. border-left: 1px dashed rgba(28, 153, 255, 0.5);
  876. position: absolute;
  877. left: 0;
  878. top: -9px;
  879. }
  880. }
  881. .overHeader {
  882. margin-left: 20px;
  883. border-left: 1px dashed rgba(28, 153, 255, 0.5);
  884. }
  885. .overHidden {
  886. margin-left: 20px;
  887. padding-left: 20px;
  888. display: flex;
  889. position: relative;
  890. &:before {
  891. content: "";
  892. display: block;
  893. width: 20px;
  894. height: 20px;
  895. border-bottom: 1px dashed rgba(28, 153, 255, 0.5);
  896. border-left: 1px dashed rgba(28, 153, 255, 0.5);
  897. position: absolute;
  898. left: 2px;
  899. top: -8px;
  900. }
  901. }
  902. .overHidds {
  903. padding-left: 20px;
  904. display: flex;
  905. position: relative;
  906. .overAname {
  907. width: 30px;
  908. white-space: nowrap;
  909. }
  910. &:before {
  911. content: "";
  912. display: block;
  913. width: 20px;
  914. height: 20px;
  915. border-bottom: 1px dashed rgba(28, 153, 255, 0.5);
  916. position: absolute;
  917. left: 2px;
  918. top: -8px;
  919. }
  920. }
  921. .overHidded {
  922. margin-left: 22px;
  923. padding-left: 20px;
  924. display: flex;
  925. border-left: 1px dashed rgba(28, 153, 255, 0.5);
  926. position: relative;
  927. &:before {
  928. content: "";
  929. display: block;
  930. width: 20px;
  931. height: 20px;
  932. border-bottom: 1px dashed rgba(28, 153, 255, 0.5);
  933. position: absolute;
  934. left: 2px;
  935. top: -8px;
  936. }
  937. }
  938. .overTit {
  939. font-size: 13px;
  940. margin-left: 15px;
  941. margin-top: 10px;
  942. /deep/ .el-checkbox__label {
  943. padding-left: 2px;
  944. }
  945. .overLeft {
  946. border-left: 1px dashed rgba(28, 153, 255, 0.5);
  947. margin-left: 1px;
  948. &:last-of-type {
  949. border-left: none;
  950. }
  951. }
  952. p {
  953. font-size: 14px;
  954. }
  955. .dot {
  956. display: inline-block;
  957. width: 7px;
  958. height: 7px;
  959. margin-left: -3px;
  960. border-radius: 50%;
  961. border: 1px solid rgba(28, 153, 255, 1);
  962. box-shadow: 0 0 7px rgb(28 153 255);
  963. margin-right: 7px;
  964. margin-top: 8px;
  965. background-color: RGBA(10, 13, 17, 1);
  966. }
  967. .dots {
  968. display: inline-block;
  969. width: 5px;
  970. height: 5px;
  971. border-radius: 50%;
  972. border: 1px solid rgba(28, 153, 255, 1);
  973. box-shadow: 0 0 7px rgb(28 153 255);
  974. margin-right: 7px;
  975. margin-top: 8px;
  976. background-color: RGBA(10, 13, 17, 1);
  977. }
  978. }
  979. .footerButton {
  980. display: flex;
  981. justify-content: space-between;
  982. width: 90%;
  983. .footTitle {
  984. height: 30px;
  985. line-height: 30px;
  986. display: flex;
  987. p {
  988. font-size: 14px;
  989. font-family: Microsoft YaHei;
  990. font-weight: 300;
  991. color: #d3d3d3;
  992. }
  993. }
  994. .el-button:last-of-type {
  995. width: 88px;
  996. color: rgba(28, 108, 255, 1);
  997. border-radius: 3px;
  998. background: rgba(28, 108, 255, 0);
  999. border: 1px solid !important;
  1000. border-image: linear-gradient(0deg, rgba(28, 156, 255, 0), #1d74eb, #1d74eb)
  1001. 1 1 !important;
  1002. }
  1003. /deep/ .el-button.is-round {
  1004. padding: 0 10px !important;
  1005. }
  1006. }
  1007. .stations {
  1008. height: 39px;
  1009. line-height: 39px;
  1010. width: 100%;
  1011. display: flex;
  1012. justify-content: space-between;
  1013. font-size: 13px;
  1014. padding-right: 20px;
  1015. padding-left: 20px;
  1016. color: rgba(211, 211, 211, 1);
  1017. }
  1018. /deep/ .el-col {
  1019. position: relative;
  1020. }
  1021. .el-checkbox_tit {
  1022. width: 60px;
  1023. position: absolute;
  1024. right: -10px;
  1025. top: 15px;
  1026. z-index: 9;
  1027. /deep/ .el-checkbox__inner {
  1028. border: 1px solid #1b93f4 !important;
  1029. }
  1030. /deep/ .el-checkbox__input is-checked {
  1031. .el-checkbox__inner {
  1032. }
  1033. }
  1034. /deep/ .el-checkbox__input.is-checked .el-checkbox__inner {
  1035. border: 1px solid #e17d24 !important;
  1036. }
  1037. /deep/ .el-checkbox__inner::after {
  1038. width: 4px;
  1039. }
  1040. /deep/ .el-checkbox__input.is-checked {
  1041. background: #e17d24;
  1042. }
  1043. /deep/ .el-checkbox__input {
  1044. margin-left: 10px;
  1045. }
  1046. }
  1047. ::v-deep .el-input--mini .el-input__inner {
  1048. background: #212933 !important;
  1049. }
  1050. .photovoltaicCard {
  1051. display: flex;
  1052. flex-wrap: wrap;
  1053. overflow: auto;
  1054. padding-bottom: 50px;
  1055. .el-row {
  1056. width: 100%;
  1057. .card-hover {
  1058. cursor: pointer;
  1059. margin-left: 5px;
  1060. }
  1061. .card-list {
  1062. position: relative;
  1063. display: flex;
  1064. width: 100%;
  1065. height: 250px;
  1066. background: rgba(11, 11, 11, 0.45);
  1067. padding: 25px;
  1068. overflow: hidden;
  1069. margin-bottom: 15px;
  1070. .benchIndex ::v-deep {
  1071. position: absolute;
  1072. right: 20px;
  1073. // background: #409eff;
  1074. z-index: 1;
  1075. .el-date-editor--daterange {
  1076. opacity: 0;
  1077. cursor: pointer;
  1078. }
  1079. }
  1080. .check-button {
  1081. cursor: pointer;
  1082. position: absolute;
  1083. right: 40px;
  1084. z-index: 1;
  1085. }
  1086. .border-corner {
  1087. position: absolute;
  1088. height: 100%;
  1089. width: 100%;
  1090. left: 0;
  1091. top: 0;
  1092. z-index: 0;
  1093. div {
  1094. position: absolute;
  1095. width: 6px;
  1096. height: 6px;
  1097. border-color: #fff;
  1098. }
  1099. .border-top {
  1100. border-top: 1px solid;
  1101. border-left: 1px solid;
  1102. }
  1103. .border-right {
  1104. right: 0;
  1105. border-top: 1px solid;
  1106. border-right: 1px solid;
  1107. }
  1108. .border-bottom {
  1109. right: 0;
  1110. bottom: 0;
  1111. border-bottom: 1px solid;
  1112. border-right: 1px solid;
  1113. }
  1114. .border-left {
  1115. bottom: 0;
  1116. border-bottom: 1px solid;
  1117. border-left: 1px solid;
  1118. }
  1119. }
  1120. .card-img {
  1121. position: relative;
  1122. width: 158px;
  1123. height: 100%;
  1124. margin-right: 25px;
  1125. cursor: pointer;
  1126. }
  1127. .leftData {
  1128. width: 158px;
  1129. height: 100%;
  1130. margin-right: 25px;
  1131. display: flex;
  1132. flex-direction: column;
  1133. justify-content: center;
  1134. .data-num {
  1135. font-size: 16px;
  1136. color: #1b99ff;
  1137. > div > span {
  1138. font-family: "Bicubik";
  1139. font-size: 22px;
  1140. }
  1141. > div:last-child {
  1142. margin-top: 15px;
  1143. }
  1144. }
  1145. .data-prop {
  1146. font-size: 14px;
  1147. }
  1148. }
  1149. .card-data {
  1150. position: relative;
  1151. flex: 1;
  1152. width: 50%;
  1153. .card-company {
  1154. padding-bottom: 10px;
  1155. border-bottom: 1px solid #3c3f43;
  1156. .company-name {
  1157. font-size: 16px;
  1158. color: #fff;
  1159. white-space: nowrap;
  1160. overflow: hidden;
  1161. text-overflow: ellipsis;
  1162. }
  1163. .company-address {
  1164. margin-top: 5px;
  1165. color: #b3b3b3;
  1166. white-space: nowrap;
  1167. overflow: hidden;
  1168. text-overflow: ellipsis;
  1169. }
  1170. }
  1171. .data-list {
  1172. margin-top: 15px;
  1173. display: flex;
  1174. flex-wrap: wrap;
  1175. li {
  1176. width: 50%;
  1177. margin-bottom: 8px;
  1178. .data-prop {
  1179. margin-bottom: 4px;
  1180. }
  1181. .data-num {
  1182. span {
  1183. display: inline-block;
  1184. color: rgb(27, 147, 244);
  1185. }
  1186. }
  1187. }
  1188. }
  1189. .data-maintenance {
  1190. margin-top: 25px;
  1191. li {
  1192. display: flex;
  1193. justify-content: space-between;
  1194. margin-bottom: 10px;
  1195. font-size: 14px;
  1196. width: 100%;
  1197. .maintenance-item {
  1198. display: flex;
  1199. width: 100%;
  1200. flex-direction: column;
  1201. .process-wrapper {
  1202. height: 4.5px;
  1203. max-width: 100%;
  1204. background-color: rgba(142, 176, 255, 0.2);
  1205. }
  1206. .process-bar {
  1207. position: relative;
  1208. height: 4.5px;
  1209. max-width: 100%;
  1210. background: linear-gradient(90deg, #561f00, #853000, #f78712);
  1211. .img {
  1212. background: url("../../../../../assets/img/home/generatingCapacityDay.png")
  1213. no-repeat;
  1214. position: absolute;
  1215. display: inline-block;
  1216. width: 39px;
  1217. height: 39px;
  1218. top: -17px;
  1219. right: -22px;
  1220. transform: scale(0.8);
  1221. }
  1222. &.fd {
  1223. background: linear-gradient(90deg, #001442, #1c99ff);
  1224. .img {
  1225. background: url("../../../../../assets/img/home/generatingCapacityMonth.png")
  1226. no-repeat;
  1227. }
  1228. }
  1229. &.gf {
  1230. background: linear-gradient(90deg, #561f00, #853000, #f78712);
  1231. .img {
  1232. background: url("../../../../../assets/img/home/generatingCapacityDay.png")
  1233. no-repeat;
  1234. }
  1235. }
  1236. }
  1237. .text-wrapper {
  1238. display: flex;
  1239. justify-content: space-between;
  1240. margin-bottom: 5px;
  1241. .count {
  1242. font-size: 14px;
  1243. color: #ff8300;
  1244. font-family: "Arial";
  1245. font-weight: bolder;
  1246. .text {
  1247. font-size: 11px;
  1248. }
  1249. &.fd {
  1250. color: #1c99ff;
  1251. }
  1252. &.gf {
  1253. color: #ff8300;
  1254. }
  1255. }
  1256. }
  1257. }
  1258. .data-prop {
  1259. margin-bottom: 10px;
  1260. }
  1261. .data-num {
  1262. span {
  1263. display: inline-block;
  1264. min-width: 50px;
  1265. text-align: right;
  1266. color: rgb(27, 147, 244);
  1267. }
  1268. }
  1269. // .maintenance-data {
  1270. // }
  1271. }
  1272. .child-interrupt {
  1273. .service-label::before {
  1274. background: #a7a7a7;
  1275. }
  1276. .box-item {
  1277. color: #fff;
  1278. .service-data {
  1279. color: #a7a7a7;
  1280. }
  1281. }
  1282. }
  1283. .child-halt {
  1284. .service-label::before {
  1285. background: #ba3237;
  1286. }
  1287. .service-data {
  1288. color: #ba3237;
  1289. }
  1290. }
  1291. .child-fault {
  1292. .service-label::before {
  1293. background: #e17d24;
  1294. }
  1295. .service-data {
  1296. color: #e17d24;
  1297. }
  1298. }
  1299. .child-normal {
  1300. .service-label::before {
  1301. background: #1986e0;
  1302. }
  1303. .service-data {
  1304. color: #1986e0;
  1305. }
  1306. }
  1307. }
  1308. }
  1309. }
  1310. .data-cards {
  1311. display: flex;
  1312. flex-wrap: wrap;
  1313. width: 100%;
  1314. }
  1315. .empty-data {
  1316. width: 100%;
  1317. display: flex;
  1318. justify-content: center;
  1319. align-items: center;
  1320. text-align: center;
  1321. }
  1322. }
  1323. }
  1324. </style>