lex-xin vor 3 Jahren
Ursprung
Commit
a51b284054
3 geänderte Dateien mit 47 neuen und 25 gelöschten Zeilen
  1. 4 8
      src/views/HumanResources/form.vue
  2. 40 14
      src/views/HumanResources/index.vue
  3. 3 3
      vue.config.js

+ 4 - 8
src/views/HumanResources/form.vue

@@ -279,14 +279,14 @@
               <th class="description-label"><i class="requiredStar">*</i>HRBP</th>
               <td class="description-content">
                 <el-form-item prop="hrbp"
-                  :rules="[{ required: true, message: '请输入HRBP', trigger: 'blur' }]"
+                  :rules="[{ required: true, message: '请选择HRBP', trigger: 'blur' }]"
                 >
                 <el-select
                   size="mini"
                     v-model.trim="form.hrbp"
                     clearable
                     filterable
-                    placeholder='请输入HRBP'
+                    placeholder='请选择HRBP'
                   >
                     <el-option v-for='(item,index) in roleList'
                       :key="index"
@@ -527,11 +527,11 @@
 </template>
 <script>
 // import Vue from 'vue'
-import { employeeCreate, employeeUpdate, employeeQueryDetail, queryEmployeeByRole } from '@/api/appTenant'
+import { employeeCreate, employeeUpdate, employeeQueryDetail } from '@/api/appTenant'
 import CreateRecord from './createRecord.vue'
 export default {
   name: 'hrform',
-  props: ['detail', 'subjectList', 'organList', 'close', 'getList', 'formActionTitle'],
+  props: ['detail', 'subjectList', 'organList', 'close', 'getList', 'formActionTitle', 'roleList'],
   components: {
     CreateRecord
   },
@@ -598,7 +598,6 @@ export default {
         ],
       },
       tableList: [],
-      roleList: [] // 角色列表
     }
   },
   watch: {
@@ -611,9 +610,6 @@ export default {
     if(this.formActionTitle == 'update') {
       this.getRecordList()
     }
-
-    let res = await queryEmployeeByRole({ roleId: 40})
-    this.roleList = res.data || []
   },
   computed: {
     propRequred() {

+ 40 - 14
src/views/HumanResources/index.vue

@@ -103,21 +103,34 @@
             type="daterange"
             style="width: 405px"
             range-separator="至"
-            start-placeholder="更新开始日期"
-            end-placeholder="更新结束日期"
+            start-placeholder="操作开始日期"
+            end-placeholder="操作结束日期"
           >
           </el-date-picker>
         </el-form-item>
-        <el-form-item prop="operator">
-          <el-input
+        <el-form-item prop="searchForm">
+          <!-- <el-input
             placeholder="归属管理HR"
             v-model.trim="searchForm.operator"
             clearable
-          ></el-input>
+          ></el-input> -->
+          <el-select
+            v-model.trim="searchForm.hrbp"
+            clearable
+            filterable
+            placeholder='请选择HRBP'
+          >
+            <el-option v-for='(item,index) in roleList'
+              :key="index"
+              :value="item.userId"
+              :label="item.userName"
+            >
+            </el-option>
+          </el-select>
         </el-form-item>
         <el-form-item prop="intentionCity">
           <el-input
-            placeholder="工作意向"
+            placeholder="意向城市"
             v-model.trim="searchForm.intentionCity"
             clearable
           ></el-input>
@@ -205,7 +218,7 @@
           <el-table-column
             align="center"
             prop="intentionCity"
-            label="工作意向"
+            label="意向城市"
             width="100px"
           >
             <template slot-scope="scope">
@@ -365,12 +378,11 @@
           ></el-table-column>
           <el-table-column
             align="center"
-            prop="operatorName"
-            label="归属管理HR"
+            label="HRBP"
           >
              <template slot-scope="scope">
               <div>
-                <copy-text>{{ scope.row.operatorName }}</copy-text>
+                <copy-text>{{ roleFormat(scope.row.hrbp) }}</copy-text>
               </div>
             </template>
           </el-table-column>
@@ -418,6 +430,7 @@
         v-if="typeStatus"
         :organList="organList"
         :subjectList="subjectList"
+        :roleList="roleList"
         :close="onFormClose"
         :formActionTitle="formActionTitle"
         :getList="getList"
@@ -467,6 +480,7 @@ import {
   employeeInfo,
   helpCenterContentModify,
   helpCenterContentDelete,
+  queryEmployeeByRole
 } from "@/api/appTenant";
 import { getEmployeeOrgan, getSubject } from "@/api/buildTeam";
 import { subjectListTree } from "@/api/specialSetting";
@@ -533,6 +547,7 @@ export default {
       tempTreeList: [],
       organList: [],
       subjectList: [],
+      roleList: []
     };
   },
   activated() {
@@ -540,7 +555,7 @@ export default {
     this.getSubjectList();
     //
   },
-  mounted() {
+  async mounted() {
     this.getList();
     this.getSubjectList();
     this.getTreeList();
@@ -563,7 +578,9 @@ export default {
       return data;
     },
   },
-  mounted() {
+  async mounted() {
+    let res = await queryEmployeeByRole({ roleId: 40})
+    this.roleList = res.data || []
     this.getList();
     // this.getTreeList()
     getEmployeeOrgan().then((res) => {
@@ -576,7 +593,6 @@ export default {
   methods: {
     employeeExport() {
       const { dates, ...rest } = this.searchForm;
-      console.log(dates);
       let params = {
         ...rest,
         ...getTimes(dates, ["startDate", "endDate"]),
@@ -801,7 +817,17 @@ export default {
       // this.$refs.cascader.handleClear()
       // this.$refs[formName].resetFields();
     },
-  },
+    roleFormat(value) {
+      const roleList = this.roleList
+      let userName = null
+      roleList.forEach(item => {
+        if(item.userId == value) {
+          userName = item.userName
+        }
+      })
+      return userName
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 3 - 3
vue.config.js

@@ -19,8 +19,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.112:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 开发环境
-// let target = 'https://test.dayaedu.com' //测试环境
+// let target = 'http://dev.dayaedu.com' // 开发环境
+let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -54,7 +54,7 @@ module.exports = {
     //   warnings: false,
     //   errors: true
     // },
-    https: false,
+    https: true,
     proxy: {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy