根据客户需求修改首页及ai预警页面

This commit is contained in:
Vce 2024-04-17 21:05:05 +08:00
parent 4d058f865b
commit 079a4734e6
7 changed files with 77 additions and 21 deletions

View File

@ -3,7 +3,7 @@ NODE_ENV = 'development'
# 本地环境接口地址(/api/index.ts文件中使用)
# 后端本地
VITE_API_URL = 'http://192.168.34.221:9111'
# VITE_API_URL = 'http://192.168.34.221:9111'
# VITE_API_URL = 'http://192.168.34.221:28888'
# VITE_API_URL = 'http://121.196.214.246/api'
# VITE_API_URL = 'http://jxj.zhgdyun.com:100'
@ -15,13 +15,14 @@ VITE_API_URL = 'http://192.168.34.221:9111'
# 演示平台
# VITE_API_URL = 'http://jxj.zhgdyun.com:9809'
# 百色七参数线上地址
VITE_API_URL = 'http://101.43.164.214:11111'
# VITE_API_URL = 'http://101.43.164.214:11111'
# 七参数标准版(测试平台)
# VITE_API_URL = 'http://jxj.zhgdyun.com:15551'
# 七参数标准版(测试平台)
# VITE_API_URL = 'http://182.90.224.237:15551'
# agjt
# VITE_API_URL = 'http://47.93.215.234:9809'
VITE_API_URL = 'http://jxj.zhgdyun.com:19812'
# 上传
VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='

View File

@ -12,7 +12,7 @@ NODE_ENV = "production"
# VITE_API_URL = "http://183.249.224.118:9003"
# 百色 新项目通用地址
VITE_API_URL = 'http://101.43.164.214:11111'
# VITE_API_URL = 'http://101.43.164.214:11111'
# 七参数标准版(演示平台)
# VITE_API_URL = 'http://jxj.zhgdyun.com:9809'
@ -21,7 +21,7 @@ VITE_API_URL = 'http://101.43.164.214:11111'
# 七参数标准版(测试平台)
# VITE_API_URL = 'http://182.90.224.237:15551'
# agjt
# VITE_API_URL = 'http://47.93.215.234:9809'
VITE_API_URL = 'http://47.93.215.234:9809'
# 打包
VITE_ULD_API_URL = 'http://jxj.zhgdyun.com:8012/onlinePreview?url='

View File

@ -25,8 +25,8 @@ export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL;
// 项目环境标识配置 部署时需更改对应的项目
// export const COMPANY: string = ""; //标准版
// export const COMPANY: string = "as"; //鞍山项目
// export const COMPANY: string = "agjt"; //鞍钢集团
export const COMPANY: string = "hfqc"; //合肥启程项目
export const COMPANY: string = "agjt"; //鞍钢集团
// export const COMPANY: string = "hfqc"; //合肥启程项目
// export const COMPANY: string = "jsyc"; // 江苏盐城项目
// export const COMPANY: string = "syhy"; //沈阳合盈盘锦项目 (需要去src\routers\modules\staticRouter.ts更换首页)
// export const COMPANY: string = "jxwjj"; //嘉兴王江泾公用码头项目 (需要去src\routers\modules\staticRouter.ts更换首页)

View File

