Compare commits
No commits in common. "36f3896b60b3d3256e8d28ccca546c15f1e63baa" and "d6997f351b7c7b442397f93ddae2e53e96fed486" have entirely different histories.
36f3896b60
...
d6997f351b
|
|
@ -11,7 +11,7 @@ module.exports = {
|
||||||
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
||||||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||||
//API_HOST: "https://gbs-gateway.qhdsafety.com",
|
//API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||||
|
|
||||||
API_HOST: "http://192.168.0.152",
|
API_HOST: "http://192.168.0.152",
|
||||||
//API_HOST: "http://192.168.0.150", //太浅
|
//API_HOST: "http://192.168.0.150", //太浅
|
||||||
// API_HOST: "http://192.168.0.152",
|
// API_HOST: "http://192.168.0.152",
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,3 @@ export const orgPositionRemove = declareRequest(
|
||||||
"orgPositionLoading",
|
"orgPositionLoading",
|
||||||
"Post > @/safetyEval/org-position/delete",
|
"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",
|
|
||||||
);
|
|
||||||
|
|
|
||||||
|
|
@ -282,46 +282,4 @@ export const evalSurveyClockIn = declareRequest(
|
||||||
"evalSurveyClockInLoading",
|
"evalSurveyClockInLoading",
|
||||||
"Get > /safetyEval/regulator/eval-project-monitor/survey-clock-in",
|
"Get > /safetyEval/regulator/eval-project-monitor/survey-clock-in",
|
||||||
"evalSurveyClockIn: [] | res.data || []",
|
"evalSurveyClockIn: [] | res.data || []",
|
||||||
);
|
);
|
||||||
|
|
||||||
// ===== 机构端-安评报告库 =====
|
|
||||||
|
|
||||||
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,5 +23,3 @@ export const NS_QUAL_EXPERT = defineNamespace("qualExpert");
|
||||||
export const NS_DRIVER = defineNamespace("driver");
|
export const NS_DRIVER = defineNamespace("driver");
|
||||||
export const NS_RISK_CENTER = defineNamespace("riskCenter");
|
export const NS_RISK_CENTER = defineNamespace("riskCenter");
|
||||||
export const NS_SAFETY_EVAL_BUSINESS = defineNamespace("safetyEvalBusiness");
|
export const NS_SAFETY_EVAL_BUSINESS = defineNamespace("safetyEvalBusiness");
|
||||||
export const NS_REGULATOR_EVAL_REPORT = defineNamespace("regulatorEvalReport");
|
|
||||||
export const NS_INSP_NOTICE = defineNamespace("inspNotice");
|
|
||||||
|
|
|
||||||
|
|
@ -61,16 +61,11 @@ function DepartmentPositionPage(props) {
|
||||||
const [treeData, setTreeData] = useState([]);
|
const [treeData, setTreeData] = useState([]);
|
||||||
const [deptModalOpen, setDeptModalOpen] = useState(false);
|
const [deptModalOpen, setDeptModalOpen] = useState(false);
|
||||||
const [positionModalOpen, setPositionModalOpen] = 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 [currentId, setCurrentId] = useState("");
|
||||||
const [filterKeyword, setFilterKeyword] = useState("");
|
const [filterKeyword, setFilterKeyword] = useState("");
|
||||||
const [staffOptions, setStaffOptions] = useState([]);
|
const [staffOptions, setStaffOptions] = useState([]);
|
||||||
const [positionForm] = Form.useForm();
|
const [positionForm] = Form.useForm();
|
||||||
const [modalForm] = Form.useForm();
|
const [modalForm] = Form.useForm();
|
||||||
const [assignRoleForm] = Form.useForm();
|
|
||||||
const [dataSource, setDataSource] = useState([]);
|
const [dataSource, setDataSource] = useState([]);
|
||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
@ -220,66 +215,6 @@ function DepartmentPositionPage(props) {
|
||||||
setPositionModalOpen(false);
|
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) => {
|
const openDeptModal = (record) => {
|
||||||
setCurrentId(asId(record?.id) || "");
|
setCurrentId(asId(record?.id) || "");
|
||||||
setDeptModalOpen(true);
|
setDeptModalOpen(true);
|
||||||
|
|
@ -411,16 +346,10 @@ function DepartmentPositionPage(props) {
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "名称", dataIndex: "positionName" },
|
{ title: "名称", dataIndex: "positionName" },
|
||||||
{ title: "职责", dataIndex: "dutyDesc" },
|
{ title: "职责", dataIndex: "dutyDesc" },
|
||||||
{
|
|
||||||
title: "GBS角色",
|
|
||||||
dataIndex: "gbsRoleName",
|
|
||||||
render: (text, record) =>
|
|
||||||
text || record.gbsRoleCode || "-",
|
|
||||||
},
|
|
||||||
{ title: "备注", dataIndex: "remark" },
|
{ title: "备注", dataIndex: "remark" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 220,
|
width: 160,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<TableAction>
|
<TableAction>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -429,12 +358,6 @@ function DepartmentPositionPage(props) {
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => openAssignRoleModal(record)}
|
|
||||||
>
|
|
||||||
分配角色
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
danger
|
danger
|
||||||
type="link"
|
type="link"
|
||||||
|
|
@ -532,42 +455,6 @@ function DepartmentPositionPage(props) {
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</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>
|
</PageLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,39 +115,7 @@ 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",
|
key: "/safetyEval/container/EnterpriseInfo",
|
||||||
|
|
@ -287,30 +255,6 @@ 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",
|
key: "/safetyEval/container/test",
|
||||||
label: "测试",
|
label: "测试",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue