index.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244
  1. <template>
  2. <div class="history-config">
  3. <div class="form-wrapper">
  4. <div class="btns">
  5. <el-button size="mini" round class="buttons" @click="handleInsert">
  6. 新增记录
  7. </el-button>
  8. <el-button size="mini" round class="buttons" @click="export2Excel">
  9. 批量导出</el-button
  10. >
  11. <el-button size="mini" round class="buttons" @click="outExe">
  12. 模板下载</el-button
  13. >
  14. <el-upload
  15. style="display: inline; margin-left: 10px"
  16. :action="`${$store.state.baseURL}/alarmconfiguration/import`"
  17. :headers="token"
  18. :show-file-list="false"
  19. :on-success="handleSuccess"
  20. :on-progress="handleProgress"
  21. :on-error="handleError"
  22. >
  23. <el-button
  24. size="mini"
  25. round
  26. class="buttons"
  27. @click="exportShow = true"
  28. >
  29. 批量导入</el-button
  30. >
  31. </el-upload>
  32. </div>
  33. <div class="search-wrapper">
  34. <el-select
  35. class="search-item"
  36. v-model="query.alarmType"
  37. size="mini"
  38. popper-class="select"
  39. @change="categorychanged"
  40. >
  41. <el-option key="2" label="升压站" value="booststation"></el-option>
  42. <el-option key="1" label="风机" value="windturbine"></el-option>
  43. <el-option key="3" label="光伏" value="inverter"></el-option>
  44. </el-select>
  45. <el-select
  46. class="search-item"
  47. v-model="query.wpId"
  48. clearable
  49. size="mini"
  50. :placeholder="
  51. query.alarmType == 'booststation' ? '全部升压站' : '全部场站'
  52. "
  53. popper-class="select"
  54. @change="changeStation"
  55. >
  56. <el-option
  57. v-for="item in stationList"
  58. :key="item.id"
  59. :value="item.id"
  60. :label="item.aname"
  61. ></el-option>
  62. </el-select>
  63. <el-select
  64. class="search-item"
  65. v-if="query.alarmType != 'booststation'"
  66. v-model="query.modelId"
  67. clearable
  68. size="mini"
  69. placeholder="全部机型"
  70. popper-class="select"
  71. >
  72. <el-option
  73. v-for="item in modelList"
  74. :key="item.id"
  75. :value="item.id"
  76. :label="item.aname"
  77. ></el-option>
  78. </el-select>
  79. <el-input
  80. class="search-item"
  81. placeholder="请输入名称"
  82. v-model="query.name"
  83. size="mini"
  84. clearable
  85. ></el-input>
  86. <el-button class="buttons" round size="mini" @click="getData"
  87. >搜 索</el-button
  88. >
  89. </div>
  90. </div>
  91. <div class="table-wrapper">
  92. <div class="leftContent" :data-type="$store.state.moreSty">
  93. <span>{{ pageTitle }}</span>
  94. </div>
  95. <el-table
  96. style="height: calc(100% - 110px)"
  97. :data="state.tableData"
  98. stripe
  99. >
  100. <el-table-column
  101. v-for="item in query.alarmType == 'windturbine' ||
  102. query.alarmType == 'inverter'
  103. ? state.tableHeader
  104. : state.tableHeader1"
  105. :key="item.code"
  106. :label="item.title"
  107. :align="
  108. item.code == 'description' ||
  109. item.code == 'modelId' ||
  110. item.code == 'componentsName'
  111. ? 'left'
  112. : 'center'
  113. "
  114. :prop="item.code"
  115. show-overflow-tooltip
  116. >
  117. <template #default="scope">
  118. <span v-if="item.code == 'rank'">
  119. {{ rankConvert(scope.row.rank) }}
  120. </span>
  121. <span v-else-if="item.code == 'alarmType'">
  122. {{ alarmTypeConvert("alarmType", scope.row.alarmType) }}
  123. </span>
  124. <span v-else-if="item.code == 'deviceType'">
  125. {{ alarmTypeConvert("deviceType", scope.row.deviceType) }}
  126. </span>
  127. <span v-else-if="item.code == 'enable'">
  128. {{ enabledConvert(scope.row.enable) }}
  129. </span>
  130. <span v-else>
  131. {{ scope.row[item.code] }}
  132. </span>
  133. </template>
  134. </el-table-column>
  135. <el-table-column label="操作" align="center" width="100">
  136. <template #default="scope">
  137. <el-button
  138. type="text"
  139. :style="`color: ${
  140. $store.state.theme ? '#1890ff' : '#47aee7'
  141. } !important`"
  142. size="mini"
  143. @click="handleEditClick(scope.row)"
  144. >
  145. 编辑</el-button
  146. >
  147. </template>
  148. </el-table-column>
  149. </el-table>
  150. <div class="pagination">
  151. <el-pagination
  152. layout="total, sizes, prev, pager, next"
  153. :current-page="query.pageNum"
  154. :page-size="query.pageSize"
  155. :page-sizes="[22, 50, 100, 200, 500]"
  156. :total="total"
  157. @size-change="
  158. (value) => {
  159. query.pageSize = value;
  160. query.pageNum = 1;
  161. getData();
  162. }
  163. "
  164. @current-change="handlePageChange"
  165. ></el-pagination>
  166. </div>
  167. </div>
  168. <windturbinecomponents
  169. :title="state.title"
  170. @close="dialogclose"
  171. :isVisible="state.visible"
  172. :form="state.form"
  173. />
  174. </div>
  175. </template>
  176. <script setup>
  177. import {
  178. windturbinebj_fetchTableData,
  179. getStationinfo,
  180. fetchRelatePartAndAlarmType,
  181. fetchModel,
  182. getWpList,
  183. } from "@/api/zhbj/index.js";
  184. import { outExportExcel } from "@/tools/excel/exportExcel.js"; //引入文件
  185. import {
  186. ref,
  187. onMounted,
  188. provide,
  189. computed,
  190. reactive,
  191. watch,
  192. nextTick,
  193. } from "vue";
  194. import { useStore } from "vuex";
  195. import { ElMessageBox, ElMessage } from "element-plus";
  196. import windturbinecomponents from "@/views/IntegratedAlarm/alarmConfig/components/windturbine_components.vue";
  197. const pageTitle = "报警配置";
  198. const store = useStore();
  199. const token = { token: store.state.user.authToken };
  200. onMounted(() => {
  201. getWpArray();
  202. getequipmentmodel_list();
  203. getData();
  204. });
  205. const query = reactive({
  206. pageNum: 1,
  207. pageSize: 22,
  208. wpId: "",
  209. modelId: "",
  210. name: "",
  211. alarmType: "windturbine",
  212. });
  213. const state = reactive({
  214. title: "",
  215. tableData: [
  216. {
  217. id: "1.16E+18",
  218. tagId: "NULL",
  219. triggerType: 1,
  220. deviceId: "NULL",
  221. suffix: "1",
  222. rank: 3,
  223. uniformCode: "BI0001",
  224. stationId: "SXJ_KGDL_XWT_FDC_STA",
  225. modelId: "SEC-W02B-1250kW",
  226. alarmType: "windturbine",
  227. deviceType: "windturbine",
  228. components: "BJXT",
  229. subcomponents: "NULL",
  230. description: "变桨主站通讯故障",
  231. characteristic: "报警",
  232. resetTable: false,
  233. enable: true,
  234. name: "hmi_error_dword_01.0",
  235. nemCode: "142001",
  236. faultCause: "NULL",
  237. resolvent: "NULL",
  238. stationName: "01风电场",
  239. componentsName: "变桨系统",
  240. },
  241. {
  242. id: "HY_0001",
  243. tagId: "NULL",
  244. triggerType: 0,
  245. deviceId: "NULL",
  246. suffix: null,
  247. rank: 3,
  248. uniformCode: "BI0001",
  249. stationId: "SXJ_KGDL_HSM_FDC_STA",
  250. modelId: "/HW3-S2500(121)",
  251. alarmType: "windturbine",
  252. deviceType: "windturbine",
  253. components: "BJXT",
  254. subcomponents: "NULL",
  255. description: "变桨主站通讯故障",
  256. characteristic: "报警",
  257. resetTable: false,
  258. enable: true,
  259. name: "hmi_error_dword_01.0",
  260. nemCode: "142001",
  261. faultCause: "NULL",
  262. resolvent: "NULL",
  263. stationName: "02风电场",
  264. componentsName: "变桨系统",
  265. },
  266. {
  267. id: "HY_0002",
  268. tagId: "NULL",
  269. triggerType: 1,
  270. deviceId: "NULL",
  271. suffix: null,
  272. rank: 3,
  273. uniformCode: "BI0001",
  274. stationId: "SXJ_KGDL_HSM_FDC_STA",
  275. modelId: "/HW3-S2500(121)",
  276. alarmType: "windturbine",
  277. deviceType: "windturbine",
  278. components: "BJXT",
  279. subcomponents: "NULL",
  280. description: "变桨轴1通讯故障",
  281. characteristic: "报警",
  282. resetTable: false,
  283. enable: true,
  284. name: "hmi_error_dword_01.1",
  285. nemCode: "142011",
  286. faultCause:
  287. "1.变桨内部通讯线、HARTING 接头、通讯终端电阻故障;2.驱动器故障;3.通讯模块故障",
  288. resolvent:
  289. "1.检查变桨内部通讯线、HARTING 接头、通讯终端电阻是否正常;2.检查驱动器是否正常;\n3.检查通讯模块是否正常;",
  290. stationName: "02风电场",
  291. componentsName: "变桨系统",
  292. },
  293. {
  294. id: "HY_0003",
  295. tagId: "NULL",
  296. triggerType: 2,
  297. deviceId: "NULL",
  298. suffix: null,
  299. rank: 3,
  300. uniformCode: "BI0001",
  301. stationId: "SXJ_KGDL_HSM_FDC_STA",
  302. modelId: "/HW3-S2500(121)",
  303. alarmType: "windturbine",
  304. deviceType: "windturbine",
  305. components: "BJXT",
  306. subcomponents: "NULL",
  307. description: "变桨轴2通讯故障",
  308. characteristic: "报警",
  309. resetTable: false,
  310. enable: true,
  311. name: "hmi_error_dword_01.2",
  312. nemCode: "142012",
  313. faultCause:
  314. "1.变桨内部通讯线、HARTING 接头、通讯终端电阻故障;2.驱动器故障;3.通讯模块故障;",
  315. resolvent:
  316. "1.检查变桨内部通讯线、HARTING 接头、通讯终端电阻是否正常;2.检查驱动器是否正常;\n3.检查通讯模块是否正常;",
  317. stationName: "02风电场",
  318. componentsName: "变桨系统",
  319. },
  320. {
  321. id: "HY_0004",
  322. tagId: "NULL",
  323. triggerType: 3,
  324. deviceId: "NULL",
  325. suffix: null,
  326. rank: 3,
  327. uniformCode: "BI0001",
  328. stationId: "SXJ_KGDL_HSM_FDC_STA",
  329. modelId: "/HW3-S2500(121)",
  330. alarmType: "windturbine",
  331. deviceType: "windturbine",
  332. components: "BJXT",
  333. subcomponents: "NULL",
  334. description: "变桨轴3通讯故障",
  335. characteristic: "报警",
  336. resetTable: false,
  337. enable: true,
  338. name: "hmi_error_dword_01.3",
  339. nemCode: "142013",
  340. faultCause:
  341. "1.变桨内部通讯线、HARTING 接头、通讯终端电阻故障;2.驱动器故障;3.通讯模块故障;",
  342. resolvent:
  343. "1.检查变桨内部通讯线、HARTING 接头、通讯终端电阻是否正常;2.检查驱动器是否正常;\n3.检查通讯模块是否正常;",
  344. stationName: "02风电场",
  345. componentsName: "变桨系统",
  346. },
  347. {
  348. id: "HY_0005",
  349. tagId: "NULL",
  350. triggerType: 4,
  351. deviceId: "NULL",
  352. suffix: null,
  353. rank: 3,
  354. uniformCode: "BI0001",
  355. stationId: "SXJ_KGDL_HSM_FDC_STA",
  356. modelId: "/HW3-S2500(121)",
  357. alarmType: "windturbine",
  358. deviceType: "windturbine",
  359. components: "QT",
  360. subcomponents: "NULL",
  361. description: "所有从站运行故障",
  362. characteristic: "报警",
  363. resetTable: false,
  364. enable: true,
  365. name: "hmi_error_dword_01.4",
  366. nemCode: "143001",
  367. faultCause: "Ethercat 通讯模块或其线路故障",
  368. resolvent: "检查 Ethercat 通讯模块及其线路是否正常",
  369. stationName: "02风电场",
  370. componentsName: "其他",
  371. },
  372. {
  373. id: "HY_0006",
  374. tagId: "NULL",
  375. triggerType: 5,
  376. deviceId: "NULL",
  377. suffix: null,
  378. rank: 3,
  379. uniformCode: "BI0001",
  380. stationId: "SXJ_KGDL_HSM_FDC_STA",
  381. modelId: "/HW3-S2500(121)",
  382. alarmType: "windturbine",
  383. deviceType: "windturbine",
  384. components: "QT",
  385. subcomponents: "NULL",
  386. description: "从站不正常",
  387. characteristic: "报警",
  388. resetTable: false,
  389. enable: true,
  390. name: "hmi_error_dword_01.5",
  391. nemCode: "143002",
  392. faultCause: "NULL",
  393. resolvent: "NULL",
  394. stationName: "02风电场",
  395. componentsName: "其他",
  396. },
  397. {
  398. id: "HY_0007",
  399. tagId: "NULL",
  400. triggerType: 6,
  401. deviceId: "NULL",
  402. suffix: null,
  403. rank: 3,
  404. uniformCode: "BI0001",
  405. stationId: "SXJ_KGDL_HSM_FDC_STA",
  406. modelId: "/HW3-S2500(121)",
  407. alarmType: "windturbine",
  408. deviceType: "windturbine",
  409. components: "QT",
  410. subcomponents: "NULL",
  411. description: "从站信号丢失",
  412. characteristic: "报警",
  413. resetTable: false,
  414. enable: true,
  415. name: "hmi_error_dword_01.6",
  416. nemCode: "143003",
  417. faultCause: "Ethercat 通讯模块或其线路故障",
  418. resolvent: "检查 Ethercat 通讯模块及其线路是否正常",
  419. stationName: "02风电场",
  420. componentsName: "其他",
  421. },
  422. {
  423. id: "HY_0008",
  424. tagId: "NULL",
  425. triggerType: 7,
  426. deviceId: "NULL",
  427. suffix: null,
  428. rank: 3,
  429. uniformCode: "BI0001",
  430. stationId: "SXJ_KGDL_HSM_FDC_STA",
  431. modelId: "/HW3-S2500(121)",
  432. alarmType: "windturbine",
  433. deviceType: "windturbine",
  434. components: "TDG",
  435. subcomponents: "NULL",
  436. description: "塔底主站通讯故障",
  437. characteristic: "报警",
  438. resetTable: false,
  439. enable: true,
  440. name: "hmi_error_dword_01.7",
  441. nemCode: "140301",
  442. faultCause: "变流器通讯模块或其线路故障",
  443. resolvent:
  444. "1.检查通讯模块及供电是否正常;2.检查模块拨码、通讯接头拨码、终端电阻、屏蔽线接\n地是否正常;",
  445. stationName: "02风电场",
  446. componentsName: "塔底柜",
  447. },
  448. {
  449. id: "HY_0009",
  450. tagId: "NULL",
  451. triggerType: 8,
  452. deviceId: "NULL",
  453. suffix: null,
  454. rank: 3,
  455. uniformCode: "BI0001",
  456. stationId: "SXJ_KGDL_HSM_FDC_STA",
  457. modelId: "/HW3-S2500(121)",
  458. alarmType: "windturbine",
  459. deviceType: "windturbine",
  460. components: "TDG",
  461. subcomponents: "NULL",
  462. description: "塔底从站通讯故障",
  463. characteristic: "报警",
  464. resetTable: false,
  465. enable: true,
  466. name: "hmi_error_dword_01.8",
  467. nemCode: "140311",
  468. faultCause: "变流器通讯模块或其线路故障",
  469. resolvent:
  470. "1.检查通讯模块及供电是否正常;2.检查模块拨码、通讯接头拨码、终端电阻、屏蔽线接\n地是否正常;",
  471. stationName: "02风电场",
  472. componentsName: "塔底柜",
  473. },
  474. {
  475. id: "HY_0010",
  476. tagId: "NULL",
  477. triggerType: 9,
  478. deviceId: "NULL",
  479. suffix: null,
  480. rank: 3,
  481. uniformCode: "BI0001",
  482. stationId: "SXJ_KGDL_HSM_FDC_STA",
  483. modelId: "/HW3-S2500(121)",
  484. alarmType: "windturbine",
  485. deviceType: "windturbine",
  486. components: "TDG",
  487. subcomponents: "NULL",
  488. description: "塔底控制柜温度过高",
  489. characteristic: "报警",
  490. resetTable: false,
  491. enable: true,
  492. name: "hmi_error_dword_01.9",
  493. nemCode: "110101",
  494. faultCause: "1.传感器及线路故障;2.温度超过设置值;3.PLC 模块故障",
  495. resolvent:
  496. "1.检查传感器及线路是否正常;2.检查控制柜温度是否高温,检查温控开关设置值是否正\n常,检查冷却风扇工作是否正常;3.检查 PLC 模块是否正常;",
  497. stationName: "02风电场",
  498. componentsName: "塔底柜",
  499. },
  500. {
  501. id: "HY_0011",
  502. tagId: "NULL",
  503. triggerType: 10,
  504. deviceId: "NULL",
  505. suffix: null,
  506. rank: 3,
  507. uniformCode: "BI0001",
  508. stationId: "SXJ_KGDL_HSM_FDC_STA",
  509. modelId: "/HW3-S2500(121)",
  510. alarmType: "windturbine",
  511. deviceType: "windturbine",
  512. components: "TDG",
  513. subcomponents: "NULL",
  514. description: "塔底控制柜温度过低",
  515. characteristic: "报警",
  516. resetTable: false,
  517. enable: true,
  518. name: "hmi_error_dword_01.10",
  519. nemCode: "110102",
  520. faultCause: "1.传感器及线路故障;2.温度超过设置值;3.PLC 模块故障",
  521. resolvent:
  522. "1.检查传感器及线路是否正常;2.检查控制柜温控开关设置值是否正常,检查加热器工作\n是否正常,检查控制柜密闭情况是否良好;3.检查 PLC 模块是否正常;",
  523. stationName: "02风电场",
  524. componentsName: "塔底柜",
  525. },
  526. {
  527. id: "HY_0012",
  528. tagId: "NULL",
  529. triggerType: 11,
  530. deviceId: "NULL",
  531. suffix: null,
  532. rank: 3,
  533. uniformCode: "BI0001",
  534. stationId: "SXJ_KGDL_HSM_FDC_STA",
  535. modelId: "/HW3-S2500(121)",
  536. alarmType: "windturbine",
  537. deviceType: "windturbine",
  538. components: "TDG",
  539. subcomponents: "NULL",
  540. description: "塔底控制柜风扇保护",
  541. characteristic: "报警",
  542. resetTable: false,
  543. enable: true,
  544. name: "hmi_error_dword_01.11",
  545. nemCode: "110103",
  546. faultCause:
  547. "1.线路短路;2.电机过载;3.断路器、辅助触点或控制回路故障;4.PLC 模块故障;",
  548. resolvent:
  549. "1.检查动力回路是否正常;2.检查电机绕组;3.检查断路器、辅助触点及控制回路是否正\n常;4.检查 PLC 模块是否正常;",
  550. stationName: "02风电场",
  551. componentsName: "塔底柜",
  552. },
  553. {
  554. id: "HY_0013",
  555. tagId: "NULL",
  556. triggerType: 12,
  557. deviceId: "NULL",
  558. suffix: null,
  559. rank: 3,
  560. uniformCode: "BI0001",
  561. stationId: "SXJ_KGDL_HSM_FDC_STA",
  562. modelId: "/HW3-S2500(121)",
  563. alarmType: "windturbine",
  564. deviceType: "windturbine",
  565. components: "TDG",
  566. subcomponents: "NULL",
  567. description: "塔底温度过高",
  568. characteristic: "报警",
  569. resetTable: false,
  570. enable: true,
  571. name: "hmi_error_dword_01.12",
  572. nemCode: "110105",
  573. faultCause:
  574. "1.线路短路;2.电机过载;3.断路器、辅助触点或控制回路故障;4.PLC 模块故障;",
  575. resolvent:
  576. "1.检查传感器及线路是否正常;2.检查塔底温度是否高温,查找发热源;3.检查 PLC 模块\n是否正常;",
  577. stationName: "02风电场",
  578. componentsName: "塔底柜",
  579. },
  580. {
  581. id: "HY_0014",
  582. tagId: "NULL",
  583. triggerType: 13,
  584. deviceId: "NULL",
  585. suffix: null,
  586. rank: 3,
  587. uniformCode: "BI0001",
  588. stationId: "SXJ_KGDL_HSM_FDC_STA",
  589. modelId: "/HW3-S2500(121)",
  590. alarmType: "windturbine",
  591. deviceType: "windturbine",
  592. components: "JC",
  593. subcomponents: "NULL",
  594. description: "机舱控制柜温度过高",
  595. characteristic: "报警",
  596. resetTable: false,
  597. enable: true,
  598. name: "hmi_error_dword_01.13",
  599. nemCode: "110110",
  600. faultCause: "1.传感器及线路故障;2.温度超过设置值;3.PLC 模块故障",
  601. resolvent:
  602. "1.检查传感器及线路是否正常;2.检查控制柜温度是否高温,检查温控开关设置值是否正\n常,检查冷却风扇工作是否正常;3.检查 PLC 模块是否正常;",
  603. stationName: "02风电场",
  604. componentsName: "机舱",
  605. },
  606. {
  607. id: "HY_0015",
  608. tagId: "NULL",
  609. triggerType: 14,
  610. deviceId: "NULL",
  611. suffix: null,
  612. rank: 3,
  613. uniformCode: "BI0001",
  614. stationId: "SXJ_KGDL_HSM_FDC_STA",
  615. modelId: "/HW3-S2500(121)",
  616. alarmType: "windturbine",
  617. deviceType: "windturbine",
  618. components: "JC",
  619. subcomponents: "NULL",
  620. description: "机舱控制柜温度过低",
  621. characteristic: "报警",
  622. resetTable: false,
  623. enable: true,
  624. name: "hmi_error_dword_01.14",
  625. nemCode: "110111",
  626. faultCause: "1.传感器及线路故障;2.温度超过设置值;3.PLC 模块故障",
  627. resolvent:
  628. "1.检查传感器及线路是否正常;2.检查控制柜温度是否高温;3.检查 PLC 模块是否正常;",
  629. stationName: "02风电场",
  630. componentsName: "机舱",
  631. },
  632. {
  633. id: "HY_0016",
  634. tagId: "NULL",
  635. triggerType: 15,
  636. deviceId: "NULL",
  637. suffix: null,
  638. rank: 3,
  639. uniformCode: "BI0001",
  640. stationId: "SXJ_KGDL_HSM_FDC_STA",
  641. modelId: "/HW3-S2500(121)",
  642. alarmType: "windturbine",
  643. deviceType: "windturbine",
  644. components: "JC",
  645. subcomponents: "NULL",
  646. description: "机舱控制柜风扇保护",
  647. characteristic: "报警",
  648. resetTable: false,
  649. enable: true,
  650. name: "hmi_error_dword_01.15",
  651. nemCode: "110112",
  652. faultCause:
  653. "1.线路短路;2.风扇损坏;3.断路器、辅助触点或控制回路故障;4.PLC 模块故障;",
  654. resolvent:
  655. "1.检查动力回路是否正常;2.检查散热风扇工作是否正常;3.检查断路器、辅助触点及控\n制回路是否正常;4.检查 PLC 模块是否正常;",
  656. stationName: "02风电场",
  657. componentsName: "机舱",
  658. },
  659. {
  660. id: "HY_0017",
  661. tagId: "NULL",
  662. triggerType: 16,
  663. deviceId: "NULL",
  664. suffix: null,
  665. rank: 3,
  666. uniformCode: "BI0001",
  667. stationId: "SXJ_KGDL_HSM_FDC_STA",
  668. modelId: "/HW3-S2500(121)",
  669. alarmType: "windturbine",
  670. deviceType: "windturbine",
  671. components: "TDG",
  672. subcomponents: "NULL",
  673. description: "塔底冷却风扇保护",
  674. characteristic: "报警",
  675. resetTable: false,
  676. enable: true,
  677. name: "hmi_error_dword_01.16",
  678. nemCode: "110113",
  679. faultCause:
  680. "1.线路短路;2.电机过载;3.断路器、辅助触点或控制回路故障;4.PLC 模块故障;",
  681. resolvent:
  682. "1.检查动力回路是否正常;2.检查电机绕组阻值和电机绝缘;3.检查断路器、辅助触点及\n控制回路是否正常;4.检查 PLC 模块是否正常;",
  683. stationName: "02风电场",
  684. componentsName: "塔底柜",
  685. },
  686. {
  687. id: "HY_0018",
  688. tagId: "NULL",
  689. triggerType: 17,
  690. deviceId: "NULL",
  691. suffix: null,
  692. rank: 3,
  693. uniformCode: "BI0001",
  694. stationId: "SXJ_KGDL_HSM_FDC_STA",
  695. modelId: "/HW3-S2500(121)",
  696. alarmType: "windturbine",
  697. deviceType: "windturbine",
  698. components: "BPQ",
  699. subcomponents: "NULL",
  700. description: "变频器转子侧标记故障",
  701. characteristic: "报警",
  702. resetTable: false,
  703. enable: true,
  704. name: "hmi_error_dword_01.17",
  705. nemCode: "30101",
  706. faultCause: "转子侧模块总故障",
  707. resolvent:
  708. "需使用变流器调试软件进行具体代码的分析并参照变流器的故障处理手册排查故障",
  709. stationName: "02风电场",
  710. componentsName: "变频器",
  711. },
  712. {
  713. id: "HY_0019",
  714. tagId: "NULL",
  715. triggerType: 18,
  716. deviceId: "NULL",
  717. suffix: null,
  718. rank: 3,
  719. uniformCode: "BI0001",
  720. stationId: "SXJ_KGDL_HSM_FDC_STA",
  721. modelId: "/HW3-S2500(121)",
  722. alarmType: "windturbine",
  723. deviceType: "windturbine",
  724. components: "BPQ",
  725. subcomponents: "NULL",
  726. description: "变频器转子侧电压故障",
  727. characteristic: "报警",
  728. resetTable: false,
  729. enable: true,
  730. name: "hmi_error_dword_01.18",
  731. nemCode: "30102",
  732. faultCause: "转子侧模块过压和欠压等故障",
  733. resolvent:
  734. "需使用变流器调试软件进行具体代码的分析并参照变流器的故障处理手册排查故障",
  735. stationName: "02风电场",
  736. componentsName: "变频器",
  737. },
  738. {
  739. id: "HY_0020",
  740. tagId: "NULL",
  741. triggerType: 19,
  742. deviceId: "NULL",
  743. suffix: null,
  744. rank: 3,
  745. uniformCode: "BI0001",
  746. stationId: "SXJ_KGDL_HSM_FDC_STA",
  747. modelId: "/HW3-S2500(121)",
  748. alarmType: "windturbine",
  749. deviceType: "windturbine",
  750. components: "BPQ",
  751. subcomponents: "NULL",
  752. description: "变频器转子侧电流故障",
  753. characteristic: "报警",
  754. resetTable: false,
  755. enable: true,
  756. name: "hmi_error_dword_01.19",
  757. nemCode: "30103",
  758. faultCause: "转子侧模块过流或短路",
  759. resolvent:
  760. "1.检查电机负载;2.检查供电电压;3.检查在供电侧有无功率因数补偿电容;4.检查整流\n器;5.检查逆变器;6.检查 LCL 滤波器;7.检查整流器 IGBT 和电流互感器;8.需使用变\n流器调试软件进行具体代码的分析并参照变流器的故障处理手册排查故障",
  761. stationName: "02风电场",
  762. componentsName: "变频器",
  763. },
  764. {
  765. id: "HY_0021",
  766. tagId: "NULL",
  767. triggerType: 20,
  768. deviceId: "NULL",
  769. suffix: null,
  770. rank: 3,
  771. uniformCode: "BI0001",
  772. stationId: "SXJ_KGDL_HSM_FDC_STA",
  773. modelId: "/HW3-S2500(121)",
  774. alarmType: "windturbine",
  775. deviceType: "windturbine",
  776. components: "BPQ",
  777. subcomponents: "NULL",
  778. description: "变频器转子侧温度故障",
  779. characteristic: "报警",
  780. resetTable: false,
  781. enable: true,
  782. name: "hmi_error_dword_01.20",
  783. nemCode: "30104",
  784. faultCause: "NULL",
  785. resolvent: "NULL",
  786. stationName: "02风电场",
  787. componentsName: "变频器",
  788. },
  789. ],
  790. modelList: [],
  791. modelListAll: {}, //型号所有列表
  792. visible: false,
  793. form: {},
  794. tableHeader: [
  795. { title: "编码", code: "id" },
  796. { title: "场站", code: "stationName" },
  797. // { title: "设备", code: "deviceId", },
  798. { title: "机型", code: "modelId" },
  799. { title: "报警描述", code: "description" },
  800. { title: "设备部件", code: "componentsName" },
  801. { title: "特性", code: "characteristic" },
  802. { title: "设备类型", code: "deviceType" },
  803. { title: "报警类型", code: "alarmType" },
  804. // { title: "级别", code: "rankName" },
  805. { title: "是否启用", code: "enable" },
  806. { title: "是否可复位", code: "resetTableName" },
  807. ],
  808. tableHeader1: [
  809. { title: "编码", code: "id" },
  810. { title: "升压站", code: "stationName" },
  811. // { title: "规则名称", code: "name" },
  812. // { title: "表达式", code: "expression" },
  813. { title: "类型", code: "alarmType" },
  814. // { title: "级别", code: "rank" },
  815. { title: "是否启用", code: "enable" },
  816. { title: "描述", code: "description" },
  817. ],
  818. });
  819. // 机型
  820. const getequipmentmodel_list = async () => {
  821. const { data } = await fetchModel();
  822. state.modelListAll = data;
  823. };
  824. // 场站列表/升压站列表
  825. const stationList = ref([]);
  826. const categorychanged = async (value) => {
  827. query.alarmType = value;
  828. query.wpId = "";
  829. query.modelId = "";
  830. getWpArray();
  831. getData();
  832. };
  833. const getWpArray = async () => {
  834. const { data } = await getWpList(query.alarmType);
  835. stationList.value = data;
  836. };
  837. //型号列表
  838. const modelList = computed(() => {
  839. if (query.wpId == "") {
  840. return [];
  841. } else {
  842. return state.modelListAll[query.wpId];
  843. }
  844. });
  845. const isStation = computed(() => store.getters.isStation);
  846. let total = ref(0);
  847. const hisTable = ref();
  848. const getData = async () => {
  849. const { data: res } = await windturbinebj_fetchTableData(query);
  850. if (res) {
  851. res.records.forEach((ele) => {
  852. ele.rankName = getRankName(ele.rank);
  853. ele.resetTableName = ele.resetTable ? "是" : "否";
  854. });
  855. state.tableData = res.records;
  856. console.log(hisTable.value);
  857. total.value = res.total;
  858. }
  859. };
  860. const getRankName = (rank) => {
  861. if (rank === 1) {
  862. return "低级";
  863. } else if (rank === 2) {
  864. return "低中级";
  865. } else if (rank === 3) {
  866. return "中级";
  867. } else if (rank === 4) {
  868. return "中高级";
  869. } else if (rank === 5) {
  870. return "高极";
  871. }
  872. };
  873. //changeStation
  874. const changeStation = async () => {
  875. query.modelId = "";
  876. getData();
  877. };
  878. const dialogclose = () => {
  879. state.visible = false;
  880. getData();
  881. };
  882. const handleInsert = () => {
  883. state.visible = true;
  884. state.title = "新增";
  885. };
  886. const handleEditClick = (row) => {
  887. state.title = "编辑";
  888. let obj = Object.assign({}, row);
  889. obj && (obj.manufacturerCode = "");
  890. state.form = obj;
  891. state.visible = true;
  892. };
  893. // 分页导航
  894. const handlePageChange = (val) => {
  895. query.pageNum = val;
  896. getData();
  897. };
  898. const tableHeader = [
  899. "id",
  900. "报警级别(ZC_BJ:运转正常;YJ_BJ:运转状态超出标准范围;GZ_BJ:非正常停止运转;WH_BJ:停机维护;XD_BJ:限电/计划停机)",
  901. "制造商(HFYG_CS:合肥阳光电源有限公司;AMS_CS:艾默生;NRJD_CS:国电南瑞吉电新能源;MGSK_CS:美国赛康;LHDL_CS:联合动力;SYHC_CS:沈阳华创)",
  902. "名称",
  903. "上一级节点",
  904. "是否有子节点",
  905. "序列号",
  906. "类别 :正常停机,正常启动,快速停机,紧急停机",
  907. "设备型号",
  908. "全部默认为1",
  909. "统一编码",
  910. "是否展示(0:是;1:否)",
  911. "报警分类(bj:变桨;bpq:变频器;clx:齿轮箱;fdj:发电机;hh:滑环;jcjr:机舱加热;lq:冷却;ph:偏航;rh:润滑;yy:液压;zz:主轴;other:其它;kz:控制;yl:叶轮;jc:机舱;xb:箱变;dw:电网;td:塔底;fsy:风速仪)",
  912. "消缺规定时间",
  913. "是否可以复位(0:是;1:否)",
  914. "报警类型编号",
  915. "故障编码",
  916. "关联部件",
  917. ];
  918. const tableKey = [
  919. "id",
  920. "levelId",
  921. "manufacturerCode",
  922. "chineseText",
  923. "parentId",
  924. "isleaf",
  925. "sequenceNumber",
  926. "characteristic",
  927. "modelId",
  928. "codeName",
  929. "ednaValue",
  930. "display",
  931. "warningClassIfyId",
  932. "standardTime",
  933. "isreset",
  934. "warningTypeId",
  935. "faultCode",
  936. "relatedParts",
  937. ];
  938. // 批量导出
  939. const export2Excel = async () => {
  940. let tableHeader = [];
  941. let tableKey = [];
  942. const res = await windturbinebj_fetchTableData({
  943. ...query,
  944. pageNum: 1,
  945. pageSize: 999999,
  946. });
  947. ElMessage.success(`导出成功!`);
  948. if (query.alarmType == "windturbine" || query.alarmType == "inverter") {
  949. tableHeader = state.tableHeader.map((item) => item.title);
  950. tableKey = state.tableHeader.map((item) => item.code);
  951. } else if (query.alarmType == "booststation") {
  952. tableHeader = state.tableHeader1.map((item) => item.title);
  953. tableKey = state.tableHeader1.map((item) => item.code);
  954. }
  955. outExportExcel(
  956. tableHeader,
  957. tableKey,
  958. res.data.records.map((item) => {
  959. return {
  960. ...item,
  961. alarmType: alarmTypeConvert("alarmType", item.alarmType),
  962. deviceType: alarmTypeConvert("deviceType", item.deviceType),
  963. enable: enabledConvert(item.enable),
  964. resetTableName: item.resetTable ? "是" : "否",
  965. };
  966. }),
  967. "设备报警配置导出excel"
  968. );
  969. };
  970. // 模板下载
  971. const outExe = () => {
  972. const data = [];
  973. ElMessage.success(`导出成功!`);
  974. outExportExcel(tableHeader, tableKey, data, "设备报警模板");
  975. };
  976. // 批量导入
  977. const handleSuccess = (response, file, fileList) => {
  978. ElMessage.success("导入成功!");
  979. getData();
  980. };
  981. const handleProgress = (response, file, fileList) => {};
  982. const handleError = (response, file, fileList) => {
  983. ElMessage.success("导入失败!");
  984. };
  985. //级别
  986. const rankConvert = (val) => {
  987. if (val == 1) {
  988. return "低级";
  989. } else if (val == 2) {
  990. return "低中级";
  991. } else if (val == 3) {
  992. return "中级";
  993. } else if (val == 4) {
  994. return "中高级";
  995. } else if (val == 5) {
  996. return "高级";
  997. }
  998. };
  999. // 类型
  1000. const alarmTypeConvert = (type, val) => {
  1001. if (type === "alarmType") {
  1002. if (val === "windturbine") {
  1003. return "风机";
  1004. } else if (val === "booststation") {
  1005. return "升压站";
  1006. } else if (val === "inverter") {
  1007. return "光伏";
  1008. } else if (val === "custom") {
  1009. return "自定义";
  1010. }
  1011. } else {
  1012. if (val === "windturbine") {
  1013. return "风机";
  1014. } else if (val === "booststation") {
  1015. return "升压站";
  1016. } else if (val === "inverter") {
  1017. return "光伏";
  1018. }
  1019. }
  1020. };
  1021. // 状态
  1022. const enabledConvert = (val) => {
  1023. if (val === false) {
  1024. return "停用";
  1025. } else if (val === true) {
  1026. return "启用";
  1027. }
  1028. };
  1029. // 报警分类
  1030. const warningClassIfyIdConvert = (val) => {
  1031. switch (val) {
  1032. case "bj":
  1033. return "变桨";
  1034. case "bpq":
  1035. return "变频器";
  1036. case "clx":
  1037. return "齿轮箱";
  1038. case "fdj":
  1039. return "发电机";
  1040. case "hh":
  1041. return "滑环";
  1042. case "jcjr":
  1043. return "机舱加热";
  1044. case "lq":
  1045. return "冷却";
  1046. case "ph":
  1047. return "偏航";
  1048. case "rh":
  1049. return "润滑";
  1050. case "yy":
  1051. return "液压";
  1052. case "zz":
  1053. return "主轴";
  1054. case "other":
  1055. return "其它";
  1056. case "kz":
  1057. return "控制";
  1058. case "yl":
  1059. return "叶轮";
  1060. case "jc":
  1061. return "机舱";
  1062. case "xb":
  1063. return "箱变";
  1064. case "dw":
  1065. return "电网";
  1066. case "td":
  1067. return "塔底";
  1068. case "fsy":
  1069. return "风速仪";
  1070. }
  1071. };
  1072. // 是否可以复位
  1073. const isresetConvert = (val) => {
  1074. switch (val) {
  1075. case 0:
  1076. return "是";
  1077. case 1:
  1078. return "否";
  1079. }
  1080. };
  1081. // 统一编码
  1082. const ednaValueConvert = (val) => {
  1083. if (val === 0) {
  1084. return "";
  1085. } else if (val < 100 && val > 0) {
  1086. return "DI0" + val;
  1087. } else if (val >= 100) {
  1088. return "DI" + val;
  1089. }
  1090. };
  1091. // 关联部件
  1092. const relatePartConvert = (val) => {
  1093. switch (val) {
  1094. case "YP":
  1095. return "叶片";
  1096. case "LG":
  1097. return "轮毂";
  1098. case "TZ":
  1099. return "塔架";
  1100. case "JC":
  1101. return "机舱";
  1102. case "KZXT":
  1103. return "控制系统";
  1104. case "BJXT":
  1105. return "变桨系统";
  1106. case "PHXT":
  1107. return "偏航系统";
  1108. case "CLX":
  1109. return "齿轮箱";
  1110. case "FDJ":
  1111. return "发电机";
  1112. case "BPQ":
  1113. return "变频器";
  1114. case "YYXT":
  1115. return "液压系统";
  1116. case "FZXT":
  1117. return "辅助系统";
  1118. case "CFXT":
  1119. return "测风系统";
  1120. case "DWXT":
  1121. return "电网系统";
  1122. case "TDG":
  1123. return "塔底柜";
  1124. case "CDL":
  1125. return "传动链";
  1126. case "QT":
  1127. return "其他";
  1128. default:
  1129. }
  1130. };
  1131. </script>
  1132. <style scoped lang="less">
  1133. .history-config {
  1134. height: 100%;
  1135. .form-wrapper {
  1136. display: flex;
  1137. justify-content: flex-start;
  1138. align-items: center;
  1139. padding: 20px 0 10px 20px;
  1140. .search-wrapper::v-deep {
  1141. display: flex;
  1142. justify-content: flex-start;
  1143. align-items: center;
  1144. font-size: 14px;
  1145. font-family: Microsoft YaHei;
  1146. font-weight: 400;
  1147. color: #b3b3b3;
  1148. .search-item {
  1149. margin-right: 10px;
  1150. width: 120px;
  1151. }
  1152. }
  1153. .btns {
  1154. display: flex;
  1155. justify-content: flex-end;
  1156. margin-right: 10px;
  1157. // position: absolute;
  1158. // right: 0;
  1159. // top: 53px;
  1160. }
  1161. .buttons {
  1162. background-color: rgba(5, 187, 76, 0.2);
  1163. border: 1px solid #3b6c53;
  1164. color: #b3b3b3;
  1165. font-size: 14px;
  1166. &:hover {
  1167. background-color: rgba(5, 187, 76, 0.5);
  1168. color: #ffffff;
  1169. }
  1170. }
  1171. }
  1172. }
  1173. .table-wrapper {
  1174. height: calc(100% - 160px);
  1175. width: calc(100% - 40px);
  1176. padding: 20px;
  1177. .leftContent[data-type~="greenSty"] {
  1178. background: url("~@/assets/imgs/title_left_bg1.png") no-repeat;
  1179. }
  1180. .leftContent[data-type~="blueSty"] {
  1181. background: url("~@/assets/imgs/title_left_bg.png") no-repeat;
  1182. }
  1183. .leftContent {
  1184. width: 242px;
  1185. height: 41px;
  1186. display: flex;
  1187. align-items: center;
  1188. span {
  1189. font-size: 16px;
  1190. font-family: Microsoft YaHei;
  1191. font-weight: 400;
  1192. color: #05bb4c;
  1193. margin-left: 25px;
  1194. }
  1195. }
  1196. .el-table::v-deep {
  1197. .el-table__body-wrapper {
  1198. height: calc(100% - 45px) !important;
  1199. }
  1200. }
  1201. .pagination-wrapper ::v-deep {
  1202. text-align: right;
  1203. margin-top: 20px;
  1204. }
  1205. }
  1206. .pagination {
  1207. margin-top: 15px;
  1208. }
  1209. .el-button + .el-button {
  1210. margin-left: 10px;
  1211. }
  1212. </style>