浏览代码

修改了后端接口

zpf 1 年之前
父节点
当前提交
5dd12d69b5

+ 3 - 0
src/store/store.js

@@ -35,6 +35,7 @@ var store2 = {
         splitType: 'NONE',//分屏类型
         sceneLayerlist: [],
         flattenNames: [],//存储压平的名称数组
+        cockpit_date:null,
         cockpit_hysy: {
             text: {
                 xzqhdm_number: 0,
@@ -170,6 +171,8 @@ var store2 = {
     },
     setCockpitTdsc(newValue) {
         this.state.cockpit_tdsc.flag = newValue;
+    },setCockpitDate(newValue) {
+        this.state.cockpit_date = newValue;
     },
 }
 

+ 1 - 0
src/views/cockpitNew1/datePicker.vue

@@ -69,6 +69,7 @@ export default {
   methods: {
     dateChange() {
       this.$emit("dateChange", this.dateValue);
+      store.setCockpitHysyText(this.dateValue);
     },
   },
 };

+ 23 - 4
src/views/cockpitNew1/gkzb.vue

@@ -113,6 +113,7 @@
 
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+import { cockpitInfo } from '@/api/cockpit'
 
 export default {
   components: {},
@@ -128,7 +129,18 @@ export default {
   beforeCreate() { }, //生命周期 - 创建之前
   created() { }, //生命周期 - 创建完成(可以访问当前this实例)
   beforeMount() { }, //生命周期 - 挂载之前
-  mounted() { }, //生命周期 - 挂在完成
+  async mounted() {
+    const that = this;
+    let obj = {
+      beginTime: '20240101',
+      endTime: '20240501',
+      jscType: 'jsc_gkzb_ztgu_stbh',
+      id: '4602'
+    };
+    let data = await cockpitInfo(obj);
+
+    cockpitInfo();
+  }, //生命周期 - 挂在完成
   beforeUpdate() { }, //生命周期 - 更新之前
   updated() { }, //生命周期 - 更新之后
   beforeDestroy() { }, //生命周期 - 销毁之前
@@ -267,6 +279,7 @@ export default {
   display: inline-block;
 
 }
+
 .icon_syzb {
   background: no-repeat 50%;
   background-image: url("/static/images/overview/gkzb_syzb.png");
@@ -275,7 +288,9 @@ export default {
   height: 45px;
   display: inline-block;
 
-}.icon_fgczkfbj {
+}
+
+.icon_fgczkfbj {
   background: no-repeat 50%;
   background-image: url("/static/images/overview/gkzb_fgczkfbj.png");
   /* border: #00FFFF 1px solid; */
@@ -283,7 +298,9 @@ export default {
   height: 45px;
   display: inline-block;
 
-}.icon_yrk {
+}
+
+.icon_yrk {
   background: no-repeat 50%;
   background-image: url("/static/images/overview/icongdbh2.png");
   /* border: #00FFFF 1px solid; */
@@ -292,6 +309,7 @@ export default {
   display: inline-block;
 
 }
+
 .text {
   display: inline-block;
   // border: #00FFFF 1px solid;
@@ -320,4 +338,5 @@ export default {
   // border: #00FFFF 1px solid;
   width: 50px;
 
-}</style>
+}
+</style>

+ 0 - 2
src/views/cockpitNew1/hysy.vue

@@ -72,8 +72,6 @@ export default {
     beforeMount() { }, //生命周期 - 挂载之前
     methods: {
         getRenKou() {
-            console.log("进来了");
-
             const that = this;
             var dom = document.getElementById('hysyEchart');
 

+ 7 - 3
src/views/login.vue

@@ -109,7 +109,7 @@ export default {
     return {
       captchaOnOff: true,
       register: true,
-      redirect: undefined,
+      redirect: "/overview",
       codeUrl: "",
       loginForm: {
         username: "admin",
@@ -132,7 +132,8 @@ export default {
       captchaEnabled: true,
       // 注册开关
       register: false,
-      redirect: undefined,
+      redirect: "/overview",
+
     };
   },
   created() {
@@ -162,6 +163,7 @@ export default {
       };
     },
     handleLogin() {
+      const that = this;
       this.$refs.loginForm.validate((valid) => {
         if (valid) {
           this.loading = true;
@@ -182,7 +184,9 @@ export default {
           this.$store
             .dispatch("Login", this.loginForm)
             .then(() => {
-              this.$router.push({ path: this.redirect || "/" }).catch(() => {});
+            
+              this.$router.push({ path: that.redirect || "/" }).catch(() => {});
+              console.log('this.redirect: ', that.redirect);
             })
             .catch(() => {
               this.loading = false;

+ 0 - 1
src/views/viewer.vue

@@ -62,7 +62,6 @@ export default {
             this.params.beginTime = date[0]
             this.params.endTime = date[1]
             this.setDatas()
-
         },
         async hysyq(address) {
             // 选中xzqh查询

+ 3 - 3
static/Config/config.js

@@ -1,13 +1,13 @@
 /*
  * @Author: LAPTOP-BJJ3IV5R\SIWEI zhxjavait@163.com
  * @Date: 2024-05-29 08:19:49
- * @LastEditors: LAPTOP-BJJ3IV5R\SIWEI zhxjavait@163.com
- * @LastEditTime: 2024-05-29 09:33:47
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2024-06-11 09:14:12
  * @FilePath: \real3d-portalsite\static\Config\config.js
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
 //后台地址配置
-window.axiosURI = "http://192.168.60.3:8080";
+window.axiosURI = "http://192.168.60.4:8080";
 //倾斜模型高度配置
 window.modelBottomAltitude = 10;
 // 服务器ip