diff --git a/src/views/asset-management/device-task/index.vue b/src/views/asset-management/device-task/index.vue index d7f1ea5..7570767 100644 --- a/src/views/asset-management/device-task/index.vue +++ b/src/views/asset-management/device-task/index.vue @@ -303,7 +303,8 @@ { prop: 'task_no', label: '任务编号', - width: 180 + width: 180, + showOverflowTooltip: true }, { prop: 'status', @@ -316,7 +317,7 @@ { prop: 'file_name', label: '文件名', - minWidth: 250, + minWidth: 180, showOverflowTooltip: true }, { @@ -475,11 +476,12 @@ // 下载模板 const downloadTemplate = () => { + // 使用 \t 前缀防止 Excel 将长数字转换为科学计数法 const csvContent = [ 'device_no,device_name,device_model,device_type,manufacturer,max_sim_slots', - 'DEV001,智能水表01,WM-2000,智能水表,华为,1', - 'DEV002,GPS定位器01,GPS-3000,定位设备,小米,2', - 'DEV003,智能燃气表01,GM-1500,智能燃气表,海尔,1' + '\t862639070731999,智能水表01,WM-2000,智能水表,华为,1', + '\t862639070750932,GPS定位器01,GPS-3000,定位设备,小米,2', + '\t862639070801875,智能燃气表01,GM-1500,智能燃气表,海尔,1' ].join('\n') const BOM = '\uFEFF' diff --git a/src/views/asset-management/iot-card-task/index.vue b/src/views/asset-management/iot-card-task/index.vue index b168d5b..c8150b9 100644 --- a/src/views/asset-management/iot-card-task/index.vue +++ b/src/views/asset-management/iot-card-task/index.vue @@ -560,11 +560,12 @@ // 下载模板 const downloadTemplate = () => { + // 使用 \t 前缀防止 Excel 将长数字转换为科学计数法 const csvContent = [ 'iccid,msisdn', - '89860123456789012345,13800138000', - '89860123456789012346,13800138001', - '89860123456789012347,13800138002' + '\t89860123456789012345,\t13800138000', + '\t89860123456789012346,\t13800138001', + '\t89860123456789012347,\t13800138002' ].join('\n') const BOM = '\uFEFF'