BIM交底功能开发

dev_xd
lj7788@126.com 2025-06-24 15:21:35 +08:00
parent 8b6ae4daf5
commit e0b57d70b0
13 changed files with 695 additions and 502 deletions

View File

@ -15,6 +15,8 @@
"element-ui": "^2.15.13",
"emittery": "^0.8.1",
"file-saver": "2.0.5",
"gantt-elastic": "^1.0.12",
"gantt-elastic-header": "^0.1.11",
"gsap": "^3.12.2",
"js-cookie": "^3.0.5",
"less": "^4.1.3",
@ -34,10 +36,10 @@
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"svg-sprite-loader": "^6.0.11",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"javascript-obfuscator": "^4.1.1",
"svg-sprite-loader": "^6.0.11",
"vue-template-compiler": "^2.6.14",
"webpack-obfuscator": "^3.5.1"
},

View File

@ -296,6 +296,9 @@ export default {
case 704:
this.$router.push("/bimBriefing");
break;
case 705:
this.$router.push("/bim4DSimulation");
break;
case 701:
this.$router.push("/bimManage");
break;

View File

@ -1,11 +1,11 @@
import Vue from "vue";
import VueRouter from "vue-router";
const originalPush = VueRouter.prototype.push
const originalPush = VueRouter.prototype.push;
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
return originalPush.call(this, location).catch((err) => err);
};
Vue.use(VueRouter);
const routes = [
@ -13,143 +13,115 @@ const routes = [
path: "/",
name: "index",
meta: { nav: 1 },
component: () =>
import(/* webpackChunkName: "index" */ "../views/index.vue"),
component: () => import(/* webpackChunkName: "index" */ "../views/index.vue"),
},
{
path: "/detail",
name: "detail",
meta: { nav: 101 },
component: () =>
import(/* webpackChunkName: "detail" */ "../views/projectDetail.vue"),
component: () => import(/* webpackChunkName: "detail" */ "../views/projectDetail.vue"),
},
{
path: "/labor",
name: "labor",
meta: { nav: 102 },
component: () =>
import(/* webpackChunkName: "labor" */ "../views/projectLabor.vue"),
component: () => import(/* webpackChunkName: "labor" */ "../views/projectLabor.vue"),
},
{
path: "/prjSafety",
name: "prjSafety",
meta: { nav: 21 },
component: () =>
import(/* webpackChunkName: "safety" */ "../views/projectSafety.vue"),
component: () => import(/* webpackChunkName: "safety" */ "../views/projectSafety.vue"),
},
{
path: "/prjQuality",
name: "prjQuality",
meta: { nav: 22 },
component: () =>
import(/* webpackChunkName: "quality" */ "../views/projectQuality.vue"),
component: () => import(/* webpackChunkName: "quality" */ "../views/projectQuality.vue"),
},
{
path: "/prjProgress",
name: "prjProgress",
meta: { nav: 23 },
component: () =>
import(/* webpackChunkName: "progress" */ "../views/projectProgress.vue"),
component: () => import(/* webpackChunkName: "progress" */ "../views/projectProgress.vue"),
},
{
path: "/greenCarbon",
name: "greenCarbon",
meta: { nav: 6 },
component: () =>
import(/* webpackChunkName: "greenCarbon" */ "../views/greenCarbon.vue"),
component: () => import(/* webpackChunkName: "greenCarbon" */ "../views/greenCarbon.vue"),
},
{
path: "/bimManage",
name: "bimManage",
meta: { nav: 701 },
component: () =>
import(/* webpackChunkName: "bimManage" */ "../views/bimManage.vue"),
component: () => import(/* webpackChunkName: "bimManage" */ "../views/bimManage.vue"),
},
{
path: "/bimRoaming",
name: "bimRoaming",
meta: { nav: 702 },
component: () =>
import(/* webpackChunkName: "bimRoaming" */ "../views/bimRoaming.vue"),
component: () => import(/* webpackChunkName: "bimRoaming" */ "../views/bimRoaming.vue"),
},
{
path: "/bimBriefing",
name: "bimBriefing",
meta: { nav: 704 },
component: () =>
import(/* webpackChunkName: "bimBriefing" */ "../views/bimBriefing.vue"),
component: () => import(/* webpackChunkName: "bimBriefing" */ "../views/bimBriefing.vue"),
},
{
path: "/bim4DSimulation",
name: "bim4DSimulation",
meta: { nav: 7045 },
component: () => import(/* webpackChunkName: "bim4DSimulation" */ "../views/bim4DSimulation.vue"),
},
{
path: "/videoMonitor",
name: "videoMonitor",
meta: { nav: 309 },
component: () =>
import(
/* webpackChunkName: "videoMonitor" */ "../views/videoMonitor.vue"
),
component: () => import(/* webpackChunkName: "videoMonitor" */ "../views/videoMonitor.vue"),
},
{
path: "/safetyCheck",
name: "safetyCheck",
meta: { nav: 301 },
component: () =>
import(
/* webpackChunkName: "safetyCheck" */ "../views/safety/safetyCheck.vue"
),
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/safetyCheck.vue"),
},
{
path: "/towerCrane",
name: "towerCrane",
meta: { nav: 304 },
component: () =>
import(
/* webpackChunkName: "safetyCheck" */ "../views/safety/towerCrane.vue"
),
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/towerCrane.vue"),
},
{
path: "/powerIot",
name: "powerIot",
meta: { nav: 306 },
component: () =>
import(
/* webpackChunkName: "safetyCheck" */ "../views/safety/powerIot.vue"
),
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/powerIot.vue"),
},
{
path: "/dumbwaiter",
name: "dumbwaiter",
meta: { nav: 308 },
component: () =>
import(
/* webpackChunkName: "safetyCheck" */ "../views/safety/dumbwaiter.vue"
),
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/dumbwaiter.vue"),
},
{
path: "/aiWarning",
name: "aiWarning",
meta: { nav: 310 },
component: () =>
import(
/* webpackChunkName: "safetyCheck" */ "../views/safety/aiWarning.vue"
),
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/safety/aiWarning.vue"),
},
{
path: "/photography",
name: "photography",
meta: { nav: 501 },
component: () =>
import(
/* webpackChunkName: "safetyCheck" */ "../views/schedule/photography.vue"
),
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/schedule/photography.vue"),
},
{
path: "/planSchedule",
name: "planSchedule",
meta: { nav: 502 },
component: () =>
import(
/* webpackChunkName: "safetyCheck" */ "../views/schedule/planSchedule.vue"
),
component: () => import(/* webpackChunkName: "safetyCheck" */ "../views/schedule/planSchedule.vue"),
},
];
const router = new VueRouter({

View File

@ -51,7 +51,6 @@ function dataFiltering(that, id) {
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]) {
@ -108,15 +107,6 @@ function subFeatureSize(that) {
api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
that.selFeatureId = featureId;
that.info = result;
// api.Measurement.featureArea(featureId, (res) => {
// result[1].data = [{ name: "面积", value: ((+res || 0) * unit * unit * 1.0).toFixed(2) + "" }];
// api.Measurement.featureVolume(featureId, (res) => {
// result[2].data = [{ name: "体积", value: ((+res || 0) * unit * unit * unit * 1.0).toFixed(2) }];
// api.Feature.setColor(featureId, "rgba(255,0,255,1)", modelId);
// that.selFeatureId = featureId;
// that.info=result
// });
// });
});
}
});
@ -146,25 +136,84 @@ function measuringVolume(that) {}
//构件距离
function distance(that) {
let api = bimBriefingApi;
that.info = [];
let result = [{ name: "测量结果", data: [] }];
that.$message.info("请在模型中点击两点,右键结束测量");
api.Public.clearHandler();
api.Measurement.clearAllTrace();
let unit = 1;
api.Feature.getByEvent(true, (n) => {
if (n && n["id"]) {
let featureId = n.id;
let modelId = featureId.split("^")[0];
unit = getModelUnit(that, modelId);
}
});
//开始测量,左键选点
api.Measurement.distance(true, (data) => {
console.log(data);
result[0].data = [
{
name: "距离",
value: (data.distance * unit).toFixed(2),
},
{ name: "X", value: data.x.toFixed(2) },
{ name: "Y", value: data.y.toFixed(2) },
{ name: "Z", value: data.z.toFixed(2) },
];
that.info = result;
});
api.Public.event("LEFT_CLICK", (res) => {
api.Measurement.clearAllTrace();
});
//右键结束测量
api.Public.event("RIGHT_CLICK", (res) => {
api.Measurement.distance(false);
});
}
function getModels(that) {
return that.models.map((d) => d.modelId);
}
//剖切
function initClipping(that) {}
function initClipping(that) {
let api = bimBriefingApi;
api.Model.clipByBox(getModels(that));
}
//构件隐藏
function actorVisible() {}
function actorVisible() {
let api = bimBriefingApi;
api.Feature.getByEvent(true, (n) => {
if (n && n["id"]) {
let featureId = n.id;
let modelId = featureId.split("^")[0];
api.Feature.setVisible(featureId, false);
that.hideFeatureIds.push(featureId);
}
});
}
function clearEvent(that) {
let api = bimBriefingApi;
if (api) {
actorShow(that);
api.Feature.getByEvent(false);
api.Model.closeClip();
api.Model.clearBoundsBox();
api.Measurement.setFaceToFaceState(!1);
api.Measurement.setPointToFaceVerticalDistanceState(!1);
api.Public.clearAllDrawObject();
api.Feature.getByEvent(!1);
api.Measurement.angle(!1);
api.Measurement.distance(!1);
api.Measurement.clearAllTrace();
}
}
function actorShow(that) {
let api = bimBriefingApi;
getModels(that).forEach((id) => {
api.Model.original(id);
});
}
export default {
measurementArea,
@ -175,4 +224,6 @@ export default {
distance,
initClipping,
actorVisible,
actorShow,
clearEvent,
};

View File

@ -0,0 +1,360 @@
<template>
<div class="bim-4d-simulation main-page">
<div v-if="hasLoad">
<gantt-elastic :options="options" :tasks="taskList" @tasks-changed="tasksUpdate" @options-changed="optionsUpdate" @dynamic-style-changed="styleUpdate">
<gantt-header slot="header" :options="optionList" v-if="1==2"></gantt-header>
</gantt-elastic>
</div>
</div>
</template>
<script>
import debounce from "lodash.debounce";
import ganttElastic from "gantt-elastic";
import ganttHeader from "gantt-elastic-header";
let options = {
taskMapping: {
progress: "percent",
},
maxRows: 100,
maxHeight: 500,
title: {
label: "Your project title as html (link or whatever...)",
html: false,
},
row: {
height: 24,
},
calendar: {
hour: {
display: true,
},
},
chart: {
progress: {
bar: false,
},
expander: {
display: true,
},
},
taskList: {
expander: {
straight: false,
},
columns: [
{
id: 1,
label: "ID",
value: "id",
width: 40,
},
{
id: 2,
label: "Description",
value: "label",
width: 200,
expander: true,
html: true,
events: {
click({ data, column }) {
alert("description clicked!\n" + data.label);
},
},
},
{
id: 3,
label: "Assigned to",
value: "user",
width: 130,
html: true,
},
{
id: 3,
label: "Start",
value: (task) => dayjs(task.start).format("YYYY-MM-DD"),
width: 78,
},
{
id: 4,
label: "Type",
value: "type",
width: 68,
},
{
id: 5,
label: "%",
value: "progress",
width: 35,
style: {
"task-list-header-label": {
"text-align": "center",
width: "100%",
},
"task-list-item-value-container": {
"text-align": "center",
width: "100%",
},
},
},
],
},
locale: {
name: "en",
Now: "当前时间",
"X-Scale": "缩放宽度",
"Y-Scale": "缩放高度",
"Task list width": "列头宽度",
"Before/After": "时间跨度",
"Display task list": "显示列头",
weekdays: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
months: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
},
};
export default {
components: {
ganttElastic,
ganttHeader,
},
name: "Bim4DSimulation",
data() {
return {
dpi: "",
elId: 1,
taskList: [],
options,
hasLoad: false,
};
},
beforeDestroy() {
document.body.classList.remove("is-sapi");
},
mounted() {
this.$store.dispatch("ChangeNav", 705);
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;
document.body.classList.add("is-sapi");
//this.initEngine();
function getDate(hours) {
const currentDate = new Date();
const currentYear = currentDate.getFullYear();
const currentMonth = currentDate.getMonth();
const currentDay = currentDate.getDate();
const timeStamp = new Date(currentYear, currentMonth, currentDay, 0, 0, 0).getTime();
return new Date(timeStamp + hours * 60 * 60 * 1000).getTime();
}
this.taskList = [
{
id: 1,
label: "Make some noise",
user: '<a href="https://www.google.com/search?q=John+Doe" target="_blank" style="color:#0077c0;">John Doe</a>',
start: getDate(-24 * 5),
duration: 15 * 24 * 60 * 60 * 1000,
percent: 85,
type: "project",
//collapsed: true,
},
{
id: 2,
label: "With great power comes great responsibility",
user: '<a href="https://www.google.com/search?q=Peter+Parker" target="_blank" style="color:#0077c0;">Peter Parker</a>',
parentId: 1,
start: getDate(-24 * 4),
duration: 4 * 24 * 60 * 60 * 1000,
percent: 50,
type: "milestone",
collapsed: true,
style: {
base: {
fill: "#1EBC61",
stroke: "#0EAC51",
},
},
},
{
id: 3,
label: "Courage is being scared to death, but saddling up anyway.",
user: '<a href="https://www.google.com/search?q=John+Wayne" target="_blank" style="color:#0077c0;">John Wayne</a>',
parentId: 2,
start: getDate(-24 * 3),
duration: 2 * 24 * 60 * 60 * 1000,
percent: 100,
type: "task",
},
{
id: 4,
label: "Put that toy AWAY!",
user: '<a href="https://www.google.com/search?q=Clark+Kent" target="_blank" style="color:#0077c0;">Clark Kent</a>',
start: getDate(-24 * 2),
duration: 2 * 24 * 60 * 60 * 1000,
percent: 50,
type: "task",
dependentOn: [3],
},
{
id: 5,
label: "One billion, gajillion, fafillion... shabadylu...mil...shabady......uh, Yen.",
user: '<a href="https://www.google.com/search?q=Austin+Powers" target="_blank" style="color:#0077c0;">Austin Powers</a>',
parentId: 4,
start: getDate(0),
duration: 2 * 24 * 60 * 60 * 1000,
percent: 10,
type: "milestone",
style: {
base: {
fill: "#0287D0",
stroke: "#0077C0",
},
},
},
{
id: 6,
label: "Butch Mario and the Luigi Kid",
user: '<a href="https://www.google.com/search?q=Mario+Bros" target="_blank" style="color:#0077c0;">Mario Bros</a>',
parentId: 5,
start: getDate(24),
duration: 1 * 24 * 60 * 60 * 1000,
percent: 50,
type: "task",
collapsed: true,
style: {
base: {
fill: "#8E44AD",
stroke: "#7E349D",
},
},
},
{
id: 7,
label: "Devon, the old man wanted me, it was his dying request",
user: '<a href="https://www.google.com/search?q=Knight+Rider" target="_blank" style="color:#0077c0;">Knight Rider</a>',
parentId: 2,
dependentOn: [6],
start: getDate(24 * 2),
duration: 4 * 60 * 60 * 1000,
percent: 20,
type: "task",
collapsed: true,
},
{
id: 8,
label: "Hey, Baby! Anybody ever tell you I have beautiful eyes?",
user: '<a href="https://www.google.com/search?q=Johhny+Bravo" target="_blank" style="color:#0077c0;">Johhny Bravo</a>',
parentId: 7,
dependentOn: [7],
start: getDate(24 * 3),
duration: 1 * 24 * 60 * 60 * 1000,
percent: 0,
type: "task",
},
{
id: 9,
label: "This better be important, woman. You are interrupting my very delicate calculations.",
user: '<a href="https://www.google.com/search?q=Dexter\'s+Laboratory" target="_blank" style="color:#0077c0;">Dexter\'s Laboratory</a>',
parentId: 8,
dependentOn: [8, 7],
start: getDate(24 * 4),
duration: 4 * 60 * 60 * 1000,
percent: 20,
type: "task",
style: {
base: {
fill: "#8E44AD",
stroke: "#7E349D",
},
},
},
{
id: 10,
label: "current task",
user: '<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 5),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task",
},
{
id: 11,
label: "test task",
user: '<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 6),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task",
},
{
id: 12,
label: "test task",
user: '<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 7),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task",
parentId: 11,
},
{
id: 13,
label: "test task",
user: '<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 8),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task",
},
{
id: 14,
label: "test task",
user: '<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 9),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task",
},
{
id: 15,
label: "test task",
user: '<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 16),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task",
},
];
this.hasLoad = true;
},
methods: {
tasksUpdate() {},
optionsUpdate() {},
styleUpdate() {},
},
};
</script>
<style lang="less"></style>

View File

@ -65,7 +65,7 @@
</div>
</div>
</template>
<template v-if="selectMenu == 1 || selectMenu == 2">
<template v-if="selectMenu == 1 || selectMenu == 4">
<div class="info-list">
<div v-for="(item, index) in info" :key="index">
<div class="group-info">
@ -75,7 +75,8 @@
<table class="model-property-table my-table">
<tr v-for="(item2, index2) in item.data" :key="index2 + '-' + index">
<th width="50%">{{ item2.name }}</th>
<td width="50%">{{ item2.value }}
<td width="50%">
{{ item2.value }}
<span v-if="index == 0"></span>
<span v-if="index == 1"><sup>2</sup></span>
<span v-if="index == 2"><sup>3</sup></span>
@ -85,6 +86,31 @@
</div>
</div>
</template>
<div class="clipping-tip" v-if="showClipping">
<div class="info-list">
<div>
<div class="group-info">
<svg-icon icon-class="info" />
<span>操作指南</span>
</div>
<table class="clipping-tip-table my-table">
<tr>
<th>鼠标左键按住剖面框中心箭头线</th>
</tr>
<tr>
<td>拖动可平移剖面框移出剖面框的部分将被剖切掉</td>
</tr>
<tr>
<th>鼠标左键按住剖面框中心箭头线之间的弧线</th>
</tr>
<tr>
<td>拖动可旋转剖面框移出剖面框的部分将被剖切掉</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
@ -212,6 +238,7 @@ export default {
viewPoint: [],
info: [],
title: "属性",
showClipping: false,
};
},
mounted() {
@ -236,10 +263,8 @@ export default {
methods: {
doSelectMenu(index) {
this.selectMenu = index;
if (window.bimBriefingApi) {
let api = bimBriefingApi;
api.Feature.getByEvent(false);
}
briefingTools.clearEvent(this);
this.showClipping = false;
briefingTools.clearSelectFeature(this);
switch (index) {
case 0:
@ -264,6 +289,7 @@ export default {
case 5:
briefingTools.initClipping(this);
this.title = "剖切";
this.showClipping = true;
break;
case 6:
briefingTools.actorVisible(this);
@ -732,5 +758,82 @@ export default {
color: #22d3f4;
}
}
@media (min-width: 2561px) {
.data-content {
.div-row {
&.r33 {
height: 210px;
}
&.r66 {
height: calc(100% - 210px);
}
.row-title {
height: 48px;
line-height: 48px;
font-size: 28px;
}
}
}
.div-tools {
margin-left: -300px;
border-radius: 10px;
.tool-item {
padding: 10px 20px;
.icon {
width: 60px;
height: 60px;
border-radius: 30px;
.svg-icon {
width: 40px;
height: 40px;
}
}
.sp-text {
margin-top: 10px;
font-size: 24px;
}
}
}
.model-tree {
.el-tree {
font-size: 24px;
.el-tree-node__content {
height: 36px;
}
.el-tree-node__expand-icon {
font-size: 24px;
}
.el-checkbox {
font-size: 24px;
}
.el-tree-node__label {
font-size: 24px;
}
.el-tree__empty-text {
font-size: 24px;
}
}
}
.group-info {
.svg-icon {
width: 30px;
height: 30px;
}
span {
font-size: 20px;
position: relative;
top:-6px;
}
}
.my-table {
td,
th {
font-size: 20px;
}
}
}
}
</style>

View File

@ -1,398 +0,0 @@
<template>
<div class="bim-roaming main-page">
<div id="bimRoaming" :key="elId">
<div id="bimRoamingContainer" class="bimRoamingContainer"></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">
<el-tree
v-if="showTree"
ref="tree"
:default-expanded-keys="[0, 1]"
:props="{
children: 'children',
label: 'title',
}"
node-key="key"
@check="onCheckTree"
:load="loadTreeNode" lazy
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 r33">
<div class="row-title">
<svg-icon icon-class="signal"></svg-icon>
漫游方案
</div>
</div>
<div class="div-row r66">
<div class="row-title">
<svg-icon icon-class="signal"></svg-icon>
视点列表
</div>
</div>
</div>
</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">
<div class="icon">
<svg-icon icon-class="home" />
</div>
<span class="sp-text">默认视点</span>
</div>
</div>
</div>
</template>
<script>
import debounce from "lodash.debounce";
export default {
name: "BIMRoaming",
data() {
return {
dpi: "",
selProject: null,
leftSrc: "./bimImages/arrow_left_retract.png",
rightSrc: "./bimImages/arrow_right_retract.png",
leftShow: true,
models: [],
showTree:false,
modelTrees: [],
};
},
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: {
onCheckTree() {},
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.bimMgrApi = new SAPI(
{
serverIP: window.config.serverIP, //ip
port: window.config.port, //HTTP
useHttps: window.config.useHttps, //使Https
container: "bimRoamingContainer", //[]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线
};
bimMgrApi.Plugin.initNavCube(mapOptions);
}
);
},
initLoadModel() {
this.$api.bim
.listBimModel({
pageNum: 1,
pageSize: 100,
comId: this.currentComId,
projectId: this.currentPrjId,
})
.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();
}
});
},
loadModelTree() {
this.modelTrees = [
{
title: "项目模型",
level: 0,
type: "root",
key: "root",
children: [],
hadLoad: true,
},
];
this.models
.map((d) => {
d.gis = JSON.parse(d.gisJson);
return d;
})
.forEach((d) => {
this.modelTrees[0].children.push({
title: d.modelName,
level: 1,
type: "model",
hasLoad: false,
modelId: d.lightweightName,
key: d.lightweightName,
externalId: "0",
glid: "",
children: [],
data: d,
});
});
this.showTree=true;
},
loadTreeNode(node, resolve, reject){
if(node.level==0){
resolve([this.modelTrees[0]])
return;
}
if(node.level==1){
let objs=this.modelTrees[0].children;
resolve(objs)
return;
}
resolve([{title:'aaa'}])
return;
console.log(nd)
// this.$api.bim.getModelTree(nd.modelId,nd.glid).then(res=>{
// console.log(res)
// })
},
addModel(modelId, cb) {
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
console.log(modelId, url);
bimMgrApi.Model.add(
url,
modelId,
() => {},
() => {
cb && cb();
console.log("加载模型成功");
setTimeout(() => {
bimMgrApi.Camera.getViewPort((p) => {
this.viewPoint = p;
});
}, 1000);
}
);
},
resetScene() {
bimMgrApi.Camera.stopImmersiveRoam();
bimMgrApi.Model.location(bimMgrApi.m_model.keys().toArray()[0]);
bimMgrApi.Plugin.deleteMiniMap();
if (this.viewPoint) {
bimMgrApi.Camera.setViewPort(this.viewPoint);
}
},
},
};
</script>
<style lang="less">
.bim-roaming {
height: 100%;
position: relative;
#bimRoaming {
height: 100%;
#bimRoamingContainer {
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: 33.33%;
}
&.r66 {
height: 66.66%;
}
}
}
.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: -34px;
display: flex;
background: #00000080;
border-radius: 10px;
.tool-item {
display: flex;
flex-flow: column;
padding: 10px;
align-items: center;
cursor: pointer;
&.is-active {
.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;
}
}
}
}
</style>

