|
@@ -1,7 +1,7 @@
|
|
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
|
import styles from "./index.module.scss";
|
|
|
import { A4_APIgetInfo, A4_APIsave } from "@/store/action/A4exhibit";
|
|
|
-import { Button, DatePicker, Form, FormInstance, Input } from "antd";
|
|
|
+import { Button, DatePicker, Form, FormInstance, Input, Select } from "antd";
|
|
|
import TextArea from "antd/es/input/TextArea";
|
|
|
import ZupOne from "@/components/ZupOne";
|
|
|
import dayjs from "dayjs";
|
|
@@ -24,6 +24,7 @@ function A4add({ addId, closeFu, addTableFu, editTableFu }: Props) {
|
|
|
FormBoxRef.current?.setFieldsValue({
|
|
|
...data,
|
|
|
myTime: dayjs(data.releaseDate),
|
|
|
+ type: data.type ? data.type : null,
|
|
|
});
|
|
|
|
|
|
// 设置封面图
|
|
@@ -78,9 +79,10 @@ function A4add({ addId, closeFu, addTableFu, editTableFu }: Props) {
|
|
|
const obj = {
|
|
|
...values,
|
|
|
id: addId > 0 ? addId : null,
|
|
|
- qrCode: qrCodeTemp.filePath ? qrCodeTemp.filePath : null,
|
|
|
+ qrCode: qrCodeTemp.filePath ? qrCodeTemp.filePath : "",
|
|
|
releaseDate,
|
|
|
thumb: coverUrl1.filePath,
|
|
|
+ type: values.type ? values.type : "",
|
|
|
};
|
|
|
const res = await A4_APIsave(obj);
|
|
|
if (res.code === 0) {
|
|
@@ -116,6 +118,19 @@ function A4add({ addId, closeFu, addTableFu, editTableFu }: Props) {
|
|
|
<Input maxLength={50} showCount placeholder="请输入内容" />
|
|
|
</Form.Item>
|
|
|
|
|
|
+ <Form.Item label="分类" name="type">
|
|
|
+ <Select
|
|
|
+ allowClear
|
|
|
+ placeholder="请选择"
|
|
|
+ style={{ width: 200 }}
|
|
|
+ options={[
|
|
|
+ { value: "回顾云展", label: "回顾云展" },
|
|
|
+ { value: "展厅云展", label: "展厅云展" },
|
|
|
+ { value: "馆藏系列云展", label: "馆藏系列云展" },
|
|
|
+ ]}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
+
|
|
|
<Form.Item label="简介" name="description">
|
|
|
<TextArea placeholder="请输入内容" showCount maxLength={1000} />
|
|
|
</Form.Item>
|
|
@@ -165,7 +180,7 @@ function A4add({ addId, closeFu, addTableFu, editTableFu }: Props) {
|
|
|
<DatePicker />
|
|
|
</Form.Item>
|
|
|
|
|
|
- {/* 封面 */}
|
|
|
+ {/* 二维码 */}
|
|
|
<div className="formRow">
|
|
|
<div className="formLeft">二维码:</div>
|
|
|
<div className="formRight">
|