|
@@ -2,14 +2,18 @@
|
|
|
<div class="sm-function-module-content" v-show="cameraShow">
|
|
|
<Tabs value="">
|
|
|
<TabPane :label="Resource.flyRoute" name="fxxl">
|
|
|
- <label class="label-container">{{ Resource.flyRoute }}</label>
|
|
|
+ <!-- <label class="label-container">{{ Resource.flyRoute }}</label>
|
|
|
<input
|
|
|
class="sm-input"
|
|
|
type="file"
|
|
|
accept=".fpf"
|
|
|
id="flyFile"
|
|
|
style="width: 100%"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
+ <div class="importFly">
|
|
|
+ <span>{{ Resource.flyRoute }}</span>
|
|
|
+ <input type="file" accept=".fpf" id="flyFile" style="width: 100%" />
|
|
|
+ </div>
|
|
|
<div class="flybox">
|
|
|
<i
|
|
|
class="el-icon-video-play flyBtn"
|
|
@@ -44,10 +48,16 @@
|
|
|
<el-button type="primary" size="mini" @click="onCancelSpinClk">
|
|
|
{{ Resource.cancelRotatePoint }}
|
|
|
</el-button>
|
|
|
- <label>{{ Resource.pauseFly }}</label>
|
|
|
+ <!-- <label>{{ Resource.pauseFly }}</label>
|
|
|
<input type="checkbox" v-model="stopFlyCircle" />
|
|
|
<label>{{ Resource.rotateCirculation }}</label>
|
|
|
- <input type="checkbox" v-model="circulation" />
|
|
|
+ <input type="checkbox" v-model="circulation" /> -->
|
|
|
+ <el-checkbox v-model="stopFlyCircle">{{
|
|
|
+ Resource.pauseFly
|
|
|
+ }}</el-checkbox>
|
|
|
+ <el-checkbox v-model="circulation">{{
|
|
|
+ Resource.rotateCirculation
|
|
|
+ }}</el-checkbox>
|
|
|
</div>
|
|
|
<label class="label-container">{{ Resource.rotateSpeed }}</label>
|
|
|
<div class="sm-solider-input-box">
|
|
@@ -124,14 +134,14 @@
|
|
|
<div v-show="state.customRouteNames.length > 0">
|
|
|
<div class="row-item">
|
|
|
<span>已经添加站点</span>
|
|
|
- <div class="row-content">
|
|
|
+ <div>
|
|
|
<!-- <el-select
|
|
|
v-model="state.selectedAddedStopIndex"
|
|
|
:options="state.routeStops"
|
|
|
label-field="stopName"
|
|
|
value-field="index"
|
|
|
/> -->
|
|
|
- <el-select v-model="state.selectedAddedStopIndex" >
|
|
|
+ <el-select v-model="state.selectedAddedStopIndex">
|
|
|
<el-option
|
|
|
v-for="item in state.routeStops"
|
|
|
:key="item.value"
|
|
@@ -155,7 +165,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div>
|
|
|
+ <!-- <div>
|
|
|
<label class="label-container">飞行速度</label>
|
|
|
<div class="sm-solider-input-box">
|
|
|
<input
|
|
@@ -168,16 +178,19 @@
|
|
|
v-model="state.routeSpeed"
|
|
|
/>
|
|
|
<span>{{state.routeSpeed }}</span>
|
|
|
- <!-- <input
|
|
|
- class="min-solider"
|
|
|
- min="0"
|
|
|
- max="50"
|
|
|
- step="0.1"
|
|
|
- style="width: 34%"
|
|
|
- type="number"
|
|
|
- v-model="state.routeSpeed"
|
|
|
- /> -->
|
|
|
</div>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <div class="block">
|
|
|
+ <span class="demonstration">飞行速度</span>
|
|
|
+ <el-slider
|
|
|
+ v-model="state.routeSpeed"
|
|
|
+ step="1"
|
|
|
+ min="0"
|
|
|
+ max="500"
|
|
|
+ style="width: 63%"
|
|
|
+ ></el-slider>
|
|
|
+ <span>{{ state.routeSpeed }}</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="icon-list" style="width: 12.96rem">
|
|
@@ -231,7 +244,7 @@ let flyManager,
|
|
|
let flyLineXmls = [];
|
|
|
import tool from "./tool";
|
|
|
import createFlyLine_xml from "./fly-line-xml.js";
|
|
|
-import rotate from './rotate.vue';
|
|
|
+import rotate from "./rotate.vue";
|
|
|
// ,
|
|
|
// let pointLightSourceDrawHandler,
|
|
|
// spotOrDirectionalLightSourceDrawHandler,
|
|
@@ -244,9 +257,9 @@ import rotate from './rotate.vue';
|
|
|
|
|
|
export default {
|
|
|
name: "sceneCamera",
|
|
|
- components:{
|
|
|
- rotate
|
|
|
-},
|
|
|
+ components: {
|
|
|
+ rotate,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
sharedState: store.state,
|
|
@@ -416,7 +429,6 @@ export default {
|
|
|
option.value = allStops[i].index;
|
|
|
menu.appendChild(option);
|
|
|
}
|
|
|
-
|
|
|
flyManager.play();
|
|
|
});
|
|
|
}
|
|
@@ -658,32 +670,67 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 操作切换
|
|
|
- changleIconItemAction(item) {
|
|
|
- this.state.actionOptions.map((itemObj) => {
|
|
|
- if (itemObj.index == item.index) {
|
|
|
- itemObj.isSelect = true;
|
|
|
- } else {
|
|
|
- itemObj.isSelect = false;
|
|
|
- }
|
|
|
- });
|
|
|
+ changleIconItemAction(item) {
|
|
|
+ this.state.actionOptions.map((itemObj) => {
|
|
|
+ if (itemObj.index == item.index) {
|
|
|
+ itemObj.isSelect = true;
|
|
|
+ } else {
|
|
|
+ itemObj.isSelect = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- switch (item.index) {
|
|
|
- case 1: {
|
|
|
- this.flyStart();//开始
|
|
|
- break;
|
|
|
- }
|
|
|
- case 2: {
|
|
|
- this.flyPause();//暂停
|
|
|
- break;
|
|
|
- }
|
|
|
- case 3: {
|
|
|
- this.flyStop();//停止
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
-}
|
|
|
+ switch (item.index) {
|
|
|
+ case 1: {
|
|
|
+ this.flyStart(); //开始
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 2: {
|
|
|
+ this.flyPause(); //暂停
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 3: {
|
|
|
+ this.flyStop(); //停止
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 下载选择的飞行路线fpf文件
|
|
|
+ downLoad() {
|
|
|
+ let data = flyLineXmls[this.state.customRouteSelectedIndex];
|
|
|
+ if (!data) return;
|
|
|
+ let blob = new Blob([data]); //将返回的数据包装成blob(方法的具体使用参考mdn)
|
|
|
+ let alink = document.createElement("a");
|
|
|
+ alink.download = "fly-route.fpf"; //文件名,大部分浏览器兼容,IE10及以下不兼容
|
|
|
+ alink.href = URL.createObjectURL(blob); //根据blob 创建 url
|
|
|
+ alink.click(); //自动点击
|
|
|
+ },
|
|
|
+
|
|
|
+ // 清除选中飞行路线
|
|
|
+ clearRoute() {
|
|
|
+ flyManager.stop();
|
|
|
+ if (flyLineXmls.length < 1) return;
|
|
|
+ flyLineXmls.splice(this.state.customRouteSelectedIndex, 1);
|
|
|
+ this.state.customRouteNames.splice(
|
|
|
+ this.state.customRouteSelectedIndex,
|
|
|
+ 1
|
|
|
+ );
|
|
|
+ if (flyLineXmls.length > 0) {
|
|
|
+ this.state.customRouteSelectedIndex = 0;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.state.customRouteSelectedIndex = null;
|
|
|
+ this.state.currentStopNames.length = 0;
|
|
|
+ let route = flyManager.currentRoute;
|
|
|
+ if (route) route.clear(); //清除之前的
|
|
|
+ this.state.routeStops = [];
|
|
|
+ this.state.setStopName = "Stop-1";
|
|
|
+ this.state.isSaveAutoFlag = false;
|
|
|
+ this.state.selectedAddedStopIndex = undefined;
|
|
|
+ this.state.addCurrentStopIndex = 0;
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
watch: {
|