From d5431e6b00cfc9a1a57b1d67d3b1f5956eca0132 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 02 三月 2023 08:41:57 +0800 Subject: [PATCH] 数据上传添加进度条,样式管理页面修改,属性查询,空间查询页面优化 --- src/views/datamanage/dataUpdata.vue | 54 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/views/datamanage/dataUpdata.vue b/src/views/datamanage/dataUpdata.vue index 724103e..23496c2 100644 --- a/src/views/datamanage/dataUpdata.vue +++ b/src/views/datamanage/dataUpdata.vue @@ -1124,13 +1124,13 @@ </el-dialog> <el-dialog :close-on-click-modal="false" - title="涓婁紶杩涘害" + :title="sc.label1" :visible.sync="jindudialogVisible" width="30%" > <div> <div> - 鏂囦欢浼犺緭杩涘害锛� + {{sc.label2}} </div> <div> <el-progress @@ -1604,7 +1604,11 @@ metaDataTable: [], queryMetaFlag1: false, metaDataTable1: [], - getCheckedKeys: null + getCheckedKeys: null, + sc: { + label1: '涓婁紶', + label2: '鏂囦欢涓婁紶杩涘害锛�' + } }; }, @@ -1730,9 +1734,14 @@ formData.append("ids", this.enclosureData[i]); } const that = this; + this.sc = { + label1: '涓婁紶', + label2: '鏂囦欢涓婁紶杩涘害锛�' + } that.jindudialogVisible = true; that.$set(this, "jindutiaoname", "闄勪欢涓婁紶"); that.$set(this, "jindutiao", 0); + this.loading = true; $.ajax( BASE_URL + @@ -2164,7 +2173,14 @@ // if (this.formCheckAll.diZaiType != "NO") { // this.formCheckAll.isDiZai = "YES"; // } - this.loading = true; + // + this.sc = { + label1: '璐ㄦ', + label2: '鏂囦欢璐ㄦ杩涘害锛�' + } + this.jindudialogVisible = true; + this.loading = false; + this.$set(this, "jindutiao", 0); this.getStartTestQuayTaskStatus(); }, //鏁翠綋鏂囦欢澶氭潯鏁版嵁璐ㄦ @@ -2173,6 +2189,7 @@ this.multipleSelection == 0 || this.taskStatus == this.multipleSelection.length ) { + this.jindudialogVisible = false; this.loading = false; return; } @@ -2203,20 +2220,31 @@ //鍗曟枃浠舵暟鎹川妫�鎻愪氦 async commonQuayTest() { - this.loading = true; + // this.loading = true; this.quayTestVisible = false; this.taskStatus = 0; this.getStartTaskStatus(); + this.sc = { + label1: '璐ㄦ', + label2: '鏂囦欢璐ㄦ杩涘害锛�' + } + this.jindudialogVisible = true; + + this.$set(this, "jindutiao", 0); }, //鍗曟枃浠跺鏉℃暟鎹川妫� async getStartTaskStatus() { + const that = this; if ( this.multipleSelection == 0 || this.taskStatus == this.multipleSelection.length ) { this.loading = false; + that.jindudialogVisible = false; return; } + + this.quayTestForms.zipPath = this.multipleSelection[this.taskStatus].path; if (this.quayTestForms.zipPath.indexOf(".zip") == -1) { this.taskStatus++; @@ -2297,6 +2325,7 @@ if ( this.tableData[i].path == this.multipleSelection[this.taskStatus].path ) { + this.$set(this, "jindutiao", parseInt(this.progress * 100)); this.tableData[i].status = parseInt(this.progress * 100) + "%"; } } @@ -2349,11 +2378,14 @@ } } this.progress = std / (res.length * 100); + + // for (var i in this.tableData) { // if (this.tableData[i].path == this.multipleSelection[this.taskStatus].path) { // this.tableData[i].status = parseInt(this.progress * 100) + "%"; // } // } + this.$set(this, "jindutiao", parseInt(this.progress * 100)); for (var i in this.tableData) { for (var j in this.multipleSelection) { if (this.tableData[i].path == this.multipleSelection[j].path) { @@ -2487,7 +2519,7 @@ }); that.$set(this, "jindutiaoname", listval); that.$set(this, "jindutiao", 0); - this.loading = true; + // this.loading = true; $.ajax( BASE_URL + "/dataUpload/uploadFiles?token=" + @@ -2542,7 +2574,15 @@ this.$set(this, "jindutiao", loaded); }, format(percentage) { - return percentage === 100 ? "涓婁紶瀹屾瘯" : `${percentage}%`; + + // return percentage === 100 ? "涓婁紶瀹屾瘯" : `${percentage}%`; + var label; + if (this.sc.label1 == "涓婁紶") { + label = "涓婁紶瀹屾瘯" + } else { + label = `${percentage}%` + } + return percentage === 100 ? label : `${percentage}%`; }, //鑾峰彇鏂囦欢涓婁紶璺緞 async getFilePath() { -- Gitblit v1.9.3