|
|
@@ -65,7 +65,7 @@
|
|
|
<th>聚落名称</th>
|
|
|
<th>所属区域</th>
|
|
|
<th>人数</th>
|
|
|
- <th>代表人物</th>
|
|
|
+ <th>热心宗亲</th>
|
|
|
<th>姓氏类型</th>
|
|
|
<th>创建时间</th>
|
|
|
{% if session.get('is_super_admin') %}
|
|
|
@@ -128,6 +128,7 @@
|
|
|
<label class="form-label">聚落人数</label>
|
|
|
<input type="number" class="form-control" id="settlement-population" min="0">
|
|
|
</div>
|
|
|
+ {% if session.get('is_super_admin') %}
|
|
|
<div class="col-md-6">
|
|
|
<label class="form-label">代表人物</label>
|
|
|
<div class="input-group">
|
|
|
@@ -138,6 +139,10 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ {% else %}
|
|
|
+ <input type="hidden" id="settlement-representative-display">
|
|
|
+ <input type="hidden" id="settlement-representative-id">
|
|
|
+ {% endif %}
|
|
|
<div class="col-md-6">
|
|
|
<label class="form-label">姓氏类型</label>
|
|
|
<select class="form-select" id="settlement-surname-type">
|
|
|
@@ -415,7 +420,7 @@ function renderSettlementList(settlements) {
|
|
|
<td>${settlement.name}</td>
|
|
|
<td>${settlement.region || '-'}</td>
|
|
|
<td>${settlement.population || 0}</td>
|
|
|
- <td>${settlement.representative_name || '-'}</td>
|
|
|
+ <td>${window.isSuperAdmin ? (settlement.enthusiastic_members || '-') : '-'}</td>
|
|
|
<td>${surnameType}${newSurname}</td>
|
|
|
<td>${formatDateTime(settlement.created_at)}</td>
|
|
|
${window.isSuperAdmin ? `
|
|
|
@@ -468,17 +473,16 @@ function showSettlementDetail(settlement) {
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="col-md-6">
|
|
|
+ ${window.isSuperAdmin ? `<div class="col-md-6">
|
|
|
<div class="card">
|
|
|
<div class="card-body">
|
|
|
- <h6 class="card-title">代表人物</h6>
|
|
|
- <p class="card-text">${settlement.representative_name || '未设置'}</p>
|
|
|
+ <h6 class="card-title" style="color:#d97706;">热心宗亲</h6>
|
|
|
+ <p class="card-text">${settlement.enthusiastic_members || '未设置'}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>` : ''}
|
|
|
</div>
|
|
|
${settlement.description ? '<div class="mt-4"><h6>备注说明</h6><p>' + settlement.description + '</p></div>' : ''}
|
|
|
- ${window.isSuperAdmin && settlement.enthusiastic_members ? '<div class="mt-4"><h6 style="color:#d97706;">热心宗亲</h6><p>' + settlement.enthusiastic_members + '</p></div>' : ''}
|
|
|
<div class="mt-4 text-muted text-sm">
|
|
|
创建时间:${formatDateTime(settlement.created_at)}
|
|
|
${settlement.updated_at !== settlement.created_at ? '<br>更新时间:' + formatDateTime(settlement.updated_at) : ''}
|
|
|
@@ -855,7 +859,6 @@ function showMarkerTooltip(e, settlement) {
|
|
|
tooltipDiv.innerHTML = '<div style="font-weight: 600; margin-bottom: 8px; font-size: 14px;">' + settlement.name + '</div>' +
|
|
|
(settlement.region ? '<div style="margin-bottom: 4px; color: #94a3b8;">区域:' + settlement.region + '</div>' : '') +
|
|
|
'<div style="margin-bottom: 4px; color: #94a3b8;">人数:' + (settlement.population || 0) + ' 人</div>' +
|
|
|
- (settlement.representative_name ? '<div style="margin-bottom: 4px; color: #94a3b8;">代表:' + settlement.representative_name + '</div>' : '') +
|
|
|
'<div style="margin-bottom: 4px; color: #94a3b8;">姓氏:' + surnameType + (settlement.new_surname ? '(改后:' + settlement.new_surname + ')' : '') + '</div>' +
|
|
|
(settlement.description ? '<div style="margin-bottom: 4px; color: #94a3b8; max-width: 220px; word-break: break-all;">备注:' + settlement.description + '</div>' : '') +
|
|
|
(window.isSuperAdmin && settlement.enthusiastic_members ? '<div style="margin-bottom: 4px; color: #fbbf24;">热心宗亲:' + settlement.enthusiastic_members + '</div>' : '') +
|