shaogen1995 vor 2 Jahren
Ursprung
Commit
a4bd46013a

Datei-Diff unterdrückt, da er zu groß ist
+ 466 - 408
后台管理/package-lock.json


+ 1 - 1
后台管理/package.json

@@ -11,7 +11,7 @@
     "@types/node": "^16.18.3",
     "@types/react": "^18.0.24",
     "@types/react-dom": "^18.0.8",
-    "antd": "^5.0.4",
+    "antd": "^5.8.3",
     "antd-mobile": "^5.30.0",
     "axios": "^1.1.3",
     "dayjs": "^1.11.7",

+ 1 - 1
后台管理/src/components/ImageLazy/index.tsx

@@ -53,7 +53,7 @@ function ImageLazy({
         {/* 图片预览 */}
         {noLook || !lookImg ? null : (
           <div className="lookImg" onClick={lookBigImg}>
-            <EyeOutlined />
+            <EyeOutlined rev={undefined} />
             &nbsp;
             <div>预览</div>
           </div>

+ 4 - 3
后台管理/src/components/Z_upFileOne/index.tsx

@@ -108,7 +108,7 @@ function Z_upFileOne({
         className="file_upIcon"
         onClick={() => myInput.current?.click()}
       >
-        <PlusOutlined />
+        <PlusOutlined rev={undefined} />
       </div>
 
       <div className="file_img" hidden={cover === ""}>
@@ -125,13 +125,14 @@ function Z_upFileOne({
             onConfirm={() => setCover("")}
             okButtonProps={{ loading: false }}
           >
-            <CloseOutlined />
+            <CloseOutlined rev={undefined} />
           </Popconfirm>
         </div>
 
         {/* 预览 下载 */}
         <div className="file_lookBox">
           <EyeOutlined
+            rev={undefined}
             onClick={() =>
               store.dispatch({
                 type: "layout/lookBigImg",
@@ -140,7 +141,7 @@ function Z_upFileOne({
             }
           />
           <a href={baseURL + cover} download target="_blank" rel="noreferrer">
-            <DownloadOutlined />
+            <DownloadOutlined rev={undefined} />
           </a>
         </div>
       </div>

+ 5 - 1
后台管理/src/pages/A1Order/A1Look/index.module.scss

@@ -1,10 +1,14 @@
 .A1Look {
   :global {
 
+    .ant-modal-body {
+      max-height: 600px;
+      overflow-y: auto;
+    }
 
     .A1MBox {
       display: flex;
-      margin-top: 30px;
+      margin-top: 20px;
 
 
       .A1MBoxL {

+ 10 - 3
后台管理/src/pages/A1Order/A1Look/index.tsx

@@ -57,6 +57,13 @@ function A1Look({ data, closeModelFu }: Props) {
       </div>
 
       <div className="A1MBox">
+        <div className="A1MBoxL">所在处室:</div>
+        <div className="A1MBoxR">
+          <p>xxxxxxxxxxxx</p>
+        </div>
+      </div>
+
+      <div className="A1MBox">
         <div className="A1MBoxL">预约人:</div>
         <div className="A1MBoxR">
           {infoArr.map((v: any, i: number) => (
@@ -69,16 +76,16 @@ function A1Look({ data, closeModelFu }: Props) {
       </div>
 
       <div className="A1MBox">
-        <div className="A1MBoxL">预约时间:</div>
+        <div className="A1MBoxL">预约日期:</div>
         <div className="A1MBoxR">
           <p>{data.bookDay + " " + data.bootTimeScope}</p>
         </div>
       </div>
 
       <div className="A1MBox">
-        <div className="A1MBoxL">备注:</div>
+        <div className="A1MBoxL">所在时段:</div>
         <div className="A1MBoxR">
-          <p>{data.description ? data.description : "无"}</p>
+          <p>xxxxxxxxxxxxxxxx</p>
         </div>
       </div>
       <br />

+ 254 - 0
后台管理/src/pages/A1Order/A1SetOrder/index.module.scss

@@ -0,0 +1,254 @@
+.A1SetOrder {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  border-radius: 10px;
+  background-color: #fff;
+  padding: 20px 15px 0;
+  font-size: 16px;
+
+  :global {
+
+    .A1Stab {
+      width: 100%;
+      display: flex;
+      position: relative;
+
+      &>div {
+        cursor: pointer;
+        height: 36px;
+        line-height: 36px;
+        padding: 0 20px;
+        border-radius: 6px;
+        border: 1px solid var(--themeColor2);
+        margin-right: 10px;
+
+        &:hover {
+          background-color: var(--themeColor2);
+          font-weight: 700;
+        }
+      }
+
+      .acRow {
+        pointer-events: none;
+        background-color: var(--themeColor2);
+        font-weight: 700;
+      }
+
+      .A1SbackBtn {
+        position: absolute;
+        top: 0px;
+        right: 20px;
+        z-index: 10;
+      }
+
+    }
+
+    .A1Smain {
+      border-top: 1px solid var(--themeColor);
+      margin-top: 15px;
+      width: 100%;
+      height: calc(100% - 45px);
+      overflow-y: auto;
+      padding-right: 100px;
+
+      .A1SmainBtn {
+        position: absolute;
+        z-index: 20;
+        right: 65px;
+        top: 50%;
+        transform: translateY(-50%);
+
+      }
+
+      // 主要内容
+      .A1Srow {
+        margin-top: 20px;
+        display: flex;
+
+        .A1Srowl {
+          width: 130px;
+          text-align: right;
+          margin-right: 10px;
+          padding-top: 6px;
+
+
+          &>span {
+            color: red;
+          }
+        }
+
+
+        .A1Srowr {
+          max-width: calc(100% - 140px);
+
+          .A1S1Title {
+            background-color: #eaeaea;
+            display: flex;
+            align-items: center;
+            height: 36px;
+
+            &>div {
+              width: 100px;
+              text-align: center;
+
+              &:nth-of-type(1) {
+                width: 200px;
+              }
+            }
+          }
+        }
+
+        .A1Srowr1 {
+          padding-left: 50px;
+          position: relative;
+
+          .A1Srowr1Add {
+            cursor: pointer;
+            position: absolute;
+            top: 4px;
+            left: 0px;
+            font-size: 20px;
+
+            &:hover {
+              color: var(--themeColor);
+            }
+          }
+
+          .A1Srow1List {
+            position: relative;
+
+            .A1Srow1List1 {
+              display: flex;
+              align-items: center;
+              height: 50px;
+              border-bottom: 1px solid #ccc;
+
+
+              &>div {
+                width: 100px;
+                text-align: center;
+              }
+
+              .A1Srow1Del {
+                position: absolute;
+                left: -50px;
+                top: 12px;
+                width: 50px;
+                cursor: pointer;
+                font-size: 20px;
+                text-align: left;
+
+                &:hover {
+                  color: var(--themeColor);
+                }
+              }
+
+              .A1Srow1TimeS {
+                width: 200px;
+              }
+            }
+          }
+        }
+
+        .A1Srowr2 {
+          display: flex;
+
+          .A1Srow2Del {
+            margin-left: 25px;
+            display: flex;
+            align-items: center;
+
+            .A1Sdel {
+              margin-left: 3px;
+              cursor: pointer;
+            }
+          }
+        }
+
+        .A1Srowr3 {
+          .A1S1Title {
+
+            &>div {
+              &:nth-of-type(1) {
+                position: relative;
+                width: 500px;
+
+                .A1Srowr3inco {
+                  cursor: pointer;
+                  z-index: 10;
+                  position: absolute;
+                  right: 0;
+                  top: 0;
+                }
+              }
+            }
+
+          }
+
+          .A1S3ListRow {
+            display: flex;
+            align-items: center;
+            height: 50px;
+            border-bottom: 1px solid #ccc;
+
+            &>div {
+              width: 100px;
+              text-align: center;
+
+              &:nth-of-type(1) {
+                cursor: pointer;
+                padding: 0 5px;
+                width: 500px;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+              }
+            }
+          }
+        }
+
+        .A1Srowr4 {
+          width: 1200px;
+        }
+
+      }
+    }
+
+    .noClickDis {
+      color: #ccc;
+      pointer-events: none;
+    }
+
+
+    // 查看状态下的样式
+    .A1SmainLook {
+      .A1Srow1List {
+        pointer-events: none;
+      }
+
+      .A1Srowr2 {
+        pointer-events: none;
+      }
+
+      .A1S3ListRow {
+        .A1S3ListRowInp {
+          pointer-events: none;
+        }
+      }
+
+      .A1Srowr4 {
+        pointer-events: none;
+      }
+
+      .A1SroRow2Null {
+        position: relative;
+        top: 6px;
+      }
+    }
+
+
+  }
+}

+ 498 - 0
后台管理/src/pages/A1Order/A1SetOrder/index.tsx

@@ -0,0 +1,498 @@
+import React, { useCallback, useEffect, useState } from "react";
+import styles from "./index.module.scss";
+import classNames from "classnames";
+import {
+  Button,
+  Checkbox,
+  DatePicker,
+  Empty,
+  Input,
+  Popconfirm,
+  Tooltip,
+} from "antd";
+import {
+  PlusCircleOutlined,
+  DeleteOutlined,
+  ExclamationCircleFilled,
+} from "@ant-design/icons";
+import { TimePicker } from "antd";
+import { A1OunitType, A1TimeType } from "@/types";
+import dayjs from "dayjs";
+import { MessageFu } from "@/utils/message";
+import { A1_APIOgetInfo, A1_APIOsave } from "@/store/action/A1Order";
+import TextArea from "antd/es/input/TextArea";
+
+const tabArr = [
+  { id: 119, name: "南京市博物总管" },
+  { id: 114, name: "扬州中国大运河博物馆" },
+];
+
+const dateArr = [
+  { id: 1, name: "周一", type: "pcs0" },
+  { id: 2, name: "周二", type: "pcs1" },
+  { id: 3, name: "周三", type: "pcs2" },
+  { id: 4, name: "周四", type: "pcs3" },
+  { id: 5, name: "周五", type: "pcs4" },
+  { id: 6, name: "周六", type: "pcs5" },
+  { id: 0, name: "周日", type: "pcs6" },
+] as {
+  id: number;
+  name: string;
+  type: "pcs0" | "pcs1" | "pcs2" | "pcs3" | "pcs4" | "pcs5" | "pcs6";
+}[];
+
+type Props = {
+  colseFu: () => void;
+};
+
+function A1SetOrder({ colseFu }: Props) {
+  const [tab, setTab] = useState(119);
+
+  const getInfoFuUnit = useCallback(async (id: number) => {
+    const res = await A1_APIOgetInfo(id);
+
+    if (res.code === 0) {
+      setRow1(
+        res.data.date.map((v: any, i: number) => ({
+          id: Date.now() + i,
+          time: v.timeScope.split(" - "),
+          date: v.weeks.split(",").map((v: string) => Number(v)),
+        }))
+      );
+
+      setRow2(
+        res.data.unableDate.map((v: string, i: number) => ({
+          id: Date.now() + i,
+          time: v,
+        }))
+      );
+
+      setUnitArr(res.data.unitPcs);
+
+      setDescription(res.data.bookDesc);
+    }
+  }, []);
+
+  useEffect(() => {
+    getInfoFuUnit(tab);
+  }, [getInfoFuUnit, tab]);
+
+  // 是否进入编辑状态
+  const [isEdit, setIsEdit] = useState(false);
+
+  // 点击编辑状态的取消
+  const clickXFu = useCallback(() => {
+    getInfoFuUnit(tab);
+    setIsEdit(false);
+  }, [getInfoFuUnit, tab]);
+
+  // ----------可预约日期--------------
+  const [row1, setRow1] = useState([
+    // { id: 1, time: ["04:00", "05:00"], date: [] }
+  ] as A1TimeType[]);
+
+  // 点击 + 号
+  const addRow1Fu = useCallback(() => {
+    if (row1.length >= 3) return MessageFu.warning("最多增加3条可预约日期!");
+    setRow1([...row1, { id: Date.now(), time: null, date: [] }]);
+  }, [row1]);
+
+  // 时间选择器改变
+  const row1OnChangeFu = useCallback(
+    (time: any, id: number) => {
+      let str: any = null;
+
+      if (time && time.length && time.length > 1) {
+        const str1 = dayjs(time[0]).format("HH:mm");
+        const str2 = dayjs(time[1]).format("HH:mm");
+
+        if (str1 === str2)
+          return MessageFu.warning("开始时间和结束时间不能一样!");
+        str = [str1, str2];
+      }
+
+      setRow1(
+        row1.map((v) => ({
+          ...v,
+          time: v.id === id ? str : v.time,
+        }))
+      );
+    },
+    [row1]
+  );
+
+  // 星期勾选的改变
+  const row1DateChange = useCallback(
+    (val: boolean, id1: number, id2: number) => {
+      setRow1(
+        row1.map((v) => ({
+          ...v,
+          date:
+            v.id === id1
+              ? val
+                ? [...v.date, id2]
+                : v.date.filter((v2) => v2 !== id2)
+              : v.date,
+        }))
+      );
+    },
+    [row1]
+  );
+
+  // 点击删除
+  const delRow1Fu = useCallback(
+    (id: number) => {
+      setRow1(row1.filter((v) => v.id !== id));
+    },
+    [row1]
+  );
+
+  // ---------------不可预约日期---------------
+  const [row2, setRow2] = useState([
+    // {id:1,time:''}
+  ] as {
+    id: number;
+    time: string | null;
+  }[]);
+
+  const row2ChangeFu = useCallback(
+    (_: any, val: string, id: number) => {
+      if (row2.some((v) => v.time === val))
+        return MessageFu.warning("不可预约日期不能相同!");
+      setRow2(
+        row2.map((v) => ({
+          ...v,
+          time: v.id === id ? val : v.time,
+        }))
+      );
+    },
+    [row2]
+  );
+
+  // ---------------单日人数限制---------------
+  const [unitArr, setUnitArr] = useState([] as A1OunitType[]);
+
+  const row3ChangeFu = useCallback(
+    (
+      val: string,
+      id: number,
+      type: "pcs0" | "pcs1" | "pcs2" | "pcs3" | "pcs4" | "pcs5" | "pcs6"
+    ) => {
+      let txt = val;
+      // if (Number(txt) > 999) txt = "999";
+      txt = txt.replace(/^(0+)|[^\d]+/g, "");
+      // if (Number(txt) === 0) txt = "1";
+
+      setUnitArr(
+        unitArr.map((v) => ({
+          ...v,
+          [type]: v.id === id ? Number(txt) : v[type],
+        }))
+      );
+    },
+    [unitArr]
+  );
+
+  // ---------------备注---------------
+  const [description, setDescription] = useState("");
+
+  // 点击确定
+  const clickOkFu = useCallback(async () => {
+    // 可预约日期的数据整理
+    const arr1 = row1.filter((v) => v.time);
+    if (arr1.length <= 0) return MessageFu.warning("至少添加一条可预约日期!");
+
+    // 不可预约日期数据整理
+    const arr2 = row2.filter((v) => v.time);
+
+    const obj = {
+      date: arr1.map((v) => ({
+        timeScope: v.time![0] + " - " + v.time![1],
+        weeks: v.date.join(","),
+      })),
+      description,
+      exhibitionId: tab,
+      unableDate: arr2.map((v) => v.time),
+      unitPcs: unitArr.map((v) => ({
+        unitId: v.unitId,
+        pcs0: v.pcs0 ? v.pcs0 : 999,
+        pcs1: v.pcs1 ? v.pcs1 : 999,
+        pcs2: v.pcs2 ? v.pcs2 : 999,
+        pcs3: v.pcs3 ? v.pcs3 : 999,
+        pcs4: v.pcs4 ? v.pcs4 : 999,
+        pcs5: v.pcs5 ? v.pcs5 : 999,
+        pcs6: v.pcs6 ? v.pcs6 : 999,
+      })),
+    };
+
+    const res = await A1_APIOsave(obj);
+
+    if (res.code === 0) {
+      MessageFu.success("编辑成功!");
+      getInfoFuUnit(tab);
+      setIsEdit(false);
+    }
+  }, [description, getInfoFuUnit, row1, row2, tab, unitArr]);
+
+  return (
+    <div className={styles.A1SetOrder}>
+      <div className="A1Stab">
+        {tabArr.map((v) => (
+          <div
+            hidden={isEdit && v.id !== tab}
+            onClick={() => setTab(v.id)}
+            className={classNames(tab === v.id ? "acRow" : "")}
+            key={v.id}
+          >
+            {v.name}
+          </div>
+        ))}
+        &emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;
+        {isEdit ? null : (
+          <>
+            <Button type="primary" onClick={() => setIsEdit(true)}>
+              编辑
+            </Button>
+            <Button className="A1SbackBtn" onClick={colseFu}>
+              返回
+            </Button>
+          </>
+        )}
+      </div>
+      <div className={classNames("A1Smain", isEdit ? "" : "A1SmainLook")}>
+        {/* 取消和确定按钮 */}
+        {isEdit ? (
+          <div className="A1SmainBtn">
+            <Button type="primary" onClick={clickOkFu}>
+              确定
+            </Button>
+            <br />
+            <br />
+            <br />
+            <br />
+            <Popconfirm
+              title="放弃编辑后,信息将不会保存!"
+              okText="放弃"
+              cancelText="取消"
+              onConfirm={clickXFu}
+              okButtonProps={{ loading: false }}
+            >
+              <Button>取消</Button>
+            </Popconfirm>
+          </div>
+        ) : null}
+
+        {/* 主要内容 */}
+        {/* ------------可预约日期----------------- */}
+        <div className="A1Srow">
+          <div className="A1Srowl">
+            <span>*</span> 可预约日期:
+          </div>
+          <div className="A1Srowr A1Srowr1">
+            {/* + 号 */}
+            {isEdit ? (
+              <div
+                className={classNames(
+                  "A1Srowr1Add",
+                  row1.length >= 3 ? "noClickDis" : ""
+                )}
+                title="新增"
+                onClick={addRow1Fu}
+              >
+                <PlusCircleOutlined rev={undefined} />
+              </div>
+            ) : null}
+
+            {/* 标题 */}
+            <div className="A1S1Title">
+              <div>时段</div>
+              {dateArr.map((v) => (
+                <div key={v.id}>{v.name}</div>
+              ))}
+            </div>
+
+            {/* 列表 */}
+            {row1.length ? (
+              <div className="A1Srow1List">
+                {row1.map((v, i) => (
+                  <div className="A1Srow1List1" key={v.id}>
+                    {isEdit ? (
+                      <Popconfirm
+                        title="删除后无法恢复,是否删除?"
+                        okText="删除"
+                        cancelText="取消"
+                        onConfirm={() => delRow1Fu(v.id)}
+                        okButtonProps={{ loading: false }}
+                      >
+                        <div
+                          title="删除"
+                          className="A1Srow1Del"
+                          style={{ top: i * 48 + 12 + "px" }}
+                        >
+                          <DeleteOutlined rev={undefined} />
+                        </div>
+                      </Popconfirm>
+                    ) : null}
+
+                    {/* 时间段的选择 */}
+                    <div className="A1Srow1TimeS">
+                      <TimePicker.RangePicker
+                        format="HH:mm"
+                        value={
+                          v.time
+                            ? [
+                                dayjs(v.time[0], "HH:mm"),
+                                dayjs(v.time[1], "HH:mm"),
+                              ]
+                            : null
+                        }
+                        onChange={(e) => row1OnChangeFu(e, v.id)}
+                      />
+                    </div>
+
+                    {/* 星期的勾选 */}
+                    {dateArr.map((v2) => (
+                      <div key={v2.id}>
+                        <Checkbox
+                          checked={v.date.includes(v2.id)}
+                          onChange={(e) =>
+                            row1DateChange(e.target.checked, v.id, v2.id)
+                          }
+                        ></Checkbox>
+                      </div>
+                    ))}
+                  </div>
+                ))}
+              </div>
+            ) : (
+              <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
+            )}
+          </div>
+        </div>
+
+        {/* -----------------不可预约日期----------------- */}
+        <div className="A1Srow">
+          <div className="A1Srowl">
+            <span></span> 不可预约日期:
+          </div>
+          <div className="A1Srowr A1Srowr2">
+            {isEdit ? (
+              <Button
+                disabled={row2.length >= 5}
+                type="primary"
+                onClick={() => setRow2([...row2, { id: Date.now(), time: "" }])}
+              >
+                新增
+              </Button>
+            ) : (
+              <>&emsp;&nbsp;&nbsp;</>
+            )}
+
+            {row2.length ? (
+              <>
+                {row2.map((v) => (
+                  <div className="A1Srow2Del" key={v.id}>
+                    <DatePicker
+                      style={{ width: 130 }}
+                      onChange={(_, val) => row2ChangeFu(_, val, v.id)}
+                      value={v.time ? dayjs(v.time) : null}
+                      disabledDate={(current) =>
+                        current && current < dayjs().subtract(1, "days")
+                      }
+                    />
+                    {isEdit ? (
+                      <Popconfirm
+                        title="删除后无法恢复,是否删除?"
+                        okText="删除"
+                        cancelText="取消"
+                        onConfirm={() =>
+                          setRow2(row2.filter((c) => c.id !== v.id))
+                        }
+                        okButtonProps={{ loading: false }}
+                      >
+                        <div title="删除" className="A1Sdel">
+                          <DeleteOutlined rev={undefined} />
+                        </div>
+                      </Popconfirm>
+                    ) : null}
+                  </div>
+                ))}
+              </>
+            ) : isEdit ? null : (
+              <div className="A1SroRow2Null">(空)</div>
+            )}
+          </div>
+        </div>
+
+        {/* -----------------单日人数限制----------------- */}
+        <div className="A1Srow">
+          <div className="A1Srowl">
+            <span>*</span> 单日人数限制:
+          </div>
+          <div className="A1Srowr A1Srowr3">
+            {/* 标题 */}
+            <div className="A1S1Title">
+              <div>
+                发起预约单位 {/* 填写提示 */}
+                {isEdit ? (
+                  <Tooltip title="请填写1-999的整数,0=999">
+                    <div className="A1Srowr3inco">
+                      <ExclamationCircleFilled rev={undefined} />
+                    </div>
+                  </Tooltip>
+                ) : null}
+              </div>
+              {dateArr.map((v) => (
+                <div key={v.id}>{v.name}</div>
+              ))}
+            </div>
+            {/* 列表 */}
+            <div className="A1S3List">
+              {unitArr.map((v) => (
+                <div className="A1S3ListRow" key={v.id}>
+                  <div title={v.unitName}>{v.unitName}</div>
+                  {/* 星期的勾选 */}
+                  {dateArr.map((v2) => (
+                    <div className="A1S3ListRowInp" key={v2.id}>
+                      <Input
+                        value={v[v2.type]}
+                        onChange={(e) =>
+                          row3ChangeFu(e.target.value, v.id, v2.type)
+                        }
+                        style={{ width: 80 }}
+                        maxLength={3}
+                      />
+                    </div>
+                  ))}
+                </div>
+              ))}
+            </div>
+          </div>
+        </div>
+
+        {/* -----------------备注----------------- */}
+        <div className="A1Srow">
+          <div className="A1Srowl">
+            <span></span> 备注:
+          </div>
+          <div className="A1Srowr A1Srowr4">
+            <TextArea
+              value={description}
+              onChange={(e) => setDescription(e.target.value)}
+              autoSize
+              placeholder="请输入内容"
+              showCount
+              maxLength={1000}
+            />
+          </div>
+        </div>
+        <br />
+        <br />
+      </div>
+    </div>
+  );
+}
+
+const MemoA1SetOrder = React.memo(A1SetOrder);
+
+export default MemoA1SetOrder;

+ 1 - 0
后台管理/src/pages/A1Order/index.module.scss

@@ -1,4 +1,5 @@
 .A1Order {
+  position: relative;
   :global {
     .A1Top {
       border-radius: 10px;

+ 34 - 12
后台管理/src/pages/A1Order/index.tsx

@@ -19,6 +19,7 @@ import { MessageFu } from "@/utils/message";
 import ExportJsonExcel from "js-export-excel";
 import dayjs from "dayjs";
 import A1Look from "./A1Look";
+import A1SetOrder from "./A1SetOrder";
 
 const { RangePicker } = DatePicker;
 
@@ -173,11 +174,17 @@ function A1Order() {
       },
       {
         title: "参观展馆",
-        dataIndex: "exhibitionName",
+        render: (item: A1TableType) =>
+          item.exhibitionName ? item.exhibitionName : "(空)",
       },
       {
         title: "所在单位",
-        dataIndex: "organ",
+        render: (item: A1TableType) => (item.organ ? item.organ : "(空)"),
+      },
+      {
+        title: "所在处室",
+        render: (item: A1TableType) =>
+          item.division ? item.division : "(空)",
       },
       {
         title: "姓名",
@@ -192,8 +199,13 @@ function A1Order() {
         render: (item: A1TableType) => item.contact.split(",").length,
       },
       {
-        title: "预约时间",
-        render: (item: A1TableType) => item.bookDay + " " + item.bootTimeScope,
+        title: "预约日期",
+        render: (item: A1TableType) => (item.bookDay ? item.bookDay : "(空)"),
+      },
+      {
+        title: "预约时段",
+        render: (item: A1TableType) =>
+          item.bootTimeScope ? item.bootTimeScope : "(空)",
       },
       {
         title: "操作",
@@ -247,7 +259,6 @@ function A1Order() {
               name: arr1[0] || "暂无",
               phone: arr1[1] || "暂无",
               IDCard: arr1[2] || "暂无",
-              time: v.bookDay + " " + v.bootTimeScope,
             });
           });
         } else {
@@ -256,7 +267,6 @@ function A1Order() {
             name: resField(v.contact)[0],
             phone: resField(v.contact)[1],
             IDCard: resField(v.contact)[2],
-            time: v.bookDay + " " + v.bootTimeScope,
           });
         }
       });
@@ -271,23 +281,25 @@ function A1Order() {
               "createTime",
               "exhibitionName",
               "organ",
+              "division",
               "name",
               "phone",
               "IDCard",
-              "time",
-              "description",
+              "bookDay",
+              "bootTimeScope",
             ],
             sheetHeader: [
               "申请时间",
               "参观展馆",
               "所在单位",
+              "所在处室",
               "姓名",
               "联系电话",
               "身份证",
-              "预约时间",
-              "备注",
+              "预约日期",
+              "预约时段",
             ],
-            columnWidths: [10, 10, 10, 10, 10, 10, 10, 10],
+            columnWidths: [10, 10, 10, 10, 10, 10, 10, 10, 10],
           },
         ],
       };
@@ -300,9 +312,12 @@ function A1Order() {
   // 查看的数据
   const [lookInfo, setLookInfo] = useState({} as A1TableType);
 
+  // 预约设置页面开关
+  const [orderFlag, setOrderFlag] = useState(false);
+
   return (
     <div className={styles.A1Order}>
-      <div className="pageTitle">预约管理</div>
+      <div className="pageTitle">预约管理{orderFlag ? " > 预约设置" : ""}</div>
       <div className="A1Top">
         <div className="A1TopRow">
           <span>申请日期:</span>
@@ -348,6 +363,10 @@ function A1Order() {
         </div>
         <Button onClick={resetSelectFu}>重置</Button>
         &emsp;&emsp;&emsp;&emsp;
+        <Button type="primary" onClick={() => setOrderFlag(true)}>
+          预约设置
+        </Button>
+        &emsp;
         <Button type="primary" onClick={deriveFu}>
           导出数据
         </Button>
@@ -379,6 +398,9 @@ function A1Order() {
           closeModelFu={() => setLookInfo({} as A1TableType)}
         />
       ) : null}
+
+      {/* 点击预约设置 */}
+      {orderFlag ? <A1SetOrder colseFu={() => setOrderFlag(false)} /> : null}
     </div>
   );
 }

+ 2 - 2
后台管理/src/pages/A2Gallery/A2Modal/index.tsx

@@ -159,7 +159,7 @@ function A2Modal({ isEdit, inCloseFu, inEditFu }: Props) {
                 onClick={() => setTag([...tag, ""])}
                 type="primary"
                 disabled={tag.some((v) => v === "")}
-                icon={<PlusCircleOutlined />}
+                icon={<PlusCircleOutlined rev={undefined} />}
                 hidden={tag.length >= 3}
               />
               &emsp;
@@ -176,7 +176,7 @@ function A2Modal({ isEdit, inCloseFu, inEditFu }: Props) {
                     className="tagClose"
                     onClick={() => setTag(tag.filter((v2, i2) => i2 !== i))}
                   >
-                    <CloseOutlined />
+                    <CloseOutlined rev={undefined} />
                   </div>
                 </div>
               ))}

+ 3 - 2
后台管理/src/pages/A2ZSort/index.tsx

@@ -186,6 +186,7 @@ function A2ZSort() {
             <SortAscendingOutlined
               hidden={sortClickNum === item.sort}
               onClick={() => sortShowFu(item.sort)}
+              rev={undefined}
             />
             {sortClickNum === item.sort ? (
               <input
@@ -223,13 +224,13 @@ function A2ZSort() {
             title={
               <>
                 点击 &emsp;
-                <SortAscendingOutlined />
+                <SortAscendingOutlined rev={undefined} />
                 &emsp;输入&emsp;排序标识,按&emsp;Enter键&emsp;交换位置(排序标识会累加,删除的排序标识不会在出现)
               </>
             }
           >
             <div className="inco">
-              <ExclamationCircleFilled />
+              <ExclamationCircleFilled rev={undefined} />
             </div>
           </Tooltip>
         </div>

+ 2 - 2
后台管理/src/pages/Layout/index.tsx

@@ -159,10 +159,10 @@ function Layout() {
           <div className="user">
             {userInfo.realName}
             <div className="userInco userInco1">
-              <CaretUpOutlined />
+              <CaretUpOutlined rev={undefined} />
             </div>
             <div className="userInco userInco2">
-              <CaretDownOutlined />
+              <CaretDownOutlined rev={undefined} />
             </div>
             <div className="userSet">
               <span onClick={() => setOpen(true)}>修改密码</span>

+ 2 - 2
后台管理/src/pages/Login/index.tsx

@@ -51,7 +51,7 @@ export default function Login() {
               onKeyUp={(e) => keyUpEntFu(e)}
               value={userName}
               onChange={(e) => setUserName(e.target.value.trim())}
-              prefix={<UserOutlined />}
+              prefix={<UserOutlined rev={undefined} />}
               placeholder="请输入账号"
               maxLength={15}
             />
@@ -61,7 +61,7 @@ export default function Login() {
               onKeyUp={(e) => keyUpEntFu(e)}
               value={passWord}
               onChange={(e) => setPassWord(e.target.value.trim())}
-              prefix={<LockOutlined />}
+              prefix={<LockOutlined rev={undefined} />}
               placeholder="请输入密码"
               maxLength={15}
             />

+ 14 - 0
后台管理/src/store/action/A1Order.ts

@@ -30,3 +30,17 @@ export const A1_APIlistExport = (data: any) => {
 export const A1_APIdelById = (id: number) => {
   return http.get(`cms/book/remove/${id}`);
 };
+
+/**
+ * 预约 ------- 获取 预约设置
+ */
+export const A1_APIOgetInfo = (id: number) => {
+  return http.get(`cms/book/getInfo/${id}`);
+};
+
+/**
+ * 预约 ------- 保存 预约 设置
+ */
+export const A1_APIOsave = (data: any) => {
+  return http.post("cms/book/save/info", data);
+};

+ 20 - 0
后台管理/src/types/api/A1Order.d.ts

@@ -10,4 +10,24 @@ export type A1TableType = {
   id: number;
   organ: string;
   updateTime: string;
+  division:string
+};
+
+export type A1TimeType = {
+  id: number;
+  time: string[] | null;
+  date: number[];
+};
+
+export type A1OunitType = {
+  id: number;
+  pcs0: number;
+  pcs1: number;
+  pcs2: number;
+  pcs3: number;
+  pcs4: number;
+  pcs5: number;
+  pcs6: number;
+  unitId: number;
+  unitName: string;
 };

+ 6 - 6
后台管理/src/utils/http.ts

@@ -7,10 +7,10 @@ import { domShowFu } from "./domShow";
 // 请求基地址
 export const baseURL =
   // 线下的图片地址需要加上/api/
-  // process.env.NODE_ENV === "development"
-  //   ? "http://192.168.20.55:8052/api/"
-  //   : "";
-  process.env.NODE_ENV === "development" ? "https://sit-jswl2.4dage.com" : "";
+  process.env.NODE_ENV === "development"
+    ? "http://192.168.20.61:8052/api/"
+    : "";
+  // process.env.NODE_ENV === "development" ? "https://sit-jswl2.4dage.com" : "";
 
 // 处理  类型“AxiosResponse<any, any>”上不存在属性“code”
 declare module "axios" {
@@ -23,10 +23,10 @@ declare module "axios" {
 // 创建 axios 实例
 const http = axios.create({
   // --------线下的地址不用加/api/
-  // baseURL: baseURL,
+  baseURL: baseURL,
 
   // --------打包或线上环境接口需要加上api/
-  baseURL: baseURL + "/api/",
+  // baseURL: baseURL + "/api/",
   timeout: 5000,
 });