View File

@ -354,8 +354,8 @@ export default {
comId: this.selProject.comId,
}
let ajaxs = [
this.$api.safety.groupByProblemType(postData),
this.$api.safety.groupByDangerType(postData),
this.$api.safety.groupByProblemType({...postData,infoType: 0}),
this.$api.safety.groupByDangerType({...postData,infoType: 0}),
this.$api.safety.listCountForBG({ ...postData, problemType: 1, infoType: 0 }),
this.$api.safety.listForBG({ ...postData, problemType: 1, infoType: 0, pageNum: 1, pageSize: 5 }),
this.$api.safety.listCountForBG({ ...postData, problemType: 2, infoType: 0 }),

View File

@ -252,11 +252,21 @@
resolved "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz"
integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==
"@babel/helper-string-parser@^7.27.1":
version "7.27.1"
resolved "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==
"@babel/helper-validator-identifier@^7.22.5":
version "7.22.5"
resolved "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz"
integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==
"@babel/helper-validator-identifier@^7.27.1":
version "7.27.1"
resolved "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8"
integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==
"@babel/helper-validator-option@^7.22.5":
version "7.22.5"
resolved "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz"
@ -295,6 +305,13 @@
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.22.5.tgz"
integrity sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==
"@babel/parser@^7.23.5":
version "7.27.5"
resolved "https://registry.npmmirror.com/@babel/parser/-/parser-7.27.5.tgz#ed22f871f110aa285a6fd934a0efed621d118826"
integrity sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==
dependencies:
"@babel/types" "^7.27.3"
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.22.5":
version "7.22.5"
resolved "https://registry.npmmirror.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz"
@ -1027,6 +1044,14 @@
"@babel/helper-validator-identifier" "^7.22.5"
to-fast-properties "^2.0.0"
"@babel/types@^7.27.3":
version "7.27.6"
resolved "https://registry.npmmirror.com/@babel/types/-/types-7.27.6.tgz#a434ca7add514d4e646c80f7375c0aa2befc5535"
integrity sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==
dependencies:
"@babel/helper-string-parser" "^7.27.1"
"@babel/helper-validator-identifier" "^7.27.1"
"@discoveryjs/json-ext@0.5.7":
version "0.5.7"
resolved "https://registry.npmmirror.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz"
@ -1650,6 +1675,17 @@
postcss "^8.4.14"
source-map "^0.6.1"
"@vue/compiler-sfc@2.7.16":
version "2.7.16"
resolved "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz#ff81711a0fac9c68683d8bb00b63f857de77dc83"
integrity sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==
dependencies:
"@babel/parser" "^7.23.5"
postcss "^8.4.14"
source-map "^0.6.1"
optionalDependencies:
prettier "^1.18.2 || ^2.0.0"
"@vue/component-compiler-utils@^3.1.0", "@vue/component-compiler-utils@^3.3.0":
version "3.3.0"
resolved "https://registry.npmmirror.com/@vue/component-compiler-utils/-/component-compiler-utils-3.3.0.tgz"
@ -2739,6 +2775,11 @@ core-js@^2.4.0:
resolved "https://registry.npmmirror.com/core-js/-/core-js-2.6.12.tgz"
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
core-js@^3.6.5:
version "3.43.0"
resolved "https://registry.npmmirror.com/core-js/-/core-js-3.43.0.tgz#f7258b156523208167df35dea0cfd6b6ecd4ee88"
integrity sha512-N6wEbTTZSYOY2rYAn85CuvWWkCK6QweMn7/4Nr3w+gDBeBhk/x4EJeY6FPo4QzDoJZxVTv8U7CMvgWk6pOHHqA==
core-js@^3.8.3:
version "3.31.0"
resolved "https://registry.npmmirror.com/core-js/-/core-js-3.31.0.tgz"
@ -2947,6 +2988,11 @@ dayjs@^1.11.9:
resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.9.tgz"
integrity sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA==
dayjs@^1.8.16:
version "1.11.13"
resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c"
integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==
de-indent@^1.0.2:
version "1.0.2"
resolved "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz"
@ -3951,6 +3997,24 @@ functions-have-names@^1.2.3:
resolved "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==
gantt-elastic-header@^0.1.11:
version "0.1.11"
resolved "https://registry.npmmirror.com/gantt-elastic-header/-/gantt-elastic-header-0.1.11.tgz#8b9fec8e51709b82ff59a0386f066850ae69c6d1"
integrity sha512-mDzraF/ZxrY9Pmp2Kjb1Hm8pFSeH2Ze5S0Lw/qiW63qyYxj0uLMp8w6xJq4rt2aB0lcHhonf0YMOjCjAk1WZfQ==
dependencies:
vue "^2.6.10"
vue-slider-component "^3.0.31"
vue-switches "^2.0.1"
gantt-elastic@^1.0.12:
version "1.0.12"
resolved "https://registry.npmmirror.com/gantt-elastic/-/gantt-elastic-1.0.12.tgz#d95cd3a750712fa56f4a12dca807a1c9bf10fe8a"
integrity sha512-PZHbADMGlVcTHKVqtvLNg8bvUGqeeSmDMVCQscyVBxNKd4Wwmvht4eNiTlasLW2ceufLN7BKziGZ9AJP28nJiw==
dependencies:
dayjs "^1.8.16"
resize-observer-polyfill "^1.5.1"
vue "^2.6.10"
gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz"
@ -6547,7 +6611,7 @@ requires-port@^1.0.0:
resolved "https://registry.npmmirror.com/requires-port/-/requires-port-1.0.0.tgz"
integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==
resize-observer-polyfill@^1.5.0:
resize-observer-polyfill@^1.5.0, resize-observer-polyfill@^1.5.1:
version "1.5.1"
resolved "https://registry.npmmirror.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz"
integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==
@ -7680,7 +7744,7 @@ uuid@^8.3.2:
lodash.throttle "^4.1.1"
logt "^1.4.1"
nprogress "0.2.0"
v3 "file:../../../../../nodejs/ychache/v6/npm-v3-0.1.0-79a5b82f-3c66-4b7d-9d42-75e31e17f6e9-1732983849891/node_modules/v3"
v3 "file:../../../mac/Library/Caches/Yarn/v6/npm-v3-0.1.0-e11d73e8-2cd1-4553-bbaf-faabaffe5d9b-1750672432590/node_modules/v3"
vue "^2.6.14"
vue-router "^3.1.3"
vuex "3.6.0"
@ -7708,6 +7772,11 @@ vary@~1.1.2:
resolved "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz"
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
vue-class-component@^7.1.0:
version "7.2.6"
resolved "https://registry.npmmirror.com/vue-class-component/-/vue-class-component-7.2.6.tgz#8471e037b8e4762f5a464686e19e5afc708502e4"
integrity sha512-+eaQXVrAm/LldalI272PpDe3+i4mPis0ORiMYxF6Ae4hyuCh15W8Idet7wPUEs4N4YptgFHGys4UrgNQOMyO6w==
vue-eslint-parser@^8.0.1:
version "8.3.0"
resolved "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz"
@ -7735,11 +7804,26 @@ vue-loader@^17.0.0:
hash-sum "^2.0.0"
watchpack "^2.4.0"
vue-property-decorator@^8.0.0:
version "8.5.1"
resolved "https://registry.npmmirror.com/vue-property-decorator/-/vue-property-decorator-8.5.1.tgz#571a91cf8d2b507f537d79bf8275af3184572fff"
integrity sha512-O6OUN2OMsYTGPvgFtXeBU3jPnX5ffQ9V4I1WfxFQ6dqz6cOUbR3Usou7kgFpfiXDvV7dJQSFcJ5yUPgOtPPm1Q==
dependencies:
vue-class-component "^7.1.0"
vue-router@^3.1.3:
version "3.6.5"
resolved "https://registry.npmmirror.com/vue-router/-/vue-router-3.6.5.tgz"
integrity sha512-VYXZQLtjuvKxxcshuRAwjHnciqZVoXAjTjcqBTz4rKc8qih9g9pI3hbDjmqXaHdgL3v8pV6P8Z335XvHzESxLQ==
vue-slider-component@^3.0.31:
version "3.2.24"
resolved "https://registry.npmmirror.com/vue-slider-component/-/vue-slider-component-3.2.24.tgz#9c931da3d10d0efde361138626a76d21c4359fd5"
integrity sha512-28hfotAL/CPXPwqHgVFyUwUEV0zweoc2wW0bgraGkoIcRZGlFjk8caYJLE8+Luug5t3b9tJm/NyDXpyIdmcYZg==
dependencies:
core-js "^3.6.5"
vue-property-decorator "^8.0.0"
vue-style-loader@^4.1.0, vue-style-loader@^4.1.3:
version "4.1.3"
resolved "https://registry.npmmirror.com/vue-style-loader/-/vue-style-loader-4.1.3.tgz"
@ -7748,6 +7832,13 @@ vue-style-loader@^4.1.0, vue-style-loader@^4.1.3:
hash-sum "^1.0.2"
loader-utils "^1.0.2"
vue-switches@^2.0.1:
version "2.0.1"
resolved "https://registry.npmmirror.com/vue-switches/-/vue-switches-2.0.1.tgz#f23436259c7fe4ffca9c4a6df49ac78941e20a20"
integrity sha512-rDqBtK3TKy1pEvyZeWmnSHVeXqAcn+ozch7LiNThBzr1QMjg5rhvqBY7uWeli/baDDslf6CXmBJbHPwASJLqoA==
dependencies:
vue "^2.2.6"
vue-template-compiler@^2.6.14:
version "2.7.14"
resolved "https://registry.npmmirror.com/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz"
@ -7761,6 +7852,14 @@ vue-template-es2015-compiler@^1.9.0:
resolved "https://registry.npmmirror.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz"
integrity sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==
vue@^2.2.6, vue@^2.6.10:
version "2.7.16"
resolved "https://registry.npmmirror.com/vue/-/vue-2.7.16.tgz#98c60de9def99c0e3da8dae59b304ead43b967c9"
integrity sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==
dependencies:
"@vue/compiler-sfc" "2.7.16"
csstype "^3.1.0"
vue@^2.6.14:
version "2.7.14"
resolved "https://registry.npmmirror.com/vue/-/vue-2.7.14.tgz"

View File

@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.com_id, com.dept_name as com_name, u.dept_id, u.user_name, u.nick_name, ex.user_type,ex.work_type, u.card_code, u.email
select u.user_id, d.com_id, com.dept_name as com_name, u.dept_id, u.user_name, u.nick_name, ex.user_type,ex.work_type, u.card_code, u.email
, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_short_name, d.dept_code, d.dept_type, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,com.dept_name com_dept_name,u.user_infos

View File

@ -1744,7 +1744,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
}
}
});
Map<String,List<ProProjectInfoSubdeptsUsers>> subMap= list.stream().collect(Collectors.groupingBy(ProProjectInfoSubdeptsUsers::getComName));
Map<String,List<ProProjectInfoSubdeptsUsers>> subMap= list.stream().filter(d->StringUtils.isNotEmpty(d.getComName())).collect(Collectors.groupingBy(ProProjectInfoSubdeptsUsers::getComName));
JSONObject joOut=new JSONObject();
JSONArray arrNav=new JSONArray();
subMap.forEach((k,v)->{
@ -1754,7 +1754,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
arrNav.add(jo);
});
joOut.put("native",arrNav);
Map<Long,List<ProProjectInfoSubdeptsUsers>> subMap2= list.stream().collect(Collectors.groupingBy(ProProjectInfoSubdeptsUsers::getId));
Map<Long,List<ProProjectInfoSubdeptsUsers>> subMap2= list.stream().filter(d->d.getId()!=null).collect(Collectors.groupingBy(ProProjectInfoSubdeptsUsers::getId));
JSONArray arrAge=new JSONArray();
subMap2.forEach((k,v)->{
JSONObject jo=new JSONObject();

View File

@ -337,7 +337,8 @@ public class SurProjectAttendanceUserServiceImpl implements ISurProjectAttendanc
}
d.setNativePlace(nav);
});
Map<String,List<SurProjectAttendanceUser>> subMap= list.stream().collect(Collectors.groupingBy(SurProjectAttendanceUser::getNativePlace));
Map<String,List<SurProjectAttendanceUser>> subMap= list.stream().filter(d-> StringUtils.isNotEmpty( d.getNativePlace()))
.collect(Collectors.groupingBy(SurProjectAttendanceUser::getNativePlace));
JSONObject joOut=new JSONObject();
JSONArray arrNav=new JSONArray();
subMap.forEach((k,v)->{
@ -347,7 +348,7 @@ public class SurProjectAttendanceUserServiceImpl implements ISurProjectAttendanc
arrNav.add(jo);
});
joOut.put("native",arrNav);
Map<Long,List<SurProjectAttendanceUser>> subMap2= list.stream().collect(Collectors.groupingBy(SurProjectAttendanceUser::getId));
Map<Long,List<SurProjectAttendanceUser>> subMap2= list.stream().filter(d->d.getId()!=null).collect(Collectors.groupingBy(SurProjectAttendanceUser::getId));
JSONArray arrAge=new JSONArray();
subMap2.forEach((k,v)->{
JSONObject jo=new JSONObject();

View File

@ -30,7 +30,7 @@ const userStore = useUserStore();
const sidebarRouters = computed(() => {
let tmps = permissionStore.sidebarRouters;
tmps.forEach((item) => {
if (item.meta && item.meta.title == "项目大屏") {
if (item.meta && item.meta.title == "项目大屏" && item.path.indexOf("prjId=") == -1) {
item.name += "?prjId=" + userStore.currentPrjId;
item.path = location.origin + item.path + "?prjId=" + userStore.currentPrjId;
}