flx:优化

This commit is contained in:
Rain_ 2025-10-28 15:18:17 +08:00
parent bc98fa04b2
commit b236694f61
14 changed files with 112 additions and 66 deletions

View File

@ -59,7 +59,12 @@ VITE_API_URL = 'http://192.168.34.221:8111' #雄哥本地
# 测试
# VITE_API_URL = 'http://jxj.zhgdyun.com:9500'
# VITE_API_URL = 'http://192.168.34.221:19112'
# 敦煌
VITE_API_URL = 'http://gszhdz.crpower.com.cn:9809'
# VITE_API_URL = 'https://gszhdz.crpower.com.cn:9807'
# 广深高速公路
# VITE_API_URL = 'http://112.93.255.85:9840'
# 上传
VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='

View File

@ -70,3 +70,8 @@ export const getMachineryStat = (params: any) => {
export const getVideoItemInfo = (params: any) => {
return http.post(BASEURL + `/xmgl/videoItem/getVideoItemInfo`, params);
};
// 获取视频设备信息
export const getTalkURLsApi = (params: any) => {
return http.post(BASEURL + `/xmgl/videoItem/getTalkURLs`, params);
};

View File

@ -19,6 +19,12 @@ export const getProjectInspectRecordCountApi = (params: {}) => {
});
};
export const getSelectQualityStatisticsApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/xzSecurityQualityInspectionRecord/selectQualityStatistics`, params, {
headers: { noLoading: true }
});
};
// 质量管理
export const selectQualityStatisticsApi = (params: {}) => {
return http.post(BASEURL + `/xmgl/qualityInspectionRecord/selectQualityStatistics`, params, { headers: { noLoading: true } });

View File

@ -23,7 +23,7 @@ export const BAIDU_MAP_KEY: string = "";
export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL;
// 项目环境标识配置 部署时需更改对应的项目
export const COMPANY: string = ""; //标准版
// export const COMPANY: string = ""; //标准版
// export const COMPANY: string = "zhzrf"; //中海·臻如府
// export const COMPANY: string = "zsbf"; //中水北方
// export const COMPANY: string = "as"; //鞍山项目
@ -58,3 +58,5 @@ export const COMPANY: string = ""; //标准版
// export const COMPANY: string = "allxm"; // 安立路项目
// export const COMPANY: string = "hbla"; // 湖北龙澳
// export const COMPANY: string = "qyg"; // 清远港
export const COMPANY: string = "gsgs"; // 广深高速

View File

@ -387,8 +387,8 @@ export const staticRouter: RouteRecordRaw[] = [
}
],
meta: {
// title: "数字化项目监管平台"
title: "智慧工地管理平台" //鞍钢项目
title: "数字化项目监管平台"
// title: "智慧工地管理平台" //鞍钢项目
}
}

View File

@ -38,8 +38,9 @@ function getBimfaceList() {
// }
onMounted(async () => {
// url.value = "http://jxj.zhgdyun.com:9809/static/bim.html";
// url.value = window.location.origin + "/static/bim.html";
url.value = "/static/bim.html";
// url.value = window.location.origin + "static/bim.html";
url.value = (window.location.pathname ? window.location.pathname : '/') + "static/bim.html";
// url.value = "/static/bim.html";
console.log("url-------的地址", window.location.origin);
await getBimfaceList();
});

View File

@ -12,7 +12,8 @@
<div :title="projectLocal"><span>项目地址</span> {{ projectLocal }}</div>
<div><span>项目经理</span> {{ projectData.projectManage || "" }}</div>
<div><span>联系电话</span> {{ projectData.projectTel || "" }}</div>
<div><span>建筑面积</span> {{ projectData.projectAcreage || "" }} </div>
<div v-if="COMPANY == 'gsgs'"><span>桥梁长度(m)</span> {{ projectData.bridgeLength || "" }}</div>
<div v-else><span>建筑面积</span> {{ projectData.projectAcreage || "" }} </div>
<div><span>开工日期</span> {{ projectData.startWorkDate || "" }}</div>
<div><span>项目编号</span> {{ projectData.projectNumber || "" }}</div>
<div>
@ -43,7 +44,7 @@ import { ref, onMounted, watch, computed } from "vue";
import { getStageOption } from "@/api/modules/projectOverview";
import { queryByProject } from "@/api/modules/config";
import projectInfoDialog from "./projectInfoDialog.vue";
import { COMPANY } from "@/config/config";
const customList = computed(() => {
let { list } = JSON.parse(customData.value?.configValue || "{}");
return list;

View File

@ -11,7 +11,7 @@ import Card from "@/components/card.vue";
import { onMounted, ref } from "vue";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
import { getProjectInspectRecordCountApi } from "@/api/modules/projectOverview";
import { getProjectInspectRecordCountApi, getSelectQualityStatisticsApi } from "@/api/modules/projectOverview";
import * as echarts from "echarts";
const echartsTest = ref();
let questionTotal = ref(0 as any);
@ -333,12 +333,12 @@ function drawEchart() {
//
// const safeData = ref(null as any);
const getSafeInfo = async () => {
const res: any = await getProjectInspectRecordCountApi({ projectSn: store.sn });
const res: any = await getSelectQualityStatisticsApi({ projectSn: store.sn });
// console.log("", res);
// safeData.value = res.result;
dataList.value[0].value = res.result.rectificationNum;
dataList.value[1].value = res.result.totalNum - res.result.rectificationNum;
questionTotal.value = res.result.totalNum;
dataList.value[0].value = res.result.total.alreadyRectificationNum;
dataList.value[1].value = res.result.total.totalNum - res.result.total.alreadyRectificationNum;
questionTotal.value = res.result.total.totalNum;
drawEchart();
};
//

View File

@ -2,13 +2,7 @@
<div id="player-main" :id="'player-main'">
<div class="player" :id="'player-' + props.playerId"></div>
<!-- 为每个窗口添加控制按钮容器 -->
<div
class="video-controls"
v-for="i in videoInfo.maxWindows"
:key="i"
:id="'controls-' + i"
:style="{ display: 'none' }"
>
<div class="video-controls" v-for="i in videoInfo.maxWindows" :key="i" :id="'controls-' + i" :style="{ display: 'none' }">
<div class="controls-top">
<div class="top-left">{{ videoNameUp(i - 1) }}</div>
<div @click="stopPlay(i)" class="top-close">
@ -67,7 +61,7 @@ import { getVideoItemInfoPoliceCameraItemApi } from "@/api/modules/workTicket";
import { Close } from "@element-plus/icons-vue";
import moment from "moment";
import dayjs from "dayjs";
import { reactive, watch, onMounted, computed } from "vue";
import { reactive, watch, onMounted, computed, nextTick } from "vue";
import { ElMessage } from "element-plus";
import loadingGif from "@/assets/images/iscImage/loading.gif";
import errorPng from "@/assets/images/iscImage/text-to-image.png";
@ -103,9 +97,9 @@ const videoInfo = reactive({
isFullScreen: false,
isFullScreenAll: false,
randomNumber: "",
player: null,
//
instanceStates: {}
player: null,
//
instanceStates: {}
});
//
const stopAllPlay = () => {
@ -274,7 +268,7 @@ const capture = (imageType, currentWindowIndex) => {
const initPlayer = () => {
videoInfo.player = new JSPlugin({
//
szId: 'player-' + props.playerId, // 使ID
szId: "player-" + props.playerId, // 使ID
// ,H5player.min.jsjs
szBasePath: "/public/bin",
@ -383,9 +377,11 @@ const initPlayer = () => {
console.log("recv ElementChanged: " + iWndIndex + ", szElementType:" + szElementType);
}
});
if (videoInfo.devH5List.length > 0) {
play(videoInfo.devH5List[0], videoInfo.iWndIndex);
}
nextTick(() => {
if (videoInfo.devH5List.length > 0) {
play(videoInfo.devH5List[0], videoInfo.iWndIndex);
}
});
};
/**
* 获取取流连接

View File

@ -435,10 +435,13 @@ const workTicketCountList = ref([
stateType: 4
}
]);
const getWorkTicketCountWorkTicket = (showLoading) => {
getWorkTicketCountWorkTicketApi({
projectSn: store.sn
}, showLoading).then(res => {
const getWorkTicketCountWorkTicket = showLoading => {
getWorkTicketCountWorkTicketApi(
{
projectSn: store.sn
},
showLoading
).then(res => {
if (res.code == 200) {
// workTicketCountList.value = res.result;
workTicketCountList.value = [
@ -500,8 +503,8 @@ const onWorkTicketRefresh = () => {
const getWorkTicketPage = () => {
const params = {
...workTicketInfo,
constructionTimeBegin_end: workTicketInfo.constructionTime.length > 0 ? workTicketInfo.constructionTime[0] : "",
constructionTimeEnd_start: workTicketInfo.constructionTime.length > 0 ? workTicketInfo.constructionTime[1] : ""
applicationTime_begin: workTicketInfo.constructionTime.length > 0 ? workTicketInfo.constructionTime[0] : "",
applicationTime_end: workTicketInfo.constructionTime.length > 0 ? workTicketInfo.constructionTime[1] : ""
};
delete params.constructionTime;
getWorkTicketPageApi({
@ -942,6 +945,10 @@ const downloadFileBtn = (url, name) => {
:deep(.el-date-editor) {
width: 36%;
margin-top: 10px;
.el-range-input {
color: white;
// background-color: transparent;
}
}
:deep(.el-cascader),
@ -1223,7 +1230,10 @@ const downloadFileBtn = (url, name) => {
.content-img {
display: flex;
flex-wrap: wrap;
> .el-image:nth-child(even) {
> .el-image:nth-child(n + 4) {
margin-top: 20px;
}
> .el-image:not(:nth-child(3n + 1)) {
margin-left: 20px;
}
> .el-image {

View File

@ -39,10 +39,10 @@
<img src="@/assets/images/dustNoise/dpIcon.png" alt="" />
</div>-->
<div class="Icon">
<img src="@/assets/images/dustNoise/tbsjIcon.png" alt />
<img src="@/assets/images/dustNoise/tbsjIcon.png" alt="" />
</div>
<div class="Icon" @click="showUserBox = !showUserBox">
<img src="@/assets/images/dustNoise/ryIcon.png" alt />
<img src="@/assets/images/dustNoise/ryIcon.png" alt="" />
</div>
<!-- <el-dropdown trigger="click">

View File

@ -33,11 +33,11 @@ import { GlobalStore } from "@/stores";
import mitts from "@/utils/bus"; //
const store = GlobalStore();
// x
let xData = ref(["09-01", "09-02", "09-03", "09-04", "09-05", "09-06", "09-07"] as any);
let xData = ref([] as any);
// Y
// let unit = ref(":V" as any);
// Y
let yData = ref([10, 5, 20, 25, 15, 25, 12] as any);
let yData = ref([] as any);
//
// let option = ref(null as any);
//

View File

@ -33,11 +33,11 @@ import { GlobalStore } from "@/stores";
import mitts from "@/utils/bus"; //
const store = GlobalStore();
// x
let xData = ref(["02:00", "04:00", "06:00", "08:00", "10:00", "12:00", "14:00"] as any);
let xData = ref([] as any);
// Y
// let unit = ref(":V" as any);
// Y
let yData = ref([10, 5, 25, 20, 15, 25, 12] as any);
let yData = ref([] as any);
//
// let option = ref(null as any);
//

View File

@ -14,7 +14,7 @@
<div></div>
<div>
<el-tooltip class="item" effect="dark" :content="`${videoInfo.talkbackBegin ? '结束' : '开始'}对讲`" placement="top">
<div class="bgImage talkback" :class="{'talkback_active': videoInfo.talkbackBegin}" @click="isTalkback(i)"></div>
<div class="bgImage talkback" :class="{ talkback_active: videoInfo.talkbackBegin }" @click="isTalkback(i)"></div>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="`${videoInfo.recordingBegin ? '结束' : '开始'}录制`" placement="top">
<div class="bgImage transcribe" @click="isTranscribe(i)"></div>
@ -24,8 +24,8 @@
</el-tooltip>
<!-- <div>流畅</div> -->
<el-tooltip class="item" effect="dark" :content="`${videoInfo.muted ? '关闭' : '开启'}音量`" placement="top">
<div @click="handleVolume(i)" :class="videoInfo.muted ? 'openVolume' : 'disableVolume'" class="bgImage"></div>
<el-tooltip class="item" effect="dark" :content="`${!videoInfo.muted ? '关闭' : '开启'}音量`" placement="top">
<div @click="handleVolume(i)" :class="!videoInfo.muted ? 'openVolume' : 'disableVolume'" class="bgImage"></div>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="`${videoInfo.isFullScreen ? '退出' : '进入'}全屏模式`" placement="top">
<div
@ -60,7 +60,7 @@
<script setup>
//
// import http from "@/http/http2.js";
import { getVideoItemInfo } from "@/api/modules/mapConfig";
import { getVideoItemInfo, getTalkURLsApi } from "@/api/modules/mapConfig";
import { Close } from "@element-plus/icons-vue";
import moment from "moment";
import dayjs from "dayjs";
@ -212,23 +212,36 @@ const isTalkback = currentWindowIndex => {
const talkbackStart = currentWindowIndex => {
let player = videoInfo.player,
index = currentWindowIndex - 1;
getTalkURLsApi({
protocol: "wss",
projectSn: videoInfo.devH5List[index].projectSn,
serialNumber: videoInfo.devH5List[index].serialNumber
}).then(res => {
const res2 = JSON.parse(res.result);
if (!res2.data) {
ElMessage.warning("获取url失败");
return;
}
console.log(res2.data.url);
player
.JS_StartTalk(videoInfo.devH5List[index].url, {
// irecordType: 1,
// cbStreamCB: this.streamcb,
})
.then(
() => {
ElMessage.success("开始对讲");
videoInfo.talkbackBegin = true;
console.log("record start ...");
},
e => {
console.error(e);
ElMessage.error("对讲连接失败");
}
);
const url = res2.data.url.replace("hrdl.zhgdyun.com", "sp.szjxj.com");
player.JS_StartTalk(url, {
// irecordType: 1,
// cbStreamCB: this.streamcb,
})
.then(
() => {
ElMessage.success("开始对讲");
videoInfo.talkbackBegin = true;
openSound(currentWindowIndex);
console.log("record start ...");
},
e => {
console.error(e);
ElMessage.error("对讲连接失败");
}
);
});
};
//
const talkbackStop = currentWindowIndex => {
@ -238,6 +251,7 @@ const talkbackStop = currentWindowIndex => {
res => {
console.log("record stoped, saving ...", res);
videoInfo.talkbackBegin = false;
closeSound(currentWindowIndex);
},
e => {
console.error(e);
@ -367,7 +381,10 @@ const initPlayer = () => {
});
console.log(11222233, someFlag);
const player_playVideo = wnd.querySelector(`#player_playVideo${iWndIndex}`);
if (player_playVideo.src || someFlag) {
const findFlag = Array.from(wnd.childNodes).find(item => {
return item.id && item.id.includes("player_playVideo");
});
if (player_playVideo.src || someFlag || findFlag.duration == "Infinity") {
controls.classList.add("video-controls_flex");
}
}
@ -587,10 +604,13 @@ watch(
console.log("视频播放", videoInfo.devH5List);
}
} else {
play({
...item,
eIndex: index
}, index);
play(
{
...item,
eIndex: index
},
index
);
}
});
if (a.length > 1) {
@ -656,7 +676,7 @@ onMounted(() => {
background-image: url("@/assets/images/iscImage/talkback.png");
}
.talkback_active {
background-image: url("~@/assets/images/iscImage/talkback_active.png");
background-image: url("~@/assets/images/iscImage/talkback_active.png");
}
.screenshot {
background-image: url("@/assets/images/iscImage/screenshot.png");