flx:修复演示大屏样式bug

This commit is contained in:
X_Rian 2024-07-05 11:54:28 +08:00
parent 11b9613874
commit 01d8b3f70e
20 changed files with 127 additions and 83 deletions

View File

@ -4,7 +4,7 @@ NODE_ENV = 'development'
# 本地环境接口地址(/api/index.ts文件中使用) # 本地环境接口地址(/api/index.ts文件中使用)
# 后端本地 # 后端本地
# VITE_API_URL = 'http://192.168.34.155:19111' # VITE_API_URL = 'http://192.168.34.155:19111'
VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地 # VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地
# VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程 # VITE_API_URL = 'http://182.90.224.237:51234' #雄哥远程
# VITE_API_URL = 'http://192.168.34.221:28889' # VITE_API_URL = 'http://192.168.34.221:28889'
# VITE_API_URL = 'http://121.196.214.246/api' # VITE_API_URL = 'http://121.196.214.246/api'
@ -33,7 +33,7 @@ VITE_API_URL = 'http://192.168.34.221:9111' #雄哥本地
# 中科安信 # 中科安信
# VITE_API_URL = 'http://8.136.222.164:8808' # VITE_API_URL = 'http://8.136.222.164:8808'
# 中科佳成 # 中科佳成
# VITE_API_URL = 'http://1.13.185.209:8089' VITE_API_URL = 'http://1.13.185.209:8089'
# 上传 # 上传
VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url=' VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='

View File

@ -21,14 +21,14 @@ NODE_ENV = "production"
# 七参数标准版(测试平台) # 七参数标准版(测试平台)
# VITE_API_URL = 'http://182.90.224.237:15551' # VITE_API_URL = 'http://182.90.224.237:15551'
# agjt # agjt
VITE_API_URL = 'http://42.180.188.17:9809' #生产环境 # VITE_API_URL = 'http://42.180.188.17:9809' #生产环境
# VITE_API_URL = 'http://42.180.188.17:11211' #测试环境 # VITE_API_URL = 'http://42.180.188.17:11211' #测试环境
# 苏立信/重庆市南岸区 # 苏立信/重庆市南岸区
# VITE_API_URL = 'http://101.43.164.214:11111' # VITE_API_URL = 'http://101.43.164.214:11111'
# 中科安信 # 中科安信
# VITE_API_URL = 'http://8.136.222.164:8808' # VITE_API_URL = 'http://8.136.222.164:8808'
# 中科佳成 # 中科佳成
# VITE_API_URL = 'http://1.13.185.209:8089' VITE_API_URL = 'http://1.13.185.209:8089'
# 合肥启程(乌丹) # 合肥启程(乌丹)
# VITE_API_URL = 'http://192.168.100.4:9809' # VITE_API_URL = 'http://192.168.100.4:9809'
# 打包 # 打包

View File

@ -23,7 +23,7 @@ export const BAIDU_MAP_KEY: string = "";
export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL; export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL;
// 项目环境标识配置 部署时需更改对应的项目 // 项目环境标识配置 部署时需更改对应的项目
export const COMPANY: string = ""; //标准版 // export const COMPANY: string = ""; //标准版
// export const COMPANY: string = "zhzrf"; //中海·臻如府 // export const COMPANY: string = "zhzrf"; //中海·臻如府
// export const COMPANY: string = "zsbf"; //中水北方 // export const COMPANY: string = "zsbf"; //中水北方
// export const COMPANY: string = "as"; //鞍山项目 // export const COMPANY: string = "as"; //鞍山项目
@ -32,7 +32,7 @@ export const COMPANY: string = ""; //标准版
// export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏 // export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏
// export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏 // export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏
// export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览 // export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览
// export const COMPANY: string = "zkjc"; //中科佳成项目 export const COMPANY: string = "zkjc"; //中科佳成项目
// export const COMPANY: string = "cqna"; //重庆南岸项目 // export const COMPANY: string = "cqna"; //重庆南岸项目
// export const COMPANY: string = "slx"; //苏立信项目 // export const COMPANY: string = "slx"; //苏立信项目
// export const COMPANY: string = "hfqc"; //合肥启程(乌丹)项目 // export const COMPANY: string = "hfqc"; //合肥启程(乌丹)项目

View File

@ -1413,6 +1413,10 @@ export const ZKJCMenu: Array<any> = [
{ {
menuName: "智能安全帽", menuName: "智能安全帽",
companyPath: "/smartSafeHat" companyPath: "/smartSafeHat"
},
{
menuName: "基坑监测",
companyPath: "/foundationPitMonitor"
} }
] ]
}, },
@ -1441,6 +1445,10 @@ export const ZKJCMenu: Array<any> = [
{ {
companyPath: "/waterMonitor", companyPath: "/waterMonitor",
menuName: "用水监测" menuName: "用水监测"
},
{
companyPath: "/rainfallMonitoring",
menuName: "雨量监测"
} }
] ]
} }

