From 47e16d0a56559916c5fb9c4de08838e7a1d457d8 Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Mon, 09 Sep 2024 18:10:50 +0800
Subject: [PATCH] feat: 完善功能
---
gz-customerSystem/src/views/register/matterDetail/index.jsx | 125 ++---------------------------------------
gz-customerSystem/src/components/personCard/DetailDialog.jsx | 12 +++-
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx | 2
gz-customerSystem/src/views/register/matterDetail/FileTable.jsx | 22 ++++---
gz-customerSystem/src/views/register/handleFeedback/index.jsx | 2
gz-customerSystem/src/api/appUrl.js | 4
gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx | 2
7 files changed, 33 insertions(+), 136 deletions(-)
diff --git a/gz-customerSystem/src/api/appUrl.js b/gz-customerSystem/src/api/appUrl.js
index 9338a21..a128020 100644
--- a/gz-customerSystem/src/api/appUrl.js
+++ b/gz-customerSystem/src/api/appUrl.js
@@ -10,11 +10,11 @@
export const debug = {
// web服务
// baseUrl: 'http://gz.hugeinfo.com.cn',
- baseUrl: "http://192.168.3.108:9002",
+ baseUrl: "http://w88bsz.natappfree.cc",
// baseUrl: 'http://mdqgnh.natappfree.cc',
// 附件服务
- fileUrl: "http://192.168.3.108:9002",
+ fileUrl: "http://w88bsz.natappfree.cc",
// fileUrl: 'http://gz.hugeinfo.com.cn',
// 文件查看url 后面接附件编号
diff --git a/gz-customerSystem/src/components/personCard/DetailDialog.jsx b/gz-customerSystem/src/components/personCard/DetailDialog.jsx
index 183501d..f5f7dce 100644
--- a/gz-customerSystem/src/components/personCard/DetailDialog.jsx
+++ b/gz-customerSystem/src/components/personCard/DetailDialog.jsx
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react'
import KeyVisits from "./KeyVisits";
-import { link } from '@/assets/images'
+import { link } from '@/assets/images';
+import { Scrollbars } from "react-custom-scrollbars";
export default function DetailDialog(props) {
const nuturalList = [
@@ -359,7 +360,12 @@
}, [])
return (
- <div style={{ maxHeight: '590px', overflowY: 'scroll' }}>
+ <Scrollbars
+ autoHide
+ autoHeight
+ autoHeightMin={200} // 最小高度为300px
+ autoHeightMax={590}
+ >
<table border="1" align="center" cellpadding="8" className="table" style={{ marginBottom: '20px' }}>
{
tableList?.map((item, index) => {
@@ -385,6 +391,6 @@
{/* <div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}>
<KeyVisits />
</div> */}
- </div>
+ </Scrollbars>
)
}
diff --git a/gz-customerSystem/src/views/register/handleFeedback/index.jsx b/gz-customerSystem/src/views/register/handleFeedback/index.jsx
index 8c2488e..ad57e3c 100644
--- a/gz-customerSystem/src/views/register/handleFeedback/index.jsx
+++ b/gz-customerSystem/src/views/register/handleFeedback/index.jsx
@@ -178,7 +178,7 @@
</div>
}
{tabsActive === 'sxxq' &&
- <MatterDetail hasApplet={true} hasEditBtn={true} />
+ <MatterDetail hasApplet={true} hasEditBtn={true} caseId={routeData.caseId}/>
}
{
tabsActive === 'sxbl' && <Typography.Paragraph style={style}>
diff --git a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
index f309b7e..f1cc458 100644
--- a/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/FileTable.jsx
@@ -21,10 +21,6 @@
return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'delete', service: 'sys', data: { id } });
}
-function listIdTypeInfoApi(data) {
- return $$.ax.request({ url: `fileInfo/listIdTypeInfo`, type: 'post', service: 'sys', data });
-}
-
function deleteFileByIdApi(data) {
return $$.ax.request({ url: `fileInfo/deleteFileByIds`, type: 'delete', service: 'sys', data });
}
@@ -48,6 +44,12 @@
id: 2,
},
]
+
+/**
+ * mainId*,//就是caseId,事件id
+ * fileInfoList*, //文件列表
+ * isReview,//是否查看,查看的话就不能删除上传,只能查看下载
+ */
export default function FileTable(props) {
const formRef = useRef();
@@ -98,7 +100,7 @@
title: '操作',
dataIndex: 'perClassName',
key: 'perClassName',
- width: 125,
+ width: props.isReview ? 60 : 125,
fixed: 'right',
render: (text, record) => (
<Space size="middle">
@@ -108,7 +110,7 @@
}}>
查看
</Link>
- <Link onClick={() => {
+ {!props.isReview && <Link onClick={() => {
if (record.fileInfoList && record.fileInfoList.length != 0) {
let ids = record.fileInfoList?.map(item => item.id).join(',')
handleDelete(ids)
@@ -117,7 +119,7 @@
}
}}>
删除
- </Link>
+ </Link>}
<Link onClick={() => {
if (record.fileInfoList && record.fileInfoList.length != 0) {
let ids = record.fileInfoList?.map(item => item.id).join(',')
@@ -128,7 +130,7 @@
}}>
下载
</Link>
- <Link onClick={() => {
+ {!props.isReview && <Link onClick={() => {
setSourceType(record.ownerType)
setUpLoadVisible(true)
setFileInfoList(record.fileInfoList)
@@ -137,7 +139,7 @@
}, 0)
}}>
上传
- </Link>
+ </Link>}
</Space>
)
},
@@ -403,7 +405,7 @@
maskClosable={false}
>
<div style={{ marginTop: '-16px' }}>
- <NewFileCheck menuList={tableData} sourceType={sourceType}/>
+ <NewFileCheck menuList={tableData} sourceType={sourceType} />
</div>
</Modal>
</Fragment>
diff --git a/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx b/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx
index e1a9b8e..ebabd3c 100644
--- a/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/NewFileCheck.jsx
@@ -140,7 +140,7 @@
<div style={{ width: '100%', height: '470px' }}>
{
itemData.suffix === 'pdf' ?
- <embed src="fileUrl" type="application/pdf" width="100%" height="100%"></embed>
+ <embed src={fileUrl} type="application/pdf" width="100%" height="100%"></embed>
:
<img src={fileUrl} alt="" style={{ width: '100%', height: '100%' }} />
}
diff --git a/gz-customerSystem/src/views/register/matterDetail/index.jsx b/gz-customerSystem/src/views/register/matterDetail/index.jsx
index 8690c0f..49176cf 100644
--- a/gz-customerSystem/src/views/register/matterDetail/index.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/index.jsx
@@ -1,131 +1,28 @@
import React, { useState, useEffect } from 'react';
import { Row, Col, Space, Button, Switch } from 'antd';
import PersonCard from '@/components/personCard';
-import TableView from '@/components/TableView';
import * as $$ from '@/utils/utility';
-import { Typography, Steps } from '@arco-design/web-react';
-import { question, register, Matter, transfer } from '@/assets/images'
+import { Typography } from '@arco-design/web-react';
+import { question, register } from '@/assets/images';
+import FileTable from "./FileTable";
function getCaseInfoApi(id) {
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([]);//当事人信息数据
- const [upload, setUpLoad] = useState(false);
- const [filesCheck, setFilesCheck] = useState(false);
const [infoData, setInfoData] = useState({});
-
- const fakeColumns = [
- {
- title: '序号',
- dataIndex: 'caseNo',
- key: 'caseNo',
- width: 100,
- render: (text, record, index) => <span>{index + 1}</span>,
- },
- {
- title: '材料类型',
- dataIndex: 'ownerTypeName',
- key: 'ownerTypeName',
- width: 60,
-
- },
- {
- title: '材料数量',
- dataIndex: 'size',
- key: 'size',
- width: 180,
- render: (text) => <span>{text}份</span>,
-
- },
- {
- title: '材料名称',
- dataIndex: 'fileNames',
- key: 'fileNames',
- width: 180,
-
- },
- {
- title: '最新上传时间',
- dataIndex: 'fileNames',
- key: 'fileNames',
- width: 180,
-
- },
- {
- title: '操作',
- dataIndex: 'perClassName',
- key: 'perClassName',
- width: 200,
- render: (text) => (
- <div style={{ display: 'flex', color: '#1A6FB8', gap: '16px' }}>
- <div onClick={() => setFilesCheck(true)}>查看</div>
- <div>删除</div>
- <div>下载</div>
- <div onClick={() => setUpLoad(true)}>上传</div>
- </div>
- )
- },
- // 更多列配置...
- ];
-
-
- const [fakeData1, setFakeData1] = useState([
- {
- ownerTyp: "22_00018-101",
- ownerTypeName: "申请材料",
- size: '0',
- ownerId: null,
- ownerName: null,
- perType: null,
- agentStatus: null,
- fileNames: "-",
- fileList: []
- },
- {
- 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.id)
- listIdTypeInfo()
- }, [props.id])
+ getCaseInfo(props.caseId)
+ }, [props.caseId])
//获取id
const getCaseInfo = async (id) => {
- const res = await getCaseInfoApi('24083010062110001')
-
+ const res = await getCaseInfoApi(id)
if (res.type) {
let data = res.data
const partyList = data.personList.concat(data.agentList)
@@ -261,15 +158,7 @@
<div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>事件材料</h5>
</Space>
</Col>
-
- <TableView
- columns={fakeColumns}
- dataSource={fakeData1}
- size="small"
- rowKey="id"
- bordered={true}
- style={{ marginBottom: '20px' }}
- />
+ <FileTable mainId={props.caseId} fileInfoList={infoData.fileInfoList} isReview={true}/>
<Col span={24} className='title'>
<Space size='small'>
<div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>登记信息</h5>
diff --git a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
index decb012..0a883e8 100644
--- a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
@@ -390,7 +390,7 @@
<div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h4>事件材料</h4>
</Space>
</Col>
- <FileTable mainId={props.mainId} fileInfoList={props.fileInfoList}/>
+ <FileTable mainId={props.mainId} fileInfoList={props.fileInfoList} isReview={false}/>
<DocumentScanner
visible={scanFile}
--
Gitblit v1.8.0