开发举牌验收功能

dev_xd
lj7788@126.com 2025-07-30 18:31:26 +08:00
parent f96590ea08
commit a3495715e8
3 changed files with 105 additions and 0 deletions

View File

@ -330,6 +330,9 @@ export default {
case 401: case 401:
this.$router.push("/qualityCheck"); this.$router.push("/qualityCheck");
break; break;
case 403://
this.$router.push("/projectChecked");
break;
case 501: case 501:
this.$router.push("/photography"); this.$router.push("/photography");
break; break;

View File

@ -117,6 +117,12 @@ const routes = [
meta: { nav: 401 }, meta: { nav: 401 },
component: () => import(/* webpackChunkName: "qualityCheck" */ "../views/quality/qualityCheck.vue"), component: () => import(/* webpackChunkName: "qualityCheck" */ "../views/quality/qualityCheck.vue"),
}, },
{
path: "/projectChecked",
name: "projectChecked",
meta: { nav: 403 },
component: () => import(/* webpackChunkName: "projectChecked" */ "../views/projectChecked.vue"),
},
{ {
path: "/photography", path: "/photography",
name: "photography", name: "photography",

View File

@ -0,0 +1,96 @@
<template>
<div class="project-checked main-page">
<el-col :span="6" class="h100">
<module-one-1-1 label="举牌验收数量统计" class="chart1-module">
<doughnut-chart :data="doughnutData" title="验收统计"/>
</module-one-1-1>
<module-one-2-1 label="本周验收列表">
</module-one-2-1>
</el-col>
<el-col :span="18" class="h100">
<module-one-2-3 label="举牌验收列表" class="h66">
</module-one-2-3>
<module-one-1-3 label="举牌验收技术员统计" class="h33">
</module-one-1-3>
</el-col>
</div>
</template>
<script>
import DoughnutChart from '@/components/doughnutChart.vue'
export default {
components: {
DoughnutChart
},
data() {
return {
dpi: "",
chartKey: 0,
selProject: null,
// -
doughnutData: [
{ name: '未开始', value: 15 },
{ name: '进行中(正常)', value: 45 },
{ name: '进行中(滞后)', value: 25 },
{ name: '已完成(正常)', value: 10 },
{ name: '已完成(滞后)', value: 5 }
]
}
},
mounted() {
this.$store.dispatch("ChangeNav", 403);
this.$bus.$on(
"projectChange",
debounce((prj) => {
this.selProject = prj;
this.init();
})
);
this.selProject = this.$store.getters.selProject;
this.init();
this.dpi = this.$dpi();
window.addEventListener("resize", () => {
if (this.dpi != this.$dpi()) {
this.dpi = this.$dpi();
this.resize();
}
});
this.resize();
},
methods: {
init() {
this.chartKey++;
// API
this.loadDoughnutData();
},
resize() {
this.$refs.chart && this.$refs.chart.resize();
},
loadDoughnutData() {
// API
// this.$api.project.getCheckStats().then(res => {
// this.doughnutData = res.data;
// })
}
}
}
</script>
<style lang="less">
.project-checked {
.screen-module{
&.h66{
height: calc(66% - 20px) !important;
}
&.h33{
height: calc(33% - 20px) !important;
}
}
}
</style>