linqilong 2 maanden geleden
bovenliggende
commit
502db4cdde

+ 1 - 1
README.md

@@ -1,4 +1,4 @@
-# 太湖流域国家基本水文站(tba-nbhs)
+# 太湖流域风浪(tba-waves)
 
 TBA National Basic Hydrological Station
 

+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <link href="/favicon.ico" rel="icon">
     <meta content="width=device-width, initial-scale=1.0" name="viewport">
-    <title>智慧运维软件</title>
+    <title>太湖风浪模拟</title>
 </head>
 <body>
 <div id="app"></div>

+ 2 - 2
package-lock.json

@@ -1,11 +1,11 @@
 {
-  "name": "tba-nbhs",
+  "name": "tba-waves",
   "version": "0.0.0",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
-      "name": "tba-nbhs",
+      "name": "tba-waves",
       "version": "0.0.0",
       "dependencies": {
         "@antv/l7": "^2.22.1",

+ 1 - 1
package.json

@@ -1,5 +1,5 @@
 {
-  "name": "tba-nbhs",
+  "name": "tba-waves",
   "version": "0.0.0",
   "private": true,
   "type": "module",

+ 0 - 44
src/api/lantaiLogin.ts

@@ -1,44 +0,0 @@
-import request from '@/utils/request'
-import JsEncrypt from 'jsencrypt'
-
-// 登录按钮交互
-export function postUserInfo (loginName,password) {
-  // this.password = Encrypt(this.password)
-  getPublicKey({}).then(res => {
-    const publicKey = res.data.pukString
-    const prkKey = res.data.prkKey
-    const encrypt = new JsEncrypt()
-    encrypt.setPublicKey(publicKey) // 放置自己的公钥
-    const resPassword = encrypt.encrypt(password)
-    const resLoginName = encrypt.encrypt(loginName)
-    login({
-      loginName: resLoginName,
-      password: resPassword,
-      prkKey: prkKey,
-    }).then(res => {
-      if (res.status != 200) {
-        console.log(res.message)
-        return
-      }
-      localStorage.setItem('Authorization', res.data.toString())
-      return res.data.toString()
-    })
-  })
-}
-
-function login(data){
-  return request({
-    url: '/lantai_api/otherLogin',
-    method: 'post',
-    data:JSON.stringify(data),
-  })
-}
-
-
-function getPublicKey(){
-  return request({
-    url: '/lantai_api/getPublicKey',
-    method: 'get',
-  })
-}
-

BIN
src/assets/images/detail.png


BIN
src/assets/images/sthouse.jpg


BIN
src/assets/images/yzt.png


+ 16 - 30
src/layout/index.vue

@@ -1,20 +1,19 @@
 <script lang="ts" setup>
-import { AppMain, Navbar } from '@/layout/components/index.js'
+import {AppMain, Navbar} from '@/layout/components/index.js'
 import AntvMap from '@/components/AntvMap/index.vue'
 import UePlayer from '@/components/UePlayer.vue'
-import { useAppStore } from '@/stores/app'
-import { computed, onMounted, reactive, ref, watch } from 'vue'
-import { useRoute } from 'vue-router'
-import { useStationStore } from '@/stores/station'
+import {useAppStore} from '@/stores/app'
+import {computed, onMounted, reactive, ref, watch} from 'vue'
+import {useRoute} from 'vue-router'
+import {useStationStore} from '@/stores/station'
 import bus from '@/utils/bus'
-import { getStation } from '@/utils/station'
-import { getAlarmData } from '@/api/rolldata'
-import { jumpPage } from '@/utils'
+import {getStation} from '@/utils/station'
+import {getAlarmData} from '@/api/rolldata'
+import {jumpPage} from '@/utils'
 import CrossSection from '@/components/CrossSection.vue'
-import { Vue3Marquee } from 'vue3-marquee'
+import {Vue3Marquee} from 'vue3-marquee'
 import X2js from 'x2js'
 import OpeningAnimation from '@/components/OpeningAnimation.vue'
-import { postUserInfo } from '@/api/lantaiLogin'
 
 const appStore = useAppStore()
 const stationStore = useStationStore()
@@ -25,7 +24,7 @@ const showOpeningAnimation = computed(() => route.path.indexOf('/index') > -1)
 const showOpeningAnimation2 = ref(true)
 let navbarHeight = '12vh'
 let theme = ''
-let navbarStyle = { height: navbarHeight }
+let navbarStyle = {height: navbarHeight}
 const dialog = reactive({
   visible: false,
   title: '断面',
@@ -33,13 +32,8 @@ const dialog = reactive({
   params: {}
 })
 // 告警信息
-// const alarmInfo = ref('水位:太湖3.24,杭长桥 3.22,琳桥 3.45,常州(三) 3.50,无锡(大) 3.49,苏州(枫桥) 3.26,张桥 3.46,湘城 3.24,平望 2.98,嘉兴 2.92,陈墓(锦溪) 2.95。')
 const alarmInfo = ref('')
 
-const yztSrc = ref(new URL('@/assets/images/yzt.png', import.meta.url).href)
-const detailSrc = ref(new URL('@/assets/images/detail.png', import.meta.url).href)
-const sthouseSrc = ref(new URL('@/assets/images/sthouse.jpg', import.meta.url).href)
-
 // 底板回调监听
 bus.on('handle_ue_response', (data) => {
   if (data.Category && data.Category === 'ClickMesh') {
@@ -88,30 +82,22 @@ async function getAlarmInfo() {
 
 onMounted(() => {
   getAlarmInfo()
-  postUserInfo('jssytsq', 'Jshui@2024')
 })
 
 // 路由监听
 watch(() => route.path, path => {
   // 首页展示动画
   showOpeningAnimation2.value = path.indexOf('/index') > -1
-}, { deep: true })
+}, {deep: true})
 </script>
 
 <template>
   <div :style="{ '--current-color': theme }" class="app-wrapper">
 
+    <!--  开场动画  -->
     <opening-animation v-if="showOpeningAnimation" v-show="showOpeningAnimation2"
-                       @close="showOpeningAnimation2 = false"></opening-animation>
-
-    <!--    <div v-show="appStore.floorType === 'img'" class="floor-container"><img :src="yztSrc"></div>-->
-    <!--    <div v-show="appStore.floorType === 'detail'" class="floor-container"><img :src="detailSrc"-->
-    <!--                                                                               style="width: 100%;height: 100%;"></div>-->
-    <!--    <div v-show="appStore.floorType === 'sthouse'" class="floor-container"><img :src="sthouseSrc"-->
-    <!--                                                                               style="width: 100%;height: 100%;"></div>-->
-    <div v-show="appStore.floorType === 'ss_sw'" class="floor-container">
-      <!--      <img :src="swSrc" style="width: 100%;height: 100%;">-->
-    </div>
+                       @close="showOpeningAnimation2 = false"/>
+
     <antv-map v-if="appStore.floorType === 'map'" class="floor-container"></antv-map>
     <ue-player v-if="appStore.floorType === 'ue'" class="floor-container"></ue-player>
 
@@ -130,9 +116,9 @@ watch(() => route.path, path => {
         <div class="alarm-info" v-html="alarmInfo"></div>
       </Vue3Marquee>
       <!-- 顶部 -->
-      <navbar :style="navbarStyle" />
+      <navbar :style="navbarStyle"/>
       <!-- 展示页 -->
-      <app-main />
+      <app-main/>
 
       <el-dialog v-model="dialog.visible" :modal="false" :title="dialog.title" align-center draggable>
         <cross-section v-if="dialog.visible"></cross-section>

+ 2 - 0
src/permission.ts

@@ -6,6 +6,8 @@ const whiteList = [
 ];
 
 router.beforeEach((to, from, next) => {
+  // next();
+  // return;
   // 验证 TOKEN
   if (getToken()) {
     /* 登录成功 */

+ 0 - 4
src/router/index.ts

@@ -47,10 +47,6 @@ const router = createRouter({
           path: 'device/:stcd/:deviceid',
           name: 'device',
           component: () => import('@/views/Device.vue'),
-        }, {
-          path: 'zhyw/:stcd/:type',
-          name: 'zhyw',
-          component: () => import('@/views/Zhyw.vue'),
         },
       ],
     },

+ 3 - 9
src/stores/app.ts

@@ -6,8 +6,7 @@ import bus from "@/utils/bus";
 export const useAppStore = defineStore('app', () => {
   const route = useRoute()
   // 底板类型
-  const floorType = ref('map')
-  // const floorType = ref('img')
+  const floorType = ref('ue')
   // 主界面列表
   const homePageList = ['situational', 'intelloper', 'station']
   // 主页面视角
@@ -19,14 +18,9 @@ export const useAppStore = defineStore('app', () => {
 
   function changeFloorTypeByPath(path: string) {
     if (path === '/index') {
-      floorType.value = 'map'
-      // floorType.value='img'
-      // } else if (path.indexOf('/detail') > -1 || path.indexOf('/device') > -1) {
-      //   floorType.value='detail'
-    } else if (path.indexOf('/sw') > -1) {
-      floorType.value = 'ss_sw'
-    } else {
       floorType.value = 'ue'
+    } else {
+      floorType.value = 'map'
     }
   }
 

+ 0 - 40
src/views/Zhyw.vue

@@ -1,40 +0,0 @@
-<script lang="ts" setup>
-import { onMounted, ref } from 'vue'
-import { useRoute } from 'vue-router'
-
-// const imgSrc = ref(null)
-const route = useRoute()
-const iframeUrl = ref('')
-const urlMap = {
-  // 实时监测
-  'ssjc': 'http://10.8.48.235:8100/homePage.html#/watermonitoring/realhydrology',
-  // 测站运维
-  'czyw': 'http://10.8.48.235:8100/homePage.html#/inspectionmaintenance/equipmentInventory',
-  // 查询分析
-  'cxfx': 'http://10.8.48.235:8100/homePage.html#/dataManagement/watermultiplestations'
-}
-
-onMounted(async () => {
-  const stcd = route.params.stcd
-  const srcType = route.params.type
-
-  const token = localStorage.getItem('Authorization')
-  iframeUrl.value = `${urlMap[srcType]}?code=${token}&stcd=${stcd}`
-})
-</script>
-
-<template>
-  <div class="right-frame">
-    <!--    <img :src="imgSrc"-->
-    <!--         style="width: 100%;height: 100%;">-->
-    <iframe :src="iframeUrl" style="width: 100%;height: 100%;"></iframe>
-  </div>
-</template>
-<style lang="scss" scoped>
-.right-frame {
-  position: relative;
-  height: 100%;
-  overflow: hidden;
-  pointer-events: auto;
-}
-</style>