You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

323 lines
7.6 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view class="container">
<image class="cbg" :src="base.imgHost('common_bg.png')"></image>
<view class="search">
<view class="search-icon" @click="showSearch=!showSearch">
<image :src="base.imgHost('search.png')"></image>
</view>
<view class="search-tab">
<u-tabs :bg-color="'#f0f7fc'" active-color="#b89155" :list="selectArr.company_industry" name="value"
:is-scroll="true" :current="current" @change="changeSearch"></u-tabs>
</view>
</view>
<view class="wrap">
<view v-if="list.length>0">
<nextIndexedXlist :dataList="list" :show-avatar="false">
</nextIndexedXlist>
</view>
<view class="nodata" v-else>
<u-empty mode="data"></u-empty>
</view>
</view>
<view class="modal" v-if="showSearch">
<view>
<text>姓名</text>
<u-input v-model="select.name" border placeholder="请输入姓名"></u-input>
</view>
<view>
<text>公司名称:</text>
<u-input v-model="select.company_name" border placeholder="请输入公司名称"></u-input>
</view>
<!-- <view>
<text>职务:</text>
<u-input v-model="select.company_position" type="select" @click="showPosition=true" border
placeholder="请选择"></u-input>
</view> -->
<view>
<text>企业性质:</text>
<u-input v-model="select.company_type" type="select" @click="showType=true" border
placeholder="请选择"></u-input>
</view>
<view>
<text>所属行业:</text>
<u-input v-model="select.company_industry" type="select" @click="showIndustry=true" border
placeholder="请选择"></u-input>
</view>
<view>
<text>所属区域:</text>
<u-input v-model="select.company_area" type="select" @click="showArea=true" border
placeholder="请选择"></u-input>
</view>
<view class="modal-btn">
<view @click="resetSearch">重置</view>
<view class="modal-btn-search" @click="confirmSearch">检索</view>
</view>
</view>
<!-- <u-picker @confirm="selectPosition" v-model="showPosition" :range="selectArr.company_position" range-key="value"
mode="selector"></u-picker> -->
<u-picker @confirm="selectArea" v-model="showArea" :range="selectArr.company_area" range-key="value"
mode="selector"></u-picker>
<u-picker @confirm="selectType" v-model="showType" :range="selectArr.company_type" range-key="value"
mode="selector"></u-picker>
<u-picker @confirm="selectIndustry" v-model="showIndustry" :range="selectArr.company_industry" range-key="value"
mode="selector"></u-picker>
</view>
</template>
<script>
import nextIndexedXlist from '@/components/next-indexed-xlist/components/next-indexed-xlist/next-indexed-xlist.vue';
export default {
components: {
nextIndexedXlist
},
data() {
return {
showSearch: false,
showPosition: false,
showArea: false,
showType: false,
showIndustry: false,
selectArr: {
// company_position: [],
company_area: [],
company_type: [],
company_industry: [{
value: '全部'
}],
},
select: {
name: '',
company_name: '',
// company_position: '',
company_area: '',
company_type: '',
company_industry: '',
},
current: 0,
list: [],
}
},
onLoad() {
this.getMyCourseTxl()
this.getIndustry()
},
methods: {
async getMyCourseTxl() {
const res = await this.$u.api.courseUserList({
// course_id: id,
name: this.select.name,
company_name: this.select.company_name,
// company_position: this.select.company_position,
company_area: this.select.company_area,
company_type: this.select.company_type,
company_industry: this.select.company_industry,
type: 1
})
this.list = res.list
this.showSearch = false
},
selectIndex(e) {
console.log("e", e)
},
getIndustry() {
this.$u.api.getparameter({
'number[0]': 'company_industry',
// 'number[1]': 'company_position',
'number[2]': 'company_area',
'number[3]': 'company_type',
}).then(res => {
res.map(item => {
if (item.number == 'company_industry') {
this.selectArr[item.number].push(...item.detail)
} else {
this.selectArr[item.number] = item.detail
}
})
console.log("123", this.selectArr)
// this.industryList.push(...res.detail)
})
},
changeSearch(e) {
console.log(e)
this.current = e
if (e > 0) {
this.select.company_industry = this.selectArr.company_industry[e]['value']
} else {
this.select.company_industry = ''
}
this.getMyCourseTxl()
},
// selectPosition(e) {
// this.select.company_position = this.selectArr.company_position[e[0]]['value']
// },
selectArea(e) {
this.select.company_area = this.selectArr.company_area[e[0]]['value']
},
selectType(e) {
this.select.company_type = this.selectArr.company_type[e[0]]['value']
},
selectIndustry(e) {
this.select.company_industry = this.selectArr.company_industry[e[0]]['value']
},
resetSearch() {
this.select = {
name: '',
company_name: '',
// company_position: '',
company_area: '',
company_type: '',
company_industry: '',
}
this.current = 0
this.getMyCourseTxl()
},
confirmSearch() {
this.getMyCourseTxl()
}
}
}
</script>
<style scoped lang="scss">
.container {
padding: 30rpx 60rpx;
width: 100%;
height: 100vh;
overflow: scroll;
.cbg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
.search {
width: 100%;
position: fixed;
top: 0;
left: 0;
height: 100rpx;
padding: 20rpx 0;
background-color: #f0f7fc;
box-shadow: 1rpx -4rpx 15rpx 0 #333;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 999;
&-tab {
width: calc(100% - 100rpx);
}
&-icon {
width: 100rpx;
height: 100rpx;
background-color: #eaedeb;
display: flex;
justify-content: center;
align-items: center;
image {
width: 39rpx;
height: 31rpx;
}
}
}
.wrap {
position: relative;
padding-top: 100rpx;
height:100%;
overflow: scroll;
.nodata {
height: calc(100vh - 160rpx);
}
&-item {
margin: 30rpx 0;
padding: 30rpx;
background-color: #fff;
border-radius: 20rpx;
&>view {
margin-bottom: 10rpx;
}
&-name {
font-size: 32rpx;
color: #333;
.courseName {
color: #b89155;
margin: 0 10rpx;
font-size: 28rpx;
}
}
}
}
.modal {
width: 100%;
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index:1000;
// z-index: 999999;
background-color: #fff;
padding: 30rpx 60rpx;
// padding-top: 130rpx;
overflow: scroll;
&>view {
display: flex;
align-items: center;
margin-bottom: 30rpx;
&>text:first-child {
width: 140rpx;
}
u-input {
width: calc(100% - 140rpx)
}
}
&-btn {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 60rpx;
&>view {
width: 45%;
text-align: center;
margin: 0 auto;
color: #fff;
background: linear-gradient(to right, #5e5fbc, #0d0398);
border-radius: 10rpx;
padding: 20rpx;
}
&-search {
background: linear-gradient(to right, #e4cdb4, #c69c6d) !important;
}
}
}
}
</style>