Tang 3 gadi atpakaļ
vecāks
revīzija
f23e339515

+ 56 - 57
src/views/Marketing/commodityManageMent/add/index.vue

@@ -1187,7 +1187,7 @@
             </li>
           </ul>
         </div>
-        <!-- <div style="width: 1px; background-color: #000; margin: 0px 14px"></div>
+        <div style="width: 1px; background-color: #000; margin: 0px 14px"></div>
         <div>
           <h4>课程章节-关联题卷-拍照</h4>
           <div>
@@ -1196,9 +1196,6 @@
             >
               <el-radio
                 :label="1"
-                @change="
-                  photoVideoList.goodsPhotographExamConfig.intervalTime = [0]
-                "
                 >是</el-radio
               >
               <el-radio
@@ -1209,7 +1206,7 @@
                 >否</el-radio
               >
             </el-radio-group>
-            <el-button
+            <!-- <el-button
               size="mini"
               style="margin-left: 10px"
               v-if="photoVideoList.goodsPhotographExamConfig.photograph === 1"
@@ -1217,9 +1214,9 @@
                 photoVideoList.goodsPhotographExamConfig.intervalTime.push(0)
               "
               >添加</el-button
-            >
+            > -->
           </div>
-          <ul v-if="photoVideoList.goodsPhotographExamConfig.photograph === 1">
+          <!-- <ul v-if="photoVideoList.goodsPhotographExamConfig.photograph === 1">
             <li
               v-for="(items, indexs) in photoVideoList.goodsPhotographExamConfig
                 .intervalTime"
@@ -1247,8 +1244,8 @@
                 >删除</el-button
               >
             </li>
-          </ul>
-        </div> -->
+          </ul> -->
+        </div>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogPhoto = false">取消</el-button>
@@ -2147,37 +2144,37 @@ export default {
           }
         }
       }
-      // if (this.listData.playConfig) {
-      //   this.photoVideoList.playConfig = JSON.parse(
-      //     JSON.stringify(this.listData.playConfig)
-      //   );
-      // } else {
-      //   this.photoVideoList.playConfig = {
-      //     autoPlay: 0,
-      //     drag: 0,
-      //     speed: 0,
-      //   };
-      // }
-      // if (this.listData.photographConfig) {
-      //   this.photoVideoList.photographConfig = JSON.parse(
-      //     JSON.stringify(this.listData.photographConfig)
-      //   );
-      // } else {
-      //   this.photoVideoList.photographConfig = {
-      //     photograph: 0,
-      //     intervalTime: [],
-      //   };
-      // }
-      // if (this.listData.goodsPhotographExamConfig) {
-      //   this.photoVideoList.goodsPhotographExamConfig = JSON.parse(
-      //     JSON.stringify(this.listData.goodsPhotographExamConfig)
-      //   );
-      // } else {
-      //   this.photoVideoList.goodsPhotographExamConfig = {
-      //     photograph: 0,
-      //     intervalTime: [],
-      //   };
-      // }
+      if (this.listData.playConfig) {
+        this.photoVideoList.playConfig = JSON.parse(
+          JSON.stringify(this.listData.playConfig)
+        );
+      } else {
+        this.photoVideoList.playConfig = {
+          autoPlay: 0,
+          drag: 0,
+          speed: 0,
+        };
+      }
+      if (this.listData.photographConfig) {
+        this.photoVideoList.photographConfig = JSON.parse(
+          JSON.stringify(this.listData.photographConfig)
+        );
+      } else {
+        this.photoVideoList.photographConfig = {
+          photograph: 0,
+          intervalTime: [],
+        };
+      }
+      if (this.listData.goodsPhotographExamConfig) {
+        this.photoVideoList.goodsPhotographExamConfig = JSON.parse(
+          JSON.stringify(this.listData.goodsPhotographExamConfig)
+        );
+      } else {
+        this.photoVideoList.goodsPhotographExamConfig = {
+          photograph: 0,
+          intervalTime: [],
+        };
+      }
       this.dialogPhoto = true;
     },
     //提交播放和拍照设置
@@ -2189,13 +2186,15 @@ export default {
         this.$message.warning("至少添加一条“课程节-拍照”");
         return;
       }
