|
@@ -28,13 +28,42 @@
|
|
<el-radio
|
|
<el-radio
|
|
:label="2"
|
|
:label="2"
|
|
>企微</el-radio>
|
|
>企微</el-radio>
|
|
|
|
+ <el-radio
|
|
|
|
+ :label="3"
|
|
|
|
+ >企微群聊</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="小转天数" prop="minConversionDay">
|
|
|
|
|
|
+ <el-form-item label="选择员工" prop="qwUserIds" style="margin-top: 2%" v-if="form.type == 3">
|
|
|
|
+ <div>
|
|
|
|
+ <el-button
|
|
|
|
+ size="medium"
|
|
|
|
+ icon="el-icon-circle-plus-outline"
|
|
|
|
+ plain
|
|
|
|
+ @click="handlelistUser(form.type,form.sendType, true)">请选择使用员工</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <el-tag
|
|
|
|
+ style="margin-left: 5px"
|
|
|
|
+ size="medium"
|
|
|
|
+ :key="id"
|
|
|
|
+ v-for="id in userSelectList"
|
|
|
|
+ closable
|
|
|
|
+ :disable-transitions="false"
|
|
|
|
+ @close="handleClosegroupUser(id)">
|
|
|
|
+ <span v-for="list in companyQwUserList" :key="list.qwUserId" v-if="list.id==id">{{list.qwUserName}}</span>
|
|
|
|
+ </el-tag>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="群聊" prop="chatIds" v-if="form.type == 3">
|
|
|
|
+ <el-select multiple filterable clearable v-model="form.chatIds">
|
|
|
|
+ <el-option v-for="item in qwGroupList" :key="item.chatId" :label="item.name" :value="item.chatId" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="小转天数" prop="minConversionDay" v-if="form.type != 3">
|
|
<!-- <el-input class="el-input" type="" v-model="form.minConversionDay" placeholder="请输入" />-->
|
|
<!-- <el-input class="el-input" type="" v-model="form.minConversionDay" placeholder="请输入" />-->
|
|
<el-input-number v-model="form.minConversionDay" :min="1" :max="100" ></el-input-number>
|
|
<el-input-number v-model="form.minConversionDay" :min="1" :max="100" ></el-input-number>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="大转天数" prop="maxConversionDay">
|
|
|
|
|
|
+ <el-form-item label="大转天数" prop="maxConversionDay" v-if="form.type != 3">
|
|
<!-- <el-input class="el-input" v-model="form.maxConversionDay" placeholder="请输入" />-->
|
|
<!-- <el-input class="el-input" v-model="form.maxConversionDay" placeholder="请输入" />-->
|
|
<el-input-number v-model="form.maxConversionDay" :min="1" :max="100" ></el-input-number>
|
|
<el-input-number v-model="form.maxConversionDay" :min="1" :max="100" ></el-input-number>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -56,7 +85,7 @@
|
|
size="medium"
|
|
size="medium"
|
|
icon="el-icon-circle-plus-outline"
|
|
icon="el-icon-circle-plus-outline"
|
|
plain
|
|
plain
|
|
- @click="handlelistUser(form.type,form.sendType)">请选择使用员工</el-button>
|
|
|
|
|
|
+ @click="handlelistUser(form.type,form.sendType, false)">请选择使用员工</el-button>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<el-tag
|
|
<el-tag
|
|
@@ -184,7 +213,7 @@
|
|
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
- <el-form-item label="是否固定营期" prop="isFixed">
|
|
|
|
|
|
+ <el-form-item label="是否固定营期" prop="isFixed" v-if="form.type != 3">
|
|
<el-radio-group v-model="form.isFixed">
|
|
<el-radio-group v-model="form.isFixed">
|
|
<el-radio
|
|
<el-radio
|
|
:label="1"
|
|
:label="1"
|
|
@@ -209,7 +238,7 @@
|
|
(小时)
|
|
(小时)
|
|
</el-row>
|
|
</el-row>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item v-if="(form.sendType==2 || form.sendType==4)" label="自动添加SOP" prop="autoSopTime.autoSopType" >
|
|
|
|
|
|
+ <el-form-item v-if="(form.sendType==2 || form.sendType==4) && form.type != 3" label="自动添加SOP" prop="autoSopTime.autoSopType" >
|
|
<el-radio-group v-model="form.autoSopTime.autoSopType">
|
|
<el-radio-group v-model="form.autoSopTime.autoSopType">
|
|
<el-radio
|
|
<el-radio
|
|
:label="1"
|
|
:label="1"
|
|
@@ -279,7 +308,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
- <el-form-item label="是否只发送注册用户" prop="isFixed">
|
|
|
|
|
|
+ <el-form-item label="是否只发送注册用户" prop="isRegister" v-if="form.type != 3">
|
|
<el-radio-group v-model="form.isRegister">
|
|
<el-radio-group v-model="form.isRegister">
|
|
<el-radio
|
|
<el-radio
|
|
:label="1"
|
|
:label="1"
|
|
@@ -374,8 +403,10 @@ import CustomerGroupDetails from '@/views/qw/groupMsg/customerGroupDetails.vue'
|
|
import sopLogsDetails from '@/views/qw/sopLogs/sopLogsList.vue'
|
|
import sopLogsDetails from '@/views/qw/sopLogs/sopLogsList.vue'
|
|
import { listTag, getTag, } from "@/api/qw/tag";
|
|
import { listTag, getTag, } from "@/api/qw/tag";
|
|
import {listWxUserGroup, sopListWxUserGroup} from "@/api/wxUser/wxUserGroup";
|
|
import {listWxUserGroup, sopListWxUserGroup} from "@/api/wxUser/wxUserGroup";
|
|
|
|
+import {allList, listAll as chatListAll} from "@/api/qw/groupChat";
|
|
import SopTemp from "@/views/qw/sopTemp/sopTemp.vue";
|
|
import SopTemp from "@/views/qw/sopTemp/sopTemp.vue";
|
|
import {allListTagGroup} from "@/api/qw/tagGroup";
|
|
import {allListTagGroup} from "@/api/qw/tagGroup";
|
|
|
|
+import {getMyQwCompanyList} from "@/api/qw/user";
|
|
export default {
|
|
export default {
|
|
name: "addSop",
|
|
name: "addSop",
|
|
components: {SopTemp, CustomerGroupDetails, qwUserList,companyUserList,ImageUpload,sopLogsDetails},
|
|
components: {SopTemp, CustomerGroupDetails, qwUserList,companyUserList,ImageUpload,sopLogsDetails},
|
|
@@ -392,6 +423,7 @@ export default {
|
|
// 选中数组
|
|
// 选中数组
|
|
ids: [],
|
|
ids: [],
|
|
courseList:[],
|
|
courseList:[],
|
|
|
|
+ qwGroupList:[],
|
|
// videoList:[],
|
|
// videoList:[],
|
|
tags:null,
|
|
tags:null,
|
|
excludeTags:null,
|
|
excludeTags:null,
|
|
@@ -473,6 +505,7 @@ export default {
|
|
autoSopTime:{ autoSopType:2,autoStartTime:'00:00',autoEndTime:'24:00',autoSopSend:2},
|
|
autoSopTime:{ autoSopType:2,autoStartTime:'00:00',autoEndTime:'24:00',autoSopSend:2},
|
|
},
|
|
},
|
|
userSelectList:[],
|
|
userSelectList:[],
|
|
|
|
+ qwUserIds:[],
|
|
//企业微信员工
|
|
//企业微信员工
|
|
listUser:{
|
|
listUser:{
|
|
title:"",
|
|
title:"",
|
|
@@ -707,7 +740,7 @@ export default {
|
|
selectListSopTemp(type){
|
|
selectListSopTemp(type){
|
|
this.tempOpen = true;
|
|
this.tempOpen = true;
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.$refs.SopTempComments.getList(type);
|
|
|
|
|
|
+ this.$refs.SopTempComments.getList(type, undefined, this.form.type == 3);
|
|
}, 200);
|
|
}, 200);
|
|
|
|
|
|
},
|
|
},
|
|
@@ -717,9 +750,9 @@ export default {
|
|
this.tempOpen=false;
|
|
this.tempOpen=false;
|
|
},
|
|
},
|
|
//选择企微员工时
|
|
//选择企微员工时
|
|
- handlelistUser(type,sendType){
|
|
|
|
|
|
+ handlelistUser(type,sendType, selectOne){
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- this.$refs.QwUserList.getDetails(this.form.corpId,type,sendType);
|
|
|
|
|
|
+ this.$refs.QwUserList.getDetails(this.form.corpId,type,sendType, selectOne);
|
|
}, 1);
|
|
}, 1);
|
|
|
|
|
|
this.listUser.title="选择企微员工"
|
|
this.listUser.title="选择企微员工"
|
|
@@ -745,9 +778,10 @@ export default {
|
|
list.forEach(obj => {
|
|
list.forEach(obj => {
|
|
if (!this.userSelectList.some(item => item == obj.id)) {
|
|
if (!this.userSelectList.some(item => item == obj.id)) {
|
|
this.userSelectList.push(obj.id);
|
|
this.userSelectList.push(obj.id);
|
|
|
|
+ this.qwUserIds.push(obj.qwUserId);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ this.loadChatList()
|
|
},
|
|
},
|
|
|
|
|
|
//销售员工
|
|
//销售员工
|
|
@@ -778,6 +812,8 @@ export default {
|
|
const index = this.userSelectList.findIndex(t => t === list);
|
|
const index = this.userSelectList.findIndex(t => t === list);
|
|
if (index !== -1) {
|
|
if (index !== -1) {
|
|
this.userSelectList.splice(index, 1);
|
|
this.userSelectList.splice(index, 1);
|
|
|
|
+ this.qwUserIds.splice(index, 1);
|
|
|
|
+ this.loadChatList()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
@@ -840,54 +876,65 @@ export default {
|
|
|
|
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
},
|
|
},
|
|
|
|
+ loadChatList(){
|
|
|
|
+ chatListAll(this.qwUserIds.join()).then(e => {
|
|
|
|
+ this.qwGroupList = e.data;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if(this.userSelectList.length<=0){
|
|
|
|
- return this.$message.error("请选择员工")
|
|
|
|
- }
|
|
|
|
- this.form.qwUserIds = this.userSelectList.join(",");
|
|
|
|
|
|
+ if(this.form.type == 3){
|
|
|
|
+ if(this.form.chatIds.length <= 0) {
|
|
|
|
+ return this.$message.error("请选择群聊")
|
|
|
|
+ }
|
|
|
|
+ this.form.chatId = this.form.chatIds.join();
|
|
|
|
+ }else{
|
|
|
|
+ if(this.userSelectList.length<=0){
|
|
|
|
+ return this.$message.error("请选择员工")
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
- if (this.tagsIdsChangeSelectList!=null && this.tagsIdsChangeSelectList.length>0){
|
|
|
|
|
|
+ if (this.tagsIdsChangeSelectList!=null && this.tagsIdsChangeSelectList.length>0){
|
|
|
|
|
|
- // 确保 this.form.tags 是数组
|
|
|
|
- if (!this.form.tags) {
|
|
|
|
- this.form.tags = []; // 如果未定义,初始化
|
|
|
|
- } else {
|
|
|
|
- this.form.tags = []; // 清空已有数据
|
|
|
|
- }
|
|
|
|
|
|
+ // 确保 this.form.tags 是数组
|
|
|
|
+ if (!this.form.tags) {
|
|
|
|
+ this.form.tags = []; // 如果未定义,初始化
|
|
|
|
+ } else {
|
|
|
|
+ this.form.tags = []; // 清空已有数据
|
|
|
|
+ }
|
|
|
|
|
|
- // 遍历并添加 tagId
|
|
|
|
- this.tagsIdsChangeSelectList.forEach(tag => {
|
|
|
|
- if (tag.tagId) { // 确保 tagId 存在
|
|
|
|
- this.form.tags.push(tag.tagId);
|
|
|
|
|
|
+ // 遍历并添加 tagId
|
|
|
|
+ this.tagsIdsChangeSelectList.forEach(tag => {
|
|
|
|
+ if (tag.tagId) { // 确保 tagId 存在
|
|
|
|
+ this.form.tags.push(tag.tagId);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.form.tags=this.form.tags.join(",");
|
|
|
|
+ }else {
|
|
|
|
+ return this.$message.error("选择的标签不能为空!!请选择筛选的标签")
|
|
|
|
+ }
|
|
|
|
+ if (this.outTagsIdsChangeSelectList!=null && this.outTagsIdsChangeSelectList.length>0){
|
|
|
|
+ // 确保 this.form.tags 是数组
|
|
|
|
+ if (!this.form.excludeTags) {
|
|
|
|
+ this.form.excludeTags = []; // 如果未定义,初始化
|
|
|
|
+ } else {
|
|
|
|
+ this.form.excludeTags = []; // 清空已有数据
|
|
}
|
|
}
|
|
- });
|
|
|
|
- this.form.tags=this.form.tags.join(",");
|
|
|
|
- }else {
|
|
|
|
- return this.$message.error("选择的标签不能为空!!请选择筛选的标签")
|
|
|
|
- }
|
|
|
|
|
|
|
|
- if (this.outTagsIdsChangeSelectList!=null && this.outTagsIdsChangeSelectList.length>0){
|
|
|
|
- // 确保 this.form.tags 是数组
|
|
|
|
- if (!this.form.excludeTags) {
|
|
|
|
- this.form.excludeTags = []; // 如果未定义,初始化
|
|
|
|
- } else {
|
|
|
|
- this.form.excludeTags = []; // 清空已有数据
|
|
|
|
|
|
+ // 遍历并添加 tagId
|
|
|
|
+ this.outTagsIdsChangeSelectList.forEach(tag => {
|
|
|
|
+ if (tag.tagId) { // 确保 tagId 存在
|
|
|
|
+ this.form.excludeTags.push(tag.tagId);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.form.excludeTags=this.form.excludeTags.join(",");
|
|
}
|
|
}
|
|
|
|
|
|
- // 遍历并添加 tagId
|
|
|
|
- this.outTagsIdsChangeSelectList.forEach(tag => {
|
|
|
|
- if (tag.tagId) { // 确保 tagId 存在
|
|
|
|
- this.form.excludeTags.push(tag.tagId);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- this.form.excludeTags=this.form.excludeTags.join(",");
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ this.form.qwUserIds = this.userSelectList.join(",");
|
|
this.form.setting=JSON.stringify(this.setting)
|
|
this.form.setting=JSON.stringify(this.setting)
|
|
this.form.autoSopTime.createTime=this.formatDateTo24HourString(new Date());
|
|
this.form.autoSopTime.createTime=this.formatDateTo24HourString(new Date());
|
|
|
|
|