199 lines
6.7 KiB
HTML
199 lines
6.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}知识库配置{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="page-header">
|
|
<span class="eyebrow">Knowledge Base</span>
|
|
<h1 class="page-title">知识库配置</h1>
|
|
<p class="page-lead">支持传统增删改查:新增知识源、编辑规则项、删除无效配置、筛选和搜索当前知识内容。</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="panel">
|
|
<div class="section-heading">
|
|
<div>
|
|
<h2 class="section-title">操作栏</h2>
|
|
<p class="section-copy">把知识库做成传统后台,而不是只读展示页。</p>
|
|
</div>
|
|
<div class="button-row">
|
|
<a class="button button-primary" href="#">新增知识源</a>
|
|
<a class="button" href="#">新增规则项</a>
|
|
<a class="button" href="#">批量删除</a>
|
|
</div>
|
|
</div>
|
|
<div class="grid-3">
|
|
<div>
|
|
<label for="knowledge-search">搜索</label>
|
|
<input id="knowledge-search" type="text" value="体外诊断试剂" />
|
|
</div>
|
|
<div>
|
|
<label for="knowledge-type">知识类型</label>
|
|
<select id="knowledge-type">
|
|
{% for filter in knowledge_filters %}
|
|
<option{% if filter.active %} selected{% endif %}>{{ filter.label }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="knowledge-status">状态</label>
|
|
<select id="knowledge-status">
|
|
<option selected>全部状态</option>
|
|
<option>已生效</option>
|
|
<option>待人工校订</option>
|
|
<option>已入库</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="workspace-grid-wide">
|
|
<article class="panel">
|
|
<div class="section-heading">
|
|
<div>
|
|
<h2 class="section-title">知识源管理</h2>
|
|
<p class="section-copy">传统 CRUD 列表,直接在表格里做查看、编辑、删除。</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>
|
|
<th>更新时间</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for source in knowledge_sources %}
|
|
<tr>
|
|
<td class="nowrap">{{ source.code }}</td>
|
|
<td><div class="cell-min-280">{{ source.name }}</div></td>
|
|
<td class="nowrap">{{ source.type }}</td>
|
|
<td class="nowrap">{{ source.scope }}</td>
|
|
<td>
|
|
<span class="pill {% if source.status == '已生效' or source.status == '已入库' %}pill-success{% else %}pill-signal{% endif %}">
|
|
{{ source.status }}
|
|
</span>
|
|
</td>
|
|
<td class="nowrap">{{ source.owner }}</td>
|
|
<td class="nowrap">{{ source.updated_at }}</td>
|
|
<td>
|
|
<div class="button-row">
|
|
<a class="button" href="#">查看</a>
|
|
<a class="button" href="#">编辑</a>
|
|
<a class="button" href="#">删除</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</article>
|
|
|
|
<div class="stack">
|
|
<article class="panel">
|
|
<h2 class="section-title">{{ knowledge_form.title }}</h2>
|
|
<div class="stack" style="margin-top: 14px;">
|
|
{% for field in knowledge_form.fields %}
|
|
<div>
|
|
<label>{{ field.label }}</label>
|
|
<input type="text" value="{{ field.value }}" />
|
|
</div>
|
|
{% endfor %}
|
|
<div class="button-row">
|
|
<a class="button button-primary" href="#">保存知识源</a>
|
|
<a class="button" href="#">重置</a>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
|
|
<article class="panel">
|
|
<h2 class="section-title">批量操作</h2>
|
|
<ul class="detail-list">
|
|
<li class="detail-item">支持批量启用 / 停用知识源</li>
|
|
<li class="detail-item">支持批量重建切片</li>
|
|
<li class="detail-item">支持批量删除过期规则</li>
|
|
</ul>
|
|
</article>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="grid-2">
|
|
<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>编码</th>
|
|
<th>章节</th>
|
|
<th>规则名称</th>
|
|
<th>模板字段</th>
|
|
<th>状态</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in rule_tree %}
|
|
<tr>
|
|
<td class="nowrap">{{ item.code }}</td>
|
|
<td class="nowrap">{{ item.chapter }}</td>
|
|
<td><div class="cell-min-220">{{ item.item }}</div></td>
|
|
<td><div class="cell-min-220">{{ item.field }}</div></td>
|
|
<td>
|
|
<span class="pill {% if item.status == '启用' %}pill-success{% else %}pill-signal{% endif %}">
|
|
{{ item.status }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<div class="button-row">
|
|
<a class="button" href="#">查看</a>
|
|
<a class="button" href="#">编辑</a>
|
|
<a class="button" href="#">删除</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</article>
|
|
|
|
<article class="panel">
|
|
<h2 class="section-title">{{ rule_form.title }}</h2>
|
|
<div class="stack" style="margin-top: 14px;">
|
|
{% for field in rule_form.fields %}
|
|
<div>
|
|
<label>{{ field.label }}</label>
|
|
<input type="text" value="{{ field.value }}" />
|
|
</div>
|
|
{% endfor %}
|
|
<div class="button-row">
|
|
<a class="button button-primary" href="#">保存规则项</a>
|
|
<a class="button" href="#">删除规则项</a>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
</section>
|
|
{% endblock %}
|