|
|
@@ -11,7 +11,7 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-alert>
|
|
|
- <el-form ref="msgForm" :model="msgForm" :rules="msgRules" label-width="100px">
|
|
|
+ <el-form ref="msgForm" :model="msgForm" :rules="msgRules">
|
|
|
<el-form-item label="策略" prop="draftStrategy">
|
|
|
<el-radio-group v-model="msgForm.draftStrategy">
|
|
|
<el-radio :label="1">正常群发</el-radio>
|
|
|
@@ -48,6 +48,16 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="选择直播间" v-if="msgForm.draftStrategy!=4">
|
|
|
+ <el-select v-model="liveGroupTypeId"
|
|
|
+ placeholder="请选择直播间分组" clearable
|
|
|
+ @change="liveGroupTypeChange" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in liveGroupTypeList"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.liveGroupType"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
<el-select v-model="msgForm.liveId"
|
|
|
filterable
|
|
|
placeholder="请选择直播间" size="mini"
|
|
|
@@ -104,10 +114,23 @@
|
|
|
<el-form-item label="内容" style="margin-bottom: 2%" >
|
|
|
<div v-if="item.contentType == 12 || item.contentType == 18 || item.contentType == 19 || item.contentType == 24">
|
|
|
<el-card class="box-card">
|
|
|
+ <el-form-item label="直播间分组" label-width="110px">
|
|
|
+ <el-select v-model="liveGroupTypeId"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择直播间分组" clearable
|
|
|
+ @change="liveGroupTypeChange" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in liveGroupTypeList"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.liveGroupType"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="直播间" >
|
|
|
<el-select v-model="item.liveId"
|
|
|
filterable
|
|
|
- placeholder="请选择直播间" size="mini"
|
|
|
+ placeholder="请选择直播间"
|
|
|
@change="liveChange(item)" :disabled="liveDisabled()">
|
|
|
<el-option
|
|
|
v-for="dict in liveList"
|
|
|
@@ -313,9 +336,23 @@
|
|
|
</div>
|
|
|
<div v-if="item.contentType == 20">
|
|
|
<el-card class="box-card">
|
|
|
+ <el-form-item label="直播间分组" label-width="110px">
|
|
|
+ <el-select v-model="liveGroupTypeId"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择直播间分组" clearable
|
|
|
+ @change="liveGroupTypeChange" >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in liveGroupTypeList"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.liveGroupType"
|
|
|
+ :value="dict.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="直播间" >
|
|
|
<el-select v-model="item.liveId"
|
|
|
- placeholder="请选择直播间" size="mini"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择直播间"
|
|
|
@change="liveChange(item)" >
|
|
|
<el-option
|
|
|
v-for="dict in liveList"
|
|
|
@@ -493,7 +530,7 @@ import { sendMsgSopType,} from "../../../api/qw/sopUserLogsInfo";
|
|
|
import ImageUpload from "@/views/qw/sop/ImageUpload.vue";
|
|
|
import {courseList, videoList} from "@/api/qw/sop";
|
|
|
import userVideo from "@/views/qw/userVideo/userVideo";
|
|
|
-import {listToLiveNoEnd} from "@/api/live/live";
|
|
|
+import {listToLiveNoEnd, listLiveGroupType} from "@/api/live/live";
|
|
|
import {listReward} from "@/api/qw/luckyBag";
|
|
|
import { getSmsTempList } from "@/api/company/companySmsTemp";
|
|
|
import { getQwSopTempVoiceCompanyUser } from "@/api/qw/QwSopTempVoice";
|
|
|
@@ -619,6 +656,8 @@ export default {
|
|
|
},
|
|
|
msgRules:{},
|
|
|
liveList: [],
|
|
|
+ liveGroupTypeList: [],
|
|
|
+ liveGroupTypeId: null,
|
|
|
pickerOptions: {
|
|
|
shortcuts: [
|
|
|
{
|
|
|
@@ -679,6 +718,9 @@ export default {
|
|
|
listToLiveNoEnd().then(response => {
|
|
|
this.liveList = response.rows;
|
|
|
})
|
|
|
+ listLiveGroupType().then(response => {
|
|
|
+ this.liveGroupTypeList = response.rows || response.data || [];
|
|
|
+ })
|
|
|
listReward(this.queryParams1).then(response => {
|
|
|
this.luckyBagList = response.rows;
|
|
|
});
|
|
|
@@ -741,6 +783,25 @@ export default {
|
|
|
content.miniprogramPicUrl = '';
|
|
|
}
|
|
|
},
|
|
|
+ liveGroupTypeChange(val) {
|
|
|
+ if (val) {
|
|
|
+ listToLiveNoEnd({ liveGroupType: val }).then(response => {
|
|
|
+ this.liveList = response.rows;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ listToLiveNoEnd().then(response => {
|
|
|
+ this.liveList = response.rows;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 切换分组时清空已选的直播间
|
|
|
+ if (this.msgForm.liveId) {
|
|
|
+ this.msgForm.liveId = null;
|
|
|
+ }
|
|
|
+ // 清空规则中的直播间
|
|
|
+ for (let i = 0; i < this.setting.length; i++) {
|
|
|
+ this.$set(this.setting[i], 'liveId', null);
|
|
|
+ }
|
|
|
+ },
|
|
|
qwUserVideoResult(val) {
|
|
|
|
|
|
// 根据选中的内容,将返回的数据更新到相应的表单项
|
|
|
@@ -1074,6 +1135,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
resetSendMsgSop() {
|
|
|
+ this.liveGroupTypeId = null;
|
|
|
this.msgForm = {
|
|
|
liveId:null,
|
|
|
videoId:null,
|
|
|
@@ -1302,8 +1364,6 @@ export default {
|
|
|
this.resetSendMsgSop();
|
|
|
},
|
|
|
liveChangemsgForm(liveId){
|
|
|
- console.log(liveId);
|
|
|
- console.log(this.setting);
|
|
|
if(!!liveId){
|
|
|
for(let i =0;i<this.setting.length;i++){
|
|
|
this.$set(this.setting[i], 'liveId', liveId);
|