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

View File

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