收尾工作

This commit is contained in:
bicey 2024-06-10 12:32:27 +08:00
parent 3a1fac9100
commit 0f5cc52614
3 changed files with 47 additions and 25 deletions

View File

@ -1,4 +1,4 @@
# zoo-frontend
# zoo-frontend(大报告要求)
本次建设的动物信息分为以下功能:
@ -26,11 +26,25 @@
- ElementUI
- axios
# 说明
# 说明(给使用者看的)
## 功能说明
首页统计面板没有对接后端,无法操作,只做观赏作用
其余界面均实现基本的增删改查,健康监测等复杂的功能没有实现
# 需要后端提供的数据
## 使用说明
前端方面下载zip或通过git拉取文件运行
后端方面同上但是application.yml中的username和password需要改成你自己数据库的用户名和密码一般只需要改密码就行还有其他项目配置如jdkmaven需要你自己配置
数据库方面先创建一个数据库无需建表数据库名字为zoo然后运行sql文件导入表和数据
前端需要搞好数据库和运行后端程序,才能正常运行使用
# 需要后端提供的数据(给后端开发看的)
一切以最终实现的接口为准,你需要前端提供什么数据就什么数据

View File

@ -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>

View File

@ -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() {