From 12c4ffda1ed8477c4997d9630796365c72fa9f7c Mon Sep 17 00:00:00 2001
From: dminyi <1301963064@qq.com>
Date: Thu, 15 Aug 2024 11:14:10 +0800
Subject: [PATCH] 识别上传材料

---
 gz-customerSystem/src/components/MyUpload/index.jsx |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gz-customerSystem/src/components/MyUpload/index.jsx b/gz-customerSystem/src/components/MyUpload/index.jsx
index 06dbb69..2949f8c 100644
--- a/gz-customerSystem/src/components/MyUpload/index.jsx
+++ b/gz-customerSystem/src/components/MyUpload/index.jsx
@@ -2,8 +2,8 @@
  * @Company: hugeInfo
  * @Author: ldh
  * @Date: 2022-03-05 17:14:00
- * @LastEditTime: 2023-04-25 19:26:31
- * @LastEditors: lwh
+ * @LastEditTime: 2024-08-15 09:56:54
+ * @LastEditors: dminyi 1301963064@qq.com
  * @Version: 1.0.0
  * @Description: 公共上传组件
  * 附件类型对照
@@ -22,8 +22,9 @@
 import React, { useEffect, useState, useImperativeHandle } from 'react';
 import PropTypes from 'prop-types';
 import { Upload, Image } from 'antd';
-import { CloudUploadOutlined } from '@ant-design/icons';
+import { CloudUploadOutlined, PlusOutlined } from '@ant-design/icons';
 import * as $$ from '../../utils/utility';
+import { add } from '../../assets/images'
 
 const { Dragger } = Upload;
 
@@ -41,7 +42,7 @@
  * handleChangeFile, // 附件成功新增和成功删除触发事件,用于更新附件列表
  * formatType, // 附件格式类型,用于限制上传文件格式
  */
-const MyUpload = ({ ledgerType = false, type, accept, fileId, fileType, showFileList = true, fileList, handleChangeFile, myUploadRef, children, formatType = '格式支持PNG、JPG、PDF、DOC、DOCX、XLS、XLSX' }) => {
+const MyUpload = ({ ledgerType = false, type, accept, fileId, fileType, showFileList = true, fileList, handleChangeFile, fileIcon, myUploadRef, children, formatType = '格式支持PNG、JPG、PDF、DOC、DOCX、XLS、XLSX' }) => {
   let appUrl = $$.appUrl;
 
   // 单个预览图片控制
@@ -163,7 +164,8 @@
       ) : (
         <Dragger {...props}>
           <p className="ant-upload-drag-icon">
-            <CloudUploadOutlined />
+            {fileIcon ? <PlusOutlined style={{ color: 'rgba(0, 0, 0, 0.65)' }} /> :
+              <CloudUploadOutlined />}
           </p>
           <p style={{ fontSize: '14px' }}>点击上传图标或拖拽文件至此区域上传</p>
           <p className="ant-upload-hint">{formatType}</p>

--
Gitblit v1.8.0