|
@@ -0,0 +1,148 @@
|
|
|
+import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
|
+import styles from "./index.module.scss";
|
|
|
+import { Button, Input } from "antd";
|
|
|
+import { useDispatch } from "react-redux";
|
|
|
+function A6_1ques() {
|
|
|
+ const dispatch = useDispatch();
|
|
|
+
|
|
|
+ const [fromData, setFromData] = useState({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ searchKey: "",
|
|
|
+ });
|
|
|
+
|
|
|
+ const getListFu = useCallback(() => {
|
|
|
+ // dispatch(A4_APIgetList(fromData));
|
|
|
+ console.log(123);
|
|
|
+ }, []);
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ getListFu();
|
|
|
+ }, [getListFu]);
|
|
|
+
|
|
|
+ const [inputKey, setInputKey] = useState(1);
|
|
|
+
|
|
|
+ // 标题的输入
|
|
|
+ const timeRef = useRef(-1);
|
|
|
+ const fromKeyChangeFu = useCallback(
|
|
|
+ (e: React.ChangeEvent<HTMLInputElement>, key: "searchKey") => {
|
|
|
+ clearTimeout(timeRef.current);
|
|
|
+ timeRef.current = window.setTimeout(() => {
|
|
|
+ setFromData({ ...fromData, [key]: e.target.value, pageNum: 1 });
|
|
|
+ }, 500);
|
|
|
+ },
|
|
|
+ [fromData]
|
|
|
+ );
|
|
|
+
|
|
|
+ // 点击重置
|
|
|
+ const resetSelectFu = useCallback(() => {
|
|
|
+ setInputKey(Date.now());
|
|
|
+ setFromData({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ searchKey: "",
|
|
|
+ });
|
|
|
+ }, []);
|
|
|
+
|
|
|
+ // 点击新增和编辑
|
|
|
+ const [addId, setAddId] = useState(0);
|
|
|
+
|
|
|
+ return (
|
|
|
+ <div className={styles.A6_1ques}>
|
|
|
+ <div className="pageTitle">问卷管理</div>
|
|
|
+
|
|
|
+ {/* 顶部筛选 */}
|
|
|
+ <div className="A6_1top">
|
|
|
+ <div>
|
|
|
+ <span>搜索项:</span>
|
|
|
+ <Input
|
|
|
+ key={inputKey}
|
|
|
+ maxLength={50}
|
|
|
+ style={{ width: 300 }}
|
|
|
+ placeholder="请输入名称"
|
|
|
+ allowClear
|
|
|
+ onChange={(e) => fromKeyChangeFu(e, "searchKey")}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <Button onClick={resetSelectFu}>重置</Button>
|
|
|
+   
|
|
|
+ <Button type="primary" onClick={() => setAddId(-1)}>
|
|
|
+ 新增
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ {/* 表格主体 */}
|
|
|
+ <div className="A6_1tableBox">
|
|
|
+ <img
|
|
|
+ src="https://sit-chaozhoubwg.4dage.com/poster/tab2Poster/thumb/20240129_1114311892.jpg"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+ <h1>9999999999</h1>
|
|
|
+
|
|
|
+ <img
|
|
|
+ src="https://sit-chaozhoubwg.4dage.com/exhibition/img/1.jpg"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+
|
|
|
+ {/* <MyTable
|
|
|
+ yHeight={625}
|
|
|
+ list={tableInfo.list}
|
|
|
+ columnsTemp={A4tableC}
|
|
|
+ lastBtn={tableLastBtn}
|
|
|
+ pageNum={fromData.pageNum}
|
|
|
+ pageSize={fromData.pageSize}
|
|
|
+ total={tableInfo.total}
|
|
|
+ onChange={(pageNum, pageSize) =>
|
|
|
+ setFromData({ ...fromData, pageNum, pageSize })
|
|
|
+ }
|
|
|
+ /> */}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
+const MemoA6_1ques = React.memo(A6_1ques);
|
|
|
+
|
|
|
+export default MemoA6_1ques;
|