jz.kai 4 лет назад
Родитель
Сommit
9af0db2c85

+ 94 - 306
src/views/job/recruitment-detail.vue

@@ -1,8 +1,31 @@
-
 <style scoped>
 .user-panel {
   margin: 10px auto;
 }
+.td_tit1 {
+  font-size:26px;
+  color: #000;
+  height: 50px;
+}
+.td_tit2 {
+  font-size:18px;
+  color: #000;
+  height: 50px;
+}
+.td_tit3 {
+  width: 70px;
+  height: 30px;
+}
+.td_con {
+  min-width:100px;
+  color: #000;
+  height: 30px;
+}
+.divider {
+  border-top:1px dashed #cccccc;
+  height: 1px;
+  overflow:hidden;
+}
 </style>
 <template>
   <el-dialog
@@ -14,336 +37,103 @@
     :close-on-click-modal="false"
   >
     <div class="user-panel" v-loading="loading">
-        <el-form
-            ref="form"
-            :model="formModel"
-            :rules="ruleValidate"
-            :label-width="'100px'"
-        >
-        <el-row>
-            <el-col :span="12">
-              <el-form-item label="企业" prop="companyId">
-                <el-select-tree
-                  :props="companyProps"
-                  :options="companyResult"
-                  v-model="formModel.companyId"
-                  style="width:300px;"
-                  size="mediumn"
-                ></el-select-tree>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="招聘地区" prop="area">
-                <el-select-tree
-                  :props="areaProps"
-                  :options="areaResult"
-                  v-model="formModel.area"
-                  style="width:300px;"
-                  size="mediumn"
-                ></el-select-tree>
-              </el-form-item>
-            </el-col>
-        </el-row>
-        <el-row>
-            <el-col :span="12">
-              <el-form-item label="岗位" prop="title">
-                  <el-input
-                      v-model="formModel.title"
-                      placeholder="请输入岗位"
-                      style="width: 300px"
-                  ></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="岗位分类" prop="position">
-                <el-select-tree
-                  :props="positionProps"
-                  :options="positionResult"
-                  v-model="formModel.position"
-                  style="width:300px;"
-                  size="mediumn"
-                ></el-select-tree>
-              </el-form-item>
-            </el-col>
-        </el-row>
-        <el-row>
-            <el-col :span="12">
-                <el-form-item label="招聘人数" prop="positionNumber">
-                    <el-input
-                        v-model="formModel.positionNumber"
-                        placeholder="请输入招聘人数"
-                        style="width: 300px"
-                    ></el-input>
-                </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="工作年限" prop="workYear">
-                <el-select v-model="formModel.workYear" filterable placeholder="请选择工作年限" style="width: 300px">
-                  <el-option v-for="workYear in workYearResult" :key="workYear.value" :label="workYear.name" :value="workYear.id"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-        </el-row>
-        <el-row>
-            <el-col :span="12">
-                <el-form-item label="学历要求" prop="education">
-                    <el-select
-                    v-model="formModel.education"
-                    filterable
-                    placeholder="请选择学历要求"
-                    style="width: 300px"
-                    >
-                    <el-option
-                        v-for="education in educationResult"
-                        :key="education.value"
-                        :label="education.name"
-                        :value="education.id"
-                    ></el-option>
-                    </el-select>
-                </el-form-item>
-            </el-col>
-            <el-col :span="12">
-                <el-form-item label="性别要求" prop="positionSex">
-                    <el-select
-                    v-model="formModel.positionSex"
-                    filterable
-                    placeholder="请选择性别要求"
-                    style="width: 300px"
-                    >
-                    <el-option
-                        v-for="positionSex in positionSexResult"
-                        :key="positionSex.value"
-                        :label="positionSex.name"
-                        :value="positionSex.id"
-                    ></el-option>
-                    </el-select>
-                </el-form-item>
-            </el-col>
-        </el-row>
-        <el-row>
-            <el-col :span="12">
-              <el-form-item label="薪资" prop="wageType">
-                <el-select v-model="formModel.wageType" filterable placeholder="请选择薪资" style="width:300px">
-                  <el-option v-for="wageType in wageTypeResult" :key="wageType.value" :label="wageType.name" :value="wageType.id"></el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="12">
-              <el-form-item label="地址" prop="address">
-                <el-input
-                    v-model="formModel.address"
-                    placeholder="请输入地址"
-                    style="width: 300px"
-                ></el-input>
-              </el-form-item>
-            </el-col>
-        </el-row>
-        <el-row>
-            <el-col :span="12">
-                <el-form-item label="岗位描述" prop="positionMessage">
-                    <el-input
-                        type="textarea"
-                        :rows="4"
-                        v-model="formModel.positionMessage"
-                        placeholder="请输入岗位描述"
-                        style="width: 300px"
-                    ></el-input>
-                </el-form-item>
-            </el-col>
-            <el-col :span="12">
-                <el-form-item label="任职要求" prop="requirements">
-                    <el-input
-                        type="textarea"
-                        :rows="4"
-                        v-model="formModel.requirements"
-                        placeholder="请输入任职要求"
-                        style="width: 300px"
-                    ></el-input>
-                </el-form-item>
-            </el-col>
-        </el-row>
-      </el-form>
+      <table style="width:100%;" border="0" cellpadding="0" cellspacing="0">
+        <tr>
+          <td style="width:70%; padding-right:40px;">
+            <table style="width:100%;" border="0" cellpadding="0" cellspacing="0">
+              <tr>
+                <td class="td_tit1" style="padding-bottom:10px">{{formModel.title}}</td>
+                <td class="td_tit1" style="text-align:right;color:#ff0000">{{formModel.wageTypeName}}</td>
+              </tr>
+              <tr>
+                <td colspan="2" class="td_tit3" style="padding-bottom:30px">
+                  <el-tag size="medium" type="info">五险一金</el-tag>&nbsp;
+                  <el-tag size="medium" type="info">交通补助</el-tag>&nbsp;
+                </td>
+              </tr>
+              <tr>
+                <td colspan="2" class="td_tit3">{{formModel.requirements}}</td>
+              </tr>
+              <tr>
+                <td colspan="2" class="td_tit3" style="padding-bottom:10px">{{formModel.address}}</td>
+              </tr>
+              <tr>
+                <td colspan="2" class="divider"></td>
+              </tr>
+              <tr>
+                <td colspan="2" class="td_tit2" style="padding-top:10px">职位描述</td>
+              </tr>
+              <tr>
+                <td colspan="2" class="td_con">{{formModel.positionMessage}}</td>
+              </tr>
+              <tr>
+                <td v-if="formModel.updateTime != null" colspan="2" class="td_con" style="padding-top:40px">
+                  更新:{{formModel.updateTime}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                  浏览:{{formModel.readingTimes}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                  收藏:{{formModel.collectionTimes}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                  投递:{{formModel.deliveryTimes}}
+                </td>
+                <td v-else colspan="2" class="td_con" style="padding-top:40px">
+                  更新:{{formModel.createTime}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                  浏览:{{formModel.readingTimes}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                  收藏:{{formModel.collectionTimes}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                  投递:{{formModel.deliveryTimes}}
+                </td>
+              </tr>
+            </table>
+          </td>
+          <td style="padding-left:20px; border-left:1px dashed #cccccc;" valign="top">
+            <table style="width:100%;" border="0" cellpadding="0" cellspacing="0">
+              <tr>
+                <td colspan="2" class="td_tit2" style="padding-bottom:10px">{{formModel.companyName}}</td>
+              </tr>
+              <tr>
+                <td class="td_con">{{formModel.companyIndustryN}} | {{formModel.companyScaleN}}</td>
+                <td rowspan="2" align="right" valign="top">
+                    <el-avatar :size="56" shape="square" :src="formModel.companyLogo+'?x-oss-process=image/resize,m_fill,w_64,h_64'"></el-avatar>
+                </td>
+              </tr>
+              <tr>
+                <td class="td_con">
+                  <el-tag size="medium">企业已认证</el-tag>&nbsp;
+                </td>
+              </tr>
+              <tr>
+                <td colspan="2" class="td_con" style="padding-top:30px">{{formModel.address}}</td>
+              </tr>
+            </table>
+          </td>
+        </tr>
+      </table>
     </div>
     <span slot="footer" class="dialog-footer">
-      <el-button @click="closeDialog">取 消</el-button>
-      <el-button type="primary" @click="handleSubmit" :loading="submitting">确 定</el-button>
+      <el-button @click="closeDialog">关 闭</el-button>
     </span>
   </el-dialog>
 </template>
 <script>
-import Constant from "@/constant";
 import recruitmentApi from "@/api/job/recruitment";
-import dataDictionaryApi from "@/api/sys/dataDictionary";
-import cityApi from "@/api/base/city";
-import companyApi from "@/api/base/company";
-import workCategoryApi from "@/api/job/workCategory";
-import SelectTree from "@/components/SelectTree";
 
 export default {
   props: ["businessKey", "title"],
   data() {
     return {
       formModel: {},
-      ruleValidate: {
-        wageType: [{ required: true, message: "薪资不能为空", trigger: "blur" }],
-        position: [{ required: true, message: "岗位分类不能为空", trigger: "blur" }],
-        companyId: [{ required: true, message: "企业不能为空", trigger: "blur" }],
-        title: [{ required: true, message: "岗位不能为空", trigger: "blur" }],
-        area: [{ required: true, message: "招聘地区不能为空", trigger: "blur"}],
-        address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
-        positionMessage: [{ required: true, message: "职位描述不能为空", trigger: "blur" }],
-        requirements: [{ required: true, message: "任职要求不能为空", trigger: "blur" }],
-        positionNumber: [{ required: true, message: "求职人数不能为空", trigger: "blur" }],
-        workYear: [{ required: true, message: "工作年限不能为空", trigger: "blur" }],
-        education: [{ required: true, message: "学历要求不能为空", trigger: "blur" }],
-        positionSex: [{ required: true, message: "性别要求不能为空", trigger: "blur" }],
-        contactPerson: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
-        tel: [{ required: true, message: "联系方式不能为空", trigger: "blur" }],
-        status: [{ required: true, message: "状态(关闭,开启等)不能为空", trigger: "blur" }],
-      },
       showDialog: true,
       loading: false,
       submitting: false,
-      educationResult: [],
-      positionSexResult: [],
-      areaResult: [],
-      companyResult: [],
-      wageTypeResult: [],
-      workYearResult: [],
-      positionResult: [],
-      areaProps: {
-        value: "id",
-        label: "cityName"
-      },
-      companyProps: {
-        value: "id",
-        label: "name"
-      },
-      positionProps: {
-        value: "id",
-        label: "name"
-      },
     };
   },
-  created() {
-    dataDictionaryApi
-    .findByCatalogName({
-      catalogName: "学历",
-    })
-    .then((response) => {
-      var jsonData = response.data;
-      this.educationResult = jsonData.data;
-    });
-
-    dataDictionaryApi
-    .findByCatalogName({
-      catalogName: "性别",
-    })
-    .then((response) => {
-      var jsonData = response.data;
-      this.positionSexResult = jsonData.data;
-    });
-
-    dataDictionaryApi
-    .findByCatalogName({
-      catalogName: "月薪范围",
-    })
-    .then((response) => {
-      var jsonData = response.data;
-      this.wageTypeResult = jsonData.data;
-    });
-
-    dataDictionaryApi
-    .findByCatalogName({
-      catalogName: "工作经验",
-    })
-    .then((response) => {
-      var jsonData = response.data;
-      this.workYearResult = jsonData.data;
-    });
-
-    cityApi.list().then(response=>{
-      var jsonData = response.data;
-
-      if(jsonData.result){
-        this.areaResult = jsonData.data;
-      }
-      else{
-        this.$message.error(jsonData.message + "");
-      }
-    });
-
-    companyApi.list().then(response=>{
-      var jsonData = response.data;
-
-      if(jsonData.result){
-        this.companyResult = jsonData.data;
-      }
-      else{
-        this.$message.error(jsonData.message + "");
-      }
-    });
-
-    workCategoryApi.listSelectTree().then(response=>{
-      var jsonData = response.data;
-
-      if(jsonData.result){
-        this.positionResult = jsonData.data;
-      }
-      else{
-        this.$message.error(jsonData.message + "");
-      }
-    });
-  },
   methods: {
     closeDialog() {
       this.$emit("close", false);
     },
-    handleSubmit() {
-      var self = this;
-
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          (function () {
-            var id = self.formModel.id;
-
-            if (id == null || id.length == 0) {
-              return recruitmentApi.add(self.formModel);
-            } else {
-              return recruitmentApi.update(self.formModel);
-            }
-          })().then(function (response) {
-            var jsonData = response.data;
-
-            if (jsonData.result) {
-              self.$message({
-                message: "保存成功!",
-                type: "success",
-              });
-
-              self.$emit("close", true);
-            } else {
-              self.$message({
-                message: jsonData.message + "",
-                type: "warning",
-              });
-
-              self.$emit("close", false);
-            }
-          });
-        }
-      });
-    },
   },
   mounted: function () {
     var self = this;
 
     (function () {
-      if (self.businessKey.length == 0) {
-        return recruitmentApi.create();
-      } else {
         return recruitmentApi.edit(self.businessKey);
-      }
     })()
       .then((response) => {
         var jsonData = response.data;
@@ -351,6 +141,7 @@ export default {
 
         if (jsonData.result) {
           self.formModel = jsonData.data;
+          console.log(self.formModel);
         } else {
           self.$message.error(jsonData.message + "");
         }
@@ -359,8 +150,5 @@ export default {
         self.$message.error(error + "");
       });
   },
-  components: {
-    "el-select-tree": SelectTree
-  },
 };
 </script>

+ 1 - 1
src/views/job/recruitment-list.vue

@@ -71,7 +71,7 @@
       <el-table-column prop="wageTypeName" label="薪资" width="180"></el-table-column>
       <el-table-column prop="contactPerson" label="联系人" width="180"></el-table-column>
       <el-table-column prop="tel" label="联系方式" width="180"></el-table-column>
-      <el-table-column label="操作">
+      <el-table-column label="操作" width="150" fixed="right">
         <template slot-scope="{row}">
           <el-button v-if="row.status == 1" size="mini" type="text" @click="handleOffShelf(row)">下架</el-button>
           <el-button size="mini" type="text" @click="handleDetail(row)">查看详情</el-button>

+ 0 - 3
src/views/job/resume-detail.vue

@@ -145,9 +145,6 @@
         <tr>
           <td colspan="6" class="td_con">
             <div>
-              <!-- <el-steps direction="vertical" :active="1">
-                <el-step v-for="workStep in formModel.workStepList" :key="workStep.sortNo" :title="workStep.text" :description="workStep.date"></el-step>
-              </el-steps> -->
               <el-timeline :reverse="true">
                 <el-timeline-item v-for="(workStep, index) in formModel.workStepList" :key="index" :timestamp="workStep.date">
                   {{workStep.text}}