Compare commits
No commits in common. 'master' and 'yws_brach' have entirely different histories.
@ -1,23 +1,38 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Copyright 2007-present the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import java.net.*;
|
||||
import java.io.*;
|
||||
import java.nio.channels.*;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenWrapperDownloader {
|
||||
|
||||
private static final String WRAPPER_VERSION = "0.5.6";
|
||||
/**
|
||||
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
|
||||
*/
|
||||
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
|
||||
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
|
||||
|
||||
/**
|
||||
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
|
||||
* use instead of the default one.
|
||||
*/
|
||||
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
|
||||
".mvn/wrapper/maven-wrapper.properties";
|
||||
|
||||
/**
|
||||
* Path where the maven-wrapper.jar will be saved to.
|
||||
*/
|
||||
private static final String MAVEN_WRAPPER_JAR_PATH =
|
||||
".mvn/wrapper/maven-wrapper.jar";
|
||||
|
||||
/**
|
||||
* Name of the property which should be used to override the default download url for the wrapper.
|
||||
*/
|
||||
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
|
||||
|
||||
public static void main(String args[]) {
|
||||
System.out.println("- Downloader started");
|
||||
File baseDirectory = new File(args[0]);
|
||||
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
|
||||
|
||||
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
||||
// wrapperUrl parameter.
|
||||
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
|
||||
String url = DEFAULT_DOWNLOAD_URL;
|
||||
if (mavenWrapperPropertyFile.exists()) {
|
||||
FileInputStream mavenWrapperPropertyFileInputStream = null;
|
||||
try {
|
||||
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
|
||||
Properties mavenWrapperProperties = new Properties();
|
||||
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
|
||||
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
|
||||
} catch (IOException e) {
|
||||
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
|
||||
} finally {
|
||||
try {
|
||||
if (mavenWrapperPropertyFileInputStream != null) {
|
||||
mavenWrapperPropertyFileInputStream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Ignore ...
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("- Downloading from: " + url);
|
||||
|
||||
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
|
||||
if (!outputFile.getParentFile().exists()) {
|
||||
if (!outputFile.getParentFile().mkdirs()) {
|
||||
System.out.println(
|
||||
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
|
||||
}
|
||||
}
|
||||
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
|
||||
try {
|
||||
downloadFileFromURL(url, outputFile);
|
||||
System.out.println("Done");
|
||||
System.exit(0);
|
||||
} catch (Throwable e) {
|
||||
System.out.println("- Error downloading");
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
|
||||
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
|
||||
String username = System.getenv("MVNW_USERNAME");
|
||||
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
|
||||
Authenticator.setDefault(new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(username, password);
|
||||
}
|
||||
});
|
||||
}
|
||||
URL website = new URL(urlString);
|
||||
ReadableByteChannel rbc;
|
||||
rbc = Channels.newChannel(website.openStream());
|
||||
FileOutputStream fos = new FileOutputStream(destination);
|
||||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
|
||||
fos.close();
|
||||
rbc.close();
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
|
||||
@ -1 +0,0 @@
|
||||
Subproject commit df30c6ee517297783b8f1e46eba280b0300862b7
|
||||
@ -1,19 +1,2 @@
|
||||
# vuetest
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
# Epidemic
|
||||
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,36 +0,0 @@
|
||||
{
|
||||
"name": "COVID-vue",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.6.5",
|
||||
"echarts": "^5.0.2",
|
||||
"element-ui": "^2.4.5",
|
||||
"vue": "^2.6.11",
|
||||
"vue-router": "^3.2.0",
|
||||
"vuex": "^3.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-router": "~4.5.0",
|
||||
"@vue/cli-plugin-vuex": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"axios": "^0.18.0",
|
||||
"cache-loader": "^4.1.0",
|
||||
"vue-cli-plugin-axios": "0.0.4",
|
||||
"vue-cli-plugin-element": "^1.0.1",
|
||||
"vue-loader": "^15.11.1",
|
||||
"vue-template-compiler": "^2.6.11",
|
||||
"webpack": "^4.47.0",
|
||||
"webpack-cli": "^4.10.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.liu</groupId>
|
||||
<artifactId>covid</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>covid</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<spring-boot.version>2.2.2.RELEASE</spring-boot.version>
|
||||
</properties>
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.3.7.RELEASE</version>
|
||||
<configuration>
|
||||
<mainClass>com.liu.covid.CovidApplication</mainClass>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>repackage</id>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
Before Width: | Height: | Size: 4.2 KiB |
@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,17 @@
|
||||
create table department
|
||||
(
|
||||
id int not null
|
||||
primary key,
|
||||
name varchar(20) null,
|
||||
charge varchar(20) null
|
||||
);
|
||||
|
||||
create index name
|
||||
on department (name);
|
||||
|
||||
INSERT INTO covid.department (id, name, charge) VALUES (1, '财务部', '王刚');
|
||||
INSERT INTO covid.department (id, name, charge) VALUES (2, '人力资源部', '李师');
|
||||
INSERT INTO covid.department (id, name, charge) VALUES (3, '后勤部', '王二霞');
|
||||
INSERT INTO covid.department (id, name, charge) VALUES (4, '客服部', '刘晓华');
|
||||
INSERT INTO covid.department (id, name, charge) VALUES (5, '研发部', '李海红');
|
||||
INSERT INTO covid.department (id, name, charge) VALUES (6, '技术部', '刘苏哈');
|
||||
@ -0,0 +1,28 @@
|
||||
create table emp_health
|
||||
(
|
||||
id int(10) auto_increment
|
||||
primary key,
|
||||
name varchar(20) null,
|
||||
sex int(1) null,
|
||||
phonenum bigint null,
|
||||
temp float(4, 1) null,
|
||||
risk varchar(30) null,
|
||||
health varchar(30) null,
|
||||
content varchar(255) null,
|
||||
createTime datetime null,
|
||||
depart varchar(30) null,
|
||||
constraint de
|
||||
foreign key (depart) references department (name)
|
||||
);
|
||||
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (2, '刘先生', 1, 15143355464, 36.5, '否', '正常', '', '2021-03-31 14:03:52', '后勤部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (3, '吴雷师', 0, 15151549751, 37, '否', '正常', '无', '2021-03-13 20:16:30', '客服部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (4, '刘腾键', 1, 13415135795, 36.5, '否', '正常', '', '2021-03-13 19:54:40', '客服部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (5, '刘腾键', 1, 13415135795, 36.5, '否', '感冒', '', '2021-03-13 19:54:40', '研发部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (6, '刘胜虎', 1, 123414234123, 39, '否', '低烧', '', '2021-04-05 22:41:39', '技术部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (7, '王继红', 0, 13513534534, 38, '否', '与新冠肺炎有关的其他症状,如流涕,咽痛,肌痛,腹泻等', '', '2021-04-06 13:39:38', '客服部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (8, '刘小姐', 1, 231123123, 23, '是', '呼吸困难', '', '2021-04-06 15:34:42', '后勤部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (9, '111', 1, 111111111, 11, '111', '正常', '11', '2021-04-10 16:03:01', '研发部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (10, '刘渲', 1, 13514124567, 37, '否', '正常', '', '2021-04-15 14:29:15', '后勤部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (11, '王佳', 0, 13512314534, 37.5, '否', '正常', '', '2021-04-15 14:42:55', '人力资源部');
|
||||
INSERT INTO covid.emp_health (id, name, sex, phonenum, temp, risk, health, content, createTime, depart) VALUES (12, '刘腾键', 1, 13512365456, 36.5, '否', '乏力', '', '2021-04-15 14:46:49', '技术部');
|
||||
@ -0,0 +1,28 @@
|
||||
create table emp_iden
|
||||
(
|
||||
id bigint auto_increment
|
||||
primary key,
|
||||
name varchar(10) null,
|
||||
sex int(2) null,
|
||||
idcard varchar(20) null,
|
||||
idate date null,
|
||||
place varchar(100) null,
|
||||
phonenum bigint(100) null,
|
||||
register datetime null,
|
||||
status varchar(10) null,
|
||||
depart varchar(20) null,
|
||||
constraint emp_iden_ibfk_1
|
||||
foreign key (depart) references department (name)
|
||||
on update cascade on delete cascade
|
||||
);
|
||||
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (1, '李先生', 1, '440524196002152100', '2020-11-13', '广州市第一附属医院', 13457896457, '2020-11-14 15:31:44', '确诊', '财务部');
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (2, '蔡二思', 1, '440634199004050312', '2021-03-22', '深圳市福田区第一医院', null, '2021-03-03 11:33:31', '确诊', '财务部');
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (3, '王金枝', 0, null, '2021-02-01', '深圳市福田区第一医院', null, null, '疑似', '后勤部');
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (4, '季王红', 0, '440578199505150547', '2021-03-02', '佛山市三水人民医院', 13411234457, null, '治愈', null);
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (5, '李王思', 1, '440578199902150351', '2021-01-07', '佛山市三水人民医院', 13453456785, '2021-04-06 16:05:11', '疑似', '人力资源部');
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (6, '王二会', 1, '440582198005040800', '2021-02-19', '深圳市中心医院', 13457891231, '2020-04-09 16:22:26', '疑似', '后勤部');
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (7, '于雪师', 1, '440578198905213551', '2020-12-12', '深圳市中心医院', 1581456785, '2021-04-06 16:05:11', '死亡', '人力资源部');
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (10, '阿斯顿', 0, null, '2021-04-01', '汕头市李嘉诚医院', 13531342457, '2021-04-02 14:49:15', '治愈', '财务部');
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (11, '士大夫', 0, '34124', '2021-03-31', '广州市暨南大学第一附属医院', 13411213257, '2021-04-02 14:49:32', '死亡', '客服部');
|
||||
INSERT INTO covid.emp_iden (id, name, sex, idcard, idate, place, phonenum, register, status, depart) VALUES (12, '吴开师', 1, '440578199807050321', '2021-03-18', '佛山市三水人民医院', 13412823457, '2021-04-06 16:05:11', '疑似', '人力资源部');
|
||||
@ -0,0 +1,24 @@
|
||||
create table emp_is
|
||||
(
|
||||
id bigint auto_increment
|
||||
primary key,
|
||||
name varchar(20) null,
|
||||
sex int(3) null,
|
||||
phone bigint null,
|
||||
temp float(10, 2) null,
|
||||
type varchar(10) null,
|
||||
place varchar(100) null,
|
||||
begin datetime null,
|
||||
end datetime null,
|
||||
leaved varchar(100) null,
|
||||
arrived varchar(100) null,
|
||||
content varchar(255) null,
|
||||
depart varchar(20) null,
|
||||
constraint dep
|
||||
foreign key (depart) references department (name)
|
||||
);
|
||||
|
||||
INSERT INTO covid.emp_is (id, name, sex, phone, temp, type, place, begin, end, leaved, arrived, content, depart) VALUES (1, '黎香湖', 0, 12341231231, 35, '酒店隔离', '广州市广州南站如家酒店', '2021-04-06 00:00:00', '2021-04-20 00:00:00', '广东汕头', '广东东莞', null, '人力资源部');
|
||||
INSERT INTO covid.emp_is (id, name, sex, phone, temp, type, place, begin, end, leaved, arrived, content, depart) VALUES (2, '王老二', 1, 13545479653, 38.5, '酒店集中隔离', '广州市火车站快捷酒店', '2021-04-14 00:00:00', '2021-04-28 00:00:00', '广东汕头', '广东东莞', '', '后勤部');
|
||||
INSERT INTO covid.emp_is (id, name, sex, phone, temp, type, place, begin, end, leaved, arrived, content, depart) VALUES (3, '蔡司', 1, 13452342356, 36.6, '酒店集中隔离', '深圳市宝安区平和小区', '2020-11-23 00:00:00', '2020-12-07 00:00:00', '重庆市', '湖南长沙', '', '研发部');
|
||||
INSERT INTO covid.emp_is (id, name, sex, phone, temp, type, place, begin, end, leaved, arrived, content, depart) VALUES (5, '蔡司', 1, 13452342356, 35.6, '居家隔离', '深圳市宝安区平和小区', '2021-01-09 00:00:00', '2021-01-23 00:00:00', '重庆市', '湖南长沙', '', '研发部');
|
||||
@ -0,0 +1,19 @@
|
||||
create table material_manage
|
||||
(
|
||||
id int(20) auto_increment
|
||||
primary key,
|
||||
name varchar(255) null,
|
||||
count int null,
|
||||
type varchar(255) null,
|
||||
isImp int null,
|
||||
charge varchar(255) null,
|
||||
cnum bigint null,
|
||||
updateTime datetime null
|
||||
);
|
||||
|
||||
INSERT INTO covid.material_manage (id, name, count, type, isImp, charge, cnum, updateTime) VALUES (113, 'KN94口罩', 150, '个', 1, '孙迪', 13415135777, '2021-03-31 13:54:36');
|
||||
INSERT INTO covid.material_manage (id, name, count, type, isImp, charge, cnum, updateTime) VALUES (114, 'N95口罩', 220, '个', 1, '孙迪', 13415135777, '2021-04-06 16:14:45');
|
||||
INSERT INTO covid.material_manage (id, name, count, type, isImp, charge, cnum, updateTime) VALUES (123, '防护服', 30, '个', 1, '王旭', 15148796568, '2021-04-22 14:21:56');
|
||||
INSERT INTO covid.material_manage (id, name, count, type, isImp, charge, cnum, updateTime) VALUES (125, '酒精消毒棉片', 200, '盒', 1, '李建', 13431357964, '2021-03-31 13:54:06');
|
||||
INSERT INTO covid.material_manage (id, name, count, type, isImp, charge, cnum, updateTime) VALUES (126, '抽纸纸巾', 20, '箱', 0, '李玉', 13534654675, '2021-04-22 19:29:30');
|
||||
INSERT INTO covid.material_manage (id, name, count, type, isImp, charge, cnum, updateTime) VALUES (133, '防护眼罩', 30, '个', 1, '杨迪', 123123123123, '2021-04-23 17:00:52');
|
||||
@ -0,0 +1,12 @@
|
||||
create table user
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
username varchar(20) null,
|
||||
password varchar(255) null,
|
||||
depart varchar(20) null
|
||||
);
|
||||
|
||||
INSERT INTO covid.user (id, username, password, depart) VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', '人力资源部');
|
||||
INSERT INTO covid.user (id, username, password, depart) VALUES (3, 'root', 'e10adc3949ba59abbe56e057f20f883e', '后勤部');
|
||||
INSERT INTO covid.user (id, username, password, depart) VALUES (12, '994091246', 'd7d7b53081e1e3ecbd28c30c34b4bcd3', '技术部');
|
||||
@ -1,24 +0,0 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.el-header {
|
||||
background-color: #B3C0D1;
|
||||
color: #333;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.el-aside {
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
};
|
||||
</script>
|
||||
|
Before Width: | Height: | Size: 6.7 KiB |
@ -1,59 +0,0 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
||||
@ -1,15 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import './plugins/axios'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import './plugins/element.js'
|
||||
import * as echarts from 'echarts'
|
||||
Vue.prototype.$echarts = echarts
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
@ -1,14 +1,14 @@
|
||||
package com.liu.covid;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
@MapperScan("com.liu.covid.mapper")
|
||||
public class CovidApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CovidApplication.class, args);
|
||||
}
|
||||
}
|
||||
package com.liu.covid;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
@MapperScan("com.liu.covid.mapper")
|
||||
public class CovidApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CovidApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
package com.liu.covid.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Department {
|
||||
@TableId
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String charge;
|
||||
}
|
||||
package com.liu.covid.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Department {
|
||||
@TableId
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String charge;
|
||||
}
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
package com.liu.covid.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class User {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String username;
|
||||
private String password;
|
||||
private String depart;
|
||||
|
||||
}
|
||||
package com.liu.covid.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class User {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String username;
|
||||
private String password;
|
||||
private String depart;
|
||||
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.Department;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface DepartMapper extends BaseMapper<Department> {
|
||||
}
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.Department;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface DepartMapper extends BaseMapper<Department> {
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpIden;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpIdenMapper extends BaseMapper<EmpIden> {
|
||||
}
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpIden;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpIdenMapper extends BaseMapper<EmpIden> {
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpIs;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpIsMapper extends BaseMapper<EmpIs> {
|
||||
}
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpIs;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpIsMapper extends BaseMapper<EmpIs> {
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpHealth;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpMapper extends BaseMapper<EmpHealth> {
|
||||
}
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpHealth;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpMapper extends BaseMapper<EmpHealth> {
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.MaterialManage;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface MaterialMapper extends BaseMapper<MaterialManage> {
|
||||
}
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.MaterialManage;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface MaterialMapper extends BaseMapper<MaterialManage> {
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.User;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
}
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.User;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
}
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
package com.liu.covid.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.liu.covid.entity.EmpIden;
|
||||
import com.liu.covid.vo.LineVO;
|
||||
import com.liu.covid.vo.PieVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ChartService extends IService<EmpIden> {
|
||||
public LineVO lineVOList();
|
||||
public List<PieVo> pieVOMap();
|
||||
}
|
||||
package com.liu.covid.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.liu.covid.entity.EmpIden;
|
||||
import com.liu.covid.vo.LineVO;
|
||||
import com.liu.covid.vo.PieVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ChartService extends IService<EmpIden> {
|
||||
public LineVO lineVOList();
|
||||
public List<PieVo> pieVOMap();
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package com.liu.covid.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.liu.covid.entity.Department;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DepartService extends IService<Department> {
|
||||
public List<String> getAll();
|
||||
}
|
||||
package com.liu.covid.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.liu.covid.entity.Department;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DepartService extends IService<Department> {
|
||||
public List<String> getAll();
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.liu.covid.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.liu.covid.entity.User;
|
||||
|
||||
public interface UserService extends IService<User> {
|
||||
public String login(User user);
|
||||
public String register(User user);
|
||||
}
|
||||
package com.liu.covid.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.liu.covid.entity.User;
|
||||
|
||||
public interface UserService extends IService<User> {
|
||||
public String login(User user);
|
||||
public String register(User user);
|
||||
}
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
package com.liu.covid.util;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class test{
|
||||
public static void main(String[] args) throws SQLException {
|
||||
JDBCUtils jdbcConnection=new JDBCUtils();
|
||||
Connection connection=jdbcConnection.getConnection();
|
||||
if(connection!=null){
|
||||
System.out.println("数据库连接成功");
|
||||
}else {
|
||||
System.out.println("数据库连接失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
package com.liu.covid.util;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class test{
|
||||
public static void main(String[] args) throws SQLException {
|
||||
JDBCUtils jdbcConnection=new JDBCUtils();
|
||||
Connection connection=jdbcConnection.getConnection();
|
||||
if(connection!=null){
|
||||
System.out.println("数据库连接成功");
|
||||
}else {
|
||||
System.out.println("数据库连接失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package com.liu.covid.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class LineVO {
|
||||
private List<String> month;
|
||||
private Map<String,List> status;
|
||||
}
|
||||
package com.liu.covid.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class LineVO {
|
||||
private List<String> month;
|
||||
private Map<String,List> status;
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package com.liu.covid.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PieVo {
|
||||
private String name;
|
||||
private Integer value;
|
||||
}
|
||||
package com.liu.covid.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PieVo {
|
||||
private String name;
|
||||
private Integer value;
|
||||
}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
package org.example;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
||||
package org.example;
|
||||
|
||||
/**
|
||||
* Hello world!
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@ -1,15 +1,15 @@
|
||||
# 应用名称
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/covid?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
server:
|
||||
port: 8080
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
type-enums-package:
|
||||
# 应用名称
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/covid?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
server:
|
||||
port: 8080
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
type-enums-package:
|
||||
com.liu.covid.entity
|
||||
@ -1,61 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
import Vue from 'vue';
|
||||
import axios from "axios";
|
||||
|
||||
// Full config: https://github.com/axios/axios#request-config
|
||||
// axios.defaults.baseURL = process.env.baseURL || process.env.apiUrl || '';
|
||||
// axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
||||
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||
|
||||
let config = {
|
||||
// baseURL: process.env.baseURL || process.env.apiUrl || ""
|
||||
// timeout: 60 * 1000, // Timeout
|
||||
// withCredentials: true, // Check cross-site Access-Control
|
||||
};
|
||||
|
||||
const _axios = axios.create(config);
|
||||
|
||||
_axios.interceptors.request.use(
|
||||
function(config) {
|
||||
// Do something before request is sent
|
||||
return config;
|
||||
},
|
||||
function(error) {
|
||||
// Do something with request error
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
// Add a response interceptor
|
||||
_axios.interceptors.response.use(
|
||||
function(response) {
|
||||
// Do something with response data
|
||||
return response;
|
||||
},
|
||||
function(error) {
|
||||
// Do something with response error
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
Plugin.install = function(Vue, options) {
|
||||
Vue.axios = _axios;
|
||||
window.axios = _axios;
|
||||
Object.defineProperties(Vue.prototype, {
|
||||
axios: {
|
||||
get() {
|
||||
return _axios;
|
||||
}
|
||||
},
|
||||
$axios: {
|
||||
get() {
|
||||
return _axios;
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Vue.use(Plugin)
|
||||
|
||||
export default Plugin;
|
||||
@ -1,5 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import Element from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
|
||||
Vue.use(Element)
|
||||
@ -1,85 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Index from '../views/Index.vue'
|
||||
import Login from '../views/login.vue'
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
//配置默认的路径,默认显示登录页
|
||||
{ path: '/', meta:false, component: () => import('../views/login.vue')},
|
||||
|
||||
{
|
||||
path: "/Index",
|
||||
name:"日常防控管理",
|
||||
component:Index,
|
||||
meta:true,
|
||||
children:[
|
||||
{
|
||||
path:"/RecordManage",
|
||||
name:"打卡记录",
|
||||
component:() => import('../views/RecordManage.vue')
|
||||
},
|
||||
{
|
||||
path:"/AddRecord",
|
||||
name:"健康打卡申报",
|
||||
component:()=>import('../views/AddRecord.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/Index",
|
||||
name:"异常人员管理",
|
||||
component:Index,
|
||||
meta:true,
|
||||
children:[
|
||||
{
|
||||
path:"/IdenManage",
|
||||
name:"疑似/确诊人员登记",
|
||||
component:() => import(/* webpackChunkName: "BlogManage" */ '../views/IdenManage.vue')
|
||||
//const Foo = () => import(/* webpackChunkName: "group-foo" */ './Foo.vue')
|
||||
},
|
||||
{
|
||||
path:"/IsManage",
|
||||
name:"隔离人员登记",
|
||||
component:()=>import(/* webpackChunkName:"AddBlog" */ '../views/IsManage.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/Index",
|
||||
name:"防疫物资管理",
|
||||
component:Index,
|
||||
meta:true,
|
||||
children:[{
|
||||
path:"/MaterialManage",
|
||||
name:"防疫物资查看",
|
||||
component:()=>import(/* webpackChunkName:"MaterialManage" */ '../views/MaterialManage.vue')
|
||||
},{
|
||||
path:"/AddMaterial",
|
||||
name:"新增防疫物资",
|
||||
component:()=>import(/* webpackChunkName:"AddMaterial" */ '../views/AddMaterial.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/Index",
|
||||
name:"疫情概况",
|
||||
component:Index,
|
||||
meta:true,
|
||||
children:[{
|
||||
path:"/EChart",
|
||||
name:"防疫数据可视化",
|
||||
component:()=>import(/* webpackChunkName:"MaterialManage" */ '../views/EChart.vue')
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
||||
@ -1,15 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
modules: {
|
||||
}
|
||||
})
|
||||
@ -1,13 +1,13 @@
|
||||
package com.liu.covid;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class CovidApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
package com.liu.covid;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class CovidApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,30 +1,30 @@
|
||||
package com.liu.covid.controller;
|
||||
|
||||
import com.liu.covid.entity.EmpHealth;
|
||||
import com.liu.covid.entity.User;
|
||||
import com.liu.covid.mapper.EmpMapper;
|
||||
import com.liu.covid.mapper.UserMapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.util.DigestUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@SpringBootTest
|
||||
class LoginServiceTest {
|
||||
@Autowired
|
||||
private UserMapper mapper;
|
||||
@Test
|
||||
void register(){
|
||||
User user=new User();
|
||||
String pw=DigestUtils.md5DigestAsHex("99409".getBytes());
|
||||
user.setUsername("994091246");
|
||||
user.setPassword(pw);
|
||||
int message= mapper.insert(user);
|
||||
System.out.println(message);
|
||||
}
|
||||
package com.liu.covid.controller;
|
||||
|
||||
import com.liu.covid.entity.EmpHealth;
|
||||
import com.liu.covid.entity.User;
|
||||
import com.liu.covid.mapper.EmpMapper;
|
||||
import com.liu.covid.mapper.UserMapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.util.DigestUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@SpringBootTest
|
||||
class LoginServiceTest {
|
||||
@Autowired
|
||||
private UserMapper mapper;
|
||||
@Test
|
||||
void register(){
|
||||
User user=new User();
|
||||
String pw=DigestUtils.md5DigestAsHex("99409".getBytes());
|
||||
user.setUsername("994091246");
|
||||
user.setPassword(pw);
|
||||
int message= mapper.insert(user);
|
||||
System.out.println(message);
|
||||
}
|
||||
}
|
||||
@ -1,60 +1,60 @@
|
||||
package com.liu.covid.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.liu.covid.entity.EmpIden;
|
||||
import com.liu.covid.entity.EmpIs;
|
||||
|
||||
import com.liu.covid.mapper.EmpIdenMapper;
|
||||
import com.liu.covid.mapper.EmpIsMapper;
|
||||
import com.liu.covid.vo.LineVO;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.sql.Wrapper;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@SpringBootTest
|
||||
class MaterialControllerTest {
|
||||
@Autowired
|
||||
private EmpIdenMapper mapper;
|
||||
|
||||
@Test
|
||||
void find() {
|
||||
LineVO lineVO=new LineVO();
|
||||
Date date=new Date();
|
||||
Calendar cal = Calendar.getInstance();
|
||||
List<String> month=new ArrayList<>();
|
||||
Map<String,Integer> status=new HashMap<>();
|
||||
Map<String,Map> all=new HashMap<>();
|
||||
String type[]={"确诊","疑似","治愈","死亡"};
|
||||
|
||||
for (int i=0;i<7;i++) {
|
||||
cal.setTime(date);
|
||||
cal.set(Calendar.MONTH, cal.get(Calendar.MONTH) - i);
|
||||
SimpleDateFormat ft=new SimpleDateFormat("yyyy-MM");
|
||||
String mon=ft.format(cal.getTime());
|
||||
month.add(mon);
|
||||
}
|
||||
//设置折线图月份
|
||||
lineVO.setMonth(month);
|
||||
// 设置 类型-数量 键值对
|
||||
for (String t : type) {
|
||||
int j=0;
|
||||
while (j<7){
|
||||
QueryWrapper<EmpIden> userQueryWrapper = Wrappers.query();
|
||||
userQueryWrapper.like("status", t).likeRight("idate", month.get(j));
|
||||
Integer count = mapper.selectCount(userQueryWrapper);
|
||||
status.put(month.get(j++),count);
|
||||
userQueryWrapper.clear();
|
||||
}
|
||||
all.put(t,status);
|
||||
|
||||
}
|
||||
System.out.println(all.toString());
|
||||
}
|
||||
|
||||
package com.liu.covid.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.liu.covid.entity.EmpIden;
|
||||
import com.liu.covid.entity.EmpIs;
|
||||
|
||||
import com.liu.covid.mapper.EmpIdenMapper;
|
||||
import com.liu.covid.mapper.EmpIsMapper;
|
||||
import com.liu.covid.vo.LineVO;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.sql.Wrapper;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
@SpringBootTest
|
||||
class MaterialControllerTest {
|
||||
@Autowired
|
||||
private EmpIdenMapper mapper;
|
||||
|
||||
@Test
|
||||
void find() {
|
||||
LineVO lineVO=new LineVO();
|
||||
Date date=new Date();
|
||||
Calendar cal = Calendar.getInstance();
|
||||
List<String> month=new ArrayList<>();
|
||||
Map<String,Integer> status=new HashMap<>();
|
||||
Map<String,Map> all=new HashMap<>();
|
||||
String type[]={"确诊","疑似","治愈","死亡"};
|
||||
|
||||
for (int i=0;i<7;i++) {
|
||||
cal.setTime(date);
|
||||
cal.set(Calendar.MONTH, cal.get(Calendar.MONTH) - i);
|
||||
SimpleDateFormat ft=new SimpleDateFormat("yyyy-MM");
|
||||
String mon=ft.format(cal.getTime());
|
||||
month.add(mon);
|
||||
}
|
||||
//设置折线图月份
|
||||
lineVO.setMonth(month);
|
||||
// 设置 类型-数量 键值对
|
||||
for (String t : type) {
|
||||
int j=0;
|
||||
while (j<7){
|
||||
QueryWrapper<EmpIden> userQueryWrapper = Wrappers.query();
|
||||
userQueryWrapper.like("status", t).likeRight("idate", month.get(j));
|
||||
Integer count = mapper.selectCount(userQueryWrapper);
|
||||
status.put(month.get(j++),count);
|
||||
userQueryWrapper.clear();
|
||||
}
|
||||
all.put(t,status);
|
||||
|
||||
}
|
||||
System.out.println(all.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,38 +1,38 @@
|
||||
package org.example;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
package org.example;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
extends TestCase
|
||||
{
|
||||
/**
|
||||
* Create the test case
|
||||
*
|
||||
* @param testName name of the test case
|
||||
*/
|
||||
public AppTest( String testName )
|
||||
{
|
||||
super( testName );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the suite of tests being tested
|
||||
*/
|
||||
public static Test suite()
|
||||
{
|
||||
return new TestSuite( AppTest.class );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rigourous Test :-)
|
||||
*/
|
||||
public void testApp()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="main" />
|
||||
</component>
|
||||
</module>
|
||||
@ -1,89 +0,0 @@
|
||||
<template>
|
||||
<el-form style="width:60%" :model="Mat" :rules="rules" ref="Mat" label-width="100px" class="demo-Mat">
|
||||
<el-form-item label="物资名称" :label-width="formLabelWidth" prop="name">
|
||||
<el-input v-model="Mat.name" autocomplete="off" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资数量" :label-width="formLabelWidth" prop="count">
|
||||
<el-input v-model="Mat.count" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="计量单位" :label-width="formLabelWidth" prop="type">
|
||||
<el-input v-model="Mat.type" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否为重要物资" :label-width="formLabelWidth" prop="isImp">
|
||||
<el-radio v-model="Mat.isImp" label="是">是</el-radio>
|
||||
<el-radio v-model="Mat.isImp" label="否">否</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" :label-width="formLabelWidth" prop="charge">
|
||||
<el-input v-model="Mat.charge" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" :label-width="formLabelWidth" prop="cnum">
|
||||
<el-input v-model="Mat.cnum" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('Mat')">立即创建</el-button>
|
||||
<el-button @click="resetForm('Mat')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formLabelWidth: '130px',
|
||||
Mat: {
|
||||
name:"",
|
||||
count:"",
|
||||
type:"",
|
||||
isImp:"",
|
||||
charge:"",
|
||||
cnum:"",
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入物资名称', trigger: 'blur' },
|
||||
{ min: 3, max: 20, message: '长度在 3 到 20 个字符', trigger: 'blur' }
|
||||
],
|
||||
count: [
|
||||
{ required: true, message: '请输入物资数量', trigger: 'blur' }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: '请输入计量单位', trigger: 'blur' }
|
||||
],
|
||||
isImp: [
|
||||
{ required: true, message: '请输入是否为重要物资', trigger: 'blur' }
|
||||
],
|
||||
charge: [
|
||||
{ required: true, message: '请输入负责人', trigger: 'blur' }
|
||||
],
|
||||
cnum: [
|
||||
{ required: true, message: '请输入负责人电话', trigger: 'blur' }
|
||||
]
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
axios.post('http://localhost:8080/Material/save',this.Mat).then((resp)=>{
|
||||
if(resp.data=='success'){
|
||||
this.$alert('物资添加成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
this.$router.push('/MaterialManage')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -1,156 +0,0 @@
|
||||
<template>
|
||||
<el-form style="width:60%" :model="Emp" :rules="rules" ref="Emp" label-width="100px" class="demo-Emp">
|
||||
<el-form-item label="姓名" :label-width="formLabelWidth" prop="name">
|
||||
<el-input v-model="Emp.name" autocomplete="off" ></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="性别" :label-width="formLabelWidth" prop="sex">
|
||||
<el-radio v-model="Emp.sex" label="男">男</el-radio>
|
||||
<el-radio v-model="Emp.sex" label="女">女</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="手机号码" :label-width="formLabelWidth" prop="phonenum">
|
||||
<el-input v-model="Emp.phonenum" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="体温" :label-width="formLabelWidth" prop="temp">
|
||||
<el-input v-model="Emp.temp" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否曾到达高风险地区" :label-width="formLabelWidth" prop="risk">
|
||||
<el-input v-model="Emp.risk" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状况" :label-width="formLabelWidth" prop="health">
|
||||
<el-select v-model="Emp.health" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" :label-width="formLabelWidth" prop="depart">
|
||||
<el-select
|
||||
v-model="Emp.depart"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option v-for="(item, index) in options3" :key="index" :label="item" :value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||
<el-input v-model="Emp.content" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('Emp')">立即创建</el-button>
|
||||
<el-button @click="resetForm('Emp')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
created() {
|
||||
axios.get("http://localhost:8080/depart/findAll").then((resp) => {
|
||||
console.log(resp.data);
|
||||
this.options3 = resp.data;
|
||||
});
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options3:[
|
||||
{
|
||||
value: "",
|
||||
label: "",
|
||||
},
|
||||
],
|
||||
options2: [{
|
||||
value: '正常',
|
||||
label: '无下列情况,身体健康'
|
||||
}, {
|
||||
value: '咳嗽',
|
||||
label: '咳嗽'
|
||||
}, {
|
||||
value: '乏力',
|
||||
label: '乏力'
|
||||
}, {
|
||||
value: '呼吸困难',
|
||||
label: '呼吸困难'
|
||||
}, {
|
||||
value: '与新冠肺炎有关的其他症状,如流涕,咽痛,肌痛,腹泻等',
|
||||
label: '与新冠肺炎有关的其他症状,如流涕,咽痛,肌痛,腹泻等'
|
||||
}],
|
||||
value: '',
|
||||
|
||||
formLabelWidth: '120px',
|
||||
options: [{
|
||||
value: '选项1',
|
||||
label: '男'
|
||||
}, {
|
||||
value: '选项2',
|
||||
label: '女'
|
||||
}],
|
||||
Emp: {
|
||||
name:"",
|
||||
sex:"",
|
||||
phonenum:"",
|
||||
temp:"",
|
||||
risk:"",
|
||||
health:"",
|
||||
createTime:"",
|
||||
content:"",
|
||||
depart:""
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入姓名', trigger: 'blur' },
|
||||
{ min:2, max: 20, message: '长度在 3 到 20 个字符', trigger: 'blur' }
|
||||
],
|
||||
sex: [
|
||||
{ required: true, message: '请输入性别', trigger: 'blur' }
|
||||
],
|
||||
phonenum: [
|
||||
{ required: true, message: '请输入手机号码', trigger: 'blur' },
|
||||
{ min: 8, max: 20, message: '长度在 8 到 20 个字符', trigger: 'blur' }
|
||||
],
|
||||
temp: [
|
||||
{ required: true, message: '请输入体温', trigger: 'blur' }
|
||||
],
|
||||
risk: [
|
||||
{ required: true, message: '请选择是否曾到达高风险地区', trigger: 'blur' }
|
||||
],
|
||||
health: [
|
||||
{ required: true, message: '请输入健康状况', trigger: 'blur' }
|
||||
],
|
||||
depart: [
|
||||
{ required: true, message: '请选择部门', trigger: 'blur' }
|
||||
]
|
||||
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
axios.post('http://localhost:8080/emp/save',this.Emp).then((resp)=>{
|
||||
if(resp.data=='success'){
|
||||
this.$alert('打卡成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
this.$router.push('/RecordManage')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -1,148 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div id="Echart" style="width: 700px;height: 400px">
|
||||
</div>
|
||||
<div id="material" style="width: 700px;height: 400px">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { color } from 'echarts';
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
LineVO:{
|
||||
month:'',
|
||||
status:{
|
||||
type:'',
|
||||
count:''
|
||||
}
|
||||
},
|
||||
PieVo:{
|
||||
name:'',
|
||||
value:''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
var echarts = require('echarts');
|
||||
var chartDom = document.getElementById('Echart');
|
||||
var machartDom=document.getElementById('material');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var materialChart=echarts.init(machartDom);
|
||||
axios.get('http://localhost:8080/empiden/LineVO').then((resp)=>{
|
||||
this.LineVO.month=resp.data.month
|
||||
this.LineVO.status=resp.data.status
|
||||
console.log(this.LineVO.status)
|
||||
var option = {
|
||||
title: {
|
||||
text: '疫情趋势'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['隔离', '疑似', '确诊', '治愈', '死亡']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
saveAsImage: {}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: this.LineVO.month//近期七个月
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
data:''
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '隔离',
|
||||
type: 'line',
|
||||
data: this.LineVO.status.隔离
|
||||
},
|
||||
{
|
||||
name: '疑似',
|
||||
type: 'line',
|
||||
data: this.LineVO.status.疑似
|
||||
},
|
||||
{
|
||||
name: '确诊',
|
||||
type: 'line',
|
||||
data: this.LineVO.status.确诊
|
||||
},
|
||||
{
|
||||
name: '治愈',
|
||||
type: 'line',
|
||||
data: this.LineVO.status.治愈,
|
||||
color:"yellow"
|
||||
},
|
||||
{
|
||||
name: '死亡',
|
||||
type: 'line',
|
||||
data: this.LineVO.status.死亡,
|
||||
color:"black"
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
});
|
||||
axios.get('http://localhost:8080/empiden/PieVO').then((resp)=>{
|
||||
this.PieVo=resp.data
|
||||
var option2= {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
top: '5%',
|
||||
left: 'center'
|
||||
},
|
||||
title: {
|
||||
text: '物资情况'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '物资数量',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '25',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: this.PieVo
|
||||
}
|
||||
]
|
||||
};
|
||||
materialChart.setOption(option2);
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -1,394 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button type="primary" @click="addDialogFormVisible = true" size="medium"
|
||||
>新增记录</el-button
|
||||
>
|
||||
<el-input
|
||||
placeholder="请输入内容"
|
||||
v-model="stext"
|
||||
class="input-with-select"
|
||||
style="width: 40%"
|
||||
>
|
||||
<el-select
|
||||
v-model="cname"
|
||||
slot="prepend"
|
||||
placeholder="请选择"
|
||||
@change="getKey"
|
||||
>
|
||||
<el-option label="姓名" value="name"></el-option>
|
||||
<el-option label="就诊医院" value="place"></el-option>
|
||||
<el-option label="所属部门" value="depart"></el-option>
|
||||
<el-option label="就诊日期" value="idate"></el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="search()"
|
||||
></el-button>
|
||||
</el-input>
|
||||
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column fixed prop="name" label="姓名" width="100">
|
||||
</el-table-column>
|
||||
<el-table-column prop="id" label="编号" width="50"> </el-table-column>
|
||||
<el-table-column prop="sex" label="性别" width="50"> </el-table-column>
|
||||
<el-table-column prop="idcard" label="身份证号码" width="170">
|
||||
</el-table-column>
|
||||
<el-table-column prop="idate" label="就诊日期" width="160">
|
||||
</el-table-column>
|
||||
<el-table-column prop="place" label="就诊医院" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="depart" label="所属部门" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column prop="phonenum" label="手机号码" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column prop="register" label="登记时间" width="170">
|
||||
</el-table-column>
|
||||
<el-table-column width="120" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click="(dialogFormVisible = true), edit(scope.row)"
|
||||
type="text"
|
||||
size="small"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="deleteRecord(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@current-change="handleCurrentChange"
|
||||
:page-size="6"
|
||||
layout="total, prev, pager, next"
|
||||
:total="total"
|
||||
>
|
||||
</el-pagination>
|
||||
|
||||
<el-dialog
|
||||
title="修改确诊/疑似病例记录"
|
||||
:visible.sync="dialogFormVisible"
|
||||
slot
|
||||
>
|
||||
<el-form :model="EmpIden" ref="EmpIden">
|
||||
<el-form-item label="姓名" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIden.name" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" :label-width="formLabelWidth">
|
||||
<el-radio v-model="EmpIden.sex" label="男">男</el-radio>
|
||||
<el-radio v-model="EmpIden.sex" label="女">女</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIden.idcard" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊日期" :label-width="formLabelWidth">
|
||||
<el-date-picker
|
||||
v-model="EmpIden.idate"
|
||||
align="right"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
:picker-options="pickerOptions"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊医院" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIden.place" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" :label-width="formLabelWidth">
|
||||
<el-select
|
||||
v-model="EmpIden.depart"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIden.phonenum" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="(dialogFormVisible = false), update()"
|
||||
>确 定</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="新增确诊/疑似病例记录"
|
||||
:visible.sync="addDialogFormVisible"
|
||||
slot
|
||||
>
|
||||
<el-form :model="addEmpIden">
|
||||
<el-form-item label="姓名" :label-width="formLabelWidth">
|
||||
<el-input v-model="addEmpIden.name" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" :label-width="formLabelWidth">
|
||||
<el-radio v-model="addEmpIden.sex" label="男">男</el-radio>
|
||||
<el-radio v-model="addEmpIden.sex" label="女">女</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" :label-width="formLabelWidth">
|
||||
<el-input v-model="addEmpIden.idcard" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊日期" :label-width="formLabelWidth">
|
||||
<el-date-picker
|
||||
v-model="addEmpIden.idate"
|
||||
align="right"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
:picker-options="pickerOptions"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="就诊医院" :label-width="formLabelWidth">
|
||||
<el-input v-model="addEmpIden.place" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" :label-width="formLabelWidth">
|
||||
<el-select
|
||||
v-model="addEmpIden.depart"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" :label-width="formLabelWidth">
|
||||
<el-input
|
||||
v-model="addEmpIden.phonenum"
|
||||
autocomplete="off"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogFormVisible = false">取 消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="(addDialogFormVisible = false), submitForm()"
|
||||
>确 定</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
search() {
|
||||
if (!this.stext) {
|
||||
axios.get("http://localhost:8080/empiden/findAll/1/6").then((resp) => {
|
||||
this.tableData = resp.data.records;
|
||||
this.total = resp.data.total;
|
||||
this.cname = "";
|
||||
});
|
||||
} else {
|
||||
axios
|
||||
.get(
|
||||
"http://localhost:8080/empiden/search/" +
|
||||
this.searchKey +
|
||||
"/" +
|
||||
this.stext
|
||||
)
|
||||
.then((resp) => {
|
||||
this.tableData = resp.data;
|
||||
this.total = resp.data.total;
|
||||
});
|
||||
}
|
||||
},
|
||||
getKey(e) {
|
||||
this.searchKey = e;
|
||||
},
|
||||
submitForm() {
|
||||
axios
|
||||
.post("http://localhost:8080/empiden/save", this.addEmpIden)
|
||||
.then((resp) => {
|
||||
if (resp.data == "success") {
|
||||
this.$alert("确诊/疑似病例添加成功!", "消息", {
|
||||
confirmButtonText: "确定",
|
||||
callback: (action) => {
|
||||
window.location.reload();
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteRecord(row) {
|
||||
this.$confirm("是否确定要删除" + row.name + "的病例记录?", "删除数据", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
axios
|
||||
.delete("http://localhost:8080/empiden/deleteById/" + row.id)
|
||||
.then((resp) => {
|
||||
this.$alert(row.name + "的病例记录删除成功!", "消息", {
|
||||
confirmButtonText: "确定",
|
||||
callback: (action) => {
|
||||
window.location.reload();
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
update() {
|
||||
axios
|
||||
.put("http://localhost:8080/empiden/update", this.EmpIden)
|
||||
.then((resp) => {
|
||||
console.log(resp);
|
||||
if (resp.data == "success") {
|
||||
this.$alert(this.EmpIden.name + "的病例记录修改成功!", "消息", {
|
||||
confirmButtonText: "确定",
|
||||
callback: (action) => {
|
||||
window.location.reload();
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
edit(row) {
|
||||
axios
|
||||
.get("http://localhost:8080/empiden/findById/" + row.id)
|
||||
.then((resp) => {
|
||||
this.EmpIden = resp.data;
|
||||
});
|
||||
},
|
||||
handleCurrentChange(currentPage) {
|
||||
axios
|
||||
.get("http://localhost:8080/empiden/findAll/" + currentPage + "/6")
|
||||
.then((resp) => {
|
||||
this.tableData = resp.data.records;
|
||||
this.total = resp.data.total;
|
||||
});
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== "") {
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.options = this.list.filter((item) => {
|
||||
return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
|
||||
});
|
||||
}, 200);
|
||||
} else {
|
||||
this.options = [];
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
axios.get("http://localhost:8080/empiden/findAll/1/6").then((resp) => {
|
||||
this.tableData = resp.data.records;
|
||||
this.total = resp.data.total;
|
||||
});
|
||||
axios.get("http://localhost:8080/depart/findAll").then((resp) => {
|
||||
console.log(resp.data);
|
||||
this.options2 = resp.data;
|
||||
});
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
options2: [
|
||||
{
|
||||
value: "",
|
||||
label: "",
|
||||
},
|
||||
],
|
||||
value: "",
|
||||
cname: "",
|
||||
stext: "",
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() > Date.now();
|
||||
},
|
||||
shortcuts: [
|
||||
{
|
||||
text: "今天",
|
||||
onClick(picker) {
|
||||
picker.$emit("pick", new Date());
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "昨天",
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||
picker.$emit("pick", date);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "一周前",
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit("pick", date);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
options: [],
|
||||
value: [],
|
||||
list: [],
|
||||
loading: false,
|
||||
tableData: null,
|
||||
total: null,
|
||||
dialogTableVisible: false,
|
||||
dialogFormVisible: false,
|
||||
addDialogFormVisible: false,
|
||||
formLabelWidth: "120px",
|
||||
addLabelWidth: "50px",
|
||||
EmpIden: {
|
||||
id: "",
|
||||
name: "",
|
||||
sex: "",
|
||||
idcard: "",
|
||||
idate: "",
|
||||
place: "",
|
||||
depart: "",
|
||||
phonenum: "",
|
||||
},
|
||||
addEmpIden: {
|
||||
id: "",
|
||||
name: "",
|
||||
sex: "",
|
||||
idcard: "",
|
||||
idate: "",
|
||||
place: "",
|
||||
depart: "",
|
||||
phonenum: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.el-select .el-input {
|
||||
width: 130px;
|
||||
}
|
||||
.input-with-select {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.input-with-select .el-input-group__prepend {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@ -1,36 +0,0 @@
|
||||
<template>
|
||||
<div class="index">
|
||||
<el-container style="height: 100%; border: 1px solid #eee">
|
||||
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
|
||||
|
||||
<el-menu router :default-active='$route.path'>
|
||||
<el-submenu v-for="(item,index) in router" :index="index+''" :key="index" >
|
||||
<template slot="title"><i class="el-icon-setting"></i>{{item.name}}</template>
|
||||
<el-menu-item v-for="(item2,index2) in item.children" :index="item2.path" :key="index2"
|
||||
>{{item2.name}}</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
<el-main>
|
||||
<router-view></router-view>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
currentMenu:'',
|
||||
router:""
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.router = this.$router.options.routes.filter(i=>{
|
||||
return i.meta
|
||||
})
|
||||
},
|
||||
name: 'index',
|
||||
}
|
||||
</script>
|
||||
@ -1,399 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button type="primary" @click="addDialogFormVisible = true" size="medium">新增记录</el-button>
|
||||
<el-input placeholder="请输入内容" v-model="stext" class="input-with-select" style="width:40%">
|
||||
<el-select v-model="cname" slot="prepend" placeholder="请选择" @change="getKey">
|
||||
<el-option label="姓名" value="name"></el-option>
|
||||
<el-option label="隔离方式" value="type"></el-option>
|
||||
<el-option label="隔离地点" value="place"></el-option>
|
||||
<el-option label="出发地" value="leaved"></el-option>
|
||||
<el-option label="途径地" value="arrived"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
|
||||
</el-input>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="编号"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sex"
|
||||
label="性别"
|
||||
width="60">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="phone"
|
||||
label="手机号码"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="temp"
|
||||
label="体温"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" >
|
||||
<p size="medium" :class="scope.row.temp>36 && scope.row.temp<38 ? '' : 'red'">{{ scope.row.temp + "°C" }}</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="隔离方式"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="place"
|
||||
label="隔离地点"
|
||||
width="200">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="date"
|
||||
label="隔离期"
|
||||
width="200">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="leaved"
|
||||
label="出发地"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="arrived"
|
||||
label="途径地"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="depart"
|
||||
label="所属部门"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="content"
|
||||
label="备注"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column width="120" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="dialogFormVisible = true,edit(scope.row)" type="text" size="small">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteRecord(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@current-change="handleCurrentChange"
|
||||
:page-size="6"
|
||||
layout="total, prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
|
||||
<el-dialog title="修改隔离记录" :visible.sync="dialogFormVisible" slot>
|
||||
<el-form :model="EmpIs" ref="EmpIs">
|
||||
<el-form-item label="姓名" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.name" autocomplete="off" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" :label-width="formLabelWidth">
|
||||
<el-radio v-model="EmpIs.sex" label="男">男</el-radio>
|
||||
<el-radio v-model="EmpIs.sex" label="女">女</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.phone" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="体温" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.temp" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="隔离方式" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.type" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="隔离地点" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.place" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="隔离开始日期" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.begin" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="出发地" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.leaved" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="途径地" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.arrived" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" :label-width="formLabelWidth" prop="depart">
|
||||
<el-select
|
||||
v-model="EmpIs.depart"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options3"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.content" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogFormVisible = false,update()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog title="新增隔离记录" :visible.sync="addDialogFormVisible" slot>
|
||||
<el-form :model="EmpIs" >
|
||||
<el-form-item label="姓名" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.name" autocomplete="off" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" :label-width="formLabelWidth">
|
||||
<el-radio v-model="EmpIs.sex" label="男">男</el-radio>
|
||||
<el-radio v-model="EmpIs.sex" label="女">女</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.phone" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="体温" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.temp" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="隔离方式" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.type" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="隔离地点" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.place" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="隔离开始日期" :label-width="formLabelWidth">
|
||||
<el-date-picker v-model="EmpIs.begin" align="right" type="date"
|
||||
placeholder="选择日期" :picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="出发地" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.leaved" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="途径地" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.arrived" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" :label-width="formLabelWidth" prop="depart">
|
||||
<el-select
|
||||
v-model="EmpIs.depart"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options3"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||
<el-input v-model="EmpIs.content" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addDialogFormVisible = false,submitForm()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
search(){
|
||||
if(!this.stext){
|
||||
axios.get('http://localhost:8080/empis/findAll/1/6').then((resp)=>{
|
||||
this.tableData=resp.data.records
|
||||
this.total=resp.data.total
|
||||
this.cname=""
|
||||
})
|
||||
}else{
|
||||
axios.get('http://localhost:8080/empis/search/'+this.searchKey+"/"+this.stext).then((resp)=>{
|
||||
this.tableData=resp.data
|
||||
this.total=resp.data.total
|
||||
})}
|
||||
},
|
||||
getKey(e){
|
||||
this.searchKey = e
|
||||
},
|
||||
submitForm() {
|
||||
console.log(this.EmpIs.end)
|
||||
axios.post('http://localhost:8080/empis/save',this.EmpIs).then((resp)=>{
|
||||
if(resp.data=='success'){
|
||||
this.$alert('隔离记录添加成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
deleteRecord(row){
|
||||
this.$confirm('是否确定要删除'+row.name+'的隔离记录?','删除数据',{
|
||||
confirmButtonText:'确定',
|
||||
cancelButtonText:'取消',
|
||||
type:'warning'
|
||||
}).then(()=>{axios.delete('http://localhost:8080/empis/deleteById/'+row.id).then((resp)=>{
|
||||
this.$alert(row.name+'的隔离记录删除成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
})})
|
||||
},
|
||||
update(){
|
||||
axios.put('http://localhost:8080/empis/update',this.EmpIs).then((resp)=>{
|
||||
console.log(resp)
|
||||
if(resp.data=='success'){
|
||||
this.$alert(this.EmpIs.name+'的隔离记录修改成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(row) {
|
||||
axios.get('http://localhost:8080/empis/findById/'+row.id).then((resp)=>{
|
||||
this.EmpIs=resp.data;
|
||||
})
|
||||
},
|
||||
handleCurrentChange(currentPage){
|
||||
axios.get('http://localhost:8080/empis/findAll/'+currentPage+'/6').then((resp)=>{
|
||||
this.tableData=resp.data.records
|
||||
this.total=resp.data.total
|
||||
})
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.options = this.list.filter(item => {
|
||||
return item.label.toLowerCase()
|
||||
.indexOf(query.toLowerCase()) > -1;
|
||||
});
|
||||
}, 200);
|
||||
} else {
|
||||
this.options = [];
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
axios.get('http://localhost:8080/empis/findAll/1/6').then((resp)=>{
|
||||
this.tableData=resp.data.records
|
||||
for(var i=0;i<this.tableData.length;i++){
|
||||
if(this.tableData[i].begin!=null) {
|
||||
this.tableData[i].date=this.tableData[i].begin+" 至 "+this.tableData[i].end
|
||||
}
|
||||
}
|
||||
this.total=resp.data.total
|
||||
});
|
||||
axios.get("http://localhost:8080/depart/findAll").then((resp) => {
|
||||
console.log(resp.data);
|
||||
this.options3 = resp.data;
|
||||
});
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
return {
|
||||
options3: [
|
||||
{
|
||||
value: "",
|
||||
label: "",
|
||||
},
|
||||
],
|
||||
cname:'',
|
||||
stext:'',
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() > Date.now();
|
||||
},
|
||||
shortcuts: [{
|
||||
text: '今天',
|
||||
onClick(picker) {
|
||||
picker.$emit('pick', new Date());
|
||||
}
|
||||
}, {
|
||||
text: '昨天',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||
picker.$emit('pick', date);
|
||||
}
|
||||
}, {
|
||||
text: '一周前',
|
||||
onClick(picker) {
|
||||
const date = new Date();
|
||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', date);
|
||||
}
|
||||
}]
|
||||
},
|
||||
options: [],
|
||||
value: [],
|
||||
list: [],
|
||||
loading: false,
|
||||
tableData: null,
|
||||
total:null,
|
||||
dialogTableVisible: false,
|
||||
dialogFormVisible: false,
|
||||
addDialogFormVisible: false,
|
||||
formLabelWidth: '120px',
|
||||
addLabelWidth:'50px',
|
||||
EmpIs: {
|
||||
id:"",
|
||||
name:"",
|
||||
sex:"",
|
||||
phone:"",
|
||||
temp:"",
|
||||
type:"",
|
||||
place:"",
|
||||
leaved:"",
|
||||
begin:"",
|
||||
end:"",
|
||||
content:"",
|
||||
depart:""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.red{
|
||||
color: red;
|
||||
}
|
||||
.el-select .el-input {
|
||||
width: 130px;
|
||||
}.input-with-select{
|
||||
|
||||
float: right;
|
||||
}
|
||||
.input-with-select .el-input-group__prepend {
|
||||
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@ -1,233 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-input placeholder="请输入内容" v-model="stext" class="input-with-select" style="width:40%">
|
||||
<el-select v-model="cname" slot="prepend" placeholder="请选择" @change="getKey">
|
||||
<el-option label="物资名称" value="name"></el-option>
|
||||
<el-option label="负责人" value="charge"></el-option>
|
||||
<el-option label="更新时间" value="updateTime"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
|
||||
</el-input>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="id"
|
||||
label="编号"
|
||||
width="150">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="物资名称"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="count"
|
||||
label="物资数量"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
label="计量单位"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="isImp"
|
||||
label="是否为重点物资"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="charge"
|
||||
label="负责人"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cnum"
|
||||
label="负责人电话"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="updateTime"
|
||||
label="更新时间"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="120" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="dialogFormVisible = true,edit(scope.row)" type="text" size="small">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteRecord(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@current-change="handleCurrentChange"
|
||||
:page-size="6"
|
||||
layout="total, prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
|
||||
<el-dialog title="更新物资详情" :visible.sync="dialogFormVisible" slot>
|
||||
<el-form :model="Mat" ref="Mat">
|
||||
<el-form-item label="物资名称" :label-width="formLabelWidth">
|
||||
<el-input v-model="Mat.name" autocomplete="off" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资数量" :label-width="formLabelWidth">
|
||||
<el-input v-model="Mat.count" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="计量单位" :label-width="formLabelWidth">
|
||||
<el-input v-model="Mat.type" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否为重要物资" :label-width="formLabelWidth" prop="isImp">
|
||||
<el-radio v-model="Mat.isImp" label="是" @change="test($event)">是</el-radio>
|
||||
<el-radio v-model="Mat.isImp" label="否" @change="test($event)">否</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" :label-width="formLabelWidth">
|
||||
<el-input v-model="Mat.charge" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" :label-width="formLabelWidth">
|
||||
<el-input v-model="Mat.cnum" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogFormVisible = false,update()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
test(dd){
|
||||
this.Mat.isImp=dd;
|
||||
},
|
||||
search(){
|
||||
if(!this.stext){
|
||||
|
||||
axios.get('http://localhost:8080/Material/findAll/1/6').then((resp)=>{
|
||||
this.tableData=resp.data.records
|
||||
this.total=resp.data.total
|
||||
this.cname=""
|
||||
})
|
||||
}else{
|
||||
axios.get('http://localhost:8080/Material/search/'+this.searchKey+"/"+this.stext).then((resp)=>{
|
||||
this.tableData=resp.data
|
||||
this.total=resp.data.total
|
||||
})}
|
||||
},
|
||||
getKey(e){
|
||||
this.searchKey = e
|
||||
},
|
||||
deleteRecord(row){
|
||||
this.$confirm('是否确定要删除'+row.name+'的物资记录?','删除数据',{
|
||||
confirmButtonText:'确定',
|
||||
cancelButtonText:'取消',
|
||||
type:'warning'
|
||||
}).then(()=>{axios.delete('http://localhost:8080/Material/deleteById/'+row.id).then((resp)=>{
|
||||
this.$alert(row.name+'的物资记录删除成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
})})
|
||||
},
|
||||
|
||||
update(){
|
||||
axios.put('http://localhost:8080/Material/update',this.Mat).then((resp)=>{
|
||||
console.log(resp)
|
||||
if(resp.data=='success'){
|
||||
this.$alert(this.Mat.name+'的物资记录修改成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(row) {
|
||||
axios.get('http://localhost:8080/Material/findById/'+row.id).then((resp)=>{
|
||||
this.Mat=resp.data;
|
||||
})
|
||||
},
|
||||
handleCurrentChange(currentPage){
|
||||
axios.get('http://localhost:8080/Material/findAll/'+currentPage+'/6').then((resp)=>{
|
||||
this.tableData=resp.data.records
|
||||
this.total=resp.data.total
|
||||
})
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.options = this.list.filter(item => {
|
||||
return item.label.toLowerCase()
|
||||
.indexOf(query.toLowerCase()) > -1;
|
||||
});
|
||||
}, 200);
|
||||
} else {
|
||||
this.options = [];
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
axios.get('http://localhost:8080/Material/findAll/1/6').then((resp)=>{
|
||||
console.log(resp)
|
||||
this.tableData=resp.data.records
|
||||
this.total=resp.data.total
|
||||
})
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
cname:'',
|
||||
stext:'',
|
||||
formLabelWidth: '120px',
|
||||
options: [],
|
||||
value: [],
|
||||
list: [],
|
||||
loading: false,
|
||||
tableData: null,
|
||||
total:null,
|
||||
dialogTableVisible: false,
|
||||
dialogFormVisible: false,
|
||||
formLabelWidth: '120px',
|
||||
Mat: {
|
||||
id:"",
|
||||
name:"",
|
||||
count:"",
|
||||
type:"",
|
||||
isImp:"",
|
||||
charge:"",
|
||||
cnum:"",
|
||||
updateTime:""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.el-select .el-input {
|
||||
width: 130px;
|
||||
}.input-with-select{
|
||||
|
||||
float: right;
|
||||
}
|
||||
|
||||
.input-with-select .el-input-group__prepend {
|
||||
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@ -1,307 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-input placeholder="请输入内容" v-model="stext" class="input-with-select" style="width:40%">
|
||||
<el-select v-model="cname" slot="prepend" placeholder="请选择" @change="getKey">
|
||||
<el-option label="姓名" value="name"></el-option>
|
||||
<el-option label="健康状况" value="health"></el-option>
|
||||
<el-option label="打卡时间" value="createTime"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
|
||||
</el-input>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="id"
|
||||
label="编号"
|
||||
sortable
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="姓名"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sex"
|
||||
label="性别"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="phonenum"
|
||||
label="手机号码"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="体温"
|
||||
prop="temp"
|
||||
width="80"
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" >
|
||||
<p size="medium" :class="scope.row.temp>36 && scope.row.temp<37.2 ? '' : 'red'">{{ scope.row.temp+"°C"}}</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="risk"
|
||||
label="是否到达过高风险地区"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="health"
|
||||
label="健康状况"
|
||||
width="170">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="打卡时间"
|
||||
width="170"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="depart"
|
||||
label="所属部门"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="content"
|
||||
label="备注"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
<el-table-column width="120" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="dialogFormVisible = true,edit(scope.row)" type="text" size="small">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteRecord(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@current-change="handleCurrentChange"
|
||||
:page-size="6"
|
||||
layout="total, prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
|
||||
<el-dialog title="修改打卡记录" :visible.sync="dialogFormVisible" slot>
|
||||
<el-form :model="Emp" ref="Emp">
|
||||
<el-form-item label="姓名" :label-width="formLabelWidth">
|
||||
<el-input v-model="Emp.name" autocomplete="off" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" :label-width="formLabelWidth" prop="sex">
|
||||
<el-radio v-model="Emp.sex" label="男">男</el-radio>
|
||||
<el-radio v-model="Emp.sex" label="女">女</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" :label-width="formLabelWidth">
|
||||
<el-input v-model="Emp.phonenum" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="体温" :label-width="formLabelWidth">
|
||||
<el-input v-model="Emp.temp" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否曾到达高风险地区" :label-width="formLabelWidth">
|
||||
<el-input v-model="Emp.risk" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康状况" :label-width="formLabelWidth" prop="health">
|
||||
<el-select v-model="Emp.health" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="打卡时间" :label-width="formLabelWidth" >
|
||||
<el-input v-model="Emp.createTime" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" :label-width="formLabelWidth">
|
||||
<el-select
|
||||
v-model="Emp.depart"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options3"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||
<el-input v-model="Emp.content" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogFormVisible = false,update()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
search(){
|
||||
if(!this.stext){
|
||||
|
||||
axios.get('http://localhost:8080/emp/findAll/1/6').then((resp)=>{
|
||||
console.log(resp)
|
||||
this.tableData=resp.data.records
|
||||
this.total=resp.data.total
|
||||
this.cname=""
|
||||
})
|
||||
}else{
|
||||
axios.get('http://localhost:8080/emp/search/'+this.searchKey+"/"+this.stext).then((resp)=>{
|
||||
this.tableData=resp.data
|
||||
this.total=resp.data.total
|
||||
})}
|
||||
},
|
||||
getKey(e){
|
||||
this.searchKey = e
|
||||
},
|
||||
|
||||
deleteRecord(row){
|
||||
this.$confirm('是否确定要删除'+row.name+'的打卡记录?','删除数据',{
|
||||
confirmButtonText:'确定',
|
||||
cancelButtonText:'取消',
|
||||
type:'warning'
|
||||
}).then(()=>{axios.delete('http://localhost:8080/emp/deleteById/'+row.id).then((resp)=>{
|
||||
this.$alert(row.name+'的打卡记录删除成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
})})
|
||||
},
|
||||
|
||||
update(){
|
||||
axios.put('http://localhost:8080/emp/update',this.Emp).then((resp)=>{
|
||||
console.log(resp)
|
||||
if(resp.data=='success'){
|
||||
this.$alert(this.Emp.name+'的打卡记录修改成功!',"消息",{
|
||||
confirmButtonText:"确定",
|
||||
callback:action=>{
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(row) {
|
||||
axios.get('http://localhost:8080/emp/findById/'+row.id).then((resp)=>{
|
||||
this.Emp=resp.data;
|
||||
})
|
||||
},
|
||||
handleCurrentChange(currentPage){
|
||||
axios.get('http://localhost:8080/emp/findAll/'+currentPage+'/6').then((resp)=>{
|
||||
this.tableData=resp.data.records
|
||||
this.total=resp.data.total
|
||||
})
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
this.options = this.list.filter(item => {
|
||||
return item.label.toLowerCase()
|
||||
.indexOf(query.toLowerCase()) > -1;
|
||||
});
|
||||
}, 200);
|
||||
} else {
|
||||
this.options = [];
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
axios.get('http://localhost:8080/emp/findAll/1/6').then((resp)=>{
|
||||
console.log(resp)
|
||||
this.tableData=resp.data.records
|
||||
this.total=resp.data.total
|
||||
});
|
||||
axios.get("http://localhost:8080/depart/findAll").then((resp) => {
|
||||
console.log(resp.data);
|
||||
this.options3 = resp.data;
|
||||
});
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
return {
|
||||
options3:[
|
||||
{
|
||||
value: "",
|
||||
label: "",
|
||||
},
|
||||
],
|
||||
options2: [{
|
||||
value: '正常',
|
||||
label: '无下列情况,身体健康'
|
||||
}, {
|
||||
value: '咳嗽',
|
||||
label: '咳嗽'
|
||||
}, {
|
||||
value: '乏力',
|
||||
label: '乏力'
|
||||
}, {
|
||||
value: '呼吸困难',
|
||||
label: '呼吸困难'
|
||||
}, {
|
||||
value: '与新冠肺炎有关的其他症状,如流涕,咽痛,肌痛,腹泻等',
|
||||
label: '与新冠肺炎有关的其他症状,如流涕,咽痛,肌痛,腹泻等'
|
||||
}],
|
||||
value: '',
|
||||
cname:'',
|
||||
stext:'',
|
||||
searchKey:"",
|
||||
options: [],
|
||||
value: [],
|
||||
list: [],
|
||||
loading: false,
|
||||
tableData: null,
|
||||
total:null,
|
||||
dialogTableVisible: false,
|
||||
dialogFormVisible: false,
|
||||
formLabelWidth: '120px',
|
||||
LabelWidth: '180px',
|
||||
Emp: {
|
||||
id:"",
|
||||
name:"",
|
||||
sex:"",
|
||||
phonenum:"",
|
||||
temp:"",
|
||||
risk:"",
|
||||
health:"",
|
||||
createTime:"",
|
||||
content:"",
|
||||
depart:""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.el-select .el-input {
|
||||
width: 130px;
|
||||
}
|
||||
.input-with-select .el-input-group__prepend {
|
||||
background-color: #fff;
|
||||
}
|
||||
.red{
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
@ -1,214 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="login-form-layout">
|
||||
<el-form
|
||||
autocomplete="on"
|
||||
:model="loginForm"
|
||||
ref="loginForm"
|
||||
label-position="left"
|
||||
>
|
||||
<div style="text-align: center">
|
||||
<svg-icon icon-class="login-mall" style="width: 56px;height: 56px;color: #409EFF"></svg-icon>
|
||||
</div>
|
||||
<h2 class="login-title color-main">疫情防控管理系统登录</h2>
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
name="username"
|
||||
type="text"
|
||||
v-model="loginForm.username"
|
||||
autocomplete="on"
|
||||
placeholder="请输入用户名"
|
||||
>
|
||||
<span slot="prefix">
|
||||
<svg-icon icon-class="user" class="color-main"></svg-icon>
|
||||
</span>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
name="password"
|
||||
:type="pwdType"
|
||||
@keyup.enter.native="handleLogin"
|
||||
v-model="loginForm.password"
|
||||
autocomplete="on"
|
||||
placeholder="请输入密码"
|
||||
show-password
|
||||
>
|
||||
<span slot="prefix">
|
||||
<svg-icon icon-class="password" class="color-main"></svg-icon>
|
||||
</span>
|
||||
<span slot="suffix" @click="showPwd">
|
||||
<svg-icon icon-class="eye" class="color-main"></svg-icon>
|
||||
</span>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 60px">
|
||||
<el-button
|
||||
style="width: 48%"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
@click.native.prevent="handleLogin"
|
||||
>登录</el-button>
|
||||
<el-button
|
||||
style="width: 48%"
|
||||
type="success"
|
||||
:loading="loading"
|
||||
@click="dialogFormVisible = true"
|
||||
>注册</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-dialog title="用户注册" :visible.sync="dialogFormVisible" center="">
|
||||
<el-form :model="user">
|
||||
<el-form-item label="用户名" :label-width="formLabelWidth">
|
||||
<el-input v-model="user.username" autocomplete="off" size="small" :label-width="LabelWidth"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" :label-width="formLabelWidth">
|
||||
<el-input show-password :type="pwdType" v-model="user.password" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" :label-width="formLabelWidth">
|
||||
<el-input show-password :type="pwdType" v-model="user.repassword" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属部门" :label-width="formLabelWidth">
|
||||
<el-select
|
||||
v-model="user.depart"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options2"
|
||||
:key="index"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="register()">注 册</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
created(){
|
||||
axios.get("http://localhost:8080/depart/findAll").then((resp) => {
|
||||
this.options2 = resp.data;
|
||||
});
|
||||
},
|
||||
name: "login",
|
||||
data() {
|
||||
return {
|
||||
options2: [
|
||||
{
|
||||
value: "",
|
||||
label: "",
|
||||
},
|
||||
],
|
||||
formLabelWidth:'120px',
|
||||
LabelWidth:'40px',
|
||||
dialogFormVisible : false,
|
||||
user:{
|
||||
username: "",
|
||||
password: "",
|
||||
repassword:"",
|
||||
depart:""
|
||||
},
|
||||
loginForm: {
|
||||
username: "",
|
||||
password: ""
|
||||
},
|
||||
loading: false,
|
||||
pwdType: "password",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
register(){
|
||||
this.dialogFormVisible = false
|
||||
if(this.user.username==""||this.user.password=="") {
|
||||
this.$alert("注册用户名或密码不能为空")
|
||||
this.loading=false;
|
||||
}else if(this.user.password==this.user.repassword){
|
||||
axios.post('http://localhost:8080/userlogin/register',this.user).then((resp)=>{
|
||||
console.log(resp)
|
||||
this.loading=true;
|
||||
if(resp.data=='success'){
|
||||
this.loading=false;
|
||||
this.$alert("注册成功!请登录");
|
||||
}else if(resp.data=='repeat'){
|
||||
this.loading=false;
|
||||
this.$alert('用户名已存在!请重新注册')
|
||||
}else{
|
||||
this.loading=false;
|
||||
this.$alert("注册失败!请重新注册")
|
||||
window.location.reload()
|
||||
}
|
||||
})}
|
||||
else {
|
||||
this.$alert("两次输入的密码不一致!");
|
||||
}
|
||||
},
|
||||
showPwd() {
|
||||
if (this.pwdType === "password") {
|
||||
this.pwdType = "";
|
||||
} else {
|
||||
this.pwdType = "password";
|
||||
}
|
||||
},
|
||||
handleLogin() {
|
||||
axios.post('http://localhost:8080/userlogin/user',this.loginForm).then((resp)=>{
|
||||
console.log(resp)
|
||||
this.loading=true;
|
||||
if(this.loginForm.username==""||this.loginForm.password=="") {
|
||||
this.$alert("用户名或密码不能为空")
|
||||
this.loading=false;
|
||||
}
|
||||
else {
|
||||
if(resp.data=='success'){
|
||||
this.loading=false;
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '登录成功',
|
||||
type: 'success'
|
||||
});
|
||||
this.$router.push('/index')
|
||||
}else {
|
||||
this.loading=false;
|
||||
this.$alert("用户名或密码错误")
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.login-form-layout {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 360px;
|
||||
margin: 140px auto;
|
||||
border-top: 10px solid #409eff;
|
||||
}
|
||||
|
||||
.login-title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login-center-layout {
|
||||
background: #409eff;
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
margin-top: 200px;
|
||||
}
|
||||
</style>
|
||||
@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
devServer: {
|
||||
// 项目运行时候的端口号
|
||||
port: 8090
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue