浏览代码

10.4央视完成

谢杰标 3 年之前
父节点
当前提交
371e0d51b2

+ 44 - 0
src/views/Marketing/goods/commodityManageMent/index.vue

@@ -9,6 +9,7 @@
       :topType="topType"
     />
     <table-list
+      ref="tableList"
       :tableSets="tableSet"
       :tableData="tableData"
       :navText="navText"
@@ -16,7 +17,17 @@
       :loading="loading"
       @editInfo="editInfo"
       @openClassNum="openClassNum"
+      rowKey="goodsId"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="handelBatch(0)" type="success"
+          >批量上架</el-button
+        ><el-button size="medium" @click="handelBatch(1)" type="success"
+          >批量下架</el-button
+        ><el-button size="medium" @click="handelBatch(2)" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button
           v-if="
@@ -95,6 +106,7 @@ export default {
         choice: true,
         addHide: false,
         changeWidth: "180px",
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -375,6 +387,38 @@ export default {
     this.search();
   },
   methods: {
+    // 批量上下架
+    handelBatch(type) {
+      let len = this.$refs.tableList.allCheckData.length;
+      if (!len) {
+        return this.$message.warning("请先勾选商品");
+      }
+      this.$confirm(
+        `此操作将所勾选的${len}条商品${['上架','下架','删除'][type]}, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const goodsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.goodsId
+          );
+          // this.$api
+          //   .editbankquestion({
+          //     status: -1,
+          //     questionIds: questionIdsList,
+          //   })
+          //   .then((res) => {
+          //     this.$message.success("批量删除成功");
+          //     this.$refs.tableList.clearMoreActive();
+          //     this.search(1);
+          //   });
+        })
+        .catch(() => {});
+    },
     openClassNum(id) {
       this.activeGoodsId = id;
       let { specTemplateId } = this.tableData.find((e) => e.goodsId == id);

+ 1 - 1
src/views/education/classManageMent/classList/addClass/index.vue

@@ -70,7 +70,7 @@
               <el-radio :label="0">无效</el-radio>
             </el-radio-group>
           </el-form-item>
-          <el-form-item label="班级号">
+          <el-form-item label="官方班级号">
             <el-button
               style="margin-right: 14px"
               size="mini"

+ 1 - 1
src/views/education/classManageMent/classList/manageClass/baseInfo.vue

@@ -99,7 +99,7 @@
                 <el-radio :label="0">无效</el-radio>
               </el-radio-group>
             </el-form-item>
-            <el-form-item label="班级号">
+            <el-form-item label="官方班级号">
               <el-button
                 style="margin-right: 14px"
                 size="mini"

+ 39 - 0
src/views/resource/bankManagement/chapterVolumeManagement/index.vue

@@ -14,7 +14,14 @@
       @addClick="addClick"
       :loading="loading"
       @editInfo="editInfo"
+      ref="tableList"
+      rowKey="chapterExamId"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="batchDel" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="addClick(props.scope.row, 0)"
           >修改</el-button
@@ -50,6 +57,7 @@ export default {
         border: true,
         choice: true,
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -173,6 +181,37 @@ export default {
     this.search();
   },
   methods: {
+    batchDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选需要删除的章卷");
+        return;
+      }
+      this.$confirm(
+        `此操作将永久删除所勾选的${this.$refs.tableList.allCheckData.length}条章卷, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const questionIdsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.chapterExamId
+          );
+          this.$api
+            .editbankquestion({
+              status: -1,
+              questionIds: questionIdsList,
+            })
+            .then((res) => {
+              this.$message.success("批量删除成功");
+              this.$refs.tableList.clearMoreActive();
+              this.search(1);
+            });
+        })
+        .catch(() => {});
+    },
     editInfo(v) {
       this.addClick(v, 0);
     },

+ 39 - 0
src/views/resource/bankManagement/knowledgeManagement/index.vue

@@ -14,7 +14,14 @@
       @addClick="addClick"
       :loading="loading"
       @editInfo="editInfo"
+      ref="tableList"
+      rowKey="knowledgeId"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="batchDel" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="addClick(props.scope.row, 0)"
           >修改</el-button