-      if (
+      /**
+       * if (
         this.photoVideoList.goodsPhotographExamConfig.photograph === 1 &&
         !this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
       ) {
         this.$message.warning("至少添加一条“课程章节-关联题卷-拍照”");
         return;
       }
+       */
       if (
         this.photoVideoList.photographConfig.photograph === 1 &&
         this.photoVideoList.photographConfig.intervalTime.length
@@ -2213,22 +2212,22 @@ export default {
           return;
         }
       }
-      if (
-        this.photoVideoList.goodsPhotographExamConfig.photograph === 1 &&
-        this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
-      ) {
-        const idsSet = new Set(
-          this.photoVideoList.goodsPhotographExamConfig.intervalTime
-        );
-        if (
-          idsSet.size ==
-          this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
-        ) {
-        } else {
-          this.$message.warning("关联题卷-拍照存在相同时间点,请重新设置");
-          return;
-        }
-      }
+      // if (
+      //   this.photoVideoList.goodsPhotographExamConfig.photograph === 1 &&
+      //   this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
+      // ) {
+      //   const idsSet = new Set(
+      //     this.photoVideoList.goodsPhotographExamConfig.intervalTime
+      //   );
+      //   if (
+      //     idsSet.size ==
+      //     this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
+      //   ) {
+      //   } else {
+      //     this.$message.warning("关联题卷-拍照存在相同时间点,请重新设置");
+      //     return;
+      //   }
+      // }
       this.listData.playConfig = this.photoVideoList.playConfig;
       this.listData.photographConfig = this.photoVideoList.photographConfig;
       this.listData.goodsPhotographExamConfig =

+ 25 - 26
src/views/Marketing/commodityManageMent/edit/index.vue

@@ -1199,7 +1199,7 @@
             </li>
           </ul>
         </div>
-        <!-- <div style="width: 1px; background-color: #000; margin: 0px 14px"></div>
+        <div style="width: 1px; background-color: #000; margin: 0px 14px"></div>
         <div>
           <h4>课程章节-关联题卷-拍照</h4>
           <div>
@@ -1208,9 +1208,6 @@
             >
               <el-radio
                 :label="1"
-                @change="
-                  photoVideoList.goodsPhotographExamConfig.intervalTime.push(0)
-                "
                 >是</el-radio
               >
               <el-radio
@@ -1221,7 +1218,7 @@
                 >否</el-radio
               >
             </el-radio-group>
-            <el-button
+            <!-- <el-button
               size="mini"
               style="margin-left: 10px"
               v-if="photoVideoList.goodsPhotographExamConfig.photograph === 1"
@@ -1229,9 +1226,9 @@
                 photoVideoList.goodsPhotographExamConfig.intervalTime.push(0)
               "
               >添加</el-button
-            >
+            > -->
           </div>
-          <ul>
+          <!-- <ul>
             <li
               v-for="(items, indexs) in photoVideoList.goodsPhotographExamConfig
                 .intervalTime"
@@ -1259,8 +1256,8 @@
                 >删除</el-button
               >
             </li>
-          </ul>
-        </div> -->
+          </ul> -->
+        </div>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogPhoto = false">取消</el-button>
@@ -2070,13 +2067,15 @@ export default {
         this.$message.warning("至少添加一条“课程节-拍照”");
         return;
       }
-      if (
+      /**
+       * if (
         this.photoVideoList.goodsPhotographExamConfig.photograph === 1 &&
         !this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
       ) {
         this.$message.warning("至少添加一条“课程章节-关联题卷-拍照”");
         return;
       }
+       */
       if (
         this.photoVideoList.photographConfig.photograph === 1 &&
         this.photoVideoList.photographConfig.intervalTime.length
@@ -2094,22 +2093,22 @@ export default {
           return;
         }
       }
-      if (
-        this.photoVideoList.goodsPhotographExamConfig.photograph === 1 &&
-        this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
-      ) {
-        const idsSet = new Set(
-          this.photoVideoList.goodsPhotographExamConfig.intervalTime
-        );
-        if (
-          idsSet.size ==
-          this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
-        ) {
-        } else {
-          this.$message.warning("关联题卷-拍照存在相同时间点,请重新设置");
-          return;
-        }
-      }
+      // if (
+      //   this.photoVideoList.goodsPhotographExamConfig.photograph === 1 &&
+      //   this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
+      // ) {
+      //   const idsSet = new Set(
+      //     this.photoVideoList.goodsPhotographExamConfig.intervalTime
+      //   );
+      //   if (
+      //     idsSet.size ==
+      //     this.photoVideoList.goodsPhotographExamConfig.intervalTime.length
+      //   ) {
+      //   } else {
+      //     this.$message.warning("关联题卷-拍照存在相同时间点,请重新设置");
+      //     return;
+      //   }
+      // }
       this.listData.playConfig = this.photoVideoList.playConfig;
       this.listData.photographConfig = this.photoVideoList.photographConfig;
       this.listData.goodsPhotographExamConfig =

+ 13 - 0
src/views/Marketing/commodityManageMent/poppleSet.vue

@@ -83,6 +83,9 @@ export default {
     };
   },
   methods: {
+    /**
+     * 相同节-时长同步修改
+     */
     changeNum(v) {
       if (v.data.auditionMinute === 0) {
         this.$message.warning("时长禁止为0,请重新设置");
@@ -117,6 +120,9 @@ export default {
         });
       }
     },
+    /**
+     * 重置按钮
+     */
     inits() {
       if (this.auditionList) {
         this.auditionListCope = JSON.parse(JSON.stringify(this.auditionList));
@@ -126,6 +132,9 @@ export default {
       }
       this.datas = JSON.parse(JSON.stringify(this.copyData));
     },
+    /**
+     * 弹窗打开触发
+     */
     openExpand() {
       if (this.auditionList) {
         this.auditionListCope = JSON.parse(JSON.stringify(this.auditionList));
@@ -137,6 +146,10 @@ export default {
         this.inits();
       });
     },
+    /**
+     * @param {Objact,Bool} 当前点击数据 当前是否勾选
+     * 复选框变化触发
+     */
     getCheckedKeys(item, node) {
       var self = this;
       if (item.TypeId.split("-")[0] != "3") {

+ 22 - 22
src/views/systemManagement/systemConfig/videoConfig/index.vue

@@ -67,20 +67,20 @@
         <el-form label-width="100px" class="demo-ruleForm">
           <el-form-item :label="bankActive.configName">
             <el-radio-group v-model="bankActive.configValue">
-              <el-radio label="1" @change="bankPhotoJG.configValue.push(0)"
+              <el-radio label="1"
                 >是</el-radio
               >
               <el-radio label="0" @change="bankPhotoJG.configValue = []"
                 >否</el-radio
               >
             </el-radio-group>
-            <el-button
+            <!-- <el-button
               style="margin-left: 12px"
               size="mini"
               v-if="bankActive.configValue === '1'"
               @click="bankPhotoJG.configValue.push(0)"
               >添加</el-button
-            >
+            > -->
           </el-form-item>
           <template v-if="bankActive.configValue == 1">
             <el-form-item
@@ -240,28 +240,28 @@ export default {
     },
     async submitBank() {
       // if (this.bankActive.configValue == 1) {
-      if (this.bankActive.configValue == 1 && !this.bankPhotoJG.configValue.length) {
-        this.$modal.msgError("参数键值不能为空");
-        return;
-      } else {
-        var arr = {};
-        for (let k in this.bankPhotoJG) {
-          if (k == "configValue") {
-            var arrs = this.bankPhotoJG[k];
-            if (new Set(arrs).size != arrs.length) {
-              this.$message.warning("不允许存在重复值");
-              return;
-            }
-            arr[k] = this.bankPhotoJG[k].toString();
-          } else {
-            arr[k] = this.bankPhotoJG[k];
-          }
-        }
+      // if (this.bankActive.configValue == 1 && !this.bankPhotoJG.configValue.length) {
+      //   this.$modal.msgError("参数键值不能为空");
+      //   return;
+      // } else {
+        // var arr = {};
+        // for (let k in this.bankPhotoJG) {
+        //   if (k == "configValue") {
+        //     var arrs = this.bankPhotoJG[k];
+        //     if (new Set(arrs).size != arrs.length) {
+        //       this.$message.warning("不允许存在重复值");
+        //       return;
+        //     }
+        //     arr[k] = this.bankPhotoJG[k].toString();
+        //   } else {
+        //     arr[k] = this.bankPhotoJG[k];
+        //   }
+        // }
         await updateConfig(this.bankActive);
-        await updateConfig(arr);
+        // await updateConfig(arr);
         this.$modal.msgSuccess("修改成功");
         this.getConfig();
-      }
+      // }
       // } else {
       //   await updateConfig(this.bankActive);
       //   this.$modal.msgSuccess("修改成功");