需求变更:13337
parent
177c47373f
commit
d4ca975869
|
|
@ -9,7 +9,8 @@ module.exports = {
|
||||||
// 应用后端分支名称,部署上线需要
|
// 应用后端分支名称,部署上线需要
|
||||||
javaGitBranch: "<branch-name>",
|
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: {
|
production: {
|
||||||
// 应用后端分支名称,部署上线需要
|
// 应用后端分支名称,部署上线需要
|
||||||
|
|
@ -24,7 +25,8 @@ module.exports = {
|
||||||
contextInject: {
|
contextInject: {
|
||||||
// 应用Key
|
// 应用Key
|
||||||
appKey: "",
|
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注入全局变量
|
// public/index.html注入全局变量
|
||||||
windowInject: {
|
windowInject: {
|
||||||
|
|
@ -46,7 +48,7 @@ module.exports = {
|
||||||
// 开发服务
|
// 开发服务
|
||||||
server: {
|
server: {
|
||||||
// 监听端口号
|
// 监听端口号
|
||||||
port: "8080",
|
port: "8081",
|
||||||
// 服务地址
|
// 服务地址
|
||||||
host: "127.0.0.1",
|
host: "127.0.0.1",
|
||||||
// 是否自动打开浏览器
|
// 是否自动打开浏览器
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-to-print": "^3.2.0",
|
"react-to-print": "^3.2.0",
|
||||||
"zy-react-library": "^1.1.10"
|
"zy-react-library": "^1.1.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import "dayjs/locale/zh-cn";
|
||||||
import "../blessed_by_buddha";
|
import "../blessed_by_buddha";
|
||||||
|
|
||||||
require("antd/dist/reset.css");
|
require("antd/dist/reset.css");
|
||||||
|
require("zy-react-library/css/common.less");
|
||||||
|
|
||||||
dayjs.locale("zh-cn");
|
dayjs.locale("zh-cn");
|
||||||
setJJBCommonAntdMessage(message);
|
setJJBCommonAntdMessage(message);
|
||||||
|
|
|
||||||
|
|
@ -64,17 +64,19 @@ function Add(props) {
|
||||||
const { data } = await props["inspectionView"]({ inspectionId: query.id });
|
const { data } = await props["inspectionView"]({ inspectionId: query.id });
|
||||||
situationList.push(...data.content);
|
situationList.push(...data.content);
|
||||||
for (let i = 0; i < situationList.length; i++) {
|
for (let i = 0; i < situationList.length; i++) {
|
||||||
const files = await getFile({
|
if (situationList[i].contentId) {
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["140"],
|
const files = await getFile({
|
||||||
eqForeignKey: situationList[i].contentId,
|
eqType: UPLOAD_FILE_TYPE_ENUM["140"],
|
||||||
});
|
eqForeignKey: situationList[i].contentId,
|
||||||
situationList[i].files = files;
|
});
|
||||||
|
situationList[i].files = files;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const currentInspectorUser = data.inspectorVerificationList.filter(item => item.userId === userInfo.id)[0];
|
const currentInspectorUser = data.inspectorVerificationList.filter(item => item.userId === userInfo.id)[0];
|
||||||
setSignatureFilePath(currentInspectorUser.signature ? getFileUrl() + currentInspectorUser.signature : "");
|
setSignatureFilePath(currentInspectorUser.signature ? getFileUrl() + currentInspectorUser.signature : "");
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
...data,
|
...data,
|
||||||
situationList:situationList.length > 0 ? situationList : [{ content: undefined }],
|
situationList: situationList.length > 0 ? situationList : [{ content: undefined }],
|
||||||
inspectorList: data.inspectorVerificationList,
|
inspectorList: data.inspectorVerificationList,
|
||||||
personUnderInspection: data.inspectedPartyConfirmation,
|
personUnderInspection: data.inspectedPartyConfirmation,
|
||||||
initiator: {
|
initiator: {
|
||||||
|
|
@ -346,7 +348,7 @@ function Add(props) {
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
items: PLAN_ENUM.map(item => ({ ...item, bianma: +item.bianma })),
|
items: PLAN_ENUM.map(item => ({ ...item, bianma: +item.bianma })),
|
||||||
span: planType === 0 ? 24 : 12,
|
span: planType === 0 ? 24 : 12,
|
||||||
componentProps: { disabled: query.planId },
|
componentProps: { disabled: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "planId",
|
name: "planId",
|
||||||
|
|
@ -356,7 +358,7 @@ function Add(props) {
|
||||||
itemsField: { labelKey: "planName", valueKey: "id" },
|
itemsField: { labelKey: "planName", valueKey: "id" },
|
||||||
dependencies: ["planType"],
|
dependencies: ["planType"],
|
||||||
hidden: formValues => !(formValues.planType === 1),
|
hidden: formValues => !(formValues.planType === 1),
|
||||||
componentProps: { disabled: query.planId },
|
componentProps: { disabled: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: ["personUnderInspection", "departmentId"],
|
name: ["personUnderInspection", "departmentId"],
|
||||||
|
|
@ -382,7 +384,7 @@ function Add(props) {
|
||||||
onGetLabel={label => form.setFieldValue(["personUnderInspection", "userName"], label)}
|
onGetLabel={label => form.setFieldValue(["personUnderInspection", "userName"], label)}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
formItemProps: { labelCol: { span: 8 } },
|
formItemProps: { labelCol: { span: 6 } },
|
||||||
},
|
},
|
||||||
{ name: ["personUnderInspection", "userName"], label: "被检查单位现场负责人名称", onlyForLabel: true },
|
{ name: ["personUnderInspection", "userName"], label: "被检查单位现场负责人名称", onlyForLabel: true },
|
||||||
{ name: "place", label: "检查场所", span: 24 },
|
{ name: "place", label: "检查场所", span: 24 },
|
||||||
|
|
@ -468,6 +470,7 @@ function Add(props) {
|
||||||
{
|
{
|
||||||
name: [field.name, "files"],
|
name: [field.name, "files"],
|
||||||
label: "图片",
|
label: "图片",
|
||||||
|
required: false,
|
||||||
render: (
|
render: (
|
||||||
<Upload
|
<Upload
|
||||||
maxCount={1}
|
maxCount={1}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ function List(props) {
|
||||||
checkStartTime: formData.checkTime?.[0],
|
checkStartTime: formData.checkTime?.[0],
|
||||||
checkEndTime: formData.checkTime?.[1],
|
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 (
|
return (
|
||||||
|
|
@ -63,7 +63,7 @@ function List(props) {
|
||||||
type="primary"
|
type="primary"
|
||||||
icon={<AddIcon />}
|
icon={<AddIcon />}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push("./add");
|
props.history.push(`./add?planId=${query.planId || ""}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
新增
|
新增
|
||||||
|
|
@ -93,20 +93,31 @@ function List(props) {
|
||||||
width: 200,
|
width: 200,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{(props.permission(props.updatePermissionKey || "inspection-qy-check-edit") && (record.status === 98 || record.status === 600)) && (
|
{
|
||||||
<Button
|
(
|
||||||
type="link"
|
props.permission(props.updatePermissionKey || "inspection-qy-check-edit")
|
||||||
onClick={() => {
|
&& query.edit !== "0"
|
||||||
props.history.push(`./add?id=${record.id}&inspectionId=${record.inspectionId}`);
|
&& (record.status === 98 || record.status === 600)
|
||||||
}}
|
)
|
||||||
>
|
&& (
|
||||||
编辑
|
<Button
|
||||||
</Button>
|
type="link"
|
||||||
)}
|
onClick={() => {
|
||||||
|
props.history.push(`./add?id=${record.id}&inspectionId=${record.inspectionId}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
}
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
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}`,
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ function InspectionView(props) {
|
||||||
{ label: "牵头检查部门", children: info.inspector?.departmentName },
|
{ label: "牵头检查部门", children: info.inspector?.departmentName },
|
||||||
{ label: "检查人", children: currentInspectorUserName.join(",") },
|
{ label: "检查人", children: currentInspectorUserName.join(",") },
|
||||||
{ label: "检查类型", children: info.typeName },
|
{ 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: info.place, span: 2 },
|
||||||
{ label: "计划属性", children: getLabelName({ list: PLAN_ENUM, status: info.planType }), span: 2 },
|
{ label: "计划属性", children: getLabelName({ list: PLAN_ENUM, status: info.planType }), span: 2 },
|
||||||
...(info.planType === 1 ? [{ label: "计划名称", children: info.planName, span: 2 }] : []),
|
...(info.planType === 1 ? [{ label: "计划名称", children: info.planName, span: 2 }] : []),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import InspectionAdd from "../../../../Inspection/Inspection/Add";
|
||||||
|
|
||||||
|
function Add(props) {
|
||||||
|
return (<InspectionAdd {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Add;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import InspectionList from "../../../../Inspection/Inspection/List";
|
||||||
|
|
||||||
|
function Records(props) {
|
||||||
|
return (<InspectionList headerTitle="检查记录" {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Records;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
function Inspection(props) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Inspection;
|
||||||
|
|
@ -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;
|
|
||||||
|
|
@ -99,7 +99,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
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
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./inspectionRecords?planId=${record.id}&edit=0`);
|
props.history.push(`./inspection/records?planId=${record.id}&edit=0`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
检查记录
|
检查记录
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import InspectionAdd from "../../../../Inspection/Inspection/Add";
|
||||||
|
|
||||||
|
function Add(props) {
|
||||||
|
return (<InspectionAdd {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Add;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import InspectionList from "../../../../Inspection/Inspection/List";
|
||||||
|
|
||||||
|
function Records(props) {
|
||||||
|
return (<InspectionList headerTitle="检查记录" {...props} />);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Records;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
function Inspection(props) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Inspection;
|
||||||
|
|
@ -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;
|
|
||||||
Loading…
Reference in New Issue