warning.data.ts 20 KB

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