1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-06 07:21:24 +08:00

Update home page layout, update work card layout.

Optimize t_work table queries.
This commit is contained in:
GGB
2023-05-19 17:02:22 +08:00
parent 523b0faa88
commit ef878f7edf
5 changed files with 139 additions and 118 deletions

View File

@@ -1,30 +1,60 @@
<template>
<el-row style="width: 100%" :gutter="20">
<el-col :span="12">
<work-card />
</el-col>
<el-col :span="12">
<work-card />
</el-col>
</el-row>
<el-row style="width: 100%" :gutter="20">
<el-col :span="12">
<work-card />
</el-col>
<el-col :span="12">
<work-card />
</el-col>
</el-row>
<div style="height: calc(100vh - 56px - 40px); min-height: calc(500px - 56px - 40px)">
<el-row :gutter="20">
<el-col :span="12">
<work-card :table-data="tableData" />
</el-col>
<el-col :span="12">
<work-card :table-data="tableData" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<work-card :table-data="tableData" />
</el-col>
<el-col :span="12">
<work-card :table-data="tableData" />
</el-col>
</el-row>
</div>
</template>
<script>
import request from '@/services'
export default {
name: 'HomePage'
name: 'HomePage',
data() {
return {
tableData: []
}
},
methods: {
getTableData() {
request
.get('/work/card')
.then((response) => {
this.tableData = response.data.data
})
.catch((reportError) => {
console.log(reportError)
})
}
},
created() {
this.getTableData()
},
updated() {
this.getTableData()
}
}
</script>
<style scoped>
.el-row {
width: 100%;
height: calc((100vh - 56px - 40px - 20px) / 2);
min-height: calc((500px - 56px - 40px - 20px) / 2);
margin-bottom: 20px;
}
</style>