开发举牌验收功能
parent
f96590ea08
commit
a3495715e8
|
@ -330,6 +330,9 @@ export default {
|
|||
case 401:
|
||||
this.$router.push("/qualityCheck");
|
||||
break;
|
||||
case 403://举牌验收
|
||||
this.$router.push("/projectChecked");
|
||||
break;
|
||||
case 501:
|
||||
this.$router.push("/photography");
|
||||
break;
|
||||
|
|
|
@ -117,6 +117,12 @@ const routes = [
|
|||
meta: { nav: 401 },
|
||||
component: () => import(/* webpackChunkName: "qualityCheck" */ "../views/quality/qualityCheck.vue"),
|
||||
},
|
||||
{
|
||||
path: "/projectChecked",
|
||||
name: "projectChecked",
|
||||
meta: { nav: 403 },
|
||||
component: () => import(/* webpackChunkName: "projectChecked" */ "../views/projectChecked.vue"),
|
||||
},
|
||||
{
|
||||
path: "/photography",
|
||||
name: "photography",
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue