Эх сурвалжийг харах

招聘的相关前端页面

15313670163 3 өдөр өмнө
parent
commit
d929b55a05

+ 24 - 16
src/api/news.js

@@ -355,67 +355,75 @@ export function getJobRecruitingArea(params) {
   })
 }
 //2.4 获取职位性质
-export function getJobNature(data) {
+export function getJobNature(params) {
   return request({
     url: '/news/getJobNature',
     method: 'get',
-    data
+    params
   })
 }
 //2.5 获取工作经验
-export function getExperience(data) {
+export function getExperience(params) {
   return request({
     url: '/news/getExperience',
     method: 'get',
-    data
+    params
   })
 }
 //2.6 获取学历
-export function getEducation(data) {
+export function getEducation(params) {
   return request({
     url: '/news/getEducation',
     method: 'get',
-    data
+    params
   }) 
 }
 //2.7 获取薪资
-export function getSalary(data) {
+export function getSalary(params) {
   return request({
     url: '/news/getSalary',
     method: 'get',
-    data
+    params
   })  
 }
 //2.8 获取语种
-export function getLanguage(data) {
+export function getLanguage(params) {
   return request({
     url: '/news/getLanguage',
     method: 'get',
-    data
+    params
   }) 
 }
 //2.9 获取语言能力
-export function getLevel(data) {
+export function getLevel(params) {
   return request({
     url: '/news/getLevel',
     method: 'get',
-    data
+    params
   })
 }
 //2.10 获取公司规模
-export function getCompanySize(data) {
+export function getCompanySize(params) {
   return request({
     url: '/news/getCompanySize',
     method: 'get',
-    data
+    params
   })
 }
 //2.11 获取公司性质
-export function getCompanyNature(data) {
+export function getCompanyNature(params) {
   return request({
     url: '/news/getCompanyNature',
     method: 'get',
-    data
+    params
   })
 }
+// 8.修改职位信息状态(审核通过、拒绝、撤回)
+export function checkJobRecruiting(data) {
+  return request({
+    url: '/news/checkJobRecruiting',
+    method: 'post',
+    data
+  }) 
+}
 // 招聘列表 end  fr ------------------------------------->

+ 16 - 0
src/router/index.js

@@ -430,6 +430,22 @@ export const constantRoutes = [
         }
       ]
     },
+    {
+      path: '/checkjobRecruitingList',
+      component: Layout,
+      children: [
+        {
+          name: '',
+          path: '',
+          component: () => import('@/views/job/checkjobRecruitingList'),
+          meta: {
+            title: '招聘审核列表',
+            hidden: true,
+            breadcrumb: true
+          }
+        }
+      ]
+    },
     {
       path: '/creatJob',
       component: Layout, 

+ 11 - 1
src/store/modules/news.js

@@ -4,7 +4,7 @@ import { getArticleList, addArticle, delArticle, getArticleInfo, updateArticle,
   getSurveyList,getSurveyInfo, getJobHuntingList, getJobHuntingInfo,addJobHunting,delJobHunting,updateJobHunting,getJobHuntingData,
   getComplaintList,
   getComplaintInfo, updateComplaint, deleteComplaint,  addComplaint1,  getMSG,  getNoticeList, getNoticeInfo, addNotice, updateNotice, deleteNotice,
-  getJobRecruitingList, addJobRecruiting,getJobRecruitingInfo, upJobRecruiting, delJobRecruiting,getIndustry, getJobCompany, upJobCompany, getPositionList, getJobRecruitingArea, getJobNature, getExperience, getEducation, getSalary, getLanguage, getLevel, getCompanySize, getCompanyNature,
+  getJobRecruitingList, addJobRecruiting,getJobRecruitingInfo, upJobRecruiting, delJobRecruiting,getIndustry, getJobCompany, upJobCompany, getPositionList, getJobRecruitingArea, getJobNature, getExperience, getEducation, getSalary, getLanguage, getLevel, getCompanySize, getCompanyNature,checkJobRecruiting,
 } from '@/api/news'
 
 const state = {
@@ -542,6 +542,16 @@ const actions = {
       })
     })
   },
+  // 8.修改职位信息状态(审核通过、拒绝、撤回)
+  checkJobRecruiting({commit},data) {
+    return new Promise((resolve, reject) => {
+      checkJobRecruiting(data).then(response => {
+        resolve(response)
+      }).catch(error => {
+        reject(error)
+      })
+    })
+  },
   // 招聘列表 end  fr ------------------------------------->
 }
 

+ 298 - 0
src/views/job/checkjobRecruitingList.vue

@@ -0,0 +1,298 @@
+<template>
+    <div class="mainBox">
+      <!--搜索功能 start------------------------------------------------------------>
+      <div class="layerBox_search">
+        <div class="layerBoxLine">
+          <el-row>
+            <el-col :span="8">
+              <div class="searchBox">
+                <div class="searchTitle">职位名称:</div>
+                <el-input placeholder="请输入职位名称" autocomplete="off" v-model="getApiData.keyword"/>
+              </div>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      
+      <div class="layerBoxNoBg">
+        <div>
+          <!--el-button type="primary" @click="goCreat">发布职位</el-button-->
+        </div>
+        <div>
+          <el-button @click="clearSearchList">重置</el-button>
+          <el-button type="primary" @click="getData('search')">搜索</el-button>
+        </div>
+      </div>
+      <!--搜索功能 end------------------------------------------------------------>
+  
+      <!--表格内容 start------------------------------------------------------------>
+      <div class="layerBox">
+        <tableTitle :name="tableDivTitle"/>
+        <el-row>
+          <template>
+            <el-table :data="tableData" style="width: 100%">
+              <el-table-column fixed prop="id" label="编号" width="100"></el-table-column>
+              <el-table-column prop="title" label="职位名称" width=""></el-table-column>
+              <el-table-column prop="website_name" label="网站名称" width=""></el-table-column>
+              <el-table-column prop="user_name" label="发布人" width=""></el-table-column>
+              <el-table-column prop="created_at" label="创建时间" width=""></el-table-column>
+              <el-table-column prop="updated_at" label="修改时间" width=""></el-table-column>
+              <el-table-column prop="status" label="审核状态" width="100">
+                <template slot-scope="scope">
+                  <span v-if="scope.row.status==0">待审核</span>
+                  <span v-if="scope.row.status==1">已审核</span>
+                  <span v-if="scope.row.status==2">已拒绝</span>
+                </template>
+              </el-table-column>
+              <el-table-column fixed="right" label="操作" width="300" header-align="center">
+                <template slot-scope="scope">
+                  <div class="listBtnBox">
+                    <div class="listMainBtn" @click="getUpRow(scope.row.id, tableData)" v-if="creatNews_user_type == '10000'"><i class="el-icon-check"></i>审核</div>
+                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i class="el-icon-delete"></i>移除</div>
+                    <div class="listEditBtn" @click="goEdit(scope.row.id, tableData)"><i class="el-icon-edit-outline"></i>编辑</div>
+                  </div>
+                </template>
+              </el-table-column>
+            </el-table>
+          </template>
+        </el-row>
+      </div>
+      <!--分页 start------------------------------------------------------------>
+      <div class="alignBox">
+        <el-row>
+          <el-col :span="24">
+            <el-pagination @size-change="handleSizeChange" :current-page="getApiData.page" @current-change="handleCurrentChange" :page-size="10" layout="total, prev, pager, next, jumper" :total="allCount"></el-pagination>
+          </el-col>
+        </el-row>
+      </div>
+      <!--分页 end------------------------------------------------------------>
+      <!--表格内容 end------------------------------------------------------------>
+
+      <!--弹出框1:外部表单弹出框 start------------------------------------------------------------>
+    <el-dialog title="请输入驳回理由" :visible.sync="examineWindow" :close-on-click-modal="false">
+      <el-form :model="form" ref="form" :rules="formRules" label-position="left">
+        <div class="formDiv">
+          <el-form-item label="驳回原因:" :label-width="formLabelWidth" prop="refuse_reason" class="custom-align-right">
+            <el-input type="textarea" v-model="form.refuse_reason" class="custom-textarea" placeholder="请输入驳回原因" :rows="3"></el-input>
+          </el-form-item>
+        </div>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <div>
+          <el-button type="info" @click="examineWindow=false">取消</el-button>
+          <el-button type="primary" @click="examineToServe">确定</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <!--弹出框1:外部表单弹出框 end------------------------------------------------------------>
+
+    </div>
+  </template>
+  
+  <script>
+  //表格标题
+  import tableTitle from './components/tableTitle';
+  //引入公用样式
+  import '@/styles/global.less';
+  import { getUseType } from '@/utils/auth';
+  export default {
+    components: {
+      tableTitle,//表格标题
+    },
+    data() {
+      const validateEmpty = (rule, value, callback) => {
+        if (value == '') {
+          callback(new Error('该项不能为空!'))
+        } else {
+          callback()
+        }
+      }
+      return {
+        //1.列表和分页相关 start ------------------------------------------------------------>
+        tableDivTitle:"职位列表",
+        tableData:[],//内容
+        editId:0,//要修改的网站id
+        examineWindow:false,//审核窗口
+        formLabelWidth:"120px",//表单label宽度
+        getApiData:{
+          title:"",//职位名称
+          website_name:"",//网站名称
+          user_name:"",//发布人
+          created_at:"",//创建时间
+          updated_at:"",//修改时间
+          page:1,//当前是第几页
+          page_size:10,//一共多少条
+          checkout:0,//是否审核 0 未审核 
+          
+        },
+        //提交驳回
+        form:{
+          refuse_reason:""
+        },
+        formRules: {
+          //导航池名称不能为空
+          refuse_reason: [{ required: true, trigger: 'blur', validator: validateEmpty }],
+        },
+        creatNews_user_type:'0',//用户类型
+        keyword:"",//搜索关键字
+        allCount:0,//总条数
+        //分页相关 end ------------------------------------------------------------>
+      }
+    },
+    methods: {
+      //1.列表和分页相关 start ------------------------------------------------------------>
+      //1.1 开始请求列表信息方法
+      getData(type){
+        if(type=="search"){
+          this.getApiData.page = 1;
+        }
+        this.getApiData.checkout = 0;
+        // this.getApiData.keyword = this.keyword;
+        this.$store.dispatch('news/getJobRecruitingList',this.getApiData).then(res=> {
+          let data = [];
+          console.log(res.data.rows)
+          this.tableData = res.data.rows; //给与内容
+          this.allCount = res.data.count; //给与总条数
+        }).catch(() => {
+          this.$message({
+            type: 'warning',
+            message: '网络错误,请重试!'
+          });
+        })
+      },
+      //1.2 删除内容
+      deleteRow(id){
+        this.$confirm('此操作将永久删除该条数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          console.log("当前删除:" + id)
+          this.$store.dispatch('news/delJobRecruiting',{id:id}).then(res=> {
+            this.getData();
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            });
+          }).catch(() => {
+            this.$message({
+              type: 'warning',
+              message: '网络错误,请重试!'
+            });
+          })
+        }).catch(() => {
+          this.$message({
+            type: 'warning',
+            message: '已取消删除'
+          });
+        });
+      },
+      //1.4 审核温江
+      getUpRow(id){
+        //设置待审核的id
+        this.editId = id;
+        console.log(id)
+        this.$confirm('将此职位通过审核吗?', '提示', {
+          confirmButtonText: '通过',
+          cancelButtonText: '拒绝',
+          type: 'warning'
+        }).then(() => {
+          this.upRow(id,1)
+        }).catch(() => {
+        //输入驳回理由
+        console.log("驳回")
+        this.examineWindow = true;
+        })
+      },
+      //1.5 修改文章状态
+      upRow(id,status){
+        let data = {
+          id:id,
+          status:status
+        }
+        this.$store.dispatch('news/checkJobRecruiting',data).then(res=> {
+          if(res.code==200){
+            this.$message({
+              type: 'success',
+              message: '操作成功!'
+            });
+            this.getData();
+          }
+        })
+      },
+      //提交驳回内容
+      examineToServe(id){
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            let data = {
+              id:this.editId,
+              status:2,//驳回status
+              refuse_reason:this.form.refuse_reason
+            }
+            this.$store.dispatch('news/checkJobRecruiting',data).then(res=> {
+              if(res.code==200){
+                this.$message({
+                  type: 'success',
+                  message: '操作成功!'
+                });
+                this.getData();
+                this.form.refuse_reason = "";//清空上一次的输入
+                this.examineWindow = false;
+              }
+            })
+          }else{
+            this.$message.error("驳回理由不能为空!")
+          }
+        })
+      },
+      //1.4 列表内容分页
+      //直接跳转
+      handleSizeChange(val) {
+        this.getApiData.page = val;
+        this.getData();
+      },
+      //1.5 点击分页
+      handleCurrentChange(val) {
+        this.getApiData.page = val;
+        this.getData();
+      },
+      //1.6 重置按钮
+      clearSearchList(){
+        this.getApiData.keyword = "";
+        this.getApiData.page = 1;
+        this.getApiData.page_size = 10;
+        this.getData();
+      },
+      //列表和分页相关 end ------------------------------------------------------------>
+  
+      //2.添加新闻 start ------------------------------------------------------------>
+      //跳转到职位发布页面
+      goCreat(){
+        this.$router.push({
+          path: '/creatJob',
+        });
+      },
+      goEdit(id){
+        let data = {
+          id:id,
+          to:"checkjob"
+        }
+        this.$router.push({
+          path: '/creatJob',
+          query: data
+        });
+      }
+      //添加新闻 end ------------------------------------------------------------>
+    },
+    mounted(){
+      this.creatNews_user_type = getUseType()
+      //1.获得初始数据
+      this.getData();
+    }
+  }
+  </script>
+  
+  <style scoped lang="less">
+  
+  </style>
+  

