Browse Source

1.修改飞入参数

2.修改监控杆加载地址
master
DIAMOND 1 year ago
parent
commit
576b9a8eb5
  1. 15
      src/views/earthMap/edit/EarthComp.vue
  2. 5
      src/views/military/modules/earthMap/scene/SceneManage.vue
  3. 4
      src/views/military/modules/earthMap/scene/model/Modal.vue
  4. 5
      src/views/military/modules/earthMap/scene/model/sceneInfo/SenceInfo.vue

15
src/views/earthMap/edit/EarthComp.vue

@ -862,7 +862,8 @@
if (!(data instanceof Array)) { if (!(data instanceof Array)) {
// debugger; // debugger;
// //
position = [data.lon, data.lat, data.altitude]; // position = [data.lon, data.lat, data.altitude];
position = [data.cameraLon, data.cameraLat, data.cameraAltitude];
rotation = [data.rotationX, data.rotationY, data.rotationZ]; rotation = [data.rotationX, data.rotationY, data.rotationZ];
viewDistance = data.viewDistance; viewDistance = data.viewDistance;
duration = data.duration ? data.duration : 0; duration = data.duration ? data.duration : 0;
@ -873,7 +874,8 @@
}; };
} else { } else {
// //
position = [parentData[0].lon, parentData[0].lat, parentData[0].altitude]; // position = [parentData[0].lon, parentData[0].lat, parentData[0].altitude];
position = [parentData[0].cameraLon, parentData[0].cameraLat, parentData[0].cameraAltitude];
rotation = [parentData[0].rotationX, parentData[0].rotationY, parentData[0].rotationZ]; rotation = [parentData[0].rotationX, parentData[0].rotationY, parentData[0].rotationZ];
viewDistance = parentData[0].viewDistance; viewDistance = parentData[0].viewDistance;
duration = parentData[0].duration; duration = parentData[0].duration;
@ -1639,13 +1641,16 @@
} }
let fileInfos = data.modelUrl.split('.'); let fileInfos = data.modelUrl.split('.');
if (num == 0) { if (num == 0) {
gltfStr = window._CONFIG['domianURL'] + '/sys/common/static/' + fileInfos[0] + '.' + fileInfos[1]; // gltfStr = window._CONFIG['domianURL'] + '/sys/common/static/' + fileInfos[0] + '.' + fileInfos[1];
gltfStr = '/dt/sys/common/static/' + fileInfos[0] + '.' + fileInfos[1];
} else if (num < data.msCameraSettingList.length) { } else if (num < data.msCameraSettingList.length) {
let newName = fileInfos[0].substring(0, fileInfos[0].length - 1) + 'R'; let newName = fileInfos[0].substring(0, fileInfos[0].length - 1) + 'R';
gltfStr = window._CONFIG['domianURL'] + '/sys/common/static/' + newName + '.' + fileInfos[1]; // gltfStr = window._CONFIG['domianURL'] + '/sys/common/static/' + newName + '.' + fileInfos[1];
gltfStr = '/dt/sys/common/static/' + newName + '.' + fileInfos[1];
} else if (num == data.msCameraSettingList.length) { } else if (num == data.msCameraSettingList.length) {
let newName = fileInfos[0].substring(0, fileInfos[0].length - 1) + 'Y'; let newName = fileInfos[0].substring(0, fileInfos[0].length - 1) + 'Y';
gltfStr = window._CONFIG['domianURL'] + '/sys/common/static/' + newName + '.' + fileInfos[1]; // gltfStr = window._CONFIG['domianURL'] + '/sys/common/static/' + newName + '.' + fileInfos[1];
gltfStr = '/dt/sys/common/static/' + newName + '.' + fileInfos[1];
} }
const modelConfig = { const modelConfig = {
ref: data.id, ref: data.id,

5
src/views/military/modules/earthMap/scene/SceneManage.vue

@ -372,7 +372,7 @@
const sceneType = item.sceneType; const sceneType = item.sceneType;
const parentSceneCode = item.parentSceneCode; const parentSceneCode = item.parentSceneCode;
parentCodeArr.value.push(sceneCode); parentCodeArr.value.push(sceneCode);
const cxyz = [item.cameraLon, item.cameraLon, item.cameraLon]; const cxyz = [item.cameraLon, item.cameraLat, item.cameraAltitude];
const xyz = [item.lon, item.lat, item.altitude]; const xyz = [item.lon, item.lat, item.altitude];
const rxyz = [item.rotationX, item.rotationY, item.rotationZ]; const rxyz = [item.rotationX, item.rotationY, item.rotationZ];
const distance = item.viewDistance; const distance = item.viewDistance;
@ -572,7 +572,7 @@
// //
const addScene = function () { const addScene = function () {
//0 //0
console.log(treeData.value, selectedKeys.value); // console.log(treeData.value, selectedKeys.value);
if (treeData.value.length > 0 && selectedKeys.value.length == 0) { if (treeData.value.length > 0 && selectedKeys.value.length == 0) {
message.warn('请先选中场景,再进行新增!'); message.warn('请先选中场景,再进行新增!');
return; return;
@ -597,6 +597,7 @@
} }
if (doType === 'edit') { if (doType === 'edit') {
doItem.value = item; doItem.value = item;
// console.log("doItem",item);
visible.value = true; visible.value = true;
} else if (doType === 'delete') { } else if (doType === 'delete') {
const formData = new FormData(); const formData = new FormData();

4
src/views/military/modules/earthMap/scene/model/Modal.vue

@ -87,8 +87,8 @@
subObject.value.cameraAltitude = 0; subObject.value.cameraAltitude = 0;
} else { } else {
subObject.value.cameraLon = editInfo.value.cxyz[0]; subObject.value.cameraLon = editInfo.value.cxyz[0];
subObject.value.cameraLat = editInfo.value.cxyz[0]; subObject.value.cameraLat = editInfo.value.cxyz[1];
subObject.value.cameraAltitude = editInfo.value.cxyz[0]; subObject.value.cameraAltitude = editInfo.value.cxyz[2];
} }
subObject.value.id = editInfo.value.id; subObject.value.id = editInfo.value.id;
} else { } else {

5
src/views/military/modules/earthMap/scene/model/sceneInfo/SenceInfo.vue

@ -181,8 +181,11 @@
}); });
// //
const moveChinaPosition = function () { const moveChinaPosition = function () {
// console.log('moveChinaPosition',subObject.value);
window.earth.camera.fov = subObject.value.viewDistance; window.earth.camera.fov = subObject.value.viewDistance;
window.earth.camera.position = [subObject.value.lon, subObject.value.lat, subObject.value.altitude]; // window.earth.camera.position = [subObject.value.lon, subObject.value.lat, subObject.value.altitude];
//
window.earth.camera.position = [subObject.value.cameraLon, subObject.value.cameraLat, subObject.value.cameraAltitude];
window.earth.camera.rotation = [subObject.value.rotationX, subObject.value.rotationY, subObject.value.rotationZ]; window.earth.camera.rotation = [subObject.value.rotationX, subObject.value.rotationY, subObject.value.rotationZ];
}; };

Loading…
Cancel
Save