소스 검색

客户经理代发云端工作

ccf 3 년 전
부모
커밋
a087af229d
7개의 변경된 파일342개의 추가작업 그리고 1개의 파일을 삭제
  1. 144 0
      components/drawer/cloud_job_add.vue
  2. 67 0
      components/form/area_select.vue
  3. 61 0
      components/form/occupation_direction.vue
  4. 39 0
      components/form/skill.vue
  5. 0 1
      pages/index.vue
  6. 10 0
      pages/main/index.vue
  7. 21 0
      pages/main/index/cloud_job.vue

+ 144 - 0
components/drawer/cloud_job_add.vue

@@ -0,0 +1,144 @@
+<template>
+  <div  class="createPost-container">
+    <el-form ref="postForm" class="form-container">
+      <div class="createPost-main-container">
+        <el-form-item style="margin-bottom: 20px;" label="用户UID:">
+          <el-input v-model="postForm.uid" :rows="1" placeholder="" />
+        </el-form-item>
+
+        <el-form-item style="margin-bottom: 20px;" label="对接方向:">
+          <occupation_direction v-model="postForm.occupation_direction"></occupation_direction>
+        </el-form-item>
+
+        <el-form-item style="margin-bottom: 20px;" label="需要技能:">
+          <skill v-model="postForm.match_skills" />
+        </el-form-item>
+
+        <el-form-item style="margin-bottom: 20px;" label="全职开发:">
+          <el-radio v-model="postForm.is_appoint_freelance" label="1">不需要</el-radio>
+          <el-radio v-model="postForm.is_appoint_freelance" label="2">需要</el-radio>
+        </el-form-item>
+
+        <el-form-item style="margin-bottom: 20px;" label="驻场开发:">
+          <el-radio v-model="postForm.publish_present_hire" label="0">不需要</el-radio>
+          <el-radio v-model="postForm.publish_present_hire" label="1">需要</el-radio>
+        </el-form-item>
+
+        <el-form-item v-if="postForm.publish_present_hire=='1'" style="margin-bottom: 20px;" label="驻场地区:">
+          <area_select v-model="postForm.area" />
+        </el-form-item>
+
+        <el-form-item style="margin-bottom: 20px;" label="项目经理:">
+          <el-radio v-model="postForm.is_need_manager" label="1">不需要</el-radio>
+          <el-radio v-model="postForm.is_need_manager" label="2">需要</el-radio>
+        </el-form-item>
+
+        <el-form-item style="margin-bottom: 20px;" label="项目预算:">
+          <el-radio v-model="postForm.ys_money_type" label="1">6K以下</el-radio>
+          <el-radio v-model="postForm.ys_money_type" label="2">6-12K</el-radio>
+          <el-radio v-model="postForm.ys_money_type" label="3">12-18K</el-radio>
+          <el-radio v-model="postForm.ys_money_type" label="4">18K+</el-radio>
+        </el-form-item>
+
+        <el-form-item style="margin-bottom: 20px;" label="需求描述:">
+          <el-input v-model="postForm.description" :rows="10" type="textarea" placeholder="" />
+        </el-form-item>
+
+        <el-form-item style="margin-bottom: 30px;">
+          <el-button v-loading="loading" style="margin-left: 10px;" type="success" @click="submitForm">
+            确定发布
+          </el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+  import occupation_direction from "/components/form/occupation_direction.vue";
+  import skill from "/components/form/skill.vue";
+  import area_select from "/components/form/area_select.vue";
+  export default {
+    components: {occupation_direction,skill,area_select},
+    props: {
+      getInfoParent: {
+        type: Function,
+        default: null
+      }
+    },
+    data() {
+      return {
+        loading:false,
+        postForm: {
+          is_need_manager:"1",
+          is_appoint_freelance:"1",
+          ys_money_type:"1",
+          occupation_direction:"",
+          publish_present_hire:"0"
+        },
+      }
+    },
+    methods: {
+      async submitForm() {
+        if(this.loading)
+        {
+          return ;
+        }
+        this.loading=true;
+        const res = await this.$post('/api/admin/job/publish3', this.postForm)
+        if (res.status == 1) {
+          this.$notify({
+            title: '成功',
+            message: '发布成功',
+            type: 'success',
+            duration: 2000
+          })
+          this.getInfoParent();
+        }
+        else
+        {
+          this.loading=false;
+        }
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  @import "~@/styles/mixin.scss";
+  .createPost-container {
+    position: relative;
+    margin-top: 20px;
+
+    .createPost-main-container {
+      padding: 0px 45px 20px 50px;
+
+      .postInfo-container {
+        position: relative;
+        @include clearfix;
+        margin-bottom: 10px;
+
+        .postInfo-container-item {
+          float: left;
+        }
+      }
+    }
+
+    .word-counter {
+      width: 40px;
+      position: absolute;
+      right: 10px;
+      top: 0px;
+    }
+  }
+
+  .article-textarea ::v-deep {
+    textarea {
+      padding-right: 40px;
+      resize: none;
+      border: none;
+      border-radius: 0px;
+      border-bottom: 1px solid #bfcbd9;
+    }
+  }
+</style>

+ 67 - 0
components/form/area_select.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <el-cascader
+      v-model="val"
+      @change="handleChange"
+      :options="list"></el-cascader>
+  </div>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        list:[],
+        val:0,
+      }
+    },
+    computed: {
+
+    },
+    mounted() {
+      this.getOptions();
+    },
+    methods: {
+      handleChange(value) {
+        this.$emit('input', value)
+      },
+      async getOptions() {
+        let res = await this.$post("/api/recruit/getOptions");
+        if (res && res.status === 1) {
+          this.options = res.data || [];
+        }
+        this.getAreas();
+      },
+      getAreas() {
+        let provinces = this.options.provinces;
+        let cities = this.options.cities;
+        let data = [];
+        let id, dd, c;
+        for (let i = 0; i < provinces.length; i++) {
+          id = provinces[i].id;
+          let arr = {
+            value: id,
+            label: provinces[i].name,
+            children: (function () {
+              c = 0;
+              dd = [];
+              for (let j = 0; j < cities.length; j++) {
+                if (cities[j].prov_id == id) {
+                  let arr1 = {
+                    value: cities[j].id,
+                    label: cities[j].name
+                  };
+                  dd[c] = arr1;
+                  c++;
+                }
+              }
+              return dd;
+            })()
+          };
+          data[i] = arr;
+        }
+        this.list = data;
+      },
+    }
+  };
+</script>

