Ver Fonte

fiex:第五阶段优化

Tang há 3 anos atrás
pai
commit
cf5a2c820b
50 ficheiros alterados com 2356 adições e 757 exclusões
  1. BIN
      src/assets/404_images/wuyuxaog.png
  2. 55 1
      src/components/busIns.vue
  3. 73 2
      src/components/questionBank.vue
  4. 28 23
      src/components/searchBoxNew.vue
  5. 49 9
      src/components/tableList.vue
  6. 17 1
      src/newApi/applicationData.js
  7. 50 25
      src/utils/methodsTool.js
  8. 117 66
      src/views/Marketing/goods/commodityManageMent/add/index.vue
  9. 81 42
      src/views/Marketing/goods/commodityManageMent/edit/index.vue
  10. 152 18
      src/views/Marketing/goods/courseInquiryList/index.vue
  11. 22 2
      src/views/education/classManageMent/classHours/index.vue
  12. 21 0
      src/views/education/classManageMent/classHoursReview/studyTimes.vue
  13. 1 1
      src/views/education/classManageMent/learningHoursRecordList/exportTable.vue
  14. 36 3
      src/views/education/classManageMent/learningHoursRecordList/hoursTimesRecord.vue
  15. 12 4
      src/views/education/classManageMent/learningHoursRecordList/index.vue
  16. 26 5
      src/views/education/classManageMent/learningHoursRecordList/studyTimesRecord.vue
  17. 22 2
      src/views/education/classManageMent/listOfhoursToBeReviewed/index.vue
  18. 1 1
      src/views/education/examManagement/applicationData/bulkImportPlan/newRegister.vue
  19. 35 12
      src/views/education/examManagement/applicationData/bulkImportPlan/newYY.vue
  20. 4 0
      src/views/education/notificationManageMent/notificationList/index.vue
  21. 2 2
      src/views/education/qaManagement/qaList/ask.vue
  22. 2 2
      src/views/education/qaManagement/qaList/reply.vue
  23. 6 6
      src/views/resource/bankManagement/chapterVolumeManagement/add/index.vue
  24. 6 6
      src/views/resource/bankManagement/chapterVolumeManagement/edit/index.vue
  25. 5 2
      src/views/resource/bankManagement/chapterVolumeManagement/index.vue
  26. 62 8
      src/views/resource/bankManagement/knowledgeManagement/index.vue
  27. 3 1
      src/views/resource/bankManagement/testPaperManagement/addPaper/baseAddPaper/index.vue
  28. 91 23
      src/views/resource/bankManagement/testPaperManagement/addPaper/topicAddPaper/index.vue
  29. 4 1
      src/views/resource/bankManagement/testPaperManagement/editPaper/baseEditPaper/index.vue
  30. 143 29
      src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue
  31. 7 4
      src/views/resource/bankManagement/testPaperManagement/index.vue
  32. 51 5
      src/views/resource/bankManagement/topicManagement/index.vue
  33. 9 7
      src/views/resource/baseManageInfos/resource/businessLevel/index.vue
  34. 60 3
      src/views/resource/handoutManagement/handoutList/add/index.vue
  35. 75 15
      src/views/resource/handoutManagement/handoutList/edit/index.vue
  36. 4 1
      src/views/resource/handoutManagement/handoutList/index.vue
  37. 112 34
      src/views/resource/videoManagement/chapter/add/index.vue
  38. 112 34
      src/views/resource/videoManagement/chapter/edit/index.vue
  39. 5 4
      src/views/resource/videoManagement/chapter/index.vue
  40. 66 46
      src/views/resource/videoManagement/courseManagement/basicInfoAdd/index.vue
  41. 43 30
      src/views/resource/videoManagement/courseManagement/basicInfoEdit/index.vue
  42. 9 7
      src/views/resource/videoManagement/courseManagement/chapterContent/index.vue
  43. 14 7
      src/views/resource/videoManagement/courseManagement/index.vue
  44. 108 36
      src/views/resource/videoManagement/festival/add/index.vue
  45. 109 36
      src/views/resource/videoManagement/festival/edit/index.vue
  46. 31 18
      src/views/resource/videoManagement/festival/index.vue
  47. 143 55
      src/views/resource/videoManagement/flow/index.vue
  48. 154 78
      src/views/resource/videoManagement/moduleManagement/add/index.vue
  49. 112 36
      src/views/resource/videoManagement/moduleManagement/edit/index.vue
  50. 6 4
      src/views/resource/videoManagement/moduleManagement/index.vue

BIN
src/assets/404_images/wuyuxaog.png


+ 55 - 1
src/components/busIns.vue

@@ -43,7 +43,14 @@
             @hide="hideHandle"
             :disabled="courType ? false : true"
           >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            <el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group v-model="sujectArray" class="checkboxSty" 
+              @change="handleCheckedCitiesChange">
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -98,6 +105,8 @@ export default {
   props: ["typeBus", "sujectApisTable", "newSujectApisTable"],
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       changeHeight: false,
       eduTypeOptions: [], //教育类型数据
       projectTypeOptions: [], //项目类型数据
@@ -143,6 +152,45 @@ export default {
     this.getDict();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
@@ -261,9 +309,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers[0].doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     closeType(index) {
       this.sujectApis.splice(index, 1);

+ 73 - 2
src/components/questionBank.vue

@@ -548,6 +548,7 @@ export default {
   watch: {
     dingFormInfo: {
       handler(newVal, oldVal) {
+        console.log(newVal)
         this.dingForm = newVal;
       },
       // 立即处理 进入页面就触发
@@ -556,20 +557,83 @@ export default {
   },
   methods: {
     changeTypes(int) {
-      this.dingForm = {
+      var data = {
         questionId: this.dingForm.questionId ? this.dingForm.questionId : "",
         type: int,
         optionsList: [],
         answerQuestionList: [],
         answerQuestion: "",
         content: "",
-        // status: "",
         analysisContent: "",
       };
+      switch (int) {
+        case 1:
+          for (let i = 0; i < 4; i++) {
+            data.optionsList.push({
+              content: "",
+              imgUrl: null,
+              optionsId: i + 1,
+            });
+          }
+          break;
+        case 2:
+          for (let i = 0; i < 5; i++) {
+            data.optionsList.push({
+              content: "",
+              imgUrl: null,
+              optionsId: i + 1,
+            });
+          }
+          break;
+        case 4:
+          var datas = {
+            analysisContent: "",
+            answerQuestion: "",
+            answerQuestionList: [],
+            content: "",
+            optionsList: [],
+            type: 1,
+          };
+          for (let i = 0; i < 4; i++) {
+            datas.optionsList.push({
+              content: "",
+              imgUrl: null,
+              optionsId: i + 1,
+            });
+          }
+          data.optionsList.push(datas);
+        default:
+          break;
+      }
+      this.dingForm = data;
     },
     changeTypeChild(index) {
       this.dingForm.optionsList[index].optionsList = [];
       this.dingForm.optionsList[index].answerQuestion = "";
+      switch (this.dingForm.optionsList[index].type) {
+        case 1:
+          for (let i = 0; i < 4; i++) {
+            this.dingForm.optionsList[index].optionsList.push({
+              content: "",
+              imgUrl: null,
+              optionsId: i + 1,
+            });
+          }
+          break;
+        case 2:
+          for (let i = 0; i < 5; i++) {
+            this.dingForm.optionsList[index].optionsList.push({
+              content: "",
+              imgUrl: null,
+              optionsId: i + 1,
+            });
+          }
+          break;
+        default:
+          break;
+      }
+      // this.dingForm.optionsList[index].optionsList = [];
+      // this.dingForm.optionsList[index].answerQuestion = "";
     },
     getInfosPage() {
       return this.dingForm;
@@ -703,6 +767,13 @@ export default {
         optionsList: [],
         type: 1,
       };
+      for (let i = 0; i < 4; i++) {
+        data.optionsList.push({
+          content: "",
+          imgUrl: null,
+          optionsId: i + 1,
+        });
+      }
       this.dingForm.optionsList.push(data);
     },
     // 上传图片

+ 28 - 23
src/components/searchBoxNew.vue

@@ -343,7 +343,7 @@
           <div v-else-if="item.scope === 'moreDataPicker'">
             <el-date-picker
               v-model="formData[item.prop1]"
-              :type="item.Diszing ? 'datetime':'date'"
+              :type="item.Diszing ? 'datetime' : 'date'"
               value-format="timestamp"
               :size="size"
               :placeholder="item.placeholder1"
@@ -353,7 +353,7 @@
             <el-date-picker
               style="margin-left: 10px"
               v-model="formData[item.prop2]"
-              :type="item.Diszing ? 'datetime':'date'"
+              :type="item.Diszing ? 'datetime' : 'date'"
               :size="size"
               value-format="timestamp"
               :placeholder="item.placeholder2"
@@ -538,7 +538,7 @@ export default {
       "examList",
       "beforeList",
       "applySiteAddress",
-      "certificate"
+      "certificate",
     ]),
     /**
      * @remarks 过滤选择器列表
@@ -555,26 +555,31 @@ export default {
           ) {
             if (!this.formData[items.edu]) {
             } else {
-              const indexType = this.educationType.findIndex((its) => {
-                return its.id === this.formData[items.edu];
-              });
-              if (
-                items.scope === "businessLevel" &&
-                this.educationType[indexType].tireStatus.indexOf("2") !== -1
-              ) {
-                return items;
-              }
-              if (
-                items.scope === "schoolList" &&
-                this.educationType[indexType].tireStatus.indexOf("3") !== -1
-              ) {
-                return items;
-              }
-              if (
-                items.scope === "Professional" &&
-                this.educationType[indexType].tireStatus.indexOf("4") !== -1
-              ) {
-                return items;
+              if (this.educationType) {
+                const indexType = this.educationType.findIndex((its) => {
+                  return its.id === this.formData[items.edu];
+                });
+                if (
+                  items.scope === "businessLevel" &&
+                  this.educationType[indexType].tireStatus.indexOf("2") !== -1
+                ) {
+                  return items;
+                }
+                if (
+                  items.scope === "schoolList" &&
+                  this.educationType[indexType].tireStatus.indexOf("3") !== -1
+                ) {
+                  return items;
+                }
+                if (
+                  items.scope === "Professional" &&
+                  this.educationType[indexType].tireStatus.indexOf("4") !== -1
+                ) {
+                  return items;
+                }
+                if (items.scope === "sujectType") {
+                  return items;
+                }
               }
             }
           } else {

+ 49 - 9
src/components/tableList.vue

@@ -65,11 +65,7 @@
               </div>
             </el-checkbox-group>
           </div>
-          <el-button
-            style="margin-left: 10px"
-            size="medium"
-            slot="reference"
-            v-if="false"
+          <el-button style="margin-left: 10px" size="medium" slot="reference"
             >自定义列</el-button
           >
         </el-popover>
@@ -129,7 +125,9 @@
       >
         <template slot-scope="scope">
           <div class="imgboxsq" v-if="item.scope === 'img'">
+            <img style="height: 60px; width: 60px" v-if="!scope.row[item.prop]" src="@/assets/404_images/wuyuxaog.png" alt="">
             <el-image
+            v-else
               class="el_images"
               lazy
               :src="$methodsTools.splitImgHost(scope.row[item.prop])"
@@ -248,6 +246,11 @@
               ? "回放"
               : ""
           }}</span>
+          <span v-else-if="item.scope === 'liveAndUrl'">{{
+            scope.row[item.prop] == 2
+              ? scope.row[item.prop2]
+              : scope.row[item.prop1]
+          }}</span>
           <span v-else-if="item.scope === 'ggType'">{{
             Number(scope.row[item.prop]) === 1
               ? "学习中心"
@@ -1042,6 +1045,11 @@
           >
             {{ getSimpleText(scope.row[item.prop]) }}
           </div>
+          <div
+            v-else-if="item.scope === 'editInfoHTMLs'"
+          >
+            {{ getSimpleText(scope.row[item.prop]) }}
+          </div>
           <span v-else-if="item.scope === 'minute'">{{
             numTimeminute(scope.row[item.prop])
           }}</span>
@@ -1592,6 +1600,13 @@ export default {
   },
   mounted() {},
   methods: {
+    /**
+     * 清除多选框
+     */
+    clearMoreActive() {
+      this.allCheckData = [];
+      this.$refs.pagerset.clearSelection();
+    },
     /**
      * @param {Array} 学员数据— 学员管理-所购商品
      */
@@ -2069,6 +2084,10 @@ export default {
           this.checkedCities.push(item.label);
         }
       });
+      this.tableSet = [];
+      this.$nextTick(() => {
+        this.tableSet = JSON.parse(this.inittableSet);
+      });
       if (this.checkedCities.length === 0) {
         this.isIndeterminate = false;
       } else if (this.checkedCities.length === this.cities.length) {
@@ -2081,12 +2100,12 @@ export default {
     },
     //自定义列全选按钮触发
     handleCheckAllChange(val) {
-      console.log(val, 123);
       this.checkedCities = val ? this.cities : [];
       this.isIndeterminate = false;
       if (val) {
-        this.tableSet.forEach((item, index) => {
-          item.hidden = true;
+        this.tableSet = [];
+        this.$nextTick(() => {
+          this.tableSet = JSON.parse(this.inittableSet);
         });
       } else {
         this.tableSet.forEach((item, index) => {
@@ -2096,17 +2115,28 @@ export default {
     },
     // 勾选自定义列子选项
     handleCheckedCitiesChange(value) {
+      var copyTable = JSON.parse(JSON.stringify(this.tableSet));
       let checkedCount = value.length;
       this.checkAll = checkedCount === this.cities.length;
       this.isIndeterminate =
         checkedCount > 0 && checkedCount < this.cities.length;
+      this.tableSet = [];
+      this.$nextTick(() => {
+        this.tableSet = copyTable;
+      });
     },
     checkboxChange(v, e) {
-      this.tableSet.forEach((item) => {
+      var copyTable = JSON.parse(JSON.stringify(this.tableSet));
+      copyTable.forEach((item) => {
         if (item.label === v) {
           item.hidden = e;
         }
       });
+
+      this.tableSet = [];
+      this.$nextTick(() => {
+        this.tableSet = copyTable;
+      });
     },
     //自定义列重置
     initVue() {
@@ -2131,6 +2161,11 @@ export default {
         this.tableSet.unshift(this.tableSet.splice(index, 1)[0]);
         this.cities.unshift(this.cities.splice(index, 1)[0]);
       }
+      var copyTable = JSON.parse(JSON.stringify(this.tableSet));
+      this.tableSet = [];
+      this.$nextTick(() => {
+        this.tableSet = copyTable;
+      });
     },
     // 上移
     upMove(option, index) {
@@ -2149,6 +2184,11 @@ export default {
         this.tableSet.push(this.tableSet.shift());
         this.cities.push(this.cities.shift());
       }
+      var copyTable = JSON.parse(JSON.stringify(this.tableSet));
+      this.tableSet = [];
+      this.$nextTick(() => {
+        this.tableSet = copyTable;
+      });
     },
     //跳转页面
     jumpPage(options) {

+ 17 - 1
src/newApi/applicationData.js

@@ -97,7 +97,7 @@ export default {
             data
         })
     },
-    //导出新增错误预约
+    //导出错误数据
     inquiresystemsubscribeexportErrorNew(data) {
         return request({
             url: '/system/subscribe/exportErrorNew',
@@ -105,4 +105,20 @@ export default {
             data
         })
     },
+    //导出新增含考培错误数据
+    inquiresystemsubscribeexportexportErrorTrain(data) {
+        return request({
+            url: '/system/subscribe/exportErrorTrain',
+            method: 'post',
+            data
+        })
+    },
+    //导出前培错误数据
+    inquiresystemsubscribeexportexportErrorUpdate(data) {
+        return request({
+            url: '/system/subscribe/exportErrorUpdate',
+            method: 'post',
+            data
+        })
+    },
 }

+ 50 - 25
src/utils/methodsTool.js

@@ -172,39 +172,39 @@ export default {
 	 * @param {Strings} pId	参数名称 例如:'pid' 默认 pid
 	 * @returns 返回树形结构
 	 */
-	arrayToTree(items,Id = 'id',pId = 'pid') {
+	arrayToTree(items, Id = 'id', pId = 'pid') {
 		const result = []; // 存放结果集
 		const itemMap = {}; //
 		for (const item of items) {
-		  const id = item[Id];
-		  const pid = item[pId];
-  
-		  if (!itemMap[id]) {
+			const id = item[Id];
+			const pid = item[pId];
+
+			if (!itemMap[id]) {
+				itemMap[id] = {
+					children: [],
+				};
+			}
+
 			itemMap[id] = {
-			  children: [],
+				...item,
+				children: itemMap[id]["children"],
 			};
-		  }
-  
-		  itemMap[id] = {
-			...item,
-			children: itemMap[id]["children"],
-		  };
-  
-		  const treeItem = itemMap[id];
-  
-		  if (pid === 0) {
-			result.push(treeItem);
-		  } else {
-			if (!itemMap[pid]) {
-			  itemMap[pid] = {
-				children: [],
-			  };
+
+			const treeItem = itemMap[id];
+
+			if (pid === 0) {
+				result.push(treeItem);
+			} else {
+				if (!itemMap[pid]) {
+					itemMap[pid] = {
+						children: [],
+					};
+				}
+				itemMap[pid].children.push(treeItem);
 			}
-			itemMap[pid].children.push(treeItem);
-		  }
 		}
 		return result;
-	  },
+	},
 	//JS计算两个时间戳相差月数、天数、时数、分钟、秒数
 	humandate(time1, time2) {
 		// var time1 = Date.parse(new Date()) / 1000;
@@ -284,5 +284,30 @@ export default {
 				})
 			}, 500)
 		}
+	},
+	/**
+	 * 
+	 * @param {strings} name 
+	 * @returns 获取localStorage缓存
+	 */
+	storageGet(name) {
+		return window.localStorage.getItem(name)
+	},
+	/**
+	 * 
+	 * @param {strings} name 
+	 * @param {strings} val 
+	 * @returns 设置localStorage缓存
+	 */
+	storageSet(name, val) {
+		return window.localStorage.setItem(name, val)
+	},
+	/**
+	 * 
+	 * @param {strings} name 
+	 * @returns 移除指定name
+	 */
+	storageRemove(name) {
+		return window.localStorage.removeItem(name)
 	}
 }

+ 117 - 66
src/views/Marketing/goods/commodityManageMent/add/index.vue

@@ -155,40 +155,48 @@
         <el-col :span="12">
           <el-form label-position="right" label-width="120px" :model="listData">
             <el-form-item label="商品封面">
-              <div class="imgBoxins">
-                <img
-                  :src="$methodsTools.splitImgHost(listData.coverUrl)"
-                  alt=""
-                />
-                <div
-                  class="posimg"
-                  v-if="
-                    listData.coverUrl === null ||
-                    listData.coverUrl === '' ||
-                    listData.coverUrl === undefined
-                  "
-                >
-                  <label for="uplose">
-                    <i class="el-icon-circle-plus-outline iconStsz"></i
-                  ></label>
-                  <input
-                    ref="file"
-                    type="file"
-                    style="display: none"
-                    id="uplose"
-                    @change="getImgFile"
-                  />
-                  <p>
-                    注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-                  </p>
-                </div>
-              </div>
+              <el-row :gutter="10" style="margin-bottom: 10px">
+                <el-col :span="12">
+                  <div
+                    style="
+                      width: 100%;
+                      height: 150px;
+                      border: 2px dashed #999;
+                      border-radius: 28px;
+                      line-height: 150px;
+                      text-align: center;
+                    "
+                    v-if="!listData.coverUrl"
+                  >
+                    <label for="uplose">
+                      <i class="el-icon-circle-plus-outline iconStsz"></i
+                    ></label>
+                    <input
+                      ref="file"
+                      type="file"
+                      style="display: none"
+                      id="uplose"
+                      @change="getImgFile"
+                    />
+                  </div>
+                  <el-image
+                    v-else
+                    style="width: 100%"
+                    :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                    :preview-src-list="[
+                      $methodsTools.splitImgHost(listData.coverUrl),
+                    ]"
+                  >
+                  </el-image>
+                </el-col>
+                <el-col :span="11">
+                  <span style="color: #999; font-size: 13px"
+                    >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+                  >
+                </el-col>
+              </el-row>
               <el-button
-                v-if="
-                  listData.coverUrl !== null &&
-                  listData.coverUrl !== '' &&
-                  listData.coverUrl !== undefined
-                "
+                v-if="listData.coverUrl"
                 type="danger"
                 size="mini"
                 class="margin-top: 20px;"
@@ -210,12 +218,18 @@
             ref="listData2"
           >
             <el-form-item label="商品标准价格" prop="standPrice">
-              <el-input class="numInputs" v-model="listData.standPrice"
+              <el-input
+                class="numInputs"
+                v-model="listData.standPrice"
+                @change="judgeResult1"
                 ><template slot="prepend">¥</template></el-input
               >
             </el-form-item>
             <el-form-item label="商品最低价格" prop="lowestPrice">
-              <el-input class="numInputs" v-model="listData.lowestPrice"
+              <el-input
+                class="numInputs"
+                v-model="listData.lowestPrice"
+                @change="judgeResult2"
                 ><template slot="prepend">¥</template></el-input
               >
             </el-form-item>
@@ -803,6 +817,7 @@
       </span>
     </el-dialog>
     <el-dialog
+      @opened="prepareEnd"
       :visible.sync="dialogVisibleTableBoxs"
       width="800px"
       :show-close="false"
@@ -1115,6 +1130,9 @@
                   >
                 </el-popover>
               </ul>
+              <span v-else-if="item.scope === 'canDownload'">{{
+                scope.row[item.prop] === 1 ? "是" : "否"
+              }}</span>
               <span v-else>{{ scope.row[item.prop] }}</span></template
             >
           </el-table-column></template
@@ -1362,6 +1380,7 @@ export default {
         coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
         educationTypeId: "",
         businessId: "",
+        status: 1,
         schoolId: "",
         majorId: "",
         subjectId: "",
@@ -1654,18 +1673,19 @@ export default {
       //   视频商品表格数据------------------------------------------------------------------------start
       tableSetTSB: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
-        { label: "科目名称", prop: "code" },
-        { label: "课程名称", prop: "prefixName", width: "120" },
-        { label: "科目", prop: "subjectName" },
+        { label: "课程编码", prop: "code", width: "140" },
+        { label: "课程名称", prop: "prefixName", width: "190" },
+        { label: "科目", prop: "subjectName", width: "150" },
         { label: "专业", prop: "categoryName" },
-        { label: "院校", prop: "schoolName" },
+        { label: "院校", prop: "schoolName", width: "150" },
         {
           label: "业务层次",
           prop1: "projectName",
           prop2: "businessName",
           scope: "busin",
+          width: "350px",
         },
-        { label: "教育类型", prop: "educationName" },
+        { label: "教育类型", prop: "educationName", width: "160" },
         {
           label: "发布状态",
           prop: "publishStatus",
@@ -1674,14 +1694,14 @@ export default {
         },
       ],
       tableSetTSBBOX: [
-        { label: "课程编码", prop: "code" },
-        { label: "名称前缀", prop: "prefixName", width: "120" },
-        { label: "课程标题", prop: "courseName" },
+        { label: "课程编码", prop: "code", width: "140px" },
+        { label: "名称前缀", prop: "prefixName", width: "160px" },
+        { label: "课程标题", prop: "courseName", width: "300px" },
         {
           label: "发布状态",
           prop: "publishStatus",
           scope: "Status",
-          width: "120",
+          width: "120px",
         },
       ],
       total: 0, //一共多少条
@@ -1705,18 +1725,24 @@ export default {
         //   scope: "businessLevel",
         //   edu: "educationTypeId",
         // },
-        {
-          prop: "schoolId",
-          placeholder: "院校",
-          scope: "schoolList",
-          edu: "educationTypeId",
-        },
+        // {
+        //   prop: "schoolId",
+        //   placeholder: "院校",
+        //   scope: "schoolList",
+        //   edu: "educationTypeId",
+        // },
         {
           prop: "majorId",
           placeholder: "专业",
           scope: "Professional",
           edu: "educationTypeId",
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         // {
         //   prop: "publishStatus",
         //   placeholder: "发布状态",
@@ -1734,7 +1760,7 @@ export default {
         // },
         {
           prop: "key",
-          placeholder: "请输入课程标题/课程编码",
+          placeholder: "课程标题/课程编码/标题前缀",
         },
       ],
       disCheckList: [],
@@ -1745,17 +1771,18 @@ export default {
       auditionList: [],
       aboutJYBox: false,
       jYtableSet: [
-        { label: "讲义编码", prop: "encoder" },
-        { label: "讲义标题", prop: "handoutsName" },
-        {
-          label: "适合业务层级",
-          prop: "courseHandoutsBusinessVo",
-          prop1: "educationName",
-          prop2: "projectName",
-          prop3: "businessName",
-          scope: "eduType",
-        },
-        { label: "发布状态", prop: "status", scope: "Status" },
+        { label: "讲义编码", prop: "encoder", width: "150px" },
+        { label: "讲义标题", prop: "handoutsName"},
+        // {
+        //   label: "适合业务层级",
+        //   prop: "courseHandoutsBusinessVo",
+        //   prop1: "educationName",
+        //   prop2: "projectName",
+        //   prop3: "businessName",
+        //   scope: "eduType",
+        // },
+        { label: "是否可下载", prop: "canDownload", scope: "canDownload",width:"140px"  },
+        { label: "发布状态", prop: "status", scope: "Status",width:"140px" },
       ],
       jYtableData: [],
       jYactiveBoxs: false,
@@ -1840,6 +1867,21 @@ export default {
     // this.getJyData();
   },
   methods: {
+    judgeResult1(v) {
+      console.log(this.listData.lowestPrice, v);
+      if (this.listData.lowestPrice && this.listData.lowestPrice > v) {
+        this.listData.lowestPrice = "";
+        this.$message.warning("商品最低价格高于标准价格,请重新输入");
+        return;
+      }
+    },
+    judgeResult2(v) {
+      if (this.listData.standPrice && this.listData.standPrice < v) {
+        this.listData.lowestPrice = "";
+        this.$message.warning("商品最低价格高于标准价格,请重新输入");
+        return;
+      }
+    },
     changeTypes() {
       this.listData.studyCount = 1;
       if (this.listData.goodsType === 3 || this.listData.goodsType === 4) {
@@ -2556,6 +2598,13 @@ export default {
         );
         // this.listData.standPriceJson[this.NUMBerS] = this.listitemData;
       } else {
+        const INQU = this.listData.standPriceJson.some((item) => {
+          return item.priceTypeId === this.listitemData.priceTypeId;
+        });
+        if (INQU) {
+          this.$message.warning("已存在相同费用类型,禁止重复");
+          return;
+        }
         this.listitem[0].options.map((i, k) => {
           if (i.costId === Number(this.listitemData.priceTypeId)) {
             this.listitemData.priceTypeName = i.costName;
@@ -2575,7 +2624,9 @@ export default {
       var a = "";
       this.certificateOption.map((item, index) => {
         if (item.tpId === id) {
-          a = item.typeId ? item.certificateName + ":" + item.title : item.title;
+          a = item.typeId
+            ? item.certificateName + ":" + item.title
+            : item.title;
         }
       });
       return a;
@@ -2637,12 +2688,12 @@ export default {
         this.dialogVisibleTableBoxs = true;
         this.$nextTick(function () {
           self.$refs.multipleTable.clearSelection();
-          // self.$refs.searchBox.changeEducationType(
-          //   self.listData.educationTypeId
-          // );
         });
       });
     },
+    prepareEnd() {
+      this.$refs.searchBox.changeEducationType(this.listData.educationTypeId);
+    },
     submitTab() {
       if (this.activeLists.length === 0) {
         this.dialogVisibleTableBoxs = false;

+ 81 - 42
src/views/Marketing/goods/commodityManageMent/edit/index.vue

@@ -158,40 +158,48 @@
         <el-col :span="12">
           <el-form label-position="right" label-width="120px" :model="listData">
             <el-form-item label="商品封面">
-              <div class="imgBoxins">
-                <img
-                  :src="$methodsTools.splitImgHost(listData.coverUrl)"
-                  alt=""
-                />
-                <div
-                  class="posimg"
-                  v-if="
-                    listData.coverUrl === null ||
-                    listData.coverUrl === '' ||
-                    listData.coverUrl === undefined
-                  "
-                >
-                  <label for="uplose">
-                    <i class="el-icon-circle-plus-outline iconStsz"></i
-                  ></label>
-                  <input
-                    ref="file"
-                    type="file"
-                    style="display: none"
-                    id="uplose"
-                    @change="getImgFile"
-                  />
-                  <p>
-                    注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-                  </p>
-                </div>
-              </div>
+              <el-row :gutter="10" style="margin-bottom: 10px">
+                <el-col :span="12">
+                  <div
+                    style="
+                      width: 100%;
+                      height: 150px;
+                      border: 2px dashed #999;
+                      border-radius: 28px;
+                      line-height: 150px;
+                      text-align: center;
+                    "
+                    v-if="!listData.coverUrl"
+                  >
+                    <label for="uplose">
+                      <i class="el-icon-circle-plus-outline iconStsz"></i
+                    ></label>
+                    <input
+                      ref="file"
+                      type="file"
+                      style="display: none"
+                      id="uplose"
+                      @change="getImgFile"
+                    />
+                  </div>
+                  <el-image
+                    v-else
+                    style="width: 100%"
+                    :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                    :preview-src-list="[
+                      $methodsTools.splitImgHost(listData.coverUrl),
+                    ]"
+                  >
+                  </el-image>
+                </el-col>
+                <el-col :span="11">
+                  <span style="color: #999; font-size: 13px"
+                    >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+                  >
+                </el-col>
+              </el-row>
               <el-button
-                v-if="
-                  listData.coverUrl !== null &&
-                  listData.coverUrl !== '' &&
-                  listData.coverUrl !== undefined
-                "
+                v-if="listData.coverUrl"
                 type="danger"
                 size="mini"
                 class="margin-top: 20px;"
@@ -213,12 +221,18 @@
             ref="listData2"
           >
             <el-form-item label="商品标准价格" prop="standPrice">
-              <el-input class="numInputs" v-model="listData.standPrice"
+              <el-input
+                class="numInputs"
+                v-model="listData.standPrice"
+                @change="judgeResult1"
                 ><template slot="prepend">¥</template></el-input
               >
             </el-form-item>
             <el-form-item label="商品最低价格" prop="lowestPrice">
-              <el-input class="numInputs" v-model="listData.lowestPrice"
+              <el-input
+                class="numInputs"
+                v-model="listData.lowestPrice"
+                @change="judgeResult2"
                 ><template slot="prepend">¥</template></el-input
               >
             </el-form-item>
@@ -818,6 +832,7 @@
       </span>
     </el-dialog>
     <el-dialog
+      @opened="prepareEnd"
       :visible.sync="dialogVisibleTableBoxs"
       width="800px"
       :show-close="false"
@@ -1690,21 +1705,27 @@ export default {
         key: "",
       },
       formLists: [
-        {
-          prop: "schoolId",
-          placeholder: "院校",
-          scope: "schoolList",
-          edu: "educationTypeId",
-        },
+        // {
+        //   prop: "schoolId",
+        //   placeholder: "院校",
+        //   scope: "schoolList",
+        //   edu: "educationTypeId",
+        // },
         {
           prop: "majorId",
           placeholder: "专业",
           scope: "Professional",
           edu: "educationTypeId",
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         {
           prop: "key",
-          placeholder: "请输入课程标题/课程编码",
+          placeholder: "课程标题/课程编码/标题前缀",
         },
       ],
       disCheckList: [],
@@ -1840,6 +1861,21 @@ export default {
     this.getJyData();
   },
   methods: {
+    judgeResult1(v) {
+      console.log(this.listData.lowestPrice, v);
+      if (this.listData.lowestPrice && this.listData.lowestPrice > v) {
+        this.listData.lowestPrice = "";
+        this.$message.warning("商品最低价格高于标准价格,请重新输入");
+        return;
+      }
+    },
+    judgeResult2(v) {
+      if (this.listData.standPrice && this.listData.standPrice < v) {
+        this.listData.lowestPrice = "";
+        this.$message.warning("商品最低价格高于标准价格,请重新输入");
+        return;
+      }
+    },
     zhText(param) {
       const { columns, data } = param;
       const sums = [];
@@ -2846,6 +2882,9 @@ export default {
         });
       });
     },
+    prepareEnd() {
+      this.$refs.searchBox.changeEducationType(this.listData.educationTypeId);
+    },
     submitTab() {
       if (this.activeLists.length === 0) {
         this.dialogVisibleTableBoxs = false;

+ 152 - 18
src/views/Marketing/goods/courseInquiryList/index.vue

@@ -82,9 +82,9 @@
                   <span :style="activeId === items.onlyId ? 'color:red;' : ''">
                     {{ items.menuName }}
                   </span>
-                  <span v-if="items.type === 3" class="itemsty"
-                    >{{ $methodsTools.secondToDate(items.durationTime,false)}}</span
-                  >
+                  <span v-if="items.type === 3" class="itemsty">{{
+                    $methodsTools.secondToDate(items.durationTime, false)
+                  }}</span>
                 </div>
                 <template v-if="items.checked">
                   <div
@@ -112,9 +112,9 @@
                       >
                         {{ its.menuName }}
                       </span>
-                      <span v-if="its.type === 3" class="itemsty"
-                        >{{ $methodsTools.secondToDate(its.durationTime,false)}}</span
-                      >
+                      <span v-if="its.type === 3" class="itemsty">{{
+                        $methodsTools.secondToDate(its.durationTime, false)
+                      }}</span>
                     </div>
                     <template v-if="its.checked">
                       <div
@@ -134,9 +134,12 @@
                           >
                             {{ itschild.menuName }}
                           </span>
-                          <span class="itemsty"
-                            >{{ $methodsTools.secondToDate(itschild.durationTime,false)}}</span
-                          >
+                          <span class="itemsty">{{
+                            $methodsTools.secondToDate(
+                              itschild.durationTime,
+                              false
+                            )
+                          }}</span>
                         </div>
                       </div>
                     </template>
@@ -158,6 +161,7 @@
 import searchBoxNew from "@/components/searchBoxNew";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
+import { login } from "../../../../api/login";
 export default {
   name: "CourseInquiryList",
   components: { searchBoxNew, tableList, pagination },
@@ -193,8 +197,8 @@ export default {
           edu: "educationTypeId",
         },
         {
-          prop: "goodsName",
-          placeholder: "请输入商品名称",
+          prop: "searchKey",
+          placeholder: "请输入商品编码/商品名称",
         },
       ],
       formData: {
@@ -249,7 +253,7 @@ export default {
           label: "视频节数量",
           prop: "sectionNum",
           hidden: true,
-          width:'100px'
+          width: "100px",
         },
         {
           label: "学习有效期",
@@ -341,12 +345,142 @@ export default {
      * 点击详情
      */
     msgInfo(option) {
-      this.$api.obtainCourseSgoodsId(option.goodsId).then((res) => {
-        res.rows.forEach((item) => {
-          item.checked = false;
-        });
-        this.courseList = res.rows;
-        this.dialogVisible = true;
+      this.$api.obtainCourseSgoodsId(option.goodsId).then(async (res) => {
+        if (res.rows.length) {
+          res.rows.forEach((item, index) => {
+            item.checked = false;
+          });
+          this.courseList = res.rows;
+          await this.autoGetCourseInfos(res.rows[0], 0);
+          this.dialogVisible = true;
+        } else {
+          this.$message.warning("该商品暂无课程");
+          return;
+        }
+      });
+    },
+    /**
+     * 自动播放第一个视频
+     */
+    autoGetCourseInfos(option, int) {
+      return new Promise((resolve, reject) => {
+        this.$api
+          .inquireCoursemenuListS({ courseId: option.courseId })
+          .then((res) => {
+            res.rows.forEach((item) => {
+              if (item.type !== 3) {
+                item.checked = false;
+              }
+              if (item.type === 3) {
+                item.onlyId = `${option.courseId}-0-0-${item.menuId}`;
+              }
+            });
+            this.$set(this.courseList[int], "children", res.rows);
+            this.$set(this.courseList[int], "checked", true);
+            if (this.courseList[0].children.length) {
+              switch (this.courseList[0].children[0].type) {
+                case 1:
+                  this.$api
+                    .inquireCourseListmodulechapter(
+                      this.courseList[0].children[0].menuId
+                    )
+                    .then((resz) => {
+                      resz.data.forEach((item) => {
+                        if (item.type !== 3) {
+                          item.checked = false;
+                          item.type = 2;
+                          item.courseId =
+                            this.courseList[0].children[0].courseId;
+                          item.menuName = item.name;
+                        }
+                      });
+                      this.$set(
+                        this.courseList[int].children[0],
+                        "children",
+                        resz.data
+                      );
+                      this.$set(
+                        this.courseList[int].children[0],
+                        "checked",
+                        true
+                      );
+                      if (this.courseList[int].children[0].children.length) {
+                        this.$api
+                          .inquireCoursechaptersectionlist(
+                            this.courseList[0].children[0].children[0].chapterId
+                          )
+                          .then((result) => {
+                            result.data.forEach((item) => {
+                              item.type = 3;
+                              item.menuName = item.name;
+                              item.onlyId = `${this.courseList[0].children[0].children[0].courseId}-${this.courseList[0].children[0].children[0].moduleId}-${this.courseList[0].children[0].children[0].chapterId}-${item.sectionId}`;
+                            });
+                            this.$set(
+                              this.courseList[int].children[0].children[0],
+                              "children",
+                              result.data
+                            );
+                            this.$set(
+                              this.courseList[int].children[0].children[0],
+                              "checked",
+                              true
+                            );
+                            if (
+                              this.courseList[int].children[0].children[0]
+                                .children.length
+                            ) {
+                              this.activeId =
+                                this.courseList[0].children[0].children[0].children[0].onlyId;
+                              this.initVideo(
+                                this.courseList[0].children[0].children[0]
+                                  .children[0]
+                              );
+                            }
+                          });
+                      }
+                    });
+                  break;
+                case 2:
+                  this.$api
+                    .inquireCoursechaptersectionlist(
+                      this.courseList[0].children[0].menuId
+                    )
+                    .then((result) => {
+                      result.data.forEach((item) => {
+                        item.type = 3;
+                        item.menuName = item.name;
+                        item.onlyId = `${this.courseList[0].children[0].courseId}-0-${this.courseList[0].children[0].menuId}-${item.sectionId}`;
+                      });
+                      this.$set(
+                        this.courseList[int].children[0],
+                        "children",
+                        result.data
+                      );
+                      this.$set(
+                        this.courseList[int].children[0],
+                        "checked",
+                        true
+                      );
+                      if (this.courseList[0].children[0].children.length) {
+                        this.activeId =
+                          this.courseList[0].children[0].children[0].onlyId;
+                        this.initVideo(
+                          this.courseList[0].children[0].children[0]
+                        );
+                      }
+                    });
+                  break;
+                case 3:
+                  this.activeId = this.courseList[0].children[0].onlyId;
+                  this.initVideo(this.courseList[0].children[0]);
+                  break;
+
+                default:
+                  break;
+              }
+            }
+            resolve();
+          });
       });
     },
     /**

+ 22 - 2
src/views/education/classManageMent/classHours/index.vue

@@ -187,7 +187,7 @@ export default {
           label: "学员编码",
           prop: "studentCode",
           hidden: true,
-          width: "130px",
+          width: "180px",
         },
         {
           label: "学员姓名",
@@ -198,7 +198,7 @@ export default {
           label: "学员身份证",
           prop: "idCard",
           hidden: true,
-          width: "160px",
+          width: "180px",
         },
         {
           label: "绑定手机号码",
@@ -206,6 +206,26 @@ export default {
           hidden: true,
           width: "130px",
         },
+        {
+          label: "所购商品",
+          prop: "goodsName",
+          hidden: true,
+          width: "120px",
+        },
+        {
+          label: "所在班级",
+          prop: "className",
+          hidden: true,
+          width: "160px",
+        },
+        {
+          label: "班级有效期",
+          prop1: "classStartTime",
+          prop2: "classEndTime",
+          hidden: true,
+          scope: "TimeLists",
+          width: "260px",
+        },
         {
           label: "学时",
           prop: "classHours",

+ 21 - 0
src/views/education/classManageMent/classHoursReview/studyTimes.vue

@@ -8,7 +8,14 @@
         <li>绑定手机号码:{{ userData.telPhone }}</li>
       </ul>
       <div class="photoSty1">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!recent_photos"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+          v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(recent_photos)"
           :preview-src-list="[$methodsTools.splitImgHost(recent_photos)]"
@@ -17,7 +24,14 @@
         <div class="pos_bottom">一寸头像图</div>
       </div>
       <div class="photoSty2">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!idcard_face_photo"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+          v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(idcard_face_photo)"
           :preview-src-list="[$methodsTools.splitImgHost(idcard_face_photo)]"
@@ -26,7 +40,14 @@
         <div class="pos_bottom">身份证正面照片</div>
       </div>
       <div class="photoSty2" style="margin-right: 0px">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!idcard_national_photo"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+          v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(idcard_national_photo)"
           :preview-src-list="[

+ 1 - 1
src/views/education/classManageMent/learningHoursRecordList/exportTable.vue

@@ -111,7 +111,7 @@ export default {
       this.copyBusiness.forEach((item) => {
         if (item.id == ids) {
           this.formData.eduId = item.educationId;
-          this.formData.businessName = `${item.projectName}-${item.businessName}`
+          this.formData.businessName = `${item.educationName}-${item.projectName}-${item.businessName}`
           this.changeEdu(item.educationId, true);
         }
       });

+ 36 - 3
src/views/education/classManageMent/learningHoursRecordList/hoursTimesRecord.vue

@@ -31,7 +31,14 @@
         <li>绑定手机号码:{{ userData.telPhone }}</li>
       </ul>
       <div class="photoSty1">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!recent_photos"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+          v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(recent_photos)"
           :preview-src-list="[$methodsTools.splitImgHost(recent_photos)]"
@@ -40,7 +47,14 @@
         <div class="pos_bottom">一寸头像图</div>
       </div>
       <div class="photoSty2">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!idcard_face_photo"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+          v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(idcard_face_photo)"
           :preview-src-list="[$methodsTools.splitImgHost(idcard_face_photo)]"
@@ -49,7 +63,14 @@
         <div class="pos_bottom">身份证正面照片</div>
       </div>
       <div class="photoSty2" style="margin-right: 0px">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!idcard_national_photo"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+          v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(idcard_national_photo)"
           :preview-src-list="[
@@ -60,7 +81,7 @@
         <div class="pos_bottom">身份证背面照片</div>
       </div>
     </div>
-    <div style="margin-top:12px;">
+    <div style="margin-top: 12px">
       <el-table
         v-loading="loading"
         ref="multipleTable"
@@ -91,6 +112,12 @@
                   : "未知"
               }}
             </span>
+            <span v-else-if="item.scope === 'durationTime'">
+              {{ $methodsTools.secondToDate(scope.row[item.prop], false) }}
+            </span>
+            <span v-else-if="item.scope === 'score'">
+              {{ scope.row[item.prop] ? scope.row[item.prop] + "分" : "" }}
+            </span>
             <span v-else>{{ scope.row[item.prop] }}</span></template
           >
         </el-table-column>
@@ -145,6 +172,7 @@ export default {
         {
           label: "节时长(秒)",
           prop: "durationTime",
+          scope: "durationTime",
         },
         {
           label: "学习/做题时间",
@@ -158,6 +186,11 @@ export default {
           label: "学习/做题状态",
           prop: "studyStatusTxt",
         },
+        {
+          label: "测试成绩",
+          prop: "score",
+          scope: "score",
+        },
       ],
       tableData: [],
       formData: {
@@ -185,7 +218,7 @@ export default {
     getUserInfo() {
       this.$api
         .inquireGradegradelistUserlistPeriod({
-          gradeId: this.objs.id,
+          gradeId: this.objs.gradeId,
           userId: this.objs.userId,
           goodsId: this.objs.goodsId,
         })
@@ -205,7 +238,7 @@ export default {
     search() {
       this.loading = true;
       let data = {
-        gradeId: this.objs.id,
+        gradeId: this.objs.gradeId,
         userId: this.objs.userId,
         goodsId: this.objs.goodsId,
         // pageSize: this.formData.pageSize,

+ 12 - 4
src/views/education/classManageMent/learningHoursRecordList/index.vue

@@ -201,8 +201,8 @@ export default {
           ],
         },
         {
-          prop: "goodsName",
-          placeholder: "请输入关键内容",
+          prop: "searchKey",
+          placeholder: "请输入姓名/身份证",
         },
       ],
       formData: {
@@ -289,7 +289,15 @@ export default {
           options: [
             {
               label: "已完成",
-              value: 0 || 1 || 2,
+              value: 0,
+            },
+            {
+              label: "已完成",
+              value: 1,
+            },
+            {
+              label: "已完成",
+              value: 2,
             },
             {
               label: "未完成",
@@ -349,7 +357,7 @@ export default {
         .inquireGradegradeListexport({
           businessId: data.businessid,
           studyStatus: data.studyStatus,
-          businessName:data.businessName,
+          businessName: data.businessName,
           officialStatus:
             data.studyStatus === 2 ? data.officialStatus : undefined,
         })

+ 26 - 5
src/views/education/classManageMent/learningHoursRecordList/studyTimesRecord.vue

@@ -31,7 +31,14 @@
         <li>绑定手机号码:{{ userData.telPhone }}</li>
       </ul>
       <div class="photoSty1">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!recent_photos"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+        v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(recent_photos)"
           :preview-src-list="[$methodsTools.splitImgHost(recent_photos)]"
@@ -40,7 +47,14 @@
         <div class="pos_bottom">一寸头像图</div>
       </div>
       <div class="photoSty2">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!idcard_face_photo"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+        v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(idcard_face_photo)"
           :preview-src-list="[$methodsTools.splitImgHost(idcard_face_photo)]"
@@ -49,7 +63,14 @@
         <div class="pos_bottom">身份证正面照片</div>
       </div>
       <div class="photoSty2" style="margin-right: 0px">
+        <img
+          style="width: 100%; height: 100%"
+          v-if="!idcard_national_photo"
+          src="@/assets/404_images/wuyuxaog.png"
+          alt=""
+        />
         <el-image
+        v-else
           style="width: 100%; height: 100%"
           :src="$methodsTools.splitImgHost(idcard_national_photo)"
           :preview-src-list="[
@@ -988,7 +1009,7 @@ export default {
         numIndex: int,
         userId: this.objs.userId,
         goodsId: this.objs.goodsId,
-        gradeId: this.objs.id,
+        gradeId: this.objs.gradeId,
       };
       if (item.type === 3) {
         data.sectionId = item.id;
@@ -1010,7 +1031,7 @@ export default {
         numIndex: int,
         userId: this.objs.userId,
         goodsId: this.objs.goodsId,
-        gradeId: this.objs.id,
+        gradeId: this.objs.gradeId,
       };
       if (item.type === 3) {
         data.sectionId = item.id;
@@ -1036,7 +1057,7 @@ export default {
         numIndex: int,
         userId: this.objs.userId,
         goodsId: this.objs.goodsId,
-        gradeId: this.objs.id,
+        gradeId: this.objs.gradeId,
       };
       if (item.type === 3) {
         data.sectionId = item.id;
@@ -1057,7 +1078,7 @@ export default {
     getUserInfo() {
       this.$api
         .inquireGradegradelistUserlistPeriod({
-          gradeId: this.objs.id,
+          gradeId: this.objs.gradeId,
           userId: this.objs.userId,
           goodsId: this.objs.goodsId,
         })
@@ -1076,7 +1097,7 @@ export default {
     },
     search() {
       let data = {
-        gradeId: this.objs.id,
+        gradeId: this.objs.gradeId,
         userId: this.objs.userId,
         goodsId: this.objs.goodsId,
       };

+ 22 - 2
src/views/education/classManageMent/listOfhoursToBeReviewed/index.vue

@@ -104,8 +104,8 @@ export default {
           scope: "moreDataPicker",
         },
         {
-          prop: "goodsName",
-          placeholder: "请输入关键内容",
+          prop: "searchKey",
+          placeholder: "请输入姓名/身份证",
         },
       ],
       formData: {
@@ -140,6 +140,26 @@ export default {
           hidden: true,
           width: "130px",
         },
+        {
+          label: "所购商品",
+          prop: "goodsName",
+          hidden: true,
+          width: "120px",
+        },
+        {
+          label: "所在班级",
+          prop: "className",
+          hidden: true,
+          width: "160px",
+        },
+        {
+          label: "班级有效期",
+          prop1: "classStartTime",
+          prop2: "classEndTime",
+          hidden: true,
+          scope: "TimeLists",
+          width: "260px",
+        },
         {
           label: "学时",
           prop: "classHours",

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

@@ -441,7 +441,7 @@ export default {
      */
     dowmErrorData() {
       this.$api
-        .inquiresystemsubscribeexportErrorNew(this.tableDataError)
+        .inquiresystemsubscribeexportexportErrorUpdate(this.tableDataError)
         .then((res) => {
           let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
           let link = document.createElement("a");

+ 35 - 12
src/views/education/examManagement/applicationData/bulkImportPlan/newYY.vue

@@ -307,18 +307,41 @@ export default {
      * 下载错误数据
      */
     dowmErrorData() {
-      this.$api
-        .inquiresystemsubscribeexportErrorNew(this.tableDataError)
-        .then((res) => {
-          let url = baseUrls.baseURL + "common/download?fileName=" + res.msg;
-          let link = document.createElement("a");
-          let fileName = "导入模板" + ".xlsx";
-          document.body.appendChild(link);
-          link.href = url;
-          link.dowmload = fileName;
-          link.click();
-          link.remove();
-        });
+      switch (this.typeInt) {
+        case 1:
+          this.$api
+            .inquiresystemsubscribeexportErrorNew(this.tableDataError)
+            .then((res) => {
+              let url =
+                baseUrls.baseURL + "common/download?fileName=" + res.msg;
+              let link = document.createElement("a");
+              let fileName = "导入模板" + ".xlsx";
+              document.body.appendChild(link);
+              link.href = url;
+              link.dowmload = fileName;
+              link.click();
+              link.remove();
+            });
+          break;
+        case 2:
+          this.$api
+            .inquiresystemsubscribeexportexportErrorTrain(this.tableDataError)
+            .then((res) => {
+              let url =
+                baseUrls.baseURL + "common/download?fileName=" + res.msg;
+              let link = document.createElement("a");
+              let fileName = "导入模板" + ".xlsx";
+              document.body.appendChild(link);
+              link.href = url;
+              link.dowmload = fileName;
+              link.click();
+              link.remove();
+            });
+          break;
+
+        default:
+          break;
+      }
     },
     /**
      *

+ 4 - 0
src/views/education/notificationManageMent/notificationList/index.vue

@@ -8,6 +8,7 @@
       @init="init"
     />
     <table-list
+      rowKey="informId"
       ref="tableList"
       :tableSets="tableSet"
       :tableData="tableData"
@@ -164,6 +165,7 @@ export default {
         num: true,
         choice: true,
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -587,6 +589,7 @@ export default {
           };
           this.$api.editsysteminform(data).then((res) => {
             this.$message.success("删除成功");
+            this.$refs.tableList.clearMoreActive();
             this.search();
           });
         })
@@ -656,6 +659,7 @@ export default {
           };
           this.$api.editsysteminform(data).then((res) => {
             this.$message.success("删除成功");
+            this.$refs.tableList.clearMoreActive();
             this.search();
           });
         })

+ 2 - 2
src/views/education/qaManagement/qaList/ask.vue

@@ -98,8 +98,8 @@ export default {
           edu: "educationTypeId",
         },
         {
-          prop: "goodsName",
-          placeholder: "请输入商品名称",
+          prop: "searchKey",
+          placeholder: "请输入商品标题/提问内容",
         },
       ],
       formData: {

+ 2 - 2
src/views/education/qaManagement/qaList/reply.vue

@@ -64,8 +64,8 @@ export default {
           edu: "educationTypeId",
         },
         {
-          prop: "goodsName",
-          placeholder: "请输入商品名称",
+          prop: "searchKey",
+          placeholder: "请输入商品标题/提问内容",
         },
       ],
       formData: {

+ 6 - 6
src/views/resource/bankManagement/chapterVolumeManagement/add/index.vue

@@ -320,14 +320,14 @@ export default {
       minTimeAll: 0, //总时长
       tableSet: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
-        { label: "试卷编码", prop: "code" },
-        { label: "标题前缀", prop: "prefixName", width: "120" },
-        { label: "试卷标题", prop: "examName" },
+        { label: "试卷编码", prop: "code", width: "120" },
+        { label: "标题前缀", prop: "prefixName", width: "170" },
+        { label: "试卷标题", prop: "examName", width: "300" },
         {
           label: "发布状态",
           prop: "publishStatus",
-          scope: "Status",
-          width: "120",
+          scope: "Status", 
+          width: "120" 
         },
       ],
       tableData: [],
@@ -355,7 +355,7 @@ export default {
         // },
         {
           prop: "key",
-          placeholder: "请输入试卷标题/试卷编码/标题前缀",
+          placeholder: "试卷标题/试卷编码/标题前缀",
         },
       ],
       disCheckList: [], //已选转禁用复选列表

+ 6 - 6
src/views/resource/bankManagement/chapterVolumeManagement/edit/index.vue

@@ -331,14 +331,14 @@ export default {
       minTimeAll: 0, //总时长
       tableSet: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
-        { label: "试卷编码", prop: "code" },
-        { label: "标题前缀", prop: "prefixName", width: "120" },
-        { label: "试卷标题", prop: "examName" },
+        { label: "试卷编码", prop: "code", width: "120" },
+        { label: "标题前缀", prop: "prefixName", width: "170" },
+        { label: "试卷标题", prop: "examName", width: "300" },
         {
           label: "发布状态",
           prop: "publishStatus",
-          scope: "Status",
-          width: "120",
+          scope: "Status", 
+          width: "120" 
         },
       ],
       tableData: [],
@@ -366,7 +366,7 @@ export default {
         // },
         {
           prop: "key",
-          placeholder: "请输入试卷标题/试卷编码/标题前缀",
+          placeholder: "试卷标题/试卷编码/标题前缀",
         },
       ],
       disCheckList: [], //已选转禁用复选列表

+ 5 - 2
src/views/resource/bankManagement/chapterVolumeManagement/index.vue

@@ -109,17 +109,20 @@ export default {
           label: "章卷编码",
           prop: "code",
           hidden: true,
+          width: "120px",
         },
         {
           label: "标题前缀",
           prop: "prefixName",
           hidden: true,
+          width: "160px",
         },
         {
           label: "章卷标题",
           prop: "name",
           hidden: true,
           scope: "editInfo",
+          width: "300px",
         },
         {
           label: "适用业务层级",
@@ -129,7 +132,7 @@ export default {
           prop4: "subjectName",
           hidden: true,
           scope: "eduTypes",
-          width: "400",
+          width: "360",
         },
         {
           label: "关联商品",
@@ -137,7 +140,7 @@ export default {
           prop1: "goodsName",
           hidden: true,
           scope: "aboutChapter",
-          width: "150",
+          width: "240",
           int: 7,
         },
         {

+ 62 - 8
src/views/resource/bankManagement/knowledgeManagement/index.vue

@@ -92,7 +92,14 @@
                 @hide="hideHandle"
                 :disabled="courType ? false : true"
               >
-                <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            <el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+                <el-checkbox-group v-model="sujectArray" class="checkboxSty" 
+              @change="handleCheckedCitiesChange">
                   <el-checkbox
                     v-for="(item, index) in newSujectOption"
                     :label="item.newId"
@@ -154,6 +161,11 @@
                 <el-input v-model="listData.knowledgeName"></el-input>
               </div>
               <div v-else>
+                <el-input
+                  style="width: 40%; margin-right: 10px"
+                  v-model="BusName"
+                ></el-input
+                ><el-button @click="addBusName">添加</el-button>
                 <!-- <div v-if="!BusNameList.length">请在下面输入框添加知识点</div> -->
                 <ul class="BusBoxs">
                   <li
@@ -169,11 +181,6 @@
                   </li>
                   <div style="clear: both"></div>
                 </ul>
-                <el-input
-                  style="width: 40%; margin-right: 10px"
-                  v-model="BusName"
-                ></el-input
-                ><el-button @click="addBusName">添加</el-button>
               </div>
             </div>
           </el-form-item>
@@ -196,6 +203,8 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "知识点",
@@ -245,19 +254,20 @@ export default {
           label: "知识点编码",
           prop: "encoder",
           hidden: true,
+          width:"140px"
         },
         {
           label: "知识点标题",
           prop: "knowledgeName",
           scope: "editInfo",
           hidden: true,
+          width:"240px"
         },
         {
           label: "适用业务层级",
           prop: "courseBusinessList",
           hidden: true,
           scope: "mapTypesMores",
-          width: "400",
         },
       ],
 
@@ -314,6 +324,45 @@ export default {
     this.search();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
@@ -360,7 +409,6 @@ export default {
         });
       });
       this.newSujectApis = arrays;
-      console.log(this.newSujectApis);
     },
     getDict() {
       this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
@@ -535,9 +583,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers[0].doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     addClick(v, int) {
       if (v === undefined) {

+ 3 - 1
src/views/resource/bankManagement/testPaperManagement/addPaper/baseAddPaper/index.vue

@@ -45,7 +45,7 @@
             trigger="click"
             @show="showHandle"
             @hide="hideHandle"
-            :disabled="courType ? false : true"
+            :disabled="courType && newSujectOption.length ? false : true"
           >
             <el-radio-group v-model="sujectApis" class="dis_flexbox">
               <el-radio
@@ -1101,6 +1101,8 @@ export default {
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
+      } else if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层级暂无关联科目");
       }
     },
     getSimpleText(html) {

+ 91 - 23
src/views/resource/bankManagement/testPaperManagement/addPaper/topicAddPaper/index.vue

@@ -109,7 +109,7 @@
                   >
                   </el-option>
                 </el-select>
-                <el-button @click="addExam">自定义添加</el-button>
+                <!-- <el-button @click="addExam">自定义添加</el-button> -->
               </div>
 
               <el-radio-group
@@ -289,7 +289,7 @@
                   }}</span>
                   <div
                     class="editInfoSty"
-                    v-else-if="item.scope === 'editInfoHTML'"
+                    v-else-if="item.scope === 'editInfoHTMLs'"
                   >
                     {{ getSimpleText(scope.row[item.prop]) }}
                   </div>
@@ -341,7 +341,7 @@
           <div class="dis_fos">
             <div>
               <div class="margin_bs">当前总分:{{ getAllpocis }}</div>
-              <div class="margin_bs">
+              <div class="margin_bs" v-if="examsType === 2">
                 及格分数:<el-input-number
                   style="margin: 0px 6px; width: 100px !important"
                   v-model="passScore"
@@ -461,7 +461,7 @@
                   }}</span>
                   <div
                     class="editInfoSty"
-                    v-else-if="item.scope === 'editInfoHTML'"
+                    v-else-if="item.scope === 'editInfoHTMLs'"
                   >
                     {{ getSimpleText(scope.row[item.prop]) }}
                   </div>
@@ -732,7 +732,7 @@ export default {
           label: "题目内容",
           prop: "content",
           hidden: true,
-          scope: "editInfoHTML",
+          scope: "editInfoHTMLs",
         },
 
         {
@@ -830,7 +830,7 @@ export default {
           label: "题目标题",
           prop: "content",
           hidden: true,
-          scope: "editInfoHTML",
+          scope: "editInfoHTMLs",
         },
         {
           label: "发布状态",
@@ -867,7 +867,7 @@ export default {
           label: "题目标题",
           prop: "content",
           hidden: true,
-          scope: "editInfoHTML",
+          scope: "editInfoHTMLs",
         },
         {
           label: "发布状态",
@@ -907,6 +907,10 @@ export default {
       djNum: 0, //答卷次数
       examsType: 1,
       businObj: {},
+      draftBox: [], //草稿箱
+      copytableData: [],
+      localStart: false, //定时器是否已经开始
+      pageId: "", //试卷ID
     };
   },
   computed: {
@@ -944,10 +948,33 @@ export default {
     tableData: {
       handler(newVal, oldVal) {
         this.navText.index = newVal.length;
+        /**
+         * 定时器触发机制 防止内存浪费
+         */
+        if (newVal.length) {
+          var a = JSON.stringify(this.tableData);
+          var b = JSON.stringify(this.copytableData);
+          if (a != b) {
+            if (!this.localStart) {
+              this.localStart = true;
+              this.setInterFunc();
+            }
+          }
+        }
       },
       // 立即处理 进入页面就触发
       immediate: true,
     },
+    $route: {
+      handler(val, oldval) {
+        this.localStart = false;
+      },
+      // 深度观察监听
+      deep: true,
+    },
+  },
+  created() {
+    this.pageId = this.$route.query.id;
   },
   async mounted() {
     this.getInfos();
@@ -955,7 +982,25 @@ export default {
     this.changeAmdis();
     this.search();
   },
+  beforeDestroy() {
+    this.localStart = false;
+  },
   methods: {
+    setInterFunc() {
+      var arr = setInterval(() => {
+        if (!this.localStart) {
+          clearInterval(arr);
+          return;
+        }
+        this.$methodsTools.storageSet(
+          "exam",
+          JSON.stringify({
+            id: this.pageId,
+            data: this.tableData,
+          })
+        );
+      }, 1500);
+    },
     getInfos() {
       this.$api.obtainbankexam(this.$route.query.id).then((res) => {
         this.businObj = {
@@ -986,6 +1031,7 @@ export default {
           res.data.map((item) => {
             item.optionsList = JSON.parse(item.jsonStr);
           });
+          this.copytableData = JSON.parse(JSON.stringify(res.data));
           this.tableData = res.data;
           // this.total = res.total;
           this.navText.index = res.total;
@@ -1139,7 +1185,7 @@ export default {
         self.innerVisiblePaperTopic = true;
         self.showHide = true;
         self.$nextTick(() => {
-          (self.listNums = {
+          var data = {
             type: 1,
             optionsList: [],
             answerQuestionList: [],
@@ -1147,14 +1193,22 @@ export default {
             status: "",
             analysisContent: "",
             answerQuestion: "",
-          }),
-            //   (self.$refs.sujects.eduType = "");
-            // self.$refs.sujects.courType = "";
-            // self.$refs.sujects.sujectApis = [];
-            // self.$refs.sujects.newSujectApis = [];
-            (self.listData = {
-              publishStatus: 1,
+          };
+          for (let i = 0; i < 4; i++) {
+            data.optionsList.push({
+              content: "",
+              imgUrl: null,
+              optionsId: i + 1,
             });
+          }
+          self.listNums = data;
+          //   (self.$refs.sujects.eduType = "");
+          // self.$refs.sujects.courType = "";
+          // self.$refs.sujects.sujectApis = [];
+          // self.$refs.sujects.newSujectApis = [];
+          self.listData = {
+            publishStatus: 1,
+          };
           self.activeExam = [];
         });
       } else {
@@ -1484,9 +1538,11 @@ export default {
     },
     async submitTableAllInfos() {
       var self = this;
-      if (Number(this.passScore) > Number(this.getAllpocis)) {
-        this.$message.warning("及格分数不得大于当前总分,请重新设置分值");
-        return;
+      if (this.examsType === 2) {
+        if (Number(this.passScore) > Number(this.getAllpocis)) {
+          this.$message.warning("及格分数不得大于当前总分,请重新设置分值");
+          return;
+        }
       }
       for (let i = 0; i < this.tableData.length; i++) {
         if (!this.tableData[i].sort && this.tableData[i].sort !== 0) {
@@ -1535,7 +1591,8 @@ export default {
       }
       this.$api.editbankexam(data).then((res) => {
         this.$message.success("修改成功");
-        setTimeout(() => {
+        setTimeout(async () => {
+          await this.removeInfo();
           this.$store.dispatch("tagsView/exitView", this.$route).then(() => {
             this.$router.push({
               path: "testPaperManagement",
@@ -1544,6 +1601,17 @@ export default {
         }, 500);
       });
     },
+    removeInfo() {
+      return new Promise((resolve, reject) => {
+        let localStatus = this.$methodsTools.storageGet("exam");
+        if (localStatus) {
+          if (JSON.parse(localStatus).id == this.$route.query.id) {
+            this.$methodsTools.storageRemove("exam");
+          }
+        }
+        resolve();
+      });
+    },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
         this.$router.push({
@@ -1575,10 +1643,10 @@ export default {
           this.$message.warning("请设置每道题目的分值");
           return;
         }
-      }
-      if (Number(this.passScore) > Number(this.getAllpocis)) {
-        this.$message.warning("及格分数不得大于当前总分");
-        return;
+        if (Number(this.passScore) > Number(this.getAllpocis)) {
+          this.$message.warning("及格分数不得大于当前总分");
+          return;
+        }
       }
       this.tableData = this.boxtableDataPags;
       this.diansBoxStatus = false;

+ 4 - 1
src/views/resource/bankManagement/testPaperManagement/editPaper/baseEditPaper/index.vue

@@ -43,7 +43,7 @@
             trigger="click"
             @show="showHandle"
             @hide="hideHandle"
-            :disabled="courType ? false : true"
+            :disabled="courType && newSujectOption.length ? false : true"
           >
             <el-radio-group v-model="sujectApis" class="dis_flexbox">
               <el-radio
@@ -64,6 +64,7 @@
               >
             </div>
             <el-button
+            disabled
               slot="reference"
               style="margin-left: 12px"
               @click="getMessage"
@@ -247,6 +248,8 @@ export default {
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
+      } else if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层级暂无关联科目");
       }
     },
     search() {

+ 143 - 29
src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue

@@ -32,6 +32,13 @@
           :disabled="!noStudent"
           >确定</el-button
         >
+        <el-button
+          size="small"
+          @click="returnDatas"
+          type="info"
+          v-if="draftBox.length"
+          >恢复草稿</el-button
+        >
       </div>
       <el-dialog
         width="1080px"
@@ -109,7 +116,7 @@
                   >
                   </el-option>
                 </el-select>
-                <el-button @click="addExam">自定义添加</el-button>
+                <!-- <el-button @click="addExam">自定义添加</el-button> -->
               </div>
 
               <el-radio-group
@@ -289,7 +296,7 @@
                   }}</span>
                   <div
                     class="editInfoSty"
-                    v-else-if="item.scope === 'editInfoHTML'"
+                    v-else-if="item.scope === 'editInfoHTMLs'"
                   >
                     {{ getSimpleText(scope.row[item.prop]) }}
                   </div>
@@ -341,7 +348,7 @@
           <div class="dis_fos">
             <div>
               <div class="margin_bs">当前总分:{{ getAllpocis }}</div>
-              <div class="margin_bs">
+              <div class="margin_bs" v-if="examsType === 2">
                 及格分数:<el-input-number
                   style="margin: 0px 6px; width: 100px !important"
                   v-model="passScore"
@@ -461,7 +468,7 @@
                   }}</span>
                   <div
                     class="editInfoSty"
-                    v-else-if="item.scope === 'editInfoHTML'"
+                    v-else-if="item.scope === 'editInfoHTMLs'"
                   >
                     {{ getSimpleText(scope.row[item.prop]) }}
                   </div>
@@ -706,6 +713,7 @@ export default {
           label: "题目编码",
           prop: "code",
           hidden: true,
+          width: "120px",
         },
         {
           label: "题型",
@@ -717,6 +725,7 @@ export default {
           label: "标题前缀",
           prop: "prefixName",
           hidden: true,
+          width: "160px",
         },
         {
           label: "知识点",
@@ -730,7 +739,8 @@ export default {
           label: "题目内容",
           prop: "content",
           hidden: true,
-          scope: "editInfoHTML",
+          scope: "editInfoHTMLs",
+          width: "320px",
         },
 
         {
@@ -806,16 +816,19 @@ export default {
           prop: "type",
           hidden: true,
           scope: "topic",
+          width: "120px",
         },
         {
           label: "题目编码",
           prop: "code",
           hidden: true,
+          width: "120px",
         },
         {
           label: "标题前缀",
           prop: "prefixName",
           hidden: true,
+          width: "160px",
         },
         {
           label: "知识点",
@@ -828,7 +841,8 @@ export default {
           label: "题目标题",
           prop: "content",
           hidden: true,
-          scope: "editInfoHTML",
+          scope: "editInfoHTMLs",
+          width: "320px",
         },
         {
           label: "发布状态",
@@ -855,23 +869,27 @@ export default {
           prop: "type",
           hidden: true,
           scope: "topic",
+          width: "120px",
         },
         {
           label: "标题前缀",
           prop: "prefixName",
           hidden: true,
+          width: "160px",
         },
         {
           label: "题目标题",
           prop: "content",
           hidden: true,
-          scope: "editInfoHTML",
+          scope: "editInfoHTMLs",
+          width: "320px",
         },
         {
           label: "发布状态",
           prop: "publishStatus",
           hidden: true,
           scope: "Status",
+          width: "120px",
         },
         {
           label: "分值",
@@ -906,6 +924,10 @@ export default {
       examsType: 1,
       businObj: {}, //当前业务层次
       noStudent: true,
+      draftBox: [], //草稿箱
+      copytableData: [],
+      localStart: false, //定时器是否已经开始
+      pageId: "", //试卷ID
     };
   },
   computed: {
@@ -943,16 +965,45 @@ export default {
     tableData: {
       handler(newVal, oldVal) {
         this.navText.index = newVal.length;
+        /**
+         * 定时器触发机制 防止内存浪费
+         */
+        if (newVal.length) {
+          var a = JSON.stringify(this.tableData);
+          var b = JSON.stringify(this.copytableData);
+          if (a != b) {
+            if (!this.localStart) {
+              this.localStart = true;
+              this.setInterFunc();
+            }
+          }
+        }
       },
       // 立即处理 进入页面就触发
       immediate: true,
     },
+    $route: {
+      handler(val, oldval) {
+        this.localStart = false;
+      },
+      // 深度观察监听
+      deep: true,
+    },
+  },
+  created() {
+    this.pageId = this.$route.query.id;
   },
   async mounted() {
+    let localStatus = this.$methodsTools.storageGet("exam");
+    if (localStatus) {
+      if (JSON.parse(localStatus).id == this.pageId) {
+        let cst = JSON.parse(localStatus);
+        this.draftBox = cst.data;
+      }
+    }
     this.$api
       .gradecheckGoodsChange({ examId: this.$route.query.id })
       .then((res) => {
-        console.log(res.data);
         if (res.data > 0) {
           this.noStudent = false;
         }
@@ -962,7 +1013,47 @@ export default {
     this.changeAmdis();
     this.search();
   },
+  beforeDestroy() {
+    this.localStart = false;
+  },
   methods: {
+    /**
+     *
+     */
+    returnDatas() {
+      this.$confirm(
+        "点击【恢复】后,当前页面的数据,恢复为【上一次的操作行为数据】,请慎重使用。 ",
+        "提示",
+        {
+          confirmButtonText: "恢复",
+          cancelButtonText: "取消",
+          type: "warning",
+        }
+      )
+        .then(() => {
+          this.tableData = JSON.parse(JSON.stringify(this.draftBox));
+          this.$message({
+            type: "success",
+            message: "已恢复!",
+          });
+        })
+        .catch(() => {});
+    },
+    setInterFunc() {
+      var arr = setInterval(() => {
+        if (!this.localStart) {
+          clearInterval(arr);
+          return;
+        }
+        this.$methodsTools.storageSet(
+          "exam",
+          JSON.stringify({
+            id: this.pageId,
+            data: this.tableData,
+          })
+        );
+      }, 1500);
+    },
     getInfos() {
       this.$api.obtainbankexam(this.$route.query.id).then((res) => {
         this.businObj = {
@@ -993,17 +1084,18 @@ export default {
           res.data.map((item) => {
             item.optionsList = JSON.parse(item.jsonStr);
           });
+          this.copytableData = JSON.parse(JSON.stringify(res.data));
+          this.boxtableDataPags = JSON.parse(JSON.stringify(res.data));
           this.tableData = res.data;
-          // this.total = res.total;
           this.navText.index = res.total;
         })
         .finally(() => {
           this.loading = false;
         });
     },
-    init() {
-      this.search();
-    },
+    // init() {
+    //   this.search();
+    // },
     del(v, index) {
       this.$alert(
         "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
@@ -1147,7 +1239,7 @@ export default {
         self.innerVisiblePaperTopic = true;
         self.showHide = true;
         self.$nextTick(() => {
-          (self.listNums = {
+          var data = {
             type: 1,
             optionsList: [],
             answerQuestionList: [],
@@ -1155,14 +1247,22 @@ export default {
             status: "",
             analysisContent: "",
             answerQuestion: "",
-          }),
-            //   (self.$refs.sujects.eduType = "");
-            // self.$refs.sujects.courType = "";
-            // self.$refs.sujects.sujectApis = [];
-            // self.$refs.sujects.newSujectApis = [];
-            (self.listData = {
-              publishStatus: 1,
+          };
+          for (let i = 0; i < 4; i++) {
+            data.optionsList.push({
+              content: "",
+              imgUrl: null,
+              optionsId: i + 1,
             });
+          }
+          self.listNums = data;
+          //   (self.$refs.sujects.eduType = "");
+          // self.$refs.sujects.courType = "";
+          // self.$refs.sujects.sujectApis = [];
+          // self.$refs.sujects.newSujectApis = [];
+          self.listData = {
+            publishStatus: 1,
+          };
           self.activeExam = [];
         });
       } else {
@@ -1212,7 +1312,6 @@ export default {
         self.listData.prefixName = vres.prefixName;
         self.listData.publishStatus = vres.publishStatus;
         self.listNums = vres;
-        console.log(vres, 5515);
         // var arrays = [];
         // vres.businessList.map((item) => {
         //   arrays.push(item.businessId + "-" + item.subjectId);
@@ -1496,9 +1595,11 @@ export default {
     },
     async submitTableAllInfos() {
       var self = this;
-      if (Number(this.passScore) > Number(this.getAllpocis)) {
-        this.$message.warning("及格分数不得大于当前总分,请重新设置分值");
-        return;
+      if (this.examsType === 2) {
+        if (Number(this.passScore) > Number(this.getAllpocis)) {
+          this.$message.warning("及格分数不得大于当前总分,请重新设置分值");
+          return;
+        }
       }
       for (let i = 0; i < this.tableData.length; i++) {
         if (!this.tableData[i].sort && this.tableData[i].sort !== 0) {
@@ -1547,8 +1648,10 @@ export default {
         data.answerNum = this.djNum;
       }
       this.$api.editbankexam(data).then((res) => {
+        this.localStart = false;
         this.$message.success("修改成功");
-        setTimeout(() => {
+        setTimeout(async () => {
+          await this.removeInfo();
           this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
             this.$router.push({
               path: "testPaperManagement",
@@ -1557,6 +1660,17 @@ export default {
         }, 500);
       });
     },
+    removeInfo() {
+      return new Promise((resolve, reject) => {
+        let localStatus = this.$methodsTools.storageGet("exam");
+        if (localStatus) {
+          if (JSON.parse(localStatus).id == this.$route.query.id) {
+            this.$methodsTools.storageRemove("exam");
+          }
+        }
+        resolve();
+      });
+    },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
         this.$router.push({
@@ -1588,10 +1702,10 @@ export default {
           this.$message.warning("请设置每道题目的分值");
           return;
         }
-      }
-      if (Number(this.passScore) > Number(this.getAllpocis)) {
-        this.$message.warning("及格分数不得大于当前总分");
-        return;
+        if (Number(this.passScore) > Number(this.getAllpocis)) {
+          this.$message.warning("及格分数不得大于当前总分");
+          return;
+        }
       }
       this.tableData = this.boxtableDataPags;
       this.diansBoxStatus = false;

+ 7 - 4
src/views/resource/bankManagement/testPaperManagement/index.vue

@@ -116,17 +116,20 @@ export default {
           label: "试卷编码",
           prop: "code",
           hidden: true,
+          width:"120px"
         },
         {
           label: "名称前缀",
           prop: "prefixName",
           hidden: true,
+          width:"180px"
         },
         {
           label: "试卷名称",
           prop: "examName",
           hidden: true,
           scope: "editInfo",
+          width:"310px"
         },
         {
           label: "适用业务层级",
@@ -136,7 +139,7 @@ export default {
           prop4: "subjectName",
           hidden: true,
           scope: "eduTypes",
-          width: "230px",
+          width: "360px",
         },
         {
           label: "发布状态",
@@ -149,14 +152,14 @@ export default {
           prop: "updateTime",
           hidden: true,
           scope: "aTimeList",
-          width: "160",
+          width: "160px",
         },
         {
           label: "创建时间",
           prop: "createTime",
           hidden: true,
           scope: "aTimeList",
-          width: "160",
+          width: "160px",
         },
         {
           label: "关联商品",
@@ -164,7 +167,7 @@ export default {
           prop1: "goodsName",
           hidden: true,
           scope: "aboutChapter",
-          width: "150",
+          width: "320px",
           int: 6,
         },
       ],

+ 51 - 5
src/views/resource/bankManagement/topicManagement/index.vue

@@ -118,7 +118,7 @@
                 >
                 </el-option>
               </el-select>
-              <el-button @click="addExam">自定义添加</el-button>
+              <!-- <el-button @click="addExam">自定义添加</el-button> -->
             </div>
 
             <el-radio-group
@@ -260,6 +260,25 @@ export default {
           placeholder: "题目类型",
           scope: "selectBank",
         },
+        {
+          prop: "publishStatus",
+          placeholder: "发布状态",
+          scope: "select",
+          options: [
+            {
+              label: "已发布",
+              value: 1,
+            },
+            {
+              label: "未发布",
+              value: 0,
+            },
+          ],
+        },
+        {
+          prop: "key",
+          placeholder: "请输入题目编码/题目标题",
+        },
       ],
       formData: {
         status: "0,1",
@@ -272,17 +291,20 @@ export default {
           label: "题目编码",
           prop: "code",
           hidden: true,
+          width: "120px",
         },
         {
           label: "标题前缀",
           prop: "prefixName",
           hidden: true,
+          width: "160px",
         },
         {
           label: "题目标题",
           prop: "content",
           hidden: true,
           scope: "editInfoHTML",
+          width: "280px",
         },
         {
           label: "题目类型",
@@ -303,7 +325,23 @@ export default {
           prop: "businessList",
           hidden: true,
           scope: "mapTypesMores",
-          width: "400",
+          width: "360px",
+        },
+        {
+          label: "发布状态",
+          prop: "publishStatus",
+          hidden: true,
+          scope: "isOptions",
+          options: [
+            {
+              label: "已发布",
+              value: 1,
+            },
+            {
+              label: "未发布",
+              value: 0,
+            },
+          ],
         },
         {
           label: "关联试卷",
@@ -311,7 +349,7 @@ export default {
           prop1: "examName",
           hidden: true,
           scope: "aboutChapter",
-          width: "150",
+          width: "240",
           int: 5,
         },
       ],
@@ -472,7 +510,7 @@ export default {
         self.innerVisiblePaperTopic = true;
         self.statusHide = true;
         self.$nextTick(() => {
-          self.listNums.push({
+          var datas = {
             type: 1,
             optionsList: [],
             answerQuestionList: [],
@@ -480,7 +518,15 @@ export default {
             status: "",
             analysisContent: "",
             answerQuestion: "",
-          });
+          };
+          for (let i = 0; i < 4; i++) {
+            datas.optionsList.push({
+              content: "",
+              imgUrl: null,
+              optionsId: i + 1,
+            });
+          }
+          self.listNums = [datas];
           self.$refs.sujects.eduType = "";
           self.$refs.sujects.courType = "";
           self.options = [];

+ 9 - 7
src/views/resource/baseManageInfos/resource/businessLevel/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div id="businessLevel">
     <table-list
-      ref="tablieListmest"
+      rowKey="id"
+      ref="tableList"
       :tableSets="tableSet"
       :tableData="tableData"
       :navText="navText"
@@ -231,6 +232,7 @@ export default {
         num: true,
         choice: true,
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: true,
           title: "配置下单填选模板",
@@ -377,9 +379,8 @@ export default {
   },
   methods: {
     submitLearn() {
-      console.log(this.learningOrder);
       this.disabledBtn = true;
-      if (!this.$refs.tablieListmest.allCheckData.length) {
+      if (!this.$refs.tableList.allCheckData.length) {
         this.$message.warning("请勾选需要配置的业务层次");
         this.disabledBtn = false;
         return;
@@ -389,7 +390,7 @@ export default {
         this.disabledBtn = false;
         return;
       }
-      var ast = this.$refs.tablieListmest.allCheckData.map((item) => {
+      var ast = this.$refs.tableList.allCheckData.map((item) => {
         return item.id;
       });
       this.$api
@@ -399,9 +400,9 @@ export default {
         })
         .then((res) => {
           this.$message.success("配置成功");
-          this.$refs.tablieListmest.allCheckData = [];
           this.learningOrder = "";
           this.dialogVisibleSet = false;
+          this.$refs.tableList.clearMoreActive();
           this.search();
         })
         .catch(() => {
@@ -409,7 +410,7 @@ export default {
         });
     },
     setOptions() {
-      if (!this.$refs.tablieListmest.allCheckData.length) {
+      if (!this.$refs.tableList.allCheckData.length) {
         this.$message.warning("请勾选需要配置的业务层次");
         return;
       }
@@ -469,7 +470,7 @@ export default {
           this.dialogVisiblePZDown = false;
           this.activeLists = [];
           this.radioActives = "";
-          this.$refs.tablieListmest.allCheckData = [];
+          this.$refs.tableList.clearMoreActive();
           this.search();
         })
         .catch(() => {
@@ -564,6 +565,7 @@ export default {
           };
           this.$api.editCourseBusiness(data).then((res) => {
             this.$message.success("删除成功");
+            this.$refs.tableList.clearMoreActive();
             this.$store.commit("BUSINESSLEVEL");
             this.search();
           });

+ 60 - 3
src/views/resource/handoutManagement/handoutList/add/index.vue

@@ -44,7 +44,17 @@
             @hide="hideHandle"
             :disabled="courType ? false : true"
           >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            <el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -146,9 +156,11 @@
 
 <script>
 export default {
-  name:"HandoutListAdd",
+  name: "HandoutListAdd",
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       blob: "", //pdf本地路径
       handoutsUrlLive: false, //是否存在PDF
       //   弹窗数据
@@ -173,7 +185,7 @@ export default {
         handoutsName: [
           { required: true, message: "请输入讲义标题", trigger: "blur" },
         ],
-        canDownload:[
+        canDownload: [
           { required: true, message: "请选择是否可下载", trigger: "change" },
         ],
         status: [
@@ -203,6 +215,45 @@ export default {
     this.getDict();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     changeTypes() {
       var self = this;
       var arrays = [];
@@ -255,9 +306,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers.doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     hideHandle() {},
     getDict() {

+ 75 - 15
src/views/resource/handoutManagement/handoutList/edit/index.vue

@@ -43,7 +43,17 @@
             @hide="hideHandle"
             :disabled="courType ? false : true"
           >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            <el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -149,9 +159,11 @@
 
 <script>
 export default {
-  name:"HandoutListEdit",
+  name: "HandoutListEdit",
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       blob: "", //pdf本地路径
       handoutsUrlLive: false, //是否存在PDF
       changeHeight: true,
@@ -209,20 +221,62 @@ export default {
     this.search();
   },
   methods: {
-    search() {
-      this.$api.obtainCourseHandouts(this.$route.query.id).then((res) => {
-        this.bfImg = res.data.handoutsUrl;
-        this.listData = res.data;
-        if (res.data.courseHandoutsBusinessVo) {
-          var arrays = [];
-          res.data.courseHandoutsBusinessVo.map((item) => {
-            arrays.push(item.businessId + "-" + item.subjectId);
-          });
-          this.sujectApis = arrays;
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
         }
-      }).finally(()=>{
-        this.$modal.closeLoading();
-      })
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
+    search() {
+      this.$api
+        .obtainCourseHandouts(this.$route.query.id)
+        .then((res) => {
+          this.bfImg = res.data.handoutsUrl;
+          this.listData = res.data;
+          if (res.data.courseHandoutsBusinessVo) {
+            var arrays = [];
+            res.data.courseHandoutsBusinessVo.map((item) => {
+              arrays.push(item.businessId + "-" + item.subjectId);
+            });
+            this.sujectApis = arrays;
+          }
+        })
+        .finally(() => {
+          this.$modal.closeLoading();
+        });
     },
     clearImgs() {
       this.listData.handoutsUrl = undefined;
@@ -280,9 +334,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers.doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     hideHandle() {},
     getDict() {

+ 4 - 1
src/views/resource/handoutManagement/handoutList/index.vue

@@ -108,25 +108,28 @@ export default {
           label: "讲义编码",
           prop: "encoder",
           hidden: true,
+          width: "140px",
         },
         {
           label: "讲义标题",
           prop: "handoutsName",
           hidden: true,
           scope: "editInfo",
+          width: "300px",
         },
         {
           label: "适用业务层级",
           prop: "courseHandoutsBusinessVo",
           hidden: true,
           scope: "mapTypesMores",
-          width: "400",
+          width: "340px",
         },
         {
           label: "是否可下载",
           prop: "canDownload",
           hidden: true,
           scope: "isOptions",
+          width: "120px",
           options: [
             {
               label: "是",

+ 112 - 34
src/views/resource/videoManagement/chapter/add/index.vue

@@ -43,7 +43,17 @@
             @hide="hideHandle"
             :disabled="courType ? false : true"
           >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            <el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -94,43 +104,58 @@
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
+          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
         </el-form-item>
         <el-form-item label="章标题" prop="name">
           <el-input v-model="listData.name"></el-input>
+          <div style="color: #999">
+            注:请尽量规范易懂,方便在课程目录表呈现给学员
+          </div>
         </el-form-item>
 
         <el-form-item label="章封面">
-          <div class="imgBoxins">
-            <img :src="$methodsTools.splitImgHost(listData.coverUrl)" alt="" />
-            <div
-              class="posimg"
-              v-if="
-                listData.coverUrl === null ||
-                listData.coverUrl === '' ||
-                listData.coverUrl === undefined
-              "
-            >
-              <label for="uplose">
-                <i class="el-icon-circle-plus-outline iconStsz"></i
-              ></label>
-              <input
-                ref="file"
-                type="file"
-                style="display: none"
-                id="uplose"
-                @change="getImgFile"
-              />
-              <p>
-                注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-              </p>
-            </div>
-          </div>
+          <el-row :gutter="10" style="margin-bottom: 10px">
+            <el-col :span="12">
+              <div
+                style="
+                  width: 100%;
+                  height: 150px;
+                  border: 2px dashed #999;
+                  border-radius: 28px;
+                  line-height: 150px;
+                  text-align: center;
+                "
+                v-if="!listData.coverUrl"
+              >
+                <label for="uplose">
+                  <i class="el-icon-circle-plus-outline iconStsz"></i
+                ></label>
+                <input
+                  ref="file"
+                  type="file"
+                  style="display: none"
+                  id="uplose"
+                  @change="getImgFile"
+                />
+              </div>
+              <el-image
+                v-else
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(listData.coverUrl),
+                ]"
+              >
+              </el-image>
+            </el-col>
+            <el-col :span="11">
+              <span style="color: #999; font-size: 14px"
+                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+              >
+            </el-col>
+          </el-row>
           <el-button
-            v-if="
-              listData.coverUrl !== null &&
-              listData.coverUrl !== '' &&
-              listData.coverUrl !== undefined
-            "
+            v-if="listData.coverUrl"
             type="danger"
             size="mini"
             class="margin-top: 20px;"
@@ -337,6 +362,8 @@ export default {
   name: "ChapterAdd",
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       //   弹窗数据
       changeHeight: true,
       bfImg: "oss/images/avatar/20211013/1634097664410_1397766697",
@@ -375,9 +402,9 @@ export default {
       minTimeAll: 0, //总时长
       tableSet: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
-        { label: "节编码", prop: "code" },
-        { label: "标题前缀", prop: "prefixName", width: "120" },
-        { label: "节标题", prop: "name" },
+        { label: "节编码", prop: "code", width: "120" },
+        { label: "标题前缀", prop: "prefixName", width: "160" },
+        { label: "节标题", prop: "name", width: "210" },
         { label: "节类型", prop: "sectionType", scope: "types" },
         {
           label: "发布状态",
@@ -401,6 +428,12 @@ export default {
           scope: "businessLevel",
           edu: "educationTypeId",
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         {
           prop: "sectionType",
           placeholder: "节类型",
@@ -448,6 +481,45 @@ export default {
     // this.search();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
@@ -574,9 +646,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers.doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     hideHandle() {},
     getDict() {

+ 112 - 34
src/views/resource/videoManagement/chapter/edit/index.vue

@@ -43,7 +43,17 @@
             @hide="hideHandle"
             :disabled="courType ? false : true"
           >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            <el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -93,43 +103,58 @@
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
+          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
         </el-form-item>
         <el-form-item label="章标题" prop="name">
           <el-input v-model="listData.name"></el-input>
+          <div style="color: #999">
+            注:请尽量规范易懂,方便在课程目录表呈现给学员
+          </div>
         </el-form-item>
 
         <el-form-item label="章封面">
-          <div class="imgBoxins">
-            <img :src="$methodsTools.splitImgHost(listData.coverUrl)" alt="" />
-            <div
-              class="posimg"
-              v-if="
-                listData.coverUrl === null ||
-                listData.coverUrl === '' ||
-                listData.coverUrl === undefined
-              "
-            >
-              <label for="uplose">
-                <i class="el-icon-circle-plus-outline iconStsz"></i
-              ></label>
-              <input
-                ref="file"
-                type="file"
-                style="display: none"
-                id="uplose"
-                @change="getImgFile"
-              />
-              <p>
-                注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-              </p>
-            </div>
-          </div>
+          <el-row :gutter="10" style="margin-bottom: 10px">
+            <el-col :span="12">
+              <div
+                style="
+                  width: 100%;
+                  height: 150px;
+                  border: 2px dashed #999;
+                  border-radius: 28px;
+                  line-height: 150px;
+                  text-align: center;
+                "
+                v-if="!listData.coverUrl"
+              >
+                <label for="uplose">
+                  <i class="el-icon-circle-plus-outline iconStsz"></i
+                ></label>
+                <input
+                  ref="file"
+                  type="file"
+                  style="display: none"
+                  id="uplose"
+                  @change="getImgFile"
+                />
+              </div>
+              <el-image
+                v-else
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(listData.coverUrl),
+                ]"
+              >
+              </el-image>
+            </el-col>
+            <el-col :span="11">
+              <span style="color: #999; font-size: 14px"
+                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+              >
+            </el-col>
+          </el-row>
           <el-button
-            v-if="
-              listData.coverUrl !== null &&
-              listData.coverUrl !== '' &&
-              listData.coverUrl !== undefined
-            "
+            v-if="listData.coverUrl"
             type="danger"
             size="mini"
             class="margin-top: 20px;"
@@ -341,6 +366,8 @@ export default {
   name: "ChapterEdit",
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       //   弹窗数据
       changeHeight: true,
       bfImg: "oss/images/avatar/20211013/1634097664410_1397766697",
@@ -378,9 +405,9 @@ export default {
       minTimeAll: 0, //总时长
       tableSet: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
-        { label: "节编码", prop: "code" },
-        { label: "标题前缀", prop: "prefixName", width: "120" },
-        { label: "节标题", prop: "name" },
+        { label: "节编码", prop: "code", width: "120" },
+        { label: "标题前缀", prop: "prefixName", width: "160" },
+        { label: "节标题", prop: "name", width: "210" },
         { label: "节类型", prop: "sectionType", scope: "types" },
         {
           label: "发布状态",
@@ -404,6 +431,12 @@ export default {
           scope: "businessLevel",
           edu: "educationTypeId",
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         {
           prop: "sectionType",
           placeholder: "节类型",
@@ -461,6 +494,45 @@ export default {
     this.search();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
@@ -592,9 +664,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers.doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     hideHandle() {},
     getDict() {

+ 5 - 4
src/views/resource/videoManagement/chapter/index.vue

@@ -116,21 +116,21 @@ export default {
           label: "标题前缀",
           prop: "prefixName",
           hidden: true,
-          width: "120",
+          width: "200",
         },
         {
           label: "章标题",
           prop: "name",
           hidden: true,
           scope: "editInfo",
-          width: "120",
+          width: "260",
         },
         {
           label: "适用业务层级",
           prop: "businessList",
           hidden: true,
           scope: "mapTypesMores",
-          width: "240",
+          width: "340",
         },
         {
           label: "关联模块",
@@ -138,7 +138,7 @@ export default {
           prop1: "moduleName",
           hidden: true,
           scope: "aboutChapter",
-          width: "150",
+          width: "200",
           int: 2,
         },
         // {
@@ -150,6 +150,7 @@ export default {
           label: "节总数",
           prop: "sectionNum",
           hidden: true,
+          width:"100px",
         },
         {
           label: "学习时长",

+ 66 - 46
src/views/resource/videoManagement/courseManagement/basicInfoAdd/index.vue

@@ -89,43 +89,57 @@
         </el-form-item>
         <el-form-item label="名称前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
+          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
         </el-form-item>
         <el-form-item label="课程名称" prop="courseName">
           <el-input v-model="listData.courseName"></el-input>
+          <div style="color: #999">
+            注:请尽量规范易懂,方便在课程目录表呈现给学员
+          </div>
         </el-form-item>
-
         <el-form-item label="课程封面">
-          <div class="imgBoxins">
-            <img :src="$methodsTools.splitImgHost(listData.coverUrl)" alt="" />
-            <div
-              class="posimg"
-              v-if="
-                listData.coverUrl === null ||
-                listData.coverUrl === '' ||
-                listData.coverUrl === undefined
-              "
-            >
-              <label for="uplose">
-                <i class="el-icon-circle-plus-outline iconStsz"></i
-              ></label>
-              <input
-                ref="file"
-                type="file"
-                style="display: none"
-                id="uplose"
-                @change="getImgFile"
-              />
-              <p>
-                注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-              </p>
-            </div>
-          </div>
+          <el-row :gutter="10" style="margin-bottom: 10px">
+            <el-col :span="12">
+              <div
+                style="
+                  width: 100%;
+                  height: 150px;
+                  border: 2px dashed #999;
+                  border-radius: 28px;
+                  line-height: 150px;
+                  text-align: center;
+                "
+                v-if="!listData.coverUrl"
+              >
+                <label for="uplose">
+                  <i class="el-icon-circle-plus-outline iconStsz"></i
+                ></label>
+                <input
+                  ref="file"
+                  type="file"
+                  style="display: none"
+                  id="uplose"
+                  @change="getImgFile"
+                />
+              </div>
+              <el-image
+                v-else
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(listData.coverUrl),
+                ]"
+              >
+              </el-image>
+            </el-col>
+            <el-col :span="11">
+              <span style="color: #999; font-size: 14px"
+                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+              >
+            </el-col>
+          </el-row>
           <el-button
-            v-if="
-              listData.coverUrl !== null &&
-              listData.coverUrl !== '' &&
-              listData.coverUrl !== undefined
-            "
+            v-if="listData.coverUrl"
             type="danger"
             size="mini"
             class="margin-top: 20px;"
@@ -442,17 +456,19 @@ export default {
       this.$api.addCourse(this.listData).then((res) => {
         this.$message.success("新增成功");
         setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((rest) => {
-            this.$router
-              .replace({
-                path: "chapterContent",
-                query: {
-                  id: res.data,
-                  status: "add",
-                },
-              })
-              .catch((err) => {});
-          });
+          this.$store
+            .dispatch("tagsView/exitView", this.$route)
+            .then((rest) => {
+              this.$router
+                .replace({
+                  path: "chapterContent",
+                  query: {
+                    id: res.data,
+                    status: "add",
+                  },
+                })
+                .catch((err) => {});
+            });
         }, 300);
       });
     },
@@ -539,11 +555,15 @@ export default {
   flex-wrap: wrap;
 }
 .imgBoxins {
-  width: 375px;
-  height: 220px;
+  display: flex;
   text-align: center;
-  img {
-    height: 100%;
+  .uploadImgBox {
+    width: 375px;
+    height: 220px;
+    .img {
+      width: 100%;
+      height: 100%;
+    }
   }
 }
 .iconStsz {

+ 43 - 30
src/views/resource/videoManagement/courseManagement/basicInfoEdit/index.vue

@@ -91,43 +91,56 @@
         </el-form-item>
         <el-form-item label="名称前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
+          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
         </el-form-item>
         <el-form-item label="课程名称" prop="courseName">
           <el-input v-model="listData.courseName"></el-input>
+          <div style="color: #999">注:请尽量规范易懂,方便在课程目录表呈现给学员</div>
         </el-form-item>
 
         <el-form-item label="课程封面">
-          <div class="imgBoxins">
-            <img :src="$methodsTools.splitImgHost(listData.coverUrl)" alt="" />
-            <div
-              class="posimg"
-              v-if="
-                listData.coverUrl === null ||
-                listData.coverUrl === '' ||
-                listData.coverUrl === undefined
-              "
-            >
-              <label for="uplose">
-                <i class="el-icon-circle-plus-outline iconStsz"></i
-              ></label>
-              <input
-                ref="file"
-                type="file"
-                style="display: none"
-                id="uplose"
-                @change="getImgFile"
-              />
-              <p>
-                注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-              </p>
-            </div>
-          </div>
+          <el-row :gutter="10" style="margin-bottom: 10px">
+            <el-col :span="12">
+              <div
+                style="
+                  width: 100%;
+                  height: 150px;
+                  border: 2px dashed #999;
+                  border-radius: 28px;
+                  line-height: 150px;
+                  text-align: center;
+                "
+                v-if="!listData.coverUrl"
+              >
+                <label for="uplose">
+                  <i class="el-icon-circle-plus-outline iconStsz"></i
+                ></label>
+                <input
+                  ref="file"
+                  type="file"
+                  style="display: none"
+                  id="uplose"
+                  @change="getImgFile"
+                />
+              </div>
+              <el-image
+                v-else
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(listData.coverUrl),
+                ]"
+              >
+              </el-image>
+            </el-col>
+            <el-col :span="11">
+              <span style="color: #999; font-size: 14px"
+                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+              >
+            </el-col>
+          </el-row>
           <el-button
-            v-if="
-              listData.coverUrl !== null &&
-              listData.coverUrl !== '' &&
-              listData.coverUrl !== undefined
-            "
+            v-if="listData.coverUrl"
             type="danger"
             size="mini"
             class="margin-top: 20px;"

+ 9 - 7
src/views/resource/videoManagement/courseManagement/chapterContent/index.vue

@@ -250,7 +250,7 @@
     </el-dialog>
     <el-dialog
       :visible.sync="dialogVisiblePZDown"
-      width="900px"
+      width="1100px"
       :show-close="false"
       :close-on-click-modal="false"
     >
@@ -309,7 +309,7 @@
                     scope.row[item.prop3]
                   }}
                 </span>
-                <span v-else-if="item.prop === 'status'">{{
+                <span v-else-if="item.scope === 'status'">{{
                   scope.row[item.prop] === 1
                     ? "发布"
                     : scope.row[item.prop] === 0
@@ -353,14 +353,17 @@ export default {
         {
           label: "试卷编码",
           prop: "code",
+          width:"120px"
         },
         {
           label: "标题前缀",
           prop: "prefixName",
+          width:"160px"
         },
         {
           label: "试卷标题",
           prop: "examName",
+          width:"300px"
         },
         {
           label: "业务层级",
@@ -368,7 +371,7 @@ export default {
           prop2: "projectName",
           prop3: "businessName",
           scope: "moreList",
-          width: "250px",
+          width: "300px",
         },
         {
           label: "发布状态",
@@ -415,14 +418,13 @@ export default {
       tableData: [],
       tableDataInfos: [],
       tableSet: [
-        { label: "编码", prop: "code" },
-        { label: "标题前缀", prop: "prefixName", width: "120" },
-        { label: "标题", prop: "moduleName", prop1: "name", scope: "teshu" },
+        { label: "编码", prop: "code", width: "120" },
+        { label: "标题前缀", prop: "prefixName", width: "160" },
+        { label: "标题", prop: "moduleName", prop1: "name", scope: "teshu", width: "300" },
         {
           label: "发布状态",
           prop: "publishStatus",
           scope: "Status",
-          width: "120",
         },
       ],
       dialogVisible: false,

+ 14 - 7
src/views/resource/videoManagement/courseManagement/index.vue

@@ -123,21 +123,24 @@ export default {
       },
       // 表单
       tableSet: [
+        {
+          label: "课程编码",
+          prop: "code",
+          hidden: true,
+          width: "120px",
+        },
         {
           label: "名称前缀",
           prop: "prefixName",
           hidden: true,
+          width: "180px",
         },
         {
           label: "课程名称",
           prop: "courseName",
           hidden: true,
           scope: "editInfo",
-        },
-        {
-          label: "课程编码",
-          prop: "code",
-          hidden: true,
+          width: "260px",
         },
         {
           label: "科目",
@@ -153,19 +156,21 @@ export default {
           label: "院校",
           prop: "schoolName",
           hidden: true,
+          width: "120px",
         },
         {
           label: "业务层次",
           prop1: "projectName",
           prop2: "businessName",
           hidden: true,
-          width: "240px",
+          width: "340px",
           scope: "InfoMore",
         },
         {
           label: "教育类型",
           prop: "educationName",
           hidden: true,
+          width: "140px",
         },
         {
           label: "发布状态",
@@ -178,12 +183,14 @@ export default {
           prop: "updateTime",
           scope: "aTimeList",
           hidden: true,
+          width: "160px",
         },
         {
           label: "创建时间",
           prop: "createTime",
           scope: "aTimeList",
           hidden: true,
+          width: "160px",
         },
         {
           label: "课程章节",
@@ -197,7 +204,7 @@ export default {
           hidden: true,
           prop: "goodsList",
           prop1: "goodsName",
-          width: "150px",
+          width: "210px",
           scope: "aboutChapter",
           int: 4,
         },

+ 108 - 36
src/views/resource/videoManagement/festival/add/index.vue

@@ -43,7 +43,17 @@
             @hide="hideHandle"
             :disabled="courType ? false : true"
           >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            <el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -94,9 +104,13 @@
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
+          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
         </el-form-item>
         <el-form-item label="节标题" prop="name">
           <el-input v-model="listData.name"></el-input>
+          <div style="color: #999">
+            注:请尽量规范易懂,方便在课程目录表呈现给学员
+          </div>
         </el-form-item>
         <el-form-item label="节类型">
           <el-select
@@ -113,15 +127,15 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="直播地址" v-if="listData.sectionType === 2">
+        <el-form-item label="直播地址" v-if="listData.sectionType === 2">
           <el-input
             style="width: 300px"
             v-model="listData.liveUrl"
-            placeholder="请输入直播地址"
+            placeholder="请输入直播地址"
           ></el-input>
           <el-select
             v-model="newActiveLiveUrl"
-            placeholder="快捷选中直播地址"
+            placeholder="快捷选中直播地址"
             @change="changeLiveUrl"
           >
             <el-option
@@ -243,37 +257,48 @@
           </el-time-picker>
         </el-form-item>
         <el-form-item label="节封面">
-          <div class="imgBoxins">
-            <img :src="$methodsTools.splitImgHost(listData.coverUrl)" alt="" />
-            <div
-              class="posimg"
-              v-if="
-                listData.coverUrl === null ||
-                listData.coverUrl === '' ||
-                listData.coverUrl === undefined
-              "
-            >
-              <label for="uplose">
-                <i class="el-icon-circle-plus-outline iconStsz"></i
-              ></label>
-              <input
-                ref="file"
-                type="file"
-                style="display: none"
-                id="uplose"
-                @change="getImgFile"
-              />
-              <p>
-                注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-              </p>
-            </div>
-          </div>
+          <el-row :gutter="10" style="margin-bottom: 10px">
+            <el-col :span="12">
+              <div
+                style="
+                  width: 100%;
+                  height: 150px;
+                  border: 2px dashed #999;
+                  border-radius: 28px;
+                  line-height: 150px;
+                  text-align: center;
+                "
+                v-if="!listData.coverUrl"
+              >
+                <label for="uplose">
+                  <i class="el-icon-circle-plus-outline iconStsz"></i
+                ></label>
+                <input
+                  ref="file"
+                  type="file"
+                  style="display: none"
+                  id="uplose"
+                  @change="getImgFile"
+                />
+              </div>
+              <el-image
+                v-else
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(listData.coverUrl),
+                ]"
+              >
+              </el-image>
+            </el-col>
+            <el-col :span="11">
+              <span style="color: #999; font-size: 14px"
+                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+              >
+            </el-col>
+          </el-row>
           <el-button
-            v-if="
-              listData.coverUrl !== null &&
-              listData.coverUrl !== '' &&
-              listData.coverUrl !== undefined
-            "
+            v-if="listData.coverUrl"
             type="danger"
             size="mini"
             class="margin-top: 20px;"
@@ -342,6 +367,8 @@ export default {
   name: "FestivalAdd",
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
       vid: "",
       playerJs:
@@ -436,6 +463,45 @@ export default {
     this.getDict();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     compTimeOUT(start, end) {
       if (start && end) {
         if (end < start) {
@@ -576,9 +642,9 @@ export default {
        */
       uploadFile(file, this.fileSetting, (event) => {
         this.listData.recordingUrl = event.vid;
-        this.listData.durationTime = ''
+        this.listData.durationTime = "";
         this.getApiTime(event.vid);
-      })
+      });
     },
     getMessage() {
       if (!this.courType) {
@@ -702,9 +768,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers.doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     hideHandle() {},
     getDict() {

+ 109 - 36
src/views/resource/videoManagement/festival/edit/index.vue

@@ -43,7 +43,17 @@
             @hide="hideHandle"
             :disabled="courType ? false : true"
           >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            <el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -94,9 +104,13 @@
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
+          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
         </el-form-item>
         <el-form-item label="节标题" prop="name">
           <el-input v-model="listData.name"></el-input>
+          <div style="color: #999">
+            注:请尽量规范易懂,方便在课程目录表呈现给学员
+          </div>
         </el-form-item>
         <el-form-item label="节类型">
           <el-select
@@ -115,15 +129,15 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="直播地址" v-if="listData.sectionType === 2">
+        <el-form-item label="直播地址" v-if="listData.sectionType === 2">
           <el-input
             style="width: 300px"
             v-model="listData.liveUrl"
-            placeholder="请输入直播地址"
+            placeholder="请输入直播地址"
           ></el-input>
           <el-select
             v-model="newActiveLiveUrl"
-            placeholder="快捷选中直播地址"
+            placeholder="快捷选中直播地址"
             @change="changeLiveUrl"
           >
             <el-option
@@ -245,37 +259,48 @@
           </el-time-picker>
         </el-form-item>
         <el-form-item label="节封面">
-          <div class="imgBoxins">
-            <img :src="$methodsTools.splitImgHost(listData.coverUrl)" alt="" />
-            <div
-              class="posimg"
-              v-if="
-                listData.coverUrl === null ||
-                listData.coverUrl === '' ||
-                listData.coverUrl === undefined
-              "
-            >
-              <label for="uplose">
-                <i class="el-icon-circle-plus-outline iconStsz"></i
-              ></label>
-              <input
-                ref="file"
-                type="file"
-                style="display: none"
-                id="uplose"
-                @change="getImgFile"
-              />
-              <p>
-                注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-              </p>
-            </div>
-          </div>
+          <el-row :gutter="10" style="margin-bottom: 10px">
+            <el-col :span="12">
+              <div
+                style="
+                  width: 100%;
+                  height: 150px;
+                  border: 2px dashed #999;
+                  border-radius: 28px;
+                  line-height: 150px;
+                  text-align: center;
+                "
+                v-if="!listData.coverUrl"
+              >
+                <label for="uplose">
+                  <i class="el-icon-circle-plus-outline iconStsz"></i
+                ></label>
+                <input
+                  ref="file"
+                  type="file"
+                  style="display: none"
+                  id="uplose"
+                  @change="getImgFile"
+                />
+              </div>
+              <el-image
+                v-else
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(listData.coverUrl),
+                ]"
+              >
+              </el-image>
+            </el-col>
+            <el-col :span="11">
+              <span style="color: #999; font-size: 14px"
+                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+              >
+            </el-col>
+          </el-row>
           <el-button
-            v-if="
-              listData.coverUrl !== null &&
-              listData.coverUrl !== '' &&
-              listData.coverUrl !== undefined
-            "
+            v-if="listData.coverUrl"
             type="danger"
             size="mini"
             class="margin-top: 20px;"
@@ -294,7 +319,7 @@
           <el-button
             type="primary"
             @click="submit('listData')"
-            :disabled="noStudent"
+            :disabled="!noStudent"
             >确定</el-button
           >
         </el-form-item>
@@ -350,6 +375,8 @@ export default {
   name: "FestivalEdit",
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
       vid: "",
       playerJs:
@@ -388,7 +415,7 @@ export default {
         coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
       },
       newActiveLiveUrl: "",
-      newLiveUrl: [], //直播地址
+      newLiveUrl: [], //直播地址
       newActiveRecordingUrl1: "",
       newSteamUrl1: [], //录播流地址
       newActiveRecordingUrl2: "",
@@ -442,6 +469,45 @@ export default {
     this.getDict();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     compTimeOUT(start, end) {
       if (start && end) {
         if (end < start) {
@@ -749,9 +815,16 @@ export default {
         }
       }
       this.sujectArray = array;
+
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers.doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     hideHandle() {},
     async getDict() {

+ 31 - 18
src/views/resource/videoManagement/festival/index.vue

@@ -8,6 +8,8 @@
       @init="init"
     />
     <table-list
+      rowKey="sectionId"
+      ref="tableList"
       :tableSets="tableSet"
       :tableData="tableData"
       :navText="navText"
@@ -106,6 +108,7 @@ export default {
         num: true,
         border: true,
         choice: true,
+        openCheckMore: true,
         addHide: false,
         backFatherBtn: {
           status: false,
@@ -185,27 +188,27 @@ export default {
           label: "节编码",
           prop: "code",
           hidden: true,
-          width: "140",
+          width: "140px",
         },
         {
           label: "标题前缀",
           prop: "prefixName",
           hidden: true,
-          width: "120",
+          width: "200px",
         },
         {
           label: "节标题",
           prop: "name",
           hidden: true,
           scope: "editInfo",
-          width: "120",
+          width: "260px",
         },
         {
           label: "适用业务层级",
           prop: "businessList",
           hidden: true,
           scope: "mapTypesMores",
-          width: "280",
+          width: "340px",
         },
         {
           label: "关联章",
@@ -213,7 +216,7 @@ export default {
           prop1: "chapterName",
           hidden: true,
           scope: "aboutChapter",
-          width: "150",
+          width: "200px",
           int: 1,
         },
         // {
@@ -236,23 +239,32 @@ export default {
           label: "节时长",
           prop: "durationTime",
           hidden: true,
-          width: "100",
-          scope:"convert",
+          width: "100px",
+          scope: "convert",
         },
         {
-          label: "直播开始时间",
-          prop: "liveStartTime",
-          hidden: true,
-          scope: "aTimeList",
-          width: "160",
-        },
-        {
-          label: "直播结束时间",
-          prop: "liveEndTime",
+          label: "URL地址/直播地址",
+          prop: "sectionType",
+          prop1:"recordingUrl",
+          prop2:"liveUrl",
           hidden: true,
-          scope: "aTimeList",
-          width: "160",
+          width: "280px",
+          scope: "liveAndUrl",
         },
+        // {
+        //   label: "直播开始时间",
+        //   prop: "liveStartTime",
+        //   hidden: true,
+        //   scope: "aTimeList",
+        //   width: "160",
+        // },
+        // {
+        //   label: "直播结束时间",
+        //   prop: "liveEndTime",
+        //   hidden: true,
+        //   scope: "aTimeList",
+        //   width: "160",
+        // },
         {
           label: "发布状态",
           prop: "publishStatus",
@@ -354,6 +366,7 @@ export default {
                 };
                 this.$api.editCourseSection(data).then((res) => {
                   this.$message.success("删除成功");
+                  this.$refs.tableList.clearMoreActive();
                   this.search();
                 });
               })

+ 143 - 55
src/views/resource/videoManagement/flow/index.vue

@@ -8,6 +8,8 @@
       @init="init"
     />
     <table-list
+      rowKey="id"
+      ref="tableList"
       :tableSets="tableSet"
       :tableData="tableData"
       :navText="navText"
@@ -16,6 +18,9 @@
       @editInfo="editInfo"
     >
       <template slot="customize">
+        <el-button size="small" type="warning" @click="PLDel"
+          >批量删除</el-button
+        >
         <el-button size="small" type="success" @click="moreActive"
           >同步BL频道</el-button
         >
@@ -131,7 +136,17 @@
                   trigger="click"
                   :disabled="eduType ? false : true"
                 >
-                  <el-checkbox-group v-model="cauType" class="checkboxSty">
+                  <el-checkbox
+                    v-model="checkAll"
+                    @change="handleCheckAllChange"
+                    :indeterminate="isIndeterminate"
+                    >全选</el-checkbox
+                  >
+                  <el-checkbox-group
+                    v-model="cauType"
+                    class="checkboxSty"
+                    @change="handleCheckedCitiesChange"
+                  >
                     <el-checkbox
                       v-for="(item, index) in itemOption2"
                       :label="item.id"
@@ -234,12 +249,12 @@
           </span>
         </el-tree>
       </div>
-      <div class="mat-TOP">
+      <!-- <div class="mat-TOP">
         <el-radio-group v-model="streamAddType">
           <el-radio :label="1">正式</el-radio>
           <el-radio :label="2">测试</el-radio>
         </el-radio-group>
-      </div>
+      </div> -->
       <span slot="footer" class="dialog-footer">
         <el-button @click="disBoxs = false">取 消</el-button>
         <el-button @click="submitForms" :loading="disabledBtn">确 定</el-button>
@@ -257,6 +272,8 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       disBoxs: false, //弹窗Bool
       changeHeight: true,
       loading: false, //当前表单加载是否加载动画
@@ -268,6 +285,7 @@ export default {
         border: true,
         choice: true,
         addHide: false,
+        openCheckMore: true,
         backFatherBtn: {
           status: false,
           title: "未定义",
@@ -302,8 +320,8 @@ export default {
           label: "适用业务层级",
           prop: "businessList",
           hidden: true,
-          scope: "mapTypes",
-          width: "240px",
+          scope: "mapTypesBUS",
+          width: "300px",
         },
         {
           label: "视频类型",
@@ -311,12 +329,12 @@ export default {
           hidden: true,
           scope: "sectionTypes",
         },
-        {
-          label: "流地址类型",
-          prop: "streamingAddressType",
-          hidden: true,
-          scope: "streamType",
-        },
+        // {
+        //   label: "流地址类型",
+        //   prop: "streamingAddressType",
+        //   hidden: true,
+        //   scope: "streamType",
+        // },
       ],
       tableData: [], //表单数据
       //搜索
@@ -351,21 +369,21 @@ export default {
             },
           ],
         },
-        {
-          prop: "streamingAddressType",
-          placeholder: "流地址类型",
-          scope: "select",
-          options: [
-            {
-              label: "正式",
-              value: 1,
-            },
-            {
-              label: "测试",
-              value: 2,
-            },
-          ],
-        },
+        // {
+        //   prop: "streamingAddressType",
+        //   placeholder: "流地址类型",
+        //   scope: "select",
+        //   options: [
+        //     {
+        //       label: "正式",
+        //       value: 1,
+        //     },
+        //     {
+        //       label: "测试",
+        //       value: 2,
+        //     },
+        //   ],
+        // },
         {
           prop: "streamingName",
           placeholder: "请输入流地址名称",
@@ -452,21 +470,21 @@ export default {
           prop: "liveUrl",
           hide: "two",
         },
-        {
-          label: "流地址类型",
-          prop: "streamingAddressType",
-          scope: "select",
-          options: [
-            {
-              label: "正式",
-              value: 1,
-            },
-            {
-              label: "测试",
-              value: 2,
-            },
-          ],
-        },
+        // {
+        //   label: "流地址类型",
+        //   prop: "streamingAddressType",
+        //   scope: "select",
+        //   options: [
+        //     {
+        //       label: "正式",
+        //       value: 1,
+        //     },
+        //     {
+        //       label: "测试",
+        //       value: 2,
+        //     },
+        //   ],
+        // },
         {
           label: "描述",
           prop: "introduce",
@@ -507,20 +525,20 @@ export default {
         playbackUrl: [
           { required: true, message: "请输入回放地址", trigger: "blur" },
         ],
-        streamingAddressType: [
-          {
-            required: true,
-            message: "请选择流地址类型",
-            trigger: ["change", "blur"],
-          },
-        ],
+        // streamingAddressType: [
+        //   {
+        //     required: true,
+        //     message: "请选择流地址类型",
+        //     trigger: ["change", "blur"],
+        //   },
+        // ],
       },
       props: {
         label: "text",
         children: "children",
       },
       cataid: "",
-      streamAddType: "",
+      // streamAddType: "",
       disabledBtn: false,
     };
   },
@@ -538,6 +556,73 @@ export default {
     this.initOptions();
   },
   methods: {
+    PLDel() {
+      if (!this.$refs.tableList.allCheckData.length) {
+        this.$message.warning("请勾选数据");
+        return;
+      }
+      const ary = this.$refs.tableList.allCheckData.map((item) => {
+        return item.id;
+      });
+      this.del(ary, true);
+    },
+    handleCheckedCitiesChange() {
+      let nid = this.itemOption2.map((item) => {
+        return item.id;
+      });
+      this.checkAll = nid.every((item) => {
+        if (this.cauType.includes(item)) {
+          this.isIndeterminate = true;
+          return true;
+        } else {
+          return false;
+        }
+      });
+      if (this.cauType.length) {
+        this.isIndeterminate = true;
+      } else {
+        this.isIndeterminate = false;
+      }
+      if (this.checkAll) {
+        this.isIndeterminate = false;
+      }
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.itemOption2.map((item) => {
+          return item.id;
+        });
+        let arrays = this.cauType.concat(nid);
+        this.cauType = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.itemOption2.map((item) => {
+          return item.id;
+        });
+        let newArr = [];
+        this.cauType.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.cauType = newArr;
+        console.log(this.cauType);
+        if (this.cauType.length) {
+          this.isIndeterminate = true;
+        } else {
+          this.isIndeterminate = false;
+        }
+      }
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
     loadingClose() {
       this.disabledBtn = false;
     },
@@ -566,7 +651,7 @@ export default {
       this.$api
         .uploadPolyvvideocata({
           cataid: this.cataid,
-          streamingAddressType: this.streamAddType,
+          // streamingAddressType: this.streamAddType,
         })
         .then((res) => {
           this.$message.success("同步成功");
@@ -582,7 +667,7 @@ export default {
     },
     moreActive() {
       this.cataid = "";
-      this.streamAddType = 1;
+      // this.streamAddType = 1;
       this.disBoxs = true;
     },
     getMessage() {
@@ -612,6 +697,7 @@ export default {
         }
       });
       this.itemOption2 = array;
+      this.handleCheckedCitiesChange();
     },
     initOptions() {
       this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
@@ -681,8 +767,9 @@ export default {
     },
     closeType(id) {
       this.cauType.splice(this.cauType.indexOf(id), 1);
+      this.handleCheckedCitiesChange();
     },
-    del(v) {
+    del(v, m) {
       this.$alert(
         "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
         "提示",
@@ -692,11 +779,12 @@ export default {
       )
         .then(() => {
           var data = {
-            id: v.id,
+            ids: m ? v : [v.id],
             status: -1,
           };
           this.$api.editCourseBusinessCourseStreaming(data).then((res) => {
             this.$message.success("删除成功");
+            this.$refs.tableList.clearMoreActive();
             this.search();
           });
         })
@@ -712,7 +800,7 @@ export default {
         this.statusPop = 1;
         this.listData = {
           status: 1,
-          streamingAddressType: 1,
+          // streamingAddressType: 1,
         };
         this.eduType = "";
         this.cauType = [];
@@ -760,7 +848,7 @@ export default {
         streamingName: this.listData.streamingName,
         businessList: pushRays,
         introduce: this.listData.introduce,
-        streamingAddressType: this.listData.streamingAddressType,
+        // streamingAddressType: this.listData.streamingAddressType,
       };
       if (this.listData.streamingType === 1) {
         dataInfos.streamingType = 1;

+ 154 - 78
src/views/resource/videoManagement/moduleManagement/add/index.vue

@@ -42,8 +42,17 @@
             @show="showHandle"
             @hide="hideHandle"
             :disabled="courType ? false : true"
-          >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            ><el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -93,43 +102,58 @@
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
+          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
         </el-form-item>
         <el-form-item label="模块标题" prop="moduleName">
           <el-input v-model="listData.moduleName"></el-input>
+          <div style="color: #999">
+            注:请尽量规范易懂,方便在课程目录表呈现给学员
+          </div>
         </el-form-item>
 
         <el-form-item label="模块封面">
-          <div class="imgBoxins">
-            <img :src="$methodsTools.splitImgHost(listData.coverUrl)" alt="" />
-            <div
-              class="posimg"
-              v-if="
-                listData.coverUrl === null ||
-                listData.coverUrl === '' ||
-                listData.coverUrl === undefined
-              "
-            >
-              <label for="uplose">
-                <i class="el-icon-circle-plus-outline iconStsz"></i
-              ></label>
-              <input
-                ref="file"
-                type="file"
-                style="display: none"
-                id="uplose"
-                @change="getImgFile"
-              />
-              <p>
-                注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-              </p>
-            </div>
-          </div>
+          <el-row :gutter="10" style="margin-bottom: 10px">
+            <el-col :span="12">
+              <div
+                style="
+                  width: 100%;
+                  height: 150px;
+                  border: 2px dashed #999;
+                  border-radius: 28px;
+                  line-height: 150px;
+                  text-align: center;
+                "
+                v-if="!listData.coverUrl"
+              >
+                <label for="uplose">
+                  <i class="el-icon-circle-plus-outline iconStsz"></i
+                ></label>
+                <input
+                  ref="file"
+                  type="file"
+                  style="display: none"
+                  id="uplose"
+                  @change="getImgFile"
+                />
+              </div>
+              <el-image
+                v-else
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(listData.coverUrl),
+                ]"
+              >
+              </el-image>
+            </el-col>
+            <el-col :span="11">
+              <span style="color: #999; font-size: 14px"
+                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+              >
+            </el-col>
+          </el-row>
           <el-button
-            v-if="
-              listData.coverUrl !== null &&
-              listData.coverUrl !== '' &&
-              listData.coverUrl !== undefined
-            "
+            v-if="listData.coverUrl"
             type="danger"
             size="mini"
             class="margin-top: 20px;"
@@ -165,50 +189,50 @@
             }"
             :default-sort="{ prop: 'sort', order: 'ascending' }"
           >
-              <el-table-column
-               v-for="(item, index) in tableSet"
-                :width="item.width"
-                :key="index"
-                :label="item.label"
-                align="center"
-                :show-overflow-tooltip="true"
-                header-align="center"
-                :sortable="item.prop === 'sort'"
-                sort-by="sort"
-                :prop="item.prop"
-              >
-                <template slot-scope="scope">
-                  <span v-if="item.scope === 'types'">{{
+            <el-table-column
+              v-for="(item, index) in tableSet"
+              :width="item.width"
+              :key="index"
+              :label="item.label"
+              align="center"
+              :show-overflow-tooltip="true"
+              header-align="center"
+              :sortable="item.prop === 'sort'"
+              sort-by="sort"
+              :prop="item.prop"
+            >
+              <template slot-scope="scope">
+                <span v-if="item.scope === 'types'">{{
+                  scope.row[item.prop] === 1
+                    ? "录播"
+                    : scope.row[item.prop] === 2
+                    ? "直播"
+                    : scope.row[item.prop] === 3
+                    ? "回放"
+                    : "未知"
+                }}</span>
+                <span v-else-if="item.scope === 'Status'">
+                  {{
                     scope.row[item.prop] === 1
-                      ? "录播"
-                      : scope.row[item.prop] === 2
-                      ? "直播"
-                      : scope.row[item.prop] === 3
-                      ? "回放"
+                      ? "发布"
+                      : scope.row[item.prop] === 0
+                      ? "未发布"
                       : "未知"
-                  }}</span>
-                  <span v-else-if="item.scope === 'Status'">
-                    {{
-                      scope.row[item.prop] === 1
-                        ? "发布"
-                        : scope.row[item.prop] === 0
-                        ? "未发布"
-                        : "未知"
-                    }}
-                  </span>
-                  <div v-else-if="item.scope === 'inputs'">
-                    <el-input-number
-                      style="width: 50px"
-                      size="small"
-                      :controls="false"
-                      v-model="scope.row[item.prop]"
-                      controls-position="right"
-                      :min="0"
-                    ></el-input-number>
-                  </div>
-                  <span v-else>{{ scope.row[item.prop] }}</span></template
-                >
-              </el-table-column>
+                  }}
+                </span>
+                <div v-else-if="item.scope === 'inputs'">
+                  <el-input-number
+                    style="width: 50px"
+                    size="small"
+                    :controls="false"
+                    v-model="scope.row[item.prop]"
+                    controls-position="right"
+                    :min="0"
+                  ></el-input-number>
+                </div>
+                <span v-else>{{ scope.row[item.prop] }}</span></template
+              >
+            </el-table-column>
             <el-table-column
               label="操作"
               align="center"
@@ -336,6 +360,8 @@ export default {
   name: "ModuleManagementAdd",
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       //   弹窗数据
       changeHeight: true,
       bfImg: "oss/images/avatar/20211013/1634097664410_1397766697",
@@ -376,14 +402,13 @@ export default {
       minTimeAll: 0, //总时长
       tableSet: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
-        { label: "章编码", prop: "code" },
-        { label: "标题前缀", prop: "prefixName", width: "120" },
-        { label: "章标题", prop: "name" },
+        { label: "章编码", prop: "code", width: "120" },
+        { label: "标题前缀", prop: "prefixName", width: "160" },
+        { label: "章标题", prop: "name", width: "210" },
         {
           label: "发布状态",
           prop: "publishStatus",
           scope: "Status",
-          width: "120",
         },
       ],
       tableData: [],
@@ -401,6 +426,12 @@ export default {
           scope: "businessLevel",
           edu: "educationTypeId",
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         // {
         //   prop: "publishStatus",
         //   placeholder: "发布状态",
@@ -444,6 +475,45 @@ export default {
     // this.search();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
@@ -572,9 +642,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers.doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     hideHandle() {},
     getDict() {

+ 112 - 36
src/views/resource/videoManagement/moduleManagement/edit/index.vue

@@ -42,8 +42,17 @@
             @show="showHandle"
             @hide="hideHandle"
             :disabled="courType ? false : true"
-          >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty">
+            ><el-checkbox
+              v-model="checkAll"
+              @change="handleCheckAllChange"
+              :indeterminate="isIndeterminate"
+              >全选</el-checkbox
+            >
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -94,43 +103,58 @@
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
+          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
         </el-form-item>
         <el-form-item label="模块标题" prop="moduleName">
           <el-input v-model="listData.moduleName"></el-input>
+          <div style="color: #999">
+            注:请尽量规范易懂,方便在课程目录表呈现给学员
+          </div>
         </el-form-item>
 
         <el-form-item label="模块封面">
-          <div class="imgBoxins">
-            <img :src="$methodsTools.splitImgHost(listData.coverUrl)" alt="" />
-            <div
-              class="posimg"
-              v-if="
-                listData.coverUrl === null ||
-                listData.coverUrl === '' ||
-                listData.coverUrl === undefined
-              "
-            >
-              <label for="uplose">
-                <i class="el-icon-circle-plus-outline iconStsz"></i
-              ></label>
-              <input
-                ref="file"
-                type="file"
-                style="display: none"
-                id="uplose"
-                @change="getImgFile"
-              />
-              <p>
-                注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
-              </p>
-            </div>
-          </div>
+          <el-row :gutter="10" style="margin-bottom: 10px">
+            <el-col :span="12">
+              <div
+                style="
+                  width: 100%;
+                  height: 150px;
+                  border: 2px dashed #999;
+                  border-radius: 28px;
+                  line-height: 150px;
+                  text-align: center;
+                "
+                v-if="!listData.coverUrl"
+              >
+                <label for="uplose">
+                  <i class="el-icon-circle-plus-outline iconStsz"></i
+                ></label>
+                <input
+                  ref="file"
+                  type="file"
+                  style="display: none"
+                  id="uplose"
+                  @change="getImgFile"
+                />
+              </div>
+              <el-image
+                v-else
+                style="width: 100%"
+                :src="$methodsTools.splitImgHost(listData.coverUrl)"
+                :preview-src-list="[
+                  $methodsTools.splitImgHost(listData.coverUrl),
+                ]"
+              >
+              </el-image>
+            </el-col>
+            <el-col :span="11">
+              <span style="color: #999; font-size: 14px"
+                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
+              >
+            </el-col>
+          </el-row>
           <el-button
-            v-if="
-              listData.coverUrl !== null &&
-              listData.coverUrl !== '' &&
-              listData.coverUrl !== undefined
-            "
+            v-if="listData.coverUrl"
             type="danger"
             size="mini"
             class="margin-top: 20px;"
@@ -342,6 +366,8 @@ export default {
   components: { searchBoxNew, pagination },
   data() {
     return {
+      isIndeterminate: false,
+      checkAll: false,
       //   弹窗数据
       changeHeight: true,
       bfImg: "oss/images/avatar/20211013/1634097664410_1397766697",
@@ -381,14 +407,13 @@ export default {
       minTimeAll: 0, //总时长
       tableSet: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
-        { label: "章编码", prop: "code" },
-        { label: "标题前缀", prop: "prefixName", width: "120" },
-        { label: "章标题", prop: "name" },
+        { label: "章编码", prop: "code", width: "120" },
+        { label: "标题前缀", prop: "prefixName", width: "160" },
+        { label: "章标题", prop: "name", width: "210" },
         {
           label: "发布状态",
           prop: "publishStatus",
           scope: "Status",
-          width: "120",
         },
       ],
       tableData: [],
@@ -406,6 +431,12 @@ export default {
           scope: "businessLevel",
           edu: "educationTypeId",
         },
+        {
+          prop: "subjectId",
+          placeholder: "科目",
+          scope: "sujectType",
+          edu: "educationTypeId",
+        },
         // {
         //   prop: "publishStatus",
         //   placeholder: "发布状态",
@@ -459,6 +490,45 @@ export default {
     this.search();
   },
   methods: {
+    handleCheckedCitiesChange() {
+      let nid = this.newSujectOption.map((item) => {
+        return item.newId;
+      });
+      this.checkAll = this.sujectArray.length === nid.length;
+      this.isIndeterminate =
+        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
+    },
+    setFunc(arr) {
+      var arrays = [];
+      for (let i = 0; i < arr.length; i++) {
+        if (!arrays.includes(arr[i])) {
+          arrays.push(arr[i]);
+        }
+      }
+      return arrays;
+    },
+    handleCheckAllChange(val) {
+      if (val) {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let arrays = this.sujectArray.concat(nid);
+        this.sujectArray = this.setFunc(arrays);
+        this.isIndeterminate = false;
+      } else {
+        let nid = this.newSujectOption.map((item) => {
+          return item.newId;
+        });
+        let newArr = [];
+        this.sujectArray.forEach((item) => {
+          if (!nid.includes(item)) {
+            newArr.push(item);
+          }
+        });
+        this.sujectArray = newArr;
+        this.isIndeterminate = false;
+      }
+    },
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
@@ -592,9 +662,15 @@ export default {
         }
       }
       this.sujectArray = array;
+      if (!this.newSujectOption.length) {
+        this.$message.warning("该业务层次暂无关联科目");
+        this.$refs.popovers.doClose();
+        return;
+      }
       this.newSujectOption.map((item) => {
         item.newId = this.courType + "-" + item.id;
       });
+      this.handleCheckedCitiesChange();
     },
     hideHandle() {},
     getDict() {

+ 6 - 4
src/views/resource/videoManagement/moduleManagement/index.vue

@@ -115,21 +115,21 @@ export default {
           label: "标题前缀",
           prop: "prefixName",
           hidden: true,
-          width: "120",
+          width: "200",
         },
         {
           label: "模块标题",
           prop: "moduleName",
           hidden: true,
           scope: "editInfo",
-          width: "120",
+          width: "260",
         },
         {
           label: "适用业务层级",
           prop: "businessList",
           hidden: true,
           scope: "mapTypesMores",
-          width: "240",
+          width: "340",
         },
         {
           label: "关联课程",
@@ -137,18 +137,20 @@ export default {
           prop1: "courseName",
           hidden: true,
           scope: "aboutChapter",
-          width: "150",
+          width: "200",
           int: 3,
         },
         {
           label: "章总数",
           prop: "chapterNum",
           hidden: true,
+          width: "100",
         },
         {
           label: "节总数",
           prop: "sectionNum",
           hidden: true,
+          width: "100",
         },
         {
           label: "学习时长",