Parcourir la source

fiex:修复BUG及优化

Tang il y a 3 ans
Parent
commit
8da3e0ef5a

+ 36 - 10
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"
@@ -92,6 +93,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
@@ -234,6 +240,7 @@
         <el-button @click="close">取 消</el-button>
         <el-button
           type="primary"
+          :loading="disabledBtn"
           v-if="statusPop !== 2"
           @click="submit('listData')"
           >确 定</el-button
@@ -809,6 +816,7 @@ export default {
   components: { searchBoxNew, tableList, pagination },
   data() {
     return {
+      disabledBtn: false,
       isIndeterminate: false,
       checkAll: false,
       changeHeight: true,
@@ -1105,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;
@@ -1656,6 +1671,7 @@ export default {
       });
     },
     rulesTableSumbit() {
+      this.disabledBtn = true;
       var data = JSON.parse(JSON.stringify(this.listData));
       var pushRays = [];
       this.zhType.map((item) => {
@@ -1670,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() {

+ 5 - 0
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>

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

@@ -425,7 +425,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         name: [{ required: true, message: "请输入章标题", trigger: "blur" }],
         // liveDuration: [

+ 6 - 1
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">
@@ -392,7 +397,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         name: [{ required: true, message: "请输入章标题", trigger: "blur" }],
         // liveDuration: [

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

@@ -280,7 +280,7 @@ export default {
           },
         ],
         prefixName: [
-          { required: true, message: "请输入名称前缀", trigger: "blur" },
+          { required: false, message: "请输入名称前缀", trigger: "blur" },
         ],
         courseName: [
           { required: true, message: "请输入课程名称", trigger: "blur" },

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

@@ -282,7 +282,7 @@ export default {
           },
         ],
         prefixName: [
-          { required: true, message: "请输入名称前缀", trigger: "blur" },
+          { required: false, message: "请输入名称前缀", trigger: "blur" },
         ],
         courseName: [
           { required: true, message: "请输入课程名称", trigger: "blur" },

+ 0 - 1159
src/views/resource/videoManagement/festival/add/index copy.vue

@@ -1,1159 +0,0 @@
-<template>
-  <div id="festivalAdd">
-    <div class="boxWidth">
-      <el-form
-        label-position="right"
-        label-width="120px"
-        :model="listData"
-        :rules="rules"
-        ref="listData"
-      >
-        <el-form-item label="适用业务层级">
-          <el-select
-            v-model="eduType"
-            placeholder="请选择教育类型"
-            @change="changeEduType"
-          >
-            <el-option
-              v-for="(item, index) in eduTypeOptions"
-              :key="index"
-              :label="item.educationName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <!-- <el-select
-            v-model="courType"
-            placeholder="请选择业务层次"
-            @change="changecourseType"
-          >
-            <el-option
-              v-for="(item, index) in newCourTypeOptions"
-              :key="index"
-              :label="item.projectName + '-' + item.businessName"
-              :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"
-            placement="bottom"
-            trigger="click"
-            @show="showHandle"
-            @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-for="(item, index) in newSujectOption"
-                :label="item.newId"
-                :key="index"
-                >{{ item.subjectName }}</el-checkbox
-              >
-            </el-checkbox-group>
-            <div style="display: block; text-align: center; margin-top: 10px">
-              <el-button size="mini" type="primary" @click="submitSujectArray"
-                >确定</el-button
-              >
-            </div>
-            <el-button
-              slot="reference"
-              style="margin-left: 12px"
-              @click="getMessage"
-              >请选择科目</el-button
-            >
-          </el-popover>
-          <span style="margin-left: 10px">注:可多选</span>
-        </el-form-item>
-        <el-form-item label="">
-          <div :class="changeHeight ? 'ach' : 'clh'">
-            <div
-              v-for="(item, index) in newSujectApis"
-              :key="index"
-              class="listBoxStys"
-            >
-              {{
-                item.educationName +
-                " - " +
-                item.projectName +
-                " - " +
-                item.businessName +
-                " - " +
-                item.subjectName
-              }}
-              <i class="el-icon-error closeIcons" @click="closeType(index)"></i>
-            </div>
-          </div>
-          <el-button
-            size="mini"
-            v-if="newSujectApis.length > 1"
-            @click="changeType"
-            >{{ changeHeight ? "展开" : "关闭" }}</el-button
-          ><el-button
-            size="mini"
-            type="danger"
-            v-if="newSujectApis.length > 0"
-            @click="sujectApis = []"
-            >清空</el-button
-          >
-          <!-- <span v-if="newSujectApis.length === 0">未选项目类型</span> -->
-        </el-form-item>
-        <el-form-item label="标题前缀" prop="prefixName">
-          <el-input v-model="listData.prefixName"></el-input>
-          <div style="color: #999">注:便于检索、归类,以及区分一样的标题</div>
-        </el-form-item>
-        <el-form-item label="节标题" prop="name">
-          <el-input v-model="listData.name"></el-input>
-          <div style="color: #999">
-            注:请尽量规范易懂,方便在课程目录表呈现给学员
-          </div>
-        </el-form-item>
-        <el-form-item label="节类型">
-          <el-select
-            clearable
-            v-model="listData.sectionType"
-            placeholder="请选择节类型"
-          >
-            <el-option
-              v-for="(item, index) in sectionTypeOptions"
-              :key="index"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="直播地址" v-if="listData.sectionType === 2">
-          <el-input
-            style="width: 300px"
-            v-model="listData.liveUrl"
-            placeholder="请输入直播地址"
-          ></el-input>
-          <el-select
-            v-model="newActiveLiveUrl"
-            placeholder="快捷选中直播地址"
-            @change="changeLiveUrl"
-          >
-            <el-option
-              v-for="(item, index) in newLiveUrl"
-              :key="index"
-              :label="item.streamingName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <div v-if="listData.liveUrl" style="margin-top: 10px">
-            <el-button
-              size="small"
-              type="warning"
-              @click="watchZbVideo(listData.liveUrl)"
-              >直播预览</el-button
-            >
-          </div>
-        </el-form-item>
-        <el-form-item label="直播开始时间" v-if="listData.sectionType === 2">
-          <el-date-picker
-            v-model="listData.liveStartTime"
-            type="datetime"
-            placeholder="请选择直播开始时间"
-            value-format="timestamp"
-          >
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="直播结束时间" v-if="listData.sectionType === 2">
-          <el-date-picker
-            v-model="listData.liveEndTime"
-            type="datetime"
-            placeholder="请选择直播结束时间"
-            value-format="timestamp"
-          >
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item
-          label="直播时长"
-          v-if="
-            listData.sectionType === 2 &&
-            listData.liveStartTime &&
-            listData.liveEndTime
-          "
-        >
-          {{ compTimeOUT(listData.liveStartTime, listData.liveEndTime) }}
-        </el-form-item>
-        <el-form-item
-          label="URL地址"
-          v-if="listData.sectionType === 1 || listData.sectionType === 3"
-        >
-          <el-input
-            style="width: 300px"
-            v-model="listData.recordingUrl"
-            placeholder="请输入URL地址"
-            @change="getApiTime(listData.recordingUrl)"
-          ></el-input>
-          <label
-            for="mobles"
-            class="el-button el-button--primary"
-            style="margin: 0px 6px; padding: 10px 20px"
-            >上传</label
-          ><input
-            style="display: none"
-            type="file"
-            id="mobles"
-            @change="importMoble"
-          />
-          <el-select
-            v-if="listData.sectionType === 1"
-            v-model="newActiveRecordingUrl1"
-            filterable
-            placeholder="快捷选中录播URL地址"
-            @change="changeRecordingUrl1"
-          >
-            <el-option
-              v-for="(item, index) in newSteamUrl1"
-              :key="index"
-              :label="item.streamingName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <el-select
-            v-if="listData.sectionType === 3"
-            v-model="newActiveRecordingUrl2"
-            placeholder="快捷选中回放URL地址"
-            filterable
-            @change="changeRecordingUrl2"
-          >
-            <el-option
-              v-for="(item, index) in newSteamUrl2"
-              :key="index"
-              :label="item.streamingName"
-              :value="item.id"
-            >
-            </el-option>
-          </el-select>
-          <div v-if="listData.recordingUrl" style="margin-top: 10px">
-            <el-button
-              size="small"
-              type="warning"
-              @click="watchVideo(listData.recordingUrl)"
-              >视频预览</el-button
-            >
-          </div>
-        </el-form-item>
-        <el-form-item
-          label="节时长"
-          v-if="listData.sectionType === 1 || listData.sectionType === 3"
-        >
-          <el-time-picker
-            :disabled="disabloutime"
-            value-format="HH:mm:ss"
-            range-separator=":"
-            v-model="listData.durationTime"
-            placeholder="请填入节时长"
-          >
-          </el-time-picker>
-        </el-form-item>
-        <el-form-item label="节封面">
-          <el-row :gutter="10" style="margin-bottom: 10px">
-            <el-col :span="12">
-              <div
-                style="
-                  width: 100%;
-                  height: 150px;
-                  border: 2px dashed #999;
-                  border-radius: 28px;
-                  line-height: 150px;
-                  text-align: center;
-                "
-                v-if="!listData.coverUrl"
-              >
-                <label for="uplose">
-                  <i class="el-icon-circle-plus-outline iconStsz"></i
-                ></label>
-                <input
-                  ref="file"
-                  type="file"
-                  style="display: none"
-                  id="uplose"
-                  @change="getImgFile"
-                />
-              </div>
-              <el-image
-                v-else
-                style="width: 100%"
-                :src="$methodsTools.splitImgHost(listData.coverUrl)"
-                :preview-src-list="[
-                  $methodsTools.splitImgHost(listData.coverUrl),
-                ]"
-              >
-              </el-image>
-            </el-col>
-            <el-col :span="11">
-              <span style="color: #999; font-size: 14px"
-                >注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型</span
-              >
-            </el-col>
-          </el-row>
-          <el-button
-            v-if="listData.coverUrl"
-            type="danger"
-            size="mini"
-            class="margin-top: 20px;"
-            @click="clearImgs"
-            >删除</el-button
-          >
-        </el-form-item>
-        <el-form-item label="是否发布" prop="publishStatus">
-          <el-radio-group v-model="listData.publishStatus">
-            <el-radio :label="1">是</el-radio>
-            <el-radio :label="0">否</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item>
-          <el-button @click="backPage">取消</el-button>
-          <el-button type="primary" @click="submit('listData')">确定</el-button>
-        </el-form-item>
-      </el-form>
-    </div>
-    <el-dialog
-      :visible.sync="diavos"
-      width="840px"
-      @opened="isOkBf"
-      :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="clears" />
-        </div>
-      </div>
-      <div>
-        <div id="player"></div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="clears">取 消</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog
-      :visible.sync="diavoszb"
-      width="840px"
-      @opened="isOkBfzb"
-      :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="clearszb" />
-        </div>
-      </div>
-      <div>
-        <div id="playerzb"></div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="clearszb">取 消</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { uploadFile } from "@/utils/uopladFile.js";
-export default {
-  name: "FestivalAdd",
-  data() {
-    return {
-      isIndeterminate: false,
-      checkAll: false,
-      vodPlayerJs: "https://player.polyv.net/script/player.js",
-      vid: "",
-      playerJs:
-        "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
-      uidzb: "egsxlptzdq",
-      vidzb: "",
-      diavos: false,
-      diavoszb: false,
-      fileSetting: {
-        desc: "i am desc", // 描述
-        cataid: "1639399775001", // 分类ID 可以后端传递 也可以不写 或写死
-        tag: "i am tag", // 标签
-        luping: 0, // 是否开启视频课件优化处理,对于上传录屏类视频清晰度有所优化:0为不开启,1为开启
-        keepsource: 1, // 是否源文件播放(不对视频进行编码):0为编码,1为不编码
-      },
-      sectionTypeOptions: [
-        {
-          label: "录播",
-          value: 1,
-        },
-        {
-          label: "直播",
-          value: 2,
-        },
-        // {
-        //   label: "回放",
-        //   value: 3,
-        // },
-      ],
-      //   弹窗数据
-      changeHeight: true,
-      bfImg: "oss/images/avatar/20211013/1634097664410_1397766697",
-      listData: {
-        durationTime: "",
-        sectionType: 1,
-        publishStatus: 1,
-        recordingUrl: "",
-        liveUrl: "",
-        coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
-      },
-      newActiveLiveUrl: "",
-      newLiveUrl: [], //直播流地址
-      newActiveRecordingUrl1: "",
-      newSteamUrl1: [], //录播流地址
-      newActiveRecordingUrl2: "",
-      newSteamUrl2: [], //回放流地址
-      eduTypeOptions: [], //教育类型数据
-      courTypeOptions: [], //业务层次数据
-      newCourTypeOptions: [], //当前业务层次数据
-      sujectOption: [], //科目数据
-      newSujectOption: [], //当前科目数据数据
-      eduType: "", //当前选中教育类型
-      courType: "", //当前选中业务层次
-      sujectApis: [], //当前存在的科目
-      newSujectApis: [],
-      sujectArray: [], //选中的科目
-      disabloutime: false,
-      //表单验证
-      rules: {
-        prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
-        ],
-        name: [{ required: true, message: "请输入节标题", trigger: "blur" }],
-        // liveDuration: [
-        //   { required: true, message: "节时长不能为空" },
-        //   { type: "number", message: "节时长必须为数字值" },
-        // ],
-        publishStatus: [
-          { required: true, message: "请选择是否发布", trigger: "change" },
-        ],
-      },
-    };
-  },
-  watch: {
-    sujectApis: {
-      immediate: true,
-      handler(newName, oldName) {
-        this.changeTypes();
-      },
-    },
-  },
-  // computed: {
-  //   compTimes() {
-  //     const aTime = 192;
-  //     let chasTime = this.$methodsTools.secondToDate(aTime, false);
-  //     console.log(chasTime);
-  //     return `00:00:00 - ${chasTime}`;
-  //   },
-  // },
-  mounted() {
-    this.getDict();
-  },
-  methods: {
-    handleCheckedCitiesChange() {
-      let nid = this.newSujectOption.map((item) => {
-        return item.newId;
-      });
-      this.checkAll = this.sujectArray.length === nid.length;
-      this.isIndeterminate =
-        this.sujectArray.length > 0 && this.sujectArray.length < nid.length;
-    },
-    setFunc(arr) {
-      var arrays = [];
-      for (let i = 0; i < arr.length; i++) {
-        if (!arrays.includes(arr[i])) {
-          arrays.push(arr[i]);
-        }
-      }
-      return arrays;
-    },
-    handleCheckAllChange(val) {
-      if (val) {
-        let nid = this.newSujectOption.map((item) => {
-          return item.newId;
-        });
-        let arrays = this.sujectArray.concat(nid);
-        this.sujectArray = this.setFunc(arrays);
-        this.isIndeterminate = false;
-      } else {
-        let nid = this.newSujectOption.map((item) => {
-          return item.newId;
-        });
-        let newArr = [];
-        this.sujectArray.forEach((item) => {
-          if (!nid.includes(item)) {
-            newArr.push(item);
-          }
-        });
-        this.sujectArray = newArr;
-        this.isIndeterminate = false;
-      }
-    },
-    compTimeOUT(start, end) {
-      if (start && end) {
-        if (end < start) {
-          return "请检查开始与结束的时间范围";
-        }
-        const asTimes = end / 1000 - start / 1000;
-        return this.$methodsTools.secondToDate(asTimes, false);
-      } else {
-        return "未检测到直播开始时间结束时间,无法计算!";
-      }
-    },
-    getApiTime(val) {
-      var self = this;
-      const valueUrl = val.replace(/\s/g, "");
-      if (valueUrl && valueUrl.length > 30)
-        this.$api
-          .inquirepolyvvideo(valueUrl)
-          .then((res) => {
-            if (res.data.duration) {
-              self.listData.durationTime = res.data.duration;
-              self.disabloutime = true;
-            } else {
-              self.disabloutime = false;
-            }
-          })
-          .catch((err) => {
-            self.disabloutime = false;
-          });
-    },
-    loadPlayerScript(callback) {
-      if (!window.polyvPlayer) {
-        const myScript = document.createElement("script");
-        myScript.setAttribute("src", this.vodPlayerJs);
-        myScript.onload = callback;
-        document.body.appendChild(myScript);
-      } else {
-        callback();
-        this.player.on("serverError", (...params) => {
-          this.$message.error(returnTitle(params[1]));
-          console.log(params);
-        });
-      }
-    },
-    loadPlayer() {
-      var self = this;
-      const polyvPlayer = window.polyvPlayer;
-      self.player = polyvPlayer({
-        wrap: "#player",
-        width: 800,
-        height: 533,
-        vid: self.vid,
-        teaser_show: 0,
-        playsafe: function (vid, next) {
-          self.$api.obtainpolyvvideosign(vid).then((res) => {
-            next(res.data);
-          });
-        },
-      });
-    },
-    /**
-     * @param {String} 关闭视频窗口-销毁实例
-     */
-    clears() {
-      this.diavos = false;
-      if (this.player) {
-        this.player.destroy();
-      }
-    },
-    /**
-     * @param {String} 视频查看
-     */
-    watchVideo(url) {
-      if (!url) {
-        this.$message.warning("请检查URL地址是否输入完整");
-        return;
-      }
-      this.vid = url;
-      this.diavos = true;
-    },
-    isOkBf() {
-      this.loadPlayerScript(this.loadPlayer);
-    },
-    /**
-     * @param {String} 直播预览
-     */
-    watchZbVideo(url) {
-      if (!url) {
-        this.$message.warning("请检查直播流地址是否输入完整");
-        return;
-      }
-      this.vidzb = url;
-      this.diavoszb = true;
-    },
-    loadPlayerScriptzb(callback) {
-      if (!window.polyvLivePlayer) {
-        const myScript = document.createElement("script");
-        myScript.setAttribute("src", this.playerJs);
-        myScript.onload = callback;
-        document.body.appendChild(myScript);
-      } else {
-        callback();
-      }
-    },
-
-    loadPlayerzb() {
-      const polyvLivePlayer = window.polyvLivePlayer;
-      this.playerzb = polyvLivePlayer({
-        wrap: "#playerzb",
-        width: 800,
-        height: 533,
-        uid: this.uidzb,
-        vid: this.vidzb,
-      });
-    },
-    clearszb() {
-      this.diavoszb = false;
-      if (this.playerzb) {
-        this.playerzb.destroy();
-      }
-    },
-    isOkBfzb() {
-      this.loadPlayerScriptzb(this.loadPlayerzb);
-    },
-    importMoble(event) {
-      // var self = this;
-      var file = event.target.files[0];
-      // let formData = new FormData();
-      // formData.append("file", file);
-      // console.log(formData);
-      if (!event.target.value) {
-        this.$message.error("请选择您要上传的文件");
-        return false;
-      }
-      /**
-       * @param: event.target.files -> 传递的文件list
-       * @param: this.fileSetting -> 常规配置 上面有备注
-       * @param: 回调
-       */
-      uploadFile(file, this.fileSetting, (event) => {
-        this.listData.recordingUrl = event.vid;
-        this.listData.durationTime = "";
-        this.getApiTime(event.vid);
-      });
-    },
-    getMessage() {
-      if (!this.courType) {
-        this.$message.warning("请先选择业务层级");
-      }
-    },
-    clearImgs() {
-      this.listData.coverUrl = "";
-    },
-    changeTypes() {
-      var self = this;
-      var arrays = [];
-      this.sujectApis.map((item, index) => {
-        this.courTypeOptions.map((items) => {
-          if (items.id === item.split("-").map(Number)[0]) {
-            var obj = {
-              educationTypeId: items.educationId,
-              educationName: items.educationName,
-              projectId: items.projectId,
-              projectName: items.projectName,
-              businessId: items.id,
-              businessName: items.businessName,
-            };
-            self.sujectOption.map((i) => {
-              if (
-                i.id === item.split("-").map(Number)[1] &&
-                i.courseArrays.indexOf(items.projectId) !== -1
-              ) {
-                obj.subjectName = i.subjectName;
-                obj.subjectId = i.id;
-              }
-            });
-            arrays.push(obj);
-          }
-        });
-      });
-      this.newSujectApis = arrays;
-    },
-    changeType() {
-      this.changeHeight = !this.changeHeight;
-    },
-    submitSujectArray() {
-      var self = this;
-      this.sujectApis = this.sujectApis.filter((item, index) => {
-        return item.split("-").map(Number)[0] !== Number(self.courType);
-      });
-      for (let i = 0; i < this.sujectArray.length; i++) {
-        this.sujectApis.push(this.sujectArray[i]);
-      }
-      this.$refs.popovers.doClose();
-      this.$nextTick(() => {
-        this.changeUrl();
-      });
-    },
-    changeUrl() {
-      var arr = this.newSujectApis.map((val) => val.businessId);
-      const unique = [...new Set(arr)];
-      var busId = "";
-      if (unique.length) {
-        busId = unique.toString();
-      } else {
-        busId = "";
-      }
-      this.$api.inquireCourseStreaming({ status: 1 }).then((res) => {
-        var arraystt = [];
-        var newarrays1tt = [];
-        var newarrays2tt = [];
-        res.rows.map((item) => {
-          if (item.streamingType === 1) {
-            arraystt.push(item);
-          }
-          if (item.streamingType === 2) {
-            newarrays1tt.push(item);
-          }
-          if (item.streamingType === 3) {
-            newarrays2tt.push(item);
-          }
-        });
-        this.$api
-          .inquireCourseStreaming({ status: 1, businessId: busId })
-          .then((result) => {
-            var arrays = [];
-            var newarrays1 = [];
-            var newarrays2 = [];
-            result.rows.map((item) => {
-              if (item.streamingType === 1) {
-                arrays.push(item);
-              }
-              if (item.streamingType === 2) {
-                newarrays1.push(item);
-              }
-              if (item.streamingType === 3) {
-                newarrays2.push(item);
-              }
-            });
-            if (arrays.length) {
-              this.newLiveUrl = arrays;
-            } else {
-              this.newLiveUrl = arraystt;
-            }
-            if (newarrays1.length) {
-              this.newSteamUrl1 = newarrays1;
-            } else {
-              this.newSteamUrl1 = newarrays1tt;
-            }
-            if (newarrays2.length) {
-              this.newSteamUrl2 = newarrays2;
-            } else {
-              this.newSteamUrl2 = newarrays2tt;
-            }
-          });
-      });
-    },
-    showHandle() {
-      var array = [];
-      for (let i = 0; i < this.sujectApis.length; i++) {
-        if (
-          this.sujectApis[i].split("-").map(Number)[0] === Number(this.courType)
-        ) {
-          array.push(this.sujectApis[i]);
-        }
-      }
-      this.sujectArray = array;
-      if (!this.newSujectOption.length) {
-        this.$message.warning("该业务层次暂无关联科目");
-        this.$refs.popovers.doClose();
-        return;
-      }
-      this.newSujectOption.map((item) => {
-        item.newId = this.courType + "-" + item.id;
-      });
-      this.handleCheckedCitiesChange();
-    },
-    hideHandle() {},
-    getDict() {
-      this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
-        this.eduTypeOptions = res.rows;
-      });
-      this.$methodsTools.concatList(true).then((res) => {
-        this.courTypeOptions = res.value;
-        this.newCourTypeOptions = res.options;
-      });
-
-      this.$api.inquireCourseSubject({ status: 1 }).then((res) => {
-        res.rows.map((item, index) => {
-          var array = [];
-          item.courseProjectTypes.map((items, indexs) => {
-            array.push(items.id);
-          });
-          item.courseArrays = array;
-        });
-        this.sujectOption = res.rows;
-      });
-      this.$api.inquireCourseStreaming({ status: 1 }).then((res) => {
-        var arrays = [];
-        var newarrays1 = [];
-        var newarrays2 = [];
-        res.rows.map((item) => {
-          if (item.streamingType === 1) {
-            arrays.push(item);
-          }
-          if (item.streamingType === 2) {
-            newarrays1.push(item);
-          }
-          if (item.streamingType === 3) {
-            newarrays2.push(item);
-          }
-        });
-        this.newLiveUrl = arrays;
-        this.newSteamUrl1 = newarrays1;
-        this.newSteamUrl2 = newarrays2;
-      });
-    },
-    changeEduType(v) {
-      this.$methodsTools.concatList(false, v).then((res) => {
-        this.newCourTypeOptions = res.options;
-      });
-      this.courType = "";
-    },
-    changecourseType(ids) {
-      /**
-       * 进入缓存方法
-       */
-      this.$methodsTools.cacheBusinessList(ids);
-      /**
-       * 查找选中的业务层次对应的教育类型ID 并筛选出对应业务层级列表
-       */
-      let idArr = this.courTypeOptions.find((item) => {
-        return item.id == ids;
-      });
-      this.eduType = idArr.educationId;
-      this.$methodsTools.concatList(false, idArr.educationId).then((res) => {
-        this.newCourTypeOptions = res.options;
-      });
-      /**
-       * 筛选科目
-       */
-      var array = this.sujectOption.filter((items, indexs) => {
-        return items.courseArrays.includes(idArr.projectId);
-      });
-      this.newSujectOption = array;
-      /**
-       * 关闭科目弹窗
-       */
-      this.$refs.popovers.doClose();
-    },
-    submit(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          // if (
-          //   this.listData.coverUrl === "" ||
-          //   this.listData.coverUrl === null ||
-          //   this.listData.coverUrl === undefined
-          // ) {
-          //   this.$message.error("请上传节封面");
-          //   return false;
-          // }
-          this.rulesTableSumbit();
-        } else {
-          return false;
-        }
-      });
-    },
-    async rulesTableSumbit() {
-      var dataInfos = {
-        status: 1,
-        businessList: this.newSujectApis,
-        coverUrl: this.listData.coverUrl,
-        name: this.listData.name,
-        prefixName: this.listData.prefixName,
-        publishStatus: this.listData.publishStatus,
-      };
-
-      if (this.listData.sectionType === 2) {
-        dataInfos.sectionType = 2;
-        dataInfos.liveUrl = this.listData.liveUrl;
-        dataInfos.liveStartTime = this.$methodsTools.time10to13(
-          this.listData.liveStartTime,
-          1
-        );
-        dataInfos.liveEndTime = this.$methodsTools.time10to13(
-          this.listData.liveEndTime,
-          1
-        );
-        if (
-          dataInfos.liveStartTime &&
-          dataInfos.liveEndTime &&
-          dataInfos.liveEndTime < dataInfos.liveStartTime
-        ) {
-          this.$message.warning("请检查直播开始与结束时间范围");
-          return;
-        }
-        dataInfos.durationTime =
-          dataInfos.liveEndTime - dataInfos.liveStartTime;
-      }
-      if (this.listData.sectionType === 1) {
-        dataInfos.sectionType = 1;
-        dataInfos.recordingUrl = this.listData.recordingUrl;
-        dataInfos.durationTime = this.$methodsTools.secondFormDate(
-          this.listData.durationTime
-        );
-      }
-      if (this.listData.sectionType === 3) {
-        dataInfos.sectionType = 3;
-        dataInfos.recordingUrl = this.listData.recordingUrl;
-        dataInfos.durationTime = this.$methodsTools.secondFormDate(
-          this.listData.durationTime
-        );
-      }
-      this.$api.appCourseSection(dataInfos).then((res) => {
-        this.$message.success("新增成功");
-        setTimeout(() => {
-          this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-            this.$router.push({
-              path: "festival",
-            });
-          });
-        }, 500);
-      });
-    },
-    backPage() {
-      this.$store.dispatch("tagsView/delView", this.$route).then((res) => {
-        this.$router.push({
-          path: "festival",
-        });
-      });
-    },
-    closeType(index) {
-      this.sujectApis.splice(index, 1);
-      this.$nextTick(() => {
-        this.changeUrl();
-      });
-    },
-    changeLiveUrl() {
-      this.newLiveUrl.map((item) => {
-        if (item.id === this.newActiveLiveUrl) {
-          this.listData.liveUrl = item.liveUrl;
-        }
-      });
-      this.newActiveLiveUrl = "";
-    },
-    changeRecordingUrl1() {
-      this.newSteamUrl1.map((item) => {
-        if (item.id === this.newActiveRecordingUrl1) {
-          this.listData.recordingUrl = item.recordingVideoId;
-          this.getApiTime(item.recordingVideoId);
-        }
-      });
-      this.newActiveRecordingUrl1 = "";
-    },
-    changeRecordingUrl2() {
-      this.newSteamUrl2.map((item) => {
-        if (item.id === this.newActiveRecordingUrl2) {
-          this.listData.recordingUrl = item.playbackUrl;
-          this.getApiTime(item.recordingVideoId);
-        }
-      });
-      this.newActiveRecordingUrl2 = "";
-    },
-    getImgFile() {
-      var self = this;
-      var file = self.$refs.file.files[0];
-      if (file === undefined) {
-        self.$set(self.listData, "coverUrl", "");
-        return;
-      }
-      if (file.size > 0.3 * 1024 * 1024) {
-        self.$message.error("图片不得大于300kb");
-        return;
-      }
-      var type = self.$refs.file.value.toLowerCase().split(".").splice(-1);
-      if (
-        type[0] != "jpg" &&
-        type[0] != "png" &&
-        type[0] != "jpeg" &&
-        type[0] != "gif"
-      ) {
-        self.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
-        self.$refs.file.value = "";
-        return;
-      }
-      this.$upload.upload(file, 0).then((res) => {
-        self.listData.coverUrl = res;
-      });
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-/deep/.el-button {
-  border-radius: 8px;
-}
-/deep/.el-dialog {
-  border-radius: 8px;
-  .el-dialog__header {
-    padding: 0;
-    .hearders {
-      height: 40px;
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      padding: 0px 18px 0px 20px;
-      border-bottom: 1px solid #e2e2e2;
-      .leftTitle {
-        font-size: 14px;
-        font-weight: bold;
-        color: #2f4378;
-      }
-      .rightBoxs {
-        display: flex;
-        align-items: center;
-        img {
-          width: 14px;
-          height: 14px;
-          margin-left: 13px;
-          cursor: pointer;
-        }
-      }
-    }
-  }
-  .el-dialog__footer {
-    padding: 0;
-    .dialog-footer {
-      padding: 0px 40px;
-      height: 70px;
-      border-top: 1px solid #e2e2e2;
-      display: flex;
-      align-items: center;
-      justify-content: flex-end;
-    }
-  }
-}
-.imgBox {
-  width: 100%;
-  // height: 210px;
-  border: 1px solid #e2e2e2;
-  border-radius: 8px;
-  padding: 8px 8px 3px;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  .imgLabel {
-    flex: 1;
-    width: 100%;
-    border: 1px dotted #e2e2e2;
-    color: #999;
-    font-size: 14px;
-    cursor: pointer;
-    border-radius: 8px;
-    .msPhoto {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      max-width: 100%;
-      max-height: 270px;
-      img {
-        max-width: 100%;
-        max-height: 270px;
-      }
-    }
-    .imgbbx {
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-      width: 100%;
-      height: 100%;
-      i {
-        font-weight: bold;
-        margin: 14px 0;
-        font-size: 24px;
-      }
-    }
-  }
-  p {
-    margin: 5px 0px;
-  }
-}
-.boxWidth {
-  width: 770px;
-}
-.numInputs {
-  width: 150px;
-}
-.checkboxSty {
-  max-height: 210px;
-  overflow: auto;
-  display: flex;
-  flex-direction: column;
-}
-.listBoxStys {
-  flex-shrink: 0;
-  padding: 0px 10px;
-  border-radius: 8px;
-  border: 1px solid #eee;
-  margin-right: 10px;
-  margin-bottom: 6px;
-}
-.closeIcons {
-  color: red;
-  cursor: pointer;
-  margin-left: 6px;
-}
-.ach {
-  display: flex;
-  align-items: center;
-  overflow: hidden;
-}
-.clh {
-  display: flex;
-  align-items: center;
-  flex-wrap: wrap;
-}
-.imgBoxins {
-  width: 375px;
-  height: 220px;
-  text-align: center;
-  img {
-    height: 100%;
-  }
-}
-.iconStsz {
-  font-size: 40px;
-  color: #67c23a;
-  cursor: pointer;
-}
-</style>

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

@@ -464,7 +464,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         name: [{ required: true, message: "请输入节标题", trigger: "blur" }],
         // liveDuration: [

+ 1 - 2
src/views/resource/videoManagement/festival/edit/index.vue

@@ -120,7 +120,6 @@
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
           ><el-button
             size="mini"
-            type="danger"
             v-if="newSujectApis.length > 0"
             @click="sujectApis = []"
             >清空</el-button
@@ -463,7 +462,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         name: [{ required: true, message: "请输入节标题", trigger: "blur" }],
         // liveDuration: [

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

@@ -86,6 +86,37 @@
         <!-- <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 +270,8 @@ export default {
         {
           label: "URL地址/直播地址",
           prop: "sectionType",
-          prop1:"recordingUrl",
-          prop2:"liveUrl",
+          prop1: "recordingUrl",
+          prop2: "liveUrl",
           hidden: true,
           scope: "liveAndUrl",
         },
@@ -269,6 +300,8 @@ export default {
       total: 0, //一共多少条
       pageSize: 10, //每页多少条数据
       currentPage: 1, //当前页码
+      errorData: "", //导入错误原因
+      dialogERROR: false,
     };
   },
   mounted() {
@@ -297,7 +330,13 @@ export default {
         .drCourseSectionimportData(formData)
         .then((res) => {
           if (res.code === 200) {
-            self.$message.success("导入成功");
+            if (!res.msg) {
+              self.$message.success("导入成功");
+              self.dialogDR = false;
+            } else {
+              self.errorData = res.msg;
+              self.dialogERROR = true;
+            }
           }
         })
         .finally(() => {

+ 9 - 1
src/views/resource/videoManagement/flow/index.vue

@@ -112,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
@@ -133,7 +138,6 @@
                 </el-select>
                 <el-popover
                   placement="bottom"
-                  width="200"
                   trigger="click"
                   :disabled="eduType ? false : true"
                 >
@@ -565,6 +569,10 @@ export default {
       });
       this.del(ary, true);
     },
+    allclear(){
+      this.cauType = []
+      this.handleCheckedCitiesChange()
+    },
     handleCheckedCitiesChange() {
       let nid = this.itemOption2.map((item) => {
         return item.id;

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

@@ -423,7 +423,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         moduleName: [
           { required: true, message: "请输入节标题", trigger: "blur" },

+ 6 - 1
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>
@@ -392,7 +397,7 @@ export default {
       //表单验证
       rules: {
         prefixName: [
-          { required: true, message: "请输入标题前缀", trigger: "blur" },
+          { required: false, message: "请输入标题前缀", trigger: "blur" },
         ],
         moduleName: [
           { required: true, message: "请输入节标题", trigger: "blur" },

+ 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() {