瀏覽代碼

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_companyUI

caoliqin 3 天之前
父節點
當前提交
48d25cb892
共有 3 個文件被更改,包括 97 次插入12 次删除
  1. 64 2
      src/api/qw/contactWay.js
  2. 3 1
      src/views/qw/sop/sop.vue
  3. 30 9
      src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

+ 64 - 2
src/api/qw/contactWay.js

@@ -1,9 +1,71 @@
 import request from '@/utils/request'
 
-// 查询企活码列表
-export function listContactWay() {
+// 查询企微活码列表
+export function listContactWay(query) {
   return request({
     url: '/qw/contactWay/list',
+    method: 'get',
+    params: query
+  })
+}
+export function sync(id) {
+  return request({
+    url: '/qw/contactWay/sync/' + id,
+    method: 'get'
+  })
+}
+export function informationList() {
+  return request({
+    url: '/qw/contactWay/informationList',
     method: 'get'
   })
 }
+export function statistics(query) {
+  return request({
+    url: '/qw/contactWay/statistics',
+    method: 'get',
+    params: query
+  })
+}
+// 查询企微活码详细
+export function getContactWay(id) {
+  return request({
+    url: '/qw/contactWay/' + id,
+    method: 'get'
+  })
+}
+
+// 新增企微活码
+export function addContactWay(data) {
+  return request({
+    url: '/qw/contactWay',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改企微活码
+export function updateContactWay(data) {
+  return request({
+    url: '/qw/contactWay',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除企微活码
+export function delContactWay(id) {
+  return request({
+    url: '/qw/contactWay/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出企微活码
+export function exportContactWay(query) {
+  return request({
+    url: '/qw/contactWay/export',
+    method: 'get',
+    params: query
+  })
+}

+ 3 - 1
src/views/qw/sop/sop.vue

@@ -1851,8 +1851,10 @@ export default {
           console.log(jsonSetting)
           for(let index=0;index < jsonSetting.length;index++){
            if(!!jsonSetting[index] && jsonSetting[index].contentType == "12") {
+            if(!!hasLiveSetting){
+               return this.$message.error("发送直播间只能一次只能发送一条");
+            }
             hasLiveSetting = true;
-            break;
            }
           }
           if(!!hasLiveSetting && (this.msgForm.courseId!=null && this.msgForm.courseId!='')){

+ 30 - 9
src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

@@ -56,7 +56,7 @@
                       <el-radio   :label="item.dictValue" v-for="item in sysQwSopAiContentType"  @change="handleContentTypeChange()">{{item.dictLabel}}</el-radio>
                     </el-radio-group>
                   </el-form-item>
-                  <div v-if="item.contentType == 12">
+                  <!-- <div v-if="item.contentType == 12">
                     <el-card class="box-card">
                       <el-form-item label="直播间" >
                         <el-select  v-model="item.liveId"
@@ -85,10 +85,9 @@
                         <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径"  disabled />
                       </el-form-item>
                     </el-card>
-                  </div>
+                  </div> -->
                   <el-form-item label="内容" style="margin-bottom: 2%" >
                     <div v-if="item.contentType == 12">
-                      <!--                                           <div >-->
                       <el-card class="box-card">
                         <el-form-item label="直播间" >
                           <el-select  v-model="item.liveId"
@@ -224,10 +223,9 @@
                         placeholder="输入要转为语音的内容" style="width: 90%;margin-top: 10px;"
                         @input="handleInputVideoText(item.value,item)"/>
                     </div>
-                    <div v-if="item.contentType == 12">
-                      <!--                                           <div >-->
+                    <!-- <div v-if="item.contentType == 12">
                       <el-card class="box-card">
-                        <el-form-item label="直播间" >
+                        <el-form-item label="直播间3" >
                           <el-select  v-model="item.liveId"
                                       placeholder="请选择直播间" size="mini"
                                       @change="liveChange(item)" >
@@ -254,7 +252,7 @@
                           <el-input v-model="item.miniprogramPage" placeholder="小程序消息打开后的路径"  disabled />
                         </el-form-item>
                       </el-card>
-                    </div>
+                    </div> -->
                     <div v-if="item.contentType == 8">
                       <el-button type="primary"
                                  style="margin-bottom: 1%"
@@ -903,18 +901,38 @@ export default {
       this.$refs["msgForm"].validate(valid => {
         if (valid) {
 
+         
+
           if (this.msgForm.draftStrategy==1){
 
+          if(!!hasLiveSetting && (this.msgForm.courseId!=null && this.msgForm.courseId!='')){
+              return this.$message.error("直播间不能选取课程");
+          }
+          if(!!hasLiveSetting && (this.msgForm.videoId!=null && this.msgForm.videoId!='')){
+              return this.$message.error("直播间不能选取课节");
+          }
+
             this.msgForm.setting=JSON.stringify(this.setting)
 
+        let jsonSetting = JSON.parse(this.msgForm.setting);
+          let hasLiveSetting = false;
+          console.log(jsonSetting)
+          for(let index=0;index < jsonSetting.length;index++){
+           if(!!jsonSetting[index] && jsonSetting[index].contentType == "12") {
+            if(!!hasLiveSetting){
+               return this.$message.error("发送直播间只能一次只能发送一条");
+            }
+            hasLiveSetting = true;
+           }
+          }
             if (this.setting.length <= 0) {
               return this.$message.error("请添加规则")
             }
-            if (this.msgForm.courseId===null || this.msgForm.courseId===''){
+            if ((this.msgForm.courseId===null || this.msgForm.courseId==='') && !hasLiveSetting){
               return this.$message.error("课程不能为空")
             }
 
-            if (this.msgForm.videoId===null || this.msgForm.videoId===''){
+            if ((this.msgForm.videoId===null || this.msgForm.videoId==='') && !hasLiveSetting){
               return this.$message.error("课节不能为空")
             }
 
@@ -966,6 +984,9 @@ export default {
               if (this.setting[i].contentType == 14 && (this.setting[i].luckyBagId == null || this.setting[i].luckyBagId === "")) {
                 return this.$message.error("福袋不能为空")
               }
+              if(this.setting[i].contentType == 12 && (this.setting[i].liveId==null || this.setting[i].liveId == "")){
+                return this.$message.error("直播间不能为空");
+              }
             }
           }