242 lines
7.0 KiB
HTML
242 lines
7.0 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}知识库{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="page-header">
|
|
<span class="eyebrow">Knowledge Governance</span>
|
|
<h1 class="page-title">知识库</h1>
|
|
<p class="page-lead">统一承载法规资料、业务资料、RAG 治理、字段标准、责任人映射和飞书通知配置。</p>
|
|
</section>
|
|
|
|
<section class="metric-grid">
|
|
{% for item in knowledge_stats %}
|
|
<article class="metric-card">
|
|
<div class="metric-label">{{ item.label }}</div>
|
|
<div class="metric-value">{{ item.value }}</div>
|
|
</article>
|
|
{% endfor %}
|
|
</section>
|
|
|
|
<section class="grid-3">
|
|
{% for section in governance_sections %}
|
|
<article class="panel">
|
|
<h2 class="section-title">{{ section.title }}</h2>
|
|
<p class="section-copy">{{ section.desc }}</p>
|
|
</article>
|
|
{% endfor %}
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<div class="section-heading">
|
|
<div>
|
|
<h2 class="section-title">法规规则包</h2>
|
|
<p class="section-copy">按章-条-要求项-模板字段维护规则包,并向审核节点输出结构化依据。</p>
|
|
</div>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>编码</th>
|
|
<th>章节</th>
|
|
<th>规则名称</th>
|
|
<th>模板字段</th>
|
|
<th>状态</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in rule_tree %}
|
|
<tr>
|
|
<td>{{ item.code }}</td>
|
|
<td>{{ item.chapter }}</td>
|
|
<td>{{ item.item }}</td>
|
|
<td>{{ item.field }}</td>
|
|
<td>{{ item.status }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="grid-2">
|
|
<article class="panel">
|
|
<div class="section-heading">
|
|
<div>
|
|
<h2 class="section-title">RAG 文档源</h2>
|
|
<p class="section-copy">支持法规、模板与业务资料分层管理。</p>
|
|
</div>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>编码</th>
|
|
<th>名称</th>
|
|
<th>类型</th>
|
|
<th>范围</th>
|
|
<th>状态</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for source in knowledge_sources %}
|
|
<tr>
|
|
<td>{{ source.code }}</td>
|
|
<td>{{ source.name }}</td>
|
|
<td>{{ source.type }}</td>
|
|
<td>{{ source.scope }}</td>
|
|
<td>{{ source.status }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</article>
|
|
|
|
<article class="panel">
|
|
<div class="section-heading">
|
|
<div>
|
|
<h2 class="section-title">RAG 切片</h2>
|
|
<p class="section-copy">展示切片摘要、章节与召回状态。</p>
|
|
</div>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>切片 ID</th>
|
|
<th>文档</th>
|
|
<th>章节</th>
|
|
<th>摘要</th>
|
|
<th>状态</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for chunk in rag_chunks %}
|
|
<tr>
|
|
<td>{{ chunk.chunk_id }}</td>
|
|
<td>{{ chunk.document_name }}</td>
|
|
<td>{{ chunk.chapter }}</td>
|
|
<td>{{ chunk.summary }}</td>
|
|
<td>{{ chunk.status }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</article>
|
|
</section>
|
|
|
|
<section class="grid-2">
|
|
<article class="panel">
|
|
<div class="section-heading">
|
|
<div>
|
|
<h2 class="section-title">字段 Schema</h2>
|
|
<p class="section-copy">维护强一致字段、回填字段和来源优先级。</p>
|
|
</div>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>字段编码</th>
|
|
<th>字段名称</th>
|
|
<th>类型</th>
|
|
<th>可回填</th>
|
|
<th>强一致</th>
|
|
<th>状态</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for field in field_schemas %}
|
|
<tr>
|
|
<td>{{ field.field_code }}</td>
|
|
<td>{{ field.field_name }}</td>
|
|
<td>{{ field.field_type }}</td>
|
|
<td>{{ field.fillable }}</td>
|
|
<td>{{ field.strict_consistency }}</td>
|
|
<td>{{ field.status }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</article>
|
|
|
|
<article class="panel">
|
|
<div class="section-heading">
|
|
<div>
|
|
<h2 class="section-title">责任人映射</h2>
|
|
<p class="section-copy">责任人实体字段直接按通知载荷口径展示。</p>
|
|
</div>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>owner_role</th>
|
|
<th>owner_name</th>
|
|
<th>department</th>
|
|
<th>chapter_scope</th>
|
|
<th>risk_scope</th>
|
|
<th>feishu_user_id</th>
|
|
<th>feishu_open_id</th>
|
|
<th>feishu_name</th>
|
|
<th>notify_enabled</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in owner_mappings %}
|
|
<tr>
|
|
<td>{{ item.owner_role }}</td>
|
|
<td>{{ item.owner_name }}</td>
|
|
<td>{{ item.department }}</td>
|
|
<td>{{ item.chapter_scope }}</td>
|
|
<td>{{ item.risk_scope }}</td>
|
|
<td>{{ item.feishu_user_id }}</td>
|
|
<td>{{ item.feishu_open_id }}</td>
|
|
<td>{{ item.feishu_name }}</td>
|
|
<td>{{ item.notify_enabled }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</article>
|
|
</section>
|
|
|
|
<section class="panel">
|
|
<div class="section-heading">
|
|
<div>
|
|
<h2 class="section-title">飞书通知配置</h2>
|
|
<p class="section-copy">V1 Demo 固定支持 `task_completed` 与 `task_failed` 两类通知。</p>
|
|
</div>
|
|
</div>
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>配置名称</th>
|
|
<th>notify_reason</th>
|
|
<th>渠道</th>
|
|
<th>消息模板</th>
|
|
<th>状态</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in feishu_configs %}
|
|
<tr>
|
|
<td>{{ item.config_name }}</td>
|
|
<td>{{ item.notify_reason }}</td>
|
|
<td>{{ item.channel }}</td>
|
|
<td>{{ item.message_template }}</td>
|
|
<td>{{ item.status }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|