|
@@ -513,6 +513,9 @@ export default {
|
|
|
this.queryParam.nextCheckDateEnd = this.dateRange[1]
|
|
|
this.queryParam.nextCheckDateStart = this.queryParam.nextCheckDateStart ? this.queryParam.nextCheckDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
this.queryParam.nextCheckDateEnd = this.queryParam.nextCheckDateEnd ? this.queryParam.nextCheckDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
+ } else {
|
|
|
+ this.$message.error('请选择有效日期范围')
|
|
|
+ return
|
|
|
}
|
|
|
if (this.dateRangeCheck != null) {
|
|
|
this.queryParam.checkDateStart = this.dateRangeCheck[0]
|
|
@@ -577,9 +580,27 @@ export default {
|
|
|
...this.queryParam
|
|
|
}
|
|
|
exportSbInfoMeasureTwo(parameter).then(file => {
|
|
|
+ console.log(file)
|
|
|
+ if (file.data.type === 'application/json') {
|
|
|
+ this.handleResponseError(file.data)
|
|
|
+ return
|
|
|
+ }
|
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
})
|
|
|
},
|
|
|
+ handleResponseError (data) {
|
|
|
+ const _this = this
|
|
|
+ const fileReader = new FileReader()
|
|
|
+ fileReader.onload = function () {
|
|
|
+ try {
|
|
|
+ const jsonData = JSON.parse(fileReader.result)
|
|
|
+ _this.$message.error(jsonData.message)
|
|
|
+ } catch (err) {
|
|
|
+ console.log('返回文件流,正确的')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fileReader.readAsText(data)
|
|
|
+ },
|
|
|
setTree (record = {}) {
|
|
|
fetchSbTypeTree().then(res => {
|
|
|
this.treeData = res.data
|