需求变更:13337

master
LiuJiaNan 2026-01-05 10:07:29 +08:00
parent 177c47373f
commit d4ca975869
17 changed files with 106 additions and 43 deletions

View File

@ -9,7 +9,8 @@ module.exports = {
// 应用后端分支名称,部署上线需要
javaGitBranch: "<branch-name>",
// 接口服务地址
API_HOST: "http://192.168.20.100:30140",
// API_HOST: "http://192.168.20.100:30140",
API_HOST: "https://gbs-gateway.qhdsafety.com",
},
production: {
// 应用后端分支名称,部署上线需要
@ -24,7 +25,8 @@ module.exports = {
contextInject: {
// 应用Key
appKey: "",
fileUrl: "http://192.168.20.240:9787/mnt/",
// fileUrl: "http://192.168.20.240:9787/mnt/",
fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
},
// public/index.html注入全局变量
windowInject: {
@ -46,7 +48,7 @@ module.exports = {
// 开发服务
server: {
// 监听端口号
port: "8080",
port: "8081",
// 服务地址
host: "127.0.0.1",
// 是否自动打开浏览器

View File

@ -32,7 +32,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-to-print": "^3.2.0",
"zy-react-library": "^1.1.10"
"zy-react-library": "^1.1.15"
},
"devDependencies": {
"@antfu/eslint-config": "^5.4.1",

View File

@ -6,6 +6,7 @@ import "dayjs/locale/zh-cn";
import "../blessed_by_buddha";
require("antd/dist/reset.css");
require("zy-react-library/css/common.less");
dayjs.locale("zh-cn");
setJJBCommonAntdMessage(message);

View File

@ -64,17 +64,19 @@ function Add(props) {
const { data } = await props["inspectionView"]({ inspectionId: query.id });
situationList.push(...data.content);
for (let i = 0; i < situationList.length; i++) {
const files = await getFile({
eqType: UPLOAD_FILE_TYPE_ENUM["140"],
eqForeignKey: situationList[i].contentId,
});
situationList[i].files = files;
if (situationList[i].contentId) {
const files = await getFile({
eqType: UPLOAD_FILE_TYPE_ENUM["140"],
eqForeignKey: situationList[i].contentId,
});
situationList[i].files = files;
}
}
const currentInspectorUser = data.inspectorVerificationList.filter(item => item.userId === userInfo.id)[0];
setSignatureFilePath(currentInspectorUser.signature ? getFileUrl() + currentInspectorUser.signature : "");
form.setFieldsValue({
...data,
situationList:situationList.length > 0 ? situationList : [{ content: undefined }],
situationList: situationList.length > 0 ? situationList : [{ content: undefined }],
inspectorList: data.inspectorVerificationList,
personUnderInspection: data.inspectedPartyConfirmation,
initiator: {
@ -346,7 +348,7 @@ function Add(props) {
render: FORM_ITEM_RENDER_ENUM.RADIO,
items: PLAN_ENUM.map(item => ({ ...item, bianma: +item.bianma })),
span: planType === 0 ? 24 : 12,
componentProps: { disabled: query.planId },
componentProps: { disabled: true },
},
{
name: "planId",
@ -356,7 +358,7 @@ function Add(props) {
itemsField: { labelKey: "planName", valueKey: "id" },
dependencies: ["planType"],
hidden: formValues => !(formValues.planType === 1),
componentProps: { disabled: query.planId },
componentProps: { disabled: true },
},
{
name: ["personUnderInspection", "departmentId"],
@ -382,7 +384,7 @@ function Add(props) {
onGetLabel={label => form.setFieldValue(["personUnderInspection", "userName"], label)}
/>
),
formItemProps: { labelCol: { span: 8 } },
formItemProps: { labelCol: { span: 6 } },
},
{ name: ["personUnderInspection", "userName"], label: "被检查单位现场负责人名称", onlyForLabel: true },
{ name: "place", label: "检查场所", span: 24 },
@ -468,6 +470,7 @@ function Add(props) {
{
name: [field.name, "files"],
label: "图片",
required: false,
render: (
<Upload
maxCount={1}

View File

@ -31,7 +31,7 @@ function List(props) {
checkStartTime: formData.checkTime?.[0],
checkEndTime: formData.checkTime?.[1],
}),
params: { status: "", planId: query.planId, entrance: query.planId ? "2" : "1" },
params: { status: "", planId: query.planId, entrance: query.planId ? "2" : "1", planType: query.planId ? 1 : 0 },
});
return (
@ -63,7 +63,7 @@ function List(props) {
type="primary"
icon={<AddIcon />}
onClick={() => {
props.history.push("./add");
props.history.push(`./add?planId=${query.planId || ""}`);
}}
>
新增
@ -93,20 +93,31 @@ function List(props) {
width: 200,
render: (_, record) => (
<Space>
{(props.permission(props.updatePermissionKey || "inspection-qy-check-edit") && (record.status === 98 || record.status === 600)) && (
<Button
type="link"
onClick={() => {
props.history.push(`./add?id=${record.id}&inspectionId=${record.inspectionId}`);
}}
>
编辑
</Button>
)}
{
(
props.permission(props.updatePermissionKey || "inspection-qy-check-edit")
&& query.edit !== "0"
&& (record.status === 98 || record.status === 600)
)
&& (
<Button
type="link"
onClick={() => {
props.history.push(`./add?id=${record.id}&inspectionId=${record.inspectionId}`);
}}
>
编辑
</Button>
)
}
<Button
type="link"
onClick={() => {
props.history.push(`../../inspectionView?id=${record.id}&inspectionId=${record.inspectionId}`);
props.history.push(
query.planId
? `../../../inspectionView?id=${record.id}&inspectionId=${record.inspectionId}`
: `../../inspectionView?id=${record.id}&inspectionId=${record.inspectionId}`,
);
}}
>
查看

View File

@ -87,7 +87,7 @@ function InspectionView(props) {
{ label: "牵头检查部门", children: info.inspector?.departmentName },
{ label: "检查人", children: currentInspectorUserName.join("") },
{ label: "检查类型", children: info.typeName },
{ label: "检查时间", children: `${info.timeStart}${info.timeEnd}` },
{ label: "检查时间", children: (info.timeStart && info.timeEnd) ? `${info.timeStart}${info.timeEnd}` : "" },
{ label: "检查场所", children: info.place, span: 2 },
{ label: "计划属性", children: getLabelName({ list: PLAN_ENUM, status: info.planType }), span: 2 },
...(info.planType === 1 ? [{ label: "计划名称", children: info.planName, span: 2 }] : []),

View File

@ -0,0 +1,7 @@
import InspectionAdd from "../../../../Inspection/Inspection/Add";
function Add(props) {
return (<InspectionAdd {...props} />);
}
export default Add;

View File

@ -0,0 +1,7 @@
import InspectionList from "../../../../Inspection/Inspection/List";
function List(props) {
return (<InspectionList updatePermissionKey="inspection-qy-check-edit2" addPermissionKey="inspection-qy-check-add2" headerTitle="发起检查" {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import InspectionList from "../../../../Inspection/Inspection/List";
function Records(props) {
return (<InspectionList headerTitle="检查记录" {...props} />);
}
export default Records;

View File

@ -0,0 +1,9 @@
function Inspection(props) {
return (
<div>
{props.children}
</div>
);
}
export default Inspection;

View File

@ -1,7 +0,0 @@
import InspectionList from "../../../Inspection/Inspection/List";
function InspectionRecords(props) {
return (<InspectionList updatePermissionKey="inspection-qy-check-edit2" headerTitle="检查记录" {...props} />);
}
export default InspectionRecords;

View File

@ -99,7 +99,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`../../inspection/inspection/add?planId=${record.id}`);
props.history.push(`./inspection/list?planId=${record.id}`);
}}
>
发起检查
@ -108,7 +108,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./inspectionRecords?planId=${record.id}&edit=0`);
props.history.push(`./inspection/records?planId=${record.id}&edit=0`);
}}
>
检查记录

View File

@ -0,0 +1,7 @@
import InspectionAdd from "../../../../Inspection/Inspection/Add";
function Add(props) {
return (<InspectionAdd {...props} />);
}
export default Add;

View File

@ -0,0 +1,7 @@
import InspectionList from "../../../../Inspection/Inspection/List";
function List(props) {
return (<InspectionList updatePermissionKey="inspection-jg-check-edit2" addPermissionKey="inspection-jg-check-add2" headerTitle="发起检查" {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import InspectionList from "../../../../Inspection/Inspection/List";
function Records(props) {
return (<InspectionList headerTitle="检查记录" {...props} />);
}
export default Records;

View File

@ -0,0 +1,9 @@
function Inspection(props) {
return (
<div>
{props.children}
</div>
);
}
export default Inspection;

View File

@ -1,7 +0,0 @@
import InspectionList from "../../../Inspection/Inspection/List";
function InspectionRecords(props) {
return (<InspectionList updatePermissionKey="inspection-jg-check-edit2" headerTitle="检查记录" {...props} />);
}
export default InspectionRecords;