Browse Source

职位更新

guhongwei 5 years ago
parent
commit
9c02943c80
1 changed files with 34 additions and 49 deletions
  1. 34 49
      src/pages/corp/views/jobs/detail.vue

+ 34 - 49
src/pages/corp/views/jobs/detail.vue

@@ -56,7 +56,7 @@
           :data="edu_list"
           type="xl_req"
           :selected="info.xl_req"
-          placeholder="点击选择工作性质"
+          placeholder="点击选择学历要求"
           need="label"
           @select="selectChange"
           style="margin:5px 0px"
@@ -152,33 +152,9 @@ export default {
       },
       dateVis: false,
       endDate: `${new Date().getFullYear() + 1}-${new Date().getMonth() + 1}-${new Date().getDate()}`,
-      jobTypeList: [
-        {
-          label: 'IT',
-          value: '1',
-        },
-        {
-          label: 'test2',
-          value: '2',
-        },
-        {
-          label: 'test3',
-          value: '3',
-        },
-        {
-          label: 'test4',
-          value: '4',
-        },
-      ],
+      jobTypeList: [],
       praList: [{ value: 0, label: '校招' }, { value: 1, label: '实习' }, { value: 2, label: '社招' }],
-      edu_list: [
-        { value: '不限', label: '不限' },
-        { value: '中专及以上', label: '中专及以上' },
-        { value: '大专及以上', label: '大专及以上' },
-        { value: '本科及以上', label: '本科及以上' },
-        { value: '硕士及以上', label: '硕士及以上' },
-        { value: '博士及以上', label: '博士及以上' },
-      ],
+      edu_list: [],
       cityList: [],
       provinceList: [{ label: '北京市', value: '110000' }, { label: '吉林省', value: '220000' }, { label: '沈阳省', value: '210000' }],
       secondList: [{ label: '长春市', value: '220100' }, { label: '吉林市', value: '220200' }],
@@ -205,27 +181,7 @@ export default {
         { label: '伦理类', value: '15' },
       ],
       subjectSub2: [{ label: '社会经济学', value: '16' }, { label: '国际经济学', value: '17' }, { label: '资本主义经济学', value: '18' }],
-      entice_list: [
-        { value: '1', label: '年底双薪' },
-        { value: '2', label: '绩效奖金' },
-        { value: '3', label: '岗前培训' },
-        { value: '4', label: '节日礼物' },
-        { value: '5', label: '扁平管理' },
-        { value: '6', label: '年度旅游' },
-        { value: '7', label: '岗位晋升' },
-        { value: '8', label: '股票期权' },
-        { value: '9', label: '弹性工作' },
-        { value: '10', label: '带薪年假' },
-        { value: '11', label: '交通补助' },
-        { value: '12', label: '餐补' },
-        { value: '13', label: '房补' },
-        { value: '14', label: '免费班车' },
-        { value: '15', label: '员工旅游' },
-        { value: '16', label: '包吃包住' },
-        { value: '17', label: '健康体检' },
-        { value: '18', label: '留人基金' },
-        { value: '19', label: '学费返还' },
-      ],
+      entice_list: [],
       rules: {
         job_name: [{ required: true, message: '请输入职位名称', trigger: 'blur' }],
         is_practice: [{ required: true, message: '请选择工作性质', trigger: 'blur' }],
@@ -250,6 +206,7 @@ export default {
     };
   },
   created() {
+    this.otherList();
     this.search();
   },
   computed: {
@@ -258,7 +215,7 @@ export default {
     }),
   },
   methods: {
-    ...mapActions(['postsOperation']),
+    ...mapActions(['postsOperation', 'dicOperation']),
     async search() {
       if (this.$route.query.id) {
         let result = await this.postsOperation({ type: 'search', data: { id: this.$route.query.id } });
@@ -380,6 +337,34 @@ export default {
         this.$set(this.info, `job_tag`, selected);
       }
     },
+    async otherList(type) {
+      let result = await this.dicOperation('xl');
+      if (`${result.errcode}` === '0') {
+        this.$set(this, `edu_list`, result.data);
+      } else {
+        this.$message.error(result.errmsg ? result.errmsg : 'error');
+      }
+      result = await this.dicOperation('zwyh');
+      if (`${result.errcode}` === '0') {
+        var enticeNew = result.data.map(item => ({ value: item.code, label: item.name }));
+        this.$set(this, `entice_list`, enticeNew);
+        console.log(enticeNew);
+      } else {
+        this.$message.error(result.errmsg ? result.errmsg : 'error');
+      }
+      result = await this.dicOperation('xcfl');
+      if (`${result.errcode}` === '0') {
+        this.$set(this, `welfare_list`, result.data);
+      } else {
+        this.$message.error(result.errmsg ? result.errmsg : 'error');
+      }
+      result = await this.dicOperation('zwlb');
+      if (`${result.errcode}` === '0') {
+        this.$set(this, `jobTypeList`, result.data);
+      } else {
+        this.$message.error(result.errmsg ? result.errmsg : 'error');
+      }
+    },
   },
 };
 </script>