|
@@ -51,7 +51,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
|
|
|
+ <el-row :gutter="10" class="mb8" v-if="filterMode == 1">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-tooltip class="item" effect="dark" content="此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】" placement="top">
|
|
<el-tooltip class="item" effect="dark" content="此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】" placement="top">
|
|
<el-button
|
|
<el-button
|
|
@@ -79,9 +79,33 @@
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <Tip :title="'【营期一键群发】:此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】'" />
|
|
|
|
- <Tip :title="'【批量删除营期】:此功能用于删除选中的【整个营期】,删除之后将不会在给原营期的客户发送消息,ps:删除之后不可恢复'" />
|
|
|
|
- <Tip :title="'【天数】:【列表:营期时间】对应列表中的天数是几 就代表着 插件助手 会发送【任务模板】里的第几天的消息'" />
|
|
|
|
|
|
+ <el-row :gutter="10" class="mb8" v-if="filterMode == 2">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="添加新群聊进入任务" placement="top">
|
|
|
|
+ <el-button
|
|
|
|
+ type="warning"
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
+ size="medium"
|
|
|
|
+ @click="addGroup"
|
|
|
|
+ >追加群聊</el-button>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="修改选择的群聊营期时间" placement="top">
|
|
|
|
+ <el-button
|
|
|
|
+ type="danger"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ size="medium"
|
|
|
|
+ :disabled="multiple"
|
|
|
|
+ @click="updateGroupTime"
|
|
|
|
+ >批量修改营期时间</el-button>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <Tip v-if="filterMode == 1" :title="'【营期一键群发】:此功能用于给 选中的 营期 内【所有的】客户发送 消息【或者发送草稿-/-清楚草稿】'" />
|
|
|
|
+ <Tip v-if="filterMode == 1" :title="'【批量删除营期】:此功能用于删除选中的【整个营期】,删除之后将不会在给原营期的客户发送消息,ps:删除之后不可恢复'" />
|
|
|
|
+ <Tip v-if="filterMode == 1" :title="'【天数】:【列表:营期时间】对应列表中的天数是几 就代表着 插件助手 会发送【任务模板】里的第几天的消息'" />
|
|
|
|
|
|
<el-table border v-loading="loading" :data="sopUserLogsList" @selection-change="handleSelectionChange">
|
|
<el-table border v-loading="loading" :data="sopUserLogsList" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
@@ -152,39 +176,126 @@
|
|
</el-drawer>
|
|
</el-drawer>
|
|
|
|
|
|
<send-msg-open-tool ref="sendMsgOpenTool" ></send-msg-open-tool>
|
|
<send-msg-open-tool ref="sendMsgOpenTool" ></send-msg-open-tool>
|
|
-
|
|
|
|
|
|
+ <el-dialog title="修改营期时间" :visible.sync="updateTimeData.open" width="800px" append-to-body>
|
|
|
|
+ <p>
|
|
|
|
+ <span>选择群聊:</span>
|
|
|
|
+ <el-tag v-for="name in chatNames">{{name}}</el-tag>
|
|
|
|
+ </p>
|
|
|
|
+ <el-form ref="msgForm" :model="updateTimeData.form" label-width="100px">
|
|
|
|
+ <el-form-item label="日期">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="updateTimeData.form.date"
|
|
|
|
+ type="date"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ placeholder="选择日期">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="submitUpdateTimeForm">确 定</el-button>
|
|
|
|
+ <el-button @click="updateTimeData.open = false">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog title="选择企微" :visible.sync="addGroupData.userOpen" width="1300px" append-to-body>
|
|
|
|
+ <qwUserList ref="QwUserList" @selectUserList="selectUserList"></qwUserList>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog title="追加群聊" :visible.sync="addGroupData.open" width="800px" append-to-body>
|
|
|
|
+ <el-form ref="msgForm" :model="addGroupData.form" label-width="100px">
|
|
|
|
+ <el-form-item label="选择员工" prop="qwUserIds" style="margin-top: 2%">
|
|
|
|
+ <div>
|
|
|
|
+ <el-button
|
|
|
|
+ size="medium"
|
|
|
|
+ icon="el-icon-circle-plus-outline"
|
|
|
|
+ plain
|
|
|
|
+ @click="handleCompanyUser">请选择使用员工</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 companyUserLists " :key="list.userId" v-if="list.id == id">{{list.qwUserName}}</span>
|
|
|
|
+ </el-tag>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="群聊">
|
|
|
|
+ <el-select multiple filterable clearable v-model="addGroupData.form.chatIds">
|
|
|
|
+ <el-option v-for="item in addGroupData.selectChat" :key="item.chatId" :label="item.name" :value="item.chatId"/>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="日期">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="addGroupData.form.date"
|
|
|
|
+ type="date"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ placeholder="选择日期">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="submitAddGroupForm">确 定</el-button>
|
|
|
|
+ <el-button @click="addGroupData.open = false">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- listSopUserLogs,
|
|
|
|
- getSopUserLogs,
|
|
|
|
|
|
+ addGroupChat,
|
|
delSopUserLogs,
|
|
delSopUserLogs,
|
|
- addSopUserLogs,
|
|
|
|
- updateSopUserLogs,
|
|
|
|
exportSopUserLogs,
|
|
exportSopUserLogs,
|
|
- repairSopUserLogs
|
|
|
|
-} from "../../../api/qw/sopUserLogs";
|
|
|
|
-import sopLogsDetails from "@/views/qw/sopLogs/sopLogsList.vue";
|
|
|
|
-import SopUserLogsInfoDetails from "@/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue";
|
|
|
|
-import {syncMyExternalContact} from "@/api/qw/externalContact";
|
|
|
|
-import SendMsgOpenTool from "@/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue";
|
|
|
|
-import Tip from "../../../components/Tip/index.vue";
|
|
|
|
|
|
+ listSopUserLogs,
|
|
|
|
+ repairSopUserLogs,
|
|
|
|
+ updateLogDate
|
|
|
|
+} from '@/api/qw/sopUserLogs'
|
|
|
|
+import sopLogsDetails from '@/views/qw/sopLogs/sopLogsList.vue'
|
|
|
|
+import SopUserLogsInfoDetails from '@/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue'
|
|
|
|
+import SendMsgOpenTool from '@/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue'
|
|
|
|
+import Tip from '../../../components/Tip/index.vue'
|
|
|
|
+import {listAll as chatListAll} from "@/api/qw/groupChat";
|
|
|
|
+import companyUserList from "@/views/company/companyUser/companyUserList.vue";
|
|
|
|
+import qwUserList from "@/views/qw/user/qwUserList.vue";
|
|
|
|
+import {getQwAllUserList, listUser} from "@/api/company/companyUser";
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: "sopUserLogsSchedule",
|
|
name: "sopUserLogsSchedule",
|
|
- components: {Tip, SendMsgOpenTool, SopUserLogsInfoDetails, sopLogsDetails},
|
|
|
|
|
|
+ components: {qwUserList, companyUserList, Tip, SendMsgOpenTool, SopUserLogsInfoDetails, sopLogsDetails},
|
|
props:{
|
|
props:{
|
|
rowDetailFrom:{},
|
|
rowDetailFrom:{},
|
|
},
|
|
},
|
|
|
|
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ qwUserIds: [],
|
|
|
|
+ companyUserLists:[],
|
|
|
|
+ chatNames: [],
|
|
|
|
+ userSelectList:[],
|
|
sopUserLogId:null,
|
|
sopUserLogId:null,
|
|
sopName:'',
|
|
sopName:'',
|
|
tempId:'',
|
|
tempId:'',
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
|
|
+ // 查询参数
|
|
|
|
+ addGroupData: {
|
|
|
|
+ open: false,
|
|
|
|
+ userOpen: false,
|
|
|
|
+ selectChat: [],
|
|
|
|
+ form: {
|
|
|
|
+ chatIds: [],
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ updateTimeData: {
|
|
|
|
+ open: false,
|
|
|
|
+ form: {
|
|
|
|
+ date: null,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
// 导出遮罩层
|
|
// 导出遮罩层
|
|
exportLoading: false,
|
|
exportLoading: false,
|
|
// 选中数组
|
|
// 选中数组
|
|
@@ -223,6 +334,7 @@ export default {
|
|
corpId: null,
|
|
corpId: null,
|
|
startTime: null,
|
|
startTime: null,
|
|
status: null,
|
|
status: null,
|
|
|
|
+ type:null,
|
|
userId: null
|
|
userId: null
|
|
},
|
|
},
|
|
setting:[],
|
|
setting:[],
|
|
@@ -255,7 +367,10 @@ export default {
|
|
this.sopName = this.$route.query.name;
|
|
this.sopName = this.$route.query.name;
|
|
this.tempId = this.$route.query.tempId;
|
|
this.tempId = this.$route.query.tempId;
|
|
this.queryParams.corpId= this.$route.query.corpId;
|
|
this.queryParams.corpId= this.$route.query.corpId;
|
|
-
|
|
|
|
|
|
+ this.queryParams.type= this.$route.query.type;
|
|
|
|
+ getQwAllUserList(this.queryParams.corpId).then(response => {
|
|
|
|
+ this.companyUserLists = response.data;
|
|
|
|
+ });
|
|
this.getList()
|
|
this.getList()
|
|
|
|
|
|
},
|
|
},
|
|
@@ -344,6 +459,9 @@ export default {
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.id)
|
|
this.ids = selection.map(item => item.id)
|
|
|
|
+ if(this.filterMode == 2){
|
|
|
|
+ this.chatNames = selection.map(item => item.chatName);
|
|
|
|
+ }
|
|
this.single = selection.length!==1
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
this.multiple = !selection.length
|
|
},
|
|
},
|
|
@@ -392,7 +510,68 @@ export default {
|
|
this.download(response.msg);
|
|
this.download(response.msg);
|
|
this.exportLoading = false;
|
|
this.exportLoading = false;
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ addGroup(){
|
|
|
|
+ this.addGroupData.open = true;
|
|
|
|
+ this.addGroupData.form = {date: new Date(), chatIds: []};
|
|
|
|
+ },
|
|
|
|
+ updateGroupTime(){
|
|
|
|
+ this.updateTimeData.open = true;
|
|
|
|
+ this.updateTimeData.form = {date: new Date()};
|
|
|
|
+ },
|
|
|
|
+ submitUpdateTimeForm(){
|
|
|
|
+ let form = {
|
|
|
|
+ date: this.updateTimeData.form.date,
|
|
|
|
+ ids: this.ids,
|
|
|
|
+ }
|
|
|
|
+ updateLogDate(form).then(e => {
|
|
|
|
+ this.updateTimeData.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ submitAddGroupForm(){
|
|
|
|
+ let form = {
|
|
|
|
+ id: this.queryParams.sopId,
|
|
|
|
+ qwUserIds: this.userSelectList.join(),
|
|
|
|
+ chatIds: this.addGroupData.form.chatIds.join(),
|
|
|
|
+ date: this.addGroupData.form.date,
|
|
|
|
+ }
|
|
|
|
+ addGroupChat(form).then(e => {
|
|
|
|
+ this.addGroupData.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleCompanyUser(){
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$refs.QwUserList.getDetails(this.queryParams.corpId,this.queryParams.type, 2);
|
|
|
|
+ }, 1);
|
|
|
|
+ this.addGroupData.userOpen = true;
|
|
|
|
+ },
|
|
|
|
+ handleClosegroupUser(list){
|
|
|
|
+ const index = this.userSelectList.findIndex(t => t === list);
|
|
|
|
+ if (index !== -1) {
|
|
|
|
+ this.userSelectList.splice(index, 1);
|
|
|
|
+ this.qwUserIds.splice(index, 1);
|
|
|
|
+ this.loadChatList()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ loadChatList(){
|
|
|
|
+ chatListAll(this.qwUserIds.join(), this.queryParams.corpId, this.queryParams.sopId).then(e => {
|
|
|
|
+ this.addGroupData.selectChat = e.data;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ selectUserList(list){
|
|
|
|
+ this.addGroupData.userOpen=false;
|
|
|
|
+ list.forEach(obj => {
|
|
|
|
+ if (!this.userSelectList.some(item => item == obj.id)) {
|
|
|
|
+ console.info(this.userSelectList)
|
|
|
|
+ this.userSelectList.push(obj.id);
|
|
|
|
+ this.qwUserIds.push(obj.qwUserId);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ this.loadChatList()
|
|
|
|
+
|
|
|
|
+ },
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|