@ -3,9 +3,11 @@
<Card title="人员概况">
<div class="topPeopleNum">
<div class="dataTlo">
<div class="text"><i>实名制人数</i></div>
<div class="text" v-if="COMPANY === 'agjt'"><i>出勤人数</i></div>
<div class="text" v-else><i>实名制人数</i></div>
<div class="num">
<i>{{ statisticsCount.workercount.totalPerson || 0 }}</i>
<i v-if="COMPANY === 'agjt'">{{ attendancePerson.totalPerson || 0 }}</i>
<i v-else>{{ statisticsCount.workercount.totalPerson || 0 }}</i>
</div>
</div>
<div class="dataTlt">
@ -28,11 +30,9 @@
<div class="numData1 numData">
<div class="text"><i>甲方人员</i></div>
<div class="num">
<i style="color: #eea959"
>{{ statisticsCount.presencecount.jfGlPersonTotal || 0 }}/{{
statisticsCount.workercount.jfGlPersonTotal || 0
}}</i
>
<i style="color: #eea959">{{ statisticsCount.presencecount.jfGlPersonTotal || 0 }}/
{{ statisticsCount.workercount.jfGlPersonTotal || 0 }}
</i>
</div>
</div>
<div class="numData2 numData">
@ -46,7 +46,8 @@
</div>
</div>
<div class="numData3 numData">
<div class="text"><i>乙方人员</i></div>
<div class="text" v-if="COMPANY === 'agjt'"><i>施工方</i></div>
<div class="text" v-else><i>乙方人员</i></div>
<div class="num">
<i style="color: #7aa0ea"
>{{ statisticsCount.presencecount.yfGlPersonTotal || 0 }}/{{
@ -65,7 +66,10 @@
<script setup lang="ts">
import Card from "@/components/card.vue";
import { GlobalStore } from "@/stores";
import { COMPANY } from "@/config/config";
import { ref, onMounted, watch } from "vue";
import { getPersonTypeAndEduStatisticsApi } from "@/api/modules/labor";
const store = GlobalStore();
// ts
type Props = {
statisticsCount?: any; //
@ -90,6 +94,25 @@ watch(
}
}
);
const presencePerson = ref(0)
const attendancePerson = ref(0)
const toaltPerson = ref(0)
//
const getPersonList = async () => {
const res = await getPersonTypeAndEduStatisticsApi({
projectSn: store.sn
});
if (res.result) {
console.log("+++++++++++++++++++++++++++++++++")
console.log(res)
presencePerson.value = res.result.personType.presencePerson;
attendancePerson.value = res.result.personType.attendancePerson;
toaltPerson.value = res.result.personType.toaltPerson;
}
};
onMounted( async () => {
getPersonList();
});
</script>
<style lang="scss" scoped>

View File

@ -65,9 +65,10 @@
<script lang="ts" setup>
import Card from "@/components/card.vue";
import { ref, onMounted, computed } from "vue";
import { ref, onMounted, computed , onBeforeUnmount} from "vue";
import { getAlarmList, getAlarmTypeOption } from "@/api/modules/aIEarlyWarn";
import { GlobalStore } from "@/stores";
import mitts from "@/utils/bus"; //
// import { aiAlarmTypeEnum } from "@/enums/project/aiAlarmTypeEnum";
let aiAlarmTypeEnum = ref([] as any);
@ -170,6 +171,7 @@ const getWarnAlarmList = async () => {
console.log("获取告警列表", res);
if (res.result.length > 0) {
warnAlarmList.value = res.result;
mitts.emit("warnAlarmList", res.result[0]);
detailData.value = res.result[0];
} else {
warnAlarmList.value = [];
@ -217,6 +219,9 @@ onMounted(async () => {
getWarnTypeOption();
getWarnAlarmList();
});
onBeforeUnmount(async () => {
mitts.off("warnAlarmList");
});
</script>
<style lang="scss" scoped>

View File

@ -76,6 +76,7 @@ window.onbeforeunload = (e) => {
destroyInterval();
}
onMounted(() => {
callChildFn();
startInterval();
});
</script>

View File

@ -2,11 +2,13 @@
<Card title="实时监测">
<div class="ai-center-bottom">
<div class="today-warn">
<i
>今日告警: <span style="padding-left: 1%">{{ realTimeTotal.todayAlarmNum || 0 }}</span></i
>
<i>今日告警: <span style="padding-left: 1%">{{ realTimeTotal.todayAlarmNum || 0 }}</span></i>
</div>
<div class="icon"></div>
<div class="icon2" v-if="COMPANY === 'agjt'">
<!-- <img :src="BASEURL + '/image/' + imgFileUrl.imageUrl" /> -->
<img :src="BASEURL + '/image/' + imgFileUrl" />
</div>
<div class="icon1" v-else> </div>
<div class="week-warn">
<div class="text">近7日告警</div>
<div class="num">{{ realTimeTotal.past7AlarmNum || 0 }}</div>
@ -24,6 +26,10 @@ import Card from "@/components/card.vue";
import { onMounted, reactive, ref, onBeforeUnmount } from "vue";
import { getRealTimeTotal } from "@/api/modules/aIEarlyWarn";
import { GlobalStore } from "@/stores";
import { COMPANY } from "@/config/config";
import mitts from "@/utils/bus"; //
//
const BASEURL = import.meta.env.VITE_API_URL;
const store = GlobalStore();
const realTimeTotal = ref({} as any);
@ -39,8 +45,13 @@ const getMemberCareList = async () => {
defineExpose({
getMemberCareList
})
const imgFileUrl = ref()
onMounted(async () => {
getMemberCareList();
mitts.on("warnAlarmList", e => {
console.log("=======================================================", e);
imgFileUrl.value = e.imageUrl;
});
});
</script>
@ -118,14 +129,29 @@ onMounted(async () => {
-webkit-text-fill-color: transparent;
}
}
.icon {
.icon1 {
left: 5%;
bottom: 5%;
position: absolute;
width: 60%;
height: 90%;
background: url("@/assets/images/aIEarlyWarning/warnMonitor.png") no-repeat;
background-size: 100% 100%;
background-size: 100% 80%;
}
.icon2 {
left: 3%;
bottom: -16%;
position: absolute;
width: 60%;
height: 90%;
// background: url("@/assets/images/aIEarlyWarning/warnMonitor.png") no-repeat;
background: url("/src/assets/images/vehicleManagement/leftImg.png") no-repeat;
background-size: 100% 80%;
padding: 20px 20px;
img{
width: 100%;
height: 78%;
}
}
}
</style>