hailin
2023-07-12 d79d81f53324911b03f521cd2b71054ed9278cab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<template>
  <div class="personnel-main ">
    <div class="page-header-search">
      <div class="search-bar">
        <el-form ref="form" inline="true" :model="searchData">
          <el-form-item>
            <el-input
              placeholder="请输入人员名称"
              v-model="searchData.keyword"
            >
              <i slot="prefix" class="el-input__icon el-icon-search" />
            </el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary">查询</el-button>
            <el-button type="primary" plain>重置</el-button>
            <!-- <el-button type="text">高级搜索<i class="el-icon-arrow-down el-icon--right" /></el-button> -->
          </el-form-item>
        </el-form>
      </div>
      <div class="serve-btn">
        <el-button type="primary" icon="el-icon-plus">新增人员</el-button>
      </div>
    </div>
    <div class="content-main">
      <div class="personner-table">
        <el-table
          ref="personnerlTable"
          :height="700"
          :max-height="700"
          :cell-style="{textAlign: 'center'}"
          :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
          :data="personnerlTable"
          style="width: 100%"
        >
          <el-table-column
            prop="roleName"
            label="角色名称"
            min-width="120"
          />
          <el-table-column
            prop="rolePermissions"
            label="角色权限"
            min-width="120"
          />
          <el-table-column
            prop="age"
            label="年龄"
            min-width="150"
          />
          <el-table-column
            prop="creatTime"
            label="创建时间"
            min-width="180"
          />
          <el-table-column
            prop="phone"
            label="电话"
            min-width="200"
          />
          <el-table-column
            prop="mailbox"
            label="邮箱"
            min-width="200"
          />
          <el-table-column
            prop="incumbentStatus"
            label="在职状态"
            min-width="120"
            :filters="[{ text: 0, value: 0 }, { text: 1, value: 1 }]"
            :filter-method="filterTag"
            filter-placement="bottom-end"
          >
            <template slot-scope="scope">
              <el-tag
                :type="scope.row.businessStatus === 0 ? 'primary' : 'success'"
                disable-transitions
              >{{ scope.row.businessStatus === 0 ? '未同意' : '已同意' }}</el-tag>
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            min-width="120"
          >
            <template slot-scope="scope">
              <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
              <!-- <el-button type="text" size="small">编辑</el-button> -->
            </template>
          </el-table-column>
        </el-table>
        <div>
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage"
            :page-sizes="[100, 200, 300, 400]"
            :page-size="100"
            layout="total, sizes, prev, pager, next, jumper"
            :total="400">
          </el-pagination>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      currentPage: 1,
      searchData: {
        keyword: ''
      },
      personnerlTable: [
        {
          roleName: '张三',
          rolePermissions: '管理员',
          age: '18',
          creatTime: '2023-07-07',
          phone: '138888888',
          mailbox: '138888888@qq.com',
          incumbentStatus: '1'
        }
      ]
    }
  },
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`)
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
    }
  }
}
</script>
 
<style lang="scss" scoped>
.personnel-main{
  // width: 100%;
  // height: 100%;
  .page-header-search{
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 0 24px 12px 24px;
     .search-bar{
      .el-form{
       .el-form-item{
         margin-bottom: 0px !important;
         .el-input{
          width: 360px;
         }
        }
      }
    }
  }
  .personner-table{
    background: #fff;
    padding: 20px 20px 10px 20px;
    >div:nth-child(2){
      display: flex;
      justify-content: end;
      margin: 10px 0;
    }
  }
}
</style>