Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a31693bad3 | ||
|
|
19848df78e | ||
|
|
e19d2da93e | ||
|
|
825c319d33 |
@ -1,5 +1,3 @@
|
||||
import { h } from "vue";
|
||||
|
||||
// English translations
|
||||
export default {
|
||||
app: {
|
||||
|
||||
@ -2,6 +2,41 @@ import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import zh from './zh';
|
||||
import en from './en';
|
||||
|
||||
export const gisLabels = {
|
||||
planArea: {
|
||||
zh_CN: '规划区域',
|
||||
en_US: 'Plan Area'
|
||||
},
|
||||
planAirline: {
|
||||
zh_CN: '规划航线',
|
||||
en_US: 'Plan Airline'
|
||||
},
|
||||
startPoint: {
|
||||
zh_CN: '起点',
|
||||
en_US: 'Start Point'
|
||||
},
|
||||
endPoint: {
|
||||
zh_CN: '终点',
|
||||
en_US: 'end Point'
|
||||
},
|
||||
task: {
|
||||
zh_CN: '任务',
|
||||
en_US: 'Task'
|
||||
},
|
||||
point: {
|
||||
zh_CN: '点',
|
||||
en_US: 'Point'
|
||||
},
|
||||
line: {
|
||||
zh_CN: '线',
|
||||
en_US: 'Line'
|
||||
},
|
||||
PowerOnPoint: {
|
||||
zh_CN: '开机点',
|
||||
en_US: 'Power-on point'
|
||||
}
|
||||
}
|
||||
Vue.use(VueI18n)
|
||||
|
||||
// load locale messages
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
// Chinese translations
|
||||
export default {
|
||||
app: {
|
||||
title: '空域快视系统',
|
||||
|
||||
@ -4,6 +4,7 @@ import { constantRoutes } from '@/router'
|
||||
import { mapMutations, mapGetters, mapActions } from 'vuex'
|
||||
import ChangePassword from '@/layout/components/change-password/index.vue'
|
||||
import { getTreeAllItems, judgeArrayRepeat } from '@/utils'
|
||||
import { gisLabels } from '../../../lang'
|
||||
export default {
|
||||
name: 'Header',
|
||||
components: { ChangePassword },
|
||||
@ -172,12 +173,28 @@ export default {
|
||||
...mapActions('app', ['reload']),
|
||||
...mapMutations('app', ['SET_SCENE_ID', 'SET_SCENE_INFO', 'SET_MENUS_CHOSE']),
|
||||
...mapMutations('user', ['SET_ROLES', 'SET_USER_ID', 'SET_USERNAME']),
|
||||
...mapActions('dict', ['getDict']),
|
||||
handleSelect(key) {
|
||||
this.SET_MENUS_CHOSE(key)
|
||||
},
|
||||
changeLocale(lang) {
|
||||
this.$i18n.locale = lang
|
||||
localStorage.setItem('locale', lang)
|
||||
this.getDict()
|
||||
// 处理gis上已添加的entity
|
||||
viewer.entities.values.forEach(el => {
|
||||
if (el.id.includes('area')) {
|
||||
let obj = el.label.text._value.split('-')
|
||||
obj[1] = gisLabels.planArea[lang]
|
||||
el.label.text = obj.join('-')
|
||||
}
|
||||
if (el.id.includes('planLine')) {
|
||||
let obj = el.label.text._value.split('-')
|
||||
obj[0] = gisLabels.planAirline[lang]
|
||||
obj[2] = gisLabels.startPoint[lang]
|
||||
el.label.text = obj.join('-')
|
||||
}
|
||||
});
|
||||
},
|
||||
goHome() {
|
||||
this.SET_MENUS_CHOSE('1')
|
||||
|
||||
@ -33,6 +33,7 @@ import PicturesUpload from '../pictures-upload/index.vue'
|
||||
import RightSlide from '@/components/RightSlide.vue'
|
||||
import LeftSlide from '@/components/LeftSlide.vue'
|
||||
import { debounce } from '@/utils'
|
||||
import { gisLabels } from '@/lang/index'
|
||||
let handler = undefined
|
||||
let broadcastChannel = null
|
||||
let broadcastChannelInterval = null
|
||||
@ -57,6 +58,7 @@ let radarSceneEntity = {}
|
||||
let sceneEntity = {}
|
||||
let taskListResource = []
|
||||
let orthoManager = null
|
||||
const lang = window.localStorage.getItem('locale') || 'zh_CN'
|
||||
export default {
|
||||
name: 'TwinSituation',
|
||||
props: {
|
||||
@ -1164,8 +1166,9 @@ export default {
|
||||
allPositions = allPositions.concat(positions)
|
||||
let entity = viewer.entities.add({
|
||||
position: positions[0],
|
||||
id: `${taskId}-area`,
|
||||
label: {
|
||||
text: `${taskName}任务-规划区域${index + 1}`,
|
||||
text: `${taskName}-${gisLabels.planArea[lang]}-${index + 1}`,
|
||||
disableDepthTestDistance: 10000,
|
||||
font: '14px sans-serif',
|
||||
fillColor: DT.Cesium.Color.RED,
|
||||
@ -1193,8 +1196,9 @@ export default {
|
||||
allPositions.push(position)
|
||||
let entity = viewer.entities.add({
|
||||
position,
|
||||
id: `${taskId}-area`,
|
||||
label: {
|
||||
text: `${taskName}任务-规划区域${index + 1}`,
|
||||
text: `${taskName}-${gisLabels.planArea[lang]}-${index + 1}`,
|
||||
disableDepthTestDistance: 10000,
|
||||
font: '14px sans-serif',
|
||||
fillColor: DT.Cesium.Color.RED,
|
||||
|
||||
@ -1327,7 +1327,7 @@
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: calc(100vh - 60px);
|
||||
width: 360px;
|
||||
width: 400px;
|
||||
transform: translateX(-50%);
|
||||
background-color: $--color-black-1-alpha;
|
||||
padding: 6px 10px;
|
||||
@ -1347,9 +1347,10 @@
|
||||
align-items: center;
|
||||
|
||||
.is-label {
|
||||
text-align: center;
|
||||
flex: none;
|
||||
color: $--color-text-1;
|
||||
width: 60px;
|
||||
width: 90px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import * as DT from 'dt-sdk'
|
||||
import { viewer } from '@/components/dt-scene'
|
||||
import { gisLabels } from '@/lang/index'
|
||||
export default class UavTarget {
|
||||
planLines = new DT.Cesium.AssociativeArray()
|
||||
uavEntity = null
|
||||
@ -14,7 +15,7 @@ export default class UavTarget {
|
||||
this.uavId = options.uavId
|
||||
this.jobName = options.jobName
|
||||
this.startAltitude = options.startAltitude
|
||||
|
||||
this.lang = window.localStorage.getItem('locale') || 'zh_CN'
|
||||
this.addPlanLine(options.airlineList)
|
||||
console.log(options, '飞机数据');
|
||||
if (options.startLon) {
|
||||
@ -336,7 +337,7 @@ export default class UavTarget {
|
||||
id,
|
||||
position: positions[0],
|
||||
label: {
|
||||
text: `规划航线${index + 1}起点`,
|
||||
text: `${gisLabels.planAirline[this.lang]}-${index + 1}-${gisLabels.startPoint[this.lang]}`,
|
||||
disableDepthTestDistance: 10000,
|
||||
font: '14px sans-serif',
|
||||
fillColor: DT.Cesium.Color.RED,
|
||||
|
||||
@ -553,42 +553,6 @@ export default {
|
||||
// window.open(window.config.homeUrl + 'monitor', '_blank')
|
||||
// TODO
|
||||
// this.resourceClick(this.resourceList.data[0])
|
||||
return;
|
||||
viewer.entities.add({
|
||||
show: true,
|
||||
id: 'image1',
|
||||
name: '美女1',
|
||||
rectangle: {
|
||||
coordinates: DT.Cesium.Rectangle.fromDegrees(
|
||||
115.914508,
|
||||
40.357867,
|
||||
115.916869,
|
||||
40.361485
|
||||
),
|
||||
height: 0,
|
||||
material: new DT.Cesium.ImageMaterialProperty({
|
||||
image: process.env.BASE_URL + 'static/img/meinv.png',
|
||||
transparent: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
viewer.entities.add({
|
||||
show: true,
|
||||
id: 'image2',
|
||||
name: '美女2',
|
||||
rectangle: {
|
||||
coordinates: DT.Cesium.Rectangle.fromDegrees(
|
||||
115.914508,
|
||||
40.357867,
|
||||
115.916869,
|
||||
40.361485
|
||||
),
|
||||
height: 100,
|
||||
material: new DT.Cesium.ImageMaterialProperty({
|
||||
image: process.env.BASE_URL + 'static/img/meinv.png',
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (handler) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user