fix(inspection): 修复检查流程中的状态映射和时间格式化问题
- 移除 InspectionFlowModal 中不再需要的流程类型排序逻辑 - 修正 INSPECTION_STATE_ENUM 中的状态码映射关系 - 在多个检查列表页面中添加日期格式化功能 - 更新部门选择组件的搜索参数配置 - 为流程节点添加红色状态颜色映射 - 修复 HiddenAddModal 组件中的 useEffect 依赖项问题master
parent
71971d3174
commit
4033fe3410
|
|
@ -12,18 +12,7 @@ function InspectionFlowModal(props) {
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
const { data } = await props["inspectionFlowchart"]({ id: props.id });
|
const { data } = await props["inspectionFlowchart"]({ id: props.id });
|
||||||
|
|
||||||
// 定义type的顺序
|
const { nodes, edges } = getFlowData(data.flowCOList, data.thisFlow);
|
||||||
const typeOrder = [100, 200, 300, 600, 700, 400, 500];
|
|
||||||
|
|
||||||
// 根据type顺序对flowCOList进行排序
|
|
||||||
const sortedFlowList = [...data.flowCOList].sort((a, b) => {
|
|
||||||
const indexA = typeOrder.indexOf(a.type);
|
|
||||||
const indexB = typeOrder.indexOf(b.type);
|
|
||||||
// 如果type不在预定义顺序中,放到最后
|
|
||||||
return (indexA === -1 ? Infinity : indexA) - (indexB === -1 ? Infinity : indexB);
|
|
||||||
});
|
|
||||||
|
|
||||||
const { nodes, edges } = getFlowData(sortedFlowList, data.thisFlow);
|
|
||||||
setNodes(nodes);
|
setNodes(nodes);
|
||||||
setEdges(edges);
|
setEdges(edges);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ export const INSPECTION_QUESTION_ENUM = [
|
||||||
];
|
];
|
||||||
|
|
||||||
export const INSPECTION_STATE_ENUM = [
|
export const INSPECTION_STATE_ENUM = [
|
||||||
{ bianma: "100", name: "待核实" },
|
{ bianma: "200", name: "待核实" },
|
||||||
{ bianma: "200", name: "待确认" },
|
{ bianma: "300", name: "待确认" },
|
||||||
{ bianma: "300", name: "待指派" },
|
{ bianma: "301", name: "待指派" },
|
||||||
{ bianma: "400", name: "待验收" },
|
{ bianma: "400", name: "待验收" },
|
||||||
{ bianma: "500", name: "检查归档" },
|
{ bianma: "500", name: "检查归档" },
|
||||||
{ bianma: "600", name: "检查核实打回" },
|
{ bianma: "600", name: "检查核实打回" },
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import DictionarySelectTree from "zy-react-library/components/SelectTree/Diction
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
@ -37,7 +38,7 @@ function List(props) {
|
||||||
{ name: "inspectionUserName", label: "检查人" },
|
{ name: "inspectionUserName", label: "检查人" },
|
||||||
{ name: "type", label: "检查类型", render: <DictionarySelectTree dictValue="inspectionType" onlyLastLevel /> },
|
{ name: "type", label: "检查类型", render: <DictionarySelectTree dictValue="inspectionType" onlyLastLevel /> },
|
||||||
{ name: "checkTime", label: "检查时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
{ name: "checkTime", label: "检查时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
||||||
{ name: "inspectedDepartmentId", label: "被检查单位", render: <DepartmentSelectTree searchType={props.searchType} /> },
|
{ name: "inspectedDepartmentId", label: "被检查单位", render: <DepartmentSelectTree searchType={props.corpSearchType} params={{ corpinfoTypeList: [0,1] }}/> },
|
||||||
{ name: "inspectedUserName", label: "被检查单位现场负责人" },
|
{ name: "inspectedUserName", label: "被检查单位现场负责人" },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
|
|
@ -51,7 +52,7 @@ function List(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{ title: "检查状态", dataIndex: "status", render: () => "待验收" },
|
{ title: "检查状态", dataIndex: "status", render: () => "待验收" },
|
||||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import DictionarySelectTree from "zy-react-library/components/SelectTree/Diction
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
@ -51,7 +52,7 @@ function List(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{ title: "检查状态", dataIndex: "status", render: () => "待指派" },
|
{ title: "检查状态", dataIndex: "status", render: () => "待指派" },
|
||||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
import { getFileUrl } from "zy-react-library/utils";
|
import { getFileUrl } from "zy-react-library/utils";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
@ -64,7 +65,7 @@ function List(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{ title: "检查状态", dataIndex: "status", render: () => "被检查单位负责人申辩" },
|
{ title: "检查状态", dataIndex: "status", render: () => "被检查单位负责人申辩" },
|
||||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
@ -60,7 +61,7 @@ function List(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{ title: "检查状态", dataIndex: "status", render: () => "待确认" },
|
{ title: "检查状态", dataIndex: "status", render: () => "待确认" },
|
||||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,9 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
function HiddenAddModal(props) {
|
function HiddenAddModal(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [hiddenPartType, setHiddenPartType] = useState("select");
|
const [hiddenPartType, setHiddenPartType] = useState("select");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.setFieldsValue(props.hiddenInfo);
|
form.setFieldsValue(props.hiddenInfo);
|
||||||
}, []);
|
}, [props.hiddenInfo]);
|
||||||
|
|
||||||
const onSubmit = (values) => {
|
const onSubmit = (values) => {
|
||||||
props.onConfirm({
|
props.onConfirm({
|
||||||
|
|
|
||||||
|
|
@ -369,7 +369,8 @@ function Add(props) {
|
||||||
label: "被检查单位",
|
label: "被检查单位",
|
||||||
render: (
|
render: (
|
||||||
<DepartmentSelectTree
|
<DepartmentSelectTree
|
||||||
searchType={props.searchType}
|
searchType={props.corpSearchType}
|
||||||
|
params={{ corpinfoTypeList: [0,1] }}
|
||||||
onGetLabel={label => form.setFieldValue(["personUnderInspection", "departmentName"], label)}
|
onGetLabel={label => form.setFieldValue(["personUnderInspection", "departmentName"], label)}
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
form.setFieldValue(["personUnderInspection", "userId"], "");
|
form.setFieldValue(["personUnderInspection", "userId"], "");
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import InspectionFlowModal from "~/components/InspectionFlowModal";
|
import InspectionFlowModal from "~/components/InspectionFlowModal";
|
||||||
import { INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM, PLAN_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM, PLAN_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
|
|
@ -79,7 +80,7 @@ function List(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart && record.timeEnd ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart && record.timeEnd ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{
|
{
|
||||||
title: "检查状态",
|
title: "检查状态",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
|
@ -58,7 +59,7 @@ function List(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{ title: "检查状态", dataIndex: "status", render: () => "待核实" },
|
{ title: "检查状态", dataIndex: "status", render: () => "待核实" },
|
||||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import useUrlQueryCriteria from "zy-react-library/hooks/useUrlQueryCriteria";
|
import useUrlQueryCriteria from "zy-react-library/hooks/useUrlQueryCriteria";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import InspectionFlowModal from "~/components/InspectionFlowModal";
|
import InspectionFlowModal from "~/components/InspectionFlowModal";
|
||||||
import { INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM, PLAN_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM, PLAN_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
|
|
@ -169,7 +170,7 @@ function List(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{
|
{
|
||||||
title: "检查状态",
|
title: "检查状态",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import Table from "zy-react-library/components/Table";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import { INSPECTION_STATE_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_STATE_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
import ViewInfo from "~/pages/Container/BranchCompany/Plan/ViewInfo";
|
import ViewInfo from "~/pages/Container/BranchCompany/Plan/ViewInfo";
|
||||||
|
|
@ -28,7 +29,7 @@ function PersonnelExecutionDetails(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{
|
{
|
||||||
title: "检查状态",
|
title: "检查状态",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import Table from "zy-react-library/components/Table";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
import { formatDate } from "~/utils/dateFormat";
|
||||||
import { INSPECTION_STATE_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_STATE_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
import ViewInfo from "~/pages/Container/BranchCompany/Plan/ViewInfo";
|
import ViewInfo from "~/pages/Container/BranchCompany/Plan/ViewInfo";
|
||||||
|
|
@ -29,7 +30,7 @@ function PlanExecutionDetails(props) {
|
||||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||||
{ title: "检查类型", dataIndex: "typeName" },
|
{ title: "检查类型", dataIndex: "typeName" },
|
||||||
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${record.timeStart}至${record.timeEnd}止` : "") },
|
{ title: "检查时间", width: 200, render: (_, record) => (record.timeStart ? `自${formatDate(record.timeStart)}至${formatDate(record.timeEnd)}止` : "") },
|
||||||
{
|
{
|
||||||
title: "检查状态",
|
title: "检查状态",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import AcceptanceList from "~/pages/Container/BranchCompany/Inspection/Acceptance/List";
|
import AcceptanceList from "~/pages/Container/BranchCompany/Inspection/Acceptance/List";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
return <AcceptanceList acceptPermissionKey="inspection-jg-check-accept-edit" searchType="all" {...props} />;
|
return <AcceptanceList acceptPermissionKey="inspection-jg-check-accept-edit" searchType="all" corpSearchType="company" {...props} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default List;
|
export default List;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import InspectionAdd from "~/pages/Container/BranchCompany/Inspection/Inspection/Add";
|
import InspectionAdd from "~/pages/Container/BranchCompany/Inspection/Inspection/Add";
|
||||||
|
|
||||||
function Add(props) {
|
function Add(props) {
|
||||||
return <InspectionAdd searchType="all" source="4" {...props} />;
|
return <InspectionAdd searchType="all" corpSearchType="company" source="4" {...props} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Add;
|
export default Add;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ export const getStatusColor = (status, type, thisFlow) => {
|
||||||
case 0: return "#1890ff"; // 蓝色
|
case 0: return "#1890ff"; // 蓝色
|
||||||
case 1: return "#52c41a"; // 绿色
|
case 1: return "#52c41a"; // 绿色
|
||||||
case 2: return "#52c41a"; // 绿色
|
case 2: return "#52c41a"; // 绿色
|
||||||
|
case 3: return "#ff4d4f"; // 红色
|
||||||
default: return "#1890ff";
|
default: return "#1890ff";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue