-
-
基本信息
-
-
承诺内容
-
) },
- ]}
- />
-
{detail.promiseType === 1 ? "受状人" : "承诺人"}
-
{
- const base = [
- { label: `部门${index + 1}`, children: item.departmentName || "-", span: (detail.releasePlatform !== 1 ? 2 : 1) },
- { label: `岗位${index + 1}`, children: item.postName || "-" },
- { label: `人员${index + 1}`, children: item.userName || "-" },
- ];
+
+
+
基本信息
+
+
承诺内容
+
) },
+ ]}
+ />
+
{detail.promiseType === 1 ? "受状人" : "承诺人"}
+
{
+ const base = [
+ { label: `部门${index + 1}`, children: item.departmentName || "-" },
+ { label: `岗位${index + 1}`, children: item.postName || "-" },
+ { label: `人员${index + 1}`, children: item.userName || "-" },
+ ];
- // 只有 releasePlatform=1(分公司) 才显示签订单位
- if (detail.releasePlatform === 1) {
- base.unshift({
- label: `签订单位${index + 1}`,
- children: item.corpName || "-",
- });
- }
+ // 只有 releasePlatform=1(分公司) 才显示签订单位
+ if (detail.releasePlatform === 1) {
+ base.unshift({
+ label: `签订单位${index + 1}`,
+ children: item.corpName || "-",
+ });
+ }
- return base;
- }),
- ]}
- />
- {detail.promiseType === 1 ? "发状人" : "被承诺人"}
-
-
-
+ return base;
+ }),
+ ]}
+ />
+
{detail.promiseType === 1 ? "发状人" : "被承诺人"}
+
+
+
+
+ {busPromiseTemplateModalOpen &&
setBusPromiseTemplateModalOpen(false)} id={id} modalUrl={modalUrl} />}
- {busPromiseTemplateModalOpen && setBusPromiseTemplateModalOpen(false)} id={id} modalUrl={modalUrl} />}
-
+
);
}
diff --git a/src/pages/Container/Supervise/Management/List/index.js b/src/pages/Container/Supervise/Management/List/index.js
index f9208e7..dfbb413 100644
--- a/src/pages/Container/Supervise/Management/List/index.js
+++ b/src/pages/Container/Supervise/Management/List/index.js
@@ -1,7 +1,8 @@
+import useUrlState from "@ahooksjs/use-url-state";
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
-import { tools } from "@cqsjjb/jjb-common-lib";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, message, Modal, Space, Tabs, Tooltip } from "antd";
+import dayjs from "dayjs";
import { useEffect, useState } from "react";
import AddIcon from "zy-react-library/components/Icon/AddIcon";
import Search from "zy-react-library/components/Search";
@@ -13,10 +14,11 @@ import { getLabelName } from "zy-react-library/utils";
import { PROMISE_TYPE_ENUM, RELEASE_PLATFORM_ENUM } from "~/enumerate/constant";
import { NS_COMMITMENT } from "~/enumerate/namespace";
-const { query } = tools.router;
function List(props) {
const [form] = Form.useForm();
- const [releasePlatform, setReleasePlatform] = useState(query.releasePlatform || RELEASE_PLATFORM_ENUM[0].bianma);
+ const [query, setQuery] = useUrlState({
+ releasePlatform: RELEASE_PLATFORM_ENUM[1].bianma,
+ }, { navigateMode: "replace" });
const [dorpInfo, setDorpInfo] = useState("");
const { tableProps, getData } = useTable(props["busPromiseList"], {
form,
@@ -25,7 +27,7 @@ function List(props) {
createTimeE: formData.createTime?.[1],
}),
params: {
- releasePlatform,
+ releasePlatform: query.releasePlatform,
},
});
const getDorpInfo = async () => {
@@ -86,14 +88,13 @@ function List(props) {
({
key: item.bianma,
label: item.name,
}))}
onChange={(event) => {
- query.releasePlatform = event;
- setReleasePlatform(event);
+ setQuery({ releasePlatform: event });
getData();
}}
/>
@@ -120,17 +121,17 @@ function List(props) {
dataIndex: "promiseType",
render: (_, record) => getLabelName({ list: PROMISE_TYPE_ENUM, status: record.promiseType }),
},
- { title: "安全承诺级别", dataIndex: "levelName" },
+ { title: "安全承诺级别", dataIndex: "levelName", hidden: query.releasePlatform === "2" },
{
title: "下发对象",
dataIndex: "releasePlatform",
render: (_, record) => getLabelName({ list: RELEASE_PLATFORM_ENUM, status: record.releasePlatform }),
},
- { title: "签订单位", dataIndex: "corpName" },
+ { title: "签订单位", dataIndex: "corpName", hidden: query.releasePlatform === "2" },
{ title: "适用期限", render: (_, record) => `${record.promiseTermStart}至${record.promiseTermEnd}` },
{ title: "涉及岗位", dataIndex: "postNames" },
- { title: "承诺人数/涉及人数", dataIndex: "signedCount", render: (_, record) => `已完成${record.signedCount}/${record.peopleNumInvolved}` },
- { title: "下发时间", dataIndex: "updateTime" },
+ { title: "承诺人数/涉及人数", dataIndex: "signedCount", render: (_, record) => `${record.signedCount === record.peopleNumInvolved ? "已" : "未"}完成${record.signedCount}/${record.peopleNumInvolved}` },
+ { title: "下发时间", dataIndex: "updateTime", render: (_, record) => record.updateTime ? dayjs(record.updateTime).format("YYYY-MM-DD") : "" },
{
title: "状态",
render: (_, record) => getLabelName({
diff --git a/src/pages/Container/Supervise/busPromise/List/index.js b/src/pages/Container/Supervise/busPromise/List/index.js
index c02414c..b925d2e 100644
--- a/src/pages/Container/Supervise/busPromise/List/index.js
+++ b/src/pages/Container/Supervise/busPromise/List/index.js
@@ -1,6 +1,5 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, Space } from "antd";
-import dayjs from "dayjs";
import Search from "zy-react-library/components/Search";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
@@ -26,7 +25,7 @@ function List(props) {
record.createTime ? dayjs(record.createTime).format("YYYY") : "" },
+ { title: "年份", dataIndex: "createTime" },
{ title: "安全承诺数", dataIndex: "promiseCount" },
{ title: "下发安全承诺人数", dataIndex: "issueCount" },
{ title: "签订安全承诺人数", dataIndex: "signCount" },
@@ -39,7 +38,7 @@ function List(props) {