Explorar o código

销售端增加sop发送飞书看课

cgp hai 1 semana
pai
achega
490d63d74a

+ 17 - 13
src/views/qw/sopTemp/updateSopTemp.vue

@@ -312,7 +312,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"
                                                 v-if="courseTypeList.includes(item.dictValue)">{{ item.dictLabel }}
                                               </el-radio>
@@ -350,8 +350,7 @@
                                                        v-model="setList.imgUrl"
                                                        type="image" :num="1" :width="150" :height="150"/>
 
-                                          <div
-                                            v-if="setList.contentType == 3  || (setList.contentType == 9 && content.type==2 )">
+                                          <div v-if="setList.contentType == 3 || setList.contentType == 18 || (setList.contentType == 9 && content.type==2 )">
                                             <el-card class="box-card">
                                               <el-form-item label="链接标题:" label-width="100px" required>
                                                 <el-input :disabled="formType == 3 || (form.sendType == 11 && contentIndex != 0 && setIndex == 0)" v-model="setList.linkTitle"
@@ -550,7 +549,7 @@
                                                  </el-select>
                                                </el-form-item>
                                              </el-card>
-                                          </div> 
+                                          </div>
 
                                           <div v-if="setList.contentType == 16 || setList.contentType == 17">
                                              <el-card class="box-card">
@@ -567,7 +566,7 @@
                                                  </el-select>
                                                </el-form-item>
                                              </el-card>
-                                          </div> 
+                                          </div>
 
 
 
@@ -847,7 +846,7 @@ export default {
       ruleList: [],
       ids: [],
       startTimeRange: [],
-      courseTypeList: ['1','2', '4','5','6', '7','8','9','10'],
+      courseTypeList: ['1','2', '4','5','6', '7','8','9','10','18'],
       sysFsSopWatchStatus: [],
       //消息内容类型 企微版
       sysQwSopContentType: [],
@@ -1344,19 +1343,24 @@ export default {
                 this.$message.error("图片不能为空")
                 return false;
               }
-              if ((data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10) && (data.content[j].setting[k].linkTitle == null || data.content[j].setting[k].linkTitle == "")) {
+              if (['3','9','10','18'].includes(String(data.content[j].setting[k].contentType))
+                && (data.content[j].setting[k].linkTitle == null || data.content[j].setting[k].linkTitle == "")) {
                 this.$message.error("链接标题不能为空")
                 return false;
               }
-              if ((data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10) && (data.content[j].setting[k].linkDescribe == null || data.content[j].setting[k].linkDescribe == "")) {
+              if (['3','9','10','18'].includes(String(data.content[j].setting[k].contentType))
+                && (data.content[j].setting[k].linkDescribe == null || data.content[j].setting[k].linkDescribe == "")) {
                 this.$message.error("链接描述不能为空")
                 return false;
               }
-              if ((data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == 9 || data.content[j].setting[k].contentType == 10) && (data.content[j].setting[k].linkImageUrl == null || data.content[j].setting[k].linkImageUrl == "")) {
+              if (['3','9','10','18'].includes(String(data.content[j].setting[k].contentType))
+                && (data.content[j].setting[k].linkImageUrl == null || data.content[j].setting[k].linkImageUrl == "")) {
                 this.$message.error("链接图片不能为空")
                 return false;
               }
-              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 == "")) {
+              if ((data.content[j].setting[k].contentType == 3 || data.content[j].setting[k].contentType == '18')
+                && 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;
               }
@@ -1661,7 +1665,7 @@ export default {
         if (selectedCourse && content.type == 2 && content.courseId != null) {
           //响应式直接给链接的标题/封面上值
 
-          if (content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
+          if (['3', '9', '18'].includes(String(content.setting[i].contentType))) {
             this.$set(content.setting[i], 'linkTitle', selectedCourse.dictLabel);
             this.$set(content.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
           }
@@ -1805,7 +1809,7 @@ export default {
         for (let i = 0; i < content.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && content.type == 2 && content.courseId != null) {
-            if (content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
+            if (['3', '9', '18'].includes(String(content.setting[i].contentType))) {
               this.$set(content.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(content.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -1826,7 +1830,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo && content.type == 2 && content.videoId != null) {
 
-            if (content.setting[i].contentType == 3 || content.setting[i].contentType == 9) {
+            if (['3', '9', '18'].includes(String(content.setting[i].contentType))) {
               this.$set(content.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
             if (content.setting[i].contentType == 4 || content.setting[i].contentType == 10 ) {

+ 7 - 7
src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

@@ -63,7 +63,7 @@
                     <ImageUpload v-if="item.contentType == 2" v-model="item.imgUrl" type="image" :num="1" :width="150"
                       :height="150" />
 
-                    <div v-if="item.contentType == 3 || item.contentType == 9">
+                    <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;" />
@@ -187,8 +187,8 @@
                                                  </el-select>
                                                </el-form-item>
                                              </el-card>
-                    </div> 
-                    <div v-if="item.contentType == 16 || item.contentType == 17"> 
+                    </div>
+                    <div v-if="item.contentType == 16 || item.contentType == 17">
 
                                              <el-card class="box-card">
                                                <el-form-item label="素材" >
@@ -204,7 +204,7 @@
                                                  </el-select>
                                                </el-form-item>
                                              </el-card>
-                                          </div> 
+                                          </div>
                     <div v-if="item.contentType == 21">
                       <el-card class="box-card">
                         <el-form-item label="短信模板">
@@ -778,7 +778,7 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9) {
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18) {
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -800,7 +800,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9) {
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18) {
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
             if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10) {
@@ -863,7 +863,7 @@ export default {
               if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
                 return this.$message.error("图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
                 return this.$message.error("链接标题不能为空")
               }
               if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {

+ 9 - 9
src/views/qw/sopUserLogsInfo/sendMsgSopOpenTool.vue

@@ -88,7 +88,7 @@
 
                       <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1"  :width="150" :height="150" />
 
-                      <div v-if="item.contentType == 3 || item.contentType ==9 ">
+                      <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18">
                         <el-card class="box-card">
                           <el-form-item label="链接标题:"  label-width="100px">
                             <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -460,7 +460,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
-            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
+            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -486,7 +486,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
 
@@ -707,7 +707,7 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse  && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -729,7 +729,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo  && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
             if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10){
@@ -792,16 +792,16 @@ export default {
               if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
                 return this.$message.error("图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
                 return this.$message.error("链接标题不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
                 return this.$message.error("链接描述不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
+              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].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].contentType == 18 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
                 return this.$message.error("链接地址不能为空")
               }