修改
This commit is contained in:
parent
75c8a8a788
commit
f2202f1674
@ -164,6 +164,7 @@ export default function CardProj(props: any) {
|
|||||||
<img src={downloadUrl(data.codeTypePage.previewImgs)} width={'249px'} height={'143px'} alt="" />
|
<img src={downloadUrl(data.codeTypePage.previewImgs)} width={'249px'} height={'143px'} alt="" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</Carousel>
|
</Carousel>
|
||||||
</div>
|
</div>
|
||||||
{/* <img src={downloadUrl(data.codeTypePage.previewImgs)} className='cpb-left-img' alt="" /> */}
|
{/* <img src={downloadUrl(data.codeTypePage.previewImgs)} className='cpb-left-img' alt="" /> */}
|
||||||
|
@ -50,6 +50,8 @@ import DisplayOrderShow from '../../route/proj/edit/ProjConfigMenuListShow.tsx'
|
|||||||
// }
|
// }
|
||||||
// type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
|
// type FileType = Parameters<GetProp<UploadProps, 'beforeUpload'>>[0];
|
||||||
export default function ProjEditAll() {
|
export default function ProjEditAll() {
|
||||||
|
//证书img
|
||||||
|
const [certificate, setcertificate] = useState('')
|
||||||
// 回复信息
|
// 回复信息
|
||||||
const [aContent, setaContent] = useState('')
|
const [aContent, setaContent] = useState('')
|
||||||
// 回复问题的id
|
// 回复问题的id
|
||||||
@ -58,6 +60,7 @@ export default function ProjEditAll() {
|
|||||||
const [uploadedFiles, setUploadedFiles] = useState<any[]>([]);
|
const [uploadedFiles, setUploadedFiles] = useState<any[]>([]);
|
||||||
// 接口需要的文件id数组
|
// 接口需要的文件id数组
|
||||||
// const [aFiles, setAFiles] = useState<string[]>([])
|
// const [aFiles, setAFiles] = useState<string[]>([])
|
||||||
|
const [isUploadDisabled, setIsUploadDisabled] = useState(false);
|
||||||
const props: UploadProps = {
|
const props: UploadProps = {
|
||||||
maxCount: 6,//上传限制最多6个
|
maxCount: 6,//上传限制最多6个
|
||||||
action: uploadFileUrl(),
|
action: uploadFileUrl(),
|
||||||
@ -82,6 +85,7 @@ export default function ProjEditAll() {
|
|||||||
return Upload.LIST_IGNORE; // 不允许上传重复文件
|
return Upload.LIST_IGNORE; // 不允许上传重复文件
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return true; // 允许上传文件
|
return true; // 允许上传文件
|
||||||
},
|
},
|
||||||
onChange: (info) => {
|
onChange: (info) => {
|
||||||
@ -89,16 +93,20 @@ export default function ProjEditAll() {
|
|||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
message.success('上传成功');
|
message.success('上传成功');
|
||||||
// info.file.name = '协议文件';
|
// info.file.name = '协议文件';
|
||||||
console.log('列表', info.fileList);
|
console.log('列表', info.file);
|
||||||
setUploadedFiles([...uploadedFiles, info.file]); // 将上传成功的文件信息添加到列表中
|
setUploadedFiles([...uploadedFiles, info.file]); // 将上传成功的文件信息添加到列表中
|
||||||
// setUploadSignFileId(info.file.response.data.fileId);
|
// setUploadSignFileId(info.file.response.data.fileId);
|
||||||
|
|
||||||
} else if (info.file.status === 'error') {
|
} else if (info.file.status === 'error') {
|
||||||
message.error('上传失败');
|
message.error('上传失败');
|
||||||
}
|
}
|
||||||
|
setIsUploadDisabled(info.fileList.length >= 6);
|
||||||
},
|
},
|
||||||
// action={uploadFileUrl()}
|
// action={uploadFileUrl()}
|
||||||
|
onRemove: (info) => {
|
||||||
|
console.log('删除', info);
|
||||||
|
setUploadedFiles(prevFiles => prevFiles.filter(prevFile => prevFile.uid !== info.uid));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// const [uploadSignFileId, setUploadSignFileId] = useState('');
|
// const [uploadSignFileId, setUploadSignFileId] = useState('');
|
||||||
@ -334,8 +342,11 @@ export default function ProjEditAll() {
|
|||||||
const renderData = () => {
|
const renderData = () => {
|
||||||
get<any>({
|
get<any>({
|
||||||
messageApi: messageApi,
|
messageApi: messageApi,
|
||||||
url: `/api/proj/get/${pathParams.projId}`,
|
// url: `/api/proj/get/${pathParams.projId}`,
|
||||||
|
url: `/api/proj/claim/get/${pathParams.projId}`,
|
||||||
onSuccess({ data }) {
|
onSuccess({ data }) {
|
||||||
|
console.log('嘻嘻', data);
|
||||||
|
setcertificate(data.certificates)
|
||||||
console.log('状态判断', data.pay.chargeAdditionals);
|
console.log('状态判断', data.pay.chargeAdditionals);
|
||||||
// setShowZpi(true)
|
// setShowZpi(true)
|
||||||
// const isShow = data.pay.chargeAdditionals.includes('PKG')
|
// 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(`${Axios.defaults?.baseURL}/route/proj/download/code/${pathParams.projId}`)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<CardProjDownload title="证书下载"
|
||||||
|
desc="点击下载证书"
|
||||||
|
canBtnClick={certificate!=''}
|
||||||
|
handleDownload={() => {
|
||||||
|
window.open(downloadUrl(certificate,false),'_blank')
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
{/*<CardProjJump title="找代理"*/}
|
{/*<CardProjJump title="找代理"*/}
|
||||||
{/* desc="到软著代理完成软著申请"*/}
|
{/* desc="到软著代理完成软著申请"*/}
|
||||||
{/* handleJump={() => {*/}
|
{/* handleJump={() => {*/}
|
||||||
@ -589,7 +609,7 @@ export default function ProjEditAll() {
|
|||||||
<div style={{ display: questionList.length == 0 ? 'block' : 'none' }} className='editAll-boxNo-con'>
|
<div style={{ display: questionList.length == 0 ? 'block' : 'none' }} className='editAll-boxNo-con'>
|
||||||
暂无数据
|
暂无数据
|
||||||
</div>
|
</div>
|
||||||
<div style={{ marginTop: 50, maxHeight: `${height - 230}px`, overflow: 'auto' }}>
|
<div style={{ marginTop: 50, maxHeight: `${height - 230}px`, overflow: 'auto',width:'100%' }}>
|
||||||
{questionList.length == 0 ? (<>
|
{questionList.length == 0 ? (<>
|
||||||
</>) : (<>
|
</>) : (<>
|
||||||
{questionList.map((item, index) => (
|
{questionList.map((item, index) => (
|
||||||
@ -607,27 +627,44 @@ export default function ProjEditAll() {
|
|||||||
{item.qContent}
|
{item.qContent}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className='unReason' style={{ display: item.status == 'UN_PASSED' ? 'block' : 'none' }}>未通过原因:{item.reason}</div>
|
|
||||||
<div className='fileBox' >
|
<div className='fileBox' >
|
||||||
<a style={{ cursor: 'pointer' }} onClick={() => {
|
{/* <div style={{ cursor: 'pointer' }} onClick={() => {
|
||||||
window.open(downloadUrl(item.qFiles))
|
window.open(downloadUrl(item.qFiles))
|
||||||
}}>{item.qFiles}</a>
|
}}>{item.qFiles}</div> */}
|
||||||
|
{item.qFileKVs.length == 0 ? (<></>) : (<>
|
||||||
|
{item.qFileKVs.map((item: any, index: number) => (
|
||||||
|
<span key={index}>
|
||||||
|
<div style={{ cursor: 'pointer', color: 'var(--color-blue)', wordWrap: 'break-word', widows: '100%' }} onClick={() => {
|
||||||
|
// window.open(downloadUrl(item.key))
|
||||||
|
window.open(downloadUrl(item.key,false),'_blank')
|
||||||
|
}}>{item.value} </div>
|
||||||
|
|
||||||
|
{/* <span style={{ marginRight: 5, visibility: index + 1 == JSON.parse(item.aFiles).length ? 'hidden' : 'visible' }}>,</span> */}
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
|
</>)}
|
||||||
</div>
|
</div>
|
||||||
|
<div className='unReason' style={{ display: item.status == 'UN_PASSED' ? 'block' : 'none' }}>未通过原因:{item.reason}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className='boxtitle' style={{}}>回复</div>
|
<div className='boxtitle' style={{}}>回复</div>
|
||||||
<div className='boxtextBot'>
|
<div className='boxtextBot'>
|
||||||
<div style={{ maxHeight: '100px', overflow: 'auto', fontSize: 16 }}>{item.aContent}</div>
|
<div style={{ maxHeight: '100px', overflow: 'auto', fontSize: 16 }}>{item.aContent}</div>
|
||||||
|
|
||||||
<div className='fileBox'>
|
<div className='fileBox'>
|
||||||
{JSON.parse(item.aFiles).map((fileName: string, index: number) => (
|
{item.aFileKVs.length == 0 ? (<></>) : (<>
|
||||||
|
{item.aFileKVs.map((item: any, index: number) => (
|
||||||
<span key={index}>
|
<span key={index}>
|
||||||
<a style={{ cursor: 'pointer', }} onClick={() => {
|
<div style={{ cursor: 'pointer', color: 'var(--color-blue)' }} onClick={() => {
|
||||||
window.open(downloadUrl(fileName))
|
// window.open(downloadUrl(item.key))
|
||||||
}}>{fileName} </a>
|
window.open(downloadUrl(item.key,false),'_blank')
|
||||||
|
}}>{item.value} </div>
|
||||||
|
|
||||||
<span style={{marginRight:5, visibility: index + 1 == JSON.parse(item.aFiles).length ? 'hidden' : 'visible' }}>,</span>
|
{/* <span style={{ marginRight: 5, visibility: index + 1 == JSON.parse(item.aFiles).length ? 'hidden' : 'visible' }}>,</span> */}
|
||||||
</span>
|
</span>
|
||||||
))}
|
))}
|
||||||
|
</>)}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||||
@ -962,6 +999,7 @@ export default function ProjEditAll() {
|
|||||||
width={800}
|
width={800}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
console.log('上传文件', uploadedFiles);
|
console.log('上传文件', uploadedFiles);
|
||||||
|
// return
|
||||||
console.log('上传信息', aContent)
|
console.log('上传信息', aContent)
|
||||||
if (aContent == '') {
|
if (aContent == '') {
|
||||||
messageApi.open({
|
messageApi.open({
|
||||||
@ -980,7 +1018,8 @@ export default function ProjEditAll() {
|
|||||||
url: `/api/proj/materials/add/update-a/${projMaterialsAddId}`,
|
url: `/api/proj/materials/add/update-a/${projMaterialsAddId}`,
|
||||||
body: {
|
body: {
|
||||||
aContent,
|
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() {
|
onBefore() {
|
||||||
},
|
},
|
||||||
@ -1047,7 +1086,7 @@ export default function ProjEditAll() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Upload {...props} listType="picture" multiple>
|
<Upload {...props} listType="picture" multiple>
|
||||||
<Button icon={<UploadOutlined />}>上传</Button>
|
<Button disabled={isUploadDisabled} icon={<UploadOutlined />}>上传</Button>
|
||||||
</Upload>
|
</Upload>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -116,7 +116,8 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
min-height: 40px;
|
min-height: 40px;
|
||||||
/* overflow: scroll; */
|
/* overflow: scroll; */
|
||||||
text-align: justify; /* 让文字两端对齐 */
|
/* text-align: justify; 让文字两端对齐 */
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user