增加三维客流加载

This commit is contained in:
sunleking 2020-11-13 21:48:52 +08:00
parent 44abae132e
commit dd3de164d0
3 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,10 @@
import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js'; import { BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
import store from '@/store/index_APP_TARGET';
//模型管理器 //模型管理器
let mode = "0"; let mode = "0";
export function ModelManager(){ export function ModelManager(){
let scope = this; let scope = this;
this.man1 = { this.man1 = {
code:null, code:null,
locateType:"01", locateType:"01",
@ -100,6 +102,7 @@ export function ModelManager(){
Promise.all(initlist).then((result) => { Promise.all(initlist).then((result) => {
console.log("success"); console.log("success");
store.dispatch('app/animationsClose');
resolve("success"); //['成功了', 'success'] resolve("success"); //['成功了', 'success']
}).catch((error) => { }).catch((error) => {
//console.log(error); //console.log(error);
@ -113,11 +116,8 @@ export function ModelManager(){
function fbxpromise(asset,mixers,model){ function fbxpromise(asset,mixers,model){
return new Promise(function(resolve, reject){ return new Promise(function(resolve, reject){
var loader = new THREE.FBXLoader(); var loader = new THREE.FBXLoader();
if( mode == "2"){ if( mode == "2"){
loader.load( asset.url, function ( object ) { loader.load( asset.url, function ( object ) {
model.mesh = object; model.mesh = object;
resolve(asset.deviceType); resolve(asset.deviceType);

View File

@ -57,7 +57,7 @@ export default {
group:'', group:'',
mapId:'', mapId:'',
lineCode:'', lineCode:'',
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts'] loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts','bjd']
}; };
}, },
computed: { computed: {

View File

@ -105,7 +105,7 @@
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import { Jl3dTrafficTrain } from '@/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js'; import { Jl3dTrafficTrain } from '@/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js';
import { ProjectIcon, loginInfo } from '@/scripts/ProjectConfig';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'; import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
export default { export default {
name: 'TrafficTrain', name: 'TrafficTrain',
@ -135,7 +135,7 @@ export default {
value:'', value:'',
isCctv:true, isCctv:true,
allPassers:0, allPassers:0,
loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts'] loadingProjectList: ['login', 'design', 'xty', 'designxty', 'gzb', 'designxty', 'xadt', 'designxadt', 'drts', 'designdrts','bjd']
}; };
}, },
computed: { computed: {