This commit is contained in:
parent
59ca988875
commit
d8a199ad89
|
|
@ -1,66 +1,27 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-input
|
||||
v-model="listQuery.userName"
|
||||
placeholder="用户名"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
:maxlength="30"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
<el-input
|
||||
v-model="listQuery.loginName"
|
||||
placeholder="用户昵称"
|
||||
style="width: 200px"
|
||||
class="filter-item ml-20"
|
||||
:maxlength="30"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
<el-input
|
||||
v-model="listQuery.phone"
|
||||
placeholder="手机号"
|
||||
style="width: 200px"
|
||||
class="filter-item ml-20"
|
||||
:maxlength="11"
|
||||
@keyup.enter.native="handleFilter"
|
||||
/>
|
||||
<el-button
|
||||
v-waves
|
||||
style="margin-left: 40px"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleFilter"
|
||||
>
|
||||
<el-input v-model="listQuery.userName" placeholder="用户名" style="width: 200px" class="filter-item" :maxlength="30"
|
||||
@keyup.enter.native="handleFilter" />
|
||||
<el-input v-model="listQuery.loginName" placeholder="用户昵称" style="width: 200px" class="filter-item ml-20"
|
||||
:maxlength="30" @keyup.enter.native="handleFilter" />
|
||||
<el-input v-model="listQuery.phone" placeholder="手机号" style="width: 200px" class="filter-item ml-20" :maxlength="11"
|
||||
@keyup.enter.native="handleFilter" />
|
||||
<el-button v-waves style="margin-left: 40px" class="filter-item" type="primary" icon="el-icon-search"
|
||||
@click="handleFilter">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button class="filter-item" style="margin-left: 10px" type="primary" icon="el-icon-edit" @click="handleCreate">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-waves
|
||||
:loading="downloadLoading"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-download"
|
||||
@click="handleDownload"
|
||||
>
|
||||
<el-button v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download"
|
||||
@click="handleDownload">
|
||||
导出
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:key="tableKey"
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
border
|
||||
fit
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
:max-height="tableHeight"
|
||||
@sort-change="sortChange"
|
||||
>
|
||||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%"
|
||||
:max-height="tableHeight" @sort-change="sortChange">
|
||||
<el-table-column label="序号" align="center" width="80" :class-name="getSortClass('id')" type="index">
|
||||
<template scope="scope">
|
||||
<span>{{ (listQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
||||
|
|
@ -93,23 +54,12 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="listQuery.pageNum"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="600px">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:rules="rules"
|
||||
:model="temp"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
style="width: 400px; margin-left: 50px"
|
||||
>
|
||||
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="right" label-width="80px"
|
||||
style="width: 400px; margin-left: 50px">
|
||||
<el-form-item label="用户名" prop="userName">
|
||||
<el-input v-model="temp.userName" placeholder="用户名" :maxlength="30" />
|
||||
</el-form-item>
|
||||
|
|
@ -419,7 +369,7 @@ export default {
|
|||
this.$confirm(`确定要删除该数据吗?`, {
|
||||
type: 'warning',
|
||||
title: '操作提示',
|
||||
beforeClose: async(action, instance, done) => {
|
||||
beforeClose: async (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
delUser({ userId: row.userId }).then((response) => {
|
||||
console.log(response)
|
||||
|
|
@ -469,7 +419,7 @@ export default {
|
|||
})
|
||||
)
|
||||
},
|
||||
getSortClass: function(key) {
|
||||
getSortClass: function (key) {
|
||||
const sort = this.listQuery.sort
|
||||
return sort === `+${key}` ? 'ascending' : 'descending'
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue