Commit 46dd60788bc30edd991bbd75add618922276ad73
1 parent
80d8fbe3
人才搜索
Showing
6 changed files
with
85 additions
and
11 deletions
apis/talent/talent.js
| @@ -9,6 +9,9 @@ export default{ | @@ -9,6 +9,9 @@ export default{ | ||
| 9 | getTalentList(data){ | 9 | getTalentList(data){ |
| 10 | return request.get('/Extend/basetalentrecruitment/GetListByApp',data) | 10 | return request.get('/Extend/basetalentrecruitment/GetListByApp',data) |
| 11 | }, | 11 | }, |
| 12 | + getRecommendList(data){ | ||
| 13 | + return request.get('/SubDev/basetalentrecommendation/GetListByApp',data) | ||
| 14 | + }, | ||
| 12 | // 人才招聘发布 | 15 | // 人才招聘发布 |
| 13 | postTalent(data){ | 16 | postTalent(data){ |
| 14 | return request.post('/Extend/basetalentrecruitment',data) | 17 | return request.post('/Extend/basetalentrecruitment',data) |
components/qj-fuzzy-search/index.vue
| @@ -43,10 +43,14 @@ export default { | @@ -43,10 +43,14 @@ export default { | ||
| 43 | type: String, | 43 | type: String, |
| 44 | default: 'value' | 44 | default: 'value' |
| 45 | }, | 45 | }, |
| 46 | + categoryIdName: { | ||
| 47 | + type: String, | ||
| 48 | + default: 'categoryId' | ||
| 49 | + }, | ||
| 46 | /** 无内容时显示的内容 */ | 50 | /** 无内容时显示的内容 */ |
| 47 | noData: { | 51 | noData: { |
| 48 | type: String, | 52 | type: String, |
| 49 | - default: '暂无匹配企业...' | 53 | + default: '暂无匹配数据...' |
| 50 | }, | 54 | }, |
| 51 | /** item的对齐样式 */ | 55 | /** item的对齐样式 */ |
| 52 | align: { | 56 | align: { |
| @@ -105,7 +109,7 @@ export default { | @@ -105,7 +109,7 @@ export default { | ||
| 105 | 109 | ||
| 106 | .list { | 110 | .list { |
| 107 | box-sizing: border-box; | 111 | box-sizing: border-box; |
| 108 | - max-height: 100rpx; | 112 | + max-height: 200rpx; |
| 109 | overflow: hidden; | 113 | overflow: hidden; |
| 110 | 114 | ||
| 111 | .item { | 115 | .item { |
package (4).json
0 → 100644
| 1 | +{ | ||
| 2 | + "id": "qj-fuzzy-search", | ||
| 3 | + "name": "模糊查询组件", | ||
| 4 | + "displayName": "模糊查询组件", | ||
| 5 | + "version": "1.1.1", | ||
| 6 | + "description": "因为在公司的小程序,app项目中涉及到了模糊查询的需求,我翻看了uniapp插件市场中的此类插件,发现并无特别符合心意,于是自己就动手写了一个,没有什么动画样式,样式也比较丑,多多包涵", | ||
| 7 | + "keywords": [ | ||
| 8 | + "模糊", | ||
| 9 | + "模糊搜索", | ||
| 10 | + "模糊查询", | ||
| 11 | + "查询" | ||
| 12 | + ], | ||
| 13 | + "dcloudext": { | ||
| 14 | + "category": [ | ||
| 15 | + "前端组件", | ||
| 16 | + "通用组件" | ||
| 17 | + ] | ||
| 18 | + } | ||
| 19 | +} | ||
| 0 | \ No newline at end of file | 20 | \ No newline at end of file |
pages.json
| @@ -248,7 +248,7 @@ | @@ -248,7 +248,7 @@ | ||
| 248 | { | 248 | { |
| 249 | "path": "pages/newsDetail/newsDetail", | 249 | "path": "pages/newsDetail/newsDetail", |
| 250 | "style": { | 250 | "style": { |
| 251 | - "navigationBarTitleText": "新闻详情", | 251 | + "navigationBarTitleText": "新闻/公示公告详情", |
| 252 | "enablePullDownRefresh": false | 252 | "enablePullDownRefresh": false |
| 253 | } | 253 | } |
| 254 | }, | 254 | }, |
pages/home/home.vue
| @@ -14,12 +14,14 @@ | @@ -14,12 +14,14 @@ | ||
| 14 | <view class="search"> | 14 | <view class="search"> |
| 15 | <image src="../../static/fdj.png"></image> | 15 | <image src="../../static/fdj.png"></image> |
| 16 | <text></text> | 16 | <text></text> |
| 17 | - <input type="text" placeholder="搜索关键词" /> | 17 | + <input type="text" v-model="selectName" placeholder="搜索关键词" @input="getMoHuList()" /> |
| 18 | </view> | 18 | </view> |
| 19 | <view class="btn"> | 19 | <view class="btn"> |
| 20 | <text>搜索</text> | 20 | <text>搜索</text> |
| 21 | </view> | 21 | </view> |
| 22 | </view> | 22 | </view> |
| 23 | + <mo-hu-search :show="selectShow" :list="comList" @select="select" label-name="name" | ||
| 24 | + value-name="id" categoryId-name="categoryId"></mo-hu-search> | ||
| 23 | </view> | 25 | </view> |
| 24 | <view style="width: 30%;"> | 26 | <view style="width: 30%;"> |
| 25 | <view class="main-top-right"> | 27 | <view class="main-top-right"> |
| @@ -97,7 +99,7 @@ | @@ -97,7 +99,7 @@ | ||
| 97 | <view class="news-title-more" @click="notice()">更多...</view> | 99 | <view class="news-title-more" @click="notice()">更多...</view> |
| 98 | </view> | 100 | </view> |
| 99 | </view> | 101 | </view> |
| 100 | - <view class="news-text" v-for="(it,index) in noticeHighThree" :key="index" @click="onNotice(it)">· | 102 | + <view class="news-text" v-for="(it,index) in noticeHighThree" :key="index" @click="onNotice(it.id)">· |
| 101 | {{it.title}} | 103 | {{it.title}} |
| 102 | </view> | 104 | </view> |
| 103 | <!-- <view class="news-text">·做好“第八届中国( 成都智慧产业国际博览会”组织工作的通知</view> | 105 | <!-- <view class="news-text">·做好“第八届中国( 成都智慧产业国际博览会”组织工作的通知</view> |
| @@ -117,7 +119,7 @@ | @@ -117,7 +119,7 @@ | ||
| 117 | <image src="../../static/img/img01.png"></image> | 119 | <image src="../../static/img/img01.png"></image> |
| 118 | </view> | 120 | </view> |
| 119 | <view class="news-text news-text-left" v-for="(it,index) in newsHighThree" :key="index" | 121 | <view class="news-text news-text-left" v-for="(it,index) in newsHighThree" :key="index" |
| 120 | - @click="onArticle(it)">· {{it.title}}</view> | 122 | + @click="onArticle(it.id)">· {{it.title}}</view> |
| 121 | <!-- <view class="news-text news-text-left">·高新区组织召开全体干部职工大会</view> | 123 | <!-- <view class="news-text news-text-left">·高新区组织召开全体干部职工大会</view> |
| 122 | <view class="news-text news-text-left">·市人大工业经济发展代表专业小组在高新区开展</view> --> | 124 | <view class="news-text news-text-left">·市人大工业经济发展代表专业小组在高新区开展</view> --> |
| 123 | </view> | 125 | </view> |
| @@ -131,7 +133,7 @@ | @@ -131,7 +133,7 @@ | ||
| 131 | <view class="news-title-more" @click="policy">更多...</view> | 133 | <view class="news-title-more" @click="policy">更多...</view> |
| 132 | </view> | 134 | </view> |
| 133 | </view> | 135 | </view> |
| 134 | - <view class="news-text" v-for="(it,index) in policyHighThree" :key="index" @click="onPolicyDE(it)">· | 136 | + <view class="news-text" v-for="(it,index) in policyHighThree" :key="index" @click="onPolicyDE(it.id)">· |
| 135 | {{it.title}} | 137 | {{it.title}} |
| 136 | </view> | 138 | </view> |
| 137 | <!-- <view class="news-text">·国家发展改革委办公厅关于规范招标投标领域信用评价应用应用应用应用</view> | 139 | <!-- <view class="news-text">·国家发展改革委办公厅关于规范招标投标领域信用评价应用应用应用应用</view> |
| @@ -147,9 +149,11 @@ | @@ -147,9 +149,11 @@ | ||
| 147 | import request from '@/utils/request.js' | 149 | import request from '@/utils/request.js' |
| 148 | import TabBar from '../../components/TabBar/TabBar.vue'; | 150 | import TabBar from '../../components/TabBar/TabBar.vue'; |
| 149 | import utils from '../../service/utils'; | 151 | import utils from '../../service/utils'; |
| 152 | + import moHuSearch from '../../components/qj-fuzzy-search/index.vue' | ||
| 150 | export default { | 153 | export default { |
| 151 | components: { | 154 | components: { |
| 152 | - TabBar | 155 | + TabBar, |
| 156 | + moHuSearch | ||
| 153 | }, | 157 | }, |
| 154 | data() { | 158 | data() { |
| 155 | return { | 159 | return { |
| @@ -168,7 +172,12 @@ | @@ -168,7 +172,12 @@ | ||
| 168 | // 最高温度 | 172 | // 最高温度 |
| 169 | higherTemp:'', | 173 | higherTemp:'', |
| 170 | // 时间 | 174 | // 时间 |
| 171 | - currentTime:'' | 175 | + currentTime:'', |
| 176 | + selectShow: false, | ||
| 177 | + comList: [], | ||
| 178 | + selectName:'', | ||
| 179 | + selectId: '', | ||
| 180 | + categoryId:'', | ||
| 172 | } | 181 | } |
| 173 | }, | 182 | }, |
| 174 | onShow() { | 183 | onShow() { |
| @@ -203,6 +212,44 @@ | @@ -203,6 +212,44 @@ | ||
| 203 | console.log(that.newsHighThree) | 212 | console.log(that.newsHighThree) |
| 204 | }) | 213 | }) |
| 205 | }, | 214 | }, |
| 215 | + // 首页模糊查询 | ||
| 216 | + getMoHuList(){ | ||
| 217 | + this.selectShow = true | ||
| 218 | + request({ | ||
| 219 | + url:'/api/SubDev/zyoaarticle', | ||
| 220 | + method:'get', | ||
| 221 | + data:{ | ||
| 222 | + keyword:this.selectName | ||
| 223 | + } | ||
| 224 | + }).then(res=>{ | ||
| 225 | + console.log('模糊查询',res.data) | ||
| 226 | + if(res.code === 200){ | ||
| 227 | + let arr = res.data.list | ||
| 228 | + this.comList = arr.map(it=>{ | ||
| 229 | + return { | ||
| 230 | + ...it, | ||
| 231 | + name:it.title | ||
| 232 | + } | ||
| 233 | + }) | ||
| 234 | + this.comList = JSON.parse(JSON.stringify(this.comList)) | ||
| 235 | + console.log('mohu',this.comList) | ||
| 236 | + } | ||
| 237 | + }) | ||
| 238 | + }, | ||
| 239 | + select(item) { | ||
| 240 | + | ||
| 241 | + this.selectName = item.name; | ||
| 242 | + this.selectId = item.id | ||
| 243 | + this.categoryId = item.categoryId | ||
| 244 | + console.log("栏目ID",this.categoryId) | ||
| 245 | + if(this.categoryId == '360233879019193605' || this.categoryId == '360233879019193605'){ | ||
| 246 | + this.onArticle(this.selectId) | ||
| 247 | + }else{ | ||
| 248 | + this.onNotice(this.selectId) | ||
| 249 | + } | ||
| 250 | + // if() | ||
| 251 | + this.selectShow = false; | ||
| 252 | + }, | ||
| 206 | // 获取公示公告列表 | 253 | // 获取公示公告列表 |
| 207 | getNoticeList() { | 254 | getNoticeList() { |
| 208 | let that = this | 255 | let that = this |
pages/recommend/recommend.vue
| @@ -157,13 +157,14 @@ | @@ -157,13 +157,14 @@ | ||
| 157 | }, | 157 | }, |
| 158 | // 搜索功能 | 158 | // 搜索功能 |
| 159 | searchEvt(){ | 159 | searchEvt(){ |
| 160 | - this.API.getTalentList({keyword:this.keyword}).then(res => { | 160 | + this.API.getRecommendList({keyword:this.keyword}).then(res => { |
| 161 | console.log(res) | 161 | console.log(res) |
| 162 | if (res.code === 200) { | 162 | if (res.code === 200) { |
| 163 | this.talentList = res.data.list.map(it => { | 163 | this.talentList = res.data.list.map(it => { |
| 164 | return { | 164 | return { |
| 165 | ...it, | 165 | ...it, |
| 166 | - createTime: utils.formatTime(it.createTime) | 166 | + // createTime: utils.formatTime(it.createTime) |
| 167 | + createTime:utils.formatTime(it.creatorTime) | ||
| 167 | } | 168 | } |
| 168 | }) | 169 | }) |
| 169 | if(this.talentList.length > 0){ | 170 | if(this.talentList.length > 0){ |