Sfoglia il codice sorgente

总后台的 员工管理和 企业微信员工管理

三七 5 giorni fa
parent
commit
c5aad47973

+ 11 - 1
src/api/qw/user.js

@@ -12,7 +12,7 @@ export function staffListUser(query) {
 export function staffListPost(query) {
   return request({
     url: '/qw/user/staffListPost',
-    method: 'post',
+    method: 'get',
     data: query
   })
 }
@@ -59,6 +59,16 @@ export function getMyQwCompanyList(query) {
     method: 'get'
   })
 }
+
+
+export function getQwCompanyList() {
+  return request({
+    url: '/qw/user/getQwCompanyList',
+    method: 'get'
+  })
+}
+
+
 // 查询企微用户详细
 export function getQwUser(id) {
   return request({

+ 10 - 7
src/views/company/companyUser/indexAll.vue

@@ -304,7 +304,7 @@
         <el-form-item label="企微公司" prop="corpId">
           <el-select v-model="synform.corpId" placeholder="企微公司"  >
             <el-option
-              v-for="dict in myQwCompanyList"
+              v-for="dict in qwCompanyList"
               :key="dict.dictValue"
               :label="dict.dictLabel"
               :value="dict.dictValue"
@@ -323,7 +323,7 @@
         <el-form-item label="企微公司" prop="corpId">
           <el-select v-model="synNameform.corpId" placeholder="企微公司"  >
             <el-option
-              v-for="dict in myQwCompanyList"
+              v-for="dict in qwCompanyList"
               :key="dict.dictValue"
               :label="dict.dictLabel"
               :value="dict.dictValue"
@@ -476,7 +476,7 @@
             <el-form-item label="企微主体" prop="corpId">
               <el-select v-model="formBindCompany.corpId" placeholder="企微主体" size="small">
                 <el-option
-                  v-for="dict in myQwCompanyList"
+                  v-for="dict in qwCompanyList"
                   :key="dict.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
@@ -678,12 +678,12 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {bindQwUser, addQwUser, getQwUserByIds,addQwUserName} from '@/api/qw/user';
 import { syncDept } from '@/api/qw/qwDept';
-import {getMyQwCompanyList } from "@/api/qw/user";
 import  selectUser  from "@/views/company/components/selectQwUser.vue";
 import { getConfigByKey } from "@/api/company/companyConfig";
 import axios from "axios";
 import selectDoctor from "@/views/qw/user/selectDoctor.vue";
 import { getCompanyList } from '@/api/company/company'
+import { getQwCompanyList } from '../../../api/qw/user'
 export default {
   name: "User",
   components: {selectDoctor, Treeselect ,selectUser},
@@ -707,7 +707,7 @@ export default {
       loading: false,
       qwUserList:[],
       qwUserId:[],
-      myQwCompanyList:[],
+      qwCompanyList:[],
       qwUser:[],
       user:{
         open:false,
@@ -921,8 +921,8 @@ export default {
     getCitysAreaList().then(res=>{
       this.citysAreaList=res.data;
     })
-    getMyQwCompanyList().then(response => {
-      this.myQwCompanyList = response.data;
+    getQwCompanyList().then(response => {
+      this.qwCompanyList = response.data;
     });
   },
   methods: {
@@ -1168,6 +1168,7 @@ export default {
         this.open = true;
         this.title = "添加员工";
         this.form.password = this.form1.loginPassword;
+        this.form.companyId = this.companyIdOpen.companyId;
       });
     },
 
@@ -1276,6 +1277,7 @@ export default {
               if (response.code === 200) {
                 this.msgSuccess("修改成功");
                 this.open = false;
+                this.companyIdOpen.open=false;
                 this.getList();
               }
             });
@@ -1284,6 +1286,7 @@ export default {
               if (response.code === 200) {
                 this.msgSuccess("新增成功");
                 this.open = false;
+                this.companyIdOpen.open=false;
                 this.getList();
               }
             });

+ 1 - 1
src/views/qw/externalContact/index.vue

@@ -12,7 +12,7 @@
         </el-select>
       </el-form-item>
       <el-form-item label="销售账号" prop="companyUserName">
-        <el-select v-model="queryParams.companyUserName" placeholder="销售账号"  size="small" clearable>
+        <el-select v-model="queryParams.companyUserName" placeholder="销售账号"  size="small" filterable clearable  >
           <el-option
               v-for="dict in companyUserNameList"
               :key="dict.userId"

+ 61 - 61
src/views/qw/user/index.vue

@@ -176,11 +176,11 @@
 <!--        </template>-->
 <!--      </el-table-column>-->
 
-      <el-table-column label="自动发课" align="center" prop="isAuto">
-        <template slot-scope="scope">
-          <dict-tag :options="isAutoOptions" :value="scope.row.isAuto"/>
-        </template>
-      </el-table-column>
+<!--      <el-table-column label="自动发课" align="center" prop="isAuto">-->
+<!--        <template slot-scope="scope">-->
+<!--          <dict-tag :options="isAutoOptions" :value="scope.row.isAuto"/>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120px" fixed="right">
         <template slot-scope="scope">
           <el-button
@@ -234,50 +234,50 @@
             v-hasPermi="['qw:user:login']">
             二次验证
           </el-button>
-          <el-button
-            v-if="scope.row.serverStatus!=1"
-            size="mini"
-            type="text"
-            icon="el-icon-moon"
-            plain
-            @click="handleGetQwIpad(scope.row)"
-            v-hasPermi="['qw:user:login']"
-          >
-            获取Ai主机
-          </el-button>
-          <el-button
-            v-if="scope.row.serverStatus==1 && scope.row.ipadStatus!=1"
-            size="mini"
-            type="text"
-            icon="el-icon-moon"
-            plain
-            @click="handleDelQwIpad(scope.row)"
-            v-hasPermi="['qw:user:login']"
-          >
-            解绑Ai主机
-          </el-button>
-          <el-button
-            v-if="scope.row.isAuto=='00'"
-            size="mini"
-            type="text"
-            icon="el-icon-moon"
-            plain
-            @click="handleUpdateIsAuto(scope.row,'01')"
-            v-hasPermi="['qw:user:isauto']"
-          >
-            启用插件
-          </el-button>
-          <el-button
-            v-if="scope.row.isAuto=='01'"
-            size="mini"
-            type="text"
-            icon="el-icon-moon"
-            plain
-            @click="handleUpdateIsAuto(scope.row,'00')"
-            v-hasPermi="['qw:user:isauto']"
-          >
-            禁用插件
-          </el-button>
+<!--          <el-button-->
+<!--            v-if="scope.row.serverStatus!=1"-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-moon"-->
+<!--            plain-->
+<!--            @click="handleGetQwIpad(scope.row)"-->
+<!--            v-hasPermi="['qw:user:login']"-->
+<!--          >-->
+<!--            获取Ai主机-->
+<!--          </el-button>-->
+<!--          <el-button-->
+<!--            v-if="scope.row.serverStatus==1 && scope.row.ipadStatus!=1"-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-moon"-->
+<!--            plain-->
+<!--            @click="handleDelQwIpad(scope.row)"-->
+<!--            v-hasPermi="['qw:user:login']"-->
+<!--          >-->
+<!--            解绑Ai主机-->
+<!--          </el-button>-->
+<!--          <el-button-->
+<!--            v-if="scope.row.isAuto=='00'"-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-moon"-->
+<!--            plain-->
+<!--            @click="handleUpdateIsAuto(scope.row,'01')"-->
+<!--            v-hasPermi="['qw:user:isauto']"-->
+<!--          >-->
+<!--            启用插件-->
+<!--          </el-button>-->
+<!--          <el-button-->
+<!--            v-if="scope.row.isAuto=='01'"-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-moon"-->
+<!--            plain-->
+<!--            @click="handleUpdateIsAuto(scope.row,'00')"-->
+<!--            v-hasPermi="['qw:user:isauto']"-->
+<!--          >-->
+<!--            禁用插件-->
+<!--          </el-button>-->
         </template>
       </el-table-column>
       <el-table-column label="主机" align="center" class-name="small-padding fixed-width" width="110px" fixed="right">
@@ -316,17 +316,17 @@
           <!--          >-->
           <!--            获取主机帐密-->
           <!--          </el-button>-->
-          <el-button
-            v-if="scope.row.loginCodeUrl!=null"
-            size="mini"
-            type="text"
-            icon="el-icon-moon"
-            plain
-            @click="handleUnbindCloudHost(scope.row)"
-            v-hasPermi="['qw:user:loginIpOut']"
-          >
-            解除主机
-          </el-button>
+<!--          <el-button-->
+<!--            v-if="scope.row.loginCodeUrl!=null"-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-moon"-->
+<!--            plain-->
+<!--            @click="handleUnbindCloudHost(scope.row)"-->
+<!--            v-hasPermi="['qw:user:loginIpOut']"-->
+<!--          >-->
+<!--            解除主机-->
+<!--          </el-button>-->
           <el-button
             size="mini"
             type="text"
@@ -903,7 +903,7 @@ export default {
     },
     getList() {
       this.loading = true;
-      staffListPost(this.queryParams).then(response => {
+      staffListUser(this.queryParams).then(response => {
         this.userList = response.rows;
         this.total = response.total;
         this.loading = false;