|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
|
|
|
- <el-form class="search-form" :inline="true" >
|
|
|
+ <el-form :model="queryParams" ref="queryForm" class="search-form" :inline="true" >
|
|
|
|
|
|
<el-form-item label="所属部门">
|
|
|
<treeselect style="width:205.4px" v-model="deptId" :options="deptOptions" :show-count="true" placeholder="请选择所属部门" />
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item>
|
|
|
- <el-select filterable v-model="userIds" @change="companyUserChange" placeholder="请选择员工" clearable size="small">
|
|
|
+ <el-form-item prop="companyUserId">
|
|
|
+ <el-select filterable v-model="queryParams.companyUserId" @change="companyUserChange" placeholder="请选择员工" clearable size="small">
|
|
|
<el-option
|
|
|
v-for="item in users"
|
|
|
:key="item.userId"
|
|
@@ -18,8 +18,8 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item>
|
|
|
- <el-select filterable v-model="qwUserId" @change="qwUserChange" placeholder="请选择企微账号" clearable size="small">
|
|
|
+ <el-form-item prop="qwUserId">
|
|
|
+ <el-select filterable v-model="queryParams.qwUserId" @change="qwUserChange" placeholder="请选择企微账号" clearable size="small">
|
|
|
<el-option
|
|
|
v-for="item in accountList"
|
|
|
:key="item.qwUserId"
|
|
@@ -100,7 +100,7 @@ import store from "@/store";
|
|
|
import { getQrCode } from '@/api/qw/login';
|
|
|
import { getDeviceId,listAccount,getAccount} from '@/api/qw/account';
|
|
|
import LemonMessageVoice from "@/components/LemonUI/components/message/voice";
|
|
|
-import { getContactsByUser,getConversations,getHistoryList,getConversation,sendTextMsg,sendImageMsg,getRoomInfo,exportMessage} from '@/api/qw/im';
|
|
|
+import { getContactsByUser,getConversations,getHistoryList,getRoomInfo,exportMessage} from '@/api/qw/im';
|
|
|
import Conversations from "@/components/LemonUI/database/conversations";
|
|
|
import EmojiData from "@/components/LemonUI/database/emoji";
|
|
|
import '@/components/LemonUI/index.css';
|
|
@@ -173,7 +173,8 @@ export default {
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- conversationId: null,
|
|
|
+ companyUserId: null,
|
|
|
+ qwUserId:null,
|
|
|
},
|
|
|
companys:[],
|
|
|
deptOptions:[],
|
|
@@ -188,6 +189,7 @@ export default {
|
|
|
},
|
|
|
created(){
|
|
|
this.getTreeselect();
|
|
|
+ this.qwListAccount();
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
@@ -197,7 +199,6 @@ export default {
|
|
|
//this.getConversation(); //获取会话信息
|
|
|
|
|
|
const IMUI = this.$refs.IMUI;
|
|
|
-
|
|
|
IMUI.initMenus([
|
|
|
{
|
|
|
name: "messages",
|
|
@@ -259,18 +260,20 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+
|
|
|
+ getTreeselect() {
|
|
|
+ treeselect().then((response) => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
currDeptChange(val){
|
|
|
console.log(val)
|
|
|
this.deptId=val;
|
|
|
- this.companyUserId=null;
|
|
|
+ this.queryParams.companyUserId=null;
|
|
|
this.getUserListByDeptId();
|
|
|
},
|
|
|
- getTreeselect() {
|
|
|
- treeselect().then((response) => {
|
|
|
- this.deptOptions = response.data;
|
|
|
- });
|
|
|
- },
|
|
|
+
|
|
|
getUserListByDeptId() {
|
|
|
this.userIds=undefined;
|
|
|
var data={deptId:this.deptId};
|
|
@@ -279,21 +282,17 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
companyUserChange(companyUserId){
|
|
|
- this.companyUserId=companyUserId;
|
|
|
+ this.queryParams.companyUserId=companyUserId;
|
|
|
this.qwListAccount();
|
|
|
},
|
|
|
qwListAccount() {
|
|
|
- if(!this.companyUserId){
|
|
|
- this.msgError("请选择员工");
|
|
|
- return;
|
|
|
- }
|
|
|
- let queryParams={pageNum: 1, pageSize: 10,companyUserId:this.companyUserId};
|
|
|
- listAccount(queryParams).then(response => {
|
|
|
+
|
|
|
+ listAccount(this.queryParams).then(response => {
|
|
|
this.accountList = response.rows;
|
|
|
if(this.accountList.length>0){
|
|
|
this.qwUser=this.accountList[0];
|
|
|
- this.qwUserId=this.qwUser.qwUserId;
|
|
|
- this.qwUser.userId=this.qwUserId;
|
|
|
+ this.queryParams.qwUserId=this.qwUser.qwUserId;
|
|
|
+ this.qwUser.userId=this.queryParams.qwUserId;
|
|
|
if(this.qwUser.qwUserId==null){
|
|
|
this.msgError("暂未扫码登录企微号");
|
|
|
return;
|
|
@@ -304,15 +303,15 @@ export default {
|
|
|
}else{
|
|
|
this.qwUser={};
|
|
|
this.qwUserId="";
|
|
|
- this.msgError("该员工暂无企微号!");
|
|
|
+ this.msgError("暂无企微号!");
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
qwUserChange(qwUserId){
|
|
|
let index= this.accountList.findIndex(item => item.qwUserId == qwUserId);
|
|
|
this.qwUser=this.accountList[index];
|
|
|
- this.qwUserId=this.qwUser.qwUserId;
|
|
|
- this.qwUser.userId=this.qwUserId;
|
|
|
+ this.queryParams.qwUserId=this.qwUser.qwUserId;
|
|
|
+ this.qwUser.userId=this.queryParams.qwUserId;
|
|
|
if(this.qwUser.qwUserId==null){
|
|
|
this.msgError("暂未扫码登录企微号");
|
|
|
return;
|