Browse Source

Merge remote-tracking branch 'remotes/origin/master'

master
xiaowuler 3 years ago
parent
commit
05babd05c6
  1. 4
      04.系统编码/Backend/src/main/java/com/userinformation/backend/controller/UserController.java
  2. 5
      04.系统编码/Backend/src/main/java/com/userinformation/backend/mapper/UserMapper.java
  3. 6
      04.系统编码/Backend/src/main/java/com/userinformation/backend/mapper/provider/UserMapperProvider.java
  4. 13
      04.系统编码/Backend/src/main/java/com/userinformation/backend/model/dao/UserPage.java
  5. 33
      04.系统编码/Backend/src/main/java/com/userinformation/backend/service/UserService.java
  6. 5
      04.系统编码/Frontend/.idea/workspace.xml
  7. 3734
      04.系统编码/Frontend/package-lock.json
  8. 6
      04.系统编码/Frontend/src/components/DecisionSupport.vue
  9. 152
      04.系统编码/Frontend/src/components/Login.vue
  10. 2
      04.系统编码/Frontend/src/components/MicrowaveRadiation.vue
  11. 0
      04.系统编码/Frontend/src/components/MicrowaveRadiation/BPInversion.vue
  12. 0
      04.系统编码/Frontend/src/components/MicrowaveRadiation/ConvectiveIndex.vue
  13. 36
      04.系统编码/Frontend/src/components/MicrowaveRadiation/Index.vue
  14. 0
      04.系统编码/Frontend/src/components/MicrowaveRadiation/TLogP.vue
  15. 24
      04.系统编码/Frontend/src/components/MicrowaveRadiation/Tabs.vue
  16. 0
      04.系统编码/Frontend/src/components/MicrowaveRadiation/VerticalProfile.vue
  17. 2
      04.系统编码/Frontend/src/components/RamanLidar.vue
  18. 50
      04.系统编码/Frontend/src/components/Shared/Header.vue
  19. 13
      04.系统编码/Frontend/src/components/SynergyEvaluation.vue
  20. 52
      04.系统编码/Frontend/src/components/SystemManagement.vue
  21. 18
      04.系统编码/Frontend/src/index.less
  22. 0
      04.系统编码/Frontend/src/uilts/Config.ts
  23. 0
      04.系统编码/Frontend/src/uilts/String.ts

4
04.系统编码/Backend/src/main/java/com/userinformation/backend/controller/UserController.java

