Compare commits

..

No commits in common. "26d3efd3462fa10b28d2d2ba13f456d21d985652" and "88bee2f2a0d99dbd2db4bea90fff2fbc4cb24a02" have entirely different histories.

13 changed files with 150 additions and 237 deletions

View File

@ -16,4 +16,4 @@ VUE_APP_ALL_MENU = false
# 微前端地址 # 微前端地址
VUE_APP_REMOTES_URL="http://119.45.158.12/common/" VUE_APP_REMOTES_URL="http://119.45.158.12/common/"
# 当前应用部署地址 # 当前应用部署地址
VUE_APP_EXPOSES_URL="http://192.168.2.72:8081/" VUE_APP_EXPOSES_URL=""

View File

@ -1,19 +0,0 @@
#开发环境
NODE_ENV:"development"
# 页面标题
VUE_APP_TITLE = 汉邦唐消防训练基地
# 网关地址
VUE_APP_GATEWAY_URL="/dev-api"
# UE4服务地址
VUE_APP_PALYER_URL="192.168.1.66:8080"
# 服务地址
VUE_APP_BASE_API_URL="http://192.168.2.3:8081"
# 服务前-- 请严格遵守格式 不允许换行
VUE_APP_SERVICE_PREFIX= '{"knowledge":"/knowledge","system":"/system"}'
# 是否显示全部菜单
VUE_APP_ALL_MENU = false
# 微前端地址
VUE_APP_REMOTES_URL="http://119.45.158.12/common/"
# 当前应用部署地址
VUE_APP_EXPOSES_URL="http://192.168.2.72:8081/"

View File

