|
@@ -72,6 +72,7 @@
|
|
|
<el-select v-model="queryParams.companyUserId" clearable filterable remote
|
|
<el-select v-model="queryParams.companyUserId" clearable filterable remote
|
|
|
placeholder="请输入关键词" :remote-method="loadCompanyUserOptions"
|
|
placeholder="请输入关键词" :remote-method="loadCompanyUserOptions"
|
|
|
v-select-load-more="loadMoreCompanyUserOptions"
|
|
v-select-load-more="loadMoreCompanyUserOptions"
|
|
|
|
|
+ @change="handleCompanyUserChange"
|
|
|
:loading="companyUserOptionsLoading">
|
|
:loading="companyUserOptionsLoading">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in companyUserOptions"
|
|
v-for="item in companyUserOptions"
|
|
@@ -85,6 +86,7 @@
|
|
|
<el-select v-model="queryParams.companyUserId" clearable filterable remote
|
|
<el-select v-model="queryParams.companyUserId" clearable filterable remote
|
|
|
placeholder="请输入关键词"
|
|
placeholder="请输入关键词"
|
|
|
v-select-load-more="loadMoreCompanyUserOptions"
|
|
v-select-load-more="loadMoreCompanyUserOptions"
|
|
|
|
|
+ @change="handleCompanyUserChange"
|
|
|
:loading="companyUserOptionsLoading">
|
|
:loading="companyUserOptionsLoading">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in companyUserOptionsByAll"
|
|
v-for="item in companyUserOptionsByAll"
|
|
@@ -774,7 +776,7 @@ export default {
|
|
|
name: undefined,
|
|
name: undefined,
|
|
|
hasNextPage: false,
|
|
hasNextPage: false,
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
- pageSize: 200
|
|
|
|
|
|
|
+ pageSize: 10
|
|
|
},
|
|
},
|
|
|
companyUserOptions: [],
|
|
companyUserOptions: [],
|
|
|
companyUserOptionsByAll: [],
|
|
companyUserOptionsByAll: [],
|
|
@@ -796,7 +798,7 @@ export default {
|
|
|
this.courseLists = response.list;
|
|
this.courseLists = response.list;
|
|
|
});
|
|
});
|
|
|
this.getList();
|
|
this.getList();
|
|
|
- this.getDicts("sys_course_watch_log_type").then(response => {
|
|
|
|
|
|
|
+ this.getDicts("sys_course_watch_log_type_new").then(response => {
|
|
|
this.logTypeOptions = response.data;
|
|
this.logTypeOptions = response.data;
|
|
|
});
|
|
});
|
|
|
this.getDicts("sys_course_project").then(response => {
|
|
this.getDicts("sys_course_project").then(response => {
|
|
@@ -805,15 +807,33 @@ export default {
|
|
|
this.getCompanyUserListLikeName(true);
|
|
this.getCompanyUserListLikeName(true);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 当销售被选择
|
|
|
|
|
+ * 级联更新企微列表
|
|
|
|
|
+ */
|
|
|
|
|
+ handleCompanyUserChange(companyUserId){
|
|
|
|
|
+ if (companyUserId) {
|
|
|
|
|
+ // 清空当前企微选择
|
|
|
|
|
+ this.queryParams.qwUserName = "";
|
|
|
|
|
+ this.qwUserOptions = [];
|
|
|
|
|
+ this.qwUserOptionsParams.pageNum = 1;
|
|
|
|
|
+
|
|
|
|
|
+ // 重新加载企微列表,传入销售ID作为过滤条件
|
|
|
|
|
+ this.getQwList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 清空销售时也清空企微
|
|
|
|
|
+ this.queryParams.qwUserName = "";
|
|
|
|
|
+ this.qwUserOptions = [];
|
|
|
|
|
+ this.qwUserOptionsParams.pageNum = 1;
|
|
|
|
|
+ this.getQwList(); // 重新加载所有企微
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* 根据名称模糊查询用户列表
|
|
* 根据名称模糊查询用户列表
|
|
|
* @param query 参数
|
|
* @param query 参数
|
|
|
*/
|
|
*/
|
|
|
loadCompanyUserOptions(query) {
|
|
loadCompanyUserOptions(query) {
|
|
|
this.companyUserOptions = [];
|
|
this.companyUserOptions = [];
|
|
|
- if (query === '') {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
this.companyUserOptionsParams.pageNum = 1
|
|
this.companyUserOptionsParams.pageNum = 1
|
|
|
this.companyUserOptionsParams.name = query
|
|
this.companyUserOptionsParams.name = query
|
|
@@ -826,9 +846,6 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
loadQwUserOptions(query) {
|
|
loadQwUserOptions(query) {
|
|
|
this.qwUserOptions = [];
|
|
this.qwUserOptions = [];
|
|
|
- if (query === '') {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
this.qwUserOptionsParams.pageNum = 1
|
|
this.qwUserOptionsParams.pageNum = 1
|
|
|
// 将搜索关键词设置到queryParams中
|
|
// 将搜索关键词设置到queryParams中
|
|
|
this.queryParams.qwUserName = query
|
|
this.queryParams.qwUserName = query
|
|
@@ -869,12 +886,21 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
getQwList() {
|
|
getQwList() {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ name: this.qwUserOptionsParams.name,
|
|
|
|
|
+ pageNum: this.qwUserOptionsParams.pageNum,
|
|
|
|
|
+ pageSize: this.qwUserOptionsParams.pageSize,
|
|
|
|
|
+ // 添加销售ID作为过滤条件
|
|
|
|
|
+ companyUserId: this.queryParams.companyUserId || null
|
|
|
|
|
+ };
|
|
|
console.log("企微参数", this.queryParams);
|
|
console.log("企微参数", this.queryParams);
|
|
|
- getQwList(this.queryParams).then(response => {
|
|
|
|
|
- this.qwUserOptions = [...this.qwUserOptions, ...response.rows]
|
|
|
|
|
- // 根据实际返回的数据结构设置hasNextPage
|
|
|
|
|
- this.qwUserOptionsParams.hasNextPage = response.rows && response.rows.length >= this.qwUserOptionsParams.pageSize
|
|
|
|
|
- this.qwUserOptionsLoading = false;
|
|
|
|
|
|
|
+ getQwList(params).then(response => {
|
|
|
|
|
+ if (this.qwUserOptionsParams.pageNum === 1) {
|
|
|
|
|
+ this.qwUserOptions = response.rows || [];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.qwUserOptions = [...this.qwUserOptions, ...(response.rows || [])];
|
|
|
|
|
+ }
|
|
|
|
|
+ this.qwUserOptionsParams.hasNextPage = response.rows && response.rows.length >= this.qwUserOptionsParams.pageSize;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|