diff --git a/src/api/institution/index.js b/src/api/institution/index.js new file mode 100644 index 0000000..f9dec7b --- /dev/null +++ b/src/api/institution/index.js @@ -0,0 +1,44 @@ +import { apiGet } from "../../utils/enterpriseInfo/http"; + +/** + * 机构端首页(驾驶舱)数据接口。 + * + * 统一走项目 http 层(@cqsjjb/jjb-common-lib),自动附带 API_HOST、token 与机构上下文请求头。 + * 页面以 `await fetchXxx()` 直调并取业务 data,故此处统一解包: + * 失败时抛错,由页面 catch 兜底展示空态。 + */ +function unwrap(res) { + if (!res) { + throw new Error("请求失败"); + } + if (res.success === false) { + throw new Error(res.message || "请求失败"); + } + // 兼容 { code, data } 与已被 http 层解包的裸数据两种形态 + return Object.prototype.hasOwnProperty.call(res, "data") ? res.data : res; +} + +// 当前项目节点统计 +export async function fetchProjectNodeStats() { + return unwrap(await apiGet("/safetyEval/institution/dashboard/project-node-stats")); +} + +// 通知提醒 +export async function fetchNotices() { + return unwrap(await apiGet("/safetyEval/institution/dashboard/notices")); +} + +// 服务行业项目统计 +export async function fetchIndustryStat() { + return unwrap(await apiGet("/safetyEval/institution/dashboard/industry-stat")); +} + +// 评价类别占比 +export async function fetchEvalTypeRatio() { + return unwrap(await apiGet("/safetyEval/institution/dashboard/eval-type-ratio")); +} + +// 项目执行情况(limit 默认 10) +export async function fetchProjectExecution(limit = 10) { + return unwrap(await apiGet("/safetyEval/institution/dashboard/project-execution", { limit })); +} diff --git a/src/api/supervision/index.js b/src/api/supervision/index.js new file mode 100644 index 0000000..c6fbbee --- /dev/null +++ b/src/api/supervision/index.js @@ -0,0 +1,54 @@ +import { apiGet } from "../../utils/enterpriseInfo/http"; + +/** + * 监管端驾驶舱数据接口。 + * + * 统一走项目 http 层(@cqsjjb/jjb-common-lib),自动附带 API_HOST、token 与机构上下文请求头。 + * 页面以 `await fetchXxx()` 直调并取业务 data,故此处统一解包: + * 失败时抛错,由页面 catch 兜底展示空态。 + */ +function unwrap(res) { + if (!res) { + throw new Error("请求失败"); + } + if (res.success === false) { + throw new Error(res.message || "请求失败"); + } + // 兼容 { code, data } 与已被 http 层解包的裸数据两种形态 + return Object.prototype.hasOwnProperty.call(res, "data") ? res.data : res; +} + +// 资质全生命周期管理 +export async function fetchQualificationOverview(year) { + return unwrap(await apiGet("/safetyEval/regulator/cockpit/qualification-overview", { year })); +} + +// 核心KPI指标 +export async function fetchKpi(cycle, year) { + return unwrap(await apiGet("/safetyEval/regulator/cockpit/kpi", { cycle, year })); +} + +// 区域地图分布 +export async function fetchRegionDistribution() { + return unwrap(await apiGet("/safetyEval/regulator/cockpit/region-distribution")); +} + +// 执业全过程管控 + 项目流程 +export async function fetchProcessOverview() { + return unwrap(await apiGet("/safetyEval/regulator/cockpit/process-overview")); +} + +// 评价类型趋势 +export async function fetchEvalTypeTrend(period, year) { + return unwrap(await apiGet("/safetyEval/regulator/cockpit/eval-type-trend", { period, year })); +} + +// 复盘评估改进提效 +export async function fetchReviewSummary(year) { + return unwrap(await apiGet("/safetyEval/regulator/cockpit/review-summary", { year })); +} + +// 项目实时监控 +export async function fetchProjectMonitor(month) { + return unwrap(await apiGet("/safetyEval/regulator/cockpit/project-monitor", { month })); +} diff --git a/src/assets/images/map_bi/back2.png b/src/assets/images/map_bi/back2.png new file mode 100644 index 0000000..406138d Binary files /dev/null and b/src/assets/images/map_bi/back2.png differ diff --git a/src/pages/Container/Driver/components/DriverBack/index.js b/src/pages/Container/Driver/components/DriverBack/index.js new file mode 100644 index 0000000..ac25eb7 --- /dev/null +++ b/src/pages/Container/Driver/components/DriverBack/index.js @@ -0,0 +1,15 @@ +import backImg from "~/assets/images/map_bi/back2.png"; +import { backToBase } from "~/utils/backToBase"; +import "./index.less"; + +export default function DriverBack({ theme = "light", className = "" }) { + return ( +
| 序号 | +项目编号 | +项目名称 | +被评价企业 | +评价类别 | +项目负责人 | +项目结束日期 | +操作 | +
|---|---|---|---|---|---|---|---|
| + | + | + | + | + | + | + | + |
| {index + 1} | +{record.projectNo} | +{record.projectName} | +{record.customerName} | +{record.evalTypeName} | +{record.projectLeaderName} | +{record.planEndDate} | ++ + | +
{item.label}
{item.value}{item.label}
+ {loading ?{item.title}
{item.value}同比 ↗ {item.change}{loading ?
{item.label}
{item.value}{item.nodeName}
{item.pendingCount}{item.label}:{item.value}
{item.label}:{loading ?