修护bug
parent
93862a9903
commit
ba4463711c
|
|
@ -225,10 +225,10 @@ export default function StaffViewModal({
|
||||||
dataSource={certificates}
|
dataSource={certificates}
|
||||||
locale={{ emptyText: "暂无证照信息" }}
|
locale={{ emptyText: "暂无证照信息" }}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "证照名称", dataIndex: "certName" },
|
{ title: "证照名称", dataIndex: "certName",ellipsis: true },
|
||||||
{ title: "证书编号", dataIndex: "certNo" },
|
{ title: "证书编号", dataIndex: "certNo",ellipsis: true },
|
||||||
{ title: "证书类别", dataIndex: "certTypeName" },
|
{ title: "证书类别", dataIndex: "certTypeName",ellipsis: true },
|
||||||
{ title: "发证机关", dataIndex: "issueOrg" },
|
{ title: "发证机关", dataIndex: "issueOrg",ellipsis: true },
|
||||||
{ title: "有效开始日期", dataIndex: "validStartDate", width: 120 },
|
{ title: "有效开始日期", dataIndex: "validStartDate", width: 120 },
|
||||||
{ title: "有效结束日期", dataIndex: "validEndDate", width: 120 },
|
{ title: "有效结束日期", dataIndex: "validEndDate", width: 120 },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ function OrgPersonnelSelectModalInner(props) {
|
||||||
current: page,
|
current: page,
|
||||||
size: pageSize,
|
size: pageSize,
|
||||||
userName: values.staffName || undefined,
|
userName: values.staffName || undefined,
|
||||||
|
employmentStatusCode: 1,
|
||||||
});
|
});
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
setDataSource(res?.data || []);
|
setDataSource(res?.data || []);
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@ import {
|
||||||
Col,
|
Col,
|
||||||
DatePicker,
|
DatePicker,
|
||||||
Form,
|
Form,
|
||||||
|
Image,
|
||||||
Input,
|
Input,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
Row,
|
Row,
|
||||||
Select,
|
Select,
|
||||||
|
Modal,
|
||||||
Spin,
|
Spin,
|
||||||
Table,
|
Table,
|
||||||
Tabs,
|
Tabs,
|
||||||
|
|
@ -18,7 +20,6 @@ import {
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
import FilePreviewModal from "~/components/FilePreviewModal";
|
|
||||||
import {
|
import {
|
||||||
fetchRegisteredOrgDetail,
|
fetchRegisteredOrgDetail,
|
||||||
fetchRegisteredOrgPersonnelList,
|
fetchRegisteredOrgPersonnelList,
|
||||||
|
|
@ -108,9 +109,7 @@ function isImageUrl(url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function MaterialsTab({ materialGroups, loading, onPreview }) {
|
function MaterialsTab({ materialGroups, loading, onPreview }) {
|
||||||
if (loading) {
|
|
||||||
return <Spin />;
|
|
||||||
}
|
|
||||||
const groups = Object.entries(materialGroups || {}).map(
|
const groups = Object.entries(materialGroups || {}).map(
|
||||||
([code, list], index) => {
|
([code, list], index) => {
|
||||||
const items = Array.isArray(list) ? list : [];
|
const items = Array.isArray(list) ? list : [];
|
||||||
|
|
@ -190,6 +189,7 @@ function MaterialsTab({ materialGroups, loading, onPreview }) {
|
||||||
>
|
>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
size="small"
|
||||||
|
loading={loading}
|
||||||
bordered
|
bordered
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
pagination={false}
|
pagination={false}
|
||||||
|
|
@ -244,7 +244,7 @@ function PersonnelTab({ personnel, loading, onView }) {
|
||||||
record.qualScope ||
|
record.qualScope ||
|
||||||
"-",
|
"-",
|
||||||
},
|
},
|
||||||
{ title: "学历", dataIndex: "educationName", width: 80 },
|
{ title: "学历", dataIndex: "educationLevelName", width: 80 },
|
||||||
{
|
{
|
||||||
title: "注册安全工程师",
|
title: "注册安全工程师",
|
||||||
width: 120,
|
width: 120,
|
||||||
|
|
@ -285,7 +285,7 @@ function RegisteredOrgDetailPage(props) {
|
||||||
const [orgName, setOrgName] = useState("");
|
const [orgName, setOrgName] = useState("");
|
||||||
const [materialGroups, setMaterialGroups] = useState({});
|
const [materialGroups, setMaterialGroups] = useState({});
|
||||||
const [personnel, setPersonnel] = useState([]);
|
const [personnel, setPersonnel] = useState([]);
|
||||||
const [filePreview, setFilePreview] = useState(null);
|
const [previewImages, setPreviewImages] = useState([]);
|
||||||
const [viewPersonnelId, setViewPersonnelId] = useState("");
|
const [viewPersonnelId, setViewPersonnelId] = useState("");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -596,16 +596,14 @@ function RegisteredOrgDetailPage(props) {
|
||||||
materialGroups={materialGroups}
|
materialGroups={materialGroups}
|
||||||
loading={extrasLoading}
|
loading={extrasLoading}
|
||||||
onPreview={(record) => {
|
onPreview={(record) => {
|
||||||
const url = resolvePreviewUrl(record?.previewUrl);
|
const urlStr = record?.previewUrl;
|
||||||
if (!url) {
|
if (!urlStr) {
|
||||||
message.warning("该材料暂无可预览的附件");
|
message.warning("该材料暂无可预览的附件");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isImageUrl(url)) {
|
const urls = String(urlStr)
|
||||||
setFilePreview(record);
|
?.split(",");
|
||||||
} else {
|
setPreviewImages(urls || []);
|
||||||
window.open(url, "_blank");
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
|
@ -630,13 +628,25 @@ function RegisteredOrgDetailPage(props) {
|
||||||
</p>
|
</p>
|
||||||
<Tabs items={tabItems} />
|
<Tabs items={tabItems} />
|
||||||
|
|
||||||
<FilePreviewModal
|
<Modal
|
||||||
open={!!filePreview}
|
open={previewImages.length > 0}
|
||||||
title="文件预览"
|
title="材料预览"
|
||||||
fileName={filePreview?.name}
|
width={750}
|
||||||
url={resolvePreviewUrl(filePreview?.previewUrl)}
|
footer={null}
|
||||||
onCancel={() => setFilePreview(null)}
|
onCancel={() => setPreviewImages([])}
|
||||||
|
>
|
||||||
|
<Image.PreviewGroup>
|
||||||
|
<div style={{ display: "flex", flexWrap: "wrap", gap: 12 }}>
|
||||||
|
{previewImages.map((url, idx) => (
|
||||||
|
<Image
|
||||||
|
key={idx}
|
||||||
|
src={url}
|
||||||
|
width={220}
|
||||||
/>
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</Image.PreviewGroup>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
{viewPersonnelId && (
|
{viewPersonnelId && (
|
||||||
<StaffViewModal
|
<StaffViewModal
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue