|
|
@@ -17,6 +17,9 @@
|
|
|
<FormSearchGroup :searchList="searchList"
|
|
|
@searchChange="HandleUserSearchChange"></FormSearchGroup>
|
|
|
</div>
|
|
|
+ <div class="content_right">
|
|
|
+ <el-button type="primary" @click="handleSearch">查询</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -47,6 +50,8 @@ import Table from '@/baseComponents/Table.vue';
|
|
|
|
|
|
import TableRowStatus from '@/baseComponents/TableRowStatus.vue';
|
|
|
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
+
|
|
|
import {getUserInfoApi} from '@/api/userSearch'
|
|
|
import {searchList} from './formSearchGroup'
|
|
|
import {tableColumns} from './table'
|
|
|
@@ -74,12 +79,9 @@ const GetUserInfo = async ()=>{
|
|
|
totalNum.value = res.data.total
|
|
|
}
|
|
|
}
|
|
|
-// 处理搜索项变化
|
|
|
-const HandleUserSearchChange = async (params:any,key:any)=>{
|
|
|
- console.log('查询参数',params)
|
|
|
- console.log('查询key',key)
|
|
|
+// 处理搜索项变化(仅更新参数,不调用接口;接口由"查询"按钮触发)
|
|
|
+const HandleUserSearchChange = (params:any,key:any)=>{
|
|
|
searchParams.value = {...params}
|
|
|
- await GetUserInfo()
|
|
|
}
|
|
|
|
|
|
// 处理分页变化
|
|
|
@@ -91,6 +93,16 @@ const HandlePaginationChange = async (params:any)=>{
|
|
|
await GetUserInfo()
|
|
|
}
|
|
|
|
|
|
+// 处理查询
|
|
|
+const handleSearch = async ()=>{
|
|
|
+ const { userAccount, phone } = searchParams.value
|
|
|
+ if (!userAccount && !phone) {
|
|
|
+ ElMessage.warning('请输入账号或手机号')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ currentPage.value = 1
|
|
|
+ await GetUserInfo()
|
|
|
+}
|
|
|
|
|
|
// 用户身份类型状态转换
|
|
|
const IdentityTypeNumToName = (type:any)=>{
|
|
|
@@ -124,7 +136,7 @@ const userStatusMsg = ref([
|
|
|
])
|
|
|
onMounted(async ()=>{
|
|
|
// 初次加载不查询
|
|
|
- await GetUserInfo()
|
|
|
+ // await GetUserInfo()
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
@@ -132,5 +144,18 @@ onMounted(async ()=>{
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
+.page_search{
|
|
|
+ .search_content{
|
|
|
+ justify-content: flex-start;
|
|
|
+ gap: 20px;
|
|
|
+ .content_right{
|
|
|
+ :deep(.el-button){
|
|
|
+ width: 100px !important;
|
|
|
+ background-color: #2e64fa !important;
|
|
|
+ color: #fff !important;
|
|
|
+ border: none !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|