feat(inspection): 完善检查验收功能并优化表单配置
- 更新隐患验收列表的状态筛选逻辑和按钮显示条件 - 调整被检查单位选择组件的参数配置 - 修复防爆检查提交时的检查ID字段映射问题 - 在隐患添加表单中增加ID字段显示 - 优化签名文件路径获取的空值处理 - 调整检查人员部门选择组件的搜索类型和参数 - 更新检查列表入口参数以支持不同入口类型 - 重构记录列表的查询参数和成功回调逻辑 - 增加检查时间格式化显示和打印功能 - 完善计划执行详情的查询参数传递 - 更新监管端验收和检查页面的组织架构搜索配置 - 添加系统全局地图坐标和倾斜摄影数据配置master
parent
4033fe3410
commit
4c4ff42c0b
11
src/main.js
11
src/main.js
|
|
@ -12,7 +12,16 @@ dayjs.locale("zh-cn");
|
|||
setJJBCommonAntdMessage(message);
|
||||
|
||||
const app = setup();
|
||||
|
||||
window.mapLongitude = "119.69457721306945";
|
||||
window.mapLatitude = "39.940504336846665";
|
||||
window.mapObliquePhotography = [
|
||||
"http://192.168.192.215:8021/ware/upload/%E6%9B%B9%E5%A6%83%E7%94%B8%E6%B8%AF%E4%B8%9C/%E6%9B%B9%E5%A6%83%E7%94%B8%E6%B8%AF%E4%B8%9C/merge_tile.json",
|
||||
"http://192.168.192.215:8021/ware/upload/%E6%9B%B9%E5%A6%83%E7%94%B8%E6%B8%AF%E8%A5%BF/%E6%9B%B9%E5%A6%83%E7%94%B8%E6%B8%AF%E8%A5%BF/merge_tile.json",
|
||||
"http://192.168.192.215:8021/ware/upload/qhdxys/merge_tile.json",
|
||||
"http://192.168.192.215:8021/ware/upload/qhdgysh/merge_tile.json",
|
||||
"http://192.168.192.215:8021/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/merge_tile.json",
|
||||
"http://192.168.192.215:8021/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/merge_tile.json",
|
||||
];
|
||||
// 非底座环境运行
|
||||
if (!window.__POWERED_BY_QIANKUN__) {
|
||||
// 云组件默认依赖
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { NS_INSPECTION } from "~/enumerate/namespace";
|
|||
function HiddenList(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const {tableProps} = useTable(props["hiddenList"], {
|
||||
params: { foreignKey: query.inspectionId, state: "301", queryType: "1" },
|
||||
params: {foreignKey: query.inspectionId, queryType: "1"},
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -19,7 +19,11 @@ function HiddenList(props) {
|
|||
<Table
|
||||
columns={[
|
||||
{title: "隐患描述", dataIndex: "hiddenDesc"},
|
||||
{ title: "隐患状态", dataIndex: "state", render: (_, record) => getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) },
|
||||
{
|
||||
title: "隐患状态",
|
||||
dataIndex: "state",
|
||||
render: (_, record) => getLabelName({list: HIDDEN_STATE_ENUM, status: record.state})
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
|
|
@ -33,7 +37,7 @@ function HiddenList(props) {
|
|||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
{record.state === 301 && <Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./acceptance?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||
|
|
@ -41,6 +45,7 @@ function HiddenList(props) {
|
|||
>
|
||||
验收
|
||||
</Button>
|
||||
}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function List(props) {
|
|||
{ name: "inspectionUserName", label: "检查人" },
|
||||
{ name: "type", label: "检查类型", render: <DictionarySelectTree dictValue="inspectionType" onlyLastLevel /> },
|
||||
{ name: "checkTime", label: "检查时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
||||
{ name: "inspectedDepartmentId", label: "被检查单位", render: <DepartmentSelectTree searchType={props.corpSearchType} params={{ corpinfoTypeList: [0,1] }}/> },
|
||||
{ name: "inspectedDepartmentId", label: "被检查单位", render: <DepartmentSelectTree searchType={props.corpSearchType} params={{ enterpriseType: 2 }}/> },
|
||||
{ name: "inspectedUserName", label: "被检查单位现场负责人" },
|
||||
]}
|
||||
form={form}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ function DefenseHandlingModalComponent(props) {
|
|||
});
|
||||
signature = filePath;
|
||||
}
|
||||
const { success } = await props["defenseSubmit"]({ ...values, signature, inspectionId: props.id });
|
||||
const { success } = await props["defenseSubmit"]({ ...values, signature, inspectionId: props.inspectionId });
|
||||
if (success) {
|
||||
message.success("操作成功");
|
||||
props.onCancel();
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ function HiddenAddModal(props) {
|
|||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
{ name: "id", label: "id", onlyForLabel: true },
|
||||
{ name: "hiddenId", label: "隐患id", onlyForLabel: true },
|
||||
{ name: "hiddenDesc", label: "隐患描述", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{
|
||||
name: "hiddenLevel",
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ function Add(props) {
|
|||
}
|
||||
}
|
||||
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({
|
||||
...data,
|
||||
situationList: situationList.length > 0 ? situationList : [{ content: undefined }],
|
||||
|
|
@ -370,7 +370,7 @@ function Add(props) {
|
|||
render: (
|
||||
<DepartmentSelectTree
|
||||
searchType={props.corpSearchType}
|
||||
params={{ corpinfoTypeList: [0,1] }}
|
||||
params={{ enterpriseType: 2 }}
|
||||
onGetLabel={label => form.setFieldValue(["personUnderInspection", "departmentName"], label)}
|
||||
onChange={() => {
|
||||
form.setFieldValue(["personUnderInspection", "userId"], "");
|
||||
|
|
@ -437,7 +437,8 @@ function Add(props) {
|
|||
label: "检查人员部门",
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
searchType={props.searchType}
|
||||
searchType={props.corpSearchType}
|
||||
params={{ inType: [0,1,2,6] }}
|
||||
onChange={() => {
|
||||
form.setFieldValue(["inspectorList", field.name, "userId"], "");
|
||||
form.setFieldValue(["inspectorList", field.name, "userName"], "");
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ function List(props) {
|
|||
checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "",
|
||||
checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "",
|
||||
}),
|
||||
params: { status: "", planId: query.planId, entrance: query.planId ? "2" : "1", planType: query.planId ? 1 : 0 },
|
||||
params: { status: "", planId: query.planId, entrance: query.planId ? "3" : "1", planType: query.planId ? 1 : 0 },
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ function List(props) {
|
|||
});
|
||||
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const { tableProps, getData } = useTable(props["inspectionList"], {
|
||||
form,
|
||||
transform: formData => ({
|
||||
|
|
@ -44,13 +43,12 @@ function List(props) {
|
|||
checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "",
|
||||
}),
|
||||
params: {
|
||||
status: "",
|
||||
entrance: "0",
|
||||
corpId: query.corpId,
|
||||
checkStartTime: query.checkStartTime,
|
||||
checkEndTime: query.checkEndTime,
|
||||
planType: query.planType,
|
||||
},
|
||||
onSuccess: () => {
|
||||
getCount();
|
||||
}
|
||||
});
|
||||
const getCount = async () => {
|
||||
const { data } = await props["inspectionCount"]({
|
||||
|
|
@ -60,6 +58,7 @@ function List(props) {
|
|||
checkStartTime: query.checkStartTime || form.getFieldValue("checkTime")?.[0],
|
||||
checkEndTime: query.checkEndTime || form.getFieldValue("checkTime").checkTime?.[1],
|
||||
planType: query.planType,
|
||||
...form.getFieldsValue()
|
||||
});
|
||||
setCount(data);
|
||||
};
|
||||
|
|
@ -86,7 +85,7 @@ function List(props) {
|
|||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
values={{
|
||||
checkTime: [query.checkStartTime, query.checkEndTime],
|
||||
checkTime: query.checkStartTime ? [query.checkStartTime, query.checkEndTime] : [],
|
||||
planType: query.planType,
|
||||
}}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import { getFileUrl, getLabelName } from "zy-react-library/utils";
|
|||
import HiddenFlowModal from "~/components/HiddenFlowModal";
|
||||
import { PLAN_ENUM } from "~/enumerate/constant";
|
||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||
import { formatDate } from "~/utils/dateFormat";
|
||||
import "./index.less";
|
||||
|
||||
function InspectionView(props) {
|
||||
|
|
@ -89,7 +90,7 @@ function InspectionView(props) {
|
|||
{ label: "牵头检查部门", children: info.inspector?.departmentName },
|
||||
{ label: "检查人", children: currentInspectorUserName.join(",") },
|
||||
{ label: "检查类型", children: info.typeName },
|
||||
{ label: "检查时间", children: (info.timeStart && info.timeEnd) ? `${info.timeStart}至${info.timeEnd}` : "" },
|
||||
{ label: "检查时间", children: (info.timeStart && info.timeEnd) ? `自${formatDate(record.timeStart)}至${formatDate(record.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 }] : []),
|
||||
|
|
@ -213,6 +214,12 @@ function InspectionView(props) {
|
|||
]}
|
||||
/>
|
||||
</div>
|
||||
<div style={{ marginTop: 20, paddingBottom: 20, textAlign: "center" }}>
|
||||
<Space>
|
||||
<Button type="primary" onClick={handlePrint}>打印</Button>
|
||||
{/* {query.isExport !== "0" && <Button type="primary">导出</Button>} */}
|
||||
</Space>
|
||||
</div>
|
||||
</Spin>
|
||||
{hiddenViewModalOpen && (
|
||||
<HiddenViewModal
|
||||
|
|
|
|||
|
|
@ -12,7 +12,14 @@ import ViewInfo from "~/pages/Container/BranchCompany/Plan/ViewInfo";
|
|||
|
||||
function PersonnelExecutionDetails(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const { tableProps } = useTable(props["inspectionList"], { params: { status: "", entrance: "2", checkUserId: query.userId } });
|
||||
const { tableProps } = useTable(props["inspectionList"], {
|
||||
params: {
|
||||
status: "",
|
||||
entrance: "2",
|
||||
checkUserId: query.userId,
|
||||
planId: query.planId,
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<Page headerTitle="计划执行总次数" contentPadding="0 20px 20px 20px">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import AcceptanceList from "~/pages/Container/BranchCompany/Inspection/Acceptance/List";
|
||||
|
||||
function List(props) {
|
||||
return <AcceptanceList acceptPermissionKey="inspection-jg-check-accept-edit" searchType="all" corpSearchType="company" {...props} />;
|
||||
return <AcceptanceList acceptPermissionKey="inspection-jg-check-accept-edit" searchType="all" corpSearchType="inType" {...props} />;
|
||||
}
|
||||
|
||||
export default List;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import InspectionAdd from "~/pages/Container/BranchCompany/Inspection/Inspection/Add";
|
||||
|
||||
function Add(props) {
|
||||
return <InspectionAdd searchType="all" corpSearchType="company" source="4" {...props} />;
|
||||
return <InspectionAdd searchType="all" corpSearchType="inType" source="4" {...props} />;
|
||||
}
|
||||
|
||||
export default Add;
|
||||
|
|
|
|||
Loading…
Reference in New Issue