diff --git a/yanzhu-bigscreen/src/api/bim.js b/yanzhu-bigscreen/src/api/bim.js index 46236016..f3c4dc76 100644 --- a/yanzhu-bigscreen/src/api/bim.js +++ b/yanzhu-bigscreen/src/api/bim.js @@ -7,6 +7,14 @@ const listBimModel = (query) => { params: query, }); }; + +const modelPropertyByExternalId = (modelName,externalId) => { + return request({ + url: `/manage/bim/modelInfo/modelPropertyByExternalId/${modelName}?externalId=${externalId}`, + method: "get" + }); +}; + //获取BIM设备位置 const devicePositionGet = (data) => { return request({ @@ -102,6 +110,7 @@ const roamingGet=data=>{ export default { listBimModel, + modelPropertyByExternalId, devicePositionGet, devTowerBimData, videoMonitorBimData, diff --git a/yanzhu-bigscreen/src/assets/icons/svg/area2.svg b/yanzhu-bigscreen/src/assets/icons/svg/area2.svg new file mode 100644 index 00000000..bd8e8b57 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/area2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/attribute.svg b/yanzhu-bigscreen/src/assets/icons/svg/attribute.svg new file mode 100644 index 00000000..130181f3 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/attribute.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/distance.svg b/yanzhu-bigscreen/src/assets/icons/svg/distance.svg new file mode 100644 index 00000000..30ddbfcf --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/distance.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/hide.svg b/yanzhu-bigscreen/src/assets/icons/svg/hide.svg new file mode 100644 index 00000000..4bd3283d --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/hide.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/info.svg b/yanzhu-bigscreen/src/assets/icons/svg/info.svg new file mode 100644 index 00000000..955d4357 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/info.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/sectioning.svg b/yanzhu-bigscreen/src/assets/icons/svg/sectioning.svg new file mode 100644 index 00000000..1fb87bf7 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/sectioning.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/size2.svg b/yanzhu-bigscreen/src/assets/icons/svg/size2.svg new file mode 100644 index 00000000..77286650 --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/size2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/assets/icons/svg/volume.svg b/yanzhu-bigscreen/src/assets/icons/svg/volume.svg new file mode 100644 index 00000000..2eab283e --- /dev/null +++ b/yanzhu-bigscreen/src/assets/icons/svg/volume.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/yanzhu-bigscreen/src/components/header.vue b/yanzhu-bigscreen/src/components/header.vue index 367816c4..13ede69b 100644 --- a/yanzhu-bigscreen/src/components/header.vue +++ b/yanzhu-bigscreen/src/components/header.vue @@ -143,6 +143,7 @@ export default { isFullScreen: false, showMenus: [], showMenusNavIds: [], + notDetail: false, }; }, computed: { @@ -175,7 +176,9 @@ export default { const prjId = urlParams.get("prjId"); localStorage.setItem("selProj", prjId); setTimeout(() => { - location.hash = "#/detail"; + if (this.notDetail == false) { + location.hash = "#/detail"; + } }, 800); } window.xapp = this; @@ -216,7 +219,6 @@ export default { }, loadMenu() { this.$api.project.bigScreenGetMenuByProjectId(this.selProjectId).then((d) => { - let objs = d.data || []; if (objs.length == 0) { objs = [ @@ -232,7 +234,18 @@ export default { } this.showMenus = objs; this.showMenusNavIds = this.showMenus.map((d) => d.navId); - console.log(this.showMenusNavIds); + let tmps = this.showMenusNavIds.filter((item) => [1, 2, 3, 4, 5, 6, 7].includes(+item)); + if (!tmps.includes(2) && !this.showMenusNavIds.includes(""+this.nav)) { + let nav = tmps[0]; + nav = tmps[0]; + tmps = this.showMenusNavIds.filter((item) => String(item).startsWith(nav + "")); + if (tmps.length > 1) { + nav = tmps[1]; + } + this.$store.dispatch("ChangeNav", nav); + this.doNav(+nav); + this.notDetail = true; + } }); }, doNav(n) { @@ -280,6 +293,9 @@ export default { case 702: this.$router.push("/bimRoaming"); break; + case 704: + this.$router.push("/bimBriefing"); + break; case 701: this.$router.push("/bimManage"); break; diff --git a/yanzhu-bigscreen/src/router/index.js b/yanzhu-bigscreen/src/router/index.js index cb5a0210..f55bf2e6 100644 --- a/yanzhu-bigscreen/src/router/index.js +++ b/yanzhu-bigscreen/src/router/index.js @@ -72,6 +72,13 @@ const routes = [ component: () => import(/* webpackChunkName: "bimRoaming" */ "../views/bimRoaming.vue"), }, + { + path: "/bimBriefing", + name: "bimBriefing", + meta: { nav: 704 }, + component: () => + import(/* webpackChunkName: "bimBriefing" */ "../views/bimBriefing.vue"), + }, { path: "/videoMonitor", name: "videoMonitor", diff --git a/yanzhu-bigscreen/src/utils/tools.js b/yanzhu-bigscreen/src/utils/tools.js index d05e6d14..7b080fd9 100644 --- a/yanzhu-bigscreen/src/utils/tools.js +++ b/yanzhu-bigscreen/src/utils/tools.js @@ -8,3 +8,38 @@ export function tryToJson(str,def=null){ return def; } } + + export function MergeArray(arr1, arr2) { + var _arr = new Array(); + for (var i = 0; i < arr1.length; i++) { + _arr.push(arr1[i]); + } + for (var i = 0; i < arr2.length; i++) { + var flag = true; + for (var j = 0; j < arr1.length; j++) { + if (arr2[i] == arr1[j]) { + flag = false; + break; + } + } + if (flag) { + _arr.push(arr2[i]); + } + } + return _arr; +} +export function DelArray(array1, array2) { + var result = []; + for (var i = 0; i < array1.length; i++) { + var k = 0; + for (var j = 0; j < array2.length; j++) { + if (array1[i] != array2[j]) { + k++; + if (k == array2.length) { + result.push(array1[i]); + } + } + } + } + return result; +} \ No newline at end of file diff --git a/yanzhu-bigscreen/src/views/bim/001.png b/yanzhu-bigscreen/src/views/bim/001.png deleted file mode 100644 index f992ef90..00000000 Binary files a/yanzhu-bigscreen/src/views/bim/001.png and /dev/null differ diff --git a/yanzhu-bigscreen/src/views/bim/briefingTools.js b/yanzhu-bigscreen/src/views/bim/briefingTools.js new file mode 100644 index 00000000..29cfcd51 --- /dev/null +++ b/yanzhu-bigscreen/src/views/bim/briefingTools.js @@ -0,0 +1,129 @@ +function groupData(data) { + let tmps = []; + let obj = {}; + data.forEach((item) => { + let setName = item.propertySetName; + if (!obj[setName]) { + obj[setName] = []; + } + obj[setName].push(item); + }); + for (let key in obj) { + tmps.push({ + name: key, + data: obj[key], + }); + } + return tmps; +} +//清除选中构件样式 +function clearSelectFeature(that) { + let api = bimBriefingApi; + if (that.selFeatureId) { + let modelId = that.selFeatureId.split("^")[0]; + api.Feature.setColor(that.selFeatureId, "rgba(255,255,255,1)", modelId); + that.selFeatureId = ""; + } +} +//查询构件属性信息 +function dataFiltering(that, id) { + const gild = id.split("^"); + let modelName = ""; + that.models.forEach((item) => { + if (item.gis?.lightweightName == gild[0]) { + modelName = item.gis.name; + } + }); + if (!modelName || !gild[1]) { + return false; + } + let featureId = gild[1].split("_")[0]; + that.$api.bim.modelPropertyByExternalId(gild[0], featureId).then((d) => { + let tmps = d.data || []; + that.propertyAttr = groupData(tmps.filter((d) => d.propertyTypeName == "properties")); + that.propertyType = groupData(tmps.filter((d) => d.propertyTypeName != "properties")); + that.propertyLoad = "end"; + }); +} +/** + * 获取构件属性信息 + */ +function getProperty(that) { + let api = bimBriefingApi; + api.Feature.getByEvent(true, (n) => { + console.log(n); + if (n && n["id"]) { + let featureId = n.id; + if (featureId.split("^")[1]) { + let modelId = featureId.split("^")[0]; + clearSelectFeature(that); + api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId); + that.selFeatureId = featureId; + dataFiltering(that, featureId); + that.propertyLoad = "start"; + that.attributeInformation = "查询中,请稍候~"; + } + } else { + that.attributeInformation = "未选中构件"; + } + }); +} + +/** + * 获取构件尺寸信息 + */ +function subFeatureSize(that) { + let api = bimBriefingApi; + that.info = []; + api.Public.clearHandler(), api.Measurement.clearAllTrace(); + api.Feature.getByEvent(true, (n) => { + console.log(n); + if (n && n["id"]) { + let featureId = n.id; + let modelId = featureId.split("^")[0]; + clearSelectFeature(that); + api.Feature.getGeometrySizeById(featureId, (res) => { + let size = res.size || {}; + that.info = [ + { name: "长", value: (size.x || 0).toFixed(2) + "" }, + { name: "宽", value: (size.y || 0).toFixed(2) + "" }, + { name: "高", value: (size.z || 0).toFixed(2) + "" }, + ]; + api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId); + that.selFeatureId = featureId; + }); + } + }); +} +//构件面积 +function measurementArea(that) {} + +//构件体积 +function measuringVolume(that){ + +} +//构件距离 +function distance(that){ + +} + +//剖切 +function initClipping(that){ + +} + +//构件隐藏 +function actorVisible(){ + +} + +export default { + measurementArea, + clearSelectFeature, + getProperty, + subFeatureSize, + measuringVolume, + distance, + initClipping, + actorVisible, +}; diff --git a/yanzhu-bigscreen/src/views/bimBriefing.vue b/yanzhu-bigscreen/src/views/bimBriefing.vue new file mode 100644 index 00000000..507b90c4 --- /dev/null +++ b/yanzhu-bigscreen/src/views/bimBriefing.vue @@ -0,0 +1,717 @@ + + + + + diff --git a/yanzhu-bigscreen/src/views/bimRoaming.vue b/yanzhu-bigscreen/src/views/bimRoaming.vue index 1a373779..0e68e3e1 100644 --- a/yanzhu-bigscreen/src/views/bimRoaming.vue +++ b/yanzhu-bigscreen/src/views/bimRoaming.vue @@ -2,89 +2,88 @@
- -
- -
-
-
- - 模型结构树 -
-
- -
+
+
+ +
+
+
+ + 模型结构树 +
+
+
- - -
+
+ + +
-
- -
-
-
- - 漫游方案 -
-
-
暂无数据
-
- - {{ item.name }} +
+ +
+
+
+ + 漫游方案 +
+
+
暂无数据
+
+ + {{ item.name }} + +
+ + + + + + + + + + + -
- - - - - - - - - - - - -
-
-
-
- -
-
- - 视点列表 -
-
-
暂无数据
-
-
- - - {{ item.name }} - - {{ item.name }} -
- - -
+ +
+
+ + 视点列表 +
+
+
暂无数据
+
+
+ + + {{ item.name }} + + {{ item.name }} +
+
+
+
+
+ +
@@ -100,6 +99,7 @@ diff --git a/yanzhu-ui-vue3/src/views/manage/proProjectInfo/index.vue b/yanzhu-ui-vue3/src/views/manage/proProjectInfo/index.vue index 2ddbd8c9..314fd821 100644 --- a/yanzhu-ui-vue3/src/views/manage/proProjectInfo/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/proProjectInfo/index.vue @@ -6,8 +6,7 @@ - + @@ -18,25 +17,21 @@ - 新增 + 新增 - 修改 + 修改 - 删除 + 删除 - 导出 + 导出 - + @@ -53,8 +48,7 @@ @@ -63,21 +57,21 @@ @@ -97,45 +91,40 @@ - @@ -392,12 +365,12 @@