@@ -253,6 +260,7 @@ export default {
         border: true,
         choice: true,
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -377,6 +385,37 @@ export default {
     this.search();
   },
   methods: {
+    batchDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选需要删除的知识点");
+        return;
+      }
+      this.$confirm(
+        `此操作将永久删除所勾选的${this.$refs.tableList.allCheckData.length}条知识点, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const questionIdsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.knowledgeId
+          );
+          this.$api
+            .editbankquestion({
+              status: -1,
+              questionIds: questionIdsList,
+            })
+            .then((res) => {
+              this.$message.success("批量删除成功");
+              this.$refs.tableList.clearMoreActive();
+              this.search(1);
+            });
+        })
+        .catch(() => {});
+    },
     loadingClose() {
       this.disabledBtn = false;
     },

+ 39 - 0
src/views/resource/bankManagement/testPaperManagement/index.vue

@@ -14,7 +14,14 @@
       @addClick="addClick"
       :loading="loading"
       @editInfo="editInfo"
+      ref="tableList"
+      rowKey="examId"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="batchDel" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="addClick(props.scope.row, 1)"
           >基本信息</el-button
@@ -59,6 +66,7 @@ export default {
         choice: true,
         changeWidth: "240px",
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -177,6 +185,37 @@ export default {
     this.search();
   },
   methods: {
+    batchDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选需要删除的试卷");
+        return;
+      }
+      this.$confirm(
+        `此操作将永久删除所勾选的${this.$refs.tableList.allCheckData.length}条试卷, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const questionIdsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.examId
+          );
+          this.$api
+            .editbankquestion({
+              status: -1,
+              questionIds: questionIdsList,
+            })
+            .then((res) => {
+              this.$message.success("批量删除成功");
+              this.$refs.tableList.clearMoreActive();
+              this.search(1);
+            });
+        })
+        .catch(() => {});
+    },
     preview(id) {
       this.$refs.testPaperPreview.openBox(1, id);
     },

+ 61 - 19
src/views/resource/bankManagement/volumeManagement/index.vue

@@ -14,7 +14,14 @@
       @addClick="addClick"
       :loading="loading"
       @editInfo="editInfo"
+      ref="tableList"
+      rowKey="moduleExamId"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="batchDel" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="addClick(props.scope.row, 0)"
           >修改</el-button
