|
@@ -0,0 +1,287 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div id="publish-present">
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="16" :offset="8"><h2>驻场招聘信息表</h2></el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5"><h3>基本信息</h3></el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="7" :offset="5">项目ID:<span>{{related_id}}</span></el-col>
|
|
|
|
|
+ <el-col :span="12" >需求方:<span>{{uid}}</span></el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5">项目名称:<span>{{title}}</span></el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5">项目类型:<span>{{related_type}}</span></el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="7" :offset="5">客户经理:<span>{{manager}}</span></el-col>
|
|
|
|
|
+ <el-col :span="12" >
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ <span class>开放状态:</span>
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ <el-select v-model="statusValue" >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item of status"
|
|
|
|
|
+ :key="item.statusValue"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.statusValue"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5"><h3>驻场信息</h3></el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5" >
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ <span class>薪酬范围:</span>
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ ¥<el-input style="width: 230px;" v-model="salary_from" ></el-input>至
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ ¥<el-input style="width: 230px;" v-model="salary_to" ></el-input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-alert
|
|
|
|
|
+ title=""
|
|
|
|
|
+ class="top"
|
|
|
|
|
+ id="salaryAlert"
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ style="display: none"
|
|
|
|
|
+ show-icon>
|
|
|
|
|
+ </el-alert>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5">
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ <span class>驻场地点:</span>
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ <el-select v-model="city" >
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item of citys"
|
|
|
|
|
+ :key="item.city"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.city"
|
|
|
|
|
+ ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5">
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ <span class>驻场周期:</span>
|
|
|
|
|
+ <div class="inlineb">
|
|
|
|
|
+ <el-input style="width: 230px;" v-model="month" ></el-input>个月
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-alert
|
|
|
|
|
+ title=""
|
|
|
|
|
+ class="top"
|
|
|
|
|
+ id="monthAlert"
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ style="display: none"
|
|
|
|
|
+ show-icon>
|
|
|
|
|
+ </el-alert>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5">职位方向:<span>{{directions}}</span></el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5">技能要求:<span>{{skill}}</span></el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="15" :offset="5">工作内容:
|
|
|
|
|
+ <el-alert
|
|
|
|
|
+ title=""
|
|
|
|
|
+ class="top"
|
|
|
|
|
+ id="jobInfoAlert"
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ style="display: none"
|
|
|
|
|
+ show-icon>
|
|
|
|
|
+ </el-alert>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ :autosize="{ minRows: 5, maxRows: 4}"
|
|
|
|
|
+ placeholder="请输入内容"
|
|
|
|
|
+ v-model="job_description">
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="19" :offset="5">
|
|
|
|
|
+ <el-button type="primary" @click="savePresent">保存</el-button>
|
|
|
|
|
+ <el-button type="info" @click="cancelPresent">取消</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script>
|
|
|
|
|
+ export default {
|
|
|
|
|
+ data () {
|
|
|
|
|
+ return {
|
|
|
|
|
+ related_id:'',
|
|
|
|
|
+ uid:'',
|
|
|
|
|
+ title:'',
|
|
|
|
|
+ related_type:'',
|
|
|
|
|
+ manager:'',
|
|
|
|
|
+ salary_from:'',
|
|
|
|
|
+ salary_to:'',
|
|
|
|
|
+ month:'',
|
|
|
|
|
+ directions:'',
|
|
|
|
|
+ skill:'',
|
|
|
|
|
+ job_description:'',
|
|
|
|
|
+ status: [{
|
|
|
|
|
+ statusValue: '0',
|
|
|
|
|
+ label: '下架隐藏'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ statusValue: '1',
|
|
|
|
|
+ label: '开放中'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ statusValue: '2',
|
|
|
|
|
+ label: '停止申请'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ statusValue: '3',
|
|
|
|
|
+ label: '开发中'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ statusValue: '4',
|
|
|
|
|
+ label: '已结束'
|
|
|
|
|
+ }],
|
|
|
|
|
+ statusValue: '0',
|
|
|
|
|
+ citys: [{
|
|
|
|
|
+ city: '0',
|
|
|
|
|
+ label: '不限'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ city: '1',
|
|
|
|
|
+ label: '北京'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ city: '2',
|
|
|
|
|
+ label: '上海'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ city: '3',
|
|
|
|
|
+ label: '广州'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ city: '4',
|
|
|
|
|
+ label: '深圳'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ city: '5',
|
|
|
|
|
+ label: '成都'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ city: '6',
|
|
|
|
|
+ label: '杭州'
|
|
|
|
|
+ }],
|
|
|
|
|
+ city: '0',
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.getPresentInfo();
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ async getPresentInfo() {
|
|
|
|
|
+
|
|
|
|
|
+ let query = window.location.search.substring(1);
|
|
|
|
|
+ let vars = query.split("&");
|
|
|
|
|
+ let body = {
|
|
|
|
|
+ 'job_id' : vars[0].split("=")[1],
|
|
|
|
|
+ 'job_type' : vars[1].split("=")[1],
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ const res = await this.$post("/api/admin/present_job/present_info",body);
|
|
|
|
|
+ this.related_id = res.data.job.id;
|
|
|
|
|
+ this.uid = res.data.job.uid;
|
|
|
|
|
+ this.title = res.data.job.title2;
|
|
|
|
|
+ this.related_type = res.data.job_type;
|
|
|
|
|
+ this.manager = res.data.manager;
|
|
|
|
|
+ this.salary_from = res.data.job.match_salary_min;
|
|
|
|
|
+ this.salary_to = res.data.job.match_salary_max;
|
|
|
|
|
+ this.month = res.data.job.month;
|
|
|
|
|
+ this.directions = res.data.job.directions;
|
|
|
|
|
+ this.skill = res.data.job.skill;
|
|
|
|
|
+ this.statusValue = res.data.job.status;
|
|
|
|
|
+ this.city = res.data.job.city;
|
|
|
|
|
+ this.job_description = res.data.job.description;
|
|
|
|
|
+ },
|
|
|
|
|
+ async cancelPresent() {
|
|
|
|
|
+ window.history.back();
|
|
|
|
|
+ },
|
|
|
|
|
+ async savePresent() {
|
|
|
|
|
+ let flag = false;
|
|
|
|
|
+ let salaryAlert = document.getElementById('salaryAlert');
|
|
|
|
|
+ let monthAlert = document.getElementById('monthAlert');
|
|
|
|
|
+ let jobInfoAlert = document.getElementById('jobInfoAlert');
|
|
|
|
|
+ if (this.salary_from.length==0||this.salary_to.length==0){
|
|
|
|
|
+ salaryAlert.innerText = '请正确输入薪酬范围';
|
|
|
|
|
+ salaryAlert.style.display = 'block';
|
|
|
|
|
+ flag = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.month.length==0){
|
|
|
|
|
+ monthAlert.innerText = '请输入驻场周期';
|
|
|
|
|
+ monthAlert.style.display = 'block';
|
|
|
|
|
+ flag = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.job_description.length==0){
|
|
|
|
|
+ jobInfoAlert.innerText = '请输入工作内容';
|
|
|
|
|
+ jobInfoAlert.style.display = 'block';
|
|
|
|
|
+ flag = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.salary_from<1||this.salary_from>1000000||this.salary_to<1||this.salary_to>1000000||this.salary_from>=this.salary_to){
|
|
|
|
|
+ salaryAlert.innerText = '薪酬填写范围1-1000000且前一个值要小于后一个值';
|
|
|
|
|
+ salaryAlert.style.display = 'block';
|
|
|
|
|
+ flag = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if ((this.month<1||this.month>99)&&this.month.length!=0){
|
|
|
|
|
+ monthAlert.innerText = '驻场周期正确填写范围1-99';
|
|
|
|
|
+ monthAlert.style.display = 'block';
|
|
|
|
|
+ flag = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.job_description.length>10000){
|
|
|
|
|
+ jobInfoAlert.innerText = '工作内容填写最多10000个字符且不能为空';
|
|
|
|
|
+ jobInfoAlert.style.display = 'block';
|
|
|
|
|
+ flag = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (flag){
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ let body = {
|
|
|
|
|
+ 'related_id' : this.related_id,
|
|
|
|
|
+ 'title' : this.title,
|
|
|
|
|
+ 'related_type' : this.related_type,
|
|
|
|
|
+ 'status' : this.statusValue,
|
|
|
|
|
+ 'salary_from' : this.salary_from,
|
|
|
|
|
+ 'salary_to' : this.salary_to,
|
|
|
|
|
+ 'city' : this.city,
|
|
|
|
|
+ 'month' : this.month,
|
|
|
|
|
+ 'job_direction' : this.job_direction,
|
|
|
|
|
+ 'job_skills' : this.job_skills,
|
|
|
|
|
+ 'job_description' :this.job_description
|
|
|
|
|
+ }
|
|
|
|
|
+ const res = await this.$post("/api/admin/present_job/present_edit",body);
|
|
|
|
|
+ if (res.status==1) {
|
|
|
|
|
+ alert(res.info);
|
|
|
|
|
+ self.location=document.referrer;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+ .el-row {
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .top{
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+</style>
|