| | |
| | | # 页颿 é¢ |
| | | VUE_APP_TITLE = æ³°ç工䏿°ååªç管çå¹³å° |
| | | VUE_APP_TITLE = 山西é
ç½ |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | ENV = 'development' |
| | |
| | | # 页颿 é¢ |
| | | VUE_APP_TITLE = FastBeeç©èç½ |
| | | VUE_APP_TITLE = 山西é
ç½ |
| | | |
| | | # ç产ç¯å¢é
ç½® |
| | | ENV = 'production' |
| | |
| | | # 页颿 é¢ |
| | | VUE_APP_TITLE = æ³°ç工䏿°ååªç管çå¹³å° |
| | | VUE_APP_TITLE = 山西é
ç½ |
| | | |
| | | NODE_ENV = production |
| | | |
| | |
| | | // æ°æ®åæç«¯å£ |
| | | const pyHost = isWeb ? isUrl + ":9036" : isUrl + ":8000"; |
| | | //ragç«¯å£ |
| | | const ragHost = isWeb ? isUrl + ":9036" : "192.168.11.95:8080"; |
| | | const ragHost = isWeb ? isUrl + ":9036" : "192.168.11.24:8103"; |
| | | // æ¬å°æ°æ®å°å |
| | | const pwythHost = "http://localhost/pwyth"; |
| | | const pwythHost = "http://192.168.11.95:8888/pwyth"; |
| | | //é
ç½® |
| | | const config = { |
| | | // serveræå¡ |
| | |
| | | //æ°æ®åææ¥å£ |
| | | pyServices: "http://" + pyHost + "/py", |
| | | //ragæå¡å°å |
| | | ragServices: "http://" + ragHost+ "/api/vi", |
| | | // ragServices: "http://" + ragHost+ "/api/vi", |
| | | ragServices: "http://" + ragHost+ "/rag_sxdw/api/vi", |
| | | imageUrl: "", |
| | | // sdkæ¾ç¤º |
| | | sdkImg: host + "/CimSDK/", |
| | |
| | | <meta name="renderer" content="webkit"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> |
| | | <link rel="icon" href="<%= BASE_URL %>logo.png"> |
| | | <script src="./config/config.js"></script> |
| | | <script src="/config/config.js"></script> |
| | | <script src="./CimSDK/Workers/jquery-3.5.0.min.js"></script> |
| | | <script src="./CimSDK/Workers/layui/layui.js"></script> |
| | | <script src="./CimSDK/CimSDK.min.js"></script> |
| | |
| | | import mapConfig from './mapConfig'; |
| | | import mapData from './mapData'; |
| | | import mapServer from './mapServe'; |
| | | import * as turf from '@turf/turf'; |
| | | import store from '@/store'; |
| | | import mapConfig from "./mapConfig"; |
| | | import mapData from "./mapData"; |
| | | import mapServer from "./mapServe.js"; |
| | | import * as turf from "@turf/turf"; |
| | | import store from "@/store"; |
| | | const mapInit = { |
| | | async Init() { |
| | | window.earthCtrl = new SmartEarth.EarthCtrl('sdkContainer', { |
| | | // éèé»è®¤åºå¾ |
| | | defaultImagery: false, |
| | | // éèlogo |
| | | printLog: false, |
| | | // sceneMode: SmartEarth.Cesium.SceneMode.SCENE2D |
| | | StaticFileBaseUrl: '/CimSDK/', |
| | | }); |
| | | // åå§åCesium |
| | | window.Cesium = SmartEarth.Cesium; |
| | | // åå§åViewer |
| | | window.Viewer = earthCtrl.viewer; |
| | | //设置å°çé¢è² |
| | | Viewer.scene.globe.baseColor = Cesium.Color.fromCssColorString('#A9A9A9'); |
| | | Viewer.imageryLayers.removeAll() |
| | | // å°å½¢å è½½ |
| | | const terrain = config.terrain; |
| | | if (terrain.isShow && terrain.isUrl) { |
| | | const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(terrain.isUrl, { |
| | | requestWaterMask: true, |
| | | requestVertexNormals: true, |
| | | async Init() { |
| | | // é»è®¤è®¾ç½®åºå¾ |
| | | this.addImageLayer(); |
| | | // æ·»å é¼ æ ç¹å»äºä»¶ |
| | | this.addMapClick(); |
| | | |
| | | // window.earthCtrl = new SmartEarth.EarthCtrl( |
| | | // 'sdkContainer', |
| | | // { |
| | | // // éèé»è®¤åºå¾ |
| | | // defaultImagery: false, |
| | | // // éèlogo |
| | | // printLog: false, |
| | | // // sceneMode: SmartEarth.Cesium.SceneMode.SCENE2D |
| | | // StaticFileBaseUrl: '/CimSDK/', |
| | | // }, |
| | | // {}, |
| | | // {}, |
| | | // () => { |
| | | // debugger |
| | | // // åå§åCesium |
| | | // window.Cesium = SmartEarth.Cesium; |
| | | // // åå§åViewer |
| | | // window.Viewer = window.earthCtrl.Viewer; |
| | | // //设置å°çé¢è² |
| | | // window.Viewer.scene.globe.baseColor = Cesium.Color.fromCssColorString('#A9A9A9'); |
| | | // window.earthCtrl.Viewer.imageryLayers.removeAll(); |
| | | // // // å°å½¢å è½½ |
| | | // // const terrain = config.terrain; |
| | | // // if (terrain.isShow && terrain.isUrl) { |
| | | // // const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(terrain.isUrl, { |
| | | // // requestWaterMask: true, |
| | | // // requestVertexNormals: true, |
| | | // // }); |
| | | |
| | | // // window.Viewer.terrainProvider = terrainProvider; |
| | | // // } |
| | | // this.setStartViwer(); |
| | | // } |
| | | // ); |
| | | }, |
| | | // async setStartViwer() { |
| | | // // Viewer.scene.screenSpaceCameraController.maximumZoomDistance =50000 |
| | | // // é»è®¤è®¾ç½®åºå¾ |
| | | // this.addImageLayer(); |
| | | // // æ·»å é¼ æ ç¹å»äºä»¶ |
| | | // this.addMapClick(); |
| | | // }, |
| | | addImageLayer() { |
| | | const baseLayer = mapData.baseLayer; |
| | | // æ·»å 天å°å¾åºå¾ |
| | | // mapServer.addLayer({ |
| | | // serveType: 'tdMap', |
| | | // url: baseLayer.sUrl + baseLayer.vecLayer + baseLayer.lUrl, |
| | | // }); |
| | | console.log(config.geoServer); |
| | | // console.log(mapServer); |
| | | // mapServer.addLayer({ |
| | | // serveType: "WMS", |
| | | // url: |
| | | // }); |
| | | const serverUrl = config.geoServer; |
| | | const layer = new Cesium.WebMapServiceImageryProvider({ |
| | | url:serverUrl.url + serverUrl.wms, |
| | | layers: serverUrl.layers[1], |
| | | parameters: { |
| | | transparent: true, |
| | | format: 'image/png', |
| | | srs: 'EPSG:4490', |
| | | styles: '', |
| | | cql_filter: '', |
| | | }, |
| | | tileWidth: 512, |
| | | tileHeight: 512, |
| | | }); |
| | | |
| | | window.Viewer.imageryLayers.addImageryProvider(layer); |
| | | // æ·»å 天å°å¾æ 注 |
| | | // mapServer.addLayer({ |
| | | // serveType: 'tdMap', |
| | | // url: baseLayer.sUrl + baseLayer.cvaLayer + baseLayer.lUrl, |
| | | // }); |
| | | |
| | | // åå§åè§è§ |
| | | this.setdefaultPerspective(); |
| | | }, |
| | | setdefaultPerspective() { |
| | | mapConfig.sertCameraTo(mapData.defaultPerspective); |
| | | }, |
| | | addMapClick() { |
| | | // 为vieweræ·»å é¼ æ ç¹å»äºä»¶çå¬ |
| | | window.Viewer.screenSpaceEventHandler.setInputAction(event => { |
| | | // è·åç¹å»ä½ç½®çä¸çåæ |
| | | var pickedFeature = window.Viewer.scene.pick(event.position); |
| | | if (Cesium.defined(pickedFeature)) { |
| | | console.log(pickedFeature); |
| | | if (pickedFeature.id) { |
| | | const obj = pickedFeature.id; |
| | | var arr = []; |
| | | for (var key in obj) { |
| | | arr.push({ |
| | | name: key, |
| | | val: obj[key] |
| | | }); |
| | | |
| | | Viewer.terrainProvider = terrainProvider; |
| | | } |
| | | // Viewer.scene.screenSpaceCameraController.maximumZoomDistance =50000 |
| | | // é»è®¤è®¾ç½®åºå¾ |
| | | this.addImageLayer(); |
| | | // æ·»å é¼ æ ç¹å»äºä»¶ |
| | | this.addMapClick(); |
| | | }, |
| | | addImageLayer() { |
| | | const baseLayer = mapData.baseLayer; |
| | | // æ·»å 天å°å¾åºå¾ |
| | | // mapServer.addLayer({ |
| | | // serveType: 'tdMap', |
| | | // url: baseLayer.sUrl + baseLayer.vecLayer + baseLayer.lUrl, |
| | | // }); |
| | | |
| | | mapServer.addLayer({ |
| | | serveType: 'WMS', |
| | | url: config.geoServer.layers[1], |
| | | }); |
| | | // æ·»å 天å°å¾æ 注 |
| | | // mapServer.addLayer({ |
| | | // serveType: 'tdMap', |
| | | // url: baseLayer.sUrl + baseLayer.cvaLayer + baseLayer.lUrl, |
| | | // }); |
| | | // åå§åè§è§ |
| | | this.setdefaultPerspective(); |
| | | }, |
| | | setdefaultPerspective() { |
| | | mapConfig.sertCameraTo(mapData.defaultPerspective); |
| | | }, |
| | | addMapClick() { |
| | | // 为vieweræ·»å é¼ æ ç¹å»äºä»¶çå¬ |
| | | Viewer.screenSpaceEventHandler.setInputAction((event) => { |
| | | // è·åç¹å»ä½ç½®çä¸çåæ |
| | | var pickedFeature = Viewer.scene.pick(event.position); |
| | | if (Cesium.defined(pickedFeature)) { |
| | | console.log(pickedFeature); |
| | | if (pickedFeature.id) { |
| | | const obj = pickedFeature.id; |
| | | var arr=[]; |
| | | for(var key in obj){ |
| | | arr.push({ |
| | | name: key, |
| | | val: obj[key], |
| | | }); |
| | | store.dispatch('mapLayers/changeMapInfo', []); |
| | | if (arr.length > 0) { |
| | | store.dispatch('mapLayers/changeMapInfo', arr); |
| | | } |
| | | } |
| | | } |
| | | store.dispatch("mapLayers/changeMapInfo", []); |
| | | if (arr.length > 0) { |
| | | store.dispatch("mapLayers/changeMapInfo", arr); |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | } |
| | | }; |
| | | export default mapInit; |
| | |
| | | import mapConfig from './mapConfig'; |
| | | import mapConfig from './mapConfig.js'; |
| | | import { zhangzitou_selectAll } from '@/api/mapView/map.js'; |
| | | import WKT from 'terraformer-wkt-parser'; |
| | | import store from '@/store'; |
| | | |
| | | // æå¡å è½½ |
| | | const mapServer = { |
| | | serveType: null, |
| | | layerList: [], |
| | | addLayer(res) { |
| | | |
| | | const obj = this.getLayerChecked(res); |
| | | if (obj) return; |
| | | this.serveType = res.serveType; |
| | |
| | | const cnName = res.cnName + '_' + res.id; |
| | | const modelLayer = new Cesium.PrimitiveCollection(); |
| | | modelLayer.name = cnName; |
| | | Viewer.scene.primitives.add(modelLayer); |
| | | window.Viewer.scene.primitives.add(modelLayer); |
| | | pois.map((item) => { |
| | | var geom = WKT.parse(item.geom).coordinates; |
| | | const terrain = config.terrain; |
| | |
| | | }, |
| | | addTerrainGLB(item, geom, modelLayer) { |
| | | var positions = [Cesium.Cartographic.fromDegrees(geom[0], geom[1])]; |
| | | var promise = Cesium.sampleTerrainMostDetailed(Viewer.terrainProvider, positions); |
| | | var promise = Cesium.sampleTerrainMostDetailed(window.Viewer.terrainProvider, positions); |
| | | promise.then((updatedPositions) => { |
| | | var terrainHeight = updatedPositions[0].height; |
| | | var style = { |
| | |
| | | |
| | | addTdLayer(res) { |
| | | const url = res.url + config.tdToken; |
| | | Viewer.imageryLayers.addImageryProvider( |
| | | window.Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: url, |
| | | }) |
| | |
| | | }, |
| | | addWMSLayer(res) { |
| | | const serverUrl = config.geoServer; |
| | | const that = this; |
| | | const that = this; |
| | | var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat('html', null, function (html) { |
| | | that.getFeatureInfo(html); |
| | | }); |
| | |
| | | tileHeight: 512, |
| | | }); |
| | | |
| | | const imageLayer = Viewer.imageryLayers.addImageryProvider(layer); |
| | | const imageLayer = window.Viewer.imageryLayers.addImageryProvider(layer); |
| | | const cnName = res.cnName + '_' + res.id; |
| | | imageLayer.name = cnName; |
| | | imageLayer.id = res.id; |
| | |
| | | if (res.bak) { |
| | | height = JSON.parse(res.bak).height; |
| | | } |
| | | var model = earthCtrl.factory.create3DTilesets({ |
| | | var model = window.earthCtrl.factory.create3DTilesets({ |
| | | url: url, |
| | | option: { |
| | | height: height, |
| | |
| | | this.layerList.map((item, index) => { |
| | | if (cnName == item.name && res.id == item.id) { |
| | | if (item.serveType == 'WMS') { |
| | | Viewer.imageryLayers.remove(item.layer); |
| | | window.Viewer.imageryLayers.remove(item.layer); |
| | | this.layerList.splice(index, 1); |
| | | } else if (item.serveType == 'Tileset') { |
| | | item.layer.deleteObject(); |
| | | this.layerList.splice(index, 1); |
| | | } else if (item.serveType == 'WFS') { |
| | | Viewer.scene.primitives.remove(item.layer); |
| | | window.Viewer.scene.primitives.remove(item.layer); |
| | | this.layerList.splice(index, 1); |
| | | } |
| | | } |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$store.dispatch('LogOut').then(() => { |
| | | location.href = '/index'; |
| | | location.href = '/'; |
| | | }) |
| | | }).catch(() => { }); |
| | | } |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'TerraDT', |
| | | title: '山西é
ç½', |
| | | logo: logoImg |
| | | } |
| | | } |
| | |
| | | children: [ |
| | | { |
| | | path: 'index', |
| | | component: () => import('@/views/index'), |
| | | // component: () => import('@/views/index'), |
| | | component: () => import('@/views/visual/mapView/index.vue'), |
| | | name: 'Index', |
| | | meta: { title: 'é¦é¡µ', icon: 'dashboard', affix: true }, |
| | | }, |
| | |
| | | }; |
| | | |
| | | export default new Router({ |
| | | mode: 'history', // 廿urlä¸ç# |
| | | // mode: 'history', // 廿urlä¸ç# |
| | | scrollBehavior: () => ({ y: 0 }), |
| | | routes: constantRoutes, |
| | | }); |
| | |
| | | return (resolve) => require([`@/views/${view}`], resolve) |
| | | } else { |
| | | // ä½¿ç¨ import å®ç°ç产ç¯å¢çè·¯ç±æå è½½ |
| | | return () => import(`@/views/${view}`) |
| | | // return () => import(`@/views/${view}`) |
| | | return (resolve) => require([`@/views/${view}`], resolve) |
| | | } |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="login"> |
| | | <el-row> |
| | | <el-col :xs="24"> |
| | | <div style="color: #fff; background-color: #0f73ee; width: 100%; height: 200px; text-align: center; padding: 15px; font-family: '微软é
é»'"> |
| | | <div style="font-size: 42px; padding-top: 40px; width: 400px; margin: 0 auto"> |
| | | <div class="logoImg"></div> |
| | | <!-- <img :src="logo" alt="logo" style="width: 100px; height: 100px; float: left" /> --> |
| | | <div style="float: left; margin-top: 13px; width: 300px; text-align: left"> |
| | | <div>山西é
ç½</div> |
| | | <div style="letter-spacing: 1.5px; font-size: 20px; font-weight: 600; margin-top: -8px; margin-left: 3px">山西é
ç½</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> |
| | | <!-- <div style="margin-bottom: 10px; font-size: 14px; font-family: '微软é
é»'; color: #f78e21">æ¼ç¤ºè´¦å·ï¼fastbee 123456</div> --> |
| | | <el-form-item prop="username" > |
| | | <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="è´¦å·"> |
| | | <svg-icon slot="prefix" icon-class="user" class="input-icon" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="password"> |
| | | <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="å¯ç " @keyup.enter.native="handleLogin"> |
| | | <svg-icon slot="prefix" icon-class="password" class="input-icon" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="captchaOnOff" prop="code"> |
| | | <el-input v-model="loginForm.code" auto-complete="off" placeholder="éªè¯ç " style="width: 63%" @keyup.enter.native="handleLogin"> |
| | | <svg-icon slot="prefix" icon-class="validCode" class="input-icon" /> |
| | | </el-input> |
| | | |
| | | <div class="login-code"> |
| | | <img :src="codeUrl" @click="getCode" /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px; color: #000">è®°ä½å¯ç </el-checkbox> |
| | | |
| | | <el-form-item style="width: 100%"> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleLogin"> |
| | | <span v-if="!loading">ç» å½</span> |
| | | <span v-else>ç» å½ ä¸...</span> |
| | | </el-button> |
| | | <el-button v-else :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleBind"> |
| | | <span v-if="!loading">ç» å®</span> |
| | | <span v-else>ç» å® ä¸...</span> |
| | | </el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- åºé¨ --> |
| | | <div class="el-login-footer"> |
| | | <span> |
| | | Copyright © 2004ï¼2023 |
| | | <a target="_blank" href="https://www.smartearth.cn/">SmartEarth</a> |
| | | All Rights Reserved. |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import 'element-ui/lib/theme-chalk/display.css'; |
| | | import logo from '@/assets/logo/logo.png'; |
| | | import { getCodeImg, checkBindId, getErrorMsg, socialLogin, bindLogin } from '@/api/login'; |
| | | import Cookies from 'js-cookie'; |
| | | import { encrypt, decrypt } from '@/utils/jsencrypt'; |
| | | import { setToken } from '@/utils/auth'; |
| | | |
| | | export default { |
| | | name: 'Login', |
| | | data() { |
| | | return { |
| | | logo, |
| | | codeUrl: '', |
| | | loginForm: { |
| | | username: '', |
| | | password: '', |
| | | rememberMe: false, |
| | | code: '', |
| | | uuid: '', |
| | | bindId: '', |
| | | // loginId: '', |
| | | }, |
| | | loginRules: { |
| | | username: [ |
| | | { |
| | | required: true, |
| | | trigger: 'blur', |
| | | message: '请è¾å
¥æ¨çè´¦å·', |
| | | }, |
| | | ], |
| | | password: [ |
| | | { |
| | | required: true, |
| | | trigger: 'blur', |
| | | message: '请è¾å
¥æ¨çå¯ç ', |
| | | }, |
| | | ], |
| | | code: [ |
| | | { |
| | | required: true, |
| | | trigger: 'change', |
| | | message: '请è¾å
¥éªè¯ç ', |
| | | }, |
| | | ], |
| | | }, |
| | | loading: false, |
| | | // éªè¯ç å¼å
³ |
| | | captchaOnOff: true, |
| | | bindAccount: false, |
| | | // 注åå¼å
³ |
| | | register: true, |
| | | redirect: undefined, |
| | | }; |
| | | }, |
| | | watch: { |
| | | $route: { |
| | | handler: function (route) { |
| | | this.redirect = route.query && route.query.redirect; |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | }, |
| | | created() { |
| | | const loginId = this.$route.query.loginId; |
| | | if (loginId === undefined || loginId === null) { |
| | | this.checkBind(); |
| | | this.getCode(); |
| | | this.checkErrorMsg(); |
| | | this.getCookie(); |
| | | } else { |
| | | this.redirectSocialLogin(loginId); |
| | | } |
| | | }, |
| | | methods: { |
| | | redirectLogin(loginId) { |
| | | this.loading = true; |
| | | this.$store |
| | | .dispatch('RedirectLogin', loginId) |
| | | .then(() => { |
| | | this.$router |
| | | .push({ |
| | | path: this.redirect || '/', |
| | | }) |
| | | .catch(() => {}); |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |
| | | if (this.captchaOnOff) { |
| | | this.getCode(); |
| | | } |
| | | this.$router.push({ |
| | | query: {}, |
| | | }); |
| | | }); |
| | | }, |
| | | redirectSocialLogin() { |
| | | const query = this.$route.query; |
| | | const loginId = query.loginId; |
| | | socialLogin(loginId).then((res) => { |
| | | // ä¿åtoken |
| | | this.loading = true; |
| | | setToken(res.token); |
| | | this.$router |
| | | .push({ |
| | | path: this.redirect || '/', |
| | | }) |
| | | .catch(() => {}); |
| | | if (this.captchaOnOff) { |
| | | this.getCode(); |
| | | this.loading = false; |
| | | } |
| | | }); |
| | | }, |
| | | checkBind() { |
| | | const query = this.$route.query; |
| | | const bindId = query.bindId; |
| | | if (bindId === undefined || bindId === null) { |
| | | this.bindAccount = false; |
| | | } else { |
| | | this.bindAccount = true; |
| | | checkBindId(bindId).then((res) => { |
| | | this.bindAccount = res.bindAccount === undefined ? true : res.bindAccount; |
| | | if (this.bindAccount) { |
| | | this.loginForm.bindId = bindId; |
| | | } else { |
| | | this.loginForm.bindId = ''; |
| | | this.$router.push({ |
| | | query: {}, |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | checkErrorMsg() { |
| | | const errorId = this.$route.query.errorId; |
| | | if (errorId !== undefined && errorId !== null) { |
| | | getErrorMsg(errorId) |
| | | .then((res) => {}) |
| | | .catch((err) => { |
| | | this.$router.push({ query: {} }); |
| | | console.log(err); |
| | | }); |
| | | } |
| | | }, |
| | | getCode() { |
| | | getCodeImg().then((res) => { |
| | | this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff; |
| | | if (this.captchaOnOff) { |
| | | this.codeUrl = 'data:image/gif;base64,' + res.img; |
| | | this.loginForm.uuid = res.uuid; |
| | | } |
| | | }); |
| | | }, |
| | | getCookie() { |
| | | const username = Cookies.get('username'); |
| | | const password = Cookies.get('password'); |
| | | const rememberMe = Cookies.get('rememberMe'); |
| | | const loginId = Cookies.get('loginId'); |
| | | this.loginForm = { |
| | | username: username === undefined ? this.loginForm.username : username, |
| | | password: password === undefined ? this.loginForm.password : decrypt(password), |
| | | rememberMe: rememberMe === undefined ? false : Boolean(rememberMe), |
| | | loginId: loginId === undefined ? this.loginForm.loginId : loginId, |
| | | }; |
| | | }, |
| | | qqLogin() { |
| | | window.location.href = 'http://localhost:8080/auth/render/qq'; |
| | | }, |
| | | weChatLogin() { |
| | | const baseURL = process.env.VUE_APP_BASE_API; |
| | | window.location.href = baseURL + '/auth/render/wechat_open_web'; |
| | | }, |
| | | authLogin() { |
| | | this.$alert('ç¬¬ä¸æ¹ç»å½æ£å¨éæä¸...', 'æç¤ºæ¶æ¯', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | callback: (action) => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: `action: ${action}`, |
| | | }); |
| | | }, |
| | | }); |
| | | }, |
| | | handleBind() { |
| | | this.$refs.loginForm.validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true; |
| | | if (this.loginForm.rememberMe) { |
| | | Cookies.set('username', this.loginForm.username, { |
| | | expires: 30, |
| | | }); |
| | | Cookies.set('password', encrypt(this.loginForm.password), { |
| | | expires: 30, |
| | | }); |
| | | Cookies.set('rememberMe', this.loginForm.rememberMe, { |
| | | expires: 30, |
| | | }); |
| | | } else { |
| | | Cookies.remove('username'); |
| | | Cookies.remove('password'); |
| | | Cookies.remove('rememberMe'); |
| | | } |
| | | this.loginForm.bindId = this.$route.query.bindId; |
| | | bindLogin(this.loginForm) |
| | | .then((res) => { |
| | | // ä¿åtoken |
| | | setToken(res.token); |
| | | this.$router |
| | | .push({ |
| | | path: '/', |
| | | }) |
| | | .catch(() => {}); |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |
| | | if (this.captchaOnOff) { |
| | | this.loading = false; |
| | | this.getCode(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | handleLogin() { |
| | | this.$refs.loginForm.validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true; |
| | | if (this.loginForm.rememberMe) { |
| | | Cookies.set('username', this.loginForm.username, { |
| | | expires: 30, |
| | | }); |
| | | Cookies.set('password', encrypt(this.loginForm.password), { |
| | | expires: 30, |
| | | }); |
| | | Cookies.set('rememberMe', this.loginForm.rememberMe, { |
| | | expires: 30, |
| | | }); |
| | | } else { |
| | | Cookies.remove('username'); |
| | | Cookies.remove('password'); |
| | | Cookies.remove('rememberMe'); |
| | | } |
| | | this.$store |
| | | .dispatch('Login', this.loginForm) |
| | | .then(() => { |
| | | this.$router |
| | | .push({ |
| | | path: this.redirect || '/', |
| | | }) |
| | | .catch(() => {}); |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |
| | | if (this.captchaOnOff) { |
| | | this.getCode(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .login { |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | .logoImg { |
| | | width: 100px; |
| | | height: 100px; |
| | | background: url('../assets/logo/logo.png') no-repeat; |
| | | background-size: 100% 100%; |
| | | float: left; |
| | | } |
| | | .bindAccountTitle { |
| | | margin: 0px auto 30px auto; |
| | | text-align: center; |
| | | color: #333; |
| | | font-size: 24px; |
| | | } |
| | | |
| | | .login-form { |
| | | margin: 30px auto 0 auto; |
| | | padding: 15px; |
| | | z-index: 1000; |
| | | max-width: 350px; |
| | | |
| | | input { |
| | | height: 38px; |
| | | background-color: #f1f1f1; |
| | | color: #666; |
| | | } |
| | | |
| | | .input-icon { |
| | | height: 39px; |
| | | width: 14px; |
| | | margin-left: 2px; |
| | | } |
| | | } |
| | | |
| | | .login-code { |
| | | width: 33%; |
| | | float: right; |
| | | |
| | | img { |
| | | cursor: pointer; |
| | | vertical-align: middle; |
| | | border-radius: 3px; |
| | | height: 38px; |
| | | } |
| | | } |
| | | |
| | | .el-login-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | position: fixed; |
| | | bottom: 0; |
| | | width: 100%; |
| | | text-align: center; |
| | | color: #333; |
| | | font-family: Arial; |
| | | font-size: 12px; |
| | | letter-spacing: 1px; |
| | | } |
| | | |
| | | .alert-box-wrap { |
| | | border: 1px solid #f78e21; |
| | | |
| | | .alert-message-wrap { |
| | | font-size: 14px; |
| | | font-family: '微软é
é»'; |
| | | color: rgba(197, 41, 41, 0.856); |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="login"> |
| | | <el-row> |
| | | <el-col :xs="24"> |
| | | <div style="color: #fff; background-color: #0f73ee; width: 100%; height: 200px; text-align: center; padding: 15px; font-family: '微软é
é»'"> |
| | | <div style="font-size: 42px; padding-top: 40px; width: 400px; margin: 0 auto"> |
| | | <div class="logoImg"></div> |
| | | <!-- <img :src="logo" alt="logo" style="width: 100px; height: 100px; float: left" /> --> |
| | | <div style="float: left; margin-top: 13px; width: 300px; text-align: left"> |
| | | <div>TerraDT</div> |
| | | <div style="letter-spacing: 1.5px; font-size: 20px; font-weight: 600; margin-top: -8px; margin-left: 3px">æ³°ç工䏿°ååªç管çå¹³å°</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="logoTitle"> |
| | | <div class="titleItem"> |
| | | <div class="logImg"></div> |
| | | </div> |
| | | |
| | | <div class="titleItem"> |
| | | <div class="logText">æ°ååªçæºè½é
ç½å·¡æ£ç³»ç»</div> |
| | | </div> |
| | | </div> |
| | | <div class="logContent"> |
| | | <div class="contFrom"> |
| | | <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> |
| | | <!-- <div style="margin-bottom: 10px; font-size: 14px; font-family: '微软é
é»'; color: #f78e21">æ¼ç¤ºè´¦å·ï¼fastbee 123456</div> --> |
| | | <el-form-item prop="username"> |
| | | <el-form-item prop="username" > |
| | | <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="è´¦å·"> |
| | | <svg-icon slot="prefix" icon-class="user" class="input-icon" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="password"> |
| | | <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="å¯ç " @keyup.enter.native="handleLogin"> |
| | | <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="å¯ç " |
| | | @keyup.enter.native="handleLogin"> |
| | | <svg-icon slot="prefix" icon-class="password" class="input-icon" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="captchaOnOff" prop="code"> |
| | | <el-input v-model="loginForm.code" auto-complete="off" placeholder="éªè¯ç " style="width: 63%" @keyup.enter.native="handleLogin"> |
| | | <el-input v-model="loginForm.code" auto-complete="off" placeholder="éªè¯ç " style="width: 63%" |
| | | @keyup.enter.native="handleLogin"> |
| | | <svg-icon slot="prefix" icon-class="validCode" class="input-icon" /> |
| | | </el-input> |
| | | |
| | |
| | | <img :src="codeUrl" @click="getCode" /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px; color: #000">è®°ä½å¯ç </el-checkbox> |
| | | <el-checkbox v-model="loginForm.rememberMe" |
| | | style="margin: 0px 0px 25px 0px; color: #000">è®°ä½å¯ç </el-checkbox> |
| | | |
| | | <el-form-item style="width: 100%"> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleLogin"> |
| | | <el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%" |
| | | @click.native.prevent="handleLogin"> |
| | | <span v-if="!loading">ç» å½</span> |
| | | <span v-else>ç» å½ ä¸...</span> |
| | | </el-button> |
| | | <el-button v-else :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleBind"> |
| | | <el-button v-else :loading="loading" type="primary" style="width: 100%" |
| | | @click.native.prevent="handleBind"> |
| | | <span v-if="!loading">ç» å®</span> |
| | | <span v-else>ç» å® ä¸...</span> |
| | | </el-button> |
| | | </div> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- åºé¨ --> |
| | | <div class="el-login-footer"> |
| | | <span> |
| | | Copyright © 2004ï¼2023 |
| | | <a target="_blank" href="https://www.smartearth.cn/">SmartEarth</a> |
| | | All Rights Reserved. |
| | | </span> |
| | | </div> |
| | | <div class="contMessage"> |
| | | <span> |
| | | Copyright © 2004ï¼2023 |
| | | <a target="_blank" href="https://www.smartearth.cn/">SmartEarth</a> |
| | | All Rights Reserved. |
| | | </span> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | .push({ |
| | | path: this.redirect || '/', |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |
| | |
| | | .push({ |
| | | path: this.redirect || '/', |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | if (this.captchaOnOff) { |
| | | this.getCode(); |
| | | this.loading = false; |
| | |
| | | const errorId = this.$route.query.errorId; |
| | | if (errorId !== undefined && errorId !== null) { |
| | | getErrorMsg(errorId) |
| | | .then((res) => {}) |
| | | .then((res) => { }) |
| | | .catch((err) => { |
| | | this.$router.push({ query: {} }); |
| | | console.log(err); |
| | |
| | | .push({ |
| | | path: '/', |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |
| | |
| | | .push({ |
| | | path: this.redirect || '/', |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { }); |
| | | }) |
| | | .catch(() => { |
| | | this.loading = false; |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | <style scoped lang="scss"> |
| | | .login { |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | .logoImg { |
| | | width: 100px; |
| | | height: 100px; |
| | | background: url('../assets/logo/logo.png') no-repeat; |
| | | background-size: 100% 100%; |
| | | float: left; |
| | | } |
| | | .bindAccountTitle { |
| | | margin: 0px auto 30px auto; |
| | | text-align: center; |
| | | color: #333; |
| | | font-size: 24px; |
| | | } |
| | | |
| | | .login-form { |
| | | margin: 30px auto 0 auto; |
| | | padding: 15px; |
| | | z-index: 1000; |
| | | max-width: 350px; |
| | | |
| | | input { |
| | | height: 38px; |
| | | background-color: #f1f1f1; |
| | | color: #666; |
| | | } |
| | | |
| | | .input-icon { |
| | | height: 39px; |
| | | width: 14px; |
| | | margin-left: 2px; |
| | | } |
| | | } |
| | | |
| | | .login-code { |
| | | width: 33%; |
| | | float: right; |
| | | |
| | | img { |
| | | cursor: pointer; |
| | | vertical-align: middle; |
| | | border-radius: 3px; |
| | | height: 38px; |
| | | } |
| | | } |
| | | |
| | | .el-login-footer { |
| | | height: 40px; |
| | | line-height: 40px; |
| | | position: fixed; |
| | | bottom: 0; |
| | | // overflow: auto; |
| | | width: 100%; |
| | | text-align: center; |
| | | color: #333; |
| | | font-family: Arial; |
| | | font-size: 12px; |
| | | letter-spacing: 1px; |
| | | } |
| | | position: absolute; |
| | | background: url('../assets/logo/sdw.png') no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | | .alert-box-wrap { |
| | | border: 1px solid #f78e21; |
| | | |
| | | .alert-message-wrap { |
| | | font-size: 14px; |
| | | font-family: '微软é
é»'; |
| | | color: rgba(197, 41, 41, 0.856); |
| | | margin-left: 10px; |
| | | .logoTitle { |
| | | height: 266px; |
| | | background: rgba(51, 132, 198, 1); |
| | | width: 100%; |
| | | z-index: -1; |
| | | position: absolute; |
| | | display: flex; |
| | | justify-content: center; |
| | | |
| | | .titleItem { |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .logImg { |
| | | width: 89px; |
| | | height: 89px; |
| | | background: url('../assets/logo/logo2.png') no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .logText { |
| | | font-family: SourceHanSansSC-Bold; |
| | | font-size: 36px; |
| | | font-weight: bold; |
| | | color: #ffffff; |
| | | margin-left: 19px; |
| | | } |
| | | } |
| | | |
| | | .logContent { |
| | | width: 100%; |
| | | height: calc(100% - 266px); |
| | | bottom: 0px; |
| | | position: absolute; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .contFrom { |
| | | flex: 1; |
| | | } |
| | | |
| | | .contMessage { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | line-height: 40px; |
| | | } |
| | | |
| | | } |
| | | |
| | | .login-form { |
| | | margin: 30px auto 0 auto; |
| | | padding: 15px; |
| | | z-index: 1000; |
| | | max-width: 350px; |
| | | |
| | | input { |
| | | height: 38px; |
| | | background-color: #f1f1f1; |
| | | color: #666; |
| | | } |
| | | |
| | | .input-icon { |
| | | height: 39px; |
| | | width: 14px; |
| | | margin-left: 2px; |
| | | } |
| | | } |
| | | |
| | | .login-code { |
| | | width: 33%; |
| | | float: right; |
| | | |
| | | img { |
| | | cursor: pointer; |
| | | vertical-align: middle; |
| | | border-radius: 3px; |
| | | height: 38px; |
| | | } |
| | | } |
| | | |
| | | .alert-box-wrap { |
| | | border: 1px solid #f78e21; |
| | | |
| | | .alert-message-wrap { |
| | | font-size: 14px; |
| | | font-family: '微软é
é»'; |
| | | color: rgba(197, 41, 41, 0.856); |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | </style> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import mapInit from '@/assets/js/mapSdk/index.js'; |
| | | import mapInit from '../../../assets/js/mapSdk/index.js'; |
| | | import mapData from '@/assets/js/mapSdk/mapData.js'; |
| | | import layerManager from './layerManager.vue'; |
| | | import menuManager from '@/assets/js/mapSdk/menuManager.js'; |
| | | import location from './location.vue'; |
| | | import knowledge from './knowledge.vue'; |
| | | import lineRoaming from './lineRoaming.vue'; |
| | | import { layer_selectAll } from "@/api/mapView/map.js"; |
| | | import { layer_selectAll } from '@/api/mapView/map.js'; |
| | | import configTools from '@/assets/js/configTools'; |
| | | import store from "@/store"; |
| | | import store from '@/store'; |
| | | import mapServer from '@/assets/js/mapSdk/mapServe'; |
| | | import undergroundMode from './undergroundMode.vue'; |
| | | import dataAnalysis from './dataAnalysis.vue'; |
| | | import dataStatistics from './dataStatistics.vue' |
| | | import dataStatistics from './dataStatistics.vue'; |
| | | import attributeInfo from './attributeInfo.vue'; |
| | | import mapInfo from './mapInfo.vue'; |
| | | export default { |
| | |
| | | childMenuIsShow: true, |
| | | childMenuOption: [], |
| | | childObj: [], |
| | | showEarth: false, |
| | | }; |
| | | }, |
| | | created() { |
| | | console.log('created'); |
| | | }, |
| | | mounted() { |
| | | this.showEarth = true; |
| | | this.mapViewStart(); |
| | | this.$busEvent.$on('CHANGE_MAPINFO', res => { |
| | | |
| | | this.setMapInfo(res) |
| | | |
| | | this.$busEvent.$on('CHANGE_MAPINFO', (res) => { |
| | | this.setMapInfo(res); |
| | | }); |
| | | |
| | | }, |
| | | beforeCreate() { |
| | | console.log('beforeCreate'); |
| | | }, |
| | | beforeDestroy() { |
| | | this.$store.dispatch('mapLayers/changeLayerTree', []) |
| | | this.$store.dispatch('mapLayers/changeDefaultLayer', []) |
| | | this.$store.dispatch('mapLayers/changeLayerTree', []); |
| | | this.$store.dispatch('mapLayers/changeDefaultLayer', []); |
| | | }, |
| | | |
| | | |
| | | methods: { |
| | | setMapInfo(res) { |
| | |
| | | setTimeout(() => { |
| | | this.$refs && this.$refs.mapInfo && this.$refs.mapInfo.open(); |
| | | }, 200); |
| | | |
| | | |
| | | } |
| | | |
| | | }, |
| | | mapViewStart() { |
| | | this.menuOption = mapData.menuData; |
| | | this.$nextTick(() => { |
| | | mapInit.Init(); |
| | | setTimeout(() => { |
| | | if(config.baseModel.url){ |
| | | mapServer.addLayer(config.baseModel); |
| | | } |
| | | this.getSelectLayers(); |
| | | }, 500); |
| | | |
| | | }); |
| | | window.earthCtrl = new SmartEarth.EarthCtrl( |
| | | 'sdkContainer', |
| | | { |
| | | // éèé»è®¤åºå¾ |
| | | defaultImagery: false, |
| | | // éèlogo |
| | | printLog: false, |
| | | // sceneMode: SmartEarth.Cesium.SceneMode.SCENE2D |
| | | StaticFileBaseUrl: '/CimSDK/', |
| | | }, |
| | | {}, |
| | | {}, |
| | | () => { |
| | | setTimeout(() => { |
| | | mapServer.layerList = []; |
| | | //åå§åCesium |
| | | window.Cesium = SmartEarth.Cesium; |
| | | // åå§åViewer |
| | | window.Viewer = window.earthCtrl.viewer; |
| | | //设置å°çé¢è² |
| | | window.Viewer.scene.globe.baseColor = Cesium.Color.fromCssColorString('#A9A9A9'); |
| | | window.Viewer.imageryLayers.removeAll(); |
| | | const serverUrl = config.geoServer; |
| | | const layer = new Cesium.WebMapServiceImageryProvider({ |
| | | url: serverUrl.url + serverUrl.wms, |
| | | layers: serverUrl.layers[1], |
| | | parameters: { |
| | | transparent: true, |
| | | format: 'image/png', |
| | | srs: 'EPSG:4490', |
| | | styles: '', |
| | | cql_filter: '', |
| | | }, |
| | | tileWidth: 512, |
| | | tileHeight: 512, |
| | | }); |
| | | |
| | | window.Viewer.imageryLayers.addImageryProvider(layer); |
| | | this.setStart(); |
| | | |
| | | }, 500); |
| | | } |
| | | ); |
| | | }, |
| | | setStart() { |
| | | mapInit.Init(); |
| | | setTimeout(() => { |
| | | if (config.baseModel.url) { |
| | | var model = window.earthCtrl.factory.create3DTilesets({ |
| | | url: config.baseModel.url |
| | | |
| | | }); |
| | | } |
| | | this.getSelectLayers(); |
| | | }, 500); |
| | | }, |
| | | |
| | | getSelectLayers() { |
| | | layer_selectAll().then(response => { |
| | | if (response.data.code != 200) return |
| | | layer_selectAll().then((response) => { |
| | | if (response.data.code != 200) return; |
| | | const defaultLayer = []; |
| | | const val = response.data.result.filter(item => { |
| | | const val = response.data.result.filter((item) => { |
| | | item.checked = false; |
| | | if (item.type == 2 && item.isShow == 1) { |
| | | item.checked = true; |
| | | mapServer.addLayer(item) |
| | | defaultLayer.push(item.id) |
| | | mapServer.addLayer(item); |
| | | defaultLayer.push(item.id); |
| | | } |
| | | return item; |
| | | }) |
| | | this.$store.dispatch('mapLayers/changeDefaultLayer', defaultLayer) |
| | | var obj = configTools.getTreeData(val) |
| | | this.$store.dispatch('mapLayers/changeLayerTree', obj) |
| | | }) |
| | | }); |
| | | this.$store.dispatch('mapLayers/changeDefaultLayer', defaultLayer); |
| | | var obj = configTools.getTreeData(val); |
| | | this.$store.dispatch('mapLayers/changeLayerTree', obj); |
| | | }); |
| | | }, |
| | | setMenuClose() { |
| | | this.menuIsShow = !this.menuIsShowx; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const data = [ |
| | | { |
| | | title: 'æ»è§', |
| | | |
| | | val: [ |
| | | { |
| | | name: 'äºä»¶', |
| | | t1: 'å·²å¤çµ', |
| | | t2: 'æªå¤çµ', |
| | | v1: 318, |
| | | v2: 43, |
| | | }, |
| | | { |
| | | name: '客æ·', |
| | | v1: 618, |
| | | v2: 60, |
| | | t1: 'å·²å¤çµ', |
| | | t2: 'æªå¤çµ', |
| | | }, |
| | | { |
| | | name: 'æè¯', |
| | | v1: 18, |
| | | v2: 3, |
| | | t1: 'å·²çå¤', |
| | | t2: 'æªçå¤', |
| | | }, |
| | | { |
| | | name: 'çä¿¡', |
| | | v1: 1218, |
| | | v2: 122, |
| | | t1: 'å·²éç¥', |
| | | t2: 'æªéç¥', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | title: 'å½±åå®¢æ·æ
åµ', |
| | | val: [ |
| | | { |
| | | name: 'ä¸å客æ·', |
| | | v1: 12, |
| | | v2: 2, |
| | | count: 14, |
| | | }, |
| | | { |
| | | name: 'å
¬å客æ·', |
| | | v1: 270, |
| | | v2: 70, |
| | | count: 340, |
| | | }, |
| | | { |
| | | name: 'ä¿ä¾å®¢æ·', |
| | | v1: 30, |
| | | v2: 2, |
| | | count: 32, |
| | | }, |
| | | { |
| | | name: 'éè¦å®¢æ·', |
| | | v1: 513, |
| | | v2: 20, |
| | | count: 533, |
| | | }, |
| | | { |
| | | name: 'ç¹çº§å®¢æ·', |
| | | v1: 7, |
| | | v2: 1, |
| | | count: 8, |
| | | }, |
| | | { |
| | | name: 'ä¸çº§å®¢æ·', |
| | | v1: 105, |
| | | v2: 21, |
| | | count: 126, |
| | | }, |
| | | { |
| | | name: 'äºçº§å®¢æ·', |
| | | v1: 407, |
| | | v2: 11, |
| | | count: 417, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | title: 'å½±å设å¤', |
| | | val: [ |
| | | { |
| | | name: 'åçµç«', |
| | | v1: 7, |
| | | v2: 1, |
| | | count: 8, |
| | | }, |
| | | { |
| | | name: 'é¦çº¿', |
| | | v1: 12, |
| | | v2: 2, |
| | | count: 14, |
| | | }, |
| | | { |
| | | name: 'æ¯çº¿', |
| | | v1: 22, |
| | | v2: 7, |
| | | count: 29, |
| | | }, |
| | | { |
| | | name: 'è¾çµçº¿è·¯', |
| | | v1: 54, |
| | | v2: 3, |
| | | count: 57, |
| | | }, |
| | | { |
| | | name: 'å
Œ', |
| | | v1: 65, |
| | | v2: 3, |
| | | count: 68, |
| | | }, |
| | | { |
| | | name: 'ä¸å', |
| | | v1: 107, |
| | | v2: 11, |
| | | count: 1187, |
| | | }, |
| | | { |
| | | name: 'æå¤±è´è·', |
| | | v1: 47, |
| | | v2: 9, |
| | | count: 56, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | title: 'é¨', |
| | | val: [ |
| | | { |
| | | point: '112.56978672907,37.8558881392881', |
| | | line: 'æ¡ç¯å线', |
| | | address: '广åºåçµç«', |
| | | type: 'rain', |
| | | data: [ |
| | | 23.97957226, 23.67522328, 23.64627646, 23.98678133, 23.7049411, 23.90907715, 23.97135417, 23.93937771, 24.7313574, 23.78658559, 23.86060646, 23.93976822, 23.77442911, 23.70706984, 23.97513076, |
| | | 24.00566013, 23.68618352, 23.62046202, 23.94578353, 23.667424, 23.89900528, 23.84667184, 23.79052521, 23.54961054, |
| | | ], |
| | | source: 'å±±è¥¿çæ°è±¡å±', |
| | | time: '2024 -09 - 26 10:06: 40', |
| | | level: 'ç¹å¤§æ´é¨', |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | { |
| | | title: 'éª', |
| | | val: [ |
| | | { |
| | | point: '112.54236790420437.8448783429948', |
| | | line: 'æ²å线', |
| | | address: '太åå¸å¸æ¿å»ºè®¾å¼åå¤ç®±å', |
| | | type: 'snow', |
| | | data: [ |
| | | 0.9637209, 0.9645375, 0.973203, 0.95669932, 0.96515904, 0.96456309, 0.96226909, 0.95940984, 0.97185096, 0.95898406, 0.96430508, 0.96534445, 0.96647128, 0.95301892, 0.96867214, 0.9640161, 0.95022946, |
| | | 0.96365523, 0.96611146, 0.97417531, 0.96427799, 0.96411997, 0.96401091, 0.96554052, |
| | | ], |
| | | source: 'å±±è¥¿çæ°è±¡å±', |
| | | time: '2024-09-26 10:06:40', |
| | | level: 'ç¹å¤§æ´éª', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | val: [ |
| | | { |
| | | point: '112.542367904204 37.839565698022', |
| | | line: 'ä¸å头', |
| | | address: 'èåè¥å¼éæ', |
| | | type: 'fire', |
| | | data: '', |
| | | source: '山西çåºæ¥ææ¥ä¸å¿', |
| | | time: '2024-09-26 10:06:40', |
| | | level: 'ç«ç¾', |
| | | }, |
| | | ], |
| | | |
| | | title: 'ç«', |
| | | }, |
| | | ]; |
| | | export default data; |
| | |
| | | import analysis from '@/views/visual/analysis/index.vue' |
| | | import lineLoss from './lineLoss.vue'; |
| | | import statistics from '@/views/visual/statistics/index.vue' |
| | | import { type } from 'jquery'; |
| | | export default { |
| | | components: { |
| | | mapView, leftMenu, |
| | |
| | | <template> |
| | | <div class="leftMnu"> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t1 }}</div> |
| | | <div class="echartBox"> |
| | | <div id="letftEchart1" class="chartBox"></div> |
| | | </div> |
| | | <chart-vue :childData="childData"></chart-vue> |
| | | </div> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t2 }}</div> |
| | | <chart-vue :childData="childData1"></chart-vue> |
| | | </div> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t3 }}</div> |
| | | <chart-vue :childData="childData2"></chart-vue> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | import chartVue from './list/chart.vue'; |
| | | import data from './data.js'; |
| | | export default { |
| | | components: { |
| | | chartVue |
| | | }, |
| | | props: { |
| | | leftChartData: { |
| | | type: Object, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | title: { |
| | | t1: 'xxx', |
| | | t2: 'XXXX', |
| | | t3: 'xxxxx' |
| | | }, |
| | | myLeftChart1: null, |
| | | leftChartOption: { |
| | | lenData: [], |
| | | xData: [], |
| | | serData: [], |
| | | }, |
| | | childData: null, |
| | | childData1: null, |
| | | childData2: null, |
| | | } |
| | | }, |
| | | watch: { |
| | | leftChartData: { |
| | | deep: true, |
| | | handler(res) { |
| | | if (res) { |
| | | if (res.type == "left1") { |
| | | this.setLeftChart1(res.val) |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initEchart(); |
| | | }, |
| | | methods: { |
| | | setLeftChart1(res) { |
| | | console.log(res); |
| | | |
| | | if (!this.myLeftChart1) { |
| | | this.myLeftChart1 = echarts.init(document.getElementById('letftEchart1')); |
| | | } |
| | | if (this.leftChartOption.lenData.length == 0) { |
| | | this.title.t1 = res.head[1] |
| | | this.leftChartOption.lenData.push(res.head[0]) |
| | | const colors=['#67C23A','#E6A23C','#F56C6C'] |
| | | for (var i = 0; i < 3; i++) { |
| | | this.leftChartOption.serData.push({ |
| | | name: res.head[i+1], |
| | | type: 'line', |
| | | stack: 'Total', |
| | | data: [], |
| | | lineStyle: { |
| | | color: colors[i], // æçº¿é¢è² |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | var option = this.getChartOption(res) |
| | | this.myLeftChart1 && this.myLeftChart1.setOption(option); |
| | | initEchart() { |
| | | this.initEchart1(); |
| | | this.initEchart2(); |
| | | this.initEchart3(); |
| | | }, |
| | | getChartOption(res) { |
| | | for(var i = 0;i<3;i++){ |
| | | this.leftChartOption.serData[i].data.push(res.data[i+1]) |
| | | } |
| | | |
| | | |
| | | this.leftChartOption.xData.push(res.data[0]) |
| | | return { |
| | | legend: { |
| | | show: false |
| | | }, |
| | | |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | boundaryGap: false, |
| | | data: this.leftChartOption.xData, |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | } |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | } |
| | | } |
| | | }, |
| | | series: this.leftChartOption.serData |
| | | } |
| | | initEchart1() { |
| | | var chart1= data[3]; |
| | | chart1.id = "myChart01"; |
| | | this.childData =chart1 |
| | | }, |
| | | initEchart2() { |
| | | var chart2= data[4]; |
| | | chart2.id = "myChart02"; |
| | | this.childData1 = chart2 |
| | | }, initEchart3() { |
| | | var chart3= data[5]; |
| | | chart3.id = "myChart03"; |
| | | this.childData2 = chart3 |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="chartListBox" :childData="childData"> |
| | | <div class="aside-title">{{ childData.title }}</div> |
| | | <div class="echartBox"> |
| | | <table class="chartTable"> |
| | | <tr> |
| | | <th></th> |
| | | <th> |
| | | 线路 |
| | | </th> |
| | | <th> |
| | | ç±»å |
| | | </th> |
| | | |
| | | <th> |
| | | æä½ |
| | | </th> |
| | | </tr> |
| | | <tr> |
| | | <td class="chartTd" colspan="4"> |
| | | <div class=" elDriver"> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item, i) in childData.val"> |
| | | <td>{{ item.address }}</td> |
| | | <td>{{ item.line }}</td> |
| | | <td style="color:#f56c6c">{{ item.level }}</td> |
| | | <td style="color:#409eff"> |
| | | <el-button v-show="flagData != item.address" class="elButton" type="primary" plain size="mini" |
| | | @click="setChangeItem(item)">详æ
</el-button> |
| | | <el-button v-show="flagData == item.address" class="elButton" type="danger" plain size="mini" |
| | | @click="setCannelItem(item)">éç½®</el-button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | |
| | | export default { |
| | | props: { |
| | | childData: { |
| | | type: Object, |
| | | default: null |
| | | } |
| | | }, |
| | | watch: { |
| | | childData(newValue, oldValue) { |
| | | if (newValue) { |
| | | this.chartId = newValue.id; |
| | | this.title = newValue.title; |
| | | setTimeout(() => { |
| | | this.setEchartChange(newValue) |
| | | }, 1000); |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | chartId: "", |
| | | title: "", |
| | | flagData: null, |
| | | } |
| | | }, |
| | | methods: { |
| | | setCannelItem() { |
| | | this.flagData = null; |
| | | }, |
| | | setChangeItem(res) { |
| | | this.flagData = res.address; |
| | | }, |
| | | |
| | | setEchartChange(res) { |
| | | if (!res.data) return; |
| | | const data = res.data; |
| | | const id = document.getElementById(this.chartId) |
| | | var std = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | var h = i + 1 |
| | | var t = h > 10 ? h : "0" + h; |
| | | std.push(t + ":00:00") |
| | | } |
| | | const myChart = echarts.init(id); |
| | | var option = { |
| | | title: { |
| | | text: res.address, |
| | | textStyle: { |
| | | color: "white" |
| | | } |
| | | }, |
| | | xAxis: { |
| | | type: 'category', |
| | | data: std, |
| | | axisLabel: { |
| | | textStyle: { |
| | | color: 'WHITE' // 设置åä½é¢è²ä¸ºçº¢è² |
| | | } |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLabel: { |
| | | textStyle: { |
| | | color: 'WHITE' // 设置åä½é¢è²ä¸ºçº¢è² |
| | | } |
| | | } |
| | | }, |
| | | tooltip: { |
| | | trigger: 'axis' |
| | | }, |
| | | series: [ |
| | | { |
| | | data: data, |
| | | type: 'line', |
| | | smooth: true, |
| | | // itemStyle: { |
| | | // normal: { |
| | | |
| | | // lineStyle: { |
| | | // color: ""// 线çé¢è² |
| | | // } |
| | | // } |
| | | // } |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | |
| | | option && myChart.setOption(option); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .chartListBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .aside-title { |
| | | box-sizing: border-box; |
| | | padding-left: 30px; |
| | | font-size: 15px; |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular; |
| | | color: #fff; |
| | | width: 100%; |
| | | height: 45px; |
| | | line-height: 45px; |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | } |
| | | |
| | | .echartBox { |
| | | flex: 1; |
| | | padding: 5px; |
| | | position: relative; |
| | | color: white; |
| | | display: flex; |
| | | flex-direction: column; |
| | | // justify-content: space-around; |
| | | |
| | | .myChart { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .chartTd { |
| | | width: 100%; |
| | | padding: 0px !important; |
| | | } |
| | | |
| | | .elDriver { |
| | | width: 100%; |
| | | height: 2px; |
| | | background: #409EFF; |
| | | margin: 10px 0px; |
| | | |
| | | } |
| | | |
| | | .chartTable { |
| | | width: 100%; |
| | | |
| | | td { |
| | | text-align: center; |
| | | |
| | | .elButton { |
| | | padding: 5px 10px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="chartListBox" :childData="childData"> |
| | | <div class="aside-title">{{ childData.title }}</div> |
| | | <div class="echartBox"> |
| | | <div class="chartMenu" v-for="(item, key) in childData.val" :key="key"> |
| | | <table class="chartTable"> |
| | | <tr> |
| | | <td></td> |
| | | <td>{{ item.t1 }}</td> |
| | | <td>{{ item.t2 }}</td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td class="chartTd" colspan="3"> |
| | | <div class="elDriver"> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td>{{ item.name }}</td> |
| | | <td style="color:#67c23a">{{ item.v1 }}</td> |
| | | <td style="color:#f56c6c"> {{ item.v2 }}</td> |
| | | </tr> |
| | | </table> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | |
| | | export default { |
| | | props: { |
| | | childData: { |
| | | type: Object, |
| | | default: null |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // childData:null, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .chartListBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .aside-title { |
| | | box-sizing: border-box; |
| | | padding-left: 30px; |
| | | font-size: 15px; |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular; |
| | | color: #fff; |
| | | width: 100%; |
| | | height: 45px; |
| | | line-height: 45px; |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | } |
| | | |
| | | .echartBox { |
| | | flex: 1; |
| | | padding: 5px; |
| | | position: relative; |
| | | color: white; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-around; |
| | | |
| | | .chartTd { |
| | | width: 100%; |
| | | padding: 0px !important; |
| | | } |
| | | |
| | | .elDriver { |
| | | width: 100%; |
| | | height: 2px; |
| | | background: #409EFF; |
| | | margin: 10px 0px; |
| | | |
| | | } |
| | | |
| | | .chartTable { |
| | | width: 100%; |
| | | |
| | | td { |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="chartListBox" :childData="childData"> |
| | | <div class="aside-title">{{ childData.title }}</div> |
| | | <div class="echartBox"> |
| | | <table class="chartTable"> |
| | | <tr> |
| | | <th></th> |
| | | <th> |
| | | å·²å¤çµ |
| | | </th> |
| | | <th> |
| | | æªå¤çµ |
| | | </th> |
| | | <th> |
| | | æ»æ° |
| | | </th> |
| | | </tr> |
| | | <tr> |
| | | <td class="chartTd" colspan="4"> |
| | | <div class=" elDriver"> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item,i) in childData.val"> |
| | | <td>{{ item.name }}</td> |
| | | <td style="color:#67c23a">{{ item.v1 }}</td> |
| | | <td style="color:#f56c6c"> {{ item.v2 }}</td> |
| | | <td style="color:#409eff">{{ item.count }}</td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | |
| | | export default { |
| | | props: { |
| | | childData: { |
| | | type: Object, |
| | | default: null |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | // childData:null, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .chartListBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .aside-title { |
| | | box-sizing: border-box; |
| | | padding-left: 30px; |
| | | font-size: 15px; |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular; |
| | | color: #fff; |
| | | width: 100%; |
| | | height: 45px; |
| | | line-height: 45px; |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | } |
| | | |
| | | .echartBox { |
| | | flex: 1; |
| | | padding: 5px; |
| | | position: relative; |
| | | color: white; |
| | | display: flex; |
| | | |
| | | |
| | | .chartTd { |
| | | width: 100%; |
| | | padding: 0px !important; |
| | | } |
| | | |
| | | .elDriver { |
| | | width: 100%; |
| | | height: 2px; |
| | | background: #409EFF; |
| | | margin: 0px 0px; |
| | | |
| | | } |
| | | |
| | | .chartTable { |
| | | width: 100%; |
| | | th{ |
| | | text-align: center; |
| | | } |
| | | td { |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="rightMnu"> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t1 }}</div> |
| | | <!-- <div class="aside-title">{{ title.t1 }}</div> |
| | | <div class="echartBox"> |
| | | <div id="rightEchart1" class="chartBox"></div> |
| | | </div> |
| | | </div> --> |
| | | <chart-list :childData="childData"></chart-list> |
| | | </div> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t2 }}</div> |
| | | <div class="echartBox"> |
| | | <div id="rightEchart2" class="chartBox"></div> |
| | | </div> |
| | | <chart-list1 :childData="childData1"></chart-list1> |
| | | </div> |
| | | <div class="menuBox"> |
| | | <div class="aside-title">{{ title.t3 }}</div> |
| | | <div class="echartBox"> |
| | | <div id="rightEchart3" class="chartBox"></div> |
| | | </div> |
| | | <chart-list1 :childData="childData2"></chart-list1> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | |
| | | import chartList from './list/chartList.vue'; |
| | | import chartList1 from './list/chartList1.vue'; |
| | | import data from './data.js'; |
| | | export default { |
| | | components:{ |
| | | chartList,chartList1 |
| | | }, |
| | | props: { |
| | | rightChartData: { |
| | | type: Object, |
| | |
| | | title: { |
| | | t1: 'xxx', |
| | | t2: 'XXXX', |
| | | t3: 'xxxxx' |
| | | } |
| | | t3: 'xxxxx', |
| | | |
| | | }, |
| | | childData:null, |
| | | childData1:null, |
| | | childData2:null, |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.initEchart3(); |
| | | }, |
| | | initEchart1() { |
| | | var myChart = echarts.init(document.getElementById('rightEchart1')); |
| | | var option = { |
| | | xAxis: { |
| | | type: 'category', |
| | | data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | } |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | axisLine: { |
| | | lineStyle: { |
| | | color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | } |
| | | } |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [820, 932, 901, 934, 1290, 1330, 1320], |
| | | type: 'line', |
| | | smooth: true, |
| | | lineStyle: { |
| | | color: '#409EFF', // æçº¿é¢è² |
| | | this.childData= data[0]; |
| | | // var myChart = echarts.init(document.getElementById('rightEchart1')); |
| | | // var option = { |
| | | // xAxis: { |
| | | // type: 'category', |
| | | // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], |
| | | // axisLine: { |
| | | // lineStyle: { |
| | | // color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | // } |
| | | // } |
| | | // }, |
| | | // yAxis: { |
| | | // type: 'value', |
| | | // axisLine: { |
| | | // lineStyle: { |
| | | // color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | // } |
| | | // } |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | // data: [820, 932, 901, 934, 1290, 1330, 1320], |
| | | // type: 'line', |
| | | // smooth: true, |
| | | // lineStyle: { |
| | | // color: '#409EFF', // æçº¿é¢è² |
| | | |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | // } |
| | | // } |
| | | // ] |
| | | // }; |
| | | |
| | | option && myChart.setOption(option); |
| | | // option && myChart.setOption(option); |
| | | |
| | | }, |
| | | |
| | | initEchart2() { |
| | | var myChart1 = echarts.init(document.getElementById('rightEchart2')); |
| | | var option1 = { |
| | | title: { |
| | | this.childData1=data[1]; |
| | | // var myChart1 = echarts.init(document.getElementById('rightEchart2')); |
| | | // var option1 = { |
| | | // title: { |
| | | |
| | | subtext: 'Fake Data', |
| | | left: 'center' |
| | | }, |
| | | tooltip: { |
| | | trigger: 'item' |
| | | }, |
| | | legend: { |
| | | orient: 'vertical', |
| | | left: 'left', |
| | | show: false |
| | | }, |
| | | series: [ |
| | | { |
| | | name: 'Access From', |
| | | type: 'pie', |
| | | radius: '50%', |
| | | data: [ |
| | | { value: 1048, name: 'Search Engine' }, |
| | | { value: 735, name: 'Direct' }, |
| | | { value: 580, name: 'Email' }, |
| | | { value: 484, name: 'Union Ads' }, |
| | | { value: 300, name: 'Video Ads' } |
| | | ], |
| | | emphasis: { |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowOffsetX: 0, |
| | | shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | option1 && myChart1.setOption(option1); |
| | | // subtext: 'Fake Data', |
| | | // left: 'center' |
| | | // }, |
| | | // tooltip: { |
| | | // trigger: 'item' |
| | | // }, |
| | | // legend: { |
| | | // orient: 'vertical', |
| | | // left: 'left', |
| | | // show: false |
| | | // }, |
| | | // series: [ |
| | | // { |
| | | // name: 'Access From', |
| | | // type: 'pie', |
| | | // radius: '50%', |
| | | // data: [ |
| | | // { value: 1048, name: 'Search Engine' }, |
| | | // { value: 735, name: 'Direct' }, |
| | | // { value: 580, name: 'Email' }, |
| | | // { value: 484, name: 'Union Ads' }, |
| | | // { value: 300, name: 'Video Ads' } |
| | | // ], |
| | | // emphasis: { |
| | | // itemStyle: { |
| | | // shadowBlur: 10, |
| | | // shadowOffsetX: 0, |
| | | // shadowColor: 'rgba(0, 0, 0, 0.5)' |
| | | // } |
| | | // } |
| | | // } |
| | | // ] |
| | | // }; |
| | | // option1 && myChart1.setOption(option1); |
| | | }, |
| | | initEchart3() { |
| | | var myChart2 = echarts.init(document.getElementById('rightEchart3')); |
| | | // prettier-ignore |
| | | let dataAxis = ['ç¹', 'å»', 'æ±', 'å',]; |
| | | // prettier-ignore |
| | | let data = [220, 182, 191, 234, 290]; |
| | | let yMax = 500; |
| | | let dataShadow = []; |
| | | for (let i = 0; i < data.length; i++) { |
| | | dataShadow.push(yMax); |
| | | } |
| | | var option2 = { |
| | | title: { |
| | | this.childData2=data[2]; |
| | | // var myChart2 = echarts.init(document.getElementById('rightEchart3')); |
| | | // // prettier-ignore |
| | | // let dataAxis = ['ç¹', 'å»', 'æ±', 'å',]; |
| | | // // prettier-ignore |
| | | // let data = [220, 182, 191, 234, 290]; |
| | | // let yMax = 500; |
| | | // let dataShadow = []; |
| | | // for (let i = 0; i < data.length; i++) { |
| | | // dataShadow.push(yMax); |
| | | // } |
| | | // var option2 = { |
| | | // title: { |
| | | |
| | | }, |
| | | xAxis: { |
| | | data: dataAxis, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | } |
| | | }, |
| | | z: 10 |
| | | }, |
| | | yAxis: { |
| | | axisLine: { |
| | | show: false, |
| | | lineStyle: { |
| | | color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | } |
| | | }, |
| | | axisTick: { |
| | | show: false |
| | | }, |
| | | axisLabel: { |
| | | color: '#fff' |
| | | }, |
| | | // }, |
| | | // xAxis: { |
| | | // data: dataAxis, |
| | | // axisTick: { |
| | | // show: false |
| | | // }, |
| | | // axisLine: { |
| | | // show: false, |
| | | // lineStyle: { |
| | | // color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | // } |
| | | // }, |
| | | // z: 10 |
| | | // }, |
| | | // yAxis: { |
| | | // axisLine: { |
| | | // show: false, |
| | | // lineStyle: { |
| | | // color: 'white' // è®¾ç½®ä¸ºçº¢è² |
| | | // } |
| | | // }, |
| | | // axisTick: { |
| | | // show: false |
| | | // }, |
| | | // axisLabel: { |
| | | // color: '#fff' |
| | | // }, |
| | | |
| | | }, |
| | | dataZoom: [ |
| | | { |
| | | type: 'inside' |
| | | } |
| | | ], |
| | | series: [ |
| | | { |
| | | type: 'bar', |
| | | showBackground: true, |
| | | itemStyle: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: '#83bff6' }, |
| | | { offset: 0.5, color: '#188df0' }, |
| | | { offset: 1, color: '#188df0' } |
| | | ]) |
| | | }, |
| | | emphasis: { |
| | | itemStyle: { |
| | | color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | { offset: 0, color: '#2378f7' }, |
| | | { offset: 0.7, color: '#2378f7' }, |
| | | { offset: 1, color: '#83bff6' } |
| | | ]) |
| | | } |
| | | }, |
| | | data: data |
| | | } |
| | | ] |
| | | }; |
| | | option2 && myChart2.setOption(option2); |
| | | // }, |
| | | // dataZoom: [ |
| | | // { |
| | | // type: 'inside' |
| | | // } |
| | | // ], |
| | | // series: [ |
| | | // { |
| | | // type: 'bar', |
| | | // showBackground: true, |
| | | // itemStyle: { |
| | | // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | // { offset: 0, color: '#83bff6' }, |
| | | // { offset: 0.5, color: '#188df0' }, |
| | | // { offset: 1, color: '#188df0' } |
| | | // ]) |
| | | // }, |
| | | // emphasis: { |
| | | // itemStyle: { |
| | | // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
| | | // { offset: 0, color: '#2378f7' }, |
| | | // { offset: 0.7, color: '#2378f7' }, |
| | | // { offset: 1, color: '#83bff6' } |
| | | // ]) |
| | | // } |
| | | // }, |
| | | // data: data |
| | | // } |
| | | // ] |
| | | // }; |
| | | // option2 && myChart2.setOption(option2); |
| | | } |
| | | |
| | | |
| | |
| | | const CompressionPlugin = require('compression-webpack-plugin'); |
| | | const { log } = require('console'); |
| | | |
| | | const name = process.env.VUE_APP_TITLE || 'æ³°ç工䏿°ååªç管çå¹³å°'; // ç½é¡µæ é¢ |
| | | const name = process.env.VUE_APP_TITLE || '山西é
ç½'; // ç½é¡µæ é¢ |
| | | |
| | | const port = process.env.port || process.env.npm_config_port || 80; // ç«¯å£ |
| | | console.log( "123",process.env.VUE_APP_SERVER_API_URL); |