feat: 完成 issue #166 [A3] iAOP API 客户端封装(infer.ts LLM 网关 + templates.ts 模板 JSON + plans 迁入 public)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"subscribe": "alarm_stream",
|
||||
"severityStyles": {
|
||||
"P0": {
|
||||
"fg": "#ff4d4f",
|
||||
"bg": "rgba(255,77,79,0.10)",
|
||||
"icon": "alert-octagon",
|
||||
"border": "#ff4d4f"
|
||||
},
|
||||
"P1": {
|
||||
"fg": "#faad14",
|
||||
"bg": "rgba(250,173,20,0.10)",
|
||||
"icon": "alert-triangle",
|
||||
"border": "#faad14"
|
||||
},
|
||||
"P2": {
|
||||
"fg": "#1677ff",
|
||||
"bg": "rgba(22,119,255,0.08)",
|
||||
"icon": "info"
|
||||
}
|
||||
},
|
||||
"rulesSource": {
|
||||
"kind": "asset",
|
||||
"ref": "ti-cl4/impurity-forecast/config/alert_rules.template.yaml"
|
||||
},
|
||||
"showSop": true,
|
||||
"requireAck": true,
|
||||
"muteLower": "P2",
|
||||
"groupBy": "severity",
|
||||
"sortBy": "severity",
|
||||
"maxItems": 50,
|
||||
"thresholdsSource": {
|
||||
"kind": "asset",
|
||||
"ref": "ti-cl4/impurity-forecast/config/alert_rules.template.yaml"
|
||||
},
|
||||
"ackTimeoutS": 300
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
{
|
||||
"$schema": "iAOP-cockpit-layout-v1",
|
||||
"title": "吸附树脂车间驾驶舱",
|
||||
"theme": "light",
|
||||
"themeTokens": {
|
||||
"--cockpit-bg": "#f0f2f5",
|
||||
"--cockpit-surface": "#ffffff",
|
||||
"--cockpit-fg": "rgba(0,0,0,0.88)",
|
||||
"--cockpit-fg-muted": "rgba(0,0,0,0.45)",
|
||||
"--cockpit-accent": "#1677ff",
|
||||
"--cockpit-warn": "#faad14",
|
||||
"--cockpit-grid-line": "rgba(5,5,5,0.06)"
|
||||
},
|
||||
"grid": {
|
||||
"columns": 12
|
||||
},
|
||||
"widgets": [
|
||||
{
|
||||
"id": "process_view-0",
|
||||
"component": "ProcessView",
|
||||
"type": "process_view",
|
||||
"grid": {
|
||||
"columnStart": 1,
|
||||
"columnSpan": 12,
|
||||
"rowStart": 1,
|
||||
"rowSpan": 4,
|
||||
"widthPct": 100.0,
|
||||
"style": "grid-column: 1 / span 12; grid-row: 1 / span 4;"
|
||||
},
|
||||
"description": "四状态工艺流程(合成 → 交联 → 洗涤 → 干燥)",
|
||||
"props": {
|
||||
"src": "resin_four_state.svg",
|
||||
"states": [
|
||||
"running",
|
||||
"warning",
|
||||
"alarm",
|
||||
"offline"
|
||||
]
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-1",
|
||||
"component": "TrendChart",
|
||||
"type": "trend",
|
||||
"grid": {
|
||||
"columnStart": 1,
|
||||
"columnSpan": 6,
|
||||
"rowStart": 5,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 50.0,
|
||||
"style": "grid-column: 1 / span 6; grid-row: 5 / span 2;"
|
||||
},
|
||||
"description": "反应釜温度实时趋势",
|
||||
"props": {
|
||||
"series": "R-801.TEMP",
|
||||
"window": "PT30M"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-2",
|
||||
"component": "TrendChart",
|
||||
"type": "trend",
|
||||
"grid": {
|
||||
"columnStart": 7,
|
||||
"columnSpan": 6,
|
||||
"rowStart": 5,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 50.0,
|
||||
"style": "grid-column: 7 / span 6; grid-row: 5 / span 2;"
|
||||
},
|
||||
"description": "搅拌转速实时趋势",
|
||||
"props": {
|
||||
"series": "R-801.AGIT",
|
||||
"window": "PT30M"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi_card-3",
|
||||
"component": "KpiCard",
|
||||
"type": "kpi_card",
|
||||
"grid": {
|
||||
"columnStart": 1,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 7,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 1 / span 3; grid-row: 7 / span 2;"
|
||||
},
|
||||
"description": "当批平均交换容量(mmol/g)",
|
||||
"props": {
|
||||
"metric": "resin_exchange_capacity",
|
||||
"label": "交换容量"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi_card-4",
|
||||
"component": "KpiCard",
|
||||
"type": "kpi_card",
|
||||
"grid": {
|
||||
"columnStart": 4,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 7,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 4 / span 3; grid-row: 7 / span 2;"
|
||||
},
|
||||
"description": "当批平均交联度(%)",
|
||||
"props": {
|
||||
"metric": "resin_crosslink_degree",
|
||||
"label": "交联度"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi_card-5",
|
||||
"component": "KpiCard",
|
||||
"type": "kpi_card",
|
||||
"grid": {
|
||||
"columnStart": 7,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 7,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 7 / span 3; grid-row: 7 / span 2;"
|
||||
},
|
||||
"description": "当批产率(%)",
|
||||
"props": {
|
||||
"metric": "batch_yield",
|
||||
"label": "批产率"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi_card-6",
|
||||
"component": "KpiCard",
|
||||
"type": "kpi_card",
|
||||
"grid": {
|
||||
"columnStart": 10,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 7,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 10 / span 3; grid-row: 7 / span 2;"
|
||||
},
|
||||
"description": "单吨树脂综合能耗(kWh/t)",
|
||||
"props": {
|
||||
"metric": "energy_per_ton",
|
||||
"label": "单吨能耗"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "alarm_panel-7",
|
||||
"component": "AlarmPanel",
|
||||
"type": "alarm_panel",
|
||||
"grid": {
|
||||
"columnStart": 1,
|
||||
"columnSpan": 9,
|
||||
"rowStart": 9,
|
||||
"rowSpan": 3,
|
||||
"widthPct": 75.0,
|
||||
"style": "grid-column: 1 / span 9; grid-row: 9 / span 3;"
|
||||
},
|
||||
"description": "告警面板(温度/交联度/质量预测异常)",
|
||||
"props": {
|
||||
"subscribe": "alarm_stream"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "nl_query-8",
|
||||
"component": "NlQuery",
|
||||
"type": "nl_query",
|
||||
"grid": {
|
||||
"columnStart": 10,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 9,
|
||||
"rowSpan": 3,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 10 / span 3; grid-row: 9 / span 3;"
|
||||
},
|
||||
"description": "自然语言查询入口(配方/质量/能耗问答)",
|
||||
"props": {
|
||||
"placeholder": "输入自然语言查询(配方 / 质量 / 能耗)"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"widgetCount": 9,
|
||||
"perfFlags": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
},
|
||||
"perfHint": null
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
{
|
||||
"$schema": "iAOP-cockpit-layout-v1",
|
||||
"title": "海绵钛车间驾驶舱",
|
||||
"theme": "light",
|
||||
"themeTokens": {
|
||||
"--cockpit-bg": "#f0f2f5",
|
||||
"--cockpit-surface": "#ffffff",
|
||||
"--cockpit-fg": "rgba(0,0,0,0.88)",
|
||||
"--cockpit-fg-muted": "rgba(0,0,0,0.45)",
|
||||
"--cockpit-accent": "#1677ff",
|
||||
"--cockpit-warn": "#faad14",
|
||||
"--cockpit-grid-line": "rgba(5,5,5,0.06)"
|
||||
},
|
||||
"grid": {
|
||||
"columns": 12
|
||||
},
|
||||
"widgets": [
|
||||
{
|
||||
"id": "process_view-0",
|
||||
"component": "ProcessView",
|
||||
"type": "process_view",
|
||||
"grid": {
|
||||
"columnStart": 1,
|
||||
"columnSpan": 12,
|
||||
"rowStart": 1,
|
||||
"rowSpan": 4,
|
||||
"widthPct": 100.0,
|
||||
"style": "grid-column: 1 / span 12; grid-row: 1 / span 4;"
|
||||
},
|
||||
"description": "四状态工艺流程(氯化 → 精制 → 还原 → 蒸馏)",
|
||||
"props": {
|
||||
"src": "ti_four_state.svg",
|
||||
"states": [
|
||||
"running",
|
||||
"warning",
|
||||
"alarm",
|
||||
"offline"
|
||||
],
|
||||
"stages": [
|
||||
{
|
||||
"id": "chlorination",
|
||||
"name": "氯化",
|
||||
"device": "CLF-01",
|
||||
"order": 1
|
||||
},
|
||||
{
|
||||
"id": "purification",
|
||||
"name": "精制",
|
||||
"order": 2
|
||||
},
|
||||
{
|
||||
"id": "reduction",
|
||||
"name": "还原",
|
||||
"device": "RF-01",
|
||||
"order": 3
|
||||
},
|
||||
{
|
||||
"id": "distillation",
|
||||
"name": "蒸馏",
|
||||
"order": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-1",
|
||||
"component": "TrendChart",
|
||||
"type": "trend",
|
||||
"grid": {
|
||||
"columnStart": 1,
|
||||
"columnSpan": 6,
|
||||
"rowStart": 5,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 50.0,
|
||||
"style": "grid-column: 1 / span 6; grid-row: 5 / span 2;"
|
||||
},
|
||||
"description": "氯化炉温度实时趋势(沸腾氯化炉温 850±50℃)",
|
||||
"props": {
|
||||
"series": "CLF-01.TEMP",
|
||||
"window": "PT30M"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "trend-2",
|
||||
"component": "TrendChart",
|
||||
"type": "trend",
|
||||
"grid": {
|
||||
"columnStart": 7,
|
||||
"columnSpan": 6,
|
||||
"rowStart": 5,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 50.0,
|
||||
"style": "grid-column: 7 / span 6; grid-row: 5 / span 2;"
|
||||
},
|
||||
"description": "氯气流量实时趋势(流态化监控)",
|
||||
"props": {
|
||||
"series": "CLF-01.CL2",
|
||||
"window": "PT30M"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi_card-3",
|
||||
"component": "KpiCard",
|
||||
"type": "kpi_card",
|
||||
"grid": {
|
||||
"columnStart": 1,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 7,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 1 / span 3; grid-row: 7 / span 2;"
|
||||
},
|
||||
"description": "还原 TiCl₄ 纯度(%,工艺 ≥ 99.9%)",
|
||||
"props": {
|
||||
"metric": "ticl4_purity",
|
||||
"label": "TiCl₄纯度"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi_card-4",
|
||||
"component": "KpiCard",
|
||||
"type": "kpi_card",
|
||||
"grid": {
|
||||
"columnStart": 4,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 7,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 4 / span 3; grid-row: 7 / span 2;"
|
||||
},
|
||||
"description": "还原杂质含量(%,越低越好)",
|
||||
"props": {
|
||||
"metric": "ticl4_impurity",
|
||||
"label": "杂质含量"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi_card-5",
|
||||
"component": "KpiCard",
|
||||
"type": "kpi_card",
|
||||
"grid": {
|
||||
"columnStart": 7,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 7,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 7 / span 3; grid-row: 7 / span 2;"
|
||||
},
|
||||
"description": "车间累计电耗(kWh,单吨海绵钛综合能耗输入)",
|
||||
"props": {
|
||||
"metric": "energy_per_ton",
|
||||
"label": "累计电耗"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "kpi_card-6",
|
||||
"component": "KpiCard",
|
||||
"type": "kpi_card",
|
||||
"grid": {
|
||||
"columnStart": 10,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 7,
|
||||
"rowSpan": 2,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 10 / span 3; grid-row: 7 / span 2;"
|
||||
},
|
||||
"description": "蒸汽流量(t/h,公用工程监控)",
|
||||
"props": {
|
||||
"metric": "steam_flow",
|
||||
"label": "蒸汽流量"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "alarm_panel-7",
|
||||
"component": "AlarmPanel",
|
||||
"type": "alarm_panel",
|
||||
"grid": {
|
||||
"columnStart": 1,
|
||||
"columnSpan": 9,
|
||||
"rowStart": 9,
|
||||
"rowSpan": 3,
|
||||
"widthPct": 75.0,
|
||||
"style": "grid-column: 1 / span 9; grid-row: 9 / span 3;"
|
||||
},
|
||||
"description": "告警面板(氯化炉温/还原真空度/纯度/杂质异常)",
|
||||
"props": {
|
||||
"subscribe": "alarm_stream"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "nl_query-8",
|
||||
"component": "NlQuery",
|
||||
"type": "nl_query",
|
||||
"grid": {
|
||||
"columnStart": 10,
|
||||
"columnSpan": 3,
|
||||
"rowStart": 9,
|
||||
"rowSpan": 3,
|
||||
"widthPct": 25.0,
|
||||
"style": "grid-column: 10 / span 3; grid-row: 9 / span 3;"
|
||||
},
|
||||
"description": "自然语言查询入口(工艺/质量/能耗问答)",
|
||||
"props": {
|
||||
"placeholder": "输入自然语言查询(配方 / 质量 / 能耗)"
|
||||
},
|
||||
"perf": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"widgetCount": 9,
|
||||
"perfFlags": {
|
||||
"virtualScroll": false,
|
||||
"downsample": false,
|
||||
"worker": false
|
||||
},
|
||||
"perfHint": null
|
||||
}
|
||||
Reference in New Issue
Block a user