diff --git a/src/route/CopyrightGgoods/CopyrightGgoods.tsx b/src/route/CopyrightGgoods/CopyrightGgoods.tsx index 5aa5cfd..0034828 100644 --- a/src/route/CopyrightGgoods/CopyrightGgoods.tsx +++ b/src/route/CopyrightGgoods/CopyrightGgoods.tsx @@ -33,7 +33,7 @@ export default function CopyrightGgoods() { { name: '智能管理系统', short: '简称', - number: '123456789123456789', + number: '31234567891234561789', price: '5.00', version: '1-1-1', time: '2020-04-19 15:42:21', @@ -42,7 +42,7 @@ export default function CopyrightGgoods() { { name: '商城管理系统', short: '简称', - number: '123456789123456789', + number: '1123456789123456789', price: '5.00', version: '1-1-1', time: '2020-04-19 15:42:21', @@ -51,7 +51,7 @@ export default function CopyrightGgoods() { { name: 'xx系统', short: '简称', - number: '123456789123456789', + number: '2123456789123456789', price: '5.00', version: '1-1-1', time: '2020-04-19 15:42:21', @@ -133,7 +133,8 @@ export default function CopyrightGgoods() { description={ '暂无数据' } /> - ) : () : ( +
( index + 1 @@ -182,7 +183,7 @@ export default function CopyrightGgoods() { render={(_text, record: any) => ( { - console.log(record.order); + console.log(record.number); }}>预览 diff --git a/src/route/ProductRelease/ProductRelease.tsx b/src/route/ProductRelease/ProductRelease.tsx index f13d60e..35f305d 100644 --- a/src/route/ProductRelease/ProductRelease.tsx +++ b/src/route/ProductRelease/ProductRelease.tsx @@ -3,15 +3,17 @@ import './product-release.css' import { Select, DatePicker, Button, // message, - Checkbox, Empty, Switch + Checkbox, Empty, Switch, Modal } from 'antd'; +import EditModal from './components/EditModal/EditModal' // import type { CheckboxProps } from 'antd'; -import { SearchOutlined,ClearOutlined } from '@ant-design/icons'; +import { SearchOutlined, ClearOutlined } from '@ant-design/icons'; import type { DatePickerProps } from 'antd'; import locale from 'antd/es/date-picker/locale/zh_CN'; import React, { useState } from 'react'; import dayjs, { } from 'dayjs'; export default function ProductRelease() { + const height = window.innerHeight - 180; // const [messageApi, contextHolder] = message.useMessage(); const dateFormat = 'YYYY年MM月DD日'; // 所属人类型 @@ -29,8 +31,17 @@ export default function ProductRelease() { console.log('日期', dayjs(date).format(dateFormat)); }; - const height = window.innerHeight - 180; + // 初始化搜索条件 + const init = () => { + setBelongType(undefined) + setDate(undefined) + } + // 点击清除 + const clearKeyWords = () => { + init() + // 重新获取数据 + } // 选框选择时触发事件 const checkChange = (e: any, item: any) => { console.log(`checked = ${e.target.checked}`); @@ -49,17 +60,28 @@ export default function ProductRelease() { console.log('关闭', item.order); } } + // 控制编辑弹窗 + const [editModalOpen, setEditModalOpen] = useState(false) // 点击编辑 const edit = (item: any) => { console.log(item.order); + setEditModalOpen(true) }; + // 控制删除弹窗 + const [delModalOpen, setDelModalOpen] = useState(false) // 点击删除 const del = (item: any) => { console.log(item.order); + setDelModalOpen(true) }; + // 删除点击确认 + + // 控制出售弹窗 + const [sellModalOpen, setSellModalOpen] = useState(false) // 点击出售 const sell = (item: any) => { console.log(item.order); + setSellModalOpen(true) }; // 点击提交 const submit = (item: any) => { @@ -154,13 +176,15 @@ export default function ProductRelease() { icon={}> 搜索 - @@ -253,6 +277,73 @@ export default function ProductRelease() { + + {/* 编辑弹窗 */} + { + setEditModalOpen(false); + }} + > +
+ +
+
+ {/* 删除弹窗 */} + { + setDelModalOpen(false) + }} + onCancel={() => { + setDelModalOpen(false) + }} + okButtonProps={{ style: { background: 'red', color: 'white' } }} + style={{ + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + height: `${height}px`, + }}> +
+ 删除后这条信息将不被保存,确定删除吗? +
+
+ {/* 出售弹窗 */} + { + setSellModalOpen(false) + }} + onCancel={() => { + setSellModalOpen(false) + }} + okButtonProps={{ style: { background: '#28915A', color: 'white' } }} + style={{ + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + height: `${height}px`, + }}> +
+ 确定出售接口管理系统的软件著作权证吗? +
+
) } diff --git a/src/route/ProductRelease/components/EditModal/EditModal.css b/src/route/ProductRelease/components/EditModal/EditModal.css new file mode 100644 index 0000000..56c0dee --- /dev/null +++ b/src/route/ProductRelease/components/EditModal/EditModal.css @@ -0,0 +1,31 @@ +.editModal { + padding: 32px 32px 58px 33px; + box-sizing: border-box; + +} + +.editModal-title { + display: flex; + align-items: center; +} + +.editModal-title-box { + width: 10px; + height: 21px; + background: #0072FF; + border-radius: 5px; +} + +.editModal-title-name { + font-size: 16px; + color: #222222; + font-weight: 700; + margin-left: 9px; +} + +.editModal-img-box { + width: 489px; + height: 60px; + background: #F8F8F8; + border-radius: 5px; +} \ No newline at end of file diff --git a/src/route/ProductRelease/components/EditModal/EditModal.tsx b/src/route/ProductRelease/components/EditModal/EditModal.tsx new file mode 100644 index 0000000..dfcdc4b --- /dev/null +++ b/src/route/ProductRelease/components/EditModal/EditModal.tsx @@ -0,0 +1,188 @@ +// import React from 'react' +import { + Col, Flex, Row, + // Select, + Button, Form, Input +} from "antd"; + +import './EditModal.css' +// const { TextArea } = Input; +export default function EditModal() { + const [form] = Form.useForm(); + return ( +
+
+
+
软著信息
+
+
+
{ + // setIsEditModalOpen(true); + // }} + autoComplete="off" + > + + +
+ + + + + + + + +
+ +
+
+ + + + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + {/* + +
+
* 项目简介:
+
+ + +