Compare commits
2 Commits
00af9f7fdb
...
c040423066
| Author | SHA1 | Date | |
|---|---|---|---|
| c040423066 | |||
| c31f3af816 |
@@ -35,3 +35,7 @@ htmlcov/
|
||||
# ===== 操作系统 =====
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# ===== 工具状态 / 临时文件 =====
|
||||
.reasonix/
|
||||
cmd_out.txt
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"topic_20260807-122045_ad70a5c6e85a19b4": {
|
||||
"stage": 3,
|
||||
"userTurns": 3,
|
||||
"basisHash": "67a0aadd52e2dfe4",
|
||||
"updatedAt": 1786107445489
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"topic_20260807-122045_ad70a5c6e85a19b4": 1786105245321
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"topic_20260807-122045_ad70a5c6e85a19b4": "auto"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"topic_20260807-122045_ad70a5c6e85a19b4": "我想建立一个无人机资产管理库,采用B…"
|
||||
}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
============================================
|
||||
无人机资产管理系统 - 一键启动
|
||||
============================================
|
||||
|
||||
[1/2] 检查依赖 ...
|
||||
[2/2] 启动服务: http://127.0.0.1:8000
|
||||
错误: 不支持输入重新定向,立即退出此进程。
|
||||
|
||||
服务已启动,浏览器将自动打开页面。
|
||||
局域网内其他电脑可访问: http://本机IP:8000
|
||||
关闭本窗口即停止服务。
|
||||
|
||||
INFO: Started server process [26368]
|
||||
INFO: Waiting for application startup.
|
||||
INFO: Application startup complete.
|
||||
ERROR: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 8000): 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。
|
||||
INFO: Waiting for application shutdown.
|
||||
INFO: Application shutdown complete.
|
||||
@@ -1141,4 +1141,13 @@ def export_excel_api(
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- 静态页面
|
||||
app.mount("/", StaticFiles(directory=STATIC_DIR, html=True), name="static")
|
||||
class NoCacheStaticFiles(StaticFiles):
|
||||
"""静态文件禁用缓存:每次请求都让浏览器重新校验(避免改版后看不到更新)。"""
|
||||
|
||||
def file_response(self, *args, **kwargs):
|
||||
resp = super().file_response(*args, **kwargs)
|
||||
resp.headers["Cache-Control"] = "no-cache"
|
||||
return resp
|
||||
|
||||
|
||||
app.mount("/", NoCacheStaticFiles(directory=STATIC_DIR, html=True), name="static")
|
||||
|
||||
+8
-9
@@ -158,9 +158,8 @@ function renderDrones() {
|
||||
table.innerHTML = `
|
||||
<thead><tr>
|
||||
<th style="width:34px"><input type="checkbox" id="check-all" title="全选/取消全选"></th>
|
||||
<th>机型</th><th>编号</th><th>链路ID</th><th>飞控ID</th>
|
||||
<th>飞控版本</th><th>导航版本</th>
|
||||
<th>当前状态</th><th>备注</th><th>操作</th>
|
||||
<th>机型</th><th>编号</th><th>当前状态</th><th>操作</th>
|
||||
<th>飞控ID</th><th>链路ID</th><th>飞控版本</th><th>导航版本</th><th>备注</th>
|
||||
</tr></thead><tbody></tbody>`;
|
||||
const tbodyEl = table.querySelector("tbody");
|
||||
for (const d of dronesCache) {
|
||||
@@ -171,19 +170,19 @@ function renderDrones() {
|
||||
<td><input type="checkbox" class="drone-check" value="${d.id}"></td>
|
||||
<td>${esc(d.model)}</td>
|
||||
<td><strong>${esc(d.serial_no)}</strong></td>
|
||||
<td>${esc(d.link_id)}</td>
|
||||
<td>${esc(d.fc_id)}</td>
|
||||
<td>${esc(d.fc_version)}</td>
|
||||
<td>${esc(d.nav_version)}</td>
|
||||
<td>${badge(st)}${lastRemark ? `<div style="font-size:12px;color:#7a8699;margin-top:2px">${esc(lastRemark)}</div>` : ""}</td>
|
||||
<td class="remark-cell">${esc(d.remark)}</td>
|
||||
<td><div class="actions">
|
||||
<button class="small" onclick="showHistory(${d.id})">历史</button>
|
||||
<button class="small" onclick="openFlightModal(${d.id})">飞行</button>
|
||||
<button class="small primary" onclick="openStatusModal(${d.id})">修改状态</button>
|
||||
<button class="small" onclick="openEditModal(${d.id})">编辑</button>
|
||||
<button class="small danger" onclick="confirmDelete(${d.id})">删除</button>
|
||||
</div></td>`;
|
||||
</div></td>
|
||||
<td>${esc(d.fc_id)}</td>
|
||||
<td>${esc(d.link_id)}</td>
|
||||
<td>${esc(d.fc_version)}</td>
|
||||
<td>${esc(d.nav_version)}</td>
|
||||
<td class="remark-cell">${esc(d.remark)}</td>`;
|
||||
tbodyEl.appendChild(tr);
|
||||
}
|
||||
wrap.innerHTML = "";
|
||||
|
||||
Reference in New Issue
Block a user