index.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505
  1. <template>
  2. <div class="main-content" :style="{ width: '100%', padding: '20px 30px', fontSize: '15px' }">
  3. <!-- 列表页 -->
  4. <template v-if="!analysisFlag">
  5. <el-form
  6. class="center-form-pv"
  7. :style="{
  8. border: '0px solid #fff',
  9. padding: '10px',
  10. margin: '0',
  11. flexWrap: 'wrap',
  12. background: '#ffffff',
  13. display: 'flex',
  14. width: '100%',
  15. }"
  16. :inline="true"
  17. :model="searchForm"
  18. >
  19. <el-row
  20. :style="{
  21. padding: '10px',
  22. alignItems: 'center',
  23. flexWrap: 'wrap',
  24. background: 'none',
  25. display: 'flex',
  26. }"
  27. >
  28. <div
  29. :style="{
  30. alignItems: 'center',
  31. margin: '0 10px 0 0',
  32. display: 'flex',
  33. }"
  34. >
  35. <label
  36. :style="{
  37. margin: '0 10px 0 0',
  38. whiteSpace: 'nowrap',
  39. color: '#666',
  40. display: 'inline-block',
  41. lineHeight: '40px',
  42. fontSize: 'inherit',
  43. fontWeight: '500',
  44. height: '40px',
  45. }"
  46. class="item-label"
  47. >变电站</label
  48. >
  49. <el-select style="width: 100%" v-model="searchForm.subId" placeholder="变电站" @keydown.enter.native="search()" clearable>
  50. <el-option v-for="item in subList" :key="item.value" :label="item.label" :value="item.value" />
  51. </el-select>
  52. </div>
  53. <div
  54. :style="{
  55. alignItems: 'center',
  56. margin: '0 10px 0 0',
  57. display: 'flex',
  58. }"
  59. >
  60. <label
  61. :style="{
  62. margin: '0 10px 0 0',
  63. whiteSpace: 'nowrap',
  64. color: '#666',
  65. display: 'inline-block',
  66. lineHeight: '40px',
  67. fontSize: 'inherit',
  68. fontWeight: '500',
  69. height: '40px',
  70. }"
  71. class="item-label"
  72. >归属县旗</label
  73. >
  74. <el-select style="width: 100%" v-model="searchForm.compId" placeholder="归属县旗" @keydown.enter.native="search()" clearable>
  75. <el-option v-for="item in compList" :key="item.value" :label="item.label" :value="item.value" />
  76. </el-select>
  77. </div>
  78. <div :style="{ alignItems: 'center', margin: '0 10px 0 0', display: 'flex' }">
  79. <label
  80. :style="{
  81. margin: '0 10px 0 0',
  82. whiteSpace: 'nowrap',
  83. color: '#666',
  84. display: 'inline-block',
  85. lineHeight: '40px',
  86. fontSize: 'inherit',
  87. fontWeight: '500',
  88. height: '40px',
  89. }"
  90. class="item-label"
  91. >温度</label
  92. >
  93. <el-input v-model="searchForm.temperature" placeholder="温度" clearable></el-input>
  94. </div>
  95. <div
  96. :style="{
  97. alignItems: 'center',
  98. margin: '0 10px 0 0',
  99. display: 'flex',
  100. }"
  101. >
  102. <label
  103. :style="{
  104. margin: '0 10px 0 0',
  105. whiteSpace: 'nowrap',
  106. color: '#666',
  107. display: 'inline-block',
  108. lineHeight: '40px',
  109. fontSize: 'inherit',
  110. fontWeight: '500',
  111. height: '40px',
  112. }"
  113. class="item-label"
  114. >时间范围</label
  115. >
  116. <el-date-picker
  117. size="large"
  118. v-model="searchForm.dateRange"
  119. type="daterange"
  120. value-format="yyyy-MM-dd"
  121. range-separator="至"
  122. start-placeholder="开始日期"
  123. end-placeholder="结束日期"
  124. />
  125. </div>
  126. <el-button class="search" type="success" @click="search()">
  127. <span
  128. class="icon iconfont icon-fangdajing07"
  129. :style="{
  130. margin: '0 2px',
  131. fontSize: '16px',
  132. color: '#fff',
  133. display: 'none',
  134. height: '40px',
  135. }"
  136. ></span>
  137. 搜索
  138. </el-button>
  139. </el-row>
  140. <el-row
  141. class="actions"
  142. :style="{
  143. padding: '10px',
  144. margin: '0px 0',
  145. flexWrap: 'wrap',
  146. background: 'none',
  147. display: 'flex',
  148. }"
  149. >
  150. <el-button class="add" type="danger" @click="ycForecastHandler()">
  151. <span
  152. class="icon iconfont icon-xihuan"
  153. :style="{
  154. margin: '0 2px',
  155. fontSize: '14px',
  156. color: '#fff',
  157. display: 'none',
  158. height: '34px',
  159. }"
  160. ></span>
  161. 预测
  162. </el-button>
  163. <el-button class="add" type="danger" @click="analysisHandler()">
  164. <span
  165. class="icon iconfont icon-xihuan"
  166. :style="{
  167. margin: '0 2px',
  168. fontSize: '14px',
  169. color: '#fff',
  170. display: 'none',
  171. height: '34px',
  172. }"
  173. ></span>
  174. 数据分析
  175. </el-button>
  176. <el-button class="add" type="danger" @click="exportHandler()">
  177. <span
  178. class="icon iconfont icon-xihuan"
  179. :style="{
  180. margin: '0 2px',
  181. fontSize: '14px',
  182. color: '#fff',
  183. display: 'none',
  184. height: '34px',
  185. }"
  186. ></span>
  187. 导出
  188. </el-button>
  189. </el-row>
  190. </el-form>
  191. <div
  192. :style="{
  193. border: '0px solid #fff',
  194. width: '100%',
  195. padding: '0 20px 20px',
  196. fontSize: '14px',
  197. color: '#000',
  198. background: '#fff',
  199. }"
  200. >
  201. <el-table
  202. class="tables"
  203. :stripe="false"
  204. :style="{
  205. padding: '0px 0',
  206. borderColor: '#f0f0f0',
  207. borderRadius: '0',
  208. borderWidth: '0px 0 0 1px',
  209. background: '#fff',
  210. width: '100%',
  211. fontSize: 'inherit',
  212. borderStyle: 'solid',
  213. }"
  214. :border="true"
  215. :data="dataList"
  216. v-loading="dataListLoading"
  217. >
  218. <el-table-column :resizable="true" :sortable="true" label="序号" type="index" width="50" />
  219. <el-table-column :resizable="true" :sortable="true" prop="recordDate" label="日期" />
  220. <el-table-column :resizable="true" :sortable="true" prop="subNm" label="变电站">
  221. <template slot-scope="scope" :resizable="true" :sortable="true">
  222. {{ scope.row.subNm }}
  223. </template>
  224. </el-table-column>
  225. <el-table-column :resizable="true" :sortable="true" prop="compNm" label="归属旗县">
  226. <template slot-scope="scope">
  227. {{ scope.row.compNm }}
  228. </template>
  229. </el-table-column>
  230. <el-table-column :resizable="true" :sortable="true" prop="voltageLevel" label="电压等级">
  231. <template slot-scope="scope">
  232. {{ scope.row.voltageLevel }}
  233. </template>
  234. </el-table-column>
  235. <el-table-column :resizable="true" :sortable="true" prop="mainNum" label="主变台数">
  236. <template slot-scope="scope">
  237. {{ scope.row.mainNum }}
  238. </template>
  239. </el-table-column>
  240. <el-table-column :resizable="true" :sortable="true" prop="mainCapacity" label="主变容量(MVA)">
  241. <template slot-scope="scope">
  242. {{ scope.row.mainCapacity }}
  243. </template>
  244. </el-table-column>
  245. <el-table-column :resizable="true" :sortable="true" prop="temperature" label="温度(℃)" />
  246. <el-table-column :resizable="true" :sortable="true" prop="peakLoad" label="最大负荷(MW)" />
  247. <el-table-column :resizable="true" :sortable="true" prop="loadRate" label="负载率(%)">
  248. <template slot-scope="scope">
  249. {{ scope.row.loadRate ? (Number(scope.row.loadRate) * 100).toFixed(2) : '--' }}
  250. </template>
  251. </el-table-column>
  252. <el-table-column :resizable="true" :sortable="true" prop="baseLoad" label="基础负荷(MW)" />
  253. <el-table-column :resizable="true" :sortable="true" prop="electricHeatingLoad" label="电采暖负荷(MW)" />
  254. <el-table-column :resizable="true" :sortable="true" prop="usersNum" label="用户数" />
  255. <el-table-column :resizable="true" :sortable="true" prop="joinElectricHeatingNum" label="接入电暖用户数" />
  256. <el-table-column :resizable="true" :sortable="true" prop="confidence" label="置信度(%)">
  257. <template slot-scope="scope">
  258. {{ scope.row.confidence ? (Number(scope.row.confidence) * 100).toFixed(2) : '--' }}
  259. </template>
  260. </el-table-column>
  261. </el-table>
  262. </div>
  263. <el-pagination
  264. @size-change="sizeChangeHandle"
  265. @current-change="currentChangeHandle"
  266. :current-page="pageIndex"
  267. background
  268. :page-sizes="[10, 50, 100, 200]"
  269. :page-size="pageSize"
  270. :layout="layouts.join()"
  271. :total="totalPage"
  272. prev-text="< "
  273. next-text="> "
  274. :hide-on-single-page="false"
  275. :style="{
  276. padding: '0 20px 20px',
  277. margin: '0px auto',
  278. whiteSpace: 'nowrap',
  279. color: '#333',
  280. textAlign: 'left',
  281. background: '#fff',
  282. width: '100%',
  283. fontSize: 'inherit',
  284. position: 'relative',
  285. fontWeight: '500',
  286. }"
  287. ></el-pagination>
  288. </template>
  289. <div v-if="analysisFlag">
  290. <el-form
  291. class="center-form-pv"
  292. :style="{
  293. border: '0px solid #fff',
  294. padding: '10px',
  295. margin: '0',
  296. flexWrap: 'wrap',
  297. background: '#ffffff',
  298. display: 'flex',
  299. width: '100%',
  300. }"
  301. :inline="true"
  302. :model="searchForm"
  303. >
  304. <el-row
  305. :style="{
  306. padding: '10px',
  307. alignItems: 'center',
  308. flexWrap: 'wrap',
  309. background: 'none',
  310. display: 'flex',
  311. }"
  312. >
  313. <div
  314. v-if="false"
  315. :style="{
  316. alignItems: 'center',
  317. margin: '0 10px 0 0',
  318. display: 'flex',
  319. }"
  320. >
  321. <label
  322. :style="{
  323. margin: '0 10px 0 0',
  324. whiteSpace: 'nowrap',
  325. color: '#666',
  326. display: 'inline-block',
  327. lineHeight: '40px',
  328. fontSize: 'inherit',
  329. fontWeight: '500',
  330. height: '40px',
  331. }"
  332. class="item-label"
  333. >变电站</label
  334. >
  335. <el-select style="width: 100%" v-model="searchForm.subId" placeholder="变电站" @keydown.enter.native="search()" clearable>
  336. <el-option v-for="item in subList" :key="item.value" :label="item.label" :value="item.value" />
  337. </el-select>
  338. </div>
  339. <div
  340. :style="{
  341. alignItems: 'center',
  342. margin: '0 10px 0 0',
  343. display: 'flex',
  344. }"
  345. >
  346. <label
  347. :style="{
  348. margin: '0 10px 0 0',
  349. whiteSpace: 'nowrap',
  350. color: '#666',
  351. display: 'inline-block',
  352. lineHeight: '40px',
  353. fontSize: 'inherit',
  354. fontWeight: '500',
  355. height: '40px',
  356. }"
  357. class="item-label"
  358. >归属县旗</label
  359. >
  360. <el-select style="width: 100%" v-model="searchForm.compId" placeholder="归属县旗" @keydown.enter.native="search()" clearable>
  361. <el-option v-for="item in compList" :key="item.value" :label="item.label" :value="item.value" />
  362. </el-select>
  363. </div>
  364. <div
  365. :style="{
  366. alignItems: 'center',
  367. margin: '0 10px 0 0',
  368. display: 'flex',
  369. }"
  370. >
  371. <label
  372. :style="{
  373. margin: '0 10px 0 0',
  374. whiteSpace: 'nowrap',
  375. color: '#666',
  376. display: 'inline-block',
  377. lineHeight: '40px',
  378. fontSize: 'inherit',
  379. fontWeight: '500',
  380. height: '40px',
  381. }"
  382. class="item-label"
  383. >时间范围</label
  384. >
  385. <el-radio-group size="large" v-model="searchForm.timeStatType" @change="searchForm.record_date_end = undefined">
  386. <el-radio-button label="daily">日</el-radio-button>
  387. <el-radio-button label="monthly">月</el-radio-button>
  388. <el-radio-button label="yearly">年</el-radio-button>
  389. </el-radio-group>
  390. </div>
  391. <div
  392. :style="{
  393. alignItems: 'center',
  394. margin: '0 10px 0 0',
  395. display: 'flex',
  396. }"
  397. >
  398. <label
  399. :style="{
  400. margin: '0 10px 0 0',
  401. whiteSpace: 'nowrap',
  402. color: '#666',
  403. display: 'inline-block',
  404. lineHeight: '40px',
  405. fontSize: 'inherit',
  406. fontWeight: '500',
  407. height: '40px',
  408. }"
  409. class="item-label"
  410. >日期</label
  411. >
  412. <el-date-picker
  413. size="large"
  414. v-model="searchForm.record_date_end"
  415. :type="timeTtpeMap[searchForm.timeStatType]"
  416. :value-format="timeValueFormatMap[searchForm.timeStatType]"
  417. placeholder="选择日期"
  418. />
  419. <!-- value-format="yyyy-MM-dd" -->
  420. </div>
  421. <el-button class="search" type="success" @click="initAnalysisData()">
  422. <span
  423. class="icon iconfont icon-fangdajing07"
  424. :style="{
  425. margin: '0 2px',
  426. fontSize: '16px',
  427. color: '#fff',
  428. display: 'none',
  429. height: '40px',
  430. }"
  431. ></span>
  432. 搜索
  433. </el-button>
  434. </el-row>
  435. <el-row
  436. class="actions"
  437. :style="{
  438. padding: '10px',
  439. margin: '0px 0',
  440. flexWrap: 'wrap',
  441. background: 'none',
  442. display: 'flex',
  443. }"
  444. >
  445. <el-button class="add" type="danger" @click="analysisFlag = false">
  446. <span
  447. class="icon iconfont icon-xihuan"
  448. :style="{
  449. margin: '0 2px',
  450. fontSize: '14px',
  451. color: '#fff',
  452. display: 'none',
  453. height: '34px',
  454. }"
  455. ></span>
  456. 返回
  457. </el-button>
  458. </el-row>
  459. </el-form>
  460. <el-row :gutter="12">
  461. <el-col :span="8">
  462. <el-card header="最大负荷">
  463. <div id="chart1" style="height: 260px"></div>
  464. </el-card>
  465. </el-col>
  466. <el-col :span="8">
  467. <el-card header="基础负荷">
  468. <div id="chart2" style="height: 260px"></div>
  469. </el-card>
  470. </el-col>
  471. <el-col :span="8">
  472. <el-card header="电采暖负荷">
  473. <div id="chart3" style="height: 260px"></div>
  474. </el-card>
  475. </el-col>
  476. </el-row>
  477. <el-row :gutter="12" style="margin-top: 12px">
  478. <el-col :span="8">
  479. <el-card header="负荷率">
  480. <div id="chart4" style="height: 260px"></div>
  481. </el-card>
  482. </el-col>
  483. <el-col :span="8">
  484. <el-card header="用户数">
  485. <div id="chart5" style="height: 260px"></div>
  486. </el-card>
  487. </el-col>
  488. <el-col :span="8">
  489. <el-card header="接入电暖用户数">
  490. <div id="chart6" style="height: 260px"></div>
  491. </el-card>
  492. </el-col>
  493. </el-row>
  494. </div>
  495. </div>
  496. </template>
  497. <script>
  498. import * as echarts from 'echarts';
  499. export default {
  500. components: {},
  501. data() {
  502. return {
  503. searchForm: {
  504. subId: '',
  505. compId: '',
  506. temperature: '',
  507. dateRange: [],
  508. timeStatType: 'daily',
  509. record_date_end: '',
  510. },
  511. timeRangeList: [
  512. {
  513. label: '日',
  514. value: 'daily',
  515. },
  516. {
  517. label: '月',
  518. value: 'monthly',
  519. },
  520. {
  521. label: '年',
  522. value: 'yearly',
  523. },
  524. ],
  525. timeTtpeMap: {
  526. daily: 'date',
  527. monthly: 'month',
  528. yearly: 'year',
  529. },
  530. timeValueFormatMap: {
  531. daily: 'yyyy-MM-DD',
  532. monthly: 'yyyy-MM',
  533. yearly: 'yyyy',
  534. },
  535. dataList: [],
  536. subList: [],
  537. pageIndex: 1,
  538. pageSize: 10,
  539. totalPage: 0,
  540. dataListLoading: false,
  541. dataListSelections: [],
  542. layouts: ['prev', 'pager', 'next', 'sizes'],
  543. compList: [],
  544. analysisFlag: false,
  545. barOption: {
  546. grid: { top: 10, left: 15, right: 15, bottom: 20 },
  547. color: ['#0977fd'],
  548. tooltip: { trigger: 'item', formatter: '{b} : {c}', backgroundColor: 'transparent' },
  549. xAxis: {
  550. type: 'category',
  551. data: ['-'],
  552. },
  553. yAxis: {
  554. name: 'MW',
  555. type: 'value',
  556. },
  557. series: [
  558. {
  559. data: [],
  560. type: 'bar',
  561. },
  562. ],
  563. },
  564. pie: {
  565. grid: { top: 10, left: 15, right: 15, bottom: 20 },
  566. color: ['#0977fd'],
  567. tooltip: { trigger: 'item', formatter: '{b} : {c}', backgroundColor: 'transparent' },
  568. series: [
  569. {
  570. type: 'pie',
  571. radius: ['25%', '55%'],
  572. center: ['50%', '60%'],
  573. data: [],
  574. emphasis: {
  575. itemStyle: {
  576. shadowBlur: 10,
  577. shadowOffsetX: 0,
  578. shadowColor: 'rgba(0, 0, 0, 0.5)',
  579. },
  580. },
  581. },
  582. ],
  583. },
  584. lineOption: {
  585. grid: { top: 10, left: 15, right: 15, bottom: 20 },
  586. color: ['#0977fd'],
  587. tooltip: { trigger: 'item', formatter: '{b} : {c}', backgroundColor: 'transparent' },
  588. xAxis: {
  589. type: 'category',
  590. data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
  591. },
  592. yAxis: {
  593. type: 'value',
  594. },
  595. series: [
  596. {
  597. data: [],
  598. type: 'line',
  599. smooth: true,
  600. },
  601. ],
  602. },
  603. };
  604. },
  605. created() {
  606. this.getSubList();
  607. this.getCompList();
  608. this.getDataList();
  609. },
  610. methods: {
  611. exportHandler() {
  612. let params = {
  613. page: this.pageIndex,
  614. limit: this.pageSize,
  615. sort: 'id',
  616. order: 'desc',
  617. };
  618. if (this.searchForm.subId != '' && this.searchForm.subId != undefined) {
  619. params['subId'] = Number(this.searchForm.subId);
  620. }
  621. if (this.searchForm.compId != '' && this.searchForm.compId != undefined) {
  622. params['compId'] = Number(this.searchForm.compId);
  623. }
  624. if (this.searchForm.temperature != '' && this.searchForm.temperature != undefined) {
  625. params['temperature'] = Number(this.searchForm.temperature);
  626. }
  627. if (this.searchForm.dateRange != '' && this.searchForm.dateRange != undefined) {
  628. params['record_date_start'] = this.searchForm.dateRange[0];
  629. params['record_date_end'] = this.searchForm.dateRange[1];
  630. }
  631. this.$http({
  632. url: '/electric-heating/export',
  633. method: 'get',
  634. params: params,
  635. responseType: 'blob',
  636. }).then(({ data }) => {
  637. const blob = new Blob([data], { type: 'application/vnd.ms-excel' });
  638. const fileName = '负荷预测.xlsx';
  639. const a = document.createElement('a');
  640. a.href = URL.createObjectURL(blob);
  641. a.download = fileName;
  642. a.click();
  643. URL.revokeObjectURL(a.href);
  644. this.$message.success('导出成功');
  645. });
  646. },
  647. // 获取变电站列表
  648. async getSubList() {
  649. this.subList = [];
  650. let params = {
  651. page: this.pageIndex,
  652. limit: this.pageSize,
  653. sort: 'id',
  654. order: 'desc',
  655. };
  656. const { data } = await this.$http({
  657. url: '/sub/page',
  658. method: 'get',
  659. params: params,
  660. });
  661. if (data && data.code === 0) {
  662. this.subList = data.data.list.map(item => ({
  663. label: item.subName,
  664. value: String(item.id),
  665. }));
  666. }
  667. },
  668. // 获取公司列表
  669. async getCompList() {
  670. this.compList = [];
  671. const { data } = await this.$http({
  672. url: `/company/lists`,
  673. method: 'get',
  674. });
  675. if (data && data.code === 0) {
  676. this.compList = data.data.map(item => ({
  677. label: item.compName,
  678. value: String(item.id),
  679. }));
  680. }
  681. },
  682. // 初始化分析数据
  683. initAnalysisData(initType = 'value') {
  684. if (initType != 'init' && !this.searchForm.compId) {
  685. this.$message.warning('请选择归属县旗');
  686. return;
  687. }
  688. if (initType != 'init' && !this.searchForm.record_date_end) {
  689. this.$message.warning('请选择日期');
  690. return;
  691. }
  692. this.getAnalysisData(initType);
  693. },
  694. getAnalysisData(initType = 'value') {
  695. const columns = ['peak_load', 'base_load', 'electric_heating_load', 'load_rate ', 'users_num', 'join_electric_heating_num'];
  696. const params = {
  697. subId: this.searchForm.subId,
  698. companyId: this.searchForm.compId,
  699. recordDate: this.searchForm.record_date_end,
  700. };
  701. columns.forEach((item, i) => {
  702. this.$http({
  703. url: `/electric-heating/${initType}/${item}/${this.searchForm.timeStatType}`,
  704. method: 'get',
  705. params: params,
  706. }).then(({ data }) => {
  707. const chart = echarts.init(document.getElementById(`chart${i + 1}`), 'carp');
  708. const res = initType === 'init' ? data?.data?.result || [] : data?.data || [];
  709. // 使用刚指定的配置项和数据显示图表。
  710. // if ([0, 1, 2].includes(i)) {
  711. chart.setOption({
  712. ...this.lineOption,
  713. xAxis: {
  714. type: 'category',
  715. data: res?.map(item => item.subName),
  716. },
  717. series: [
  718. {
  719. data: res?.map(item => item.total),
  720. type: 'line',
  721. },
  722. ],
  723. });
  724. // }
  725. //根据窗口的大小变动图表
  726. window.onresize = function () {
  727. chart.resize();
  728. };
  729. console.log(data, item);
  730. });
  731. });
  732. },
  733. // 预测
  734. ycForecastHandler() {
  735. if (this.searchForm.temperature == '' || this.searchForm.temperature == undefined) {
  736. this.$message.warning('请输入温度');
  737. return;
  738. }
  739. if (!this.searchForm.dateRange || this.searchForm.dateRange?.length === 0) {
  740. this.$message.warning('请选择日期范围');
  741. return;
  742. }
  743. this.dataListLoading = true;
  744. let params = {
  745. page: this.pageIndex,
  746. limit: this.pageSize,
  747. sort: 'id',
  748. order: 'desc',
  749. };
  750. if (this.searchForm.subId != '' && this.searchForm.subId != undefined) {
  751. params['subId'] = Number(this.searchForm.subId);
  752. }
  753. if (this.searchForm.compId != '' && this.searchForm.compId != undefined) {
  754. params['compId'] = Number(this.searchForm.compId);
  755. }
  756. if (this.searchForm.temperature != '' && this.searchForm.temperature != undefined) {
  757. params['temperature'] = Number(this.searchForm.temperature);
  758. }
  759. if (this.searchForm.dateRange != '' && this.searchForm.dateRange != undefined) {
  760. params['startDate'] = this.searchForm.dateRange[0];
  761. params['endDate'] = this.searchForm.dateRange[1];
  762. }
  763. this.$http({
  764. url: '/electric-heating/predict',
  765. method: 'post',
  766. data: params,
  767. }).then(({ data }) => {
  768. if (data && data.code === 0) {
  769. this.$message.success(data.msg);
  770. } else {
  771. this.$message.error(data.msg);
  772. }
  773. this.dataListLoading = false;
  774. });
  775. },
  776. // 显示数据分析
  777. analysisHandler(row) {
  778. this.analysisFlag = true;
  779. this.searchForm.timeStatType = 'daily';
  780. this.searchForm.subId = undefined;
  781. this.searchForm.compId = undefined;
  782. this.searchForm.record_date_end = undefined;
  783. this.$nextTick(() => {
  784. this.initAnalysisData('init');
  785. });
  786. },
  787. search() {
  788. this.pageIndex = 1;
  789. this.getDataList();
  790. },
  791. // 获取数据列表
  792. getDataList() {
  793. this.dataListLoading = true;
  794. let params = {
  795. page: this.pageIndex,
  796. limit: this.pageSize,
  797. sort: 'id',
  798. order: 'desc',
  799. };
  800. if (this.searchForm.subId != '' && this.searchForm.subId != undefined) {
  801. params['subId'] = Number(this.searchForm.subId);
  802. }
  803. if (this.searchForm.compId != '' && this.searchForm.compId != undefined) {
  804. params['compId'] = Number(this.searchForm.compId);
  805. }
  806. if (this.searchForm.temperature != '' && this.searchForm.temperature != undefined) {
  807. params['temperature'] = Number(this.searchForm.temperature);
  808. }
  809. if (this.searchForm.dateRange != '' && this.searchForm.dateRange != undefined) {
  810. params['record_date_start'] = this.searchForm.dateRange[0];
  811. params['record_date_end'] = this.searchForm.dateRange[1];
  812. }
  813. this.$http({
  814. url: '/electric-heating/page',
  815. method: 'get',
  816. params: params,
  817. }).then(({ data }) => {
  818. if (data && data.code === 0) {
  819. this.dataList = data.data.list;
  820. this.totalPage = data.data.total;
  821. } else {
  822. this.dataList = [];
  823. this.totalPage = 0;
  824. }
  825. this.dataListLoading = false;
  826. });
  827. },
  828. // 每页数
  829. sizeChangeHandle(val) {
  830. this.pageSize = val;
  831. this.pageIndex = 1;
  832. this.getDataList();
  833. },
  834. // 当前页
  835. currentChangeHandle(val) {
  836. this.pageIndex = val;
  837. this.getDataList();
  838. },
  839. },
  840. };
  841. </script>
  842. <style lang="scss" scoped>
  843. .center-form-pv {
  844. .el-date-editor.el-input {
  845. width: auto;
  846. }
  847. }
  848. .el-input {
  849. width: auto;
  850. }
  851. // form
  852. .center-form-pv .el-input {
  853. width: auto;
  854. }
  855. .center-form-pv .el-input ::v-deep .el-input__inner {
  856. border: 1px solid #ddd;
  857. border-radius: 0px;
  858. padding: 0 12px;
  859. color: #666;
  860. width: 150px;
  861. font-size: 15px;
  862. height: 40px;
  863. }
  864. .center-form-pv .el-select {
  865. width: auto;
  866. }
  867. .center-form-pv .el-select ::v-deep .el-input__inner {
  868. border: 1px solid #ddd;
  869. border-radius: 0px;
  870. padding: 0 10px;
  871. color: #666;
  872. width: 150px;
  873. font-size: 15px;
  874. height: 40px;
  875. }
  876. .center-form-pv .el-date-editor {
  877. width: auto;
  878. }
  879. .center-form-pv .el-date-editor ::v-deep .el-input__inner {
  880. border: 1px solid #ddd;
  881. border-radius: 0px;
  882. padding: 0 10px 0 30px;
  883. color: #666;
  884. width: 150px;
  885. font-size: 15px;
  886. height: 40px;
  887. }
  888. .center-form-pv .search {
  889. border: 0;
  890. cursor: pointer;
  891. border-radius: 0px;
  892. padding: 0 20px;
  893. color: #fff;
  894. background: #0977fd;
  895. width: auto;
  896. font-size: 16px;
  897. min-width: 90px;
  898. height: 40px;
  899. }
  900. .center-form-pv .search:hover {
  901. opacity: 0.8;
  902. }
  903. .center-form-pv .actions .add {
  904. border: 1px solid #0977fd60;
  905. cursor: pointer;
  906. border-radius: 0px;
  907. padding: 0 10px;
  908. margin: 4px;
  909. color: #0977fd;
  910. background: #fff;
  911. width: auto;
  912. font-size: inherit;
  913. height: 34px;
  914. }
  915. .center-form-pv .actions .add:hover {
  916. opacity: 0.8;
  917. }
  918. .center-form-pv .actions .del {
  919. border: 1px solid #cc000060;
  920. cursor: pointer;
  921. border-radius: 0px;
  922. padding: 0 10px;
  923. margin: 4px;
  924. color: #c00;
  925. background: #fff;
  926. width: auto;
  927. font-size: inherit;
  928. height: 34px;
  929. }
  930. .center-form-pv .actions .del:hover {
  931. opacity: 0.8;
  932. }
  933. .center-form-pv .actions .statis {
  934. border: 1px solid #e0970460;
  935. cursor: pointer;
  936. border-radius: 0px;
  937. padding: 0 20px;
  938. margin: 4px;
  939. color: #e09704;
  940. background: #fff;
  941. width: auto;
  942. font-size: inherit;
  943. height: 34px;
  944. }
  945. .center-form-pv .actions .statis:hover {
  946. opacity: 0.8;
  947. }
  948. .center-form-pv .actions .btn18 {
  949. border: 1px solid #ed9a0d60;
  950. cursor: pointer;
  951. border-radius: 0px;
  952. padding: 0 10px;
  953. margin: 4px;
  954. color: #ed9a0d;
  955. background: #fff;
  956. width: auto;
  957. font-size: inherit;
  958. height: 34px;
  959. }
  960. .center-form-pv .actions .btn18:hover {
  961. opacity: 0.8;
  962. }
  963. // table
  964. .el-table ::v-deep .el-table__header-wrapper thead {
  965. color: #999;
  966. background: #fff;
  967. font-weight: 500;
  968. width: 100%;
  969. }
  970. .el-table ::v-deep .el-table__header-wrapper thead tr {
  971. background: #cae2ff;
  972. }
  973. .el-table ::v-deep .el-table__header-wrapper thead tr th {
  974. padding: 8px 0;
  975. background: none;
  976. border-color: #f6f6f6;
  977. border-width: 0 0px 0px 0;
  978. border-style: solid;
  979. text-align: left;
  980. }
  981. .el-table ::v-deep .el-table__header-wrapper thead tr th .cell {
  982. padding: 0 0 0 5px;
  983. word-wrap: normal;
  984. color: #0977fd;
  985. white-space: normal;
  986. font-weight: bold;
  987. display: flex;
  988. vertical-align: middle;
  989. font-size: 14px;
  990. line-height: 24px;
  991. text-overflow: ellipsis;
  992. word-break: break-all;
  993. width: 100%;
  994. align-items: center;
  995. position: relative;
  996. min-width: 110px;
  997. }
  998. .el-table ::v-deep .el-table__body-wrapper {
  999. position: relative;
  1000. }
  1001. .el-table ::v-deep .el-table__body-wrapper tbody {
  1002. width: 100%;
  1003. }
  1004. .el-table ::v-deep .el-table__body-wrapper tbody tr {
  1005. background: #fff;
  1006. }
  1007. .el-table ::v-deep .el-table__body-wrapper tbody tr td {
  1008. padding: 4px 0;
  1009. color: #333;
  1010. background: #fff;
  1011. font-size: inherit;
  1012. border-color: #0977fd30;
  1013. border-width: 0 0px 1px 0;
  1014. border-style: solid;
  1015. text-align: left;
  1016. }
  1017. .el-table ::v-deep .el-table__body-wrapper tbody tr:hover td {
  1018. padding: 4px 0;
  1019. color: #333;
  1020. background: #f4f9ff;
  1021. border-color: #0977fd30;
  1022. border-width: 0 0px 1px 0;
  1023. border-style: solid;
  1024. text-align: left;
  1025. }
  1026. .el-table ::v-deep .el-table__body-wrapper tbody tr td {
  1027. padding: 4px 0;
  1028. color: #333;
  1029. background: #fff;
  1030. font-size: inherit;
  1031. border-color: #0977fd30;
  1032. border-width: 0 0px 1px 0;
  1033. border-style: solid;
  1034. text-align: left;
  1035. }
  1036. .el-table ::v-deep .el-table__body-wrapper tbody tr td .cell {
  1037. padding: 0 0 0 5px;
  1038. overflow: hidden;
  1039. word-break: break-all;
  1040. white-space: normal;
  1041. font-size: inherit;
  1042. line-height: 24px;
  1043. text-overflow: ellipsis;
  1044. }
  1045. .el-table ::v-deep .el-table__body-wrapper tbody tr td .view {
  1046. border: 1px solid #0977fd60;
  1047. cursor: pointer;
  1048. border-radius: 0px;
  1049. padding: 0 10px;
  1050. margin: 0 5px 5px 0;
  1051. color: #0977fd;
  1052. background: #fff;
  1053. width: auto;
  1054. font-size: 14px;
  1055. height: 32px;
  1056. }
  1057. .el-table ::v-deep .el-table__body-wrapper tbody tr td .view:hover {
  1058. opacity: 0.8;
  1059. }
  1060. .el-table ::v-deep .el-table__body-wrapper tbody tr td .add {
  1061. }
  1062. .el-table ::v-deep .el-table__body-wrapper tbody tr td .add:hover {
  1063. }
  1064. .el-table ::v-deep .el-table__body-wrapper tbody tr td .edit {
  1065. border: 1px solid #21c79260;
  1066. cursor: pointer;
  1067. border-radius: 0px;
  1068. padding: 0 10px;
  1069. margin: 0 5px 5px 0;
  1070. color: #21c792;
  1071. background: #fff;
  1072. width: auto;
  1073. font-size: 14px;
  1074. height: 32px;
  1075. }
  1076. .el-table ::v-deep .el-table__body-wrapper tbody tr td .edit:hover {
  1077. opacity: 0.8;
  1078. }
  1079. .el-table ::v-deep .el-table__body-wrapper tbody tr td .del {
  1080. border: 1px solid #cc000060;
  1081. cursor: pointer;
  1082. border-radius: 0px;
  1083. padding: 0 10px;
  1084. margin: 0 5px 5px 0;
  1085. color: #c00;
  1086. background: #fff;
  1087. width: auto;
  1088. font-size: 14px;
  1089. height: 32px;
  1090. }
  1091. .el-table ::v-deep .el-table__body-wrapper tbody tr td .del:hover {
  1092. opacity: 0.8;
  1093. }
  1094. .el-table ::v-deep .el-table__body-wrapper tbody tr td .btn8 {
  1095. border: 1px solid #ed9a0d60;
  1096. cursor: pointer;
  1097. border-radius: 0px;
  1098. padding: 0 10px;
  1099. margin: 0 5px 5px 0;
  1100. color: #ed9a0d;
  1101. background: #fff;
  1102. width: auto;
  1103. font-size: 14px;
  1104. height: 32px;
  1105. }
  1106. .el-table ::v-deep .el-table__body-wrapper tbody tr td .btn8:hover {
  1107. opacity: 0.8;
  1108. }
  1109. // pagination
  1110. .main-content .el-pagination ::v-deep .el-pagination__total {
  1111. margin: 0 10px 0 0;
  1112. color: #666;
  1113. font-weight: 400;
  1114. display: inline-block;
  1115. vertical-align: top;
  1116. font-size: inherit;
  1117. line-height: 28px;
  1118. height: 28px;
  1119. }
  1120. .main-content .el-pagination ::v-deep .btn-prev {
  1121. border: none;
  1122. border-radius: 100px;
  1123. padding: 0;
  1124. margin: 0 5px;
  1125. color: #fff;
  1126. background: #000;
  1127. display: inline-block;
  1128. vertical-align: top;
  1129. width: 28px;
  1130. font-size: 16px;
  1131. line-height: auto;
  1132. height: 28px;
  1133. }
  1134. .main-content .el-pagination ::v-deep .btn-next {
  1135. border: none;
  1136. border-radius: 100%;
  1137. padding: 0;
  1138. margin: 0 5px;
  1139. color: #fff;
  1140. background: #000;
  1141. display: inline-block;
  1142. vertical-align: top;
  1143. width: 28px;
  1144. font-size: 16px;
  1145. line-height: auto;
  1146. height: 28px;
  1147. }
  1148. .main-content .el-pagination ::v-deep .btn-prev:disabled {
  1149. border: none;
  1150. cursor: not-allowed;
  1151. padding: 0;
  1152. margin: 0 5px;
  1153. color: #666;
  1154. display: inline-block;
  1155. vertical-align: top;
  1156. font-size: 16px;
  1157. line-height: auto;
  1158. border-radius: 100px;
  1159. background: #ccc;
  1160. width: 28px;
  1161. height: 28px;
  1162. }
  1163. .main-content .el-pagination ::v-deep .btn-next:disabled {
  1164. border: none;
  1165. cursor: not-allowed;
  1166. padding: 0;
  1167. margin: 0 5px;
  1168. color: #666;
  1169. display: inline-block;
  1170. vertical-align: top;
  1171. font-size: 16px;
  1172. line-height: auto;
  1173. border-radius: 100px;
  1174. background: #ccc;
  1175. width: 28px;
  1176. height: 28px;
  1177. }
  1178. .main-content .el-pagination ::v-deep .el-pager {
  1179. padding: 0;
  1180. margin: 0;
  1181. display: inline-block;
  1182. vertical-align: top;
  1183. }
  1184. .main-content .el-pagination ::v-deep .el-pager .number {
  1185. cursor: pointer;
  1186. border-radius: 100%;
  1187. padding: 0 10px;
  1188. margin: 0 2px;
  1189. color: #fff;
  1190. background: #b9b9b9;
  1191. display: inline-block;
  1192. vertical-align: top;
  1193. font-size: 16px;
  1194. line-height: 28px;
  1195. text-align: center;
  1196. height: 28px;
  1197. }
  1198. .main-content .el-pagination ::v-deep .el-pager .number:hover {
  1199. cursor: pointer;
  1200. border-radius: 100%;
  1201. padding: 0 10px;
  1202. margin: 0 2px;
  1203. color: #fff;
  1204. background: #0977fd;
  1205. display: inline-block;
  1206. vertical-align: top;
  1207. font-size: 16px;
  1208. line-height: 28px;
  1209. text-align: center;
  1210. height: 28px;
  1211. }
  1212. .main-content .el-pagination ::v-deep .el-pager .number.active {
  1213. cursor: default;
  1214. border-radius: 100%;
  1215. padding: 0 10px;
  1216. margin: 0 2px;
  1217. color: #fff;
  1218. background: #0977fd;
  1219. display: inline-block;
  1220. vertical-align: top;
  1221. font-size: 16px;
  1222. line-height: 28px;
  1223. text-align: center;
  1224. height: 28px;
  1225. }
  1226. .main-content .el-pagination ::v-deep .el-pagination__sizes {
  1227. display: inline-block;
  1228. vertical-align: top;
  1229. font-size: 15px;
  1230. line-height: 28px;
  1231. height: 28px;
  1232. }
  1233. .main-content .el-pagination ::v-deep .el-pagination__sizes .el-input {
  1234. margin: 0 5px;
  1235. width: 100px;
  1236. position: relative;
  1237. }
  1238. .main-content .el-pagination ::v-deep .el-pagination__sizes .el-input .el-input__inner {
  1239. border: 1px solid #dcdfe6;
  1240. cursor: pointer;
  1241. padding: 0 25px 0 8px;
  1242. color: #606266;
  1243. display: inline-block;
  1244. font-size: 15px;
  1245. line-height: 28px;
  1246. border-radius: 10px;
  1247. outline: 0;
  1248. background: #fff;
  1249. width: 100%;
  1250. text-align: center;
  1251. height: 28px;
  1252. }
  1253. .main-content .el-pagination ::v-deep .el-pagination__sizes .el-input span.el-input__suffix {
  1254. top: 0;
  1255. position: absolute;
  1256. right: 0;
  1257. height: 100%;
  1258. }
  1259. .main-content .el-pagination ::v-deep .el-pagination__sizes .el-input .el-input__suffix .el-select__caret {
  1260. cursor: pointer;
  1261. color: #c0c4cc;
  1262. width: 25px;
  1263. font-size: 14px;
  1264. line-height: 28px;
  1265. text-align: center;
  1266. }
  1267. .main-content .el-pagination ::v-deep .el-pagination__jump {
  1268. margin: 0 0 0 24px;
  1269. color: #606266;
  1270. display: inline-block;
  1271. vertical-align: top;
  1272. font-size: 15px;
  1273. line-height: 28px;
  1274. height: 28px;
  1275. }
  1276. .main-content .el-pagination ::v-deep .el-pagination__jump .el-input {
  1277. border-radius: 3px;
  1278. padding: 0 2px;
  1279. margin: 0 2px;
  1280. display: inline-block;
  1281. width: 50px;
  1282. font-size: 15px;
  1283. line-height: 18px;
  1284. position: relative;
  1285. text-align: center;
  1286. height: 28px;
  1287. }
  1288. .main-content .el-pagination ::v-deep .el-pagination__jump .el-input .el-input__inner {
  1289. border: 1px solid #dcdfe6;
  1290. cursor: pointer;
  1291. padding: 0 3px;
  1292. color: #606266;
  1293. display: inline-block;
  1294. font-size: 15px;
  1295. line-height: 28px;
  1296. border-radius: 3px;
  1297. outline: 0;
  1298. background: #fff;
  1299. width: 100%;
  1300. text-align: center;
  1301. height: 28px;
  1302. }
  1303. // list one
  1304. .one .list1-view {
  1305. border: 0;
  1306. cursor: pointer;
  1307. border-radius: 4px;
  1308. padding: 0 15px;
  1309. margin: 0 5px 5px 0;
  1310. outline: none;
  1311. color: #fff;
  1312. background: #157ed2;
  1313. width: auto;
  1314. font-size: 14px;
  1315. height: 32px;
  1316. }
  1317. .one .list1-view:hover {
  1318. opacity: 0.8;
  1319. }
  1320. .one .list1-edit {
  1321. border: 0;
  1322. cursor: pointer;
  1323. border-radius: 4px;
  1324. padding: 0 15px;
  1325. margin: 0 5px 5px 0;
  1326. outline: none;
  1327. color: #fff;
  1328. background: #409eff;
  1329. width: auto;
  1330. font-size: 14px;
  1331. height: 32px;
  1332. }
  1333. .one .list1-edit:hover {
  1334. opacity: 0.8;
  1335. }
  1336. .one .list1-del {
  1337. border: 0;
  1338. cursor: pointer;
  1339. border-radius: 4px;
  1340. padding: 0 15px;
  1341. margin: 0 5px 5px 0;
  1342. outline: none;
  1343. color: #fff;
  1344. background: rgba(255, 0, 0, 1);
  1345. width: auto;
  1346. font-size: 14px;
  1347. height: 32px;
  1348. }
  1349. .one .list1-del:hover {
  1350. opacity: 0.8;
  1351. }
  1352. .one .list1-btn8 {
  1353. border: 0;
  1354. cursor: pointer;
  1355. border-radius: 4px;
  1356. padding: 0 24px;
  1357. margin: 0 5px 5px 0;
  1358. outline: none;
  1359. color: #fff;
  1360. background: rgba(255, 128, 0, 1);
  1361. width: auto;
  1362. font-size: 14px;
  1363. height: 32px;
  1364. }
  1365. .one .list1-btn8:hover {
  1366. opacity: 0.8;
  1367. }
  1368. .main-content .el-table .el-switch {
  1369. display: inline-flex;
  1370. vertical-align: middle;
  1371. line-height: 30px;
  1372. position: relative;
  1373. align-items: center;
  1374. height: 30px;
  1375. }
  1376. .main-content .el-table .el-switch ::v-deep .el-switch__label--left {
  1377. cursor: pointer;
  1378. margin: 0 10px 0 0;
  1379. color: #333;
  1380. font-weight: 500;
  1381. display: inline-block;
  1382. vertical-align: middle;
  1383. font-size: 16px;
  1384. transition: 0.2s;
  1385. height: 30px;
  1386. }
  1387. .main-content .el-table .el-switch ::v-deep .el-switch__label--right {
  1388. cursor: pointer;
  1389. margin: 0 0 0 10px;
  1390. color: #333;
  1391. font-weight: 500;
  1392. display: inline-block;
  1393. vertical-align: middle;
  1394. font-size: 16px;
  1395. transition: 0.2s;
  1396. height: 30px;
  1397. }
  1398. .main-content .el-table .el-switch ::v-deep .el-switch__core {
  1399. border: 1px solid #75c0d6;
  1400. cursor: pointer;
  1401. border-radius: 15px;
  1402. margin: 0;
  1403. background: #75c0d6;
  1404. display: inline-block;
  1405. width: 42px;
  1406. box-sizing: border-box;
  1407. transition: border-color 0.3s, background-color 0.3s;
  1408. height: 20px;
  1409. }
  1410. .main-content .el-table .el-switch ::v-deep .el-switch__core::after {
  1411. border-radius: 100%;
  1412. top: 1px;
  1413. left: 1px;
  1414. background: #fff;
  1415. width: 16px;
  1416. position: absolute;
  1417. transition: all 0.3s;
  1418. height: 16px;
  1419. }
  1420. .main-content .el-table .el-switch.is-checked ::v-deep .el-switch__core::after {
  1421. margin: 0 0 0 -18px;
  1422. left: 100%;
  1423. }
  1424. .main-content .el-table .el-rate ::v-deep .el-rate__item {
  1425. cursor: pointer;
  1426. display: inline-block;
  1427. vertical-align: middle;
  1428. font-size: 0;
  1429. position: relative;
  1430. }
  1431. .main-content .el-table .el-rate ::v-deep .el-rate__item .el-rate__icon {
  1432. margin: 0 3px;
  1433. display: inline-block;
  1434. font-size: 18px;
  1435. position: relative;
  1436. transition: 0.3s;
  1437. }
  1438. ::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
  1439. background-color: #0977fd;
  1440. }
  1441. </style>