shaogen1995 2 年之前
父節點
當前提交
2e89f9d124

+ 1 - 1
public/myEnv.js

@@ -1,5 +1,5 @@
 // 四维 千寻
 // 四维 千寻
-const envTxt = '千寻'
+const envTxt = '四维'
 
 
 // 动态插入
 // 动态插入
 const faviconurl = `./favicon${envTxt === '千寻' ? '2' : ''}.ico`;//这里可以是动态的获取的favicon的地址                      
 const faviconurl = `./favicon${envTxt === '千寻' ? '2' : ''}.ico`;//这里可以是动态的获取的favicon的地址                      

+ 8 - 0
src/assets/styles/base.css

@@ -154,6 +154,14 @@ textarea {
   display: flex;
   display: flex;
   justify-content: flex-start;
   justify-content: flex-start;
 }
 }
+#root .tableNumBox {
+  position: absolute;
+  bottom: 20px;
+  right: 20px;
+}
+#root .tableNumBox > span {
+  color: var(--themeColor);
+}
 [hidden] {
 [hidden] {
   display: none !important;
   display: none !important;
 }
 }

+ 11 - 0
src/assets/styles/base.less

@@ -211,6 +211,17 @@ textarea {
     }
     }
   }
   }
 
 
+  
+  .tableNumBox {
+    position: absolute;
+    bottom: 20px;
+    right: 20px;
+
+    &>span {
+      color: var(--themeColor);
+    }
+  }
+
 
 
 }
 }
 
 

+ 9 - 1
src/pages/A1Camera/index.tsx

@@ -248,7 +248,10 @@ function A1Camera() {
 
 
   return (
   return (
     <div className={styles.A1Camera}>
     <div className={styles.A1Camera}>
-      <div className="pageTitle">{leftTitle}{logSn?' - 领用记录':''}</div>
+      <div className="pageTitle">
+        {leftTitle}
+        {logSn ? " - 领用记录" : ""}
+      </div>
       {/* 顶部筛选 */}
       {/* 顶部筛选 */}
       <div className="A1top">
       <div className="A1top">
         {/* 左侧输入框 */}
         {/* 左侧输入框 */}
@@ -347,6 +350,11 @@ function A1Camera() {
 
 
       {/* 领用记录 */}
       {/* 领用记录 */}
       {logSn ? <LogCamera logSn={logSn} closeFu={() => setLogSn("")} /> : null}
       {logSn ? <LogCamera logSn={logSn} closeFu={() => setLogSn("")} /> : null}
+
+      {/*  右下角的列表数量 */}
+      <div className="tableNumBox">
+        共 <span>{A1TableList.total}</span> 条数据
+      </div>
     </div>
     </div>
   );
   );
 }
 }

+ 6 - 4
src/pages/A2Psychz/AddPsychz/index.tsx

@@ -16,7 +16,6 @@ import {
   Select,
   Select,
 } from "antd";
 } from "antd";
 import { A1addType } from "@/pages/A1Camera/data";
 import { A1addType } from "@/pages/A1Camera/data";
-import mapDataAll from "@/pages/C1User/AddUser/city";
 import { MinusCircleOutlined, PlusCircleOutlined } from "@ant-design/icons";
 import { MinusCircleOutlined, PlusCircleOutlined } from "@ant-design/icons";
 import classNames from "classnames";
 import classNames from "classnames";
 import { useDispatch, useSelector } from "react-redux";
 import { useDispatch, useSelector } from "react-redux";
@@ -26,6 +25,7 @@ import { A2_APIadd, A2_APIgetInfo } from "@/store/action/A2Psychz";
 import { MessageFu } from "@/utils/message";
 import { MessageFu } from "@/utils/message";
 import { getTokenInfo } from "@/utils/storage";
 import { getTokenInfo } from "@/utils/storage";
 import TextArea from "antd/es/input/TextArea";
 import TextArea from "antd/es/input/TextArea";
