index.vue 35 KB

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