From 61f77fc8ebbfaa7cd516aa24e628da8fab9c8794 Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Thu, 05 Sep 2024 10:00:06 +0800
Subject: [PATCH] feat: 事件流转静态

---
 gz-customerSystem/src/views/register/visit/component/agentDialog.jsx |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx b/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
index ddc860f..911d774 100644
--- a/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
@@ -4,6 +4,7 @@
 import KeyVisits from "@/components/personCard/KeyVisits";
 import * as $$ from '@/utils/utility';
 import ArcoUpload from '@/components/ArcoUpload';
+import { Scrollbars } from "react-custom-scrollbars";
 
 const FormItem = Form.Item;
 const Option = Select.Option;
@@ -14,6 +15,10 @@
 
 function getId() {
   return $$.ax.request({ url: `caseUtils/getNewTimeId`, type: 'get', service: 'utils' });
+}
+
+function delFile(id) {
+  return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'get', service: 'sys', data: { id } });
 }
 
 export default function AgentDialog(props) {
@@ -94,9 +99,17 @@
     }
   }
 
+  //删除文件
+  const handleDelFile = async (id) => {
+    const res = await delFile(id)
+    if (res.type) {
+      $$.infoSuccess({ content: '删除成功!' });
+    }
+  }
+
   return (
     <div className="applyDialog">
-      <div style={{ height: '590px', overflowY: 'scroll' }}>
+      <Scrollbars style={{ height: '590px' }} autoHide>
         <Row gutter={[16, 16]} style={{ margin: '0 2px 0 0' }}>
           <Col span={24}>
             <Form
@@ -108,7 +121,7 @@
               scrollToFirstError
             >
               <Row gutter={[32, 0]} style={{ margin: '0 -10px' }}>
-                <Col span={24}>
+                <Col span={24} className="doubleFile">
                   <ArcoUpload
                     params={{
                       action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-202`,
@@ -117,9 +130,10 @@
                     handleChangeFile={handleChangeFile}
                     label='身份证明材料'
                     editData={props.editData}
+                    handleDelFile={handleDelFile}
                   />
                 </Col>
-                <Col span={24}>
+                <Col span={24} className="doubleFile">
                   <ArcoUpload
                     params={{
                       action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${props.mainId}&ownerId=${id}&ownerType=22_00018-202`,
@@ -307,7 +321,7 @@
         <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}>
           <KeyVisits />
         </div>
-      </div>
+      </Scrollbars>
       <div className='dialogFooter'>
         <Button
           type="primary"

--
Gitblit v1.8.0