Explorar o código

add:添加app发文本和语音

ct hai 6 días
pai
achega
ec8e842ed6

+ 6 - 6
src/views/course/courseFinishTemp/index.vue

@@ -199,13 +199,13 @@
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%">
-                    <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
+                    <el-input v-if="item.contentType == 1  || item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
                               placeholder="内容" style="width: 90%;margin-top: 10px;"/>
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
                                  :height="150"/>
 
-                    <div v-if="item.contentType == 3 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -307,7 +307,7 @@
                         </video>
                       </el-form-item>
                     </div>
-                    <div v-if="item.contentType == 7 ">
+                    <div v-if="item.contentType == 7  || item.contentType == 16">
                       <el-input
                         v-model="item.value"
                         type="textarea" :rows="3" maxlength="66" show-word-limit
@@ -381,13 +381,13 @@
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%">
-                    <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
+                    <el-input v-if="item.contentType == 1  || item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
                               placeholder="内容" style="width: 90%;margin-top: 10px;"/>
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
                                  :height="150"/>
 
-                    <div v-if="item.contentType == 3 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -489,7 +489,7 @@
                         </video>
                       </el-form-item>
                     </div>
-                    <div v-if="item.contentType == 7 ">
+                    <div v-if="item.contentType == 7  || item.contentType == 16">
                       <el-input
                         v-model="item.value"
                         type="textarea" :rows="3" maxlength="66" show-word-limit

+ 5 - 5
src/views/course/courseFinishTempParent/deptIndex.vue

@@ -153,13 +153,13 @@
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%">
-                    <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
+                    <el-input v-if="item.contentType == 1 || item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
                               placeholder="内容" style="width: 90%;margin-top: 10px;"/>
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
                                  :height="150"/>
 
-                    <div v-if="item.contentType == 3 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -335,13 +335,13 @@
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%">
-                    <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
+                    <el-input v-if="item.contentType == 1  || item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
                               placeholder="内容" style="width: 90%;margin-top: 10px;"/>
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
                                  :height="150"/>
 
-                    <div v-if="item.contentType == 3 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -443,7 +443,7 @@
                         </video>
                       </el-form-item>
                     </div>
-                    <div v-if="item.contentType == 7 ">
+                    <div v-if="item.contentType == 7  || item.contentType == 16">
                       <el-input
                         v-model="item.value"
                         type="textarea" :rows="3" maxlength="66" show-word-limit

+ 6 - 6
src/views/course/courseFinishTempParent/index.vue

@@ -153,13 +153,13 @@
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%">
-                    <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
+                    <el-input v-if="item.contentType == 1 ||item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
                               placeholder="内容" style="width: 90%;margin-top: 10px;"/>
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
                                  :height="150"/>
 
-                    <div v-if="item.contentType == 3 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -261,7 +261,7 @@
                         </video>
                       </el-form-item>
                     </div>
-                    <div v-if="item.contentType == 7 ">
+                    <div v-if="item.contentType == 7 || item.contentType == 16">
                       <el-input
                         v-model="item.value"
                         type="textarea" :rows="3" maxlength="66" show-word-limit
@@ -335,13 +335,13 @@
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%">
-                    <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
+                    <el-input v-if="item.contentType == 1 ||item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
                               placeholder="内容" style="width: 90%;margin-top: 10px;"/>
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
                                  :height="150"/>
 
-                    <div v-if="item.contentType == 3 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -443,7 +443,7 @@
                         </video>
                       </el-form-item>
                     </div>
-                    <div v-if="item.contentType == 7 ">
+                    <div v-if="item.contentType == 7 || item.contentType == 16">
                       <el-input
                         v-model="item.value"
                         type="textarea" :rows="3" maxlength="66" show-word-limit

+ 6 - 6
src/views/course/courseFinishTempParent/myIndex.vue

@@ -153,13 +153,13 @@
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%">
-                    <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
+                    <el-input v-if="item.contentType == 1  || item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
                               placeholder="内容" style="width: 90%;margin-top: 10px;"/>
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
                                  :height="150"/>
 
-                    <div v-if="item.contentType == 3 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -261,7 +261,7 @@
                         </video>
                       </el-form-item>
                     </div>
-                    <div v-if="item.contentType == 7 ">
+                    <div v-if="item.contentType == 7  || item.contentType == 16">
                       <el-input
                         v-model="item.value"
                         type="textarea" :rows="3" maxlength="66" show-word-limit
@@ -335,13 +335,13 @@
                     </el-radio-group>
                   </el-form-item>
                   <el-form-item label="内容" style="margin-bottom: 2%">
-                    <el-input v-if="item.contentType == 1 " v-model="item.value" type="textarea" :rows="3"
+                    <el-input v-if="item.contentType == 1  || item.contentType == 15" v-model="item.value" type="textarea" :rows="3"
                               placeholder="内容" style="width: 90%;margin-top: 10px;"/>
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1" :width="150"
                                  :height="150"/>
 
-                    <div v-if="item.contentType == 3 ">
+                    <div v-if="item.contentType == 3 || item.contentType ==9">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -443,7 +443,7 @@
                         </video>
                       </el-form-item>
                     </div>
-                    <div v-if="item.contentType == 7 ">
+                    <div v-if="item.contentType == 7  || item.contentType == 16">
                       <el-input
                         v-model="item.value"
                         type="textarea" :rows="3" maxlength="66" show-word-limit

+ 46 - 4
src/views/qw/sopTemp/updateSopTemp.vue

@@ -313,7 +313,7 @@
 
                                           <!-- 修改按钮部分 -->
                                           <el-link
-                                            v-if="setList.contentType == 1 && roles.includes('edit_sop_temp_content')"
+                                            v-if="(setList.contentType == 1 || setList.contentType == 15) && roles.includes('edit_sop_temp_content')"
                                             type="primary"
                                             @click="toggleSalesCall(index, contentIndex, setIndex)"
                                             style="margin-top: 10px;"
@@ -321,7 +321,7 @@
                                             {{ setList.isSalesCallAdded ? '移除#销售称呼#' : '添加#销售称呼#' }}
                                           </el-link>
                                           <el-link
-                                            v-if="setList.contentType == 1 && roles.includes('edit_sop_temp_content')"
+                                            v-if="(setList.contentType == 1 || setList.contentType == 15) && roles.includes('edit_sop_temp_content')"
                                             type="primary"
                                             @click="toggleUserNameCall(index, contentIndex, setIndex)"
                                             style="margin-top: 10px; margin-left: 20px"
@@ -334,7 +334,7 @@
                                                        type="image" :num="1" :width="150" :height="150"/>
 
                                           <div
-                                            v-if="setList.contentType == 3  || (setList.contentType == 9 && content.type==2 )">
+                                            v-if="(setList.contentType == 3 || item.contentType ==9) || (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"
@@ -474,7 +474,7 @@
                                               </video>
                                             </el-form-item>
                                           </div>
-                                          <div v-if="setList.contentType == 7 ">
+                                          <div v-if="setList.contentType == 7 || setList.contentType == 16">
                                             <el-input
                                               :disabled="formType == 3 || !roles.includes('edit_sop_temp_content')"
                                               v-model="setList.value"
@@ -526,6 +526,27 @@
 
                                             </el-card>
                                           </div>
+                                          <div v-if="setList.contentType == 14">
+                                            <el-card class="box-card">
+                                              <el-form-item label="福袋名称" >
+                                                <el-select :disabled="formType == 3"    v-model="setList.luckyBagId"
+                                                           placeholder="请选择福袋" size="mini"
+                                                           @change="getLuckyBagStatus(setList)" >
+                                                  <el-option
+                                                    v-for="dict in luckyBagList"
+                                                    :key="dict.id"
+                                                    :label="dict.name"
+                                                    :value="dict.id"
+                                                  />
+                                                </el-select>
+                                              </el-form-item>
+                                              <el-form-item  label="福袋状态" >
+                                                <el-tag  :disabled="formType == 3" :type="setList.luckyBagDataStatus == 1 ? 'success' : 'danger'">
+                                                  {{ setList.luckyBagDataStatus == 1 ? '启用' : '禁用' }}
+                                                </el-tag>
+                                              </el-form-item>
+                                            </el-card>
+                                          </div>
                                         </el-form-item>
                                         <!--                                        <el-form-item label="添加短链"-->
                                         <!--                                                      v-if="content.type == 2 && setList.contentType == 1  ">-->
@@ -731,6 +752,7 @@ import {courseList, videoList} from "@/api/qw/sop";
 import {listToLiveNoEnd} from "@/api/live/live";
 import ImageUpload from "@/views/qw/sop/ImageUpload";
 import userVideo from "@/views/qw/userVideo/userVideo.vue";
+import {listReward} from "@/api/qw/luckyBag";
 import {
   getRoles,
 } from "@/api/qw/sop";
@@ -740,6 +762,14 @@ export default {
   components: {ImageUpload, userVideo, draggable},
   data() {
     return {
+      queryParams1: {
+        pageNum: 1,
+        pageSize: 10,
+        dataStatus: '1',
+        name: null,
+        type: null
+      },
+      luckyBagList: [],
       projectFrom:process.env.VUE_APP_PROJECT_FROM,
       addTag: [{
         addTag: [],
@@ -874,6 +904,9 @@ export default {
     listToLiveNoEnd().then(response => {
       this.liveList = response.rows;
     })
+    listReward(this.queryParams1).then(response => {
+      this.luckyBagList = response.rows;
+    });
 
     const id = this.$route.params && this.$route.params.id;
     this.id = id;
@@ -882,6 +915,15 @@ export default {
     this.handleUpdate(id);
   },
   methods: {
+    getLuckyBagStatus(content) {
+      const selectedLuckyBag = this.luckyBagList.find(item => item.id === content.luckyBagId);
+      if (selectedLuckyBag) {
+        content.luckyBagDataStatus = selectedLuckyBag.dataStatus; // 自动填充标题
+      } else {
+        // 若未找到对应直播间,清空标题和封面(可选)
+        content.luckyBagDataStatus = null;
+      }
+    },
     liveChange(content) {
       // content.liveId 是选中的直播间 ID(liveId)
       const selectedLive = this.liveList.find(live => live.liveId === content.liveId);