powerControlPage.vue 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098
  1. <template>
  2. <div class="powerControl">
  3. <div class="powerControl_wind">
  4. <el-row class="windStstus">
  5. <el-col :span="24" class="scrollbar">
  6. <!-- <span class="scrollbarName">场站名称:</span> -->
  7. <el-scrollbar>
  8. <div class="scrollbar-flex-content">
  9. <p v-for="item in stationData" :key="item.no" class="scrollbar-demo-item" :class="item.showBac ? 'changeBacksty' : 'defaultBacksty'" @click="changeStation(item.no)">
  10. {{ item.stationName }}
  11. </p>
  12. </div>
  13. </el-scrollbar>
  14. </el-col>
  15. </el-row>
  16. </div>
  17. <div class="powerControl_main" :style="pageHeight">
  18. <div class="detailLeft">
  19. <div style="margin: 10px 30px;">
  20. <div class="detailLeftpicture titpicture1">
  21. <div style="font-size:14px;color:#fff;">风电场期次集电线风机:</div>
  22. <div class="messageSty">{{stationName}}详情数据总览</div>
  23. </div>
  24. <div class="detailLeft_msg msgSty">
  25. <span class="titleStys titleSt1">风电场总期次数:</span>
  26. <div>
  27. <span class="numberStyss">{{stationMsg.project}}</span>
  28. <span class="numberSty">期</span>
  29. </div>
  30. </div>
  31. <div class="detailLeft_msg msgSty">
  32. <span class="titleStys titleSt2">风电场总集电线数:</span>
  33. <div>
  34. <span class="numberStyss">{{stationMsg.collector}}</span>
  35. <span class="numberSty">条</span>
  36. </div>
  37. </div>
  38. <div class="detailLeft_msg msgSty">
  39. <span class="titleStys titleSt3">风电场总风机数:</span>
  40. <div>
  41. <span class="numberStyss">{{stationMsg.wind}}</span>
  42. <span class="numberSty">台</span>
  43. </div>
  44. </div>
  45. <div class="detailLeft_msg msgSty">
  46. <span class="titleStys titleSt2">风电场平均风速:</span>
  47. <div>
  48. <span class="numberStyss">{{stationMsg.speed}}</span>
  49. <span class="numberSty">m/s</span>
  50. </div>
  51. </div>
  52. <div class="detailLeft_msg msgSty">
  53. <span class="titleStys titleSt1">风电场实时功率:</span>
  54. <div>
  55. <span class="numberStyss">{{stationMsg.power}}</span>
  56. <span class="numberSty">MW</span>
  57. </div>
  58. </div>
  59. </div>
  60. <img src="../assets/windStatus.png" alt="">
  61. <div style="margin: 10px 25px;">
  62. <p style="color: red;font-weight: 600">温馨提示:右侧详情图可拖拽,可移动</p>
  63. <span></span>
  64. </div>
  65. </div>
  66. <div class="powerControlSvg">
  67. <n-s-s-vue ref="nss" v-if="stationName === '牛首山二风场'"></n-s-s-vue>
  68. <q-s-vue ref="xliu" v-else-if="stationName === '青山'"></q-s-vue>
  69. <s-b-q-vue ref="xliu" v-else-if="stationName === '石板泉'"></s-b-q-vue>
  70. <m-h-s-vue ref="mhs" v-else-if="stationName === '麻黄山二风场'"></m-h-s-vue>
  71. <x-s-vue ref="mhs" v-else-if="stationName === '香山五风场'"></x-s-vue>
  72. <m-liu-vue ref="mliu" v-else-if="stationName === '麻黄山六风场'"></m-liu-vue>
  73. <s-liu-vue ref="mliu" v-else-if="stationName === '宋堡六风场'"></s-liu-vue>
  74. <x-liu-vue ref="xliu" v-else-if="stationName === '星能六风场'"></x-liu-vue>
  75. <n-wu-vue ref="xliu" v-else-if="stationName === '牛首山五风场'"></n-wu-vue>
  76. </div>
  77. </div>
  78. <el-dialog title="综合管控" v-model="dialogVisibleMenu" width="55%" custom-class="svgDia">
  79. <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
  80. <el-sub-menu index="1">
  81. <template #title>功率/电量预测</template>
  82. <el-menu-item index="1-1">功率预测</el-menu-item>
  83. <el-menu-item index="1-2">电量预测</el-menu-item>
  84. </el-sub-menu>
  85. <el-sub-menu index="2">
  86. <template #title>管控设置与记录</template>
  87. <el-menu-item index="2-1" >停机设置</el-menu-item>
  88. <el-menu-item index="2-2">并网设置</el-menu-item>
  89. </el-sub-menu>
  90. </el-menu>
  91. <div class="showEveryPage">
  92. <!-- 功率预测 -->
  93. <div id="powerLine" style="width:100%;height:400px;" v-loading="loading" v-if="activeIndex === '1-1'"></div>
  94. <!-- 电量预测 -->
  95. <div id="electricLine" style="width:100%;height:400px;" v-loading="loading" v-else-if="activeIndex === '1-2'"></div>
  96. <!-- 停机设置 -->
  97. <el-form ref="ruleForm" :model="form" :rules="rules" label-width="80px" v-else-if="activeIndex === '2-1'">
  98. <el-form-item label="停机配置">
  99. <el-radio-group v-model="form.resource">
  100. <el-radio label="计划停机"></el-radio>
  101. <el-radio label="非计划停机"></el-radio>
  102. <el-radio label="弃风停机"></el-radio>
  103. <el-radio label="限电停机"></el-radio>
  104. </el-radio-group>
  105. </el-form-item>
  106. <el-form-item label="停机时长" prop="pickerTime">
  107. <el-col :span="11">
  108. <el-date-picker
  109. v-model="form.pickerTime"
  110. :picker-options="pickerOptionsStart"
  111. type="datetimerange"
  112. :clearable="false"
  113. range-separator="至"
  114. start-placeholder="开始日期"
  115. end-placeholder="结束日期"
  116. ></el-date-picker>
  117. </el-col>
  118. </el-form-item>
  119. <el-form-item label="维检风机">
  120. <div class="tagCla">
  121. <el-tag
  122. v-for="tag in transferLabel"
  123. :key="tag"
  124. closable
  125. :disable-transitions="false"
  126. @close="closeTag(tag)"
  127. >{{tag}}</el-tag>
  128. </div>
  129. </el-form-item>
  130. <el-transfer
  131. v-model="transferValue"
  132. @change="changeTrans"
  133. :props="{
  134. key: 'wturNo',
  135. label: 'name'
  136. }"
  137. :titles="['未添加风机', '已添加风机']"
  138. :data="transferData"
  139. ></el-transfer>
  140. <el-form-item label="停机事由" prop="desc">
  141. <el-input type="textarea" v-model="form.desc"></el-input>
  142. </el-form-item>
  143. </el-form>
  144. <!-- 并网设置 -->
  145. <el-form ref="form" :model="form" :rules="rulesx" label-width="80px" v-else-if="activeIndex === '2-2'">
  146. <!-- <el-form-item label="停机配置">
  147. <el-radio-group v-model="formx.resource" disabled>
  148. <el-radio label="计划停机"></el-radio>
  149. <el-radio label="非计划停机"></el-radio>
  150. </el-radio-group>
  151. </el-form-item> -->
  152. <!-- <el-form-item label="停机配置">
  153. <el-select v-model="formx.datas" placeholder="请选择" @change="changebingwang">
  154. <el-option
  155. v-for="item in bingwangData"
  156. :key="item.index"
  157. :label="item.name"
  158. :value="item.index">
  159. </el-option>
  160. </el-select>
  161. </el-form-item> -->
  162. <!-- <el-form-item label="并网时长">
  163. <el-col :span="11">
  164. <el-date-picker
  165. disabled
  166. v-model="formx.pickerTime"
  167. value-format="yyyy-MM-dd HH:mm:ss"
  168. type="datetimerange"
  169. :clearable="false"
  170. range-separator="至"
  171. start-placeholder="开始日期"
  172. end-placeholder="结束日期"
  173. ></el-date-picker>
  174. </el-col>
  175. </el-form-item> -->
  176. <el-form-item label="并网风机">
  177. <div class="tagCla">
  178. <el-tag
  179. v-for="tag in transferLabelx"
  180. :key="tag"
  181. closable
  182. :disable-transitions="false"
  183. @close="closeTagx(tag)"
  184. >{{tag}}</el-tag>
  185. </div>
  186. <!-- <el-button size="small" @click="showTransfer = true">增加其他风机</el-button> -->
  187. </el-form-item>
  188. <el-transfer
  189. v-model="transferValuex"
  190. @change="changeTrans"
  191. :props="{
  192. key: 'wturNo',
  193. label: 'name'
  194. }"
  195. :titles="['未添加风机', '已添加风机']"
  196. :data="transferData"
  197. ></el-transfer>
  198. <el-form-item label="停机事由">
  199. <el-input type="textarea" v-model="formx.desc" disabled></el-input>
  200. </el-form-item>
  201. <el-form-item label="维护成果">
  202. <el-input type="textarea" v-model="formx.descBing"></el-input>
  203. </el-form-item>
  204. </el-form>
  205. </div>
  206. <!-- 确定 -->
  207. <template #footer>
  208. <span class="dialog-footer">
  209. <el-button @click="dialogVisibleMenu = false">取 消</el-button>
  210. <el-button type="primary" @click="submitFrom()">确 定</el-button>
  211. </span>
  212. </template>
  213. </el-dialog>
  214. </div>
  215. </template>
  216. <script>
  217. import svgPage from "../components/svgIcon/index.vue";
  218. import svgControl from "../components/powerControlSvg/svgPageShow.vue";
  219. // import wftSvg from "../icons/svg/ghydgd.svg";
  220. import NSSVue from "../components/configPage/configDesignVue/NSS.vue";
  221. import MHSVue from "../components/configPage/configDesignVue/MHS.vue";
  222. import MLiuVue from "../components/configPage/configDesignVue/MLiu.vue";
  223. import SLiuVue from "../components/configPage/configDesignVue/SLiu.vue";
  224. import XLiuVue from "../components/configPage/configDesignVue/XLiu.vue";
  225. import NWuVue from "../components/configPage/configDesignVue/Nwu";
  226. import QSVue from "../components/configPage/configDesignVue/QS";
  227. import SBQVue from "../components/configPage/configDesignVue/SBQ";
  228. import XSVue from "../components/configPage/configDesignVue/XS";
  229. import { apiGetStationGL,apiGetWturByStationNo,apiGetterminalOverview,apiGetpowerPredictionQc,apiGetpowerPredictionJdx,
  230. apiGetpowerPredictionFj,apiGetelectricityForecastQc,apiGetelectricityForecastJdx,apiGetelectricityForecastFj,
  231. apiGetcanCarriedOutDowntime,apiGetWturByWindplantprojectNo,apiGetWturByCollectorwireprojectNo,
  232. apiGetgridConnection,apiGetshutdownSettings} from '../api/api'
  233. export default {
  234. components: {
  235. svgPage,
  236. svgControl,
  237. NSSVue,
  238. MHSVue,
  239. MLiuVue,
  240. SLiuVue,
  241. XLiuVue,
  242. NWuVue,
  243. QSVue,
  244. SBQVue,
  245. XSVue
  246. },
  247. data() {
  248. return {
  249. dialogVisible: false,
  250. activeName: "first",
  251. loading: false,
  252. form: {
  253. resource: "计划停机",
  254. desc: "",
  255. pickerTime: "",
  256. },
  257. rules: {
  258. pickerTime: [
  259. { required: true, message: '请选择时间', trigger: 'change' }
  260. ],
  261. desc: [
  262. { required: true, message: '请填写停机事由', trigger: 'blur' }
  263. ]
  264. },
  265. rulesx: {
  266. descBing: [
  267. { required: true, message: '请填写停机事由', trigger: 'blur' }
  268. ]
  269. },
  270. formx: {
  271. datas: '',
  272. desc: "",
  273. descBing: '',
  274. pickerTime: "",
  275. },
  276. pickerOptionsStart: {
  277. disabledDate : time => {
  278. return time.getTime() < new Date().getTime()
  279. }
  280. },
  281. transferValue: [],
  282. transferLabel: [],
  283. transferData: [],
  284. transferValuex: [],
  285. transferLabelx: [],
  286. transferDatax: [],
  287. svgDom: null,
  288. allDom: null,
  289. windtitle: '',
  290. getId: '',
  291. stationMsg: {
  292. project: '',
  293. collector: '',
  294. wind: '',
  295. speed: '',
  296. power: ''
  297. },
  298. dialogVisibleMenu: false,
  299. activeIndex: '1-1',
  300. showEcharts: false,
  301. stationData: [],
  302. windTurbines: '',
  303. stationName: '',
  304. titleSx: '',
  305. windIds: [],
  306. windIdstring: '',
  307. bingwangData: [],
  308. stationWindsAll: []
  309. };
  310. },
  311. created() {
  312. this.getStationData()
  313. },
  314. computed:{
  315. pageHeight() {
  316. return {
  317. 'height': document.documentElement.clientHeight-140 + 'px'
  318. }
  319. }
  320. },
  321. methods: {
  322. submitFrom() {
  323. if (this.activeIndex === '1-1' || this.activeIndex === '1-2') {
  324. this.dialogVisibleMenu = false
  325. } else {
  326. let formName = ''
  327. if (this.activeIndex === '2-1') {
  328. formName = 'ruleForm'
  329. } else {
  330. formName = 'form'
  331. }
  332. this.$refs[formName].validate((valid) => {
  333. if (valid) {
  334. if (this.activeIndex === '2-1') {
  335. if (this.transferValue.length > 0) {
  336. this.stopSetWind()
  337. } else {
  338. this.$message({
  339. message: '请选择维检风机',
  340. type: 'warning'
  341. });
  342. }
  343. } else {
  344. if (this.transferValuex.length > 0) {
  345. this.stopAndSetWind()
  346. } else {
  347. this.$message({
  348. message: '请选择维检风机或输入维护成果',
  349. type: 'warning'
  350. });
  351. }
  352. }
  353. }
  354. });
  355. }
  356. },
  357. // 提交停机设置服务
  358. stopSetWind() {
  359. let that = this
  360. let typeOut = null
  361. if (that.form.resource === '计划停机') {
  362. typeOut = 1
  363. } else if(that.form.resource === '非计划停机') {
  364. typeOut = 2
  365. } else if(that.form.resource === '弃风停机') {
  366. typeOut = 3
  367. } else {
  368. typeOut = 4
  369. }
  370. let params = {
  371. beginDataTime: that.$utils.getTime(that.form.pickerTime[0]),
  372. endDataTime: that.$utils.getTime(that.form.pickerTime[1]),
  373. outageType: typeOut,
  374. reasonDowntime: that.form.desc,
  375. windplantNo: that.windTurbines,
  376. wturNos: that.transferValue.join(',')
  377. }
  378. apiGetshutdownSettings(params).then(datas =>{
  379. console.log(datas)
  380. that.dialogVisibleMenu = false
  381. })
  382. },
  383. // 提交并网停机设置服务
  384. stopAndSetWind() {
  385. let that = this
  386. let params = {
  387. beginDataTime: that.formx.pickerTime[0],
  388. endDataTime: that.formx.pickerTime[1],
  389. overhaulResults: that.formx.descBing,
  390. windplantNo: that.windTurbines,
  391. wturNos: that.transferValuex.join(',')
  392. }
  393. apiGetgridConnection(params).then(datas =>{
  394. console.log(datas)
  395. that.dialogVisibleMenu = false
  396. })
  397. },
  398. getStationData() {
  399. let that = this
  400. that.loading = true
  401. apiGetStationGL().then(datas =>{
  402. datas.data.list.forEach((item,index) =>{
  403. if (item.itemVal === '4') {
  404. datas.data.list.splice(index)
  405. }
  406. })
  407. that.stationData = datas.data.list
  408. that.windTurbines = datas.data.list[0].no
  409. that.stationName = datas.data.list[0].stationName
  410. that.stationData[0].showBac = true
  411. that.getterminalOverview(that.windTurbines)
  412. })
  413. },
  414. //所有风机数据及状态
  415. getStationWind() {
  416. let that = this
  417. that.stationWindsAll = []
  418. let params = {
  419. stationNo: that.windTurbines
  420. }
  421. apiGetWturByStationNo(params).then(datas =>{
  422. that.stationWindsAll = datas.data.list
  423. console.log('stationWind', datas)
  424. that.$nextTick(() => {
  425. that.getSvg();
  426. });
  427. })
  428. },
  429. //获取概览数据
  430. getterminalOverview(val) {
  431. let that = this
  432. let params = {
  433. stationNumber: val
  434. }
  435. apiGetterminalOverview(params).then(datas =>{
  436. if (datas && datas.data) {
  437. that.stationMsg = {
  438. project: datas.data.windplantprojectCount,
  439. collector: datas.data.collectorwireprojectCount,
  440. wind: datas.data.wturCount,
  441. speed: datas.data.avgWindSpeed.toFixed(2),
  442. power: datas.data.p0.toFixed(2)
  443. }
  444. this.getStationWind()
  445. }
  446. })
  447. },
  448. changeStation(val) {
  449. this.windTurbines = val
  450. this.getterminalOverview(val)
  451. this.stationData.forEach(item =>{
  452. if (item.no === val) {
  453. this.stationName = item.stationName
  454. item.showBac = true
  455. } else {
  456. item.showBac = false
  457. }
  458. })
  459. this.seachData()
  460. },
  461. handleSelect(val) {
  462. this.activeIndex = val
  463. this.init()
  464. this.$nextTick(() =>{
  465. if (val === "1-1") {
  466. this.loading = true;
  467. this.getWindSpeed("powerLine", this.windtitle, this.getId);
  468. } else if (val === "1-2") {
  469. this.loading = true;
  470. this.getWindSpeed("electricLine", this.windtitle, this.getId);
  471. } else {
  472. this.getAllWind(val)
  473. }
  474. })
  475. },
  476. init() {
  477. this.form = {
  478. resource: "计划停机",
  479. desc: "",
  480. pickerTime: "",
  481. }
  482. this.formx = {
  483. datas: '',
  484. desc: "",
  485. descBing: "",
  486. pickerTime: "",
  487. }
  488. this.transferValue = []
  489. this.transferLabel = []
  490. this.transferValuex = []
  491. this.transferLabelx = []
  492. // this.transferData = []
  493. },
  494. //获取所有风机数据
  495. getAllWind(val) {
  496. let that = this
  497. let params = {
  498. stationNo: that.windTurbines
  499. }
  500. apiGetWturByStationNo(params).then(datas =>{
  501. if (datas && datas.data) {
  502. that.transferData = datas.data.list
  503. if (val === '2-1') {
  504. if (that.windtitle === '风机') {
  505. that.modifyShowWind(that.getId)
  506. } else if (that.windtitle === '期次') {
  507. that.modifyShowPro(that.getId, that.windTurbines)
  508. } else {
  509. that.modifyShowColl(that.getId, that.windTurbines)
  510. }
  511. } else {
  512. that.getStopAllwind()
  513. }
  514. }
  515. })
  516. },
  517. //获取所有并网停机的风机
  518. getStopAllwind() {
  519. let that = this
  520. let params = {
  521. id: that.windIdstring
  522. }
  523. apiGetcanCarriedOutDowntime(params).then(datas =>{
  524. if (datas && datas.data) {
  525. that.bingwangData = datas.data.list
  526. that.formx.datas = datas.data.list[0].name
  527. that.formx.pickerTime = datas.data.list[0].name.split('至')
  528. that.formx.desc = datas.data.list[0].content
  529. that.transferValuex = datas.data.list[0].id.split(',').map(it => it*1)
  530. for(let i=0; i<that.transferValuex.length; i++) {
  531. let item = that.transferValuex[i]
  532. for(let j=0; j<that.transferData.length; j++) {
  533. let itn = that.transferData[j].wturNo
  534. if (item === itn) {
  535. that.transferLabelx.push(that.transferData[j].name)
  536. }
  537. }
  538. }
  539. }
  540. })
  541. },
  542. changebingwang(val) {
  543. this.transferLabelx = []
  544. this.transferValuex = []
  545. this.bingwangData.forEach(item =>{
  546. if (val === item.index) {
  547. this.formx.datas = item.name
  548. this.formx.pickerTime = item.name.split('至')
  549. this.formx.desc = item.content
  550. this.transferValuex = item.id.split(',').map(it => it*1)
  551. for(let i=0; i<this.transferValuex.length; i++) {
  552. let item = this.transferValuex[i]
  553. for(let j=0; j<this.transferData.length; j++) {
  554. let itn = this.transferData[j].wturNo
  555. if (item === itn) {
  556. this.transferLabelx.push(this.transferData[j].name)
  557. }
  558. }
  559. }
  560. }
  561. })
  562. },
  563. changeTrans(val) {
  564. this.transferValue = []
  565. this.transferLabel = []
  566. if (val.length > 0) {
  567. this.transferValue = val
  568. for(let i=0; i<this.transferValue.length; i++) {
  569. let item = this.transferValue[i]
  570. for(let j=0; j<this.transferData.length; j++) {
  571. let itn = this.transferData[j].wturNo
  572. if (item === itn) {
  573. this.transferLabel.push(this.transferData[j].name)
  574. }
  575. }
  576. }
  577. }
  578. },
  579. getHandleClick(item) {
  580. let idArr = item.split('/')
  581. console.log(idArr);
  582. this.windIds = idArr
  583. this.windIdstring = item
  584. if (idArr.length > 0) {
  585. this.getId = ''
  586. this.windtitle = ''
  587. if (idArr.length === 4) {
  588. this.windtitle = '风机'
  589. this.getId = idArr[3]
  590. } else if (idArr.length === 3) {
  591. this.windtitle = '集电线'
  592. this.getId = idArr[2]
  593. } else if (idArr.length === 2) {
  594. this.windtitle = '期次'
  595. this.getId = idArr[1]
  596. }
  597. // this.titleSx = this.getId + this.windtitle
  598. // this.dialogVisible = true;
  599. this.dialogVisibleMenu = true;
  600. this.activeIndex = '1-1'
  601. this.getWindSpeed("powerLine", this.windtitle, this.getId);
  602. }
  603. },
  604. // 点击风机,期次,集电线默认展示维检风机
  605. // 点击风机
  606. modifyShowWind(id) {
  607. for(let j=0; j<this.transferData.length; j++) {
  608. let itn = this.transferData[j].wturNo
  609. if (id === itn.toString()) {
  610. this.transferLabel.push(this.transferData[j].name)
  611. this.transferValue.push(itn)
  612. }
  613. }
  614. },
  615. // 点击期次
  616. modifyShowPro(id, staId) {
  617. let that = this
  618. let params = {
  619. projectNo: id,
  620. stationNo: staId
  621. }
  622. apiGetWturByWindplantprojectNo(params).then(datas =>{
  623. if (datas && datas.data.list) {
  624. console.log(datas)
  625. for(let j=0; j<datas.data.list.length; j++) {
  626. let itn = datas.data.list[j].wtgNo
  627. that.transferValue.push(itn)
  628. }
  629. for(let i=0; i<that.transferValue.length; i++) {
  630. let item = that.transferValue[i]
  631. for(let j=0; j<that.transferData.length; j++) {
  632. let itn = that.transferData[j].wturNo
  633. if (item === itn) {
  634. that.transferLabel.push(that.transferData[j].name)
  635. }
  636. }
  637. }
  638. }
  639. })
  640. },
  641. // 点击集电线
  642. modifyShowColl(id, staId) {
  643. let that = this
  644. let params = {
  645. projectNo: that.windIds[1],
  646. stationNo: staId,
  647. collectorwireNo: id
  648. }
  649. apiGetWturByCollectorwireprojectNo(params).then(datas =>{
  650. if (datas && datas.data.list) {
  651. console.log(datas)
  652. for(let j=0; j<datas.data.list.length; j++) {
  653. let itn = datas.data.list[j].wtgNo
  654. that.transferValue.push(itn)
  655. }
  656. for(let i=0; i<that.transferValue.length; i++) {
  657. let item = that.transferValue[i]
  658. for(let j=0; j<that.transferData.length; j++) {
  659. let itn = that.transferData[j].wturNo
  660. if (item === itn) {
  661. that.transferLabel.push(that.transferData[j].name)
  662. }
  663. }
  664. }
  665. }
  666. })
  667. },
  668. getSvg() {
  669. let that = this;
  670. let domWind = document.querySelectorAll("g");
  671. let domPro = document.querySelectorAll("text");
  672. let domArr = [];
  673. let domonlyArr = [];
  674. domWind.forEach((it) => {
  675. if (it.getAttribute("data-pointname")) {
  676. domArr.push(it);
  677. it.style.cursor = 'pointer'
  678. }
  679. });
  680. console.log('domPro', domPro)
  681. domPro.forEach((itv) => {
  682. if (itv.getAttribute("data-pointname")) {
  683. domArr.push(itv);
  684. itv.style.cursor = 'pointer'
  685. let dataId = itv.getAttribute("data-pointname")
  686. // let idArr = dataId.split('/')
  687. itv.addEventListener('click',function(){
  688. that.getHandleClick(dataId)
  689. },false);
  690. }
  691. })
  692. let statusx = {
  693. 1:'运行',
  694. 0:'待机',
  695. 4:'维护',
  696. 2:'停机',
  697. 5:'限电',
  698. 3:'中断',
  699. 6:'检修'
  700. }
  701. let domArrid = []
  702. for(let k=0; k<domArr.length;k++){
  703. let itc = domArr[k]
  704. if (itc.children && itc.children.length>7) {
  705. for(let i =0; i<itc.children.length;i++) {
  706. if (itc.children[i].id === '运行') {
  707. if (domArrid.indexOf(itc.id) === -1) {
  708. domArrid.push(itc.id)
  709. domonlyArr.push(itc)
  710. }
  711. }
  712. }
  713. } else {
  714. if (itc.nodeName === "g") {
  715. itc.style.display = 'none'
  716. }
  717. }
  718. }
  719. // console.log('domArr', domArr)
  720. // console.log('domonlyArr', domonlyArr)
  721. for(let z =0; z<domonlyArr.length;z++) {
  722. let dataId = domonlyArr[z].getAttribute("data-pointname")
  723. let idArr = dataId.split('/')
  724. for(let v =0;v<that.stationWindsAll.length;v++) {
  725. for(let h in statusx){
  726. if (that.stationWindsAll[v].mag.toString() === h) {
  727. that.stationWindsAll[v].magName = statusx[h]
  728. }
  729. }
  730. if (that.stationWindsAll[v].wturNo.toString() === idArr[3]) {
  731. if (domonlyArr[z].childNodes) {
  732. for(let c =0;c<domonlyArr[z].childNodes.length;c++) {
  733. if (domonlyArr[z].childNodes[c].id !== that.stationWindsAll[v].magName && domonlyArr[z].childNodes[c].nodeName === 'g') {
  734. // if (domonlyArr[z].childNodes[c].id === '运行') {
  735. domonlyArr[z].childNodes[c].style.display = 'none'
  736. }
  737. }
  738. }
  739. }
  740. }
  741. if (domonlyArr[z].getAttribute("data-pointname")) {
  742. domonlyArr[z].addEventListener('click',function(){
  743. that.getHandleClick(dataId)
  744. },false);
  745. }
  746. }
  747. // that.stationWindsAll
  748. },
  749. // 今日风速预测
  750. getWindSpeed(name, title) {
  751. let params = {
  752. id: this.windIdstring
  753. }
  754. if (name === 'powerLine') {
  755. if (title === '期次') {
  756. apiGetpowerPredictionQc(params).then(datas =>{
  757. this.getWindSpeedFn(name, datas)
  758. })
  759. } else if (title === '集电线') {
  760. apiGetpowerPredictionJdx(params).then(datas =>{
  761. this.getWindSpeedFn(name, datas)
  762. })
  763. } else if (title === '风机') {
  764. apiGetpowerPredictionFj(params).then(datas =>{
  765. this.getWindSpeedFn(name, datas)
  766. })
  767. }
  768. } else {
  769. if (title === '期次') {
  770. apiGetelectricityForecastQc(params).then(datas =>{
  771. this.getWindSpeedFn(name, datas)
  772. })
  773. } else if (title === '集电线') {
  774. apiGetelectricityForecastJdx(params).then(datas =>{
  775. this.getWindSpeedFn(name, datas)
  776. })
  777. } else if (title === '风机') {
  778. apiGetelectricityForecastFj(params).then(datas =>{
  779. this.getWindSpeedFn(name, datas)
  780. })
  781. }
  782. }
  783. },
  784. getWindSpeedFn(name, datas) {
  785. let that = this;
  786. if (datas && datas.data) {
  787. let xAxis = [];
  788. let series = [];
  789. let legend = [];
  790. if (datas.data.dateList.length > 0) {
  791. datas.data.dateList.forEach((item) => {
  792. xAxis.push(item.substring(item.indexOf(" ") + 1));
  793. });
  794. }
  795. if (datas.data.dataFormatList.length > 0) {
  796. datas.data.dataFormatList.forEach((iten) => {
  797. legend.push(iten.name);
  798. let seriesObj = {
  799. name: iten.name,
  800. type: "line",
  801. data: iten.data.map(it => {
  802. return that.$utils.isHasNum(it)
  803. }),
  804. symbol: "none",
  805. };
  806. series.push(seriesObj);
  807. });
  808. }
  809. that.getPowerLine(
  810. name,
  811. name === "powerLine" ? "功率预测" : "电量预测",
  812. xAxis,
  813. legend,
  814. series
  815. );
  816. that.loading = false;
  817. }
  818. },
  819. getPowerLine(name, title, xAxis, legend, series) {
  820. let tit = title
  821. let option = {
  822. title: {
  823. text: tit,
  824. textStyle: {
  825. fontSize: "16",
  826. fontWeight: "bold",
  827. },
  828. },
  829. tooltip: {
  830. trigger: "axis",
  831. },
  832. legend: {
  833. right: "20",
  834. data: legend,
  835. },
  836. grid: {
  837. left: "5%",
  838. right: "5%",
  839. bottom: "3%",
  840. containLabel: true,
  841. },
  842. xAxis: {
  843. type: "category",
  844. boundaryGap: false,
  845. data: xAxis,
  846. },
  847. yAxis: {
  848. type: "value",
  849. name: "兆瓦(Mw)",
  850. },
  851. series: series,
  852. };
  853. // 基于准备好的dom,初始化echarts实例
  854. let dom = document.getElementById(name);
  855. dom.removeAttribute("_echarts_instance_")
  856. let myChart = this.$echarts.init(dom);
  857. myChart.setOption(option);
  858. window.addEventListener("resize", function () {
  859. myChart.resize();
  860. });
  861. },
  862. closeTag(tag) {
  863. this.transferLabel.splice(this.transferLabel.indexOf(tag), 1);
  864. this.transferData.forEach(item =>{
  865. if (item.name === tag) {
  866. this.transferValue.splice(this.transferValue.indexOf(item.wturNo), 1);
  867. }
  868. })
  869. },
  870. closeTagx(tag) {
  871. this.transferLabelx.splice(this.transferLabelx.indexOf(tag), 1);
  872. this.transferData.forEach(item =>{
  873. if (item.name === tag) {
  874. this.transferValuex.splice(this.transferValuex.indexOf(item.wturNo), 1);
  875. }
  876. })
  877. },
  878. },
  879. };
  880. </script>
  881. <style lang="less">
  882. .powerControl {
  883. overflow-y: hidden;
  884. .powerControl_wind{
  885. .windStstus{
  886. display: flex;
  887. justify-content: space-around;
  888. align-items: center;
  889. background: #3a35ae;
  890. margin: 0 10px;
  891. border: 1px solid #7674d8;
  892. border-radius: 10px 10px 0 0;
  893. border-bottom: none;
  894. height: 40px;
  895. .el-col{
  896. display: flex;
  897. }
  898. .scrollbar{
  899. .scrollbarName{
  900. width: 5%;
  901. font-size: 14px;
  902. color: #fff;
  903. position: relative;
  904. top: 10px;
  905. left: 20px;
  906. }
  907. .el-scrollbar{
  908. width: 80%;
  909. .scrollbar-flex-content {
  910. display: flex;
  911. width: 50%;
  912. .scrollbar-demo-item {
  913. flex-shrink: 0;
  914. display: flex;
  915. align-items: center;
  916. justify-content: center;
  917. padding: 0px 15px;
  918. margin: 10px;
  919. text-align: center;
  920. border-radius: 4px;
  921. border: 1px solid #8679df;
  922. color: #fff;
  923. font-size: 14px;
  924. cursor: pointer;
  925. }
  926. .changeBacksty{
  927. background-color: #4bb780 !important;
  928. }
  929. .defaultBacksty{
  930. background-color: #373590 !important;
  931. }
  932. }
  933. .el-scrollbar__bar{
  934. display: block !important;
  935. --el-scrollbar-opacity: 0.8;
  936. --el-scrollbar-bg-color: #8679df;
  937. // --el-scrollbar-hover-opacity: 0.5;
  938. // --el-scrollbar-hover-bg-color: red;
  939. }
  940. }
  941. }
  942. }
  943. }
  944. .powerControl_main{
  945. display: flex;
  946. width: calc(100% - 20px);
  947. padding: 10px 0 10px 20px;
  948. background: #edeffb;
  949. border-radius: 10px;
  950. .detailLeft{
  951. margin: 20px 30px 0px 30px;
  952. .detailLeftpicture{
  953. padding: 20px 0 0 15px;
  954. width: 285px;
  955. height: 80px;
  956. border-radius: 10px;
  957. .messageSty{
  958. font-size:16px;
  959. font-weight:600;
  960. color:#fff;
  961. margin-top:10px;
  962. letter-spacing: 3px;
  963. }
  964. }
  965. .titpicture1{
  966. background-image: url('../assets/windFramPicture/back3.jpg');
  967. }
  968. .detailLeft_msg{
  969. margin-top:22px;
  970. display: flex;
  971. justify-content: space-between;
  972. .titleStys{
  973. padding-left: 15px;
  974. font-size: 14px;
  975. font-weight: bold;
  976. height: 30px;
  977. line-height: 30px;
  978. display: inline-block;
  979. }
  980. .numberSty{
  981. display: inline-block;
  982. margin-right: 10px;
  983. }
  984. .numberStyss{
  985. display: inline-block;
  986. font-size: 24px;
  987. }
  988. .titleSt1{
  989. border-left: 5px solid #5678eb;
  990. }
  991. .titleSt2{
  992. border-left: 5px solid #ff9f23;
  993. }
  994. .titleSt3{
  995. border-left: 5px solid #56d1eb;
  996. }
  997. }
  998. .msgSty{
  999. border-bottom: 1px solid #d9d9d9;
  1000. padding-bottom: 22px;
  1001. }
  1002. }
  1003. .powerControlSvg{
  1004. width: 95%;
  1005. height: 100%;
  1006. }
  1007. }
  1008. .svgDia {
  1009. .el-dialog__body {
  1010. padding: 0px 20px !important;
  1011. .el-tabs {
  1012. .el-tag {
  1013. margin-right: 10px;
  1014. }
  1015. .el-date-editor {
  1016. .el-input__icon,
  1017. .el-range-separator {
  1018. line-height: 25px !important;
  1019. }
  1020. }
  1021. .el-transfer {
  1022. margin-top: 15px;
  1023. .el-transfer-panel {
  1024. width: 290px;
  1025. }
  1026. .el-checkbox__label {
  1027. font-size: 14px;
  1028. }
  1029. }
  1030. }
  1031. .showEveryPage{
  1032. margin: 20px 10px;
  1033. .el-form-item--small{
  1034. .el-form-item__label{
  1035. font-size: 14px;
  1036. }
  1037. .el-radio--small .el-radio__label{
  1038. font-size: 14px;
  1039. }
  1040. .el-form-item__content{
  1041. .el-date-editor{
  1042. height: 30px;
  1043. }
  1044. .el-tag--small{
  1045. height: 30px;
  1046. margin-bottom: 5px;
  1047. }
  1048. }
  1049. }
  1050. .el-transfer {
  1051. margin: 15px 10px;
  1052. .el-transfer-panel {
  1053. width: 40%;
  1054. }
  1055. .el-checkbox__label {
  1056. font-size: 14px;
  1057. }
  1058. .el-checkbox--small{
  1059. height: 30px;
  1060. }
  1061. }
  1062. .el-date-editor {
  1063. .el-input__icon,
  1064. .el-range-separator {
  1065. line-height: 25px !important;
  1066. }
  1067. }
  1068. .el-tag{
  1069. margin-right: 5px;
  1070. }
  1071. .tagCla{
  1072. max-height: 123px;
  1073. overflow-y: auto;
  1074. }
  1075. }
  1076. }
  1077. .el-dialog__footer{
  1078. .dialog-footer{
  1079. display: flex;
  1080. justify-content: center;
  1081. .el-button {
  1082. height: 30px;
  1083. padding: 0 20px;
  1084. line-height: 5px;
  1085. }
  1086. }
  1087. }
  1088. }
  1089. }
  1090. </style>