From 54877142f5ecc67af36b840e31d821dae397b377 Mon Sep 17 00:00:00 2001 From: renpy Date: Wed, 23 Aug 2023 11:26:18 +0800 Subject: [PATCH] =?UTF-8?q?web=20=E6=A8=A1=E5=9D=97=E7=9A=84=E6=89=80?= =?UTF-8?q?=E6=9C=89=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=97=B6=E5=A2=9E=E5=8A=A0loading=E7=9A=84=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/fileDetail.vue | 46 +++++----- .../radionuclide/particulate/blankphd.vue | 90 +++++++------------ src/views/statistics/list.vue | 73 +++++++-------- 3 files changed, 88 insertions(+), 121 deletions(-) diff --git a/src/views/statistics/fileDetail.vue b/src/views/statistics/fileDetail.vue index 75a31ca..c1d560b 100644 --- a/src/views/statistics/fileDetail.vue +++ b/src/views/statistics/fileDetail.vue @@ -1,31 +1,29 @@ @@ -45,6 +43,7 @@ export default { }, data() { return { + spinning: false, fileText: "", fileSrc:"" } @@ -58,19 +57,18 @@ export default { }, getFildBlob() { let _this = this + _this.spinning = true let paramsRr = { type: this.type, sampleId: this.sampleId, - // type: "rrr", - // sampleId:"1523651" } let paramsSoh = { - // sohId:"11" sohId:this.sampleId } let url = this.type === "soh" ? "/webStatistics/sohFile" : "/webStatistics/arFile" let params = this.type === "soh" ? paramsSoh : paramsRr getAction(url, params).then((res) => { + _this.spinning = false if (res.code && res.code==500) { _this.fileSrc = "" 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 91c80ae..7f8d3bb 100644 --- a/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue +++ b/src/views/statistics/imsData/radionuclide/particulate/blankphd.vue @@ -1,32 +1,33 @@ @@ -92,6 +93,7 @@ export default { }, data() { return { + spinning: false, isImmediate:true, isDetail:false, columns, @@ -115,35 +117,12 @@ export default { pageType:"ACQ" } }, - // mounted() { - // console.log("this.$route.meta",this.$route.meta); - // this.queryParam.dataType = this.$route.meta.title - // }, created() { this.findStationList() }, - // watch: { - // '$route.meta.title'(val) { - // if(val === 'SPHDF'){ - // this.queryParam.dataType = 'FULL' - // } else if(val === 'SPHDP'){ - // this.queryParam.dataType = 'PREL' - // } else{ - // this.queryParam.dataType = val.substring(0, 1) - // } - // // this.searchQuery() - // }, - // }, methods: { handleExcel() { if (this.dataSource.length>0) { - // this.queryParam = { - // dataType: "S", - // startTime: "2023-07-01", - // endTime: "2023-07-14", - // stationIds: [209], - // spectralQualifie:"FULL" - // } let params = { ...this.queryParam, pageType:this.pageType @@ -169,12 +148,6 @@ export default { searchQueryData() { this.isImmediate = false this.loading = true - // this.queryParam = { - // dataType: "S", - // startTime: "2023-05-01", - // endTime: "2023-05-07", - // stationIds: [209, 211, 213] - // } let params = { ...this.queryParam, pageNo: 1, @@ -193,8 +166,10 @@ export default { }) }, handleDetail(record) { + this.spinning = true this.currSampleId = record.sampleId getAction("webStatistics/findGeneratedReport", { sampleId: record.sampleId }).then(res => { + this.spinning = false if (res.success) { this.detailJson = res.result this.detailJson = JSON.parse(JSON.stringify(this.detailJson)) @@ -202,6 +177,8 @@ export default { } else { this.$message.warning("This operation fails. Contact your system administrator") } + }).catch(err => { + this.spinning = false }) }, handleBack(flag) { @@ -221,7 +198,6 @@ export default { }) }, handleSelectChange(val) { - console.log(val); let length = this.stationList.length if (val.length === length) { this.allChecked = true diff --git a/src/views/statistics/list.vue b/src/views/statistics/list.vue index b0530b2..f68bb58 100644 --- a/src/views/statistics/list.vue +++ b/src/views/statistics/list.vue @@ -1,31 +1,33 @@ @@ -69,6 +71,7 @@ export default { }, data() { return { + spinning: false, isImmediate:true, isDetail:false, queryParam: { @@ -93,13 +96,6 @@ export default { methods: { handleExcel() { if (this.dataSource.length>0) { - // this.queryParam = { - // dataType: "S", - // startTime: "2023-07-01", - // endTime: "2023-07-14", - // stationIds: [209], - // spectralQualifie:"FULL" - // } let params = { ...this.queryParam, pageType:this.pageType @@ -125,12 +121,6 @@ export default { searchQueryData() { this.isImmediate = false this.loading = true - // this.queryParam = { - // dataType: "S", - // startTime: "2023-05-01", - // endTime: "2023-05-07", - // stationIds: [209, 211, 213] - // } let params = { ...this.queryParam, pageNo: 1, @@ -149,9 +139,10 @@ export default { }) }, handleDetail(record) { + this.spinning = true this.currSampleId = record.sampleId getAction("webStatistics/findGeneratedReport", { sampleId: record.sampleId }).then(res => { - // getAction("webStatistics/findGeneratedReport", { sampleId: "1523651" }).then(res => { + this.spinning = false if (res.success){ this.detailJson = res.result this.detailJson = JSON.parse(JSON.stringify(this.detailJson)) @@ -159,6 +150,8 @@ export default { } else { this.$message.warning("This operation fails. Contact your system administrator") } + }).catch(err => { + this.spinning = false }) }, handleBack(flag) {