diff --git a/.gitignore b/.gitignore index 45a41aea..13f19990 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ mysite/__pycache__/ media/ aspnet_client/ static/ +mysite/settings.py # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/safesite/export.py b/safesite/export.py index 9cd9e0d6..634c1843 100644 --- a/safesite/export.py +++ b/safesite/export.py @@ -643,12 +643,13 @@ def exportxlsx(a,objs): sheet = wb.active for i, x in enumerate(objs): num = str(i+3) - sheet['a'+num] = x.name - sheet['b'+num] = x.catename - sheet['c'+num] = x.type - sheet['d'+num] = x.area.name - sheet['e'+num] = '正常' if x.state==1 else '异常' - sheet['f'+num] = 'https://safeyun.ctcshe.com/miniprogram/equipment?id='+str(x.id) + sheet['a'+num] = x.num + sheet['b'+num] = x.name + sheet['c'+num] = x.cate.dickeyname + sheet['d'+num] = x.type + sheet['e'+num] = x.area.name + sheet['f'+num] = '正常' if x.state==1 else '异常' + sheet['g'+num] = 'https://safeyun.ctcshe.com/miniprogram/equipment?id='+str(x.id) nowtime = datetime.now().strftime('%Y%m%d%H%M%S') sheet['b1'] = nowtime filename = 'SBS' + nowtime diff --git a/safesite/exportemp/equipment.xlsx b/safesite/exportemp/equipment.xlsx index 04eab477..a7d5b212 100644 Binary files a/safesite/exportemp/equipment.xlsx and b/safesite/exportemp/equipment.xlsx differ diff --git a/safesite/templates/index.html b/safesite/templates/index.html index e31d8781..e90f8a2c 100644 --- a/safesite/templates/index.html +++ b/safesite/templates/index.html @@ -28,12 +28,11 @@ @@ -76,8 +77,9 @@
- - + +