Files
20250612/README.md
2025-06-20 21:49:12 +08:00

92 lines
3.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 详细配置指南
另见:[README_opreate](README_operate.md) 网页链接:[125.64.9.222:8022](http://125.64.9.222:8022/stuff/exam_operate/exam_operate_1.html)
### 1⃣vue工程
❗在 .env.development 文件中配置好相应变量:
![](./doc/images/vue工程配置.png )
终端定位到工程根目录下(一般是:`C:\exam_app\app_vue` )
`cd C:\exam_app\app_vue`
运行命令`npm run serve`
运行成功如下:
![](./doc/images/vue运行成功.png)
### 2⃣数据库配置:
❗仅适用于本工程不同题目应配置不同的Table请注意识别
安装 wampserver 或其他 MAMP本地开发环境软件 ,本地数据库亦可
执行下列sql语句仅适用本项目
*exam_xxxxxx_xxxxx* 替换为 *VPS database name*
```sql
create database exam_xxxxxx_xxxxx;
use exam_xxxxxx_xxxxx;
create table user_70(name char(50),address char(50),password char(50))ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into user_70(name,address,password)values('mike','shanghai','c4ca4238a0b923820dcc509a6f75849b');
insert into user_70(name,address,password)values('rose','beijing','c4ca4238a0b923820dcc509a6f75849b');
create table person_805(id varchar(50),sfz_id varchar(20),name varchar(20),gender varchar(1),password varchar(20), hometown varchar(20),chronic_disease varchar(100),birthday int,emr text,create_time int,update_time int)ENGINE=MyISAM DEFAULT CHARSET=utf8;
create index `sfz_id` on `person_805` (sfz_id);
insert into person_805(id,sfz_id,name,gender,password,hometown,chronic_disease,birthday,emr,create_time,update_time)values ('001','510103198208210452','罗维','1','123','510101','hypertension','398748962','三年前确诊,病情控制良好','1636424977','1636424977');
create table person_health_805(id varchar(50),sfz_id varchar(20),weight int,height int,heart_rate int,sbp int ,dbp int,blood_sugar DECIMAL(5,1),create_time int,update_time int)ENGINE=MyISAM DEFAULT CHARSET=utf8;
create index `sfz_id` on `person_health_805` (sfz_id);
insert into person_health_805(id,sfz_id,height,weight,heart_rate,sbp,dbp,blood_sugar,create_time,update_time)values('001','510103198208210452','176','71','78','120','75','4.1','1636424977','1636424977');
insert into person_health_805(id,sfz_id,height,weight,heart_rate,sbp,dbp,blood_sugar,create_time,update_time)values('002','510103198208210452','176','72','73','126','80','6.8','1636511377','1636511377');
create table person_base_info_881_1(id varchar(18),name varchar(20),sbp int,dbp int)ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into person_base_info_881_1(id,name,sbp,dbp)values('510103234','罗维','114','70');
insert into person_base_info_881_1(id,name,sbp,dbp)values('510103239','洪七公','134','89');
```
### 3⃣Springboot配置
配置 **application.yml**
```yml
server:
port: <你的springboot端口(VPS spring boot port)> # 替换<>内容
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: #默认密码为空
url: jdbc:mysql://localhost:3306/<VPS database name>?characterEncoding=utf-8&serverTimezone=UTC&useSSL=false # 替换<>内容
mybatis:
mapper-locations: classpath:mapper/*Mapper.xml
type-aliases-package: com.luowei.exam
configuration:
#log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
```
配置完成后
使用 IDEA 打开app_sb下项目后直接运行
----
至此配置完成