En route 1 tahun lalu
induk
melakukan
c8083ca1f1

TEMPAT SAMPAH
src/assets/images/push.png


TEMPAT SAMPAH
src/assets/images/waitPush.png


+ 5 - 2
src/components/Comon/pictureList.vue

@@ -6,8 +6,8 @@
       v-for="(item, index) in list"
       :key="index"
       @click="backFunc(item)"
-      @mouseover="item.hover = true"
-      @mouseleave="item.hover = false"
+      @mouseover="handleHover(item, true)"
+      @mouseleave="handleHover(item, false)"
     >
       <img :src="backFullSrc(item.img)" alt="" />
       <div class="right">
@@ -59,6 +59,9 @@ export default {
     backFullSrc(name) {
       return require(`@/assets/images/${name}.png`);
     },
+    handleHover(item, isHover) {
+      if (typeof item.hover !== 'undefined') item.hover = isHover
+    }
   },
 };
 </script>

+ 0 - 9
src/newApi/classTab.js

@@ -430,13 +430,4 @@ export default {
             data
         })
     },
-    //班级学员获取信息推送数据
-    periodPlush(data) {
-        return request({
-            url: '/grade/grade/count/periodPlush',
-            method: 'get',
-            params: data
-        })
-    },
-
 }

+ 24 - 3
src/views/education/archives/downListRW.vue

@@ -24,7 +24,7 @@
         </el-table-column>
         <el-table-column fixed="right" label="操作" width="100" align="center">
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="down(scope.row.taskPath)" v-if="scope.row.taskStatus == 3 || scope.row.taskStatus == 4"
+            <el-button type="text" size="small" @click="down(scope.row)" v-if="scope.row.taskStatus == 3 || scope.row.taskStatus == 4"
               >下载</el-button
             >
           </template>
@@ -70,8 +70,29 @@ export default {
     openBoxs() {
       this.isShow = true;
     },
-    down(i) {
-      this.$methodsTools.exportData(i,false)
+    down(row) {
+      this.handleDownFlieName(row.taskPath, row.fileName)
+    },
+    handleDownFlieName(_url, _name = '导入数据') {
+      let url = this.$methodsTools.splitImgHost(_url)
+      let xhr = new XMLHttpRequest()
+      xhr.open('get', url, true)
+      xhr.responseType = "blob"
+      xhr.onload = function() {
+        if (xhr.status == 200 ) {
+          let blob = new Blob([xhr.response])
+          let href = window.URL.createObjectURL(blob)
+          let link = document.createElement("a")
+          link.href = href
+          let fileName = _name + '.' + url.split('.').splice(-1)
+          link.download = fileName
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link)
+          window.URL.revokeObjectURL(href) //释放掉blob对象
+        }
+      }
+      xhr.send()
     },
     close() {},
   },

+ 34 - 53
src/views/education/archives/fileDownload.vue

@@ -7,21 +7,12 @@
       :title="userList.length > 1 ? '档案批量下载' : '档案下载'"
       @close="close"
     >
-      <!-- <el-button
-        size="small"
-        type="primary"
-        style="margin-bottom: 14px"
-        @click="plDown"
-        >批量下载</el-button
-      > -->
       <el-table :data="tableData" style="width: 100%" border ref="table">
-        <!-- <el-table-column type="selection" width="55" align="center">
-        </el-table-column> -->
         <el-table-column prop="name" label="文件名称" align="center">
         </el-table-column>
         <el-table-column fixed="right" label="操作" width="100" align="center">
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="handleDown(scope.row.value)"
+            <el-button type="text" size="small" @click="handleDown(scope.row)"
               >下载</el-button
             >
           </template>
@@ -53,41 +44,37 @@ export default {
           name: "报名记录",
           value: 4,
         },
-        {
-          name: "学员记录",
-          value: 5,
-        },
         {
           name: "网课记录",
-          value: 6,
+          value: 5,
         },
         {
           name: "题库记录",
-          value: 7,
+          value: 6,
         },
         {
           name: "直播记录",
-          value: 8,
+          value: 7,
         },
         {
           name: "资料记录",
-          value: 9,
+          value: 8,
         },
         {
           name: "约考记录",
-          value: 10,
+          value: 9,
         },
         {
           name: "考试记录",
-          value: 11,
+          value: 10,
         },
         {
           name: "证书/证明",
-          value: 12,
+          value: 11,
         },
         {
           name: "承诺书",
-          value: 13,
+          value: 12,
         },
       ],
       userList: [],
