From 200b3f9e47195b19484a9e8530079ee8e2c9aa5f Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Sun, 15 Sep 2024 22:37:54 +0800
Subject: [PATCH] fix: 配合部门
---
gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx | 59 +++++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 47 insertions(+), 12 deletions(-)
diff --git a/gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx b/gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx
index ef34029..f79e86f 100644
--- a/gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx
+++ b/gz-customerSystem/src/views/register/matterDetail/HandleRecord.jsx
@@ -2,23 +2,28 @@
* @Author: dminyi 1301963064@qq.com
* @Date: 2024-09-06 09:40:00
* @LastEditors: dminyi 1301963064@qq.com
- * @LastEditTime: 2024-09-12 20:48:45
+ * @LastEditTime: 2024-09-13 10:29:41
* @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
+ * @Description: 办理记录
*/
import React, { useState, useEffect } from 'react';
import { Empty } from '@arco-design/web-react';
-import { fold, down, empty, edit } from '@/assets/images';
+import { fold, down, empty, edit, register } from '@/assets/images';
import { Image } from 'antd';
-// import {link} from '@/assets/image';
+import { link } from '@/assets/images';
import * as $$ from '@/utils/utility';
+import PersonCard from './personCard';
+function getByIdRoleApi(id) {
+ return $$.ax.request({ url: `ctUser/getByIdRole?id=` + id, type: 'get', service: 'cust' });
+}
export default function HandleRecord(props) {
const appUrl = $$.appUrl;
const [list, setList] = useState([]);
const [imgVisible, setImgVisible] = useState({ visible: false, src: '' });
-
+ const [personView, setPersonView] = useState(false)
+ const [personData, setPersonData] = useState({})
useEffect(() => {
setList(props.data)
@@ -35,6 +40,24 @@
return record;
}));
};
+
+ const getByIdRole = async (id) => {
+ const res = await getByIdRoleApi(id)
+ if (res.type) {
+ setPersonView(!personView)
+ setPersonData(res.data)
+ }
+ }
+
+ const handlePersonDetail = (id) => {
+ getByIdRole(id)
+ }
+
+ const handleCancel=()=>{
+ setPersonView(false)
+ }
+
+
const handleEdit = (id) => {
props.handleEdit(id)
@@ -68,13 +91,16 @@
}
<div>{`${record.createTime} ${record.handleUnitName}`}</div>
<div className={`container-bottom-left-record-top-${record.handleType === '2' ? 'remark' : 'hostOrg'}`}>{record.handleType === '2' ? '配合部门' : '承办部门'}</div>
- {!props.isReview && <div><img src={edit} alt='' className='container-bottom-left-record-top-edit' onClick={() => handleEdit(record)} /></div>}
+ {!props.isReview && !props.noEdit && <div><img src={edit} alt='' className='container-bottom-left-record-top-edit' onClick={() => handleEdit(record)} /></div>}
</div>
<div className='container-bottom-left-record-bottom' style={{ display: record.showView ? 'block' : 'none' }}>
<table border="1" cellpadding="8" className='container-bottom-left-record-bottom-table'>
<tr>
<th bgcolor="#F7F8FA" className="table-title" width="120">操作人</th>
- <td>{record.handleUserName || '-'}</td>
+ <td>
+ {record.handleUserName || '-'}
+ <img src={register} alt='' onClick={() => handlePersonDetail(record.handleUserId)} style={{ width: '14px', height: '14px', marginLeft: '8px', marginTop: '-4px' }} />
+ </td>
</tr>
<tr>
<th bgcolor="#F7F8FA" className="table-title" width="120">办理意见</th>
@@ -92,10 +118,19 @@
}}
/>
</div>
- <td style={{color:'#1A6FB8'}} onClick={() => handleOpenFiles(record?.fileInfoList?.[0])}>
- {/* <img src={link} alt=''/> */}
- {record?.fileInfoList?.[0]?.name || '-'}
- </td>
+ <td>
+ {record?.fileInfoList?.length > 0 ?
+ <div style={{ display: 'flex', alignItems: 'center', gap: '4px', color: '#1A6FB8' }}>
+ <img src={link} alt='' style={{ width: '14px', height: '14px' }} />
+ <div>
+ {record?.fileInfoList?.map((item, index) =>
+ <div key={index} onClick={() => handleOpenFiles(item)} style={{ cursor: 'pointer' }}>{item.name || '-'}{index === record.fileInfoList.length - 1 ? '' : ','}</div>
+ )}
+ </div>
+ </div> : '-'
+ }
+
+ </td>
</tr>
</table>
</div>
@@ -118,7 +153,7 @@
description='暂无数据'
/>
}
-
+ <PersonCard personView={personView} handleCancel={handleCancel} personData={personData} />
</div>
)
}
--
Gitblit v1.8.0