feat: 设备表格增加编辑和删除操作列

This commit is contained in:
2026-05-19 15:06:54 +08:00
parent 584ef677c8
commit 3a356d5886

View File

@@ -96,6 +96,7 @@
<th class="px-4 py-3 text-left font-medium">状态</th> <th class="px-4 py-3 text-left font-medium">状态</th>
<th class="px-4 py-3 text-left font-medium">负责人</th> <th class="px-4 py-3 text-left font-medium">负责人</th>
<th class="px-4 py-3 text-left font-medium">服役天数</th> <th class="px-4 py-3 text-left font-medium">服役天数</th>
<th class="px-4 py-3 text-right font-medium">操作</th>
</tr> </tr>
</thead> </thead>
<tbody class="divide-y divide-gray-50"> <tbody class="divide-y divide-gray-50">
@@ -142,6 +143,11 @@
</td> </td>
<td class="px-4 py-3 text-gray-600">{{ device.responsible_person|default:"-" }}</td> <td class="px-4 py-3 text-gray-600">{{ device.responsible_person|default:"-" }}</td>
<td class="px-4 py-3 text-gray-600">{{ device.service_duration_days }} 天</td> <td class="px-4 py-3 text-gray-600">{{ device.service_duration_days }} 天</td>
<td class="px-4 py-3 text-right whitespace-nowrap">
<a href="/admin/device_management/device/{{ device.id }}/change/" class="text-blue-500 hover:text-blue-700 text-xs font-medium">编辑</a>
<span class="text-gray-300 mx-1">|</span>
<a href="/admin/device_management/device/{{ device.id }}/delete/" class="text-red-500 hover:text-red-700 text-xs font-medium">删除</a>
</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>