fix: 对接工程概览,项目信息接口
This commit is contained in:
parent
d97289697f
commit
45a0b6ff6f
13
src/api/modules/projectOverview.ts
Normal file
13
src/api/modules/projectOverview.ts
Normal 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);
|
||||
};
|
||||
@ -1,14 +0,0 @@
|
||||
export const Reports = [
|
||||
{
|
||||
id: 0,
|
||||
title: "工程概况"
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
title: "责任主体"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: "附件信息"
|
||||
}
|
||||
];
|
||||
17
src/enums/project/projectTypeEnum.ts
Normal file
17
src/enums/project/projectTypeEnum.ts
Normal 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: "其他" }
|
||||
]; //工程类别
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="leftTop">
|
||||
<div class="leftTop" v-if="projectData">
|
||||
<Card title="进度概况">
|
||||
<div class="progressContent">
|
||||
<div style="display: flex; padding: 2% 1%; color: #fff; font-size: 16px">
|
||||
@ -9,24 +9,26 @@
|
||||
<div class="totalDay">
|
||||
<div style="line-height: 45px">
|
||||
项目总天数
|
||||
<span class="dayImg">1</span>
|
||||
<span class="dayImg">0</span>
|
||||
<span class="dayImg" v-for="item in projectData.totalProjectDay" :key="item">{{ item }}</span>
|
||||
<!-- <span class="dayImg">0</span>
|
||||
<span class="dayImg">4</span>
|
||||
<span class="dayImg">7</span>
|
||||
<span class="dayImg">7</span> -->
|
||||
<span style="margin-left: 4%">天</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="residueDay">
|
||||
<div style="line-height: 45px">
|
||||
项目剩余天数
|
||||
<span class="dayImg">0</span>
|
||||
<span class="dayImg">2</span>
|
||||
<span class="dayImg" v-for="item in projectData.surplusDay" :key="item">{{ item }}</span>
|
||||
<!-- <span class="dayImg">2</span>
|
||||
<span class="dayImg">8</span>
|
||||
<span class="dayImg">6</span>
|
||||
<span class="dayImg">6</span> -->
|
||||
<span style="margin-left: 4%">天</span>
|
||||
</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><i>里程碑</i></div>
|
||||
</div>
|
||||
@ -34,10 +36,22 @@
|
||||
<div class="data" v-for="item in progressList">
|
||||
<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="" />
|
||||
<div v-if="item.status==1" style="color: #fff;font-size:18px;margin-top: -8%;" :title="item.name" class="statusImg1">{{ item.name }}</div>
|
||||
<img v-if="item.status==1" style="width: 40px;margin-top: 2%;" src="@/assets/images/comprehensiveManage/project11.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 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>
|
||||
</Card>
|
||||
@ -46,7 +60,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Card from "@/components/card.vue";
|
||||
import { ref } from "vue";
|
||||
import { ref, watch } from "vue";
|
||||
const progressList = ref([
|
||||
{
|
||||
name: "施工证获取",
|
||||
@ -62,7 +76,7 @@ const progressList = ref([
|
||||
},
|
||||
{
|
||||
name: "支护开始",
|
||||
status: 1
|
||||
status: 0
|
||||
},
|
||||
{
|
||||
name: "垫层完成",
|
||||
@ -81,6 +95,29 @@ const progressList = ref([
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -144,14 +181,15 @@ const progressList = ref([
|
||||
}
|
||||
.statusImg {
|
||||
position: absolute;
|
||||
top: 97%;
|
||||
left: 45%;
|
||||
top: 190%;
|
||||
left: -40%;
|
||||
width: 120px;
|
||||
height: 2px;
|
||||
background: url("@/assets/images/comprehensiveManage/project6.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.statusImg1 {
|
||||
position: relative;
|
||||
background: url("@/assets/images/comprehensiveManage/project5.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="leftTop">
|
||||
<div class="leftTop" v-if="projectData">
|
||||
<Card title="宣传视频">
|
||||
<div class="videoBox">
|
||||
<video src="" class="videos" autoplay controls loop></video>
|
||||
<video :src="BASEURL + '/image/' + projectData.videoUrl" class="videos" autoplay controls loop></video>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
@ -10,6 +10,29 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="projectContent">
|
||||
<div class="left">
|
||||
<leftTop class="leftTop"></leftTop>
|
||||
<leftCenter class="leftCenter"></leftCenter>
|
||||
<leftBottom class="leftBottom"></leftBottom>
|
||||
<leftTop :projectData="projectData" class="leftTop"></leftTop>
|
||||
<leftCenter :statisticsCount="statisticsCount" class="leftCenter"></leftCenter>
|
||||
<leftBottom :statisticsCount="statisticsCount" class="leftBottom"></leftBottom>
|
||||
</div>
|
||||
<div class="center">
|
||||
<centerTop class="centerTop"></centerTop>
|
||||
<centerBottom class="centerBottom"></centerBottom>
|
||||
<centerTop :projectData="projectData" class="centerTop"></centerTop>
|
||||
<centerBottom :projectData="projectData" class="centerBottom"></centerBottom>
|
||||
</div>
|
||||
<div class="right">
|
||||
<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 rightCenter from "@/views/sevenLargeScreen/comprehensiveManage/projectOverview/rightCenter.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>
|
||||
<style lang="scss" scoped>
|
||||
.projectContent {
|
||||
@ -52,7 +78,6 @@ import rightBottom from "@/views/sevenLargeScreen/comprehensiveManage/projectOve
|
||||
.centerTop {
|
||||
height: 66%;
|
||||
margin-bottom: 2.1%;
|
||||
|
||||
}
|
||||
.centerBottom {
|
||||
height: 32%;
|
||||
|
||||
@ -1,13 +1,17 @@
|
||||
<template>
|
||||
<div class="leftTop">
|
||||
<div class="leftTop" v-if="statisticsCount">
|
||||
<Card title="智能设备">
|
||||
<div class="deviceData">
|
||||
<div class="deviceDataA">
|
||||
<div class="num"><i>2</i></div>
|
||||
<div class="num">
|
||||
<i>{{ statisticsCount.devcount.ufaceDevNum }}</i>
|
||||
</div>
|
||||
<div class="text">实名制设备数</div>
|
||||
</div>
|
||||
<div class="deviceDataB">
|
||||
<div class="num"><i>2</i></div>
|
||||
<div class="num">
|
||||
<i>{{ statisticsCount.devcount.environmentDevNum }}</i>
|
||||
</div>
|
||||
<div class="text">环境设备数</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -17,6 +21,28 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,14 +1,18 @@
|
||||
<template>
|
||||
<div class="leftTop">
|
||||
<div class="leftTop" v-if="statisticsCount">
|
||||
<Card title="人员概况">
|
||||
<div class="topPeopleNum">
|
||||
<div class="dataTlo">
|
||||
<div class="text"><i>实名制人数</i></div>
|
||||
<div class="num"><i>1024</i></div>
|
||||
<div class="num">
|
||||
<i>{{ statisticsCount.workercount.totalPerson }}</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dataTlt">
|
||||
<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 class="bottomPeopleNum">
|
||||
@ -23,15 +27,27 @@
|
||||
<div class="penN"></div>
|
||||
<div class="numData1 numData">
|
||||
<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 class="numData2 numData">
|
||||
<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 class="numData3 numData">
|
||||
<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>
|
||||
@ -42,6 +58,29 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,14 +1,17 @@
|
||||
<template>
|
||||
<div class="leftTop">
|
||||
<Card title="项目信息">
|
||||
<div class="projectInfo">
|
||||
<div><span>项目名称:</span> 福永意库项目</div>
|
||||
<div><span>项目地址:</span> 广东省深圳市宝安区丰业路德轩阁东南侧约70米</div>
|
||||
<div><span>项目经理:</span> 李翔</div>
|
||||
<div><span>联系电话:</span> 13538606766</div>
|
||||
<div><span>建筑面积:</span> 150000㎡</div>
|
||||
<div><span>开工日期:</span> 项目编号</div>
|
||||
<div><span>工程类别:</span> 房建</div>
|
||||
<div class="projectInfo" v-if="projectData">
|
||||
<div><span>项目名称:</span> {{ projectData.projectName }}</div>
|
||||
<div>
|
||||
<span>项目地址:</span> {{ projectData.provinceName }}{{ projectData.cityName }} {{ projectData.areaName
|
||||
}}{{ projectData.projectAddress }}
|
||||
</div>
|
||||
<div><span>项目经理:</span> {{ projectData.projectManage }}</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>
|
||||
</Card>
|
||||
</div>
|
||||
@ -16,6 +19,30 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
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>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user