@@ -98,8 +85,8 @@ export default {
       this.userList = item || [];
       this.isShow = true;
     },
-    handleDown(val) {
-      const isDownRecord = [6, 7, 8].includes(val)
+    handleDown(row) {
+      const isDownRecord = [5, 6, 7].includes(row.value)
       this.$confirm(`${ isDownRecord ? "文件过大,需到下载记录完成下载。" : "确定下载吗?"}`, "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -109,43 +96,37 @@ export default {
           this.$api
             .userdangAndatadownload({
               userIds: this.userList,
-              types: [val],
+              types: [row.value],
             })
             .then((res) => {
               this.$message.success("操作成功,正在下载");
-              if (!isDownRecord) this.$methodsTools.exportData(res.msg, false)
+              if (!isDownRecord) this.handleDownFlieName(res.msg, row.name)
               this.$store.dispatch("downloadlist", true);
             });
         })
         .catch(() => {});
     },
-    // plDown() {
-    //   let len = this.$refs.table.selection;
-    //   if (len.length > 0) {
-    //     this.down(len.map((i) => i.value));
-    //   } else {
-    //     this.$message.error("请勾选需要下载的选项");
-    //   }
-    // },
-    // down(i) {
-    //   this.$confirm(`确定${i.length > 1 ? "批量" : ""}下载吗?`, "提示", {
-    //     confirmButtonText: "确定",
-    //     cancelButtonText: "取消",
-    //     type: "warning",
-    //   })
-    //     .then(() => {
-    //       this.$api
-    //         .userdangAndatadownload({
-    //           userIds: this.userList,
-    //           types: i,
-    //         })
-    //         .then((res) => {
-    //           this.$message.success("操作成功,正在下载");
-    //           this.$store.dispatch("downloadlist", true);
-    //         });
-    //     })
-    //     .catch(() => {});
-    // },
+    handleDownFlieName(_url, _name = '导入数据') {
+      let url = this.$methodsTools.splitImgHost(_url)
+      let xhr = new XMLHttpRequest()
+      xhr.open('get', url, true)
+      xhr.responseType = "blob"
+      xhr.onload = function() {
+        if (xhr.status == 200 ) {
+          let blob = new Blob([xhr.response])
+          let href = window.URL.createObjectURL(blob)
+          let link = document.createElement("a")
+          link.href = href
+          let fileName = _name + '.' + url.split('.').splice(-1)
+          link.download = fileName
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link)
+          window.URL.revokeObjectURL(href) //释放掉blob对象
+        }
+      }
+      xhr.send()
+    },
     close() {
       this.$refs.table.clearSelection();
     },

+ 2 - 26
src/views/education/classManageMent/classList/trainee/index.vue

@@ -51,7 +51,7 @@
             }}
           </p>
           <p>专业:{{ props.scope.row.categoryName }}</p>
-          <p>年份:{{ props.scope.row.year }}</p>
+          <p>年份:{{ props.scope.row.sevenYear }}</p>
         </div>
       </template>
       <template slot="classInfo" slot-scope="props">