View File

@ -59,10 +59,10 @@ onMounted(async () => {
meterId.value = e; meterId.value = e;
getShortTrend(); getShortTrend();
}); });
// getMeterTotal(); getShortTrend();
}); });
// //
onBeforeUnmount(async () => { onBeforeUnmount(async () => {
mitts.off("electricId"); mitts.off("electricId");
}); });

View File

@ -55,13 +55,13 @@ const getLongTrend = async () => {
onMounted(async () => { onMounted(async () => {
mitts.on("electricId", e => { mitts.on("electricId", e => {
// console.log("", e); // console.log("", e);
meterId.value = e meterId.value = e;
getLongTrend(); getLongTrend();
}); });
// getMeterTotal(); getLongTrend();
}); });
// //
onBeforeUnmount(async () => { onBeforeUnmount(async () => {
mitts.off("electricId"); mitts.off("electricId");
}); });

View File

@ -7,6 +7,10 @@
</div> </div>
<div id="electricityTopRight" style="width: 100%; height: 100%"></div> <div id="electricityTopRight" style="width: 100%; height: 100%"></div>
<div class="not-data" v-if="xData.length == 0">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div>
</div> </div>
</Card> </Card>
</template> </template>
@ -197,8 +201,8 @@ function draw() {
const getYesterdayUseTotal = async () => { const getYesterdayUseTotal = async () => {
const res: any = await getElectricityUseRecord({ projectSn: store.sn, type: 1 }); const res: any = await getElectricityUseRecord({ projectSn: store.sn, type: 1 });
let nameArr = res.result.map((item: any) => item.ammeterName); let nameArr = res.result instanceof Array ? res.result.map((item: any) => item.ammeterName) : [];
let useArr = res.result.map((item: any) => item.degree); let useArr = res.result instanceof Array ? res.result.map((item: any) => item.degree) : [];
xData.value = nameArr; xData.value = nameArr;
yData.value = useArr; yData.value = useArr;
@ -235,4 +239,19 @@ onBeforeUnmount(async () => {
color: #ffffff; color: #ffffff;
} }
} }
.not-data {
top: 40%;
width: 30%;
left: 35%;
position: absolute;
text-align: center;
img {
width: 50%;
}
p {
color: #fff;
font-size: 14px;
}
}
</style> </style>

View File

@ -222,9 +222,10 @@ onMounted(async () => {
// transform: rotate(90deg); // transform: rotate(90deg);
} }
.not-data { .not-data {
top: 40%; width: 20%;
width: 30%; top: 50%;
left: 35%; left: 50%;
transform: translate(-50%, -50%);
position: absolute; position: absolute;
text-align: center; text-align: center;
img { img {

View File

@ -59,7 +59,7 @@ onMounted(async () => {
meterId.value = e; meterId.value = e;
getShortTrend(); getShortTrend();
}); });
// getShortTrend(); getShortTrend();
}); });
// //

View File

@ -58,7 +58,7 @@ onMounted(async () => {
meterId.value = e; meterId.value = e;
getLongTrend(); getLongTrend();
}); });
// getLongTrend(); getLongTrend();
}); });
// //

View File

