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文件中使用)
# 后端本地
# 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://192.168.34.221:28889'
# 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://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='

View File

@ -21,14 +21,14 @@ NODE_ENV = "production"
# 七参数标准版(测试平台)
# VITE_API_URL = 'http://182.90.224.237:15551'
# 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://101.43.164.214:11111'
# 中科安信
# 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'
# 打包

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 COMPANY: string = ""; //标准版
// export const COMPANY: string = ""; //标准版
// export const COMPANY: string = "zhzrf"; //中海·臻如府
// export const COMPANY: string = "zsbf"; //中水北方
// export const COMPANY: string = "as"; //鞍山项目
@ -32,7 +32,7 @@ export const COMPANY: string = ""; //标准版
// export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏
// export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏
// export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览
// export const COMPANY: string = "zkjc"; //中科佳成项目
export const COMPANY: string = "zkjc"; //中科佳成项目
// export const COMPANY: string = "cqna"; //重庆南岸项目
// export const COMPANY: string = "slx"; //苏立信项目
// export const COMPANY: string = "hfqc"; //合肥启程(乌丹)项目

View File

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

View File

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

View File

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

View File

@ -7,6 +7,10 @@
</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>
</Card>
</template>
@ -197,8 +201,8 @@ function draw() {
const getYesterdayUseTotal = async () => {
const res: any = await getElectricityUseRecord({ projectSn: store.sn, type: 1 });
let nameArr = res.result.map((item: any) => item.ammeterName);
let useArr = res.result.map((item: any) => item.degree);
let nameArr = res.result instanceof Array ? res.result.map((item: any) => item.ammeterName) : [];
let useArr = res.result instanceof Array ? res.result.map((item: any) => item.degree) : [];
xData.value = nameArr;
yData.value = useArr;
@ -235,4 +239,19 @@ onBeforeUnmount(async () => {
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>

View File

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

View File

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

View File

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

View File

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

View File

@ -24,7 +24,6 @@
<div id="myEcharts" ref="myEcharts" style="width: 100%; height: 100%"></div>
</div>
</Card>
</template>
@ -340,7 +339,7 @@ onMounted(async () => {
receive.value = e.deviceId;
getList(e.deviceId);
});
getList(receive.value);
});
//
onBeforeUnmount(async () => {
@ -350,11 +349,11 @@ onBeforeUnmount(async () => {
</script>
<style lang="scss" scoped>
.box{
.box {
width: 100%;
height: 100%;
position: relative;
}
}
.selectRight {
position: absolute;
left: 75%;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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