|
@@ -47,6 +47,29 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane name="sixth">
|
|
|
+ <el-button type="primary" @click="addRed()">新增</el-button>
|
|
|
+ <el-tooltip placement="right" effect="light" slot="label">
|
|
|
+ <span slot="content" class="item">红方兵力</span>
|
|
|
+ <span><i class="el-icon-message-solid"></i></span>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-table :data="redList">
|
|
|
+ <el-table-column label="序号" prop="order" width="50px"></el-table-column>
|
|
|
+ <el-table-column label="名称" align="center" prop="name"></el-table-column>
|
|
|
+ <el-table-column label="干扰" align="center" prop="method"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="7th">
|
|
|
+ <el-button type="primary" @click="addBlue()">新增</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="blueList">
|
|
|
+ <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>
|
|
@@ -57,6 +80,60 @@
|
|
|
</div>
|
|
|
</el-row>
|
|
|
<div v-if="isShow" class="modeltooltip" ref="modeltooltip">{{ modeltooltip }}</div>
|
|
|
+ <div>
|
|
|
+ <el-dialog title="新增红方作战单元" :visible ="redVisible" width="50%">
|
|
|
+ <el-form ref="form" :model="redForm" label-width="80px">
|
|
|
+ <el-form-item label="单元名称">
|
|
|
+ <el-input v-model="redForm.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="干扰样式">
|
|
|
+ <el-select v-model="redForm.method" placeholder="请选择干扰样式">
|
|
|
+ <el-option label="噪声调频干扰" value="噪声调频干扰"></el-option>
|
|
|
+ <el-option label="噪声调幅干扰" value="噪声调幅干扰"></el-option>
|
|
|
+ <el-option label="噪声直放干扰" value="噪声直放干扰"></el-option>
|
|
|
+ <el-option label="间接采样转发干扰" value="间接采样转发干扰"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单元经度">
|
|
|
+ <el-input v-model="redForm.lon"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单元纬度">
|
|
|
+ <el-input v-model="redForm.lat"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单元高度">
|
|
|
+ <el-input v-model="redForm.h"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+</el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="saveNewRed()" type="primary">保存</el-button>
|
|
|
+ <el-button @click="redVisible = false">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-dialog title="新增蓝方作战单元" :visible ="blueVisible" width="50%">
|
|
|
+ <el-form ref="form" :model="blueForm" label-width="80px">
|
|
|
+ <el-form-item label="单元名称">
|
|
|
+ <el-input v-model="blueForm.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单元经度">
|
|
|
+ <el-input v-model="blueForm.lon"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单元纬度">
|
|
|
+ <el-input v-model="blueForm.lat"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单元高度">
|
|
|
+ <el-input v-model="blueForm.h"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+</el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="saveNewBlue()" type="primary">保存</el-button>
|
|
|
+ <el-button @click="blueVisible = false">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -83,8 +160,25 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ redForm: {
|
|
|
+ name: '',
|
|
|
+ method: '',
|
|
|
+ lat: '',
|
|
|
+ lon: '',
|
|
|
+ h: '',
|
|
|
+ },
|
|
|
+ blueForm: {
|
|
|
+ name: '',
|
|
|
+ lat: '',
|
|
|
+ lon: '',
|
|
|
+ h: '',
|
|
|
+ },
|
|
|
save: false,
|
|
|
situation: [],
|
|
|
+ redVisible: false,
|
|
|
+ blueVisible: false,
|
|
|
+ redList: [],
|
|
|
+ blueList: [],
|
|
|
nameIdList:[],
|
|
|
leftwidth: 12,
|
|
|
unit: [],
|
|
@@ -147,6 +241,130 @@ export default {
|
|
|
this.pointMove();
|
|
|
},
|
|
|
methods: {
|
|
|
+ saveNewRed(){
|
|
|
+ for(let i = 0;i<this.redList.length;i++)
|
|
|
+ {
|
|
|
+ if(this.redForm.name === this.redList[i].name)
|
|
|
+ {
|
|
|
+ this.$message("请勿输入已有单元名字")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.redList.push({
|
|
|
+ order: this.redList.length+1,
|
|
|
+ name: this.redForm.name,
|
|
|
+ method: this.redForm.method
|
|
|
+ })
|
|
|
+ this.markLocationbyJson(parseFloat(this.redForm.lat), parseFloat(this.redForm.lon), parseFloat(this.redForm.h), this.redForm.name, "red")
|
|
|
+ let point1 = {
|
|
|
+ longitude: parseFloat(this.redForm.lon),
|
|
|
+ latitude: parseFloat(this.redForm.lat),
|
|
|
+ height: parseFloat(this.redForm.h)
|
|
|
+ }
|
|
|
+ let item = this.jsonData.center[0]
|
|
|
+ console.log('item :>> ', item);
|
|
|
+ let point2 = {
|
|
|
+ longitude: parseFloat(item[item.name].properties.lon),
|
|
|
+ latitude: parseFloat(item[item.name].properties.lat),
|
|
|
+ height: parseFloat(item[item.name].properties.h)
|
|
|
+ }
|
|
|
+ this.markLine(point1, point2, "red")
|
|
|
+ this.jsonData.redunit.push({
|
|
|
+ name: this.redForm.name,
|
|
|
+ type: "弹道导弹",
|
|
|
+ belong: "红方",
|
|
|
+ health: 100,
|
|
|
+ target: "thaad1",
|
|
|
+ team: "1",
|
|
|
+ component_movementid: 12398127321,
|
|
|
+ component_movementjson: {
|
|
|
+ id: 12398127321,
|
|
|
+ type: "DF-WD-001",
|
|
|
+ properties: {
|
|
|
+ launch_lon: this.redForm.lon,
|
|
|
+ launch_lat: this.redForm.lat,
|
|
|
+ launch_h: this.redForm.h,
|
|
|
+ target_lon: item[item.name].properties.lon,
|
|
|
+ target_lat: item[item.name].properties.lat,
|
|
|
+ target_h: item[item.name].properties.h,
|
|
|
+ apogee_height: 100000,
|
|
|
+ fly_time: 900,
|
|
|
+ filepath: "test.csv",
|
|
|
+ sample_time: 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components_cnt: 1,
|
|
|
+ components_ids: "20",
|
|
|
+ components_json: {
|
|
|
+ 干扰器1: {
|
|
|
+ id: 20,
|
|
|
+ number: "G1",
|
|
|
+ type: "GR-NBLD-001",
|
|
|
+ N: 1,
|
|
|
+ ts: 10000000,
|
|
|
+ tr: 0.0004,
|
|
|
+ tau: 0.0001,
|
|
|
+ f0: 1000000,
|
|
|
+ method: this.redForm.method,
|
|
|
+ url: "ws://localhost:1240"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ unit_json: null
|
|
|
+ })
|
|
|
+ this.redVisible = false
|
|
|
+
|
|
|
+ },
|
|
|
+ saveNewBlue(){
|
|
|
+ for(let i = 0;i<this.blueList.length;i++)
|
|
|
+ {
|
|
|
+ if(this.blueForm.name === this.blueList[i].name)
|
|
|
+ {
|
|
|
+ this.$message("请勿输入已有单元名字")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.blueList.push({
|
|
|
+ order: this.blueList.length+1,
|
|
|
+ name: this.blueForm.name,
|
|
|
+ })
|
|
|
+ this.markLocationbyJson(parseFloat(this.blueForm.lat), parseFloat(this.blueForm.lon), parseFloat(this.blueForm.h), this.blueForm.name, "blue")
|
|
|
+
|
|
|
+ this.jsonData.blueunit.push({
|
|
|
+ name: this.blueForm.name,
|
|
|
+ type: "末端拦截",
|
|
|
+ belong: "蓝方",
|
|
|
+ health: 100,
|
|
|
+ team: "2",
|
|
|
+ task: "对威胁进行探测与拦截",
|
|
|
+ pos: {
|
|
|
+ lat: this.blueForm.lat,
|
|
|
+ lon:this.blueForm.lon,
|
|
|
+ height: this.blueForm.h,
|
|
|
+ h: this.blueForm.h
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.blueVisible = false
|
|
|
+
|
|
|
+ },
|
|
|
+ addRed(){
|
|
|
+ this.redForm = {
|
|
|
+ name: '',
|
|
|
+ method: '',
|
|
|
+ lat: '',
|
|
|
+ lon: '',
|
|
|
+ h: '',
|
|
|
+ }
|
|
|
+ this.redVisible = true
|
|
|
+ },
|
|
|
+ addBlue(){
|
|
|
+ this.blueForm = {
|
|
|
+ name: '',
|
|
|
+ lat: '',
|
|
|
+ lon: '',
|
|
|
+ h: '',
|
|
|
+ }
|
|
|
+ this.blueVisible = true
|
|
|
+ },
|
|
|
async saveJson() {
|
|
|
if (this.save) {
|
|
|
const jsonData = JSON.stringify(this.jsonData);
|
|
@@ -196,6 +414,8 @@ export default {
|
|
|
let blueunit = [];
|
|
|
let satellite = [];
|
|
|
let center = [];
|
|
|
+ this.redList = [];
|
|
|
+ this.blueList = [];
|
|
|
// let fileInfoStr = row.blueunit;
|
|
|
// let fileInfoArr = JSON.parse(fileInfoStr);
|
|
|
// for (let i = 0; i < fileInfoArr.length; i++) {
|
|
@@ -330,6 +550,19 @@ export default {
|
|
|
// jsonData = response.data
|
|
|
blueunit = response.data.blueunit
|
|
|
redunit = response.data.redunit
|
|
|
+ for(let i = 0;i<redunit.length;i++){
|
|
|
+ this.redList.push({
|
|
|
+ order : i+1,
|
|
|
+ name: redunit[i].name,
|
|
|
+ method: redunit[i].components_json["干扰器1"].method
|
|
|
+ })
|
|
|
+ }
|
|
|
+ for(let i=0 ;i<blueunit.length;i++){
|
|
|
+ this.blueList.push({
|
|
|
+ order: i+1,
|
|
|
+ name: blueunit[i].name
|
|
|
+ })
|
|
|
+ }
|
|
|
satellite = response.data.satellite
|
|
|
center = response.data.center
|
|
|
this.save = true
|
|
@@ -765,7 +998,7 @@ export default {
|
|
|
}
|
|
|
if (type == 'blue') {
|
|
|
console.log(' radar!!!');
|
|
|
- const range = 100000;
|
|
|
+ const range = 700000;
|
|
|
this.$data._viewer2D.entities.add({
|
|
|
id: this.id,
|
|
|
position: position,
|