You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.9 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. import { Button, Checkbox, CheckboxProps, Radio, RadioChangeEvent } from "antd";
  2. import { useState } from "react";
  3. import { useNavigate } from "react-router";
  4. import GridLayer from "./graph/GridLayer";
  5. import StandardLayer from "./graph/StandardLayer";
  6. export default function MeasureAction() {
  7. const navigate = useNavigate();
  8. const [sideVal, setSideVal] = useState<1 | 2>(1);
  9. const onSideChange = (e: RadioChangeEvent) => {
  10. setSideVal(e.target.value);
  11. };
  12. const onAfterSaveChange: CheckboxProps["onChange"] = e => {
  13. console.log(`checked = ${e.target.checked}`);
  14. };
  15. const onAnalysisBtnClick = () => {
  16. navigate("../detail");
  17. };
  18. return (
  19. <div className="flex h-full ">
  20. <div className="flex-none border relative">
  21. <GridLayer width={840} height={600} leftPadding={30} rightPadding={10} topPadding={10} bottomPadding={30} columns={10} rows={7} cellNum={10} />
  22. <div className="absolute top-0">
  23. <StandardLayer width={840} height={600} leftPadding={30} rightPadding={10} topPadding={10} bottomPadding={30} />
  24. </div>
  25. </div>
  26. <div className="w-[300px] flex-none py-6">
  27. <h1 className="font-medium text-xl text-center"></h1>
  28. <section className="flex flex-col items-center gap-4 mt-6 border-t border-[#D8D8D8] py-4">
  29. <Radio.Group
  30. value={sideVal}
  31. onChange={onSideChange}
  32. options={[
  33. { value: 1, label: "测量左侧" },
  34. { value: 2, label: "测量右侧" },
  35. ]}
  36. />
  37. <Button style={{ width: 200 }} size="large" type="primary">
  38. </Button>
  39. <Button style={{ width: 200 }} size="large" type="primary" onClick={onAnalysisBtnClick}>
  40. </Button>
  41. <Button style={{ width: 200 }} size="large" type="primary">
  42. </Button>
  43. <Checkbox onChange={onAfterSaveChange}></Checkbox>
  44. </section>
  45. </div>
  46. </div>
  47. );
  48. }