From 3efcd38c47c327dcd8bd22cd523381d79d08770e Mon Sep 17 00:00:00 2001 From: dminyi <1301963064@qq.com> Date: Sat, 07 Sep 2024 16:56:44 +0800 Subject: [PATCH] 上传附件 --- gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) diff --git a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx index fd11eb0..0d9db5b 100644 --- a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx +++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx @@ -29,12 +29,16 @@ const InputSearch = Input.Search; const appUrl = $$.appUrl; -function delFile(id) { - return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'get', service: 'sys', data: { id } }); +function delFile(ids) { + return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'delete', service: 'sys', data: { ids } }); } function listIdTypeInfoApi(data) { return $$.ax.request({ url: `fileInfo/listIdTypeInfo`, type: 'post', service: 'sys', data }); +} + +function deleteFileByIdApi(data) { + return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'delete', service: 'sys', data }); } const VisitorRegister = (props) => { @@ -132,6 +136,16 @@ } } + //批量删除文件 + const deleteFileById = async (data) => { + const res = await deleteFileByIdApi(data) + if (res.type) { + $$.infoSuccess({ content: '删除成功!' }); + } + } + + + const listIdTypeInfo = async () => { const res = await listIdTypeInfoApi({ @@ -147,8 +161,8 @@ } } - // console.log(fakeData1,'fakeData1') - + console.log(fakeData1,'fakeData1') + @@ -163,7 +177,6 @@ action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&&ownerId=${props.mainId}&ownerType=22_00018-101`, }} field='file' - handleChangeFile={handleChangeFile} label='' editData={props.editData} handleDelFile={handleDelFile} @@ -184,14 +197,13 @@ action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&&ownerId=${props.mainId}&ownerType=22_00018-102`, }} field='file1' - handleChangeFile={handleChangeFile1} label='' editData={props.editData} handleDelFile={handleDelFile} onFileListChange={(v) => { SetEvidenceLength(v); console.log(v, 'vvsetFileLength') }} /> - {evidenceLength?.length > 0 && <div style={{ position: 'absolute', top: '198px', left: '16px', color: '#86909C' }}>申请材料累计上传:<span style={{ color: '#1A6FB8' }}>{evidenceLength?.length}</span></div>} + {evidenceLength?.length > 0 && <div style={{ position: 'absolute', top: '198px', left: '16px', color: '#86909C' }}>证据材料累计上传:<span style={{ color: '#1A6FB8' }}>{evidenceLength?.length}</span></div>} </Col> </> ) @@ -335,12 +347,16 @@ setEditData(value) } + + + + const uploadQuery = { mainId: props.mainId, ownerCat: null, createStart: null, createEnd: null, - uploaderType:null + uploaderType: null } // console.log(sourceType, 'sourceType') @@ -642,7 +658,7 @@ <Modal style={{ width: '1200px' }} visible={filesCheck} onCancel={() => setFilesCheck(false)} footer={null} title='查看事件材料' centered> {/* <div className="mediationWindow-modal-main" style={{ display: 'flex' }}> */} <div style={{ marginTop: '-16px' }}> - <NewFileCheck /> + <NewFileCheck /> </div> {/* </div> */} </Modal> -- Gitblit v1.8.0