Kaynağa Gözat

职位审核基础页面

LiFei 6 yıl önce
ebeveyn
işleme
603e38284c

+ 245 - 0
src/views/position/PositionList.vue

@@ -0,0 +1,245 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <a-form-item label="公司名称">
+              <a-input placeholder="请输入公司名称" v-model="queryParam.enterpriseName"></a-input>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="职位名称">
+              <a-input placeholder="请输入职位名称" v-model="queryParam.positionName"></a-input>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item  label="职位类型">
+              <j-dict-select-tag v-model="queryParam.positionCategory" placeholder="请选择职位类型" dictCode="position_category"/>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item  label="全职职位类别">
+              <j-dict-select-tag v-model="queryParam.fulltimePositionType" placeholder="请选择职位类别" dictCode="fulltime_position_type"/>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-form-item  label="兼职职位类别">
+              <j-dict-select-tag v-model="queryParam.parttimePositionType" placeholder="请选择职位类别" dictCode="parttime_position_type"/>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+
+
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="发布时间"  :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}"  >
+                <j-date v-model="queryParam.createTime" :showTime="true" date-format="YYYY-MM-DD"  placeholder="请选择发布时间" ></j-date>
+              </a-form-item>
+            </a-col>
+
+            <a-col :md="6" :sm="8">
+              <a-form-item label="更新时间"  :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
+                <j-date v-model="queryParam.updateTime" :showTime="true" date-format="YYYY-MM-DD"  placeholder="请选择更新时间" ></j-date>
+              </a-form-item>
+            </a-col>
+
+
+            <a-col :md="6" :sm="8">
+              <a-form-item  label="认证状态">
+                <j-dict-select-tag v-model="queryParam.authenticationStatus" placeholder="请选择认证状态" dictCode="authentication_status"/>
+              </a-form-item>
+            </a-col>
+        </template>
+          <a-col :md="6" :sm="8" >
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <!--<a-button type="primary" icon="download" @click="handleExportXls('职位审核')">导出</a-button>-->
+      <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+        <!--<a-button type="primary" icon="import">导入</a-button>-->
+      <!--</a-upload>-->
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
+        <!--<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项-->
+        <!--<a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
+      <!--</div>-->
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+           <a href="javascript:;" @click="handleDetail(record)">查看</a>
+             <a-divider type="vertical" />
+            <a href="javascript:;" @click="confirm1(record)">审核</a>
+           <a-divider type="vertical" />
+            <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+            </a-popconfirm>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <position-modal ref="modalForm" @ok="modalFormOk"></position-modal>
+  </a-card>
+</template>
+
+<script>
+  import PositionModal from './modules/PositionModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import { getAction,deleteAction,putAction,postAction} from '@/api/manage'
+  const auditHpUser = (params)=>putAction("/hpposition/position/changeAuth",params);
+  import JDate from '@/components/jeecg/JDate'
+
+  export default {
+    name: "PositionList",
+    mixins:[JeecgListMixin],
+    components: {
+      PositionModal,
+      JDate
+    },
+    data () {
+      return {
+        description: '职位审核管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+           },
+          {
+            title: '公司名称',
+            align:"center",
+            dataIndex: 'enterpriseName'
+          },
+          {
+            title: '职位名称',
+            align:"center",
+            dataIndex: 'positionName'
+          },
+          {
+            title: '职位类别',
+            align:"center",
+            dataIndex: 'fulltimePositionType_dictText'
+          },
+		   {
+            title: '发布时间',
+            align:"center",
+            dataIndex: 'createTime'
+           },
+
+		   {
+            title: '更新时间',
+            align:"center",
+            dataIndex: 'updateTime'
+           },
+          {
+            title: '认证状态',
+            align:"center",
+            dataIndex: 'authenticationStatus_dictText'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/hpposition/position/list",
+          delete: "/hpposition/position/delete",
+          deleteBatch: "/hpposition/position/deleteBatch",
+          exportXlsUrl: "hpposition/position/exportXls",
+          importExcelUrl: "hpposition/position/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+      //审核确认
+      confirm1(record){
+        let that = this;
+        that.$confirm({
+          title: "审核",
+          content:record.enterpriseName,
+          okText:"通过",
+          cancelText:"不通过",
+          onOk: function () {
+            auditHpUser({ id: record.id,authenticationStatus:3 }).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.loadData();
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+          },
+          onCancel() {
+            auditHpUser({ id: record.id,authenticationStatus:2 }).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.loadData();
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+          },
+        })
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 218 - 0
src/views/position/modules/PositionModal.vue

@@ -0,0 +1,218 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="职位名称">
+          <a-input placeholder="请输入职位名称" v-decorator="['positionName', validatorRules.positionName ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="职位描述">
+          <a-textarea :rows="5" placeholder="" v-decorator="[ 'positionDetail', {} ]" />
+        </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="招聘人数">
+          <a-input-number v-decorator="[ 'recruitNumber', {}]" />
+        </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="基础薪资">
+          <j-dict-select-tag :triggerChange="true"  dictCode="basicSalary" v-decorator="[ 'basicSalary', {}]" >
+          </j-dict-select-tag> </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="岗位福利">
+          <j-dict-select-tag :triggerChange="true"  dictCode="welfare" v-decorator="[ 'welfare', {}]" >
+          </j-dict-select-tag>
+        </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="工作日期">
+          <j-dict-select-tag :triggerChange="true"  dictCode="workDate" v-decorator="[ 'workDate', {}]" >
+          </j-dict-select-tag>
+        </a-form-item>
+        <a-form-item label="创建时间" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
+          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'startWorkTime', {}]"></a-date-picker>
+          <span style="width: 10px;">~</span>
+          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'endWorkTime', {}]" ></a-date-picker>
+        </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="学历要求">
+          <j-dict-select-tag :triggerChange="true"  dictCode="qualification" v-decorator="[ 'qualification', {}]" >
+          </j-dict-select-tag>
+        </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="性别要求">
+          <j-dict-select-tag :triggerChange="true"  dictCode="gender" v-decorator="[ 'gender', {}]" >
+          </j-dict-select-tag>
+        </a-form-item>
+
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="截止时间">
+          <a-date-picker showTime format='YYYY-MM-DD HH:mm:ss' v-decorator="[ 'endDate', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="联系人">
+          <a-input placeholder="请输入联系人" v-decorator="['contactPerson', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="联系电话">
+          <a-input placeholder="请输入联系电话" v-decorator="['contactPhone', {}]" />
+        </a-form-item>
+
+
+		
+      </a-form>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+
+
+  export default {
+    name: "PositionModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+        userId:{rules: [{ required: true, message: '请输入用户!' }]},
+        positionName:{rules: [{ required: true, message: '请输入岗位标题!' }]},
+        enterpriseName:{rules: [{ required: true, message: '请输入所属公司!' }]},
+        positionDetail:{rules: [{ required: true, message: '请输入职位描述!' }]},
+        positionCategory:{rules: [{ required: true, message: '请输入职位类型(0:全职 1:兼职)!' }]},
+        fulltimePositionType:{rules: [{ required: true, message: '请输入全职职位类别(0:服务员 1:校园活动 2:实习 3:调研 4:送餐员 5:导购 6:网络编辑 7:普工 8:设计 9:文员助理 10:派单 11:销售 12:安保 13:礼仪 14:促销 15:翻译 16:客服 17:演出 18:家教导师 19:模特 20:快递分拣 21:厨师 22:物流仓储 23:贸易采购 24:技工 25:保洁 26:才艺技能 27:其它)!' }]},
+        parttimePositionType:{rules: [{ required: true, message: '请输入兼职职位类别(0:文员助理 1:市场推广 2:家教培训 3:餐饮服务 4:促销导购 5:物流仓储 6:展会演出 7:才艺技能 8:客服话务 9:代驾司机 10:app试玩 11:线上推广 12:编辑 13:模特 14:技工 15:保洁 16:其它)!' }]},
+        delFlag:{rules: [{ required: true, message: '请输入是否删除(0:上架 1:下架)!' }]},
+        },
+        url: {
+          add: "/hpposition/position/add",
+          edit: "/hpposition/position/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'userId','positionName','enterpriseName','positionDetail','positionCategory','fulltimePositionType','parttimePositionType','recruitNumber','salaryPeriod','salary','otherSalary','salaryStructure','hasRegularBus','ageRange','workExperience','isHealthCertification','workDate','startWorkTime','endWordTime','isPublishNationwide','contactPerson','contactPhone','isPause','delFlag'))
+		  //时间格式化
+          this.form.setFieldsValue({endDate:this.model.endDate?moment(this.model.endDate):null})
+          this.form.setFieldsValue({basicSalary:String(this.model.basicSalary)})
+          this.form.setFieldsValue({welfare:String(this.model.welfare)})
+          this.form.setFieldsValue({qualification:String(this.model.qualification)})
+          this.form.setFieldsValue({gender:String(this.model.gender)})
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            //时间格式化
+            formData.endDate = formData.endDate?formData.endDate.format('YYYY-MM-DD HH:mm:ss'):null;
+            
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
+
+
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 309 - 0
src/views/position/modules/PositionModal__Style#Drawer.vue