@@ -171,7 +171,6 @@ export default {
     pagination,
     tabClassDialog,
     changeClassDialog,
-    pictureList
   },
   props: {
     showStatus: {
@@ -211,6 +210,7 @@ export default {
           prop: "notPlush",
           num: true,
           color: "#ff7a38",
+          hover: false
         },
       ],
       formData: {
@@ -219,24 +219,6 @@ export default {
         pageNum: 1,
         // classStatus: "",
       },
-      info: {},
-      showTabList: [
-        {
-          label: "信息已推送",
-          img: "push",
-          prop: "plush",
-          num: true,
-          color: "#333333",
-        },
-        {
-          label: "信息待推送",
-          img: "waitPush",
-          prop: "notPlush",
-          num: true,
-          color: "#ff7a38",
-          hover: false,
-        },
-      ],
       // 表单
       tableSet: [
         {
@@ -630,12 +612,6 @@ export default {
     init() {
       this.search(2);
     },
-    pictureFunc(item) {
-      if (item.prop == "notPlush") {
-        this.$set(this.formData, 'periodPlush', 0)
-        this.search();
-      }
-    },
     del(v) {
       this.$alert(
         "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",

+ 5 - 2
src/views/education/examManagement/applicationData/bulkImportPlan/newRegister.vue

@@ -91,7 +91,7 @@
         >
       </el-badge>
     </div>
-    <div v-show="active === 1" class="exportBox">
+    <div v-show="active === 1" class="exportBox" v-loading="loading">
       <h4 class="h4Sty">
         成功导入<strong style="color: red">{{ tableDataSuccess.length }}</strong
         >人
@@ -125,7 +125,7 @@
         </af-table-column>
       </el-table>
     </div>
-    <div v-show="active === 2" class="exportBox">
+    <div v-show="active === 2" class="exportBox" v-loading="loading">
       <h4 class="h4Sty">
         失败导入<strong style="color: red">{{ tableDataError.length }}</strong
         >人
@@ -224,6 +224,7 @@ import { mapGetters } from "vuex";
 export default {
   data() {
     return {
+      loading: false, // 加载效果
       dialogPLS: false,
       active: 1,
       marSty: { marginRight: "10px" },
@@ -343,6 +344,7 @@ export default {
       }
     },
     importMobleadd(e) {
+      this.loading = true
       var file = e.target.files[0];
       let formData = new FormData();
       formData.append("file", file);
@@ -355,6 +357,7 @@ export default {
         })
         .finally(() => {
           e.target.value = "";
+          this.loading = false
         });
     },
     advanced() {

+ 7 - 2
src/views/education/examManagement/applicationData/bulkImportPlan/newYY.vue

@@ -116,7 +116,7 @@
         >
       </el-badge>
     </div>
-    <div v-show="active === 1" class="exportBox">
+    <div v-show="active === 1" class="exportBox" v-loading="loading">
       <h4 class="h4Sty">
         成功导入<strong style="color: red">{{ tableDataSuccess.length }}</strong
         >人
@@ -150,7 +150,7 @@
         </af-table-column>
       </el-table>
     </div>
-    <div v-show="active === 2" class="exportBox">
+    <div v-show="active === 2" class="exportBox"  v-loading="loading">
       <h4 class="h4Sty">
         失败导入<strong style="color: red">{{ tableDataError.length }}</strong
         >人
@@ -204,6 +204,7 @@ import { mapGetters } from "vuex";
 export default {
   data() {
     return {
+      loading: false, // 加载效果
       typeInt: 1,
       active: 1,
       marSty: { marginRight: "10px" },
@@ -423,6 +424,7 @@ export default {
      * @param {event} e 不含考培导入模板
      */
     importMobleadd(e) {
+      this.loading = true
       var file = e.target.files[0];
       let formData = new FormData();
       formData.append("file", file);
@@ -436,6 +438,7 @@ export default {
         })
         .finally(() => {
           e.target.value = "";
+          this.loading = false
         });
     },
     /**
@@ -443,6 +446,7 @@ export default {
      * @param {event} e 含考培导入模板
      */
     importMobleaddtrain(e) {
+      this.loading = true
       var file = e.target.files[0];
       let formData = new FormData();
       formData.append("file", file);
@@ -456,6 +460,7 @@ export default {
         })
         .finally(() => {
           e.target.value = "";
+          this.loading = false
         });
     },
   },

+ 0 - 6
src/views/resource/videoManagement/courseManagement/chapterContent/index.vue

@@ -593,12 +593,6 @@ export default {
         return setTs;
       };
     },
-    // 获取业务层次列全称
-    getBusinessName: function() {
-      return function(items, item) {
-        return `${items[item.prop1]}-${items[item.prop2]}-${items[item.prop3]}-${items[item.prop4]}`
-      }
-    }
   },
   mounted() {
     this.$api