浏览代码

add loading

allen 1 天之前
父节点
当前提交
c347b77689

+ 7 - 3
mirs-ui/src/views/index.vue

@@ -419,9 +419,12 @@ export default {
       this.changeDataType(dataType);
     },
     getList() {
-      console.info(
-        "process.env.VUE_APP_BASE_API:" + process.env.VUE_APP_BASE_API
-      );
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
       getIndexInfo(this.queryParams).then((response) => {
         const data = response.data;
         this.sample = data.sample;
@@ -443,6 +446,7 @@ export default {
         this.$nextTick(() => {
           this.initChart();
         });
+        loading.close();
         this.loading = false;
       });
     },

+ 8 - 0
mirs-ui/src/views/manage/BRDF/index.vue

@@ -304,6 +304,7 @@ export default {
     return {
       // 遮罩层
       loading: true,
+      loadingObj: null,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -484,12 +485,19 @@ export default {
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {
       this.upload.isUploading = true;
+      this.loadingObj = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
     },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
       this.upload.open = false;
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
+      this.loadingObj.close();
       this.$alert(
         "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
           response.msg +

+ 8 - 0
mirs-ui/src/views/manage/emiMeasure/index.vue

@@ -271,6 +271,7 @@ export default {
     return {
       // 遮罩层
       loading: true,
+      loadingObj: null,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -445,12 +446,19 @@ export default {
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {
       this.upload.isUploading = true;
+      this.loadingObj = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
     },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
       this.upload.open = false;
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
+      this.loadingObj.close();
       this.$alert(
         "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
           response.msg +

+ 8 - 0
mirs-ui/src/views/manage/integrated/index.vue

@@ -258,6 +258,7 @@ export default {
     return {
       // 遮罩层
       loading: true,
+      loadingObj: null,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -432,12 +433,19 @@ export default {
     // 文件上传中处理
     handleFileUploadProgress(event, file, fileList) {
       this.upload.isUploading = true;
+      this.loadingObj = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
     },
     // 文件上传成功处理
     handleFileSuccess(response, file, fileList) {
       this.upload.open = false;
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
+      this.loadingObj.close();
       this.$alert(
         "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
           response.msg +