Commit 598b0f42 authored by lueyuw's avatar lueyuw
Browse files

save progress

parents aedd77eb 19842f5a
# icu-diary-3
# vue-admin-template
> A minimal vue admin template with Element UI & axios & iconfont & permission control & lint
**Live demo:**
**The current version is `v4.0+` build on `vue-cli`. If you want to use the old version , you can switch branch to [tag/3.11.0](, it does not rely on `vue-cli`**
## Build Setup
# clone the project
git clone
# enter the project directory
cd vue-admin-template
# install dependency
# Build Setup (frontend)
npm install
# develop
npm run dev
This will automatically open http://localhost:9528
## Build
# build for test environment
npm run build:stage
# build for production environment
npm run build:prod
# Running the backend server (open a new terminal tab)
# make sure postgresql is downloaded, command is below if needed
brew install postgresql
# if database update is needed for mac
brew postgresql-upgrade-database
## Advanced
# make sure postgresql is running for mac
brew services restart postgresql
# preview the release environment effect
npm run preview
# use db script to create database
./bin/db create
# preview the release environment effect + static resource analysis
npm run preview -- --report
# use db script to reset database if needed
./bin/db reset
# code format check
npm run lint
# code format check and auto fix
npm run lint -- --fix
# make sure to have a virtual environment before running
python backend/
Refer to [Documentation]( for more information
## Demo
## Extra
If you want router permission && generate menu by user roles , you can use this branch [permission-control](
For `typescript` version, you can use [vue-typescript-admin-template]( (Credits: [@Armour](
## Related Project
- [vue-element-admin](
## Browsers support
Modern browsers and Internet Explorer 10+.
| [<img src="" alt="IE / Edge" width="24px" height="24px" />](</br>IE / Edge | [<img src="" alt="Firefox" width="24px" height="24px" />](</br>Firefox | [<img src="" alt="Chrome" width="24px" height="24px" />](</br>Chrome | [<img src="" alt="Safari" width="24px" height="24px" />](</br>Safari |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
# User types
You can create a new account of any type (Clinician, Patient, Family&Friends) using "Create Account" for testing/debugging.
......@@ -141,16 +141,29 @@ def validate_login():
json_data = {'username': username,
'userType': query[0]['userType']}
json.dump(json_data, f)
return jsonify(True)
return jsonify(json_data)
with open('info.json') as json_file:
json_data = json.load(json_file)
if json_data['username']:
return jsonify(True)
return jsonify(json_data)
return jsonify(False)
@app.route('/user/search', methods=["GET", "POST"])
def search_user():
username = request.args.get('username')
if username is not None:
connection = get_db()
cur = connection.execute(
"select userType from users where username = ?", (username,))
query = cur.fetchall()
return jsonify({'userType': query[0]['userType']})
return jsonify(False)
@ app.route('/message', methods=["POST"])
def send_messages():
"""Send messages to different users."""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment