App.jsx 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import React, { useEffect, useMemo, useState, useRef } from "react";
  2. import Alarm from "./entry";
  3. function Home(props) {
  4. const compRef = useRef(null);
  5. const [open, setOpen] = useState(true);
  6. return (
  7. <>
  8. {/* <div style={{ padding: "0px 30px" }}>
  9. <Alarm.ComplexConfig ref={compRef} editId={-1}></Alarm.ComplexConfig>
  10. </div> */}
  11. {/* <Alarm.DetailModal
  12. open={open}
  13. onCancel={() => setOpen(false)}
  14. options={{
  15. group: null?.filter((item) => item !== "diagram") ?? null,
  16. }}
  17. noSettings
  18. // options={{
  19. // detail: {
  20. // id: 275575,
  21. // name: "测试",
  22. // rule_id: 69,
  23. // type: 1,
  24. // sub_type: 13,
  25. // status: 1,
  26. // point_id: "",
  27. // point_name: "",
  28. // alarm_level: 1,
  29. // op_status: 1,
  30. // created_time: "2024-09-25 15:06:00",
  31. // duration: 1704255,
  32. // confirmed_time: "2024-09-25 16:03:15",
  33. // confirmed_oper_id: 14,
  34. // confirmed_oper_name: "郭红阳",
  35. // recovery_time: "",
  36. // remark: "ccc",
  37. // value: 0,
  38. // unit: "",
  39. // group_name: "",
  40. // },
  41. // }}
  42. // // options={{
  43. // // pointId: "ABC123_AAA_chr1_AEff_MIN_H",
  44. // // }}
  45. ></Alarm.DetailModal> */}
  46. {/* <Alarm.ComplexConfig
  47. ref={compRef}
  48. editId={-1}
  49. showList
  50. ></Alarm.ComplexConfig>
  51. <button onClick={() => compRef?.current?.ok()}>测试</button> */}
  52. {/* <div style={{ padding: 30 }}>
  53. <Alarm.EasyConfig
  54. ref={compRef}
  55. // pointId="ZWB_ALARM_chr_2_AQ"
  56. // readonly
  57. editId={-1}
  58. ></Alarm.EasyConfig>
  59. </div> */}
  60. <Alarm.ComplexConfig
  61. style={{ paddingTop: 50 }}
  62. ref={compRef}
  63. editId={props.ruleId}
  64. groupList={[]}
  65. showList={true}
  66. formula="([CAR_PID_Ki]+[CAR_PID_Ki])/[CSZ_1_AF]"
  67. ></Alarm.ComplexConfig>
  68. {/* <Alarm.TopoDetailModal
  69. id={690384}
  70. alarmTime="2025-06-17 00:00:00"
  71. open={true}
  72. onCancel={() => {}}
  73. /> */}
  74. </>
  75. );
  76. }
  77. export default Home;