فهرست منبع

修改txt中制表符

tanghongbin 5 سال پیش
والد
کامیت
16f4ccb212
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      Controller/FileController.py

+ 4 - 4
Controller/FileController.py

@@ -339,9 +339,9 @@ class DownloadUIDFileView(View):
             item = uid_values[i]
             mac: str = item['uid__mac']
             index = mac.rfind(':')
-            tmp = mac[0:index] + ' ' + mac[index:]
-            content += tmp + ' '
-            content += item['uid__uid']
+            tmp = mac[0:index] + '\t' + mac[index:]
+            content += tmp + '\t'
+            content += item['uid__uid'].strip()
             content += '\r\n'
             uidModel = UIDModel(
                 id=item['uid__id'],
@@ -461,7 +461,7 @@ class DownloadUIDFileView(View):
             tmp = mac[0:index] + ' ' + mac[index:]
             content += tmp + ' '
             content += item['uid__uid']
-            content += '\n'
+            content += '\r\n'
 
             sheet1.write(num, 0, mac[0:index])
             sheet1.write(num, 1, mac[index:])