warning.data.ts 20 KB

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