|
|
@@ -201,32 +201,8 @@
|
|
|
</div>
|
|
|
<div class="fill-scroll">
|
|
|
<el-collapse v-model="activeEnvTab">
|
|
|
- <el-collapse-item name="meteorology" title="气象条件">
|
|
|
- <el-form :model="weatherForm" class="dense-form" label-width="120px" size="small" style="margin-top: 20px">
|
|
|
- <el-row :gutter="16">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="风速(m/s)">
|
|
|
- <el-input v-model.number="weatherForm.wind_speed" :min="0" step="0.1" type="number"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="风向(°)">
|
|
|
- <el-input v-model.number="weatherForm.wind_direction" :max="360" :min="0" step="1" type="number"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="温度(°C)">
|
|
|
- <el-input v-model.number="weatherForm.temperature" step="0.5" type="number"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="能见度(km)">
|
|
|
- <el-input v-model.number="weatherForm.visibility" :min="0.1" step="0.5" type="number"/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </el-collapse-item>
|
|
|
+ <!-- 气象环境配置 -->
|
|
|
+ <weather-env-form ref="weatherRef" v-model="weatherForm"/>
|
|
|
</el-collapse>
|
|
|
|
|
|
</div>
|
|
|
@@ -350,7 +326,7 @@
|
|
|
<div><i class="el-icon-time"></i> 完整事件时序</div>
|
|
|
</div>
|
|
|
<div class="timeline-wrap fill-scroll">
|
|
|
- <GanttChart :timelineData="filteredAllEvents" :default-duration="7200"></GanttChart>
|
|
|
+ <GanttChart :timelineData="currentPreviewEvents" :default-duration="7200"></GanttChart>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
@@ -390,9 +366,11 @@ import {getEquTree} from "@/api/faultSimulation";
|
|
|
import DdUpload from "@/views/Deduction/taskSetting/components/dd-upload.vue";
|
|
|
import {getSubPlanZbStatistics, getSubPlanZbTsList, getSubPlanZbZbList} from "@/api/subPlanZb";
|
|
|
import {saveJson} from "@/api/deductionTask";
|
|
|
+import WeatherEnvForm from "@/views/decision/testBuild/components/WeatherEnvForm.vue";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
+ WeatherEnvForm,
|
|
|
DdUpload,
|
|
|
MissileMissionCard,
|
|
|
TargetSchemeInfo,
|
|
|
@@ -467,7 +445,13 @@ export default {
|
|
|
openMissilePanels: [],
|
|
|
|
|
|
activeEnvTab:['meteorology'],
|
|
|
- weatherForm: {wind_speed: 3.5, wind_direction: 90, temperature: 25, visibility: 10},
|
|
|
+ /** 气象参数(作为 WeatherEnvForm 的 v-model) */
|
|
|
+ weatherForm: {
|
|
|
+ temp: 20, rh: 55, pressure: 1013,
|
|
|
+ wind: 5.5, windDir: 270, fallSpeed: 0.8,
|
|
|
+ airDensity: 1200, visibility: 5000, rain: 0,
|
|
|
+ weather: 'sunny'
|
|
|
+ },
|
|
|
geoForm: {terrain: 'hilly', alt: 350, desc: ''},
|
|
|
|
|
|
legend: {showMeasurement: true, showTarget: true, showJammer: true},
|
|
|
@@ -514,7 +498,6 @@ export default {
|
|
|
},
|
|
|
currentPreviewEvents() {
|
|
|
const list = [];
|
|
|
-
|
|
|
this.tsList.forEach(t => {
|
|
|
if (!t.ts) return;
|
|
|
list.push({
|
|
|
@@ -530,14 +513,14 @@ export default {
|
|
|
|
|
|
return list.sort((a, b) => this.hhmmssToSec(a.rawTime) - this.hhmmssToSec(b.rawTime));
|
|
|
},
|
|
|
- filteredAllEvents() {
|
|
|
- return this.currentPreviewEvents.filter(e => {
|
|
|
- if (e.zbType === '2' && !this.legend.showMeasurement) return false;
|
|
|
- if (e.zbType === '1' && !this.legend.showTarget) return false;
|
|
|
- if (e.zbType === '3' && !this.legend.showJammer) return false;
|
|
|
- return true;
|
|
|
- });
|
|
|
- }
|
|
|
+ // filteredAllEvents() {
|
|
|
+ // return this.currentPreviewEvents.filter(e => {
|
|
|
+ // if (e.zbType === '2' && !this.legend.showMeasurement) return false;
|
|
|
+ // if (e.zbType === '1' && !this.legend.showTarget) return false;
|
|
|
+ // if (e.zbType === '3' && !this.legend.showJammer) return false;
|
|
|
+ // return true;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
},
|
|
|
watch: {
|
|
|
missionMissileCount: {
|
|
|
@@ -632,28 +615,6 @@ export default {
|
|
|
const [h = 0, m = 0, s = 0] = (hms || '00:00:00').split(':').map(n => parseInt(n, 10) || 0);
|
|
|
return h * 3600 + m * 60 + s;
|
|
|
},
|
|
|
- getPreviewTitle() {
|
|
|
- return this.activeTab === 'target'
|
|
|
- ? '靶标布设方案信息'
|
|
|
- : this.activeTab === 'jammer'
|
|
|
- ? '干扰装备布设方案信息'
|
|
|
- : '测量装备布设方案信息';
|
|
|
- },
|
|
|
- getTimelineType(c) {
|
|
|
- return c === 'tl-secondary' ? 'success'
|
|
|
- : c === 'tl-warn' ? 'warning'
|
|
|
- : c === 'tl-danger' ? 'danger'
|
|
|
- : c === 'tl-muted' ? 'info'
|
|
|
- : 'primary';
|
|
|
- },
|
|
|
- getTagType(c) {
|
|
|
- return c === 'badge-success' ? 'success'
|
|
|
- : c === 'badge-warn' ? 'warning'
|
|
|
- : c === 'badge-danger' ? 'danger'
|
|
|
- : c === 'badge-accent' ? 'info'
|
|
|
- : c === 'badge-secondary' ? 'primary'
|
|
|
- : 'default';
|
|
|
- },
|
|
|
goPrev() {
|
|
|
this.step = Math.max(1, this.step - 1);
|
|
|
},
|
|
|
@@ -666,255 +627,6 @@ export default {
|
|
|
}
|
|
|
this.step = Math.min(4, this.step + 1);
|
|
|
},
|
|
|
-
|
|
|
- // —— 新增/编辑弹窗相关(保留) ——
|
|
|
- openAddTargetDialog() {
|
|
|
- this.editModeTarget = false;
|
|
|
- this.editIndexTarget = -1;
|
|
|
- this.newTargetForm = {
|
|
|
- name: '',
|
|
|
- type: '静态',
|
|
|
- fixedFromPlan: false,
|
|
|
- lon: '',
|
|
|
- lat: '',
|
|
|
- time: '',
|
|
|
- statusText: '可用',
|
|
|
- schemePointName: ''
|
|
|
- };
|
|
|
- this.targetForm = {mode: 'normal', duration: 300, motion: 'fixed', speed: 0};
|
|
|
- this.mapMarkerPosition = null;
|
|
|
- this.addTargetDialog = true;
|
|
|
- },
|
|
|
- openAddJammerDialog() {
|
|
|
- this.editModeJammer = false;
|
|
|
- this.editIndexJammer = -1;
|
|
|
- this.newJammerForm = {name: '', type: '电磁', lon: '', lat: '', schedules: []};
|
|
|
- this.jammerForm = {freq: 350, power: 500, duration: 180};
|
|
|
- this.addJammerDialog = true;
|
|
|
- },
|
|
|
- openAddMeasurementDialog() {
|
|
|
- this.editModeMeasurement = false;
|
|
|
- this.editIndexMeasurement = -1;
|
|
|
- this.newMeasurementForm = {name: '', type: '雷达', lon: '', lat: '', time: '', schedules: [], posNote: ''};
|
|
|
- this.measureForm = {range: 50, freq: 100, precision: 0.5, deg: 10, height: 20};
|
|
|
- this.addMeasurementDialog = true;
|
|
|
- },
|
|
|
- selectMapPosition(e) {
|
|
|
- const x = Math.max(0, Math.min(e.offsetX, e.currentTarget.clientWidth));
|
|
|
- const y = Math.max(0, Math.min(e.offsetY, e.currentTarget.clientHeight));
|
|
|
- this.mapMarkerPosition = {x, y};
|
|
|
- const baseLon = 116.3, baseLat = 39.9;
|
|
|
- this.newTargetForm.lon = (baseLon + x / 200).toFixed(6);
|
|
|
- this.newTargetForm.lat = (baseLat + y / 200).toFixed(6);
|
|
|
- },
|
|
|
- onTargetTypeChange() {
|
|
|
- if (this.newTargetForm.type === '动态') this.newTargetForm.fixedFromPlan = false;
|
|
|
- },
|
|
|
- confirmAddTarget() {
|
|
|
- this.$refs.targetFormRef.validate(valid => {
|
|
|
- if (!valid) return;
|
|
|
- const statusMap = {'可用': 'badge-success', '维护中': 'badge-warn', '停用': 'badge-accent'};
|
|
|
- const params = {
|
|
|
- mode: this.targetForm.mode,
|
|
|
- duration: this.targetForm.duration,
|
|
|
- motion: this.newTargetForm.type === '动态' ? this.targetForm.motion : 'fixed',
|
|
|
- speed: this.newTargetForm.type === '动态' ? this.targetForm.speed : 0
|
|
|
- };
|
|
|
- if (this.editModeTarget && this.editIndexTarget > -1) {
|
|
|
- const t = this.targets[this.editIndexTarget];
|
|
|
- Object.assign(t, {
|
|
|
- name: this.newTargetForm.name, type: this.newTargetForm.type,
|
|
|
- fixedFromPlan: !!this.newTargetForm.fixedFromPlan, lon: this.newTargetForm.lon, lat: this.newTargetForm.lat,
|
|
|
- time: this.newTargetForm.time, statusText: this.newTargetForm.statusText,
|
|
|
- statusClass: statusMap[this.newTargetForm.statusText] || 'badge-success',
|
|
|
- params: {...params}
|
|
|
- });
|
|
|
- this.$message.success('已保存靶标修改');
|
|
|
- } else {
|
|
|
- const id = `T-${Date.now()}`;
|
|
|
- this.targets.push({
|
|
|
- id, name: this.newTargetForm.name, type: this.newTargetForm.type,
|
|
|
- fixedFromPlan: !!this.newTargetForm.fixedFromPlan, lon: this.newTargetForm.lon, lat: this.newTargetForm.lat,
|
|
|
- time: this.newTargetForm.time, statusText: this.newTargetForm.statusText,
|
|
|
- statusClass: statusMap[this.newTargetForm.statusText] || 'badge-success',
|
|
|
- params
|
|
|
- });
|
|
|
- this.$message.success('已添加靶标');
|
|
|
- }
|
|
|
- this.addTargetDialog = false;
|
|
|
- });
|
|
|
- },
|
|
|
- editTarget(i) {
|
|
|
- const t = this.targets[i];
|
|
|
- this.editModeTarget = true;
|
|
|
- this.editIndexTarget = i;
|
|
|
- this.newTargetForm = {
|
|
|
- name: t.name,
|
|
|
- type: t.type,
|
|
|
- fixedFromPlan: !!t.fixedFromPlan,
|
|
|
- lon: t.lon,
|
|
|
- lat: t.lat,
|
|
|
- time: t.time,
|
|
|
- statusText: t.statusText,
|
|
|
- schemePointName: t.name
|
|
|
- };
|
|
|
- this.targetForm = {
|
|
|
- ...(t.params || {}),
|
|
|
- motion: (t.params && t.params.motion) || (t.type === '动态' ? 'linear' : 'fixed')
|
|
|
- };
|
|
|
- this.mapMarkerPosition = null;
|
|
|
- this.addTargetDialog = true;
|
|
|
- },
|
|
|
- removeTarget(i) {
|
|
|
- this.$confirm(`确定删除 "${this.targets[i].name}"?`, '提示', {type: 'warning'})
|
|
|
- .then(() => {
|
|
|
- this.targets.splice(i, 1);
|
|
|
- this.$message.success('已删除');
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- addJammerSchedule() {
|
|
|
- this.newJammerForm.schedules.push({
|
|
|
- time: '',
|
|
|
- triggerType: '导弹接近',
|
|
|
- threshold: '距离<5km',
|
|
|
- action: '立即启动干扰',
|
|
|
- triggerDesc: '',
|
|
|
- delaySec: 0
|
|
|
- });
|
|
|
- },
|
|
|
- removeJammerSchedule(i) {
|
|
|
- this.newJammerForm.schedules.splice(i, 1);
|
|
|
- },
|
|
|
- confirmAddJammer() {
|
|
|
- if ((this.newJammerForm.schedules || []).length === 0) return this.$message.warning('至少添加一条激活计划');
|
|
|
- if (this.newJammerForm.schedules.some(s => !s.time || !s.triggerType)) return this.$message.warning('存在未填写完整的计划');
|
|
|
- this.$refs.jammerFormRef.validate(valid => {
|
|
|
- if (!valid) return;
|
|
|
- if (this.editModeJammer && this.editIndexJammer > -1) {
|
|
|
- const j = this.jammers[this.editIndexJammer];
|
|
|
- j.name = this.newJammerForm.name;
|
|
|
- j.type = this.newJammerForm.type;
|
|
|
- j.lon = this.newJammerForm.lon;
|
|
|
- j.lat = this.newJammerForm.lat;
|
|
|
- j.params = {...this.jammerForm};
|
|
|
- j.schedules = JSON.parse(JSON.stringify(this.newJammerForm.schedules));
|
|
|
- this.$message.success('已保存干扰装备修改');
|
|
|
- } else {
|
|
|
- const id = `J-${Date.now()}`;
|
|
|
- this.jammers.push({
|
|
|
- id,
|
|
|
- name: this.newJammerForm.name,
|
|
|
- type: this.newJammerForm.type,
|
|
|
- lon: this.newJammerForm.lon,
|
|
|
- lat: this.newJammerForm.lat,
|
|
|
- params: {...this.jammerForm},
|
|
|
- schedules: JSON.parse(JSON.stringify(this.newJammerForm.schedules))
|
|
|
- });
|
|
|
- this.$message.success('已添加干扰装备');
|
|
|
- }
|
|
|
- this.addJammerDialog = false;
|
|
|
- });
|
|
|
- },
|
|
|
- editJammer(i) {
|
|
|
- const j = this.jammers[i];
|
|
|
- this.editModeJammer = true;
|
|
|
- this.editIndexJammer = i;
|
|
|
- this.newJammerForm = {
|
|
|
- name: j.name,
|
|
|
- type: j.type,
|
|
|
- lon: j.lon,
|
|
|
- lat: j.lat,
|
|
|
- schedules: JSON.parse(JSON.stringify(j.schedules || []))
|
|
|
- };
|
|
|
- this.jammerForm = {...(j.params || {freq: 350, power: 500, duration: 180})};
|
|
|
- this.addJammerDialog = true;
|
|
|
- },
|
|
|
- removeJammer(i) {
|
|
|
- this.$confirm(`确定删除 "${this.jammers[i].name}"?`, '提示', {type: 'warning'})
|
|
|
- .then(() => {
|
|
|
- this.jammers.splice(i, 1);
|
|
|
- this.$message.success('已删除');
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- addMeasurementSchedule() {
|
|
|
- this.newMeasurementForm.schedules.push({
|
|
|
- time: '',
|
|
|
- triggerType: '导弹接近',
|
|
|
- threshold: '距离<5km',
|
|
|
- action: '发出警报',
|
|
|
- triggerDesc: '',
|
|
|
- delaySec: 0
|
|
|
- });
|
|
|
- },
|
|
|
- removeMeasurementSchedule(i) {
|
|
|
- this.newMeasurementForm.schedules.splice(i, 1);
|
|
|
- },
|
|
|
- confirmAddMeasurement() {
|
|
|
- this.$refs.measureFormRef.validate(valid => {
|
|
|
- if (!valid) return;
|
|
|
- if ((this.newMeasurementForm.schedules || []).some(s => !s.time || !s.triggerType || !s.action)) {
|
|
|
- return this.$message.warning('测量装备存在未填写完整的激活计划');
|
|
|
- }
|
|
|
- if (this.editModeMeasurement && this.editIndexMeasurement > -1) {
|
|
|
- const m = this.measurements[this.editIndexMeasurement];
|
|
|
- m.name = this.newMeasurementForm.name;
|
|
|
- m.type = this.newMeasurementForm.type;
|
|
|
- m.lon = this.newMeasurementForm.lon;
|
|
|
- m.lat = this.newMeasurementForm.lat;
|
|
|
- m.time = this.newMeasurementForm.time;
|
|
|
- m.posNote = this.newMeasurementForm.posNote || '';
|
|
|
- m.params = {...this.measureForm};
|
|
|
- m.schedules = JSON.parse(JSON.stringify(this.newMeasurementForm.schedules || []));
|
|
|
- this.$message.success('已保存测量装备修改');
|
|
|
- } else {
|
|
|
- const id = `M-${Date.now()}`;
|
|
|
- this.measurements.push({
|
|
|
- id, name: this.newMeasurementForm.name, type: this.newMeasurementForm.type,
|
|
|
- lon: this.newMeasurementForm.lon, lat: this.newMeasurementForm.lat, time: this.newMeasurementForm.time,
|
|
|
- posNote: this.newMeasurementForm.posNote || '',
|
|
|
- params: {...this.measureForm},
|
|
|
- schedules: JSON.parse(JSON.stringify(this.newMeasurementForm.schedules || []))
|
|
|
- });
|
|
|
- this.$message.success('已添加测量装备');
|
|
|
- }
|
|
|
- this.addMeasurementDialog = false;
|
|
|
- });
|
|
|
- },
|
|
|
- editMeasurement(i) {
|
|
|
- const m = this.measurements[i];
|
|
|
- this.editModeMeasurement = true;
|
|
|
- this.editIndexMeasurement = i;
|
|
|
- this.newMeasurementForm = {
|
|
|
- name: m.name,
|
|
|
- type: m.type,
|
|
|
- lon: m.lon,
|
|
|
- lat: m.lat,
|
|
|
- time: m.time,
|
|
|
- schedules: JSON.parse(JSON.stringify(m.schedules || [])),
|
|
|
- posNote: m.posNote || ''
|
|
|
- };
|
|
|
- this.measureForm = {...(m.params || {range: 50, freq: 100, precision: 0.5, deg: 10, height: 20})};
|
|
|
- this.addMeasurementDialog = true;
|
|
|
- },
|
|
|
- removeMeasurement(i) {
|
|
|
- this.$confirm(`确定删除 "${this.measurements[i].name}"?`, '提示', {type: 'warning'})
|
|
|
- .then(() => {
|
|
|
- this.measurements.splice(i, 1);
|
|
|
- this.$message.success('已删除');
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- rebuildPreview() {
|
|
|
- this.$message.success('时序已刷新');
|
|
|
- },
|
|
|
handleTrajectory(plan) {
|
|
|
this.$refs.uploadDd.show({
|
|
|
missileId:plan.id,
|