warning.data.ts 20 KB

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