|
|
@@ -61,16 +61,6 @@ import { getCompanyListByCorId } from '@/api/company/company'
|
|
|
|
|
|
export default {
|
|
|
name: "companyTransferQwUserSelect",
|
|
|
- props: {
|
|
|
- corpId: {
|
|
|
- type: String,
|
|
|
- default: null
|
|
|
- },
|
|
|
- companyId: {
|
|
|
- type: Number,
|
|
|
- default: null
|
|
|
- }
|
|
|
- },
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
|
@@ -92,17 +82,19 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- getCompanyListByCorId(this.corpId).then(response => {
|
|
|
- this.companyList = response.data.filter(item => item.dictValue !== this.companyId)
|
|
|
- if (!Array.isArray(this.companyList) || this.companyList.length === 0) {
|
|
|
- return
|
|
|
- }
|
|
|
- this.queryParams.companyId = this.companyList[0].dictValue;
|
|
|
- this.handleQuery();
|
|
|
- })
|
|
|
- },
|
|
|
methods: {
|
|
|
+ load(corpId, companyId) {
|
|
|
+ getCompanyListByCorId(corpId).then(response => {
|
|
|
+ this.companyList = response.data.filter(item => item.dictValue !== companyId)
|
|
|
+ if (!Array.isArray(this.companyList) || this.companyList.length === 0) {
|
|
|
+ this.userList = []
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.queryParams.corpId = corpId;
|
|
|
+ this.queryParams.companyId = this.companyList[0].dictValue;
|
|
|
+ this.handleQuery();
|
|
|
+ })
|
|
|
+ },
|
|
|
/** 查询企微用户列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
@@ -120,8 +112,8 @@ export default {
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
- this.queryParams.corpId = this.corpId;
|
|
|
if (!Array.isArray(this.companyList) || this.companyList.length === 0) {
|
|
|
+ this.userList = []
|
|
|
return
|
|
|
}
|
|
|
this.getList();
|