+ 9 - 3
src/views/job/creatJob.vue

@@ -575,9 +575,15 @@ export default {
 
     //2.跳转操作 start ------------------------------------------------------------>
     returnPage() {
-      this.$router.push({
-        path: '/jobRecruitingList',
-      });
+      if (this.$route.query.to == "checkjob") {
+        this.$router.push({
+          path: '/checkjobRecruitingList',
+        });
+      } else {
+        this.$router.push({
+          path: '/jobRecruitingList',
+        });
+      }
     },
     //跳转操作 end ------------------------------------------------------------>
 

+ 32 - 13
src/views/job/jobRecruitingList.vue

@@ -7,7 +7,7 @@
             <el-col :span="8">
               <div class="searchBox">
                 <div class="searchTitle">职位名称:</div>
-                <el-input placeholder="请输入职位名称" autocomplete="off" v-model="getApiData.keyword"/>
+                <el-input placeholder="请输入职位名称" autocomplete="off" v-model="getApiData.keyword"/>
               </div>
             </el-col>
           </el-row>
@@ -35,11 +35,19 @@
               <el-table-column prop="title" label="职位名称" width=""></el-table-column>
               <el-table-column prop="website_name" label="网站名称" width=""></el-table-column>
               <el-table-column prop="user_name" label="发布人" width=""></el-table-column>
+              <el-table-column prop="status" label="审核状态" width="150">
+                <template slot-scope="scope">
+                  <span v-if="scope.row.status==0">待审核</span>
+                  <span v-if="scope.row.status==1">已通过</span>
+                  <span v-if="scope.row.status==2">已拒绝</span>
+                </template>
+              </el-table-column>
               <el-table-column prop="created_at" label="创建时间" width=""></el-table-column>
               <el-table-column prop="updated_at" label="修改时间" width=""></el-table-column>
-              <el-table-column fixed="right" label="操作" width="200" header-align="center">
+              <el-table-column fixed="right" label="操作" width="300" header-align="center">
                 <template slot-scope="scope">
                   <div class="listBtnBox">
+                    <div class="listUpBtn" @click="returnRow(scope.row.id, tableData)" v-if="creatNews_user_type == 10000"><i class="el-icon-refresh-right"></i>撤回</div>
                     <div class="listDeleteBtn" @click="deleteRow(scope.row.id, tableData)"><i class="el-icon-delete"></i>移除</div>
                     <div class="listEditBtn" @click="goEdit(scope.row.id, tableData)"><i class="el-icon-edit-outline"></i>编辑</div>
                   </div>
@@ -67,7 +75,8 @@
   import tableTitle from './components/tableTitle';
   //引入公用样式
   import '@/styles/global.less';
-  
+  //获得用户身份
+  import { getUseType } from '@/utils/auth';
   export default {
     components: {
       tableTitle,//表格标题
@@ -79,9 +88,11 @@
         tableData:[],//内容
         editId:0,//要修改的网站id
         getApiData:{
+          checkout:1,//审核状态
           title:"",//职位名称
           website_name:"",//网站名称
           user_name:"",//发布人
+          status:"",//审核状态
           created_at:"",//创建时间
           updated_at:"",//修改时间
           page:1,//当前是第几页
@@ -98,6 +109,7 @@
         if(type=="search"){
           this.getApiData.page = 1;
         }
+        this.getApiData.checkout = 1;
         this.$store.dispatch('news/getJobRecruitingList',this.getApiData).then(res=> {
           let data = [];
           console.log(res.data.rows)
@@ -137,27 +149,33 @@
           });
         });
       },
-      //1.3 修改网站状态
+      //3.6 撤回审核
+      returnRow(id){
+        this.$confirm('确定要撤回吗?', '提示', {
+          confirmButtonText: '撤回',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          //撤回,把文章状态修改为0,重新进行审核
+          this.upRow(id,0)
+        })
+      },
+       //3.5 修改文章状态
       upRow(id,status){
         let data = {
           id:id,
           status:status
         }
-        this.$store.dispatch('news/upArticleStatus',data).then(res=> {
+        this.$store.dispatch('news/checkJobRecruiting',data).then(res=> {
           if(res.code==200){
             this.$message({
               type: 'success',
-              message: '职位状态已修改!'
+              message: '操作成功!'
             });
+            this.getData();
           }
-        }).catch(() => {
-          this.$message({
-            type: 'warning',
-            message: '已取消删除'
-          });
-        });
+        })
       },
-      //1.4 列表内容分页
       //直接跳转
       handleSizeChange(val) {
         this.getApiData.page = val;
@@ -196,6 +214,7 @@
       //添加新闻 end ------------------------------------------------------------>
     },
     mounted(){
+      this.creatNews_user_type = getUseType()
       //1.获得初始数据
       this.getData();
     }