@@ -38,7 +45,7 @@ import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 export default {
   components: { searchBoxNew, tableList, pagination },
-  name:"VolumeManagement",
+  name: "VolumeManagement",
   data() {
     return {
       loading: false, //当前表单加载是否加载动画
@@ -46,10 +53,11 @@ export default {
         title: "模块管理",
         index: 0,
         ch: "条",
-        border:true,
+        border: true,
         num: false,
         choice: true,
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -66,13 +74,13 @@ export default {
           prop: "businessId",
           placeholder: "业务层次",
           scope: "businessLevel",
-          edu:"educationId"
+          edu: "educationId",
         },
         {
           prop: "subjectId",
           placeholder: "科目",
           scope: "sujectType",
-          edu:"educationId"
+          edu: "educationId",
         },
         {
           prop: "publishStatus",
@@ -128,7 +136,7 @@ export default {
           prop3: "businessName",
           prop4: "subjectName",
           hidden: false,
-          scope:"eduTypes",
+          scope: "eduTypes",
         },
         {
           label: "关联商品",
@@ -136,7 +144,7 @@ export default {
           prop1: "goodsName",
           hidden: false,
           scope: "aboutChapter",
-          int:8
+          int: 8,
         },
         {
           label: "章卷总数",
@@ -176,10 +184,41 @@ export default {
   mounted() {
     this.search();
   },
-  activated(){
+  activated() {
     this.search();
   },
   methods: {
+    batchDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选需要删除的模块卷");
+        return;
+      }
+      this.$confirm(
+        `此操作将永久删除所勾选的${this.$refs.tableList.allCheckData.length}条模块卷, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const questionIdsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.moduleExamId
+          );
+          this.$api
+            .editbankquestion({
+              status: -1,
+              questionIds: questionIdsList,
+            })
+            .then((res) => {
+              this.$message.success("批量删除成功");
+              this.$refs.tableList.clearMoreActive();
+              this.search(1);
+            });
+        })
+        .catch(() => {});
+    },
     editInfo(v) {
       this.addClick(v, 0);
     },
@@ -195,13 +234,16 @@ export default {
           pageNum: 1,
         };
       }
-      this.$api.inquireBankModule(this.formData).then((res) => {
-        this.tableData = res.rows;
-        this.total = res.total;
-        this.navText.index = res.total;
-      }).finally(()=>{
-        this.loading = false;
-      })
+      this.$api
+        .inquireBankModule(this.formData)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     init() {
       this.search(2);
@@ -239,11 +281,11 @@ export default {
       } else {
         const jump = () => {
           this.$router.push({
-          path: "volumeManagementEdit",
-          query: {
-            id: v.moduleExamId,
-          },
-        });
+            path: "volumeManagementEdit",
+            query: {
+              id: v.moduleExamId,
+            },
+          });
         };
         const statusPage = this.$store.state.tagsView.visitedViews.some(
           (item) => {

+ 39 - 0
src/views/resource/videoManagement/chapter/index.vue

@@ -14,7 +14,14 @@
       @addClick="addClick"
       :loading="loading"
       @editInfo="editInfo"
+      ref="tableList"
+      rowKey="chapterId"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="batchDel" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="addClick(props.scope.row, 0)"
           >修改</el-button
@@ -50,6 +57,7 @@ export default {
         border: true,
         choice: true,
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -184,6 +192,37 @@ export default {
     this.search();
   },
   methods: {
+    batchDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选需要删除的章");
+        return;
+      }
+      this.$confirm(
+        `此操作将永久删除所勾选的${this.$refs.tableList.allCheckData.length}条章, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const questionIdsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.chapterId
+          );
+          this.$api
+            .editbankquestion({
+              status: -1,
+              questionIds: questionIdsList,
+            })
+            .then((res) => {
+              this.$message.success("批量删除成功");
+              this.$refs.tableList.clearMoreActive();
+              this.search(1);
+            });
+        })
+        .catch(() => {});
+    },
     editInfo(v) {
       this.addClick(v, 0);
     },

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

@@ -14,7 +14,14 @@
       @addClick="addClick"
       :loading="loading"
       @editInfo="editInfo"
+      ref="tableList"
+      rowKey="courseId"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="batchDel" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="edit(props.scope.row, 1)"
           >基本信息</el-button
@@ -55,6 +62,7 @@ export default {
         choice: true,
         addHide: false,
         changeWidth: "220px",
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -212,6 +220,37 @@ export default {
     this.search();
   },
   methods: {
+    batchDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选需要删除的课程");
+        return;
+      }
+      this.$confirm(
+        `此操作将永久删除所勾选的${this.$refs.tableList.allCheckData.length}条课程, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const questionIdsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.courseId
+          );
+          this.$api
+            .editbankquestion({
+              status: -1,
+              questionIds: questionIdsList,
+            })
+            .then((res) => {
+              this.$message.success("批量删除成功");
+              this.$refs.tableList.clearMoreActive();
+              this.search(1);
+            });
+        })
+        .catch(() => {});
+    },
     edit(v, int) {
       const jump = () => {
         this.$router.push({

+ 39 - 3
src/views/resource/videoManagement/festival/index.vue

@@ -17,6 +17,11 @@
       :loading="loading"
       @editInfo="editInfo"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="batchDel" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="customize">
         <el-button size="medium" type="success" @click="moreActive"
           >批量导入</el-button
@@ -262,7 +267,7 @@ export default {
           prop: "sectionType",
           hidden: true,
           scope: "sectionTypesTTT",
-          width:"120px"
+          width: "120px",
         },
         {
           label: "节时长",
@@ -326,6 +331,37 @@ export default {
     this.search();
   },
   methods: {
+    batchDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选需要删除的节");
+        return;
+      }
+      this.$confirm(
+        `此操作将永久删除所勾选的${this.$refs.tableList.allCheckData.length}条节, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const questionIdsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.sectionId
+          );
+          this.$api
+            .editbankquestion({
+              status: -1,
+              questionIds: questionIdsList,
+            })
+            .then((res) => {
+              this.$message.success("批量删除成功");
+              this.$refs.tableList.clearMoreActive();
+              this.search(1);
+            });
+        })
+        .catch(() => {});
+    },
     getDowm() {
       let url =
         baseUrls.BASE_IMG_URL +
@@ -343,11 +379,11 @@ export default {
       var self = this;
       var file = e.target.files[0];
       if (file === undefined) {
-        e.target.value = ""
+        e.target.value = "";
         return;
       }
       var type = e.target.value.toLowerCase().split(".").splice(-1);
-      if (type[0] != "xlsx"&& type[0] != "xls") {
+      if (type[0] != "xlsx" && type[0] != "xls") {
         self.$message.error("请上传excel文件,且上传格式需为:.xlsx");
         return;
       }

+ 40 - 0
src/views/resource/videoManagement/moduleManagement/index.vue

@@ -14,7 +14,14 @@
       @addClick="addClick"
       :loading="loading"
       @editInfo="editInfo"
+      ref="tableList"
+      rowKey="moduleId"
     >
+      <template slot="customize">
+        <el-button size="medium" @click="batchDel" type="warning"
+          >批量删除</el-button
+        >
+      </template>
       <template slot="btn" slot-scope="props">
         <el-button type="text" @click="gift(props.scope.row)"
           >赠送题卷</el-button
@@ -55,6 +62,7 @@ export default {
         choice: true,
         border: true,
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -191,6 +199,38 @@ export default {
     this.search();
   },
   methods: {
+    batchDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选需要删除的题目");
+        return;
+      }
+      this.$confirm(
+        `此操作将永久删除所勾选的${this.$refs.tableList.allCheckData.length}条模块, 是否继续?`,
+        "提示",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          const questionIdsList = this.$refs.tableList.allCheckData.map(
+            (item) => item.moduleId
+          );
+          this.$api
+            .editbankquestion({
+              status: -1,
+              questionIds: questionIdsList,
+            })
+            .then((res) => {
+              this.$message.success("批量删除成功");
+              this.$refs.tableList.clearMoreActive();
+              this.search(1);
+            });
+        })
+        .catch(() => {});
+      // console.log(this.$refs.tableList.)
+    },
     editInfo(v) {
       this.addClick(v, 0);
     },