@ -5,7 +5,6 @@
"scripts": { "scripts": {
"serve": "vue-cli-service serve --mode development", "serve": "vue-cli-service serve --mode development",
"local": "vue-cli-service serve --mode developmentLocal --port 8084", "local": "vue-cli-service serve --mode developmentLocal --port 8084",
"serveGY": "vue-cli-service serve --mode developmentGY",
"build": "vue-cli-service build --mode production", "build": "vue-cli-service build --mode production",
"buildProdLocal": "vue-cli-service build --mode prodLocal", "buildProdLocal": "vue-cli-service build --mode prodLocal",
"buildProd": "vue-cli-service build --mode prod", "buildProd": "vue-cli-service build --mode prod",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4,8 +4,8 @@ import router from './router'
import store from './store' import store from './store'
import ElementUI from 'element-ui'; import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
import SvgComponent from "hbt-common/components/common/svg.component.vue" import SvgComponent from "hbt-common/components/svg.component.vue"
import EchartsComponent from "hbt-common/components/common/echarts.component.vue" import EchartsComponent from "hbt-common/components/echarts.component.vue"
import "@/assets/common/icons"; import "@/assets/common/icons";
import 'animate.css'; import 'animate.css';
import Mock from "mockjs" import Mock from "mockjs"

View File

@ -8,9 +8,7 @@
<div class="text-con flex-0"> <div class="text-con flex-0">
{{ viewRightData.data.content }} {{ viewRightData.data.content }}
</div> </div>
<h3 v-show="viewRightData.data.dataList.length>0" class="sub-title flex-0"> <h3 v-show="viewRightData.data.dataList.length>0" class="sub-title flex-0">模拟火情</h3>
{{ viewRightData.data.type==='info'?'设施介绍':'模拟火情' }}
</h3>
<div class="right-view-list view-right"> <div class="right-view-list view-right">
<div class="right-view-item d-flex align-items-center" :class="activeItem === i?'flow-light-box':''" @click="clickItem(item,i)" <div class="right-view-item d-flex align-items-center" :class="activeItem === i?'flow-light-box':''" @click="clickItem(item,i)"
v-for="(item,i) in viewRightData.data.dataList"> v-for="(item,i) in viewRightData.data.dataList">

View File

@ -933,16 +933,6 @@ export const treeData = [
data: { data: {
content: '油罐火灾事故处置训练设施是一种专门用于培训和演练消防人员进行油罐火灾事故处置能力的实景模拟设施。这种设施旨在提高消防人员在实际火灾事故中应对油罐火灾的技能和经验。', content: '油罐火灾事故处置训练设施是一种专门用于培训和演练消防人员进行油罐火灾事故处置能力的实景模拟设施。这种设施旨在提高消防人员在实际火灾事故中应对油罐火灾的技能和经验。',
dataList: [ dataList: [
{
id: Mock.mock("@id"),
title: '外浮顶罐介绍',
remark: '外浮顶罐介绍',
type: 'video',
model: 'video',
img: require('@/assets/img/view/密封圈火.png'),
info: require('@/assets/video/外浮顶罐.mp4'),
content: '外浮顶罐介绍'
},
{ {
id: Mock.mock("@id"), id: Mock.mock("@id"),
rate: 1, rate: 1,
@ -1456,16 +1446,6 @@ export const treeData = [
data: { data: {
content: '气罐火灾事故处置训练设施是一种专门用于培训和演练消防人员进行气罐火灾事故处置能力的实景模拟设施。这种设施旨在提高消防人员在实际火灾事故中应对油罐火灾的技能和经验。', content: '气罐火灾事故处置训练设施是一种专门用于培训和演练消防人员进行气罐火灾事故处置能力的实景模拟设施。这种设施旨在提高消防人员在实际火灾事故中应对油罐火灾的技能和经验。',
dataList: [ dataList: [
{
id: Mock.mock("@id"),
title: '球罐介绍',
remark: '球罐介绍',
type: 'video',
model: 'video',
img: require('@/assets/img/view/密封圈火.png'),
info: require('@/assets/video/球罐.mp4'),
content: '球罐介绍'
},
{ {
id: Mock.mock("@id"), id: Mock.mock("@id"),
rate: 1, rate: 1,
@ -2180,36 +2160,8 @@ export const treeData = [
], ],
data: { data: {
content: '模拟在密闭建筑物内发生火灾,消防员在高温、浓烟、高噪音的情况下进行火情侦察,寻找被困人员,救出被困人员,灭火抢险等战斗', content: '模拟在密闭建筑物内发生火灾,消防员在高温、浓烟、高噪音的情况下进行火情侦察,寻找被困人员,救出被困人员,灭火抢险等战斗',
type:'info',
dataList: [ dataList: [
{
id: Mock.mock("@id"),
title: '常减压装置',
remark: '常减压装置',
type: 'video',
model: 'video',
img: require('@/assets/img/view/初馏塔回流罐顶火.png'),
info: require('@/assets/video/常减压装置.mp4'),
content: '常减压装置介绍'
},{
id: Mock.mock("@id"),
title: '化工工艺步骤',
remark: '化工工艺步骤',
type: 'video',
model: 'video',
img: require('@/assets/img/view/初馏塔回流罐顶火.png'),
info: require('@/assets/video/化工工艺步骤.mp4'),
content: '化工工艺步骤'
},{
id: Mock.mock("@id"),
title: '工艺流程',
remark: '工艺流程',
type: 'video',
model: 'video',
img: require('@/assets/img/view/初馏塔回流罐顶火.png'),
info: require('@/assets/video/工艺流程.mp4'),
content: '工艺流程'
},
] ]
}, },
children: [] children: []

View File

@ -6,7 +6,7 @@ interface ActionResult<T> {
/** /**
* message: * message:
*/ */
msg: string; message: string;
/** /**
* data: * data:
*/ */

View File

@ -33,14 +33,14 @@ export default class OverViewComponent extends BaseComponent {
// 当前图层 // 当前图层
public warnTimer = {}; public warnTimer = {};
//定时器 //定时器
public timer: any = {}; public timer:any = {};
public currentLayers = [] as any; public currentLayers = [] as any;
// 是否展开图层 // 是否展开图层
public openLayerDrawer = false; public openLayerDrawer = false;
public currentCarPeople: any = {}; public currentCarPeople:any = {};
//展示导览右侧 //展示导览右侧
viewRightShow = false; viewRightShow = false;
@ -61,24 +61,20 @@ export default class OverViewComponent extends BaseComponent {
public showLoading = true public showLoading = true
public viewLayer = {} as any; public viewLayer = {} as any;
async created(){
async created() {
// this.currentLayers = this.getCurrentLayers(); // this.currentLayers = this.getCurrentLayers();
} }
public upDateEventList(){
public upDateEventList() {
const eventList = MockData.getEventList().data const eventList = MockData.getEventList().data
this.$store.commit("upDateEventList", eventList) this.$store.commit("upDateEventList",eventList)
} }
public getHiddenDangrous(){
public getHiddenDangrous() { this.parkService.getHiddenDangrous().then((res:any)=>{
this.parkService.getHiddenDangrous().then((res: any) => {
this.dataList["hidden-dangrous"] = res.data; this.dataList["hidden-dangrous"] = res.data;
this.$store.commit("setHiddenDangrousList", res.data) this.$store.commit("setHiddenDangrousList",res.data)
}) })
} }
// 地图初始化后 // 地图初始化后
public getMap(store: any) { public getMap(store: any) {
this.player = store; this.player = store;
@ -103,15 +99,15 @@ export default class OverViewComponent extends BaseComponent {
public handleChange(data) { public handleChange(data) {
console.log(data) console.log(data)
if (data.GroupID) { if(data.GroupID){
const currentData = (this.layerData.find(item => item.value === data.GroupID) as any).data.find(item => item.id === data.Id) const currentData = (this.layerData.find(item=>item.value === data.GroupID)as any).data.find(item=>item.id === data.Id)
if (data.GroupID === "peo") { if(data.GroupID==="peo"){
this.emitPersonPop(currentData) this.emitPersonPop(currentData)
} }
if (data.GroupID === "car") { if(data.GroupID==="car"){
this.emitCarPop(currentData) this.emitCarPop(currentData)
} }
if (data.GroupID === "video") { if(data.GroupID==="video"){
// this.openVideo(currentData) // this.openVideo(currentData)
} }
} }
@ -119,45 +115,43 @@ export default class OverViewComponent extends BaseComponent {
//展示人员详情 //展示人员详情
emitPersonPop(item) { emitPersonPop(item){
this.resetMap(); this.resetMap();
setTimeout(() => { setTimeout(()=>{
this.currentCarPeople = item; this.currentCarPeople = item;
this.player.api.marker.focus(item.id, 50, 2); this.player.api.marker.focus(item.id,50,2);
setTimeout(() => { setTimeout(()=>{
this.bigPopTitle = '人员信息卡'; this.bigPopTitle = '人员信息卡';
this.dialogVisibleForBigPop = true this.dialogVisibleForBigPop = true
}, 2000) },2000)
}, 1000) },1000)
} }
//展示车辆详情 //展示车辆详情
emitCarPop(item) { emitCarPop(item){
this.resetMap(); this.resetMap();
setTimeout(() => { setTimeout(()=>{
this.currentCarPeople = item; this.currentCarPeople = item;
this.player.api.marker.focus(item.id, 50, 2); this.player.api.marker.focus(item.id,50,2);
setTimeout(() => { setTimeout(()=>{
this.bigPopTitle = '车辆信息卡'; this.bigPopTitle = '车辆信息卡';
this.dialogVisibleForBigPop = true this.dialogVisibleForBigPop = true
}, 2000) },2000)
}, 1000) },1000)
} }
closeCarPersonPop(){
closeCarPersonPop() {
this.currentCarPeople = null; this.currentCarPeople = null;
} }
public navChange(data: string) { public navChange(data: string) {
this.currentNav = data; this.currentNav = data;
if (this.player) { if(this.player){
this.currentLayers = this.getCurrentLayers() this.currentLayers = this.getCurrentLayers()
if (this.currentEvent) { if(this.currentEvent ){
this.viewLayer[this.currentEvent.id].selected = false; this.viewLayer[this.currentEvent.id].selected = false;
this.addCustom(this.viewLayer[this.currentEvent.id], true); this.addCustom(this.viewLayer[this.currentEvent.id],true);
this.currentEvent = null; this.currentEvent = null;
} }
if (this.currentWanning) { if(this.currentWanning){
this.player.api.customObject.delete(this.currentWanning.id) this.player.api.customObject.delete(this.currentWanning.id)
} }
this.resetMap(); this.resetMap();
@ -179,7 +173,7 @@ export default class OverViewComponent extends BaseComponent {
fixedbtn.style.right = "540px"; fixedbtn.style.right = "540px";
layerBth.style.right = "440px"; layerBth.style.right = "440px";
// rightEl.classList.add("animate__slideInRight"); // rightEl.classList.add("animate__slideInRight");
rightEl.forEach(item => { rightEl.forEach(item=>{
item.classList.remove("animate__slideOutRight"); item.classList.remove("animate__slideOutRight");
item.classList.add("animate__slideInRight"); item.classList.add("animate__slideInRight");
}) })
@ -190,36 +184,36 @@ export default class OverViewComponent extends BaseComponent {
fixedbtn.style.right = "140px"; fixedbtn.style.right = "140px";
layerBth.style.right = "40px"; layerBth.style.right = "40px";
// rightEl.classList.add("animate__slideOutRight"); // rightEl.classList.add("animate__slideOutRight");
rightEl.forEach(item => { rightEl.forEach(item=>{
item.classList.remove("animate__slideInRight"); item.classList.remove("animate__slideInRight");
item.classList.add("animate__slideOutRight"); item.classList.add("animate__slideOutRight");
}) })
} }
} }
public toggleAllPanel() { public toggleAllPanel(){
this.hideAllPanel = !this.hideAllPanel; this.hideAllPanel = !this.hideAllPanel;
this.drawerChange(!this.hideAllPanel) this.drawerChange(!this.hideAllPanel)
if (!this.hideAllPanel) { if(!this.hideAllPanel){
this.showPlay = false this.showPlay = false
this.player.api.cameraTour.stop(); this.player.api.cameraTour.stop();
this.player.api.settings.setInteractiveMode(0) this.player.api.settings.setInteractiveMode(0)
} }
} }
public toggleHeight() { public toggleHeight(){
this.openLayerDrawer = !this.openLayerDrawer; this.openLayerDrawer = !this.openLayerDrawer;
} }
public toggleLayer(layer) { public toggleLayer(layer){
if (this.lock) { if(this.lock){
this.$message.error("视口未加载完成") this.$message.error("视口未加载完成")
return return
} }
layer.selected = !layer.selected; layer.selected = !layer.selected;
if (layer.type === "moveMarker") { if(layer.type === "moveMarker"){
this.addMarker(layer, true) this.addMarker(layer,true)
} else { }else{
this.toggleArea(layer) this.toggleArea(layer)
} }
} }
@ -229,12 +223,12 @@ export default class OverViewComponent extends BaseComponent {
// this.addWarnning(item) // this.addWarnning(item)
this.info = item this.info = item
if (this.waringRightShow) { if (this.waringRightShow){
this.waringRightShow = false this.waringRightShow = false
setTimeout(() => { setTimeout(()=>{
this.waringRightShow = true this.waringRightShow = true
}) })
} else { }else{
this.waringRightShow = true this.waringRightShow = true
} }
const position = item.position const position = item.position
@ -249,20 +243,17 @@ export default class OverViewComponent extends BaseComponent {
) )
} }
//定位坐标 //定位坐标
changePoint(item) { changePoint(item){
this.addWarnning(item) this.addWarnning(item)
} }
//关闭告警详情 //关闭告警详情
changeClose() { changeClose(){
this.waringRightShow = false this.waringRightShow = false
this.player.api.customObject.delete(this.currentWanning.id) this.player.api.customObject.delete(this.currentWanning.id)
} }
//进入自由导览 //进入自由导览
async showView() { async showView (){
this.toggleAllPanel(); this.toggleAllPanel();
await this.player.api.camera.lookAt( await this.player.api.camera.lookAt(
11660670.518125, 11660670.518125,
@ -273,87 +264,86 @@ export default class OverViewComponent extends BaseComponent {
85.199608, 85.199608,
2 2
) )
setTimeout(() => { setTimeout(()=>{
this.player.api.settings.setInteractiveMode(2); this.player.api.settings.setInteractiveMode(2);
this.player.api.settings.setMainUIVisibility(false) this.player.api.settings.setMainUIVisibility(false)
}, 2000) },2000)
//todo 进入自由导览 //todo 进入自由导览
} }
//展开导览右侧 //展开导览右侧
showViewRight(data) { showViewRight(data){
if (data.area) { if(data.area){
this.addArea(data) this.addArea(data)
} }
if (data.camera) { if(data.camera){
this.player.api.camera.lookAt(...data.camera) this.player.api.camera.lookAt(...data.camera)
} }
this.viewRightData = data; this.viewRightData = data;
this.viewRightShow = false this.viewRightShow = false
setTimeout(() => { setTimeout(()=>{
this.viewRightShow = true this.viewRightShow = true
}) })
} }
//右侧详情点击事件 //右侧详情点击事件
showDetail(item) { showDetail(item){
if (this.currentEvent) { debugger
if (this.currentEvent.id === item.id) { if(this.currentEvent){
if(this.currentEvent.id === item.id){
return return
} else { }else{
this.viewLayer[this.currentEvent.id].selected = false; this.viewLayer[this.currentEvent.id].selected = false;
this.addCustom(this.viewLayer[this.currentEvent.id], true); this.addCustom(this.viewLayer[this.currentEvent.id],true);
this.currentEvent = null; this.currentEvent = null;
} }
} }
if (item.type === 'video') { if(item.type === 'video'){
const currentData = (this.layerData.find(item => item.value === "video") as any).data.find(items => items.remark === item.title) const currentData = (this.layerData.find(item=>item.value === "video")as any).data.find(items=>items.remark === item.title)
this.openVideo(currentData ?? item) this.openVideo(currentData)
} else { }else{
if (!this.viewLayer[item.id]) { if(!this.viewLayer[item.id]){
const data = [] as any; const data = [] as any;
if (item.point > 1) { if(item.point>1){
for (let i = 0; i < item.point; i++) { for(let i = 0;i<item.point;i++){
data.push({ data.push({
id: item.id + '_' + i, id:item.id+'_'+i,
position: item.position[i], position:item.position[i],
rotation: item.rotation || [0, 90, 0], rotation:item.rotation || [0,90,0],
hasPop: item.hasPop && i === 1, hasPop:item.hasPop && i===1,
}) })
} }
} else { }else{
data.push({ data.push({
id: item.id, id:item.id,
position: item.position, position:item.position,
rotation: item.rotation || [0, 90, 0], rotation:item.rotation || [0,90,0],
hasPop: item.hasPop hasPop:item.hasPop
}) })
} }
this.viewLayer[item.id] = { this.viewLayer[item.id] = {
type: "moveMarker", type:"moveMarker",
assetPath: item.assetPath || "/JC_CustomAssets/ParticleLibrary/Exhibition/火/火焰_10", assetPath:item.assetPath || "/JC_CustomAssets/ParticleLibrary/Exhibition/火/火焰_10",
value: "fire", value:"fire",
popData: item, popData:item,
selected: true, selected:true,
scale: item.scale || [1, 1, 1], scale:item.scale || [1,1,1],
urls: [], urls:[],
ids: [], ids:[],
data, data,
} }
this.currentEvent = item; this.currentEvent = item;
} else { }else{
this.viewLayer[item.id].selected = !this.viewLayer[item.id].selected; this.viewLayer[item.id].selected = !this.viewLayer[item.id].selected;
if (this.viewLayer[item.id].selected) { if(this.viewLayer[item.id].selected){
this.currentEvent = item; this.currentEvent = item;
} }
} }
this.addCustom(this.viewLayer[item.id], item.hasPop); this.addCustom(this.viewLayer[item.id],item.hasPop);
} }
if (item.needFocus) { if(item.needFocus){
if (item.look) { if(item.look){
this.player.api.camera.lookAt( this.player.api.camera.lookAt(
item.look[0], item.look[0],
item.look[1], item.look[1],
@ -363,35 +353,33 @@ export default class OverViewComponent extends BaseComponent {
item.look[5], //yaw item.look[5], //yaw
2 2
) )
} else { }else{
this.player.api.customObject.focus(item.id, item.distance, 2) this.player.api.customObject.focus(item.id,item.distance,2)
} }
} }
} }
mounted() { mounted() {
} }
get showBackGround(){
get showBackGround() {
let flag = this.currentNav === 'view' && !this.viewRightShow let flag = this.currentNav === 'view' && !this.viewRightShow
return flag ? 'none' : '' return flag?'none':''
} }
public getCurrentLayers() { public getCurrentLayers(){
const layers = [] as any; const layers = [] as any;
this.layerData.forEach(async (item: any) => { this.layerData.forEach(async (item:any)=>{
if (!item.data) { if(!item.data){
item.data = (await item.init()).data item.data = (await item.init()).data
} }
if (item.pages.includes(this.currentNav)) { if(item.pages.includes(this.currentNav)){
if (!item.selected) { if(!item.selected){
this.toggleLayer(item) this.toggleLayer(item)
} }
layers.push(item) layers.push(item)
} else { }else{
if (item.selected) { if(item.selected){
this.toggleLayer(item) this.toggleLayer(item)
} }
} }
@ -400,79 +388,74 @@ export default class OverViewComponent extends BaseComponent {
} }
//进入路线导览 //进入路线导览
playView(item) { playView(item){
this.toggleAllPanel() this.toggleAllPanel()
this.layerData.forEach(item => { this.layerData.forEach(item=>{
if (item.selected) { if(item.selected){
this.toggleLayer(item) this.toggleLayer(item)
} }
}) })
this.showPlay = true this.showPlay = true
this.player.api.cameraTour.play(item.id) this.player.api.cameraTour.play(item.id)
} }
closeRight(){
closeRight() {
this.viewRightShow = false; this.viewRightShow = false;
const dom = document.querySelector('div.is-current') as any; const dom = document.querySelector('div.is-current') as any;
if (dom) { if (dom){
dom.classList.remove('is-current') dom.classList.remove('is-current')
} }
if (this.currentEvent) { if(this.currentEvent ){
this.viewLayer[this.currentEvent.id].selected = false; this.viewLayer[this.currentEvent.id].selected = false;
this.addCustom(this.viewLayer[this.currentEvent.id], true); this.addCustom(this.viewLayer[this.currentEvent.id],true);
this.currentEvent = null; this.currentEvent = null;
} }
} }
//暂停继续 //暂停继续
playAction(type) { playAction(type){
this.player.api.cameraTour[type]() this.player.api.cameraTour[type]()
} }
// 打开摄像头 // 打开摄像头
openVideo(item) { openVideo(item){
// this.resetMap(); this.resetMap();
setTimeout(() => { setTimeout(()=>{
// this.player.api.marker.focus(item.id,20,2) // this.player.api.marker.focus(item.id,20,2)
if (item.model === 'video') { if(item.model === 'video'){
setTimeout(() => { setTimeout(()=>{
layer.open({ layer.open({
type: 1, type:1,
shade: 0, shade:0,
title: item.remark, title:item.remark,
content: `<div class="customClass"> content:`<div class="customClass">
<video src="${item.info}" controls style="width:100%" autoplay></video> <video src="${item.info}" controls style="width:100%" autoplay></video>
</div>` </div>`
}) })
}, 500) },2000)
} else { }else{
setTimeout(() => { setTimeout(()=>{
layer.open({ layer.open({
type: 1, type:1,
shade: 0, shade:0,
title: item.remark, title:item.remark,
content: `<div class="customClass"><div content:`<div class="customClass"><div
style=" style="
background: #0000008c; background: #0000008c;
color: #ffffff; color: #ffffff;
font-size: 12px; font-size: 12px;
padding: 10px; padding: 10px;
line-height: 2; line-height: 2;
white-space: pre-wrap; white-space: pre-wrap;
" "
>${item.info}</div></div>` >${item.info}</div></div>`
}) })
}, 1000) },2000)
} }
}, 100) },1000)
} }
deactivated(){
deactivated() {
// //
} }
beforeDestory() { beforeDestory() {
if (this.player) { if (this.player) {
this.player = null this.player = null