Jelajahi Sumber

按技术协议完善

xyh 1 tahun lalu
induk
melakukan
703b672af9

TEMPAT SAMPAH
src/assets/image/噪声调幅干扰.png


TEMPAT SAMPAH
src/assets/image/噪声调幅干扰效果.png


TEMPAT SAMPAH
src/assets/image/噪声调频干扰.png


TEMPAT SAMPAH
src/assets/image/噪声调频干扰效果.png


TEMPAT SAMPAH
src/assets/image/射频噪声干扰.png


TEMPAT SAMPAH
src/assets/image/射频噪声干扰效果.png


TEMPAT SAMPAH
src/assets/image/间接采样转发干扰.png


TEMPAT SAMPAH
src/assets/image/间接采样转发干扰效果.png


TEMPAT SAMPAH
src/assets/image/雷达侦察信号.png


+ 1 - 1
src/core/config/development.js

@@ -1,5 +1,5 @@
 module.exports = {
     // baseUrl: "http://180.76.231.231:8082/",
     baseUrl: "http://127.0.0.1:8084/",
-    projectName: "模型管理平台",
+    projectName: "电子攻防建模仿真系统",
 };

+ 1 - 1
src/core/config/production.js

@@ -1,5 +1,5 @@
 module.exports = {
  // baseUrl: "http://180.76.231.231:8082/",
    baseUrl: "http://localhost:8082/",
-  projectName: "模型管理平台",
+  projectName: "电子攻防建模仿真系统",
 };

+ 191 - 7
src/views/simulation/index.vue

@@ -43,7 +43,7 @@
             <span slot="content" class="item">红方兵力</span>
             <span><i class="el-icon-s-flag"></i></span>
           </el-tooltip>
-          <el-table :data="redList">
+          <el-table :data="redList" style="overflow-x: scroll;">
             <el-table-column label="名称" align="center" prop="name"></el-table-column>
             <el-table-column label="干扰度" align="center" prop="disturb"></el-table-column>
             <el-table-column label="诱饵数" align="center" prop="toll_number"></el-table-column>
@@ -54,6 +54,12 @@
           disable-transitions>{{scope.row.status}}</el-tag>
       </template>
             </el-table-column>
+            <el-table-column label="操作" align="center">
+              <template slot-scope="scope">
+              <el-button type="text" @click="showMissileInfo(scope.row)">详情</el-button>
+              </template>
+            </el-table-column>
+            
           </el-table>
         </el-tab-pane>
       </el-tabs>
@@ -67,18 +73,94 @@
     </el-row>
     <!-- <TimeLine :showLayers="showLayers" :timeDataArray="timeDataArray" class="TimeLine"></TimeLine> -->
     <div>
-      <el-dialog title="模拟消息列表" :visible.sync="dialogVisible" width="50%">
-        <el-table :data="messageList">
+      <el-dialog title="结果" :visible.sync="dialogVisible" width="50%">
+        <el-tabs v-model="activeNametwo">
+    <el-tab-pane label="消息列表" name="first">
+      <el-table :data="messageList">
           <el-table-column label="序号" prop="order" width="50px"></el-table-column>
           <el-table-column label="时间" align="center" prop="time"></el-table-column>
           <el-table-column label="消息" align="center" prop="context"></el-table-column>
         </el-table>
