diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/components/mycomponent/dialog/snFieldInfoDialog.vue b/src/components/mycomponent/dialog/snFieldInfoDialog.vue index 23d020b..b85f8bc 100644 --- a/src/components/mycomponent/dialog/snFieldInfoDialog.vue +++ b/src/components/mycomponent/dialog/snFieldInfoDialog.vue @@ -1,7 +1,6 @@ + diff --git a/src/api/product/category.js b/src/api/product/category.js index aea97c7..d655a11 100644 --- a/src/api/product/category.js +++ b/src/api/product/category.js @@ -69,7 +69,8 @@ return request({ url: '/categoryInfo/listExport', method: 'post', - data + data, + responseType: 'blob' }) } diff --git a/src/api/product/device.js b/src/api/product/device.js index e5b8b02..ccfa5cf 100644 --- a/src/api/product/device.js +++ b/src/api/product/device.js @@ -22,7 +22,7 @@ // 设备列表导出 const d_listExport = (data) => { - return instance.post('/deviceInfo/listExport', data) + return instance.post('/deviceInfo/listExport', data, { responseType: 'blob' }) } // 统计:累计激活设备数、今日设备在线数、今日设备在线率 diff --git a/src/api/request/http.js b/src/api/request/http.js index 9a49dc5..a7f20d1 100644 --- a/src/api/request/http.js +++ b/src/api/request/http.js @@ -43,7 +43,7 @@ console.log('err ============') // 对于请求报错进行处理 Message.error(err.message) - return '' - // return Promise.reject(err) + // return '' + return Promise.reject(err) }) export { instance } diff --git a/src/components/mycomponent/dialog/snFieldInfoDialog.vue b/src/components/mycomponent/dialog/snFieldInfoDialog.vue index 23d020b..b85f8bc 100644 --- a/src/components/mycomponent/dialog/snFieldInfoDialog.vue +++ b/src/components/mycomponent/dialog/snFieldInfoDialog.vue @@ -1,7 +1,6 @@ + diff --git a/src/views/product/brandList.vue b/src/views/product/brandList.vue index fd9b13c..2dfc80a 100644 --- a/src/views/product/brandList.vue +++ b/src/views/product/brandList.vue @@ -66,19 +66,19 @@ - 导出 - - - + type="primary" + icon="el-icon-folder-opened" + class="btnItem" + @click="exportToExcel" + > + 导出 + + - + @@ -133,18 +132,18 @@ + diff --git a/src/views/product/brandList.vue b/src/views/product/brandList.vue index fd9b13c..2dfc80a 100644 --- a/src/views/product/brandList.vue +++ b/src/views/product/brandList.vue @@ -66,19 +66,19 @@ - 导出 - - - + type="primary" + icon="el-icon-folder-opened" + class="btnItem" + @click="exportToExcel" + > + 导出 + + - + @@ -133,18 +132,18 @@ + diff --git a/src/views/product/brandList.vue b/src/views/product/brandList.vue index fd9b13c..2dfc80a 100644 --- a/src/views/product/brandList.vue +++ b/src/views/product/brandList.vue @@ -66,19 +66,19 @@ - 导出 - - - + type="primary" + icon="el-icon-folder-opened" + class="btnItem" + @click="exportToExcel" + > + 导出 + + - + @@ -133,18 +132,18 @@ + diff --git a/src/views/product/brandList.vue b/src/views/product/brandList.vue index fd9b13c..2dfc80a 100644 --- a/src/views/product/brandList.vue +++ b/src/views/product/brandList.vue @@ -66,19 +66,19 @@ - 导出 - - - + type="primary" + icon="el-icon-folder-opened" + class="btnItem" + @click="exportToExcel" + > + 导出 + + - + @@ -133,18 +132,18 @@ + diff --git a/src/views/product/brandList.vue b/src/views/product/brandList.vue index fd9b13c..2dfc80a 100644 --- a/src/views/product/brandList.vue +++ b/src/views/product/brandList.vue @@ -66,19 +66,19 @@ - 导出 - - - + type="primary" + icon="el-icon-folder-opened" + class="btnItem" + @click="exportToExcel" + > + 导出 + + - + @@ -133,18 +132,18 @@