diff --git a/.env.production b/.env.production index 4078b96..327ef6b 100644 --- a/.env.production +++ b/.env.production @@ -13,7 +13,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' @@ -25,7 +25,7 @@ NODE_ENV = "production" # VITE_API_URL = 'http://42.180.188.17:9809' #生产环境 # VITE_API_URL = 'http://42.180.188.17:11211' #测试环境 # 苏立信/重庆市南岸区 -VITE_API_URL = 'http://101.43.164.214:11111' +# VITE_API_URL = 'http://101.43.164.214:11111' # 中科安信 # VITE_API_URL = 'http://8.136.222.164:8808' # 中科佳成 diff --git a/dist.rar b/dist.rar deleted file mode 100644 index d26f6ab..0000000 Binary files a/dist.rar and /dev/null differ diff --git a/src/api/modules/smartSafeHat.ts b/src/api/modules/smartSafeHat.ts index e98dac2..1905621 100644 --- a/src/api/modules/smartSafeHat.ts +++ b/src/api/modules/smartSafeHat.ts @@ -51,6 +51,10 @@ export const getVehiclePositionDayRecord = (params: {}) => { export const getHatDevOptionApi = (params: {}) => { return http.get(BASEURL + `/xmgl/safetyHatDev/list`, params); }; +// 智能安全帽--分类查询设备树 +export const getEnterpriseTreeApi = (params: {}) => { + return http.get(BASEURL + `/xmgl/safetyHatDev/enterprise/tree/list`, params); +}; // 智能安全帽--查询设备状态总数 export const getSafeHatTypeTotalApi = (params: {}) => { return http.post(BASEURL + `/xmgl/safetyHatDev/countSafetyHatDev`, params); diff --git a/src/assets/images/mapimg/ey.png b/src/assets/images/mapimg/ey.png new file mode 100644 index 0000000..7d1f3dc Binary files /dev/null and b/src/assets/images/mapimg/ey.png differ diff --git a/src/assets/images/mapimg/wx.png b/src/assets/images/mapimg/wx.png new file mode 100644 index 0000000..29179f3 Binary files /dev/null and b/src/assets/images/mapimg/wx.png differ diff --git a/src/config/config.ts b/src/config/config.ts index 524753c..61c89bc 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -55,6 +55,5 @@ export const COMPANY: string = ""; //标准版 // export const COMPANY: string = "ztsyj"; // 中铁十一局 // export const COMPANY: string = "xnyzhjj"; // 新能源智慧基建管理平台 // export const COMPANY: string = "allxm"; // 安立路项目 - - - +// export const COMPANY: string = "hbla"; // 湖北龙澳 +// export const COMPANY: string = "qyg"; // 清远港 diff --git a/src/config/staticMenu.ts b/src/config/staticMenu.ts index e7f9996..b8623de 100644 --- a/src/config/staticMenu.ts +++ b/src/config/staticMenu.ts @@ -2124,3 +2124,75 @@ export const ALLXMMenu: Array = [ }, { moduleName: "BIM模型", modulePath: "/bImModel" } ]; // 安立路项目 + +export const HBLAMenu: Array = [ + { + moduleName: "综合管理", + modulePath: "/projectOverview" + }, + { + moduleName: "视频监控", + modulePath: "/videoManagement" + }, + { + moduleName: "安全管理", + modulePath: "/securityManagement" + }, + { + moduleName: "质量管理", + modulePath: "/qualityManagement" + }, + { + moduleName: "塔吊监测", + modulePath: "/towerCraneMonitoring" + }, + { + moduleName: "进度管理", + modulePath: "/schedulePlan" + } +]; // 湖北龙澳 +export const QYGMenu: Array = [ + { + moduleName: "工程概况", + modulePath: "/projectOverview" + }, + { + moduleName: "劳务管理", + modulePath: "/laborManagement" + }, + { + moduleName: "视频监控", + modulePath: "/videoManagement" + }, + { + moduleName: "安全管理", + modulePath: "/securityManagement" + }, + { + moduleName: "质量管理", + modulePath: "/qualityManagement" + }, + { + moduleName: "绿色施工", + modulePath: "/headNoise", + menuList: [ + { + menuName: "环境监测", + companyPath: "/headNoise" + }, + { + menuName: "升降机监测", + companyPath: "/elevatorMonitoring" + }, + { + menuName: "塔吊监测", + companyPath: "/towerCraneMonitoring" + } + ] + }, + { + moduleName: "进度管理", + modulePath: "/schedulePlan" + }, + { moduleName: "BIM模型", modulePath: "/bImModel" } +]; // 清远港 diff --git a/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue b/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue index 8cce886..8c16ec4 100644 --- a/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue +++ b/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/index.vue @@ -50,21 +50,40 @@ style="margin-left: 55px; color: #fff" >全选 - +
- + + + + {{ item.workerName }} - - + -->
暂无设备
@@ -113,11 +132,14 @@
-
-
{{ item.fenceName }}
-
{{ item.workerNum }}
-
-
+
+
{{ item.fenceName }}
+
{{ item.workerNum }}
+
+

