diff --git a/src/views/statistics/detail.vue b/src/views/statistics/detail.vue
index c832163..c696227 100644
--- a/src/views/statistics/detail.vue
+++ b/src/views/statistics/detail.vue
@@ -14,7 +14,7 @@
-
+
@@ -584,7 +584,6 @@ export default {
},
methods: {
getFildBlob() {
- console.log("afsdfasdfasdfasdfasdf");
let _this = this
let params = {
sampleId: this.sampleId,
@@ -592,39 +591,45 @@ export default {
}
let url = "/webStatistics/radionuclideFile"
getAction(url, params).then((res) => {
- const blob = new Blob([res], { type: 'text/plain' })
- const blobZip = new Blob([res], { type: 'application/zip' })
- _this.fileSrc = window.URL.createObjectURL(blob)
- _this.zipSrc = window.URL.createObjectURL(blobZip)
+ if (res.code&&res.code==500) {
+ _this.fileSrc = ""
+ } else {
+ const blob = new Blob([res], { type: 'text/plain' })
+ _this.fileSrc = window.URL.createObjectURL(blob)
+ }
})
},
- downloadFile(src) {
- if (src) {
+ downloadFile() {
+ if (this.fileSrc) {
let link = document.createElement('a')
- link.href = src
+ link.href = this.fileSrc
link.target = '_blank'
link.download = this.type
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} else {
- this.$message.info("File download failed")
+ this.$message.warning("This operation fails. Contact your system administrator")
}
},
downloadZip() {
getAction('/webStatistics/radionuclideFile',{
sampleId: this.sampleId,
- }).then(async res =>{
- const arrayBufferView = new Uint8Array(res)
- const zip = new JSZip()
- const blob = new Blob([res], { type: 'text/plain' })
- // saveAs(blob, 'files.txt');
- // 将文件添加到ZIP中
- zip.file(`${this.type}.txt`, blob, { binary: true });
- // 生成ZIP文件
- const zipContent = await zip.generateAsync({ type: 'blob' });
- // 保存ZIP文件
- saveAs(zipContent, this.type);
+ }).then(async res => {
+ if (res.code&&res.code==500) {
+ this.$message.warning("This operation fails. Contact your system administrator")
+ } else {
+ const arrayBufferView = new Uint8Array(res)
+ const zip = new JSZip()
+ const blob = new Blob([res], { type: 'text/plain' })
+ // saveAs(blob, 'files.txt');
+ // 将文件添加到ZIP中
+ zip.file(`${this.type}.txt`, blob, { binary: true });
+ // 生成ZIP文件
+ const zipContent = await zip.generateAsync({ type: 'blob' });
+ // 保存ZIP文件
+ saveAs(zipContent, this.type);
+ }
})
},
viewFile() {
diff --git a/src/views/statistics/fileDetail.vue b/src/views/statistics/fileDetail.vue
index f995916..4276b47 100644
--- a/src/views/statistics/fileDetail.vue
+++ b/src/views/statistics/fileDetail.vue
@@ -71,13 +71,17 @@ export default {
let url = this.type === "soh" ? "/webStatistics/sohFile" : "/webStatistics/arFile"
let params = this.type === "soh" ? paramsSoh : paramsRr
getAction(url, params).then((res) => {
- const blob = new Blob([res], { type: 'text/plain' })
- _this.fileSrc = window.URL.createObjectURL(blob)
- var reader = new FileReader();
- reader.readAsText(blob);
- reader.onload = function(){
- //读取完毕后输出结果
- _this.fileText = reader.result
+ if (res.code && res.code==500) {
+ _this.fileSrc = ""
+ } else {
+ const blob = new Blob([res], { type: 'text/plain' })
+ _this.fileSrc = window.URL.createObjectURL(blob)
+ var reader = new FileReader();
+ reader.readAsText(blob);
+ reader.onload = function(){
+ //读取完毕后输出结果
+ _this.fileText = reader.result
+ }
}
})
},
@@ -91,7 +95,7 @@ export default {
link.click()
document.body.removeChild(link)
} else {
- this.$message.info("File download failed")
+ this.$message.warning("This operation fails. Contact your system administrator")
}
},
viewFile() {
diff --git a/src/views/statistics/imsData/met/index.vue b/src/views/statistics/imsData/met/index.vue
index 6a27925..5d384b7 100644
--- a/src/views/statistics/imsData/met/index.vue
+++ b/src/views/statistics/imsData/met/index.vue
@@ -138,7 +138,7 @@ export default {
this.ipagination.total = res.result.total
this.dataSource = res.result.records
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
} else {
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/calibphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/calibphd.vue
index 247ff4c..baa4712 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/calibphd.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/calibphd.vue
@@ -89,7 +89,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/detbkphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/detbkphd.vue
index 083b424..b5afc84 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/detbkphd.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/detbkphd.vue
@@ -84,7 +84,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/qcphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/qcphd.vue
index c4c4387..9df646a 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/qcphd.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/qcphd.vue
@@ -84,7 +84,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdf.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdf.vue
index 65892a7..b8c76cc 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdf.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdf.vue
@@ -85,7 +85,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdp.vue b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdp.vue
index 0133433..aab7204 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdp.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/betaGamma/sphdp.vue
@@ -85,7 +85,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/calibphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/calibphd.vue
index 07e5a41..83d39e1 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/calibphd.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/calibphd.vue
@@ -89,7 +89,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/detbkphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/detbkphd.vue
index 3d39f54..c693968 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/detbkphd.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/detbkphd.vue
@@ -84,7 +84,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/qcphd.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/qcphd.vue
index 60d1dad..8a2bc61 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/qcphd.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/qcphd.vue
@@ -84,7 +84,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdf.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdf.vue
index 14612da..9f0cf84 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdf.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdf.vue
@@ -85,7 +85,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdp.vue b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdp.vue
index 8aae34c..2941474 100644
--- a/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdp.vue
+++ b/src/views/statistics/imsData/radionuclide/nobleGas/hpge/sphdp.vue
@@ -85,7 +85,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue b/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue
index 0a5f8cf..03e27ed 100644
--- a/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue
+++ b/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue
@@ -152,7 +152,7 @@ export default {
this.ipagination.total = res.result.total
this.dataSource = res.result.records
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
@@ -164,7 +164,7 @@ export default {
this.detailJson = JSON.parse(JSON.stringify(this.detailJson))
this.isDetail = true
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
@@ -180,7 +180,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/particulate/calibphd.vue b/src/views/statistics/imsData/radionuclide/particulate/calibphd.vue
index 35471ba..4f7d6fa 100644
--- a/src/views/statistics/imsData/radionuclide/particulate/calibphd.vue
+++ b/src/views/statistics/imsData/radionuclide/particulate/calibphd.vue
@@ -89,7 +89,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/particulate/detbkphd.vue b/src/views/statistics/imsData/radionuclide/particulate/detbkphd.vue
index fd5981e..394b6e7 100644
--- a/src/views/statistics/imsData/radionuclide/particulate/detbkphd.vue
+++ b/src/views/statistics/imsData/radionuclide/particulate/detbkphd.vue
@@ -84,7 +84,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/particulate/qcphd.vue b/src/views/statistics/imsData/radionuclide/particulate/qcphd.vue
index fba0385..701c38f 100644
--- a/src/views/statistics/imsData/radionuclide/particulate/qcphd.vue
+++ b/src/views/statistics/imsData/radionuclide/particulate/qcphd.vue
@@ -84,7 +84,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/particulate/sphdf.vue b/src/views/statistics/imsData/radionuclide/particulate/sphdf.vue
index 0e7ae9b..95af3f6 100644
--- a/src/views/statistics/imsData/radionuclide/particulate/sphdf.vue
+++ b/src/views/statistics/imsData/radionuclide/particulate/sphdf.vue
@@ -85,7 +85,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/radionuclide/particulate/sphdp.vue b/src/views/statistics/imsData/radionuclide/particulate/sphdp.vue
index 475e19c..9e9d8ca 100644
--- a/src/views/statistics/imsData/radionuclide/particulate/sphdp.vue
+++ b/src/views/statistics/imsData/radionuclide/particulate/sphdp.vue
@@ -85,7 +85,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/stateOfHealth/alerts.vue b/src/views/statistics/imsData/stateOfHealth/alerts.vue
index bb0f62a..e1c72f0 100644
--- a/src/views/statistics/imsData/stateOfHealth/alerts.vue
+++ b/src/views/statistics/imsData/stateOfHealth/alerts.vue
@@ -127,7 +127,7 @@ export default {
this.ipagination.total = res.result.total
this.dataSource = res.result.records
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
} else {
@@ -143,7 +143,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsData/stateOfHealth/rmssoh.vue b/src/views/statistics/imsData/stateOfHealth/rmssoh.vue
index f79c00b..634c7f4 100644
--- a/src/views/statistics/imsData/stateOfHealth/rmssoh.vue
+++ b/src/views/statistics/imsData/stateOfHealth/rmssoh.vue
@@ -138,7 +138,7 @@ export default {
this.ipagination.total = res.result.total
this.dataSource = res.result.records
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
} else {
@@ -154,7 +154,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsProducts/arr/index.vue b/src/views/statistics/imsProducts/arr/index.vue
index 09c399f..6188827 100644
--- a/src/views/statistics/imsProducts/arr/index.vue
+++ b/src/views/statistics/imsProducts/arr/index.vue
@@ -138,7 +138,7 @@ export default {
this.ipagination.total = res.result.total
this.dataSource = res.result.records
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
} else {
@@ -158,7 +158,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},
diff --git a/src/views/statistics/imsProducts/rrr/index.vue b/src/views/statistics/imsProducts/rrr/index.vue
index 5c15a01..c3488af 100644
--- a/src/views/statistics/imsProducts/rrr/index.vue
+++ b/src/views/statistics/imsProducts/rrr/index.vue
@@ -138,7 +138,7 @@ export default {
this.ipagination.total = res.result.total
this.dataSource = res.result.records
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
} else {
@@ -158,7 +158,7 @@ export default {
this.stationList=[]
}
} else {
- this.$message.warning(res.message)
+ this.$message.warning("This operation fails. Contact your system administrator")
}
})
},