From 0f2185bfb2371256b60de3f2279b4eeb4eadd978 Mon Sep 17 00:00:00 2001
From: wangxia <779219182@qq.com>
Date: Fri, 6 May 2022 18:57:11 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=90=9C=E7=B4=A2?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/job.js | 19 +
src/components/FirstJob/joblist.vue | 289 +++++-
src/components/FirstJob/joblist1.vue | 1817 ++++++++++++++++++++++++++++++++++
src/router/index.js | 5 +
4 files changed, 2076 insertions(+), 54 deletions(-)
create mode 100644 src/components/FirstJob/joblist1.vue
diff --git a/src/api/job.js b/src/api/job.js
index 9306100..1c4249f 100644
--- a/src/api/job.js
+++ b/src/api/job.js
@@ -76,3 +76,22 @@ export function getPolicyByJobIdApi(data) {
url: `/yishoudan/store/job/getPolicyByStoreJobId?storeJobId=${data}`,
});
}
+// 获取热门职位城市
+export function getHotCityApi() {
+ return request({
+ url: `/yishoudan/city/getHotCity`,
+ });
+}
+
+// 获取热门职位城市
+export function getCityWhichHasJobApi() {
+ return request({
+ url: `/yishoudan/city/getCityHasOnlineJob`,
+ });
+}
+// 获取热门企业
+export function getHotStoreApi() {
+ return request({
+ url: `/yishoudan/store/getHotStore`,
+ });
+}
diff --git a/src/components/FirstJob/joblist.vue b/src/components/FirstJob/joblist.vue
index 8e7f26d..7484422 100644
--- a/src/components/FirstJob/joblist.vue
+++ b/src/components/FirstJob/joblist.vue
@@ -6,17 +6,9 @@
-->
-
-
-
+
+
+
+
+
+
+
+ -
+
热门地区
+
+ -
+
+ {{ i }}
+
+
+
+
+
@@ -52,6 +81,8 @@
-
+
+
5) {
@@ -533,6 +574,9 @@ export default {
this.getJobSpecial();
this.getProvince();
this.getdateinfo();
+ this.getHotCity();
+ this.getCityWhichHasJob();
+ this.getHotStore();
},
/**
* el 被新创建的 vm.el 替换,并挂载到实例上去之后调用该钩子。
@@ -556,6 +600,7 @@ export default {
// // return document.body;
// };
// },
+
//搜索企业名称
onSearch(e) {
console.log(e);
@@ -712,50 +757,50 @@ export default {
// });
},
// 录单弹出层的关闭
- handleCancel() {
- this.visible = false;
- this.form = {
- // 录单数据
- name: "",
- peoplecard: "",
- gender: "",
- nation: "",
- location: "",
- firm: "",
- post: "",
- pattern: "",
- policy: "",
- proxy: "",
- facedate: "",
- };
- },
+ // handleCancel() {
+ // this.visible = false;
+ // this.form = {
+ // // 录单数据
+ // name: "",
+ // peoplecard: "",
+ // gender: "",
+ // nation: "",
+ // location: "",
+ // firm: "",
+ // post: "",
+ // pattern: "",
+ // policy: "",
+ // proxy: "",
+ // facedate: "",
+ // };
+ // },
// 录单提交按钮的回调
// 弹出录单模态框
- showmodal(item) {
- this.visible = true;
- this.apply = item;
- console.log(this.apply);
- // console.log(id);
- },
- onClose() {
- console.log(123);
- this.visible = false;
- this.form = {
- // 录单数据
- name: "",
- peoplecard: "",
- gender: "", // 性别
- nation: "", // 民族
- location: "", // 家庭住址
- firm: "", // 公司名
- post: "", // 岗位
- pattern: "", // 模式
- policy: "", // 代理政策
- proxy: "", // 代理
- facedate: "", // 面试时间
- };
- },
+ // showmodal(item) {
+ // this.visible = true;
+ // this.apply = item;
+ // console.log(this.apply);
+ // // console.log(id);
+ // },
+ // onClose() {
+ // console.log(123);
+ // this.visible = false;
+ // this.form = {
+ // // 录单数据
+ // name: "",
+ // peoplecard: "",
+ // gender: "", // 性别
+ // nation: "", // 民族
+ // location: "", // 家庭住址
+ // firm: "", // 公司名
+ // post: "", // 岗位
+ // pattern: "", // 模式
+ // policy: "", // 代理政策
+ // proxy: "", // 代理
+ // facedate: "", // 面试时间
+ // };
+ // },
// 获取日期信息
getdateinfo() {
const date = new Date();
@@ -807,6 +852,89 @@ export default {
getSalaryClassifyValue(salaryClassify, salaryClassifyValue) {
return getSalaryClassifyValue(salaryClassify, salaryClassifyValue);
},
+ async getHotCity() {
+ try {
+ const { data } = await getHotCityApi();
+ console.log(data);
+ if (data.status == 200) {
+ this.hotCityList = data.data;
+ this.currentCity = this.hotCityList;
+ }
+ } catch (error) {
+ console.log(error);
+ }
+ },
+ async getCityWhichHasJob() {
+ try {
+ const { data } = await getCityWhichHasJobApi();
+ console.log(data);
+ if (data.status == 200) {
+ let pinyinList = [];
+ data.data.forEach((item) => {
+ if (pinyinList.indexOf(item.firstLetter) == -1) {
+ pinyinList.push(item.firstLetter);
+ }
+ });
+ pinyinList.sort(); // 拼音首字母排序
+ let firstList = [];
+ let cityList = [];
+ let num = -1;
+
+ pinyinList.forEach((item, i) => {
+ if (i % 5 == 0) {
+ num++;
+ firstList[num] = [];
+ }
+ firstList[num].push(item);
+ });
+ firstList.forEach((item, i) => {
+ cityList[i] = [];
+
+ item.forEach((item1) => {
+ data.data.forEach((item2) => {
+ if (item2.firstLetter == item1) {
+ cityList[i].push(item2);
+ }
+ });
+ });
+ });
+ this.hasJobCityList.firstList = firstList;
+ this.hasJobCityList.cityList = cityList;
+ }
+ } catch (error) {
+ console.log(error);
+ }
+ },
+ async getHotStore() {
+ try {
+ const { data } = await getHotStoreApi();
+ console.log(data);
+ if (data.status == 200) {
+ this.hotStoreList = data.data;
+ console.log(this.hotStoreList);
+ }
+ } catch (error) {
+ console.log(error);
+ }
+ },
+ changeCurrentCity(index) {
+ this.currentCity = this.hasJobCityList.cityList[index];
+ console.log(index);
+ },
+ searchCity() {
+ if (this.cityValue) {
+ this.currentCity = [];
+ this.hotCityList.forEach((item) => {
+ console.log(item);
+ console.log(item.name.indexOf(this.cityValue));
+ if (item.name.indexOf(this.cityValue) > -1) {
+ console.log(123);
+ this.currentCity.push(item);
+ }
+ });
+ console.log(this.currentCity);
+ }
+ },
// todetail(item) {
// const routeURL = this.$router.resolve({
// name: "Detail",
@@ -1569,4 +1697,57 @@ export default {
}
}
}
+.cityModal {
+ .inputBox {
+ display: flex;
+ }
+ .ant-input-affix-wrapper {
+ flex: 1;
+ margin-right: 30px;
+ }
+ button {
+ width: 60px;
+ height: 32px;
+ }
+ .firstList {
+ display: flex;
+ justify-content: start;
+ margin: 30px 0;
+ li {
+ width: 16.6%;
+ text-align: center;
+ div {
+ width: 60%;
+ padding-bottom: 5px;
+ }
+ .active {
+ color: #ff6a00;
+ // position: relative;
+ // &::after {
+ // content:'';
+ // display: block;
+ // position: absolute;
+ // height: 2px;
+ // width: 50px;
+ // bottom: 0;
+ // left: 0;
+ // background-color: #ff6a00;
+ // }
+ border-bottom: 2px solid #ff6a00;
+ }
+ }
+ }
+ .currentCity {
+ display: flex;
+ flex-wrap: wrap;
+ li {
+ width: 16.6%;
+ margin-bottom: 20px;
+ text-align: center;
+ div {
+ width: 60%;
+ }
+ }
+ }
+}
diff --git a/src/components/FirstJob/joblist1.vue b/src/components/FirstJob/joblist1.vue
new file mode 100644
index 0000000..b5a1e6c
--- /dev/null
+++ b/src/components/FirstJob/joblist1.vue
@@ -0,0 +1,1817 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
热门地区
+
+ -
+
+ {{ i }}
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+
+ -
+
+
+ -
+
+
+ -
+ 清空筛选
+
+
+
+
+ 全国
+
+
+
+
+
+
热门企业:
+
+ -
+ {{ item.aliasName }}
+
+ - 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+

+
+
+
+
+ {{ item.jobName }}
+
+
+ {{ item.district }}
+ {{ item.gender }}
+ {{ item.age }}
+
+
+
+ {{ item1 }}
+
+
+
+
+ {{ item.minMonthlyPay ? item.minMonthlyPay : "" }}-{{
+ item.maxMonthlyPay ? item.maxMonthlyPay : ""
+ }}元/月
+
+
+ {{
+ getSalaryClassifyValue(
+ item.salaryClassify,
+ item.salaryClassifyValue
+ )
+ }}
+
+
+
+
+
+
+
+
+ 更新时间:{{ item.updateTime || "--" }} (
+ {{ item.diffTime || "--" }} )
+
+
+
+
服务费
+
{{ item.servetype }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
我的日历
+
+ {{ dateinfo.day }}
+
+
+ {{ dateinfo.week }}
+
+
+ {{ dateinfo.date }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/router/index.js b/src/router/index.js
index 75c3a1b..2e06db6 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -25,6 +25,11 @@ const routes = [
name: "JobList",
component: () => import("../components/FirstJob/joblist.vue"),
},
+ {
+ path: "/list1",
+ name: "JobList",
+ component: () => import("../components/FirstJob/joblist1.vue"),
+ },
{
path: "/detail/:id",
name: "Detail",
From 53aaf352d07a727328806d73d267f19f592ad31a Mon Sep 17 00:00:00 2001
From: wangxia <779219182@qq.com>
Date: Thu, 12 May 2022 09:52:20 +0800
Subject: [PATCH 2/3] 1
---
src/components/FirstJob/detail.vue | 9 +++++----
src/components/FirstJob/joblist1.vue | 25 ++++++++++++++-----------
src/permission.js | 13 +++----------
3 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/src/components/FirstJob/detail.vue b/src/components/FirstJob/detail.vue
index 1af0e95..bd33ba2 100644
--- a/src/components/FirstJob/detail.vue
+++ b/src/components/FirstJob/detail.vue
@@ -1531,7 +1531,7 @@ export default {
.hotTel {
position: fixed;
top: 50%;
- left: calc(50vw + 600px);
+ left: calc(50vw + 616px);
width: 104px;
height: 110px;
background-color: #fff;
@@ -1552,11 +1552,12 @@ export default {
div {
position: absolute;
display: none;
+ height: 110px;
width: 200px;
- left: 0;
- bottom: -122px;
+ left: -236px;
+ bottom: 0px;
text-align: center;
- box-shadow: 5px 0px 10px 3px #eee;
+ box-shadow: 5px 0px 10px 3px #ddd;
background-color: #fff;
> p:first-child {
padding: 14px 0;
diff --git a/src/components/FirstJob/joblist1.vue b/src/components/FirstJob/joblist1.vue
index b5a1e6c..cb211ec 100644
--- a/src/components/FirstJob/joblist1.vue
+++ b/src/components/FirstJob/joblist1.vue
@@ -40,7 +40,7 @@
>确认
@@ -188,7 +188,7 @@
class="searchinput"
style="width: 500px"
>
- 全国
+ {{ currentCity }}