billboard.data.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. import leftImg from '/@/assets/images/files/homes/file.svg';
  2. import rightImg from '/@/assets/images/files/homes/sp.svg';
  3. import GasIcon from '/@/assets/images/vent/gas-icon-2.png';
  4. import FireIcon from '/@/assets/images/vent/fire-icon-2.png';
  5. import VentIcon from '/@/assets/images/vent/vent-icon-2.png';
  6. import SafetyIcon from '/@/assets/images/vent/safety-icon-2.png';
  7. import DustIcon from '/@/assets/images/vent/dust-icon-2.png';
  8. // export type Translation = Record<string | number, string>;
  9. // export interface TitleConfig {
  10. // label: string;
  11. // prop: string;
  12. // translation?: Translation;
  13. // }
  14. // export interface HeaderConfig {
  15. // label: string;
  16. // prop: string;
  17. // translation?: Translation;
  18. // }
  19. // export interface TableConfig {
  20. // prop: string;
  21. // columns: { label: string; prop: string; _t?: boolean }[];
  22. // collapses: { label: string; prop: string; _t?: boolean }[];
  23. // translation?: Translation;
  24. // }
  25. // export interface ListConfig {
  26. // icon: string;
  27. // label: string;
  28. // prop: string;
  29. // translation?: Translation;
  30. // collapses: { label: string; prop: string; _t?: boolean }[];
  31. // }
  32. // export interface OverviewConfig {
  33. // label: string;
  34. // prop: string;
  35. // src: string;
  36. // }
  37. // export interface TreeConfig {
  38. // prefix: string;
  39. // prop: string;
  40. // suffix: string;
  41. // children: {
  42. // prefix: string;
  43. // prop: string;
  44. // suffix: string;
  45. // }[];
  46. // translation?: Record<string | number, string>;
  47. // }
  48. // /** 看板的总配置 */
  49. // export const BillboardConfig: {
  50. // DustStatus: {
  51. // title: TitleConfig;
  52. // table: TableConfig;
  53. // };
  54. // FileOverview: {
  55. // contents: OverviewConfig[];
  56. // };
  57. // FireStatus: {
  58. // title: TitleConfig;
  59. // lists: ListConfig[];
  60. // };
  61. // GasStauts: {
  62. // headers: HeaderConfig[];
  63. // table: TableConfig;
  64. // };
  65. // Summary: {
  66. // headers: HeaderConfig[];
  67. // table: TableConfig;
  68. // };
  69. // VentilationStauts: {
  70. // headers: HeaderConfig[];
  71. // tree: TreeConfig;
  72. // };
  73. // Warning: {
  74. // contents: OverviewConfig[];
  75. // };
  76. // } = {
  77. // DustStatus: {
  78. // title: {
  79. // text: '',
  80. // prop: '',
  81. // translation: {},
  82. // },
  83. // table: {
  84. // columns: [{ label: '', prop: '' }],
  85. // collapses: [{ label: '', prop: '' }],
  86. // translation: {},
  87. // },
  88. // },
  89. // FileOverview: {
  90. // content: [
  91. // { src: leftImg, text: '文档总数', prop: 'totalNum' },
  92. // { src: rightImg, text: '待审批数', prop: 'approvalNum' },
  93. // ],
  94. // },
  95. // FireStatus: {
  96. // title: {
  97. // text: '',
  98. // prop: '',
  99. // translation: {},
  100. // },
  101. // list: [
  102. // {
  103. // icon: '',
  104. // label: '',
  105. // prop: '',
  106. // type: '',
  107. // translation: {},
  108. // collapses: [{ label: '', prop: '' }],
  109. // },
  110. // ],
  111. // },
  112. // GasStatus: {
  113. // header: [
  114. // {
  115. // label: '',
  116. // prop: '',
  117. // translation: {},
  118. // },
  119. // ],
  120. // table: {
  121. // columns: [],
  122. // collapses: [],
  123. // translation: {},
  124. // },
  125. // },
  126. // Summary: {
  127. // header: [
  128. // {
  129. // label: '',
  130. // prop: '',
  131. // translation: {},
  132. // },
  133. // ],
  134. // table: {
  135. // columns: [],
  136. // translation: {},
  137. // },
  138. // },
  139. // VentilationStatus: {
  140. // header: [
  141. // {
  142. // label: '',
  143. // prop: '',
  144. // filte: '',
  145. // translation: {},
  146. // },
  147. // ],
  148. // tree: {
  149. // prefix: '',
  150. // prop: 'strname',
  151. // suffix: '',
  152. // children: [
  153. // {
  154. // prefix: '名称:',
  155. // prop: 'strinstallpos',
  156. // suffix: '',
  157. // },
  158. // {
  159. // prefix: '1号风机风量:',
  160. // prop: 'Fan1m3',
  161. // suffix: '(m³/min)',
  162. // },
  163. // {
  164. // prefix: '2号风机风量:',
  165. // prop: 'Fan2m3',
  166. // suffix: '(m³/min)',
  167. // },
  168. // {
  169. // prefix: '频率:',
  170. // prop: 'FanFreqHz',
  171. // suffix: 'Hz',
  172. // },
  173. // {
  174. // prefix: '三区阻力分布:',
  175. // prop: 'sqzlfb',
  176. // suffix: '',
  177. // },
  178. // ],
  179. // },
  180. // },
  181. // Warning: {
  182. // content: [
  183. // { src: leftImg, text: '文档总数', prop: 'totalNum' },
  184. // { src: rightImg, text: '待审批数', prop: 'approvalNum' },
  185. // ],
  186. // },
  187. // };
  188. // 基础的表格列配置,针对普通设备
  189. export const GAS_STATUS_COLUMN = [
  190. {
  191. name: '设备类型',
  192. prop: 'typeName',
  193. },
  194. {
  195. name: '监测数量',
  196. prop: 'num',
  197. },
  198. {
  199. name: '当前状态',
  200. prop: 'warnLevelStr',
  201. },
  202. ];
  203. /** 瓦斯监测表格的折叠项配置 */
  204. export const GAS_COLLAPSES = [
  205. {
  206. name: '最大值位置',
  207. prop: 'maxValueInstallPos',
  208. },
  209. {
  210. name: '最大值(%)',
  211. prop: 'maxValue',
  212. },
  213. ];
  214. // 粉尘状态模块表格列配置
  215. export const DUST_STATUS_COLUMN = [
  216. {
  217. name: '设备类型',
  218. prop: 'typeName',
  219. },
  220. {
  221. name: '监测数量',
  222. prop: 'num',
  223. },
  224. {
  225. name: '当前状态',
  226. prop: 'warnLevelStr',
  227. },
  228. ];
  229. /** 粉尘监测表格的折叠项配置 */
  230. export const DUST_COLLAPSES = [
  231. {
  232. name: '最大值位置',
  233. prop: 'maxValueInstallPos',
  234. },
  235. {
  236. name: '最大值(mg/m3)',
  237. prop: 'maxValue',
  238. },
  239. ];
  240. // 火灾状态监测相关的内容配置项
  241. export const FIRE_STATUS_LIST = [
  242. {
  243. icon: 'warning-optical-fiber',
  244. label: '光纤测温系统报警',
  245. prop: 'fiberInfo.warnLevel',
  246. collapses: [
  247. {
  248. name: '最大值位置',
  249. prop: 'fiberInfo.maxValueInstallPos',
  250. },
  251. {
  252. name: '最大值(℃)',
  253. prop: 'fiberInfo.maxValue',
  254. },
  255. ],
  256. },
  257. {
  258. icon: 'warning-tubes',
  259. label: '束管监测系统报警',
  260. prop: 'bundletubeInfo.warnLevel',
  261. collapses: [
  262. {
  263. name: '最大值位置',
  264. prop: 'bundletubeInfo.maxValueInstallPos',
  265. },
  266. {
  267. name: '一氧化碳最大值(ppm)',
  268. prop: 'bundletubeInfo.coval',
  269. },
  270. {
  271. name: 'CH2最大值(ppm)',
  272. prop: 'bundletubeInfo.ch2val',
  273. },
  274. {
  275. name: '氧气最大值(ppm)',
  276. prop: 'bundletubeInfo.o2val',
  277. },
  278. {
  279. name: 'CH最大值(ppm)',
  280. prop: 'bundletubeInfo.chval',
  281. },
  282. {
  283. name: '瓦斯最大值(%)',
  284. prop: 'bundletubeInfo.gasval',
  285. },
  286. {
  287. name: '二氧化碳最大值(ppm)',
  288. prop: 'bundletubeInfo.co2val',
  289. },
  290. ],
  291. },
  292. {
  293. icon: 'warning-smoke-2',
  294. label: '烟雾传感器报警',
  295. prop: 'smokeSensorInfo.warnLevel',
  296. collapses: [
  297. {
  298. name: '最大值位置',
  299. prop: 'smokeSensorInfo.maxValueInstallPos',
  300. },
  301. {
  302. name: '最大值(%)',
  303. prop: 'smokeSensorInfo.maxValue',
  304. },
  305. ],
  306. },
  307. {
  308. icon: 'warning-CO-2',
  309. label: 'CO传感器报警',
  310. prop: 'coSensorInfo.warnLevel',
  311. collapses: [
  312. {
  313. name: '最大值位置',
  314. prop: 'coSensorInfo.maxValueInstallPos',
  315. },
  316. {
  317. name: '最大值(ppm)',
  318. prop: 'coSensorInfo.maxValue',
  319. },
  320. ],
  321. },
  322. {
  323. icon: 'warning-temp',
  324. label: '温度传感器报警',
  325. prop: 'tempSensorInfo.warnLevel',
  326. collapses: [
  327. {
  328. name: '最大值位置',
  329. prop: 'tempSensorInfo.maxValueInstallPos',
  330. },
  331. {
  332. name: '最大值(℃)',
  333. prop: 'tempSensorInfo.maxValue',
  334. },
  335. ],
  336. },
  337. ];
  338. // 文件总览相关的内容配置项
  339. export const FILE_OVERVIEW_CONFIG = [
  340. { src: leftImg, text: '文档总数', prop: 'totalNum', id: 'file_cfg_001' },
  341. { src: rightImg, text: '待审批数', prop: 'approvalNum', id: 'file_cfg_002' },
  342. ];
  343. // 通风状态监测相关的内容配置项
  344. export const VENTILATION_STATUS_HEADER_CONFIG = [
  345. {
  346. label: '总进风量(m³/min)',
  347. prop: 'zongjinfeng',
  348. type: 'blue-to-left',
  349. },
  350. {
  351. label: '总回风量(m³/min)',
  352. prop: 'zonghuifeng',
  353. type: 'green-to-right',
  354. },
  355. {
  356. label: '总需风量(m³/min)',
  357. prop: 'xufengliang',
  358. type: 'green-to-left',
  359. },
  360. {
  361. label: '巷道总长度(m)',
  362. prop: 'totallength',
  363. type: 'blue-to-right',
  364. },
  365. ];
  366. // 通风状态监测(树形节点详情)相关的内容配置项
  367. export const VENTILATION_STATUS_TREE_CONFIG = {
  368. prefix: '',
  369. prop: 'strname',
  370. suffix: '',
  371. children: [
  372. {
  373. prefix: '名称:',
  374. prop: 'strinstallpos',
  375. suffix: '',
  376. },
  377. {
  378. prefix: '1号风机风量:',
  379. prop: 'Fan1m3',
  380. suffix: '(m³/min)',
  381. },
  382. {
  383. prefix: '2号风机风量:',
  384. prop: 'Fan2m3',
  385. suffix: '(m³/min)',
  386. },
  387. {
  388. prefix: '频率:',
  389. prop: 'FanFreqHz',
  390. suffix: 'Hz',
  391. },
  392. {
  393. prefix: '三区阻力分布:',
  394. prop: 'sqzlfb',
  395. suffix: '',
  396. },
  397. ],
  398. };
  399. // 瓦斯状态监测相关的内容配置项
  400. export const GAS_STATUS_HEADER_CONFIG = [
  401. {
  402. label: '瓦斯风险等级',
  403. prop: 'gasWarnLevel',
  404. type: 'to-bottom-right',
  405. },
  406. {
  407. label: '瓦斯鉴定等级',
  408. prop: 'gasJudgeLevel',
  409. type: 'to-top-right',
  410. },
  411. ];
  412. // 综合监测相关的内容配置项
  413. export const SUMMARY_HEADER_CONFIG = {
  414. label: '风险分析',
  415. prop: 'synthesizeS.levelstatus',
  416. type: 'to-bottom-right',
  417. };
  418. // 综合监测表格列配置
  419. export const SUMMARY_COLUMN = [
  420. {
  421. name: '监测类别',
  422. prop: 'label',
  423. },
  424. {
  425. name: '风险等级',
  426. prop: 'value',
  427. },
  428. ];
  429. // 预警总览相关的内容配置项
  430. export const WARNING_CONFIG = [
  431. { src: '', text: '监测总数', prop: 'total', prop2: 'total', id: 'warning_cfg_000' },
  432. { src: SafetyIcon, text: '安全监测', prop: 'safety', prop2: 'safetyRisk', id: 'warning_cfg_005' },
  433. { src: VentIcon, text: '通风', prop: 'vent', prop2: 'ventRisk', id: 'warning_cfg_004' },
  434. { src: DustIcon, text: '粉尘', prop: 'dust', prop2: 'dustRisk', id: 'warning_cfg_003' },
  435. { src: GasIcon, text: '瓦斯', prop: 'gas', prop2: 'gasRisk', id: 'warning_cfg_001' },
  436. { src: FireIcon, text: '火灾', prop: 'fire', prop2: 'fireRisk', id: 'warning_cfg_002' },
  437. ];
  438. export const DEFAULT_TEST_DATA = {
  439. dustInfo: {
  440. // 矿井粉尘风险信息
  441. totalNum: 0,
  442. dustTypeList: [
  443. {
  444. deviceType: '/',
  445. warnLevel: 0,
  446. num: 0,
  447. typeName: '/',
  448. },
  449. {
  450. deviceType: '/',
  451. warnLevel: 0,
  452. num: 0,
  453. typeName: '/',
  454. },
  455. ],
  456. dustWarnLevel: 0, // 矿井粉尘风险性等级
  457. },
  458. fileServerInfo: {
  459. totalNum: 0, // 文档总数
  460. approvalNum: 0, // 待审批文档
  461. },
  462. fireInfo: {
  463. tempMax: 29,
  464. fireWarnLevel: 1001,
  465. bundletubeInfo: {
  466. typeName: '束管',
  467. maxValueInstallPos: '31310采空区50m',
  468. tempMax: 0,
  469. coval: '2.0',
  470. ch2val: '0.0',
  471. deviceType: 'bundletube_auto',
  472. warnLevel: 1001,
  473. maxValue: 2,
  474. o2val: '10.31',
  475. totalNum: 12,
  476. chval: '0.0',
  477. gasval: '0.0',
  478. time: '2024-05-31 16:34:04',
  479. isRun: '-2',
  480. co2val: '7.42',
  481. },
  482. smokeSensorInfo: {
  483. deviceType: 'modelsensor_smoke',
  484. tempMax: 0,
  485. warnLevel: 0,
  486. totalNum: 30,
  487. maxValue: 0,
  488. typeName: '烟雾传感器',
  489. maxValueInstallPos: '12煤井底停车场',
  490. },
  491. fiberInfo: {
  492. deviceType: 'fiber_normal',
  493. tempMax: 0,
  494. warnLevel: 0,
  495. totalNum: 4,
  496. maxValue: 25,
  497. typeName: '光纤测温',
  498. maxValueInstallPos: '31煤中央变电所电缆沟-通道一',
  499. },
  500. tempSensorInfo: {
  501. deviceType: 'modelsensor_temperature',
  502. tempMax: 29,
  503. warnLevel: 0,
  504. totalNum: 51,
  505. maxValue: 29,
  506. typeName: '温度传感器',
  507. maxValueInstallPos: '主通风机房配电室',
  508. },
  509. },
  510. gasInfo: {
  511. gasWarnLevel: 0, // 瓦斯风险等级
  512. gasTypeList: [
  513. {
  514. warnLevel: 0,
  515. num: 0,
  516. typeName: '/',
  517. },
  518. ],
  519. },
  520. ventInfo: {
  521. //通风系统信息
  522. totallength: 0, //矿井巷道总长度
  523. zonghuifeng: '0', //总回风
  524. fanMainList: [
  525. {
  526. sqzlfb: '/',
  527. strname: '/',
  528. strinstallpos: '/',
  529. Fan1m3: '/',
  530. Fan2m3: '/',
  531. },
  532. ],
  533. xufengliang: 0, //总需风量
  534. zongjinfeng: '/', //总进风
  535. },
  536. sys_warndata: {
  537. info: {
  538. sysInfo: {
  539. ventS: {
  540. maxLevel: 0,
  541. netstatus: 0,
  542. code: '/',
  543. levelstatus: '/',
  544. maxLevel_str: '/',
  545. name: '/',
  546. count: 0,
  547. status: '/',
  548. maxLevel_status: '/',
  549. },
  550. fireS: {
  551. maxLevel: 0,
  552. code: '/',
  553. maxLevel_str: '/',
  554. count: 0,
  555. netstatus: 0,
  556. levelstatus: '/',
  557. name: '/',
  558. status: '/',
  559. maxLevel_status: '/',
  560. },
  561. synthesizeS: {
  562. maxLevel: 0,
  563. netstatus: 1,
  564. code: 'synthesizeS',
  565. levelstatus: '低风险',
  566. maxLevel_str: '正常',
  567. name: '综合',
  568. count: 0,
  569. status: '正常',
  570. maxLevel_status: '低风险',
  571. },
  572. dustS: {
  573. maxLevel: 0,
  574. netstatus: 0,
  575. code: 'dustS',
  576. levelstatus: '低风险',
  577. maxLevel_str: '正常',
  578. name: '防尘',
  579. count: 0,
  580. status: '正常',
  581. maxLevel_status: '低风险',
  582. },
  583. gasS: {
  584. maxLevel: 0,
  585. netstatus: 0,
  586. code: 'gasS',
  587. levelstatus: '低风险',
  588. maxLevel_str: '正常',
  589. devices: [],
  590. name: '瓦斯',
  591. count: 0,
  592. status: '正常',
  593. maxLevel_status: '低风险',
  594. },
  595. deviceWarnInfo: {
  596. maxLevel: 101,
  597. levelstatus: '低风险',
  598. maxLevel_str: '低风险预警',
  599. status: '异常',
  600. devMaxlevel_status: '低风险预警',
  601. },
  602. },
  603. },
  604. },
  605. warningInfo: {
  606. total: 5,
  607. vent: 1,
  608. ventRisk: '低风险',
  609. gas: 1,
  610. gasRisk: '低风险',
  611. dust: 1,
  612. dustRisk: '低风险',
  613. fire: 1,
  614. fireRisk: '低风险',
  615. safety: 1,
  616. safetyRisk: '低风险',
  617. maxLevel: 5,
  618. },
  619. orgname: '/',
  620. orgcode: '/',
  621. ip: 'localhost',
  622. };
  623. export type BillboardType = typeof DEFAULT_TEST_DATA;