3 Комити d03118ac65 ... 67329c6e3a

Аутор SHA1 Порука Датум
  wuxiang 67329c6e3a 注释掉导出报告按钮 пре 10 месеци
  wuxiang 04b728616a 增加配置文件 пре 10 месеци
  wuxiang 2c0acc107a 增加配置文件 пре 10 месеци
4 измењених фајлова са 12 додато и 8 уклоњено
  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>