|
|
@ -44,7 +44,6 @@ |
|
|
|
<el-pagination background |
|
|
|
layout="prev, pager, next" |
|
|
|
:total="total" |
|
|
|
page-size="2" |
|
|
|
@prev-click="prev" |
|
|
|
@next-click="next" |
|
|
|
@current-change="changEnum"> |
|
|
@ -53,7 +52,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!--弹出框---> |
|
|
|
<el-dialog v-model="dialogFormVisible" :title="title" show-close=false center=true width="961px" top="17%"> |
|
|
|
<el-dialog v-model="dialogFormVisible" :title="title" center=true width="900px" top="17%"> |
|
|
|
<el-form :model="form"> |
|
|
|
<el-form-item label="用户账号:" :label-width="formLabelWidth" > |
|
|
|
<el-input v-model="form.userAccountNumber" autocomplete="off" style="width: 260px" :disabled="isDisabled"></el-input> |
|
|
@ -85,7 +84,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
|
import {reactive, toRefs ,ref , onMounted} from 'vue'; |
|
|
|
import {onMounted, reactive, toRefs} from 'vue'; |
|
|
|
import { post } from "../uilts/axios"; |
|
|
|
import { ElMessage } from 'element-plus' |
|
|
|
import { format } from '../uilts/String'; |
|
|
@ -98,7 +97,7 @@ export default { |
|
|
|
isDisabled:false, |
|
|
|
title:'', |
|
|
|
formLabelWidth:"100px", |
|
|
|
total: "", |
|
|
|
total:null, |
|
|
|
current:1, |
|
|
|
size:10, |
|
|
|
form:{ |
|
|
@ -110,21 +109,22 @@ export default { |
|
|
|
}, |
|
|
|
tableData:[] |
|
|
|
}) |
|
|
|
const findAllUser= ()=>{ |
|
|
|
return post("user/findAllUser",{ |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
findAllUser(); |
|
|
|
}) |
|
|
|
|
|
|
|
const findAllUser = ()=>{ |
|
|
|
return post("user/findUserByUserName",{ |
|
|
|
userName: option.state1.trim(), |
|
|
|
current:option.current, |
|
|
|
size:option.size |
|
|
|
}).then((res:any)=>{ |
|
|
|
option.tableData=res.data |
|
|
|
option.tableData= res.data.records; |
|
|
|
option.total = res.data.total; |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
post('user/findUserCount',{ |
|
|
|
}).then((res :any)=>{ |
|
|
|
option.total=res.data |
|
|
|
findAllUser() |
|
|
|
}) |
|
|
|
|
|
|
|
//添加用户 |
|
|
|
const onAddClick = ()=> { |
|
|
|
option.isDisabled=false |
|
|
@ -171,11 +171,13 @@ export default { |
|
|
|
|
|
|
|
//图片搜索 |
|
|
|
const onSearch = ()=> { |
|
|
|
post("user/findUserByUserAccountNumber",{ |
|
|
|
post("user/findUserByUserName",{ |
|
|
|
current: option.current, |
|
|
|
size: option.size, |
|
|
|
userName: option.state1 |
|
|
|
}).then((res:any)=>{ |
|
|
|
option.tableData=[] |
|
|
|
option.tableData = option.tableData.concat(res.data) |
|
|
|
}).then((res:any) => { |
|
|
|
option.tableData= res.data.records; |
|
|
|
option.total = res.data.total; |
|
|
|
console.log(res) |
|
|
|
}) |
|
|
|
} |
|
|
@ -190,8 +192,8 @@ export default { |
|
|
|
findAllUser() |
|
|
|
} |
|
|
|
|
|
|
|
const changEnum =(e)=>{ |
|
|
|
option.current= e |
|
|
|
const changEnum = (e)=> { |
|
|
|
option.current = e; |
|
|
|
findAllUser() |
|
|
|
} |
|
|
|
|
|
|
@ -206,16 +208,12 @@ export default { |
|
|
|
if (option.form.userName == null || option.form.userName.trim() == ""){ |
|
|
|
errors.push("用户姓名"); |
|
|
|
} |
|
|
|
// if (option.form.userPhone == null || option.form.userPhone.trim() == ""){ |
|
|
|
// errors.push("手机号码"); |
|
|
|
// } |
|
|
|
if (errors.length > 0){ |
|
|
|
ElMessage.error({ |
|
|
|
message: format("{0}不能为空", errors.join(", ")), |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
return errors.length > 0; |
|
|
|
} |
|
|
|
|
|
|
@ -304,6 +302,7 @@ export default { |
|
|
|
height: 35px; |
|
|
|
line-height: 35px; |
|
|
|
font-size: 20px; |
|
|
|
text-indent: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
h1{ |
|
|
@ -390,3 +389,4 @@ export default { |
|
|
|
color: #498DF0; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|