fix: 冲突解决

This commit is contained in:
kun 2024-04-17 21:57:30 +08:00
commit bcc80ee075
5 changed files with 72 additions and 17 deletions

View File

@ -21,8 +21,8 @@ NODE_ENV = 'development'
# 七参数标准版(测试平台) # 七参数标准版(测试平台)
# VITE_API_URL = 'http://182.90.224.237:15551' # VITE_API_URL = 'http://182.90.224.237:15551'
# agjt # agjt
VITE_API_URL = 'http://jxj.zhgdyun.com:19814' VITE_API_URL = 'http://47.93.215.234:9809'
# 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=' VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='

View File

@ -3,9 +3,11 @@
<Card title="人员概况"> <Card title="人员概况">
<div class="topPeopleNum"> <div class="topPeopleNum">
<div class="dataTlo"> <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"> <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> </div>
<div class="dataTlt"> <div class="dataTlt">
@ -28,11 +30,9 @@
<div class="numData1 numData"> <div class="numData1 numData">
<div class="text"><i>甲方人员</i></div> <div class="text"><i>甲方人员</i></div>
<div class="num"> <div class="num">
<i style="color: #eea959" <i style="color: #eea959">{{ statisticsCount.presencecount.jfGlPersonTotal || 0 }}/
>{{ statisticsCount.presencecount.jfGlPersonTotal || 0 }}/{{ {{ statisticsCount.workercount.jfGlPersonTotal || 0 }}
statisticsCount.workercount.jfGlPersonTotal || 0 </i>
}}</i
>
</div> </div>
</div> </div>
<div class="numData2 numData"> <div class="numData2 numData">
@ -46,7 +46,8 @@
</div> </div>
</div> </div>
<div class="numData3 numData"> <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"> <div class="num">
<i style="color: #7aa0ea" <i style="color: #7aa0ea"
>{{ statisticsCount.presencecount.yfGlPersonTotal || 0 }}/{{ >{{ statisticsCount.presencecount.yfGlPersonTotal || 0 }}/{{
@ -65,7 +66,10 @@
<script setup lang="ts"> <script setup lang="ts">
import Card from "@/components/card.vue"; import Card from "@/components/card.vue";
import { GlobalStore } from "@/stores"; import { GlobalStore } from "@/stores";
import { COMPANY } from "@/config/config";
import { ref, onMounted, watch } from "vue"; import { ref, onMounted, watch } from "vue";
import { getPersonTypeAndEduStatisticsApi } from "@/api/modules/labor";
const store = GlobalStore();
// ts // ts
type Props = { type Props = {
statisticsCount?: any; // 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

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

View File

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

View File

@ -2,11 +2,13 @@
<Card title="实时监测"> <Card title="实时监测">
<div class="ai-center-bottom"> <div class="ai-center-bottom">
<div class="today-warn"> <div class="today-warn">
<i <i>今日告警: <span style="padding-left: 1%">{{ realTimeTotal.todayAlarmNum || 0 }}</span></i>
>今日告警: <span style="padding-left: 1%">{{ realTimeTotal.todayAlarmNum || 0 }}</span></i
>
</div> </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="week-warn">
<div class="text">近7日告警</div> <div class="text">近7日告警</div>
<div class="num">{{ realTimeTotal.past7AlarmNum || 0 }}</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 { onMounted, reactive, ref, onBeforeUnmount } from "vue";
import { getRealTimeTotal } from "@/api/modules/aIEarlyWarn"; import { getRealTimeTotal } from "@/api/modules/aIEarlyWarn";
import { GlobalStore } from "@/stores"; 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 store = GlobalStore();
const realTimeTotal = ref({} as any); const realTimeTotal = ref({} as any);
@ -39,8 +45,13 @@ const getMemberCareList = async () => {
defineExpose({ defineExpose({
getMemberCareList getMemberCareList
}) })
const imgFileUrl = ref()
onMounted(async () => { onMounted(async () => {
getMemberCareList(); getMemberCareList();
mitts.on("warnAlarmList", e => {
console.log("=======================================================", e);
imgFileUrl.value = e.imageUrl;
});
}); });
</script> </script>
@ -118,14 +129,29 @@ onMounted(async () => {
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
} }
} }
.icon { .icon1 {
left: 5%; left: 5%;
bottom: 5%; bottom: 5%;
position: absolute; position: absolute;
width: 60%; width: 60%;
height: 90%; height: 90%;
background: url("@/assets/images/aIEarlyWarning/warnMonitor.png") no-repeat; 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> </style>