feat: 位置字段改名为机房,移动到ID列后面;优化列表列宽和截断

This commit is contained in:
cnbugs
2026-04-28 12:57:59 +08:00
parent bbbec77c63
commit cb057b431e
5 changed files with 25 additions and 7 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ EXPORT_COLUMNS = [
('model', '型号', 20),
('asset_value', '资产面值', 12),
('serial_number', '序列号', 25),
('location', '设备位置', 20),
('location', '机房', 20),
('cabinet', '机柜', 10),
('cabinet_position', '机柜位置', 10),
('bmc_address', 'BMC地址', 16),
@@ -0,0 +1,18 @@
# Generated by Django 5.2.13 on 2026-04-28 04:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('assetapp', '0007_asset_business_type_asset_gpu_count_asset_gpu_type_and_more'),
]
operations = [
migrations.AlterField(
model_name='asset',
name='location',
field=models.CharField(blank=True, default='', help_text='楼层/房间/区域', max_length=200, verbose_name='机房'),
),
]
+1 -1
View File
@@ -40,7 +40,7 @@ class Asset(models.Model):
serial_number = models.CharField('序列号', max_length=100, blank=True, default='', db_index=True)
# 位置信息
location = models.CharField('设备位置', max_length=200, blank=True, default='', help_text='楼层/房间/区域')
location = models.CharField('机房', max_length=200, blank=True, default='', help_text='楼层/房间/区域')
cabinet = models.CharField('机柜', max_length=50, blank=True, default='')
cabinet_position = models.CharField('机柜位置', max_length=50, blank=True, default='', help_text='U位')