From a638a7918a2d05e343253dff9158ce0379a47bd4 Mon Sep 17 00:00:00 2001
From: dminyi <1301963064@qq.com>
Date: Sun, 08 Sep 2024 11:26:27 +0800
Subject: [PATCH] ai接口对接

---
 gz-customerSystem/src/views/register/matterDetail/index.jsx |  115 +++++++++++++++++++++++++++------------------------------
 1 files changed, 55 insertions(+), 60 deletions(-)

diff --git a/gz-customerSystem/src/views/register/matterDetail/index.jsx b/gz-customerSystem/src/views/register/matterDetail/index.jsx
index a058c98..4767604 100644
--- a/gz-customerSystem/src/views/register/matterDetail/index.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/index.jsx
@@ -10,6 +10,10 @@
   return $$.ax.request({ url: 'caseInfo/getCaseInfo?id=' + id, type: 'get', service: 'mediate' });
 }
 
+function listIdTypeInfoApi(data) {
+  return $$.ax.request({ url: `fileInfo/listIdTypeInfo`, type: 'post', service: 'sys', data });
+}
+
 
 export default function MatterDetail(props) {
   const [fakeData, setFakeData] = useState([{
@@ -49,35 +53,30 @@
     },
     {
       title: '材料类型',
-      dataIndex: 'judicNo',
-      key: 'judicNo',
+      dataIndex: 'ownerTypeName',
+      key: 'ownerTypeName',
       width: 60,
 
     },
     {
       title: '材料数量',
-      dataIndex: 'inputUserName',
-      key: 'perClassName',
+      dataIndex: 'size',
+      key: 'size',
       width: 180,
-      render: (text) => (
-        <>
-          {text}份
-        </>
-      )
-
+      render: (text) => <span>{text}份</span>,
 
     },
     {
       title: '材料名称',
-      dataIndex: 'perClassName',
-      key: 'perClassName',
+      dataIndex: 'fileNames',
+      key: 'fileNames',
       width: 180,
 
     },
     {
       title: '最新上传时间',
-      dataIndex: 'mediateUserName',
-      key: 'mediateUserName',
+      dataIndex: 'fileNames',
+      key: 'fileNames',
       width: 180,
 
     },
@@ -97,61 +96,57 @@
     },
     // 更多列配置...
   ];
-  const fakeData1 = [
+
+
+  const [fakeData1, setFakeData1] = useState([
     {
-      id: 1,
-      caseNo: 'A20230101',
-      judicNo: '申请材料',
-      perClassName: '李晓明的纠纷化解申请表、身份证...',
-      inputUserName: '0',
-      mediateUserName: '2024-7-12 12:00',
-      judgeName: '王五',
-      mediator: '赵六',
-      handlerUserName: '钱七',
-      returnUserName: '孙八',
-      expireTime: '2023-08-10T08:00:00.000Z',
-      processName: '进行中',
-      otherMediator: '周九',
-      canalName: '网络',
-      judicResult: '通过',
-      assistName: '吴十',
-      mediTypeName: '民事调解',
-      serieStatus: '1', // 1 表示非系列案,2 表示系列案
-      // 更多字段...
+      ownerTyp: "22_00018-101",
+      ownerTypeName: "申请材料",
+      size: '0',
+      ownerId: null,
+      ownerName: null,
+      perType: null,
+      agentStatus: null,
+      fileNames: "-",
+      fileList: []
     },
     {
-      id: 2,
-      caseNo: 'A20230101',
-      judicNo: '证据材料',
-      perClassName: '李晓明的纠纷化解申请表、身份证...',
-      inputUserName: '0',
-      mediateUserName: '2024-7-12 12:00',
-      judgeName: '王五',
-      mediator: '赵六',
-      handlerUserName: '钱七',
-      returnUserName: '孙八',
-      expireTime: '2023-08-10T08:00:00.000Z',
-      processName: '进行中',
-      otherMediator: '周九',
-      canalName: '网络',
-      judicResult: '通过',
-      assistName: '吴十',
-      mediTypeName: '民事调解',
-      serieStatus: '1', // 1 表示非系列案,2 表示系列案
-      // 更多字段...
+      ownerType: "22_00018-102",
+      ownerTypeName: "证据材料",
+      size: '0',
+      ownerId: null,
+      ownerName: null,
+      perType: null,
+      agentStatus: null,
+      fileNames: "-",
+      fileList: []
     },
 
-    // 更多数据...
-  ];
-  
+  ]);
+
+  const listIdTypeInfo = async () => {
+    const res = await listIdTypeInfoApi({
+      mainId: props.id, //事项ID
+      ownerIdList: [props.id], //具体所属编号
+      typeList: []
+    })
+    if (res.type) {
+      let data = res.data?.[0]?.fileList
+      if (res.data.length > 0) {
+        setFakeData1(data)
+      }
+    }
+  }
+
   useEffect(() => {
     console.log(props);
-    getCaseInfo(props.caseId)
-  }, [props.caseId])
+    getCaseInfo(props.id)
+    listIdTypeInfo()
+  }, [props.id])
 
   //获取id
   const getCaseInfo = async (id) => {
-    const res = await getCaseInfoApi(id)
+    const res = await getCaseInfoApi('24083010062110001')
 
     if (res.type) {
       let data = res.data
@@ -254,7 +249,7 @@
             </Col>
             <Col span={16}>
               <div className="title"><div className="title-text">是否重大矛盾纠纷</div></div>
-              <div>{infoData.majorStatus === '0' ? '否' : '是'}</div>
+              <div>{infoData.majorStatus === '0' ? '否' : infoData.majorStatus === '1' ? '是' : '-'}</div>
             </Col>
           </Row>
           <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px', marginTop: '20px' }}>

--
Gitblit v1.8.0