收尾工作
This commit is contained in:
parent
3a1fac9100
commit
0f5cc52614
20
README.md
20
README.md
@ -1,4 +1,4 @@
|
||||
# zoo-frontend
|
||||
# zoo-frontend(大报告要求)
|
||||
|
||||
本次建设的动物信息分为以下功能:
|
||||
|
||||
@ -26,11 +26,25 @@
|
||||
- ElementUI
|
||||
- axios
|
||||
|
||||
# 说明
|
||||
# 说明(给使用者看的)
|
||||
|
||||
## 功能说明
|
||||
|
||||
首页统计面板没有对接后端,无法操作,只做观赏作用
|
||||
|
||||
其余界面均实现基本的增删改查,健康监测等复杂的功能没有实现
|
||||
|
||||
# 需要后端提供的数据
|
||||
## 使用说明
|
||||
|
||||
前端方面:下载zip或通过git拉取文件运行
|
||||
|
||||
后端方面:同上,但是application.yml中的username和password需要改成你自己数据库的用户名和密码,一般只需要改密码就行,还有其他项目配置如jdk,maven需要你自己配置
|
||||
|
||||
数据库方面:先创建一个数据库(无需建表),数据库名字为zoo,然后运行sql文件导入表和数据
|
||||
|
||||
前端需要搞好数据库和运行后端程序,才能正常运行使用
|
||||
|
||||
# 需要后端提供的数据(给后端开发看的)
|
||||
|
||||
一切以最终实现的接口为准,你需要前端提供什么数据就什么数据
|
||||
|
||||
|
@ -52,11 +52,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-button type="primary" @click="usersData">生成用户信息</el-button>
|
||||
<el-button type="primary" @click="animalsData">生成动物信息</el-button>
|
||||
<el-button type="primary" @click="breedingPlansData">生成饲养计划信息</el-button>
|
||||
<el-button type="primary" @click="archiveData">生成档案信息</el-button>
|
||||
<el-button type="primary" @click="healthData">生成健康监测信息</el-button>
|
||||
生成数据,最好先确保数据库中的各表没有数据再使用,使用方法:从左到右依次点击,每点击应该需等到弹出成功提示才继续点击下一个
|
||||
<hr />
|
||||
<el-button type="primary" @click="usersData">生成用户信息(预计需要5秒左右)</el-button>
|
||||
<el-button type="primary" @click="animalsData">生成动物信息(预计需要5秒左右)</el-button>
|
||||
<el-button type="primary" @click="breedingPlansData">生成饲养计划信息(预计需要10秒左右)</el-button>
|
||||
<el-button type="primary" @click="archiveData">生成档案信息(预计需要5分钟左右)</el-button>
|
||||
<el-button type="primary" @click="healthData">生成健康监测信息(预计需要5分钟左右)</el-button>
|
||||
<el-button type="primary" @click="$router.push('/login')">跳转登录</el-button>
|
||||
</template>
|
||||
|
||||
|
@ -176,11 +176,11 @@ function generatePhase() {
|
||||
}
|
||||
|
||||
//生成档案
|
||||
export function generateArchives() {
|
||||
export async function generateArchives() {
|
||||
const archives = []
|
||||
|
||||
let aid = 0
|
||||
store.state.animals.forEach(e => {
|
||||
for (const e of store.state.animals) {
|
||||
//分为四个周期的档案
|
||||
for (let i = 0; i < 4; i++) {
|
||||
let n;
|
||||
@ -244,13 +244,19 @@ export function generateArchives() {
|
||||
request.addHealthRequest(health)
|
||||
healths.push(health)
|
||||
aid++
|
||||
await sleep(50)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log('档案', archives)
|
||||
return archives
|
||||
}
|
||||
|
||||
function sleep(time){
|
||||
return new Promise((resolve) => setTimeout(resolve, time));
|
||||
}
|
||||
|
||||
|
||||
const healths = []
|
||||
|
||||
export function generateHealths() {
|
||||
|
Loading…
Reference in New Issue
Block a user