Browse Source

commit

master
xuhuihui 3 years ago
parent
commit
182ef35333
  1. 9
      04.系统编码/Backend/src/main/java/com/userinformation/backend/service/UserService.java
  2. 3
      04.系统编码/Frontend/.idea/workspace.xml
  3. 36
      04.系统编码/Frontend/src/components/SystemManagement.vue
  4. 2
      04.系统编码/Frontend/src/uilts/axios.ts

9
04.系统编码/Backend/src/main/java/com/userinformation/backend/service/UserService.java

@ -13,6 +13,7 @@ import java.time.LocalDateTime;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
@Service @Service
public class UserService extends ServiceImpl<UserMapper, User> { public class UserService extends ServiceImpl<UserMapper, User> {
@ -23,7 +24,13 @@ public class UserService extends ServiceImpl<UserMapper, User> {
public UserPage findUserByUserName(String userName, Integer current, Integer size){ public UserPage findUserByUserName(String userName, Integer current, Integer size){
IPage<User> page = new Page<>(current, size); IPage<User> page = new Page<>(current, size);
IPage<User> users = baseMapper.selectPage(page, new QueryWrapper<User>().like("user_name",userName)); IPage<User> users;
if (Objects.nonNull(userName) && !"".equals(userName)){
users = baseMapper.selectPage(page, new QueryWrapper<User>().like("user_name",userName));
}else {
users = baseMapper.selectPage(page, new QueryWrapper<User>().orderByDesc("user_registration_date"));
}
UserPage userPage = new UserPage(); UserPage userPage = new UserPage();
userPage.setCurrent(users.getCurrent()); userPage.setCurrent(users.getCurrent());
userPage.setSize(users.getSize()); userPage.setSize(users.getSize());

3
04.系统编码/Frontend/.idea/workspace.xml

@ -4,6 +4,7 @@
<list default="true" id="4b7d7b72-f5b8-41e4-85d5-6267bdc12fc5" name="默认变更列表" comment=""> <list default="true" id="4b7d7b72-f5b8-41e4-85d5-6267bdc12fc5" name="默认变更列表" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/components/SystemManagement.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/SystemManagement.vue" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/components/SystemManagement.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/SystemManagement.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/uilts/axios.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/uilts/axios.ts" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -78,7 +79,7 @@
<workItem from="1638441956659" duration="5371000" /> <workItem from="1638441956659" duration="5371000" />
<workItem from="1638447904778" duration="262000" /> <workItem from="1638447904778" duration="262000" />
<workItem from="1638496246090" duration="1527000" /> <workItem from="1638496246090" duration="1527000" />
<workItem from="1638497917929" duration="616000" /> <workItem from="1638497917929" duration="1734000" />
</task> </task>
<task id="LOCAL-00001" summary="2021 12 01"> <task id="LOCAL-00001" summary="2021 12 01">
<created>1638357539757</created> <created>1638357539757</created>

36
04.系统编码/Frontend/src/components/SystemManagement.vue

@ -84,7 +84,7 @@
<script lang="ts"> <script lang="ts">
import { reactive, toRefs } from 'vue'; import {onMounted, reactive, toRefs} from 'vue';
import { post } from "../uilts/axios"; import { post } from "../uilts/axios";
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { format } from '../uilts/String'; import { format } from '../uilts/String';
@ -109,22 +109,22 @@ export default {
}, },
tableData:[] tableData:[]
}) })
const findAllUser= ()=>{
return post("user/findAllUser",{ onMounted(() => {
findAllUser();
})
const findAllUser = ()=>{
return post("user/findUserByUserName",{
userName: option.state1.trim(),
current:option.current, current:option.current,
size:option.size size:option.size
}).then((res:any)=>{ }).then((res:any)=>{
console.log(res,'1111') option.tableData= res.data.records;
// option.tableData=res.data option.total = res.data.total;
}) })
} }
post('user/findUserCount',{
}).then((res :any)=>{
option.total=res.data
findAllUser()
})
// //
const onAddClick = ()=> { const onAddClick = ()=> {
option.isDisabled=false option.isDisabled=false
@ -171,11 +171,13 @@ export default {
// //
const onSearch = ()=> { const onSearch = ()=> {
post("user/findUserByUserAccountNumber",{ post("user/findUserByUserName",{
current: option.current,
size: option.size,
userName: option.state1 userName: option.state1
}).then((res:any)=>{ }).then((res:any) => {
option.tableData=[] option.tableData= res.data.records;
option.tableData = option.tableData.concat(res.data) option.total = res.data.total;
console.log(res) console.log(res)
}) })
} }
@ -190,8 +192,8 @@ export default {
findAllUser() findAllUser()
} }
const changEnum =(e)=>{ const changEnum = (e)=> {
option.current= e option.current = e;
findAllUser() findAllUser()
} }

2
04.系统编码/Frontend/src/uilts/axios.ts

@ -5,7 +5,7 @@ import { ElLoading } from 'element-plus'
let loading = null; let loading = null;
const service = axios.create({ const service = axios.create({
baseURL:"http://112.124.40.88:8002", baseURL:"http://localhost:8001",
timeout: 500000 timeout: 500000
}) })

Loading…
Cancel
Save