Browse Source

出版物模块

shaogen1995 1 year ago
parent
commit
b247676281

+ 4 - 4
src/components/ZupOne/index.tsx

@@ -27,7 +27,7 @@ type Props = {
   size: number; //上传附件大小(M)
   dirCode: string; //文件的code码
   myUrl: string; //请求地址
-  format: string[]; //上传格式 ["image/jpeg", "image/png"] ["video/mp4"]
+  format: string[]; //上传格式 ["image/jpeg", "image/png"] ["video/mp4"] ,application/pdf
   formatTxt: string; //上传图片提示
   checkTxt: string;
   upTxt: string;
@@ -161,9 +161,9 @@ function ZupOne(
         });
       }
 
-      if (type === "pdf") {
-      } else {
-      }
+      // if (type === "pdf") {
+      // } else {
+      // }
     },
     [fileUrl.filePath]
   );

+ 0 - 1
src/pages/A4study/A4add/index.tsx

@@ -169,7 +169,6 @@ function A4add({ editInfo, closeFu, editTableFu, addTableFu }: Props) {
           >
             <Input
               readOnly={editInfo.txt === "查看"}
-              style={{ width: "500px" }}
               maxLength={50}
               showCount
               placeholder="请输入内容"

+ 1 - 1
src/pages/A4study/index.tsx

@@ -117,7 +117,7 @@ function A4study() {
       <div className="A4top">
         <div className="A4topLeft">
           <div>
-            <span>名称:</span>
+            <span>标题:</span>
             <Input
               key={inputKey}
               maxLength={50}

+ 133 - 0
src/pages/A5publish/A5add/index.module.scss

@@ -0,0 +1,133 @@
+.A5add {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 12;
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 24px;
+
+  :global {
+    .A5eMain {
+      width: 100%;
+      height: 100%;
+      overflow-y: auto;
+
+
+      .A5fromRow {
+        position: relative;
+        width: 800px;
+        height: 56px;
+
+        // &>div {
+        //   width: 100%;
+        // }
+
+        .A5_1Frow {
+          position: absolute;
+          top: 0px;
+          left: 600px;
+          width: 200px;
+        }
+
+        .A5_4Frow {
+          position: absolute;
+          left: 400px;
+          top: 4px;
+        }
+
+        .A5_6Frow {
+          position: absolute;
+          left: 200px;
+          top: 5px;
+          color: #999;
+          font-size: 12px;
+        }
+
+      }
+
+      .ant-form {
+        width: 800px;
+
+        // .ant-input-affix-wrapper{
+        //   width: 800px;
+        // }
+        .formRow {
+          display: flex;
+
+          .formLeft {
+            position: relative;
+            top: 3px;
+            width: 100px;
+            text-align: right;
+
+            &>span {
+              color: #ff4d4f;
+            }
+          }
+
+          .formRight {
+            width: calc(100% - 100px);
+          }
+
+
+          .formRight5Tit {
+            position: relative;
+            top: -10px;
+            transition: top .2s;
+            margin: 5px 0;
+            color: #ff4d4f;
+            opacity: 0;
+            pointer-events: none;
+          }
+
+          .formRight5TitErr {
+            opacity: 1;
+            top: 0;
+          }
+        }
+
+
+        .A5Ebtn {
+          position: absolute;
+          z-index: 10;
+          left: 1200px;
+          top: 50%;
+          transform: translateY(-50%);
+        }
+      }
+    }
+
+
+    // 从查看进入
+    .A5eMainLook {
+
+      // 左边的 label 也不让选中
+      label {
+        pointer-events: none;
+      }
+
+      .ant-picker {
+        pointer-events: none;
+      }
+
+      .ant-checkbox-wrapper {
+        pointer-events: none;
+      }
+
+      .ant-input-number {
+        pointer-events: none;
+      }
+
+      .ant-select {
+        pointer-events: none;
+      }
+
+      .ant-radio-wrapper {
+        pointer-events: none;
+      }
+    }
+  }
+}

+ 356 - 0
src/pages/A5publish/A5add/index.tsx

@@ -0,0 +1,356 @@
+import React, { useCallback, useEffect, useRef, useState } from "react";
+import styles from "./index.module.scss";
+import { A1EditInfoType } from "@/pages/A1event/data";
+import { A5topType } from "../data";
+import {
+  Button,
+  DatePicker,
+  Form,
+  FormInstance,
+  Input,
+  InputNumber,
+  Select,
+} from "antd";
+import { A5_APIgetInfo, A5_APIsave } from "@/store/action/A5publish";
+import dayjs from "dayjs";
+import { MessageFu } from "@/utils/message";
+import classNames from "classnames";
+import ZupOne from "@/components/ZupOne";
+import ZRichTexts from "@/components/ZRichTexts";
+import MyPopconfirm from "@/components/MyPopconfirm";
+
+type Props = {
+  topType: A5topType;
+  editInfo: A1EditInfoType;
+  closeFu: () => void;
+  editTableFu: () => void;
+  addTableFu: () => void;
+};
+
+function A5add({ editInfo, topType, closeFu, editTableFu, addTableFu }: Props) {
+  const [dirCode, setDirCode] = useState("");
+
+  // 表单的ref
+  const FormBoxRef = useRef<FormInstance>(null);
+
+  // 封面图的ref
+  const ZupThumbRef = useRef<any>(null);
+
+  // 富文本的ref
+  const ZRichTextRef = useRef<any>(null);
+
+  // pdf的ref
+  const ZupPdfRef = useRef<any>(null);
+
+  // 编辑/查看 进入页面 获取信息
+  const getInfoFu = useCallback(async (id: number) => {
+    const res = await A5_APIgetInfo(id);
+    if (res.code === 0) {
+      const data = res.data;
+
+      setDirCode(data.dirCode);
+
+      // 设置富文本
+      ZRichTextRef.current?.ritxtShowFu(JSON.parse(data.rtf));
+
+      const obj = {
+        ...data,
+        myTime: dayjs(data.datePublish),
+      };
+
+      FormBoxRef.current?.setFieldsValue(obj);
+
+      // 设置封面图
+      ZupThumbRef.current?.setFileComFileFu({
+        fileName: "",
+        filePath: data.thumb,
+      });
+
+      // 设置Pdf
+      ZupPdfRef.current?.setFileComFileFu({
+        fileName: data.fileName,
+        filePath: data.filePath,
+      });
+    }
+  }, []);
+
+  // 附件 是否 已经点击过确定
+  const [fileCheck, setFileCheck] = useState(false);
+
+  // 没有通过校验
+  const onFinishFailed = useCallback(() => {
+    setFileCheck(true);
+  }, []);
+
+  //  通过校验点击确定
+  const onFinish = useCallback(
+    async (values: any) => {
+      setFileCheck(true);
+
+      const coverUrl1 = ZupThumbRef.current?.fileComFileResFu();
+      // 没有传 封面图
+      if (!coverUrl1.filePath) return MessageFu.warning("请上传封面图!");
+
+      // 发布日期
+      const datePublish = dayjs(values.myTime).format("YYYY-MM-DD");
+
+      let rtf = { flag: true, val: "" };
+
+      let fileName = "";
+      let filePath = "";
+
+      if (topType === "Magazines") {
+        // 有富文本---富文本校验不通过
+        rtf = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true };
+
+        if (rtf.flag) return MessageFu.warning("请输入完整正文!");
+      } else {
+        // 有pdf附件
+        const ZupPdfRefObj = ZupPdfRef.current?.fileComFileResFu();
+        fileName = ZupPdfRefObj.fileName;
+        filePath = ZupPdfRefObj.filePath;
+        if (!filePath) return MessageFu.warning("请上传pdf附件!");
+      }
+
+      const obj = {
+        ...values,
+        id: editInfo.id > 0 ? editInfo.id : null,
+        datePublish,
+        thumb: coverUrl1.filePath,
+        rtf: JSON.stringify(rtf.val || ""),
+        dirCode,
+        fileName,
+        filePath,
+        type: topType,
+      };
+
+      // if (obj) {
+      //   console.log(123, obj);
+      //   return;
+      // }
+
+      const res = await A5_APIsave(obj);
+
+      if (res.code === 0) {
+        MessageFu.success(`${editInfo.txt}成功!`);
+        editInfo.id > 0 ? editTableFu() : addTableFu();
+        closeFu();
+      }
+    },
+    [
+      addTableFu,
+      closeFu,
+      dirCode,
+      editInfo.id,
+      editInfo.txt,
+      editTableFu,
+      topType,
+    ]
+  );
+
+  useEffect(() => {
+    if (editInfo.id > 0) {
+      getInfoFu(editInfo.id);
+    } else {
+      setDirCode(Date.now() + "");
+      FormBoxRef.current?.setFieldsValue({
+        myTime: dayjs(Date.now()),
+        sort: 999,
+        display: 1,
+        year: dayjs().get("year"),
+      });
+    }
+  }, [editInfo.id, getInfoFu]);
+
+  const [ageSelect, setAgeSelect] = useState<
+    { value: string; label: string }[]
+  >([]);
+
+  useEffect(() => {
+    if (topType === "Magazines") {
+      // 有分份
+      const arr: { value: string; label: string }[] = [];
+      const nowYear = dayjs().get("year");
+      const num = nowYear - 2010;
+      for (let i = 0; i <= num; i++) {
+        const temp = nowYear - i + "";
+        arr.push({
+          value: temp,
+          label: temp,
+        });
+      }
+
+      setAgeSelect(arr);
+    }
+  }, [topType]);
+
+  return (
+    <div className={styles.A5add}>
+      <div
+        className={classNames(
+          "A5eMain",
+          editInfo.txt === "查看" ? "A5eMainLook" : ""
+        )}
+      >
+        <Form
+          ref={FormBoxRef}
+          name="basic"
+          labelCol={{ span: 3 }}
+          onFinish={onFinish}
+          onFinishFailed={onFinishFailed}
+          autoComplete="off"
+          scrollToFirstError
+        >
+          <Form.Item
+            label="标题"
+            name="name"
+            rules={[{ required: true, message: "请输入标题!" }]}
+            // getValueFromEvent={(e) => e.target.value.replace(/\s+/g, "")}
+            getValueFromEvent={(e) => e.target.value.trim()}
+          >
+            <Input
+              readOnly={editInfo.txt === "查看"}
+              maxLength={50}
+              showCount
+              placeholder="请输入内容"
+            />
+          </Form.Item>
+
+          {topType === "Magazines" ? (
+            <Form.Item
+              label="年份"
+              name="year"
+              rules={[{ required: true, message: "请选择年份!" }]}
+            >
+              <Select
+                placeholder="请选择年份"
+                style={{ width: 200 }}
+                options={ageSelect}
+              />
+            </Form.Item>
+          ) : null}
+
+          {/* 封面 */}
+          <div className="formRow">
+            <div className="formLeft">
+              <span>* </span>
+              封面:
+            </div>
+            <div className="formRight">
+              <ZupOne
+                ref={ZupThumbRef}
+                isLook={editInfo.txt === "查看"}
+                fileCheck={fileCheck}
+                size={5}
+                dirCode={dirCode}
+                myUrl="cms/publish/upload"
+                format={["image/jpeg", "image/png"]}
+                formatTxt="png、jpg和jpeg"
+                checkTxt="请上传封面图!"
+                upTxt="最多1张"
+                myType="thumb"
+              />
+            </div>
+          </div>
+
+          {editInfo.txt === "查看" ? <br /> : null}
+
+          <div className="formRow">
+            <div className="formLeft">
+              <span>* </span>
+              {topType === "Magazines" ? "正文" : "附件"}:
+            </div>
+            <div className="formRight">
+              {topType === "Magazines" ? (
+                <ZRichTexts
+                  check={fileCheck}
+                  dirCode={dirCode}
+                  isLook={editInfo.txt === "查看"}
+                  ref={ZRichTextRef}
+                  myUrl="cms/publish/upload"
+                  isOne={true}
+                  upAudioBtnNone={true}
+                />
+              ) : (
+                <ZupOne
+                  ref={ZupPdfRef}
+                  isLook={editInfo.txt === "查看"}
+                  fileCheck={fileCheck}
+                  size={10}
+                  dirCode={dirCode}
+                  myUrl="cms/publish/upload"
+                  format={["application/pdf"]}
+                  formatTxt="pdf"
+                  checkTxt="请上传pdf附件!"
+                  upTxt="最多1个"
+                  myType="pdf"
+                />
+              )}
+            </div>
+          </div>
+
+          <Form.Item
+            label="发布日期"
+            name="myTime"
+            rules={[{ required: true, message: "请选择发布日期!" }]}
+          >
+            <DatePicker />
+          </Form.Item>
+
+          <div className="A5fromRow">
+            <Form.Item
+              label="排序值"
+              name="sort"
+              rules={[{ required: true, message: "请输入排序值!" }]}
+            >
+              <InputNumber
+                min={1}
+                max={999}
+                precision={0}
+                placeholder="请输入"
+              />
+            </Form.Item>
+            <div className="A5_6Frow" hidden={editInfo.txt === "查看"}>
+              请输入1~999的数字。数字越小,排序越靠前。数字相同时,更新发布的内容排在前面
+            </div>
+          </div>
+
+          <Form.Item
+            label="状态"
+            name="display"
+            rules={[{ required: true, message: "请选择状态!" }]}
+          >
+            <Select
+              placeholder="请选择状态"
+              style={{ width: 149 }}
+              options={[
+                { value: 1, label: "发布" },
+                { value: 0, label: "不发布" },
+              ]}
+            />
+          </Form.Item>
+
+          {/* 确定和取消按钮 */}
+          <Form.Item className="A5Ebtn">
+            {editInfo.txt === "查看" ? (
+              <Button onClick={closeFu}>返回</Button>
+            ) : (
+              <>
+                <Button type="primary" htmlType="submit">
+                  提交
+                </Button>
+                <br />
+                <br />
+                <MyPopconfirm txtK="取消" onConfirm={closeFu} />
+              </>
+            )}
+          </Form.Item>
+        </Form>
+      </div>
+    </div>
+  );
+}
+
+const MemoA5add = React.memo(A5add);
+
+export default MemoA5add;

+ 11 - 0
src/pages/A5publish/data.ts

@@ -0,0 +1,11 @@
+export type A5FromDataType = {
+  pageNum: number;
+  pageSize: number;
+  searchKey: string;
+  type: A5topType;
+  display: "" | 0 | 1;
+};
+
+export type A5topType = "Magazines" | "Exhibition";
+
+export const A5topBtnArr: A5topType[] = ["Magazines", "Exhibition"];

+ 27 - 3
src/pages/A5publish/index.module.scss

@@ -1,5 +1,29 @@
-.A5publish{
-  :global{
-    
+.A5publish {
+  position: relative;
+
+  :global {
+    .A5top {
+      padding: 15px 24px;
+      border-radius: 10px;
+      background-color: #fff;
+      display: flex;
+      justify-content: space-between;
+
+      .A5topLeft {
+        display: flex;
+
+        &>div {
+          margin-right: 24px;
+        }
+      }
+    }
+
+    .A5tableBox {
+      border-radius: 10px;
+      overflow: hidden;
+      margin-top: 15px;
+      height: calc(100% - 77px);
+      background-color: #fff;
+    }
   }
 }

+ 196 - 5
src/pages/A5publish/index.tsx

@@ -1,12 +1,203 @@
-import React from "react";
+import React, {
+  useCallback,
+  useEffect,
+  useMemo,
+  useRef,
+  useState,
+} from "react";
 import styles from "./index.module.scss";
- function A5publish() {
-  
+import { useDispatch, useSelector } from "react-redux";
+import { A5_APIdel, A5_APIgetList } from "@/store/action/A5publish";
+import { RootState } from "@/store";
+import { MessageFu } from "@/utils/message";
+import { A5tableType } from "@/types";
+import { Button, Input, Select } from "antd";
+import MyPopconfirm from "@/components/MyPopconfirm";
+import { A1EditInfoType, A1Selct } from "../A1event/data";
+import MyTable from "@/components/MyTable";
+import { A5tableCFu } from "@/utils/tableData";
+import { A5FromDataType, A5topBtnArr } from "./data";
+import A5add from "./A5add";
+function A5publish() {
+  const dispatch = useDispatch();
+
+  const [fromData, setFromData] = useState<A5FromDataType>({
+    pageNum: 1,
+    pageSize: 10,
+    searchKey: "",
+    type: "Magazines",
+    display: "",
+  });
+  const getListFu = useCallback(() => {
+    dispatch(A5_APIgetList(fromData));
+  }, [dispatch, fromData]);
+
+  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: "",
+      type: fromData.type,
+      display: "",
+    });
+  }, [fromData.type]);
+
+  const tableInfo = useSelector(
+    (state: RootState) => state.A5publish.tableInfo
+  );
+
+  const delTableFu = useCallback(
+    async (id: number) => {
+      const res = await A5_APIdel(id);
+      if (res.code === 0) {
+        MessageFu.success("删除成功!");
+        getListFu();
+      }
+    },
+    [getListFu]
+  );
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: "操作",
+        render: (item: A5tableType) => (
+          <>
+            <Button
+              size="small"
+              type="text"
+              onClick={() => setEditInfo({ id: item.id, txt: "查看" })}
+            >
+              查看
+            </Button>
+            <Button
+              size="small"
+              type="text"
+              onClick={() => setEditInfo({ id: item.id, txt: "编辑" })}
+            >
+              编辑
+            </Button>
+            <MyPopconfirm txtK="删除" onConfirm={() => delTableFu(item.id)} />
+          </>
+        ),
+      },
+    ];
+  }, [delTableFu]);
+
+  //查看、新增、编辑
+  const [editInfo, setEditInfo] = useState<A1EditInfoType>({
+    id: 0,
+    txt: "",
+  });
   return (
     <div className={styles.A5publish}>
-       <div className="pageTitle">出版物管理</div>
+      <div className="pageTitle">
+        出版物管理{editInfo.id ? ` - ${editInfo.txt} ${fromData.type}` : ""}
+      </div>
+      {/* 顶部筛选 */}
+      <div className="A5top">
+        <div className="A5topLeft">
+          <div>
+            {A5topBtnArr.map((val) => (
+              <Button
+                key={val}
+                type={val === fromData.type ? "primary" : "default"}
+                onClick={() =>
+                  setFromData({ ...fromData, type: val, pageNum: 1 })
+                }
+              >
+                {val}
+              </Button>
+            ))}
+          </div>
+
+          <div>
+            <span>标题:</span>
+            <Input
+              key={inputKey}
+              maxLength={50}
+              showCount
+              style={{ width: 300 }}
+              placeholder="请输入关键字"
+              allowClear
+              onChange={(e) => fromKeyChangeFu(e, "searchKey")}
+            />
+          </div>
+
+          <div>
+            <span>状态:</span>
+            <Select
+              placeholder="请选择"
+              style={{ width: 100 }}
+              value={fromData.display}
+              onChange={(e) =>
+                setFromData({ ...fromData, pageNum: 1, display: e })
+              }
+              options={A1Selct}
+            />
+          </div>
+        </div>
+
+        <div>
+          <Button
+            type="primary"
+            onClick={() => setEditInfo({ id: -1, txt: "新增" })}
+          >
+            新增
+          </Button>
+          &emsp;
+          <Button onClick={resetSelectFu}>重置</Button>
+        </div>
+      </div>
+
+      {/* 表格主体 */}
+      <div className="A5tableBox">
+        <MyTable
+          yHeight={625}
+          list={tableInfo.list}
+          columnsTemp={A5tableCFu(fromData.type)}
+          lastBtn={tableLastBtn}
+          pageNum={fromData.pageNum}
+          pageSize={fromData.pageSize}
+          total={tableInfo.total}
+          onChange={(pageNum, pageSize) =>
+            setFromData({ ...fromData, pageNum, pageSize })
+          }
+        />
+      </div>
+
+      {/* 新增 编辑 查看 */}
+      {editInfo.id ? (
+        <A5add
+          topType={fromData.type}
+          editInfo={editInfo}
+          closeFu={() => setEditInfo({ id: 0, txt: "" })}
+          editTableFu={() => getListFu()}
+          addTableFu={() => resetSelectFu()}
+        />
+      ) : null}
     </div>
-  )
+  );
 }
 
 const MemoA5publish = React.memo(A5publish);

+ 41 - 0
src/store/action/A5publish.ts

@@ -0,0 +1,41 @@
+import http from "@/utils/http";
+import { AppDispatch } from "..";
+
+/**
+ *出版物-列表
+ */
+
+export const A5_APIgetList = (data: any): any => {
+  return async (dispatch: AppDispatch) => {
+    const res = await http.post("cms/publish/pageList", data);
+    if (res.code === 0) {
+      const obj = {
+        // 待完善
+        list: res.data.records,
+        total: res.data.total,
+      };
+      dispatch({ type: "A5/getList", payload: obj });
+    }
+  };
+};
+
+/**
+ * 出版物-删除
+ */
+export const A5_APIdel = (id: number) => {
+  return http.get(`cms/publish/removes/${id}`);
+};
+
+/**
+ * 出版物-获取详情
+ */
+export const A5_APIgetInfo = (id: number) => {
+  return http.get(`cms/publish/detail/${id}`);
+};
+
+/**
+ * 出版物-新增、编辑
+ */
+export const A5_APIsave = (data: any) => {
+  return http.post("cms/publish/save", data);
+};

+ 28 - 0
src/store/reducer/A5publish.ts

@@ -0,0 +1,28 @@
+import { A5tableType } from "@/types";
+
+// 初始化状态
+const initState = {
+  // 列表数据
+  tableInfo: {
+    list: [] as A5tableType[],
+    total: 0,
+  },
+};
+
+// 定义 action 类型
+type Props = {
+  type: "A5/getList";
+  payload: { list: A5tableType[]; total: number };
+};
+
+// reducer
+export default function Reducer(state = initState, action: Props) {
+  switch (action.type) {
+    // 获取列表数据
+    case "A5/getList":
+      return { ...state, tableInfo: action.payload };
+
+    default:
+      return state;
+  }
+}

+ 2 - 0
src/store/reducer/index.ts

@@ -7,6 +7,7 @@ import A1event from "./A1event";
 import A2exhibition from "./A2exhibition";
 import A3holding from "./A3holding";
 import A4study from "./A4study";
+import A5publish from "./A5publish";
 import A8dict from "./A8dict";
 import Z1user from "./Z1user";
 import Z2log from "./Z2log";
@@ -18,6 +19,7 @@ const rootReducer = combineReducers({
   A2exhibition,
   A3holding,
   A4study,
+  A5publish,
   A8dict,
   Z1user,
   Z2log,

+ 17 - 0
src/types/api/A5publish.d.ts

@@ -0,0 +1,17 @@
+export type A5tableType = {
+  createTime: string;
+  creatorName: string;
+  datePublish: string;
+  dirCode: string;
+  display: number;
+  fileName: string;
+  filePath: string;
+  id: number;
+  name: string;
+  rtf: string;
+  sort: number;
+  thumb: string;
+  type: string;
+  updateTime: string;
+  year: string;
+};

+ 1 - 0
src/types/index.d.ts

@@ -3,6 +3,7 @@ export * from './api/A1event'
 export * from './api/A2exhibition'
 export * from './api/A3holding'
 export * from './api/A4study'
+export * from './api/A5publish'
 export * from './api/A8dict'
 export * from './api/Z1user'
 export * from './api/Z2log'

+ 22 - 0
src/utils/tableData.ts

@@ -13,6 +13,9 @@
 //     ["txtChange", "自动播放", "display", { 0: "否", 1: "是" }],
 //     ["text", "创建日期",'description', 50,A],
 //   ];
+
+import { A5topType } from "@/pages/A5publish/data";
+
 // };
 export const A1tableC = [
   ["txt", "标题", "name"],
@@ -59,6 +62,25 @@ export const A4tableC = [
   ["txtChange", "状态", "display", { 0: "不发布", 1: "发布" }],
 ];
 
+export const A5tableCFu = (val: A5topType) => {
+  const arr = [
+    ["txt", "标题", "name"],
+    ["txt", "年份", "year"],
+    ["img", "封面", "thumb"],
+    ["txt", "最近编辑日期", "updateTime"],
+    ["txt", "编辑人", "creatorName"],
+    ["txt", "排序值", "sort"],
+    ["txtChange", "状态", "display", { 0: "不发布", 1: "发布" }],
+  ];
+
+  if (val === "Exhibition") {
+    // 删除年份
+    arr.splice(1, 1);
+  }
+
+  return arr;
+};
+
 export const A8tableC = [
   ["txt", "字典值", "name"],
   ["txt", "最近编辑日期", "updateTime"],