+import { mapDataAll1 } from "@/pages/C1User/AddUser/city";
 
 
 type Props = {
 type Props = {
   openInfo: A1addType;
   openInfo: A1addType;
@@ -43,7 +43,8 @@ function AddPsychz({ openInfo, closeFu, upTableFu, addTableFu }: Props) {
     if (res.code === 0) {
     if (res.code === 0) {
       const data = res.data;
       const data = res.data;
       let cityBase: null | string[] = null;
       let cityBase: null | string[] = null;
-      if (data.province && data.city) cityBase = [data.province, data.city];
+      if (data.province && data.city && data.region)
+        cityBase = [data.province, data.city, data.region];
       FormBoxRef.current?.setFieldsValue({
       FormBoxRef.current?.setFieldsValue({
         ...data,
         ...data,
         cityBase,
         cityBase,
@@ -92,6 +93,7 @@ function AddPsychz({ openInfo, closeFu, upTableFu, addTableFu }: Props) {
         id: openInfo.txt === "新增" ? null : openInfo.id,
         id: openInfo.txt === "新增" ? null : openInfo.id,
         province: value.cityBase ? value.cityBase[0] : null,
         province: value.cityBase ? value.cityBase[0] : null,
         city: value.cityBase ? value.cityBase[1] : null,
         city: value.cityBase ? value.cityBase[1] : null,
+        region: value.cityBase ? value.cityBase[2] : null,
         typeIn: "pc",
         typeIn: "pc",
         roomNum: roomList,
         roomNum: roomList,
       };
       };
@@ -147,7 +149,7 @@ function AddPsychz({ openInfo, closeFu, upTableFu, addTableFu }: Props) {
           <Form.Item label="站址地区" name="cityBase">
           <Form.Item label="站址地区" name="cityBase">
             <Cascader
             <Cascader
               style={{ width: 300 }}
               style={{ width: 300 }}
-              options={mapDataAll}
+              options={mapDataAll1}
               placeholder="请选择地点"
               placeholder="请选择地点"
             />
             />
           </Form.Item>
           </Form.Item>
@@ -238,7 +240,7 @@ function AddPsychz({ openInfo, closeFu, upTableFu, addTableFu }: Props) {
                   <Input
                   <Input
                     value={v}
                     value={v}
                     onChange={(e) => {
                     onChange={(e) => {
-                      console.log(e.target.value.replace(/[^\d]/g, ""));
+                      // console.log(e.target.value.replace(/[^\d]/g, ""));
 
 
                       setRoomList(
                       setRoomList(
                         roomList.map((c, ci) =>
                         roomList.map((c, ci) =>

+ 4 - 2
src/pages/A2Psychz/data.ts

@@ -1,6 +1,8 @@
 export type A2FromDataType = {
 export type A2FromDataType = {
-  siteLevel: 2;
-  site: string;
+  siteArr: string[]|undefined;
+  province:string
+  city:string
+  region:string
   searchKey: string;
   searchKey: string;
   pmUser: string;
   pmUser: string;
   typeIn: "" | "pc" | "app-scan" | "app-manual";
   typeIn: "" | "pc" | "app-scan" | "app-manual";

+ 20 - 10
src/pages/A2Psychz/index.module.scss

@@ -3,14 +3,12 @@
 
 
   :global {
   :global {
     .A2top {
     .A2top {
-      display: flex;
-      justify-content: space-between;
       border-radius: 10px;
       border-radius: 10px;
       background-color: #fff;
       background-color: #fff;
-      padding: 15px 10px;
+      padding: 15px 20px;
 
 
       // 级联选择器的 placeholder
       // 级联选择器的 placeholder
-      .ant-select-selection-placeholder{
+      .ant-select-selection-placeholder {
         color: black;
         color: black;
       }
       }
 
 
@@ -18,10 +16,16 @@
         display: flex;
         display: flex;
 
 
         .A2topRow {
         .A2topRow {
-          margin-right: 10px;
-          &:last-child{
-            margin-right: 0;
-          }
+          margin-right: 20px;
+        }
+      }
+
+      .A2top2 {
+        margin-top: 15px;
+        justify-content: space-between;
+
+        &>div {
+          display: flex;
         }
         }
       }
       }
     }
     }
@@ -29,15 +33,21 @@
     .tableMain {
     .tableMain {
       border-radius: 10px;
       border-radius: 10px;
       margin-top: 15px;
       margin-top: 15px;
-      height: calc(100% - 80px);
+      height: calc(100% - 127px);
       background-color: #fff;
       background-color: #fff;
 
 
       .ant-table-body {
       .ant-table-body {
-        height: 625px;
+        height: 578px;
         overflow-y: auto !important;
         overflow-y: auto !important;
         overflow-y: overlay !important;
         overflow-y: overlay !important;
 
 
+        .ant-table-cell {
+          padding: 8px !important;
+        }
+
       }
       }
     }
     }
+
   }
   }
+
 }
 }

+ 152 - 72
src/pages/A2Psychz/index.tsx

@@ -6,7 +6,7 @@ import React, {
   useState,
   useState,
 } from "react";
 } from "react";
 import styles from "./index.module.scss";
 import styles from "./index.module.scss";
-import { Button, Input, Popconfirm, Select, Table } from "antd";
+import { Button, Cascader, Input, Popconfirm, Select, Table } from "antd";
 import { useDispatch, useSelector } from "react-redux";
 import { useDispatch, useSelector } from "react-redux";
 import { A2FromDataType, options1 } from "./data";
 import { A2FromDataType, options1 } from "./data";
 import {
 import {
@@ -26,19 +26,42 @@ import ExportJsonExcel from "js-export-excel";
 function A2Psychz() {
 function A2Psychz() {
   // 站址地区的数据-下拉框
   // 站址地区的数据-下拉框
 
 
-  const [optionsCity, setOptionsCity] = useState<
-    { value: string; label: string }[]
-  >([]);
+  const [optionsCity, setOptionsCity] = useState<any>([]);
 
 
   const getCityFu = useCallback(async () => {
   const getCityFu = useCallback(async () => {
     const res = await A2_APIgetCity();
     const res = await A2_APIgetCity();
     if (res.code === 0) {
     if (res.code === 0) {
-      const data: string[] = res.data;
-      const arr = data.map((v) => ({
-        value: v,
-        label: v,
-      }));
-      setOptionsCity([{ value: "", label: "全部" }, ...arr]);
+      const obj = res.data;
+
+      const arr = [];
+
+      for (const k in obj) {
+        const temp1: any = {
+          value: k,
+          label: k,
+          children: [],
+        };
+
+        const children1Obj = Reflect.get(obj, k);
+
+        for (const k2 in children1Obj) {
+          const children2Arr = Reflect.get(children1Obj, k2);
+
+          const objTemp = {
+            value: k2,
+            label: k2,
+            children: children2Arr.map((v2: any) => ({
+              value: v2.region,
+              label: v2.region,
+            })),
+          };
+          temp1.children.push(objTemp);
+        }
+
+        arr.push(temp1);
+      }
+
+      setOptionsCity(arr);
       // console.log(123, res);
       // console.log(123, res);
     }
     }
   }, []);
   }, []);
@@ -51,8 +74,10 @@ function A2Psychz() {
 
 
   // 筛选和分页
   // 筛选和分页
   const [tableSelect, setTableSelect] = useState<A2FromDataType>({
   const [tableSelect, setTableSelect] = useState<A2FromDataType>({
-    siteLevel: 2,
-    site: "",
+    siteArr: undefined,
+    province: "",
+    city: "",
+    region: "",
     searchKey: "",
     searchKey: "",
     pmUser: "",
     pmUser: "",
     typeIn: "",
     typeIn: "",
@@ -60,27 +85,41 @@ function A2Psychz() {
     pageNum: 1,
     pageNum: 1,
   });
   });
 
 
+  const tableSelectRef = useRef({} as A2FromDataType);
+
+  useEffect(() => {
+    tableSelectRef.current = { ...tableSelect };
+  }, [tableSelect]);
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(-1);
+
   // 发送接口的函数
   // 发送接口的函数
   const getListFu = useCallback(() => {
   const getListFu = useCallback(() => {
+    const objTemp: any = {};
+
+    if (tableSelectRef.current.siteArr) {
+      const temp = tableSelectRef.current.siteArr;
+      objTemp.province = temp[0];
+      objTemp.city = temp[1];
+      objTemp.region = temp[2];
+    }
+
     const obj = {
     const obj = {
-      ...tableSelect,
-      site: tableSelect.site ? tableSelect.site : null,
+      ...tableSelectRef.current,
+      ...objTemp,
     };
     };
     dispatch(A2_APIgetlist(obj));
     dispatch(A2_APIgetlist(obj));
-  }, [dispatch, tableSelect]);
+  }, [dispatch]);
 
 
   useEffect(() => {
   useEffect(() => {
     getListFu();
     getListFu();
-  }, [getListFu]);
+  }, [getListFu, timeKey]);
 
 
   // 输入框的改变
   // 输入框的改变
-  const txtTimeRef = useRef(-1);
   const txtChangeFu = useCallback(
   const txtChangeFu = useCallback(
     (txt: string, key: "pmUser" | "searchKey") => {
     (txt: string, key: "pmUser" | "searchKey") => {
-      clearTimeout(txtTimeRef.current);
-      txtTimeRef.current = window.setTimeout(() => {
-        setTableSelect({ ...tableSelect, [key]: txt, pageNum: 1 });
-      }, 500);
+      setTableSelect({ ...tableSelect, [key]: txt, pageNum: 1 });
     },
     },
     [tableSelect]
     [tableSelect]
   );
   );
@@ -91,14 +130,20 @@ function A2Psychz() {
     // 把2个输入框和时间选择器清空
     // 把2个输入框和时间选择器清空
     setInputKey(Date.now());
     setInputKey(Date.now());
     setTableSelect({
     setTableSelect({
-      siteLevel: 2,
-      site: "",
+      siteArr: undefined,
+      province: "",
+      city: "",
+      region: "",
       searchKey: "",
       searchKey: "",
       pmUser: "",
       pmUser: "",
       typeIn: "",
       typeIn: "",
       pageSize: 10,
       pageSize: 10,
       pageNum: 1,
       pageNum: 1,
     });
     });
+
+    setTimeout(() => {
+      setTimeKey(Date.now());
+    }, 50);
   }, []);
   }, []);
 
 
   // 从仓库获取列表
   // 从仓库获取列表
@@ -109,6 +154,9 @@ function A2Psychz() {
   const paginationChange = useCallback(
   const paginationChange = useCallback(
     () => (pageNum: number, pageSize: number) => {
     () => (pageNum: number, pageSize: number) => {
       setTableSelect({ ...tableSelect, pageNum, pageSize });
       setTableSelect({ ...tableSelect, pageNum, pageSize });
+      setTimeout(() => {
+        setTimeKey(Date.now());
+      }, 50);
     },
     },
     [tableSelect]
     [tableSelect]
   );
   );
@@ -120,7 +168,7 @@ function A2Psychz() {
       if (res.code === 0) {
       if (res.code === 0) {
         MessageFu.success("删除成功!");
         MessageFu.success("删除成功!");
         getListFu();
         getListFu();
-        getCityFu()
+        getCityFu();
       }
       }
     },
     },
     [getCityFu, getListFu]
     [getCityFu, getListFu]
@@ -131,9 +179,9 @@ function A2Psychz() {
       {
       {
         title: "站址地区",
         title: "站址地区",
         render: (item: A2tableType) =>
         render: (item: A2tableType) =>
-          !item.province && !item.city
+          !item.province && !item.city && !item.region
             ? "(空)"
             ? "(空)"
-            : `${item.province} - ${item.city}`,
+            : `${item.province}-${item.city}-${item.region}`,
       },
       },
       {
       {
         title: "详细地址",
         title: "详细地址",
@@ -221,14 +269,26 @@ function A2Psychz() {
       return MessageFu.warning("当前搜索条件没有数据!");
       return MessageFu.warning("当前搜索条件没有数据!");
     const name = "机房管理" + dayjs(new Date()).format("YYYY-MM-DD HH:mm");
     const name = "机房管理" + dayjs(new Date()).format("YYYY-MM-DD HH:mm");
 
 
+    const objTemp: any = {};
+
+    if (tableSelectRef.current.siteArr) {
+      const temp = tableSelectRef.current.siteArr;
+      objTemp.province = temp[0];
+      objTemp.city = temp[1];
+      objTemp.region = temp[2];
+    }
+
     const res = await A2_APIgetlistDerive({
     const res = await A2_APIgetlistDerive({
-      ...tableSelect,
-      site: tableSelect.site ? tableSelect.site : null,
+      ...tableSelectRef.current,
+      ...objTemp,
       pageNum: 1,
       pageNum: 1,
       pageSize: 99999,
       pageSize: 99999,
     });
     });
 
 
     if (res.code === 0) {
     if (res.code === 0) {
+      if (res.data.records.length <= 0)
+        return MessageFu.warning("当前搜索条件没有数据!");
+
       const option = {
       const option = {
         fileName: name,
         fileName: name,
         datas: [
         datas: [
@@ -236,7 +296,9 @@ function A2Psychz() {
             sheetData: res.data.records.map((v: A2tableType) => ({
             sheetData: res.data.records.map((v: A2tableType) => ({
               ...v,
               ...v,
               myCity:
               myCity:
-                !v.province && !v.city ? "(空)" : `${v.province} - ${v.city}`,
+                !v.province && !v.city && !v.region
+                  ? "(空)"
+                  : `${v.province}-${v.city}-${v.region}`,
               address: v.address || "(空)",
               address: v.address || "(空)",
               name: v.name || "(空)",
               name: v.name || "(空)",
               siteNum: v.siteNum || "(空)",
               siteNum: v.siteNum || "(空)",
@@ -277,7 +339,7 @@ function A2Psychz() {
       const toExcel = new ExportJsonExcel(option); //new
       const toExcel = new ExportJsonExcel(option); //new
       toExcel.saveExcel(); //保存
       toExcel.saveExcel(); //保存
     }
     }
-  }, [A2TableList.list.length, tableSelect]);
+  }, [A2TableList.list.length]);
 
 
   return (
   return (
     <div className={styles.A2Psychz}>
     <div className={styles.A2Psychz}>
@@ -294,13 +356,19 @@ function A2Psychz() {
         <div className="A2top1">
         <div className="A2top1">
           <div className="A2topRow">
           <div className="A2topRow">
             <span>站址地区:</span>
             <span>站址地区:</span>
-            <Select
-              style={{ width: 130 }}
-              value={tableSelect.site}
+
+            <Cascader
+              style={{ width: 240 }}
+              options={optionsCity}
+              value={tableSelect.siteArr}
+              placeholder="全部"
               onChange={(e) =>
               onChange={(e) =>
-                setTableSelect({ ...tableSelect, site: e, pageNum: 1 })
+                setTableSelect({
+                  ...tableSelect,
+                  siteArr: e as string[],
+                  pageNum: 1,
+                })
               }
               }
-              options={optionsCity}
             />
             />
           </div>
           </div>
 
 
@@ -309,57 +377,64 @@ function A2Psychz() {
             <Input
             <Input
               key={inputKey}
               key={inputKey}
               maxLength={24}
               maxLength={24}
-              style={{ width: 323 }}
+              style={{ width: 322 }}
               placeholder="请输入站址名称/站置编号/机房编码,最多24字"
               placeholder="请输入站址名称/站置编号/机房编码,最多24字"
               allowClear
               allowClear
               onChange={(e) => txtChangeFu(e.target.value, "searchKey")}
               onChange={(e) => txtChangeFu(e.target.value, "searchKey")}
             />
             />
           </div>
           </div>
+        </div>
 
 
-          <div className="A2topRow">
-            <span>项目经理:</span>
-            <Input
-              key={inputKey}
-              maxLength={10}
-              style={{ width: 174 }}
-              placeholder="请输入姓名,最多10字"
-              allowClear
-              onChange={(e) => txtChangeFu(e.target.value, "pmUser")}
-            />
+        <div className="A2top2">
+          <div>
+            <div className="A2topRow">
+              <span>项目经理:</span>
+              <Input
+                key={inputKey}
+                maxLength={10}
+                style={{ width: 240 }}
+                placeholder="请输入姓名,最多10字"
+                allowClear
+                onChange={(e) => txtChangeFu(e.target.value, "pmUser")}
+              />
+            </div>
+            <div className="A2topRow">
+              <span>录入方式:</span>
+              <Select
+                style={{ width: 150 }}
+                value={tableSelect.typeIn}
+                onChange={(e) =>
+                  setTableSelect({ ...tableSelect, typeIn: e, pageNum: 1 })
+                }
+                options={options1}
+              />
+            </div>
           </div>
           </div>
-
-          <div className="A2topRow">
-            <span>录入方式:</span>
-            <Select
-              style={{ width: 116 }}
-              value={tableSelect.typeIn}
-              onChange={(e) =>
-                setTableSelect({ ...tableSelect, typeIn: e, pageNum: 1 })
-              }
-              options={options1}
-            />
+          {/* 按钮 */}
+          <div>
+            <Button onClick={resetSelectFu}>重置</Button>&emsp;
+            <Button type="primary" onClick={() => setTimeKey(Date.now())}>
+              查询
+            </Button>
+            &emsp;
+            <Button
+              type="primary"
+              onClick={() => setOpenInfo({ id: -1, txt: "新增" })}
+            >
+              新增
+            </Button>
+            &emsp;
+            <Button type="primary" onClick={deriveFu}>
+              导出表格
+            </Button>
           </div>
           </div>
         </div>
         </div>
-        {/* 右侧按钮 */}
-        <div className="A2top2">
-          <Button onClick={resetSelectFu}>重置</Button>&emsp;
-          <Button
-            type="primary"
-            onClick={() => setOpenInfo({ id: -1, txt: "新增" })}
-          >
-            新增
-          </Button>
-          &emsp;
-          <Button type="primary" onClick={deriveFu}>
-            导出表格
-          </Button>
-        </div>
       </div>
       </div>
 
 
       {/* 表格主体 */}
       {/* 表格主体 */}
       <div className="tableMain">
       <div className="tableMain">
         <Table
         <Table
-          scroll={{ y: 625 }}
+          scroll={{ y: 578 }}
           dataSource={A2TableList.list}
           dataSource={A2TableList.list}
           columns={columns}
           columns={columns}
           rowKey="id"
           rowKey="id"
@@ -390,6 +465,11 @@ function A2Psychz() {
           }}
           }}
         />
         />
       ) : null}
       ) : null}
+
+      {/*  右下角的列表数量 */}
+      <div className="tableNumBox">
+        共 <span>{A2TableList.total}</span> 条数据
+      </div>
     </div>
     </div>
   );
   );
 }
 }

+ 9 - 5
src/pages/B1Plan/index.tsx

@@ -7,7 +7,6 @@ import React, {
 } from "react";
 } from "react";
 import styles from "./index.module.scss";
 import styles from "./index.module.scss";
 import { Button, Cascader, Input, Select, Table, Tooltip } from "antd";
 import { Button, Cascader, Input, Select, Table, Tooltip } from "antd";
-import mapDataAll from "../C1User/AddUser/city";
 import {
 import {
   B1options1,
   B1options1,
   B1options1Obj,
   B1options1Obj,
@@ -27,6 +26,7 @@ import { B1tableType } from "@/types";
 import ExportJsonExcel from "js-export-excel";
 import ExportJsonExcel from "js-export-excel";
 import { MessageFu } from "@/utils/message";
 import { MessageFu } from "@/utils/message";
 import dayjs from "dayjs";
 import dayjs from "dayjs";
+import { mapDataAll1 } from "../C1User/AddUser/city";
 
 
 function B1Plan() {
 function B1Plan() {
   const dispatch = useDispatch();
   const dispatch = useDispatch();
@@ -123,7 +123,7 @@ function B1Plan() {
       },
       },
       {
       {
         title: "项目经理",
         title: "项目经理",
-        render: (item: B1tableType) =>  item.pmName || "(空)"
+        render: (item: B1tableType) => item.pmName || "(空)",
       },
       },
       {
       {
         title: "场景码",
         title: "场景码",
@@ -179,7 +179,7 @@ function B1Plan() {
               myCity:
               myCity:
                 !v.province && !v.city ? "(空)" : `${v.province} - ${v.city}`,
                 !v.province && !v.city ? "(空)" : `${v.province} - ${v.city}`,
               roomNum: v.roomNum,
               roomNum: v.roomNum,
-              pmName:  v.pmName || "(空)",
+              pmName: v.pmName || "(空)",
               sceneCode: v.sceneCode || "(空)",
               sceneCode: v.sceneCode || "(空)",
               auditStatus:
               auditStatus:
                 Reflect.get(B1options1Obj, v.auditStatus) || "(空)",
                 Reflect.get(B1options1Obj, v.auditStatus) || "(空)",
@@ -247,10 +247,14 @@ function B1Plan() {
             <Cascader
             <Cascader
               value={tableSelect.site}
               value={tableSelect.site}
               style={{ width: 160 }}
               style={{ width: 160 }}
-              options={mapDataAll}
+              options={mapDataAll1}
               placeholder="全部"
               placeholder="全部"
               onChange={(e) =>
               onChange={(e) =>
-                setTableSelect({ ...tableSelect, site: e as string[] })
+                setTableSelect({
+                  ...tableSelect,
+                  site: e as string[],
+                  pageNum: 1,
+                })
               }
               }
             />
             />
           </div>
           </div>

+ 2 - 2
src/pages/B2Scene/index.tsx

@@ -17,7 +17,6 @@ import {
 } from "antd";
 } from "antd";
 import { useDispatch, useSelector } from "react-redux";
 import { useDispatch, useSelector } from "react-redux";
 import { B2FromDataType, B2ResNum } from "./data";
 import { B2FromDataType, B2ResNum } from "./data";
-import mapDataAll from "../C1User/AddUser/city";
 import { B1options1, B1options1Obj } from "../B1Plan/data";
 import { B1options1, B1options1Obj } from "../B1Plan/data";
 import {
 import {
   B2_APIgetlist,
   B2_APIgetlist,
@@ -33,6 +32,7 @@ import ExportJsonExcel from "js-export-excel";
 import dayjs from "dayjs";
 import dayjs from "dayjs";
 import AuditMo from "./AuditMo";
 import AuditMo from "./AuditMo";
 import clasNames from "classnames";
 import clasNames from "classnames";
+import { mapDataAll1 } from "../C1User/AddUser/city";
 
 
 function B2Scene() {
 function B2Scene() {
   const dispatch = useDispatch();
   const dispatch = useDispatch();
@@ -395,7 +395,7 @@ function B2Scene() {
             <Cascader
             <Cascader
               value={tableSelect.site}
               value={tableSelect.site}
               style={{ width: 180 }}
               style={{ width: 180 }}
-              options={mapDataAll}
+              options={mapDataAll1}
               placeholder="全部"
               placeholder="全部"
               onChange={(e) =>
               onChange={(e) =>
                 setTableSelect({ ...tableSelect, site: e as string[] })
                 setTableSelect({ ...tableSelect, site: e as string[] })

+ 2 - 2
src/pages/B3Push/index.tsx

@@ -16,7 +16,6 @@ import {
   Tooltip,
   Tooltip,
 } from "antd";
 } from "antd";
 import { useDispatch, useSelector } from "react-redux";
 import { useDispatch, useSelector } from "react-redux";
-import mapDataAll from "../C1User/AddUser/city";
 import { B3FromDataType } from "./data";
 import { B3FromDataType } from "./data";
 import { B1options2, B1options2Obj } from "../B1Plan/data";
 import { B1options2, B1options2Obj } from "../B1Plan/data";
 import { QuestionCircleOutlined } from "@ant-design/icons";
 import { QuestionCircleOutlined } from "@ant-design/icons";
@@ -24,6 +23,7 @@ import { B3_APIgetlist, B3_APIpush } from "@/store/action/B3Push";
 import { RootState } from "@/store";
 import { RootState } from "@/store";
 import { B3tableType } from "@/types";
 import { B3tableType } from "@/types";
 import { MessageFu } from "@/utils/message";
 import { MessageFu } from "@/utils/message";
+import { mapDataAll1 } from "../C1User/AddUser/city";
 
 
 function B3Push() {
 function B3Push() {
   const dispatch = useDispatch();
   const dispatch = useDispatch();
@@ -254,7 +254,7 @@ function B3Push() {
             <Cascader
             <Cascader
               value={tableSelect.site}
               value={tableSelect.site}
               style={{ width: 200 }}
               style={{ width: 200 }}
-              options={mapDataAll}
+              options={mapDataAll1}
               placeholder="全部"
               placeholder="全部"
               onChange={(e) =>
               onChange={(e) =>
                 setTableSelect({ ...tableSelect, site: e as string[] })
                 setTableSelect({ ...tableSelect, site: e as string[] })

+ 21 - 4
src/pages/C1User/AddUser/city.ts

@@ -6270,18 +6270,35 @@ type Props = {
   }[];
   }[];
 };
 };
 
 
-const mapDataAll: Props[] = [];
+const temp1: Props[] = [];
+const temp2: Props[] = [];
 
 
 temp.forEach((v) => {
 temp.forEach((v) => {
-  const obj = {
+  const obj1 = {
     value: v.name,
     value: v.name,
     label: v.name,
     label: v.name,
     children: v.city.map((v2) => ({
     children: v.city.map((v2) => ({
       value: v2.name,
       value: v2.name,
       label: v2.name,
       label: v2.name,
+      children: v2.districtAndCounty.map((v3) => ({
+        value: v3,
+        label: v3,
+      })),
     })),
     })),
   };
   };
-  mapDataAll.push(obj);
+
+  const obj2 = {
+    value: v.name,
+    label: v.name,
+    children: v.city.map((v2) => ({
+      value: v2.name,
+      label: v2.name,
+    })),
+  };
+
+  temp1.push(obj1);
+  temp2.push(obj2)
 });
 });
 
 
-export default mapDataAll;
+export const mapDataAll1 =temp1
+export const mapDataAll2 =temp2

+ 2 - 2
src/pages/C1User/AddUser/index.tsx

@@ -17,9 +17,9 @@ import {
   Select,
   Select,
 } from "antd";
 } from "antd";
 import classNames from "classnames";
 import classNames from "classnames";
-import mapDataAll from "./city";
 import { C1_APIadd, C1_APIgetInfo } from "@/store/action/C1User";
 import { C1_APIadd, C1_APIgetInfo } from "@/store/action/C1User";
 import { MessageFu } from "@/utils/message";
 import { MessageFu } from "@/utils/message";
+import { mapDataAll2 } from "./city";
 
 
 type Props = {
 type Props = {
   openInfo: C1openInfoType;
   openInfo: C1openInfoType;
@@ -255,7 +255,7 @@ function AddUser({ openInfo, closeFu, upTableFu, addTableFu }: Props) {
                 <Cascader
                 <Cascader
                   value={v.txt}
                   value={v.txt}
                   style={{ width: 300 }}
                   style={{ width: 300 }}
-                  options={mapDataAll}
+                  options={mapDataAll2}
                   placeholder="请选择地点"
                   placeholder="请选择地点"
                   onChange={(e) => cityChangeFu(e, v.id)}
                   onChange={(e) => cityChangeFu(e, v.id)}
                 />
                 />

+ 1 - 1
src/store/action/A2Psychz.ts

@@ -51,5 +51,5 @@ export const A2_APIgetInfo = (id:number) => {
  * 机房管理-站址地区下拉框
  * 机房管理-站址地区下拉框
  */
  */
 export const A2_APIgetCity = () => {
 export const A2_APIgetCity = () => {
-  return http.get('cms/room/getCity');
+  return http.get('cms/room/getCityTree');
 };
 };

+ 1 - 0
src/types/api/A2Psychz.d.ts

@@ -1,6 +1,7 @@
 export type A2tableType ={
 export type A2tableType ={
 	address: string;
 	address: string;
 	city: string;
 	city: string;
+	region:string
 	createTime: string;
 	createTime: string;
 	creatorId?: any;
 	creatorId?: any;
 	creatorName: string;
 	creatorName: string;