Browse Source

新增职位详情页面

gcz 2 years ago
parent
commit
4e7d60d195

+ 33 - 2
src/api/CooperativeEnterprise/index.js

@@ -2,8 +2,8 @@
  * @Description: 合作企业
  * @Author: 空白格
  * @Date: 2022-08-11 16:31:06
- * @LastEditors: 空白格
- * @LastEditTime: 2022-08-15 17:43:35
+ * @LastEditors: gcz
+ * @LastEditTime: 2022-08-23 16:58:53
  * @FilePath: \veterans_client_web\src\api\CooperativeEnterprise\index.js
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  */
@@ -55,3 +55,34 @@ export function getCompanyPositon(params) {
     params
   })
 }
+
+/**
+ * 获取职位详情
+ * @param {*} params
+ * @returns
+ */
+export function getJobDetails(params) {
+  return request({
+    url: '/app/companypost/getDetail/' + params.positionId,
+    method: 'get',
+    headers: {
+      noLoginFlag: true
+    },
+    params
+  })
+}
+
+/**
+ * 投递简历
+ * @param {*} params
+ * @returns
+ */
+export function applyJob(data) {
+  return request({
+    url: '/app/delivery/add',
+    method: 'post',
+    data
+  })
+}
+
+

+ 11 - 0
src/router/index.js

@@ -59,6 +59,17 @@ const routes = [
           title: '企业详情'
         }
       },
+      {
+        path: 'enterprisePosition',
+        name: 'EnterprisePositionIndex',
+        component: () =>
+          import(
+            '@/views/CooperativeEnterprise/EnterprisePosition/EnterprisePositionIndex.vue'
+          ),
+        meta: {
+          title: '职位详情'
+        }
+      },
       {
         path: 'cooperativecolleges',
         name: 'CooperativeCollegesIndex',

+ 14 - 3
src/views/CooperativeEnterprise/EnterpriseDetails/EnterpriseDetailsIndex.vue

@@ -2,8 +2,8 @@
  * @Description: 企业详情
  * @Author: 空白格
  * @Date: 2022-08-15 14:54:50
- * @LastEditors: 空白格
- * @LastEditTime: 2022-08-22 10:08:18
+ * @LastEditors: gcz
+ * @LastEditTime: 2022-08-23 16:14:35
  * @FilePath: \veterans_client_web\src\views\CooperativeEnterprise\EnterpriseDetails\EnterpriseDetailsIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -160,7 +160,7 @@
                 v-for="(item, index) in positionObj.list"
                 :key="index"
               >
-                <div class="edmi-position-list-item">
+                <div class="edmi-position-list-item" @click="jumpPage('enterprisePosition',{ positionId: item.id })">
                   <div class="logo">
                     <el-image
                       class="image"
@@ -340,6 +340,17 @@ export default {
       });
       return label;
     },
+    /**
+     * 跳转到指定页面
+     * @date 2022-08-11
+     * @param {any} path
+     * @returns {any}
+     */
+    jumpPage(path,param) {
+      if (path) {
+        this.$router.push({path:path,query:param});
+      }
+    },
   },
   filters: {
     filtersDict(val, list) {

+ 310 - 0
src/views/CooperativeEnterprise/EnterprisePosition/EnterprisePositionIndex.vue

@@ -0,0 +1,310 @@
+<!--
+ * @Description: 
+ * @Author: gcz
+ * @Date: 2022-08-23 15:06:48
+ * @LastEditors: gcz
+ * @LastEditTime: 2022-08-23 17:31:09
+ * @FilePath: \veterans_client_web\src\views\CooperativeEnterprise\EnterprisePosition\EnterprisePositionIndex.vue
+ * @Copyright: Copyright (c) 2016~2022 by gcz, All Rights Reserved. 
+-->
+<template>
+  <div class="app-main">
+    <section class="enterprise-details" v-loading="loading">
+      <div class="enterprise-details-header">
+        <div class="enterprise-details-header-box app-main-box">
+          <div class="edhb-left">
+            <div class="edhb-left-logo">
+              <el-avatar
+                shape="square"
+                :size="73"
+                :src="details.logoUrl"
+                @error="errorHandler"
+              >
+                <el-avatar
+                  shape="square"
+                  :size="73"
+                  :src="require('@/assets/images/default-company.png')"
+                ></el-avatar>
+              </el-avatar>
+            </div>
+            <div class="edhb-left-info">
+              <view v-if="jobDetails.postStatus == 0">职位已下架</view>
+              <div class="edhb-left-info-name">{{ jobDetails.postName || "-" }}</div>
+              <div class="edhb-left-info-salary">{{ jobDetails.lowestSalary }}K-{{ jobDetails.highestSalary }}K</div>
+              <div class="edhb-left-info-target">经验{{ jobDetails.workYear }}年 / {{ getEducationLevel(jobDetails.educationBg) }} / {{ jobDetails.cityName }}</div>
+            </div>
+          </div>
+          <div class="edhb-right">
+            <div class="edhb-right-item">
+              {{ details.companyName || "-" }}
+            </div>
+            <div class="edhb-right-item">
+              {{ details.scope | filtersDict(companyScopeList) }}
+            </div>
+            <div class="edhb-right-item">
+              {{ details.linkPhone || "-" }}
+            </div>
+            <div class="edhb-right-item position">
+              {{ details.companyAddress || "-" }}
+            </div>
+          </div>
+        </div>
+      </div>
+    </section>
+    <div class="app-main-box">
+      <div class="app-main-box-content">
+        <section class="job-details">
+            <div class="title">职位描述</div>
+            <div class="description ql-editor" v-html="jobDetails.description"></div>
+            <div class="submit" @click="submit">提交简历</div>
+        </section>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getCompanyDetails,getJobDetails,applyJob } from "@/api/CooperativeEnterprise";
+import { parseTime } from "@/utils/utils";
+import { getDictData } from "@/api/Dict";
+export default {
+  name: "EnterprisePositionIndex",
+  components: {},
+  data() {
+    return {
+      positionId:'',
+      loading: false,
+      details: [], //公司详情
+      companyScopeList: [],
+      educationList:[],
+      jobDetails:[],
+    };
+  },
+  created() {
+    this.positionId = this.$route.query.positionId;
+    if (this.positionId) {
+      this.getJobDetails(this.positionId);
+    }
+    this.getDict();
+  },
+  filters: {
+    filtersDict(val, list) {
+      let label = "-";
+      list.forEach((item) => {
+        if (Number(val) === Number(item.text)) {
+          label = item.label;
+        }
+      });
+      return label;
+    },
+  },
+  methods: {
+    /**
+     * 获取教育字典
+     * @date 2022-08-11
+     * @returns {any}
+     */
+    getDict() {
+        getDictData({ key: "degr_educ" }).then((res) => {
+          this.educationList = res.data;
+        });
+      //   getDictData({ key: "company_trade" }).then((res) => {
+      //     this.companyTradeList = res.data;
+      //   });
+      getDictData({ key: "company_scope" }).then((res) => {
+        this.companyScopeList = res.data;
+      });
+    },
+    /**
+     * 获取教育等级名称
+     * @date 2022-08-11
+     * @param {any} val
+     * @returns {any}
+     */
+    getEducationLevel(val) {
+      let label = "-";
+      this.educationList.forEach((item) => {
+        if (Number(item.text) === Number(val)) {
+          label = item.label;
+        }
+      });
+      return label;
+    },
+    getJobDetails(positionId){
+        getJobDetails({positionId}).then(res=>{
+            this.jobDetails = res?.data;
+            if(this.jobDetails.companyId){
+                this.getCompanyDetails(this.jobDetails.companyId);
+            }
+        })
+
+    },
+    /**
+     * 获取企业详情
+     * @date 2022-08-15
+     * @param {any} companyId
+     * @returns {any}
+     */
+    getCompanyDetails(companyId) {
+      this.loading = true;
+      getCompanyDetails({ companyId }).then((res) => {
+        this.details = res?.data;
+        let arr = [],
+          data = res?.data?.environmentUrlList;
+        for (let i = 0; i < data.length; i += 4) {
+          arr.push(data.slice(i, i + 4));
+        }
+        this.details.environmentUrlList = arr;
+        this.loading = false;
+      });
+    },
+    /**
+     * 加载logo错误触发
+     * @date 2022-08-15
+     * @returns {any}
+     */
+    errorHandler() {
+      return true;
+    },
+    submit(){
+        applyJob({postId:this.positionId}).then(res=>{
+            this.$message.success(res.msg);
+            this.$router.go(-1);
+        })
+    }
+  },
+};
+</script>
+
+<style lang='scss' scoped>
+// "vue-quill-editor": "^3.0.6"
+// import "quill/dist/quill.core.css";
+// import "quill/dist/quill.snow.css";
+// import "quill/dist/quill.bubble.css";
+.app-main-box-content{
+  min-height: calc( 100vh - 73px - 180px - 100px - 40px - 23px );
+}
+.enterprise-details{
+    &-header {
+    background-color: #43565f;
+    &-box {
+      margin: 0 auto;
+      padding: 36px 0;
+      display: flex;
+      justify-content: space-between;
+      .edhb-left {
+        display: flex;
+        &-logo {
+          margin-right: 13px;
+        }
+        &-info {
+          &-name {
+            font-size: 28px;
+            color: #fff;
+            font-family: SourceHanSansCN;
+            margin-bottom: 3px;
+          }
+          &-salary{
+            color: #EF651F;
+            font-weight: Bold;
+            font-size: 20px;
+            letter-spacing: 1.24px;
+          }
+          &-target{
+            color: #fff;
+            font-weight: 400;
+            font-size: 14px;
+            letter-spacing: 1.24px;
+          }
+        }
+      }
+      .edhb-right {
+        &-item {
+          color: rgba($color: #fff, $alpha: 0.7);
+          font-size: 14px;
+          text-align: right;
+          margin-bottom: 8px;
+        }
+        .position {
+          position: relative;
+          &::before {
+            content: "";
+            display: inline-block;
+            width: 13px;
+            height: 17px;
+            background: url("./../../../assets/images/dingwei.svg") no-repeat
+              center center;
+            background-size: cover;
+            vertical-align: bottom;
+            margin-right: 5px;
+          }
+        }
+      }
+    }
+  }
+}
+.job-details{
+  .title{
+    font-weight: 400;
+    font-size: 20px;
+    color: #1A1A1A;
+    letter-spacing: 1.34px;
+    margin-bottom: 15px;
+  }
+  .submit{
+    margin: 30px auto 38px;
+    width: 200px;
+    height: 50px;
+    line-height: 50px;
+    background: #709078;
+    font-weight: 400;
+    font-size: 20px;
+    color: #FFFFFF;
+    letter-spacing: 1.08px;
+    text-align: center;
+    cursor: pointer;;
+  }
+}
+
+.job-details {
+  .big-title {
+    font-size: 22px;
+    font-weight: 500;
+    color: #1c1c1c;
+    line-height: 30px;
+    letter-spacing: 1px;
+    margin-bottom: 53px;
+  }
+  .block {
+    margin-bottom: 20px;
+    .title {
+      font-size: 18px;
+      font-weight: 500;
+      color: #1c1c1c;
+      line-height: 25px;
+      margin-bottom: 6px;
+    }
+    ul {
+      li {
+        font-size: 14px;
+        font-weight: 400;
+        color: #464646;
+        line-height: 30px;
+      }
+    }
+  }
+}
+.description {
+  :deep(p){
+    margin-bottom: 10px;
+  }
+  :deep(ul) {
+    li {
+      font-size: 14px;
+      font-weight: 400;
+      color: #464646;
+      line-height: 30px;
+    }
+  }
+}
+</style>

+ 3 - 3
src/views/RecruitmentEmployment/RecruitmentEmploymentIndex.vue

@@ -2,8 +2,8 @@
  * @Description: 招聘就业
  * @Author: 空白格
  * @Date: 2022-08-11 13:25:43
- * @LastEditors: 空白格
- * @LastEditTime: 2022-08-16 12:00:16
+ * @LastEditors: gcz
+ * @LastEditTime: 2022-08-23 17:34:50
  * @FilePath: \veterans_client_web\src\views\RecruitmentEmployment\RecruitmentEmploymentIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -103,7 +103,7 @@
               v-for="(item, index) in postList"
               :key="index"
             >
-              <div class="latest-recruitment-list-item">
+              <div class="latest-recruitment-list-item" @click="jumpPage('enterprisePosition',{ positionId: item.id })">
                 <div class="logo">
                   <el-image
                     class="image"