You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
173 lines
4.8 KiB
Vue
173 lines
4.8 KiB
Vue
<template>
|
|
<view class="p-bill-index g_w_all g_h_all g_bg_f_5 g_kuaishou">
|
|
<view class="m-search g_flex_row_between flex_center g_bg_f g_pl_10 g_pr_10 g_pb_8 g_pt_6 g_mb_10">
|
|
<u-search class="g_flex_1" :focus="true" @btnSearch="getSearch" height="40" v-model="keyword" :placeholder="placeholder" bg-color="#f5f5f5" :show-action="false" @change="getSearch" @clear="getSearch" @custom="getSearch" @search="getSearch" search-icon-color="#999999" :maxlength="20"></u-search>
|
|
<view class="g_ml_8 g_fs_16" style="color: #576b95" hover-class="thover" @click="backPrev">取消</view>
|
|
</view>
|
|
<g-yi-list-job :from="whichPage" class="g_h_all" :list="query.list" @clickCard="goDetail" :loading="loading" :speed="speed" :query="query" emptyText="暂无数据" pt="0" />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
onReady() {
|
|
this.G.setNavStyle();
|
|
},
|
|
onShareAppMessage() {
|
|
return this.G.shareFun();
|
|
},
|
|
onLoad(options) {
|
|
console.log(options);
|
|
this.whichPage = options.from;
|
|
if (this.whichPage == "record" || this.whichPage == "home") {
|
|
this.placeholder = "搜索职位名称";
|
|
uni.setNavigationBarTitle({
|
|
title: "搜索职位",
|
|
});
|
|
this.getList();
|
|
} else if (this.whichPage == "apply") {
|
|
// 工单的类型 0 我报的 1 报给我的
|
|
this.applyType = options.active;
|
|
this.placeholder = "搜索姓名/职位/手机号";
|
|
uni.setNavigationBarTitle({
|
|
title: "搜索工单",
|
|
});
|
|
this.getApplyList();
|
|
}
|
|
},
|
|
// 组件名称
|
|
name: "",
|
|
// 局部注册的组件
|
|
components: {},
|
|
// 组件参数 接收来自父组件的数据
|
|
props: {},
|
|
// 组件状态值
|
|
data() {
|
|
return {
|
|
isUseNewJob: getApp().globalData.isUseNewJob,
|
|
appid: getApp().globalData.appId,
|
|
whichPage: "",
|
|
keyword: "",
|
|
loading: false,
|
|
speed: -1,
|
|
applyType: 0,
|
|
query: {
|
|
page: 1,
|
|
size: 50,
|
|
list: [],
|
|
isFinish: -1,
|
|
},
|
|
placeholder: "搜索职位名称",
|
|
navInfo: {},
|
|
};
|
|
},
|
|
// 计算属性
|
|
computed: {},
|
|
// 侦听器
|
|
watch: {},
|
|
created() {},
|
|
mounted() {},
|
|
onShow() {
|
|
let that = this;
|
|
that.navInfo = that.G.getNavInfo();
|
|
},
|
|
// 组件方法
|
|
methods: {
|
|
goDetail($item) {
|
|
uni.navigateTo({
|
|
url: "/root/detail/work?id=" + $item.id,
|
|
});
|
|
// console.log("前往详情页", $item);
|
|
// if (uni.getStorageSync("apply-userinfo")) {
|
|
// uni.navigateTo({
|
|
// url: "/root/detail/work?id=" + $item.id,
|
|
// });
|
|
// } else {
|
|
// uni.navigateTo({
|
|
// url: "/pages/login/index",
|
|
// });
|
|
// }
|
|
},
|
|
getSearch(e) {
|
|
console.log(e);
|
|
this.speed = -1;
|
|
this.keyword = e;
|
|
this.query.page = 1;
|
|
console.log(this.whichPage);
|
|
this.getList();
|
|
},
|
|
backPrev() {
|
|
console.log("backPrev");
|
|
uni.navigateBack({
|
|
delta: 1,
|
|
});
|
|
},
|
|
getList($type = "init") {
|
|
let that = this;
|
|
let _url = that.api.new_job_list;
|
|
console.log(that.appid, that.isUseNewJob, "---------------", getApp().globalData);
|
|
|
|
that.G.Post(
|
|
_url,
|
|
{
|
|
pageNum: that.query.page,
|
|
pageSize: that.query.size,
|
|
keys: that.keyword,
|
|
},
|
|
(res) => {
|
|
let resData = {};
|
|
resData = res;
|
|
|
|
console.log("一才职位列表:", resData);
|
|
that.computeCode = 1;
|
|
if (resData.recordCount == 0) {
|
|
that.loading = false;
|
|
} else {
|
|
that.loading = true;
|
|
}
|
|
that.speed = resData.recordCount;
|
|
that.query.isFinish = resData.recordList.length;
|
|
if (resData.recordList && resData.recordList.length > 0) {
|
|
resData.recordList = that.G.toGetAddress(resData.recordList);
|
|
resData.recordList = that.G.toGetAge(resData.recordList);
|
|
resData.recordList = that.G.yijobCopy(resData.recordList);
|
|
resData.recordList.forEach((ita) => {
|
|
ita.addss = that.G.setJobInfoPositionv3(ita.storeAddr);
|
|
});
|
|
}
|
|
if ($type == "init") {
|
|
that.query.list = [];
|
|
that.query.list =
|
|
resData.recordList && resData.recordList.length > 0
|
|
? resData.recordList.map((item, index) => {
|
|
return {
|
|
...item,
|
|
collected: item.collected ? true : false,
|
|
cus_price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(item.salaryClassify, item.salaryClassifyValue) : "月薪",
|
|
gender: that.G.getGenderByMinAge(item),
|
|
};
|
|
})
|
|
: [];
|
|
} else {
|
|
that.query.list = that.query.list.concat(
|
|
resData.recordList && resData.recordList.length > 0
|
|
? resData.recordList.map((item, index) => {
|
|
return {
|
|
...item,
|
|
collected: item.collected ? true : false,
|
|
cus_price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(item.salaryClassify, item.salaryClassifyValue) : "月薪",
|
|
gender: that.G.getGenderByMinAge(item),
|
|
};
|
|
})
|
|
: []
|
|
);
|
|
}
|
|
}
|
|
);
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="less"></style>
|