From 3d5c6e66e2b46930996bc44476e55689c6355a19 Mon Sep 17 00:00:00 2001 From: X_Rian <904416525@qq.com> Date: Wed, 17 Jul 2024 10:33:38 +0800 Subject: [PATCH] =?UTF-8?q?flx=EF=BC=9A=E4=BF=AE=E6=94=B9=E7=8E=B0?= =?UTF-8?q?=E5=9C=BA=E5=A4=A7=E5=B1=8F=E6=89=BF=E5=8C=85=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 +- .../agjtLiveScreen/liveScreen/leftCenter.vue | 87 +++++++++++-------- .../agjtLiveScreen/liveScreen/leftTop.vue | 20 +++-- .../dialogCompnnents/major-hidder.vue | 7 +- 4 files changed, 67 insertions(+), 51 deletions(-) diff --git a/.env.production b/.env.production index b9f4c4f..2cbd7de 100644 --- a/.env.production +++ b/.env.production @@ -21,8 +21,8 @@ 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:11211' #测试环境 +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' # 中科安信 diff --git a/src/views/agjtLiveScreen/liveScreen/leftCenter.vue b/src/views/agjtLiveScreen/liveScreen/leftCenter.vue index c8d3904..8711493 100644 --- a/src/views/agjtLiveScreen/liveScreen/leftCenter.vue +++ b/src/views/agjtLiveScreen/liveScreen/leftCenter.vue @@ -3,10 +3,13 @@
-
+
-
报警位置:{{alarmInfo.location || '--'}}
-
报警时间:{{alarmInfo.createTime || '--'}}
+ +
报警位置:{{ alarmInfo.location || "--" }}
+
+
报警位置:{{ alarmInfo.location || "--" }}
+
报警时间:{{ alarmInfo.createTime || "--" }}
@@ -24,50 +27,47 @@ import { ref, onMounted, watch } from "vue"; import { COMPANY } from "@/config/config"; //引入现场大屏API -import { - getEnterpriseIdApi, - selectAIPageListApi, - } from "@/api/modules/agjtLiveApi"; +import { getEnterpriseIdApi, selectAIPageListApi } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); -const BASEURL = import.meta.env.VITE_API_URL +const BASEURL = import.meta.env.VITE_API_URL; //是否有数据 -const isData = ref(false as any) +const isData = ref(false as any); //获取AI报警情况信息 -const alarmInfo = ref({} as any) +const alarmInfo = ref({} as any); async function getAlarmInfo() { - let data = { - // pageNo: 1, - // pageSize: 1, - // isPushed: 1, - // projectSn: store.sn, + let data = { + // pageNo: 1, + // pageSize: 1, + // isPushed: 1, + // projectSn: store.sn, + }; + selectAIPageListApi(data, true).then(res => { + if (res.success) { + // if(res.result.records && res.result.records.length !== 0){ + if (res.result) { + // alarmInfo.value = res.result.records[0] + alarmInfo.value = res.result; + isData.value = true; + } else { + isData.value = false; } - selectAIPageListApi(data,true).then(res => { - if(res.success){ - // if(res.result.records && res.result.records.length !== 0){ - if(res.result){ - // alarmInfo.value = res.result.records[0] - alarmInfo.value = res.result - isData.value = true - }else{ - isData.value = false - } - } - }) -}; + } + }); +} //父组件调用需要无感刷新的方法 const leftCenterMethod = async () => { - getAlarmInfo() -} + getAlarmInfo(); +}; //将方法暴露给父组件 defineExpose({ leftCenterMethod -}) +}); -onMounted( async () => { - getAlarmInfo() +onMounted(async () => { + getAlarmInfo(); }); @@ -75,26 +75,37 @@ onMounted( async () => { .leftCenter { width: 100%; height: 100%; - .mainContainer{ + .mainContainer { width: calc(100% - 20px); height: calc(100% - 20px); color: #fff; padding: 10px; - .imgBox{ + .imgBox { width: 100%; height: 85%; - img{ + img { width: 100%; - height:100%; + height: 100%; background-size: 100% 100%; } } - .textBox{ + .textBox { height: 15%; display: flex; justify-content: space-between; align-items: center; line-height: 22px; + font-size: 14px; + div { + width: 50%; + } + .overflow_ellipsis { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + cursor: pointer; + } } } } diff --git a/src/views/agjtLiveScreen/liveScreen/leftTop.vue b/src/views/agjtLiveScreen/liveScreen/leftTop.vue index 959ac61..3bc58a4 100644 --- a/src/views/agjtLiveScreen/liveScreen/leftTop.vue +++ b/src/views/agjtLiveScreen/liveScreen/leftTop.vue @@ -12,8 +12,9 @@
- 承包商名称: - {{ item.projectEnterprise.cbsName || "--" }} + + 承包商名称: + {{ item.enterpriseName || "--" }}
@@ -93,7 +94,7 @@
- 承包商名称: + 承包项目名称: {{ item.name || "--" }}
@@ -300,15 +301,15 @@ onMounted(async () => { word-wrap: break-word; } .aLine { - width: 28%; + width: 29%; } .leftTop { width: 100%; height: 100%; overflow: hidden; .mainContainer { - width: calc(100% - 20px); - height: calc(80% - 20px); + width: calc(100% - 40px); + height: calc(80% - 40px); // height: 320px; // background-color: #fff; color: #fff; @@ -318,17 +319,18 @@ onMounted(async () => { justify-content: space-around; .lineBox { // background-color: #fff; + font-size: 14px; line-height: 18px; height: 18px; display: flex; .boxInner1 { - margin-left: 5%; - width: 50%; + margin-left: 3%; + width: 48.5%; display: flex; word-wrap: break-word; } .boxInner2 { - width: 45%; + width: 48.5%; display: flex; word-wrap: break-word; } diff --git a/src/views/commandScreen/dialogCompnnents/major-hidder.vue b/src/views/commandScreen/dialogCompnnents/major-hidder.vue index c26f6f0..1092f2c 100644 --- a/src/views/commandScreen/dialogCompnnents/major-hidder.vue +++ b/src/views/commandScreen/dialogCompnnents/major-hidder.vue @@ -53,7 +53,10 @@
{{ index + 1 }}
{{ statusTypeList.find(ele => ele.id == item.status)?.title }}{{ item.overTime ? "(超期)" : "" }}
-
{{ props.majorInfo?.title.substr(0, 2) }}
+
+ + {{ enumTypeList[props.majorInfo?.enumType - 1] }} +
{{ item.problemDescription }}{{ item.remark }} @@ -114,7 +117,7 @@ const props = defineProps({ type: Object } }); - +const enumTypeList = ["一级","二级","三级","四级"]; const statusTypeList = [ { id: 2, title: "待整改" }, { id: 3, title: "待复查" },