|
|
@@ -62,6 +62,7 @@
|
|
|
clearable
|
|
|
size="small"
|
|
|
style="width: 200px"
|
|
|
+ @change="handleCompanyChange"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in companyList"
|
|
|
@@ -71,14 +72,27 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="销售ID" prop="companyUserId">
|
|
|
- <el-input
|
|
|
+ <el-form-item label="销售名称" prop="companyUserId">
|
|
|
+ <el-select
|
|
|
v-model="queryParams.companyUserId"
|
|
|
- placeholder="请输入销售用户ID"
|
|
|
clearable
|
|
|
+ filterable
|
|
|
+ remote
|
|
|
+ placeholder="请输入销售名称"
|
|
|
+ :remote-method="loadCompanyUserOptions"
|
|
|
+ v-select-load-more="loadMoreCompanyUserOptions"
|
|
|
+ :loading="companyUserOptionsLoading"
|
|
|
+ @visible-change="handleCompanyUserDropdownVisible"
|
|
|
size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ style="width: 220px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in companyUserOptions"
|
|
|
+ :key="item.dictValue"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="item.dictValue">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="观看时间" prop="dateRange">
|
|
|
<el-date-picker
|
|
|
@@ -382,6 +396,7 @@
|
|
|
<script>
|
|
|
import { liveWatchUserList } from '@/api/live/liveWatchUser'
|
|
|
import { getCompanyList } from '@/api/company/company'
|
|
|
+import { getCompanyUserListLikeName } from '@/api/company/companyUser'
|
|
|
import { listLiveRedPacketLog } from '@/api/live/liveRedPacketLog'
|
|
|
import { listCourseCouponUserListVO } from '@/api/his/courseCouponUser'
|
|
|
import { listTagGroupForUserBindTag } from '@/api/app/tag/tagGroup'
|
|
|
@@ -403,6 +418,15 @@ export default {
|
|
|
liveOptions: [],
|
|
|
liveRewardTypeList: [],
|
|
|
dateRange: [],
|
|
|
+ companyUserOptionsLoading: false,
|
|
|
+ companyUserOptions: [],
|
|
|
+ companyUserOptionsParams: {
|
|
|
+ name: undefined,
|
|
|
+ companyId: undefined,
|
|
|
+ hasNextPage: false,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
@@ -730,6 +754,41 @@ export default {
|
|
|
this.companyList = res.data || []
|
|
|
})
|
|
|
},
|
|
|
+ handleCompanyChange() {
|
|
|
+ this.queryParams.companyUserId = null
|
|
|
+ this.companyUserOptions = []
|
|
|
+ this.companyUserOptionsParams.pageNum = 1
|
|
|
+ this.companyUserOptionsParams.hasNextPage = false
|
|
|
+ },
|
|
|
+ loadCompanyUserOptions(query) {
|
|
|
+ this.companyUserOptions = []
|
|
|
+ this.companyUserOptionsParams.pageNum = 1
|
|
|
+ this.companyUserOptionsParams.name = query
|
|
|
+ this.companyUserOptionsLoading = true
|
|
|
+ this.getCompanyUserListLikeName()
|
|
|
+ },
|
|
|
+ getCompanyUserListLikeName() {
|
|
|
+ this.companyUserOptionsParams.companyId = this.queryParams.companyId || undefined
|
|
|
+ getCompanyUserListLikeName(this.companyUserOptionsParams).then(response => {
|
|
|
+ const page = (response && response.data) || {}
|
|
|
+ this.companyUserOptions = [...this.companyUserOptions, ...(page.list || [])]
|
|
|
+ this.companyUserOptionsParams.hasNextPage = !!page.hasNextPage
|
|
|
+ }).finally(() => {
|
|
|
+ this.companyUserOptionsLoading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ loadMoreCompanyUserOptions() {
|
|
|
+ if (!this.companyUserOptionsParams.hasNextPage) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.companyUserOptionsParams.pageNum += 1
|
|
|
+ this.getCompanyUserListLikeName()
|
|
|
+ },
|
|
|
+ handleCompanyUserDropdownVisible(visible) {
|
|
|
+ if (visible && this.companyUserOptions.length === 0) {
|
|
|
+ this.loadCompanyUserOptions('')
|
|
|
+ }
|
|
|
+ },
|
|
|
loadLiveGroupTypeList() {
|
|
|
getLiveGroupTypeList({ pageNum: 1, pageSize: 999 }).then(res => {
|
|
|
this.liveGroupTypeList = res.rows || res.data || []
|
|
|
@@ -791,6 +850,7 @@ export default {
|
|
|
this.queryParams.pageSize = 10
|
|
|
this.queryParams.liveGroupType = null
|
|
|
this.queryParams.liveId = null
|
|
|
+ this.companyUserOptions = []
|
|
|
this.loadLiveOptions()
|
|
|
this.handleQuery()
|
|
|
},
|