diff --git a/src/components/card/CardProj.tsx b/src/components/card/CardProj.tsx index 8802f46..02401fd 100644 --- a/src/components/card/CardProj.tsx +++ b/src/components/card/CardProj.tsx @@ -164,6 +164,7 @@ export default function CardProj(props: any) { + {/* */} diff --git a/src/route/proj/ProjEditAll.tsx b/src/route/proj/ProjEditAll.tsx index 03555b5..6cbe49f 100644 --- a/src/route/proj/ProjEditAll.tsx +++ b/src/route/proj/ProjEditAll.tsx @@ -7,7 +7,7 @@ import { message, Modal, Tag, Upload, // GetProp, - UploadProps, + UploadProps, } from "antd"; import { UploadOutlined } from '@ant-design/icons'; import TextArea from "antd/es/input/TextArea"; @@ -50,6 +50,8 @@ import DisplayOrderShow from '../../route/proj/edit/ProjConfigMenuListShow.tsx' // } // type FileType = Parameters>[0]; export default function ProjEditAll() { + //证书img + const [certificate, setcertificate] = useState('') // 回复信息 const [aContent, setaContent] = useState('') // 回复问题的id @@ -58,6 +60,7 @@ export default function ProjEditAll() { const [uploadedFiles, setUploadedFiles] = useState([]); // 接口需要的文件id数组 // const [aFiles, setAFiles] = useState([]) + const [isUploadDisabled, setIsUploadDisabled] = useState(false); const props: UploadProps = { maxCount: 6,//上传限制最多6个 action: uploadFileUrl(), @@ -82,6 +85,7 @@ export default function ProjEditAll() { return Upload.LIST_IGNORE; // 不允许上传重复文件 } + return true; // 允许上传文件 }, onChange: (info) => { @@ -89,16 +93,20 @@ export default function ProjEditAll() { if (info.file.status === 'done') { message.success('上传成功'); // info.file.name = '协议文件'; - console.log('列表', info.fileList); + console.log('列表', info.file); setUploadedFiles([...uploadedFiles, info.file]); // 将上传成功的文件信息添加到列表中 // setUploadSignFileId(info.file.response.data.fileId); } else if (info.file.status === 'error') { message.error('上传失败'); } + setIsUploadDisabled(info.fileList.length >= 6); }, // action={uploadFileUrl()} - + onRemove: (info) => { + console.log('删除', info); + setUploadedFiles(prevFiles => prevFiles.filter(prevFile => prevFile.uid !== info.uid)); + } }; // const [uploadSignFileId, setUploadSignFileId] = useState(''); @@ -334,8 +342,11 @@ export default function ProjEditAll() { const renderData = () => { get({ messageApi: messageApi, - url: `/api/proj/get/${pathParams.projId}`, + // url: `/api/proj/get/${pathParams.projId}`, + url: `/api/proj/claim/get/${pathParams.projId}`, onSuccess({ data }) { + console.log('嘻嘻', data); + setcertificate(data.certificates) console.log('状态判断', data.pay.chargeAdditionals); // setShowZpi(true) // const isShow = data.pay.chargeAdditionals.includes('PKG') @@ -573,6 +584,15 @@ export default function ProjEditAll() { window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/${pathParams.projId}`) }} /> + + { + window.open(downloadUrl(certificate,false),'_blank') + }} + /> + {/* {*/} @@ -589,7 +609,7 @@ export default function ProjEditAll() {
暂无数据
-
+
{questionList.length == 0 ? (<> ) : (<> {questionList.map((item, index) => ( @@ -607,27 +627,44 @@ export default function ProjEditAll() { {item.qContent}
-
未通过原因:{item.reason}
- { + {/* */} + {item.qFileKVs.length == 0 ? (<>) : (<> + {item.qFileKVs.map((item: any, index: number) => ( + +
{ + // window.open(downloadUrl(item.key)) + window.open(downloadUrl(item.key,false),'_blank') + }}>{item.value}
+ + {/* , */} +
+ ))} + )}
+
未通过原因:{item.reason}
+
回复
{item.aContent}
- {JSON.parse(item.aFiles).map((fileName: string, index: number) => ( - - { - window.open(downloadUrl(fileName)) - }}>{fileName} - - , - - ))} + {item.aFileKVs.length == 0 ? (<>) : (<> + {item.aFileKVs.map((item: any, index: number) => ( + +
{ + // window.open(downloadUrl(item.key)) + window.open(downloadUrl(item.key,false),'_blank') + }}>{item.value}
+ + {/* , */} +
+ ))} + )} +
@@ -962,30 +999,32 @@ export default function ProjEditAll() { width={800} onOk={() => { console.log('上传文件', uploadedFiles); + // return console.log('上传信息', aContent) - if(aContent==''){ + if (aContent == '') { messageApi.open({ type: 'error', content: '请回复内容' }) - }else if(uploadedFiles.length == 0){ - + } else if (uploadedFiles.length == 0) { + messageApi.open({ type: 'error', content: '请上传文件' }) - }else{ + } else { put({ messageApi, url: `/api/proj/materials/add/update-a/${projMaterialsAddId}`, body: { aContent, - aFiles: uploadedFiles.map(file => file.response.data.fileId) + // aFiles: uploadedFiles.map(file => file.response.data.fileId) + aFiles: uploadedFiles.map(file => file.response.data.fileId).join(',') }, onBefore() { }, onSuccess() { - + // alert('编辑成功') messageApi.open({ type: 'success', @@ -997,7 +1036,7 @@ export default function ProjEditAll() { // window.location.reload(); // 刷新页面 }, 1000); // getProjOwnerList() - + }, onFinally() { } @@ -1047,7 +1086,7 @@ export default function ProjEditAll() {
- +
diff --git a/src/route/proj/proj-edit.css b/src/route/proj/proj-edit.css index a5b2942..0428943 100644 --- a/src/route/proj/proj-edit.css +++ b/src/route/proj/proj-edit.css @@ -116,7 +116,8 @@ margin-top: 10px; min-height: 40px; /* overflow: scroll; */ - text-align: justify; /* 让文字两端对齐 */ + /* text-align: justify; 让文字两端对齐 */ + width: 100%; }