warning.data.ts 20 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030
  1. import { BasicColumn, FormSchema } from '/@/components/Table';
  2. import { initDictOptions } from '/@/utils/dict';
  3. import type { TableColumnType } from 'ant-design-vue';
  4. import { workFaceDeviceList } from './warning.api';
  5. import { render } from '/@/utils/common/renderUtils';
  6. export const levelColumns: BasicColumn[] = [
  7. {
  8. title: '下限',
  9. width: 100,
  10. editRow: true,
  11. dataIndex: 'fmin',
  12. editComponent: 'InputNumber',
  13. },
  14. {
  15. title: '上限',
  16. dataIndex: 'fmax',
  17. width: 100,
  18. editRow: true,
  19. editComponent: 'InputNumber',
  20. },
  21. {
  22. title: '持续时间(s)',
  23. dataIndex: 'timelength',
  24. editRow: true,
  25. width: 100,
  26. editComponent: 'InputNumber',
  27. },
  28. {
  29. title: '报警等级',
  30. dataIndex: 'leveltype',
  31. editRow: true,
  32. editRule: true,
  33. width: 100,
  34. editComponent: 'ApiSelect',
  35. editComponentProps: {
  36. api: initDictOptions.bind(null, 'leveltype'),
  37. labelField: 'label',
  38. valueField: 'value',
  39. },
  40. },
  41. {
  42. title: '报警描述',
  43. width: 180,
  44. editRow: true,
  45. dataIndex: 'des',
  46. editComponent: 'Input',
  47. },
  48. {
  49. title: '报警类型',
  50. width: 180,
  51. editRow: true,
  52. dataIndex: 'alarmType',
  53. editComponent: 'ApiSelect',
  54. editComponentProps: { api: initDictOptions.bind(null, 'alarmType') },
  55. },
  56. {
  57. title: '是否语音播报',
  58. width: 110,
  59. editRow: true,
  60. dataIndex: 'isVoice',
  61. editComponent: 'Switch',
  62. editValueMap: (value) => {
  63. return value ? '是' : '否';
  64. },
  65. },
  66. {
  67. title: '是否持续语音播报',
  68. width: 130,
  69. editRow: true,
  70. dataIndex: 'isCxVoice',
  71. editComponent: 'Switch',
  72. editValueMap: (value) => {
  73. return value ? '是' : '否';
  74. },
  75. },
  76. {
  77. title: '持续播报频率(s)',
  78. width: 120,
  79. editRow: true,
  80. dataIndex: 'voiceFre',
  81. editComponent: 'InputNumber',
  82. },
  83. ];
  84. export const warningColumns: BasicColumn[] = [
  85. {
  86. title: '',
  87. dataIndex: 'id',
  88. ifShow: false,
  89. },
  90. {
  91. title: '监测参数',
  92. dataIndex: 'monitorcode',
  93. width: 150,
  94. editRow: true,
  95. },
  96. {
  97. title: '修正参数', // 给点位设置系数,调整点位值
  98. dataIndex: 'des',
  99. editRow: true,
  100. width: 200,
  101. editComponent: 'Input',
  102. },
  103. {
  104. title: '模拟最小值',
  105. width: 150,
  106. dataIndex: 'ftestmin',
  107. editRow: true,
  108. editComponent: 'InputNumber',
  109. },
  110. {
  111. title: '模拟最大值',
  112. dataIndex: 'ftestmax',
  113. editRow: true,
  114. width: 150,
  115. editComponent: 'InputNumber',
  116. },
  117. ];
  118. export const deviceColumns: BasicColumn[] = [
  119. {
  120. title: '名称',
  121. dataIndex: 'deviceName',
  122. align: 'center',
  123. width: 120,
  124. },
  125. {
  126. title: '安装位置',
  127. dataIndex: 'devicePos',
  128. align: 'center',
  129. width: 100,
  130. },
  131. {
  132. title: '设备类型',
  133. dataIndex: 'deviceType',
  134. align: 'center',
  135. width: 100,
  136. },
  137. {
  138. title: '所属分站',
  139. width: 150,
  140. align: 'center',
  141. dataIndex: 'subStationName',
  142. },
  143. ];
  144. export const workFaceColumns: BasicColumn[] = [
  145. {
  146. title: '安装位置',
  147. dataIndex: 'devicePos',
  148. width: 100,
  149. },
  150. {
  151. title: '排序',
  152. width: 100,
  153. dataIndex: 'sort',
  154. edit: true,
  155. editComponent: 'InputNumber',
  156. },
  157. {
  158. title: '是否在关键通风路线上',
  159. width: 100,
  160. dataIndex: 'pathflag',
  161. edit: true,
  162. editComponent: 'Switch',
  163. editValueMap: (value) => {
  164. return value ? '是' : '否';
  165. },
  166. },
  167. {
  168. title: '传感器类型',
  169. width: 100,
  170. dataIndex: 'sensorType',
  171. edit: true,
  172. editComponent: 'Select',
  173. editComponentProps: {
  174. options: [
  175. {
  176. label: '多参',
  177. value: '1',
  178. },
  179. {
  180. label: '测风',
  181. value: '2',
  182. },
  183. ],
  184. },
  185. },
  186. {
  187. title: '风向',
  188. width: 100,
  189. dataIndex: 'winddir',
  190. edit: true,
  191. editComponent: 'Select',
  192. editComponentProps: {
  193. options: [
  194. {
  195. label: '多参',
  196. value: '1',
  197. },
  198. {
  199. label: '测风',
  200. value: '2',
  201. },
  202. ],
  203. },
  204. },
  205. {
  206. title: '是否参与计算风量',
  207. width: 100,
  208. dataIndex: 'windflag',
  209. edit: true,
  210. editComponent: 'Switch',
  211. editValueMap: (value) => {
  212. return value ? '是' : '否';
  213. },
  214. },
  215. ];
  216. export const workFaceWarningColumns: BasicColumn[] = [
  217. {
  218. title: '报警条目',
  219. dataIndex: 'alarmName',
  220. align: 'center',
  221. },
  222. {
  223. title: '预警等级',
  224. dataIndex: 'alarmLevel',
  225. align: 'center',
  226. customRender: ({ record }) => {
  227. return render.renderDict(record.alarmLevel, 'leveltype');
  228. },
  229. },
  230. {
  231. title: '所属系统',
  232. dataIndex: 'systemType_dictText',
  233. align: 'center',
  234. },
  235. {
  236. title: '预警类型',
  237. dataIndex: 'alarmType_dictText',
  238. align: 'center',
  239. },
  240. {
  241. title: '创建人',
  242. dataIndex: 'createBy',
  243. align: 'center',
  244. },
  245. {
  246. title: '创建日期',
  247. dataIndex: 'createTime',
  248. align: 'center',
  249. },
  250. ];
  251. export const workFaceWarningFormSchemas: FormSchema[] = [
  252. {
  253. label: 'ID',
  254. field: 'id',
  255. component: 'Input',
  256. show: false,
  257. },
  258. {
  259. label: '预警名称',
  260. field: 'alarmName',
  261. component: 'Input',
  262. required: true,
  263. },
  264. {
  265. label: '预警类型',
  266. field: 'alarmType',
  267. component: 'JDictSelectTag',
  268. componentProps: { dictCode: 'alarmType' },
  269. },
  270. {
  271. label: '预警等级',
  272. field: 'alarmLevel',
  273. component: 'JDictSelectTag',
  274. componentProps: { dictCode: 'leveltype', stringToNumber: true },
  275. required: true,
  276. },
  277. {
  278. label: '所属系统',
  279. field: 'systemType',
  280. component: 'JDictSelectTag',
  281. componentProps: { dictCode: 'kindtype' },
  282. },
  283. ];
  284. export const manageWarningPointColumns: BasicColumn[] = [
  285. {
  286. title: '设备名称',
  287. dataIndex: 'deviceName',
  288. align: 'center',
  289. },
  290. {
  291. title: '报警条目',
  292. dataIndex: 'alarmName_dictText',
  293. align: 'center',
  294. },
  295. {
  296. title: '报警下限',
  297. dataIndex: 'fmin',
  298. align: 'center',
  299. edit: true,
  300. editComponent: 'InputNumber',
  301. },
  302. {
  303. title: '报警上限',
  304. dataIndex: 'fmax',
  305. align: 'center',
  306. edit: true,
  307. editComponent: 'InputNumber',
  308. },
  309. {
  310. title: '报警持续时间(s)',
  311. dataIndex: 'cxTime',
  312. align: 'center',
  313. edit: true,
  314. editComponent: 'InputNumber',
  315. },
  316. {
  317. title: '更新人',
  318. dataIndex: 'updateBy',
  319. align: 'center',
  320. width: 100,
  321. },
  322. ];
  323. export const controlFormSchemas = (param) =>
  324. <FormSchema[]>[
  325. {
  326. label: 'ID',
  327. field: 'id',
  328. component: 'Input',
  329. show: false,
  330. },
  331. {
  332. label: '点表',
  333. field: 'strtype',
  334. component: 'Input',
  335. show: false,
  336. },
  337. {
  338. label: '设备名称',
  339. field: 'deviceId',
  340. component: 'ApiSelect',
  341. required: true,
  342. componentProps: ({ formModel }) => {
  343. return {
  344. api: workFaceDeviceList.bind(null, param),
  345. labelField: 'strname',
  346. valueField: 'id',
  347. onChange: (e, option) => {
  348. if (option) formModel['strtype'] = option['strtype'];
  349. },
  350. };
  351. },
  352. },
  353. {
  354. label: '点位',
  355. field: 'monitorId',
  356. component: 'Select',
  357. slot: 'monitor',
  358. required: true,
  359. },
  360. {
  361. label: '值',
  362. field: 'value',
  363. component: 'Input',
  364. align: 'center',
  365. },
  366. {
  367. label: '执行顺序',
  368. field: 'orderNum',
  369. component: 'InputNumber',
  370. },
  371. {
  372. label: '操作描述',
  373. field: 'remark',
  374. component: 'Input',
  375. },
  376. ];
  377. export const controlDevicePointColumns: BasicColumn[] = [
  378. {
  379. title: '报警条目',
  380. dataIndex: 'alarmName',
  381. align: 'center',
  382. },
  383. {
  384. title: '设备安装位置',
  385. dataIndex: 'devicePos',
  386. align: 'center',
  387. },
  388. {
  389. title: '控制点位描述',
  390. dataIndex: 'monitorName',
  391. align: 'center',
  392. },
  393. {
  394. title: '值',
  395. dataIndex: 'value',
  396. align: 'center',
  397. },
  398. // {
  399. // title: '审批状态',
  400. // dataIndex: 'bpmStatus',
  401. // align: 'center',
  402. // edit: true,
  403. // editComponent: 'Select',
  404. // editComponentProps: {
  405. // options: [
  406. // {
  407. // label: '审批',
  408. // value: '1',
  409. // },
  410. // {
  411. // label: '不审批',
  412. // value: '0',
  413. // },
  414. // ],
  415. // },
  416. // },
  417. {
  418. title: '执行顺序',
  419. dataIndex: 'orderNum',
  420. align: 'center',
  421. },
  422. {
  423. title: '更新人',
  424. dataIndex: 'updateBy',
  425. align: 'center',
  426. width: 100,
  427. },
  428. {
  429. title: '操作',
  430. dataIndex: 'operation',
  431. width: 100,
  432. },
  433. ];
  434. export const monitorWarningFormSchemas = (param) =>
  435. <FormSchema[]>[
  436. {
  437. label: 'ID',
  438. field: 'id',
  439. component: 'Input',
  440. show: false,
  441. },
  442. {
  443. label: 'deviceType',
  444. field: 'deviceType',
  445. component: 'Input',
  446. show: false,
  447. },
  448. {
  449. label: '点表',
  450. field: 'strtype',
  451. component: 'Input',
  452. show: false,
  453. },
  454. {
  455. label: '设备名称',
  456. field: 'deviceId',
  457. component: 'ApiSelect',
  458. required: true,
  459. componentProps: ({ formModel }) => {
  460. return {
  461. api: workFaceDeviceList.bind(null, param),
  462. labelField: 'strname',
  463. valueField: 'id',
  464. onChange: (e, option) => {
  465. if (option) formModel['strtype'] = option['strtype'];
  466. },
  467. };
  468. },
  469. },
  470. {
  471. label: '且关系关联id',
  472. field: 'relId',
  473. component: 'Input',
  474. show: false,
  475. },
  476. {
  477. label: '点位',
  478. field: 'monitorId',
  479. component: 'Select',
  480. slot: 'monitor',
  481. // required: true,
  482. },
  483. {
  484. label: '报警上限值',
  485. field: 'fmax',
  486. component: 'InputNumber',
  487. },
  488. {
  489. label: '报警下限值',
  490. field: 'fmin',
  491. component: 'InputNumber',
  492. },
  493. {
  494. label: '报警持续时间(s)',
  495. field: 'cxTime',
  496. component: 'InputNumber',
  497. },
  498. {
  499. label: '数据趋势',
  500. field: 'dataTrend',
  501. component: 'JDictSelectTag',
  502. componentProps: {
  503. dictCode: 'dataTrend',
  504. placeholder: '请选择数据趋势',
  505. },
  506. },
  507. {
  508. label: '数据趋势持续时间(h)',
  509. field: 'trendCxTime',
  510. component: 'InputNumber',
  511. },
  512. ];
  513. export const controlWarningFormSchemas: FormSchema[] = [
  514. {
  515. label: 'ID',
  516. field: 'id',
  517. component: 'Input',
  518. show: false,
  519. },
  520. {
  521. label: '设备名称',
  522. field: 'deviceName',
  523. component: 'Input',
  524. required: true,
  525. },
  526. {
  527. label: '控制点位描述',
  528. field: 'monitorName',
  529. component: 'Input',
  530. },
  531. {
  532. label: '值',
  533. field: 'value',
  534. component: 'Input',
  535. },
  536. {
  537. label: '执行顺序',
  538. field: 'orderNum',
  539. component: 'Input',
  540. },
  541. ];
  542. export const BackWindDevicePointColumns: BasicColumn[] = [
  543. {
  544. title: '设备名称',
  545. dataIndex: 'deviceName',
  546. align: 'center',
  547. },
  548. {
  549. title: '设备安装位置',
  550. dataIndex: 'devicePos',
  551. align: 'center',
  552. },
  553. {
  554. title: '控制点位描述',
  555. dataIndex: 'monitorName',
  556. align: 'center',
  557. },
  558. {
  559. title: '值',
  560. dataIndex: 'value',
  561. edit: true,
  562. editComponent: 'Input',
  563. align: 'center',
  564. },
  565. // {
  566. // title: '审批状态',
  567. // dataIndex: 'bpmStatus',
  568. // align: 'center',
  569. // edit: true,
  570. // editComponent: 'Select',
  571. // editComponentProps: {
  572. // options: [
  573. // {
  574. // label: '审批',
  575. // value: '1',
  576. // },
  577. // {
  578. // label: '不审批',
  579. // value: '0',
  580. // },
  581. // ],
  582. // },
  583. // },
  584. {
  585. title: '执行顺序',
  586. dataIndex: 'orderNum',
  587. align: 'center',
  588. edit: true,
  589. editComponent: 'InputNumber',
  590. },
  591. {
  592. title: '更新人',
  593. dataIndex: 'updateBy',
  594. align: 'center',
  595. width: 100,
  596. },
  597. ];
  598. export const rowOrColSpanMap = new Map();
  599. const sharedOnCell = (record, rowIndex, column) => {
  600. const arr = rowOrColSpanMap.get(record.id);
  601. if (arr) {
  602. const col = arr.find((item) => {
  603. return item.code === column.dataIndex;
  604. });
  605. if (col) return { rowSpan: col.rowSpan, colSpan: col.colSpan };
  606. }
  607. };
  608. export const MonitorColumns: TableColumnType[] = [
  609. {
  610. title: '组合',
  611. dataIndex: 'key',
  612. customCell: sharedOnCell,
  613. },
  614. {
  615. title: '预警名称',
  616. dataIndex: 'alarmName',
  617. customCell: sharedOnCell,
  618. },
  619. {
  620. title: '设备名称',
  621. dataIndex: 'deviceName',
  622. customCell: sharedOnCell,
  623. },
  624. {
  625. title: '监测点位',
  626. dataIndex: 'monitorName',
  627. customCell: sharedOnCell,
  628. },
  629. {
  630. title: '报警下限值',
  631. dataIndex: 'fmin',
  632. customCell: sharedOnCell,
  633. },
  634. {
  635. title: '报警上限值',
  636. dataIndex: 'fmax',
  637. customCell: sharedOnCell,
  638. },
  639. {
  640. title: '报警持续时间',
  641. dataIndex: 'cxTime',
  642. customCell: sharedOnCell,
  643. },
  644. {
  645. title: '操作',
  646. colSpan: 2,
  647. dataIndex: 'operation',
  648. width: 120,
  649. customCell: sharedOnCell,
  650. },
  651. {
  652. title: '操作',
  653. colSpan: 0,
  654. dataIndex: 'operation1',
  655. width: 80,
  656. customCell: sharedOnCell,
  657. },
  658. ];
  659. export const controlColumns: TableColumnType[] = [
  660. {
  661. title: '预警名称',
  662. dataIndex: 'alarmName',
  663. align: 'center',
  664. },
  665. {
  666. title: '设备名称',
  667. dataIndex: 'deviceName',
  668. align: 'center',
  669. },
  670. {
  671. title: '控制点位',
  672. dataIndex: 'monitorName',
  673. align: 'center',
  674. },
  675. {
  676. title: '执行顺序',
  677. dataIndex: 'orderNum',
  678. align: 'center',
  679. },
  680. {
  681. title: '操作',
  682. colSpan: 2,
  683. dataIndex: 'operation',
  684. width: 120,
  685. align: 'center',
  686. },
  687. ];
  688. export const testData = [
  689. {
  690. key: '1',
  691. name: '气源压力超限',
  692. age: 32,
  693. tel: '0571-22098909',
  694. phone: 18889898989,
  695. address: 'New York No. 1 Lake Park',
  696. rowSpan: 1,
  697. colSpan: 1,
  698. },
  699. {
  700. key: '2',
  701. name: '气源压力超限',
  702. tel: '0571-22098333',
  703. phone: 18889898888,
  704. age: 42,
  705. address: 'London No. 1 Lake Park',
  706. rowSpan: 1,
  707. colSpan: 1,
  708. },
  709. {
  710. key: '3',
  711. name: '气源压力超限',
  712. age: 32,
  713. tel: '0575-22098909',
  714. phone: 18900010002,
  715. address: 'Sidney No. 1 Lake Park',
  716. rowSpan: 1,
  717. colSpan: 1,
  718. },
  719. {
  720. key: '4',
  721. name: '气源压力超限',
  722. age: 18,
  723. tel: '0575-22098909',
  724. phone: 18900010002,
  725. address: 'London No. 2 Lake Park',
  726. rowSpan: 1,
  727. colSpan: 1,
  728. },
  729. {
  730. key: '5',
  731. name: '气源压力超限',
  732. age: 18,
  733. tel: '0575-22098909',
  734. phone: 18900010002,
  735. address: 'Dublin No. 2 Lake Park',
  736. rowSpan: 1,
  737. colSpan: 1,
  738. },
  739. ];
  740. export const testData1 = [
  741. {
  742. key: '1',
  743. alarmName: '气源压力超限',
  744. devicePos: 32,
  745. monitorName: '0571-22098909',
  746. value: 18889898989,
  747. orderNum: '1',
  748. updateBy: 'New York No. 1 Lake Park',
  749. },
  750. {
  751. key: '2',
  752. alarmName: '气源压力超限',
  753. devicePos: 42,
  754. monitorName: '0571-22098333',
  755. value: 18889898888,
  756. orderNum: '2',
  757. updateBy: 'London No. 1 Lake Park',
  758. },
  759. {
  760. key: '3',
  761. alarmName: '气源压力超限',
  762. devicePos: 32,
  763. monitorName: '0575-22098909',
  764. value: 18900010002,
  765. orderNum: '3',
  766. updateBy: 'Sidney No. 1 Lake Park',
  767. },
  768. {
  769. key: '4',
  770. alarmName: '气源压力超限',
  771. devicePos: 18,
  772. monitorName: '0575-22098909',
  773. value: 18900010002,
  774. orderNum: '4',
  775. updateBy: 'London No. 2 Lake Park',
  776. },
  777. {
  778. key: '5',
  779. alarmName: '气源压力超限',
  780. devicePos: 18,
  781. monitorName: '0575-22098909',
  782. value: 18900010002,
  783. orderNum: '5',
  784. updateBy: 'Dublin No. 2 Lake Park',
  785. },
  786. {
  787. key: '6',
  788. alarmName: '气源压力超限',
  789. devicePos: 18,
  790. monitorName: '0575-22098909',
  791. value: 18900010002,
  792. orderNum: '5',
  793. updateBy: 'Dublin No. 2 Lake Park',
  794. },
  795. ];
  796. export const modelAlarmFormSchemas = () =>
  797. <FormSchema[]>[
  798. {
  799. label: 'ID',
  800. field: 'id',
  801. component: 'Input',
  802. show: false,
  803. },
  804. {
  805. label: '灾变时过风面积',
  806. field: 'alarmArea',
  807. component: 'InputNumber',
  808. },
  809. {
  810. label: '灾变时状态',
  811. field: 'alarmState',
  812. component: 'Select',
  813. componentProps: {
  814. options: [
  815. {
  816. label: '开启',
  817. value: 1,
  818. },
  819. {
  820. label: '关闭',
  821. value: 0,
  822. },
  823. ],
  824. },
  825. // required: true,
  826. },
  827. {
  828. label: '灾变时动作描述',
  829. field: 'des',
  830. component: 'Input',
  831. },
  832. {
  833. label: '恢复时动作描述',
  834. field: 'des2',
  835. component: 'Input',
  836. },
  837. {
  838. label: '设备类型',
  839. field: 'deviceKind',
  840. component: 'Select',
  841. componentProps: {
  842. options: [
  843. {
  844. label: '风门',
  845. value: 'gate',
  846. },
  847. {
  848. label: '风窗',
  849. value: 'window',
  850. },
  851. {
  852. label: '局部风机',
  853. value: 'fanlocal',
  854. },
  855. {
  856. label: '主风机',
  857. value: 'fanmain',
  858. },
  859. ],
  860. },
  861. // required: true,
  862. },
  863. {
  864. label: '设备名称',
  865. field: 'deviceName',
  866. component: 'Input',
  867. },
  868. {
  869. label: '控制设备ID',
  870. field: 'modelDevId',
  871. component: 'Input',
  872. },
  873. {
  874. label: '最大过风面积',
  875. field: 'maxArea',
  876. component: 'InputNumber',
  877. },
  878. {
  879. label: '正常过风面积',
  880. field: 'normalArea',
  881. component: 'InputNumber',
  882. },
  883. {
  884. label: '正常时状态',
  885. field: 'normalState',
  886. component: 'Select',
  887. componentProps: {
  888. options: [
  889. {
  890. label: '开启',
  891. value: 1,
  892. },
  893. {
  894. label: '关闭',
  895. value: 0,
  896. },
  897. ],
  898. },
  899. // required: true,
  900. },
  901. {
  902. label: '巷道ID',
  903. field: 'tunId',
  904. component: 'Input',
  905. },
  906. {
  907. label: '执行顺序',
  908. field: 'orderNum',
  909. component: 'InputNumber',
  910. },
  911. ];
  912. export const modelAlarmColumns: BasicColumn[] = [
  913. {
  914. title: '序号',
  915. width: 80,
  916. align: 'center',
  917. customRender: ({ index }: { index: number }) => `${index + 1}`,
  918. },
  919. // { dataIndex: 'alarmArea', title: '灾变时过风面积' },
  920. // { dataIndex: 'alarmId', title: '报警条目id' },
  921. // { dataIndex: 'alarmName', title: '预警名称' },
  922. // { dataIndex: 'alarmState', title: '灾变时状态' },
  923. // { dataIndex: 'bpmStatus', title: '审批状态' },
  924. // { dataIndex: 'createBy', title: '创建人' },
  925. // { dataIndex: 'createTime', title: '创建日期' },
  926. // { dataIndex: 'des2', title: '恢复正常时动作描述' },
  927. // { dataIndex: 'deviceId', title: '关联设备id' },
  928. // { dataIndex: 'deviceKind', title: '设备类型' },
  929. { dataIndex: 'deviceName', title: '设备名称' },
  930. { dataIndex: 'maxArea', title: '最大过风面积' },
  931. { dataIndex: 'des', title: '灾变时动作描述' },
  932. // { dataIndex: 'modelDevId', title: '控制设备id' },
  933. // { dataIndex: 'normalArea', title: '正常过风面积' },
  934. // { dataIndex: 'normalState', title: '正常时状态' },
  935. // { dataIndex: 'orderNum', title: '执行顺序' },
  936. // { dataIndex: 'sysId', title: '场景ID' },
  937. // { dataIndex: 'sysName', title: '场景名称' },
  938. // { dataIndex: 'sysOrgCode', title: '所属部门' },
  939. // { dataIndex: 'tunId', title: '巷道id' },
  940. // { dataIndex: 'updateBy', title: '更新人' },
  941. // { dataIndex: 'updateTime', title: '更新日期' },
  942. { dataIndex: 'operation', title: '操作' },
  943. ];
  944. export const ledPlaylistColumns: BasicColumn[] = [
  945. { dataIndex: 'programName', title: '节目标题' },
  946. { dataIndex: 'programContent', title: '节目内容' },
  947. { dataIndex: 'programIndex', title: '节目排序' },
  948. {
  949. dataIndex: 'programType',
  950. title: '节目类别',
  951. format: new Map([
  952. [2, '其他'],
  953. [1, '循环'],
  954. [0, '默认'],
  955. ]),
  956. },
  957. ];
  958. export const ledPlaylistFormSchemas = () =>
  959. <FormSchema[]>[
  960. {
  961. label: 'ID',
  962. field: 'id',
  963. component: 'Input',
  964. show: false,
  965. },
  966. {
  967. label: 'deviceID',
  968. field: 'deviceId',
  969. component: 'Input',
  970. show: false,
  971. },
  972. {
  973. label: '节目标题',
  974. field: 'programName',
  975. component: 'Input',
  976. },
  977. {
  978. label: '节目内容',
  979. field: 'programContent',
  980. component: 'Input',
  981. },
  982. {
  983. label: '节目排序',
  984. field: 'programIndex',
  985. component: 'InputNumber',
  986. },
  987. {
  988. label: '节目类别',
  989. field: 'programType',
  990. component: 'Select',
  991. componentProps: {
  992. options: [
  993. {
  994. label: '其他',
  995. value: 2,
  996. },
  997. {
  998. label: '循环',
  999. value: 1,
  1000. },
  1001. {
  1002. label: '默认',
  1003. value: 0,
  1004. },
  1005. ],
  1006. },
  1007. },
  1008. ];