浏览代码

fix:修改基数回显、输入框最大值限制、标签页图标

aamin 2 年之前
父节点
当前提交
2f20e67ba2
共有 7 个文件被更改,包括 24 次插入15 次删除
  1. 二进制
      public/favicon.ico
  2. 1 1
      public/index.html
  3. 二进制
      public/logo-red.png
  4. 18 6
      src/pages/A2Share/index.tsx
  5. 0 1
      src/pages/A3User/UserAdd/index.tsx
  6. 5 5
      src/pages/A3User/index.module.scss
  7. 0 2
      src/store/action/A2Share.ts

二进制
public/favicon.ico


+ 1 - 1
public/index.html

@@ -2,7 +2,7 @@
 <html lang="zh">
   <head>
     <meta charset="utf-8" />
-    <link rel="icon" href="%PUBLIC_URL%/logo-red.png" />
+    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
     <meta name="theme-color" content="#000000" />
     <meta

二进制
public/logo-red.png


+ 18 - 6
src/pages/A2Share/index.tsx

@@ -11,11 +11,12 @@ function A2Share() {
   const [open, setOpen] = useState(false);
 
   const shareInfo = useSelector((state: RootState) => state.A2Share.shareInfo);
+  const [form] = Form.useForm()
 
   const onFinish = useCallback(
     async (values: any) => {
-      if (values.cardinalNumber) {
-        const res: any = await shareEditAPI(Number(values.cardinalNumber));
+      if (values.pcsShow) {
+        const res: any = await shareEditAPI(Number(values.pcsShow));
         if (res.code === 0) {
           MessageFu.success("编辑成功!");
           dispatch(getShareAPI());
@@ -23,9 +24,18 @@ function A2Share() {
         }
       }
     },
-    [setOpen]
+    [setOpen,dispatch]
   );
 
+  const getshareInfoFu = useCallback(() => {
+    // console.log('fachu',shareInfo);
+    const { pcsShow } = shareInfo;
+    form.setFieldsValue({
+      pcsShow: pcsShow
+    });
+
+  },[shareInfo, form]);
+
   const onFinishFailed = (errorInfo: any) => {
     console.log("Failed:", errorInfo);
   };
@@ -53,6 +63,7 @@ function A2Share() {
             }}
             onClick={() => {
               setOpen(true);
+              getshareInfoFu();
             }}
           >
             修改
@@ -73,6 +84,7 @@ function A2Share() {
         }
       >
         <Form
+          form={form}
           name="basic"
           labelCol={{ span: 5 }}
           onFinish={onFinish}
@@ -81,14 +93,14 @@ function A2Share() {
         >
           <Form.Item
             label="参与者基数"
-            name="cardinalNumber"
+            name="pcsShow"
             style={{ marginTop: "40px" }}
-            rules={[{ message: "请输入参与者基数!" }]}
+            rules={[{ message: "请输入不超过999999999的正整数!" }]}
             getValueFromEvent={(e) =>
               e.target.value.replace(/^(0+)|[^\d]+/g, "")
             }
           >
-            <Input placeholder="请输入正整数,不超过9999999" />
+            <Input maxLength={7} placeholder="请输入正整数,不超过9999999" />
           </Form.Item>
           {/* 确定和取消按钮 */}
           <br />

+ 0 - 1
src/pages/A3User/UserAdd/index.tsx

@@ -9,7 +9,6 @@ import {
   Input,
   Modal,
   Popconfirm,
-  Select,
 } from "antd";
 import React, { useCallback, useEffect, useRef } from "react";
 import { useSelector } from "react-redux";

+ 5 - 5
src/pages/A3User/index.module.scss

@@ -5,13 +5,14 @@
       padding: 15px 20px;
       background-color: #fff;
       box-shadow: 3px 0px 10px 0px #d5d5d9;
-
     }
     .selectBox {
-      
       display: flex;
-      .selectBoxRow{
+      .selectBoxRow {
         margin-right: 30px;
+        @media screen and (max-width: 1717px) {
+          margin-right: 10px;
+        }
       }
     }
     .tableBox {
@@ -28,7 +29,6 @@
         overflow-y: auto !important;
         overflow-y: overlay !important;
 
-
         .ant-table-row {
           .ant-table-cell {
             padding: 10px;
@@ -37,4 +37,4 @@
       }
     }
   }
-}
+}

+ 0 - 2
src/store/action/A2Share.ts

@@ -1,11 +1,9 @@
 import http from "@/utils/http";
 import { AppDispatch } from "..";
-import { ShareDataAPIType } from "@/types";
 /**
  * 获取参与者信息
  */
 export const getShareAPI = () => {
-  console.log('fachu')
   return async (dispatch: AppDispatch) => {
     const res = await http.get("cms/share/detail");
     if (res.code === 0) {