Przeglądaj źródła

飞书看课 校验上传

xgb 3 tygodni temu
rodzic
commit
ede4bd8512

+ 3 - 3
src/views/qw/sopTemp/updateSopTemp.vue

@@ -363,7 +363,7 @@
                                               <el-radio
                                                 :key="item.dictValue"
                                                 :label="item.dictValue"
-                                                :disabled="(content.type!=2 && item.dictValue === '9') || (content.isOfficial==1 && ['5','6','7','8','9'].includes(item.dictValue))"
+                                                :disabled="(content.type!=2 && (item.dictValue === '9' || item.dictValue == '18')) || (content.isOfficial==1 && ['5','6','7','8','9'].includes(item.dictValue))"
                                                 v-for="item in sysQwSopAiContentType">{{ item.dictLabel }}
                                               </el-radio>
                                             </el-radio-group>
@@ -375,7 +375,7 @@
                                               <el-radio
                                                 :key="item.dictValue"
                                                 :label="item.dictValue"
-                                                :disabled="((content.type!=2 || form.sendType == 4) && (item.dictValue === '8' || item.dictValue === '9') || (content.isOfficial==1 && ['5','6','7','8','9'].includes(item.dictValue)))"
+                                                :disabled="((content.type!=2 || form.sendType == 4) && (item.dictValue === '8' || item.dictValue === '9' || item.dictValue == '18') || (content.isOfficial==1 && ['5','6','7','8','9'].includes(item.dictValue)))"
                                                 v-for="item in sysQwSopAiContentType">{{ item.dictLabel }}
                                               </el-radio>
                                             </el-radio-group>
@@ -2461,7 +2461,7 @@ export default {
                 this.$message.error("链接图片不能为空")
                 return false;
               }
-              if (data.content[j].setting[k].contentType == 18 || data.content[j].setting[k].contentType == 3 && data.content[j].setting[k].type == 1 && (data.content[j].setting[k].linkUrl == null || data.content[j].setting[k].linkUrl == "")) {
+              if (data.content[j].setting[k].contentType == 3 && data.content[j].setting[k].type == 1 && (data.content[j].setting[k].linkUrl == null || data.content[j].setting[k].linkUrl == "")) {
                 this.$message.error("链接地址不能为空")
                 return false;
               }

+ 10 - 2
src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

@@ -67,7 +67,7 @@
                 <el-form :model="item" label-width="70px">
                   <el-form-item label="内容类别" style="margin: 2%">
                     <el-radio-group  v-model="item.contentType">
-                      <el-radio   :label="item.dictValue" v-for="item in sysQwSopAiContentType"  @change="handleContentTypeChange()">{{item.dictLabel}}</el-radio>
+                      <el-radio   :label="item.dictValue" v-for="item in filteredAiContentTypes"  @change="handleContentTypeChange()">{{item.dictLabel}}</el-radio>
                     </el-radio-group>
                   </el-form-item>
                   <!-- <div v-if="item.contentType == 12">
@@ -538,6 +538,14 @@ export default {
     };
   },
 
+  computed: {
+    filteredAiContentTypes() {
+      if (!this.msgForm.courseId) {
+        return this.sysQwSopAiContentType.filter(item => item.dictValue != '18');
+      }
+      return this.sysQwSopAiContentType;
+    }
+  },
   created() {
     this.getDicts("sys_qwSopAi_contentType").then(response => {
       this.sysQwSopAiContentType = response.data;
@@ -1039,7 +1047,7 @@ export default {
               if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
                 return this.$message.error("链接图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
                 return this.$message.error("链接地址不能为空")
               }
 

+ 10 - 2
src/views/qw/sopUserLogsInfo/sendMsgSopOpenTool.vue

@@ -53,7 +53,7 @@
                 <el-form :model="item" label-width="70px">
                   <el-form-item label="内容类别" style="margin: 2%">
                     <el-radio-group  v-model="item.contentType">
-                      <el-radio   :label="item.dictValue" v-for="item in sysQwSopAiContentType"  @change="handleContentTypeChange()">{{item.dictLabel}}</el-radio>
+                      <el-radio   :label="item.dictValue" v-for="item in filteredAiContentTypes"  @change="handleContentTypeChange()">{{item.dictLabel}}</el-radio>
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%" >
@@ -441,6 +441,14 @@ export default {
     };
   },
 
+  computed: {
+    filteredAiContentTypes() {
+      if (!this.msgForm.courseId) {
+        return this.sysQwSopAiContentType.filter(item => item.dictValue != '18');
+      }
+      return this.sysQwSopAiContentType;
+    }
+  },
   created() {
     this.getDicts("sys_qwSopAi_contentType").then(response => {
       this.sysQwSopAiContentType = response.data;
@@ -903,7 +911,7 @@ export default {
               if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
                 return this.$message.error("链接图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
                 return this.$message.error("链接地址不能为空")
               }
 

+ 10 - 2
src/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue

@@ -297,7 +297,7 @@
                 <el-form :model="item" label-width="70px">
                   <el-form-item label="内容类别" style="margin: 2%">
                     <el-radio-group  v-model="item.contentType">
-                      <el-radio   :label="item.dictValue" v-for="item in sysQwSopAiContentType"  @change="handleContentTypeChange()">{{item.dictLabel}}</el-radio>
+                      <el-radio   :label="item.dictValue" v-for="item in filteredAiContentTypes"  @change="handleContentTypeChange()">{{item.dictLabel}}</el-radio>
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%" >
@@ -785,6 +785,14 @@ export default {
     };
   },
 
+  computed: {
+    filteredAiContentTypes() {
+      if (!this.msgForm.courseId) {
+        return this.sysQwSopAiContentType.filter(item => item.dictValue != '18');
+      }
+      return this.sysQwSopAiContentType;
+    }
+  },
   created() {
 
     this.getDicts("sys_qw_allow_select").then((response) => {
@@ -1521,7 +1529,7 @@ export default {
             if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
               return this.$message.error("链接图片不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
               return this.$message.error("链接地址不能为空")
             }