warning.data.ts 21 KB

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