Tang преди 3 години
родител
ревизия
c1ca0babfb
променени са 34 файла, в които са добавени 1669 реда и са изтрити 551 реда
  1. 21 0
      src/assets/styles/index.scss
  2. 73 6
      src/components/busIns.vue
  3. 1 1
      src/components/tableList.vue
  4. 129 1
      src/utils/methodsTool.js
  5. 129 98
      src/views/education/dataReview/informationTemplate/index.vue
  6. 50 23
      src/views/education/examManagement/examArrangement/index.vue
  7. 36 21
      src/views/education/examManagement/examConfiguration/examNum/index.vue
  8. 29 12
      src/views/education/examManagement/examConfiguration/examPlace/index.vue
  9. 63 42
      src/views/education/examManagement/qianpeiArrange/index.vue
  10. 78 16
      src/views/resource/bankManagement/chapterVolumeManagement/add/index.vue
  11. 24 11
      src/views/resource/bankManagement/chapterVolumeManagement/edit/index.vue
  12. 100 21
      src/views/resource/bankManagement/knowledgeManagement/index.vue
  13. 74 22
      src/views/resource/bankManagement/testPaperManagement/addPaper/baseAddPaper/index.vue
  14. 22 11
      src/views/resource/bankManagement/testPaperManagement/addPaper/topicAddPaper/index.vue
  15. 21 11
      src/views/resource/bankManagement/testPaperManagement/editPaper/baseEditPaper/index.vue
  16. 22 12
      src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue
  17. 38 16
      src/views/resource/bankManagement/topicManagement/index.vue
  18. 76 14
      src/views/resource/bankManagement/volumeManagement/add/index.vue
  19. 23 11
      src/views/resource/bankManagement/volumeManagement/edit/index.vue
  20. 59 2
      src/views/resource/handoutManagement/handoutList/add/index.vue
  21. 31 12
      src/views/resource/handoutManagement/handoutList/edit/index.vue
  22. 79 12
      src/views/resource/videoManagement/chapter/add/index.vue
  23. 26 11
      src/views/resource/videoManagement/chapter/edit/index.vue
  24. 31 20
      src/views/resource/videoManagement/courseManagement/basicInfoAdd/index.vue
  25. 19 9
      src/views/resource/videoManagement/courseManagement/basicInfoEdit/index.vue
  26. 34 15
      src/views/resource/videoManagement/courseManagement/chapterContent/index.vue
  27. 61 11
      src/views/resource/videoManagement/festival/add/index.vue
  28. 77 43
      src/views/resource/videoManagement/festival/edit/index.vue
  29. 44 5
      src/views/resource/videoManagement/festival/index.vue
  30. 32 11
      src/views/resource/videoManagement/flow/index.vue
  31. 79 12
      src/views/resource/videoManagement/moduleManagement/add/index.vue
  32. 26 11
      src/views/resource/videoManagement/moduleManagement/edit/index.vue
  33. 28 11
      src/views/systemManagement/accountManagement/index.vue
  34. 34 17
      src/views/systemManagement/roleManagement/index.vue

+ 21 - 0
src/assets/styles/index.scss

@@ -197,3 +197,24 @@ li{
 .multiselect--active {
   z-index: 1000 !important;
 }
+
+.activeStyIcons {
+  color: #fff!important;
+  background-color: #f56c6c!important;
+  border-color: #f56c6c!important;
+}
+.copyDataLi {
+  border: 1px solid #999;
+  border-radius: 8px;
+  padding: 4px 6px;
+  margin-bottom: 8px;
+  margin-right: 8px;
+  display: inline-block;
+  cursor: pointer;
+  transition: all 0.3s;
+  &:hover {
+    color: #f56c6c;
+    background: #fef0f0;
+    border-color: #fbc4c4;
+  }
+}

+ 73 - 6
src/components/busIns.vue

@@ -49,8 +49,11 @@
               :indeterminate="isIndeterminate"
               >全选</el-checkbox
             >
-            <el-checkbox-group v-model="sujectArray" class="checkboxSty" 
-              @change="handleCheckedCitiesChange">
+            <el-checkbox-group
+              v-model="sujectArray"
+              class="checkboxSty"
+              @change="handleCheckedCitiesChange"
+            >
               <el-checkbox
                 v-for="(item, index) in newSujectOption"
                 :label="item.newId"
@@ -63,7 +66,10 @@
                 >确定</el-button
               >
             </div>
-            <el-button slot="reference" style="margin-left: 12px" @click="getMessage"
+            <el-button
+              slot="reference"
+              style="margin-left: 12px"
+              @click="getMessage"
               >请选择科目</el-button
             >
           </el-popover>
@@ -87,11 +93,43 @@
               <i class="el-icon-error closeIcons" @click="closeType(index)"></i>
             </div>
           </div>
+          <el-popover
+            placement="bottom-start"
+            trigger="hover"
+            :close-delay="50"
+          >
+            <ul style="margin: 0; max-width: 600px">
+              <li
+                class="copyDataLi"
+                :class="changeSty(itemT)"
+                v-for="(itemT, indexT) in localData"
+                :key="indexT"
+                @click="unTime(itemT)"
+              >
+                {{
+                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                }}
+              </li>
+            </ul>
+            <el-button
+              v-show="localData.length"
+              type="danger"
+              slot="reference"
+              size="mini"
+              style="margin-right: 10px"
+              >最近选择</el-button
+            >
+          </el-popover>
           <el-button
             size="mini"
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
           <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
         </div>
@@ -133,6 +171,12 @@ export default {
     };
   },
   watch: {
+    sujectApis: {
+      immediate: true,
+      handler(newName, oldName) {
+        this.changeTypes();
+      },
+    },
     sujectApisTable: {
       handler(newVal, oldVal) {
         this.sujectApis = newVal;
@@ -142,16 +186,41 @@ export default {
     },
     newSujectApisTable: {
       handler(newVal, oldVal) {
+        console.log(newVal, 2);
         this.newSujectApis = newVal;
       },
       // 立即处理 进入页面就触发
       immediate: true,
     },
   },
+  created() {
+    this.localData = this.$methodsTools.getBusinessList();
+  },
   mounted() {
     this.getDict();
   },
   methods: {
+    UPDates() {
+      this.localData = this.$methodsTools.getBusinessList();
+    },
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis.includes(a)) {
+        this.sujectApis.splice(this.sujectApis.indexOf(a), 1);
+      } else {
+        this.sujectApis.push(a);
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      this.sujectApis.forEach((item) => {
+        let arr1 = item.split("-").map(Number);
+        if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+          arr = "activeStyIcons";
+        }
+      });
+      return arr;
+    },
     handleCheckedCitiesChange() {
       let nid = this.newSujectOption.map((item) => {
         return item.newId;
@@ -296,7 +365,6 @@ export default {
         this.sujectApis.push(this.sujectArray[i]);
       }
       this.$refs.popovers[0].doClose();
-      this.changeTypes();
     },
     hideHandle() {},
     showHandle() {
@@ -321,14 +389,13 @@ export default {
     },
     closeType(index) {
       this.sujectApis.splice(index, 1);
-      this.changeTypes();
     },
   },
 };
 </script>
 
 <style lang="less" scoped>
-.checkboxSty{
+.checkboxSty {
   display: flex;
   flex-direction: column;
 }

+ 1 - 1
src/components/tableList.vue

@@ -1568,7 +1568,7 @@ export default {
       },
       treeDatas: [],
       treeDatas1: [],
-      treeDatas2: [],
+      treeDatas2: []
     };
   },
   computed: {

+ 129 - 1
src/utils/methodsTool.js

@@ -1,4 +1,5 @@
 import * as baseUrls from "@/utils/request.js";
+import api from '@/api/api'
 import router from '@/router/index'//引入路由对象
 // import { map } from "core-js/core/array";
 export default {
@@ -309,5 +310,132 @@ export default {
 	 */
 	storageRemove(name) {
 		return window.localStorage.removeItem(name)
-	}
+	},
+	/**
+	 * 
+	 * @param {Array} ids 
+	 * @returns 缓存业务层级
+	 */
+	cacheBusinessList(ids) {
+		let newTime = new Date(new Date().toLocaleDateString()).getTime() // 获取当天时间戳
+		if (this.storageGet('business')) {
+			let businessList = JSON.parse(this.storageGet('business'))
+			if (businessList.time != newTime) {
+				this.storageRemove(business)
+				this.cacheBusinessList(ids)
+			} else {
+				if (businessList.business.length) {
+					let copyBusinList = JSON.parse(JSON.stringify(businessList.business))
+					for (let i = 0; i < ids.length; i++) {
+						let statusT = businessList.business.some(item => {
+							return item.businessId == ids[i].businessId && item.subjectId == ids[i].subjectId
+						})
+						if (!statusT) {
+							copyBusinList.push(ids[i])
+						}
+					}
+					businessList.business = copyBusinList
+				} else {
+					businessList.business = ids
+				}
+				this.storageSet('business', JSON.stringify(businessList))
+			}
+		} else {
+			let businessList = {
+				time: newTime,
+				business: ids
+			}
+			this.storageSet('business', JSON.stringify(businessList))
+		}
+	},
+	/**
+	 * 
+	 * @returns 获取缓存业务层级
+	 */
+	getBusinessList() {
+		let newTime = new Date(new Date().toLocaleDateString()).getTime() // 获取当天时间戳
+		if (this.storageGet('business')) {
+			let businessList = JSON.parse(this.storageGet('business'))
+			if (businessList.time != newTime) {
+				this.storageRemove('business')
+				return []
+			} else {
+				return businessList.business
+			}
+		} else {
+			return []
+		}
+	},
+	/**
+	 *
+	 * @param {Bool} status true 全部 false 筛选
+	 * @param {Number} id 筛选情况下 教育类型ID
+	 */
+	concatList(status, id) {
+		return new Promise((resolve, reject) => {
+			let options = [
+				{
+					label: "最近选择",
+					options: [],
+				},
+				{
+					label: "业务层级",
+					options: [],
+				},
+			];
+			api.inquirebusinessList({ status: 1 }).then((res) => {
+				let courTypeOptions = res.rows;
+				if (status) {
+					if (this.getBusinessList().length) {
+						let arrlist = this.getBusinessList();
+						courTypeOptions.forEach((item) => {
+							if (arrlist.includes(item.id)) {
+								options[0].options.push(item);
+							} else {
+								options[1].options.push(item);
+							}
+						});
+					} else {
+						options[1].options = courTypeOptions;
+					}
+					// let arrs = options.filter((item) => {
+					//   if (item.options.length) {
+					//     return item;
+					//   }
+					// });
+					resolve({
+						value: res.rows,
+						options: options
+					})
+				} else {
+					let arr = [];
+					if (this.getBusinessList().length) {
+						let arrlist = this.getBusinessList();
+						courTypeOptions.forEach((item) => {
+							if (arrlist.includes(item.id)) {
+								options[0].options.push(item);
+							}
+						});
+						arr = courTypeOptions.filter((item) => {
+							return item.educationId == id && !arrlist.includes(item.id);
+						});
+					} else {
+						arr = courTypeOptions.filter((item) => {
+							return item.educationId == id;
+						});
+					}
+					options[1].options = arr;
+					// let arrs = options.filter((item) => {
+					//   if (item.options.length) {
+					//     return item;
+					//   }
+					// });
+					resolve({
+						value: res.rows,
+						options: options
+					})
+				}
+			});
+		})
+	},
 }

+ 129 - 98
src/views/education/dataReview/informationTemplate/index.vue

@@ -27,6 +27,7 @@
       @handleCurrentChange="handleCurrentChange"
     />
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogVisible"
       width="630px"
       :show-close="false"
@@ -49,97 +50,107 @@
           :rules="rules"
           ref="listData"
         >
-            <el-form-item v-for="(items, indexs) in listitem" :key="indexs" :label="items.label" :prop="items.prop">
-              <el-radio-group
-                v-if="items.scope === 'status'"
-                v-model="listData[items.prop]"
+          <el-form-item
+            v-for="(items, indexs) in listitem"
+            :key="indexs"
+            :label="items.label"
+            :prop="items.prop"
+          >
+            <el-radio-group
+              v-if="items.scope === 'status'"
+              v-model="listData[items.prop]"
+            >
+              <el-radio
+                v-for="(item, index) in items.options"
+                :key="index"
+                :label="item.value"
+                :disabled="statusPop === 2"
+                >{{ item.label }}</el-radio
               >
-                <el-radio
-                  v-for="(item, index) in items.options"
+            </el-radio-group>
+            <div v-else-if="items.scope === 'activeType'">
+              <div :class="changeHeight ? 'ach' : 'clh'">
+                <div
+                  v-for="(item, index) in zhType"
                   :key="index"
-                  :label="item.value"
-                  :disabled="statusPop === 2"
-                  >{{ item.label }}</el-radio
+                  class="listBoxStys"
                 >
-              </el-radio-group>
-              <div v-else-if="items.scope === 'activeType'">
-                <div :class="changeHeight ? 'ach' : 'clh'">
-                  <div
-                    v-for="(item, index) in zhType"
-                    :key="index"
-                    class="listBoxStys"
-                  >
-                    {{
-                      item.educationName +
-                      " - " +
-                      item.projectName +
-                      "-" +
-                      item.businessName
-                    }}
-                    <i
-                      class="el-icon-error closeIcons"
-                      @click="closeType(item.id)"
-                    ></i>
-                  </div>
+                  {{
+                    item.educationName +
+                    " - " +
+                    item.projectName +
+                    "-" +
+                    item.businessName
+                  }}
+                  <i
+                    class="el-icon-error closeIcons"
+                    @click="closeType(item.id)"
+                  ></i>
                 </div>
-                <el-button
-                  size="mini"
-                  v-if="zhType.length > 1"
-                  @click="changeType"
-                  >{{ changeHeight ? "展开" : "关闭" }}</el-button
-                >
               </div>
-              <div
-                v-else-if="items.scope === 'certificate'"
-                style="display: flex; align-items: center"
+              <el-button
+                size="mini"
+                v-if="zhType.length > 1"
+                @click="changeType"
+                >{{ changeHeight ? "展开" : "关闭" }}</el-button
+              ><el-button
+                size="mini"
+                v-if="cauType.length > 0"
+                @click="allclear"
+                >清空</el-button
               >
-                <el-select
-                  v-model="eduType"
-                  placeholder="请选择教育类型"
-                  @change="eduChange"
+            </div>
+            <div
+              v-else-if="items.scope === 'certificate'"
+              style="display: flex; align-items: center"
+            >
+              <el-select
+                v-model="eduType"
+                placeholder="请选择教育类型"
+                @change="eduChange"
+              >
+                <el-option
+                  v-for="item in itemOption1"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
                 >
-                  <el-option
-                    v-for="item in itemOption1"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
-                <el-popover
-                  placement="bottom"
-                  trigger="click"
-                  :disabled="eduType ? false : true"
-                  ><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"
-                      :key="index"
-                      >{{
-                        item.projectName + "-" + item.businessName
-                      }}</el-checkbox
-                    >
-                  </el-checkbox-group>
-                  <el-button
-                    slot="reference"
-                    style="margin-left: 12px"
-                    @click="getMessage"
-                    >请选择业务层次</el-button
+                </el-option>
+              </el-select>
+              <el-popover
+                placement="bottom"
+                trigger="click"
+                :disabled="eduType ? false : true"
+                ><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"
+                    :key="index"
+                    >{{
+                      item.projectName + "-" + item.businessName
+                    }}</el-checkbox
                   >
-                </el-popover>
-                <span style="margin-left: 10px">注:可多选</span>
-              </div>
-              <!-- <div v-else-if="items.scope === 'select'">
+                </el-checkbox-group>
+                <el-button
+                  slot="reference"
+                  style="margin-left: 12px"
+                  @click="getMessage"
+                  >请选择业务层次</el-button
+                >
+              </el-popover>
+              <span style="margin-left: 10px">注:可多选</span>
+            </div>
+            <!-- <div v-else-if="items.scope === 'select'">
                 <el-select
                   v-model="listData[items.prop]"
                   multiple
@@ -155,11 +166,11 @@
                 </el-select>
                 <span style="margin-left: 10px">注:可多选</span>
               </div> -->
-              <div v-else>
-                <el-input v-model="listData[items.prop]"></el-input>
-                <div v-if="items.ch">{{ items.ch }}</div>
-              </div>
-            </el-form-item>
+            <div v-else>
+              <el-input v-model="listData[items.prop]"></el-input>
+              <div v-if="items.ch">{{ items.ch }}</div>
+            </div>
+          </el-form-item>
         </el-form>
         <p class="p_infos">
           模板字段组合<el-button
@@ -229,6 +240,7 @@
         <el-button @click="close">取 消</el-button>
         <el-button
           type="primary"
+          :loading="disabledBtn"
           v-if="statusPop !== 2"
           @click="submit('listData')"
           >确 定</el-button
@@ -804,6 +816,7 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       changeHeight: true,
@@ -1100,6 +1113,13 @@ export default {
     this.getUserInfoList();
   },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
+    allclear() {
+      this.cauType = [];
+      this.handleCheckedCitiesChange();
+    },
     handleCheckedCitiesChange() {
       let nid = this.itemOption2.map((item) => {
         return item.id;
@@ -1651,6 +1671,7 @@ export default {
       });
     },
     rulesTableSumbit() {
+      this.disabledBtn = true;
       var data = JSON.parse(JSON.stringify(this.listData));
       var pushRays = [];
       this.zhType.map((item) => {
@@ -1665,18 +1686,28 @@ export default {
       data.keyValue2 = JSON.stringify(this.listData.keyValue2);
       // data.userIds = this.listData.userIds.toString();
       if (this.statusPop === 1) {
-        this.$api.appbaseprofiletp(data).then((res) => {
-          this.$message.success("新增成功");
-          this.dialogVisible = false;
-          this.search();
-        });
+        this.$api
+          .appbaseprofiletp(data)
+          .then((res) => {
+            this.$message.success("新增成功");
+            this.dialogVisible = false;
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
       if (this.statusPop === 0) {
-        this.$api.editbaseprofile(data).then((res) => {
-          this.$message.success("修改成功");
-          this.dialogVisible = false;
-          this.search();
-        });
+        this.$api
+          .editbaseprofile(data)
+          .then((res) => {
+            this.$message.success("修改成功");
+            this.dialogVisible = false;
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
     },
     close() {

+ 50 - 23
src/views/education/examManagement/examArrangement/index.vue

@@ -57,6 +57,7 @@
       @handleCurrentChange="handleCurrentChange"
     />
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogVisible"
       width="610px"
       :show-close="false"
@@ -163,6 +164,7 @@
         <el-button @click="close">取 消</el-button>
         <el-button
           type="primary"
+          :loading="disabledBtn"
           v-if="statusPop !== 2"
           @click="submit('listData')"
           >确 定</el-button
@@ -170,6 +172,7 @@
       </span>
     </el-dialog>
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogExamBoxs"
       width="620px"
       :show-close="false"
@@ -336,12 +339,14 @@
         <el-button
           type="primary"
           v-if="statusPop !== 2"
+          :loading="disabledBtn"
           @click="submitPla('listData')"
           >确 定</el-button
         >
       </span>
     </el-dialog>
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogExamPlace"
       width="860px"
       :show-close="false"
@@ -413,6 +418,7 @@
           type="primary"
           v-if="statusPop !== 2"
           @click="submitPlaces"
+          :loading="disabledBtn"
           :disabled="!activeLists.length"
           >确 定</el-button
         >
@@ -694,6 +700,7 @@ export default {
   components: { searchBox, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       total2: 0,
       pageSize2: 10,
       currentPage2: 1,
@@ -737,7 +744,6 @@ export default {
           hidden: true,
           scope: "TimeLists",
           Diszing: false,
-          
         },
         {
           label: "使用状态",
@@ -933,6 +939,9 @@ export default {
   },
   computed: { ...mapGetters(["educationType"]) },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
     //修改适用商品
     editGoods(row) {
       this.$api
@@ -1112,19 +1121,26 @@ export default {
           }
         }
       }
-      this.$api.systemapplyaddSite(data).then((res) => {
-        if (this.intStatus === 1) {
-          this.$message.success("设置考试地点时间成功");
-        }
-        if (this.intStatus === 2) {
-          this.$message.success("设置考培地点时间成功");
-        }
-        this.dialogExamBoxs = false;
-        this.search();
-      });
+      this.disabledBtn = true;
+      this.$api
+        .systemapplyaddSite(data)
+        .then((res) => {
+          if (this.intStatus === 1) {
+            this.$message.success("设置考试地点时间成功");
+          }
+          if (this.intStatus === 2) {
+            this.$message.success("设置考培地点时间成功");
+          }
+          this.dialogExamBoxs = false;
+          this.search();
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     //添加考点地点
     submitPlaces() {
+      this.disabledBtn = true;
       let array = [];
       this.activeLists.forEach((item) => {
         array.push({
@@ -1401,6 +1417,7 @@ export default {
       });
     },
     rulesTableSumbit() {
+      this.disabledBtn = true;
       var data = JSON.parse(JSON.stringify(this.listData));
       data.applyStatus = data.applyStatus.toString();
       data.applyStartTime = this.$methodsTools.time10to13(
@@ -1410,20 +1427,30 @@ export default {
       data.applyEndTime = this.$methodsTools.time10to13(data.applyEndTime, 1);
       if (this.statusPop === 1) {
         data.status = 0;
-        this.$api.appsystemapply(data).then((res) => {
-          this.$message.success("新增成功");
-          this.dialogVisible = false;
-          this.search();
-          this.$store.commit("EXAMLIST");
-        });
+        this.$api
+          .appsystemapply(data)
+          .then((res) => {
+            this.$message.success("新增成功");
+            this.dialogVisible = false;
+            this.search();
+            this.$store.commit("EXAMLIST");
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
       if (this.statusPop === 0) {
-        this.$api.editsystemapply(data).then((res) => {
-          this.$message.success("修改成功");
-          this.dialogVisible = false;
-          this.search();
-          this.$store.commit("EXAMLIST");
-        });
+        this.$api
+          .editsystemapply(data)
+          .then((res) => {
+            this.$message.success("修改成功");
+            this.dialogVisible = false;
+            this.search();
+            this.$store.commit("EXAMLIST");
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
     },
     close() {

+ 36 - 21
src/views/education/examManagement/examConfiguration/examNum/index.vue

@@ -23,6 +23,7 @@
       @handleCurrentChange="handleCurrentChange"
     />
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogVisible"
       width="560px"
       :show-close="false"
@@ -157,6 +158,7 @@
         <el-button @click="close">取 消</el-button>
         <el-button
           type="primary"
+          :loading="disabledBtn"
           v-if="statusPop !== 2"
           @click="submit('listData')"
           >确 定</el-button
@@ -172,10 +174,11 @@ import searchBox from "@/components/searchBox";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 export default {
-  name:"ExamNum",
+  name: "ExamNum",
   components: { searchBox, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "配置考试次数前培次数",
@@ -374,6 +377,9 @@ export default {
     },
   },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
     getDict() {
       this.$api.inquirebusinessList({ status: 1 }).then((res) => {
         this.busList = res.rows;
@@ -447,10 +453,8 @@ export default {
         };
         this.rules.examNumber[0].min = 0;
         this.rules.doNumber[0].min = 0;
-        this.rules.examNumber[0].message =
-          "考试次数不得小于" + 0 + '次';
-        this.rules.doNumber[0].message =
-          "前培次数不得小于" + 0 + '次';
+        this.rules.examNumber[0].message = "考试次数不得小于" + 0 + "次";
+        this.rules.doNumber[0].message = "前培次数不得小于" + 0 + "次";
         this.$nextTick(() => {
           this.$refs.listData.clearValidate();
         });
@@ -459,17 +463,17 @@ export default {
         this.statusPop = int;
         this.$api.obtainsystemnumber(v.examNumberId).then((res) => {
           this.$api
-          .inquiresystemnumberlistGoods({ businessId: res.data.businessId })
-          .then((result) => {
-            this.goodsList = result.rows;
-          });
+            .inquiresystemnumberlistGoods({ businessId: res.data.businessId })
+            .then((result) => {
+              this.goodsList = result.rows;
+            });
           this.bfListData = JSON.parse(JSON.stringify(res.data));
           this.rules.examNumber[0].min = this.bfListData.examNumber;
           this.rules.examNumber[0].message =
-            "考试次数不得小于" + this.bfListData.examNumber + '次';
+            "考试次数不得小于" + this.bfListData.examNumber + "次";
           this.rules.doNumber[0].min = this.bfListData.doNumber;
           this.rules.doNumber[0].message =
-            "前培次数不得小于" + this.bfListData.doNumber + '次';
+            "前培次数不得小于" + this.bfListData.doNumber + "次";
           this.examNumber = this.bfListData.examNumber;
           this.doNumber = this.bfListData.doNumber;
           this.listData = res.data;
@@ -490,6 +494,7 @@ export default {
       });
     },
     rulesTableSumbit() {
+      this.disabledBtn = true;
       var data = JSON.parse(JSON.stringify(this.listData));
       this.busList.map((item) => {
         if (item.id === data.businessId) {
@@ -497,18 +502,28 @@ export default {
         }
       });
       if (this.statusPop === 1) {
-        this.$api.appsystemnumber(data).then((res) => {
-          this.$message.success("新增成功");
-          this.dialogVisible = false;
-          this.search();
-        });
+        this.$api
+          .appsystemnumber(data)
+          .then((res) => {
+            this.$message.success("新增成功");
+            this.dialogVisible = false;
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
       if (this.statusPop === 0) {
-        this.$api.editsystemnumber(data).then((res) => {
-          this.$message.success("修改成功");
-          this.dialogVisible = false;
-          this.search();
-        });
+        this.$api
+          .editsystemnumber(data)
+          .then((res) => {
+            this.$message.success("修改成功");
+            this.dialogVisible = false;
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
     },
     close() {

+ 29 - 12
src/views/education/examManagement/examConfiguration/examPlace/index.vue

@@ -23,6 +23,7 @@
       @handleCurrentChange="handleCurrentChange"
     />
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogVisible"
       width="560px"
       :show-close="false"
@@ -82,6 +83,7 @@
         <el-button @click="close">取 消</el-button>
         <el-button
           type="primary"
+          :loading="disabledBtn"
           v-if="statusPop !== 2"
           @click="submit('listData')"
           >确 定</el-button
@@ -100,6 +102,7 @@ export default {
   components: { searchBox, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "配置考试地点",
@@ -196,6 +199,9 @@ export default {
     this.search();
   },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
     editInfo(v) {
       this.addClick(v, 0);
     },
@@ -271,21 +277,32 @@ export default {
       });
     },
     rulesTableSumbit() {
+      this.disabledBtn = true;
       if (this.statusPop === 1) {
-        this.$api.appsystemsite(this.listData).then((res) => {
-          this.$message.success("新增成功");
-          this.dialogVisible = false;
-          this.search();
-          this.$store.commit("APPLYSITEADDRESS");
-        });
+        this.$api
+          .appsystemsite(this.listData)
+          .then((res) => {
+            this.$message.success("新增成功");
+            this.dialogVisible = false;
+            this.search();
+            this.$store.commit("APPLYSITEADDRESS");
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
       if (this.statusPop === 0) {
-        this.$api.editsystemsite(this.listData).then((res) => {
-          this.$message.success("修改成功");
-          this.dialogVisible = false;
-          this.search();
-          this.$store.commit("APPLYSITEADDRESS");
-        });
+        this.$api
+          .editsystemsite(this.listData)
+          .then((res) => {
+            this.$message.success("修改成功");
+            this.dialogVisible = false;
+            this.search();
+            this.$store.commit("APPLYSITEADDRESS");
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
     },
     close() {

+ 63 - 42
src/views/education/examManagement/qianpeiArrange/index.vue

@@ -9,11 +9,15 @@
       @editInfo="editInfo"
     >
       <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="addClick(props.scope.row, 0)"
+        <el-button
+          type="text"
+          @click="addClick(props.scope.row, 0)"
           :disabled="props.scope.row.status === 1"
           >修改计划</el-button
         >
-        <el-button type="text" @click="editGoods(props.scope.row)"
+        <el-button
+          type="text"
+          @click="editGoods(props.scope.row)"
           :disabled="props.scope.row.status === 1"
           >适用商品</el-button
         >
@@ -41,6 +45,7 @@
       @handleCurrentChange="handleCurrentChange"
     />
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogVisible"
       width="610px"
       :show-close="false"
@@ -82,7 +87,7 @@
           <el-form-item label="" prop="beforeUrl" v-if="listData.beforeStatus">
             <el-radio-group v-model="listData.beforeUrl">
               <el-radio
-              style="margin-bottom:10px;"
+                style="margin-bottom: 10px"
                 v-for="(item, index) in radioApi"
                 :key="index"
                 :label="item.beforeUrlId"
@@ -123,6 +128,7 @@
         <el-button @click="close">取 消</el-button>
         <el-button
           type="primary"
+          :loading="disabledBtn"
           v-if="statusPop !== 2"
           @click="submit('listData')"
           >确 定</el-button
@@ -208,7 +214,7 @@
               >请先选择业务层级</span
             >
             <el-checkbox-group
-            style="overflow:auto;max-height:500px;"
+              style="overflow: auto; max-height: 500px"
               v-model="listDataGoods.goodsId"
               v-else-if="listDataGoods.businessId && goodsList.length"
             >
@@ -224,7 +230,7 @@
                 <span
                   :style="
                     item.goodsStatus === 0 &&
-                  bfListData.goodsId.indexOf(item.goodsId) === -1
+                    bfListData.goodsId.indexOf(item.goodsId) === -1
                       ? ''
                       : 'color:#F56C6C'
                   "
@@ -271,19 +277,17 @@
             <span>{{ infoData.beforeName }}</span>
           </el-form-item>
           <el-form-item label="关联题卷:">
-            <span v-for="(item,index) in optionsApis" :key="index">
-              <span v-if="item.value === infoData.beforeStatus">{{item.label}}</span>
+            <span v-for="(item, index) in optionsApis" :key="index">
+              <span v-if="item.value === infoData.beforeStatus">{{
+                item.label
+              }}</span>
             </span>
             <span>{{ infoData.urlName }}</span> <span>{{ infoData.url }}</span>
           </el-form-item>
           <el-form-item label="开放时间:">
-            <span>{{
-              $methodsTools.onlyForma(infoData.beforeStartTime)
-            }}</span>
+            <span>{{ $methodsTools.onlyForma(infoData.beforeStartTime) }}</span>
-            <span>{{
-              $methodsTools.onlyForma(infoData.beforeEndTime)
-            }}</span>
+            <span>{{ $methodsTools.onlyForma(infoData.beforeEndTime) }}</span>
           </el-form-item>
           <el-button type="info" style="margin-bottom: 20px" size="mini"
             >适用商品</el-button
@@ -323,10 +327,11 @@ import searchBox from "@/components/searchBox";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 export default {
-  name:"QianpeiArrange",
+  name: "QianpeiArrange",
   components: { searchBox, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "前培安排",
@@ -392,8 +397,8 @@ export default {
           prop: "people",
           hidden: true,
           width: "180px",
-          scope:"AjumpPeolpe",
-          type:2,
+          scope: "AjumpPeolpe",
+          type: 2,
         },
       ],
       optionsApis: [
@@ -514,9 +519,11 @@ export default {
         if (this.statusPop === 1) {
           this.listDataGoods.goodsId = [];
         }
-        this.$api.inquiresystembeforelistGoods({ businessId: value }).then((res) => {
-          this.goodsList = res.rows;
-        });
+        this.$api
+          .inquiresystembeforelistGoods({ businessId: value })
+          .then((res) => {
+            this.goodsList = res.rows;
+          });
       }
     },
     "listData.beforeStatus"(value) {
@@ -527,14 +534,19 @@ export default {
   },
   computed: { ...mapGetters(["educationType"]) },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
     //修改适用商品
     editGoods(row) {
       this.$api
         .inquiresystembeforelistGoodsgoodsInfo({ beforeId: row.beforeId })
         .then((res) => {
-          this.$api.inquiresystembeforelistGoods({ businessId: res.data.businessId }).then((result) => {
-          this.goodsList = result.rows;
-        });
+          this.$api
+            .inquiresystembeforelistGoods({ businessId: res.data.businessId })
+            .then((result) => {
+              this.goodsList = result.rows;
+            });
           if (res.data.goodsType && res.data.goodsId.length) {
             this.statusPop = 0;
             this.bfListData = JSON.parse(JSON.stringify(res.data));
@@ -590,15 +602,13 @@ export default {
     },
     // 判断选择时间逻辑
     changeEndTime(int) {
-      if(this.listData.beforeStartTime === this.listData.beforeEndTime){
-        this.$message.warning(
-          "开始时间与结束时间不允许相同"
-        );
-        if(int === 1){
-        this.listData.beforeStartTime = "";
+      if (this.listData.beforeStartTime === this.listData.beforeEndTime) {
+        this.$message.warning("开始时间与结束时间不允许相同");
+        if (int === 1) {
+          this.listData.beforeStartTime = "";
         }
-        if(int === 2){
-        this.listData.beforeEndTime = "";
+        if (int === 2) {
+          this.listData.beforeEndTime = "";
         }
         return;
       }
@@ -749,6 +759,7 @@ export default {
       });
     },
     rulesTableSumbit() {
+      this.disabledBtn = true;
       var data = JSON.parse(JSON.stringify(this.listData));
       data.beforeStartTime = this.$methodsTools.time10to13(
         data.beforeStartTime,
@@ -757,20 +768,30 @@ export default {
       data.beforeEndTime = this.$methodsTools.time10to13(data.beforeEndTime, 1);
       if (this.statusPop === 1) {
         data.status = 0;
-        this.$api.appsystembefore(data).then((res) => {
-          this.$message.success("新增成功");
-          this.dialogVisible = false;
-          this.search();
-          this.$store.commit("BEFORELIST");
-        });
+        this.$api
+          .appsystembefore(data)
+          .then((res) => {
+            this.$message.success("新增成功");
+            this.dialogVisible = false;
+            this.search();
+            this.$store.commit("BEFORELIST");
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
       if (this.statusPop === 0) {
-        this.$api.editsystembefore(data).then((res) => {
-          this.$message.success("修改成功");
-          this.dialogVisible = false;
-          this.search();
-          this.$store.commit("BEFORELIST");
-        });
+        this.$api
+          .editsystembefore(data)
+          .then((res) => {
+            this.$message.success("修改成功");
+            this.dialogVisible = false;
+            this.search();
+            this.$store.commit("BEFORELIST");
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
     },
     close() {

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

@@ -53,7 +53,7 @@
             </el-radio-group>
             <div style="display: block; text-align: center; margin-top: 10px">
               <el-button size="mini" type="primary" @click="submitSujectArray"
-                >确定</el-button
+                >关闭</el-button
               >
             </div>
             <el-button
@@ -85,6 +85,33 @@
               <i class="el-icon-error closeIcons" @click="closeType"></i>
             </div>
           </div>
+          <el-popover
+            placement="bottom-start"
+            trigger="hover"
+            :close-delay="50"
+          >
+            <ul style="margin: 0; max-width: 600px">
+              <li
+                class="copyDataLi"
+                :class="changeSty(itemT)"
+                v-for="(itemT, indexT) in localData"
+                :key="indexT"
+                @click="unTime(itemT)"
+              >
+                {{
+                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                }}
+              </li>
+            </ul>
+            <el-button
+              v-show="localData.length"
+              type="danger"
+              slot="reference"
+              size="mini"
+              style="margin-right: 10px"
+              >最近选择</el-button
+            >
+          </el-popover>
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
@@ -180,7 +207,10 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submitIns('listData')"
+          <el-button
+            type="primary"
+            @click="submitIns('listData')"
+            :loading="disabledBtn"
             >确定</el-button
           >
         </el-form-item>
@@ -294,6 +324,7 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       listData: {
         publishStatus: 1,
       }, //   弹窗数据
@@ -326,8 +357,8 @@ export default {
         {
           label: "发布状态",
           prop: "publishStatus",
-          scope: "Status", 
-          width: "120" 
+          scope: "Status",
+          width: "120",
         },
       ],
       tableData: [],
@@ -360,18 +391,42 @@ export default {
       ],
       disCheckList: [], //已选转禁用复选列表
       activeLists: [],
+      localData: [],
     };
   },
   watch: {
+    sujectApis: {
+      immediate: true,
+      handler(newName, oldName) {
+        this.changeTypes();
+      },
+    },
     newSujectApis() {
       this.tableData = [];
     },
   },
   mounted() {
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
     // this.search();
   },
   methods: {
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis == a) {
+        this.sujectApis = "";
+      } else {
+        this.sujectApis = a;
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      let arr1 = this.sujectApis.split("-").map(Number);
+      if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+        arr = "activeStyIcons";
+      }
+      return arr;
+    },
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
@@ -477,7 +532,6 @@ export default {
       });
     },
     submitSujectArray() {
-      this.changeTypes();
       this.$refs.popovers.doClose();
     },
     showHandle() {
@@ -576,6 +630,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var examList = [];
       this.tableData.map((item) => {
         examList.push({ examId: item.examId, sort: Number(item.sort) });
@@ -590,16 +645,24 @@ export default {
         year: this.listData.year,
         status: 1,
       };
-      this.$api.addbankchapter(data1).then((res) => {
-        this.$message.success("新增成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "chapterVolumeManagement",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .addbankchapter(data1)
+        .then((res) => {
+          this.$methodsTools.cacheBusinessList([this.newSujectApis]);
+          this.$message.success("新增成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "chapterVolumeManagement",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
@@ -610,7 +673,6 @@ export default {
     },
     closeType() {
       this.sujectApis = "";
-      this.changeTypes();
     },
     handleSizeChange(v) {
       this.formData.pageSize = v;

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

@@ -64,6 +64,7 @@
               >
             </div>
             <el-button
+              disabled
               slot="reference"
               style="margin-left: 12px"
               @click="getMessage"
@@ -191,7 +192,10 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submitIns('listData')"
+          <el-button
+            type="primary"
+            @click="submitIns('listData')"
+            :loading="disabledBtn"
             >确定</el-button
           >
         </el-form-item>
@@ -305,6 +309,7 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       listData: {
         publishStatus: 1,
       }, //   弹窗数据
@@ -595,6 +600,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var examList = [];
       this.tableData.map((item) => {
         examList.push({ examId: item.examId, sort: Number(item.sort) });
@@ -609,16 +615,23 @@ export default {
         year: this.listData.year,
         status: 1,
       };
-      this.$api.editbankchapter(data1).then((res) => {
-        this.$message.success("修改成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "chapterVolumeManagement",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .editbankchapter(data1)
+        .then((res) => {
+          this.$message.success("修改成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "chapterVolumeManagement",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 100 - 21
src/views/resource/bankManagement/knowledgeManagement/index.vue

@@ -30,6 +30,7 @@
       @handleCurrentChange="handleCurrentChange"
     />
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogVisible"
       width="790px"
       :show-close="false"
@@ -92,14 +93,17 @@
                 @hide="hideHandle"
                 :disabled="courType ? false : true"
               >
-            <el-checkbox
-              v-model="checkAll"
-              @change="handleCheckAllChange"
-              :indeterminate="isIndeterminate"
-              >全选</el-checkbox
-            >
-                <el-checkbox-group v-model="sujectArray" class="checkboxSty" 
-              @change="handleCheckedCitiesChange">
+                <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"
@@ -148,11 +152,43 @@
                   ></i>
                 </div>
               </div>
+              <el-popover
+                placement="bottom-start"
+                trigger="hover"
+                :close-delay="50"
+              >
+                <ul style="margin: 0; max-width: 600px">
+                  <li
+                    class="copyDataLi"
+                    :class="changeSty(itemT)"
+                    v-for="(itemT, indexT) in localData"
+                    :key="indexT"
+                    @click="unTime(itemT)"
+                  >
+                    {{
+                      `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                    }}
+                  </li>
+                </ul>
+                <el-button
+                  v-show="localData.length && statusPop === 1"
+                  type="danger"
+                  slot="reference"
+                  size="mini"
+                  style="margin-right: 10px"
+                  >最近选择</el-button
+                >
+              </el-popover>
               <el-button
                 size="mini"
                 v-if="newSujectApis.length > 1"
                 @click="changeType"
                 >{{ changeHeight ? "展开" : "关闭" }}</el-button
+              ><el-button
+                size="mini"
+                v-if="newSujectApis.length > 0"
+                @click="sujectApis = []"
+                >清空</el-button
               >
               <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
             </div>
@@ -188,7 +224,9 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="close">取 消</el-button>
-        <el-button type="primary" @click="submit">确 定</el-button>
+        <el-button type="primary" @click="submit" :loading="disabledBtn"
+          >确 定</el-button
+        >
       </span>
     </el-dialog>
   </div>
@@ -203,6 +241,7 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       loading: false, //当前表单加载是否加载动画
@@ -211,7 +250,7 @@ export default {
         index: 0,
         ch: "条",
         num: false,
-        border:true,
+        border: true,
         choice: true,
         addHide: false,
         backFatherBtn: {
@@ -254,7 +293,7 @@ export default {
           label: "知识点编码",
           prop: "encoder",
           hidden: true,
-          width:"140px"
+          width: "140px",
         },
         {
           label: "知识点标题",
@@ -304,6 +343,7 @@ export default {
       ],
       statusPop: 1,
       dialogVisible: false,
+      localData: [],
     };
   },
   watch: {
@@ -315,14 +355,37 @@ export default {
     },
   },
   mounted() {
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
     this.search();
   },
   activated() {
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
     this.search();
   },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis.includes(a)) {
+        this.sujectApis.splice(this.sujectApis.indexOf(a), 1);
+      } else {
+        this.sujectApis.push(a);
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      this.sujectApis.forEach((item) => {
+        let arr1 = item.split("-").map(Number);
+        if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+          arr = "activeStyIcons";
+        }
+      });
+      return arr;
+    },
     handleCheckedCitiesChange() {
       let nid = this.newSujectOption.map((item) => {
         return item.newId;
@@ -509,13 +572,16 @@ export default {
       this.$refs.popovers[0].doClose();
     },
     submit() {
+      this.disabledBtn = true;
       if (!this.newSujectApis.length) {
         this.$message.warning("请添加业务层级");
+        this.disabledBtn = false;
         return;
       }
       if (this.statusPop === 1) {
         if (!this.BusNameList.length) {
           this.$message.warning("请添加知识点");
+          this.disabledBtn = false;
           return;
         }
         var dataInfos = {
@@ -523,14 +589,22 @@ export default {
           examKnowledgeBusinessAddBoList: this.newSujectApis,
           knowledgeName: this.BusNameList,
         };
-        this.$api.addKnowledgeExam(dataInfos).then((res) => {
-          this.$message.success("添加成功");
-          this.dialogVisible = false;
-          this.search();
-        });
+        this.$api
+          .addKnowledgeExam(dataInfos)
+          .then((res) => {
+            this.$methodsTools.cacheBusinessList(this.newSujectApis);
+            this.$message.success("添加成功");
+            this.dialogVisible = false;
+            this.search();
+            this.localData = this.$methodsTools.getBusinessList();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       } else {
         if (!this.listData.knowledgeName) {
           this.$message.warning("请输入知识点名称");
+          this.disabledBtn = false;
           return;
         }
         var dataInfos = {
@@ -539,11 +613,16 @@ export default {
           knowledgeId: this.listData.knowledgeId,
           examKnowledgeBusinessAddBoList: this.newSujectApis,
         };
-        this.$api.editKnowledgeExam(dataInfos).then((res) => {
-          this.$message.success("修改成功");
-          this.dialogVisible = false;
-          this.search();
-        });
+        this.$api
+          .editKnowledgeExam(dataInfos)
+          .then((res) => {
+            this.$message.success("修改成功");
+            this.dialogVisible = false;
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
     },
     del(v) {

+ 74 - 22
src/views/resource/bankManagement/testPaperManagement/addPaper/baseAddPaper/index.vue

@@ -57,7 +57,7 @@
             </el-radio-group>
             <div style="display: block; text-align: center; margin-top: 10px">
               <el-button size="mini" type="primary" @click="submitSujectArray"
-                >确定</el-button
+                >关闭</el-button
               >
             </div>
             <el-button
@@ -89,6 +89,33 @@
               <i class="el-icon-error closeIcons" @click="closeType"></i>
             </div>
           </div>
+          <el-popover
+            placement="bottom-start"
+            trigger="hover"
+            :close-delay="50"
+          >
+            <ul style="margin: 0; max-width: 600px">
+              <li
+                class="copyDataLi"
+                :class="changeSty(itemT)"
+                v-for="(itemT, indexT) in localData"
+                :key="indexT"
+                @click="unTime(itemT)"
+              >
+                {{
+                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                }}
+              </li>
+            </ul>
+            <el-button
+              v-show="localData.length"
+              type="danger"
+              slot="reference"
+              size="mini"
+              style="margin-right: 10px"
+              >最近选择</el-button
+            >
+          </el-popover>
         </el-form-item>
         <el-form-item label="试卷类型" prop="examPaperId">
           <el-select
@@ -157,7 +184,10 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submitIns('listDataIns')"
+          <el-button
+            type="primary"
+            @click="submitIns('listDataIns')"
+            :loading="disabledBtn"
             >下一步</el-button
           >
         </el-form-item>
@@ -801,6 +831,7 @@ export default {
   name: "AddPaper",
   data() {
     return {
+      disabledBtn: false,
       activeName: "first",
       data1: {},
       page: 1,
@@ -1042,6 +1073,7 @@ export default {
       djTime: 0, //答卷时长
       djNumType: 0, //0无限1有限
       djNum: 0, //答卷次数
+      localData: [],
     };
   },
   computed: {
@@ -1055,18 +1087,17 @@ export default {
     },
   },
   mounted() {
-    console.log(this.cityList);
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
     this.getFns();
   },
   watch: {
-    // "listDataIns.provinceId": {
-    //   handler(newVal, oldVal) {
-    //     this.changeCity(newVal);
-    //   },
-    //   // 立即处理 进入页面就触发
-    //   immediate: true,
-    // },
+    sujectApis: {
+      immediate: true,
+      handler(newName, oldName) {
+        this.changeTypes();
+      },
+    },
     djTime: {
       handler(newVal, oldVal) {
         if (newVal === 0) {
@@ -1098,6 +1129,22 @@ export default {
     },
   },
   methods: {
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis == a) {
+        this.sujectApis = "";
+      } else {
+        this.sujectApis = a;
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      let arr1 = this.sujectApis.split("-").map(Number);
+      if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+        arr = "activeStyIcons";
+      }
+      return arr;
+    },
     getMessage() {
       if (!this.courType) {
         this.$message.warning("请先选择业务层级");
@@ -1150,7 +1197,6 @@ export default {
       });
     },
     submitSujectArray() {
-      this.changeTypes();
       this.$refs.popovers.doClose();
     },
     showHandle() {
@@ -1235,6 +1281,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var data1 = {
         examPaperId: this.listDataIns.examPaperId,
         examName: this.listDataIns.examName,
@@ -1246,18 +1293,24 @@ export default {
         year: this.listDataIns.year,
         status: 1,
       };
-      this.$api.addbankexam(data1).then((res) => {
-        this.$message.success("新增成功");
-        this.$store.dispatch("tagsView/exitView", this.$route).then(() => {
-          this.$router.push({
-            path: "topicAddPaper",
-            query: {
-              id: res.data.examId,
-              code: res.data.code,
-            },
+      this.$api
+        .addbankexam(data1)
+        .then((res) => {
+          this.$methodsTools.cacheBusinessList([this.newSujectApis]);
+          this.$message.success("新增成功");
+          this.$store.dispatch("tagsView/exitView", this.$route).then(() => {
+            this.$router.push({
+              path: "topicAddPaper",
+              query: {
+                id: res.data.examId,
+                code: res.data.code,
+              },
+            });
           });
+        })
+        .catch(() => {
+          this.disabledBtn = false;
         });
-      });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
@@ -1268,7 +1321,6 @@ export default {
     },
     closeType() {
       this.sujectApis = "";
-      this.changeTypes();
     },
     // --------------------------分割线---------------------------
     editInfo(v) {

+ 22 - 11
src/views/resource/bankManagement/testPaperManagement/addPaper/topicAddPaper/index.vue

@@ -29,7 +29,11 @@
       </table-list>
       <div class="centerStys">
         <el-button size="small" @click="backPage">取消</el-button>
-        <el-button size="small" type="primary" @click="submitTableAllInfos"
+        <el-button
+          size="small"
+          type="primary"
+          @click="submitTableAllInfos"
+          :loading="disabledBtn"
           >确定</el-button
         >
       </div>
@@ -659,6 +663,7 @@ export default {
   components: { searchBoxNew, pagination, tableList, busIns, questionBank },
   data() {
     return {
+      disabledBtn: false,
       showHide: false,
       activeName: "second",
       formList: [
@@ -1572,6 +1577,7 @@ export default {
           partScore: self.tableData[i].partScore,
         });
       }
+      this.disabledBtn = true;
       var data = {
         examId: this.$route.query.id,
         questionList: arrs,
@@ -1589,17 +1595,22 @@ export default {
       } else {
         data.answerNum = this.djNum;
       }
-      this.$api.editbankexam(data).then((res) => {
-        this.$message.success("编辑成功");
-        setTimeout(async () => {
-          await this.removeInfo();
-          this.$store.dispatch("tagsView/exitView", this.$route).then(() => {
-            this.$router.push({
-              path: "testPaperManagement",
+      this.$api
+        .editbankexam(data)
+        .then((res) => {
+          this.$message.success("编辑成功");
+          setTimeout(async () => {
+            await this.removeInfo();
+            this.$store.dispatch("tagsView/exitView", this.$route).then(() => {
+              this.$router.push({
+                path: "testPaperManagement",
+              });
             });
-          });
-        }, 500);
-      });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     removeInfo() {
       return new Promise((resolve, reject) => {

+ 21 - 11
src/views/resource/bankManagement/testPaperManagement/editPaper/baseEditPaper/index.vue

@@ -64,7 +64,7 @@
               >
             </div>
             <el-button
-            disabled
+              disabled
               slot="reference"
               style="margin-left: 12px"
               @click="getMessage"
@@ -169,6 +169,7 @@
             type="primary"
             @click="submitIns('listDataIns')"
             :disabled="!noStudent"
+            :loading="disabledBtn"
             >确定</el-button
           >
         </el-form-item>
@@ -184,6 +185,7 @@ export default {
   components: { tableList },
   data() {
     return {
+      disabledBtn: false,
       listDataIns: {
         publishStatus: 1,
         year: "",
@@ -409,6 +411,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var data1 = {
         examId: this.listDataIns.examId,
         examPaperId: this.listDataIns.examPaperId,
@@ -420,16 +423,23 @@ export default {
         cityId: this.listDataIns.cityId,
         year: this.listDataIns.year,
       };
-      this.$api.editbankexam(data1).then((res) => {
-        this.$message.success("修改成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "testPaperManagement",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .editbankexam(data1)
+        .then((res) => {
+          this.$message.success("修改成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "testPaperManagement",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 22 - 12
src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue

@@ -30,6 +30,7 @@
           type="primary"
           @click="submitTableAllInfos"
           :disabled="!noStudent"
+          :loading="disabledBtn"
           >确定</el-button
         >
         <el-button
@@ -665,6 +666,7 @@ export default {
   components: { searchBoxNew, pagination, tableList, busIns, questionBank },
   data() {
     return {
+      disabledBtn: false,
       showHide: false,
       formList: [
         // {
@@ -1630,6 +1632,7 @@ export default {
           partScore: self.tableData[i].partScore,
         });
       }
+      this.disabledBtn = true;
       var data = {
         examId: this.$route.query.id,
         questionList: arrs,
@@ -1647,18 +1650,25 @@ export default {
       } else {
         data.answerNum = this.djNum;
       }
-      this.$api.editbankexam(data).then((res) => {
-        this.localStart = false;
-        this.$message.success("修改成功");
-        setTimeout(async () => {
-          await this.removeInfo();
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "testPaperManagement",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .editbankexam(data)
+        .then((res) => {
+          this.localStart = false;
+          this.$message.success("修改成功");
+          setTimeout(async () => {
+            await this.removeInfo();
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "testPaperManagement",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     removeInfo() {
       return new Promise((resolve, reject) => {

+ 38 - 16
src/views/resource/bankManagement/topicManagement/index.vue

@@ -47,6 +47,7 @@
     />
     <!-- ------------------- -->
     <el-dialog
+      @closed="loadingClose"
       width="1080px"
       :visible.sync="innerVisiblePaperTopic"
       append-to-body
@@ -145,12 +146,14 @@
         <el-button @click="closeBefore">关 闭</el-button>
         <el-button
           @click="submitForm('listData')"
+          :loading="disabledBtn"
           v-if="statusPop === 1 || statusPop === 0"
           >完成</el-button
         >
         <el-button
           type="primary"
           v-if="statusPop === 1"
+          :loading="disabledBtn"
           @click="submitForm('listData', 1)"
           >完成,并继续添加</el-button
         >
@@ -217,6 +220,7 @@ export default {
   name: "TopicManagement",
   data() {
     return {
+      disabledBtn: false,
       statusHide: false,
       loading: false, //当前表单加载是否加载动画
       navText: {
@@ -404,6 +408,9 @@ export default {
     this.search();
   },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
     dowmModel() {
       let url = baseUrls.BASE_IMG_URL + "/oss/images/file/20220105.xlsx";
       let link = document.createElement("a");
@@ -509,6 +516,7 @@ export default {
         });
     },
     addClick(v, int) {
+      this.disabledBtn = false;
       var self = this;
       self.listNums = [];
       if (v === undefined) {
@@ -807,6 +815,7 @@ export default {
               }
             }
           }
+          this.disabledBtn = true;
           var numList = [];
           this.activeExam.map((item) => {
             numList.push(item.knowledgeId);
@@ -831,25 +840,38 @@ export default {
           }
           if (this.statusPop === 1) {
             data.status = 1;
-            this.$api.addbankquestion(data).then((res) => {
-              self.$message.success("添加成功");
-              self.innerVisiblePaperTopic = false;
-              self.statusHide = true;
-
-              self.search();
-              if (int === 1) {
-                self.addClick();
-              }
-            });
+            this.$api
+              .addbankquestion(data)
+              .then((res) => {
+                self.$methodsTools.cacheBusinessList(
+                  self.$refs.sujects.newSujectApis
+                );
+                self.$refs.sujects.UPDates();
+                self.$message.success("添加成功");
+                self.innerVisiblePaperTopic = false;
+                self.statusHide = true;
+                self.search();
+                if (int === 1) {
+                  self.addClick();
+                }
+              })
+              .catch(() => {
+                this.disabledBtn = false;
+              });
           }
           if (this.statusPop === 0) {
             data.questionId = self.questionId;
-            this.$api.editbankquestion(data).then((res) => {
-              self.$message.success("修改成功");
-              self.innerVisiblePaperTopic = false;
-              self.statusHide = true;
-              self.search();
-            });
+            this.$api
+              .editbankquestion(data)
+              .then((res) => {
+                self.$message.success("修改成功");
+                self.innerVisiblePaperTopic = false;
+                self.statusHide = true;
+                self.search();
+              })
+              .catch(() => {
+                this.disabledBtn = false;
+              });
           }
         } else {
           console.log("error submit!!");

+ 76 - 14
src/views/resource/bankManagement/volumeManagement/add/index.vue

@@ -53,7 +53,7 @@
             </el-radio-group>
             <div style="display: block; text-align: center; margin-top: 10px">
               <el-button size="mini" type="primary" @click="submitSujectArray"
-                >确定</el-button
+                >关闭</el-button
               >
             </div>
             <el-button
@@ -85,6 +85,33 @@
               <i class="el-icon-error closeIcons" @click="closeType"></i>
             </div>
           </div>
+          <el-popover
+            placement="bottom-start"
+            trigger="hover"
+            :close-delay="50"
+          >
+            <ul style="margin: 0; max-width: 600px">
+              <li
+                class="copyDataLi"
+                :class="changeSty(itemT)"
+                v-for="(itemT, indexT) in localData"
+                :key="indexT"
+                @click="unTime(itemT)"
+              >
+                {{
+                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                }}
+              </li>
+            </ul>
+            <el-button
+              v-show="localData.length"
+              type="danger"
+              slot="reference"
+              size="mini"
+              style="margin-right: 10px"
+              >最近选择</el-button
+            >
+          </el-popover>
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
           <el-input v-model="listData.prefixName"></el-input>
@@ -180,7 +207,10 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submitIns('listData')"
+          <el-button
+            type="primary"
+            @click="submitIns('listData')"
+            :loading="disabledBtn"
             >确定</el-button
           >
         </el-form-item>
@@ -294,6 +324,7 @@ export default {
   name: "VolumeManagementAdd",
   data() {
     return {
+      disabledBtn: false,
       listData: {
         publishStatus: 1,
       }, //   弹窗数据
@@ -350,17 +381,41 @@ export default {
       },
       disCheckList: [], //已选转禁用复选列表
       activeLists: [],
+      localData: [],
     };
   },
   watch: {
+    sujectApis: {
+      immediate: true,
+      handler(newName, oldName) {
+        this.changeTypes();
+      },
+    },
     newSujectApis() {
       this.tableData = [];
     },
   },
   mounted() {
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
   },
   methods: {
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis == a) {
+        this.sujectApis = "";
+      } else {
+        this.sujectApis = a;
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      let arr1 = this.sujectApis.split("-").map(Number);
+      if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+        arr = "activeStyIcons";
+      }
+      return arr;
+    },
     openBoxs() {
       if (!this.newSujectApis.subjectId) {
         this.$message.warning("请先选择科目");
@@ -443,7 +498,6 @@ export default {
       }
     },
     submitSujectArray() {
-      this.changeTypes();
       this.$refs.popovers.doClose();
     },
     showHandle() {
@@ -542,6 +596,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var chapterList = [];
       this.tableData.map((item) => {
         chapterList.push({
@@ -558,16 +613,24 @@ export default {
         businessList: [this.newSujectApis],
         status: 1,
       };
-      this.$api.addBankModule(data1).then((res) => {
-        this.$message.success("新增成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "volumeManagement",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .addBankModule(data1)
+        .then((res) => {
+          this.$methodsTools.cacheBusinessList([this.newSujectApis]);
+          this.$message.success("新增成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "volumeManagement",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
@@ -578,7 +641,6 @@ export default {
     },
     closeType() {
       this.sujectApis = "";
-      this.changeTypes();
     },
     handleSizeChange(v) {
       this.formData.pageSize = v;

+ 23 - 11
src/views/resource/bankManagement/volumeManagement/edit/index.vue

@@ -191,7 +191,10 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submitIns('listData')"
+          <el-button
+            type="primary"
+            @click="submitIns('listData')"
+            :loading="disabledBtn"
             >确定</el-button
           >
         </el-form-item>
@@ -305,6 +308,7 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       listData: {
         publishStatus: 1,
       }, //   弹窗数据
@@ -578,6 +582,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var chapterList = [];
       this.tableData.map((item) => {
         chapterList.push({
@@ -594,16 +599,23 @@ export default {
         businessList: [this.newSujectApis],
         status: 1,
       };
-      this.$api.editBankModule(data1).then((res) => {
-        this.$message.success("修改成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "volumeManagement",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .editBankModule(data1)
+        .then((res) => {
+          this.$message.success("修改成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "volumeManagement",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 59 - 2
src/views/resource/handoutManagement/handoutList/add/index.vue

@@ -91,11 +91,43 @@
               <i class="el-icon-error closeIcons" @click="closeType(index)"></i>
             </div>
           </div>
+          <el-popover
+            placement="bottom-start"
+            trigger="hover"
+            :close-delay="50"
+          >
+            <ul style="margin: 0; max-width: 600px">
+              <li
+                class="copyDataLi"
+                :class="changeSty(itemT)"
+                v-for="(itemT, indexT) in localData"
+                :key="indexT"
+                @click="unTime(itemT)"
+              >
+                {{
+                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                }}
+              </li>
+            </ul>
+            <el-button
+              v-show="localData.length"
+              type="danger"
+              slot="reference"
+              size="mini"
+              style="margin-right: 10px"
+              >最近选择</el-button
+            >
+          </el-popover>
           <el-button
             size="mini"
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
           <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
         </el-form-item>
@@ -147,7 +179,7 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submit('listData')">确定</el-button>
+          <el-button type="primary" @click="submit('listData')" :loading="disabledBtn">确定</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -159,6 +191,7 @@ export default {
   name: "HandoutListAdd",
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       blob: "", //pdf本地路径
@@ -180,6 +213,7 @@ export default {
       sujectApis: [], //当前存在的科目
       newSujectApis: [],
       sujectArray: [], //选中的科目
+      localData: [],
       //表单验证
       rules: {
         handoutsName: [
@@ -212,9 +246,28 @@ export default {
     },
   },
   mounted() {
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
   },
   methods: {
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis.includes(a)) {
+        this.sujectApis.splice(this.sujectApis.indexOf(a), 1);
+      } else {
+        this.sujectApis.push(a);
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      this.sujectApis.forEach((item) => {
+        let arr1 = item.split("-").map(Number);
+        if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+          arr = "activeStyIcons";
+        }
+      });
+      return arr;
+    },
     handleCheckedCitiesChange() {
       let nid = this.newSujectOption.map((item) => {
         return item.newId;
@@ -399,7 +452,9 @@ export default {
         dataInfos.handoutsUrl = urls;
         dataInfos.urlName = this.listData.urlName;
       }
+      this.disabledBtn = true
       this.$api.addCourseHandouts(dataInfos).then((res) => {
+        this.$methodsTools.cacheBusinessList(this.newSujectApis);
         this.$message.success("新增成功");
         setTimeout(() => {
           this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
@@ -408,7 +463,9 @@ export default {
             });
           });
         }, 500);
-      });
+      }).catch(()=>{
+          this.disabledBtn = false
+        })
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 31 - 12
src/views/resource/handoutManagement/handoutList/edit/index.vue

@@ -95,6 +95,11 @@
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
           <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
         </el-form-item>
@@ -150,7 +155,12 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submit('listData')">确定</el-button>
+          <el-button
+            type="primary"
+            @click="submit('listData')"
+            :loading="disabledBtn"
+            >确定</el-button
+          >
         </el-form-item>
       </el-form>
     </div>
@@ -162,6 +172,7 @@ export default {
   name: "HandoutListEdit",
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       blob: "", //pdf本地路径
@@ -451,18 +462,26 @@ export default {
         }
       } else {
         dataInfos.handoutsUrl = this.bfImg;
-        dataInfos.urlName = this.listData.urlName
+        dataInfos.urlName = this.listData.urlName;
       }
-      this.$api.editCourseHandouts(dataInfos).then((res) => {
-        this.$message.success("修改成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "handoutList",
-            });
-          });
-        }, 500);
-      });
+      this.disabledBtn = true;
+      this.$api
+        .editCourseHandouts(dataInfos)
+        .then((res) => {
+          this.$message.success("修改成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "handoutList",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 79 - 12
src/views/resource/videoManagement/chapter/add/index.vue

@@ -94,11 +94,43 @@
               <i class="el-icon-error closeIcons" @click="closeType(index)"></i>
             </div>
           </div>
+          <el-popover
+            placement="bottom-start"
+            trigger="hover"
+            :close-delay="50"
+          >
+            <ul style="margin: 0; max-width: 600px">
+              <li
+                class="copyDataLi"
+                :class="changeSty(itemT)"
+                v-for="(itemT, indexT) in localData"
+                :key="indexT"
+                @click="unTime(itemT)"
+              >
+                {{
+                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                }}
+              </li>
+            </ul>
+            <el-button
+              v-show="localData.length"
+              type="danger"
+              slot="reference"
+              size="mini"
+              style="margin-right: 10px"
+              >最近选择</el-button
+            >
+          </el-popover>
           <el-button
             size="mini"
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
           <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
         </el-form-item>
@@ -251,7 +283,12 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submit('listData')">确定</el-button>
+          <el-button
+            :loading="disabledBtn"
+            type="primary"
+            @click="submit('listData')"
+            >确定</el-button
+          >
         </el-form-item>
       </el-form>
     </div>
@@ -362,6 +399,7 @@ export default {
   name: "ChapterAdd",
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       //   弹窗数据
@@ -387,7 +425,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         name: [{ required: true, message: "请输入章标题", trigger: "blur" }],
         // liveDuration: [
@@ -466,6 +504,7 @@ export default {
       },
       disCheckList: [], //已选转禁用复选列表
       activeLists: [],
+      localData: [],
     };
   },
   watch: {
@@ -477,10 +516,29 @@ export default {
     },
   },
   mounted() {
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
     // this.search();
   },
   methods: {
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis.includes(a)) {
+        this.sujectApis.splice(this.sujectApis.indexOf(a), 1);
+      } else {
+        this.sujectApis.push(a);
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      this.sujectApis.forEach((item) => {
+        let arr1 = item.split("-").map(Number);
+        if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+          arr = "activeStyIcons";
+        }
+      });
+      return arr;
+    },
     handleCheckedCitiesChange() {
       let nid = this.newSujectOption.map((item) => {
         return item.newId;
@@ -744,6 +802,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var sectionIdList = [];
       this.tableData.map((item) => {
         sectionIdList.push({
@@ -760,16 +819,24 @@ export default {
         prefixName: this.listData.prefixName,
         publishStatus: this.listData.publishStatus,
       };
-      this.$api.addCoursechapter(dataInfos).then((res) => {
-        this.$message.success("新增成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "chapter",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .addCoursechapter(dataInfos)
+        .then((res) => {
+          this.$methodsTools.cacheBusinessList(this.newSujectApis);
+          this.$message.success("新增成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "chapter",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 26 - 11
src/views/resource/videoManagement/chapter/edit/index.vue

@@ -99,6 +99,11 @@
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
@@ -251,6 +256,7 @@
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
           <el-button
+            :loading="disabledBtn"
             type="primary"
             @click="submit('listData')"
             :disabled="!noStudent"
@@ -366,6 +372,7 @@ export default {
   name: "ChapterEdit",
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       //   弹窗数据
@@ -390,7 +397,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         name: [{ required: true, message: "请输入章标题", trigger: "blur" }],
         // liveDuration: [
@@ -765,6 +772,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var sectionIdList = [];
       this.tableData.map((item) => {
         sectionIdList.push({
@@ -782,16 +790,23 @@ export default {
         prefixName: this.listData.prefixName,
         publishStatus: this.listData.publishStatus,
       };
-      this.$api.editCoursechapter(dataInfos).then((res) => {
-        this.$message.success("修改成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "chapter",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .editCoursechapter(dataInfos)
+        .then((res) => {
+          this.$message.success("修改成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "chapter",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 31 - 20
src/views/resource/videoManagement/courseManagement/basicInfoAdd/index.vue

@@ -196,7 +196,11 @@
       />
       <div style="text-align: center; margin-top: 20px">
         <el-button @click="backPage" size="mini">取消</el-button>
-        <el-button type="primary" @click="submit('listData')" size="mini"
+        <el-button
+          type="primary"
+          @click="submit('listData')"
+          size="mini"
+          :loading="disabledBtn"
           >确定</el-button
         >
       </div>
@@ -212,6 +216,7 @@ export default {
   components: { Editor },
   data() {
     return {
+      disabledBtn: false,
       activeName: "first",
       uploadStatus: 2, //富文本组件传值
       active: 1,
@@ -275,7 +280,7 @@ export default {
           },
         ],
         prefixName: [
-          { required: true, message: "请输入名称前缀", trigger: "blur" },
+          { required: false, message: "请输入名称前缀", trigger: "blur" },
         ],
         courseName: [
           { required: true, message: "请输入课程名称", trigger: "blur" },
@@ -447,30 +452,36 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       this.courTypeOptions.map((item) => {
         if (item.id === this.listData.businessId) {
           this.listData.projectId = item.projectId;
         }
       });
       this.listData.status = 1;
-      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) => {});
-            });
-        }, 300);
-      });
+      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) => {});
+              });
+          }, 300);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 19 - 9
src/views/resource/videoManagement/courseManagement/basicInfoEdit/index.vue

@@ -95,7 +95,9 @@
         </el-form-item>
         <el-form-item label="课程名称" prop="courseName">
           <el-input v-model="listData.courseName"></el-input>
-          <div style="color: #999">注:请尽量规范易懂,方便在课程目录表呈现给学员</div>
+          <div style="color: #999">
+            注:请尽量规范易懂,方便在课程目录表呈现给学员
+          </div>
         </el-form-item>
 
         <el-form-item label="课程封面">
@@ -201,6 +203,7 @@
           type="primary"
           @click="submit('listData')"
           size="mini"
+          :loading="disabledBtn"
           :disabled="!noStudent"
           >确定</el-button
         >
@@ -216,6 +219,7 @@ export default {
   components: { Editor },
   data() {
     return {
+      disabledBtn: false,
       uploadStatus: 2, //富文本组件传值
       active: 1,
       //   弹窗数据
@@ -278,7 +282,7 @@ export default {
           },
         ],
         prefixName: [
-          { required: true, message: "请输入名称前缀", trigger: "blur" },
+          { required: false, message: "请输入名称前缀", trigger: "blur" },
         ],
         courseName: [
           { required: true, message: "请输入课程名称", trigger: "blur" },
@@ -320,12 +324,15 @@ export default {
       }
     },
     search() {
-      this.$api.obtainCourseS(this.$route.query.id).then((res) => {
-        this.listData = res.data;
-        this.changeBusiness();
-      }).finally(()=>{
-        this.$modal.closeLoading();
-      })
+      this.$api
+        .obtainCourseS(this.$route.query.id)
+        .then((res) => {
+          this.listData = res.data;
+          this.changeBusiness();
+        })
+        .finally(() => {
+          this.$modal.closeLoading();
+        });
     },
     changeBusiness() {
       var arrays = [];
@@ -512,6 +519,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true
       this.courTypeOptions.map((item) => {
         if (item.id === this.listData.businessId) {
           this.listData.projectId = item.projectId;
@@ -527,7 +535,9 @@ export default {
             });
           });
         }, 300);
-      });
+      }).catch(()=>{
+          this.disabledBtn = false
+        })
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 34 - 15
src/views/resource/videoManagement/courseManagement/chapterContent/index.vue

@@ -53,7 +53,11 @@
     </el-tree>
     <div class="dis-f">
       <el-button @click="backPage">取消</el-button>
-      <el-button type="primary" @click="submit" :disabled="!noStudent"
+      <el-button
+        type="primary"
+        @click="submit"
+        :disabled="!noStudent"
+        :loading="disabledBtn"
         >确定</el-button
       >
     </div>
@@ -345,6 +349,7 @@ export default {
   components: { searchBoxNew, pagination },
   data() {
     return {
+      disabledBtn: false,
       sortTablesBoxs: false,
       activeName: "second",
       status: false,
@@ -353,17 +358,17 @@ export default {
         {
           label: "试卷编码",
           prop: "code",
-          width:"120px"
+          width: "120px",
         },
         {
           label: "标题前缀",
           prop: "prefixName",
-          width:"160px"
+          width: "160px",
         },
         {
           label: "试卷标题",
           prop: "examName",
-          width:"300px"
+          width: "300px",
         },
         {
           label: "业务层级",
@@ -420,7 +425,13 @@ export default {
       tableSet: [
         { label: "编码", prop: "code", width: "120" },
         { label: "标题前缀", prop: "prefixName", width: "160" },
-        { label: "标题", prop: "moduleName", prop1: "name", scope: "teshu", width: "300" },
+        {
+          label: "标题",
+          prop: "moduleName",
+          prop1: "name",
+          scope: "teshu",
+          width: "300",
+        },
         {
           label: "发布状态",
           prop: "publishStatus",
@@ -1096,6 +1107,7 @@ export default {
       });
     },
     submit() {
+      this.disabledBtn = true;
       var array = [];
       this.tableDataInfos.map((item) => {
         array.push({
@@ -1112,16 +1124,23 @@ export default {
         menuExamList: this.menuExamList,
         menuList: array,
       };
-      this.$api.editCoursemenu(data).then((res) => {
-        this.$message.success("编辑成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "courseManagement",
-            });
-          });
-        }, 300);
-      });
+      this.$api
+        .editCoursemenu(data)
+        .then((res) => {
+          this.$message.success("编辑成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "courseManagement",
+                });
+              });
+          }, 300);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
   },
 };

+ 61 - 11
src/views/resource/videoManagement/festival/add/index.vue

@@ -94,11 +94,43 @@
               <i class="el-icon-error closeIcons" @click="closeType(index)"></i>
             </div>
           </div>
+          <el-popover
+            placement="bottom-start"
+            trigger="hover"
+            :close-delay="50"
+          >
+            <ul style="margin: 0; max-width: 600px">
+              <li
+                class="copyDataLi"
+                :class="changeSty(itemT)"
+                v-for="(itemT, indexT) in localData"
+                :key="indexT"
+                @click="unTime(itemT)"
+              >
+                {{
+                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                }}
+              </li>
+            </ul>
+            <el-button
+              v-show="localData.length"
+              type="danger"
+              slot="reference"
+              size="mini"
+              style="margin-right: 10px"
+              >最近选择</el-button
+            >
+          </el-popover>
           <el-button
             size="mini"
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
           <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
         </el-form-item>
@@ -314,7 +346,7 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submit('listData')">确定</el-button>
+          <el-button type="primary" @click="submit('listData')" :loading="disabledBtn">确定</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -367,6 +399,7 @@ export default {
   name: "FestivalAdd",
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
@@ -427,10 +460,11 @@ export default {
       newSujectApis: [],
       sujectArray: [], //选中的科目
       disabloutime: false,
+      localData: [], //缓存数据
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         name: [{ required: true, message: "请输入节标题", trigger: "blur" }],
         // liveDuration: [
@@ -451,18 +485,29 @@ export default {
       },
     },
   },
-  // computed: {
-  //   compTimes() {
-  //     const aTime = 192;
-  //     let chasTime = this.$methodsTools.secondToDate(aTime, false);
-  //     console.log(chasTime);
-  //     return `00:00:00 - ${chasTime}`;
-  //   },
-  // },
   mounted() {
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
   },
   methods: {
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis.includes(a)) {
+        this.sujectApis.splice(this.sujectApis.indexOf(a), 1);
+      } else {
+        this.sujectApis.push(a);
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      this.sujectApis.forEach((item) => {
+        let arr1 = item.split("-").map(Number);
+        if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+          arr = "activeStyIcons";
+        }
+      });
+      return arr;
+    },
     handleCheckedCitiesChange() {
       let nid = this.newSujectOption.map((item) => {
         return item.newId;
@@ -872,6 +917,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true
       var dataInfos = {
         status: 1,
         businessList: this.newSujectApis,
@@ -898,6 +944,7 @@ export default {
           dataInfos.liveEndTime < dataInfos.liveStartTime
         ) {
           this.$message.warning("请检查直播开始与结束时间范围");
+          this.disabledBtn = false
           return;
         }
         dataInfos.durationTime =
@@ -918,6 +965,7 @@ export default {
         );
       }
       this.$api.appCourseSection(dataInfos).then((res) => {
+        this.$methodsTools.cacheBusinessList(this.newSujectApis);
         this.$message.success("新增成功");
         setTimeout(() => {
           this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
@@ -926,7 +974,9 @@ export default {
             });
           });
         }, 500);
-      });
+      }).catch(()=>{
+          this.disabledBtn = false
+        })
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 77 - 43
src/views/resource/videoManagement/festival/edit/index.vue

@@ -22,7 +22,7 @@
             >
             </el-option>
           </el-select>
-          <el-select
+          <!-- <el-select
             v-model="courType"
             placeholder="请选择业务层次"
             @change="changecourseType"
@@ -34,6 +34,25 @@
               :value="item.id"
             >
             </el-option>
+          </el-select> -->
+          <el-select
+            v-model="courType"
+            placeholder="请选择业务层次"
+            @change="changecourseType"
+          >
+            <el-option-group
+              v-for="(item, index) in newCourTypeOptions"
+              :key="index"
+              :label="item.label"
+            >
+              <el-option
+                v-for="(items, indexs) in item.options"
+                :key="indexs"
+                :label="items.projectName + ' - ' + items.businessName"
+                :value="items.id"
+              >
+              </el-option>
+            </el-option-group>
           </el-select>
           <el-popover
             ref="popovers"
@@ -99,6 +118,11 @@
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
           <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
         </el-form-item>
@@ -317,6 +341,7 @@
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
           <el-button
+            :loading="disabledBtn"
             type="primary"
             @click="submit('listData')"
             :disabled="!noStudent"
@@ -375,6 +400,7 @@ export default {
   name: "FestivalEdit",
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
@@ -436,7 +462,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         name: [{ required: true, message: "请输入节标题", trigger: "blur" }],
         // liveDuration: [
@@ -853,9 +879,9 @@ export default {
     },
     businTys() {
       return new Promise((resolve, reject) => {
-        this.$api.inquirebusinessList({ status: 1 }).then((res) => {
-          this.courTypeOptions = res.rows;
-          this.newCourTypeOptions = res.rows;
+        this.$methodsTools.concatList(true).then((res) => {
+          this.courTypeOptions = res.value;
+          this.newCourTypeOptions = res.options;
           resolve();
         });
       });
@@ -899,38 +925,37 @@ export default {
         });
       });
     },
-    changeEduType() {
-      if (!(this.courType === undefined || this.courType === "")) {
-        this.courType = "";
-      }
-      var arrays = [];
-      this.courTypeOptions.map((item) => {
-        if (item.educationId === this.eduType) {
-          arrays.push(item);
-        }
+    changeEduType(v) {
+      this.$methodsTools.concatList(false, v).then((res) => {
+        this.newCourTypeOptions = res.options;
       });
-      this.newCourTypeOptions = arrays;
+      this.courType = "";
     },
-    changecourseType() {
-      this.newCourTypeOptions.map((item, index) => {
-        if (item.id === this.courType) {
-          this.eduType = item.educationId;
-          var array = [];
-          this.sujectOption.map((items, indexs) => {
-            if (items.courseArrays.indexOf(item.projectId) !== -1) {
-              array.push(items);
-            }
-          });
-          this.newSujectOption = array;
-        }
+    changecourseType(ids) {
+      /**
+       * 进入缓存方法
+       */
+      this.$methodsTools.cacheBusinessList(ids);
+      /**
+       * 查找选中的业务层次对应的教育类型ID 并筛选出对应业务层级列表
+       */
+      let idArr = this.courTypeOptions.find((item) => {
+        return item.id == ids;
       });
-      var arrays = [];
-      this.courTypeOptions.map((item) => {
-        if (item.educationId === this.eduType) {
-          arrays.push(item);
-        }
+      this.eduType = idArr.educationId;
+      this.$methodsTools.concatList(false, idArr.educationId).then((res) => {
+        this.newCourTypeOptions = res.options;
       });
-      this.newCourTypeOptions = arrays;
+      /**
+       * 筛选科目
+       */
+      var array = this.sujectOption.filter((items, indexs) => {
+        return items.courseArrays.includes(idArr.projectId);
+      });
+      this.newSujectOption = array;
+      /**
+       * 关闭科目弹窗
+       */
       this.$refs.popovers.doClose();
     },
     submit(formName) {
@@ -951,6 +976,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var dataInfos = {
         status: 1,
         sectionId: this.$route.query.id,
@@ -978,6 +1004,7 @@ export default {
           dataInfos.liveEndTime < dataInfos.liveStartTime
         ) {
           this.$message.warning("请检查直播开始与结束时间范围");
+          this.disabledBtn = false;
           return;
         }
         dataInfos.durationTime =
@@ -997,16 +1024,23 @@ export default {
           this.listData.durationTime
         );
       }
-      this.$api.editCourseSection(dataInfos).then((res) => {
-        this.$message.success("修改成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "festival",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .editCourseSection(dataInfos)
+        .then((res) => {
+          this.$message.success("修改成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "festival",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 44 - 5
src/views/resource/videoManagement/festival/index.vue

@@ -86,6 +86,39 @@
         <!-- <el-button type="primary" @click="submitChecksDR">确定</el-button> -->
       </span>
     </el-dialog>
+    <el-dialog
+      append-to-body
+      :visible.sync="dialogERROR"
+      width="660px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">提示</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="dialogERROR = false"
+          />
+        </div>
+      </div>
+      <div>
+        <h4 style="margin-top: 0px; font-weight: bold; text-align: center">
+          导入失败原因
+        </h4>
+        <el-input
+          readonly
+          type="textarea"
+          :autosize="{ minRows: 6, maxRows: 24 }"
+          v-model="errorData"
+        >
+        </el-input>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogERROR = false">确定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -239,8 +272,8 @@ export default {
         {
           label: "URL地址/直播地址",
           prop: "sectionType",
-          prop1:"recordingUrl",
-          prop2:"liveUrl",
+          prop1: "recordingUrl",
+          prop2: "liveUrl",
           hidden: true,
           scope: "liveAndUrl",
         },
@@ -269,6 +302,8 @@ export default {
       total: 0, //一共多少条
       pageSize: 10, //每页多少条数据
       currentPage: 1, //当前页码
+      errorData: "", //导入错误原因
+      dialogERROR: false,
     };
   },
   mounted() {
@@ -297,9 +332,13 @@ export default {
         .drCourseSectionimportData(formData)
         .then((res) => {
           if (res.code === 200) {
-            self.$message.success("导入成功");
-          }else{
-            
+            if (!res.msg) {
+              self.$message.success("导入成功");
+              self.dialogDR = false;
+            } else {
+              self.errorData = res.msg;
+              self.dialogERROR = true;
+            }
           }
         })
         .finally(() => {

+ 32 - 11
src/views/resource/videoManagement/flow/index.vue

@@ -40,6 +40,7 @@
       @handleCurrentChange="handleCurrentChange"
     />
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogVisible"
       width="630px"
       :show-close="false"
@@ -111,6 +112,11 @@
                   v-if="zhType.length > 1"
                   @click="changeType"
                   >{{ changeHeight ? "展开" : "关闭" }}</el-button
+                ><el-button
+                  size="mini"
+                  v-if="cauType.length > 0"
+                  @click="allclear"
+                  >清空</el-button
                 >
               </div>
               <div
@@ -132,7 +138,6 @@
                 </el-select>
                 <el-popover
                   placement="bottom"
-                  width="200"
                   trigger="click"
                   :disabled="eduType ? false : true"
                 >
@@ -209,6 +214,7 @@
         <el-button
           type="primary"
           v-if="statusPop !== 2"
+          :loading="disabledBtn"
           @click="submit('listData')"
           >确 定</el-button
         >
@@ -563,6 +569,10 @@ export default {
       });
       this.del(ary, true);
     },
+    allclear(){
+      this.cauType = []
+      this.handleCheckedCitiesChange()
+    },
     handleCheckedCitiesChange() {
       let nid = this.itemOption2.map((item) => {
         return item.id;
@@ -832,6 +842,7 @@ export default {
       });
     },
     rulesTableSumbit() {
+      this.disabledBtn = true;
       var pushRays = [];
       this.zhType.map((item) => {
         pushRays.push({
@@ -863,19 +874,29 @@ export default {
         dataInfos.playbackUrl = this.listData.playbackUrl;
       }
       if (this.statusPop === 1) {
-        this.$api.appCourseStreaming(dataInfos).then((res) => {
-          this.$message.success("新增成功");
-          this.dialogVisible = false;
-          this.search();
-        });
+        this.$api
+          .appCourseStreaming(dataInfos)
+          .then((res) => {
+            this.$message.success("新增成功");
+            this.dialogVisible = false;
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
       if (this.statusPop === 0) {
         dataInfos.id = this.listData.id;
-        this.$api.editCourseBusinessCourseStreaming(dataInfos).then((res) => {
-          this.$message.success("修改成功");
-          this.dialogVisible = false;
-          this.search();
-        });
+        this.$api
+          .editCourseBusinessCourseStreaming(dataInfos)
+          .then((res) => {
+            this.$message.success("修改成功");
+            this.dialogVisible = false;
+            this.search();
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
     },
     close() {

+ 79 - 12
src/views/resource/videoManagement/moduleManagement/add/index.vue

@@ -93,11 +93,43 @@
               <i class="el-icon-error closeIcons" @click="closeType(index)"></i>
             </div>
           </div>
+          <el-popover
+            placement="bottom-start"
+            trigger="hover"
+            :close-delay="50"
+          >
+            <ul style="margin: 0; max-width: 600px">
+              <li
+                class="copyDataLi"
+                :class="changeSty(itemT)"
+                v-for="(itemT, indexT) in localData"
+                :key="indexT"
+                @click="unTime(itemT)"
+              >
+                {{
+                  `${itemT.educationName}-${itemT.projectName}-${itemT.businessName}-${itemT.subjectName}`
+                }}
+              </li>
+            </ul>
+            <el-button
+              v-show="localData.length"
+              type="danger"
+              slot="reference"
+              size="mini"
+              style="margin-right: 10px"
+              >最近选择</el-button
+            >
+          </el-popover>
           <el-button
             size="mini"
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
         </el-form-item>
         <el-form-item label="标题前缀" prop="prefixName">
@@ -249,7 +281,12 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submit('listData')">确定</el-button>
+          <el-button
+            type="primary"
+            @click="submit('listData')"
+            :loading="disabledBtn"
+            >确定</el-button
+          >
         </el-form-item>
       </el-form>
     </div>
@@ -360,6 +397,7 @@ export default {
   name: "ModuleManagementAdd",
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       //   弹窗数据
@@ -385,7 +423,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         moduleName: [
           { required: true, message: "请输入节标题", trigger: "blur" },
@@ -460,6 +498,7 @@ export default {
       },
       disCheckList: [], //已选转禁用复选列表
       activeLists: [],
+      localData: [],
     };
   },
   watch: {
@@ -471,10 +510,29 @@ export default {
     },
   },
   mounted() {
+    this.localData = this.$methodsTools.getBusinessList();
     this.getDict();
     // this.search();
   },
   methods: {
+    unTime(val) {
+      let a = `${val.businessId}-${val.subjectId}`;
+      if (this.sujectApis.includes(a)) {
+        this.sujectApis.splice(this.sujectApis.indexOf(a), 1);
+      } else {
+        this.sujectApis.push(a);
+      }
+    },
+    changeSty(val) {
+      var arr = "";
+      this.sujectApis.forEach((item) => {
+        let arr1 = item.split("-").map(Number);
+        if (val.businessId == arr1[0] && val.subjectId == arr1[1]) {
+          arr = "activeStyIcons";
+        }
+      });
+      return arr;
+    },
     handleCheckedCitiesChange() {
       let nid = this.newSujectOption.map((item) => {
         return item.newId;
@@ -740,6 +798,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var chapterIdList = [];
       this.tableData.map((item) => {
         chapterIdList.push({
@@ -756,16 +815,24 @@ export default {
         prefixName: this.listData.prefixName,
         publishStatus: this.listData.publishStatus,
       };
-      this.$api.addCoursemodule(dataInfos).then((res) => {
-        this.$message.success("新增成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "moduleManagement",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .addCoursemodule(dataInfos)
+        .then((res) => {
+          this.$methodsTools.cacheBusinessList(this.newSujectApis);
+          this.$message.success("新增成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "moduleManagement",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 26 - 11
src/views/resource/videoManagement/moduleManagement/edit/index.vue

@@ -98,6 +98,11 @@
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
+          ><el-button
+            size="mini"
+            v-if="newSujectApis.length > 0"
+            @click="sujectApis = []"
+            >清空</el-button
           >
           <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
         </el-form-item>
@@ -251,6 +256,7 @@
         <el-form-item>
           <el-button @click="backPage">取消</el-button>
           <el-button
+            :loading="disabledBtn"
             type="primary"
             @click="submit('listData')"
             :disabled="!noStudent"
@@ -366,6 +372,7 @@ export default {
   components: { searchBoxNew, pagination },
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       //   弹窗数据
@@ -390,7 +397,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         moduleName: [
           { required: true, message: "请输入节标题", trigger: "blur" },
@@ -763,6 +770,7 @@ export default {
       });
     },
     async rulesTableSumbit() {
+      this.disabledBtn = true;
       var chapterIdList = [];
       this.tableData.map((item) => {
         chapterIdList.push({
@@ -780,16 +788,23 @@ export default {
         prefixName: this.listData.prefixName,
         publishStatus: this.listData.publishStatus,
       };
-      this.$api.editCoursemodule(dataInfos).then((res) => {
-        this.$message.success("修改成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "moduleManagement",
-            });
-          });
-        }, 500);
-      });
+      this.$api
+        .editCoursemodule(dataInfos)
+        .then((res) => {
+          this.$message.success("修改成功");
+          setTimeout(() => {
+            this.$store
+              .dispatch("tagsView/exitView", this.$route)
+              .then((res) => {
+                this.$router.push({
+                  path: "moduleManagement",
+                });
+              });
+          }, 500);
+        })
+        .catch(() => {
+          this.disabledBtn = false;
+        });
     },
     backPage() {
       this.$store.dispatch("tagsView/delView", this.$route).then((res) => {

+ 28 - 11
src/views/systemManagement/accountManagement/index.vue

@@ -27,6 +27,7 @@
       :show-close="false"
       :close-on-click-modal="false"
       @close="onClose"
+      @closed="loadingClose"
     >
       <div slot="title" class="hearders">
         <div class="leftTitle">
@@ -127,6 +128,7 @@
         <el-button
           type="primary"
           v-if="statusPop !== 2"
+          :loading="disabledBtn"
           @click="submit('listData')"
           >确 定</el-button
         >
@@ -141,10 +143,11 @@ import searchBox from "@/components/searchBox";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 export default {
-  name:"AccountManagement",
+  name: "AccountManagement",
   components: { searchBox, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "账号管理",
@@ -280,6 +283,9 @@ export default {
     this.search();
   },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
     search(v) {
       this.loading = true;
       var data = {
@@ -356,18 +362,29 @@ export default {
     submit(formName) {
       this.$refs[formName].validate((valid) => {
         if (!valid) return;
+        this.disabledBtn = true;
         if (this.listData.userId) {
-          this.$api.editUser(this.listData).then((res) => {
-            this.$message.success("修改成功");
-            this.search();
-            this.close();
-          });
+          this.$api
+            .editUser(this.listData)
+            .then((res) => {
+              this.$message.success("修改成功");
+              this.search();
+              this.close();
+            })
+            .catch(() => {
+              this.disabledBtn = false;
+            });
         } else {
-          this.$api.addUser(this.listData).then((res) => {
-            this.$message.success("新增成功");
-            this.search();
-            this.close();
-          });
+          this.$api
+            .addUser(this.listData)
+            .then((res) => {
+              this.$message.success("新增成功");
+              this.search();
+              this.close();
+            })
+            .catch(() => {
+              this.disabledBtn = false;
+            });
         }
       });
     },

+ 34 - 17
src/views/systemManagement/roleManagement/index.vue

@@ -26,6 +26,7 @@
       @handleCurrentChange="handleCurrentChange"
     />
     <el-dialog
+      @closed="loadingClose"
       :visible.sync="dialogVisible"
       width="460px"
       :show-close="false"
@@ -145,6 +146,7 @@
         <el-button @click="close">取 消</el-button>
         <el-button
           type="primary"
+          :loading="disabledBtn"
           v-if="statusPop !== 2"
           @click="submit('listData')"
           >确 定</el-button
@@ -159,10 +161,11 @@ import searchBox from "@/components/searchBox";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 export default {
-  name:"RoleManagement",
+  name: "RoleManagement",
   components: { searchBox, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       keys: [],
       loading: false, //当前表单加载是否加载动画
       navText: {
@@ -324,6 +327,9 @@ export default {
     this.search();
   },
   methods: {
+    loadingClose() {
+      this.disabledBtn = false;
+    },
     search(v) {
       this.loading = true;
       if (v === undefined) {
@@ -469,28 +475,39 @@ export default {
       });
     },
     rulesTableSumbit() {
+      this.disabledBtn = true;
       this.listData.menuIds = this.getMenuAllCheckedKeys();
       this.listData.businessIds = this.getMenuAllCheckedKeysInfo();
       var data = this.listData;
       if (this.statusPop === 1) {
-        this.$api.addRole(data).then((res) => {
-          if (res.code === 200) {
-            this.$message.success("新增成功");
-            this.search();
-            this.$store.commit("EDICROLELIST");
-            this.dialogVisible = false;
-          }
-        });
+        this.$api
+          .addRole(data)
+          .then((res) => {
+            if (res.code === 200) {
+              this.$message.success("新增成功");
+              this.search();
+              this.$store.commit("EDICROLELIST");
+              this.dialogVisible = false;
+            }
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
       if (this.statusPop === 0) {
-        this.$api.editRole(data).then((res) => {
-          if (res.code === 200) {
-            this.$message.success("修改成功");
-            this.search();
-            this.$store.commit("EDICROLELIST");
-            this.dialogVisible = false;
-          }
-        });
+        this.$api
+          .editRole(data)
+          .then((res) => {
+            if (res.code === 200) {
+              this.$message.success("修改成功");
+              this.search();
+              this.$store.commit("EDICROLELIST");
+              this.dialogVisible = false;
+            }
+          })
+          .catch(() => {
+            this.disabledBtn = false;
+          });
       }
     },
     close() {