暂无数据

@@ -321,8 +343,13 @@
+ +
+ + + {{ mapType === 1 ? '卫星' : '二维' }} +
-
开始轨迹动画
@@ -394,6 +421,7 @@ import { getAlarmRecordInfoApi, getAlarmRecordInfoApiPage, getHatDevOptionApi, + getEnterpriseTreeApi, addstandardDevApi, getRealtimeRecordInfo, getRealtimeRecordList, @@ -455,6 +483,7 @@ let checkAllFence = ref(false); let checkedCities = ref([]); let checkedFence = ref([]); let devList = ref(["鲁U6675", "刘江", "蒋东", "鲁U9675"]); +let treeList = ref([]); let isIndeterminate = ref(true); let isIndeterminateFence = ref(true); let checked = ref(1); @@ -464,6 +493,7 @@ interface RuleForm { // fenceName: string // areaRadius: number } +let tree = ref(null); let addFormRef = ref(); // const addForm = reactive({ let addForm = ref({ @@ -493,6 +523,7 @@ let pagLabor = ref({ pageNo: 1, total: 0 }); +let mapType = ref(1); // 1: 二维,2: 卫星 let tableListData = ref([]); // 劳务列表 let choicePerson = ref(false); let laborRadio = ref(""); //选择 @@ -1218,7 +1249,8 @@ function getCrewListData() { }; console.log("👇智能安全帽--分类查询设备列表--查询参数"); console.log(data); - getHatDevOptionApi(data).then(res => { + // getHatDevOptionApi(data).then(res => { + getEnterpriseTreeApi(data).then(res => { console.log("👇智能安全帽--分类查询设备列表"); console.log(res); if (res.code == 200) { @@ -1246,12 +1278,24 @@ function getCrewListData() { // nameOptions.value = nameOption.concat(carOption); nameOptions.value = nameOption.concat([]); - devList.value = res.result; + treeList.value = res.result; + devList.value = flattenTree(res.result).filter(item => item.devSn); } else { ElMessage.error(res.message); } }); } +// 扁平化树形数据 +function flattenTree(tree) { + let result = []; + tree.forEach(item => { + result.push(item); + if (item.safetyHatDevs && item.safetyHatDevs.length > 0) { + result = result.concat(flattenTree(item.safetyHatDevs)); + } + }); + return result; +} const refScrollbar = ref(null as any); // 绑定到滚动的盒子上 const moreScroll = ref(true as any); @@ -1331,6 +1375,7 @@ function handleCheckAllChange(val) { clearFn(); let nameArr = devList.value.map(item => item.devSn); checkedCities.value = val ? nameArr : []; + tree.value.setCheckedKeys(checkedCities.value); isIndeterminate.value = false; if (val) { listData; @@ -1342,6 +1387,11 @@ function handleCheckAllChange(val) { getProgressListData(); drawFencePoint(); } +const handleCheck = () => { + checkedCities.value = tree?.value.getCheckedKeys().filter(item => item); + console.info(checkedCities.value, "checkedCities"); + handleCheckedCitiesChange(checkedCities.value); +}; function handleCheckedCitiesChange(value) { console.log("设备选中", value); clearFn(); @@ -1589,7 +1639,7 @@ function trackMapInit(path: any, item: any) { //构建信息窗体中显示的内容 // console.log(e); let info = []; - + info.push('
所属单位: ' + item.enterpriseName + "
"); info.push('
设备序号: ' + item.devSn + "
"); info.push('
人员名称: ' + item.workerName + "
"); // info.push('
最后更新时间: ' + item.updateTime + "
"); @@ -1621,6 +1671,15 @@ const getProjectInfo = async () => { projectData.value = res.result; initMap(); }; +function changeMapType() { + mapType.value = mapType.value === 1 ? 2 : 1; + var satellite = new AMap.TileLayer.Satellite(); + if(mapType.value === 2){ + map.setLayers([satellite]); + }else{ + map.setLayers([new AMap.TileLayer()]); + } +} // 围栏定位地图 function initMap() { var that = this; @@ -1947,6 +2006,7 @@ function echoCarMarker(item) { // console.log(e) let info = []; + info.push('
所属单位: ' + item.enterpriseName + "
"); info.push('
设备序号: ' + item.devSn + "
"); info.push('
人员名称: ' + item.workerName + "
"); // info.push('
最后更新时间: ' + item.updateTime + "
"); @@ -2006,6 +2066,7 @@ function echoPersonMarker(item) { console.log(e); let info = []; + info.push('
所属单位: ' + item.enterpriseName + "
"); info.push('
设备序号: ' + item.devSn + "
"); info.push('
人员名称: ' + item.workerName + "
"); // info.push('
最后更新时间: ' + item.updateTime + "
"); @@ -2783,6 +2844,30 @@ function echoPersonMarker(item) { } } } + .map-type { + position: absolute; + right: 1%; + top: 14%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 4px 2px; + border: solid 1px #fff; + width: 80px; + // height: 110px; + cursor: pointer; + background: #1d2d40; + img { + width: 72px; + height: 72px; + } + span { + color: #fff; + font-size: 14px; + padding-top: 4px; + } + } .right-bottom { display: flex; @@ -3108,4 +3193,55 @@ function echoPersonMarker(item) { } } } +:deep() { + .el-tree { + background-color: transparent; + .el-tree-node { + white-space: normal; + &:focus > .el-tree-node__content { + background-color: transparent; + } + &.is-current > .el-tree-node__content { + background-color: rgba(81, 129, 246, 0.14); + color: #5181f6; + } + } + .el-tree-node__label { + color: #fff; + } + .el-tree-node__content { + position: relative; + &:hover { + background-color: rgba(81, 129, 246, 0.14); + color: #5181f6; + } + } + .el-tree-node__expand-icon { + font-size: 16px; + padding: 0 6px; + &.is-leaf { + color: transparent !important; + } + } + .treeTitle { + background-color: #f7f7f7; + margin-bottom: 10px; + } + } +} +.custom-tree-node { + width: 100%; + img { + width: 16px; + height: 16px; + margin-right: 4px; + } +} +.nodeName { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + color: #fff; +} diff --git a/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/indexer.vue b/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/indexer.vue index 8f7b688..6765503 100644 --- a/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/indexer.vue +++ b/src/views/sevenLargeScreen/digitalConstruction/smartSafeHat/indexer.vue @@ -69,21 +69,40 @@ @change="handleCheckAllChange" style="margin-left: 55px; color: #fff" >全选 - +
- + + + + {{ item.workerName }} -
- + -->
暂无设备
@@ -219,6 +238,12 @@ + +
+ + + {{ mapType === 1 ? '卫星' : '二维' }} +
@@ -467,6 +492,7 @@ import { getAlarmRecordInfoApi, getAlarmRecordInfoApiPage, getHatDevOptionApi, + getEnterpriseTreeApi, addstandardDevApi, getRealtimeRecordInfo, getRealtimeRecordList, @@ -526,6 +552,7 @@ let checkAllFence = ref(false); let checkedCities = ref([]); let checkedFence = ref([]); let devList = ref(["鲁U6675", "刘江", "蒋东", "鲁U9675"]); +let treeList = ref([]); let isIndeterminate = ref(true); let isIndeterminateFence = ref(true); let checked = ref(1); @@ -535,6 +562,7 @@ interface RuleForm { // fenceName: string // areaRadius: number } +let tree = ref(null); let addFormRef = ref(); // const addForm = reactive({ let addForm = ref({ @@ -564,6 +592,7 @@ let pagLabor = ref({ pageNo: 1, total: 0 }); +let mapType = ref(2); // 1: 二维,2: 卫星 let tableListData = ref([]); // 劳务列表 let choicePerson = ref(false); let laborRadio = ref(""); //选择 @@ -1276,7 +1305,8 @@ function getCrewListData() { }; console.log("👇智能安全帽--分类查询设备列表--查询参数"); console.log(data); - getHatDevOptionApi(data).then(res => { + // getHatDevOptionApi(data).then(res => { + getEnterpriseTreeApi(data).then(res => { console.log("👇智能安全帽--分类查询设备列表"); console.log(res); if (res.code == 200) { @@ -1304,12 +1334,24 @@ function getCrewListData() { // nameOptions.value = nameOption.concat(carOption); nameOptions.value = nameOption.concat([]); - devList.value = res.result; + treeList.value = res.result; + devList.value = flattenTree(res.result).filter(item => item.devSn); } else { ElMessage.error(res.message); } }); } +// 扁平化树形数据 +function flattenTree(tree) { + let result = []; + tree.forEach(item => { + result.push(item); + if (item.safetyHatDevs && item.safetyHatDevs.length > 0) { + result = result.concat(flattenTree(item.safetyHatDevs)); + } + }); + return result; +} const refScrollbar = ref(null as any); // 绑定到滚动的盒子上 const moreScroll = ref(true as any); @@ -1387,6 +1429,7 @@ function handleCheckAllChange(val) { clearFn(); let nameArr = devList.value.map(item => item.devSn); checkedCities.value = val ? nameArr : []; + tree.value.setCheckedKeys(checkedCities.value); isIndeterminate.value = false; if (val) { listData; @@ -1398,6 +1441,11 @@ function handleCheckAllChange(val) { getProgressListData(); drawFencePoint(); } +const handleCheck = () => { + checkedCities.value = tree?.value.getCheckedKeys().filter(item => item); + console.info(checkedCities.value, "checkedCities"); + handleCheckedCitiesChange(checkedCities.value); +}; function handleCheckedCitiesChange(value) { console.log("设备选中", value); clearFn(); @@ -1645,6 +1693,7 @@ function trackMapInit(path: any, item: any) { // console.log(e); let info = []; + info.push('
所属单位: ' + item.enterpriseName + "
"); info.push('
设备序号: ' + item.devSn + "
"); info.push('
人员名称: ' + item.workerName + "
"); // info.push('
最后更新时间: ' + item.updateTime + "
"); @@ -1949,6 +1998,15 @@ const logisticsInfoList = ref([ /*** Cellular-Z 20240829 08:15:32 ***/ ]); +function changeMapType() { + mapType.value = mapType.value === 1 ? 2 : 1; + var satellite = new AMap.TileLayer.Satellite(); + if(mapType.value === 2){ + map.setLayers([satellite]); + }else{ + map.setLayers([new AMap.TileLayer()]); + } +} function initMap() { // 初始化地图 map = new AMap.Map("mapContainer", { @@ -2263,6 +2321,7 @@ function echoCarMarker(item) { // console.log(e) let info = []; + info.push('
所属单位: ' + item.enterpriseName + "
"); info.push('
设备序号: ' + item.devSn + "
"); info.push('
人员名称: ' + item.workerName + "
"); // info.push('
最后更新时间: ' + item.updateTime + "
"); @@ -2339,6 +2398,7 @@ function echoPersonMarker(item) { console.log(e); let info = []; + info.push('
所属单位: ' + item.enterpriseName + "
"); info.push('
设备序号: ' + item.devSn + "
"); info.push('
人员名称: ' + item.workerName + "
"); // info.push('
最后更新时间: ' + item.updateTime + "
"); @@ -3126,7 +3186,30 @@ function echoPersonMarker(item) { } } } - + .map-type { + position: absolute; + right: 1%; + top: 14%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 4px 2px; + border: solid 1px #fff; + width: 80px; + // height: 110px; + cursor: pointer; + background: #1d2d40; + img { + width: 72px; + height: 72px; + } + span { + color: #fff; + font-size: 14px; + padding-top: 4px; + } + } .right-bottom { display: flex; justify-content: space-between; @@ -3451,4 +3534,55 @@ function echoPersonMarker(item) { } } } +:deep() { + .el-tree { + background-color: transparent; + .el-tree-node { + white-space: normal; + &:focus > .el-tree-node__content { + background-color: transparent; + } + &.is-current > .el-tree-node__content { + background-color: rgba(81, 129, 246, 0.14); + color: #5181f6; + } + } + .el-tree-node__label { + color: #fff; + } + .el-tree-node__content { + position: relative; + &:hover { + background-color: rgba(81, 129, 246, 0.14); + color: #5181f6; + } + } + .el-tree-node__expand-icon { + font-size: 16px; + padding: 0 6px; + &.is-leaf { + color: transparent !important; + } + } + .treeTitle { + background-color: #f7f7f7; + margin-bottom: 10px; + } + } +} +.custom-tree-node { + width: 100%; + img { + width: 16px; + height: 16px; + margin-right: 4px; + } +} +.nodeName { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + color: #fff; +} diff --git a/src/views/sevenLargeScreen/indexL.vue b/src/views/sevenLargeScreen/indexL.vue index c7527cd..3b33ddf 100644 --- a/src/views/sevenLargeScreen/indexL.vue +++ b/src/views/sevenLargeScreen/indexL.vue @@ -1,12 +1,5 @@