feat
parent
66155d78a2
commit
82d8a2c7f6
|
|
@ -10,9 +10,9 @@ module.exports = {
|
|||
javaGitBranch: "dev",
|
||||
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
||||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||
//API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||
API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||
|
||||
API_HOST: "http://192.168.0.152",
|
||||
//API_HOST: "http://192.168.0.152",
|
||||
//API_HOST: "http://192.168.0.150", //太浅
|
||||
// API_HOST: "http://192.168.0.152",
|
||||
//API_HOST: "http://192.168.0.103", //huwei
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import {
|
|||
Empty,
|
||||
Typography,
|
||||
Image,
|
||||
Popover,
|
||||
Button,
|
||||
} from "antd";
|
||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||
|
|
@ -266,8 +268,20 @@ const SurveyPanel = ({ personnel, attachments, loading, detailData }) => {
|
|||
dataIndex: "sceneUrl",
|
||||
width: 80,
|
||||
render: (v) => {
|
||||
const count = v ? v.split(",").filter(Boolean).length : 0;
|
||||
return count > 0 ? `${count}张` : "-";
|
||||
const urls = v ? v.split(",").filter(Boolean) : [];
|
||||
if (urls.length === 0) return "-";
|
||||
const content = (
|
||||
<div style={{ display: "flex", gap: 8, flexWrap: "wrap", maxWidth: 400 }}>
|
||||
{urls.map((url, i) => (
|
||||
<Image key={i} src={url} width={120} height={90} style={{ objectFit: "cover" }} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<Popover content={content} title="现场照片" trigger="hover">
|
||||
<Button type="link" size="small" style={{ padding: 0 }}>{urls.length}张</Button>
|
||||
</Popover>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ import {
|
|||
Modal,
|
||||
Space,
|
||||
Typography,
|
||||
Popover,
|
||||
Image,
|
||||
} from "antd";
|
||||
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||
|
|
@ -185,8 +187,20 @@ const SurveyMonitor = (props) => {
|
|||
dataIndex: "sceneUrl",
|
||||
width: 80,
|
||||
render: (v) => {
|
||||
const count = v ? v.split(",").filter(Boolean).length : 0;
|
||||
return count > 0 ? `${count}张` : "-";
|
||||
const urls = v ? v.split(",").filter(Boolean) : [];
|
||||
if (urls.length === 0) return "-";
|
||||
const content = (
|
||||
<div style={{ display: "flex", gap: 8, flexWrap: "wrap", maxWidth: 400 }}>
|
||||
{urls.map((url, i) => (
|
||||
<Image key={i} src={url} width={120} height={90} style={{ objectFit: "cover" }} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<Popover content={content} title="现场照片" trigger="hover">
|
||||
<Button type="link" size="small" style={{ padding: 0 }}>{urls.length}张</Button>
|
||||
</Popover>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import { Form, Button, Flex, Typography, Steps, Tag, Card, Table, message } from "antd";
|
||||
import { Form, Button, Flex, Typography, Steps, Tag, Card, Table, message, Popover, Image } from "antd";
|
||||
import { CheckCircleFilled, DownloadOutlined } from "@ant-design/icons";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
|
||||
|
|
@ -103,8 +103,20 @@ const InspectionPanel = ({ dataSource = [], evalProjectDetailData = {} }) => {
|
|||
{ title: "签退时间", dataIndex: "signOutTime" },
|
||||
{ title: "在场时长", render: (_, r) => calcDuration(r.singInTime, r.signOutTime) },
|
||||
{ title: "现场照片", dataIndex: "sceneUrl", render: (v) => {
|
||||
const count = v ? v.split(',').filter(Boolean).length : 0;
|
||||
return <Button type="link" size="small">{count}张</Button>;
|
||||
const urls = v ? v.split(',').filter(Boolean) : [];
|
||||
if (urls.length === 0) return <Button type="link" size="small">0张</Button>;
|
||||
const content = (
|
||||
<div style={{ display: 'flex', gap: 8, flexWrap: 'wrap', maxWidth: 400 }}>
|
||||
{urls.map((url, i) => (
|
||||
<Image key={i} src={url} width={120} height={90} style={{ objectFit: 'cover' }} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<Popover content={content} title="现场照片" trigger="hover">
|
||||
<Button type="link" size="small">{urls.length}张</Button>
|
||||
</Popover>
|
||||
);
|
||||
}},
|
||||
{ title: "本人签字", dataIndex: "signatureUrl", render: (v) => <Tag color={v ? "success" : "default"}>{v ? "已签字" : "未签字"}</Tag> },
|
||||
]}
|
||||
|
|
|
|||
Loading…
Reference in New Issue