|
|
@@ -12,6 +12,9 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="企微部门">
|
|
|
+ <treeselect :clearable="false" v-model="queryParams.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门"/>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="企微账号" prop="qwUserId">
|
|
|
<el-input
|
|
|
v-model="queryParams.qwUserId"
|
|
|
@@ -77,6 +80,7 @@
|
|
|
<el-table-column label="企微账号" align="center" prop="qwUserId" />
|
|
|
<el-table-column label="企微昵称" align="center" prop="qwUserName" />
|
|
|
<el-table-column label="员工称呼" align="center" prop="welcomeText" />
|
|
|
+ <el-table-column label="部门" align="center" prop="departmentName" />
|
|
|
<el-table-column label="员工状态" align="center" prop="isDel">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag v-if="scope.row.isDel == 0" type="success">正常</el-tag>
|
|
|
@@ -460,12 +464,16 @@ import {
|
|
|
qwBindCloudHost, qwUnbindCloudHost, handleAuthAppKey, handleInputAuthAppKey, selectCloudAP, myDepartListUser
|
|
|
} from '../../../api/qw/user'
|
|
|
import fastGptRole from "@/views/fastGpt/fastGptRole/fastGptRole";
|
|
|
+import { treeselect } from "@/api/qw/qwDept";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
|
|
export default {
|
|
|
name: "cuDeptIdIndex",
|
|
|
- components: { fastGptRole},
|
|
|
+ components: { Treeselect, fastGptRole},
|
|
|
data() {
|
|
|
return {
|
|
|
+ deptOptions:[], // 企微部门
|
|
|
updateIp:{
|
|
|
open:false,
|
|
|
title: "修改云主机IP"
|
|
|
@@ -567,6 +575,7 @@ export default {
|
|
|
qwUserId: null,
|
|
|
corpId: null,
|
|
|
qwUserName: null,
|
|
|
+ deptId:null,
|
|
|
},
|
|
|
qwUserId:null,
|
|
|
companyUserList:[],
|
|
|
@@ -595,6 +604,10 @@ export default {
|
|
|
this.myQwCompanyList = response.data;
|
|
|
if(this.myQwCompanyList!=null){
|
|
|
this.queryParams.corpId=this.myQwCompanyList[0].dictValue;
|
|
|
+ // 查询部门下拉树结构
|
|
|
+ if(this.queryParams.corpId){
|
|
|
+ this.getTreeselect()
|
|
|
+ }
|
|
|
this.getList();
|
|
|
}
|
|
|
});
|
|
|
@@ -612,6 +625,25 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getTreeselect() {
|
|
|
+ var that=this;
|
|
|
+ let query = {
|
|
|
+ corpId: this.queryParams.corpId
|
|
|
+ }
|
|
|
+ // 企微主体不能为空
|
|
|
+ if(!query.corpId){
|
|
|
+ this.$message.error("请选择企微主体");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ treeselect(query).then((response) => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ console.log(this.deptOptions)
|
|
|
+ if(response.data!=null&&response.data.length>0){
|
|
|
+ this.queryParams.deptId=response.data[0].id;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
myDepartListUser(this.queryParams).then(response => {
|
|
|
@@ -989,6 +1021,7 @@ export default {
|
|
|
qwUserId: null,
|
|
|
corpId: null,
|
|
|
qwUserName: null,
|
|
|
+
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
|
|
|
@@ -1040,6 +1073,7 @@ export default {
|
|
|
resetQuery() {
|
|
|
this.resetForm("queryForm");
|
|
|
this.queryParams.corpId=this.myQwCompanyList[0].dictValue;
|
|
|
+ this.queryParams.deptId = this.deptOptions[0] && this.deptOptions[0].id;
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
@@ -1120,4 +1154,10 @@ export default {
|
|
|
width: 80%;
|
|
|
}
|
|
|
|
|
|
+.vue-treeselect{
|
|
|
+ width: 217px;
|
|
|
+ height: 36px;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
</style>
|