+ 61 - 0
components/form/occupation_direction.vue

@@ -0,0 +1,61 @@
+<template>
+  <div>
+    <el-cascader
+      v-model="val"
+      @change="handleChange"
+      :options="list"></el-cascader>
+  </div>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        list:[],
+        val:0,
+      }
+    },
+    computed: {
+
+    },
+    mounted() {
+      this.getOptions();
+    },
+    methods: {
+      handleChange(value) {
+        this.$emit('input', value)
+      },
+      async getOptions() {
+        let res = await this.$post("/api/recruit/getOptions");
+        if (res && res.status === 1) {
+          this.options = res.data || [];
+        }
+        this.getPositionType();
+      },
+      getPositionType() {
+        let positionType = this.options.direction;
+        let arr = [];
+        for (let i = 0; i < positionType.length; i++) {
+          let d = {
+            value: positionType[i].occupation_id,
+            label: positionType[i].occupation_name,
+            children: (function () {
+              if (positionType[i].children.length > 0) {
+                let a = [];
+                for (let j = 0; j < positionType[i].children.length; j++) {
+                  a[j] = {
+                    value: positionType[i].children[j].direction_id,
+                    label: positionType[i].children[j].direction_name,
+                  }
+                }
+                return a;
+              }
+            })()
+          };
+          arr[i] = d;
+        }
+        this.list = arr;
+      },
+    }
+  };
+</script>

+ 39 - 0
components/form/skill.vue

@@ -0,0 +1,39 @@
+<template>
+  <div>
+    <el-cascader
+      v-model="val"
+      :options="list"
+      :props="props"
+      @change="handleChange"
+      :show-all-levels="false"
+      filterable
+      clearable></el-cascader>
+  </div>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        list:[],
+        val:0,
+        props: { multiple: true },
+      }
+    },
+    computed: {
+
+    },
+    mounted() {
+      this.get_skill_multiple();
+    },
+    methods: {
+      handleChange(value) {
+        this.$emit('input', value)
+      },
+      async get_skill_multiple() {
+        let res = await this.$post("/api/recruit/get_skill_multiple");
+        this.list = res.data.list || [];
+      },
+    }
+  };
+</script>

+ 0 - 1
pages/index.vue

@@ -20,6 +20,5 @@ export default {
   }
 }
 </script>
-
 <style>
 </style>

+ 10 - 0
pages/main/index.vue

@@ -21,6 +21,16 @@ export default {
 };
 </script>
 <style>
+.el-drawer__body{
+  overflow: auto;
+}
+.el-drawer__header{
+  margin-bottom:0px !important;
+}
+
+.el-drawer__container ::-webkit-scrollbar {
+  display: none;
+}
 .el-table td,
 .el-table th {
   padding: 8px 0;

+ 21 - 0
pages/main/index/cloud_job.vue

@@ -67,6 +67,7 @@
         <el-checkbox v-model="presentHire">驻场招聘</el-checkbox>
         <el-checkbox v-model="unDeposit" @change="changeDeposit">本期未托管</el-checkbox>
         <el-button @click="getCloudJob">筛选</el-button>
+        <el-button @click="add_cloub_job">代发云端</el-button>
       </div>
       <div class="right">
         <el-button @click="doManager">结算管理</el-button>
@@ -125,6 +126,16 @@
       layout="total, prev, pager, next"
       :total="totalCount"
     ></el-pagination>
+
+    <el-drawer
+      title="发布云端项目"
+      size="600px"
+      :destroy-on-close="true"
+      :append-to-body="true"
+      :visible.sync="drawer.visible"
+      :direction="drawer.direction">
+      <cloud_job_add :getInfoParent="getCloudJob"/>
+    </el-drawer>
   </div>
 </template>
 
@@ -196,9 +207,15 @@ const STATUS_COLOR = {
   结束合作: "#909399",
   取消: "#909399"
 };
+import cloud_job_add from "/components/drawer/cloud_job_add.vue";
 export default {
+  components: {cloud_job_add},
   data() {
     return {
+      drawer:{
+        visible:false,
+        direction:"rtl",
+      },
       uid: "",
       // 开发者id
       devID: "",
@@ -251,6 +268,9 @@ export default {
      * 获取用户客户经理基本信息
      */
     getUserManager() {},
+    add_cloub_job(){
+      this.drawer.visible=true;
+    },
     columnWidth(item){
       if(item==="status") return "80";
       if(item==="publish_present_hire") return "80";
@@ -308,6 +328,7 @@ export default {
      * 获取主列表数据
      */
     async getCloudJob() {
+      this.drawer.visible=false;
       let res = await this.$post("/api/admin/job/cloud_job", {
         uid: this.uid,
         developer_id: this.devID,