fix: 大屏同录数量顶部数据对接

This commit is contained in:
lonewolfyx 2026-03-23 10:08:20 +08:00
parent c4be79d995
commit e3c8ea901d
3 changed files with 29 additions and 6 deletions

8
src/api/inspector.js Normal file
View File

@ -0,0 +1,8 @@
import request from "@/utils/request";
export const getTongJiData = () => {
return request({
method: 'post',
url: '/caserecord/countByPeriod',
})
}

View File

@ -7,22 +7,22 @@
<div style="display: grid;grid-template-columns: repeat(4,minmax(0,1fr));gap: 20px">
<Card title="总同录数量">
<div class="shu">
<span>6090.99</span>
<span>{{ tongji.totalCount }}</span>
</div>
</Card>
<Card title="本年同录数量">
<div class="shu">
<span>6090.99</span>
<span>{{ tongji.yearCount }}</span>
</div>
</Card>
<Card title="本月同录数量">
<div class="shu">
<span>6090.99</span>
<span>{{tongji.monthCount}}</span>
</div>
</Card>
<Card title="本周同录数量">
<div class="shu">
<span>6090.99</span>
<span>{{ tongji.weekCount }}</span>
</div>
</Card>
</div>
@ -55,10 +55,25 @@
<script>
import Card from "@/views/inspector/components/Card.vue";
import {getTongJiData} from "@/api/inspector";
export default {
name: 'inspector',
components: {Card},
data() {
return {
tongji: {}
}
},
async mounted() {
await this.getTongJi()
},
methods: {
async getTongJi() {
const data = await getTongJiData()
this.tongji = data.data
}
}
}
</script>

View File

@ -46,7 +46,7 @@ module.exports = {
// target: `http://120.79.202.7:443`,
// target: `http://100.100.10.216:8099`,
// target: 'http://106.15.139.36:18090',
// target: 'http://127.0.0.1:18098',
target: 'http://127.0.0.1:18098',
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''