@ -215,7 +215,6 @@ onMounted(async () => {
drawChart(); drawChart();
}); });
onBeforeUnmount(async () => { onBeforeUnmount(async () => {
mitts.off("devSn"); mitts.off("devSn");
}); });
@ -228,9 +227,10 @@ onBeforeUnmount(async () => {
position: relative; position: relative;
} }
.not-data { .not-data {
top: 40%; width: 20%;
width: 30%; top: 50%;
left: 35%; left: 50%;
transform: translate(-50%, -50%);
position: absolute; position: absolute;
text-align: center; text-align: center;
img { img {

View File

@ -2,7 +2,7 @@
<Card title="趋势图"> <Card title="趋势图">
<div class="box"> <div class="box">
<div class="selectRight"> <div class="selectRight">
<!-- <el-date-picker <!-- <el-date-picker
style="width:100%" style="width:100%"
v-model="value1" v-model="value1"
type="daterange" type="daterange"
@ -11,20 +11,19 @@
end-placeholder="结束日期" end-placeholder="结束日期"
> >
</el-date-picker> --> </el-date-picker> -->
<el-select class="m-2" placeholder="Select" size="small" v-model="selectValue"> <el-select class="m-2" placeholder="Select" size="small" v-model="selectValue">
<el-option <el-option
v-for="(item, index) in noiseList" v-for="(item, index) in noiseList"
:key="index" :key="index"
:label="item.label" :label="item.label"
:value="item.label" :value="item.label"
@click="checkChange(item.label)" @click="checkChange(item.label)"
/> />
</el-select> </el-select>
</div> </div>
<div id="myEcharts" ref="myEcharts" style="width: 100%; height: 100%"></div> <div id="myEcharts" ref="myEcharts" style="width: 100%; height: 100%"></div>
</div> </div>
</Card> </Card>
</template> </template>
@ -340,9 +339,9 @@ onMounted(async () => {
receive.value = e.deviceId; receive.value = e.deviceId;
getList(e.deviceId); getList(e.deviceId);
}); });
getList(receive.value);
}); });
// //
onBeforeUnmount(async () => { onBeforeUnmount(async () => {
mitts.off("currentDevDetail"); mitts.off("currentDevDetail");
echarts.dispose; echarts.dispose;
@ -350,17 +349,17 @@ onBeforeUnmount(async () => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box{ .box {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; position: relative;
} }
.selectRight { .selectRight {
position: absolute; position: absolute;
left: 75%; left: 75%;
width: 20%; width: 20%;
top: 6%; top: 6%;
z-index: 9; z-index: 9;
} }
::v-deep .el-input__wrapper { ::v-deep .el-input__wrapper {

View File

@ -70,6 +70,7 @@ onMounted(() => {
} }
.listBox { .listBox {
height: 91%; height: 91%;
position: relative;
.listStyle { .listStyle {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
@ -91,10 +92,10 @@ onMounted(() => {
} }
} }
.notoDta { .notoDta {
top: 75%; width: 50%;
width: 12%; top: 50%;
margin: 5% -40%; left: 50%;
left: 120%; transform: translate(-50%, -50%);
position: absolute; position: absolute;
img { img {
width: 40%; width: 40%;
@ -102,8 +103,9 @@ onMounted(() => {
} }
p { p {
color: #fff; color: #fff;
font-size: calc(100vw * 14 / 1920); font-size: 14px;
margin: -6% 37%; margin: -6% 37%;
text-align: center;
} }
} }
} }

View File

@ -169,7 +169,7 @@ function getNowData(type: any) {
checked.value = type; checked.value = type;
yData.value = companyWorkTotalData.value.map((item: any) => item.presencePersonNum); yData.value = companyWorkTotalData.value.map((item: any) => item.presencePersonNum);
xData.value = companyWorkTotalData.value.map((item: any) => item.enterpriseName); xData.value = companyWorkTotalData.value.map((item: any) => item.enterpriseName);
draw(xData.value, yData.value); draw(xData.value, yData.value);
} }
// //
@ -177,7 +177,7 @@ function getTodayData(type: any) {
checked.value = type; checked.value = type;
yData.value = companyWorkTotalData.value.map((item: any) => item.attendancePersonNum); yData.value = companyWorkTotalData.value.map((item: any) => item.attendancePersonNum);
xData.value = companyWorkTotalData.value.map((item: any) => item.enterpriseName); xData.value = companyWorkTotalData.value.map((item: any) => item.enterpriseName);
draw(xData.value, yData.value); draw(xData.value, yData.value);
} }
@ -188,7 +188,7 @@ async function getProjectWorkerList() {
let res = await getComapnyWorkTotalListApi({ let res = await getComapnyWorkTotalListApi({
projectSn: store.sn projectSn: store.sn
}); });
if(res.result.length !== 0){ if (res.result.length !== 0) {
if (res.result) { if (res.result) {
res.result.forEach((item: any) => { res.result.forEach((item: any) => {
companyWorkTotalData.value.push(item); companyWorkTotalData.value.push(item);
@ -199,9 +199,9 @@ async function getProjectWorkerList() {
} }
} else { } else {
companyWorkTotalData.value.push(0); companyWorkTotalData.value.push(0);
xData.value.push('无数据'); xData.value.push("无数据");
yData.value.push(0); yData.value.push(0);
draw(xData.value, yData.value) draw(xData.value, yData.value);
} }
} }
@ -209,12 +209,12 @@ async function getProjectWorkerList2() {
let res = await getComapnyWorkTotalListApi({ let res = await getComapnyWorkTotalListApi({
projectSn: store.sn projectSn: store.sn
}); });
if(res.result.length !== 0){ if (res.result.length !== 0) {
if (res.result) { if (res.result) {
let emptyArr: any = [] let emptyArr: any = [];
xData.value = emptyArr xData.value = emptyArr;
yData.value = emptyArr yData.value = emptyArr;
companyWorkTotalData.value = emptyArr companyWorkTotalData.value = emptyArr;
res.result.forEach((item: any) => { res.result.forEach((item: any) => {
companyWorkTotalData.value.push(item); companyWorkTotalData.value.push(item);
xData.value.push(item.enterpriseName); xData.value.push(item.enterpriseName);
@ -224,16 +224,16 @@ async function getProjectWorkerList2() {
} }
} else { } else {
companyWorkTotalData.value.push(0); companyWorkTotalData.value.push(0);
xData.value.push('无数据'); xData.value.push("无数据");
yData.value.push(0); yData.value.push(0);
draw(xData.value, yData.value) draw(xData.value, yData.value);
} }
} }
// //
defineExpose({ defineExpose({
getProjectWorkerList2 getProjectWorkerList2
}) });
onMounted(async () => { onMounted(async () => {
await getProjectWorkerList(); await getProjectWorkerList();
}); });
@ -241,7 +241,6 @@ onMounted(async () => {
<style lang="scss" scoped> <style lang="scss" scoped>
.rightHeader { .rightHeader {
width: 20%;
display: flex; display: flex;
position: absolute; position: absolute;
z-index: 99; z-index: 99;
@ -249,8 +248,12 @@ onMounted(async () => {
font-size: 10px; font-size: 10px;
text-align: center; text-align: center;
line-height: 20px; line-height: 20px;
left: 80%; // width: 20%;
top: 79%; // left: 80%;
// top: 79%;
width: 88%;
left: 16%;
top: 5%;
.Selected { .Selected {
height: 5%; height: 5%;
background: url("@/assets/images/dustNoise/rightImg2.png") no-repeat; background: url("@/assets/images/dustNoise/rightImg2.png") no-repeat;
@ -271,7 +274,10 @@ onMounted(async () => {
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
::v-deep .h-card .content { :deep() {
height: 75%; .content {
height: 75%;
position: relative;
}
} }
</style> </style>

View File

@ -337,6 +337,7 @@ onMounted(async () => {
receive.value = e.devSn; receive.value = e.devSn;
getList(e.devSn); getList(e.devSn);
}); });
getList(receive.value);
}); });
// //
onBeforeUnmount(async () => { onBeforeUnmount(async () => {

View File

@ -516,9 +516,10 @@ onMounted(async () => {
color: #fff; color: #fff;
} }
.notoDta { .notoDta {
top: 25%; top: 50%;
width: 40%; width: 25%;
left: 30%; left: 50%;
transform: translate(-50%, -50%);
position: absolute; position: absolute;
text-align: center; text-align: center;
img { img {

View File

@ -511,9 +511,10 @@ onMounted(async () => {
color: #fff; color: #fff;
} }
.notoDta { .notoDta {
top: 15%; width: 25%;
width: 40%; top: 50%;
left: 30%; left: 50%;
transform: translate(-50%, -50%);
position: absolute; position: absolute;
text-align: center; text-align: center;
img { img {

View File

@ -509,9 +509,10 @@ onMounted(async () => {
color: #fff; color: #fff;
} }
.notoDta { .notoDta {
top: 15%; width: 25%;
width: 40%; top: 50%;
left: 30%; left: 50%;
transform: translate(-50%, -50%);
position: absolute; position: absolute;
text-align: center; text-align: center;
img { img {

View File

@ -506,9 +506,10 @@ onMounted(async () => {
color: #fff; color: #fff;
} }
.notoDta { .notoDta {
top: 15%; width: 25%;
width: 40%; top: 50%;
left: 30%; left: 50%;
transform: translate(-50%, -50%);
position: absolute; position: absolute;
text-align: center; text-align: center;
img { img {
@ -519,6 +520,7 @@ onMounted(async () => {
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
margin: -6% 37%; margin: -6% 37%;
text-align: center;
} }
} }
</style> </style>

View File

@ -574,8 +574,9 @@ const previewVideo = (data: string | null) => {
} }
.notoDta { .notoDta {
top: 50%; top: 50%;
width: 12%; width: 80%;
left: 2%; left: 50%;
transform: translate(-50%, -50%);
position: absolute; position: absolute;
img { img {
width: 40%; width: 40%;
@ -585,11 +586,13 @@ const previewVideo = (data: string | null) => {
color: #fff; color: #fff;
font-size: calc(100vw * 14 / 1920); font-size: calc(100vw * 14 / 1920);
margin: -6% 37%; margin: -6% 37%;
text-align: center;
} }
} }
} }
::v-deep .h-card .content { ::v-deep .h-card .content {
background: none; background: none;
position: relative;
} }
::v-deep .h-card .title .titltText { ::v-deep .h-card .title .titltText {
margin-bottom: 0%; margin-bottom: 0%;