feat(web): 海选按场景分组 + 删场景点位页签 + 演出真实底图 + 破缓存
- 海选审核左侧改两列:场景列(按新字段 ir.scene 手动归类聚合,含全部/未分类) + 该场景事件列 - 删独立「场景/点位」页签(pointview.js 保留未引用) - 演出配置 Timeline 接真实场景俯视底图(setupShot 覆盖投影范围 + drawStage 叠图,复用 /api/pointsets 的 shot) - 事件 meta 加「所属场景」归类输入框(datalist 提示已有场景名) - db: events 加 scene 列 + 旧库 ALTER 迁移;upsert 镜像 ir.scene;list 返回 - app.py: 首页按文件 mtime 给 js/css 注入 ?v= 破浏览器缓存(根治新html配旧缓存js崩溃→弹口令)
This commit is contained in:
@ -21,6 +21,14 @@
|
||||
}
|
||||
function field(label, input) { return el("div", { class: "fld" }, [el("label", {}, [label]), input]); }
|
||||
function txt(val, oninput) { const i = el("input", { type: "text", value: val == null ? "" : val }); i.oninput = () => oninput(i.value); return i; }
|
||||
// 带下拉建议的文本框(datalist):用于场景名等可复用又可自由输入的字段
|
||||
function txtDatalist(val, listId, options, oninput) {
|
||||
const i = el("input", { type: "text", value: val == null ? "" : val, list: listId, placeholder: "输入或选择场景名" });
|
||||
i.oninput = () => oninput(i.value);
|
||||
const dl = el("datalist", { id: listId });
|
||||
(options || []).forEach(o => dl.appendChild(el("option", { value: o })));
|
||||
return el("span", { class: "with-datalist" }, [i, dl]);
|
||||
}
|
||||
function area(val, oninput) { const t = el("textarea", {}, [val || ""]); t.oninput = () => oninput(t.value); return t; }
|
||||
function num(val, oninput) { const i = el("input", { type: "number", value: val == null ? "" : val }); i.oninput = () => oninput(i.value === "" ? null : Number(i.value)); return i; }
|
||||
function sel(val, opts, onchange) {
|
||||
@ -107,6 +115,9 @@
|
||||
const psHint = (ctx.pointNames && ctx.pointNames.length)
|
||||
? ("点位集: " + ctx.pointNames.length + " 点") : "(无点位集,坐标校验降级警告)";
|
||||
host.appendChild(field("标题", txt(ir.title, v => { ir.title = v; ctx.onChange(false); })));
|
||||
// 所属场景:海选审核第一列的分组维度,手动归类(可复用已有场景名)。改后保存即生效。
|
||||
const scenes = [...new Set((window.App && window.App.events ? window.App.events.map(e => e.scene) : []).filter(Boolean))].sort();
|
||||
host.appendChild(field("所属场景(海选分组)", txtDatalist(ir.scene, "scene-datalist", scenes, v => { ir.scene = v; ctx.onChange(false); })));
|
||||
host.appendChild(el("div", { class: "row2" }, [
|
||||
field("主题", txt(ir.theme, v => { ir.theme = v; ctx.onChange(false); })),
|
||||
field("规模", txt(ir.scale, v => { ir.scale = v; ctx.onChange(false); })),
|
||||
|
||||
Reference in New Issue
Block a user