|
|
@@ -5,18 +5,6 @@
|
|
|
<el-card shadow="never" class="search-card">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="100px" class="search-form">
|
|
|
<el-row :gutter="16">
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="销售公司" prop="companyId">
|
|
|
- <el-select v-model="queryParams.companyId" placeholder="销售公司" size="small" @change="handleCompanyChange">
|
|
|
- <el-option
|
|
|
- v-for="dict in qwCompanyList"
|
|
|
- :key="dict.companyId"
|
|
|
- :label="dict.companyName"
|
|
|
- :value="dict.companyId"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="企微用户名" prop="qwUserName">
|
|
|
<el-input v-model="queryParams.qwUserName" placeholder="请输入企微用户名" clearable size="small" @keyup.enter.native="handleQuery"/>
|
|
|
@@ -75,7 +63,6 @@
|
|
|
|
|
|
<script>
|
|
|
import {queryQwList} from "../../api/qw/qwUser";
|
|
|
-import {listCompany} from "../../api/company/company";
|
|
|
|
|
|
export default {
|
|
|
name: "QwUserSelectTwo",
|
|
|
@@ -96,42 +83,21 @@ export default {
|
|
|
total: 0,
|
|
|
// 企微账号表格数据
|
|
|
qwUserList: [],
|
|
|
- qwCompanyList: [],
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- companyId: null,
|
|
|
qwUserName: null,
|
|
|
qwUserId: null
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- // 获取企业数据
|
|
|
- getCompanyData() {
|
|
|
- listCompany().then(response => {
|
|
|
- this.qwCompanyList = response.rows;
|
|
|
- // 默认选中第一个企业
|
|
|
- if (this.qwCompanyList && this.qwCompanyList.length > 0) {
|
|
|
- this.queryParams.companyId = this.qwCompanyList[0].companyId;
|
|
|
- // 重新加载页面数据
|
|
|
- this.handleQuery();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- // 企业改变时触发查询
|
|
|
- handleCompanyChange() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
setRows(rows){
|
|
|
this.shows = true;
|
|
|
this.rows = rows || [];
|
|
|
this.selectedRows = rows || []; // 同步更新
|
|
|
this.getList();
|
|
|
- // 获取企业列表并默认选中第一个
|
|
|
- this.getCompanyData();
|
|
|
},
|
|
|
initSelect(){
|
|
|
let row = this.rows;
|
|
|
@@ -168,10 +134,6 @@ export default {
|
|
|
this.resetForm("queryForm");
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.queryParams.pageSize = 10;
|
|
|
- // 重置后选中第一个企业
|
|
|
- if (this.qwCompanyList && this.qwCompanyList.length > 0) {
|
|
|
- this.queryParams.companyId = this.qwCompanyList[0].companyId;
|
|
|
- }
|
|
|
this.getList();
|
|
|
},
|
|
|
// 多选框选中数据
|