+    </el-tab-pane>
+    <el-tab-pane label="结果评估" name="second">
+      <el-row>
+        <el-col :span="12">
+          <span>导弹干扰的总累计健康值为: {{healthSum}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>雷达侦查到的导弹数为:  {{findMissile}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>雷达拦截导弹数为:  {{missileFailed}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>依靠欺骗性干扰成功逃脱拦截的导弹数为:  {{escapeNum}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>蓝方的探测率为:  {{parseFloat(findMissile/redList.length)*100}}%</span>
+        </el-col>
+        <el-col :span="12">
+          <span>蓝方的拦截成功率为:  {{parseFloat(missileFailed/findMissile)*100}}%</span>
+        </el-col>
+      </el-row>
+
+
+    </el-tab-pane>
+    <el-tab-pane label="干扰效果" name="third">
+      <div class="image-list">
+      <div class="item1" v-for="(item, index) in currentItem" :key="index">
+        <img class="image-item" :src="getImagePath(index + 1)">
+        <p class="image-title">{{ name[index] }}</p>
+      </div>
+    </div>
+    </el-tab-pane>
+        </el-tabs>
+
         <div slot="footer" class="dialog-footer">
           <el-button @click="exportReport()">导出报告</el-button>
           <el-button @click="dialogVisible = false">关闭</el-button>
         </div>
       </el-dialog>
     </div>
+    <div>
+      <el-dialog title="红方作战单元详细信息" :visible.sync="missileVisible" width="50%">
+
+      <el-row>
+        <el-col :span="12">
+          <span>导弹名称: {{selectMissile.name}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>导弹干扰样式:  {{selectMissile.method}}</span>
+        </el-col>
+        <el-col :span="12">
+          <img :src="selectMissile.src" alt="干扰信号图" width="300px" height="300px">
+          <p class="image-title">干扰信号图</p>
+        </el-col>
+        <el-col :span="12">
+          <span>导弹携带诱饵数:  {{selectMissile.toll_number}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>导弹状态:  {{selectMissile.status}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>导弹x坐标:  {{selectMissile.pos.x}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>导弹y坐标:  {{selectMissile.pos.y}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>导弹z坐标:  {{selectMissile.pos.z}}</span>
+        </el-col>
+        <el-col :span="12">
+          <span>&nbsp;&nbsp;&nbsp;</span>
+        </el-col>
+
+      </el-row>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="missileVisible = false">关闭</el-button>
+        </div>
+      </el-dialog>
+    </div>
   </div>
 </template>
 <script>
@@ -106,6 +188,19 @@ export default {
     return {
       save: false,
       messageList: [],
+      // 发现导弹数
+      findMissile: 0,
+      // 干扰总健康值
+      healthSum: 0,
+      // 拦截导弹数
+      missileFailed:0,
+      // 欺骗成功导弹数
+      escapeNum:0,
+      // 导弹详情信息
+      selectMissile:{
+        pos:{x:0,y:0,z:0}
+      },
+      missileVisible:false,
       situation: [],
       xdName: '',
       nameIdList: [],
@@ -129,9 +224,12 @@ export default {
       mousevalue: null,
       // 选中的点
       selectedMarker: null,
+      currentItem: ['1', '2', '3', '4'],
+      name:['噪声调幅干扰效果','噪声调频干扰效果','噪声直放干扰效果','间接采样转发干扰效果'],
       // 以前的标记点坐标
       oldPosition: null,
       activeName: 'fouth',
+      activeNametwo: 'first',
       currentLab: {
         index: -1,
         isActive: false
@@ -184,9 +282,28 @@ export default {
     // this.startWebSocket();
   },
   methods: {
+    getImagePath(index) {
+      if (index == 1) {
+        return require(`@/assets/image/噪声调幅干扰效果.png`);
+      }
+      if (index == 2) {
+        return require(`@/assets/image/噪声调频干扰效果.png`);
+      }
+      if (index == 3) {
+        return require(`@/assets/image/射频噪声干扰效果.png`);
+      }
+      if (index == 4) {
+        return require(`@/assets/image/间接采样转发干扰效果.png`);
+      }
+      
+    },
     async getJson(row) {
       this.order = 1;
       this.redOrder = 1;
+      this.findMissile = 0,
+      this.escapeNum = 0,
+      this.missileFailed = 0,
+      this.healthSum = 0,
       this.finish = false;
       this.messageList = [];
       this.nameIdList = [];
@@ -271,6 +388,11 @@ export default {
         this.markLine(point1, point2, "red")
       }
     },
+    showMissileInfo(row){
+      console.log('row :>> ', row);
+      this.selectMissile = row
+      this.missileVisible = true
+    },
     //获取所有数据
     getData() {
       this.getCenter();
@@ -605,22 +727,27 @@ export default {
         {
           if(name === this.jsonData.redunit[i].name){
             let disturb = 10
+            let src = ''
             for(let key in this.jsonData.redunit[i].components_json)
             {
               if(this.jsonData.redunit[i].components_json[key].method === '间接采样转发干扰')
               {
                 disturb = disturb*2.0
+                src = require('@/assets/image/间接采样转发干扰.png')
               }
               if(this.jsonData.redunit[i].components_json[key].method === '噪声调频干扰')
               {
+                src = require("@/assets/image/噪声调频干扰.png")
                 disturb = disturb*1.5
               }
               if(this.jsonData.redunit[i].components_json[key].method === '噪声调幅干扰')
               {
+                src = require("@/assets/image/噪声调幅干扰.png")
                 disturb = disturb*1.3
               }
               if(this.jsonData.redunit[i].components_json[key].method === '噪声直放干扰')
               {
+                src = require("@/assets/image/射频噪声干扰.png")
                 disturb = disturb*1.8
               }
              
@@ -635,8 +762,15 @@ export default {
               order: this.redOrder++,
               name: name,
               disturb: disturb,
+              src: src,
               toll_number: this.jsonData.redunit[i].toll_json.length,
-              status: '存活'
+              method: this.jsonData.redunit[i].components_json.干扰器1.method,
+              status: '存活',
+              pos:{
+                x: 0,
+                y: 0,
+                z: 0
+              }
             })
           }
         }
@@ -655,7 +789,8 @@ export default {
           range: 700000.0,
           health: 100.0,
           id: this.id,
-          fire_number: fire_number
+          fire_number: fire_number,
+          mark: 1,
 
         }
       }
@@ -1084,6 +1219,15 @@ export default {
           for (let i = 0; i < this.nameIdList.length; i++) {
             if (this.nameIdList[i].name in data) {
               console.log(' 开始移动' + this.nameIdList[i].name);
+              for(let j=0;j<this.redList.length;j++){
+                if(this.redList[j].name===this.nameIdList[i].name){
+                  //更新导弹位置信息
+                  this.redList[j].pos.x = data[this.nameIdList[i].name].x
+                  this.redList[j].pos.y = data[this.nameIdList[i].name].y
+                  this.redList[j].pos.z = data[this.nameIdList[i].name].z
+                  break
+                }
+              }
               this.modelEntityMoveByIDAndLocation(this.$data._viewer3D, this.nameIdList[i].id, data[this.nameIdList[i].name].x, data[this.nameIdList[i].name].y, data[this.nameIdList[i].name].z)
             }
           }
@@ -1098,6 +1242,10 @@ export default {
                 if (health > this.thaadList[this.nameIdList[i].name].health) {
                   mark = false
                 }
+                else{
+                  //记录健康值变化
+                  this.healthSum = this.healthSum + (health-this.thaadList[this.nameIdList[i].name].health)
+                }
                 this.thaadList[this.nameIdList[i].name].health = health
                 this.changeRange(this.$data._viewer3D, this.thaadList[this.nameIdList[i].name].id, this.thaadList[this.nameIdList[i].name].range, this.thaadList[this.nameIdList[i].name].health, newTimeString, this.nameIdList[i].name, mark)
               }
@@ -1171,10 +1319,16 @@ export default {
     radarFireRecover(){
       for(let item in this.thaadList){
         for(let i = 0;i<this.jsonData.blueunit.length;i++){
-          if(this.jsonData.blueunit[i].name === item)
+          if(this.jsonData.blueunit[i].name === item )
           {
-            this.thaadList[item].fire_number = this.jsonData.blueunit[i].fire_number
+            if(this.thaadList[item].mark==10){//装填
+              this.thaadList[item].fire_number = this.jsonData.blueunit[i].fire_number
+              this.thaadList[item].mark = 1
             break
+            }
+           else if(this.thaadList[item].fire_number !== this.jsonData.blueunit[i].fire_number){//已消耗拦截武器,准备装填
+            this.thaadList[item].mark++
+           }
           }
         }
       }
@@ -1195,6 +1349,7 @@ export default {
           console.log('this.thaadList[item].fire_number :>> ', this.thaadList[item].fire_number);
           let radarPos = viewer.entities.getById(this.thaadList[item].id).position._value
           if (this.Cesium.Cartesian3.distance(radarPos, missilePos) <= this.thaadList[item].range * this.thaadList[item].health * 0.01&&status!=='逃脱拦截') {
+            this.findMissile++
             // 导弹进入了被干扰后的雷达探测范围,判断被拦截 移除实体,删除信息
             if(this.thaadList[item].fire_number>=this.missileList[key].toll_number+1){
                           this.messageList.push({
@@ -1206,6 +1361,7 @@ export default {
             viewer.entities.remove(missile)
             this.nameIdList = this.nameIdList.filter(item => item.id !== this.missileList[key].id);
             delete this.missileList[key]
+            this.missileFailed++
             for(let i =0;i<this.redList.length;i++){
               if(this.redList[i].name === key){
                 this.redList[i].status = '被拦截'
@@ -1225,6 +1381,7 @@ export default {
               time: time,
               context: '导弹' + key + '被雷达' + item + '拦截!!!'
             })
+            this.missileFailed++
             this.thaadList[item].fire_number = 0
             viewer.entities.remove(missile)
             this.nameIdList = this.nameIdList.filter(item => item.id !== this.missileList[key].id);
@@ -1243,6 +1400,7 @@ export default {
               time: time,
               context: '导弹' + key + '成功逃避雷达' + item + '的拦截!!!'
             })
+            this.escapeNum++
             this.thaadList[item].fire_number = 0
             for(let i =0;i<this.redList.length;i++){
               if(this.redList[i].name === key){
@@ -1401,6 +1559,10 @@ export default {
   top: 20px;
 }
 
+.image-title {
+  margin-top: 10px;
+  text-align: center;
+}
 .el-button {
   margin: 5px !important;
 }
@@ -1466,4 +1628,26 @@ export default {
   height: 95px;
   overflow: hidden;
 }
+
+.image-list {
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: space-between;
+}
+
+.item1 {
+  width: 300px;
+  /* 设置外部div块的宽度 */
+  height: 200px;
+  /* 设置外部div块的高度 */
+  margin-bottom: 20px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.image-item {
+  width: 100%;
+  height: 90%;
+}
 </style>

+ 92 - 2
src/views/situation/index.vue

@@ -70,6 +70,17 @@
             <el-table-column label="名称" align="center" prop="name"></el-table-column>
           </el-table>
         </el-tab-pane>
+        <el-tab-pane name="8th">
+          <el-button type="primary" @click="addSatellite()">新增</el-button>
+          <el-tooltip placement="right" effect="light" slot="label">
+            <span slot="content" class="item">蓝方卫星</span>
+            <span><i class="el-icon-bell"></i></span>
+          </el-tooltip>
+          <el-table :data="satelliteList">
+            <el-table-column label="序号" prop="order" width="50px"></el-table-column>
+            <el-table-column label="名称" align="center" prop="name"></el-table-column>
+          </el-table>
+        </el-tab-pane>
       </el-tabs>
       <div class="buttons">
         <el-button icon="el-icon-full-screen" circle @click="ismax()"></el-button>
@@ -103,7 +114,9 @@
   <el-form-item label="单元高度">
     <el-input v-model="redForm.h"></el-input>
   </el-form-item>
-
+  <el-form-item label="定点高度">
+    <el-input v-model="redForm.apogee_height"></el-input>
+  </el-form-item>
 </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button @click="saveNewRed()" type="primary">保存</el-button>
@@ -134,6 +147,29 @@
         </div>
       </el-dialog>
     </div>
+    <div>
+      <el-dialog title="新增蓝方预卫星" :visible ="satelliteVisible" width="50%">
+        <el-form ref="form" :model="satelliteForm" label-width="80px">
+  <el-form-item label="卫星名称">
+    <el-input v-model="satelliteForm.name"></el-input>
+  </el-form-item>
+  <el-form-item label="TLE_LINE0">
+    <el-input v-model="satelliteForm.TLE_LINE0"></el-input>
+  </el-form-item>
+  <el-form-item label="TLE_LINE1">
+    <el-input v-model="satelliteForm.TLE_LINE1"></el-input>
+  </el-form-item>
+  <el-form-item label="TLE_LINE2">
+    <el-input v-model="satelliteForm.TLE_LINE2"></el-input>
+  </el-form-item>
+
+</el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="saveNewSatellite()" type="primary">保存</el-button>
+          <el-button @click="satelliteVisible = false">关闭</el-button>
+        </div>
+      </el-dialog>
+    </div>
   </div>
 </template>
 <script>
@@ -166,6 +202,7 @@ export default {
           lat: '',
           lon: '',
           h: '',
+          apogee_height:''
         },
         blueForm: {
           name: '',
@@ -173,12 +210,20 @@ export default {
           lon: '',
           h: '',
         },
+        satelliteForm:{
+          name: '',
+          TLE_LINE0: '',
+          TLE_LINE1: '',
+          TLE_LINE2: '',
+        },
       save: false,
       situation: [],
       redVisible: false,
       blueVisible: false,
+      satelliteVisible: false,
       redList: [],
       blueList: [],
+      satelliteList: [],
       nameIdList:[],
       leftwidth: 12,
       unit: [],
@@ -297,7 +342,7 @@ export default {
                     target_lon: item[item.name].properties.lon,
                     target_lat: item[item.name].properties.lat,
                     target_h: item[item.name].properties.h,
-                    apogee_height: 100000,
+                    apogee_height: this.redForm.apogee_height,
                     fly_time: 900,
                     filepath: "test.csv",
                     sample_time: 1
@@ -324,6 +369,31 @@ export default {
       this.redVisible = false
 
     },
+    saveNewSatellite(){
+      for(let i=0;i<this.satelliteList.length;i++){
+        if(this.satelliteList[i].name === this.satelliteForm.name){
+          this.$message("请勿输入已有卫星名字")
+          return
+        }
+      }
+      this.satelliteList.push({
+        order: this.satelliteList.length+1,
+        name: this.satelliteForm.name
+      })
+      let item = {
+        name:this.satelliteForm.name
+      }
+      item[this.satelliteForm.name]={
+        type:"WX-YJ-001",
+        properties:{
+          TLE_LINE0:this.satelliteForm.TLE_LINE0,
+          TLE_LINE1:this.satelliteForm.TLE_LINE1,
+          TLE_LINE2:this.satelliteForm.TLE_LINE2,
+        }
+      }
+      this.jsonData.satellite.push(item)
+      this.satelliteVisible = false
+    },
     saveNewBlue(){
       for(let i = 0;i<this.blueList.length;i++)
       {
@@ -377,6 +447,7 @@ export default {
           lat: '',
           lon: '',
           h: '',
+          apogee_height:''
         }
         this.redVisible = true
     },
@@ -393,6 +464,19 @@ export default {
         }
         this.blueVisible = true
     },
+    addSatellite(){
+      if(!this.save){
+        this.$message("请先导入想定文件!")
+        return
+      }
+      this.satelliteForm = {
+          name: '',
+          TLE_LINE0:'',
+          TLE_LINE1:'',
+          TLE_LINE2:'',
+        }
+        this.satelliteVisible = true
+    },
     async saveJson() {
       if (this.save) {
         const jsonData = JSON.stringify(this.jsonData);
@@ -592,6 +676,12 @@ export default {
             })
           }
           satellite = response.data.satellite
+          for(let i=0;i<satellite.length;i++){
+            this.satelliteList.push({
+              order: i+1,
+              name: satellite[i].name
+            })
+          }
           center = response.data.center
           this.save = true
           this.jsonData = {