开发大屏BIM交底
|
@ -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,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="33738"><path d="M997.025561 786.030584h-50.519924V237.283625h49.719835c15.201697 0 27.431633-12.229936 27.431633-27.431633V27.431633c0-15.201697-12.229936-27.431633-27.431633-27.431633H813.805112c-15.201697 0-27.431633 12.229936-27.431633 27.431633v59.549503H237.512222V27.888827c0-15.201697-12.229936-27.431633-27.431633-27.431633H27.66023C12.458533 0.457194 0.228597 12.68713 0.228597 27.888827V210.309186c0 15.201697 12.229936 27.431633 27.431633 27.431633h59.663802v547.946869H27.431633c-15.201697 0-27.431633 12.229936-27.431633 27.431633V995.539681c0 15.201697 12.229936 27.431633 27.431633 27.431633h182.420359c15.201697 0 27.431633-12.229936 27.431633-27.431633v-49.262641h549.889943v49.605536c0 15.201697 12.229936 27.431633 27.431633 27.431633h182.42036c15.201697 0 27.431633-12.229936 27.431633-27.431633V813.462217c0-15.087398-12.229936-27.431633-27.431633-27.431633zM854.952562 68.579082h100.12546v100.125461H854.952562V68.579082z m-265.172453 86.981137L155.903114 589.437214V457.079585l301.519366-301.519366H589.780109zM68.807679 169.161737V69.036276h100.125461V169.161737H68.807679z m141.27291 68.579082c15.201697 0 27.431633-12.229936 27.431633-27.431633v-54.748967h122.985155l-204.594263 204.594263V237.740819h54.177475z m-54.177475 448.621498l530.802099-530.802098H786.373479v32.575064L188.935372 785.57339h-33.032258v-99.211073z m12.801429 267.915616H68.579082v-100.125461h100.125461v100.125461z m68.579082-76.694274v-43.319121l596.980913-596.980913h43.662016v88.581315L326.207836 877.583659h-88.924211z m185.849314 0L877.926554 422.904342v132.243331L555.490568 877.583659H423.132939z m229.282732 0l225.510883-225.510883v133.957808h-63.321353c-15.201697 0-27.431633 12.229936-27.431633 27.431633v64.23574l-134.757897-0.114298z m303.46244 77.151468h-100.12546v-100.125461h100.12546v100.125461z" p-id="33739"></path></svg>
|
After Width: | Height: | Size: 2.0 KiB |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1.005859375em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1030 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="60856"><path d="M275.2 710.4c-19.2 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4 38.4-19.2 38.4-38.4c0-25.6-12.8-38.4-38.4-38.4z m0-473.6c-19.2 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4 38.4-19.2 38.4-38.4-12.8-38.4-38.4-38.4z m0 236.8c-19.2 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4 38.4-19.2 38.4-38.4-12.8-38.4-38.4-38.4zM864 0h-704C70.4 0 0 70.4 0 160v710.4C0 953.6 70.4 1024 160 1024h710.4c89.6 0 160-70.4 160-160v-704C1024 70.4 953.6 0 864 0z m83.2 864c0 44.8-38.4 76.8-76.8 76.8H160c-44.8 0-76.8-38.4-76.8-76.8v-704c0-44.8 38.4-76.8 76.8-76.8h710.4c44.8 0 76.8 38.4 76.8 76.8v704z m-198.4-627.2H435.2c-25.6 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4h313.6c19.2 0 38.4-19.2 38.4-38.4s-19.2-38.4-38.4-38.4z m0 236.8H435.2c-25.6 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4h313.6c19.2 0 38.4-19.2 38.4-38.4s-19.2-38.4-38.4-38.4z m0 236.8H435.2c-19.2 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4h313.6c19.2 0 38.4-19.2 38.4-38.4 0-25.6-19.2-38.4-38.4-38.4z" p-id="60857"></path></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1.181640625em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1210 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="38014"><path d="M1150.324 458.845a48.966 48.966 0 0 1 48.594 42.822V959.86a48.966 48.966 0 0 1-42.822 48.594H48.78A48.966 48.966 0 0 1 0.186 965.632V507.439a48.966 48.966 0 0 1 42.822-48.594h6.144z m-957.719 97.932H97.932v353.745h1003.333V556.777h-88.715V803.84a30.627 30.627 0 1 1-61.161 0V556.777h-68.05v120.552a30.627 30.627 0 1 1-61.16 0V556.777H705.815v120.552a30.627 30.627 0 0 1-61.16 0V556.777H560.873V803.84a30.627 30.627 0 1 1-61.161 0V556.777h-67.956v120.552a30.627 30.627 0 1 1-61.161 0V556.777H254.138v120.552a30.627 30.627 0 0 1-61.16 0zM97.932 0v122.321h1003.333V0h97.932v342.575h-97.932V220.16H97.933v122.508H0V0.093z" p-id="38015"></path></svg>
|
After Width: | Height: | Size: 859 B |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="55816"><path d="M253.6 679.2l109.6-109.6C356 552 352 532.8 352 512c0-88 72-160 160-160 20.8 0 40 4 57.6 11.2l82.4-82.4C607.2 264.8 560 256 512 256c-168 0-329.6 106.4-384 256 24 65.6 68.8 123.2 125.6 167.2zM416 512v4.8L516.8 416H512c-52.8 0-96 43.2-96 96zM770.4 344.8l163.2-163.2L888 136l-753.6 753.6 45.6 45.6 192.8-192.8A390.4 390.4 0 0 0 512 768c167.2 0 330.4-106.4 384.8-256-24-65.6-69.6-123.2-126.4-167.2zM512 672c-20 0-40-4-57.6-11.2l53.6-53.6h4.8c52.8 0 96-43.2 96-96v-4.8l53.6-53.6C668 472 672 492 672 512c0 88-72 160-160 160z" p-id="55817"></path></svg>
|
After Width: | Height: | Size: 749 B |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="97561"><path d="M832 128H192a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64z m-320 128a48 48 0 1 1 0 96 48 48 0 0 1 0-96z m128 516.010667H384v-72.021334h92.010667v-183.978666H416v-72h132.010667v256H640v71.978666z" p-id="97562"></path></svg>
|
After Width: | Height: | Size: 466 B |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="55431"><path d="M526.762667 26.026667l445.866666 114.858666a11.562667 11.562667 0 0 1 8.704 11.136 9.984 9.984 0 0 1 0.426667 1.834667l0.170667 2.773333-3.285334 446.08a18.773333 18.773333 0 0 1-4.906666 12.629334l-2.048 1.92-159.146667 129.365333v223.786667a28.885333 28.885333 0 0 1-35.84 28.074666l-720.64-178.56a28.885333 28.885333 0 0 1-21.930667-28.074666V105.685333c0-15.957333 12.928-28.885333 28.885334-28.885333 1.024 0 85.76 22.997333 254.165333 68.949333L492.842667 31.573333a42.666667 42.666667 0 0 1 33.92-5.546666zM71.68 117.034667V785.066667l703.232 174.293333v-182.144l-88.832 72.234667a18.773333 18.773333 0 0 1-21.333333 1.706666L198.144 735.36a42.666667 42.666667 0 0 1-32.426667-41.429333V267.434667a42.666667 42.666667 0 0 1 19.456-35.797334l90.282667-58.752-203.733333-55.850666z m699.818667 191.786666L669.397333 382.293333v432.256l105.557334-85.845333V309.802667l-3.413334-0.981334z m-139.776 438.826667l-45.568 45.141333 45.610666 11.306667-0.042666-56.448z m0.042666-202.922667l-194.773333 211.114667 104.704 25.941333 90.026667-87.253333 0.042666-149.76z m-25.258666-154.624l-323.370667 327.594667 110.336 27.349333 238.293333-252.16V396.885333l-25.258666-6.826666z m-139.349334-37.546666l-263.893333 267.605333v77.781333l33.322667 8.192 322.133333-328.917333-91.562667-24.661333zM944.128 184.746667l-138.538667 99.669333c4.394667 5.12 6.997333 11.733333 6.997334 18.858667l-0.042667 394.922666 128.512-104.405333 3.072-409.045333zM322.133333 313.429333L203.306667 425.813333v140.373334L425.472 341.333333 322.133333 313.429333z m-118.826666-32v92.714667l75.050666-72.533333-75.050666-20.224z m120.618666-95.274666L227.370667 248.96l411.776 111.018667a37.546667 37.546667 0 0 1 5.205333-5.674667l3.114667-2.517333L724.906667 296.106667 323.925333 186.154667z m191.274667-124.330667L365.738667 159.018667c105.301333 28.714667 238.08 65.024 398.336 108.842666l145.365333-104.490666-394.24-101.546667z" p-id="55432"></path></svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="32540"><path d="M305.222589 369.323416l56.875454-56.875453 361.982812 361.984234-56.875454 56.875454zM1024.270294 292.685236V0H731.058696v103.422848H292.685236V0H0v292.685236h103.465526v438.629528H0v292.685236h292.685236v-103.422848h438.615302v103.422848H1023.985774V731.314764h-106.125783V292.685236zM825.988636 98.628694h99.752546v98.657145h-99.752546z m-728.469568-1.010045h97.547519v97.632876H97.519068z m97.547519 831.977772H97.519068V828.947639h97.547519z m731.314764-3.044359h-94.517387V828.947639h94.517387z m-88.95503-195.237298h-106.125783v103.422847H292.685236v-103.422847H189.205485V292.685236h103.451299V189.205485h438.401912v103.422847h106.367625z" p-id="32541"></path></svg>
|
After Width: | Height: | Size: 877 B |
|
@ -0,0 +1 @@
|
|||
<svg class="icon" style="width: 1em;height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="34386"><path d="M349.762783 273.47033l-1.78087-4.012892h-78.50073v484.990145h80.732753V464.142099l121.835223 286.245101 1.709635 4.084128h76.316197l123.473623-290.329229v290.305484h80.732754V269.481183h-78.287026l-164.029959 380.393739zM808.419803 0v80.732754h134.728719v53.948475h-134.728719v80.732754h134.728719v53.948475h-134.728719v80.732754h215.532707V0z m0 0" p-id="34387"></path><path d="M943.148522 943.148522H80.803988V80.803988h539.009855v-80.732753H0v1023.928765h1023.881275V538.93862h-80.732753z m0 0" p-id="34388"></path></svg>
|
After Width: | Height: | Size: 730 B |
|
@ -235,7 +235,7 @@ export default {
|
|||
this.showMenus = objs;
|
||||
this.showMenusNavIds = this.showMenus.map((d) => d.navId);
|
||||
let tmps = this.showMenusNavIds.filter((item) => [1, 2, 3, 4, 5, 6, 7].includes(+item));
|
||||
if (!tmps.includes(2)) {
|
||||
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 + ""));
|
||||
|
@ -246,7 +246,6 @@ export default {
|
|||
this.doNav(+nav);
|
||||
this.notDetail = true;
|
||||
}
|
||||
console.log(this.showMenusNavIds);
|
||||
});
|
||||
},
|
||||
doNav(n) {
|
||||
|
|
|
@ -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;
|
||||
}
|
Before Width: | Height: | Size: 85 KiB |
|
@ -0,0 +1,81 @@
|
|||
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 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";
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 获取构件属性信息
|
||||
*/
|
||||
export 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];
|
||||
if (that.selFeatureId) {
|
||||
api.Feature.setColor(that.selFeatureId, "rgba(255,255,255,1)", modelId);
|
||||
}
|
||||
api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
|
||||
that.selFeatureId = featureId;
|
||||
dataFiltering(that, featureId);
|
||||
that.propertyLoad = "start";
|
||||
that.attributeInformation = "查询中,请稍候~";
|
||||
}
|
||||
} else {
|
||||
that.attributeInformation = "未选中构件";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取构件尺寸信息
|
||||
*/
|
||||
export function subFeatureSize(that) {
|
||||
let api = bimBriefingApi;
|
||||
api.Public.clearHandler(),
|
||||
api.Measurement.clearAllTrace();
|
||||
api.Feature.getByEvent(true, (n) => {
|
||||
console.log(n);
|
||||
if (n && n["id"]) {
|
||||
let featureId = n.id;
|
||||
api.Feature.getGeometrySizeById(featureId, (res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
|
@ -1,25 +1,692 @@
|
|||
<template>
|
||||
<div class="bim-briefing main-page">
|
||||
111
|
||||
<div id="bimBriefing">
|
||||
<div id="bimBriefingContainer" class="bimBriefingContainer"></div>
|
||||
</div>
|
||||
<div class="div-left" :class="{ isShow: leftShow, isHide: !leftShow }">
|
||||
<transition name="left">
|
||||
<div class="data-content" v-show="leftShow">
|
||||
<div class="div-row">
|
||||
<div class="row-title">
|
||||
<svg-icon icon-class="signal"></svg-icon>
|
||||
模型结构树
|
||||
</div>
|
||||
<div class="model-tree scroll">
|
||||
<el-tree
|
||||
:key="treeKey"
|
||||
ref="tree"
|
||||
:default-expanded-keys="treeExpendedKeys"
|
||||
:props="{
|
||||
children: 'children',
|
||||
label: 'title',
|
||||
}"
|
||||
node-key="key"
|
||||
@check="onCheckTree"
|
||||
:data="modelTrees"
|
||||
show-checkbox></el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<img :src="leftSrc" class="toSafety-fixed-left-img" @click="arrowRetract" id="arrowLeft" />
|
||||
</div>
|
||||
|
||||
<div class="div-right" :class="{ isShow: leftShow, isHide: !leftShow }">
|
||||
<transition name="right">
|
||||
<div class="data-content" v-show="leftShow">
|
||||
<div class="div-row r66">
|
||||
<div class="row-title">
|
||||
<svg-icon icon-class="signal"></svg-icon>
|
||||
属性
|
||||
</div>
|
||||
<div class="model-properties scroll">
|
||||
<div class="loading" v-if="propertyLoad == 'start'">
|
||||
{{ attributeInformation }}
|
||||
</div>
|
||||
<div class="model-property-nav" v-if="propertyLoad == 'end'">
|
||||
<el-radio-group v-model="selPropertyType" size="small" fill="#6cf">
|
||||
<el-radio-button label="att">属性</el-radio-button>
|
||||
<el-radio-button label="type">类型</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="model-property-list" v-if="propertyLoad == 'end'">
|
||||
<div v-for="(item, index) in selPropertyType == 'att' ? propertyAttr : propertyType" :key="index">
|
||||
<div class="group-info">
|
||||
<svg-icon icon-class="info" />
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
<table class="model-property-table my-table">
|
||||
<tr v-for="(item2, index) in item.data" :key="index">
|
||||
<th width="50%">{{ item2.propertyName }}</th>
|
||||
<td width="50%">{{ item2.value }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-row r33">
|
||||
<div class="row-title">
|
||||
<svg-icon icon-class="signal"></svg-icon>
|
||||
进度信息
|
||||
</div>
|
||||
<div class="model-progress scroll">
|
||||
<table class="model-progress-table my-table">
|
||||
<tr>
|
||||
<th>计划开始时间</th>
|
||||
<td>2025-01-02</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>计划结束时间</th>
|
||||
<td>2025-12-31</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="group-info">
|
||||
<svg-icon icon-class="info" />
|
||||
<span>当前进度</span>
|
||||
</div>
|
||||
<el-progress :text-inside="true" :stroke-width="26" color="#37A685" :percentage="70" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<img :src="rightSrc" class="toSafety-fixed-right-img" @click="arrowRetract" id="arrowRight" />
|
||||
</div>
|
||||
|
||||
<div class="div-tools">
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 0 }" @click="doSelectMenu(0)">
|
||||
<el-tooltip content="默认视点" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="home" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 1 }" @click="doSelectMenu(1)">
|
||||
<el-tooltip content="构建尺寸" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="size2" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 2 }" @click="doSelectMenu(2)">
|
||||
<el-tooltip content="构建面积" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="area2" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 3 }" @click="doSelectMenu(3)">
|
||||
<el-tooltip content="构建体积" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="volume" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 4 }" @click="doSelectMenu(4)">
|
||||
<el-tooltip content="距离测量" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="distance" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 5 }" @click="doSelectMenu(5)">
|
||||
<el-tooltip content="剖切" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="sectioning" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 6 }" @click="doSelectMenu(6)">
|
||||
<el-tooltip content="构建隐藏" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="hide" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 7 }" @click="doSelectMenu(7)">
|
||||
<el-tooltip content="构建属性" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="attribute" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash.debounce";
|
||||
import { MergeArray, DelArray } from "@/utils/tools";
|
||||
import { getProperty,subFeatureSize } from "./bim/briefingProperty";
|
||||
import SvgIcon from "@/components/SvgIcon.vue";
|
||||
export default {
|
||||
name: 'BimBriefing',
|
||||
components: { SvgIcon },
|
||||
name: "BimBriefing",
|
||||
data() {
|
||||
return {
|
||||
|
||||
dpi: "",
|
||||
selProject: null,
|
||||
leftSrc: "./bimImages/arrow_left_retract.png",
|
||||
rightSrc: "./bimImages/arrow_right_retract.png",
|
||||
leftShow: true,
|
||||
models: [],
|
||||
treeKey: 0,
|
||||
modelTrees: [],
|
||||
treeExpendedKeys: [],
|
||||
selectMenu: 0,
|
||||
attributeInformation: "",
|
||||
propertyAttr: [],
|
||||
propertyType: [],
|
||||
selPropertyType: "att",
|
||||
propertyLoad: "",
|
||||
viewPoint: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("ChangeNav", 702);
|
||||
this.dpi = this.$dpi();
|
||||
window.addEventListener("resize", () => {
|
||||
if (this.dpi != this.$dpi()) {
|
||||
this.dpi = this.$dpi();
|
||||
}
|
||||
});
|
||||
this.$bus.$on(
|
||||
"projectChange",
|
||||
debounce((prj) => {
|
||||
this.selProject = prj;
|
||||
this.elId++;
|
||||
this.initEngine();
|
||||
})
|
||||
);
|
||||
this.selProject = this.$store.getters.selProject;
|
||||
this.initEngine();
|
||||
},
|
||||
methods: {
|
||||
|
||||
doSelectMenu(index) {
|
||||
this.selectMenu = index;
|
||||
let api = bimBriefingApi;
|
||||
api.Feature.getByEvent(false);
|
||||
switch (index) {
|
||||
case 0:
|
||||
this.resetScene();
|
||||
break;
|
||||
case 1:
|
||||
subFeatureSize(this);
|
||||
break;
|
||||
case 2:
|
||||
this.measureArea(index);
|
||||
break;
|
||||
case 3:
|
||||
this.measureVolume(index);
|
||||
break;
|
||||
case 4:
|
||||
this.measureDistance(index);
|
||||
break;
|
||||
case 5:
|
||||
this.sectioning(index);
|
||||
break;
|
||||
case 6:
|
||||
this.hideModel(index);
|
||||
break;
|
||||
case 7:
|
||||
getProperty(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
onCheckTree(node, event) {
|
||||
if (!this.modelLoaded) {
|
||||
this.$message.error("模型未加载完成,请稍后重试");
|
||||
return;
|
||||
}
|
||||
this.playCancle();
|
||||
let checked = event.checkedNodes.includes(node);
|
||||
console.log(node, event, checked);
|
||||
if (node.type == "root") {
|
||||
//bimBriefingApi
|
||||
node.children.forEach((m) => {
|
||||
if (bimBriefingApi.m_model.has(m.modelId)) {
|
||||
bimBriefingApi.Model.remove(m.modelId);
|
||||
}
|
||||
if (checked) {
|
||||
this.addModel(m.modelId);
|
||||
}
|
||||
});
|
||||
} else if (node.type == "model") {
|
||||
if (bimBriefingApi.m_model.has(node.modelId)) {
|
||||
bimBriefingApi.Model.remove(node.modelId);
|
||||
}
|
||||
if (checked) {
|
||||
this.addModel(node.modelId);
|
||||
}
|
||||
} else {
|
||||
if (bimBriefingApi.m_model.size == 0) {
|
||||
let modelId = checkNode.modelId;
|
||||
this.addModel(modelId, () => {
|
||||
this.showItem(node, event, checked);
|
||||
});
|
||||
} else {
|
||||
this.showItem(node, event, checked);
|
||||
}
|
||||
}
|
||||
},
|
||||
async showItem(checkNode, event, checked) {
|
||||
let api = bimBriefingApi;
|
||||
api.Model.setVisible(checkNode.modelId, true);
|
||||
let externalId = checkNode.externalId;
|
||||
if (externalId != 0) {
|
||||
if (checked) {
|
||||
this.visibleList.push(externalId);
|
||||
api.Feature.setVisible(this.visibleList.join("#"), true, checkNode.modelId, false);
|
||||
} else {
|
||||
this.visibleList = this.visibleList.filter((item) => item !== externalId);
|
||||
api.Feature.setVisible(externalId, false, checkNode.modelId);
|
||||
}
|
||||
} else {
|
||||
const res = await this.$api.bim.getTreeAllLeafChild(checkNode.modelId, checkNode.glid);
|
||||
let nodes = res.data || [];
|
||||
if (nodes.length > 0) {
|
||||
if (checked) {
|
||||
this.visibleList = MergeArray(nodes, this.visibleList);
|
||||
api.Model.setVisible(checkNode.modelId, true);
|
||||
api.Feature.setVisible(this.visibleList.join("#"), true, checkNode.modelId, false);
|
||||
} else {
|
||||
this.visibleList = DelArray(this.visibleList, nodes);
|
||||
api.Feature.setVisible(nodes.join("#"), false, checkNode.modelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
arrowRetract() {
|
||||
if (this.leftShow == true) {
|
||||
this.rightSrc = "./images/arrow_right_open.png";
|
||||
this.leftSrc = "./images/arrow_left_open.png";
|
||||
$("#arrowLeft").animate({ left: 10 + "px" }, 300);
|
||||
$("#arrowRight").animate({ right: 10 + "px" }, 300);
|
||||
} else {
|
||||
this.rightSrc = "./images/arrow_right_retract.png";
|
||||
this.leftSrc = "./images/arrow_left_retract.png";
|
||||
|
||||
$("#arrowLeft").animate({ left: 490 + "px" }, 300);
|
||||
$("#arrowRight").animate({ right: 490 + "px" }, 300);
|
||||
}
|
||||
this.leftShow = !this.leftShow;
|
||||
},
|
||||
initEngine() {
|
||||
this.elId++;
|
||||
this.activeMenu = 0;
|
||||
setTimeout(() => {
|
||||
this.loadEngine();
|
||||
}, 10);
|
||||
},
|
||||
loadEngine() {
|
||||
window.bimBriefingApi = new SAPI(
|
||||
{
|
||||
serverIP: window.config.serverIP, //服务ip地址
|
||||
port: window.config.port, //HTTP端口
|
||||
useHttps: window.config.useHttps, //使用Https
|
||||
container: "bimBriefingContainer", //[必须]容器id
|
||||
secretKey: window.config.secretKey,
|
||||
openEarth: window.config.openEarth, //[可选]开启Gis场景
|
||||
bgColor: window.config.bgColor, //[可选]bim场景背景色, 传值即为纯色天空盒
|
||||
tintColor: window.config.tintColor, //[可选]osgb单体化颜色
|
||||
sceneTime: window.config.sceneTime, //[可选]分别为当前时间、日出时间、日落时间
|
||||
cadMode: window.config.cadMode, // 是否是Cad图纸预览模式
|
||||
},
|
||||
() => {
|
||||
this.initSuccess = true;
|
||||
console.log("初始化成功");
|
||||
setTimeout(() => {
|
||||
this.initLoadModel();
|
||||
}, 10);
|
||||
let mapOptions = {
|
||||
imgs: {
|
||||
// 六面图片
|
||||
top: "/cdn/bim/sapi/img/top.png",
|
||||
bottom: "/cdn/bim/sapi/img/under.png",
|
||||
east: "/cdn/bim/sapi/img/east.png",
|
||||
south: "/cdn/bim/sapi/img/south.png",
|
||||
west: "/cdn/bim/sapi/img/west.png",
|
||||
north: "/cdn/bim/sapi/img/north.png",
|
||||
},
|
||||
offset: {
|
||||
// 屏幕坐标偏移
|
||||
corner: GLENavigationCube.RightTop,
|
||||
x: 25,
|
||||
y: 20,
|
||||
},
|
||||
cube: {
|
||||
hoverColor: "#7193dc", // 立方导航快鼠标移过显示颜色
|
||||
size: 32, // 导航立方尺寸
|
||||
hotPointSize: 7, // 导航立方棱角热点区域尺寸
|
||||
cubeTextColor: "#4c4c4ccc", // cube 各个面文字颜色
|
||||
cubeStrokeColor: "#374769cc", // cube 各个面边框颜色
|
||||
cubeFillColor: "#374769cc", // cube 各个面填充颜色
|
||||
},
|
||||
zoomRatios: 1, // 缩放倍率
|
||||
show: true, // 是否显示
|
||||
showAxes: true, // 是否显示XYZ轴线
|
||||
};
|
||||
bimBriefingApi.Plugin.initNavCube(mapOptions);
|
||||
}
|
||||
);
|
||||
},
|
||||
initLoadModel() {
|
||||
this.$api.bim
|
||||
.listBimModel({
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
comId: this.selProject.comId,
|
||||
projectId: this.selProject.id,
|
||||
})
|
||||
.then((d) => {
|
||||
this.models = d.rows || [];
|
||||
if (this.models.length == 0) {
|
||||
this.$modal.msgError("暂无模型,请先关联模型");
|
||||
} else {
|
||||
this.models.forEach((item) => {
|
||||
this.addModel(item.lightweightName);
|
||||
this.loadModelTree();
|
||||
this.doSelectMenu(7);
|
||||
});
|
||||
}
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
init() {},
|
||||
loadModelTree() {
|
||||
this.modelTrees = [
|
||||
{
|
||||
title: "项目模型",
|
||||
level: 0,
|
||||
type: "root",
|
||||
key: "root",
|
||||
children: [],
|
||||
hadLoad: true,
|
||||
},
|
||||
];
|
||||
this.treeExpendedKeys.push("root");
|
||||
this.models
|
||||
.map((d) => {
|
||||
d.gis = JSON.parse(d.gisJson);
|
||||
return d;
|
||||
})
|
||||
.forEach((d) => {
|
||||
let node = {
|
||||
title: d.modelName,
|
||||
level: 1,
|
||||
type: "model",
|
||||
hasLoad: false,
|
||||
modelId: d.lightweightName,
|
||||
key: d.lightweightName,
|
||||
externalId: "0",
|
||||
glid: "",
|
||||
children: [],
|
||||
data: d,
|
||||
};
|
||||
this.treeExpendedKeys.push(node.key);
|
||||
this.modelTrees[0].children.push(node);
|
||||
this.getTreeData(node);
|
||||
});
|
||||
this.showTree = true;
|
||||
},
|
||||
getTreeData(node) {
|
||||
this.$api.bim.modelTreeAllChild(node.modelId, "").then((d) => {
|
||||
let objs = d.data || [];
|
||||
let makeTree = (tmps) => {
|
||||
tmps.forEach((item) => {
|
||||
item.children = objs.filter((it) => it.pglid == item.glid);
|
||||
if (item.children.length > 0) {
|
||||
makeTree(item.children);
|
||||
}
|
||||
item.hasLoad = true;
|
||||
item.title = item.name;
|
||||
item.key = item.glid;
|
||||
item.modelId = node.modelId;
|
||||
});
|
||||
return tmps;
|
||||
};
|
||||
node.children = makeTree(objs.filter((item) => item.level == 0));
|
||||
node.children.forEach((item) => {
|
||||
//this.treeExpendedKeys.push(item.key)
|
||||
});
|
||||
this.treeKey++;
|
||||
});
|
||||
},
|
||||
addModel(modelId, cb) {
|
||||
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
|
||||
console.log(modelId, url);
|
||||
bimBriefingApi.Model.add(
|
||||
url,
|
||||
modelId,
|
||||
() => {},
|
||||
() => {
|
||||
cb && cb();
|
||||
console.log("加载模型成功");
|
||||
setTimeout(() => {
|
||||
bimBriefingApi.Camera.getViewPort((p) => {
|
||||
this.viewPoint = p;
|
||||
this.modelLoaded = true;
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
);
|
||||
},
|
||||
resetScene() {
|
||||
this.selectedViewpoint = null;
|
||||
this.selectedRoam = null;
|
||||
bimBriefingApi.Camera.stopImmersiveRoam();
|
||||
bimBriefingApi.Model.location(bimBriefingApi.m_model.keys().toArray()[0]);
|
||||
bimBriefingApi.Plugin.deleteMiniMap();
|
||||
if (this.viewPoint) {
|
||||
bimBriefingApi.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.bim-briefing{
|
||||
.bim-briefing {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
#bimBriefing {
|
||||
height: 100%;
|
||||
#bimBriefingContainer {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.div-left {
|
||||
top: 10vh;
|
||||
left: 5%;
|
||||
position: absolute;
|
||||
height: 70vh;
|
||||
width: 14%;
|
||||
&.isHide {
|
||||
left: 0%;
|
||||
wdith: 0%;
|
||||
#arrowLeft {
|
||||
left: 0px !important;
|
||||
}
|
||||
}
|
||||
#arrowLeft {
|
||||
top: calc(50% - 50px);
|
||||
right: -21px;
|
||||
left: unset !important;
|
||||
}
|
||||
.div-row {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.div-right {
|
||||
top: 10vh;
|
||||
right: 5%;
|
||||
position: absolute;
|
||||
height: 70vh;
|
||||
width: 14%;
|
||||
&.isHide {
|
||||
right: 0%;
|
||||
width: 0%;
|
||||
}
|
||||
#arrowRight {
|
||||
top: calc(50% - 50px);
|
||||
left: -21px;
|
||||
}
|
||||
.div-row {
|
||||
&.r33 {
|
||||
height: 180px;
|
||||
}
|
||||
&.r66 {
|
||||
height: calc(100% - 180px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-content {
|
||||
height: 100%;
|
||||
.div-row {
|
||||
border: solid 1px #75fbfdaa;
|
||||
background-color: #06445b81;
|
||||
.row-title {
|
||||
background: linear-gradient(0deg, #105696, #c0dafb00, #1765ae);
|
||||
padding-left: 10px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
.svg-icon {
|
||||
fill: #75fbfd;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.div-tools {
|
||||
position: absolute;
|
||||
bottom: 25vh;
|
||||
left: 50%;
|
||||
margin-left: -200px;
|
||||
display: flex;
|
||||
background: #00000080;
|
||||
border-radius: 10px;
|
||||
.tool-item {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
padding: 10px;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
&.is-selected {
|
||||
.icon {
|
||||
background: #097fca94;
|
||||
.svg-icon {
|
||||
fill: #75fbfd;
|
||||
}
|
||||
}
|
||||
.sp-text {
|
||||
color: #75fbfd;
|
||||
}
|
||||
}
|
||||
.icon {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: #c0c4cca1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 15px;
|
||||
.svg-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
.sp-text {
|
||||
margin-top: 4px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.model-tree {
|
||||
height: calc(100% - 36px);
|
||||
overflow-y: auto;
|
||||
.el-tree {
|
||||
background: transparent;
|
||||
color: #eee;
|
||||
.el-checkbox {
|
||||
color: #45fdfe;
|
||||
}
|
||||
.el-tree-node {
|
||||
&:focus {
|
||||
& > .el-tree-node__content {
|
||||
background: #3489d966;
|
||||
&:hover {
|
||||
background: #3489d966;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-tree-node__content:hover {
|
||||
background: #3489d966;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.model-properties {
|
||||
height: calc(100% - 46px);
|
||||
overflow-y: auto;
|
||||
padding-bottom: 10px;
|
||||
.model-property-nav {
|
||||
text-align: left;
|
||||
margin: 8px;
|
||||
}
|
||||
.model-property-list {
|
||||
padding: 0px 10px;
|
||||
}
|
||||
}
|
||||
.model-progress {
|
||||
padding: 10px;
|
||||
.el-progress-bar {
|
||||
.el-progress-bar__innerText {
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loading {
|
||||
height: 50px;
|
||||
margin: 10px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
color: #edffff85;
|
||||
}
|
||||
.group-info {
|
||||
padding: 4px 0px;
|
||||
.svg-icon {
|
||||
fill: #45fdfe;
|
||||
}
|
||||
span {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.my-table {
|
||||
border-collapse: collapse;
|
||||
td,
|
||||
th {
|
||||
border: solid 1px #0e0f0f88;
|
||||
background: #10569688;
|
||||
padding: 6px 4px;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
th {
|
||||
color: #22d3f4;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -2,7 +2,7 @@
|
|||
<div class="bim-roaming main-page">
|
||||
<div id="bimRoaming">
|
||||
<div id="bimRoamingContainer" class="bimRoamingContainer"></div>
|
||||
|
||||
</div>
|
||||
<div class="div-left" :class="{ isShow: leftShow, isHide: !leftShow }">
|
||||
<transition name="left">
|
||||
<div class="data-content" v-show="leftShow">
|
||||
|
@ -85,7 +85,6 @@
|
|||
</transition>
|
||||
<img :src="rightSrc" class="toSafety-fixed-right-img" @click="arrowRetract" id="arrowRight" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="div-tools">
|
||||
<div class="tool-item" @click="resetScene">
|
||||
|
@ -100,6 +99,7 @@
|
|||
|
||||
<script>
|
||||
import debounce from "lodash.debounce";
|
||||
import { MergeArray, DelArray } from "@/utils/tools";
|
||||
export default {
|
||||
name: "BIMRoaming",
|
||||
data() {
|
||||
|
@ -112,6 +112,7 @@ export default {
|
|||
models: [],
|
||||
treeKey: 0,
|
||||
modelTrees: [],
|
||||
viewPoint:[],
|
||||
treeExpendedKeys: [],
|
||||
visibleList: [],
|
||||
viewpointList: [],
|
||||
|
@ -251,50 +252,17 @@ export default {
|
|||
let nodes = res.data || [];
|
||||
if (nodes.length > 0) {
|
||||
if (checked) {
|
||||
this.visibleList = this.MergeArray(nodes, this.visibleList);
|
||||
this.visibleList = MergeArray(nodes, this.visibleList);
|
||||
api.Model.setVisible(checkNode.modelId, true);
|
||||
api.Feature.setVisible(this.visibleList.join("#"), true, checkNode.modelId, false);
|
||||
} else {
|
||||
this.visibleList = this.DelArray(this.visibleList, nodes);
|
||||
this.visibleList = DelArray(this.visibleList, nodes);
|
||||
api.Feature.setVisible(nodes.join("#"), false, checkNode.modelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
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;
|
||||
},
|
||||
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;
|
||||
},
|
||||
|
||||
arrowRetract() {
|
||||
if (this.leftShow == true) {
|
||||
this.rightSrc = "./images/arrow_right_open.png";
|
||||
|
|
|
@ -317,6 +317,50 @@ public class BimModelController {
|
|||
}
|
||||
}
|
||||
|
||||
@GetMapping("/modelPropertyByExternalId/{name}")
|
||||
public AjaxResult getModelProperty(@PathVariable("name") String name,long externalId) {
|
||||
|
||||
|
||||
String key = "BimModelController.modelPropertyByExternalId." + name + "." + externalId;
|
||||
if (redisService.hasKey(key)) {
|
||||
Object list = redisService.getCacheObject(key);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
String sql = "select * from model_property where externalId=?";
|
||||
|
||||
String path = bimDataSource.getDbPath(name);
|
||||
if (!new File(path).exists()) {
|
||||
return AjaxResult.error("file not found!");
|
||||
}
|
||||
try {
|
||||
DataSource ds = bimDataSource.getDataSource(name);
|
||||
PreparedStatement pss = ds.getConnection().prepareStatement(sql);
|
||||
|
||||
pss.setLong(1, externalId);
|
||||
ResultSet rs = pss.executeQuery();
|
||||
List<ModelPropertyVo> list = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
ModelPropertyVo vo = new ModelPropertyVo();
|
||||
vo.setId(rs.getLong("id"));
|
||||
vo.setGlid(rs.getString("glid"));
|
||||
vo.setModelName(rs.getString("modelName"));
|
||||
vo.setIfcurl(rs.getString("ifcurl"));
|
||||
vo.setPropertyName(rs.getString("propertyname"));
|
||||
vo.setGroupname(rs.getString("groupname"));
|
||||
vo.setExternalId(rs.getString("externalId"));
|
||||
vo.setValue(rs.getString("value"));
|
||||
vo.setPropertySetName(rs.getString("propertySetName"));
|
||||
vo.setPropertyTypeName(rs.getString("propertyTypeName"));
|
||||
list.add(vo);
|
||||
}
|
||||
redisService.setCacheObject(key, list, 60 * 60 * 24L, TimeUnit.SECONDS);
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/modelProperty/{name}")
|
||||
public AjaxResult getModelProperty(@PathVariable("name") String name,@RequestBody List<Long> glids) {
|
||||
if(CollectionUtil.isEmpty(glids)){
|
||||
|
@ -355,7 +399,7 @@ public class BimModelController {
|
|||
vo.setGlid(rs.getString("glid"));
|
||||
vo.setModelName(rs.getString("modelName"));
|
||||
vo.setIfcurl(rs.getString("ifcurl"));
|
||||
vo.setPropertyname(rs.getString("propertyname"));
|
||||
vo.setPropertyName(rs.getString("propertyname"));
|
||||
vo.setGroupname(rs.getString("groupname"));
|
||||
vo.setExternalId(rs.getString("externalId"));
|
||||
vo.setValue(rs.getString("value"));
|
||||
|
|
|
@ -33,7 +33,7 @@ public class ModelPropertyVo {
|
|||
/**
|
||||
* 属性名称
|
||||
*/
|
||||
private String propertyname;
|
||||
private String propertyName;
|
||||
/**
|
||||
* 当前属性ifc文件路径
|
||||
*/
|
||||
|
|
|
@ -162,7 +162,7 @@ export function download(url, params, filename, config) {
|
|||
background: "rgba(0, 0, 0, 0.7)",
|
||||
});
|
||||
return service
|
||||
.post(url, params, {
|
||||
.post(url+"?"+tansParams(params), params, {
|
||||
transformRequest: [
|
||||
(params) => {
|
||||
return tansParams(params);
|
||||
|
|
|
@ -345,8 +345,5 @@ onMounted(() => {
|
|||
data.currentPrjId = userStore.currentPrjId
|
||||
getProjectList()
|
||||
getList()
|
||||
proxy.$http.get('/manage/bim/modelInfo/modelTree/202310241442202232?pid=2714132083072').then((res) => {
|
||||
debugger
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -692,7 +692,6 @@ function submitForm() {
|
|||
let postData = {
|
||||
...form.value,
|
||||
};
|
||||
postData.comId = deptTree.value.getCurrentNode().data.parentId;
|
||||
if (form.value.id != null) {
|
||||
updateProProjectInfo(postData).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
|
@ -701,6 +700,7 @@ function submitForm() {
|
|||
getList();
|
||||
});
|
||||
} else {
|
||||
postData.comId = deptTree.value.getCurrentNode().data.parentId;
|
||||
addProProjectInfo(postData).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
|
|