diff --git a/.env.dev b/.env.dev index 5a4483b..6866742 100644 --- a/.env.dev +++ b/.env.dev @@ -9,8 +9,8 @@ VITE_WEBSOCKET_BASE_URL=ws://${VITE_HOST}:7025/copyright VITE_USERID=80d3365e-0597-4988-979e-18ef1c3ec671 # VITE_USERID=e3e40f95-7a3f-4b53-a1a0-51dd4e881d74 # VITE_USERID=5cc90b84-905e-4027-9f6c-ab47e9c320a1 -# VITE_CURRENT_THEME=fzkj -VITE_CURRENT_THEME=mzw +VITE_CURRENT_THEME=fzkj +# VITE_CURRENT_THEME=mzw # VITE_HOST=121.36.71.250:58038 # VITE_BASE_URL=http://${VITE_HOST} # VITE_COPY_BASE_URL=${VITE_BASE_URL} diff --git a/src/components/ReplaceModal/ReplaceModal.tsx b/src/components/ReplaceModal/ReplaceModal.tsx deleted file mode 100644 index 923ccc3..0000000 --- a/src/components/ReplaceModal/ReplaceModal.tsx +++ /dev/null @@ -1,464 +0,0 @@ -// import React from 'react' -import { useEffect, useState } from 'react' -// import './RefunModal.css' -import { - Form, - // Select, - Button, Upload, message, Input, Modal, Table, Empty -} from 'antd'; -import type { TableColumnsType } from 'antd'; -const { Search } = Input; -import { UploadOutlined } from '@ant-design/icons'; -import { - // DevUserId - get, post, uploadFileUrl -} from "../../util/AjaxUtils.ts"; -// import { getMenuActive } from '../../util/cache.ts' -import { useDispatch } from 'react-redux' -const { TextArea } = Input; -interface DataType { - // key: React.Key; - projName: string; - projContext: string; - gmtCreate: string; - projId: string -} -export default function ReplaceModal(props: any) { - const token = sessionStorage.getItem('token') - const columns: TableColumnsType = [ - { - title: '序号', - dataIndex: 'index', - align: 'center', - width: 80, - render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 - }, - { - title: '项目名称', - dataIndex: 'projName', - align: 'center', - - render: (text: string) => <>{text}, - }, - // { - // title: '已通过补正次数', - // dataIndex: 'approvedCount', - // align: 'center', - // width: 130, - // render: (text) => <>{text}, // 显示序号,从1开始 - // }, - { - title: '所属者名称', - dataIndex: 'applyContactName', - align: 'center', - - render: (text: string) => <>{text}, - }, - { - title: '编号', - dataIndex: 'projContext', - align: 'center', - - - }, - { - title: '创建时间', - dataIndex: 'gmtCreate', - align: 'center', - - }, - ]; - - const [messageApi, contextHolder] = message.useMessage(); - // 选择项目得临时name - const [newprojName, setnewprojName] = useState('') - // 选择项目得name - const [projName, setProjName] = useState('') - // 选择得项目临时id - const [newprojId, setnewProjId] = useState('') - // 选择 项目的id - const [projId, setProjId] = useState('') - //默认选择得项目 - const [selectedRowKeys, setselectedRowKeys] = useState([]) - // 分页 - const [page, setPage] = useState(1) - const [total, setTotal] = useState(0) - // 搜索关键字 - const [keywords, setKeywords] = useState('') - // 选择项目弹窗 - const [projModal, setProjModal] = useState(false) - // 上传附件 - const [correctionArray, setCorrectionArray] = useState([]); - // const [selectedReason, setSelectedReason] = useState(''); //选择原因 - - // const handleReasonChange = (value: any) => { - // setSelectedReason(value); - // }; - // 获取当前选择类型 - // const type = getMenuActive() == 'Correction-PENDING' ? 'PENDING' : getMenuActive() == 'Correction-APPROVED' ? 'APPROVED' : getMenuActive() == 'Correction-REJECTED' ? 'REJECTED' : getMenuActive() == 'Correction-CANCELED' ? 'CANCELED' : '' - const dispath = useDispatch() - const [correctionDataArray, setCorrectionDataArray] = useState([]) //未补正项目 - const [isDisabled, setIsDisabled] = useState(false) //提交按钮是否禁用 - const [form] = Form.useForm(); - // 关键字搜索 - const handleSearch = (value: string) => { - setKeywords(value) - } - const handleChange = (e: any) => { - if (e.target.value == '') { - setKeywords('') - } - } - // 提交表单 - const onFinish = (values: any) => { - dispath({ - type: 'newReplace', - val: true - }) - // console.log('Form values:', values); - - // console.log(refunArray); - - // console.log(values); - post({ - messageApi, - url: `/api/proj/rename/apply/save`, - body: { - projId: projId, - renameReason: values.other, - renameVoucher: correctionArray.join(','), - // correctionType: values.correctionType - }, - onBefore() { - setIsDisabled(true) - }, - onSuccess() { - messageApi.success('提交成功') - setIsDisabled(true) - setTimeout(() => { - props.closeModal() - - }, 500) - - getData() - - - - }, - onFinally() { - setIsDisabled(false) - } - }) - }; - const getData = () => { - get({ - messageApi, - url: `/api/proj/rename/apply/listpage/self`, - config: { - params: { - page: 1, - rows: 20, - applyStatus: '' - } - }, - onSuccess(data: any) { - // console.log('更新'); - - // dispath({ - // type: 'upCorrectionArray', - // val: data.data.rows - // }) - // dispath({ - // type: 'upCorrectionTotal', - // val: data.data.total - // }) - dispath({ - type: 'upReplaceArray', - val: data.data.rows - }) - dispath({ - type: 'upReplaceTotal', - val: data.data.total - }) - - - } - }) - } - // 获取未补正项目 - const getCorrectionData = () => { - get({ - messageApi, - url: `/api/proj/rename/apply/listpage-proj-unapply/self`, - config: { - params: { - page: page, - rows: 20, - keywords - } - }, - onBefore() { - - - }, - onSuccess(data: any) { - // console.log(data.data.rows); - // const newArray = (data.data).map((item: { projId: any; projName: any; }) => ({ - // value: item.projId, - // label: item.projName - // })) - setCorrectionDataArray(data.data.rows) - setTotal(data.data.total) - - }, - onFinally() { - - - }, - }) - } - - useEffect(() => { - getCorrectionData() - - - }, [page, keywords]) - - return ( -
- {contextHolder} -
-
-
- 换名软著* -
-
- - - - - - -
{ - setProjModal(true) - setKeywords('') - setPage(1) - getCorrectionData() - }}> - 选择 -
-
-
- -
-
- 换名原因* -
- -