From 6a4f69b2fb9efa845fdd43c76713067716c3dd8e Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Fri, 13 Sep 2024 09:32:06 +0800
Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh
---
gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx | 45 ++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx b/gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx
index efa06b7..ee460ea 100644
--- a/gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx
@@ -2,16 +2,23 @@
* @Author: dminyi 1301963064@qq.com
* @Date: 2024-09-06 09:40:00
* @LastEditors: dminyi 1301963064@qq.com
- * @LastEditTime: 2024-09-11 12:00:20
+ * @LastEditTime: 2024-09-12 20:55:47
* @FilePath: \gzDyh\gz-customerSystem\src\views\register\matterDetail\HandleRecord.jsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import React, { useState, useEffect } from 'react';
import { Empty } from '@arco-design/web-react';
import { fold, down, empty, edit } from '@/assets/images';
+import { Image } from 'antd';
+import {link} from '@/assets/images';
+import * as $$ from '@/utils/utility';
+
export default function HandleRecord(props) {
+ const appUrl = $$.appUrl;
const [list, setList] = useState([]);
+ const [imgVisible, setImgVisible] = useState({ visible: false, src: '' });
+
useEffect(() => {
setList(props.data)
@@ -33,13 +40,25 @@
props.handleEdit(id)
}
+ function handleOpenFiles(record) {
+ if (record.cat === '22_00017-3') {
+ setImgVisible({ visible: true, src: `${appUrl.fileUrl}/${appUrl.sys}${record.showUrl}` });
+ } else if (record.cat === '22_00017-6' || record.cat === '22_00017-1' || record.cat === '22_00017-2') {
+ window.open(`${appUrl.fileUrl}${appUrl.fileShowUrl}${record.id}`);
+ } else {
+ $$.info({ type: 'warning', content: '抱歉,暂不支持在线查看,已下载请查看' });
+ window.open(`${appUrl.fileUrl}${appUrl.fileDownUrl}${record.id}`);
+ }
+ }
+
+
return (
<div>
{list?.length > 0 ?
<div>
{list?.map((record, index) => (
<div key={record.id} className='container-bottom-left-record'>
- <div className='container-bottom-left-record-top'>
+ <div className='container-bottom-left-record-top' style={{ borderBottom: record.showView ? '1px solid #d9d9d9' : null }}>
{
record.showView ? (
<img src={down} alt='' style={{ width: '18px', marginRight: '6px', cursor: 'pointer' }} onClick={() => toggleView(record.id)} />
@@ -55,15 +74,30 @@
<table border="1" cellpadding="8" className='container-bottom-left-record-bottom-table'>
<tr>
<th bgcolor="#F7F8FA" className="table-title" width="120">操作人</th>
- <td>{record.handleUnitName}</td>
+ <td>{record.handleUserName || '-'}</td>
</tr>
<tr>
<th bgcolor="#F7F8FA" className="table-title" width="120">办理意见</th>
- <td>{record.handleContent}</td>
+ <td>{record.handleContent || '-'}</td>
</tr>
<tr>
<th bgcolor="#F7F8FA" className="table-title" width="120">办理附件</th>
- <td>{record?.fileInfoList?.[0]?.trueName}</td>
+ <div style={{ display: 'none' }}>
+ <Image
+ src={imgVisible.src}
+ preview={{
+ visible: imgVisible.visible,
+ src: imgVisible.src,
+ onVisibleChange: (value) => setImgVisible({ visible: false }),
+ }}
+ />
+ </div>
+ <td style={{ color: '#1A6FB8' }} onClick={() => handleOpenFiles(record?.fileInfoList?.[0])}>
+ <div style={{cursor: 'pointer',display:'flex',alignItems:'center',gap:'4px'}}>
+ <img src={link} alt='' style={{width:'14px',height:'14px'}}/>
+ <div>{record?.fileInfoList?.[0]?.name || '-'}</div>
+ </div>
+ </td>
</tr>
</table>
</div>
@@ -86,6 +120,7 @@
description='暂无数据'
/>
}
+
</div>
)
}
--
Gitblit v1.8.0