xyh 3 months ago
parent
commit
181b0f34fe

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

@@ -1,5 +1,5 @@
 module.exports = {
  // baseUrl: "http://180.76.231.231:8082/",
    baseUrl: "http://localhost: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: "任务平台",
 };

+ 1 - 1
src/views/layout/components/sidebar/sidebar.vue

@@ -5,7 +5,7 @@
         :src="logoImage"
         style="width: 32px; height: 32px; border-radius: 50%"
       />
-      <p class="sidebar-title-text" style="color:white"> 模型管理平台 </p>
+      <p class="sidebar-title-text" style="color:white"> 任务平台 </p>
     </div>
     <div class="left-menu" style="height: 100%; padding-bottom: 60px">
       <el-scrollbar wrap-class="scrollbar_dropdown__wrap" style="height: 100%">

+ 2 - 2
src/views/login/index.vue

@@ -2,7 +2,7 @@
   <div class="login-form">
     <div class="login-box">
       <div class="login-input">
-        <span class="title">模型管理平台</span>
+        <span class="title">任务平台</span>
         <el-form
           :model="dataForm"
           :rules="dataRule"
@@ -56,7 +56,7 @@ export default {
   data() {
     return {
       dataForm: {
-        mobilePhone: "user",
+        mobilePhone: "admin",
         password: "123456",
       },
       dataRule: {

+ 5 - 1
src/views/onlineForm/formRender/onlineFormMixins.js

@@ -854,7 +854,6 @@ const OnlineFormMixins = {
                                     console.error(error);
                                 });
                         }
-                        console.log(' 开始data');
                         this.components_json['name'] = Object.keys(this.components_json)[0]
                         const data = {
                             id: row.id,
@@ -867,6 +866,7 @@ const OnlineFormMixins = {
                             target: row.target,
                             team: row.team,
                             task: row.task,
+                            isReal: row.isReal,
                             pos: {
                                 lat: row.lat,
                                 lon: row.lon,
@@ -1027,6 +1027,8 @@ const OnlineFormMixins = {
                             h: row.h,
                             lat: row.lat,
                             lon: row.lon,
+                            policy: row.policy,
+                            alg: row.alg,
                             fire_number: row.fire_number,
                             modulation: row.modulation,
                             prf: row.prf,
@@ -1094,6 +1096,8 @@ const OnlineFormMixins = {
                             type: row.type,
                             properties: {
                                 id: row.id,
+                                policy: row.policy,
+                                alg: row.alg,
                                 launch_lon: row.launch_lon,
                                 launch_lat: row.launch_lat,
                                 launch_h: row.launch_h,

+ 34 - 15
src/views/situation/index.vue

@@ -51,7 +51,7 @@
             <el-table-column label="操作" align="center">
               <template slot-scope="scope">
                 <el-button type="primary" @click="getJson(scope.row)">导入</el-button>
-                <!-- <el-button type="primary" @click="saveJson()">保存</el-button> -->
+                <el-button type="primary" @click="changeItemPosition()">保存</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -74,7 +74,6 @@ import fireController from "../../api/fireController";
 import { getToken } from "@/utils";
 import axios from "axios";
 import Model from "@/views/situation/Model";
-import satelliteModel from '@/assets/model/satelite.glb';
 export default {
   components: {
     Model
@@ -204,8 +203,23 @@ export default {
       //     }
 
     },
-    changeItemPosition(data) {
+    changeItemPosition() {
+      const requestParams = {
+      path: 'get_position_by_time',
+    params: {dateTime:'2023-07-06 00:00:10'},
+     }
+      if(this.websocket && this.websocket.readyState === WebSocket.OPEN){
+      console.log(' 发送请求');
+      console.log('requestParams :>> ', requestParams);
+      this.websocket.send(JSON.stringify(requestParams));
+    }
+      else{
+            this.startWebSocket();
+            setTimeout(() => {
+              this.websocket.send(JSON.stringify(requestParams));
+      }, 2000);
 
+          }
     },
     async getJson(row) {
       this.viewer2D.entities.removeAll();
@@ -214,18 +228,23 @@ export default {
       this.nameIdList = []
       this.jsonData = {}
      const requestData = row
-     //发发送websockte请求
-    // if(this.websocket && this.websocket.readyState === WebSocket.OPEN){
-    //   console.log(' 发送请求');
-    //         this.websocket.send(JSON.stringify(requestData));
-    // }
-    //       else{
-    //         this.startWebSocket();
-    //         setTimeout(() => {
-    //           this.websocket.send(JSON.stringify(requestData));
-    //   }, 2000);
+     const requestParams = {
+      path: 'init',
+    params: requestData,
+     }
+    //  发发送websockte请求
+    if(this.websocket && this.websocket.readyState === WebSocket.OPEN){
+      console.log(' 发送请求');
+      console.log('requestParams :>> ', requestParams);
+      this.websocket.send(JSON.stringify(requestParams));
+    }
+      else{
+            this.startWebSocket();
+            setTimeout(() => {
+              this.websocket.send(JSON.stringify(requestParams));
+      }, 2000);
 
-    //       }
+          }
       let redunit = [];
       let blueunit = [];
       let satellite = [];
@@ -881,7 +900,7 @@ export default {
             }
           }
           for(let i = 0;i<this.jsonData.redunit.length;i++){
-            if(name == this.jsonData.redunit.name){
+            if(name == this.jsonData.redunit[i].name){
               this.jsonData.redunit.component_movementjson.properties.launch_lon = position.longitude.toFixed(6)
               this.jsonData.redunit.component_movementjson.properties.launch_lat = position.latitude.toFixed(6)
               this.jsonData.redunit.component_movementjson.properties.launch_h = position.height.toFixed(2)

+ 2 - 2
src/views/welcome/index.vue

@@ -1,7 +1,7 @@
 <template>
 <div>
     <!-- <div class="title">
-      <p>浏览完每个功能过后,自然会发现些与众不同。然而这一切都是<span> 模型管理平台 </span>生成的。</p>
+      <p>浏览完每个功能过后,自然会发现些与众不同。然而这一切都是<span> 任务平台 </span>生成的。</p>
     </div>
     <el-row type="flex">
       <div style="width: 100%;">
@@ -40,7 +40,7 @@
       <el-card class="box-card" style="min-width: 450px; margin-left: 20px;" shadow="never" :body-style="{padding: '0px 20px'}">
         <div class="item">
           <span style="width: 120px;">产品名称</span>
-          <el-tag effect="dark">模型管理平台</el-tag>
+          <el-tag effect="dark">任务平台</el-tag>
         </div>
         <el-divider></el-divider>