feat
parent
107c89aaca
commit
b2465721bb
|
|
@ -80,7 +80,12 @@ export const queryQualMonitorCondition = declareRequest(
|
||||||
export const queryQualMonitoringPageStatistics = declareRequest(
|
export const queryQualMonitoringPageStatistics = declareRequest(
|
||||||
"qualReviewLoading",
|
"qualReviewLoading",
|
||||||
"Get > /safetyEval/qual-filing/qualificationMonitoringPageStatistics",
|
"Get > /safetyEval/qual-filing/qualificationMonitoringPageStatistics",
|
||||||
"monitorStats: {} | res.data || {}",
|
'monitorStats: {} | res.data || {}',
|
||||||
|
);
|
||||||
|
|
||||||
|
export const queryQualFilingCheckItem = declareRequest(
|
||||||
|
"qualFilingCheckItemLoading",
|
||||||
|
"Get > /safetyEval/qual-filing/check-item",
|
||||||
);
|
);
|
||||||
|
|
||||||
// ─── 资质现场核查 ───
|
// ─── 资质现场核查 ───
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
|
||||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { EVAL_TYPE_MAP, ROLE_DEFINITIONS_MAP } from "~/enumerate/constant";
|
import { EVAL_TYPE_MAP, ROLE_DEFINITIONS_MAP } from "~/enumerate/constant";
|
||||||
import { PROJECT_TYPE_MAP } from "~/enumerate/constant";
|
import { PROJECT_TYPE_MAP } from "~/enumerate/constant";
|
||||||
|
import WpsEditor from "~/pages/Container/WpsEditor";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
@ -351,6 +352,7 @@ const EvalProjectMonitorDetail = (props) => {
|
||||||
evalSurveyList,
|
evalSurveyList,
|
||||||
evalSurveyPage,
|
evalSurveyPage,
|
||||||
evalProjectDetail,
|
evalProjectDetail,
|
||||||
|
queryMyOrCreateDoc,
|
||||||
} = props;
|
} = props;
|
||||||
const {
|
const {
|
||||||
contractLoading,
|
contractLoading,
|
||||||
|
|
@ -358,6 +360,7 @@ const EvalProjectMonitorDetail = (props) => {
|
||||||
evalSurveyListLoading,
|
evalSurveyListLoading,
|
||||||
evalSurveyPageLoading,
|
evalSurveyPageLoading,
|
||||||
evalProjectDetailData,
|
evalProjectDetailData,
|
||||||
|
wpsDoc,
|
||||||
} = safetyEvalBusiness || {};
|
} = safetyEvalBusiness || {};
|
||||||
|
|
||||||
const [contractData, setContractData] = useState(null);
|
const [contractData, setContractData] = useState(null);
|
||||||
|
|
@ -365,6 +368,7 @@ const EvalProjectMonitorDetail = (props) => {
|
||||||
const [surveyPersonnel, setSurveyPersonnel] = useState([]);
|
const [surveyPersonnel, setSurveyPersonnel] = useState([]);
|
||||||
const [surveyAttachments, setSurveyAttachments] = useState({});
|
const [surveyAttachments, setSurveyAttachments] = useState({});
|
||||||
const [activeKey, setActiveKey] = useState("BUSINESS_CONTRACT");
|
const [activeKey, setActiveKey] = useState("BUSINESS_CONTRACT");
|
||||||
|
const [wpsVisible, setWpsVisible] = useState(false);
|
||||||
|
|
||||||
const fetchContract = async () => {
|
const fetchContract = async () => {
|
||||||
if (!projectId) return;
|
if (!projectId) return;
|
||||||
|
|
@ -403,6 +407,7 @@ const EvalProjectMonitorDetail = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (projectId) {
|
if (projectId) {
|
||||||
evalProjectDetail({ id: projectId });
|
evalProjectDetail({ id: projectId });
|
||||||
|
queryMyOrCreateDoc({ docxUrl: "", projectId });
|
||||||
}
|
}
|
||||||
fetchContract();
|
fetchContract();
|
||||||
fetchTeam();
|
fetchTeam();
|
||||||
|
|
@ -463,7 +468,13 @@ const EvalProjectMonitorDetail = (props) => {
|
||||||
{projectInfo}
|
{projectInfo}
|
||||||
<Tabs
|
<Tabs
|
||||||
activeKey={activeKey}
|
activeKey={activeKey}
|
||||||
onChange={setActiveKey}
|
onChange={(key) => {
|
||||||
|
if (key === "REPORT_PREPARATION") {
|
||||||
|
setWpsVisible(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setActiveKey(key);
|
||||||
|
}}
|
||||||
items={[
|
items={[
|
||||||
{
|
{
|
||||||
key: "BUSINESS_CONTRACT",
|
key: "BUSINESS_CONTRACT",
|
||||||
|
|
@ -489,8 +500,20 @@ const EvalProjectMonitorDetail = (props) => {
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "REPORT_PREPARATION",
|
||||||
|
label: renderTabLabel("报告编制", "REPORT_PREPARATION"),
|
||||||
|
children: null,
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
{wpsVisible && (
|
||||||
|
<WpsEditor
|
||||||
|
onCancel={() => setWpsVisible(false)}
|
||||||
|
fileId={wpsDoc?.fileId}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import {
|
||||||
} from "~/enumerate/enterpriseOptions";
|
} from "~/enumerate/enterpriseOptions";
|
||||||
import {
|
import {
|
||||||
QUAL_MONITOR_STATUS_MAP,
|
QUAL_MONITOR_STATUS_MAP,
|
||||||
QUAL_MONITOR_CONDITION_ITEMS,
|
|
||||||
QUAL_MONITOR_STATUS_OPTIONS,
|
QUAL_MONITOR_STATUS_OPTIONS,
|
||||||
QUAL_MONITOR_STANDARD_ROWS,
|
QUAL_MONITOR_STANDARD_ROWS,
|
||||||
} from "~/enumerate/constant";
|
} from "~/enumerate/constant";
|
||||||
|
|
@ -113,11 +112,12 @@ const QualMonitor = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [detailVisible, setDetailVisible] = useState(false);
|
const [detailVisible, setDetailVisible] = useState(false);
|
||||||
const [detailRecord, setDetailRecord] = useState(null);
|
const [detailRecord, setDetailRecord] = useState(null);
|
||||||
|
const [checkItems, setCheckItems] = useState([]);
|
||||||
const [standardVisible, setStandardVisible] = useState(false);
|
const [standardVisible, setStandardVisible] = useState(false);
|
||||||
const [data, setData] = useState([]);
|
const [data, setData] = useState([]);
|
||||||
|
|
||||||
const { qualReview, queryQualMonitorPage, queryQualMonitorCondition, queryQualMonitoringPageStatistics } = props;
|
const { qualReview, queryQualMonitorPage, queryQualMonitorCondition, queryQualMonitoringPageStatistics, queryQualFilingCheckItem } = props;
|
||||||
const { qualMonitorList, qualMonitorTotal, qualReviewLoading, monitorStats = {} } =
|
const { qualMonitorList, qualMonitorTotal, qualReviewLoading, qualFilingCheckItemLoading, monitorStats = {} } =
|
||||||
qualReview || {};
|
qualReview || {};
|
||||||
|
|
||||||
const stats = {
|
const stats = {
|
||||||
|
|
@ -157,21 +157,21 @@ const QualMonitor = (props) => {
|
||||||
queryQualMonitoringPageStatistics();
|
queryQualMonitoringPageStatistics();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const openDetail = (record) => {
|
const openDetail = async (record) => {
|
||||||
setDetailRecord({
|
setDetailRecord(record);
|
||||||
...record,
|
|
||||||
conditionDetails: buildConditionDetails(record),
|
|
||||||
});
|
|
||||||
setDetailVisible(true);
|
setDetailVisible(true);
|
||||||
|
setCheckItems([]);
|
||||||
|
const res = await queryQualFilingCheckItem({ id: record.id });
|
||||||
|
if (res?.success !== false) {
|
||||||
|
setCheckItems(res?.data || []);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const resultTag = (result) => {
|
const resultTag = (status) => {
|
||||||
if (result === "通过") return <Tag color="success">通过</Tag>;
|
if (status === "PASS") return <Tag color="success">通过</Tag>;
|
||||||
if (result === "预警" || result === "需核验")
|
if (status === "WARN") return <Tag color="warning">预警</Tag>;
|
||||||
return <Tag color="warning">{result}</Tag>;
|
if (status === "NOT_PASS") return <Tag color="error">不通过</Tag>;
|
||||||
if (result === "不通过" || result === "部分异常")
|
return <Tag>{status}</Tag>;
|
||||||
return <Tag color="error">{result}</Tag>;
|
|
||||||
return <Tag>{result}</Tag>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
|
@ -423,33 +423,29 @@ const QualMonitor = (props) => {
|
||||||
每项展示监管字段、当前值、结论和来源。
|
每项展示监管字段、当前值、结论和来源。
|
||||||
</div>
|
</div>
|
||||||
<Table
|
<Table
|
||||||
rowKey="key"
|
rowKey="title"
|
||||||
size="small"
|
size="small"
|
||||||
pagination={false}
|
pagination={false}
|
||||||
|
loading={qualFilingCheckItemLoading}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "检查项", dataIndex: "label", width: 120 },
|
{ title: "检查项", dataIndex: "title", width: 120 },
|
||||||
{ title: "资质要求", dataIndex: "require", width: 280 },
|
{ title: "资质要求", dataIndex: "description", width: 280 },
|
||||||
{ title: "当前值", dataIndex: "value", width: 260 },
|
{ title: "当前值", dataIndex: "currentValue", width: 260 },
|
||||||
{
|
{
|
||||||
title: "结论",
|
title: "结论",
|
||||||
dataIndex: "result",
|
dataIndex: "status",
|
||||||
width: 80,
|
width: 80,
|
||||||
render: resultTag,
|
render: resultTag,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "来源字段",
|
title: "来源字段",
|
||||||
dataIndex: "source",
|
dataIndex: "sourceColumn",
|
||||||
render: (text) => (
|
render: (text) => (
|
||||||
<span className="cell-source">{text}</span>
|
<span className="cell-source">{text}</span>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
dataSource={QUAL_MONITOR_CONDITION_ITEMS.map((item) => {
|
dataSource={checkItems}
|
||||||
const detail = detailRecord.conditionDetails[item.key];
|
|
||||||
return detail
|
|
||||||
? { key: item.key, label: item.label, ...detail }
|
|
||||||
: null;
|
|
||||||
}).filter(Boolean)}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import "./index.less";
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
||||||
const App = (props) => {
|
const App = (props) => {
|
||||||
const { onCancel, safetyEvalBusiness } = props;
|
const { onCancel, safetyEvalBusiness, readOnly } = props;
|
||||||
const { createDocLoading } = safetyEvalBusiness;
|
const { createDocLoading } = safetyEvalBusiness;
|
||||||
const [expandedMap, setExpandedMap] = useState({});
|
const [expandedMap, setExpandedMap] = useState({});
|
||||||
const [fileId, setFileId] = useState(props.fileId);
|
const [fileId, setFileId] = useState(props.fileId);
|
||||||
|
|
@ -90,7 +90,7 @@ const App = (props) => {
|
||||||
mount: document.getElementById("app-sbsb"),
|
mount: document.getElementById("app-sbsb"),
|
||||||
fileId: fileId,
|
fileId: fileId,
|
||||||
token: sessionStorage.getItem("token"),
|
token: sessionStorage.getItem("token"),
|
||||||
|
...(readOnly ? { commonOptions: { isBrowserViewMode: true } } : {}),
|
||||||
});
|
});
|
||||||
await instance.ready();
|
await instance.ready();
|
||||||
sdkRef.current = instance;
|
sdkRef.current = instance;
|
||||||
|
|
@ -116,7 +116,7 @@ const App = (props) => {
|
||||||
}
|
}
|
||||||
extra={
|
extra={
|
||||||
<Flex gap={12}>
|
<Flex gap={12}>
|
||||||
<Button onClick={handleSave}>保存</Button>
|
{!readOnly && <Button onClick={handleSave}>保存</Button>}
|
||||||
<Button onClick={handleDownload}>下载报告</Button>
|
<Button onClick={handleDownload}>下载报告</Button>
|
||||||
|
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue