Browse Source

auto commit

gcz 3 years ago
parent
commit
f598f8d47f
4 changed files with 149 additions and 45 deletions
  1. 11 8
      src/components/applys.vue
  2. 2 2
      src/components/jobs.vue
  3. 9 0
      src/utils/api.js
  4. 127 35
      src/views/applicant.vue

+ 11 - 8
src/components/applys.vue

@@ -53,10 +53,17 @@
         </div>
         <div class="right">
           <div class="edit">
-            <span v-if="item.interviewMethod == 0 && item.interviewTime"
+            <span
+              v-if="
+                item.interviewMethod == 0 &&
+                item.interviewTime &&
+                item.status < 60
+              "
               >发起视频面试</span
             >
-            <span v-if="item.status == 30" @click="edit(item)"
+            <span
+              v-if="item.status >= 30 && item.status <= 40"
+              @click="edit(item)"
               >更新面试结果</span
             >
           </div>
@@ -152,8 +159,8 @@ export default {
   },
   props: {
     lastMonthRecruitNum: {
-      type: Number,
-      default: 0,
+      type: String,
+      default: "0",
     },
   },
   data() {
@@ -295,8 +302,6 @@ export default {
                 path: "/applicant",
                 query: {
                   veteMemberId: item.veteMemberId,
-                  postId: item.postId,
-                  status: item.status,
                   applyId: item.id,
                 },
               });
@@ -309,8 +314,6 @@ export default {
           path: "/applicant",
           query: {
             veteMemberId: item.veteMemberId,
-            postId: item.postId,
-            status: item.status,
             applyId: item.id,
           },
         });

+ 2 - 2
src/components/jobs.vue

@@ -201,8 +201,8 @@ export default {
   },
   props: {
     lastSecondNum: {
-      type: Number,
-      default: 0,
+      type: String,
+      default: "0",
     },
   },
   data() {

+ 9 - 0
src/utils/api.js

@@ -197,6 +197,15 @@ export function getapplicantInfo(params) {
   })
 }
 
+// 应聘-获取应聘状态
+export function getApplyStatus(params) {
+  return request({
+    url: '/memberDel/get/' + params.applyId,
+    method: 'get',
+    // params: params
+  })
+}
+
 
 
 

+ 127 - 35
src/views/applicant.vue

@@ -6,28 +6,39 @@
     <section class="wrap">
       <section class="left">
         <div class="base-info">
-          <img
-            class="portrait"
-            src="../../static/images/default-logo.png"
-            alt=""
-          />
+          <img class="portrait" :src="applicantInfo.avatar" alt="" />
           <div class="text">
-            <div class="name">郝爱国</div>
-            <div class="sex">男</div>
-            <div class="lable">退役军人 / 36岁 / 群众 / 本科</div>
-            <div class=""><i class="el-icon-mobile"></i>13682277063</div>
+            <div class="name">{{ applicantInfo.name }}</div>
+            <div class="sex">{{ applicantInfo.menSex | filtersSex }}</div>
+            <div class="lable">
+              {{ applicantInfo.menBirth }} / {{ applicantInfo.politOutlook }} /
+              {{ applicantInfo.degrEduc }}
+            </div>
+            <div class="">
+              <i class="el-icon-mobile"></i>{{ applicantInfo.mobile }}
+            </div>
           </div>
         </div>
         <!-- base-info end -->
         <div class="block">
           <div class="title">求职意向</div>
-          <p>武装押运员,贵阳<span>4000-8000元</span></p>
-          <p>银行 / 生物科学 / 精密仪器</p>
+          <p>
+            <span>{{ applicantInfo.expectedPost }}</span>
+            <span> {{ applicantInfo.cityName }}</span>
+            <span
+              >{{ applicantInfo.expectedLowestSalary }}-{{
+                applicantInfo.expectedHighestSalary
+              }}K</span
+            >
+          </p>
+          <p>
+            <span>{{ applicantInfo.expectedIndustry }}</span>
+          </p>
         </div>
         <div class="block">
           <div class="title">自我介绍</div>
           <p>
-            本人综合素质佳,能够吃苦耐劳,忠诚稳重,坚守诚信正直原则,勇于挑战自我开发自身潜力。善于学习,勤奋务实,刻苦钻研,具备广泛的兴趣和很丰富的知识,适应能力强,能够在很短时间内融入一个新的领域,适应它并且把它做好。
+            {{ applicantInfo.selfAssessment }}
           </p>
         </div>
         <div class="block">
@@ -97,19 +108,71 @@
       </section>
       <!-- left end -->
       <section class="right">
-        <div class="btn" @click="handleinvite">邀请面试</div>
-        <div class="btn refused" v-if="status <= 10" @click="refused">
+        <div class="btn" v-if="applyInfo.status <= 10" @click="handleinvite">
+          邀请面试
+        </div>
+        <div class="btn refused" v-if="applyInfo.status <= 10" @click="refused">
           不合适
         </div>
+        <div class="btn result" v-if="applyInfo.status == 60">已标为不合适</div>
       </section>
     </section>
+    <el-dialog title="发送面试邀请" :visible.sync="dialogVisible" width="30%">
+      <el-form :model="form">
+        <el-form-item label="意向岗位" :label-width="formLabelWidth">
+          {{ form.postName }}
+        </el-form-item>
+        <el-form-item label="邀请面试时间" :label-width="formLabelWidth">
+          <el-date-picker
+            v-model="form.interviewTime"
+            type="datetime"
+            placeholder="选择日期"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="邀请面试方式" :label-width="formLabelWidth">
+          <el-select v-model="form.interviewMethod" placeholder="面试方式">
+            <el-option label="现场面试" value="1"></el-option>
+            <el-option label="视频面试" value="0"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="form.status == 20"
+          label="邀请面试地点"
+          :label-width="formLabelWidth"
+        >
+          <el-input v-model="form.interviewArea" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item
+          v-if="form.status == 50"
+          label="邀请入职时间"
+          :label-width="formLabelWidth"
+        >
+          <el-date-picker
+            v-model="form.hiredate"
+            type="datetime"
+            placeholder="选择日期"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submit">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import Header from "@/components/header.vue";
 import Mainmenu from "@/components/mainmenu.vue";
-import { getapplicantInfo, updateStatus, invite } from "@/utils/api";
+import {
+  getapplicantInfo,
+  updateStatus,
+  invite,
+  getApplyStatus,
+} from "@/utils/api";
 export default {
   name: "",
   components: {
@@ -118,19 +181,31 @@ export default {
   },
   data() {
     return {
+      dialogVisible: false,
       veteMemberId: "",
       postId: "",
       applyId: "",
-      applicantInfo: [],
+      applyInfo: {},
+      applicantInfo: {},
       status: "",
+      form: {},
+      formLabelWidth: "80",
     };
   },
+  filters: {
+    filtersSex(val) {
+      if (val == "0") {
+        return "男";
+      } else if (val == "1") {
+        return "女";
+      }
+    },
+  },
   created() {
     this.veteMemberId = this.$route.query.veteMemberId;
-    this.postId = this.$route.query.postId;
-    this.status = this.$route.query.status;
     this.applyId = this.$route.query.applyId;
     this.handelGetapplicantInfo();
+    this.handelApplyInfo();
   },
   methods: {
     handelGetapplicantInfo() {
@@ -143,12 +218,23 @@ export default {
           console.log("getapplicantInfo err", err);
         });
     },
+    handelApplyInfo() {
+      getApplyStatus({ applyId: this.applyId })
+        .then((res) => {
+          console.log("getApplyStatus", res);
+          this.applyInfo = res.data;
+        })
+        .catch((err) => {
+          console.log("getApplyStatus err", err);
+        });
+    },
     refused() {
       let that = this;
       this.$confirm("确认不合适?")
         .then((res) => {
           console.log("res", res);
-          updateStatus({ id: this.postId, status: "10" }).then((res) => {
+          updateStatus({ id: this.applyId, status: "60" }).then((res) => {
+            this.handelApplyInfo();
             this.$message({
               message: res.msg,
               type: "success",
@@ -162,7 +248,7 @@ export default {
           console.log("err", err);
         });
     },
-    handleinvite() {
+    submit() {
       let param = {
         id: "",
         interviewMethod: "",
@@ -171,22 +257,19 @@ export default {
         interviewAddress: "",
       };
       let that = this;
-      this.$confirm("确认邀请?")
-        .then((res) => {
-          console.log("res", res);
-          invite(param).then((res) => {
-            this.$message({
-              message: res.msg,
-              type: "success",
-              duration: 1000,
-              onClose: function () {},
-            });
-            // console.log("updateStatus", res);
-          });
-        })
-        .catch((err) => {
-          console.log("err", err);
+
+      invite(param).then((res) => {
+        this.$message({
+          message: res.msg,
+          type: "success",
+          duration: 1000,
+          onClose: function () {},
         });
+        // console.log("updateStatus", res);
+      });
+    },
+    handleinvite() {
+      this.dialogVisible = true;
     },
   },
 };
@@ -236,6 +319,9 @@ export default {
         color: #1c1c1c;
         line-height: 25px;
       }
+      span + span {
+        margin-left: 10px;
+      }
     }
   }
   .right {
@@ -257,6 +343,12 @@ export default {
         border: 2px solid #f56c6c;
         color: #f56c6c;
       }
+      &.result {
+        background: transparent;
+        border: 2px solid #f56c6c;
+        color: #f56c6c;
+        cursor: default;
+      }
     }
   }
 }