warning.data.ts 24 KB

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