commit
b0a67b38c1
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="Flask">
|
||||
<option name="enabled" value="true" />
|
||||
</component>
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="TemplatesService">
|
||||
<option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
|
||||
<option name="TEMPLATE_FOLDERS">
|
||||
<list>
|
||||
<option value="$MODULE_DIR$/../epidemic\templates" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8" project-jdk-type="Python SDK" />
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/epidemic.iml" filepath="$PROJECT_DIR$/.idea/epidemic.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
Binary file not shown.
@ -0,0 +1,383 @@
|
||||
from flask import Flask,render_template, request, redirect
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
import datetime
|
||||
import warnings
|
||||
import requests
|
||||
import re
|
||||
warnings.filterwarnings("ignore")
|
||||
|
||||
app=Flask(__name__)
|
||||
|
||||
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://root:123456@127.0.0.1:3306/epidemic'
|
||||
db = SQLAlchemy(app)
|
||||
#定义类
|
||||
class Province(db.Model):
|
||||
__tablename__='province'
|
||||
provinceID=db.Column(db.String(8))
|
||||
provinceName=db.Column(db.String(8),unique=True,primary_key=True)
|
||||
currentCount = db.Column(db.Integer)
|
||||
confirmedCount = db.Column(db.Integer)
|
||||
suspectedCount = db.Column(db.Integer)
|
||||
curedCount = db.Column(db.Integer)
|
||||
deadCount = db.Column(db.Integer)
|
||||
|
||||
class City(db.Model):
|
||||
__tablename__='city'
|
||||
cityID=db.Column(db.String(8),primary_key=True,index=True)
|
||||
cityName=db.Column(db.String(8),nullable=False,unique=True)
|
||||
provinceName=db.Column(db.String(8))
|
||||
currentCount=db.Column(db.Integer)
|
||||
confirmedCount=db.Column(db.Integer)
|
||||
suspectedCount=db.Column(db.Integer)
|
||||
curedCount=db.Column(db.Integer)
|
||||
deadCount=db.Column(db.Integer)
|
||||
|
||||
class District(db.Model):
|
||||
__tablename__='district'
|
||||
districtID=db.Column(db.String(8),primary_key=True,index=True)
|
||||
districtName=db.Column(db.String(8),nullable=False,unique=True)
|
||||
cityID=db.Column(db.String(8),db.ForeignKey(City.cityID))
|
||||
currentCount = db.Column(db.Integer,default=0)
|
||||
confirmedCount = db.Column(db.Integer,default=0)
|
||||
suspectedCount = db.Column(db.Integer,default=0)
|
||||
curedCount = db.Column(db.Integer,default=0)
|
||||
deadCount = db.Column(db.Integer,default=0)
|
||||
|
||||
class Community(db.Model):
|
||||
__tablename__='community'
|
||||
cID=db.Column(db.String(16),primary_key=True,index=True)
|
||||
cName=db.Column(db.String(32),index=True,unique=True)
|
||||
districtID = db.Column(db.String(8), db.ForeignKey(District.districtID))
|
||||
currentCount = db.Column(db.Integer,default=0)
|
||||
confirmedCount = db.Column(db.Integer,default=0)
|
||||
suspectedCount = db.Column(db.Integer,default=0)
|
||||
curedCount = db.Column(db.Integer,default=0)
|
||||
deadCount = db.Column(db.Integer,default=0)
|
||||
|
||||
class Workplace(db.Model):
|
||||
__tablename__='workplace'
|
||||
wID=db.Column(db.String(32),primary_key=True)
|
||||
wName=db.Column(db.String(32),unique=True,index=True)
|
||||
wRate=db.Column(db.Float)
|
||||
districtID=db.Column(db.String(8),db.ForeignKey(District.districtID))
|
||||
|
||||
class Hospital(db.Model):
|
||||
__tablename__='hospital'
|
||||
hID=db.Column(db.String(32),primary_key=True)
|
||||
hName=db.Column(db.String(32),unique=True,nullable=False)
|
||||
hStorage=db.Column(db.Integer)
|
||||
hCurrent=db.Column(db.Integer,default=0)
|
||||
hCured=db.Column(db.Integer,default=0)
|
||||
hDead=db.Column(db.Integer,default=0)
|
||||
districtID=db.Column(db.String(8),db.ForeignKey(District.districtID))
|
||||
|
||||
class Resident(db.Model):
|
||||
__tablename__='resident'
|
||||
rID=db.Column(db.String(18),primary_key=True)
|
||||
rName=db.Column(db.String(8),nullable=False)
|
||||
rFrom=db.Column(db.String(8)) #收录城市信息不全,暂不建立外键
|
||||
rLive=db.Column(db.String(16),db.ForeignKey(Community.cID),nullable=False)
|
||||
rWork=db.Column(db.String(32),db.ForeignKey(Workplace.wID))
|
||||
rStatus=db.Column(db.String(16),default='default')
|
||||
#r.Treat=db.Column(db.String(32),db.ForeignKey=(hospital.hID))
|
||||
|
||||
class Ware(db.Model):
|
||||
__tablename__='ware'
|
||||
ID=db.Column(db.Integer,primary_key=True,autoincrement=True)
|
||||
wareID=db.Column(db.String(8))
|
||||
wareName=db.Column(db.String(16))
|
||||
wareNum=db.Column(db.Integer,default=0)
|
||||
districtID=db.Column(db.String(8),db.ForeignKey(District.districtID),nullable=False)
|
||||
|
||||
class Treat(db.Model):
|
||||
__tablename__='treat'
|
||||
treatID=db.Column(db.Integer,primary_key=True,autoincrement=True)
|
||||
rID=db.Column(db.String(18),db.ForeignKey(Resident.rID))
|
||||
hID=db.Column(db.String(32),db.ForeignKey(Hospital.hID))
|
||||
startDate=db.Column(db.Date,nullable=False)
|
||||
endDate=db.Column(db.Date)
|
||||
endStatus=db.Column(db.String(8))#dead死亡crued出院
|
||||
|
||||
class Distribute1(db.Model):
|
||||
__tablename__='distribute1'
|
||||
d1=db.Column(db.Integer,primary_key=True,autoincrement=True)
|
||||
districtID=db.Column(db.String(8),db.ForeignKey(District.districtID))
|
||||
wareID=db.Column(db.String(8),db.ForeignKey(Ware.wareID))
|
||||
cID=db.Column(db.String(16),db.ForeignKey(Community.cID))
|
||||
wareNum=db.Column(db.Integer,default=0)
|
||||
|
||||
class Distribute2(db.Model):
|
||||
__tablename__ = 'distribute2'
|
||||
d2=db.Column(db.Integer,primary_key=True,autoincrement=True)
|
||||
districtID = db.Column(db.String(8), db.ForeignKey(District.districtID))
|
||||
wareID=db.Column(db.String(8),db.ForeignKey(Ware.wareID))
|
||||
wID=db.Column(db.String(32),db.ForeignKey(Workplace.wID))
|
||||
wareNum=db.Column(db.Integer,default=0)
|
||||
|
||||
class Distribute3(db.Model):
|
||||
__tablename__ = 'distribute3'
|
||||
d3=db.Column(db.Integer,primary_key=True,autoincrement=True)
|
||||
districtID = db.Column(db.String(8), db.ForeignKey(District.districtID))
|
||||
wareID=db.Column(db.String(8),db.ForeignKey(Ware.wareID))
|
||||
hID=db.Column(db.String(32),db.ForeignKey(Hospital.hID))
|
||||
wareNum=db.Column(db.Integer,default=0)
|
||||
|
||||
class User(db.Model):
|
||||
__tablename__ = 'user'
|
||||
uID=db.Column(db.String(32),primary_key=True)
|
||||
uPassword=db.Column(db.String(32),nullable=False)
|
||||
uType=db.Column(db.String(32),nullable=False)
|
||||
'''
|
||||
db.drop_all()
|
||||
db.create_all()
|
||||
'''
|
||||
#从网页爬取各城市信息
|
||||
def getHTMLText(url):
|
||||
try:
|
||||
r = requests.get(url, timeout=30)
|
||||
r.raise_for_status()
|
||||
r.encoding = r.apparent_encoding
|
||||
return r.text
|
||||
except:
|
||||
return ''
|
||||
|
||||
def getData(provList,cityList,html):
|
||||
prov=re.findall(r'{"provinceName":".+?","provinceShortName":".+?","currentConfirmedCount":.+?}]}',html,re.S)
|
||||
for i in prov:
|
||||
try:
|
||||
l=[]#单省份信息列表
|
||||
i=eval(i)
|
||||
provinceName=i['provinceShortName']
|
||||
l.append(i['locationId'])
|
||||
l.append(i['provinceShortName'])
|
||||
l.append(i['currentConfirmedCount'])
|
||||
l.append(i['confirmedCount'])
|
||||
l.append(i['suspectedCount'])
|
||||
l.append(i['curedCount'])
|
||||
l.append(i['deadCount'])
|
||||
provList.append(l)
|
||||
l2=i['cities']
|
||||
for j in range(len(l2)):
|
||||
l3=[]#单城市信息列表
|
||||
if l2[j]['locationId']==0:
|
||||
continue
|
||||
l3.append(l2[j]['locationId'])
|
||||
l3.append(l2[j]['cityName'])
|
||||
l3.append(provinceName)
|
||||
l3.append(l2[j]['currentConfirmedCount'])
|
||||
l3.append(l2[j]['confirmedCount'])
|
||||
l3.append(l2[j]['suspectedCount'])
|
||||
l3.append(l2[j]['curedCount'])
|
||||
l3.append(l2[j]['deadCount'])
|
||||
cityList.append(l3)
|
||||
except:
|
||||
continue
|
||||
|
||||
infourl='https://ncov.dxy.cn/ncovh5/view/pneumonia?scene=2'
|
||||
HTMLText=getHTMLText(infourl)
|
||||
provList=[]
|
||||
cityList=[]
|
||||
getData(provList,cityList,HTMLText)
|
||||
|
||||
for i in provList:
|
||||
provinceID=i[0]
|
||||
prov=Province(provinceID=i[0],provinceName=i[1],currentCount=i[2],\
|
||||
confirmedCount=i[3],suspectedCount=i[4],curedCount=i[5],\
|
||||
deadCount=i[6])
|
||||
try:
|
||||
db.session.add(prov)
|
||||
db.session.commit()
|
||||
except:
|
||||
continue
|
||||
|
||||
for j in cityList:
|
||||
cityID=j[0]
|
||||
city=City(cityID=j[0],cityName=j[1],provinceName=j[2],currentCount=j[3],\
|
||||
confirmedCount=j[4],suspectedCount=j[5],curedCount=j[6],deadCount=j[7])
|
||||
try:
|
||||
if cityID>=100000:
|
||||
db.session.add(city)
|
||||
db.session.commit()
|
||||
except:
|
||||
continue
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def frontpage():
|
||||
return redirect('/select')
|
||||
|
||||
@app.route('/register_page')
|
||||
def register_list():
|
||||
return render_template('register.html')
|
||||
|
||||
@app.route('/register',methods=['GET','POST'])
|
||||
def register():
|
||||
ID=request.form['ID']
|
||||
password=request.form['password']
|
||||
type=request.form['type']
|
||||
try:
|
||||
user=User(uID=ID,uPassword=password,uType=type)
|
||||
db.session.add(user)
|
||||
db.session.commit()
|
||||
return redirect('/select')
|
||||
except:
|
||||
return render_template('error.html')
|
||||
|
||||
@app.route('/login_page')
|
||||
def login_list():
|
||||
return render_template('login.html')
|
||||
|
||||
@app.route('/login',methods=['POST','GET'])
|
||||
def login():
|
||||
ID = request.form['ID']
|
||||
password = request.form['password']
|
||||
try:
|
||||
a=User.query.filter_by(uID=ID).first()
|
||||
if a.uPassword==password:
|
||||
type=a.uType
|
||||
else:
|
||||
return render_template('error.html')
|
||||
except:
|
||||
return render_template('error.html')
|
||||
if type=='default':
|
||||
return redirect('/select')
|
||||
elif type=='medical':
|
||||
return redirect('/medicalUser')
|
||||
else:
|
||||
return redirect('/comUser')
|
||||
|
||||
@app.route('/select')
|
||||
def select():
|
||||
provinces=Province.query.all()
|
||||
cities=City.query.all()
|
||||
districts=District.query.all()
|
||||
communities=Community.query.all()
|
||||
d1=[]
|
||||
d2=[]
|
||||
d3=[]
|
||||
d4=[]
|
||||
for i in provinces:
|
||||
d1.append({'provinceID':i.provinceID,'provinceName':i.provinceName,\
|
||||
'currentCount':i.currentCount,'confirmedCount':i.confirmedCount,\
|
||||
'suspectedCount':i.suspectedCount,'curedCount':i.curedCount,'deadCount':i.deadCount})
|
||||
for j in cities:
|
||||
d2.append({'cityID':j.cityID,'cityName':j.cityName,'provinceName':j.provinceName, \
|
||||
'currentCount': j.currentCount, 'confirmedCount': j.confirmedCount, \
|
||||
'suspectedCount': j.suspectedCount, 'curedCount': j.curedCount, 'deadCount': j.deadCount})
|
||||
for k in districts:
|
||||
d3.append({'districtID':k.districtID,'districtName':k.districtName,'cityId':k.cityID, \
|
||||
'currentCount': k.currentCount, 'confirmedCount': k.confirmedCount, \
|
||||
'suspectedCount': k.suspectedCount, 'curedCount': k.curedCount, 'deadCount': k.deadCount})
|
||||
for l in communities:
|
||||
d4.append({'cID':l.cID,'cName':l.cName,'districtID':l.districtID, \
|
||||
'currentCount': l.currentCount, 'confirmedCount': l.confirmedCount, \
|
||||
'suspectedCount': l.suspectedCount, 'curedCount': l.curedCount, 'deadCount': l.deadCount})
|
||||
return render_template('select.html',d1=d1,d2=d2,d3=d3,d4=d4)
|
||||
|
||||
@app.route('/medicalUser')
|
||||
def medicalUser():
|
||||
hospitals = Hospital.query.all()
|
||||
d1=[]
|
||||
for l in hospitals:
|
||||
d1.append({'districtID':l.districtID,'ID':l.hID,'name':l.hName,'storage':l.hStorage,\
|
||||
'current':l.hCurrent,'crued':l.hCured,'dead':l.hDead})
|
||||
distributions=Distribute3.query.all()
|
||||
d2=[]
|
||||
for i in distributions:
|
||||
ware=Ware.query.filter_by(wareID=i.wareID).first()
|
||||
name=ware.wareName
|
||||
d2.append({'wareID':i.wareID,'wareName':name,'wareNum':i.wareNum,'hospitalID':i.hID})
|
||||
patients=Treat.query.all()
|
||||
d3=[]
|
||||
for a in patients:
|
||||
d3.append({'ID':a.treatID,'rID':a.rID,'hID':a.hID,'startDate':a.startDate,\
|
||||
'endDate':a.endDate,'endStatus':a.endStatus})
|
||||
return render_template('medicalUser.html',d1=d1,d2=d2,d3=d3)
|
||||
|
||||
@app.route('/cruedPatient',methods=['GET'])
|
||||
def cruedP():
|
||||
try:
|
||||
id=request.args.get('id')#获取病人id
|
||||
hid=request.args.get('hid')#获取医院id
|
||||
rid=request.args.get('rid')
|
||||
patient=Treat.query.filter_by(treatID=id).first()
|
||||
patient.endStatus='crued'
|
||||
db.session.commit()
|
||||
hospital=Hospital.query.filter_by(hID=hid).first()
|
||||
hospital.hCured+=1
|
||||
db.session.commit()
|
||||
resident=Resident.query.filter_by(rID=rid).first()
|
||||
resident.rStatus='crued'
|
||||
db.session.commit()
|
||||
rlive=resident.rLive
|
||||
community=Community.query.filter_by(cID=rlive).first()
|
||||
community.currentCount-=1
|
||||
community.curedCount+=1
|
||||
db.session.commit()
|
||||
did=community.districtID
|
||||
district=District.query.filter_by(districtID=did).first()
|
||||
district.currentCount -= 1
|
||||
district.curedCount += 1
|
||||
db.session.commit()
|
||||
return redirect('/medicalUser')
|
||||
except:
|
||||
return render_template('error.html')
|
||||
|
||||
@app.route('/deadPatient',methods=['GET'])
|
||||
def deadP():
|
||||
try:
|
||||
id=request.args.get('id')#获取病人id
|
||||
hid=request.args.get('hid')#获取医院id
|
||||
rid = request.args.get('rid')
|
||||
patient=Treat.query.filter_by(treatID=id).first()
|
||||
patient.endStatus='dead'
|
||||
db.session.commit()
|
||||
hospital=Hospital.query.filter_by(hID=hid).first()
|
||||
hospital.hDead+=1
|
||||
db.session.commit()
|
||||
resident = Resident.query.filter_by(rID=rid).first()
|
||||
resident.rStatus = 'dead'
|
||||
db.session.commit()
|
||||
rlive = resident.rLive
|
||||
community = Community.query.filter_by(cID=rlive).first()
|
||||
community.currentCount -= 1
|
||||
community.deadCount += 1
|
||||
db.session.commit()
|
||||
did = community.districtID
|
||||
district = District.query.filter_by(districtID=did).first()
|
||||
district.currentCount -= 1
|
||||
district.deadCount += 1
|
||||
db.session.commit()
|
||||
return redirect('/medicalUser')
|
||||
except:
|
||||
return render_template('error.html')
|
||||
|
||||
|
||||
@app.route('/addPatient')
|
||||
def addPPage():
|
||||
return render_template('addPatient.html')
|
||||
|
||||
@app.route('/addP',methods=['GET','POST'])
|
||||
def addP():
|
||||
rID=request.form['rID']
|
||||
hID=request.form['hID']
|
||||
startDate=request.form['startDate']
|
||||
patient=Treat(rID=rID,hID=hID,startDate=startDate)
|
||||
hospital=Hospital.query.filter_by(hID=hID).first()
|
||||
hospital.hCurrent+=1 #医院累计收治人数增加
|
||||
resident=Resident.query.filter_by(rID=rID).first()
|
||||
community=Community.query.filter_by(cID=resident.rLive).first()
|
||||
resident.rStatus='comfirmed'#居民状态更改为确诊
|
||||
db.session.add(patient)
|
||||
db.session.commit()
|
||||
rlive = resident.rLive
|
||||
community = Community.query.filter_by(cID=rlive).first()
|
||||
community.currentCount += 1
|
||||
community.confirmedCount += 1
|
||||
db.session.commit()
|
||||
did = community.districtID
|
||||
district = District.query.filter_by(districtID=did).first()
|
||||
district.currentCount += 1
|
||||
district.confirmedCount += 1
|
||||
db.session.commit()
|
||||
return redirect('/medicalUser')
|
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加病人</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/addP" method="post">
|
||||
病人身份ID <input type="text" name="rID"/>
|
||||
医院ID <input type="text" name="hID"/>
|
||||
入院时间 <input type="date" name="startDate">
|
||||
<input type="submit" value="提交">
|
||||
</form>
|
||||
<body>
|
||||
<html>
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>普通用户</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://127.0.0.1:5000/select">查询</a>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>错误!</title>
|
||||
</head>
|
||||
<body>
|
||||
<a herf="/select">点此返回首页<a/>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>用户登录</title>
|
||||
</head>
|
||||
<body>
|
||||
<body>
|
||||
<form action="/login" method="post">
|
||||
用户ID <input type="text" name="ID"/>
|
||||
密码 <input type="password" name="password"/>
|
||||
<input type="submit" value="登录">
|
||||
<form/>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>医疗单位用户</title>
|
||||
</head>
|
||||
<body>
|
||||
<table width="600" cellpadding="5" align="center" border="1" cellspacing="0">
|
||||
<th align="center" colspan="7">医院信息</th>
|
||||
<tr>
|
||||
<td>区ID</td>
|
||||
<td>医院ID</td>
|
||||
<td>医院名称</td>
|
||||
<td>最大容纳病人数</td>
|
||||
<td>在院人数</td>
|
||||
<td>治愈人数</td>
|
||||
<td>死亡人数</td>
|
||||
</tr>
|
||||
{% for item in d1 %}
|
||||
<tr>
|
||||
<td>{{item.districtID}}</td>
|
||||
<td>{{item.ID}}</td>
|
||||
<td>{{item.name}}</td>
|
||||
<td>{{item.storage}}</td>
|
||||
<td>{{item.current}}</td>
|
||||
<td>{{item.crued}}</td>
|
||||
<td>{{item.dead}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<br>
|
||||
</table>
|
||||
<table width="600" cellpadding="5" align="center" border="1" cellspacing="0">
|
||||
<th align="center" colspan="4">物资供给</th>
|
||||
<tr>
|
||||
<td>物资ID</td>
|
||||
<td>物资名称</td>
|
||||
<td>数量</td>
|
||||
<td>医院ID</td>
|
||||
</tr>
|
||||
{% for item in d2 %}
|
||||
<tr>
|
||||
<td>{{item.wareID}}</td>
|
||||
<td>{{item.wareName}}</td>
|
||||
<td>{{item.wareNum}}</td>
|
||||
<td>{{ item.hospitalID }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<br>
|
||||
</table>
|
||||
<table width="600" cellpadding="5" align="center" border="1" cellspacing="0">
|
||||
<th align="center" colspan="6">病人信息</th>
|
||||
<tr>
|
||||
<td>病人ID</td>
|
||||
<td>医院名称</td>
|
||||
<td>入院时间</td>
|
||||
<td>出院时间</td>
|
||||
<td>出院状态</td>
|
||||
<td>操作</td>
|
||||
</tr>
|
||||
{% for item in d3 %}
|
||||
<tr>
|
||||
<td>{{item.rID}}</td>
|
||||
<td>{{item.hID}}</td>
|
||||
<td>{{item.startDate}}</td>
|
||||
<td>{{item.endDate}}</td>
|
||||
<td>{{item.endStatus}}</td>
|
||||
<td><a href="/cruedPatient?id={{ item.ID }}&hid={{ item.hID }}&rid={{ item.rID }}">出院</a> <a href="/deadPatient?id={{ item.ID }}&hid={{ item.hID }}">死亡</a><!-- <a href="/alterPatient?id={{ item.ID }}">修改</a>--></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<br>
|
||||
</table>
|
||||
<a href="/addPatient">添加病人</a>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>用户注册</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="/register" method="post">
|
||||
用户ID <input type="text" name="ID"/>
|
||||
密码 <input type="password" name="password"/>
|
||||
<tr>
|
||||
用户类型 <input type="checkbox" name="type" Value="default"/>
|
||||
<input type="checkbox" name="type" Value="medical"/>
|
||||
<input type="checkbox" name="type" Value="com"/>
|
||||
<input type="submit" value="注册">
|
||||
<form/>
|
||||
<body>
|
||||
<html>
|
@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>信息查询</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="register_page">用户注册</a>
|
||||
<a href="login_page">用户登录</a>
|
||||
<h4>普通用户查询结果</h4>
|
||||
|
||||
<div align="center">
|
||||
<br>
|
||||
<table width="600" cellpadding="5" align="center" border="1" cellspacing="0">
|
||||
<th align="center" colspan="7">省信息</th>
|
||||
<tr>
|
||||
<td>省/自治区/直辖市ID</td>
|
||||
<td>名称</td>
|
||||
<td>现有感染人数</td>
|
||||
<td>累计感染人数</td>
|
||||
<td>疑似感染人数</td>
|
||||
<td>治愈</td>
|
||||
<td>死亡</td>
|
||||
</tr>
|
||||
{% for item in d1 %}
|
||||
<tr>
|
||||
<td>{{item.provinceID}}</td>
|
||||
<td>{{item.provinceName}}</td>
|
||||
<td>{{item.currentCount}}</td>
|
||||
<td>{{item.confirmedCount}}</td>
|
||||
<td>{{item.suspectedCount}}</td>
|
||||
<td>{{item.curedCount}}</td>
|
||||
<td>{{item.deadCount}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<br>
|
||||
</table>
|
||||
<table width="600" cellpadding="5" align="center" border="1" cellspacing="0">
|
||||
<th align="center" colspan="8">城市信息</th>
|
||||
<tr>
|
||||
<td>市ID</td>
|
||||
<td>名称</td>
|
||||
<td>省ID</td>
|
||||
<td>现有感染人数</td>
|
||||
<td>累计感染人数</td>
|
||||
<td>疑似感染人数</td>
|
||||
<td>治愈</td>
|
||||
<td>死亡</td>
|
||||
</tr>
|
||||
{% for item in d2 %}
|
||||
<tr>
|
||||
<td>{{item.cityID}}</td>
|
||||
<td>{{item.cityName}}</td>
|
||||
<td>{{item.provinceName}}</td>
|
||||
<td>{{item.currentCount}}</td>
|
||||
<td>{{item.confirmedCount}}</td>
|
||||
<td>{{item.suspectedCount}}</td>
|
||||
<td>{{item.curedCount}}</td>
|
||||
<td>{{item.deadCount}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<table width="600" cellpadding="5" align="center" border="1" cellspacing="0">
|
||||
<th align="center" colspan="8">区信息</th>
|
||||
<tr>
|
||||
<td>区ID</td>
|
||||
<td>名称</td>
|
||||
<td>现有感染人数</td>
|
||||
<td>累计感染人数</td>
|
||||
<td>疑似感染人数</td>
|
||||
<td>治愈</td>
|
||||
<td>死亡</td>
|
||||
</tr>
|
||||
{% for item in d3 %}
|
||||
<tr>
|
||||
<td>{{item.districtID}}</td>
|
||||
<td>{{item.districtedName}}</td>
|
||||
<td>{{item.cityID}}</td>
|
||||
<td>{{item.currentCount}}</td>
|
||||
<td>{{item.confirmedCount}}</td>
|
||||
<td>{{item.suspectedCount}}</td>
|
||||
<td>{{item.curedCount}}</td>
|
||||
<td>{{item.deadCount}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
</div><table width="600" cellpadding="5" align="center" border="1" cellspacing="0">
|
||||
<th align="center" colspan="8">社区信息</th>
|
||||
<tr>
|
||||
<td>社区ID</td>
|
||||
<td>社区名称</td>
|
||||
<td>现有感染人数</td>
|
||||
<td>累计感染人数</td>
|
||||
<td>疑似感染人数</td>
|
||||
<td>治愈</td>
|
||||
<td>死亡</td>
|
||||
</tr>
|
||||
{% for item in d4 %}
|
||||
<tr>
|
||||
<td>{{item.cID}}</td>
|
||||
<td>{{item.cName}}</td>
|
||||
<td>{{item.districtID}}</td>
|
||||
<td>{{item.currentCount}}</td>
|
||||
<td>{{item.confirmedCount}}</td>
|
||||
<td>{{item.suspectedCount}}</td>
|
||||
<td>{{item.curedCount}}</td>
|
||||
<td>{{item.deadCount}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue