3 Commits d03118ac65 ... 67329c6e3a

Auteur SHA1 Bericht Datum
  wuxiang 67329c6e3a 注释掉导出报告按钮 11 maanden geleden
  wuxiang 04b728616a 增加配置文件 1 jaar geleden
  wuxiang 2c0acc107a 增加配置文件 1 jaar geleden
4 gewijzigde bestanden met toevoegingen van 12 en 8 verwijderingen
  1. 1 1
      public/index.html
  2. 4 0
      public/static/config.js
  3. 6 6
      src/views/map/index.js
  4. 1 1
      src/views/map/index.vue

+ 1 - 1
public/index.html

@@ -7,7 +7,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title>想定仿真</title>
-    <!-- <title><%= htmlWebpackPlugin.options.title %></title> -->
+    <script src="static/config.js"></script>
 </head>
 
 <body>

+ 4 - 0
public/static/config.js

@@ -0,0 +1,4 @@
+window.config = {
+    backUrl: 'http://localhost:8048',
+    trajUrl: 'http://localhost:5000'
+}

+ 6 - 6
src/views/map/index.js

@@ -318,7 +318,7 @@ export default {
             // this.$data._viewer2D.clock.onTick.removeEventListener();
             // this.$data._viewer3D.clock.onTick.removeEventListener();
             await axios
-                .get("http://127.0.0.1:8084/admin/online/onlineOperation/downloadDatasource/main", {
+                .get(window.config.backUrl + "/admin/online/onlineOperation/downloadDatasource/main", {
                     params: {
                         datasourceId: "1656243335922192384",
                         fieldName: "xdfile",
@@ -427,7 +427,7 @@ export default {
             this.$data._viewer2D.entities.removeAll();
             this.$data._viewer3D.entities.removeAll();
             await axios
-                .get("http://127.0.0.1:8084/admin/online/onlineOperation/downloadDatasource/main", {
+                .get(window.config.backUrl + "/admin/online/onlineOperation/downloadDatasource/main", {
                     params: {
                         datasourceId: "1656243335922192384",
                         fieldName: "xdfile",
@@ -1654,14 +1654,14 @@ export default {
         async initSTK() {
             console.log('this.jsonData :>> ', this.jsonData);
             // await axios
-            //   .get("/api", this.jsonData).then(res=>{
+            //   .get(window.config.trajUrl+"", this.jsonData).then(res=>{
             //     console.log('res :>> ', res);
             //   })
             const config = {
                 timeout: 0 // 设置超时时间为0,表示忽略超时问题
             };
             await axios
-                .post("/api/traj", this.jsonData, config).then(res => {
+                .post(window.config.trajUrl + "/traj", this.jsonData, config).then(res => {
                     console.log('res :>> ', res.data);
                     console.log('nameidlist :>> ', this.nameIdList);
                     let data = res.data[1].data[0];
@@ -1790,7 +1790,7 @@ export default {
             // 转换为需求字符串格式
             const newTimeString = `${jsDate.getFullYear()}-${(jsDate.getMonth() + 1).toString().padStart(2, '0')}-${jsDate.getDate().toString().padStart(2, '0')} ${jsDate.getHours().toString().padStart(2, '0')}:${jsDate.getMinutes().toString().padStart(2, '0')}:${jsDate.getSeconds().toString().padStart(2, '0')}`;
             await axios
-                .post("/api/pos", { simulation_time: newTimeString + '.000' }).then(res => {
+                .post(window.config.trajUrl + "/pos", { simulation_time: newTimeString + '.000' }).then(res => {
                     console.log('res :>> ', res);
                     let data = res.data[1].data
                         //依次更新每个模型位置
@@ -1838,7 +1838,7 @@ export default {
             // 转换为需求字符串格式
             const newTimeString = `${jsDate.getFullYear()}-${(jsDate.getMonth() + 1).toString().padStart(2, '0')}-${jsDate.getDate().toString().padStart(2, '0')} ${jsDate.getHours().toString().padStart(2, '0')}:${jsDate.getMinutes().toString().padStart(2, '0')}:${jsDate.getSeconds().toString().padStart(2, '0')}`;
             await axios
-                .post("/api/pos", { simulation_time: newTimeString + '.000' }).then(res => {
+                .post(window.config.trajUrl + "/pos", { simulation_time: newTimeString + '.000' }).then(res => {
                     let data = res.data[1].data
                         //恢复雷达拦截数量
                     this.radarFireRecover()

+ 1 - 1
src/views/map/index.vue

@@ -218,7 +218,7 @@
     </el-tab-pane>
         </el-tabs>
         <div slot="footer" class="dialog-footer">
-          <el-button @click="exportReport()">导出报告</el-button>
+          <!-- <el-button @click="exportReport()">导出报告</el-button> -->
           <el-button @click="dialogVisible = false">关闭</el-button>
         </div>
       </el-dialog>