308 lines
7.7 KiB
Vue
Raw Normal View History

2024-04-20 17:26:03 +08:00
<template>
<div class="leftTop">
2024-04-21 14:15:04 +08:00
<div class="header">
2024-05-11 02:49:17 +08:00
<div class="hLeft">项目基本信息</div>
<!-- <div class="hRight">
2024-04-27 22:50:10 +08:00
<el-date-picker
style="width: 85%"
v-model="dateRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
2024-05-11 02:49:17 +08:00
</div> -->
2024-04-21 14:15:04 +08:00
</div>
2024-04-22 23:02:06 +08:00
<div class="content">
2024-05-10 20:33:26 +08:00
<div class="content-info">
2024-06-05 18:31:26 +08:00
<span style="font-size: 15px">项目名称</span>
<span style="font-size: 15px">{{ projectData.projectName || "" }}</span>
2024-06-03 13:45:16 +08:00
</div>
<div class="content-info">
2024-06-05 18:31:26 +08:00
<span style="font-size: 15px">项目地址</span>
<span style="font-size: 15px">{{ addressData() }}</span>
2024-06-03 13:45:16 +08:00
</div>
<div class="content-info">
2024-06-05 18:31:26 +08:00
<span style="font-size: 15px">项目编号</span>
<span style="font-size: 15px">{{ projectData.projectNumber || "" }}</span>
2024-06-03 13:45:16 +08:00
</div>
2024-06-05 18:31:26 +08:00
<div style="font-size: 15px; line-height: 22px">
<div style="display: flex; color: white; margin-top: 8px">
<div style="width: 50%; display: flex">
2024-06-03 13:45:16 +08:00
<span>项目经理</span>
<span>{{ projectData.projectManage || "" }}</span>
</div>
2024-06-05 18:31:26 +08:00
<div style="width: 50%; display: flex">
2024-06-03 13:45:16 +08:00
<span>联系电话</span>
<span>{{ projectData.projectTel || "" }}</span>
</div>
</div>
2024-06-05 18:31:26 +08:00
<div style="display: flex; color: white; margin-top: 8px">
<div style="width: 50%; display: flex">
2024-06-03 13:45:16 +08:00
<span>建筑面积</span>
2024-06-05 18:31:26 +08:00
<span>{{ projectData.projectAcreage || "" }} {{ projectData.projectAcreage ? "㎡" : "" }}</span>
2024-06-03 13:45:16 +08:00
</div>
2024-06-05 18:31:26 +08:00
<div style="width: 50%; display: flex">
2024-06-03 13:45:16 +08:00
<span>开工日期</span>
<span>{{ projectData.startWorkDate || "" }}</span>
</div>
</div>
2024-06-05 18:31:26 +08:00
<div style="display: flex; color: white; margin-top: 8px">
<div style="width: 50%; display: flex">
2024-06-03 13:45:16 +08:00
<span>工程类别</span>
2024-06-05 18:31:26 +08:00
<span>{{
projectData.projectType && projectTypeEnumList.length > 0
? projectTypeEnumList[projectData.projectType - 1].name
: ""
}}</span>
<div style="margin-left: 5px; line-height: 20px">
<img style="width: 25px; height: 25px" src="@/assets/images/mountain-icon.png" alt="" />
2024-06-03 13:45:16 +08:00
</div>
</div>
</div>
</div>
<!-- <div class="content-info">
2024-05-10 20:33:26 +08:00
<span>项目名称</span>
2024-05-11 02:49:17 +08:00
<span>{{ projectData.projectName || "" }}</span>
2024-04-22 23:02:06 +08:00
</div>
2024-05-10 20:33:26 +08:00
<div class="content-info">
<span>项目地址</span>
2024-05-11 02:49:17 +08:00
<span>{{addressData()}}</span>
2024-04-22 23:02:06 +08:00
</div>
2024-05-10 20:33:26 +08:00
<div class="content-info">
<span>项目经理</span>
2024-05-11 02:49:17 +08:00
<span>{{ projectData.projectManage || "" }}</span>
2024-05-10 20:33:26 +08:00
</div>
<div class="content-info">
<span>联系电话</span>
2024-05-11 02:49:17 +08:00
<span>{{ projectData.projectTel || "" }}</span>
2024-05-10 20:33:26 +08:00
</div>
<div class="content-info">
<span>建筑面积</span>
2024-05-13 20:46:26 +08:00
<span>{{ projectData.projectAcreage || "" }} {{ projectData.projectAcreage ? '㎡' : "" }}</span>
2024-05-10 20:33:26 +08:00
</div>
<div class="content-info">
<span>开工日期</span>
2024-05-11 02:49:17 +08:00
<span>{{ projectData.startWorkDate || "" }}</span>
2024-05-10 20:33:26 +08:00
</div>
<div class="content-info">
<span>项目编号</span>
2024-05-11 02:49:17 +08:00
<span>{{ projectData.projectNumber || "" }}</span>
2024-04-27 22:50:10 +08:00
</div>
2024-05-10 20:33:26 +08:00
<div class="content-info">
<span>工程类别</span>
2024-05-11 02:49:17 +08:00
<span>{{ projectData.projectType && projectTypeEnumList.length > 0 ? projectTypeEnumList[projectData.projectType - 1].name : "" }}</span>
2024-06-03 13:45:16 +08:00
</div> -->
2024-04-27 22:50:10 +08:00
</div>
2024-04-20 17:26:03 +08:00
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, watch } from "vue";
2024-05-11 02:49:17 +08:00
import { getProjectDetail, getStageOption } from "@/api/modules/projectOverview";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const projectData = ref({} as any);
2024-06-05 18:31:26 +08:00
const projectTypeEnumList: any = ref([]); //工程类别
2024-05-11 02:49:17 +08:00
const addressData = () => {
2024-06-05 18:31:26 +08:00
return projectData.value.provinceName
? projectData.value.provinceName + projectData.value.cityName + projectData.value.areaName + projectData.value.projectAddress
: "";
};
2024-05-11 02:49:17 +08:00
// 工程类别字典数据
2024-06-05 18:31:26 +08:00
const projectTypeEnum = async (showLoading: boolean) => {
const res: any = await getStageOption({ dictionaryEncoding: "project_type", projectSn: store.sn }, showLoading);
2024-05-11 02:49:17 +08:00
if (res.result.length > 0) {
let newArray = res.result.map((item: any) => {
return {
name: item.name,
id: Number(item.data)
};
});
2024-06-05 18:31:26 +08:00
projectTypeEnumList.value = newArray;
2024-05-11 02:49:17 +08:00
} else {
2024-06-05 18:31:26 +08:00
projectTypeEnumList.value = [];
2024-05-11 02:49:17 +08:00
}
};
//获取项目信息
2024-06-05 18:31:26 +08:00
const getProjectInfo = async (showLoading: boolean) => {
const res = await getProjectDetail({ projectSn: store.sn }, showLoading);
2024-05-11 02:49:17 +08:00
console.log("获取项目信息666", res);
// console.log("获取工程类别", projectTypeEnum);
projectData.value = res.result;
};
2024-06-05 18:31:26 +08:00
const setIntervalFn = (showLoading: boolean) => {
getProjectInfo(showLoading);
projectTypeEnum(showLoading);
};
2024-05-11 02:49:17 +08:00
onMounted(async () => {
2024-06-05 18:31:26 +08:00
setIntervalFn(false);
setInterval(() => {
setIntervalFn(true);
}, 30000);
2024-05-11 02:49:17 +08:00
});
2024-04-20 17:26:03 +08:00
</script>
<style lang="scss" scoped>
.leftTop {
2024-04-21 14:15:04 +08:00
background: url("@/assets/images/commandScreen/card-left-top.png") no-repeat;
// background-color: #fff;
background-size: 100% 100%;
2024-04-20 17:26:03 +08:00
width: 100%;
2024-04-27 22:50:10 +08:00
height: 35%;
.header {
2024-04-21 14:15:04 +08:00
// width: 100%;
// height: 100%;
display: flex;
// align-items: center;
justify-content: space-between;
2024-06-03 13:45:16 +08:00
padding: 10px 20px;
2024-04-22 23:02:06 +08:00
border-bottom: 1px solid #0059ff;
2024-04-27 22:50:10 +08:00
.hLeft {
2024-04-21 14:15:04 +08:00
width: 50%;
2024-05-11 11:07:32 +08:00
// color: white;
font-size: 20px;
font-weight: bold;
2024-06-05 18:31:26 +08:00
background-image: linear-gradient(to bottom left, #c8e3ff, #007aff);
2024-05-11 11:07:32 +08:00
-webkit-background-clip: text;
background-clip: text;
color: transparent;
2024-04-21 14:15:04 +08:00
}
2024-04-27 22:50:10 +08:00
.hRight {
2024-04-21 14:15:04 +08:00
width: 50%;
2024-04-20 17:26:03 +08:00
}
}
2024-04-27 22:50:10 +08:00
.content {
2024-05-10 20:33:26 +08:00
display: flex;
flex-direction: column;
margin-top: 10px;
2024-06-03 13:45:16 +08:00
margin-left: 10px;
2024-06-05 18:31:26 +08:00
&-info:not(:first-child) {
2024-05-11 11:07:32 +08:00
margin-top: 11px;
2024-04-22 23:02:06 +08:00
}
2024-06-05 18:31:26 +08:00
&-info {
2024-04-22 23:02:06 +08:00
display: flex;
2024-05-10 20:33:26 +08:00
align-items: center;
color: white;
2024-04-22 23:02:06 +08:00
font-size: 14px;
2024-06-05 18:31:26 +08:00
span:nth-child(2) {
2024-05-10 20:33:26 +08:00
display: inline-block;
width: 80%;
2024-04-22 23:02:06 +08:00
white-space: nowrap;
text-overflow: ellipsis;
2024-05-10 20:33:26 +08:00
overflow: hidden;
2024-04-22 23:02:06 +08:00
}
}
}
2024-04-20 17:26:03 +08:00
}
2024-04-27 09:47:16 +08:00
::v-deep .el-input__inner {
color: #fff;
}
::v-deep .el-select .el-input .el-select__caret {
color: #fff;
}
::v-deep .el-input__wrapper {
width: 85%;
height: 0%;
background: #0d2956;
}
::v-deep .el-range-separator {
color: #ccc;
font-size: 10px;
}
::v-deep .el-range-input {
color: #ccc;
font-size: 10px;
}
2024-04-27 22:50:10 +08:00
.dialogContainer {
padding: 0 50px;
2024-04-28 01:15:21 +08:00
// height: 600px;
2024-04-27 22:50:10 +08:00
::v-deep .el-tabs__item {
color: #fff;
}
::v-deep .el-tabs__nav-wrap::after {
background-color: rgba(255, 0, 0, 0);
}
.tabList {
display: flex;
width: 100%;
height: 14%;
background: url("@/assets/images/dustNoise/rightBottom.png") no-repeat;
// background-color: #00224f;
background-size: 100% 100%;
left: 75.5%;
top: 75%;
color: #fff;
font-size: 14px;
line-height: 30px;
justify-content: space-around;
text-align: center;
div {
width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.listBox {
// height: 10%;
.listStyle {
display: flex;
justify-content: space-around;
color: #fff;
height: 12%;
line-height: 25px;
font-size: 12px;
text-align: center;
div {
width: 100px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.listStyle:hover {
background: #003c84;
}
}
.notoDta {
top: 40%;
width: 30%;
left: 35%;
text-align: center;
position: absolute;
img {
width: 40%;
margin: 5% 30%;
}
p {
color: #fff;
font-size: 14px;
margin: -6% 37%;
}
}
}
2024-06-05 18:31:26 +08:00
::v-deep .el-dialog {
2024-04-27 22:50:10 +08:00
background: url("@/assets/images/commandScreen/dialog-bg.png") no-repeat;
// background-color: #fff;
background-size: 100% 100%;
2024-04-28 01:15:21 +08:00
margin-top: 12%;
2024-04-27 22:50:10 +08:00
}
2024-06-05 18:31:26 +08:00
::v-deep .el-dialog__headerbtn {
2024-04-28 01:15:21 +08:00
right: 35px;
top: 25px;
2024-04-27 22:50:10 +08:00
}
2024-06-05 18:31:26 +08:00
::v-deep .el-dialog .el-dialog__header .el-dialog__title {
2024-04-28 01:15:21 +08:00
margin-left: 30px;
margin-top: 10px;
2024-04-27 22:50:10 +08:00
font-size: 18px;
color: #fff;
2024-04-28 01:15:21 +08:00
position: absolute;
}
2024-06-05 18:31:26 +08:00
::v-deep el-dialog__header {
2024-04-28 01:15:21 +08:00
margin-top: 20px;
2024-04-27 22:50:10 +08:00
}
2024-04-20 17:26:03 +08:00
</style>