监控通知
parent
2d20215e96
commit
be12df428e
|
|
@ -14,8 +14,8 @@ module.exports = {
|
|||
|
||||
//API_HOST: "http://192.168.0.152",
|
||||
//API_HOST: "http://192.168.0.150", //太浅
|
||||
API_HOST: "http://192.168.0.152",
|
||||
//API_HOST: "http://192.168.0.103", //huwei
|
||||
// API_HOST: "http://192.168.0.152",
|
||||
API_HOST: "http://192.168.0.103", //huwei
|
||||
},
|
||||
production: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
|
|
|
|||
|
|
@ -20,3 +20,13 @@ export const orgPositionRemove = declareRequest(
|
|||
"orgPositionLoading",
|
||||
"Post > @/safetyEval/org-position/delete",
|
||||
);
|
||||
|
||||
export const orgPositionAssignGbsRole = declareRequest(
|
||||
"orgPositionLoading",
|
||||
"Post > @/safetyEval/org-position/assign-gbs-role",
|
||||
);
|
||||
|
||||
export const orgPositionGbsRoles = declareRequest(
|
||||
"orgPositionLoading",
|
||||
"Get > /safetyEval/org-position/gbs-roles",
|
||||
);
|
||||
|
|
|
|||
|
|
@ -146,3 +146,45 @@ export const projectWaringRemindPage = declareRequest(
|
|||
"projectWaringRemindPageLoading",
|
||||
"Get > /safetyEval/project-waring/remind-page",
|
||||
);
|
||||
|
||||
// ===== 机构端-安评报告库 =====
|
||||
|
||||
export const evalReportSummary = declareRequest(
|
||||
"evalReportSummaryLoading",
|
||||
"Get > /safetyEval/institution/eval-report/summary",
|
||||
);
|
||||
|
||||
export const evalReportPage = declareRequest(
|
||||
"evalReportPageLoading",
|
||||
"Get > /safetyEval/institution/eval-report/page",
|
||||
);
|
||||
|
||||
export const evalReportDetail = declareRequest(
|
||||
"evalReportDetailLoading",
|
||||
"Get > /safetyEval/institution/eval-report/get",
|
||||
);
|
||||
|
||||
export const evalReportAdd = declareRequest(
|
||||
"evalReportAddLoading",
|
||||
"Post > @/safetyEval/institution/eval-report/add",
|
||||
);
|
||||
|
||||
export const evalReportSubmit = declareRequest(
|
||||
"evalReportSubmitLoading",
|
||||
"Post > @/safetyEval/institution/eval-report/submit",
|
||||
);
|
||||
|
||||
export const evalReportSpotcheckList = declareRequest(
|
||||
"evalReportSpotcheckListLoading",
|
||||
"Get > /safetyEval/institution/eval-report-spotcheck/list",
|
||||
);
|
||||
|
||||
export const evalReportSpotcheckDetail = declareRequest(
|
||||
"evalReportSpotcheckDetailLoading",
|
||||
"Get > /safetyEval/institution/eval-report-spotcheck/get",
|
||||
);
|
||||
|
||||
export const evalReportSpotcheckRectify = declareRequest(
|
||||
"evalReportSpotcheckRectifyLoading",
|
||||
"Post > @/safetyEval/institution/eval-report-spotcheck/rectify",
|
||||
);
|
||||
|
|
@ -23,3 +23,5 @@ export const NS_QUAL_EXPERT = defineNamespace("qualExpert");
|
|||
export const NS_DRIVER = defineNamespace("driver");
|
||||
export const NS_RISK_CENTER = defineNamespace("riskCenter");
|
||||
export const NS_SAFETY_EVAL_BUSINESS = defineNamespace("safetyEvalBusiness");
|
||||
export const NS_REGULATOR_EVAL_REPORT = defineNamespace("regulatorEvalReport");
|
||||
export const NS_INSP_NOTICE = defineNamespace("inspNotice");
|
||||
|
|
|
|||
|
|
@ -61,11 +61,16 @@ function DepartmentPositionPage(props) {
|
|||
const [treeData, setTreeData] = useState([]);
|
||||
const [deptModalOpen, setDeptModalOpen] = useState(false);
|
||||
const [positionModalOpen, setPositionModalOpen] = useState(false);
|
||||
const [assignRoleModalOpen, setAssignRoleModalOpen] = useState(false);
|
||||
const [assignRoleRecord, setAssignRoleRecord] = useState(null);
|
||||
const [gbsRoleOptions, setGbsRoleOptions] = useState([]);
|
||||
const [gbsRoleLoading, setGbsRoleLoading] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [filterKeyword, setFilterKeyword] = useState("");
|
||||
const [staffOptions, setStaffOptions] = useState([]);
|
||||
const [positionForm] = Form.useForm();
|
||||
const [modalForm] = Form.useForm();
|
||||
const [assignRoleForm] = Form.useForm();
|
||||
const [dataSource, setDataSource] = useState([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
|
@ -215,6 +220,66 @@ function DepartmentPositionPage(props) {
|
|||
setPositionModalOpen(false);
|
||||
};
|
||||
|
||||
const closeAssignRoleModal = () => {
|
||||
assignRoleForm.resetFields();
|
||||
setAssignRoleRecord(null);
|
||||
setAssignRoleModalOpen(false);
|
||||
};
|
||||
|
||||
const openAssignRoleModal = async (record) => {
|
||||
setAssignRoleRecord(record);
|
||||
assignRoleForm.resetFields();
|
||||
assignRoleForm.setFieldsValue({
|
||||
gbsRoleCode: record?.gbsRoleCode || undefined,
|
||||
});
|
||||
setAssignRoleModalOpen(true);
|
||||
setGbsRoleLoading(true);
|
||||
try {
|
||||
const res = await props.orgPositionGbsRoles?.();
|
||||
const list = res?.data || [];
|
||||
setGbsRoleOptions(
|
||||
list.map((item) => ({
|
||||
label: item.roleName
|
||||
? `${item.roleName}(${item.roleCode})`
|
||||
: item.roleCode,
|
||||
value: item.roleCode,
|
||||
roleId: item.roleId,
|
||||
roleName: item.roleName,
|
||||
roleCode: item.roleCode,
|
||||
})),
|
||||
);
|
||||
} catch (err) {
|
||||
console.warn("[DepartmentPosition] load gbs roles failed:", err);
|
||||
setGbsRoleOptions([]);
|
||||
} finally {
|
||||
setGbsRoleLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const submitAssignRole = async (values) => {
|
||||
if (!assignRoleRecord?.id) {
|
||||
return;
|
||||
}
|
||||
const matched = gbsRoleOptions.find(
|
||||
(item) => item.value === values.gbsRoleCode,
|
||||
);
|
||||
if (!matched?.roleId) {
|
||||
message.warning("请选择有效的GBS角色(需包含角色ID)");
|
||||
return;
|
||||
}
|
||||
const res = await props.orgPositionAssignGbsRole({
|
||||
id: assignRoleRecord.id,
|
||||
gbsRoleId: matched.roleId,
|
||||
gbsRoleCode: values.gbsRoleCode,
|
||||
gbsRoleName: matched?.roleName,
|
||||
});
|
||||
if (res?.success !== false) {
|
||||
message.success("分配角色成功");
|
||||
closeAssignRoleModal();
|
||||
fetchPositionData(pageIndex, pageSize);
|
||||
}
|
||||
};
|
||||
|
||||
const openDeptModal = (record) => {
|
||||
setCurrentId(asId(record?.id) || "");
|
||||
setDeptModalOpen(true);
|
||||
|
|
@ -346,10 +411,16 @@ function DepartmentPositionPage(props) {
|
|||
columns={[
|
||||
{ title: "名称", dataIndex: "positionName" },
|
||||
{ title: "职责", dataIndex: "dutyDesc" },
|
||||
{
|
||||
title: "GBS角色",
|
||||
dataIndex: "gbsRoleName",
|
||||
render: (text, record) =>
|
||||
text || record.gbsRoleCode || "-",
|
||||
},
|
||||
{ title: "备注", dataIndex: "remark" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 160,
|
||||
width: 220,
|
||||
render: (_, record) => (
|
||||
<TableAction>
|
||||
<Button
|
||||
|
|
@ -358,6 +429,12 @@ function DepartmentPositionPage(props) {
|
|||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => openAssignRoleModal(record)}
|
||||
>
|
||||
分配角色
|
||||
</Button>
|
||||
<Button
|
||||
danger
|
||||
type="link"
|
||||
|
|
@ -455,6 +532,42 @@ function DepartmentPositionPage(props) {
|
|||
</Form>
|
||||
</Modal>
|
||||
)}
|
||||
|
||||
{assignRoleModalOpen && (
|
||||
<Modal
|
||||
open={assignRoleModalOpen}
|
||||
destroyOnHidden
|
||||
title="分配GBS角色"
|
||||
width={480}
|
||||
confirmLoading={orgPositionLoading}
|
||||
onCancel={closeAssignRoleModal}
|
||||
onOk={assignRoleForm.submit}
|
||||
>
|
||||
<Form
|
||||
form={assignRoleForm}
|
||||
layout="vertical"
|
||||
onFinish={submitAssignRole}
|
||||
>
|
||||
<Form.Item label="岗位名称">
|
||||
<Input value={assignRoleRecord?.positionName || ""} disabled />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="gbsRoleCode"
|
||||
label="GBS角色"
|
||||
rules={[{ required: true, message: "请选择GBS角色" }]}
|
||||
>
|
||||
<Select
|
||||
showSearch
|
||||
allowClear
|
||||
loading={gbsRoleLoading}
|
||||
placeholder="请选择GBS角色"
|
||||
options={gbsRoleOptions}
|
||||
optionFilterProp="label"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
)}
|
||||
</PageLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,39 @@ const menuItems = [
|
|||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
{
|
||||
key: "/safetyEval/container/OrgSupervision",
|
||||
label: "安评机构监督管理",
|
||||
icon: <BankOutlined />,
|
||||
children: [
|
||||
{
|
||||
key: "/safetyEval/container/MonitorManage/QualMonitor",
|
||||
label: "资质保持监控",
|
||||
icon: <BarChartOutlined />,
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/Supervision/EvalReportDatabase",
|
||||
label: "安评报告数据库",
|
||||
icon: <FileProtectOutlined />,
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/Supervision/EvalPortrait",
|
||||
label: "安全评价画像",
|
||||
icon: <PieChartOutlined />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/MonitorManage/RiskCenter",
|
||||
label: "风险预警中心",
|
||||
icon: <ExperimentOutlined />,
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/Supervision/InspectionNotice",
|
||||
label: "监督检查告知",
|
||||
icon: <BellOutlined />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/EnterpriseInfo",
|
||||
|
|
@ -185,23 +217,6 @@ const menuItems = [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/MonitorManage",
|
||||
label: "监督管理",
|
||||
icon: <SafetyCertificateOutlined />,
|
||||
children: [
|
||||
{
|
||||
key: "/safetyEval/container/MonitorManage/QualMonitor",
|
||||
label: "资质保持监控",
|
||||
icon: <BarChartOutlined />,
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/MonitorManage/RiskCenter",
|
||||
label: "风险预警中心",
|
||||
icon: <ExperimentOutlined />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/SafetyEvalBusiness",
|
||||
label: "安评业务管理",
|
||||
|
|
@ -244,6 +259,30 @@ const menuItems = [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/EvalReportLibraryManage",
|
||||
label: "安评报告库管理",
|
||||
icon: <FileProtectOutlined />,
|
||||
children: [
|
||||
{
|
||||
key: "/safetyEval/container/SafetyEvalBusiness/EvalReportLibrary",
|
||||
label: "报告库",
|
||||
icon: <FileTextOutlined />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/InspNoticeManage",
|
||||
label: "监督检查通知管理",
|
||||
icon: <BellOutlined />,
|
||||
children: [
|
||||
{
|
||||
key: "/safetyEval/container/InspNoticeManage/InspectionNotice",
|
||||
label: "监督检查通知",
|
||||
icon: <FileTextOutlined />,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: "/safetyEval/container/test",
|
||||
label: "测试",
|
||||
|
|
|
|||
Loading…
Reference in New Issue