Files
rond-with-you/internal/web/templates/admin/fillup.html
T
tamakyi 9c7e152361 补全页显示高德找到的 POI 与类型,类别标出真机用过的
原先没映射出建议的行就是一片空白,可高德其实早就说了「这里是什么」——
「中国邮政 / 生活服务;邮局」「沙县小吃 / 餐饮服务;中餐厅」,
这种信息看着就能判断该填什么。现在多一列「高德参考」把它显示出来。

类别下拉带上中文,并标出哪几种是**真机确实用过**的:
ZCATEGORY_ 那列存的就是这些 MKPOICategory 枚举串,那 12 种导回 rond 一定认得,
其余是 MapKit 支持但你的设备还没用过的,写错只会显示不出类别、不会坏数据。
2026-09-19 16:46:34 +08:00

87 lines
4.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{define "content"}}
<div class="wrap">
<div class="page-head">
<div>
<h1>地点补全</h1>
<div class="sub">
共 <strong>{{num .Total}}</strong> 个地点缺活动或类别,其中 <strong>{{num .WithHint}}</strong> 个能给出建议。
<strong>只填空</strong>——已经有活动或类别的一律不动。
</div>
</div>
<div class="row"><a class="btn" href="/admin">← 返回后台</a></div>
</div>
{{if .Flash}}<div class="alert ok">{{.Flash}}</div>{{end}}
{{if .Err}}<div class="alert err">{{.Err}}</div>{{end}}
{{if .Rows}}
<div class="card">
<h2>待补全({{num .Total}})</h2>
<div class="card-sub">
建议已经预填在框里,<strong>不满意的直接改或清空</strong>即可,留空就是不动。
活动按<strong>地点</strong>补:一次把该地点名下所有没设活动的到访一起填上,不会只改一条。
填了现有列表之外的名字,会自动建成新的活动类型。
类别下拉里标着「真机用过」的是导出回 rond 时一定能认的;<br>
右侧「高德参考」写的是高德在这个坐标上找到的 POI 与类型,猜不出活动时拿它作判断。<br>
「用高德分析剩下的」每次处理 40 个、约 4 秒,结果会填进上面还没建议的行里,点多几次即可。
</div>
<form method="post" action="/admin/fillup/apply">
<div class="tw">
<table class="tb tb-stack">
<thead>
<tr>
<th>地点</th><th>城市</th><th class="num">待设到访</th><th>缺什么</th>
<th>活动</th><th>类别</th><th>建议来源</th><th>高德参考</th>
</tr>
</thead>
<tbody>
{{range $row := .Rows}}
<tr>
<td>{{if $row.Name}}{{$row.Name}}{{else}}<span class="muted">(未命名)</span>{{end}}</td>
<td data-label="城市">{{if $row.City}}{{$row.City}}{{else}}<span class="muted">—</span>{{end}}</td>
<td class="num" data-label="待设到访">{{if $row.NoAct}}{{$row.NoAct}}{{else}}<span class="muted">—</span>{{end}}</td>
<td data-label="缺什么">{{$row.Missing}}</td>
<td data-label="活动">
{{if $row.NoAct}}
<input list="fill-act" name="act_{{$row.PlaceID}}" value="{{$row.ActHint}}"
placeholder="(不动)" style="min-width:8em">
{{else}}<span class="muted">—</span>{{end}}
</td>
<td data-label="类别">
{{if $row.NoCat}}
<input list="fill-cat" name="cat_{{$row.PlaceID}}" value="{{$row.CatHint}}"
placeholder="(不动)" style="min-width:13em">
{{else}}<span class="muted">—</span>{{end}}
</td>
<td data-label="建议来源">{{if $row.Source}}{{$row.Source}}{{else}}<span class="muted">—</span>{{end}}</td>
<td data-label="高德参考">
{{if $row.AmapType}}
<span style="font-size:12.5px">{{if $row.AmapPoi}}{{$row.AmapPoi}}<br>{{end}}<span class="muted">{{$row.AmapType}}</span></span>
{{else}}<span class="muted">—</span>{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<datalist id="fill-act">
{{range .Activities}}<option value="{{.Name}}"></option>{{end}}
</datalist>
<datalist id="fill-cat">
{{range .Categories}}<option value="{{.Value}}" label="{{.Label}}"></option>{{end}}
</datalist>
<div class="row" style="margin-top:12px">
<button class="btn primary" type="submit">执行补全</button>
<button class="btn" type="submit" formaction="/admin/fillup/amap"
title="用高德按坐标搜一遍,给还没建议的地点补上参考">用高德分析剩下的</button>
</div>
</form>
</div>
{{else}}
<div class="card">
<div class="alert ok">所有地点的活动和类别都齐了,没什么要补的。</div>
</div>
{{end}}
</div>
{{end}}