提交 3ea3563e 作者: “kai”

feat(i18n): 添加多语言支持并国际化UI文本

实现Vue应用的国际化功能,包括:
1. 新增i18n配置文件和语言资源
2. 集成vue-i18n库
3. 国际化所有UI组件中的静态文本
4. 添加中英俄三种语言支持
5. 实现语言切换和持久化存储

重构现有组件以支持动态文本替换,包括:
1. 表单标签和按钮文本
2. 状态提示和错误消息
3. 菜单项和对话框标题
4. 表格列名和工具提示
5. 日期时间选择器等表单控件

新增语言资源文件:
1. 中文(zh)
2. 英文(en)
3. 俄文(ru)

修改构建配置以支持多语言打包
上级 2ffa6275
......@@ -12,7 +12,8 @@
"element-ui": "^2.15.14",
"js-base64": "^3.7.7",
"url-loader": "^4.1.1",
"vue": "^2.6.14"
"vue": "^2.6.14",
"vue-i18n": "^8.28.2"
},
"devDependencies": {
"@babel/core": "^7.12.16",
......@@ -12766,6 +12767,13 @@
"dev": true,
"license": "MIT"
},
"node_modules/vue-i18n": {
"version": "8.28.2",
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-8.28.2.tgz",
"integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==",
"deprecated": "Vue I18n v8.x has reached EOL and is no longer actively maintained. About maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html",
"license": "MIT"
},
"node_modules/vue-loader": {
"version": "17.4.2",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.4.2.tgz",
......
......@@ -13,7 +13,8 @@
"element-ui": "^2.15.14",
"js-base64": "^3.7.7",
"url-loader": "^4.1.1",
"vue": "^2.6.14"
"vue": "^2.6.14",
"vue-i18n": "^8.28.2"
},
"devDependencies": {
"@babel/core": "^7.12.16",
......
<template>
<MMCFlightControlCenter
/<template>
<MMCFlightControlCenter
style="width: 100%; height: 100%;"
v-if="userInfo"
:url="url"
......@@ -34,6 +34,8 @@
<script>
export default {
name: "App",
components: {
},
data() {
return {
url: {
......@@ -57,6 +59,7 @@ export default {
taskListGetCB: null, //获取任务数据回调
useTask: false, //使用任务进行航线选择
callbackList: {},
showI18nTest: true, // 显示i18n测试组件
};
},
computed: {},
......
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import ElementLocale from 'element-ui/lib/locale'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import enLocale from 'element-ui/lib/locale/lang/en'
import ruLocale from 'element-ui/lib/locale/lang/ru-RU'
import messages from './messages'
Vue.use(VueI18n)
// 合并ElementUI的语言包
const mergedMessages = {
zh: {
...messages.zh,
...zhLocale
},
en: {
...messages.en,
...enLocale
},
ru: {
...messages.ru,
...ruLocale
}
}
const i18n = new VueI18n({
locale: localStorage.getItem('language') || 'en', // 从localStorage获取语言设置,默认英文
fallbackLocale: 'zh', // 回退语言
messages: mergedMessages
})
// 同步ElementUI的语言设置
ElementLocale.i18n((key, value) => i18n.t(key, value))
// 监听语言变化,保存到localStorage
i18n.vm.$watch('locale', (newLocale) => {
localStorage.setItem('language', newLocale)
})
// 监听localStorage中language值的变化
function watchLanguageChange() {
let intervalId = null
let currentLanguage = localStorage.getItem('language') || 'en'
// 使用storage事件监听localStorage变化(跨标签页)
const storageHandler = (e) => {
if (e.key === 'language' && e.newValue && e.newValue !== i18n.locale) {
currentLanguage = e.newValue
i18n.locale = e.newValue
}
}
window.addEventListener('storage', storageHandler)
// 定期检查localStorage中的language值(同页面内变化)
intervalId = setInterval(() => {
const newLanguage = localStorage.getItem('language') || 'en'
if (newLanguage !== currentLanguage && newLanguage !== i18n.locale) {
currentLanguage = newLanguage
i18n.locale = newLanguage
}
}, 300) // 每300ms检查一次,降低频率
// 返回清理函数
return () => {
if (intervalId) {
clearInterval(intervalId)
intervalId = null
}
window.removeEventListener('storage', storageHandler)
}
}
// 启动监听
const cleanupLanguageWatch = watchLanguageChange()
// 在页面卸载时清理资源
window.addEventListener('beforeunload', () => {
if (cleanupLanguageWatch) {
cleanupLanguageWatch()
}
})
export default i18n
\ No newline at end of file
import zh from './zh'
import en from './en'
import ru from './ru'
export default {
zh,
en,
ru
}
\ No newline at end of file
import locales from './locales'
export default locales
\ No newline at end of file
......@@ -7,6 +7,7 @@ import "element-ui/lib/theme-chalk/index.css";
import '../../dist/style/index.css'; */
import MMCSTL from "../../index";
import "./styles/reset.css";
import i18n from './i18n'; // 引入i18n配置
import Bus from "@/assets/ligature.js";
window.$Bus = Bus;
Vue.config.productionTip = false;
......@@ -21,6 +22,7 @@ function render(props = {}) {
const { container } = props;
instance = new Vue({
i18n, // 添加i18n实例
render: (h) => h(App),
store: new Vuex.Store({}),
}).$mount(container ? container.querySelector("#app") : "#app");
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -57,6 +57,7 @@
"url": "^0.11.0",
"vue": "^2.6.14",
"vue-clipboard2": "^0.3.3",
"vue-i18n": "^11.1.5",
"vue-router": "^3.5.2",
"vuex": "^3.6.2"
}
......
......@@ -14,7 +14,7 @@
></div>
</div>
</div>
<span v-if="item.statusType === 3" class="size__text">{{"已关机"}}</span>
<span v-if="item.statusType === 3" class="size__text">{{ $t('common.已关机') }}</span>
<span v-else class="size__text">{{item.chargeRemaining || 100}}%</span>
</div>
......
......@@ -5,21 +5,21 @@
{{ _uavData.gps.relativeAlt }}
</div>
m
<div class="cf infor">飞行高度</div>
<div class="cf infor">{{ $t('common.飞行高度') }}</div>
</div>
<div class="infoBox cf">
<div class="dib title">
{{ _uavData.gps.absoluteAlt }}
</div>
m
<div class="cf">海拔高度</div>
<div class="cf">{{ $t('common.海拔高度') }}</div>
</div>
<div class="infoBox cf">
<div class="dib title">
{{ _uavData.flyDistance }}
</div>
m
<div class="cf">飞行里程</div>
<div class="cf">{{ $t('common.飞行里程') }}</div>
</div>
<div class="infoBox cf">
......@@ -27,27 +27,27 @@
{{ _uavData.distanceToHome }}
</div>
m
<div class="cf">起点距离</div>
<div class="cf">{{ $t('common.起点距离') }}</div>
</div>
<div class="infoBox cf">
<div class="dib title">
{{ flyTimeFormat }}
</div>
<div class="cf">飞行时间</div>
<div class="cf">{{ $t('common.飞行时间') }}</div>
</div>
<div class="infoBox cf">
<div class="dib title">
{{_uavData.groundSpeed }}
</div>
m/s
<div class="cf">飞行速度</div>
<div class="cf">{{ $t('common.飞行速度') }}</div>
</div>
<div class="infoBox cf">
<div class="dib title" :style="up ? 'color: #ff2626':'color: #00f5ff'">
{{ _uavData.velocityZ }}
</div>
m/s
<div class="cf">爬升率</div>
<div class="cf">{{ $t('common.爬升率') }}</div>
</div>
</div>
</template>
......
......@@ -3,29 +3,29 @@
<div class="h32 lh32 headerBox jcsb pl16 pr16">
<div class="title">
<span class="w1 dib mr10 h16 mt4" style="background: #FFBD36;border:1px solid #FFBD36"></span>
<span>接管记录</span>
<span>{{ $t('common.接管记录') }}</span>
</div>
<div class="cp FFBD36 fwb" @click="$emit('exit')">关闭</div>
<div class="cp FFBD36 fwb" @click="$emit('exit')">{{ $t('common.关闭') }}</div>
</div>
<div class="pl16 pr16 pb16 contentBox mt16">
<div class="hd">
<div>无人机名称</div>
<div>无人机所属单位</div>
<div>接管状态</div>
<div>当前控制单位</div>
<div>操作</div>
<div>{{ $t('common.无人机名称') }}</div>
<div>{{ $t('common.无人机所属单位') }}</div>
<div>{{ $t('common.接管状态') }}</div>
<div>{{ $t('common.当前控制单位') }}</div>
<div>{{ $t('common.操作') }}</div>
</div>
<div class="bd" v-for="(item,index) in deviceList" :key="index">
<div>{{item.deviceName}}</div>
<div>{{item.org}}</div>
<div class="" style="color:#FFBD36 ;" v-if="item.status=='被接管'">{{item.status}}</div>
<div class="" v-else style="color:#31DB24 ;">{{item.status}}</div>
<div class="" style="color:#FFBD36 ;" v-if="item.status=='被接管'">{{ $t('common.被接管') }}</div>
<div class="" v-else style="color:#31DB24 ;">{{ $t('common.正常') }}</div>
<div>{{item.takeOverOrg}}-{{item.takeOverUser}}</div>
<div class="cp ">
<el-tooltip :content="item.status" placement="bottom">
<div class="w20 h20 opretion2" v-if="item.status=='被接管'"></div>
</el-tooltip>
<el-tooltip content="退出接管" placement="bottom">
<el-tooltip :content="$t('common.退出接管')" placement="bottom">
<div class="w20 h20 opretion" v-if="item.status!='被接管'" @click="exit(item)"></div>
</el-tooltip>
</div>
......@@ -54,9 +54,9 @@
} */
},
exit(item) {
this.$confirm('请确认是否进行退出接管操作?', '安全确认', {
cancelButtonText: '取消',
confirmButtonText: '确定',
this.$confirm(this.$t('common.请确认是否进行退出接管操作'), this.$t('common.安全确认'), {
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false
}).then(async () => {
......@@ -70,7 +70,7 @@
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
message: this.$t('common.已取消操作')
});
});
......
......@@ -3,9 +3,9 @@
<div class="nset_control_box_header lh34">
<div class="title ml10">
<img src="~./assets/mount_head.png" />
<div class="font">操作区域</div>
<div class="font">{{ $t('controlList.操作区域') }}</div>
</div>
<div class="exit mr10 cp" @click="$emit('exit')">关闭</div>
<div class="exit mr10 cp" @click="$emit('exit')">{{ $t('common.关闭') }}</div>
</div>
<div class="nset_control_box_area p10">
<div class="wrj" v-show="!controlTypeFlag">
......@@ -15,41 +15,41 @@
</div> -->
<div class="w48 h48 item mb3 cf tc cp" @click="$emit('uav-location')">
<SymbolIcon icon="guiji" />
<span class="dib f8">轨迹</span>
<span class="dib f8">{{ $t('controlList.轨迹') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" @click="wrjfn(0)">
<SymbolIcon icon="jixufeihang1" />
<span class="dib f8">继续飞行</span>
<span class="dib f8">{{ $t('controlList.继续飞行') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" @click="wrjfn(1)">
<SymbolIcon icon="zantingfeihang1" />
<span class="dib f8">暂停飞行</span>
<span class="dib f8">{{ $t('controlList.暂停飞行') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" @click="handclick">
<SymbolIcon icon="anquanjiangla1" />
<span class="dib f8">安全降落</span>
<span class="dib f8">{{ $t('controlList.紧急迫降') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" v-if="!wsShow" @click="$emit('yxrz')">
<SymbolIcon icon="yunhangrizhi2" />
<span class="dib f8">运行日志</span>
<span class="dib f8">{{ $t('controlList.运行日志') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" @click="zdfx">
<SymbolIcon icon="tiaozhuandaozuobiao" />
<span class="dib f8">指点飞行</span>
<span class="dib f8">{{ $t('controlList.指点飞行') }}</span>
</div>
</div>
</div>
<!-- 飞控 无人机 安全降落 -->
<el-dialog :visible.sync="safetyNotice" width="30%" :append-to-body="true" style="margin-top: 20vh">
<div class="endrenwu">
<div class="tishiyu">安全降落</div>
<div class="tishiyu">{{ $t('controlList.紧急迫降') }}</div>
<div class="queding">
无人机即将原地降落,请确认无人机下方是否安全!
{{ $t('controlList.无人机即将原地降落请确认无人机下方是否安全') }}
</div>
<div class="btn_kuang">
<div class="btn btn_lan" @click="safetyNotice = false">取消</div>
<div class="btn btn_lan" @click="safetyNotice = false">{{ $t('common.取消') }}</div>
<div style="width: 20px"></div>
<div class="btn btn_lv" @click="remind">确定</div>
<div class="btn btn_lv" @click="remind">{{ $t('common.确定') }}</div>
</div>
</div>
</el-dialog>
......@@ -138,7 +138,7 @@ export default {
});
}
this.safetyNotice = false;
this.$message.success("操作成功");
this.$message.success(this.$t('messages.操作成功'));
},
change(item) {
if (item.chargerPower == 2) {
......@@ -190,7 +190,7 @@ export default {
});
}
}
this.$message.success("操作成功");
this.$message.success(this.$t('messages.操作成功'));
},
addModeelPoint(viewer, position, name) {
......@@ -225,7 +225,7 @@ export default {
// 指点飞行 wgs84
this.zdfcFlag = false;
let position = null;
this.$message("请点击地图获取目标位置");
this.$message(this.$t('controlList.请点击地图获取目标位置'));
handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
handler.setInputAction((movement) => {
let earthPosition = viewer.camera.pickEllipsoid(
......@@ -250,11 +250,11 @@ export default {
(Point = this.addModeelPoint(window.viewer, position, "目标点"));
// 一键返航
this.$confirm(
"位置获取成功,请确认是否进行指点模式飞行?",
"引导飞行确认",
this.$t('controlList.位置获取成功请确认是否进行指点模式飞行'),
this.$t('controlList.引导飞行确认'),
{
cancelButtonText: "取消",
confirmButtonText: "确定",
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
}
......@@ -307,7 +307,7 @@ export default {
handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
this.$message({
type: "info",
message: "已取消操作",
message: this.$t('controlList.已取消操作'),
});
});
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
......@@ -419,6 +419,7 @@ export default {
.item {
padding: 5px;
text-align:center;
background-image: linear-gradient(179deg,
#1773b6 0%,
#3484c3 36%,
......@@ -434,6 +435,7 @@ export default {
justify-content: space-between;
.item {
text-align:center;
padding: 5px;
background-image: linear-gradient(179deg,
#1773b6 0%,
......
......@@ -3,13 +3,13 @@
<div class="dialog-header" v-interact>
<div class="dialog-header__icon" />
<div class="dialog-header__title">
快速建模
{{ $t('controlMenu.快速建模') }}
</div>
<div class="dialog-header_close" style="color:#fff" @click="() => $emit('close')">关闭</div>
<div class="dialog-header_close" style="color:#fff" @click="() => $emit('close')">{{ $t('controlMenu.关闭') }}</div>
</div>
<div class="dialog-content w267">
<el-cascader size="mini" filterable popper-class="cpt-observe-mspace-dashboard-airway_popper" v-model="taskCateId"
:options="airway_list" clearable :show-all-levels="false" placeholder="请选择任务" :props="{
:options="airway_list" clearable :show-all-levels="false" :placeholder="$t('controlMenu.请选择任务')" :props="{
children: 'children',
label: 'taskTitle',
value: 'id',
......@@ -22,17 +22,17 @@
</el-tooltip>
</template>
</el-cascader>
<el-select class="mt10" v-model="type" size="mini" placeholder="请选择类型">
<el-option label="图片" :value="0"></el-option>
<el-option label="视频" :value="1"></el-option>
<el-select class="mt10" v-model="type" size="mini" :placeholder="$t('controlMenu.请选择类型')">
<el-option :label="$t('controlMenu.图片')" :value="0"></el-option>
<el-option :label="$t('controlMenu.视频')" :value="1"></el-option>
</el-select>
<div class="jcsb w267 h30 mt30">
<div class="dec mt5">1</div><span class="dib cf ml10 lh30"> 快速建模</span>
<div class="btn fr cf h30 lh30 w80 cp" @click="jmFn(1)">启动</div>
<div class="dec mt5">1</div><span class="dib cf ml10 lh30"> {{ $t('controlMenu.快速建模') }}</span>
<div class="btn fr cf h30 lh30 w80 cp" @click="jmFn(1)">{{ $t('controlMenu.启动') }}</div>
</div>
<div class="jcsb mt18 w267 h30">
<div class="dec mt5">2</div><span class="dib cf lh30 ml10">数据处理</span>
<div class="btn fr cf h30 lh30 w80 cp" @click="jmFn(2)">启动</div>
<div class="dec mt5">2</div><span class="dib cf lh30 ml10">{{ $t('controlMenu.数据处理') }}</span>
<div class="btn fr cf h30 lh30 w80 cp" @click="jmFn(2)">{{ $t('controlMenu.启动') }}</div>
</div>
</div>
</div>
......@@ -70,8 +70,8 @@ export default {
a.href = `MMCEagleEye:// `
a.click()
} else {
if(!this.taskCateId) return this.$message.warning('请选择任务!')
if(this.type==null ) return this.$message.warning('请选择类型!')
if(!this.taskCateId) return this.$message.warning(this.$t('controlMenu.请选择任务'))
if(this.type==null ) return this.$message.warning(this.$t('controlMenu.请选择类型'))
let a = document.createElement("a");
a.href = `MMCPosTool://&deviceId=${deviceHardId}enddeviceId&taskId=${this.taskCateId}endtaskId&type=${this.type}endtype`
a.click()
......@@ -97,17 +97,17 @@ export default {
let airway_list = [
{
id: "警情任务",
taskTitle: "警情任务",
taskTitle: this.$t('controlMenu.警情任务'),
children: jqList,
},
{
id: "常态任务",
taskTitle: "常态任务",
taskTitle: this.$t('controlMenu.常态任务'),
children: ctList,
},
{
id: "临时任务",
taskTitle: "临时任务",
taskTitle: this.$t('controlMenu.临时任务'),
children: lsList,
},
];
......
......@@ -3,25 +3,25 @@
<div class="dialog-header" v-interact>
<div class="dialog-header__icon" />
<div class="dialog-header__title">
车辆识别
{{ $t('controlMenu.车辆识别') }}
</div>
<div class="dialog-header_close" style="color:#fff" @click="()=>$emit('close')">关闭</div>
<div class="dialog-header_close" style="color:#fff" @click="()=>$emit('close')">{{ $t('controlMenu.关闭') }}</div>
</div>
<div class="dialog-content" v-infinite-scroll="load">
<template v-if="list.length > 0" >
<div v-for="(item, i) in list" :key="i" class="car-item">
<div class="car-img">
<img class="car-img__img" :src="imgUrl + item.imageUrl" />
<div class="car-img__label">{{ item.plateNum || '暂无' }}</div>
<div class="car-img__label">{{ item.plateNum || $t('controlMenu.暂无') }}</div>
</div>
<div class="car-form">
<div>地点:{{ item.addr || item.findAddress || '暂无' }}</div>
<div>时间:{{ item.findTime || '暂无' }}</div>
<div>{{ $t('controlMenu.地点') }}{{ item.addr || item.findAddress || $t('controlMenu.暂无') }}</div>
<div>{{ $t('controlMenu.时间') }}{{ item.findTime || $t('controlMenu.暂无') }}</div>
</div>
</div>
</template>
<template v-else>
<div style="text-align: center; width: 100%;">暂无数据</div>
<div style="text-align: center; width: 100%;">{{ $t('controlMenu.暂无数据') }}</div>
</template>
</div>
</div>
......@@ -70,7 +70,7 @@ export default {
},
async getCarList(){
if(!this.uavId){
this.$message.error('请选择无人机');
this.$message.error(this.$t('controlMenu.请选择无人机'));
return;
}
......
......@@ -3,9 +3,9 @@
<div class="dialog-header" v-interact>
<div class="dialog-header__icon" />
<div class="dialog-header__title">
人脸识别
{{ $t('controlMenu.人脸识别') }}
</div>
<div class="dialog-header_close" style="color:#fff" @click="()=>$emit('close')">关闭</div>
<div class="dialog-header_close" style="color:#fff" @click="()=>$emit('close')">{{ $t('controlMenu.关闭') }}</div>
</div>
<div class="dialog-content" v-infinite-scroll="load">
<template v-if="list.length > 0">
......@@ -16,7 +16,7 @@
</div>
<div class="rate-round">
<div class="rate-round__value">{{ Number(item.similarity).toFixed(2) }}%</div>
<div class="rate-routd__text" @click="onDetail(item)">详情</div>
<div class="rate-routd__text" @click="onDetail(item)">{{ $t('controlMenu.详情') }}</div>
</div>
<div class="rate-img rate-img--contrary">
<img :src="imgUrl + item.snapImageUrl" />
......@@ -25,47 +25,47 @@
<div class="rate-form" v-if="item.show">
<div class="rate-form-item">
<div class="rate-form-item__label">
姓名
{{ $t('controlMenu.姓名') }}
</div>
<div class="rate=form-item__value">
{{ item.userName || '暂无' }}
{{ item.userName || $t('controlMenu.暂无') }}
</div>
</div>
<div class="rate-form-item">
<div class="rate-form-item__label">
出生年份
{{ $t('controlMenu.出生年份') }}
</div>
<div class="rate=form-item__value">
{{ item.birthday || '暂无' }}
{{ item.birthday || $t('controlMenu.暂无') }}
</div>
</div>
<div class="rate-form-item">
<div class="rate-form-item__label">
发现时间
{{ $t('controlMenu.发现时间') }}
</div>
<div class="rate=form-item__value">
{{ item.occurTime || '暂无' }}
{{ item.occurTime || $t('controlMenu.暂无') }}
</div>
</div>
<div class="rate-form-item">
<div class="rate-form-item__label">
发现地点
{{ $t('controlMenu.发现地点') }}
</div>
<div class="rate=form-item__value">
{{ item.addr || item.address || '暂无' }}
{{ item.addr || item.address || $t('controlMenu.暂无') }}
</div>
</div>
<div class="rate-form-item">
<div class="rate-form-item__label">
身份证号
{{ $t('controlMenu.身份证号') }}
</div>
<div class="rate=form-item__value">
{{ item.idCard || '暂无' }}
{{ item.idCard || $t('controlMenu.暂无') }}
</div>
</div>
<div class="rate-form-item">
<div class="rate-form-item__label">
AI识别
{{ $t('controlMenu.AI识别') }}
</div>
<div class="rate=form-item__value">
<template v-if="item.labels && item.labels.length">
......@@ -74,7 +74,7 @@
</div>
</template>
<template v-else>
暂无
{{ $t('controlMenu.暂无') }}
</template>
</div>
</div>
......@@ -82,7 +82,7 @@
</div>
</template>
<template v-else>
<div style="text-align: center; width: 100%;">暂无数据</div>
<div style="text-align: center; width: 100%;">{{ $t('controlMenu.暂无数据') }}</div>
</template>
</div>
</div>
......@@ -144,7 +144,7 @@ export default {
},
async getFaceList(){
if(!this.uavId){
this.$message.error('请选择无人机');
this.$message.error(this.$t('controlMenu.请选择无人机'));
return;
}
/* let res = await API.HOME.getFaceuavvideoMsg({
......
......@@ -2,17 +2,17 @@
<div class="traffic dialog1027">
<div class="dialog-header" v-interact>
<div class="dialog-header__icon" />
<div class="dialog-header__title">交通指引</div>
<div class="dialog-header_close" style="color:#fff" @click="()=>$emit('close')">关闭</div>
<div class="dialog-header__title">{{ $t('controlMenu.交通指引') }}</div>
<div class="dialog-header_close" style="color:#fff" @click="()=>$emit('close')">{{ $t('controlMenu.关闭') }}</div>
</div>
<div class="dialog-content">
<div class="step active">
<div class="step-box">
<div class="step-icon">1</div>
<div class="step-desc">无人机飞往交通事故现场进行拍摄取证</div>
<div class="step-desc">{{ $t('controlMenu.无人机飞往交通事故现场进行拍摄取证') }}</div>
</div>
<div class="btn-box1027">
<div class="btn1027" @click="onTakePhoto">取证</div>
<div class="btn1027" @click="onTakePhoto">{{ $t('controlMenu.取证') }}</div>
</div>
<div class="imgList mt8" v-if="xcimg">
<el-image
......@@ -26,10 +26,10 @@
<div class="step">
<div class="step-box">
<div class="step-icon">2</div>
<div class="step-desc">激活事故绘制软件并上传事故图</div>
<div class="step-desc">{{ $t('controlMenu.激活事故绘制软件并上传事故图') }}</div>
</div>
<div class="btn-box1027">
<div class="btn1027" @click="onActiveApp">激活软件</div>
<div class="btn1027" @click="onActiveApp">{{ $t('controlMenu.激活软件') }}</div>
<el-upload
class="dib"
accept=".png, .jpg, .image, .jpeg"
......@@ -39,7 +39,7 @@
name="uploadFiles"
:show-file-list="false"
>
<div class="btn1027" style="margin-right: 0">上传事故图</div>
<div class="btn1027" style="margin-right: 0">{{ $t('controlMenu.上传事故图') }}</div>
</el-upload>
</div>
<div class="imgList mt8" v-if="image">
......@@ -54,10 +54,10 @@
<div class="step">
<div class="step-box">
<div class="step-icon">3</div>
<div class="step-desc">生成交通事故报告</div>
<div class="step-desc">{{ $t('controlMenu.生成交通事故报告') }}</div>
</div>
<div class="btn-box1027">
<div class="btn1027" @click="onExportReport">导出报告</div>
<div class="btn1027" @click="onExportReport">{{ $t('controlMenu.导出报告') }}</div>
</div>
</div>
</div>
......@@ -107,15 +107,15 @@ export default {
const dateTime = moment.format("yyyyMMddhhmmss");
saveAs(blob, `${dateTime}.jpg`);
let fd2 = new FormData();
fd2.append("uploadFile", blob, `拍照.png`);
fd2.append("uploadFile", blob, `${this.$t('controlMenu.拍照')}.png`);
fd2.append("taskId", this.taskId);
fd2.append("deviceHardId", this.uavId);
/* let res2 = await API.FCKERNEL.Upload(fd2);
console.log(res2,"urlrel");
this.xcimg = '/uploads'+ res2.fileKey;
this.$message.success("取证成功!");
this.$message.success(this.$t('controlMenu.取证成功'));
this.imageUrl.push(this.xcimg);
this.imageName.push('拍照.png');
this.imageName.push(`${this.$t('controlMenu.拍照')}.png`);
let res1 = await API.ACCIDENT.createTaskWord({
imageUrl: this.imageUrl,
imageName: this.imageName,
......@@ -154,9 +154,9 @@ export default {
this.imageName = [];
this.imageUrl = [];
this.baseList = [];
this.$message.success("上传成功");
this.$message.success(this.$t('controlMenu.上传成功'));
} else {
this.$message.error(res.msg || "上传失败");
this.$message.error(res.msg || this.$t('controlMenu.上传失败'));
}
}
}
......
......@@ -47,11 +47,11 @@ import mqtt from "mqtt";
export default {
props: {
title: {
default: "喊话器",
default: function() { return this.$t ? this.$t('controlMenu.喊话器') : '喊话器' },
type: String
},
exit: {
default: "关闭",
default: function() { return this.$t ? this.$t('controlMenu.关闭') : '关闭' },
type: String
},
PoliceKeyCode: {
......@@ -71,17 +71,17 @@ export default {
{
id: 1,
name: "ItemA",
title: "文字转语音"
title: this.$t ? this.$t('controlMenu.文字转语音') : '文字转语音'
},
{
id: 2,
name: "ItemB",
title: "语音广播"
title: this.$t ? this.$t('controlMenu.语音广播') : '语音广播'
},
{
id: 3,
name: "ItemC",
title: "音频文件"
title: this.$t ? this.$t('controlMenu.音频文件') : '音频文件'
}
],
mqtt: {
......
......@@ -4,15 +4,15 @@
<div class="wih00 pr mountControllerTitle" v-interact>
<div class="left ml8">
<img src="~../assets/mount_head.png" />
<div class="title">高清变焦相机</div>
<div class="title">{{ $t('高清变焦相机') }}</div>
</div>
<div @click="$emit('close')" class="close">关闭</div>
<div @click="$emit('close')" class="close">{{ $t('关闭') }}</div>
</div>
<div class="jcsb mt10">
<div class="ml20">
<div class="form">
<div class="form_item">
<span class="form_item_title" style="line-height: 26px; margin: 0 0px 0 -11px">控制速度:</span>
<span class="form_item_title" style="line-height: 26px; margin: 0 0px 0 -11px">{{ $t('控制速度') }}:</span>
<!-- <el-select
v-model="speed"
clearable
......@@ -35,7 +35,7 @@
</div>
</div>
<div class="form_item">
<span class="form_item_title">云台模式</span>
<span class="form_item_title">{{ $t('云台模式') }}</span>
<div>
<div class="mono-long">
<div class="mono-left mono_box" :class="{ active: holderModelDom == 0 }" @click="handleClick(2, 0)">
......@@ -46,14 +46,14 @@
</div>
</div>
<div class="text">
<div class="text-left">锁定</div>
<div class="text-right">跟随</div>
<div class="text-right">回中</div>
<div class="text-left">{{ $t('锁定') }}</div>
<div class="text-right">{{ $t('跟随') }}</div>
<div class="text-right">{{ $t('回中') }}</div>
</div>
</div>
</div>
<div class="form-item w228 mb10" style="display: flex;justify-content: space-between;">
<div class="label-box">视频指点:</div>
<div class="label-box">{{ $t('视频指点') }}:</div>
<div class="input-box cf">
<el-radio-group @change="handle_change_dj_mode" v-model="dj_mode">
<el-radio size="mini" v-for="item in drd.dj_mode" :key="item.id" :label="item.id">
......@@ -63,7 +63,7 @@
</div>
</div>
<div class="form_item">
<span class="form_item_title mt5">变焦</span>
<span class="form_item_title mt5">{{ $t('变焦') }}</span>
<div class="jcsb">
<div class="symbol mr10 mt5" @mousedown="backFn" @mouseup="zoomStop(1)">
-
......@@ -76,7 +76,7 @@
</div>
</div>
<div class="form_item">
<span class="form_item_title mt5">聚焦</span>
<span class="form_item_title mt5">{{ $t('聚焦') }}</span>
<div class="jcsb">
<div class="symbol mr10 mt5" @mousedown="camerafocusFn(0)" @mouseup="camerafocus(1)">
-
......@@ -89,7 +89,7 @@
</div>
</div>
<div class="form_item">
<span class="form_item_title">俯仰</span>
<span class="form_item_title">{{ $t('俯仰') }}</span>
<div class="speedC">
<div
class="pitch"
......@@ -121,7 +121,7 @@
</div>
<div class="xingji">
<div class="form">
<div class="mb15 f14 dib">相机模式</div>
<div class="mb15 f14 dib">{{ $t('相机模式') }}</div>
<div class="form_item">
<div>
<div class="mono-short">
......@@ -129,8 +129,8 @@
<div class="mono-right mono_box" :class="{ active: activeBox3 == 2 }" @click="handleClick(3, 2)"></div>
</div>
<div class="jcsb cf">
<div class="text-left">录像</div>
<div class="text-right">拍照</div>
<div class="text-left">{{ $t('录像') }}</div>
<div class="text-right">{{ $t('拍照') }}</div>
</div>
</div>
</div>
......@@ -197,7 +197,7 @@
dj_mode: 0,
regList:[
{
val:"复位",
val: this.$t('复位'),
num:0
},
{
......@@ -215,8 +215,8 @@
],
drd: {
dj_mode: [
{ id: 0, label: "关闭" },
{ id: 1, label: "打开" },
{ id: 0, label: this.$t('关闭') },
{ id: 1, label: this.$t('打开') },
]
},
// 控制挂载信息体
......
......@@ -3,22 +3,22 @@
<div class="title-box" v-interact>
<div class="title pl20">
<img src="~./assets/mount_head.png" />
<div class="font">运行监控日志</div>
<div class="font">{{ $t('common.运行监控日志') }}</div>
</div>
<div style="display: flex">
<div class="icon-box" @click="$emit('clear-msg')">
<span class="iconfont icon-qingchushuju"></span>
<!-- <span class="icon-text pr20">清除数据</span> -->
</div>
<div class="cf ml20 mr10 c70d" @click="$emit('exit')">关闭</div>
<div class="cf ml20 mr10 c70d" @click="$emit('exit')">{{ $t('common.关闭') }}</div>
</div>
</div>
<div class="ctx-box">
<div class="head mt7">
<div class="text-box pl100">
<div class="type">消息等级</div>
<div class="type">{{ $t('common.消息等级') }}</div>
</div>
<span class="text">消息内容</span>
<span class="text">{{ $t('common.消息内容') }}</span>
</div>
<div class="list-box">
<div class="item-box mt7" v-for="(item,index) in list" :key="index">
......
......@@ -9,10 +9,10 @@
</div>
<div class="stl-timed-task">
<div class="timed-task-header">
<div class="header__column flex2">序号</div>
<div class="header__column flex2">机库名称</div>
<div class="header__column status">状态</div>
<div class="header__column flex2">距离(km)</div>
<div class="header__column flex2">{{ $t('common.序号') }}</div>
<div class="header__column flex2">{{ $t('common.机库名称') }}</div>
<div class="header__column status">{{ $t('common.状态') }}</div>
<div class="header__column flex2">{{ $t('common.距离') }}({{ $t('common.公里') }})</div>
</div>
<div class="timed-task-main" v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.8)">
<div class="row" :class="{ single: i % 2 != 0 }" v-for="(item, i) in taskListAll" :key="item.id">
......@@ -20,7 +20,7 @@
<span class="f12">
<span class="mr10">
<el-checkbox v-model="item.active" :label="item.id"
:disabled="item.type === '忙碌'"></el-checkbox>
:disabled="item.type === $t('common.忙碌')"></el-checkbox>
</span>{{ i + 1 }}
</span>
</div>
......@@ -32,7 +32,7 @@
<div class="row__column flex2">
<el-tooltip class="item" effect="dark" :content="item.descText" placement="top-start">
<span class="f12"
:class="{ 'text-red': item.type === '忙碌', 'text-green': item.type == '空闲' }">{{
:class="{ 'text-red': item.type === $t('common.忙碌'), 'text-green': item.type == $t('common.空闲') }">{{
item.type
}}</span>
</el-tooltip>
......@@ -46,8 +46,8 @@
</div>
</div>
<div class="task-add-btn">
<div class="task-add__btn">生成航线</div>
<div class="task-add__btn">一键任务</div>
<div class="task-add__btn">{{ $t('common.生成航线') }}</div>
<div class="task-add__btn">{{ $t('common.一键任务') }}</div>
</div>
</div>
</el-dialog>
......@@ -81,13 +81,13 @@ export default {
taskListAll: [{
active: true,
name: "机库1",
type: "空闲",
type: this.$t('common.空闲'),
distance: 10
},
{
active: true,
name: "机库2",
type: "忙碌",
type: this.$t('common.忙碌'),
distance: 12
}],
localVisible: this.visible // 根据 prop 初始化本地状态
......
......@@ -15,8 +15,8 @@
<slot></slot>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="btn" @click="handleClose">取消</el-button>
<el-button type="primary" @click="confirm">确定</el-button>
<el-button class="btn" @click="handleClose">{{ $t('common.取消') }}</el-button>
<el-button type="primary" @click="confirm">{{ $t('common.确定') }}</el-button>
</span>
</el-dialog>
</template>
......
<template>
<div class="stl-timed-task">
<div class="cf m5 f12">
主机库状态<span :class="apronInfo.masterStatus ? 'green' : ' red'">{{
apronInfo.masterStatus ? "正常" : apronInfo.descText
{{ $t('common.主机库状态') }}<span :class="apronInfo.masterStatus ? 'green' : ' red'">{{
apronInfo.masterStatus ? $t('common.正常') : apronInfo.descText
}}</span>
</div>
<div class="timed-task-header">
<div class="header__column flex2">序号</div>
<div class="header__column flex2">机库名称</div>
<div class="header__column flex2">{{ $t('common.序号') }}</div>
<div class="header__column flex2">{{ $t('common.机库名称') }}</div>
<div class="header__column status">状态</div>
<div class="header__column flex2">距离(km)</div>
<div class="header__column status">{{ $t('common.状态') }}</div>
<div class="header__column flex2">{{ $t('common.距离') }}(km)</div>
</div>
<div
class="timed-task-main"
......@@ -58,7 +58,7 @@
'text-red': !item.slaveStatus,
'text-green': item.slaveStatus,
}"
>{{ item.slaveStatus ? "空闲" : "忙碌" }}</span
>{{ item.slaveStatus ? $t('common.空闲') : $t('common.忙碌') }}</span
>
</el-tooltip>
</div>
......@@ -77,15 +77,15 @@
</div>
</div>
<div class="task-add-btn" v-if="skipList.length > 0">
<div class="task-add__btn" @click="creareLine">生成航线</div>
<div class="task-add__btn" @click="oneClickTask">一键任务</div>
<div class="task-add__btn" @click="creareLine">{{ $t('common.生成航线') }}</div>
<div class="task-add__btn" @click="oneClickTask">{{ $t('common.一键任务') }}</div>
</div>
<div class="overlay" v-if="dialogVisible" v-interact>
<div class="dialog-header">
<div>
<img src="../../../../assets/images/mount_head.png" />
<span class="title vas">航线信息</span>
<span class="title vas">{{ $t('common.航线信息') }}</span>
</div>
<span class="cp w40 h40 cf pt15" @click="handleClose">X</span>
</div>
......@@ -96,12 +96,12 @@
{{ uav.uav && uav.uav.name }} --- {{ activeItem.name }}
</div>
<span style="color: #3388ff" class="ml56 cp pr130" @click="showLine"
>预览</span
>{{ $t('common.预览') }}</span
>
</div>
</div>
<div class="stl-timed-task-ht mt16 cf">
<div class="lh34 f12">飞行高度设置</div>
<div class="lh34 f12">{{ $t('common.飞行高度设置') }}</div>
<div class="bg">
<el-input
@blur="isEditing.height = false"
......@@ -113,11 +113,11 @@
<span v-else class="indent">{{ flightHeight }} m</span>
</div>
<div class="text ml10 cp lh34" @click="toggleEdit('height')">
编辑
{{ $t('common.编辑') }}
</div>
</div>
<div class="stl-timed-task-ht mt16">
<div class="lh34 f12">飞行速度设置</div>
<div class="lh34 f12">{{ $t('common.飞行速度设置') }}</div>
<div class="bg">
<el-input
@blur="isEditing.speed = false"
......@@ -128,16 +128,16 @@
/>
<span class="indent" v-else>{{ flightSpeed }} m/s</span>
</div>
<div class="text ml10 cp lh34" @click="toggleEdit('speed')">编辑</div>
<div class="text ml10 cp lh34" @click="toggleEdit('speed')">{{ $t('common.编辑') }}</div>
</div>
<div class="mt16">
飞行总距离:{{ activeItem.targetDistance?.toFixed(2) }}公里
{{ $t('common.飞行总距离') }}{{ activeItem.targetDistance?.toFixed(2) }}{{ $t('common.公里') }}
</div>
</div>
<div class="tc mt50">
<el-button size="mini" @click="handleClose">取消</el-button>
<el-button size="mini" @click="handleClose">{{ $t('common.取消') }}</el-button>
<el-button type="primary" size="mini" @click="handleConfirm"
>确定</el-button
>{{ $t('common.确定') }}</el-button
>
</div>
</div>
......@@ -156,7 +156,7 @@
</div>
</leapFrogFlighDialog> -->
<leapFrogDialog
title="蛙跳飞行"
:title="$t('common.蛙跳飞行')"
:visible.sync="leapFrogDialogVisible"
@confirm="handleConfirm"
></leapFrogDialog>
......@@ -188,12 +188,12 @@ export default {
activeItem: {},
descCodeList: {
0: "ok!",
4401: "降落点位置未设置!",
4402: "目标机库有无人机在舱内!",
4403: "主跳转机库无人机不在舱内!",
4404: "当前正在执行流程,非可跳跃状态!",
4405: "天气不宜飞行!",
4406: "电量不足已飞至目标机库!",
4401: this.$t('common.降落点位置未设置'),
4402: this.$t('common.目标机库有无人机在舱内'),
4403: this.$t('common.主跳转机库无人机不在舱内'),
4404: this.$t('common.当前正在执行流程非可跳跃状态'),
4405: this.$t('common.天气不宜飞行'),
4406: this.$t('common.电量不足已飞至目标机库'),
},
apronInfo: {
// chargeRemaining: 0,
......@@ -261,7 +261,7 @@ export default {
"uavRealTimeData.isFlying": {
handler: function (newVal, oldVal) {
if (oldVal === false && newVal === true) {
console.log("飞行状态");
console.log(this.$t('common.飞行状态'));
}
},
deep: true,
......@@ -290,7 +290,7 @@ export default {
},
async oneClickTask() {
if (!(await this.isTakeOverHangar())) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return;
}
if (!this.apronInfo.masterStatus) {
......@@ -306,7 +306,7 @@ export default {
if (data.length > 0) {
this.activeItem = data[0];
}
if (!this.activeItem.deviceId) return this.$message.warning("请选择跳点");
if (!this.activeItem.deviceId) return this.$message.warning(this.$t('common.请选择跳点'));
let { flightSpeed, flightHeight } = this;
this.rootNode.$emit("apronUavSkipEvent", {
// 主机库序列号
......@@ -459,7 +459,7 @@ export default {
},
async creareLine() {
if (!(await this.isTakeOverHangar())) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return;
}
let data = this.skipList.filter((item) => item.active);
......@@ -468,7 +468,7 @@ export default {
this.changeflyLogStatus(true);
this.dialogVisible = true;
} else {
this.$message.warning("请选择跳点");
this.$message.warning(this.$t('common.请选择跳点'));
}
},
handleConfirm() {
......
......@@ -2,22 +2,22 @@
<div class="airway-edit dialog1027" v-interact>
<div class="dialog-header">
<img class="dialog-header__icon" src="../../../../../../assets/images/mount_head.png" />
<div class="dialog-header__title">手动规划</div>
<div class="dialog-header__close" @click="$emit('close')">关闭</div>
<div class="dialog-header__title">{{ $t('common.手动规划') }}</div>
<div class="dialog-header__close" @click="$emit('close')">{{ $t('common.关闭') }}</div>
</div>
<div class="dialog-content">
<div class="ae-page">
<div v-hover @click="onPrev">上一航点</div>
<div v-hover @click="onPrev">{{ $t('common.上一航点') }}</div>
<div>{{ pageIndex }} / {{ pageCount }}</div>
<div v-hover @click="onNext">下一航点</div>
<div v-hover @click="onNext">{{ $t('common.下一航点') }}</div>
</div>
<el-form class="ae-form" :form="curForm" label-width="100px">
<el-form-item label="航线名称" required>
<el-input clearable v-model="name"></el-input>
<el-form class="ae-form" :form="curForm" label-width="140px">
<el-form-item :label="$t('common.航线名称')" required>
<el-input clearable v-model="name" :placeholder="$t('common.请输入航线名称')"></el-input>
</el-form-item>
<el-form-item label="所属单位:" required>
<el-form-item :label="$t('common.所属单位')" required>
<el-cascader ref="CascaderRef" v-model="departmentId" :options="orgList" clearable :show-all-levels="false"
placeholder="请选择所属单位" :props="{
:placeholder="$t('common.请选择所属单位')" :props="{
children: 'children',
label: 'name',
value: 'id',
......@@ -25,12 +25,12 @@
emitPath: false,
}" @change="changeNode"></el-cascader>
</el-form-item>
<el-form-item label="航线速度" prop="speed">
<el-input clearable v-model="curForm.speed"></el-input>
<el-form-item :label="$t('common.航线速度')" prop="speed">
<el-input clearable v-model="curForm.speed" :placeholder="$t('common.请输入航线速度')"></el-input>
</el-form-item>
<el-form-item label="目标位置" prop="address">
<el-form-item :label="$t('common.目标位置')" prop="address">
<el-autocomplete :popper-append-to-body="false" v-model="curForm.address" :fetch-suggestions="onAddressInput"
placeholder="请输入目标位置" :trigger-on-focus="false" @select="(item) => {
:placeholder="$t('common.请输入目标位置')" :trigger-on-focus="false" @select="(item) => {
onAddressChange(item, 'end');
}
" clearable>
......@@ -47,27 +47,27 @@
<el-button slot="append" icon="el-icon-location" @click="onPickAddress"></el-button>
</el-autocomplete>
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-input clearable v-model="curForm.latitude"></el-input>
<el-form-item :label="$t('common.纬度')" prop="latitude">
<el-input clearable v-model="curForm.latitude" :placeholder="$t('common.latitude')"></el-input>
</el-form-item>
<el-form-item label="经度" prop="longitude">
<el-input clearable v-model="curForm.longitude"></el-input>
<el-form-item :label="$t('common.经度')" prop="longitude">
<el-input clearable v-model="curForm.longitude" :placeholder="$t('common.longitude')"></el-input>
</el-form-item>
<el-form-item label="高度" prop="altitude">
<el-input clearable v-model="curForm.altitude"></el-input>
<el-form-item :label="$t('common.高度')" prop="altitude">
<el-input clearable v-model="curForm.altitude" :placeholder="$t('common.altitude')"></el-input>
</el-form-item>
<el-form-item label="航线标签" prop="label">
<el-input clearable v-model="curForm.label"></el-input>
<el-form-item :label="$t('common.航线标签')" prop="label">
<el-input clearable v-model="curForm.label" :placeholder="$t('common.routeLabel')"></el-input>
</el-form-item>
<el-form-item label="航点动作">
<el-button type="text" @click="showActions = true">{{ curForm.actions.length }}个动作</el-button>
<el-form-item :label="$t('common.航点动作')">
<el-button type="text" @click="showActions = true">{{ curForm.actions.length }}{{ $t('common.个动作') }}</el-button>
</el-form-item>
<el-form-item label="航线总里程">{{ distance }}m</el-form-item>
<el-form-item label="预计飞行时间">{{ time }}</el-form-item>
<el-form-item :label="$t('common.航线总里程')">{{ distance }}m</el-form-item>
<el-form-item :label="$t('common.预计飞行时间')">{{ time }}</el-form-item>
</el-form>
<div class="ae-btns">
<el-button type="primary" @click="onSave" :loading="saveLoading">保存</el-button>
<el-button type="danger" @click="onDel">删除航点</el-button>
<el-button type="primary" @click="onSave" :loading="saveLoading">{{ $t('common.保存') }}</el-button>
<el-button type="danger" @click="onDel">{{ $t('common.删除航点') }}</el-button>
</div>
</div>
<Actions v-if="showActions" @close="showActions = false" @save="onActionsSave" :selectActions="curForm.actions">
......@@ -277,15 +277,15 @@ export default {
// 保存航线
async onSave() {
if (!this.name) {
this.$message.warning("请输入航线名称");
this.$message.warning(this.$t('common.请输入航线名称'));
return;
}
if (!this.departmentId) {
this.$message.warning("请选择所属机构");
this.$message.warning(this.$t('common.请选择所属机构'));
return;
}
if (this.form.length === 0) {
this.$message.warning("请点击地图选择航点");
this.$message.warning(this.$t('common.请点击地图选择航点'));
return;
}
let waypoints = this.form.map((val) => {
......@@ -332,7 +332,7 @@ export default {
};
try {
let res = await AirLine.add({
flightName: airway.name || `${this.userInfo.username}-巡查}`,
flightName: airway.name || `${this.userInfo.username}-${this.$t('common.巡查')}`,
pointCount: airway.content.length,
distance: airway.distance,
sourceType: 2,
......@@ -361,7 +361,7 @@ export default {
})),
nestId: this.hangar.id,
});
this.$message.success("创建航线成功");
this.$message.success(this.$t('common.创建航线成功'));
this.$emit("addDone", res.data);
this.$emit("close");
} catch (e) { }
......@@ -691,7 +691,7 @@ export default {
.airway-edit {
position: absolute;
top: 0px;
width: 351px;
width: 451px;
z-index: 2;
left: 0px;
......
......@@ -3,32 +3,32 @@
<div class="hd">
<div class="left ml8">
<!-- <img src="../../../../assets/images/mount_head.png" /> -->
<div class="title">航空航线</div>
<div class="title">{{ $t('common.航空航线') }}</div>
</div>
<div @click="close" class="close">关闭</div>
<div @click="close" class="close">{{ $t('common.关闭') }}</div>
</div>
<div class="list-box">
<div class="tb-box">
<div class="tb-hd-box">
<div class="tb-hd">航线ID</div>
<div class="tb-hd">航线名称</div>
<div class="tb-hd">所属单位</div>
<div class="tb-hd">空域状态</div>
<div class="tb-hd">安全状态</div>
<div class="tb-hd">航线标签</div>
<div class="tb-hd last-tb-hd">操作</div>
<div class="tb-hd">{{ $t('common.航线ID') }}</div>
<div class="tb-hd">{{ $t('common.航线名称') }}</div>
<div class="tb-hd">{{ $t('common.所属单位') }}</div>
<div class="tb-hd">{{ $t('common.空域状态') }}</div>
<div class="tb-hd">{{ $t('common.安全状态') }}</div>
<div class="tb-hd">{{ $t('common.航线标签') }}</div>
<div class="tb-hd last-tb-hd">{{ $t('common.操作') }}</div>
</div>
<div class="tb-bd-box">
<div class="tb-tr" v-for="item in airwayData.records" :key="item.id">
<div class="td">{{ item.id || "暂无" }}</div>
<div class="td">{{ item.id || $t('common.暂无') }}</div>
<div class="td">
<div>{{ item.name || "暂无" }}</div>
<div>{{ item.name || $t('common.暂无') }}</div>
</div>
<div class="td">{{ item.organizationName || "暂无" }}</div>
<div class="td">{{ item.organizationName || $t('common.暂无') }}</div>
<!-- 空域状态 -->
<div class="td">
<div class="status">{{item.status || "暂无"}}</div>
<div class="status">{{item.status || $t('common.暂无')}}</div>
<!-- <div v-if="item.status == 1" class="status">可用</div>
<div v-else-if="item.status == 2" class="status" style="color: #2ca1e2">待申请</div>
<div v-else-if="item.status == 3" class="status" style="color: #ffbd36">待审批</div>
......@@ -40,15 +40,15 @@
<div
class="td"
:style="{ color: item.safe == 1 ? '#19D864' : '' }"
>{{ item.safe == 1 ? "安全" : "待确定" }}</div>
>{{ item.safe == 1 ? $t('common.安全') : $t('common.待确定') }}</div>
<!-- 航线标签 -->
<div class="td">
<!-- <span v-for="item2 in item.labelList"
:key="item2.labelId">{{ item2.labelName }}</span>-->
{{ item.labelName ||"暂无" }}
{{ item.labelName || $t('common.暂无') }}
</div>
<div class="td last-td" style="width: 15%">
<div @click="changeLine(item)">选择航线</div>
<div @click="changeLine(item)">{{ $t('common.选择航线') }}</div>
</div>
</div>
</div>
......@@ -92,8 +92,8 @@ export default {
try {
if (item.safe != 1) {
await this.$confirm(
"此航线为非安全航线,开始任务前请确认航线安全!",
"安全确认",
$t('common.此航线为非安全航线,开始任务前请确认航线安全!'),
$t('common.安全确认'),
{ customClass: "uav_controlPane", showClose: false }
);
}
......@@ -112,11 +112,11 @@ export default {
});
if (res?.code === 0) {
let statusMap = {
1: "可用",
2: "待申请",
3: "待审批",
4: "通过",
5: "驳回",
1: this.$t('common.可用'),
2: this.$t('common.待申请'),
3: this.$t('common.待审批'),
4: this.$t('common.通过'),
5: this.$t('common.驳回'),
};
this.airwayData = (res.data.list && {
pageNo: this.airwayData.pageNo,
......
<template>
<div class="taskListBox">
<el-form class="task-main" label-width="70px">
<el-form-item label="任务库:" v-if="useTask">
<el-form class="task-main" label-width="120px">
<el-form-item :label="$t('common.任务库') + ':'" v-if="useTask">
<el-select v-model="selectedTaskId" clearable>
<el-option v-for="(item, i) in taskList" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="航线:">
<el-form-item :label="$t('common.航线') + ':'">
<el-select v-model="selectedAirwayId">
<el-option v-for="(item, i) in airwayList" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<div class="btn" @click="onStartTask" v-hover>一键任务</div>
<div class="btn" @click="onStartTask" v-hover>{{ $t('common.一键任务') }}</div>
<div class>
<span class="btn__add-line" @click="showAirwayEdit = true">
<i class="el-icon-circle-plus-outline"></i>
<span class="f8"></span> 创建航线
<span class="f8"></span> {{ $t('common.创建航线') }}
</span>
</div>
<AirwayEdit v-if="showAirwayEdit" @close="showAirwayEdit = false" @addDone="getAirwayList"></AirwayEdit>
......@@ -127,7 +127,7 @@ export default {
}
} else {
if (this.selectedTaskId && this.selectedAirwayId == "") {
this.$message.warning("未找到相应的航线");
this.$message.warning(this.$t('common.未找到相应的航线'));
}
this.selectedAirwayId = "";
this.airwaySelectDisabled = false;
......@@ -220,19 +220,19 @@ export default {
async onStartTask() {
// 判断是否已接管
if (!(await this.isTakeOver())) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return;
}
// 判断是否选择了航线
if (this.selectedAirway.id === -1) {
this.$message.warning("请选择航线");
this.$message.warning(this.$t('common.请选择航线'));
return;
}
try {
await this.$confirm("请确认是否进行一键任务操作?", "安全确认", {
cancelButtonText: "取消",
confirmButtonText: "确定",
await this.$confirm(this.$t('common.请确认是否进行一键任务操作'), this.$t('common.安全确认'), {
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
});
......@@ -244,9 +244,9 @@ export default {
taskInfoId: this.selectedTaskId,
callback: (status) => {
if (status) {
this.$message.success("一键任务指令发送成功");
this.$message.success(this.$t('common.一键任务指令发送成功'));
} else {
this.$message.error("一键任务指令发送失败");
this.$message.error(this.$t('common.一键任务指令发送失败'));
}
},
});
......
<template>
<div class="task-add dialog1027" v-interact>
<div class="dialog-header">
<div class="dialog-header__title">周期任务</div>
<div class="dialog-header__close" @click="$emit('close')">关闭</div>
<div class="dialog-header__title">{{ $t('common.周期任务') }}</div>
<div class="dialog-header__close" @click="$emit('close')">{{ $t('common.关闭') }}</div>
</div>
<div class="dialog-content">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="执行日期" prop="date">
<el-form-item :label="$t('common.执行日期')" prop="date">
<el-date-picker
v-model="form.date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:range-separator="$t('common.至')"
:start-placeholder="$t('common.开始日期')"
:end-placeholder="$t('common.结束日期')"
size="mini"
popper-class="mmc"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
></el-date-picker>
</el-form-item>
<el-form-item label="执行时间" prop="time">
<el-form-item :label="$t('common.执行时间')" prop="time">
<el-time-picker
is-range
v-model="form.time"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
:range-separator="$t('common.至')"
:start-placeholder="$t('common.开始时间')"
:end-placeholder="$t('common.结束时间')"
:placeholder="$t('common.选择时间范围')"
size="mini"
popper-class="mmc"
value-format="HH:mm:ss"
></el-time-picker>
</el-form-item>
<el-form-item label="航线名称" prop="airwayId">
<el-form-item :label="$t('common.航线名称')" prop="airwayId">
<el-select v-model="form.airwayId" size="mini" popper-class="mmc" style="width:100%">
<el-option :label="item.name" :value="item.id" v-for="(item, index) in airwayList"></el-option>
</el-select>
......@@ -40,7 +40,7 @@
</el-form>
</div>
<div class="task-add-btn">
<el-button type="primary" size="medium" :loading="confirmLoading" @click="onConfirm">确认</el-button>
<el-button type="primary" size="medium" :loading="confirmLoading" @click="onConfirm">{{ $t('common.确认') }}</el-button>
</div>
</div>
</template>
......@@ -60,9 +60,9 @@ export default {
airwayId: "",
},
rules: {
date: [{ required: true, message: "请选择日期", trigger: "blur" }],
time: [{ required: true, message: "请选择时间", trigger: "blur" }],
airwayId: [{ required: true, message: "请选择航线", trigger: "blur" }],
date: [{ required: true, message: this.$t('common.请选择日期'), trigger: "blur" }],
time: [{ required: true, message: this.$t('common.请选择时间'), trigger: "blur" }],
airwayId: [{ required: true, message: this.$t('common.请选择航线'), trigger: "blur" }],
},
pickerOptions: {
disabledDate: (time) => {
......
<template>
<div class="timed-task">
<div class="timed-task-header">
<div class="header__column flex2">名称</div>
<div class="header__column flex2">时间</div>
<div class="header__column status">状态</div>
<div class="header__column flex2">操作</div>
<div class="header__column flex2">{{ $t('common.名称') }}</div>
<div class="header__column flex2">{{ $t('common.时间') }}</div>
<div class="header__column status">{{ $t('common.状态') }}</div>
<div class="header__column flex2">{{ $t('common.操作') }}</div>
</div>
<div class="timed-task-main">
<div class="row" v-for="item in taskListAll" :key="item.id">
......@@ -17,15 +17,15 @@
<el-tooltip
class="item"
effect="dark"
:content="`${item.taskStartTime}${item.taskEndTime}`"
:content="`${item.taskStartTime}${$t('common.至')}${item.taskEndTime}`"
placement="top-start"
>
<span>{{`${item.taskStartTime}${item.taskEndTime}`}}</span>
<span>{{`${item.taskStartTime}${$t('common.至')}${item.taskEndTime}`}}</span>
</el-tooltip>
</div>
<div class="row__column status" style="color: rgb(255, 189, 54);">{{item.status}}</div>
<div class="row__column flex2 ctrl">
<el-tooltip content="查看" placement="top">
<el-tooltip :content="$t('common.查看')" placement="top">
<span
class="icon-chakan1 iconfont icon"
style="color: #ffffff; font-size: 10px;"
......@@ -41,14 +41,14 @@
<el-tooltip content="启用" v-if="item.enable" placement="top">
<img class="icon" style="width: 15px;" src="../../assets/images/able.png" />
</el-tooltip>-->
<el-tooltip content="删除" placement="top">
<el-tooltip :content="$t('common.删除')" placement="top">
<span class="icon-shanchu iconfont icon" @click="onDelAirway(item)"></span>
</el-tooltip>
</div>
</div>
</div>
<div class="task-add-btn">
<div class="task-add__btn" @click="showTaskAdd = true">创建周期任务</div>
<div class="task-add__btn" @click="showTaskAdd = true">{{ $t('common.创建周期任务') }}</div>
</div>
<TaskAdd v-if="showTaskAdd" @close="onTaskAddClose" @addDone="onAddDone"></TaskAdd>
......@@ -142,9 +142,9 @@ export default {
if (item.loading) {
return;
}
await this.$confirm("请确认是否删除该任务?", "安全确认", {
cancelButtonText: "取消",
confirmButtonText: "确定",
await this.$confirm(this.$t('common.请确认是否删除该任务'), this.$t('common.安全确认'), {
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
});
......
<template>
<div class="task-add dialog1027" v-interact>
<div class="dialog-header">
<div class="dialog-header__title">飞行编辑</div>
<div class="dialog-header__close" @click="close">关闭</div>
<div class="dialog-header__title">{{ $t('common.飞行编辑') }}</div>
<div class="dialog-header__close" @click="close">{{ $t('common.关闭') }}</div>
</div>
<div class="dialog-content">
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-date-picker
v-model="form.time"
:type="task.taskType == 1 ? 'datetime' : 'datetimerange'"
range-separator="至"
start-placeholder="请选择任务开始时间"
end-placeholder="请选择任务结束时间"
placeholder="选择日期时间"
:range-separator="$t('common.至')"
:start-placeholder="$t('common.请选择任务开始时间')"
:end-placeholder="$t('common.请选择任务结束时间')"
:placeholder="$t('common.选择日期时间')"
size="mini"
popper-class="mmc"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
style="margin-bottom: 24px; width: 100%"
></el-date-picker>
<el-form-item label="任务库:" prop="taskId">
<el-form-item :label="$t('common.任务库') + ':'" prop="taskId">
{{ task.name }}
</el-form-item>
<el-form-item label="航线名称:" prop="airwayId">
<el-form-item :label="$t('common.航线名称') + ':'" prop="airwayId">
{{ task.airwayName }}
</el-form-item>
</el-form>
......@@ -32,7 +32,7 @@
size="medium"
class="btn btn--cancel"
@click="close"
>取消</el-button
>{{ $t('common.取消') }}</el-button
>
<el-button
type="primary"
......@@ -40,7 +40,7 @@
:loading="confirmLoading"
class="btn btn--ok"
@click="onConfirm"
>确认</el-button
>{{ $t('common.确认') }}</el-button
>
</div>
</div>
......@@ -127,7 +127,7 @@ export default {
console.log("taskInfoUpdateTime res", res);
this.confirmLoading = false;
if (res.code === 0) {
this.$message.success("更改时间完成");
this.$message.success(this.$t('common.更改时间完成'));
this.$emit("close");
} else {
this.$message.warning(res.error.msg);
......
......@@ -2,22 +2,22 @@
<div class="task-add dialog1027" v-interact>
<div class="task-add-header dialog-header">
<img class="dialog-header__icon" src="../../../../../../assets/images/mount_head.png" />
<div class="header__title dialog-header__title">飞行计划</div>
<div class="header__title dialog-header__title">{{ $t('common.飞行计划') }}</div>
<div class="header-right dialog-header__close">
<el-select placeholder="请选择任务场景" v-model="selectedTask" class="select" popper-class="mmc">
<el-select :placeholder="$t('common.请选择任务场景')" v-model="selectedTask" class="select" popper-class="mmc">
<el-option v-for="item in taskList" :label="item.name" :value="item.id"></el-option>
</el-select>
<div class="header-right__close" @click="$emit('close')">关闭</div>
<div class="header-right__close" @click="$emit('close')">{{ $t('common.关闭') }}</div>
</div>
</div>
<div class="stl-timed-task">
<div class="timed-task-header">
<div class="header__column flex2">时间</div>
<div class="header__column flex2">航线名</div>
<div class="header__column flex2">状态</div>
<div class="header__column flex2">异常状态</div>
<div class="header__column flex2">{{ $t('common.时间') }}</div>
<div class="header__column flex2">{{ $t('common.航线名') }}</div>
<div class="header__column flex2">{{ $t('common.状态') }}</div>
<div class="header__column flex2">{{ $t('common.异常状态') }}</div>
<div class="header__column">操作</div>
<div class="header__column">{{ $t('common.操作') }}</div>
</div>
<div class="timed-task-main">
<div class="row" :class="{ single: i % 2 != 0 }" v-for="(item, i) in flightPlan" :key="item.id">
......@@ -36,17 +36,17 @@
<span v-if="item.abnormal == 1 || item.abnormal == 0">{{
abnormalType[item.abnormal]
}}</span>
<span v-else> 暂无 </span>
<span v-else> {{ $t('common.暂无') }} </span>
</el-tooltip>
</div>
<div class="row__column flex2">
<el-tooltip class="item" effect="dark" :content="item.abnormalName" placement="top-start">
<span style="color: red" v-if="item.abnormal > 1 ">{{ item.abnormalName }}</span>
<span v-else>暂无</span>
<span v-else>{{ $t('common.暂无') }}</span>
</el-tooltip>
</div>
<div class="row__column ctrl">
<el-tooltip content="删除" placement="top">
<el-tooltip :content="$t('common.删除')" placement="top">
<i class="el-icon-delete" @click="onDel(item)"></i>
</el-tooltip>
</div>
......@@ -82,8 +82,8 @@ export default {
data() {
return {
abnormalType: {
0: "完成",
1: "待执行",
0: this.$t('common.完成'),
1: this.$t('common.待执行'),
},
flightPlan: [
/* {
......@@ -150,9 +150,9 @@ export default {
* 删除的任务
*/
async onDel(item) {
await this.$confirm("请确认是否删除该飞行计划?", "安全确认", {
cancelButtonText: "取消",
confirmButtonText: "确定",
await this.$confirm(this.$t('common.请确认是否删除该任务'), this.$t('common.安全确认'), {
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
});
......
......@@ -2,12 +2,12 @@
<div class="task-add dialog1027" :class="{more: showMore}" v-interact>
<div class="task-add-header dialog-header">
<img class="dialog-header__icon" src="../../../../../../assets/images/mount_head.png" />
<div class="header__title dialog-header__title">定时任务</div>
<div class="header__title dialog-header__title">{{ $t('common.定时任务') }}</div>
<div class="header-right dialog-header__close">
<div class="header-right__add" @click="onTaskAdd">
<span class="iconfont icon-zengjia"></span>添加任务
<span class="iconfont icon-zengjia"></span>{{ $t('common.添加任务') }}
</div>
<div class="header-right__close" @click="$emit('close')">关闭</div>
<div class="header-right__close" @click="$emit('close')">{{ $t('common.关闭') }}</div>
</div>
</div>
<div class="task-add-main dialog-content">
......@@ -17,17 +17,17 @@
size="mini"
popper-class="mmc"
type="datetime"
placeholder="选择时间"
:placeholder="$t('common.选择时间')"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
></el-date-picker>
<el-select v-model="item.airwayId" size="mini" popper-class="mmc" placeholder="请选择航线">
<el-select v-model="item.airwayId" size="mini" popper-class="mmc" :placeholder="$t('common.请选择航线')">
<el-option :label="item1.name" :value="item1.id" v-for="(item1, index) in airwayList"></el-option>
</el-select>
<el-tooltip content="删除" placement="top">
<el-tooltip :content="$t('common.删除')" placement="top">
<span class="icon-shanchu iconfont" @click="onDelTask(index)"></span>
</el-tooltip>
<el-tooltip content="查看" placement="top">
<el-tooltip :content="$t('common.查看')" placement="top">
<span
class="icon-chakan1 iconfont"
style="font-size: 10px;"
......@@ -37,7 +37,7 @@
</div>
</div>
<div class="task-add-btn">
<el-button type="primary" size="medium" :loading="confirmLoading" @click="onConfirm">确认</el-button>
<el-button type="primary" size="medium" :loading="confirmLoading" @click="onConfirm">{{ $t('common.确认') }}</el-button>
</div>
<div class="task-add-more" @click="showMore = !showMore">
<img src="../../../../assets/images/xb.png" width="15" />
......@@ -133,12 +133,12 @@ export default {
let isOk = true;
this.list.some((item) => {
if (!item.time) {
this.$message.warning("请选择时间");
this.$message.warning(this.$t('common.请选择时间'));
isOk = false;
return true;
}
if (!item.airwayId) {
this.$message.warning("请选择航线");
this.$message.warning(this.$t('common.请选择航线'));
isOk = false;
return true;
}
......
<template>
<div class="stl-timed-task">
<div class="timed-task-header">
<div class="header__column flex2">名称</div>
<div class="header__column flex2">时间</div>
<div class="header__column status">状态</div>
<div class="header__column flex2">操作</div>
<div class="header__column flex2">{{ $t('common.名称') }}</div>
<div class="header__column flex2">{{ $t('common.时间') }}</div>
<div class="header__column status">{{ $t('common.状态') }}</div>
<div class="header__column flex2">{{ $t('common.操作') }}</div>
</div>
<div class="timed-task-main" v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.8)">
<div class="row" :class="{ single: i % 2 != 0 }" v-for="(item, i) in taskListAll" :key="item.id">
......@@ -44,20 +44,20 @@
</el-tooltip>
</div>
<div class="row__column flex2 ctrl">
<el-tooltip content="查看" placement="top">
<el-tooltip :content="$t('common.查看')" placement="top">
<i class="el-icon-position" style @click="onSwitchAirway(item, true)"></i>
</el-tooltip>
<el-tooltip content="计划安排" placement="top">
<el-tooltip :content="$t('common.计划安排')" placement="top">
<i class="el-icon-date" @click="onOpenPlan(item)"></i>
</el-tooltip>
<el-tooltip content="编辑" placement="top" v>
<i class="el-icon-edit" @click="onOpenEdit(item)" v-if="item.status !== '执行中' && item.status !== '已完成'"></i>
<el-tooltip :content="$t('common.编辑')" placement="top" v>
<i class="el-icon-edit" @click="onOpenEdit(item)" v-if="item.status !== $t('common.执行中') && item.status !== $t('common.完成')"></i>
</el-tooltip>
<!-- <el-tooltip content="开关" placement="top">
<i class="el-icon-turn-off"></i>
</el-tooltip> -->
<el-tooltip content="删除" placement="top">
<i v-if="item.status !== '执行中' && item.status !== '已完成'" class="el-icon-delete"
<el-tooltip :content="$t('common.删除')" placement="top">
<i v-if="item.status !== $t('common.执行中') && item.status !== $t('common.完成')" class="el-icon-delete"
@click="onDelAirway(item)"></i>
</el-tooltip>
</div>
......@@ -193,11 +193,11 @@ export default {
return;
}
this.taskListAll = res.records.sort((a, b) => {
const aIsExecuting = a.status === "执行中";
const bIsExecuting = b.status === "执行中";
const aIsExecuting = a.status === this.$t('common.执行中');
const bIsExecuting = b.status === this.$t('common.执行中');
return aIsExecuting === bIsExecuting ? 0 : (aIsExecuting ? -1 : 1);
});
const executeFlightRoute = this.taskListAll.find(item => item.status === "执行中");
const executeFlightRoute = this.taskListAll.find(item => item.status === this.$t('common.执行中'));
if (executeFlightRoute && this.executeFlightRouteId !== executeFlightRoute.airwayId) {
this.executeFlightRouteId = executeFlightRoute.airwayId;
this.onSwitchAirway(executeFlightRoute);
......@@ -234,9 +234,9 @@ export default {
},
async onDelAirway(item) {
try {
await this.$confirm("请确认是否删除该任务?", "安全确认", {
cancelButtonText: "取消",
confirmButtonText: "确定",
await this.$confirm(this.$t('common.请确认是否删除该任务'), this.$t('common.安全确认'), {
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
});
......
......@@ -6,7 +6,7 @@
:class="{ active: tabIndex === 0 && useTimedTask }"
@click="tabIndex = 0"
>
<label>常态飞行</label>
<label>{{ $t('common.常态飞行') }}</label>
</div>
<template v-if="useTimedTask">
<div
......@@ -14,14 +14,14 @@
:class="{ active: tabIndex === 1 }"
@click="tabIndex = 1"
>
<label>定时飞行</label>
<label>{{ $t('common.定时飞行') }}</label>
</div>
<div
class="task-list-header__item"
:class="{ active: tabIndex === 2 }"
@click="tabIndex = 2"
>
<label>周期飞行</label>
<label>{{ $t('common.周期飞行') }}</label>
</div>
<div
v-if="isLeapFrogFligh"
......@@ -29,7 +29,7 @@
:class="{ active: tabIndex === 3 }"
@click="tabIndex = 3"
>
<label>蛙跳飞行</label>
<label>{{ $t('common.蛙跳飞行') }}</label>
</div>
</template>
</div>
......
<template>
<div>
<Player @close="$emit('close')" :url="url" :name="name" label="舱内" />
<Player @close="$emit('close')" :url="url" :name="name" :label="$t('common.舱内')" />
</div>
</template>
......
<template>
<div>
<Player @close="$emit('close')" :url="url" :name="name" label="舱外" />
<Player @close="$emit('close')" :url="url" :name="name" :label="$t('common.舱外')" />
</div>
</template>
......
......@@ -64,7 +64,7 @@ export default {
if (streamConfiguration?.fluencyUrl) {
// 流畅地址
streamOptions.push({
label: "流畅",
label: this.$t('common.流畅'),
url: streamConfiguration?.fluencyUrl,
});
}
......@@ -72,7 +72,7 @@ export default {
if (streamConfiguration?.lowLatencyUrl) {
// 低延迟地址
streamOptions.push({
label: "低延迟",
label: this.$t('common.低延迟'),
url: streamConfiguration?.lowLatencyUrl,
});
}
......@@ -80,7 +80,7 @@ export default {
if (streamConfiguration?.originalUrl) {
// 原画地址
streamOptions.push({
label: "原画",
label: this.$t('common.原画'),
url: streamConfiguration?.originalUrl,
});
}
......
......@@ -2,7 +2,7 @@
<div class="control-left" :class="{ collapse: listCollapse }">
<div class="left-bar-item item" @click="onClickTask">
<img class="left-bar-item__icon" src="./assets/images/task.svg" />
<div class="left-bar-item__text">任务</div>
<div class="left-bar-item__text">{{$t('common.任务')}}</div>
</div>
<AirwayList class="task-list" v-if="openTask"></AirwayList>
<!-- 展示视频 -->
......@@ -13,7 +13,7 @@
<div class="left-video-header">
<!-- @click="openList" -->
<div class="left-video-header__title" >视频列表</div>
<div class="left-video-header__title" >{{$t('common.视频列表')}}</div>
<div class="nest-name">
<span class="nest-name__text">{{ hangar.name }}</span>
<span class="nest-name__text">{{ hangar.name }}</span>
......
......@@ -7,7 +7,7 @@
<div class="title-box dialog-header">
<div class="title">
<img src="../../../../../../../../assets/images/mount_head.png" />
<div class="dialog-header__title">运行监控日志</div>
<div class="dialog-header__title">{{ $t('common.运行监控日志') }}</div>
<div effect="dark" class="status">
{{ getProcessStatus(hangarRealTimeData.processStatus) }}
</div>
......@@ -20,35 +20,35 @@
<!-- <div class="icon-box" @click="$emit('step')">
<span class="icon-text">运行流程</span>
</div>-->
<div class="close" @click="$emit('exit')">关闭</div>
<div class="close" @click="$emit('exit')">{{ $t('common.关闭') }}</div>
</div>
</div>
<div class="liucBox">
<div class="default" :class="folderFn(folder)">
<span class="w10 mr4 h10 radius"></span>固定无人机
<span class="w10 mr4 h10 radius"></span>{{ $t('common.固定无人机') }}
</div>
<div class="default" :class="coverFn(cover)">
<span class="line" :class="!productType ? 'w62' : 'w22'"></span>
<span class="w10 mr4 h10 radius"></span>打开舱盖
<span class="w10 mr4 h10 radius"></span>{{ $t('common.打开舱盖') }}
</div>
<div class="default" :class="liftsFn(lifts)" v-if="productType">
<span class="w22 line"></span>
<span class="w10 mr4 h10 radius"></span>升起平台
<span class="w10 mr4 h10 radius"></span>{{ $t('common.升起平台') }}
</div>
<div class="default" :class="folderFn3(folder)">
<span class="line" :class="!productType ? 'w62' : 'w22'"></span>
<span class="w10 mr4 h10 radius"></span>释放无人机
<span class="w10 mr4 h10 radius"></span>{{ $t('common.释放无人机') }}
</div>
<div class="default" :class="rktFn(hangarRealTimeData.msg)">
<span class="line" :class="!productType ? 'w62' : 'w22'"></span>
<span class="w10 mr4 h10 radius"></span>无人机RTK定位
<span class="w10 mr4 h10 radius"></span>{{ $t('common.无人机RTK定位') }}
</div>
</div>
<div class="ctx-box">
<div class="head mt7">
<div class="text">消息等级</div>
<div class="text con">消息内容</div>
<div class="time">时间</div>
<div class="text">{{ $t('common.消息等级') }}</div>
<div class="text con">{{ $t('common.消息内容') }}</div>
<div class="time">{{ $t('common.时间') }}</div>
</div>
<div class="list-box mt7">
<div
......@@ -61,8 +61,8 @@
class="type-box"
:class="{ emerg: item.type == 1, ordinary: item.type == 8 }"
>
<span class="type" v-if="item.type == 1">紧急</span>
<span class="type" v-else-if="item.type == 8">普通</span>
<span class="type" v-if="item.type == 1">{{ $t('common.紧急') }}</span>
<span class="type" v-else-if="item.type == 8">{{ $t('common.普通') }}</span>
<span class="type" v-else>AUTO</span>
</div>
<div class="text">{{ item.text }}</div>
......@@ -169,31 +169,31 @@ export default {
getProcessStatus(val) {
let title = "";
if (val == 0) {
title = "待机中";
title = this.$t('common.待机中');
} else if (val == 1) {
title = "正在执行出仓待命";
title = this.$t('common.正在执行出仓待命');
} else if (val == 2) {
title = "正在执行回收入仓";
title = this.$t('common.正在执行回收入仓');
} else if (val == 3) {
title = "正在执行充电流程";
title = this.$t('common.正在执行充电流程');
} else if (val == 4) {
title = "正在结束充电流程";
title = this.$t('common.正在结束充电流程');
} else if (val == 5) {
title = "正在执行休眠流程";
title = this.$t('common.正在执行休眠流程');
} else if (val == 6) {
title = "正在执行预热流程";
title = this.$t('common.正在执行预热流程');
} else if (val == 7) {
title = "正在执行飞行检查流程";
title = this.$t('common.正在执行飞行检查流程');
} else if (val == 8) {
title = "正在执行电池检查流程";
title = this.$t('common.正在执行电池检查流程');
} else if (val == 9) {
title = "正在执行关仓流程";
title = this.$t('common.正在执行关仓流程');
} else if (val == 10) {
title = "正在执行回中器操作";
title = this.$t('common.正在执行回中器操作');
} else if (val == 99) {
title = "正在执行飞行任务";
title = this.$t('common.正在执行飞行任务');
} else {
title = "暂无";
title = this.$t('common.暂无');
}
return title;
},
......
......@@ -2,14 +2,14 @@
<ControlRight ref="controlRight" isHangar @switchCallback="showHangar = false; showMonitor = false;">
<div slot="hangar" class="control-item" :class="showHangar ? 'active' : ''" @click="onSwitchShow('showHangar')">
<img src="./assets/images/hangar.svg" />
<span class="dib">机库</span>
<span class="dib">{{$t('controlMenu.机库')}}</span>
</div>
<div slot="dialog">
<div class="hangar-ctrl dialog1027" v-if="showHangar">
<div class="dialog-header">
<img class="dialog-header__icon" src="../../../../../../assets/images/mount_head.png" />
<span class="dialog-header__title">操作区域</span>
<span class="dialog-header__close" @click="showHangar = false;">关闭</span>
<span class="dialog-header__title">{{$t('controlList.操作区域')}}</span>
<span class="dialog-header__close" @click="showHangar = false;">{{$t('controlMenu.关闭')}}</span>
</div>
<div class="hangar-ctrl-list">
<div class="hangar-ctrl-item" v-for="(item, i) in ctrlList" :key="i" @click="onClickCMD(i)">
......@@ -143,7 +143,7 @@ export default {
*/
async onSwitchShow(key) {
if (!await this.isTakeOver()) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return;
}
this.$refs.controlRight.hideAll(key);
......@@ -156,7 +156,7 @@ export default {
*/
async onClickCMD(i) {
if (!await this.isTakeOver()) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return;
}
let item = this.ctrlList[i];
......
......@@ -2,19 +2,19 @@
<template>
<div class="list" :class="{ collapse: listCollapse }">
<div class="list-header">
<span class="list-header__text">鹰巢列表</span>
<span class="list-header__text">{{ $t('common.鹰巢列表') }}</span>
<div class="list-header__count">
{{ count.sumCount }} /
<span class="online">{{ count.onlineCount }}在线</span>
{{ $t('common.共') }}{{ count.sumCount }}{{ $t('common.架') }} /
<span class="online">{{ count.onlineCount }}{{ $t('common.在线') }}</span>
/
{{ count.offlineCount }}离线
{{ count.offlineCount }}{{ $t('common.离线') }}
</div>
</div>
<div class="uav-search">
<el-input
class="uav-search__input"
clearable
placeholder="请输入无人机名称/机构名称"
:placeholder="$t('common.请输入无人机名称/机构名称')"
v-model="searchContent"
v-on:keyup.enter.native="onUavSearch"
>
......@@ -24,7 +24,7 @@
style="color: rgba(123, 181, 213, 1)"
></i>
</el-input>
<el-button class="uav-search__btn" @click="onUavSearch" v-hover>搜索</el-button>
<el-button class="uav-search__btn" @click="onUavSearch" v-hover>{{ $t('common.搜索') }}</el-button>
</div>
<div class="cpt-observe-nest-list">
<template v-if="list && list.length">
......
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2C13.1 2 14 2.9 14 4C14 5.1 13.1 6 12 6C10.9 6 10 5.1 10 4C10 2.9 10.9 2 12 2ZM21 9V7L15 1H5C3.89 1 3 1.89 3 3V21C3 22.11 3.89 23 5 23H19C20.11 23 21 22.11 21 21V9M19 21H5V3H14V9H19V21Z" fill="currentColor"/>
<circle cx="8" cy="12" r="2" fill="currentColor"/>
<circle cx="16" cy="12" r="2" fill="currentColor"/>
<circle cx="12" cy="16" r="2" fill="currentColor"/>
<path d="M8 14L16 14" stroke="currentColor" stroke-width="1"/>
<path d="M10 12L14 16" stroke="currentColor" stroke-width="1"/>
<path d="M14 12L10 16" stroke="currentColor" stroke-width="1"/>
</svg>
\ No newline at end of file
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17 10.5V7C17 6.45 16.55 6 16 6H4C3.45 6 3 6.45 3 7V17C3 17.55 3.45 18 4 18H16C16.55 18 17 17.55 17 17V13.5L21 17.5V6.5L17 10.5ZM15 16H5V8H15V16Z" fill="currentColor"/>
<circle cx="10" cy="12" r="2" fill="currentColor"/>
</svg>
\ No newline at end of file
<template>
<div class="keyControl" :class="{'w423':activeMount}">
<div class="head">
<div class="tl title">机身控制</div>
<div class="tl title" v-if="activeMount" :title="activeMount.gimbalName">挂载控制</div>
<div class="tr f12 cp" @click="$emit('close')">关闭</div>
<div class="tl title">{{ $t('common.机身控制') }}</div>
<div class="tl title" v-if="activeMount" :title="activeMount.gimbalName">{{ $t('common.挂载控制') }}</div>
<div class="tr f12 cp" @click="$emit('close')">{{ $t('common.关闭') }}</div>
</div>
<div class="content">
<div>
<div>
<div
:class="{ active: keycode == 'q' }"
title="机身左转"
:title="$t('common.机身左转')"
@mousedown="clickControl({ key: 'q' })"
@mouseup="cancelControl()"
>
......@@ -19,7 +19,7 @@
</div>
<div
:class="{ active: keycode == 'w' }"
title="前进"
:title="$t('common.前进')"
@mousedown="clickControl({ key: 'w' })"
@mouseup="cancelControl()"
>
......@@ -28,7 +28,7 @@
</div>
<div
:class="{ active: keycode == 'e' }"
title="机身右转"
:title="$t('common.机身右转')"
@mousedown="clickControl({ key: 'e' })"
@mouseup="cancelControl()"
>
......@@ -38,7 +38,7 @@
<div
class="ml12"
:class="{ active: keycode == 'c' }"
title="上升"
:title="$t('common.上升')"
@mousedown="clickControl({ key: 'c' })"
@mouseup="cancelControl()"
>
......@@ -49,7 +49,7 @@
<div class="mt16">
<div
:class="{ active: keycode == 'a' }"
title="左飞"
:title="$t('common.左飞')"
@mousedown="clickControl({ key: 'a' })"
@mouseup="cancelControl()"
>
......@@ -58,7 +58,7 @@
</div>
<div
:class="{ active: keycode == 's' }"
title="后退"
:title="$t('common.后退')"
@mousedown="clickControl({ key: 's' })"
@mouseup="cancelControl()"
>
......@@ -67,7 +67,7 @@
</div>
<div
:class="{ active: keycode == 'd' }"
title="右飞"
:title="$t('common.右飞')"
@mousedown="clickControl({ key: 'd' })"
@mouseup="cancelControl()"
>
......@@ -77,7 +77,7 @@
<div
class="ml12"
:class="{ active: keycode == 'z' }"
title="下降"
:title="$t('common.下降')"
@mousedown="clickControl({ key: 'z' })"
@mouseup="cancelControl()"
>
......@@ -100,7 +100,7 @@
<div
v-if="isShow"
:class="{active: keycode == 'g'}"
title="垂直向下"
:title="$t('common.垂直向下')"
@click="clickControl({key:'g'})"
>G</div>
</div>
......@@ -109,7 +109,7 @@
<div>
<div
:class="{active: keycode == 'ArrowUp'}"
title="镜头向上"
:title="$t('common.镜头向上')"
@mousedown="clickControl({key:'ArrowUp'})"
@mouseup="cancelControl"
>
......@@ -119,7 +119,7 @@
<div>
<div
:class="{active: keycode == 'ArrowLeft'}"
title="镜头向左"
:title="$t('common.镜头向左')"
@mousedown="clickControl({key:'ArrowLeft'})"
@mouseup="cancelControl"
>
......@@ -127,7 +127,7 @@
</div>
<div
:class="{active: keycode == 'ArrowDown'}"
title="镜头向下"
:title="$t('common.镜头向下')"
@mousedown="clickControl({key:'ArrowDown'})"
@mouseup="cancelControl"
>
......@@ -135,7 +135,7 @@
</div>
<div
:class="{active: keycode == 'ArrowRight'}"
title="镜头向右"
:title="$t('common.镜头向右')"
@mousedown="clickControl({key:'ArrowRight'})"
@mouseup="cancelControl"
>
......
......@@ -2,22 +2,22 @@
<div class="airway-edit dialog1027" v-interact>
<div class="dialog-header">
<img class="dialog-header__icon" src="../../../../assets/images/mount_head.png" />
<div class="dialog-header__title">手动规划</div>
<div class="dialog-header__close" @click="$emit('close')">关闭</div>
<div class="dialog-header__title">{{ $t('common.手动规划') }}</div>
<div class="dialog-header__close" @click="$emit('close')">{{ $t('common.关闭') }}</div>
</div>
<div class="dialog-content">
<div class="ae-page">
<div v-hover @click="onPrev">上一航点</div>
<div v-hover @click="onPrev">{{ $t('common.上一航点') }}</div>
<div>{{ pageIndex }} / {{ pageCount }}</div>
<div v-hover @click="onNext">下一航点</div>
<div v-hover @click="onNext">{{ $t('common.下一航点') }}</div>
</div>
<el-form class="ae-form" :form="curForm" label-width="100px">
<el-form-item label="航线名称" required>
<el-input clearable v-model="name"></el-input>
<el-form class="ae-form" :form="curForm" label-width="140px">
<el-form-item :label="$t('common.航线名称')" required>
<el-input clearable v-model="name" :placeholder="$t('common.请输入航线名称')"></el-input>
</el-form-item>
<el-form-item label="所属单位:" required>
<el-form-item :label="$t('common.所属单位')" required>
<el-cascader ref="CascaderRef" v-model="departmentId" :options="orgList" clearable :show-all-levels="false"
placeholder="请选择所属单位" :props="{
:placeholder="$t('common.请选择所属单位')" :props="{
children: 'children',
label: 'name',
value: 'id',
......@@ -25,21 +25,21 @@
emitPath: false,
}" @change="changeNode"></el-cascader>
</el-form-item>
<el-form-item label="终点降落:" required>
<el-form-item :label="$t('common.终点降落')" required>
<el-radio-group v-model="finishedAction">
<el-radio label="USING_INITIAL_DIRECTION"></el-radio>
<el-radio label="GO_HOME"></el-radio>
<el-radio label="USING_INITIAL_DIRECTION">{{ $t('common.是') }}</el-radio>
<el-radio label="GO_HOME">{{ $t('common.否') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="航线速度" prop="speed">
<el-input clearable v-model="curForm.speed"></el-input>
<el-form-item :label="$t('common.航线速度')" prop="speed">
<el-input clearable v-model="curForm.speed" :placeholder="$t('common.请输入航线速度')"></el-input>
</el-form-item>
<el-form-item label="目标位置" prop="address">
<el-form-item :label="$t('common.目标位置')" prop="address">
<el-autocomplete
:popper-append-to-body="false"
v-model="curForm.address"
:fetch-suggestions="onAddressInput"
placeholder="请输入目标位置"
:placeholder="$t('common.请输入目标位置')"
:trigger-on-focus="false"
@select="
(item) => {
......@@ -61,16 +61,16 @@
<el-button slot="append" icon="el-icon-location" @click="onPickAddress"></el-button>
</el-autocomplete>
</el-form-item>
<el-form-item label="纬度" prop="latitude">
<el-form-item :label="$t('common.纬度')" prop="latitude">
<el-input clearable v-model="curForm.latitude"></el-input>
</el-form-item>
<el-form-item label="经度" prop="longitude">
<el-form-item :label="$t('common.经度')" prop="longitude">
<el-input clearable v-model="curForm.longitude"></el-input>
</el-form-item>
<el-form-item label="高度" prop="altitude">
<el-form-item :label="$t('common.高度')" prop="altitude">
<el-input clearable v-model="curForm.altitude"></el-input>
</el-form-item>
<el-form-item label="航线标签" prop="label">
<el-form-item :label="$t('common.航线标签')" prop="label">
<el-select multiple v-model="flightLabel">
<el-option
v-for="item in labelList"
......@@ -81,15 +81,15 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="航点动作">
<el-button type="text" @click="showActions = true">{{curForm.actions.length}}个动作</el-button>
<el-form-item :label="$t('common.航点动作')">
<el-button type="text" @click="showActions = true">{{curForm.actions.length}}{{ $t('common.个动作') }}</el-button>
</el-form-item>
<el-form-item label="航线总里程">{{distance}}m</el-form-item>
<el-form-item label="预计飞行时间">{{time}}</el-form-item>
<el-form-item :label="$t('common.航线总里程')">{{distance}}m</el-form-item>
<el-form-item :label="$t('common.预计飞行时间')">{{time}}</el-form-item>
</el-form>
<div class="ae-btns">
<el-button type="primary" @click="onSave" :loading="saveLoading">保存</el-button>
<el-button type="danger" @click="onDel">删除航点</el-button>
<el-button type="primary" @click="onSave" :loading="saveLoading">{{ $t('common.保存') }}</el-button>
<el-button type="danger" @click="onDel">{{ $t('common.删除航点') }}</el-button>
</div>
</div>
<Actions
......@@ -313,15 +313,15 @@ export default {
// 保存航线
async onSave() {
if (!this.name) {
this.$message.warning("请输入航线名称");
this.$message.warning(this.$t('common.请输入航线名称'));
return;
}
if (!this.departmentId) {
this.$message.warning("请选择所属机构");
this.$message.warning(this.$t('common.请选择所属机构'));
return;
}
if (this.form.length === 0) {
this.$message.warning("请点击地图选择航点");
this.$message.warning(this.$t('common.请点击地图选择航点'));
return;
}
this.saveLoading = true;
......@@ -372,7 +372,7 @@ export default {
};
try {
let res = await AirLine.add({
flightName: airway.name || `${this.userInfo.username}-巡查}`,
flightName: airway.name || `${this.userInfo.username}-${this.$t('common.巡查')}`,
pointCount: airway.content.length,
distance: airway.distance,
departmentId: airway.departmentId,
......@@ -401,7 +401,7 @@ export default {
}),
})),
});
this.$message.success("创建航线成功");
this.$message.success(this.$t('common.创建航线成功'));
this.$emit("addDone", res.data);
this.$emit("close");
} catch (e) {}
......@@ -735,7 +735,7 @@ export default {
.airway-edit {
position: absolute;
top: 0px;
width: 352px;
width: 452px;
.dialog-content {
display: flex;
flex-direction: column;
......
......@@ -3,11 +3,11 @@
<div class="header">
<div class="title">
<img src="../../assets/images/mount_head.png" />
<div class="font">航线库</div>
<div class="font">{{ $t('common.航线库') }}</div>
</div>
</div>
<el-form class="task-main" label-width="70px">
<el-form-item label="任务库" v-if="useTask">
<el-form class="task-main" label-width="100px">
<el-form-item :label="$t('common.任务库')" v-if="useTask">
<el-select v-model="selectedTaskId" clearable>
<el-option
v-for="(item, i) in taskList"
......@@ -16,7 +16,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="航线选择">
<el-form-item :label="$t('common.航线选择')">
<el-select
v-model="selectedAirwayId"
:disabled="airwaySelectDisabled"
......@@ -29,10 +29,10 @@
></el-option>
</el-select>
</el-form-item>
<div class="btn" @click="onStartTask" v-hover>一键任务</div>
<div class="btn" @click="onStartTask" v-hover>{{ $t('common.一键任务') }}</div>
<div class>
<span class="btn__add-line" @click="showAirwayEdit = true">
<span class="f8"></span> 创建航线
<span class="f8"></span> {{ $t('common.创建航线') }}
</span>
</div>
</el-form>
......@@ -164,7 +164,7 @@ export default {
}
} else {
if (this.selectedTaskId && this.selectedAirwayId == "") {
this.$message.warning("未找到相应的航线");
this.$message.warning(this.$t('common.未找到相应的航线'));
}
this.selectedAirwayId = "";
this.airwaySelectDisabled = false;
......@@ -269,28 +269,28 @@ export default {
async onStartTask() {
// 判断是否已接管
if (!(await this.isTakeOver())) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return;
}
// 判断是否选择了航线
if (this.selectedAirway.id === -1) {
this.$message.warning("请选择航线");
this.$message.warning(this.$t('common.请选择航线'));
return;
}
let diversionPoint = this.uav.diversionPoint;
if (!diversionPoint) {
return this.$message.warning("设备暂无备降点无法进行一键任务,请前往后台管理设置备降点!");
return this.$message.warning(this.$t('common.设备暂无备降点无法进行一键任务,请前往后台管理设置备降点!'));
}
let data = this.taskList.filter((item) => item.id == this.selectedTaskId);
if (data && data[0].status == "执行中") {
return this.$message.warning("当前任务执行中");
return this.$message.warning(this.$t('common.当前任务执行中'));
}
try {
await this.$confirm("请确认是否进行一键任务操作?", "安全确认", {
cancelButtonText: "取消",
confirmButtonText: "确定",
await this.$confirm(this.$t('common.请确认是否进行一键任务操作?'), this.$t('common.安全确认'), {
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
});
......@@ -303,9 +303,9 @@ export default {
taskInfoId: this.selectedTaskId,
callback: (status) => {
if (status) {
this.$message.success("一键任务指令发送成功");
this.$message.success(this.$t('common.一键任务指令发送成功'));
} else {
this.$message.error("一键任务指令发送失败");
this.$message.error(this.$t('common.一键任务指令发送失败'));
}
},
});
......
......@@ -3,11 +3,11 @@
<div class="header">
<div class="title">
<img src="../../assets/images/mount_head.png" />
<div class="font">任务库</div>
<div class="font">{{ $t('common.任务库') }}</div>
</div>
</div>
<el-form class="task-main" label-width="60px">
<el-form-item label="任务库">
<el-form-item :label="$t('common.任务库')">
<el-cascader
filterable
popper-class="mmc"
......@@ -18,7 +18,7 @@
:options="taskListAll"
clearable
:show-all-levels="false"
placeholder="请选择任务"
:placeholder="$t('common.请选择任务')"
:props="{
children: 'children',
label: 'name',
......@@ -33,24 +33,24 @@
</template>
</el-cascader>
</el-form-item>
<el-form-item label="航线">
<el-tooltip content="航线名称" placement="top">
<el-form-item :label="$t('common.航线')">
<el-tooltip :content="$t('common.航线名称')" placement="top">
<el-input
v-if="isSelectTask || selectedAirway.id !== -1"
disabled
v-model="selectedAirway.name"
placeholder="请选择航线"
:placeholder="$t('common.请选择航线')"
class
style="width: 100%"
size="mini"
></el-input>
<el-button v-else class="select-airway__btn" @click="showFlywayDialog = true">选择航线</el-button>
<el-button v-else class="select-airway__btn" @click="showFlywayDialog = true">{{ $t('common.选择航线') }}</el-button>
</el-tooltip>
</el-form-item>
<div class="btn" @click="onStartTask" v-hover>一键任务</div>
<div class="btn" @click="onStartTask" v-hover>{{ $t('common.一键任务') }}</div>
<div class>
<span class="btn__add-line" @click="showAirwayEdit = true">
<span class="f8"></span> 创建航线
<span class="f8"></span> {{ $t('common.创建航线') }}
</span>
</div>
</el-form>
......@@ -92,7 +92,7 @@ export default {
...mapState("MMCFlightControlCenter", ["cesiumViewer", "useSTLAirway"]),
...mapState("MMCFlightControlCenter/uav", ["taskList", "uav"]),
taskListAll() {
return [{ name: "选择航线自动生成任务", id: -1 }, ...this.taskList];
return [{ name: this.$t('common.选择航线自动生成任务'), id: -1 }, ...this.taskList];
},
/**
* 是否选择任务
......@@ -159,19 +159,19 @@ export default {
async onStartTask() {
// 判断是否已接管
if (!(await this.isTakeOver())) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return;
}
// 判断是否选择了航线
if (this.selectedAirway.id === -1) {
this.$message.warning("请选择航线");
this.$message.warning(this.$t('common.请选择航线'));
return;
}
try {
await this.$confirm("请确认是否进行一键任务操作?", "安全确认", {
cancelButtonText: "取消",
confirmButtonText: "确定",
await this.$confirm(this.$t('common.请确认是否进行一键任务操作?'), this.$t('common.安全确认'), {
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
});
......@@ -182,9 +182,9 @@ export default {
this.$store.dispatch("MMCFlightControlCenter/uav/takeOff", {
callback: (status) => {
if (status) {
this.$message.success("一键任务指令发送成功");
this.$message.success(this.$t('common.一键任务指令发送成功'));
} else {
this.$message.error("一键任务指令发送失败");
this.$message.error(this.$t('common.一键任务指令发送失败'));
}
},
});
......
......@@ -2,7 +2,7 @@
<div class="control-left" :class="{ collapse: listCollapse }">
<div class="left-bar-item item" @click="onClickTask">
<img class="left-bar-item__icon" src="./assets/images/task.svg" />
<div class="left-bar-item__text">任务</div>
<div class="left-bar-item__text">{{ $t('common.任务') }}</div>
</div>
<AirwayList class="task-list" v-if="openTask"></AirwayList>
<VideoMapSwitch ref="videoMapSwitch"></VideoMapSwitch>
......@@ -88,7 +88,7 @@ export default {
case 2:
if (this.taskId == null) {
return this.$message.error("暂无绑定任务!");
return this.$message.error(this.$t('common.暂无绑定任务'));
}
this.openTraffic = !this.openTraffic;
break;
......
......@@ -2,50 +2,50 @@
<div class="police dialog1027" v-interact>
<div class="dialog-header">
<img class="dialog-header__icon" src="../../assets/images/mount_head.png" />
<div class="dialog-header__title">警灯</div>
<div class="dialog-header__title">{{ $t('controlMenu.警灯') }}</div>
<div class="dialog-header__close" @click="$emit('close')">关闭</div>
<div class="dialog-header__close" @click="$emit('close')">{{ $t('controlMenu.关闭') }}</div>
</div>
<div class="police_ceonter">
<!-- 警灯模式 -->
<div class="police_controls">
<div class="plice_fontTwo">警灯模式:</div>
<div class="plice_fontTwo">{{ $t('controlMenu.警灯模式') }}:</div>
<div>
<el-radio-group v-model="alarmLampMode" @change="onChangeALMode">
<el-radio :label="1">关闭</el-radio>
<el-radio :label="2">慢闪</el-radio>
<el-radio :label="3">快闪</el-radio>
<el-radio :label="4">交替闪</el-radio>
<el-radio :label="1">{{ $t('controlMenu.关闭') }}</el-radio>
<el-radio :label="2">{{ $t('controlMenu.慢闪') }}</el-radio>
<el-radio :label="3">{{ $t('controlMenu.快闪') }}</el-radio>
<el-radio :label="4">{{ $t('controlMenu.交替闪') }}</el-radio>
</el-radio-group>
</div>
</div>
<!-- 尾灯 -->
<div class="police_controls">
<div class="plice_fontTwo">尾灯:</div>
<div class="plice_fontTwo">{{ $t('controlMenu.尾灯') }}:</div>
<div>
<el-radio-group v-model="tailLightSwitch" @change="onSwitchTL">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
<el-radio :label="1">{{ $t('controlMenu.开') }}</el-radio>
<el-radio :label="2">{{ $t('controlMenu.关') }}</el-radio>
</el-radio-group>
</div>
</div>
<!-- 降落伞灯 -->
<div class="police_controls">
<div class="plice_fontTwo">降落伞灯:</div>
<div class="plice_fontTwo">{{ $t('controlMenu.降落伞灯') }}:</div>
<div>
<el-radio-group v-model="parachuteLightSwitch" @change="onSwitchPL">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
<el-radio :label="1">{{ $t('controlMenu.开') }}</el-radio>
<el-radio :label="2">{{ $t('controlMenu.关') }}</el-radio>
</el-radio-group>
</div>
</div>
<!-- 隐蔽模式 -->
<div class="police_controls">
<div class="plice_fontTwo">隐蔽模式:</div>
<div class="plice_fontTwo">{{ $t('controlMenu.隐蔽模式') }}:</div>
<div>
<el-radio-group v-model="covertSwitch" @change="onSwitchCovert">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
<el-radio :label="1">{{ $t('controlMenu.开') }}</el-radio>
<el-radio :label="2">{{ $t('controlMenu.关') }}</el-radio>
</el-radio-group>
</div>
</div>
......@@ -88,7 +88,7 @@ export default {
topic,
data,
callback() {
console.log("发送成功");
console.log(this.$t('common.发送成功'));
},
});
},
......@@ -107,7 +107,7 @@ export default {
topic,
data,
callback() {
console.log("发送成功");
console.log(this.$t('common.发送成功'));
},
});
},
......@@ -126,7 +126,7 @@ export default {
topic,
data,
callback() {
console.log("发送成功");
console.log(this.$t('common.发送成功'));
},
});
},
......@@ -157,7 +157,6 @@ export default {
// 警灯弹框
.police {
width: 475px;
height: 200px;
pointer-events: auto;
position: absolute;
left: -490px;
......@@ -220,7 +219,7 @@ export default {
}
.plice_fontTwo {
width: 90px;
width: 120px;
font-size: 18px;
font-weight: 700;
color: #fff;
......
......@@ -2,20 +2,20 @@
<div class="cpt-nest-logger dialog1027" v-interact>
<div class="title-box dialog-header">
<img class="dialog-header__icon" src="../../../../assets/images/mount_head.png" />
<div class="dialog-header__title">运行监控日志</div>
<div class="dialog-header__title">{{ $t('logger.运行监控日志') }}</div>
<div class="dialog-header__close" style="display: flex">
<div class="icon-box" @click="onClear">
<span class="iconfont icon-qingchushuju"></span>
<!-- <span class="icon-text pr20">清除数据</span> -->
</div>
<div class="close" @click="$emit('close')">关闭</div>
<div class="close" @click="$emit('close')">{{ $t('common.关闭') }}</div>
</div>
</div>
<div class="ctx-box dialog-content">
<div class="head mt7">
<div class="text">消息等级</div>
<div class="text con">消息内容</div>
<div class="time">时间</div>
<div class="text">{{ $t('common.消息等级') }}</div>
<div class="text con">{{ $t('common.消息内容') }}</div>
<div class="time">{{ $t('logger.时间') }}</div>
</div>
<div class="list-box mt7">
<div class="item-box" v-for="(item,index) in msgList" :key="index">
......
......@@ -6,8 +6,8 @@
class="dialog-header__icon"
src="../../assets/images/mount_head.png"
/>
<div class="dialog-header__title">操作区域</div>
<div class="dialog-header__close" @click="$emit('exit')">关闭</div>
<div class="dialog-header__title">{{ $t('controlList.操作区域') }}</div>
<div class="dialog-header__close" @click="$emit('exit')">{{ $t('common.关闭') }}</div>
</div>
<div class="nset_control_box_area">
<div class="wrj">
......@@ -17,23 +17,23 @@
</div>-->
<div class="item" @click="onSwitchAirline">
<SymbolIcon icon="guiji" />
<span class="txt">轨迹</span>
<span class="txt">{{ $t('controlList.轨迹') }}</span>
</div>
<div class="item" @click="onContinueFly">
<SymbolIcon icon="jixufeihang1" />
<span class="txt">继续飞行</span>
<span class="txt">{{ $t('controlList.继续飞行') }}</span>
</div>
<div class="item" @click="onPauseFly">
<SymbolIcon icon="zantingfeihang1" />
<span class="txt">暂停飞行</span>
<span class="txt">{{ $t('controlList.暂停飞行') }}</span>
</div>
<div class="item" @click="safetyNotice = !safetyNotice">
<SymbolIcon icon="anquanjiangla1" />
<span class="txt">紧急迫降</span>
<span class="txt">{{ $t('controlList.紧急迫降') }}</span>
</div>
<div class="item" @click="showLogger = !showLogger">
<SymbolIcon icon="yunhangrizhi2" />
<span class="txt">运行日志</span>
<span class="txt">{{ $t('controlList.运行日志') }}</span>
</div>
<div
class="item"
......@@ -41,7 +41,7 @@
v-if="uav && uav.network === 2"
>
<SymbolIcon icon="tiaozhuandaozuobiao" />
<span class="txt">指点飞行</span>
<span class="txt">{{ $t('controlList.指点飞行') }}</span>
</div>
<div
class="item"
......@@ -49,7 +49,7 @@
v-if="uav && uav.network === 2"
>
<img class="dib mt3" src="./assets/images/1.svg" alt />
<span class="txt">内场控制</span>
<span class="txt">{{ $t('controlList.内场控制') }}</span>
</div>
</div>
</div>
......@@ -62,14 +62,14 @@
custom-class="mmc"
>
<div class="endrenwu">
<div class="tishiyu">紧急迫降</div>
<div class="tishiyu">{{ $t('controlList.紧急迫降') }}</div>
<div class="queding">
无人机即将原地降落,请确认无人机下方是否安全!
{{ $t('controlList.无人机即将原地降落请确认无人机下方是否安全') }}
</div>
<div class="btn_kuang">
<div class="btn btn_lan" @click="safetyNotice = false">取消</div>
<div class="btn btn_lan" @click="safetyNotice = false">{{ $t('common.取消') }}</div>
<div style="width: 20px"></div>
<div class="btn btn_lv" @click="onLand">确定</div>
<div class="btn btn_lv" @click="onLand">{{ $t('common.确定') }}</div>
</div>
</div>
</el-dialog>
......@@ -85,21 +85,21 @@
custom-class="mmc"
>
<div class="endrenwu guideFlight">
<div class="tishiyu">引导飞行确认</div>
<div class="queding">位置获取成功,请确认是否进行指点模式飞行</div>
<div class="tishiyu">{{ $t('controlList.引导飞行确认') }}</div>
<div class="queding">{{ $t('controlList.位置获取成功请确认是否进行指点模式飞行') }}</div>
<div class="fleSpeed">
指点飞行速度:
{{ $t('controlList.指点飞行速度') }}
<el-input
oninput="value=value.replace(/[^0-9.]/g,'')"
v-model="flySpeed"
></el-input>
<span style="opacity: 0">1</span>(米/秒)
<span style="opacity: 0">1</span>{{ $t('controlList.米每秒') }}
</div>
<div class="red" v-if="maxSpeed">指点飞行最大速度为8米/秒</div>
<div class="red" v-if="maxSpeed">{{ $t('controlList.指点飞行最大速度为8米每秒') }}</div>
<div class="btn_kuang">
<div class="btn btn_lan" @click="onGuideFlightCancel">取消</div>
<div class="btn btn_lan" @click="onGuideFlightCancel">{{ $t('common.取消') }}</div>
<div style="width: 20px"></div>
<div class="btn btn_lv" @click="onGuideFlightConfirm">确定</div>
<div class="btn btn_lv" @click="onGuideFlightConfirm">{{ $t('common.确定') }}</div>
</div>
</div>
</el-dialog>
......@@ -188,7 +188,7 @@ export default {
isTakeOver = this.isTakeOverHangar;
}
if (!(await isTakeOver())) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return false;
}
return true;
......@@ -203,7 +203,7 @@ export default {
isTakeOver = this.isTakeOverHangar;
}
if (!(await isTakeOver())) {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return false;
}
if (this.airlineEntity) {
......@@ -304,7 +304,7 @@ export default {
// 指点飞行 wgs84
this.guideFlightDone = false;
let position = null;
this.$message("请点击地图获取目标位置");
this.$message(this.$t('controlList.请点击地图获取目标位置'));
handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
handler.setInputAction((movement) => {
let earthPosition = viewer.camera.pickEllipsoid(
......@@ -347,7 +347,7 @@ export default {
},
type: 518,
},
"指点移动指令下发"
this.$t('controlList.指点移动指令下发')
);
// console.log(this.wsShow,'this.wsShow');
// return
......@@ -378,7 +378,7 @@ export default {
handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
this.$message({
type: "info",
message: "已取消操作",
message: this.$t('controlList.已取消操作'),
});
},
},
......@@ -444,6 +444,8 @@ export default {
justify-content: space-between;
.item {
text-align:center;
background-image: linear-gradient(
179deg,
#1773b6 0%,
......@@ -461,13 +463,15 @@ export default {
gap: 4px;
.item {
text-align:center;
flex-shrink: 0;
width: 58px;
height: 58px;
background: #3c3c3c;
color: #fff;
display: flex;
flex-wrap: wrap;
// flex-wrap: wrap;
justify-content: space-between;
font-size: 28px;
flex-direction: column;
......
......@@ -6,7 +6,7 @@
size="mini"
v-model="search.key"
class="input-name"
placeholder="请输入任务名称"
:placeholder="$t('common.请输入任务名称')"
clearable
/>
</div>
......@@ -17,14 +17,14 @@
prefix-icon="ccc"
v-model="pickTime"
type="datetimerange"
range-separator="至"
:range-separator="$t('common.至')"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:start-placeholder="$t('common.开始日期')"
:end-placeholder="$t('common.结束日期')"
popper-class="flight-log"
></el-date-picker>
</div>
<el-button size="mini" class="search__btn" @click="Search">搜索</el-button>
<el-button size="mini" class="search__btn" @click="Search">{{ $t('common.搜索') }}</el-button>
</div>
<div
class="lists"
......@@ -44,24 +44,24 @@
"
>
<div class="content">
<span>预警内容</span>
<div>{{ item.content || "暂无" }}</div>
<span>{{ $t('common.预警内容') }}</span>
<div>{{ item.content || $t('common.暂无') }}</div>
</div>
<div class="content">
飞行高度
{{ $t('common.飞行高度') }}
<div>{{ item.height || "0" }}</div>
</div>
<div class="content">
飞行速度
{{ $t('common.飞行速度') }}
<div>{{ item.speed || "0" }}</div>
</div>
<div class="content">
<span>无人机位置</span>
<div>{{ item.address || "暂无" }}</div>
<span>{{ $t('common.无人机位置') }}</span>
<div>{{ item.address || $t('common.暂无') }}</div>
</div>
<div class="content">
预警时间
<div>{{ item.createTime || "暂无" }}</div>
{{ $t('common.预警时间') }}
<div>{{ item.createTime || $t('common.暂无') }}</div>
</div>
</div>
</div>
......@@ -74,12 +74,12 @@
</div>
</div>
</div>
<div v-if="!flag" class="cf tc" style="margin: 100px auto">加载中...</div>
<div v-if="!flag" class="cf tc" style="margin: 100px auto">{{ $t('common.加载中') }}</div>
<div
v-else-if="flag && messageList.length == 0 && signalList.length == 0"
class="cf tc"
style="margin: 100px auto"
>暂无数据</div>
>{{ $t('common.暂无数据') }}</div>
<div class="page">
<el-pagination
small
......@@ -91,9 +91,9 @@
:total="pagination.totalCount"
></el-pagination>
<!-- <div class="zhuan">
<span>前往</span>
<span>{{ $t('common.前往') }}</span>
<input type="text" v-model="qianVal" />
<span></span>
<span>{{ $t('common.页') }}</span>
</div>-->
</div>
</div>
......@@ -189,7 +189,7 @@ export default {
pageNo: this.search.pageNo,
pageSize: this.search.pageSize,
deviceHardId: this.uav.deviceId,
mark: this.type == "VPN" ? "公网" : this.type == "SPE" ? "专网" : "",
mark: this.type == "VPN" ? this.$t('common.公网') : this.type == "SPE" ? this.$t('common.专网') : "",
};
this.flag = false;
/* let res = await API.FCKERNEL.getStationSignalLog(data);
......
......@@ -4,26 +4,26 @@
<div class="control-list" style="top: 13%">
<div class="control-item" :class="showHealth ? 'active' : ''" @click="onSwitchShow('showHealth')">
<img :class="{ active: showHealth }" src="./assets/images/health.svg" />
<span class="">健康管理</span>
<span class="">{{ $t('common.健康管理') }}</span>
</div>
<!-- 机库信息 -->
<slot name="hangar"></slot>
<div class="control-item" :class="showMount ? 'active' : ''" @click="onSwitchShow('showMount')">
<img :class="{ active: showMount }" src="./assets/images/mount.svg" />
<span class="">挂载</span>
<span class="">{{ $t('common.挂载') }}</span>
</div>
<div class="control-item" :class="showControlList ? 'active' : ''" @click="onSwitchShow('showControlList')">
<img :class="{ active: showControlList }" src="./assets/images/uav.svg" />
<span class="">无人机</span>
<span class="">{{ $t('common.无人机') }}</span>
</div>
<div v-if="!isHangar && uav.network === 2" class="control-item" :class="showAlarmLamp ? 'active' : ''"
@click="onSwitchShow('showAlarmLamp')">
<img :class="{ active: showAlarmLamp }" src="./assets/images/lamp.svg" />
<span class="">警灯</span>
<span class="">{{ $t('common.警灯') }}</span>
</div>
<div class="control-item" :class="showViewLib ? 'active' : ''" @click="onSwitchShow('showViewLib')">
<img :class="{ active: showViewLib }" src="./assets/images/files.svg" />
<span class="">视图库</span>
<span class="">{{ $t('common.视图库') }}</span>
</div>
<ViewLib v-if="showViewLib"></ViewLib>
</div>
......@@ -103,15 +103,15 @@ export default {
for (let i = 0; i < uavRealTimeData.link.length; i++) {
const k = uavRealTimeData.link[i];
if (k.priority == 2 && k.using) {
return "专网";
return this.$t('common.专网');
} else if (k.priority == 3 && k.using) {
return "公网";
return this.$t('common.公网');
} else if (k.priority == 1 && k.using) {
return "图传";
return this.$t('common.图传');
}
}
}
return name || "离线";
return name || this.$t('common.离线');
},
/**
* 接管判断, 机库模块中不需要判断接管
......@@ -148,12 +148,12 @@ export default {
async onSwitchShow(key) {
// 判断是否已接管
if (!(await this.isTakeOver() )&& key != 'showViewLib') {
this.$message.warning("请先接管设备");
this.$message.warning(this.$t('common.请先接管设备'));
return;
}
let networkType = this.network()
if (key == 'showHealth' && networkType == '离线' && key != 'showViewLib') {
return this.$message.info('无人机不在线!');
if (key == 'showHealth' && networkType == this.$t('common.离线') && key != 'showViewLib') {
return this.$message.info(this.$t('common.无人机不在线'));
}
this.$emit("switchCallback");
this.hideAll(key);
......@@ -190,6 +190,7 @@ export default {
cursor: pointer;
box-sizing: border-box;
overflow: hidden;
text-align: center;
>img {
width: 24px;
......
......@@ -2,25 +2,25 @@
<div class="dialog1027" v-interact>
<div class="dialog-header">
<img class="dialog-header__icon" src="../../../../../../../assets/images/mount_head.png" />
<div class="dialog-header__title">接管记录</div>
<div class="dialog-header__close" @click="$emit('close')">关闭</div>
<div class="dialog-header__title">{{ $t('common.接管记录') }}</div>
<div class="dialog-header__close" @click="$emit('close')">{{ $t('controlMenu.关闭') }}</div>
</div>
<div class="dialog-content">
<el-table :data="list" height="200px">
<el-table-column :label="`${hangar ? '机库' : '无人机'}名称`" align="center" prop="deviceName"></el-table-column>
<el-table-column :label="`${hangar ? '机库' : '无人机'}所属单位`" align="center" prop="deviceDeptName"></el-table-column>
<el-table-column label="接管状态" align="center" prop="takeStats">
<el-table-column :label="`${hangar ? $t('controlMenu.机库') : $t('controlMenu.无人机')}${$t('controlMenu.名称')}`" align="center" prop="deviceName"></el-table-column>
<el-table-column :label="`${hangar ? $t('controlMenu.机库') : $t('controlMenu.无人机')}${$t('controlMenu.所属单位')}`" align="center" prop="deviceDeptName"></el-table-column>
<el-table-column :label="$t('controlMenu.接管状态')" align="center" prop="takeStats">
<template slot-scope="scope">
<div :class="scope.row.takeStats ?'color-aqua':'color-tomato'">
{{scope.row.takeStats ? '接管中' : '未接管'}}
{{scope.row.takeStats ? $t('controlMenu.接管中') : $t('controlMenu.未接管')}}
</div>
</template>
</el-table-column>
<el-table-column label="当前控制单位" align="center" prop="userDeptName"></el-table-column>
<el-table-column label="当前控制用户" align="center" prop="takeUserName"></el-table-column>
<el-table-column label="操作" align="center" prop="name">
<el-table-column :label="$t('controlMenu.当前控制单位')" align="center" prop="userDeptName"></el-table-column>
<el-table-column :label="$t('controlMenu.当前控制用户')" align="center" prop="takeUserName"></el-table-column>
<el-table-column :label="$t('controlMenu.操作')" align="center" prop="name">
<template slot-scope="scope">
<el-buttonclas @click="onExit(scope.row)" type="text" class="color-aqua cp" size="small" v-if="scope.row.takeStats">退出接管</el-buttonclas>
<el-buttonclas @click="onExit(scope.row)" type="text" class="color-aqua cp" size="small" v-if="scope.row.takeStats">{{ $t('controlMenu.退出接管') }}</el-buttonclas>
</template>
</el-table-column>
</el-table>
......@@ -70,12 +70,11 @@ export default {
});
this.list.splice(0, this.list.length, ...res.data?.list??[])
// this.list = res.data;
console.log("接管记录", this.list);
},
onExit(item) {
this.$confirm("确认退出该用户接管?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
this.$confirm(this.$t('controlMenu.确认退出该用户接管'), this.$t('controlMenu.提示'), {
confirmButtonText: this.$t('controlMenu.确定'),
cancelButtonText: this.$t('controlMenu.取消'),
type: "warning",
}).then(async () => {
await Control_API.setUavControlOff({
......@@ -84,7 +83,7 @@ export default {
this.init();
this.$message({
type: "success",
message: "操作完成",
message: this.$t('controlMenu.操作完成'),
});
});
},
......@@ -95,7 +94,7 @@ export default {
<style lang="scss" scoped>
.dialog1027::v-deep {
width: 750px;
width: 770px;
position: absolute !important;
left: 50%;
top: calc(100% + 25px);
......
......@@ -593,7 +593,7 @@ export default {
if (streamConfiguration?.fluencyUrl) {
// 流畅地址
streamOptions.push({
label: "流畅",
label: this.$t('common.流畅'),
value: "FLV",
url: streamConfiguration?.fluencyUrl,
});
......@@ -602,7 +602,7 @@ export default {
if (streamConfiguration?.lowLatencyUrl) {
// 低延迟地址
streamOptions.push({
label: "低延迟",
label: this.$t('common.低延迟'),
value: "WEBRTC",
url: streamConfiguration?.lowLatencyUrl,
});
......@@ -611,7 +611,7 @@ export default {
if (streamConfiguration?.originalUrl) {
// 原画地址
streamOptions.push({
label: "原画",
label: this.$t('common.原画'),
value: "QINGLIU",
url: streamConfiguration?.originalUrl,
});
......@@ -770,7 +770,7 @@ export default {
isTakeOver = this.isTakeOverHangar;
}
if (!(await isTakeOver())) {
show && this.$message.warning("请先接管设备");
show && this.$message.warning(this.$t('common.请先接管设备'));
return false;
}
return true;
......
......@@ -33,12 +33,12 @@
/>
</div>
<div class="online-info">
{{ data.onLineCount + data.offLineCount }}
{{$t('common.共')}} {{ data.onLineCount + data.offLineCount }} {{$t('common.架')}}
<span class="ml10" :class="{ online: data.onLineCount }"
>{{ data.onLineCount }} 在线</span
>{{ data.onLineCount }} {{$t('common.在线')}}</span
>
/
{{ data.offLineCount }} 离线
{{ data.offLineCount }} {{$t('common.离线')}}
</div>
</div>
<div class="uav-item-child-box" :class="{ collapse: data.collapse }">
......@@ -69,9 +69,9 @@
>{{ device.name }}</span
>
<span style="color: #31db24" class="dib" v-if="device.isOnline"
>(在线)</span
>({{$t('common.在线')}})</span
>
<span v-else class="dib">(离线)</span>
<span v-else class="dib">({{$t('common.离线')}})</span>
<div class="symbol-icon-box">
<!-- <template v-if="device.modelName && device.modelName.includes('入云龙1')">
<div class="uav_version status-icon cp">
......@@ -106,7 +106,7 @@
uav && device.deviceId === uav.deviceId && uav.showPlayer,
}"
v-if="IsShowPlayer"
title="视频"
:title="$t('common.视频')"
@click="onShowPlayer(device)"
v-hover
></div>
......@@ -116,7 +116,7 @@
active:
uav && device.deviceId === uav.deviceId && uav.showPanel,
}"
title="控制面板"
:title="$t('common.控制面板')"
v-if="IsShowPane"
@click="onShowPanel(device)"
v-hover
......@@ -124,7 +124,7 @@
<div
v-if="isTakeOver"
class="takeover"
title="接管"
:title="$t('common.接管')"
@click="onTakeOver(device, data.name)"
v-hover
>
......@@ -139,7 +139,7 @@
</div>
</div>
<el-dialog
title="接管确认"
:title="$t('common.接管确认')"
:visible.sync="takeOverVisible"
width="20%"
:modal-append-to-body="false"
......@@ -147,20 +147,20 @@
:close-on-click-modal="false"
@close="takeLoading = false"
>
<span>是否请求接管 {{ departmentName }} 下的 {{ takeDevice.name }}</span>
<span>{{$t('common.是否请求接管')}} {{ departmentName }} {{$t('common.下的')}} {{ takeDevice.name }}</span>
<span slot="footer" class="dialog-footer">
<el-button @click="takeOverVisible = false">取 消</el-button>
<el-button @click="takeOverVisible = false">{{$t('common.取消')}}</el-button>
<el-button
@click="onForceTakeOver"
type="danger"
:loading="forceTakeLoading"
>强制接管</el-button
>{{$t('common.强制接管')}}</el-button
>
<el-button
type="primary"
@click="onApplyTakeOver"
:loading="takeLoading"
>确 认</el-button
>{{$t('common.确认')}}</el-button>
>
</span>
</el-dialog>
......@@ -282,7 +282,7 @@ export default {
//接管消息
if (content.isAgree) {
this.$notify.success({
title: "接管消息",
title: this.$t('common.接管消息'),
message: msg,
duration: 30000,
offset: 40,
......@@ -291,12 +291,12 @@ export default {
this.takeOverVisible = false;
} else {
this.$notify.warning({
title: "接管消息",
title: this.$t('common.接管消息'),
message: msg,
duration: 30000,
offset: 40,
});
this.$message.warning("申请接管拒绝");
this.$message.warning(this.$t('common.申请接管拒绝'));
}
this.takeLoading = false;
this.bus.$off("uas-device-take-agree-message", this.onTakeAgree);
......@@ -315,12 +315,12 @@ export default {
this.bus.$on("uas-device-take-agree-message", this.onTakeAgree);
this.bus.$on("uas-device-take-refuse-message", this.onTakeAgree);
} else {
this.$message.warning("接管失败,申请单位未同意");
this.$message.warning(this.$t('common.接管失败申请单位未同意'));
this.takeLoading = false;
}
setTimeout(() => {
if (this.takeLoading) {
this.$message.error(`接管失败,申请单位未同意`);
this.$message.error(this.$t('common.接管失败申请单位未同意'));
this.takeLoading = false;
}
}, 5500);
......@@ -335,7 +335,7 @@ export default {
deviceId: this.takeDevice.id,
});
if (res.code === 0) {
this.$message.success(`请开始操作${this.takeDevice.name}`);
this.$message.success(`${this.$t('common.请开始操作')}${this.takeDevice.name}`);
this.takeOverVisible = false;
this.$emit("refresh");
}
......@@ -355,7 +355,7 @@ export default {
deviceId: uav.id,
});
if (res.code === 0) {
this.$message.success(`请开始操作${uav.name}`);
this.$message.success(`${this.$t('common.请开始操作')}${uav.name}`);
this.$emit("refresh");
}
} else {
......@@ -368,9 +368,9 @@ export default {
uav.currentOperator === this.userInfo.id
) {
try {
await this.$confirm(`请确认是否退出接管${uav.name}?`, "安全确认", {
cancelButtonText: "取消",
confirmButtonText: "确定",
await this.$confirm(`${this.$t('common.请确认是否退出接管')}${uav.name}?`, this.$t('common.安全确认'), {
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确认'),
customClass: "uav_controlPane",
showClose: false,
});
......@@ -378,7 +378,7 @@ export default {
deviceId: uav.id,
});
if (res.code === 0) {
this.$message.success(`已退出接管${uav.name}`);
this.$message.success(`${this.$t('common.已退出接管')}${uav.name}`);
this.$emit("refresh");
}
} catch (e) {}
......@@ -402,10 +402,10 @@ export default {
password: this.mqttToken,
})
.then(() => {
console.log("mqtt连接成功");
console.log(this.$t('common.mqtt连接成功'));
});
} catch (e) {
console.log("mqtt失败", e);
console.log(this.$t('common.mqtt失败'), e);
}
// setTimeout(() => {
// this.onShowPanel(item);
......
......@@ -4,13 +4,13 @@
<img style src="./assets/images/collapse.svg" />
</div>
<div class="uav-list-header">
<span class="uav-list-header__text">无人机列表</span>
<span class="uav-list-header__text">{{ $t('uavList.无人机列表') }} </span>
</div>
<div class="uav-search">
<el-input
class="uav-search__input"
clearable
placeholder="请输入无人机名称/机构名称"
:placeholder="$t('uavList.请输入无人机名称机构名称')"
v-model="uavSearchContent"
v-on:keyup.enter.native="onUavSearch"
>
......@@ -21,7 +21,7 @@
></i>
</el-input>
<el-button class="uav-search__btn" @click="onUavSearch" v-hover
>搜索</el-button
>{{ $t('common.搜索') }}</el-button
>
</div>
<List
......
......@@ -310,7 +310,7 @@ export default {
return false;
}
// 指点飞行 wgs84
this.$message("请点击地图获取目标位置");
this.$message(this.$t('controlList.请点击地图获取目标位置'));
this.zdfcFlag = false;
let position = null;
handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
......@@ -340,11 +340,11 @@ export default {
// 指点飞行
this.$confirm(
"位置获取成功,请确认是否进行指点模式飞行?",
"引导飞行确认",
this.$t('controlList.位置获取成功请确认是否进行指点模式飞行'),
this.$t('controlList.引导飞行确认'),
{
cancelButtonText: "取消",
confirmButtonText: "确定",
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
}
......@@ -372,7 +372,7 @@ export default {
handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
this.$message({
type: "info",
message: "已取消操作",
message: this.$t('controlList.已取消操作'),
});
this.zdfcFlag = true;
});
......@@ -398,7 +398,7 @@ export default {
} else if (item == 1) {
this.$emit("fn", { type: 523 }, "wrj");
}
this.$message.success("操作成功");
this.$message.success(this.$t('messages.操作成功'));
},
handClick(item) {
if(item == 1){
......@@ -479,6 +479,8 @@ export default {
flex: 1 1 20%;
.item {
text-align:center;
display: inline-block;
padding: 5px;
background-image: linear-gradient(
......@@ -507,6 +509,8 @@ export default {
#2a7abd 56%,
#084681 100%
);
text-align:center;
box-shadow: 0 0 5px 0 #0c1c47;
border-radius: 4.5px;
}
......
......@@ -15,7 +15,7 @@
<div class="icon-box">
<span class="iconfont icon-dandianshipin"></span>
</div>
<div class="text-box">舱内视频</div>
<div class="text-box">{{$t('common.舱内')}}/div>
</div>
<div
class="tools-item"
......@@ -31,7 +31,7 @@
<div class="icon-box">
<span class="iconfont icon-dandianshipin"></span>
</div>
<div class="text-box">舱外视频</div>
<div class="text-box">{{$t(common.舱外)}}</div>
</div>
<div
class="tools-item"
......@@ -47,7 +47,7 @@
<div class="icon-box">
<span class="iconfont icon-dandianshipin"></span>
</div>
<div class="text-box">无人机视频</div>
<div class="text-box">{{$t(common.无人机视频)}}</div>
</div>
</div>
</div>
......
......@@ -3,17 +3,17 @@
<div class="h32 lh32 headerBox jcsb pl16 pr16">
<div class="title">
<span class="w1 dib mr10 h16 mt4" style="background: #FFBD36;border:1px solid #FFBD36"></span>
<span>接管记录</span>
<span>{{ $t('common.接管记录') }}</span>
</div>
<div class="cp FFBD36 fwb" @click="$emit('exit')">关闭</div>
<div class="cp FFBD36 fwb" @click="$emit('exit')">{{ $t('controlMenu.关闭') }}</div>
</div>
<div class="pl16 pr16 pb16 contentBox mt16">
<div class="hd">
<div>无人机名称</div>
<div>无人机所属单位</div>
<div>接管状态</div>
<div>当前控制单位</div>
<div>操作</div>
<div>{{ $t('controlMenu.无人机') }}{{ $t('controlMenu.名称') }}</div>
<div>{{ $t('controlMenu.无人机') }}{{ $t('controlMenu.所属单位') }}</div>
<div>{{ $t('controlMenu.接管状态') }}</div>
<div>{{ $t('controlMenu.当前控制单位') }}</div>
<div>{{ $t('controlMenu.操作') }}</div>
</div>
<div class="bd" v-for="(item,index) in deviceList" :key="index">
<div>{{item.deviceName}}</div>
......@@ -25,7 +25,7 @@
<el-tooltip :content="item.status" placement="bottom">
<div class="w20 h20 opretion2" v-if="item.status=='被接管'"></div>
</el-tooltip>
<el-tooltip content="退出接管" placement="bottom">
<el-tooltip :content="$t('controlMenu.退出接管')" placement="bottom">
<div class="w20 h20 opretion" v-if="item.status!='被接管'" @click="exit(item)"></div>
</el-tooltip>
</div>
......@@ -54,9 +54,9 @@
} */
},
exit(item) {
this.$confirm('请确认是否进行退出接管操作?', '安全确认', {
cancelButtonText: '取消',
confirmButtonText: '确定',
this.$confirm(this.$t('controlMenu.确认退出该用户接管'), this.$t('controlMenu.提示'), {
cancelButtonText: this.$t('controlMenu.取消'),
confirmButtonText: this.$t('controlMenu.确定'),
customClass: "uav_controlPane",
showClose: false
}).then(async () => {
......@@ -70,7 +70,7 @@
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
message: this.$t('controlMenu.操作完成')
});
});
......
......@@ -3,9 +3,9 @@
<div class="nset_control_box_header lh34">
<div class="title ml10">
<img src="~./assets/mount_head.png" />
<div class="font">操作区域</div>
<div class="font">{{ $t('controlList.操作区域') }}</div>
</div>
<div class="exit mr10 cp" @click="$emit('exit')">关闭</div>
<div class="exit mr10 cp" @click="$emit('exit')">{{ $t('common.关闭') }}</div>
</div>
<div class="nset_control_box_area p10">
<div class="wrj" v-show="!controlTypeFlag">
......@@ -15,41 +15,41 @@
</div> -->
<div class="w48 h48 item mb3 cf tc cp" @click="$emit('uav-location')">
<SymbolIcon icon="guiji" />
<span class="dib f8">轨迹</span>
<span class="dib f8">{{ $t('controlList.轨迹') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" @click="wrjfn(0)">
<SymbolIcon icon="jixufeihang1" />
<span class="dib f8">继续飞行</span>
<span class="dib f8">{{ $t('controlList.继续飞行') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" @click="wrjfn(1)">
<SymbolIcon icon="zantingfeihang1" />
<span class="dib f8">暂停飞行</span>
<span class="dib f8">{{ $t('controlList.暂停飞行') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" @click="handclick">
<SymbolIcon icon="anquanjiangla1" />
<span class="dib f8">安全降落</span>
<span class="dib f8">{{ $t('controlList.紧急迫降') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" v-if="!wsShow" @click="$emit('yxrz')">
<SymbolIcon icon="yunhangrizhi2" />
<span class="dib f8">运行日志</span>
<span class="dib f8">{{ $t('controlList.运行日志') }}</span>
</div>
<div class="w48 h48 item mb3 cf tc cp" @click="zdfx">
<SymbolIcon icon="tiaozhuandaozuobiao" />
<span class="dib f8">指点飞行</span>
<span class="dib f8">{{ $t('controlList.指点飞行') }}</span>
</div>
</div>
</div>
<!-- 飞控 无人机 安全降落 -->
<el-dialog :visible.sync="safetyNotice" width="30%" :append-to-body="true" style="margin-top: 20vh">
<div class="endrenwu">
<div class="tishiyu">安全降落</div>
<div class="tishiyu">{{ $t('controlList.紧急迫降') }}</div>
<div class="queding">
无人机即将原地降落,请确认无人机下方是否安全!
{{ $t('controlList.无人机即将原地降落请确认无人机下方是否安全') }}
</div>
<div class="btn_kuang">
<div class="btn btn_lan" @click="safetyNotice = false">取消</div>
<div class="btn btn_lan" @click="safetyNotice = false">{{ $t('common.取消') }}</div>
<div style="width: 20px"></div>
<div class="btn btn_lv" @click="remind">确定</div>
<div class="btn btn_lv" @click="remind">{{ $t('common.确定') }}</div>
</div>
</div>
</el-dialog>
......@@ -138,7 +138,7 @@ export default {
});
}
this.safetyNotice = false;
this.$message.success("操作成功");
this.$message.success(this.$t('messages.操作成功'));
},
change(item) {
if (item.chargerPower == 2) {
......@@ -190,7 +190,7 @@ export default {
});
}
}
this.$message.success("操作成功");
this.$message.success(this.$t('messages.操作成功'));
},
addModeelPoint(viewer, position, name) {
......@@ -225,7 +225,7 @@ export default {
// 指点飞行 wgs84
this.zdfcFlag = false;
let position = null;
this.$message("请点击地图获取目标位置");
this.$message(this.$t('controlList.请点击地图获取目标位置'));
handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
handler.setInputAction((movement) => {
let earthPosition = viewer.camera.pickEllipsoid(
......@@ -250,11 +250,11 @@ export default {
(Point = this.addModeelPoint(window.viewer, position, "目标点"));
// 一键返航
this.$confirm(
"位置获取成功,请确认是否进行指点模式飞行?",
"引导飞行确认",
this.$t('controlList.位置获取成功请确认是否进行指点模式飞行'),
this.$t('controlList.引导飞行确认'),
{
cancelButtonText: "取消",
confirmButtonText: "确定",
cancelButtonText: this.$t('common.取消'),
confirmButtonText: this.$t('common.确定'),
customClass: "uav_controlPane",
showClose: false,
}
......@@ -307,7 +307,7 @@ export default {
handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
this.$message({
type: "info",
message: "已取消操作",
message: this.$t('controlList.已取消操作'),
});
});
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
......@@ -350,7 +350,7 @@ export default {
},
handClick(item) {
this.$emit("fn", this.list[item].data, "yc");
this.$message.success("操作成功");
this.$message.success(this.$t('messages.操作成功'));
},
},
};
......@@ -418,6 +418,7 @@ export default {
justify-content: space-between;
.item {
text-align:center;
padding: 5px;
background-image: linear-gradient(179deg,
#1773b6 0%,
......@@ -434,6 +435,7 @@ export default {
justify-content: space-between;
.item {
text-align:center;
padding: 5px;
background-image: linear-gradient(179deg,
#1773b6 0%,
......
......@@ -3,22 +3,22 @@
<div class="title-box" v-interact>
<div class="title pl20">
<img src="~./assets/mount_head.png" />
<div class="font">运行监控日志</div>
<div class="font">{{ $t('common.运行监控日志') }}</div>
</div>
<div style="display: flex">
<div class="icon-box" @click="$emit('clear-msg')">
<span class="iconfont icon-qingchushuju"></span>
<!-- <span class="icon-text pr20">清除数据</span> -->
</div>
<div class="cf ml20 mr10 c70d" @click="$emit('exit')">关闭</div>
<div class="cf ml20 mr10 c70d" @click="$emit('exit')">{{ $t('common.关闭') }}</div>
</div>
</div>
<div class="ctx-box">
<div class="head mt7">
<div class="text-box pl100">
<div class="type">消息等级</div>
<div class="type">{{ $t('common.消息等级') }}</div>
</div>
<span class="text">消息内容</span>
<span class="text">{{ $t('common.消息内容') }}</span>
</div>
<div class="list-box">
<div class="item-box mt7" v-for="(item,index) in list" :key="index">
......
......@@ -332,7 +332,7 @@ export default {
})
streamOptions.push({
value: "QingLiu",
label: "原画",
label:this.$t('common.原画'),
});
}
......@@ -340,7 +340,7 @@ export default {
if (this.streams?.socketUrl) {
streamOptions.push({
value: "WS-FLV",
label: "流畅",
label: this.$t('common.流畅'),
});
}
......@@ -348,7 +348,7 @@ export default {
if (this.streams?.webUrl) {
streamOptions.push({
value: "WebRtc",
label: "低延迟",
label: this.$t('common.低延迟'),
});
}
......
......@@ -156,7 +156,7 @@
</div>
</el-tooltip>
<div class="line ml12"></div>
<el-tooltip content="接管记录" placement="bottom">
<el-tooltip :content="$t('common.接管记录') " placement="bottom">
<div class="jgjl w25 h25 cp ml12" @click="$emit('TakeOverFlag')"></div>
</el-tooltip>
<div class="icon-box ml12">
......@@ -221,7 +221,7 @@
<SymbolIcon :icon="gwArr[level].icon" />
</el-tooltip>
</div>
<el-tooltip content="接管记录" placement="bottom">
<el-tooltip :content="$t('common.接管记录') " placement="bottom">
<div class="jgjl w25 h25 cp ml12" @click="$emit('TakeOverFlag')"></div>
</el-tooltip>
<div class="mode_nameBox cp ml12">
......
......@@ -3,7 +3,7 @@
<div class="h32 lh32 headerBox jcsb pl16 pr16">
<div class="title">
<span class="w1 dib mr10 h16 mt4" style="background: #FFBD36;border:1px solid #FFBD36"></span>
<span>接管记录</span>
<span>{{$t('common.接管记录') }}</span>
</div>
<div class="cp FFBD36 fwb" @click="$emit('exit')">关闭</div>
</div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论