From faa5b3d99fede9278fa7bf8ca9a10680c3572e67 Mon Sep 17 00:00:00 2001 From: ws Date: Mon, 18 Apr 2022 10:14:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=81=8C=E4=BD=8D=E8=96=AA?= =?UTF-8?q?=E8=B5=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FirstJob/components/recommend.vue | 18 +++++++++++++++--- src/components/FirstJob/detail.vue | 18 +++++++++++++++--- src/components/FirstJob/joblist.vue | 16 +++++++++++++--- src/utils/commonUtil.js | 24 ++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 9 deletions(-) diff --git a/src/components/FirstJob/components/recommend.vue b/src/components/FirstJob/components/recommend.vue index 428cbb8..1892851 100644 --- a/src/components/FirstJob/components/recommend.vue +++ b/src/components/FirstJob/components/recommend.vue @@ -52,14 +52,20 @@ >
- + > -->
@@ -67,7 +73,10 @@ diff --git a/src/components/FirstJob/detail.vue b/src/components/FirstJob/detail.vue index ce06591..b302293 100644 --- a/src/components/FirstJob/detail.vue +++ b/src/components/FirstJob/detail.vue @@ -194,14 +194,20 @@
- + > --> + {{ + getSalaryClassifyValue( + jobDetail.salaryClassify, + jobDetail.salaryClassifyValue + ) + }}
@@ -649,7 +655,10 @@ diff --git a/src/components/FirstJob/joblist.vue b/src/components/FirstJob/joblist.vue index e2c8102..33c921e 100644 --- a/src/components/FirstJob/joblist.vue +++ b/src/components/FirstJob/joblist.vue @@ -233,14 +233,21 @@ >元/月
- + > -->
@@ -335,7 +342,7 @@ import { getProvinceApi, // getCityApi, } from "../../api/job"; -import { moneyToFixed } from "../../utils/commonUtil"; +import { moneyToFixed, getSalaryClassifyValue } from "../../utils/commonUtil"; import recommend from "@/components/FirstJob/components/recommend.vue"; import { nationlist } from "../../utils/datalist"; import recordbill from "@/components/FirstJob/components/recordbill.vue"; @@ -820,6 +827,9 @@ export default { this.$router.push({ name: "recordbill", params: item }); sessionStorage.setItem("CURRENT_FIRM", JSON.stringify(item)); }, + getSalaryClassifyValue(salaryClassify, salaryClassifyValue) { + return getSalaryClassifyValue(salaryClassify, salaryClassifyValue); + }, // todetail(item) { // const routeURL = this.$router.resolve({ // name: "Detail", diff --git a/src/utils/commonUtil.js b/src/utils/commonUtil.js index c3586f6..b799ca8 100644 --- a/src/utils/commonUtil.js +++ b/src/utils/commonUtil.js @@ -1501,3 +1501,27 @@ export function disposeJobListData(jobList) { return jobList; } +/** + * 根据薪资类型和薪资值获取薪资展示 + */ +export function getSalaryClassifyValue(salaryClassify, salaryClassifyValue) { + var hourlyPay = moneyToFixed(salaryClassifyValue); + if (salaryClassify == 0) { + return `${hourlyPay}元/小时`; + } else if (salaryClassify == 1) { + return `${hourlyPay}元/天`; + } else if (salaryClassify == 2) { + return `补${hourlyPay}元`; + } else if (salaryClassify == 3) { + return `返${hourlyPay}元`; + } else if (salaryClassify == 4) { + return "计件"; + } else if (salaryClassify == 5) { + return `保底${hourlyPay}元`; + } else if (salaryClassify == 6) { + return `面议`; + } else { + // return '请配置薪资'; + return "-"; + } +}