forked from gzzfw/frontEnd/gzDyh

dminyi
2024-09-07 3efcd38c47c327dcd8bd22cd523381d79d08770e
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,7 +161,7 @@
    }
  }
  // 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,6 +347,10 @@
    setEditData(value)
  }
  const uploadQuery = {
    mainId: props.mainId,
    ownerCat: null,