Преглед изворни кода

Merge branch 'master' of http://101.43.129.26:10880/psychological_camera/cpdm_manage

root пре 1 месец
родитељ
комит
886a1d4a09
3 измењених фајлова са 61 додато и 39 уклоњено
  1. 4 0
      src/components/PlanReport.vue
  2. 55 38
      src/views/manage/channelManagement/channelManagement.vue
  3. 2 1
      vue.config.js

+ 4 - 0
src/components/PlanReport.vue

@@ -824,6 +824,10 @@ export default {
 };
 </script>
 <style>
+.el-dialog{
+  border-radius: 20px !important;
+
+}
 .el-tabs__content {
   display: contents !important;
 }

+ 55 - 38
src/views/manage/channelManagement/channelManagement.vue

@@ -212,7 +212,7 @@
                 <el-option
                   v-for="item in gradeList"
                   :key="item.id"
-                  :label="item+'级'"
+                  :label="item + '级'"
                   :value="item"
                 ></el-option>
               </el-select>
@@ -228,38 +228,40 @@
               </el-select>
             </el-form-item>
           </el-form>
-          <el-button
-            type="success"
-            style="border-radius: 20px"
-            v-show="dimensionality == '0'"
-            @click="downloadFun"
-          >
-            全院下载
-          </el-button>
-          <el-button
-            type="success"
-            style="border-radius: 20px"
-            v-show="dimensionality == '1'"
-            @click="downloadFun"
-          >
-            下载已选年级
-          </el-button>
-          <el-button
-            type="success"
-            style="border-radius: 20px"
-            v-show="dimensionality == '2'"
-            @click="downloadFun"
-          >
-            下载已选班级
-          </el-button>
-          <el-button
-            type="success"
-            style="border-radius: 20px"
-            v-show="dimensionality == '2'"
-            @click="downloadAllFun"
-          >
-            下载全部班级
-          </el-button>
+          <div style="display: flex; width: 100%; justify-content: center">
+            <el-button
+              type="success"
+              style="border-radius: 20px"
+              v-show="dimensionality == '0'"
+              @click="downloadFun"
+            >
+              全院下载
+            </el-button>
+            <el-button
+              type="success"
+              style="border-radius: 20px"
+              v-show="dimensionality == '1'"
+              @click="downloadFun"
+            >
+              下载已选年级
+            </el-button>
+            <el-button
+              type="success"
+              style="border-radius: 20px"
+              v-show="dimensionality == '2'"
+              @click="downloadFun"
+            >
+              下载已选班级
+            </el-button>
+            <el-button
+              type="success"
+              style="border-radius: 20px"
+              v-show="dimensionality == '2'"
+              @click="downloadAllFun"
+            >
+              下载全部班级
+            </el-button>
+          </div>
         </div>
 
         <span slot="footer" class="dialog-footer"> </span>
@@ -272,6 +274,7 @@
 import { oSessionStorage } from "../../../utils/utils";
 import planReport from "../../../components/PlanReport.vue";
 import { basePath } from "../../../utils/http";
+import { Loading } from "element-ui";
 export default {
   name: "userManage",
   components: {
@@ -365,6 +368,13 @@ export default {
       courtNum: "",
       grade: "",
       gradeList: [],
+      optionsLoad:{
+          lock: true,
+          text: '努力下载中',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+      },
+      loadingInstance :null
     };
   },
   created() {},
@@ -400,7 +410,6 @@ export default {
         if (res && res.code == 200) {
           this.grade = res.data[0];
           this.gradeList = res.data;
-          debugger;
           // this.orgName = [res.data[0].orgNo];
           // this.orgList = res.data;
         } else {
@@ -439,6 +448,8 @@ export default {
           classIds: this.orgName,
         };
       }
+    
+      this.loadingInstance=  Loading.service(this.optionsLoad);
       this.$http.post(`/plan/generate/report`, params, (res) => {
         if (res && res.code == 200) {
           // this.currentDownFun(res.data);
@@ -446,6 +457,10 @@ export default {
           document.body.appendChild(a);
           a.setAttribute("href", basePath + `/plan/download?path=${res.data}`);
           a.click();
+          this.$nextTick(() => {
+            // 以服务的方式调用的 Loading 需要异步关闭
+            this.loadingInstance.close();
+          });
           // this.currentDownFun(res.data)
           // this.grade = res.data[0];
           // this.gradeList = res.data;
@@ -459,9 +474,7 @@ export default {
     //开始下载
     currentDownFun(val) {
       this.$http.getImg(`/plan/download?path=${val}`, {}, (res) => {
-        debugger;
         if (res && res.code == 200) {
-          debugger;
           // this.grade = res.data[0];
           // this.gradeList = res.data;
           // this.orgName = [res.data[0].orgNo];
@@ -486,15 +499,19 @@ export default {
         flag: 2,
         classIds: orgNameList,
       };
+      Loading.service(options);
+      // Loading.service(options);
       this.$http.post(`/plan/generate/report`, params, (res) => {
         if (res && res.code == 200) {
           let a = document.createElement("a");
           document.body.appendChild(a);
           console.log(basePath + `/plan/download?path=${res.data}`);
-          debugger;
-
           a.setAttribute("href", basePath + `/plan/download?path=${res.data}`);
           a.click();
+          this.$nextTick(() => {
+            // 以服务的方式调用的 Loading 需要异步关闭
+            this.loadingInstance.close();
+          });
           // this.currentDownFun(res.data);
         } else {
           this.$message.error(res.msg);

+ 2 - 1
vue.config.js

@@ -17,7 +17,8 @@ module.exports = {
         proxy: {
             '/chat': {
                 // target: process.env.VUE_APP_TARGET,
-                target: 'http://10.113.248.4:8089',
+                // "http://43.143.198.30:8089";
+                target: 'http://43.143.198.30:8089',
                 // ws: true,
                 changeOrigin: true,
                 pathRewrite: {