wansfa 1 year ago
parent
commit
2c2b9ea3f7
3 changed files with 110 additions and 40 deletions
  1. 83 6
      src/views/qw/qwAccounts/index.vue
  2. 25 26
      src/views/qw/qwChat/chatmsg.vue
  3. 2 8
      src/views/qw/qwChat/qq.vue

+ 83 - 6
src/views/qw/qwAccounts/index.vue

@@ -1,5 +1,56 @@
 <template>
   <div class="app-container">
+
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+     <el-form-item >
+          <treeselect style="width: 220px" :clearable="false"  v-model="deptId"  :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
+     </el-form-item> 
+      <el-form-item label="企微账号" prop="account">
+        <el-input
+          v-model="queryParams.account"
+          placeholder="请输入企微账号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!-- <el-form-item label="员工姓名" prop="companyUserName">
+        <el-input
+          v-model="queryParams.companyUserName"
+          placeholder="请输入员工姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item> -->
+      <el-form-item label="在线状态" prop="authCheck">
+          <el-select filterable  v-model="queryParams.authCheck" placeholder="请选择" clearable size="small">
+              <el-option
+                v-for="item in authCheckOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="下线类型" prop="offlineType" >
+          <el-select filterable  v-model="queryParams.offlineType" placeholder="请选择" clearable size="small">
+              <el-option
+                v-for="item in offlineTypeOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+        </el-select>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
@@ -98,10 +149,14 @@
 <script>
 import { listAccount, getAccount, delAccount, addAccount, auditAccount, exportAccount,updateDevice } from "@/api/qw/account";
 import { qwLoginOut } from "@/api/qw/login";
+import { treeselect } from "@/api/company/companyDept";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 import store from "@/store";
 export default {
   name: "Account",
+  components: { Treeselect },
   data() {
     return {
       // 遮罩层
@@ -123,10 +178,13 @@ export default {
       isAuditOptions:[],
       availableOptions:[],
       authCheckOptions:[],
+      offlineTypeOptions:[],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
       open: false,
+      deptOptions:[],
+      deptId:undefined,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -142,7 +200,8 @@ export default {
         deviceId: null,
         deptId: null,
         companyUserId: null,
-        isAudit: 0,
+        isAudit:null,
+        offlineType:null,
       },
       // 表单参数
       form: {},
@@ -163,11 +222,8 @@ export default {
     };
   },
   created() {
-    this.getList();
-    // getCompanyList().then(response => {
-    //   this.companys = response.data;
-    // });
-    this.getDicts("common_audit").then((response) => {
+
+     this.getDicts("common_audit").then((response) => {
       this.isAuditOptions = response.data;
     });
     this.getDicts("qw_device_status").then((response) => {
@@ -176,6 +232,16 @@ export default {
     this.getDicts("qw_login_status").then((response) => {
       this.authCheckOptions = response.data;
     });
+    this.getDicts("qw_offline_type").then((response) => {
+      this.offlineTypeOptions = response.data;
+    });
+    
+    this.getTreeselect();
+    this.getList();
+    // getCompanyList().then(response => {
+    //   this.companys = response.data;
+    // });
+   
   },
   methods: {
     /** 查询企微功能账号管理列表 */
@@ -236,6 +302,17 @@ export default {
       this.open = true;
       this.title = "添加企微功能账号管理";
     },
+
+    getTreeselect() {
+        var that=this;
+        var param={companyId:this.companyId}
+        treeselect(param).then((response) => {
+          this.deptOptions = response.data;
+          if(response.data!=null&&response.data.length>0){
+            //this.queryParams.deptId=response.data[0].id;
+          }
+        });
+    },
     
     handleAudit(row) {
       this.reset();

+ 25 - 26
src/views/qw/qwChat/chatmsg.vue

@@ -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;

+ 2 - 8
src/views/qw/qwChat/qq.vue

@@ -100,22 +100,19 @@
          <img style="width:100%;height:auto" :src="dialogImageUrl" alt="" />
       </el-dialog>
 
-     
        <el-dialog :visible.sync="dialogVideoVisible"
                :close-on-click-modal="false"
                :destroy-on-close="true"
                :width="aplayer.pWidth"
                :height="aplayer.height" 
                @close="dialogVideoVisible=false"
-               ref="player"
-               >
+               ref="player">
           <videoPlayer  :width="aplayer.width" :height="aplayer.height"  :videoWidth="aplayer.videoWidth"  :videoHeight="aplayer.videoHeight"   :vid="aplayer.vid"  :autoplay="true" 
             :source="dialogVideoUrl" :cover="dialogVideoCover" ref="player"></videoPlayer>
          </el-dialog>
 
        <Material ref="material" @pickImageData="handlePickImageDone"  v-model="imageArr" type="image" :num="1" :width="150" :height="150" />
-       
-
+      
   </div>
 </template>
 
@@ -123,11 +120,8 @@
 
 import store from "@/store";
 import { getQrCode } from '@/api/qw/login';
-import { getDeviceId} from '@/api/qw/account';
 import LemonMessageVoice from "@/components/LemonUI/components/message/voice";
 import { getContactsByUser,getConversations,getMessageList,getConversation,sendTextMsg,sendImageMsg,getRoomInfo} from '@/api/qw/im';
-import ContactsData from "@/components/LemonUI/database/contacts";
-import MessagesData from "@/components/LemonUI/database/messages";
 import Conversations from "@/components/LemonUI/database/conversations";
 import EmojiData from "@/components/LemonUI/database/emoji";
 import '@/components/LemonUI/index.css';