flx:修改现场大屏承包商

This commit is contained in:
X_Rian 2024-07-17 10:33:38 +08:00
parent 6191db0d2a
commit 3d5c6e66e2
4 changed files with 67 additions and 51 deletions

View File

@ -21,8 +21,8 @@ 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'
# 中科安信 # 中科安信

View File

@ -3,10 +3,13 @@
<Card title="AI报警情况"> <Card title="AI报警情况">
<div class="mainContainer" v-if="isData"> <div class="mainContainer" v-if="isData">
<!-- <div class="imgBox"><img src="@\assets\images\vehicleManagement\goCar.png"/></div> --> <!-- <div class="imgBox"><img src="@\assets\images\vehicleManagement\goCar.png"/></div> -->
<div class="imgBox"><img :src="BASEURL + '/image/' + alarmInfo.imageUrl"/></div> <div class="imgBox"><img :src="BASEURL + '/image/' + alarmInfo.imageUrl" /></div>
<div class="textBox"> <div class="textBox">
<div>报警位置{{alarmInfo.location || '--'}}</div> <el-tooltip v-if="alarmInfo.location.length > 10" effect="dark" :content="alarmInfo.location" placement="top">
<div>报警时间{{alarmInfo.createTime || '--'}}</div> <div class="overflow_ellipsis">报警位置{{ alarmInfo.location || "--" }}</div>
</el-tooltip>
<div v-else>报警位置{{ alarmInfo.location || "--" }}</div>
<div>报警时间{{ alarmInfo.createTime || "--" }}</div>
</div> </div>
</div> </div>
<div class="not-data" v-else> <div class="not-data" v-else>
@ -24,50 +27,47 @@ import { ref, onMounted, watch } from "vue";
import { COMPANY } from "@/config/config"; import { COMPANY } from "@/config/config";
//API //API
import { import { getEnterpriseIdApi, selectAIPageListApi } from "@/api/modules/agjtLiveApi";
getEnterpriseIdApi,
selectAIPageListApi,
} from "@/api/modules/agjtLiveApi";
const store = GlobalStore(); 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 //AI
const alarmInfo = ref({} as any) const alarmInfo = ref({} as any);
async function getAlarmInfo() { async function getAlarmInfo() {
let data = { let data = {
// pageNo: 1, // pageNo: 1,
// pageSize: 1, // pageSize: 1,
// isPushed: 1, // isPushed: 1,
// projectSn: store.sn, // 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 () => { const leftCenterMethod = async () => {
getAlarmInfo() getAlarmInfo();
} };
// //
defineExpose({ defineExpose({
leftCenterMethod leftCenterMethod
}) });
onMounted( async () => { onMounted(async () => {
getAlarmInfo() getAlarmInfo();
}); });
</script> </script>
@ -75,26 +75,37 @@ onMounted( async () => {
.leftCenter { .leftCenter {
width: 100%; width: 100%;
height: 100%; height: 100%;
.mainContainer{ .mainContainer {
width: calc(100% - 20px); width: calc(100% - 20px);
height: calc(100% - 20px); height: calc(100% - 20px);
color: #fff; color: #fff;
padding: 10px; padding: 10px;
.imgBox{ .imgBox {
width: 100%; width: 100%;
height: 85%; height: 85%;
img{ img {
width: 100%; width: 100%;
height:100%; height: 100%;
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
.textBox{ .textBox {
height: 15%; height: 15%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
line-height: 22px; 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;
}
} }
} }
} }

View File

@ -12,8 +12,9 @@
<el-carousel-item style="height: 100%" v-for="(item, i) in cbsProjectInfo" :key="i"> <el-carousel-item style="height: 100%" v-for="(item, i) in cbsProjectInfo" :key="i">
<div class="mainContainer" style="transform: translateX(5%) translateY(5%)" v-if="item.lbType == 1"> <div class="mainContainer" style="transform: translateX(5%) translateY(5%)" v-if="item.lbType == 1">
<div class="lineBox"> <div class="lineBox">
<span class="aLine" style="width: auto; margin-left: 5%">承包商名称</span> <!-- projectEnterprise.cbsName -->
<span class="cLine">{{ item.projectEnterprise.cbsName || "--" }}</span> <span class="aLine" style="width: auto; margin-left: 3%">承包商名称</span>
<span class="cLine">{{ item.enterpriseName || "--" }}</span>
</div> </div>
<div class="lineBox"> <div class="lineBox">
<div class="boxInner1"> <div class="boxInner1">
@ -93,7 +94,7 @@
</div> </div>
<div class="mainContainer" style="transform: translateX(5%) translateY(5%)" v-else> <div class="mainContainer" style="transform: translateX(5%) translateY(5%)" v-else>
<div> <div>
<span>承包名称</span> <span>承包项目名称</span>
<span>{{ item.name || "--" }}</span> <span>{{ item.name || "--" }}</span>
</div> </div>
<el-scroll v-if="item.processList.length > 0" class="cbProcess"> <el-scroll v-if="item.processList.length > 0" class="cbProcess">
@ -300,15 +301,15 @@ onMounted(async () => {
word-wrap: break-word; word-wrap: break-word;
} }
.aLine { .aLine {
width: 28%; width: 29%;
} }
.leftTop { .leftTop {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
.mainContainer { .mainContainer {
width: calc(100% - 20px); width: calc(100% - 40px);
height: calc(80% - 20px); height: calc(80% - 40px);
// height: 320px; // height: 320px;
// background-color: #fff; // background-color: #fff;
color: #fff; color: #fff;
@ -318,17 +319,18 @@ onMounted(async () => {
justify-content: space-around; justify-content: space-around;
.lineBox { .lineBox {
// background-color: #fff; // background-color: #fff;
font-size: 14px;
line-height: 18px; line-height: 18px;
height: 18px; height: 18px;
display: flex; display: flex;
.boxInner1 { .boxInner1 {
margin-left: 5%; margin-left: 3%;
width: 50%; width: 48.5%;
display: flex; display: flex;
word-wrap: break-word; word-wrap: break-word;
} }
.boxInner2 { .boxInner2 {
width: 45%; width: 48.5%;
display: flex; display: flex;
word-wrap: break-word; word-wrap: break-word;
} }

View File

@ -53,7 +53,10 @@
<div v-for="(item, index) in partyMemberList" class="listStyle" :key="item.id"> <div v-for="(item, index) in partyMemberList" class="listStyle" :key="item.id">
<div>{{ index + 1 }}</div> <div>{{ index + 1 }}</div>
<div>{{ statusTypeList.find(ele => ele.id == item.status)?.title }}{{ item.overTime ? "(超期)" : "" }}</div> <div>{{ statusTypeList.find(ele => ele.id == item.status)?.title }}{{ item.overTime ? "(超期)" : "" }}</div>
<div :style="`color:${classColorList[props.majorInfo?.enumType - 1]}`">{{ props.majorInfo?.title.substr(0, 2) }}</div> <div :style="`color:${classColorList[props.majorInfo?.enumType - 1]}`">
<!-- {{ props.majorInfo?.title.substr(0, 2) }} -->
{{ enumTypeList[props.majorInfo?.enumType - 1] }}
</div>
<div style="white-space: initial"> <div style="white-space: initial">
<div style="width: 100%" :style="`white-space: ${item.whiteSpace ? 'inherit' : 'nowrap'}`"> <div style="width: 100%" :style="`white-space: ${item.whiteSpace ? 'inherit' : 'nowrap'}`">
{{ item.problemDescription }}{{ item.remark }} {{ item.problemDescription }}{{ item.remark }}
@ -114,7 +117,7 @@ const props = defineProps({
type: Object type: Object
} }
}); });
const enumTypeList = ["一级","二级","三级","四级"];
const statusTypeList = [ const statusTypeList = [
{ id: 2, title: "待整改" }, { id: 2, title: "待整改" },
{ id: 3, title: "待复查" }, { id: 3, title: "待复查" },