编辑页面显示下载txt

This commit is contained in:
lyp 2025-03-11 15:34:41 +08:00
parent 535c7264b3
commit 5e52c240d0
4 changed files with 9 additions and 6 deletions

View File

@ -19,7 +19,7 @@ export default function CardProjDownload(props: IProjDownload) {
{
props.canBtnClick ? (
<div>
<div style={{ display: props.title == '申请表' || props.title == '证书下载' ? 'unset' : 'none' }}>
<div style={{ display: props.title == '证书下载' ? 'unset' : 'none' }}>
<a href="/#" className="cpDown-edit" style={{ minWidth: 30 }} onClick={(e) => {
e.preventDefault();
props.handleDownload();
@ -78,7 +78,7 @@ export default function CardProjDownload(props: IProjDownload) {
</div>
<div style={{ display: props.title == '操作手册' || props.title == '源代码' ? 'unset' : 'none' }}>
<div style={{ display: props.title == '申请表' ||props.title == '操作手册' || props.title == '源代码' ? 'unset' : 'none' }}>
<a href="/#" className="cpDown-edit" style={{ minWidth: 30}} onClick={(e) => {
e.preventDefault();
@ -87,7 +87,7 @@ export default function CardProjDownload(props: IProjDownload) {
<a href="/#" className="cpDown-edit" style={{ minWidth: 30, marginLeft: 5 }} onClick={(e) => {
e.preventDefault();
props.downPdf();
}}>pdf</a>
}}>{props.title == '申请表'?'txt':'pdf'}</a>
</div>
</div>
) : (
@ -95,18 +95,18 @@ export default function CardProjDownload(props: IProjDownload) {
// e.preventDefault();
// }}>下载</a>
<div>
<div style={{ display: props.title == '申请表' || props.title == '代码压缩包' ? 'unset' : 'none' }}>
<div style={{ display: props.title == '代码压缩包' ? 'unset' : 'none' }}>
<a href="/#" className="cpDown-noedit" style={{ color: '#c2c2c2', minWidth: 30 }} onClick={(e) => {
e.preventDefault();
}}></a>
</div>
<div style={{ display: props.title == '操作手册' || props.title == '源代码' ? 'unset' : 'none' }}>
<div style={{ display: props.title == '申请表' || props.title == '操作手册' || props.title == '源代码' ? 'unset' : 'none' }}>
<div style={{ color: '#c2c2c2' }}> <a href="/#" className="cpDown-noedit" style={{ color: '#c2c2c2', minWidth: 30 }} onClick={(e) => {
e.preventDefault();
}} >word</a> <a href="/#" className="cpDown-noedit" style={{ color: '#c2c2c2', minWidth: 30 }} onClick={(e) => {
e.preventDefault();
}}>pdf</a></div>
}}>{props.title == '申请表'?'txt':'pdf'}</a></div>
</div>
</div>
)

View File

@ -709,6 +709,7 @@ export default function ProjEdit() {
window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/${pathParams.projId}`)
}}
downPdf={() => {
window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply-txt/${pathParams.projId}`)
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/pdf/${pathParams.projId}`)
}}
/>

View File

@ -661,6 +661,7 @@ export default function ProjEditAll() {
window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/${pathParams.projId}`)
}}
downPdf={() => {
window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply-txt/${pathParams.projId}`)
}}
/>
<CardProjDownload title="操作手册"

View File

@ -618,6 +618,7 @@ export default function ProjEdit() {
window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/${pathParams.projId}`)
}}
downPdf={() => {
window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply-txt/${pathParams.projId}`)
// window.open(`${Axios.defaults?.baseURL}/route/proj/download/apply/pdf/${pathParams.projId}`)
}}
/>