修改问题
parent
1d9d08f092
commit
16ee38fac5
137
README.md
137
README.md
|
@ -1,137 +0,0 @@
|
|||
<p align="center">
|
||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi-Cloud-RocketMQ v3.6.3</h1>
|
||||
<h4 align="center">基于 Vue3/Element Plus/Vite 和 Spring Boot/Spring Cloud & Alibaba /RocketMQ前后端分离的分布式微服务架构</h4>
|
||||
<p align="center">
|
||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.2-brightgreen.svg"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||
</p>
|
||||
|
||||
## 平台简介
|
||||
|
||||
* 采用前后端分离的模式,微服务版本前端(基于优秀架构 [RuoYi-Cloud ](https://gitee.com/y_project/RuoYi-Cloud))。
|
||||
* 后端采用Spring Boot、Spring Cloud & Alibaba。
|
||||
* 注册中心、配置中心选型Nacos,权限认证使用Redis。
|
||||
* 流量控制框架选型Sentinel,分布式事务选型Seata。
|
||||
* 消息队列选型RocketMQ,多种消息发送模式。
|
||||
* 前端使用Vue3、Element Plus、Vite。
|
||||
* 提供示例模型 助力快速结合业务完成分库分表+读写分离以及分布式事务回滚
|
||||
* 一键打包Docker镜像到服务器,配置多数据源启动打包设置
|
||||
* elasticsearch搜索引擎正在集成中完成率90%,各种搜索方式助力企业快速使用
|
||||
* 0依赖可根据需求加入或剔除不使用的服务模块
|
||||
* 后续会加入更多中间件...
|
||||
#### 友情链接 [若依/RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud) Ant Design版本。
|
||||
|
||||
<h4 align="center"> 更多扩展开发中</h4>
|
||||
|
||||
## 系统模块
|
||||
|
||||
~~~
|
||||
com.yanzhu
|
||||
├── yanzhu-api // 接口模块
|
||||
│ └── yanzhu-api-system // 系统接口
|
||||
├── yanzhu-auth // 认证中心 [9200]
|
||||
├── yanzhu-common // 通用模块
|
||||
│ └── yanzhu-common-core // 核心模块
|
||||
│ └── yanzhu-common-datascope // 权限范围
|
||||
│ └── yanzhu-common-datasource // 多数据源
|
||||
│ └── yanzhu-common-log // 日志记录
|
||||
│ └── yanzhu-common-mapper // 数据映射
|
||||
│ └── yanzhu-common-redis // 缓存服务
|
||||
│ └── yanzhu-common-seata // 分布式事务
|
||||
│ └── yanzhu-common-security // 安全模块
|
||||
│ └── yanzhu-common-swagger // 系统接口
|
||||
├── yanzhu-gateway // 网关模块 [8080]
|
||||
├── yanzhu-modules // 业务模块
|
||||
│ └── yanzhu-system // 系统模块 [9201]
|
||||
│ └── yanzhu-manage // 业务模块 [9208]
|
||||
│ └── yanzhu-wechat // 微信模块 [9206]
|
||||
│ └── yanzhu-gen // 代码生成 [9202]
|
||||
│ └── yanzhu-job // 定时任务 [9203]
|
||||
│ └── yanzhu-file // 文件服务 [9300]
|
||||
│ └── yanzhu-flowable // 工作流服务 [9205]
|
||||
├── yanzhu-monitor // 监控中心 [9100]
|
||||
├── yanzhu-rocketMQ // 消息队列 [9207]
|
||||
├── yanzhu-ui-vue3 // 前端框架 [80]
|
||||
├── yanzhu-ui-app // 移动端
|
||||
├──pom.xml // 公共依赖
|
||||
~~~
|
||||
|
||||
由个人原因没有时间写文档 有不明白的地方朋友请加好友
|
||||
|
||||
<img width="200" height="200" src="https://gitee.com/YEBaron/RuoYi-Cloud-RocketMQ/raw/master/sql/image.png"/>
|
||||
|
||||
目前2023.11.14更新rocketMq发送消息类型:
|
||||
|
||||
1.同步发送:通过调用 send() 方法发送消息,阻塞等待服务器响应。
|
||||
|
||||
2.异步发送:通过调用 send() 方法,并传入一个 SendCallback 对象,在发送消息的同时可以继续处理其他逻辑,消息发送结果通过回调函数通知。
|
||||
|
||||
3.单向发送:通过调用 sendOneway() 方法发送消息,不关心发送结果,适用于对可靠性要求不高的场景。
|
||||
|
||||
4.顺序发送:通过设置 List<Message>数据和定义 messageQueueNumber消息队列数量来保证消息按顺序发送。
|
||||
|
||||
5.延迟发送:通过设置延迟级别来实现延迟发送消息。
|
||||
|
||||
6.批量发送:通过调用 send() 方法并传入多条消息,实现批量发送消息。
|
||||
|
||||
7.事务消息发送:通过使用事务监听器实现本地事务执行和消息发送的一致性。
|
||||
|
||||
## 架构图
|
||||
|
||||
<img src="https://oscimg.oschina.net/oscnet/up-82e9722ecb846786405a904bafcf19f73f3.png"/>
|
||||
|
||||
## 内置功能
|
||||
|
||||
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
|
||||
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
|
||||
3. 岗位管理:配置系统用户所属担任职务。
|
||||
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
|
||||
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
|
||||
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
|
||||
7. 参数管理:对系统动态配置常用参数。
|
||||
8. 通知公告:系统通知公告信息发布维护。
|
||||
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
|
||||
10. 登录日志:系统登录日志记录查询包含登录异常。
|
||||
11. 在线用户:当前系统中活跃用户状态监控。
|
||||
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
|
||||
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
|
||||
14. 系统接口:根据业务代码自动生成相关的api接口文档。
|
||||
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
||||
16. 在线构建器:拖动表单元素生成相应的HTML代码。
|
||||
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
||||
|
||||
## 演示图
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-4148b24f58660a9dc347761e4cf6162f28f.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
||||
</tr>
|
||||
</table>
|
File diff suppressed because one or more lines are too long
|
@ -27,7 +27,9 @@
|
|||
<link rel="stylesheet" href="/cdn/Cesium/Widgets/widgets.css" />
|
||||
<!-- <script src="/cesium/jquery-3.0.0.min.js"></script> -->
|
||||
<script src="/cdn/Cesium/Cesium.js?v=20250729"></script>
|
||||
<script src="/cdn/Cesium/BIMGISEngine.js?v=20250820"></script>
|
||||
<!-- <script src="/cdn/Cesium/BIMGISEngine.js?v=20250820"></script> -->
|
||||
|
||||
<script src="./BIMGISEngine_edit.js"></script>
|
||||
<script src="/cdn/Cesium/initApi.js?v=20230920"></script>
|
||||
|
||||
<!--<script src="/cdn/map/initApi.js"></script> -->
|
||||
|
|
|
@ -1,362 +1,455 @@
|
|||
|
||||
function initEngine(apiID, elId, bimCfg, cb) {
|
||||
if (bimCfg.clientApi) {
|
||||
initAPIEngine(apiID, elId, bimCfg, cb)
|
||||
} else {
|
||||
initSAPIEngine(apiID, elId, bimCfg, cb)
|
||||
}
|
||||
if (bimCfg.clientApi) {
|
||||
initAPIEngine(apiID, elId, bimCfg, cb);
|
||||
} else {
|
||||
initSAPIEngine(apiID, elId, bimCfg, cb);
|
||||
}
|
||||
}
|
||||
|
||||
function initAPIEngine(apiID, elId, bimCfg, cb) {
|
||||
let opt = {
|
||||
container: elId, //[必须]容器id
|
||||
showfps: false, //[可选]显示fps
|
||||
openearth: true, //[可选]开启gis场景
|
||||
// imageryprovider: "tianditu_image", //[可选]gis底图
|
||||
openterrain: false, //[可选]开启gis地形
|
||||
maxspaceerror: 5000, //[可选]模型可视距离; 建议设置:常规BIM时3000或更大、BIM启用LOD时100~1000、倾斜摄影,点云数据时0.1~0.5
|
||||
loading: false, //[可选]gis模式加载动画
|
||||
bgcolor: "#87CEFA", //[可选]bim模式场景背景色
|
||||
selectedcolor: "#FFFF00", //[可选]选中构件颜色
|
||||
throughwall: true, //[可选]相机是否穿墙
|
||||
sitepath: "../Cesium/",//[可选]设置天空盒路径,指向Cesium文件夹
|
||||
editmode: true, //[可选]是否开启编辑模式
|
||||
searchbox: true, //[可选]gis模型是否显示搜索框
|
||||
mapbox: true, //[可选]gis模型是否显示地图选择
|
||||
isRequestWebgl2: true, //[可选]是否使用webgl2进行渲染
|
||||
colorBlendMode: 1, //0:HIGHLIGHT 1:REPLACE 2:MIX ,构件选中后的着色模式
|
||||
secretkey: window.config.secretKey,
|
||||
language: "zh-CN", // 语言国际化 中文简体(zh-CN)、中文繁体(zh-TW)、英文(en), 默认中文简体
|
||||
targetFrameRate: 20, //目标渲染帧率 默认20
|
||||
};
|
||||
let api = new API(opt);
|
||||
let opt = {
|
||||
container: elId, //[必须]容器id
|
||||
showfps: false, //[可选]显示fps
|
||||
openearth: true, //[可选]开启gis场景
|
||||
// imageryprovider: "tianditu_image", //[可选]gis底图
|
||||
openterrain: false, //[可选]开启gis地形
|
||||
maxspaceerror: 5000, //[可选]模型可视距离; 建议设置:常规BIM时3000或更大、BIM启用LOD时100~1000、倾斜摄影,点云数据时0.1~0.5
|
||||
loading: false, //[可选]gis模式加载动画
|
||||
bgcolor: "#87CEFA", //[可选]bim模式场景背景色
|
||||
selectedcolor: "#FFFF00", //[可选]选中构件颜色
|
||||
throughwall: true, //[可选]相机是否穿墙
|
||||
sitepath: "/cdn/Cesium/", //[可选]设置天空盒路径,指向Cesium文件夹
|
||||
editmode: true, //[可选]是否开启编辑模式
|
||||
searchbox: true, //[可选]gis模型是否显示搜索框
|
||||
mapbox: true, //[可选]gis模型是否显示地图选择
|
||||
isRequestWebgl2: true, //[可选]是否使用webgl2进行渲染
|
||||
colorBlendMode: 1, //0:HIGHLIGHT 1:REPLACE 2:MIX ,构件选中后的着色模式
|
||||
secretkey: window.config.secretKey,
|
||||
language: "zh-CN", // 语言国际化 中文简体(zh-CN)、中文繁体(zh-TW)、英文(en), 默认中文简体
|
||||
targetFrameRate: 20, //目标渲染帧率 默认20
|
||||
};
|
||||
let api = new API(opt);
|
||||
|
||||
window[apiID] = api
|
||||
console.log("初始化成功");
|
||||
doChangeGis(bimCfg, api)
|
||||
|
||||
cb && cb();
|
||||
window[apiID] = api;
|
||||
console.log("初始化成功");
|
||||
doChangeGis(bimCfg, api);
|
||||
|
||||
cb && cb();
|
||||
}
|
||||
|
||||
function doChangeGis(bimCfg, api) {
|
||||
if (bimCfg.showGis) {
|
||||
if (bimCfg.clientApi) {
|
||||
api.Public.setGisState(true);
|
||||
api.viewer.terrainProvider = Cesium.createWorldTerrain({
|
||||
requestVertexNormals: true, //开启地形光照
|
||||
requestWaterMask: true, // 开启水面波纹
|
||||
})
|
||||
api.viewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(108.93934, 34.25777, 4000)
|
||||
});
|
||||
} else {
|
||||
api.Public.setGisState(true);
|
||||
api.Public.setTerrainState(true, window.config.terrainStateUrl, true)
|
||||
api.Public.setGisState(true);
|
||||
}
|
||||
if (bimCfg.showGis) {
|
||||
if (bimCfg.clientApi) {
|
||||
api.Public.setGisState(true);
|
||||
api.viewer.terrainProvider = Cesium.createWorldTerrain({
|
||||
requestVertexNormals: true, //开启地形光照
|
||||
requestWaterMask: true, // 开启水面波纹
|
||||
});
|
||||
api.viewer.camera.flyTo({
|
||||
destination: Cesium.Cartesian3.fromDegrees(108.93934, 34.25777, 4000),
|
||||
});
|
||||
} else {
|
||||
let color = bimCfg.background || "rgba(135 ,206 ,250,1)"
|
||||
api.Public.setGisState(false, color);
|
||||
api.Public.setSkyBoxState(0)
|
||||
api.Public.setGisState(true);
|
||||
api.Public.setTerrainState(true, window.config.terrainStateUrl, true);
|
||||
api.Public.setGisState(true);
|
||||
}
|
||||
} else {
|
||||
let color = bimCfg.background || "rgba(135 ,206 ,250,1)";
|
||||
api.Public.setGisState(false, color);
|
||||
api.Public.setSkyBoxState(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function initSAPIEngine(apiID, elId, bimCfg, cb) {
|
||||
let api = new SAPI(
|
||||
{
|
||||
serverIP: window.config.serverIP, //服务ip地址
|
||||
port: window.config.port, //HTTP端口
|
||||
useHttps: window.config.useHttps, //使用Https
|
||||
container: elId, //[必须]容器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图纸预览模式
|
||||
let api = new SAPI(
|
||||
{
|
||||
serverIP: window.config.serverIP, //服务ip地址
|
||||
port: window.config.port, //HTTP端口
|
||||
useHttps: window.config.useHttps, //使用Https
|
||||
container: elId, //[必须]容器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图纸预览模式
|
||||
},
|
||||
() => {
|
||||
console.log("初始化成功");
|
||||
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",
|
||||
},
|
||||
() => {
|
||||
console.log("初始化成功");
|
||||
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轴线
|
||||
};
|
||||
window[apiID] = api
|
||||
api.Plugin.initNavCube(mapOptions);
|
||||
doChangeGis(bimCfg, api)
|
||||
cb && cb();
|
||||
}
|
||||
);
|
||||
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轴线
|
||||
};
|
||||
window[apiID] = api;
|
||||
api.Plugin.initNavCube(mapOptions);
|
||||
doChangeGis(bimCfg, api);
|
||||
cb && cb();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function addModelList(api, bimCfg, modelList, cb) {
|
||||
let allHideParts = [];
|
||||
let cnt = 0;
|
||||
if (modelList && modelList.length > 0) {
|
||||
modelList.forEach(it => {
|
||||
addModel(api, bimCfg, it.modelId, (hideParts) => {
|
||||
allHideParts.push(...hideParts);
|
||||
cnt++;
|
||||
if (cnt == modelList.length) {
|
||||
cb && cb(allHideParts);
|
||||
}
|
||||
}, modelList);
|
||||
})
|
||||
}
|
||||
let allHideParts = [];
|
||||
let cnt = 0;
|
||||
if (modelList && modelList.length > 0) {
|
||||
modelList.forEach((it) => {
|
||||
addModel(
|
||||
api,
|
||||
bimCfg,
|
||||
it.modelId,
|
||||
(hideParts) => {
|
||||
allHideParts.push(...hideParts);
|
||||
cnt++;
|
||||
if (cnt == modelList.length) {
|
||||
cb && cb(allHideParts);
|
||||
}
|
||||
},
|
||||
modelList
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function addModel(api, bimCfg, modelId, cb, models) {
|
||||
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
|
||||
let direction = null;
|
||||
let modelInfo = null;
|
||||
if (models) {
|
||||
modelInfo = models.find(m => m.modelId == modelId);
|
||||
let url = `${window.config.modelUrl}/Tools/output/model/${modelId}/root.glt`;
|
||||
let direction = null;
|
||||
let modelInfo = null;
|
||||
if (models) {
|
||||
modelInfo = models.find((m) => m.modelId == modelId);
|
||||
}
|
||||
if (bimCfg.clientApi) {
|
||||
url = `/bimdata/Tools/output/model/${modelId}/root.glt`;
|
||||
if (modelInfo) {
|
||||
direction = modelInfo.bimCfg.direction;
|
||||
}
|
||||
if (bimCfg.clientApi) {
|
||||
url = `/bimdata/Tools/output/model/${modelId}/root.glt`;
|
||||
if (modelInfo) {
|
||||
direction = modelInfo.bimCfg.direction;
|
||||
}
|
||||
console.log("加载模型:" + url);
|
||||
api.Model.add(
|
||||
url,
|
||||
modelId,
|
||||
() => {
|
||||
console.log("加载模型成功2");
|
||||
},
|
||||
() => {
|
||||
console.log("加载模型成功");
|
||||
let hideParts = [];
|
||||
if (modelInfo) {
|
||||
let cfg = modelInfo.bimCfg;
|
||||
|
||||
let x = cfg?.x || 0;
|
||||
let y = cfg?.y || 0;
|
||||
let z = cfg?.z || 0;
|
||||
let rotateZ = cfg?.rotateZ || 0;
|
||||
let rotateX = cfg?.rotateX || 0;
|
||||
let rotateY = cfg?.rotateY || 0;
|
||||
if (x * 1 + y * 1 + z * 1 != 0) {
|
||||
if (bimCfg.showGis) {
|
||||
api.Model.moveToPosition([x * 1, y * 1, z * 1], 0, modelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log("加载模型:" + url);
|
||||
api.Model.add(
|
||||
url,
|
||||
modelId,
|
||||
() => {
|
||||
console.log("加载模型成功2");
|
||||
},
|
||||
() => {
|
||||
console.log("加载模型成功");
|
||||
let hideParts = [];
|
||||
if (modelInfo) {
|
||||
let cfg = modelInfo.bimCfg;
|
||||
|
||||
let x = cfg?.x || 0;
|
||||
let y = cfg?.y || 0;
|
||||
let z = cfg?.z || 0;
|
||||
let rotateZ = cfg?.rotateZ || 0;
|
||||
let rotateX = cfg?.rotateX || 0;
|
||||
let rotateY = cfg?.rotateY || 0;
|
||||
if (x * 1 + y * 1 + z * 1 != 0) {
|
||||
if(bimCfg.showGis){
|
||||
api.Model.moveToPosition([x*1, y*1, z*1], 0, modelId)
|
||||
}
|
||||
|
||||
}
|
||||
if (rotateZ * 1 != 0) {
|
||||
if (this.me.bimCfg.clientApi) {
|
||||
|
||||
} else {
|
||||
if(bimCfg.showGis){
|
||||
api.Model.rotate(rotateX, rotateY, rotateZ, modelId)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (cfg && cfg.hideParts) {
|
||||
cfg.hideParts.forEach(it => {
|
||||
hideParts.push(it);
|
||||
})
|
||||
}
|
||||
if (rotateZ * 1 != 0) {
|
||||
if (this.me.bimCfg.clientApi) {
|
||||
} else {
|
||||
if (bimCfg.showGis) {
|
||||
api.Model.rotate(rotateX, rotateY, rotateZ, modelId);
|
||||
}
|
||||
cb && cb(hideParts);
|
||||
|
||||
}, direction);
|
||||
}
|
||||
}
|
||||
if (cfg && cfg.hideParts) {
|
||||
cfg.hideParts.forEach((it) => {
|
||||
hideParts.push(it);
|
||||
});
|
||||
}
|
||||
}
|
||||
cb && cb(hideParts);
|
||||
},
|
||||
direction
|
||||
);
|
||||
}
|
||||
|
||||
function setDefaultViewPoint(api, bimCfg, pt) {
|
||||
if (pt) {
|
||||
if (bimCfg.clientApi) {
|
||||
if (bimCfg.clientApi) {
|
||||
if (pt["position"] && pt["heading"] && pt["pitch"]) {
|
||||
api.Camera.SetCamera(pt.position, pt.heading, pt.pitch)
|
||||
}
|
||||
} else {
|
||||
if (pt["world"]) {
|
||||
api.Camera.setViewPort(pt);
|
||||
}
|
||||
}
|
||||
if (pt) {
|
||||
if (bimCfg.clientApi) {
|
||||
if (bimCfg.clientApi) {
|
||||
if (pt["position"] && pt["heading"] && pt["pitch"]) {
|
||||
api.Camera.SetCamera(pt.position, pt.heading, pt.pitch);
|
||||
}
|
||||
} else {
|
||||
api.Model.location(api.m_model.keys().toArray()[0])
|
||||
} else {
|
||||
if (pt["world"]) {
|
||||
api.Camera.setViewPort(pt);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
api.Model.location(api.m_model.keys().toArray()[0]);
|
||||
}
|
||||
}
|
||||
|
||||
function hideParts(api, hideParts) {
|
||||
if (hideParts && hideParts.length > 0) {
|
||||
let hideCnt = 0;
|
||||
let hideFn = () => {
|
||||
hideCnt++;
|
||||
if (hideCnt > 30) {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
let featureIds = (hideParts || []).map(it => it.featureId);
|
||||
if (featureIds.length > 0) {
|
||||
api.Feature.setVisible(featureIds.join("#"), false);
|
||||
}
|
||||
hideFn();
|
||||
}, 100)
|
||||
};
|
||||
if (hideParts && hideParts.length > 0) {
|
||||
let hideCnt = 0;
|
||||
let hideFn = () => {
|
||||
hideCnt++;
|
||||
if (hideCnt > 30) {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
let featureIds = (hideParts || []).map((it) => it.featureId);
|
||||
if (featureIds.length > 0) {
|
||||
api.Feature.setVisible(featureIds.join("#"), false);
|
||||
}
|
||||
hideFn();
|
||||
}
|
||||
}, 100);
|
||||
};
|
||||
hideFn();
|
||||
}
|
||||
}
|
||||
|
||||
function initBimCfg(that) {
|
||||
if (!that.bimCfg) {
|
||||
that.bimCfg = {}
|
||||
}
|
||||
if (!that.hideParts) {
|
||||
that.hideParts = [];
|
||||
}
|
||||
let config = that.$tryToJson(that.selProject?.bimConfig, {})
|
||||
that.bimCfg.background = config.background || ''
|
||||
that.bimCfg.showGis = config.showGis || false
|
||||
that.bimCfg.clientApi = config.clientApi || false
|
||||
that.isClient=that.bimCfg.clientApi;
|
||||
if (!that.bimCfg) {
|
||||
that.bimCfg = {};
|
||||
}
|
||||
if (!that.hideParts) {
|
||||
that.hideParts = [];
|
||||
}
|
||||
let config = that.$tryToJson(that.selProject?.bimConfig, {});
|
||||
that.bimCfg.background = config.background || "";
|
||||
that.bimCfg.showGis = config.showGis || false;
|
||||
that.bimCfg.clientApi = config.clientApi || false;
|
||||
that.isClient = that.bimCfg.clientApi;
|
||||
}
|
||||
|
||||
function initLoadModel(that, api) {
|
||||
let fnInit = () => {
|
||||
if (api.m_model.size > 0) {
|
||||
setTimeout(() => {
|
||||
initModelPosition(that, api)
|
||||
}, 1000)
|
||||
} else {
|
||||
setTimeout(fnInit, 1000);
|
||||
}
|
||||
let fnInit = () => {
|
||||
if (api.m_model.size > 0) {
|
||||
setTimeout(() => {
|
||||
initModelPosition(that, api);
|
||||
}, 1000);
|
||||
} else {
|
||||
setTimeout(fnInit, 1000);
|
||||
}
|
||||
fnInit();
|
||||
};
|
||||
fnInit();
|
||||
}
|
||||
|
||||
function initModelPosition(that, api) {
|
||||
that.models.forEach(modelInfo => {
|
||||
if (modelInfo) {
|
||||
let modelId = modelInfo.lightweightName
|
||||
let cfg = that.$tryToJson(modelInfo.bimConfig, {});
|
||||
let x = cfg?.x || 0;
|
||||
let y = cfg?.y || 0;
|
||||
let z = cfg?.z || 0;
|
||||
let rotateZ = cfg?.rotateZ || 0;
|
||||
let rotateX = cfg?.rotateX || 0;
|
||||
let rotateY = cfg?.rotateY || 0;
|
||||
if (x * 1 + y * 1 + z * 1 != 0) {
|
||||
console.log(x, y, z)
|
||||
if(that.bimCfg.showGis){
|
||||
api.Model.moveToPosition([x, y, z], 0, modelId)
|
||||
}
|
||||
|
||||
}
|
||||
if (rotateZ * 1 != 0) {
|
||||
if (!this.me.bimCfg.clientApi) {
|
||||
if(that.bimCfg.showGis){
|
||||
api.Model.rotate(rotateX, rotateY, rotateZ, modelId)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cfg && cfg.hideParts) {
|
||||
cfg.hideParts.forEach(it => {
|
||||
that.hideParts.push(it);
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
api.Model.location(modelId);
|
||||
setTimeout(() => {
|
||||
that.resetScene();
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
that.models.forEach((modelInfo) => {
|
||||
if (modelInfo) {
|
||||
let modelId = modelInfo.lightweightName;
|
||||
let cfg = that.$tryToJson(modelInfo.bimConfig, {});
|
||||
let x = cfg?.x || 0;
|
||||
let y = cfg?.y || 0;
|
||||
let z = cfg?.z || 0;
|
||||
let rotateZ = cfg?.rotateZ || 0;
|
||||
let rotateX = cfg?.rotateX || 0;
|
||||
let rotateY = cfg?.rotateY || 0;
|
||||
if (x * 1 + y * 1 + z * 1 != 0) {
|
||||
console.log(x, y, z);
|
||||
if (that.bimCfg.showGis) {
|
||||
api.Model.moveToPosition([x, y, z], 0, modelId);
|
||||
}
|
||||
initHideParts(that, api)
|
||||
});
|
||||
}
|
||||
if (rotateZ * 1 != 0) {
|
||||
if (!this.me.bimCfg.clientApi) {
|
||||
if (that.bimCfg.showGis) {
|
||||
api.Model.rotate(rotateX, rotateY, rotateZ, modelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cfg && cfg.hideParts) {
|
||||
cfg.hideParts.forEach((it) => {
|
||||
that.hideParts.push(it);
|
||||
});
|
||||
}
|
||||
setTimeout(() => {
|
||||
api.Model.location(modelId);
|
||||
setTimeout(() => {
|
||||
that.resetScene();
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
}
|
||||
initHideParts(that, api);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function initHideParts(that, api) {
|
||||
let hideCnt = 0;
|
||||
let hideFn = () => {
|
||||
hideCnt++;
|
||||
if (hideCnt > 30) {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
let featureIds = (that.hideParts || []).map(it => it.featureId);
|
||||
if (featureIds.length > 0) {
|
||||
api.Feature.setVisible(featureIds.join("#"), false);
|
||||
}
|
||||
hideFn();
|
||||
}, 100)
|
||||
};
|
||||
hideFn();
|
||||
let hideCnt = 0;
|
||||
let hideFn = () => {
|
||||
hideCnt++;
|
||||
if (hideCnt > 30) {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
let featureIds = (that.hideParts || []).map((it) => it.featureId);
|
||||
if (featureIds.length > 0) {
|
||||
api.Feature.setVisible(featureIds.join("#"), false);
|
||||
}
|
||||
hideFn();
|
||||
}, 100);
|
||||
};
|
||||
hideFn();
|
||||
}
|
||||
|
||||
function resetScene(that, api) {
|
||||
that.selectedViewpoint = null;
|
||||
that.selectedRoam = null;
|
||||
try{
|
||||
if(that.isClient){
|
||||
api.Camera.IRPlayCancle()
|
||||
api.Camera.stopViewPortRoam()
|
||||
}else{
|
||||
api.Camera.stopViewPortRoam()
|
||||
api.Camera.stopImmersiveRoam();
|
||||
}
|
||||
}catch(e){
|
||||
that.selectedViewpoint = null;
|
||||
that.selectedRoam = null;
|
||||
try {
|
||||
if (that.isClient) {
|
||||
api.Camera.IRPlayCancle();
|
||||
api.Camera.stopViewPortRoam();
|
||||
} else {
|
||||
api.Camera.stopViewPortRoam();
|
||||
api.Camera.stopImmersiveRoam();
|
||||
}
|
||||
} catch (e) {}
|
||||
api.Model.location(api.m_model.keys().toArray()[0]);
|
||||
if (!that.bimCfg.clientApi) {
|
||||
api.Plugin.deleteMiniMap();
|
||||
}
|
||||
if (that.viewPoint) {
|
||||
if (that.viewPoint.world) {
|
||||
if (!that.bimCfg.clientApi) {
|
||||
api.Camera.setViewPort(that.viewPoint);
|
||||
}
|
||||
} else {
|
||||
if (that.bimCfg.clientApi) {
|
||||
let pt = that.viewPoint;
|
||||
api.Camera.SetCamera(pt.position, pt.heading, pt.pitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 添加无操作检测相关方法
|
||||
function initIdleDetection(that, apiName,timeOut) {
|
||||
that.idleTimer = null;
|
||||
that.idleTime = 0;
|
||||
that.maxIdleTime = timeOut||60*5;
|
||||
that.isAutoRotate = false;
|
||||
|
||||
// 清除已有的定时器
|
||||
if (that.idleTimer) {
|
||||
clearInterval(that.idleTimer);
|
||||
}
|
||||
|
||||
// 重置空闲时间
|
||||
that.idleTime = 0;
|
||||
|
||||
// 设置定时器,每秒检查一次
|
||||
that.idleTimer = setInterval(() => {
|
||||
if(!that.isAutoRotate){
|
||||
that.idleTime++;
|
||||
}
|
||||
api.Model.location(api.m_model.keys().toArray()[0]);
|
||||
if (!that.bimCfg.clientApi) {
|
||||
api.Plugin.deleteMiniMap();
|
||||
console.log("--->",that.idleTime,that.maxIdleTime)
|
||||
// 如果达到最大空闲时间,执行自动旋转
|
||||
if (that.idleTime >= that.maxIdleTime && !that.isAutoRotate) {
|
||||
autoRotate(that, apiName);
|
||||
}
|
||||
if (that.viewPoint) {
|
||||
if (that.viewPoint.world) {
|
||||
if (!that.bimCfg.clientApi) {
|
||||
api.Camera.setViewPort(that.viewPoint);
|
||||
}
|
||||
}else{
|
||||
if(that.bimCfg.clientApi){
|
||||
let pt=that.viewPoint;
|
||||
api.Camera.SetCamera(pt.position, pt.heading, pt.pitch)
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// 监听用户操作事件,重置空闲时间
|
||||
resetIdleEvents(that,apiName);
|
||||
}
|
||||
|
||||
function destroyRouter(that) {
|
||||
if (that.idleTimer) {
|
||||
clearInterval(that.idleTimer);
|
||||
}
|
||||
}
|
||||
function resetIdleEvents(that, apiName) {
|
||||
// 定义需要监听的事件列表
|
||||
const events = [
|
||||
"mousedown",
|
||||
"mousemove",
|
||||
"keypress",
|
||||
"scroll",
|
||||
"touchstart",
|
||||
"click",
|
||||
"touchmove",
|
||||
"wheel",
|
||||
"keydown",
|
||||
"keyup"
|
||||
];
|
||||
|
||||
// 创建重置空闲时间的函数
|
||||
const resetIdleTime = () => {
|
||||
that.idleTime = 0;
|
||||
clearRotate(that, apiName); // 有操作时清除旋转
|
||||
};
|
||||
|
||||
// 为每个事件添加监听器
|
||||
events.forEach((event) => {
|
||||
document.addEventListener(event, resetIdleTime, { passive: true });
|
||||
});
|
||||
}
|
||||
|
||||
function autoRotate(that, apiName) {
|
||||
if (that.isAutoRotate) {
|
||||
return;
|
||||
}
|
||||
that.isAutoRotate = true;
|
||||
console.log("---自动旋转-->");
|
||||
//自动旋转
|
||||
let api = window[apiName];
|
||||
if (that.bimCfg.clientApi) {
|
||||
let e = api.Model.GetModelsCenter().center;
|
||||
api.Camera.autoRotate(api.Public.VecToRadians([e.x, e.y, e.z]), 2e3);
|
||||
} else {
|
||||
if (that.models.length > 0) {
|
||||
api.Model.getCenter(that.models[0].modelId, (pt) => {
|
||||
api.Camera.autoRotate({
|
||||
Position: pt.position,
|
||||
Speed: 0.5,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
function clearRotate(that, apiName) {
|
||||
that.isAutoRotate = false;
|
||||
console.log("---clearRotate-->");
|
||||
let api = window[apiName];
|
||||
if (that.bimCfg.clientApi) {
|
||||
api.Camera.StopCameraRotate();
|
||||
} else {
|
||||
api.Camera.stopAutoRotate();
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
initBimCfg,
|
||||
initLoadModel,
|
||||
initModelPosition,
|
||||
initHideParts,
|
||||
resetScene,
|
||||
initEngine,
|
||||
addModel,
|
||||
setDefaultViewPoint,
|
||||
hideParts,
|
||||
addModelList
|
||||
|
||||
}
|
||||
initBimCfg,
|
||||
initLoadModel,
|
||||
initModelPosition,
|
||||
initHideParts,
|
||||
resetScene,
|
||||
initEngine,
|
||||
addModel,
|
||||
setDefaultViewPoint,
|
||||
hideParts,
|
||||
addModelList,
|
||||
initIdleDetection,
|
||||
destroyRouter
|
||||
};
|
||||
|
|
|
@ -40,8 +40,12 @@ function dataFiltering(that, id) {
|
|||
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.propertyAttr = groupData(
|
||||
tmps.filter((d) => d.propertyTypeName == "properties")
|
||||
);
|
||||
that.propertyType = groupData(
|
||||
tmps.filter((d) => d.propertyTypeName != "properties")
|
||||
);
|
||||
that.propertyLoad = "end";
|
||||
});
|
||||
}
|
||||
|
@ -50,22 +54,27 @@ function dataFiltering(that, id) {
|
|||
*/
|
||||
function getClientProperty(that) {
|
||||
let api = bimBriefingApi;
|
||||
api.Public.event("LEFT_CLICK", e => {
|
||||
api.Feature.getByEvent(e.position, n => {
|
||||
if (n && n["id"]) {
|
||||
let featureId = n.id;
|
||||
if (featureId.split("^")[1]) {
|
||||
clearSelectFeature(that);
|
||||
api.Feature.setColor(featureId, 255, 0, 255, 1);
|
||||
that.selFeatureId = featureId;
|
||||
dataFiltering(that, featureId);
|
||||
that.propertyLoad = "start";
|
||||
that.attributeInformation = "查询中,请稍候~";
|
||||
api.Public.event("LEFT_CLICK", (e) => {
|
||||
api.Feature.getByEvent(
|
||||
e.position,
|
||||
(n) => {
|
||||
if (n && n["id"]) {
|
||||
let featureId = n.id;
|
||||
if (featureId.split("^")[1]) {
|
||||
clearSelectFeature(that);
|
||||
api.Feature.setColor(featureId, 255, 0, 255, 1);
|
||||
that.selFeatureId = featureId;
|
||||
dataFiltering(that, featureId);
|
||||
that.propertyLoad = "start";
|
||||
that.attributeInformation = "查询中,请稍候~";
|
||||
}
|
||||
} else {
|
||||
that.attributeInformation = "未选中构件";
|
||||
}
|
||||
} else {
|
||||
that.attributeInformation = "未选中构件";
|
||||
}
|
||||
}, false, false)
|
||||
},
|
||||
false,
|
||||
false
|
||||
);
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
@ -111,8 +120,8 @@ function subFeatureSizeClient(that) {
|
|||
{ name: "构建表面积", data: [] },
|
||||
{ name: "构建体积", data: [] },
|
||||
];
|
||||
api.Public.event("LEFT_CLICK", e => {
|
||||
api.Feature.getByEvent(e.position, n => {
|
||||
api.Public.event("LEFT_CLICK", (e) => {
|
||||
api.Feature.getByEvent(e.position, (n) => {
|
||||
if (n && n["id"]) {
|
||||
let featureId = n.id;
|
||||
if (featureId.split("^")[1]) {
|
||||
|
@ -121,7 +130,7 @@ function subFeatureSizeClient(that) {
|
|||
clearSelectFeature(that);
|
||||
api.Feature.setColor(featureId, 255, 0, 255, 1);
|
||||
that.selFeatureId = featureId;
|
||||
api.Feature.getGeometrySizeById(featureId, modelId, res => {
|
||||
api.Feature.getGeometrySizeById(featureId, modelId, (res) => {
|
||||
if (res) {
|
||||
let unit = getModelUnit(that, modelId);
|
||||
let size = res || {};
|
||||
|
@ -133,8 +142,12 @@ function subFeatureSizeClient(that) {
|
|||
{ name: "宽", value: y.toFixed(2) + "" },
|
||||
{ name: "高", value: z.toFixed(2) + "" },
|
||||
];
|
||||
result[1].data = [{ name: "面积", value: (x * y).toFixed(4) + "" }];
|
||||
result[2].data = [{ name: "体积", value: (x * y * z).toFixed(6) }];
|
||||
result[1].data = [
|
||||
{ name: "面积", value: (x * y).toFixed(4) + "" },
|
||||
];
|
||||
result[2].data = [
|
||||
{ name: "体积", value: (x * y * z).toFixed(6) },
|
||||
];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -210,14 +223,14 @@ function measurementArea(that) {
|
|||
}
|
||||
|
||||
//构件体积
|
||||
function measuringVolume(that) { }
|
||||
function measuringVolume(that) {}
|
||||
//构件距离--客户端渲染
|
||||
function distanceClient(that) {
|
||||
let api = bimBriefingApi;
|
||||
let result = [{ name: "测量结果", data: [] }];
|
||||
let unit = 1;
|
||||
api.Public.event("LEFT_CLICK", e => {
|
||||
api.Feature.getByEvent(e.position, n => {
|
||||
api.Public.event("LEFT_CLICK", (e) => {
|
||||
api.Feature.getByEvent(e.position, (n) => {
|
||||
if (n && n["id"]) {
|
||||
let featureId = n.id;
|
||||
if (featureId.split("^")[1]) {
|
||||
|
@ -227,7 +240,7 @@ function distanceClient(that) {
|
|||
}
|
||||
});
|
||||
});
|
||||
api.Measurement.distance(data => {
|
||||
api.Measurement.distance((data) => {
|
||||
if (data) {
|
||||
result[0].data = [
|
||||
{
|
||||
|
@ -281,22 +294,49 @@ function distance(that) {
|
|||
];
|
||||
that.info = result;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
function getModels(that) {
|
||||
return that.models.map((d) => d.modelId);
|
||||
}
|
||||
function closeClientClipping(that) {
|
||||
let api = bimBriefingApi;
|
||||
if (that.clipState && that.clip) {
|
||||
that.clipState = false;
|
||||
that.clip.remove(123456);
|
||||
that.clip=null;
|
||||
}
|
||||
}
|
||||
//剖切 -- 客户端渲染
|
||||
function initClientClipping(that) {
|
||||
let api = bimBriefingApi;
|
||||
let models = that.models.map((it) => it.modelId);
|
||||
closeClientClipping(that);
|
||||
that.$message.info("鼠标左键点击轴线进行操作!");
|
||||
that.clipState = true;
|
||||
that.clip = api.Plugin.InitClippingSystem();
|
||||
that.clip.add({
|
||||
id: 123456,
|
||||
tags: models,
|
||||
plateLineColor: Cesium.Color.RED,
|
||||
isShowClipLine: !0,
|
||||
ClipSpeed: 1,
|
||||
RotateSpeed: 1,
|
||||
box: {
|
||||
outline: !0,
|
||||
outlineColor: Cesium.Color.WHITE,
|
||||
planeColor: Cesium.Color.WHITE.withAlpha(0.1),
|
||||
scalar: [1, 1, 1]
|
||||
|
||||
},
|
||||
HelperLineWidth: 10,
|
||||
});
|
||||
}
|
||||
//剖切 -- 服务端渲染
|
||||
function initClipping(that) {
|
||||
let api = bimBriefingApi;
|
||||
api.Public.clearHandler();
|
||||
api.Measurement.clearAllTrace();
|
||||
if(that.isClient){
|
||||
if (that.isClient) {
|
||||
initClientClipping(that);
|
||||
return;
|
||||
}
|
||||
|
@ -316,7 +356,7 @@ function actorVisible(that) {
|
|||
show: false,
|
||||
id: featureId.split("^")[1],
|
||||
modelId: modelId,
|
||||
featureId: featureId
|
||||
featureId: featureId,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -360,4 +400,5 @@ export default {
|
|||
actorVisible,
|
||||
actorShow,
|
||||
clearEvent,
|
||||
closeClientClipping
|
||||
};
|
||||
|
|
|
@ -12,15 +12,30 @@
|
|||
模型结构树
|
||||
</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" :load="loadNode" lazy show-checkbox></el-tree>
|
||||
<el-tree
|
||||
:key="treeKey"
|
||||
ref="tree"
|
||||
:default-expanded-keys="treeExpendedKeys"
|
||||
:props="{
|
||||
children: 'children',
|
||||
label: 'title',
|
||||
}"
|
||||
node-key="key"
|
||||
@check="onCheckTree"
|
||||
:load="loadNode"
|
||||
lazy
|
||||
show-checkbox
|
||||
></el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<img :src="leftSrc" class="toSafety-fixed-left-img" @click="arrowRetract" id="arrowLeft" />
|
||||
<img
|
||||
:src="leftSrc"
|
||||
class="toSafety-fixed-left-img"
|
||||
@click="arrowRetract"
|
||||
id="arrowLeft"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="div-right" :class="{ isShow: leftShow, isHide: !leftShow }">
|
||||
|
@ -37,21 +52,30 @@
|
|||
{{ attributeInformation }}
|
||||
</div>
|
||||
<div class="model-property-nav" v-if="propertyLoad == 'end'">
|
||||
<el-radio-group v-model="selPropertyType" size="small" fill="#6cf">
|
||||
<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
|
||||
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>
|
||||
<th width="50%">{{ item2.propertyName }}</th>
|
||||
<td width="50%">{{ item2.value }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -65,9 +89,20 @@
|
|||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
<table class="model-property-table my-table">
|
||||
<tr v-for="(item2, index2) in item.data" :key="index2 + '-' + index">
|
||||
<th width="50%" :class="'txt'+selectMenu+item2.name">{{ item2.name }}</th>
|
||||
<td width="50%" :class="'txt'+selectMenu+item2.name">
|
||||
<tr
|
||||
v-for="(item2, index2) in item.data"
|
||||
:key="index2 + '-' + index"
|
||||
>
|
||||
<th
|
||||
width="50%"
|
||||
:class="'txt' + selectMenu + item2.name"
|
||||
>
|
||||
{{ item2.name }}
|
||||
</th>
|
||||
<td
|
||||
width="50%"
|
||||
:class="'txt' + selectMenu + item2.name"
|
||||
>
|
||||
{{ item2.value }}
|
||||
<span v-if="index == 0">米</span>
|
||||
<span v-if="index == 1">米<sup>2</sup></span>
|
||||
|
@ -104,13 +139,31 @@
|
|||
</div>
|
||||
</div>
|
||||
<template v-if="selectMenu == 6">
|
||||
<el-button type="primary" @click="clearAllHide" class="clear-all-btn">清除所有</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="clearAllHide"
|
||||
class="clear-all-btn"
|
||||
>清除所有</el-button
|
||||
>
|
||||
<div class="hide-list scroll">
|
||||
<div v-for="(item, index) in hideFeatureIds" :key="index" class="hide-item">
|
||||
<div class="hide-item-state">{{ item.show ? "隐藏" : "显示" }}</div>
|
||||
<el-switch v-model="item.show" @change="changeSwitch(item)"></el-switch>
|
||||
<div
|
||||
v-for="(item, index) in hideFeatureIds"
|
||||
:key="index"
|
||||
class="hide-item"
|
||||
>
|
||||
<div class="hide-item-state">
|
||||
{{ item.show ? "隐藏" : "显示" }}
|
||||
</div>
|
||||
<el-switch
|
||||
v-model="item.show"
|
||||
@change="changeSwitch(item)"
|
||||
></el-switch>
|
||||
<div class="hide-item-id">{{ item.id }}</div>
|
||||
<div class="hide-item-delete"><i class="el-icon-delete command" @click="deleteFeature(item)" />
|
||||
<div class="hide-item-delete">
|
||||
<i
|
||||
class="el-icon-delete command"
|
||||
@click="deleteFeature(item)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -138,16 +191,30 @@
|
|||
<svg-icon icon-class="info" />
|
||||
<span>当前进度</span>
|
||||
</div>
|
||||
<el-progress :text-inside="true" :stroke-width="26" color="#37A685" :percentage="70" />
|
||||
<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" />
|
||||
<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)">
|
||||
<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" />
|
||||
|
@ -155,7 +222,11 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 1 }" @click="doSelectMenu(1)">
|
||||
<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" />
|
||||
|
@ -163,7 +234,12 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 2 }" @click="doSelectMenu(2)" v-if="1 == 2">
|
||||
<div
|
||||
class="tool-item"
|
||||
:class="{ 'is-selected': selectMenu == 2 }"
|
||||
@click="doSelectMenu(2)"
|
||||
v-if="1 == 2"
|
||||
>
|
||||
<el-tooltip content="构建面积" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="area2" />
|
||||
|
@ -171,7 +247,12 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 3 }" @click="doSelectMenu(3)" v-if="1 == 2">
|
||||
<div
|
||||
class="tool-item"
|
||||
:class="{ 'is-selected': selectMenu == 3 }"
|
||||
@click="doSelectMenu(3)"
|
||||
v-if="1 == 2"
|
||||
>
|
||||
<el-tooltip content="构建体积" placement="top">
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="volume" />
|
||||
|
@ -179,7 +260,11 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 4 }" @click="doSelectMenu(4)">
|
||||
<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" />
|
||||
|
@ -187,7 +272,11 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 5 }" @click="doSelectMenu(5)">
|
||||
<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" />
|
||||
|
@ -195,7 +284,11 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 6 }" @click="doSelectMenu(6)">
|
||||
<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" />
|
||||
|
@ -203,7 +296,11 @@
|
|||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" :class="{ 'is-selected': selectMenu == 7 }" @click="doSelectMenu(7)">
|
||||
<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" />
|
||||
|
@ -218,8 +315,8 @@
|
|||
import debounce from "lodash.debounce";
|
||||
import briefingTools from "./bim/briefingTools";
|
||||
import SvgIcon from "@/components/SvgIcon.vue";
|
||||
import apiTools from './bim/apiTools.js'
|
||||
import sapiTools from './bim/sapiTools.js'
|
||||
import apiTools from "./bim/apiTools.js";
|
||||
import sapiTools from "./bim/sapiTools.js";
|
||||
import bimTools from "./bim/bimTools";
|
||||
export default {
|
||||
components: { SvgIcon },
|
||||
|
@ -247,7 +344,9 @@ export default {
|
|||
info: [],
|
||||
title: "属性",
|
||||
showClipping: false,
|
||||
isClient: false,
|
||||
isClient: false,
|
||||
clip: null,
|
||||
clipState: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -266,7 +365,7 @@ export default {
|
|||
this.initEngine();
|
||||
})
|
||||
);
|
||||
window.bbApp=this
|
||||
window.bbApp = this;
|
||||
this.selProject = this.$store.getters.selProject;
|
||||
this.initEngine();
|
||||
},
|
||||
|
@ -287,7 +386,7 @@ export default {
|
|||
});
|
||||
this.hideFeatureIds = [];
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
changeSwitch(item) {
|
||||
let api = bimBriefingApi;
|
||||
|
@ -315,7 +414,9 @@ export default {
|
|||
|
||||
resolve(nd);
|
||||
setTimeout(() => {
|
||||
let els = document.querySelectorAll(".bim-briefing .model-tree .el-tree-node");
|
||||
let els = document.querySelectorAll(
|
||||
".bim-briefing .model-tree .el-tree-node"
|
||||
);
|
||||
if (els.length > 0) {
|
||||
els[0].click();
|
||||
}
|
||||
|
@ -348,7 +449,10 @@ export default {
|
|||
this.$api.bim.getModelTree(data.modelId, data.glid).then((d) => {
|
||||
let tmps = (d.data || []).map((it) => {
|
||||
let title = it.externalId == 0 ? it.name : it.externalId;
|
||||
title = title.replaceAll('"', "").replaceAll("'", "").replaceAll("\\", "");
|
||||
title = title
|
||||
.replaceAll('"', "")
|
||||
.replaceAll("'", "")
|
||||
.replaceAll("\\", "");
|
||||
it.title = title;
|
||||
it.key = it.glid;
|
||||
it.modelId = data.modelId;
|
||||
|
@ -364,16 +468,22 @@ export default {
|
|||
o.modelId = modelId;
|
||||
o.featureId = o.modelId + "^" + o.externalId;
|
||||
o.name = o.name || "";
|
||||
o.name = o.name.replaceAll('"', "").replaceAll("'", "").replaceAll("\\", "");
|
||||
o.name = o.name
|
||||
.replaceAll('"', "")
|
||||
.replaceAll("'", "")
|
||||
.replaceAll("\\", "");
|
||||
o.info = `[${o.externalId}]${o.groupname}-${o.name}`;
|
||||
return o;
|
||||
},
|
||||
doSelectMenu(index) {
|
||||
this.selectMenu = index;
|
||||
if (index == this.selectMenu) {
|
||||
if (index != this.selectMenu) {
|
||||
briefingTools.clearEvent(this);
|
||||
this.selectMenu = index;
|
||||
this.showClipping = false;
|
||||
briefingTools.clearSelectFeature(this);
|
||||
briefingTools.closeClientClipping(this);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
briefingTools.clearSelectFeature(this);
|
||||
switch (index) {
|
||||
|
@ -445,7 +555,10 @@ export default {
|
|||
}
|
||||
} else {
|
||||
let isPartLoad = false;
|
||||
if (!this.models.find((mm) => mm.modelId == node.modelId).visible && checked) {
|
||||
if (
|
||||
!this.models.find((mm) => mm.modelId == node.modelId).visible &&
|
||||
checked
|
||||
) {
|
||||
isPartLoad = true;
|
||||
}
|
||||
let selFeatureIds = [];
|
||||
|
@ -487,7 +600,10 @@ export default {
|
|||
}
|
||||
},
|
||||
async getNodeLeafs(node) {
|
||||
const res = await this.$api.bim.getTreeAllLeafChild(node.modelId, node.glid);
|
||||
const res = await this.$api.bim.getTreeAllLeafChild(
|
||||
node.modelId,
|
||||
node.glid
|
||||
);
|
||||
return (res.data || []).map((f) => {
|
||||
return this.convertFeatureInfo(f, node.modelId);
|
||||
});
|
||||
|
@ -521,7 +637,12 @@ export default {
|
|||
this.attributeInformation = "";
|
||||
bimTools.initBimCfg(this);
|
||||
setTimeout(() => {
|
||||
bimTools.initEngine("bimBriefingApi", "bimBriefingContainer", this.bimCfg, this.initLoadModel);
|
||||
bimTools.initEngine(
|
||||
"bimBriefingApi",
|
||||
"bimBriefingContainer",
|
||||
this.bimCfg,
|
||||
this.initLoadModel
|
||||
);
|
||||
}, 10);
|
||||
},
|
||||
initLoadModel() {
|
||||
|
@ -544,6 +665,7 @@ export default {
|
|||
})
|
||||
.then((d) => {
|
||||
this.models = (d.rows || []).map((it) => {
|
||||
//it.lightweightName="4864687928672606640";
|
||||
it.modelId = it.lightweightName;
|
||||
it.bimCfg = this.$tryToJson(it.bimConfig || "{}", {});
|
||||
it.visible = false;
|
||||
|
@ -554,19 +676,28 @@ export default {
|
|||
if (this.models.length == 0) {
|
||||
this.$message.error("暂无模型,请先关联模型");
|
||||
} else {
|
||||
bimTools.addModelList(window.bimBriefingApi, this.bimCfg, this.models, (hideParts) => {
|
||||
setTimeout(() => {
|
||||
bimTools.setDefaultViewPoint(window.bimBriefingApi, this.bimCfg, this.viewPoint)
|
||||
this.hideParts = hideParts;
|
||||
bimTools.hideParts(window.bimBriefingApi, hideParts);
|
||||
this.modelLoaded = true;
|
||||
bimTools.initLoadModel(this, bimBriefingApi)
|
||||
this.resetScene();
|
||||
setTimeout(()=>{
|
||||
this.doSelectMenu(7);
|
||||
},4000);
|
||||
}, 1000);
|
||||
});
|
||||
bimTools.addModelList(
|
||||
window.bimBriefingApi,
|
||||
this.bimCfg,
|
||||
this.models,
|
||||
(hideParts) => {
|
||||
setTimeout(() => {
|
||||
bimTools.setDefaultViewPoint(
|
||||
window.bimBriefingApi,
|
||||
this.bimCfg,
|
||||
this.viewPoint
|
||||
);
|
||||
this.hideParts = hideParts;
|
||||
bimTools.hideParts(window.bimBriefingApi, hideParts);
|
||||
this.modelLoaded = true;
|
||||
bimTools.initLoadModel(this, bimBriefingApi);
|
||||
this.resetScene();
|
||||
setTimeout(() => {
|
||||
this.doSelectMenu(7);
|
||||
}, 4000);
|
||||
}, 1000);
|
||||
}
|
||||
);
|
||||
|
||||
this.models.forEach((item) => {
|
||||
item.modelId = item.lightweightName;
|
||||
|
@ -574,9 +705,8 @@ export default {
|
|||
setTimeout(() => {
|
||||
this.$refs.tree.setChecked(item.lightweightName, true, true);
|
||||
}, 3000);
|
||||
|
||||
});
|
||||
this.treeKey++;
|
||||
this.treeKey++;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -639,11 +769,53 @@ export default {
|
|||
});
|
||||
},
|
||||
resetScene() {
|
||||
bimBriefingApi.Measurement.clearAllTrace()
|
||||
bimBriefingApi.Public.clearHandler()
|
||||
bimTools.resetScene(this, bimBriefingApi)
|
||||
bimBriefingApi.Measurement.clearAllTrace();
|
||||
bimBriefingApi.Public.clearHandler();
|
||||
bimTools.resetScene(this, bimBriefingApi);
|
||||
bimTools.hideParts(window.bimBriefingApi, this.hideParts);
|
||||
},
|
||||
myClip(z) {
|
||||
let api = bimBriefingApi;
|
||||
let zClip = z||0.5; // 尝试正值
|
||||
//TODO 模型按Z轴剖切
|
||||
|
||||
try {
|
||||
|
||||
|
||||
// 等待一小段时间确保剖切系统初始化完成
|
||||
setTimeout(() => {
|
||||
// 遍历所有加载的模型并应用剖切
|
||||
this.models.forEach(model => {
|
||||
const modelId = model.modelId;
|
||||
console.log("尝试对模型应用剖切:", modelId);
|
||||
|
||||
if (api.m_model && api.m_model.get(modelId)) {
|
||||
// 创建沿Z轴的剖切平面
|
||||
const clippingPlanes = new Cesium.ClippingPlaneCollection({
|
||||
planes: [
|
||||
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 0.0, 1.0), zClip), // 1.0表示沿Z轴正方向剖切
|
||||
],
|
||||
edgeWidth: 1.0,
|
||||
edgeColor: Cesium.Color.RED,
|
||||
enabled: true
|
||||
});
|
||||
|
||||
// 将剖切平面应用到模型
|
||||
api.m_model.get(modelId).clippingPlanes = clippingPlanes;
|
||||
console.log("剖切平面已应用到模型:", modelId);
|
||||
} else {
|
||||
console.log("模型未找到或未加载:", modelId);
|
||||
}
|
||||
});
|
||||
|
||||
console.log("Z轴剖切已应用,剖切位置:", zClip);
|
||||
this.$message.success("剖切操作已完成,剖切位置: " + zClip);
|
||||
}, 100);
|
||||
} catch (error) {
|
||||
console.error("剖切操作失败:", error);
|
||||
this.$message.error("剖切操作失败: " + error.message);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -723,17 +895,17 @@ export default {
|
|||
margin: 10px;
|
||||
}
|
||||
|
||||
.model-property-table{
|
||||
.txt4X{
|
||||
color:#f92e2e;
|
||||
}
|
||||
.txt4Y{
|
||||
color:#8fed12;
|
||||
}
|
||||
.txt4Z{
|
||||
color:orange;
|
||||
}
|
||||
}
|
||||
.model-property-table {
|
||||
.txt4X {
|
||||
color: #f92e2e;
|
||||
}
|
||||
.txt4Y {
|
||||
color: #8fed12;
|
||||
}
|
||||
.txt4Z {
|
||||
color: orange;
|
||||
}
|
||||
}
|
||||
.hide-list {
|
||||
height: calc(100% - 60px);
|
||||
overflow-y: auto;
|
||||
|
@ -849,7 +1021,7 @@ export default {
|
|||
|
||||
.el-tree-node {
|
||||
&:focus {
|
||||
&>.el-tree-node__content {
|
||||
& > .el-tree-node__content {
|
||||
background: #3489d966;
|
||||
|
||||
&:hover {
|
||||
|
@ -1035,7 +1207,6 @@ export default {
|
|||
}
|
||||
|
||||
.my-table {
|
||||
|
||||
td,
|
||||
th {
|
||||
font-size: 20px;
|
||||
|
|
|
@ -61,7 +61,9 @@
|
|||
</div>
|
||||
<div class="stat-card">
|
||||
<div class="stat-title">开累完成(万元)</div>
|
||||
<div class="stat-value led-number">{{ prj.accumulatedCost }}</div>
|
||||
<div class="stat-value led-number">
|
||||
{{ prj.accumulatedCost }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="center-icon">
|
||||
<div class="chart-gif chart-overview-gif"></div>
|
||||
|
@ -71,16 +73,26 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="div-row">
|
||||
<div class="row-title"><svg-icon icon-class="signal"></svg-icon> 人员</div>
|
||||
<div class="row-title">
|
||||
<svg-icon icon-class="signal"></svg-icon> 人员
|
||||
</div>
|
||||
<div class="prj-worker">
|
||||
<div class="worker-chart">
|
||||
<div class="chart-item" v-for="(wk, idx) in workerInfo" :key="idx">
|
||||
<div
|
||||
class="chart-item"
|
||||
v-for="(wk, idx) in workerInfo"
|
||||
:key="idx"
|
||||
>
|
||||
<div class="chart-gif chart-overview-gif"></div>
|
||||
<div class="chart-text led-number">{{ wk.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="worker-title">
|
||||
<div class="title-item" v-for="(wk, idx) in workerInfo" :key="idx">
|
||||
<div
|
||||
class="title-item"
|
||||
v-for="(wk, idx) in workerInfo"
|
||||
:key="idx"
|
||||
>
|
||||
<svg-icon icon-class="group2" />
|
||||
<div>{{ wk.text }}</div>
|
||||
</div>
|
||||
|
@ -89,7 +101,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<img :src="leftSrc" class="toSafety-fixed-left-img" @click="arrowRetract" id="arrowLeft" />
|
||||
<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">
|
||||
|
@ -101,13 +118,25 @@
|
|||
</div>
|
||||
<div class="plan-chart">
|
||||
<div class="chart-item">
|
||||
<my-chart :key="chart1Key" class="chart-data" id="processChart1" width="100%" height="100%"
|
||||
:render="renderChart1"></my-chart>
|
||||
<my-chart
|
||||
:key="chart1Key"
|
||||
class="chart-data"
|
||||
id="processChart1"
|
||||
width="100%"
|
||||
height="100%"
|
||||
:render="renderChart1"
|
||||
></my-chart>
|
||||
<div class="chart-title">计划完成</div>
|
||||
</div>
|
||||
<div class="chart-item">
|
||||
<my-chart :key="chart2Key" class="chart-data" id="processChart2" width="100%" height="100%"
|
||||
:render="renderChart2"></my-chart>
|
||||
<my-chart
|
||||
:key="chart2Key"
|
||||
class="chart-data"
|
||||
id="processChart2"
|
||||
width="100%"
|
||||
height="100%"
|
||||
:render="renderChart2"
|
||||
></my-chart>
|
||||
<div class="chart-title">实际完成</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -123,7 +152,9 @@
|
|||
<svg-icon icon-class="notesearch" />
|
||||
</div>
|
||||
<div class="warn-data">
|
||||
<div class="warn-data-val led-number">{{ safetyInfo.safetyCount }}</div>
|
||||
<div class="warn-data-val led-number">
|
||||
{{ safetyInfo.safetyCount }}
|
||||
</div>
|
||||
<div class="warn-data-text">问题数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -132,7 +163,9 @@
|
|||
<svg-icon icon-class="tools" />
|
||||
</div>
|
||||
<div class="warn-data">
|
||||
<div class="warn-data-val led-number">{{ safetyInfo.safetyRectifyCount }}</div>
|
||||
<div class="warn-data-val led-number">
|
||||
{{ safetyInfo.safetyRectifyCount }}
|
||||
</div>
|
||||
<div class="warn-data-text">整改数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -141,7 +174,9 @@
|
|||
<svg-icon icon-class="percent" class="green" />
|
||||
</div>
|
||||
<div class="warn-data">
|
||||
<div class="warn-data-val led-number">{{ safetyInfo.safetyRectifyRate }}%</div>
|
||||
<div class="warn-data-val led-number">
|
||||
{{ safetyInfo.safetyRectifyRate }}%
|
||||
</div>
|
||||
<div class="warn-data-text">整改率</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -150,21 +185,32 @@
|
|||
<svg-icon icon-class="warn" class="red" />
|
||||
</div>
|
||||
<div class="warn-data">
|
||||
<div class="warn-data-val led-number">{{ safetyInfo.safetyTimeoutCount }}</div>
|
||||
<div class="warn-data-val led-number">
|
||||
{{ safetyInfo.safetyTimeoutCount }}
|
||||
</div>
|
||||
<div class="warn-data-text">超时数</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="div-row">
|
||||
<div class="row-title"><svg-icon icon-class="signal"></svg-icon> 项目全景</div>
|
||||
<div class="row-title">
|
||||
<svg-icon icon-class="signal"></svg-icon> 项目全景
|
||||
</div>
|
||||
|
||||
<div class="photography-list">
|
||||
<template v-if="photographyList && photographyList.length > 0">
|
||||
<el-carousel height="100%" :autoplay="false">
|
||||
<el-carousel-item v-for="(item, idx) in photographyList" :key="idx">
|
||||
<el-carousel-item
|
||||
v-for="(item, idx) in photographyList"
|
||||
:key="idx"
|
||||
>
|
||||
<video controls class="photography-video">
|
||||
<source :src="item.videoUrl" type="video/mp4" :key="item.videoUrl" />
|
||||
<source
|
||||
:src="item.videoUrl"
|
||||
type="video/mp4"
|
||||
:key="item.videoUrl"
|
||||
/>
|
||||
您的浏览器不支持Video标签。
|
||||
</video>
|
||||
<div class="photography-list-title">
|
||||
|
@ -177,12 +223,25 @@
|
|||
<div class="photography-list-nodata">
|
||||
<div>
|
||||
<i class="video-play">
|
||||
<svg class="icon"
|
||||
style="width: 30px; height: 30px; vertical-align: middle; fill: currentColor; overflow: hidden"
|
||||
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551">
|
||||
<svg
|
||||
class="icon"
|
||||
style="
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
vertical-align: middle;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="4551"
|
||||
>
|
||||
<path
|
||||
d="M128 138.666667c0-47.232 33.322667-66.666667 74.176-43.562667l663.146667 374.954667c40.96 23.168 40.853333 60.8 0 83.882666L202.176 928.896C161.216 952.064 128 932.565333 128 885.333333v-746.666666z"
|
||||
fill="#3D3D3D" p-id="4552"></path>
|
||||
fill="#3D3D3D"
|
||||
p-id="4552"
|
||||
></path>
|
||||
</svg>
|
||||
</i>
|
||||
</div>
|
||||
|
@ -193,16 +252,29 @@
|
|||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<img :src="rightSrc" class="toSafety-fixed-right-img" @click="arrowRetract" id="arrowRight" />
|
||||
<img
|
||||
:src="rightSrc"
|
||||
class="toSafety-fixed-right-img"
|
||||
@click="arrowRetract"
|
||||
id="arrowRight"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="div-mode">
|
||||
<div class="mode-item" :class="{ 'is-active': mode == 'plan' }" @click="changeMode('plan')">
|
||||
<div
|
||||
class="mode-item"
|
||||
:class="{ 'is-active': mode == 'plan' }"
|
||||
@click="changeMode('plan')"
|
||||
>
|
||||
<svg-icon icon-class="funnel" />
|
||||
<span>形象进度</span>
|
||||
</div>
|
||||
|
||||
<div class="mode-item" :class="{ 'is-active': mode == 'model' }" @click="changeMode('model')">
|
||||
<div
|
||||
class="mode-item"
|
||||
:class="{ 'is-active': mode == 'model' }"
|
||||
@click="changeMode('model')"
|
||||
>
|
||||
<svg-icon icon-class="city" />
|
||||
<span>整体模型</span>
|
||||
</div>
|
||||
|
@ -215,36 +287,56 @@
|
|||
<span class="sp-text">默认视点</span>
|
||||
</div>
|
||||
|
||||
<div class="tool-item" @click="changeDevicType(1)" :class="{ 'is-active': devicTypes.includes(1) }"
|
||||
v-if="menuShow.video">
|
||||
<div
|
||||
class="tool-item"
|
||||
@click="changeDevicType(1)"
|
||||
:class="{ 'is-active': devicTypes.includes(1) }"
|
||||
v-if="menuShow.video"
|
||||
>
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="videoMonitor" />
|
||||
</div>
|
||||
<span class="sp-text">视频监控</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="changeDevicType(2)" :class="{ 'is-active': devicTypes.includes(2) }"
|
||||
v-if="menuShow.pit">
|
||||
<div
|
||||
class="tool-item"
|
||||
@click="changeDevicType(2)"
|
||||
:class="{ 'is-active': devicTypes.includes(2) }"
|
||||
v-if="menuShow.pit"
|
||||
>
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="pitMonitor" />
|
||||
</div>
|
||||
<span class="sp-text">基坑监控</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="changeDevicType(3)" :class="{ 'is-active': devicTypes.includes(3) }"
|
||||
v-if="menuShow.tower">
|
||||
<div
|
||||
class="tool-item"
|
||||
@click="changeDevicType(3)"
|
||||
:class="{ 'is-active': devicTypes.includes(3) }"
|
||||
v-if="menuShow.tower"
|
||||
>
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="towerMonitor" />
|
||||
</div>
|
||||
<span class="sp-text">塔机监控</span>
|
||||
</div>
|
||||
<div class="tool-item" @click="changeDevicType(4)" :class="{ 'is-active': devicTypes.includes(4) }"
|
||||
v-if="menuShow.power">
|
||||
<div
|
||||
class="tool-item"
|
||||
@click="changeDevicType(4)"
|
||||
:class="{ 'is-active': devicTypes.includes(4) }"
|
||||
v-if="menuShow.power"
|
||||
>
|
||||
<div class="icon">
|
||||
<svg-icon icon-class="power" />
|
||||
</div>
|
||||
<span class="sp-text">电箱监控</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plan-legend" :class="{ isShow: leftShow, isHide: !leftShow }" v-if="mode == 'plan'">
|
||||
<div
|
||||
class="plan-legend"
|
||||
:class="{ isShow: leftShow, isHide: !leftShow }"
|
||||
v-if="mode == 'plan'"
|
||||
>
|
||||
<div class="plan-item">
|
||||
<span style="background: rgba(59, 255, 0, 1)"></span>
|
||||
<span>提前完工</span>
|
||||
|
@ -329,9 +421,9 @@ const css = `<style>
|
|||
</style>`;
|
||||
import debounce from "lodash.debounce";
|
||||
import videoDialog from "./bim/videoDialog.vue";
|
||||
import bimTools from './bim/bimTools'
|
||||
import apiTools from './bim/apiTools.js'
|
||||
import sapiTools from './bim/sapiTools.js'
|
||||
import bimTools from "./bim/bimTools";
|
||||
import apiTools from "./bim/apiTools.js";
|
||||
import sapiTools from "./bim/sapiTools.js";
|
||||
export default {
|
||||
components: {
|
||||
videoDialog,
|
||||
|
@ -390,10 +482,11 @@ export default {
|
|||
menuShowCount: 0,
|
||||
modelLoadSuccess: false, //模型加载成功
|
||||
mode: "model", //显示模式 model-整体模型 plan-形象进度
|
||||
isClient: false,
|
||||
isClient: false
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
bimTools.destroyRouter(this);
|
||||
document.body.classList.remove("is-sapi");
|
||||
},
|
||||
mounted() {
|
||||
|
@ -425,14 +518,24 @@ export default {
|
|||
this.updateButtonShow();
|
||||
});
|
||||
this.updateButtonShow();
|
||||
bimTools.initIdleDetection(this,"bimMgrApi");
|
||||
},
|
||||
methods: {
|
||||
|
||||
updateButtonShow() {
|
||||
let objs = this.$root.showMenus || [];
|
||||
this.menuShow.video = objs.find((it) => it.component == "video") ? true : false;
|
||||
this.menuShow.pit = objs.find((it) => it.component == "pit") ? true : false;
|
||||
this.menuShow.tower = objs.find((it) => it.component == "tower") ? true : false;
|
||||
this.menuShow.power = objs.find((it) => it.component == "power") ? true : false;
|
||||
this.menuShow.video = objs.find((it) => it.component == "video")
|
||||
? true
|
||||
: false;
|
||||
this.menuShow.pit = objs.find((it) => it.component == "pit")
|
||||
? true
|
||||
: false;
|
||||
this.menuShow.tower = objs.find((it) => it.component == "tower")
|
||||
? true
|
||||
: false;
|
||||
this.menuShow.power = objs.find((it) => it.component == "power")
|
||||
? true
|
||||
: false;
|
||||
this.menuShowCount = 0;
|
||||
for (let key in this.menuShow) {
|
||||
if (this.menuShow[key]) {
|
||||
|
@ -453,7 +556,13 @@ export default {
|
|||
tooltip: {
|
||||
show: true,
|
||||
formatter: function (params) {
|
||||
return params.seriesName + "<br/>" + params.marker + (params.value * 100).toFixed(2) + "%";
|
||||
return (
|
||||
params.seriesName +
|
||||
"<br/>" +
|
||||
params.marker +
|
||||
(params.value * 100).toFixed(2) +
|
||||
"%"
|
||||
);
|
||||
},
|
||||
},
|
||||
series: [
|
||||
|
@ -502,21 +611,27 @@ export default {
|
|||
projectId: this.selProject.id,
|
||||
comId: this.selProject.comId,
|
||||
};
|
||||
this.$api.safety.listCountForBG({ ...postData, infoType: 0 }).then((d) => {
|
||||
this.safetyListCount = d.data;
|
||||
let func = (lbl) => {
|
||||
let obj = this.safetyListCount.find((it) => it.remark == lbl);
|
||||
return obj ? obj.id || 0 : 0;
|
||||
};
|
||||
this.safetyInfo.safetyCount = func("全部");
|
||||
this.safetyInfo.safetyRectifyCount = func("完成");
|
||||
if (this.safetyInfo.safetyCount == 0) {
|
||||
this.safetyInfo.safetyRectifyRate = 100;
|
||||
} else {
|
||||
this.safetyInfo.safetyRectifyRate = ((this.safetyInfo.safetyRectifyCount / this.safetyInfo.safetyCount) * 100.0).toFixed(2);
|
||||
}
|
||||
this.safetyInfo.safetyTimeoutCount = func("整改超时");
|
||||
});
|
||||
this.$api.safety
|
||||
.listCountForBG({ ...postData, infoType: 0 })
|
||||
.then((d) => {
|
||||
this.safetyListCount = d.data;
|
||||
let func = (lbl) => {
|
||||
let obj = this.safetyListCount.find((it) => it.remark == lbl);
|
||||
return obj ? obj.id || 0 : 0;
|
||||
};
|
||||
this.safetyInfo.safetyCount = func("全部");
|
||||
this.safetyInfo.safetyRectifyCount = func("完成");
|
||||
if (this.safetyInfo.safetyCount == 0) {
|
||||
this.safetyInfo.safetyRectifyRate = 100;
|
||||
} else {
|
||||
this.safetyInfo.safetyRectifyRate = (
|
||||
(this.safetyInfo.safetyRectifyCount /
|
||||
this.safetyInfo.safetyCount) *
|
||||
100.0
|
||||
).toFixed(2);
|
||||
}
|
||||
this.safetyInfo.safetyTimeoutCount = func("整改超时");
|
||||
});
|
||||
},
|
||||
selectLastPhotography() {
|
||||
this.$api.detail.photographyList(this.selProject.id).then((d) => {
|
||||
|
@ -524,18 +639,20 @@ export default {
|
|||
});
|
||||
},
|
||||
getFinishRate() {
|
||||
this.$api.planSchedule.findAllPlanDatas(this.selProject.id).then((res) => {
|
||||
let _ywcjhs = [];
|
||||
this.$api.planSchedule
|
||||
.findAllPlanDatas(this.selProject.id)
|
||||
.then((res) => {
|
||||
let _ywcjhs = [];
|
||||
|
||||
res.data.forEach((item) => {
|
||||
if (item.taskStatus == "zcwc" || item.taskStatus == "zhwc") {
|
||||
_ywcjhs.push(item);
|
||||
}
|
||||
res.data.forEach((item) => {
|
||||
if (item.taskStatus == "zcwc" || item.taskStatus == "zhwc") {
|
||||
_ywcjhs.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
this.finishRate = (_ywcjhs.length / res.data.length).toFixed(4);
|
||||
this.chart2Key++;
|
||||
});
|
||||
|
||||
this.finishRate = (_ywcjhs.length / res.data.length).toFixed(4);
|
||||
this.chart2Key++;
|
||||
});
|
||||
},
|
||||
getProjectInfo() {
|
||||
this.$api.project.getProjectInfo(this.selProject.id).then((d) => {
|
||||
|
@ -652,7 +769,10 @@ export default {
|
|||
})
|
||||
.then((d) => {
|
||||
let objs = d.data || [];
|
||||
this.planFinishRate = objs.length > 0 ? ((objs[0].scheduleNode || 0) / 100.0).toFixed(4) : 0;
|
||||
this.planFinishRate =
|
||||
objs.length > 0
|
||||
? ((objs[0].scheduleNode || 0) / 100.0).toFixed(4)
|
||||
: 0;
|
||||
this.chart1Key++;
|
||||
});
|
||||
},
|
||||
|
@ -687,11 +807,14 @@ export default {
|
|||
.map((item) => {
|
||||
item.show = item.enabled != 0;
|
||||
item.position = this.$tryToJson(item.position, []);
|
||||
item.elId = (item.deviceId ? item.deviceId : cnt++) + "-" + item.deviceType;
|
||||
item.elId =
|
||||
(item.deviceId ? item.deviceId : cnt++) + "-" + item.deviceType;
|
||||
return item;
|
||||
})
|
||||
.filter((item) => item.position.length == 3);
|
||||
this.showDevices = this.devices.filter((item) => this.devicTypes.includes(item.deviceType));
|
||||
this.showDevices = this.devices.filter((item) =>
|
||||
this.devicTypes.includes(item.deviceType)
|
||||
);
|
||||
this.clearLabels();
|
||||
this.addDeviceLabel();
|
||||
setTimeout(() => {
|
||||
|
@ -706,7 +829,9 @@ export default {
|
|||
} else {
|
||||
this.devicTypes.push(n);
|
||||
}
|
||||
this.showDevices = this.devices.filter((item) => this.devicTypes.includes(item.deviceType));
|
||||
this.showDevices = this.devices.filter((item) =>
|
||||
this.devicTypes.includes(item.deviceType)
|
||||
);
|
||||
this.clearLabels();
|
||||
this.addDeviceLabel();
|
||||
setTimeout(() => {
|
||||
|
@ -766,7 +891,7 @@ export default {
|
|||
maxDistance: 1000,
|
||||
html: html,
|
||||
id: item.elId,
|
||||
position: item.position
|
||||
position: item.position,
|
||||
});
|
||||
|
||||
this.addLabels.push(item.elId);
|
||||
|
@ -783,11 +908,10 @@ export default {
|
|||
this.showDevices.forEach((d) => {
|
||||
if (d.position && d.position.length > 0) {
|
||||
if (this.isClient) {
|
||||
this.AddClientLable(d)
|
||||
this.AddClientLable(d);
|
||||
} else {
|
||||
this.AddLable(d);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -812,7 +936,12 @@ export default {
|
|||
this.elId++;
|
||||
this.activeMenu = 0;
|
||||
setTimeout(() => {
|
||||
bimTools.initEngine("bimMgrApi", "bimManageContainer", this.bimCfg, this.initLoadModel);
|
||||
bimTools.initEngine(
|
||||
"bimMgrApi",
|
||||
"bimManageContainer",
|
||||
this.bimCfg,
|
||||
this.initLoadModel
|
||||
);
|
||||
}, 10);
|
||||
},
|
||||
initLoadModel() {
|
||||
|
@ -848,18 +977,26 @@ export default {
|
|||
if (this.models.length == 0) {
|
||||
this.$message.error("暂无模型,请先关联模型");
|
||||
} else {
|
||||
bimTools.addModelList(window.bimMgrApi, this.bimCfg, this.models, (hideParts) => {
|
||||
console.log(":--->", hideParts);
|
||||
this.loadDevicePosition();
|
||||
setTimeout(() => {
|
||||
bimTools.setDefaultViewPoint(window.bimMgrApi, this.bimCfg, this.viewPoint)
|
||||
this.hideParts=hideParts;
|
||||
bimTools.hideParts(window.bimMgrApi, hideParts);
|
||||
this.modelLoadSuccess = true;
|
||||
this.resetScene();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
bimTools.addModelList(
|
||||
window.bimMgrApi,
|
||||
this.bimCfg,
|
||||
this.models,
|
||||
(hideParts) => {
|
||||
console.log(":--->", hideParts);
|
||||
this.loadDevicePosition();
|
||||
setTimeout(() => {
|
||||
bimTools.setDefaultViewPoint(
|
||||
window.bimMgrApi,
|
||||
this.bimCfg,
|
||||
this.viewPoint
|
||||
);
|
||||
this.hideParts = hideParts;
|
||||
bimTools.hideParts(window.bimMgrApi, hideParts);
|
||||
this.modelLoadSuccess = true;
|
||||
this.resetScene();
|
||||
}, 1000);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -881,62 +1018,76 @@ export default {
|
|||
bimTools.hideParts(api, this.hideParts);
|
||||
this.resetScene();
|
||||
} else {
|
||||
this.$api.planSchedule.findPlanProgress(this.selProject.id).then((d) => {
|
||||
let datas = d.data || [];
|
||||
let beforeData = []; //提前完工
|
||||
let afterData = []; //延迟完工
|
||||
let processData = []; //进行中
|
||||
let standData = []; //正常完工
|
||||
let allData = [];
|
||||
datas.forEach((it) => {
|
||||
let planFinishDate = it.planFinishDate;
|
||||
let finishDate = it.finishDate;
|
||||
it.bim = this.$tryToJson(it.bimId, []);
|
||||
if (finishDate == "2000-01-01") {
|
||||
it.bim.forEach((item) => {
|
||||
processData.push(item);
|
||||
allData.push(item);
|
||||
});
|
||||
} else if (planFinishDate == finishDate) {
|
||||
it.bim.forEach((item) => {
|
||||
standData.push(item);
|
||||
allData.push(item);
|
||||
});
|
||||
} else if (this.$dt(planFinishDate) < this.$dt(finishDate)) {
|
||||
it.bim.forEach((item) => {
|
||||
afterData.push(item);
|
||||
allData.push(item);
|
||||
});
|
||||
} else {
|
||||
it.bim.forEach((item) => {
|
||||
beforeData.push(item);
|
||||
allData.push(item);
|
||||
this.$api.planSchedule
|
||||
.findPlanProgress(this.selProject.id)
|
||||
.then((d) => {
|
||||
let datas = d.data || [];
|
||||
let beforeData = []; //提前完工
|
||||
let afterData = []; //延迟完工
|
||||
let processData = []; //进行中
|
||||
let standData = []; //正常完工
|
||||
let allData = [];
|
||||
datas.forEach((it) => {
|
||||
let planFinishDate = it.planFinishDate;
|
||||
let finishDate = it.finishDate;
|
||||
it.bim = this.$tryToJson(it.bimId, []);
|
||||
if (finishDate == "2000-01-01") {
|
||||
it.bim.forEach((item) => {
|
||||
processData.push(item);
|
||||
allData.push(item);
|
||||
});
|
||||
} else if (planFinishDate == finishDate) {
|
||||
it.bim.forEach((item) => {
|
||||
standData.push(item);
|
||||
allData.push(item);
|
||||
});
|
||||
} else if (this.$dt(planFinishDate) < this.$dt(finishDate)) {
|
||||
it.bim.forEach((item) => {
|
||||
afterData.push(item);
|
||||
allData.push(item);
|
||||
});
|
||||
} else {
|
||||
it.bim.forEach((item) => {
|
||||
beforeData.push(item);
|
||||
allData.push(item);
|
||||
});
|
||||
}
|
||||
});
|
||||
if (allData.length > 0) {
|
||||
allData = allData.map((item) => item.featureId);
|
||||
this.models.forEach((model) => {
|
||||
api.Model.setAlpha(model.lightweightName, 0.5);
|
||||
});
|
||||
if (beforeData.length > 0) {
|
||||
api.Feature.setColor(
|
||||
beforeData.map((it) => it.featureId).join("#"),
|
||||
"rgba(59, 255, 0,1)"
|
||||
);
|
||||
}
|
||||
if (standData.length > 0) {
|
||||
api.Feature.setColor(
|
||||
standData.map((it) => it.featureId).join("#"),
|
||||
"rgba(255,255,255,1)"
|
||||
);
|
||||
}
|
||||
if (processData.length > 0) {
|
||||
api.Feature.setColor(
|
||||
processData.map((it) => it.featureId).join("#"),
|
||||
"rgba(0,0, 255,1)"
|
||||
);
|
||||
}
|
||||
if (afterData.length > 0) {
|
||||
api.Feature.setColor(
|
||||
afterData.map((it) => it.featureId).join("#"),
|
||||
"rgba(250, 0, 0,1)"
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (allData.length > 0) {
|
||||
allData = allData.map((item) => item.featureId);
|
||||
this.models.forEach((model) => {
|
||||
api.Model.setAlpha(model.lightweightName, 0.5);
|
||||
});
|
||||
if (beforeData.length > 0) {
|
||||
api.Feature.setColor(beforeData.map((it) => it.featureId).join("#"), "rgba(59, 255, 0,1)");
|
||||
}
|
||||
if (standData.length > 0) {
|
||||
api.Feature.setColor(standData.map((it) => it.featureId).join("#"), "rgba(255,255,255,1)");
|
||||
}
|
||||
if (processData.length > 0) {
|
||||
api.Feature.setColor(processData.map((it) => it.featureId).join("#"), "rgba(0,0, 255,1)");
|
||||
}
|
||||
if (afterData.length > 0) {
|
||||
api.Feature.setColor(afterData.map((it) => it.featureId).join("#"), "rgba(250, 0, 0,1)");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
resetScene() {
|
||||
bimTools.resetScene(this, bimMgrApi)
|
||||
bimTools.resetScene(this, bimMgrApi);
|
||||
},
|
||||
loadDeviceData() {
|
||||
if (this.loadDevDatatimeOut) {
|
||||
|
@ -988,7 +1139,9 @@ export default {
|
|||
let tmps = this.towerWarning.filter((d) => d.value == item.warnings);
|
||||
warning = tmps.length > 0 ? tmps[0].label : "";
|
||||
}
|
||||
let warningHtml = warning ? `<div class='data-item red'><span class='data-label'>警报:</span><span class='data-value'>${warning}</span></div>` : "";
|
||||
let warningHtml = warning
|
||||
? `<div class='data-item red'><span class='data-label'>警报:</span><span class='data-value'>${warning}</span></div>`
|
||||
: "";
|
||||
|
||||
txtHtml = `${warningHtml}
|
||||
<div class='data-item'><span class='data-label'>高度:</span><span class='data-value'>${item.height}</span></div>
|
||||
|
@ -1104,33 +1257,32 @@ export default {
|
|||
|
||||
#bimManageContainer {
|
||||
height: 100%;
|
||||
.tag-box {
|
||||
height: 120px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.tag-box {
|
||||
height: 120px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tag-svg {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
bottom: -17px;
|
||||
left: 50%;
|
||||
margin-left: -19px;
|
||||
.tag-svg {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
bottom: -17px;
|
||||
left: 50%;
|
||||
margin-left: -19px;
|
||||
}
|
||||
|
||||
}
|
||||
.tag-img {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tag-img {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.tag-txt {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
}
|
||||
.tag-txt {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1635,7 +1787,8 @@ export default {
|
|||
}
|
||||
|
||||
.tag-txt {
|
||||
box-shadow: #1a9047 0px 4px 16px, rgba(10, 31, 68, 0.06) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 56px;
|
||||
box-shadow: #1a9047 0px 4px 16px, rgba(10, 31, 68, 0.06) 0px 8px 24px,
|
||||
rgba(17, 17, 26, 0.1) 0px 16px 56px;
|
||||
color: #75fbfd;
|
||||
font-size: 12px;
|
||||
padding: 10px;
|
||||
|
@ -1727,7 +1880,6 @@ export default {
|
|||
}
|
||||
|
||||
.tb-prj {
|
||||
|
||||
td,
|
||||
th {
|
||||
border: solid 1px #6ea9ab68;
|
||||
|
@ -1742,7 +1894,6 @@ export default {
|
|||
|
||||
.worker-chart {
|
||||
.chart-item {
|
||||
|
||||
.chart-gif,
|
||||
.chart-text {
|
||||
left: 24px;
|
||||
|
@ -2004,7 +2155,6 @@ export default {
|
|||
}
|
||||
|
||||
.tb-prj {
|
||||
|
||||
td,
|
||||
th {
|
||||
border: solid 1px #6ea9ab68;
|
||||
|
@ -2019,7 +2169,6 @@ export default {
|
|||
|
||||
.worker-chart {
|
||||
.chart-item {
|
||||
|
||||
.chart-gif,
|
||||
.chart-text {
|
||||
left: 40px;
|
||||
|
|
|
@ -11,14 +11,14 @@
|
|||
<div style="color: #6c829a" class="text-row2">
|
||||
<span style="color: #c6d9fa">{{ item.total }}</span> {{ item.unit }}
|
||||
<span>(</span>
|
||||
<span style="color: #52adf4">{{ item.yesMonitor }}</span> {{ item.unit }} / <span style="color: #4677ff">{{ item.notMonitor }}</span> {{ item.unit }}
|
||||
<span style="color: #52adf4">{{ item.yesMonitor }}</span> {{ item.unit }} / <span style="color: #C50">{{ item.notMonitor }}</span> {{ item.unit }}
|
||||
<span>)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-top: 8px">
|
||||
<div style="height: 6px; background: rgba(22, 203, 115, 0.1); display: flex; align-items: center">
|
||||
<div :style="{ width: item.yesWidth + '%', height: '6px', background: '#52adf4' }"></div>
|
||||
<div :style="{ width: item.notWidth + '%', height: '6px', background: '#4677ff' }"></div>
|
||||
<div :style="{ width: item.notWidth + '%', height: '6px', background: '#C50' }"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
<div>已监控</div>
|
||||
</div>
|
||||
<div class="pcd-output-value-key-info">
|
||||
<div class="pcd-rect"></div>
|
||||
<div>未监控</div>
|
||||
<div class="pcd-rect" style="background-color: #C50;"></div>
|
||||
<div style="color: #C50;">未监控</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -97,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="userPost != null "> and psu.user_post = #{userPost}</if>
|
||||
<if test="subDeptGroup != null "> and psu.sub_dept_group = #{subDeptGroup}</if>
|
||||
<if test="subDeptGroupName != null and subDeptGroupName != ''"> and psu.sub_dept_group_name like concat('%', #{subDeptGroupName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and psu.user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="workType != null and workType != 0"> and psu.work_type = #{workType}</if>
|
||||
<if test="craftType != null and craftType != ''"> and psu.craft_type = #{craftType}</if>
|
||||
<if test="craftPost != null and craftPost != ''"> and psu.craft_post = #{craftPost}</if>
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=eseRcUMFiUlnWA6miQLejNpvS70H8SRN"
|
||||
></script>
|
||||
<script src="/cdn/Cesium/Cesium.js"></script>
|
||||
<script src="/cdn/Cesium/BIMGISEngine.js"></script>
|
||||
<script src="/cdn/Cesium/initApi.js?v=20230920"></script>
|
||||
<script src="/cdn/echarts/echarts.min.js"></script>
|
||||
<script src="/cdn/Cesium/BIMGISEngine_edit.js?v=20250909"></script>
|
||||
<script src="/cdn/Cesium/initApi.js?v=20230920"></script>
|
||||
<script src="/cdn/echarts/echarts.min.js"></script>
|
||||
<script src="/cdn/bim/sapi/BIMGISEngine250906.js?v=2025090602"></script>
|
||||
<script src="/cdn/bim/sapi/config.js?v=20250816"></script>
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ import { ElMessage, ElTooltip } from 'element-plus';
|
|||
import { getProjectBimConfig } from "@/api/manage/proProjectInfo.js";
|
||||
import SAPITools from './sapiTools.js'
|
||||
import APITools from './apiTools.js'
|
||||
import bimTools from '../bimTools.js'
|
||||
import BimTools from '../bimTools.js'
|
||||
export default {
|
||||
components: {
|
||||
ModelFloorTree,
|
||||
|
@ -137,7 +137,7 @@ export default {
|
|||
showGis: config.showGis || false,
|
||||
clientApi: config.clientApi || false
|
||||
}
|
||||
bimTools.initEngine("api", "bimSettingContainer", this.bimCfg);
|
||||
BimTools.initEngine("api", "bimSettingContainer", this.bimCfg);
|
||||
if (this.bimCfg.showGis) {
|
||||
this.showGis = true;
|
||||
}
|
||||
|
@ -192,14 +192,10 @@ export default {
|
|||
if (!this.bimCfg.clientApi) {
|
||||
api.Plugin.deleteMiniMap();
|
||||
}
|
||||
if (this.viewPoint) {
|
||||
if (this.viewPoint.world) {
|
||||
if (!this.bimCfg.clientApi) {
|
||||
api.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
}
|
||||
setTimeout(()=>{
|
||||
BimTools.setDefaultViewPoint(window.api, this.bimCfg, this.viewPoint)
|
||||
},800)
|
||||
|
||||
}
|
||||
},
|
||||
doMenu(n) {
|
||||
if (this.activeMenu == 4) {
|
||||
|
|
|
@ -339,9 +339,7 @@ export default {
|
|||
if(!this.isClient){
|
||||
sandSettingApi.Plugin.deleteMiniMap();
|
||||
}
|
||||
if (this.viewPoint) {
|
||||
sandSettingApi.Camera.setViewPort(this.viewPoint);
|
||||
}
|
||||
BimTools.setDefaultViewPoint(window.sandSettingApi, this.bimCfg, this.viewPoint)
|
||||
},
|
||||
doMenu(n) {
|
||||
if (n == this.activeMenu) {
|
||||
|
|
Loading…
Reference in New Issue