Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3607804
  • 博文数量: 365
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2522
  • 用 户 组: 普通用户
  • 注册时间: 2019-10-28 13:40
文章分类

全部博文(365)

文章存档

2023年(8)

2022年(130)

2021年(155)

2020年(50)

2019年(22)

我的朋友

分类: Python/Ruby

2022-09-30 12:00:09

// The Vue build version to load with the `import` command

// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import Vue from 'vue'

import App from './App'

import router from './router'

//import ViewUI from 'view-design';

//import 'view-design/dist/styles/iview.css';

Vue.config.productionTip = false;

/* eslint-disable no-new */

// XE.ready()用来加载Cesium.js等相关资源

XE.ready().then(() => {

    // 加载标绘插件

    return XE.HTML.loadJS('../static/XbsjEarth-Plugins/plottingSymbol/plottingSymbol.js');

}).then(() => {

    // 加载标绘插件

    return XE.HTML.loadJS('../static/XbsjEarth-Plugins/customPrimitive/customPrimitive.js');

}).then(() => {

    // vtxf g_app赋值,方便调试

    window.g_app = new Vue({

        el: '#app',

        router,

        data() {

            return {

                currentArea: 'china',

                mousemoveArea: '',

                //修改 currentDay currentTime 表示整形,DataServer的所有数据查询接口 具有 ut 参数,表示查询的截至时间, 0 表示取{BANNED}最佳新值

                currentTime: new Date().getTime(),

                intervalID: undefined

            }

        },

        components: {

            App

        },

        template: '',

        mounted() {

            this.startGlobeUpdate();

        },

        methods: {

            startGlobeUpdate() {

                this.currentTime = new Date().getTime();

                if (!this.intervalID) {

                    var self = this;

                    this.intervalID = setInterval(() => {

                        self.currentTime = new Date().getTime();

                        console.log('globe update', self.currentTime);

                    }, 60000);

                }

            },

            stopGlobeUpdate() {

                if (this.intervalID) {

                    clearInterval(this.intervalID);

                    this.intervalID = undefined;

                }

            }

        }

    })

});

    

    

    

    起步">

    </span><span style="font-family:宋体;">创建地球</span><span style="font-family:Calibri;">

    

    

    

    

    

    

    

    

    

    

    

阅读(795) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~