浏览代码

Merge branch 'online' of http://git.dayaedu.com/molingzhide/dy-admin-manager into online

lex-xin 4 年之前
父节点
当前提交
2a786348f5
共有 1 个文件被更改,包括 16 次插入8 次删除
  1. 16 8
      src/views/HumanResources/index.vue

+ 16 - 8
src/views/HumanResources/index.vue

@@ -9,7 +9,7 @@
       <!-- 搜索标题 -->
       <el-form :inline="true" class="searchForm" v-model.trim="searchForm">
         <el-form-item>
-          <el-input placeholder="姓名手机号" v-model.trim="searchForm.userNameOrIdOrMobile"></el-input>
+          <el-input placeholder="姓名手机号" v-model.trim="searchForm.userNameOrIdOrMobile" clearable></el-input>
         </el-form-item>
         <el-form-item>
           <el-select v-model.trim="searchForm.jobNature"
@@ -74,6 +74,7 @@
         </el-form-item>
         <el-form-item>
           <el-button @click="getList" type="danger">搜索</el-button>
+          <el-button @click="onReSet" type="primary">重置</el-button>
         </el-form-item>
       </el-form>
       <div class="tableWrap">
@@ -143,7 +144,7 @@
               {{ scope.row.resignationDate | dayjsFormat}}
             </template>
           </el-table-column>
-          <el-table-column align="center" label="操作">
+          <el-table-column align="center" label="操作" fixed="right">
             <template slot-scope="scope">
               <el-button v-permission="'employeeInfo/update'" @click="openTypes('update', scope.row)" type="text">修改</el-button>
             </template>
@@ -202,17 +203,21 @@ import {
 } from "@/api/appTenant";
 import { getEmployeeOrgan } from '@/api/buildTeam'
 import { subjectListTree } from '@/api/specialSetting'
+
+const initSearch = {
+  organId: '',
+  jobNature: '',
+  position: '',
+  subjectId: '',
+  userNameOrIdOrMobile: '',
+}
 export default {
   components: { pagination, hrform },
   name: "helpCategory",
   data() {
     return {
       searchForm: {
-        organId: '',
-        jobNature: '',
-        position: '',
-        subjectId: '',
-        userNameOrIdOrMobile: '',
+        ...initSearch
       },
       educationVisible: false,
       treeList: [],
@@ -327,7 +332,10 @@ export default {
         })
       }).catch(() => {
       })
-
+    },
+    onReSet() {
+      this.searchForm = {...initSearch}
+      this.getList()
     },
     onTypeSubmit(formName) {
       // 添加数据