@ -42,8 +42,8 @@ public class UserController {
}
@RequestMapping("findUserByUserName")
public RequestResult findUserByUserName(String userName){
return RequestResult.success(userService.findUserByUserName(userName));
public RequestResult findUserByUserName(String userName, Integer current, Integer size){
return RequestResult.success(userService.findUserByUserName(userName, current, size));
}
@RequestMapping("insertUser")

5
04.系统编码/Backend/src/main/java/com/userinformation/backend/mapper/UserMapper.java

@ -14,11 +14,8 @@ public interface UserMapper extends BaseMapper<User> {
@SelectProvider(type = UserMapperProvider.class, method = "userLogin")
User userLogin(String userAccountNumber, String userPassword);
@SelectProvider(type = UserMapperProvider.class, method = "findUserByUserAccountNumber")
List<User> findUserByUserAccountNumber(String userAccountNumber);
@SelectProvider(type = UserMapperProvider.class, method = "findUserByUserName")
User findUserByUserName(String userName);
List<User> findUserByUserName(String userName);
@SelectProvider(type = UserMapperProvider.class, method = "findUserCount")
Integer findUserCount();

6
04.系统编码/Backend/src/main/java/com/userinformation/backend/mapper/provider/UserMapperProvider.java

@ -6,12 +6,8 @@ public class UserMapperProvider {
return "select * from user where user_account_number = #{userAccountNumber} and user_password = #{userPassword}";
}
public String findUserByUserAccountNumber(String userAccountNumber){
return "select * from user where user_name like '%" + userAccountNumber.trim() + "%' limit 10";
}
public String findUserByUserName(String userName){
return "select * from user where user_name like CONCAT('%',#{userName},'%')";
return "select * from user where user_name like '%" + userName.trim() + "%'";
}
public String findUserCount(){

13
04.系统编码/Backend/src/main/java/com/userinformation/backend/model/dao/UserPage.java

@ -0,0 +1,13 @@
package com.userinformation.backend.model.dao;
import lombok.Data;
import java.util.List;
@Data
public class UserPage {
private Long current;
private Long size;
private Long total;
private List<User> records;
}

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

@ -6,27 +6,50 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.userinformation.backend.mapper.UserMapper;
import com.userinformation.backend.model.dao.User;
import com.userinformation.backend.model.dao.UserPage;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Service
public class UserService extends ServiceImpl<UserMapper, User> {
public User userLogin(String userAccountNumber, String userPassword){return baseMapper.userLogin(userAccountNumber, userPassword);}
public List<User> findUserByUserAccountNumber(String userAccountNumber){return baseMapper.findUserByUserAccountNumber(userAccountNumber);}
public User findUserByUserAccountNumber(String userAccountNumber){return baseMapper.selectById(userAccountNumber);}
public User findUserByUserName(String userName){
return baseMapper.findUserByUserName(userName);
public UserPage findUserByUserName(String userName, Integer current, Integer size){
IPage<User> page = new Page<>(current, size);
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.setCurrent(users.getCurrent());
userPage.setSize(users.getSize());
userPage.setTotal(users.getTotal());
userPage.setRecords(users.getRecords());
return userPage;
}
public Integer findUserCount(){ return baseMapper.findUserCount(); }
public List<User> findAllUserPage(Integer current, Integer size){
public UserPage findAllUserPage(Integer current, Integer size){
IPage<User> page = new Page<>(current, size);
return baseMapper.selectPage(page, new QueryWrapper<User>().orderByDesc("user_registration_date")).getRecords();
IPage<User> users = baseMapper.selectPage(page, new QueryWrapper<User>().orderByDesc("user_registration_date"));
UserPage userPage = new UserPage();
userPage.setCurrent(users.getCurrent());
userPage.setSize(users.getSize());
userPage.setTotal(users.getTotal());
userPage.setRecords(users.getRecords());
return userPage;
}
public int insertUser(User user){

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

@ -3,8 +3,8 @@
<component name="ChangeListManager">
<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$/src/components/Login.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/Login.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>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -77,6 +77,9 @@
<workItem from="1638433091413" duration="7649000" />
<workItem from="1638440893221" duration="943000" />
<workItem from="1638441956659" duration="5371000" />
<workItem from="1638447904778" duration="262000" />
<workItem from="1638496246090" duration="1527000" />
<workItem from="1638497917929" duration="1734000" />
</task>
<task id="LOCAL-00001" summary="2021 12 01">
<created>1638357539757</created>

3734
04.系统编码/Frontend/package-lock.json

File diff suppressed because it is too large

6
04.系统编码/Frontend/src/components/DecisionSupport.vue

@ -62,7 +62,7 @@
<script lang="ts">
import { onMounted, reactive, toRefs } from 'vue';
import * as Tiff from 'browser-tiff.js';
import { DecisionSupportConfig } from '../hooks/Config';
import { DecisionSupportConfig } from '../uilts/Config';
export default {
name: 'DecisionSupport',
@ -176,6 +176,10 @@
.el-image {
height: calc(~"100% - 0.4rem");
margin-top: 0.1rem;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
}
}

152
04.系统编码/Frontend/src/components/Login.vue

@ -1,22 +1,20 @@
<template>
<div class="box">
<div class="loginInput">
<div class="loginInput">
<div class="litterSemicircle"><img src="/images/logo.png"/> </div>
<div class="importInput">
<h1>南京生态环境评估决策平台</h1>
<el-input placeholder="请输入账户" type="text" class="input" v-model="inputName">
<template #prefix>
<template #prefix>
<el-icon><img src="/images/pen.png"></el-icon>
</template>
</template>
</el-input>
<el-input placeholder="请输入登录密码" type="password" v-model="inputPassword" class="input" >
<template #prefix>
<template #prefix>
<el-icon><img src="/images/lock.png"></el-icon>
</template>
</template>
</el-input>
<el-button type="primary" class="btn" @click="onLoginClick">登录</el-button>
<el-button type="primary" class="btn" @click="onLoginClick">登录</el-button>
</div>
</div>
</div>
</template>
@ -80,90 +78,80 @@ export default {
<style lang="less" scoped>
.loginInput {
width: 6.51rem;
height: 6.89rem;
background: #FFFFFF;
border: 1px solid #707070;
opacity: 1;
border-radius: 10px;
position: relative;
left: 50%;
top: 1.55rem;
transform: translateX(-50%);
.litterSemicircle {
width: 6.51rem;
border-radius: 10px;
position: absolute;
width: 2.39rem;
height: 2.39rem;
background: #FFFFFF;
border-radius: 50%;
opacity: 1;
display: flex;
justify-content: center;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.litterSemicircle {
width: 2.4rem;
height: 2.4rem;
margin: 0 auto;
position: relative;
z-index: 10;
background: #FFFFFF;
border-radius: 50%;
display: flex;
justify-content: center;
}
.importInput {
background: #FFFFFF;
border: 1px solid #707070;
opacity: 1;
border-radius: 0.10rem;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: flex-start;
.importInput {
margin-top: -1.2rem;
background: #FFFFFF;
border-radius: 0.10rem;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: flex-start;
border: 1px solid rgb(112, 112, 112);
h1 {
width: 3.93rem;
height: 0.4rem;
font-size: 0.30rem;
font-weight: bold;
line-height: 0.4rem;
color: #222222;
text-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
opacity: 1;
margin-top: 1.20rem;
margin-bottom: 0.52rem;
padding-left: 0.12rem;
}
h1 {
width: 3.93rem;
height: 0.4rem;
font-size: 0.30rem;
font-weight: bold;
line-height: 0.4rem;
color: #222222;
text-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
margin-top: 1.20rem;
margin-bottom: 0.52rem;
padding-left: 0.12rem;
}
:deep(.input) {
width: 4.96rem;
height: 0.69rem;
background: #FFFFFF;
border: 1px solid #BCBCBC;
margin-bottom: 0.7rem;
:deep(.input) {
width: 4.96rem;
height: 0.69rem;
background: #FFFFFF;
border: 1px solid #BCBCBC;
opacity: 1;
margin-bottom: 0.71rem;
.el-input__inner{
height: 100% !important;
position: relative;
border: none;
font-size: 0.15rem;
font-weight: 400;
line-height: 0.24rem;
color: #999999;
padding-left: 0.54rem;
}
}
.el-input__inner{
height: 100% !important;
position: relative;
border: none;
font-size: 0.15rem;
font-weight: 400;
line-height: 0.24rem;
color: #999999;
padding-left: 0.54rem;
}
img {
width: 0.18rem;
height: 0.18rem;
position: absolute;
top: -0.10rem;
left: 0.18rem;
}
}
}
img {
width: 0.18rem;
height: 0.1792rem;
position: absolute;
top: -0.10rem;
left: 0.18rem;
}
}
}
img {
img {
width: 1.5733rem;
height: 1.5715rem;
margin-top: .35rem;
}
}
.btn{
width: 4.96rem;
height: 0.69rem;
@ -172,7 +160,7 @@ export default {
color: #FFFFFF;
border: none;
font-size: 0.22rem;
margin-bottom: 1.27rem;
}
margin-bottom: 1.2rem;
}
</style>

2
04.系统编码/Frontend/src/components/MicrowaveRadiation.vue

@ -101,7 +101,7 @@
<script lang="ts">
import { onMounted, reactive, toRefs } from 'vue';
import moment from "moment";
import { MicrowaveRadiationConfig } from '../hooks/Config';
import { MicrowaveRadiationConfig } from '../uilts/Config';
export default {
name: 'MicrowaveRadiation',

0
04.系统编码/Frontend/src/components/MicrowaveRadiation/BPInversion.vue

0
04.系统编码/Frontend/src/components/MicrowaveRadiation/ConvectiveIndex.vue

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

@ -1,36 +0,0 @@
<template>
<Tabs />
<div class="main">
<div class="menu panel">
<h2>区域选择</h2>
</div>
<div class="container panel"></div>
</div>
</template>
<script lang="ts">
import { reactive, toRefs } from 'vue'
import Tabs from './Tabs.vue'
export default {
name: 'MicrowaveRadiation',
components: {Tabs},
setup() {
let options = reactive({
currentTab: '垂直廓线'
})
const onTabClick = (name) => {
options.currentTab = name;
}
return {
...toRefs(options),
onTabClick
}
}
}
</script>
<style lang="less" scoped>
</style>

0
04.系统编码/Frontend/src/components/MicrowaveRadiation/TLogP.vue

24
04.系统编码/Frontend/src/components/MicrowaveRadiation/Tabs.vue

@ -1,24 +0,0 @@
<template>
<div class="tabs">
<router-link class="tab-item" to="/MicrowaveRadiation/VerticalProfile">垂直廓线</router-link>
<router-link class="tab-item" to="/MicrowaveRadiation/ConvectiveIndex">对流指数对流指数对流指数</router-link>
<router-link class="tab-item" to="/MicrowaveRadiation/TLogP">T-logP图</router-link>
<router-link class="tab-item" to="/MicrowaveRadiation/BPInversion">BP反演产品</router-link>
</div>
<router-view></router-view>
</template>
<script lang="ts">
import { reactive, toRefs, onMounted} from 'vue'
export default {
name: "app",
setup() {
return {
}
}
}
</script>
<style lang="less" scoped>
</style>

0
04.系统编码/Frontend/src/components/MicrowaveRadiation/VerticalProfile.vue

2
04.系统编码/Frontend/src/components/RamanLidar.vue

@ -82,7 +82,7 @@
<script lang="ts">
import { onMounted, reactive, toRefs } from 'vue';
import moment from "moment";
import { RamanLidarConfig } from '../hooks/Config';
import { RamanLidarConfig } from '../uilts/Config';
export default {
name: 'RamanLidar',

50
04.系统编码/Frontend/src/components/Shared/Header.vue

@ -5,37 +5,30 @@
南京生态环境评估决策平台
</div>
<div class="nav">
<div class="nav-item" @click="onNavClick('MicrowaveRadiation')" :class="{'active': currentPath === 'MicrowaveRadiation'}">微波辐射计</div>
<div class="nav-item" @click="onNavClick('RamanLidar')" :class="{'active': currentPath === 'RamanLidar'}">拉曼激光雷达</div>
<div class="nav-item" @click="onNavClick('SynergyEvaluation')" :class="{'active': currentPath === 'SynergyEvaluation'}">生态环境效应评估</div>
<div class="nav-item" @click="onNavClick('DecisionSupport')" :class="{'active': currentPath === 'DecisionSupport'}">决策支持</div>
<div class="nav-item" @click="onNavClick('SystemManagement')" :class="{'active': currentPath === 'SystemManagement'}">系统管理</div>
<div class="nav-item">
<router-link to="/MicrowaveRadiation">微波辐射计</router-link>
</div>
<div class="nav-item">
<router-link to="/RamanLidar">拉曼激光雷达</router-link>
</div>
<div class="nav-item">
<router-link to="/SynergyEvaluation">生态环境效应评估</router-link>
</div>
<div class="nav-item">
<router-link to="/DecisionSupport">决策支持</router-link>
</div>
<div class="nav-item">
<router-link to="/SystemManagement">系统管理</router-link>
</div>
</div>
</div>
</template>
<script lang="ts">
import { reactive, onMounted, toRefs } from "vue";
import { useRouter } from 'vue-router';
export default {
name: 'Header',
setup() {
const router = useRouter();
let options = reactive({
currentPath: 'MicrowaveRadiation'
})
const onNavClick = (path) => {
options.currentPath = path;
router.push({path: path});
}
return {
...toRefs(options),
onNavClick
}
return {}
}
}
</script>
@ -72,14 +65,19 @@
text-align: center;
cursor: pointer;
a {
height: 100%;
color: #ffffff;
}
&:nth-of-type(3) {
width: 2.3rem;
&.active {
.active {
background: url("/images/nav-bg-big.png") no-repeat center/cover;
}
}
&.active {
color: #ffffff;
.active {
color: #23FBFF;
background: url("/images/nav-bg.png") no-repeat center/cover;
}
}

13
04.系统编码/Frontend/src/components/SynergyEvaluation.vue

@ -128,9 +128,9 @@
<script lang="ts">
import { onMounted, reactive, toRefs } from 'vue';
import { format } from '../hooks/String';
import { format } from '../uilts/String';
import * as Tiff from 'browser-tiff.js';
import { SynergyEvaluationConfig } from '../hooks/Config';
import { SynergyEvaluationConfig } from '../uilts/Config';
export default {
name: 'SynergyEvaluation',
@ -324,6 +324,14 @@
.el-image {
height: calc(~"100% - 0.4rem");
margin-top: 0.1rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #ffffff;
.image-slot {
margin-top: 0;
}
}
}
}
@ -342,6 +350,7 @@
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
}
&:nth-of-type(6n) {

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

@ -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,10 +84,10 @@
<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 '../hooks/String';
import { format } from '../uilts/String';
export default {
name: 'SystemManagement',
setup() {
@ -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;
}
@ -280,8 +278,8 @@ export default {
<style lang="less" scoped>
.system-container {
width: calc(~"100% - 40px");
margin: 0 20px;
width: 100%;
margin-left: 0;
.pagination{
margin-top: 10px;
@ -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>

18
04.系统编码/Frontend/src/index.less

@ -401,6 +401,10 @@ img {
.el-image {
height: 90%;
margin: 0 auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.el-image__inner {
width: auto;
@ -412,19 +416,12 @@ img {
.el-image-viewer__mask {
opacity: 0.8;
}
.el-image-viewer__canvas {
img {
width: 75%;
}
}
}
}
.image-slot {
width: 1.5rem;
height: 1.5rem;
margin: 1rem auto 0 auto;
text-align: center;
display: flex;
align-items: center;
@ -437,6 +434,13 @@ img {
}
}
.el-image-viewer__canvas {
img {
width: auto;
height: 70%;
}
}
.image-tip {
text-align: center;
margin-top: 10px;

0
04.系统编码/Frontend/src/hooks/Config.ts → 04.系统编码/Frontend/src/uilts/Config.ts

0
04.系统编码/Frontend/src/hooks/String.ts → 04.系统编码/Frontend/src/uilts/String.ts

Loading…
Cancel
Save