|
@@ -1,7 +1,6 @@
|
|
-import AuthButton from "@/components/AuthButton";
|
|
|
|
import BreadTit from "@/components/BreadTit";
|
|
import BreadTit from "@/components/BreadTit";
|
|
import history, { urlParameter } from "@/utils/history";
|
|
import history, { urlParameter } from "@/utils/history";
|
|
-import { Input, message, Select, Table, Popconfirm } from "antd";
|
|
|
|
|
|
+import { Input, message, Select, Table, Popconfirm, Button } from "antd";
|
|
import TextArea from "antd/es/input/TextArea";
|
|
import TextArea from "antd/es/input/TextArea";
|
|
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
import { useLocation } from "react-router-dom";
|
|
import { useLocation } from "react-router-dom";
|
|
@@ -11,7 +10,6 @@ import ImageLazy from "@/components/ImageLazy/index";
|
|
import { useSelector } from "react-redux";
|
|
import { useSelector } from "react-redux";
|
|
import { RootState } from "@/store";
|
|
import { RootState } from "@/store";
|
|
function AddObject1() {
|
|
function AddObject1() {
|
|
-
|
|
|
|
// 从仓库中获取藏品来源下拉数据
|
|
// 从仓库中获取藏品来源下拉数据
|
|
const options = useSelector(
|
|
const options = useSelector(
|
|
(state: RootState) => state.loginStore.selectAll["文物来源"]
|
|
(state: RootState) => state.loginStore.selectAll["文物来源"]
|
|
@@ -28,7 +26,7 @@ function AddObject1() {
|
|
const [addInfoTop, setAddInfoTop] = useState({
|
|
const [addInfoTop, setAddInfoTop] = useState({
|
|
num: "DJ20221212009",
|
|
num: "DJ20221212009",
|
|
user: "admin",
|
|
user: "admin",
|
|
- laiyuan: options[0].name?options[0].name:'',
|
|
|
|
|
|
+ laiyuan: options[0].name ? options[0].name : "",
|
|
txt: "",
|
|
txt: "",
|
|
});
|
|
});
|
|
|
|
|
|
@@ -37,8 +35,6 @@ function AddObject1() {
|
|
setAddInfoTop({ ...addInfoTop, laiyuan: value });
|
|
setAddInfoTop({ ...addInfoTop, laiyuan: value });
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
// 表格数据
|
|
// 表格数据
|
|
|
|
|
|
// 选中的表格数据
|
|
// 选中的表格数据
|
|
@@ -105,18 +101,18 @@ function AddObject1() {
|
|
title: "操作",
|
|
title: "操作",
|
|
render: (item: any) => (
|
|
render: (item: any) => (
|
|
<>
|
|
<>
|
|
- <AuthButton type="text" danger onClick={() => addPageFu(item.id)}>
|
|
|
|
|
|
+ <Button type="text" danger onClick={() => addPageFu(item.id)}>
|
|
编辑
|
|
编辑
|
|
- </AuthButton>
|
|
|
|
|
|
+ </Button>
|
|
<Popconfirm
|
|
<Popconfirm
|
|
title="确定删除吗?"
|
|
title="确定删除吗?"
|
|
okText="确定"
|
|
okText="确定"
|
|
cancelText="取消"
|
|
cancelText="取消"
|
|
onConfirm={() => delOne(item.id)}
|
|
onConfirm={() => delOne(item.id)}
|
|
>
|
|
>
|
|
- <AuthButton type="text" danger>
|
|
|
|
|
|
+ <Button type="text" danger>
|
|
删除
|
|
删除
|
|
- </AuthButton>
|
|
|
|
|
|
+ </Button>
|
|
</Popconfirm>
|
|
</Popconfirm>
|
|
</>
|
|
</>
|
|
),
|
|
),
|
|
@@ -151,8 +147,6 @@ function AddObject1() {
|
|
setAddPage(true);
|
|
setAddPage(true);
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
return (
|
|
return (
|
|
<div className={styles.AddObject1}>
|
|
<div className={styles.AddObject1}>
|
|
<div className="breadTit">
|
|
<div className="breadTit">
|
|
@@ -213,7 +207,7 @@ function AddObject1() {
|
|
<div className="addTableBox_Tit">
|
|
<div className="addTableBox_Tit">
|
|
<div className="addTableBox_TitL">藏品信息</div>
|
|
<div className="addTableBox_TitL">藏品信息</div>
|
|
<div className="addTableBox_TitR">
|
|
<div className="addTableBox_TitR">
|
|
- <AuthButton onClick={() => addPageFu(null)}>添加</AuthButton>
|
|
|
|
|
|
+ <Button onClick={() => addPageFu(null)}>添加</Button>
|
|
 
|
|
 
|
|
<Popconfirm
|
|
<Popconfirm
|
|
title="确定删除吗?"
|
|
title="确定删除吗?"
|
|
@@ -221,9 +215,7 @@ function AddObject1() {
|
|
cancelText="取消"
|
|
cancelText="取消"
|
|
onConfirm={delTableListFu}
|
|
onConfirm={delTableListFu}
|
|
>
|
|
>
|
|
- <AuthButton disabled={tableSelectList.length === 0}>
|
|
|
|
- 删除
|
|
|
|
- </AuthButton>
|
|
|
|
|
|
+ <Button disabled={tableSelectList.length === 0}>删除</Button>
|
|
</Popconfirm>
|
|
</Popconfirm>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -242,13 +234,13 @@ function AddObject1() {
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div className="addTableBox_btn">
|
|
<div className="addTableBox_btn">
|
|
- <AuthButton onClick={() => submitFu(1)}>存入草稿</AuthButton>
|
|
|
|
|
|
+ <Button onClick={() => submitFu(1)}>存入草稿</Button>
|
|
 
|
|
 
|
|
- <AuthButton type="primary" onClick={() => submitFu(1)}>
|
|
|
|
|
|
+ <Button type="primary" onClick={() => submitFu(1)}>
|
|
提交
|
|
提交
|
|
- </AuthButton>
|
|
|
|
|
|
+ </Button>
|
|
 
|
|
 
|
|
- <AuthButton onClick={cancelFu}>返回</AuthButton>
|
|
|
|
|
|
+ <Button onClick={cancelFu}>返回</Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|