fix: 对接工程概览,项目信息接口

This commit is contained in:
cjp 2023-10-16 16:14:37 +08:00
parent d97289697f
commit 45a0b6ff6f
9 changed files with 278 additions and 84 deletions

View File

@ -0,0 +1,13 @@
// 综合管理——工程概览 接口API
import http from "@/api";
const BASEURL = import.meta.env.VITE_API_URL;
// 项目信息
export const getProjectDetail = (params: {}) => {
return http.post(BASEURL + `/xmgl/project/getProjectInfoBySn`, params);
};
// 统计企业下项目各人员统计
export const getWorkerStatisticsCountApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/workerInfo/getWorkerStatisticsCount`, params);
};

View File

@ -1,14 +0,0 @@
export const Reports = [
{
id: 0,
title: "工程概况"
},
{
id: 1,
title: "责任主体"
},
{
id: 2,
title: "附件信息"
}
];

View File

@ -0,0 +1,17 @@
export const projectTypeEnum = [
{ id: 1, name: "房建" },
{ id: 2, name: "市政" },
{ id: 3, name: "安装" },
{ id: 4, name: "装饰" },
{ id: 5, name: "公路" },
{ id: 6, name: "冶炼" },
{ id: 7, name: "矿山" },
{ id: 8, name: "化工石油" },
{ id: 9, name: "水利水电" },
{ id: 10, name: "电力" },
{ id: 11, name: "农林" },
{ id: 12, name: "港口与航道" },
{ id: 13, name: "航天航空" },
{ id: 14, name: "通信" },
{ id: 15, name: "其他" }
]; //工程类别

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="leftTop"> <div class="leftTop" v-if="projectData">
<Card title="进度概况"> <Card title="进度概况">
<div class="progressContent"> <div class="progressContent">
<div style="display: flex; padding: 2% 1%; color: #fff; font-size: 16px"> <div style="display: flex; padding: 2% 1%; color: #fff; font-size: 16px">
@ -9,34 +9,48 @@
<div class="totalDay"> <div class="totalDay">
<div style="line-height: 45px"> <div style="line-height: 45px">
项目总天数 项目总天数
<span class="dayImg">1</span> <span class="dayImg" v-for="item in projectData.totalProjectDay" :key="item">{{ item }}</span>
<span class="dayImg">0</span> <!-- <span class="dayImg">0</span>
<span class="dayImg">4</span> <span class="dayImg">4</span>
<span class="dayImg">7</span> <span class="dayImg">7</span> -->
<span style="margin-left: 4%"></span> <span style="margin-left: 4%"></span>
</div> </div>
</div> </div>
<div class="residueDay"> <div class="residueDay">
<div style="line-height: 45px"> <div style="line-height: 45px">
项目剩余天数 项目剩余天数
<span class="dayImg">0</span> <span class="dayImg" v-for="item in projectData.surplusDay" :key="item">{{ item }}</span>
<span class="dayImg">2</span> <!-- <span class="dayImg">2</span>
<span class="dayImg">8</span> <span class="dayImg">8</span>
<span class="dayImg">6</span> <span class="dayImg">6</span> -->
<span style="margin-left: 4%"></span> <span style="margin-left: 4%"></span>
</div> </div>
</div> </div>
<div style="display: flex; margin-top: 3%;margin-left: 0.5%; color: #fff; font-size: 16px; width: 30%; position: absolute"> <div
style="display: flex; margin-top: 3%; margin-left: 0.5%; color: #fff; font-size: 16px; width: 30%; position: absolute"
>
<div style="width: 5px; height: 5px; background: rgba(130, 251, 234, 1); border-radius: 10px; margin: 1%"></div> <div style="width: 5px; height: 5px; background: rgba(130, 251, 234, 1); border-radius: 10px; margin: 1%"></div>
<div><i>里程碑</i></div> <div><i>里程碑</i></div>
</div> </div>
<div class="progressData"> <div class="progressData">
<div class="data" v-for="item in progressList"> <div class="data" v-for="item in progressList">
<div v-if="item.status==0" class="text" :title="item.name">{{ item.name }}</div> <div v-if="item.status == 0" class="text" :title="item.name">{{ item.name }}</div>
<img v-if="item.status==0" src="@/assets/images/comprehensiveManage/project7.png" alt="" /> <img v-if="item.status == 0" src="@/assets/images/comprehensiveManage/project7.png" alt="" />
<div v-if="item.status==1" style="color: #fff;font-size:18px;margin-top: -8%;" :title="item.name" class="statusImg1">{{ item.name }}</div> <div
<img v-if="item.status==1" style="width: 40px;margin-top: 2%;" src="@/assets/images/comprehensiveManage/project11.png" alt="" /> v-if="item.status == 1"
<div v-if="item.status==1" class="statusImg"></div> style="color: #fff; font-size: 18px; margin-top: -8%"
:title="item.name"
class="statusImg1"
>
{{ item.name }}
<div v-if="item.status == 1" class="statusImg"></div>
</div>
<img
v-if="item.status == 1"
style="width: 40px; margin-top: 2%"
src="@/assets/images/comprehensiveManage/project11.png"
alt=""
/>
</div> </div>
</div> </div>
</div> </div>
@ -46,7 +60,7 @@
<script setup lang="ts"> <script setup lang="ts">
import Card from "@/components/card.vue"; import Card from "@/components/card.vue";
import { ref } from "vue"; import { ref, watch } from "vue";
const progressList = ref([ const progressList = ref([
{ {
name: "施工证获取", name: "施工证获取",
@ -62,7 +76,7 @@ const progressList = ref([
}, },
{ {
name: "支护开始", name: "支护开始",
status: 1 status: 0
}, },
{ {
name: "垫层完成", name: "垫层完成",
@ -81,6 +95,29 @@ const progressList = ref([
status: 0 status: 0
} }
]); ]);
// ts
type Props = {
projectData?: any; //
};
// withDefaults ()
const props = withDefaults(defineProps<Props>(), {
projectData: null
});
//
const projectData = ref(null as any);
watch(
() => props.projectData,
newVal => {
// console.log(newVal, "newVal");
if (newVal) {
// props.xData = newVal;
projectData.value = newVal;
// console.log("", projectData.value.constructionStage);
progressList.value[projectData.value.constructionStage].status = 1;
}
}
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -124,7 +161,7 @@ const progressList = ref([
background: url("@/assets/images/comprehensiveManage/project4.png") no-repeat; background: url("@/assets/images/comprehensiveManage/project4.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
cursor: pointer; cursor: pointer;
.data { .data {
color: #ccc; color: #ccc;
font-size: 15px; font-size: 15px;
@ -139,26 +176,27 @@ const progressList = ref([
img { img {
width: 20px; width: 20px;
margin-top: 18%; margin-top: 18%;
margin-left: 15%; margin-left: 15%;
} }
} }
.statusImg{ .statusImg {
position: absolute; position: absolute;
top: 97%; top: 190%;
left: 45%; left: -40%;
width: 120px; width: 120px;
height: 2px; height: 2px;
background: url("@/assets/images/comprehensiveManage/project6.png") no-repeat; background: url("@/assets/images/comprehensiveManage/project6.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.statusImg1{ .statusImg1 {
background: url("@/assets/images/comprehensiveManage/project5.png") no-repeat; position: relative;
background-size: 100% 100%; background: url("@/assets/images/comprehensiveManage/project5.png") no-repeat;
} background-size: 100% 100%;
}
} }
} }
::v-deep .h-card .content { ::v-deep .h-card .content {
height: 80%; height: 80%;
margin-top: 1.8%; margin-top: 1.8%;
} }
</style> </style>

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="leftTop"> <div class="leftTop" v-if="projectData">
<Card title="宣传视频"> <Card title="宣传视频">
<div class="videoBox"> <div class="videoBox">
<video src="" class="videos" autoplay controls loop></video> <video :src="BASEURL + '/image/' + projectData.videoUrl" class="videos" autoplay controls loop></video>
</div> </div>
</Card> </Card>
</div> </div>
@ -10,6 +10,29 @@
<script setup lang="ts"> <script setup lang="ts">
import Card from "@/components/card.vue"; import Card from "@/components/card.vue";
import { ref, onMounted, watch } from "vue";
// ts
type Props = {
projectData?: any; //
};
// withDefaults ()
const props = withDefaults(defineProps<Props>(), {
projectData: null
});
//
const projectData = ref(null as any);
watch(
() => props.projectData,
newVal => {
// console.log(newVal, "newVal");
if (newVal) {
// props.xData = newVal;
projectData.value = newVal;
}
}
);
const BASEURL = import.meta.env.VITE_API_URL;
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -31,4 +54,4 @@ import Card from "@/components/card.vue";
::v-deep .h-card .content { ::v-deep .h-card .content {
background: none; background: none;
} }
</style> </style>

View File

@ -1,13 +1,13 @@
<template> <template>
<div class="projectContent"> <div class="projectContent">
<div class="left"> <div class="left">
<leftTop class="leftTop"></leftTop> <leftTop :projectData="projectData" class="leftTop"></leftTop>
<leftCenter class="leftCenter"></leftCenter> <leftCenter :statisticsCount="statisticsCount" class="leftCenter"></leftCenter>
<leftBottom class="leftBottom"></leftBottom> <leftBottom :statisticsCount="statisticsCount" class="leftBottom"></leftBottom>
</div> </div>
<div class="center"> <div class="center">
<centerTop class="centerTop"></centerTop> <centerTop :projectData="projectData" class="centerTop"></centerTop>
<centerBottom class="centerBottom"></centerBottom> <centerBottom :projectData="projectData" class="centerBottom"></centerBottom>
</div> </div>
<div class="right"> <div class="right">
<rightTop class="rightTop"></rightTop> <rightTop class="rightTop"></rightTop>
@ -26,6 +26,32 @@ import centerBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOv
import rightTop from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightTop.vue"; import rightTop from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightTop.vue";
import rightCenter from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightCenter.vue"; import rightCenter from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightCenter.vue";
import rightBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightBottom.vue"; import rightBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightBottom.vue";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
import { getWorkerStatisticsCountApi, getProjectDetail } from "@/api/modules/projectOverview";
import { ref, onMounted } from "vue";
const statisticsCount = ref(null as any);
const projectData = ref(null as any);
//
const getProjectInfo = async () => {
const res = await getProjectDetail({ projectSn: store.sn });
// console.log("", res);
// console.log("", projectTypeEnum);
projectData.value = res.result;
};
//
const getPersonDetail = async () => {
const res = await getWorkerStatisticsCountApi({ projectSn: store.sn });
// console.log("", res);
// console.log("", projectTypeEnum);
statisticsCount.value = res.result;
};
onMounted(() => {
getPersonDetail();
getProjectInfo();
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.projectContent { .projectContent {
@ -49,19 +75,18 @@ import rightBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOve
width: 46%; width: 46%;
margin: 0 1%; margin: 0 1%;
.centerTop{ .centerTop {
height: 66%; height: 66%;
margin-bottom: 2.1%; margin-bottom: 2.1%;
} }
.centerBottom{ .centerBottom {
height: 32%; height: 32%;
} }
} }
.right { .right {
width: 26%; width: 26%;
.rightTop { .rightTop {
height: 32%; height: 32%;
} }
.rightCenter { .rightCenter {
@ -73,4 +98,4 @@ import rightBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOve
} }
} }
} }
</style> </style>

View File

@ -1,13 +1,17 @@
<template> <template>
<div class="leftTop"> <div class="leftTop" v-if="statisticsCount">
<Card title="智能设备"> <Card title="智能设备">
<div class="deviceData"> <div class="deviceData">
<div class="deviceDataA"> <div class="deviceDataA">
<div class="num"><i>2</i></div> <div class="num">
<i>{{ statisticsCount.devcount.ufaceDevNum }}</i>
</div>
<div class="text">实名制设备数</div> <div class="text">实名制设备数</div>
</div> </div>
<div class="deviceDataB"> <div class="deviceDataB">
<div class="num"><i>2</i></div> <div class="num">
<i>{{ statisticsCount.devcount.environmentDevNum }}</i>
</div>
<div class="text">环境设备数</div> <div class="text">环境设备数</div>
</div> </div>
</div> </div>
@ -17,6 +21,28 @@
<script setup lang="ts"> <script setup lang="ts">
import Card from "@/components/card.vue"; import Card from "@/components/card.vue";
import { ref, onMounted, watch } from "vue";
// ts
type Props = {
statisticsCount?: any; //
};
// withDefaults ()
const props = withDefaults(defineProps<Props>(), {
statisticsCount: null
});
//
const statisticsCount = ref(null as any);
watch(
() => props.statisticsCount,
newVal => {
// console.log(newVal, "newVal");
if (newVal) {
// props.xData = newVal;
statisticsCount.value = newVal;
}
}
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -63,4 +89,4 @@ import Card from "@/components/card.vue";
::v-deep .h-card .content { ::v-deep .h-card .content {
height: 80%; height: 80%;
} }
</style> </style>

View File

@ -1,14 +1,18 @@
<template> <template>
<div class="leftTop"> <div class="leftTop" v-if="statisticsCount">
<Card title="人员概况"> <Card title="人员概况">
<div class="topPeopleNum"> <div class="topPeopleNum">
<div class="dataTlo"> <div class="dataTlo">
<div class="text"><i>实名制人数</i></div> <div class="text"><i>实名制人数</i></div>
<div class="num"><i>1024</i></div> <div class="num">
<i>{{ statisticsCount.workercount.totalPerson }}</i>
</div>
</div> </div>
<div class="dataTlt"> <div class="dataTlt">
<div class="text"><i>在场人数</i></div> <div class="text"><i>在场人数</i></div>
<div class="num"><i>1024</i></div> <div class="num">
<i>{{ statisticsCount.presencecount.lwPersonTotal }}</i>
</div>
</div> </div>
</div> </div>
<div class="bottomPeopleNum"> <div class="bottomPeopleNum">
@ -23,15 +27,27 @@
<div class="penN"></div> <div class="penN"></div>
<div class="numData1 numData"> <div class="numData1 numData">
<div class="text"><i>甲方人员</i></div> <div class="text"><i>甲方人员</i></div>
<div class="num"><i style="color: #eea959">1/2</i></div> <div class="num">
<i style="color: #eea959"
>{{ statisticsCount.presencecount.jfGlPersonTotal }}/{{ statisticsCount.workercount.jfGlPersonTotal }}</i
>
</div>
</div> </div>
<div class="numData2 numData"> <div class="numData2 numData">
<div class="text"><i>监理人员</i></div> <div class="text"><i>监理人员</i></div>
<div class="num"><i style="color: #82fbea">1/1</i></div> <div class="num">
<i style="color: #82fbea"
>{{ statisticsCount.presencecount.jlGlPersonTotal }}/{{ statisticsCount.workercount.jlGlPersonTotal }}</i
>
</div>
</div> </div>
<div class="numData3 numData"> <div class="numData3 numData">
<div class="text"><i>乙方人员</i></div> <div class="text"><i>乙方人员</i></div>
<div class="num"><i style="color: #7aa0ea">0/1</i></div> <div class="num">
<i style="color: #7aa0ea"
>{{ statisticsCount.presencecount.yfGlPersonTotal }}/{{ statisticsCount.workercount.yfGlPersonTotal }}</i
>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -42,6 +58,29 @@
<script setup lang="ts"> <script setup lang="ts">
import Card from "@/components/card.vue"; import Card from "@/components/card.vue";
import { GlobalStore } from "@/stores";
import { ref, onMounted, watch } from "vue";
// ts
type Props = {
statisticsCount?: any; //
};
// withDefaults ()
const props = withDefaults(defineProps<Props>(), {
statisticsCount: null
});
//
const statisticsCount = ref(null as any);
watch(
() => props.statisticsCount,
newVal => {
// console.log(newVal, "newVal");
if (newVal) {
// props.xData = newVal;
statisticsCount.value = newVal;
}
}
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -147,4 +186,4 @@ import Card from "@/components/card.vue";
::v-deep .h-card .content { ::v-deep .h-card .content {
height: 80%; height: 80%;
} }
</style> </style>

View File

@ -1,14 +1,17 @@
<template> <template>
<div class="leftTop"> <div class="leftTop">
<Card title="项目信息"> <Card title="项目信息">
<div class="projectInfo"> <div class="projectInfo" v-if="projectData">
<div><span>项目名称</span> 福永意库项目</div> <div><span>项目名称</span> {{ projectData.projectName }}</div>
<div><span>项目地址</span> 广东省深圳市宝安区丰业路德轩阁东南侧约70米</div> <div>
<div><span>项目经理</span> 李翔</div> <span>项目地址</span> {{ projectData.provinceName }}{{ projectData.cityName }} {{ projectData.areaName
<div><span>联系电话</span> 13538606766</div> }}{{ projectData.projectAddress }}
<div><span>建筑面积</span> 150000</div> </div>
<div><span>开工日期</span> 项目编号</div> <div><span>项目经理</span> {{ projectData.projectManage }}</div>
<div><span>工程类别</span> 房建</div> <div><span>联系电话</span> {{ projectData.projectTel }}</div>
<div><span>建筑面积</span> {{ projectData.projectAcreage }} </div>
<div><span>开工日期</span> {{ projectData.startWorkDate }}</div>
<div><span>工程类别</span> {{ projectData.projectType ? projectTypeEnum[projectData.projectType - 1].name : "" }}</div>
</div> </div>
</Card> </Card>
</div> </div>
@ -16,6 +19,30 @@
<script setup lang="ts"> <script setup lang="ts">
import Card from "@/components/card.vue"; import Card from "@/components/card.vue";
import { GlobalStore } from "@/stores";
import { ref, onMounted, watch } from "vue";
import { projectTypeEnum } from "@/enums/project/projectTypeEnum";
// ts
type Props = {
projectData?: any; //
};
// withDefaults ()
const props = withDefaults(defineProps<Props>(), {
projectData: null
});
//
const projectData = ref(null as any);
watch(
() => props.projectData,
newVal => {
// console.log(newVal, "newVal");
if (newVal) {
// props.xData = newVal;
projectData.value = newVal;
}
}
);
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -31,13 +58,13 @@ import Card from "@/components/card.vue";
div { div {
height: 13%; height: 13%;
font-size: 14px; font-size: 14px;
span{ span {
color: #ccc; color: #ccc;
} }
} }
} }
} }
::v-deep .h-card .content { ::v-deep .h-card .content {
height: 80%; height: 80%;
} }
</style> </style>