diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/ProjectPitMonitCfgMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/ProjectPitMonitCfgMapper.xml index c733ac3d..e5020122 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/ProjectPitMonitCfgMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/device/ProjectPitMonitCfgMapper.xml @@ -25,10 +25,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id, project_id, sub_dept_id, vendor_code, vendor_paramter, enabled, state, remark, is_del, create_by, create_time, update_by, update_time, projectName, deptName from ( - select a.*, pi.project_name as projectName, b.dept_name as deptName + select a.*, pi.project_name as projectName, '' as deptName from sur_project_pit_monit_cfg a - JOIN pro_project_info pi on pi.id=a.project_id - join sys_dept b on b.dept_id = a.sub_dept_id ) sur_project_pit_monit_cfg + JOIN pro_project_info pi on pi.id=a.project_id ) sur_project_pit_monit_cfg diff --git a/yanzhu-ui-vue3/src/api/publics.js b/yanzhu-ui-vue3/src/api/publics.js index dbb813d4..5f73eea9 100644 --- a/yanzhu-ui-vue3/src/api/publics.js +++ b/yanzhu-ui-vue3/src/api/publics.js @@ -8,3 +8,12 @@ export function findMyProjectList(query) { params: query }) } + +// 查询项目部门信息 +export function queryUnitList (query) { + return request({ + url: '/publics/queryUnitList', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/components/BaiduMap/Map.vue b/yanzhu-ui-vue3/src/components/BaiduMap/Map.vue index 1e6daff1..008c0bfe 100644 --- a/yanzhu-ui-vue3/src/components/BaiduMap/Map.vue +++ b/yanzhu-ui-vue3/src/components/BaiduMap/Map.vue @@ -31,6 +31,47 @@ const data = reactive({ }); const emit = defineEmits(["docom"]); +// 百度地图API加载状态 +const baiduMapLoaded = ref(false); + +// 加载百度地图API +function loadBaiduMap() { + return new Promise((resolve, reject) => { + if (window.BMapGL) { + baiduMapLoaded.value = true; + resolve(); + return; + } + + // 检查是否正在加载 + if (window.baiduMapLoading) { + const checkInterval = setInterval(() => { + if (window.BMapGL) { + clearInterval(checkInterval); + baiduMapLoaded.value = true; + resolve(); + } + }, 100); + return; + } + + window.baiduMapLoading = true; + + const script = document.createElement('script'); + script.src = 'https://api.map.baidu.com/api?v=1.0&type=webgl&ak=eseRcUMFiUlnWA6miQLejNpvS70H8SRN&services=&callback=onBMapLoadComplete'; + script.async = true; + script.defer = true; + script.onerror = reject; + + window.onBMapLoadComplete = function() { + baiduMapLoaded.value = true; + window.baiduMapLoading = false; + resolve(); + }; + + document.head.appendChild(script); + }); +} function doOk() { emit("docom", point.value, cityInfo.value); @@ -42,15 +83,24 @@ function getAddress() { return addr; } -function showDlg(opt) { +async function showDlg(opt) { title.value = opt?.title || "选择地址"; show.value = true; - setTimeout(() => { - initMap(opt); - }, 400); + + try { + await loadBaiduMap(); + setTimeout(() => { + initMap(opt); + }, 400); + } catch (error) { + proxy.$modal.msgError("地图加载失败,请检查网络连接"); + console.error("百度地图加载失败:", error); + } } function currentPoint() { + if (!window.BMapGL) return; + let geolocation = new BMapGL.Geolocation(); geolocation.enableSDKLocation(); geolocation.getCurrentPosition((e) => { @@ -63,6 +113,8 @@ function currentPoint() { } function mapClick(e) { + if (!window.BMapGL) return; + point.value = e.latlng; let myGeo = new BMapGL.Geocoder({ extensions_town: true }); myGeo.getLocation(e.latlng, (r) => { @@ -85,8 +137,9 @@ function mapClick(e) { } function initMap(opt) { + if (!window.BMapGL) return; + let imap = new BMapGL.Map("index-map"); - map.value = imap; let point = new BMapGL.Point(116.404, 39.915); //初始化地图,设置中心点坐标和地图级别 @@ -121,6 +174,7 @@ function initMap(opt) { currentPoint(); } } + function initMapData(opt) { if (opt.latitude && opt.longitude) { point.value = {}; @@ -139,7 +193,10 @@ defineExpose({ showDlg, initMapData, }); + function search() { + if (!window.BMapGL) return; + if (!data.txtAarea) { proxy.$modal.msgError("请输入要搜索的地址"); return; @@ -155,6 +212,7 @@ function search() { }); } + + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/views/bim/bimSetting/CustomViewpoint.vue b/yanzhu-ui-vue3/src/views/bim/bimSetting/CustomViewpoint.vue index 945f28bf..e08b4692 100644 --- a/yanzhu-ui-vue3/src/views/bim/bimSetting/CustomViewpoint.vue +++ b/yanzhu-ui-vue3/src/views/bim/bimSetting/CustomViewpoint.vue @@ -1,83 +1,24 @@ - - - - - - - - - - - - - - - 秒 - - - 添加轨迹点 - - - - - {{ '视点' + (++scope.$index) }} - - - - 删除 - - - - - - 开始漫游 - 结束漫游 - - - - - - - - - 播放 - 暂停 - 继续 - 取消 - 删除 - 改名 - - - - - - - - - - - - - - - - - - - - 取消 - 确定 - - - - + + + + + 视点管理 + 新增视点 + + + + + + + + 应用 + 删除 + + + + + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/views/device/pitAlarm/alarmDetailDlg.vue b/yanzhu-ui-vue3/src/views/device/pitAlarm/alarmDetailDlg.vue index 3bb602dc..2837f940 100644 --- a/yanzhu-ui-vue3/src/views/device/pitAlarm/alarmDetailDlg.vue +++ b/yanzhu-ui-vue3/src/views/device/pitAlarm/alarmDetailDlg.vue @@ -1,5 +1,5 @@ - @@ -21,79 +21,98 @@ {{ row.threshold }} - + - {{scope.row.displace.toFixed(3) }} + {{ scope.row.displace.toFixed(3) }} - - {{scope.row.totalize.toFixed(3) }} + + {{ scope.row.totalize.toFixed(3) }} - - {{scope.row.variation.toFixed(3) }} + + {{ scope.row.variation.toFixed(3) }} - - {{scope.row.changeRate.toFixed(3) }} + + {{ + scope.row.changeRate.toFixed(3) + }} - - {{scope.row.displace2.toFixed(3) }} + + {{ scope.row.displace2.toFixed(3) }} - - {{scope.row.totalize2.toFixed(3) }} + + {{ scope.row.totalize2.toFixed(3) }} - - {{scope.row.variation2.toFixed(3) }} + + {{ + scope.row.variation2.toFixed(3) + }} - {{scope.row.changeRate2.toFixed(3) }} + {{ + scope.row.changeRate2.toFixed(3) + }} - - + \ No newline at end of file diff --git a/yanzhu-ui-vue3/src/views/device/pitAlarm/index.vue b/yanzhu-ui-vue3/src/views/device/pitAlarm/index.vue index d57a84e3..b00b8820 100644 --- a/yanzhu-ui-vue3/src/views/device/pitAlarm/index.vue +++ b/yanzhu-ui-vue3/src/views/device/pitAlarm/index.vue @@ -8,49 +8,49 @@ - + - 搜索 - 重置 + 搜索 + 重置 - 新增 - 修改 - 删除 - 导出 - + - - - - + + + + {{ scope.row.alarmSource}}-{{ scope.row.variety}} - + {{ getLevel(scope.row.level)}} @@ -62,30 +62,31 @@ - + 暂无 - - - 详情 - + + 详情 + 删除 - - +