fix: BUG修改
This commit is contained in:
parent
aed90281a2
commit
bb1955e42b
@ -130,7 +130,7 @@ const openPeopleCountDialog = (obj:any) => {
|
|||||||
const selectWorkerTeamStatistics = async () => {
|
const selectWorkerTeamStatistics = async () => {
|
||||||
const res: any = await getWorkerInfoApi({
|
const res: any = await getWorkerInfoApi({
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
userEnterpriseId: store.userInfo.userEnterpriseId
|
userEnterpriseId: store.userInfo?.userEnterpriseId
|
||||||
});
|
});
|
||||||
teamList.value = res.result;
|
teamList.value = res.result;
|
||||||
};
|
};
|
||||||
@ -138,7 +138,7 @@ const selectWorkerTeamStatistics = async () => {
|
|||||||
const getCrewRealTimeData = async () => {
|
const getCrewRealTimeData = async () => {
|
||||||
let data = {
|
let data = {
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
userEnterpriseId: store.userInfo.userEnterpriseId
|
userEnterpriseId: store.userInfo?.userEnterpriseId
|
||||||
};
|
};
|
||||||
const res: any = await getRealTimeDataApi(data);
|
const res: any = await getRealTimeDataApi(data);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -432,7 +432,7 @@ const createdEcharts = (yAxisData1: any, yAxisData2: any, yAxisData3: any) => {
|
|||||||
const selectPersonTypeAndEduStatistics = async () => {
|
const selectPersonTypeAndEduStatistics = async () => {
|
||||||
const res: any = await getPersonTypeAndEduStatisticsApi({
|
const res: any = await getPersonTypeAndEduStatisticsApi({
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
userEnterpriseId: store.userInfo.userEnterpriseId
|
userEnterpriseId: store.userInfo?.userEnterpriseId
|
||||||
});
|
});
|
||||||
console.log(res);
|
console.log(res);
|
||||||
memberCountData.value.totalPersonNum = res.result.personType.toaltPerson.totalPerson; //总人数
|
memberCountData.value.totalPersonNum = res.result.personType.toaltPerson.totalPerson; //总人数
|
||||||
|
|||||||
@ -131,7 +131,7 @@ const getCompanyList = async () => {
|
|||||||
let data = {
|
let data = {
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
enterpriseName: "",
|
enterpriseName: "",
|
||||||
userEnterpriseId: store.userInfo.userEnterpriseId
|
userEnterpriseId: store.userInfo?.userEnterpriseId
|
||||||
};
|
};
|
||||||
const res: any = await getCompanyDataList(data);
|
const res: any = await getCompanyDataList(data);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|||||||
@ -149,7 +149,7 @@ const getCompanyList = async () => {
|
|||||||
let data = {
|
let data = {
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
enterpriseName: "",
|
enterpriseName: "",
|
||||||
userEnterpriseId: store.userInfo.userEnterpriseId
|
userEnterpriseId: store.userInfo?.userEnterpriseId
|
||||||
};
|
};
|
||||||
const res: any = await getCompanyDataList(data);
|
const res: any = await getCompanyDataList(data);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -160,7 +160,7 @@ const getCompanyList = async () => {
|
|||||||
const getMemberCountList = async (tip: any) => {
|
const getMemberCountList = async (tip: any) => {
|
||||||
let data:any = {
|
let data:any = {
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
userEnterpriseId: store.userInfo.userEnterpriseId,
|
userEnterpriseId: store.userInfo?.userEnterpriseId,
|
||||||
workerName: searchForm.value.name,
|
workerName: searchForm.value.name,
|
||||||
enterpriseId: searchForm.value.belongCompany,
|
enterpriseId: searchForm.value.belongCompany,
|
||||||
teamId: searchForm.value.belongTeam,
|
teamId: searchForm.value.belongTeam,
|
||||||
|
|||||||
@ -7,7 +7,19 @@
|
|||||||
<span :class="activeTab == 0?'active-span':''" @click="changeActive(0)">实时监控</span>
|
<span :class="activeTab == 0?'active-span':''" @click="changeActive(0)">实时监控</span>
|
||||||
<span :class="activeTab == 1?'active-span':''" @click="changeActive(1)">3D模型</span>
|
<span :class="activeTab == 1?'active-span':''" @click="changeActive(1)">3D模型</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="href-content">
|
<div class="href-content" v-if="activeTab == 0">
|
||||||
|
<el-carousel indicator-position="none" height="450px">
|
||||||
|
<el-carousel-item v-for="(item,index) in videoList" :key="index">
|
||||||
|
<video
|
||||||
|
style="height: 100%; width: 100%"
|
||||||
|
:id="'videoItem' + index"
|
||||||
|
muted
|
||||||
|
autoplay
|
||||||
|
/>
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
</div>
|
||||||
|
<div class="href-content" v-if="activeTab == 1">
|
||||||
<iframe :src="iframeUrl" frameborder="0" style="width: 100%;height: 100%;"></iframe>
|
<iframe :src="iframeUrl" frameborder="0" style="width: 100%;height: 100%;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -15,17 +27,47 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, watch, onMounted, onBeforeUnmount } from "vue";
|
||||||
|
import Srs from "@/assets/js/srs.sdk";
|
||||||
|
import { selectProjectVideoListApi } from "@/api/modules/video";
|
||||||
const emits = defineEmits(["openDialog"])
|
const emits = defineEmits(["openDialog"])
|
||||||
const store = GlobalStore();
|
const store = GlobalStore();
|
||||||
|
const rtcPlayer = ref();
|
||||||
|
const videoList = ref([] as any);
|
||||||
const activeTab = ref(0)
|
const activeTab = ref(0)
|
||||||
const iframeUrl = ref('http://jxj.zhgdyun.com:8082/bim/rt-video/srs/srs.html')
|
const iframeUrl = ref('http://jxj.zhgdyun.com:8082/bim/rt-video/srs/srs.html')
|
||||||
|
const getVideoList = async () => {
|
||||||
|
let res: any = await selectProjectVideoListApi({
|
||||||
|
projectSn: store.sn,
|
||||||
|
all: 1
|
||||||
|
// all=1查全部
|
||||||
|
});
|
||||||
|
videoList.value = res.result.videoList
|
||||||
|
};
|
||||||
const changeActive = (activeIndex:any) => {
|
const changeActive = (activeIndex:any) => {
|
||||||
activeTab.value = activeIndex;
|
activeTab.value = activeIndex;
|
||||||
iframeUrl.value = activeIndex == 0?'http://jxj.zhgdyun.com:8082/bim/rt-video/srs/srs.html':'http://jxjzw.zhgdyun.com:8082/rt-3dmx'
|
iframeUrl.value = activeIndex == 0?'http://jxj.zhgdyun.com:8082/bim/rt-video/srs/srs.html':'http://jxjzw.zhgdyun.com:8082/rt-3dmx'
|
||||||
}
|
}
|
||||||
|
watch(() => activeTab.value, (newVal) => {
|
||||||
|
if(newVal == 0){
|
||||||
|
for (let i = 0; i < videoList.value.length; i++) {
|
||||||
|
let player:any = document.getElementById("videoItem" + i);
|
||||||
|
//方法一:使用srs.sdk.js
|
||||||
|
rtcPlayer.value = new Srs.SrsRtcWhipWhepAsync();
|
||||||
|
rtcPlayer.value.play(videoList.value[i].videoUrl);
|
||||||
|
// video标签
|
||||||
|
player.srcObject = rtcPlayer.value.stream;
|
||||||
|
// 方法二:使用jswebrtc.min.js
|
||||||
|
// new JSWebrtc.Player(this.url, { video: player, autoplay: true, });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
});
|
getVideoList()
|
||||||
|
})
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
rtcPlayer.value?.close();
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -133,7 +133,7 @@ const getCompanyList = async () => {
|
|||||||
let data = {
|
let data = {
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
enterpriseName: "",
|
enterpriseName: "",
|
||||||
userEnterpriseId: store.userInfo.userEnterpriseId
|
userEnterpriseId: store.userInfo?.userEnterpriseId
|
||||||
};
|
};
|
||||||
const res: any = await getCompanyDataList(data);
|
const res: any = await getCompanyDataList(data);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|||||||
@ -121,7 +121,7 @@ const getCompanyList = async () => {
|
|||||||
let data = {
|
let data = {
|
||||||
projectSn: store.sn,
|
projectSn: store.sn,
|
||||||
enterpriseName: "",
|
enterpriseName: "",
|
||||||
userEnterpriseId: store.userInfo.userEnterpriseId
|
userEnterpriseId: store.userInfo?.userEnterpriseId
|
||||||
};
|
};
|
||||||
const res: any = await getCompanyDataList(data);
|
const res: any = await getCompanyDataList(data);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
|||||||
@ -102,7 +102,7 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div class="col-content">
|
<div class="col-content">
|
||||||
<span>作业部位</span>
|
<span>作业部位</span>
|
||||||
<div class="col-content-item">{{ detailData.workPart || "" }}</div>
|
<div class="col-content-item" style="height: 60px;">{{ detailData.workPart || "" }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -110,7 +110,7 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div class="col-content">
|
<div class="col-content">
|
||||||
<span>地理位置</span>
|
<span>地理位置</span>
|
||||||
<div class="col-content-item">{{ detailData.geographicalLocation || "" }}</div>
|
<div class="col-content-item" style="height: 60px;">{{ detailData.geographicalLocation || "" }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -146,7 +146,7 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div class="col-content">
|
<div class="col-content">
|
||||||
<span>主要风险</span>
|
<span>主要风险</span>
|
||||||
<div class="col-content-item">{{ detailData.mainRisk || "" }}</div>
|
<div class="col-content-item" style="height: 60px;">{{ detailData.mainRisk || "" }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -154,13 +154,13 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="col-content">
|
<div class="col-content">
|
||||||
<span>作业必备条件</span>
|
<span>作业必备条件</span>
|
||||||
<div class="col-content-item">{{ detailData.jobPrerequisite || "" }}</div>
|
<div class="col-content-item" style="height: 60px;">{{ detailData.jobPrerequisite || "" }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="col-content">
|
<div class="col-content">
|
||||||
<span>作业过程风险控制措施</span>
|
<span>作业过程风险控制措施</span>
|
||||||
<div class="col-content-item">{{ detailData.operationProcessRiskControlMeasure || "" }}</div>
|
<div class="col-content-item" style="height: 60px;">{{ detailData.operationProcessRiskControlMeasure || "" }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -168,7 +168,7 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div class="col-content">
|
<div class="col-content">
|
||||||
<span>现场风险复测变化情况及补充控制措施</span>
|
<span>现场风险复测变化情况及补充控制措施</span>
|
||||||
<div class="col-content-item">{{ detailData.riskRetestChangesAndSupplementaryControlMeasure || "" }}</div>
|
<div class="col-content-item" style="height: 60px;">{{ detailData.riskRetestChangesAndSupplementaryControlMeasure || "" }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -252,6 +252,7 @@ const activeBtn = (item: any) => {
|
|||||||
detailId.value = item.id;
|
detailId.value = item.id;
|
||||||
detailData.value = item;
|
detailData.value = item;
|
||||||
}
|
}
|
||||||
|
console.log(detailData.value.videoList[0].serialNumber)
|
||||||
};
|
};
|
||||||
const boxStyle = (item: any) => {
|
const boxStyle = (item: any) => {
|
||||||
if (item.isActive) {
|
if (item.isActive) {
|
||||||
@ -303,9 +304,11 @@ defineExpose({
|
|||||||
openDialog
|
openDialog
|
||||||
});
|
});
|
||||||
watch(
|
watch(
|
||||||
() => postData.value,
|
() => showDialog.value,
|
||||||
() => {
|
(newData) => {
|
||||||
getDataList();
|
if(newData){
|
||||||
|
getDataList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// onMounted(async () => {
|
// onMounted(async () => {
|
||||||
@ -327,9 +330,9 @@ watch(
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 1%;
|
padding: 1%;
|
||||||
left: 12%;
|
left: 12%;
|
||||||
top: 7%;
|
top: 6%;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 81%;
|
height: 90%;
|
||||||
background: url("@/assets/images/aIEarlyWarning/dialogBg.png") no-repeat;
|
background: url("@/assets/images/aIEarlyWarning/dialogBg.png") no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
z-index: 21;
|
z-index: 21;
|
||||||
@ -426,7 +429,7 @@ watch(
|
|||||||
background-color: #08203a;
|
background-color: #08203a;
|
||||||
color: white;
|
color: white;
|
||||||
text-indent: 0.5em;
|
text-indent: 0.5em;
|
||||||
height: 40px !important;
|
height: 40px;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,6 +29,15 @@ export default {
|
|||||||
beforeDestroy: function () {
|
beforeDestroy: function () {
|
||||||
this.rtcPlayer.close();
|
this.rtcPlayer.close();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
// watch第一次绑定值的时候不会执行监听,修改数据才会触发函数
|
||||||
|
videoUrls(newVal,oldVal) {
|
||||||
|
console.log(newVal)
|
||||||
|
this.rtcPlayer = new Srs.SrsRtcWhipWhepAsync();
|
||||||
|
this.rtcPlayer.play(newVal);
|
||||||
|
this.player.srcObject = this.rtcPlayer.stream;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user