warning.data.ts 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158
  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 workFaceWarningFormSchemasLeather: FormSchema[] = [
  296. {
  297. label: 'ID',
  298. field: 'id',
  299. component: 'Input',
  300. show: false,
  301. },
  302. {
  303. label: '预警名称',
  304. field: 'alarmName',
  305. component: 'Input',
  306. required: true,
  307. },
  308. {
  309. label: '预警类型',
  310. field: 'alarmType',
  311. component: 'JDictSelectTag',
  312. componentProps: { dictCode: 'alarmType' },
  313. },
  314. {
  315. label: '预警等级',
  316. field: 'alarmLevel',
  317. component: 'JDictSelectTag',
  318. componentProps: { dictCode: 'leveltype', stringToNumber: true },
  319. required: true,
  320. },
  321. {
  322. label: '分区数',
  323. field: 'partNum',
  324. component: 'Input',
  325. },
  326. {
  327. label: '处理意见',
  328. field: 'dealOpinion',
  329. component: 'Input',
  330. defaultValue: '立即检查该区域设备,启动应急预案。',
  331. },
  332. {
  333. label: '所属系统',
  334. field: 'systemType',
  335. component: 'JDictSelectTag',
  336. componentProps: { dictCode: 'kindtype' },
  337. },
  338. ];
  339. export const deviceFormColumns: FormSchema[] = [
  340. {
  341. label: '设备类型',
  342. field: 'deviceType',
  343. component: 'MTreeSelect',
  344. componentProps: {
  345. isSearch: false,
  346. },
  347. colProps: { span: 12 },
  348. },
  349. {
  350. label: '报警上限值',
  351. field: 'fmax',
  352. component: 'InputNumber',
  353. colProps: { span: 12 },
  354. },
  355. {
  356. label: '报警下限值',
  357. field: 'fmin',
  358. component: 'InputNumber',
  359. colProps: { span: 12 },
  360. },
  361. {
  362. label: '报警持续时间(s)',
  363. field: 'cxTime',
  364. component: 'InputNumber',
  365. colProps: { span: 12 },
  366. },
  367. {
  368. label: '数据趋势',
  369. field: 'dataTrend',
  370. component: 'JDictSelectTag',
  371. componentProps: {
  372. dictCode: 'dataTrend',
  373. placeholder: '请选择数据趋势',
  374. },
  375. colProps: { span: 12 },
  376. },
  377. {
  378. label: '数据趋势持续时间(h)',
  379. field: 'trendCxTime',
  380. component: 'InputNumber',
  381. colProps: { span: 12 },
  382. },
  383. ];
  384. export const deviceControlColumns: FormSchema[] = [
  385. {
  386. label: '设备类型',
  387. field: 'deviceType',
  388. component: 'MTreeSelect',
  389. componentProps: {
  390. isSearch: false,
  391. },
  392. colProps: { span: 12 },
  393. },
  394. {
  395. label: '值',
  396. field: 'value',
  397. component: 'Input',
  398. colProps: { span: 12 },
  399. },
  400. {
  401. label: '执行顺序',
  402. field: 'orderNum',
  403. component: 'InputNumber',
  404. colProps: { span: 12 },
  405. },
  406. {
  407. label: '操作描述',
  408. field: 'remark',
  409. component: 'Input',
  410. colProps: { span: 12 },
  411. },
  412. ];
  413. export const manageWarningPointColumns: BasicColumn[] = [
  414. {
  415. title: '设备名称',
  416. dataIndex: 'deviceName',
  417. align: 'center',
  418. },
  419. {
  420. title: '报警条目',
  421. dataIndex: 'alarmName_dictText',
  422. align: 'center',
  423. },
  424. {
  425. title: '报警下限',
  426. dataIndex: 'fmin',
  427. align: 'center',
  428. edit: true,
  429. editComponent: 'InputNumber',
  430. },
  431. {
  432. title: '报警上限',
  433. dataIndex: 'fmax',
  434. align: 'center',
  435. edit: true,
  436. editComponent: 'InputNumber',
  437. },
  438. {
  439. title: '报警持续时间(s)',
  440. dataIndex: 'cxTime',
  441. align: 'center',
  442. edit: true,
  443. editComponent: 'InputNumber',
  444. },
  445. {
  446. title: '更新人',
  447. dataIndex: 'updateBy',
  448. align: 'center',
  449. width: 100,
  450. },
  451. ];
  452. export const controlFormSchemas = (param) =>
  453. <FormSchema[]>[
  454. {
  455. label: 'ID',
  456. field: 'id',
  457. component: 'Input',
  458. show: false,
  459. },
  460. {
  461. label: '点表',
  462. field: 'strtype',
  463. component: 'Input',
  464. show: false,
  465. },
  466. {
  467. label: '设备名称',
  468. field: 'deviceId',
  469. component: 'ApiSelect',
  470. required: true,
  471. componentProps: ({ formModel }) => {
  472. return {
  473. api: workFaceDeviceList.bind(null, param),
  474. labelField: 'strname',
  475. valueField: 'id',
  476. onChange: (e, option) => {
  477. if (option) formModel['strtype'] = option['strtype'];
  478. },
  479. };
  480. },
  481. },
  482. {
  483. label: '点位',
  484. field: 'monitorId',
  485. component: 'Select',
  486. slot: 'monitor',
  487. required: true,
  488. },
  489. {
  490. label: '值',
  491. field: 'value',
  492. component: 'Input',
  493. align: 'center',
  494. },
  495. {
  496. label: '执行顺序',
  497. field: 'orderNum',
  498. component: 'InputNumber',
  499. },
  500. {
  501. label: '操作描述',
  502. field: 'remark',
  503. component: 'Input',
  504. },
  505. ];
  506. export const controlDevicePointColumns: BasicColumn[] = [
  507. {
  508. title: '报警条目',
  509. dataIndex: 'alarmName',
  510. align: 'center',
  511. },
  512. {
  513. title: '设备安装位置',
  514. dataIndex: 'devicePos',
  515. align: 'center',
  516. },
  517. {
  518. title: '控制点位描述',
  519. dataIndex: 'monitorName',
  520. align: 'center',
  521. },
  522. {
  523. title: '值',
  524. dataIndex: 'value',
  525. align: 'center',
  526. },
  527. // {
  528. // title: '审批状态',
  529. // dataIndex: 'bpmStatus',
  530. // align: 'center',
  531. // edit: true,
  532. // editComponent: 'Select',
  533. // editComponentProps: {
  534. // options: [
  535. // {
  536. // label: '审批',
  537. // value: '1',
  538. // },
  539. // {
  540. // label: '不审批',
  541. // value: '0',
  542. // },
  543. // ],
  544. // },
  545. // },
  546. {
  547. title: '执行顺序',
  548. dataIndex: 'orderNum',
  549. align: 'center',
  550. },
  551. {
  552. title: '更新人',
  553. dataIndex: 'updateBy',
  554. align: 'center',
  555. width: 100,
  556. },
  557. {
  558. title: '操作',
  559. dataIndex: 'operation',
  560. width: 100,
  561. },
  562. ];
  563. export const monitorWarningFormSchemas = (param) =>
  564. <FormSchema[]>[
  565. {
  566. label: 'ID',
  567. field: 'id',
  568. component: 'Input',
  569. show: false,
  570. },
  571. {
  572. label: 'deviceType',
  573. field: 'deviceType',
  574. component: 'Input',
  575. show: false,
  576. },
  577. {
  578. label: '点表',
  579. field: 'strtype',
  580. component: 'Input',
  581. show: false,
  582. },
  583. {
  584. label: '设备名称',
  585. field: 'deviceId',
  586. component: 'ApiSelect',
  587. required: true,
  588. componentProps: ({ formModel }) => {
  589. return {
  590. api: workFaceDeviceList.bind(null, param),
  591. labelField: 'strname',
  592. valueField: 'id',
  593. onChange: (e, option) => {
  594. if (option) formModel['strtype'] = option['strtype'];
  595. },
  596. };
  597. },
  598. },
  599. {
  600. label: '且关系关联id',
  601. field: 'relId',
  602. component: 'Input',
  603. show: false,
  604. },
  605. {
  606. label: '点位',
  607. field: 'monitorId',
  608. component: 'Select',
  609. slot: 'monitor',
  610. // required: true,
  611. },
  612. {
  613. label: '报警上限值',
  614. field: 'fmax',
  615. component: 'InputNumber',
  616. },
  617. {
  618. label: '报警下限值',
  619. field: 'fmin',
  620. component: 'InputNumber',
  621. },
  622. {
  623. label: '报警持续时间(s)',
  624. field: 'cxTime',
  625. component: 'InputNumber',
  626. },
  627. {
  628. label: '数据趋势',
  629. field: 'dataTrend',
  630. component: 'JDictSelectTag',
  631. componentProps: {
  632. dictCode: 'dataTrend',
  633. placeholder: '请选择数据趋势',
  634. },
  635. },
  636. {
  637. label: '数据趋势持续时间(h)',
  638. field: 'trendCxTime',
  639. component: 'InputNumber',
  640. },
  641. ];
  642. export const controlWarningFormSchemas: FormSchema[] = [
  643. {
  644. label: 'ID',
  645. field: 'id',
  646. component: 'Input',
  647. show: false,
  648. },
  649. {
  650. label: '设备名称',
  651. field: 'deviceName',
  652. component: 'Input',
  653. required: true,
  654. },
  655. {
  656. label: '控制点位描述',
  657. field: 'monitorName',
  658. component: 'Input',
  659. },
  660. {
  661. label: '值',
  662. field: 'value',
  663. component: 'Input',
  664. },
  665. {
  666. label: '执行顺序',
  667. field: 'orderNum',
  668. component: 'Input',
  669. },
  670. ];
  671. export const BackWindDevicePointColumns: BasicColumn[] = [
  672. {
  673. title: '设备名称',
  674. dataIndex: 'deviceName',
  675. align: 'center',
  676. },
  677. {
  678. title: '设备安装位置',
  679. dataIndex: 'devicePos',
  680. align: 'center',
  681. },
  682. {
  683. title: '控制点位描述',
  684. dataIndex: 'monitorName',
  685. align: 'center',
  686. },
  687. {
  688. title: '值',
  689. dataIndex: 'value',
  690. edit: true,
  691. editComponent: 'Input',
  692. align: 'center',
  693. },
  694. // {
  695. // title: '审批状态',
  696. // dataIndex: 'bpmStatus',
  697. // align: 'center',
  698. // edit: true,
  699. // editComponent: 'Select',
  700. // editComponentProps: {
  701. // options: [
  702. // {
  703. // label: '审批',
  704. // value: '1',
  705. // },
  706. // {
  707. // label: '不审批',
  708. // value: '0',
  709. // },
  710. // ],
  711. // },
  712. // },
  713. {
  714. title: '执行顺序',
  715. dataIndex: 'orderNum',
  716. align: 'center',
  717. edit: true,
  718. editComponent: 'InputNumber',
  719. },
  720. {
  721. title: '更新人',
  722. dataIndex: 'updateBy',
  723. align: 'center',
  724. width: 100,
  725. },
  726. ];
  727. export const rowOrColSpanMap = new Map();
  728. const sharedOnCell = (record, rowIndex, column) => {
  729. const arr = rowOrColSpanMap.get(record.id);
  730. if (arr) {
  731. const col = arr.find((item) => {
  732. return item.code === column.dataIndex;
  733. });
  734. if (col) return { rowSpan: col.rowSpan, colSpan: col.colSpan };
  735. }
  736. };
  737. export const MonitorColumns: TableColumnType[] = [
  738. {
  739. title: '组合',
  740. dataIndex: 'key',
  741. customCell: sharedOnCell,
  742. },
  743. {
  744. title: '预警名称',
  745. dataIndex: 'alarmName',
  746. customCell: sharedOnCell,
  747. },
  748. {
  749. title: '设备名称',
  750. dataIndex: 'deviceName',
  751. customCell: sharedOnCell,
  752. },
  753. {
  754. title: '监测点位',
  755. dataIndex: 'monitorName',
  756. customCell: sharedOnCell,
  757. },
  758. {
  759. title: '报警下限值',
  760. dataIndex: 'fmin',
  761. customCell: sharedOnCell,
  762. },
  763. {
  764. title: '报警上限值',
  765. dataIndex: 'fmax',
  766. customCell: sharedOnCell,
  767. },
  768. {
  769. title: '报警持续时间',
  770. dataIndex: 'cxTime',
  771. customCell: sharedOnCell,
  772. },
  773. {
  774. title: '操作',
  775. colSpan: 2,
  776. dataIndex: 'operation',
  777. width: 120,
  778. customCell: sharedOnCell,
  779. },
  780. {
  781. title: '操作',
  782. colSpan: 0,
  783. dataIndex: 'operation1',
  784. width: 80,
  785. customCell: sharedOnCell,
  786. },
  787. ];
  788. export const controlColumns: TableColumnType[] = [
  789. {
  790. title: '预警名称',
  791. dataIndex: 'alarmName',
  792. align: 'center',
  793. },
  794. {
  795. title: '设备名称',
  796. dataIndex: 'deviceName',
  797. align: 'center',
  798. },
  799. {
  800. title: '控制点位',
  801. dataIndex: 'monitorName',
  802. align: 'center',
  803. },
  804. {
  805. title: '执行顺序',
  806. dataIndex: 'orderNum',
  807. align: 'center',
  808. },
  809. {
  810. title: '操作',
  811. colSpan: 2,
  812. dataIndex: 'operation',
  813. width: 120,
  814. align: 'center',
  815. },
  816. ];
  817. export const testData = [
  818. {
  819. key: '1',
  820. name: '气源压力超限',
  821. age: 32,
  822. tel: '0571-22098909',
  823. phone: 18889898989,
  824. address: 'New York No. 1 Lake Park',
  825. rowSpan: 1,
  826. colSpan: 1,
  827. },
  828. {
  829. key: '2',
  830. name: '气源压力超限',
  831. tel: '0571-22098333',
  832. phone: 18889898888,
  833. age: 42,
  834. address: 'London No. 1 Lake Park',
  835. rowSpan: 1,
  836. colSpan: 1,
  837. },
  838. {
  839. key: '3',
  840. name: '气源压力超限',
  841. age: 32,
  842. tel: '0575-22098909',
  843. phone: 18900010002,
  844. address: 'Sidney No. 1 Lake Park',
  845. rowSpan: 1,
  846. colSpan: 1,
  847. },
  848. {
  849. key: '4',
  850. name: '气源压力超限',
  851. age: 18,
  852. tel: '0575-22098909',
  853. phone: 18900010002,
  854. address: 'London No. 2 Lake Park',
  855. rowSpan: 1,
  856. colSpan: 1,
  857. },
  858. {
  859. key: '5',
  860. name: '气源压力超限',
  861. age: 18,
  862. tel: '0575-22098909',
  863. phone: 18900010002,
  864. address: 'Dublin No. 2 Lake Park',
  865. rowSpan: 1,
  866. colSpan: 1,
  867. },
  868. ];
  869. export const testData1 = [
  870. {
  871. key: '1',
  872. alarmName: '气源压力超限',
  873. devicePos: 32,
  874. monitorName: '0571-22098909',
  875. value: 18889898989,
  876. orderNum: '1',
  877. updateBy: 'New York No. 1 Lake Park',
  878. },
  879. {
  880. key: '2',
  881. alarmName: '气源压力超限',
  882. devicePos: 42,
  883. monitorName: '0571-22098333',
  884. value: 18889898888,
  885. orderNum: '2',
  886. updateBy: 'London No. 1 Lake Park',
  887. },
  888. {
  889. key: '3',
  890. alarmName: '气源压力超限',
  891. devicePos: 32,
  892. monitorName: '0575-22098909',
  893. value: 18900010002,
  894. orderNum: '3',
  895. updateBy: 'Sidney No. 1 Lake Park',
  896. },
  897. {
  898. key: '4',
  899. alarmName: '气源压力超限',
  900. devicePos: 18,
  901. monitorName: '0575-22098909',
  902. value: 18900010002,
  903. orderNum: '4',
  904. updateBy: 'London No. 2 Lake Park',
  905. },
  906. {
  907. key: '5',
  908. alarmName: '气源压力超限',
  909. devicePos: 18,
  910. monitorName: '0575-22098909',
  911. value: 18900010002,
  912. orderNum: '5',
  913. updateBy: 'Dublin No. 2 Lake Park',
  914. },
  915. {
  916. key: '6',
  917. alarmName: '气源压力超限',
  918. devicePos: 18,
  919. monitorName: '0575-22098909',
  920. value: 18900010002,
  921. orderNum: '5',
  922. updateBy: 'Dublin No. 2 Lake Park',
  923. },
  924. ];
  925. export const modelAlarmFormSchemas = () =>
  926. <FormSchema[]>[
  927. {
  928. label: 'ID',
  929. field: 'id',
  930. component: 'Input',
  931. show: false,
  932. },
  933. {
  934. label: '灾变时过风面积',
  935. field: 'alarmArea',
  936. component: 'InputNumber',
  937. },
  938. {
  939. label: '灾变时状态',
  940. field: 'alarmState',
  941. component: 'Select',
  942. componentProps: {
  943. options: [
  944. {
  945. label: '开启',
  946. value: 1,
  947. },
  948. {
  949. label: '关闭',
  950. value: 0,
  951. },
  952. ],
  953. },
  954. // required: true,
  955. },
  956. {
  957. label: '灾变时动作描述',
  958. field: 'des',
  959. component: 'Input',
  960. },
  961. {
  962. label: '恢复时动作描述',
  963. field: 'des2',
  964. component: 'Input',
  965. },
  966. {
  967. label: '设备类型',
  968. field: 'deviceKind',
  969. component: 'Select',
  970. componentProps: {
  971. options: [
  972. {
  973. label: '风门',
  974. value: 'gate',
  975. },
  976. {
  977. label: '风窗',
  978. value: 'window',
  979. },
  980. {
  981. label: '局部风机',
  982. value: 'fanlocal',
  983. },
  984. {
  985. label: '主风机',
  986. value: 'fanmain',
  987. },
  988. ],
  989. },
  990. // required: true,
  991. },
  992. {
  993. label: '设备名称',
  994. field: 'deviceName',
  995. component: 'Input',
  996. },
  997. {
  998. label: '控制设备ID',
  999. field: 'modelDevId',
  1000. component: 'Input',
  1001. },
  1002. {
  1003. label: '最大过风面积',
  1004. field: 'maxArea',
  1005. component: 'InputNumber',
  1006. },
  1007. {
  1008. label: '正常过风面积',
  1009. field: 'normalArea',
  1010. component: 'InputNumber',
  1011. },
  1012. {
  1013. label: '正常时状态',
  1014. field: 'normalState',
  1015. component: 'Select',
  1016. componentProps: {
  1017. options: [
  1018. {
  1019. label: '开启',
  1020. value: 1,
  1021. },
  1022. {
  1023. label: '关闭',
  1024. value: 0,
  1025. },
  1026. ],
  1027. },
  1028. // required: true,
  1029. },
  1030. {
  1031. label: '巷道ID',
  1032. field: 'tunId',
  1033. component: 'Input',
  1034. },
  1035. {
  1036. label: '执行顺序',
  1037. field: 'orderNum',
  1038. component: 'InputNumber',
  1039. },
  1040. ];
  1041. export const modelAlarmColumns: BasicColumn[] = [
  1042. {
  1043. title: '序号',
  1044. width: 80,
  1045. align: 'center',
  1046. customRender: ({ index }: { index: number }) => `${index + 1}`,
  1047. },
  1048. // { dataIndex: 'alarmArea', title: '灾变时过风面积' },
  1049. // { dataIndex: 'alarmId', title: '报警条目id' },
  1050. // { dataIndex: 'alarmName', title: '预警名称' },
  1051. // { dataIndex: 'alarmState', title: '灾变时状态' },
  1052. // { dataIndex: 'bpmStatus', title: '审批状态' },
  1053. // { dataIndex: 'createBy', title: '创建人' },
  1054. // { dataIndex: 'createTime', title: '创建日期' },
  1055. // { dataIndex: 'des2', title: '恢复正常时动作描述' },
  1056. // { dataIndex: 'deviceId', title: '关联设备id' },
  1057. // { dataIndex: 'deviceKind', title: '设备类型' },
  1058. { dataIndex: 'deviceName', title: '设备名称' },
  1059. { dataIndex: 'maxArea', title: '最大过风面积' },
  1060. { dataIndex: 'des', title: '灾变时动作描述' },
  1061. // { dataIndex: 'modelDevId', title: '控制设备id' },
  1062. // { dataIndex: 'normalArea', title: '正常过风面积' },
  1063. // { dataIndex: 'normalState', title: '正常时状态' },
  1064. // { dataIndex: 'orderNum', title: '执行顺序' },
  1065. // { dataIndex: 'sysId', title: '场景ID' },
  1066. // { dataIndex: 'sysName', title: '场景名称' },
  1067. // { dataIndex: 'sysOrgCode', title: '所属部门' },
  1068. // { dataIndex: 'tunId', title: '巷道id' },
  1069. // { dataIndex: 'updateBy', title: '更新人' },
  1070. // { dataIndex: 'updateTime', title: '更新日期' },
  1071. { dataIndex: 'operation', title: '操作' },
  1072. ];
  1073. export const ledPlaylistColumns: BasicColumn[] = [
  1074. { dataIndex: 'programName', title: '节目标题' },
  1075. { dataIndex: 'programContent', title: '节目内容' },
  1076. { dataIndex: 'programIndex', title: '节目排序' },
  1077. {
  1078. dataIndex: 'programType',
  1079. title: '节目类别',
  1080. format: new Map([
  1081. [2, '其他'],
  1082. [1, '循环'],
  1083. [0, '默认'],
  1084. ]),
  1085. },
  1086. ];
  1087. export const ledPlaylistFormSchemas = () =>
  1088. <FormSchema[]>[
  1089. {
  1090. label: 'ID',
  1091. field: 'id',
  1092. component: 'Input',
  1093. show: false,
  1094. },
  1095. {
  1096. label: 'deviceID',
  1097. field: 'deviceId',
  1098. component: 'Input',
  1099. show: false,
  1100. },
  1101. {
  1102. label: '节目标题',
  1103. field: 'programName',
  1104. component: 'Input',
  1105. },
  1106. {
  1107. label: '节目内容',
  1108. field: 'programContent',
  1109. component: 'Input',
  1110. },
  1111. {
  1112. label: '节目排序',
  1113. field: 'programIndex',
  1114. component: 'InputNumber',
  1115. },
  1116. {
  1117. label: '节目类别',
  1118. field: 'programType',
  1119. component: 'Select',
  1120. componentProps: {
  1121. options: [
  1122. {
  1123. label: '其他',
  1124. value: 2,
  1125. },
  1126. {
  1127. label: '循环',
  1128. value: 1,
  1129. },
  1130. {
  1131. label: '默认',
  1132. value: 0,
  1133. },
  1134. ],
  1135. },
  1136. },
  1137. ];