CzRger 1 年之前
父節點
當前提交
3581e657c6
共有 3 個文件被更改,包括 63 次插入7 次删除
  1. 2 0
      src/store/modules/app.ts
  2. 30 3
      src/views/screen/index.vue
  3. 31 4
      vite.config.ts

+ 2 - 0
src/store/modules/app.ts

@@ -6,6 +6,8 @@ const state = {
 		tesApi: 'api-tes',	//	托尔斯视频拉流服务
 		wazxApi: 'api-wazx',	//	网安中心
 		staticApi: 'api-static',	//	静态资源代理
+		csbApi: 'api-csb',	//	静态资源代理
+		screenApi: 'api-screen',	//	静态资源代理
 	},
 	userInfo: null
 }

+ 30 - 3
src/views/screen/index.vue

@@ -212,21 +212,21 @@
           <div class="slc-item-icon"><img src="./img/left_icon-2.png"/></div>
           <div class="slc-item-title"><span>数据存储总量</span></div>
           <div  class="slc-item-count">
-            {{sjzycqk.sjcczl}}TB
+            {{sjzycqk.sjcczl}}
           </div>
         </div>
         <div class="slc-item">
           <div class="slc-item-icon"><img src="./img/left_icon-3.png"/></div>
           <div class="slc-item-title"><span>数据记录总量</span></div>
           <div  class="slc-item-count">
-            {{sjzycqk.sjjlzl}}亿
+            {{sjzycqk.sjjlzl}}
           </div>
         </div>
         <div class="slc-item">
           <div class="slc-item-icon"><img src="./img/left_icon-4.png"/></div>
           <div class="slc-item-title"><span>归集单位数量</span></div>
           <div  class="slc-item-count">
-            {{sjzycqk.gjdwsl}}
+            {{sjzycqk.gjdwsl}}
           </div>
         </div>
         <div class="slc-item">
@@ -480,9 +480,36 @@ export default defineComponent({
         byxzjl: 0,
       }
       state.spzyqk.spdwzs = 0
+      axios.post(`/${store.state.app.apiProxy.csbApi}/stg_index_change_data_df`, {"queryValues":{"":""}},{
+        headers: {
+          '_api_version': '1.0.0',
+          '_api_name': 'stg_index_change_data_df'
+        }
+      }).then(res => {
+        if (res.status === 200 && res.data?.result?.length > 0) {
+          const r = res.data.result[0]
+          state.sjzycqk.sjcczl = r['store_count']
+          state.sjzycqk.sjjlzl = r['record_cnt']
+          state.sjzycqk.gjdwsl = r['lydw_cnt']
+          state.sjzycqk.gjsjxs = r['tab_cnt']
+          state.sjzycqk.byxzjl = r['record_add_cnt']
+          state.spzyqk.spdwzs = r['video_cnt']
+        }
+      })
     }
     const initSPJXZS = () => {
       state.spzyqk.spjxzs = 0
+      // axios.get(`/${store.state.app.apiProxy.screenApi}/video/analysis/pie?type=1`).then(res => {
+      //   // if (res.status === 200 && res.data?.result?.length > 0) {
+      //   //   const r = res.data.result[0]
+      //   //   state.sjzycqk.sjcczl = r['store_count']
+      //   //   state.sjzycqk.sjjlzl = r['record_cnt']
+      //   //   state.sjzycqk.gjdwsl = r['lydw_cnt']
+      //   //   state.sjzycqk.gjsjxs = r['tab_cnt']
+      //   //   state.sjzycqk.byxzjl = r['record_add_cnt']
+      //   //   state.spzyqk.spdwzs = r['video_cnt']
+      //   // }
+      // })
     }
     const initYJTJQK = () => {
       state.yjtjqk = {

+ 31 - 4
vite.config.ts

@@ -21,8 +21,8 @@ export default defineConfig({
     proxy: {
       '/api/': {
         // target: 'http://localhost:8080/',
-        target: 'http://127.0.0.1:3001/',
-        // target: 'http://10.110.35.47/',
+        // target: 'http://127.0.0.1:3001/',
+        target: 'http://10.110.35.47/',
         changeOrigin: true,
         rewrite: path => {
           return path.replace(/^\/api/, '')
@@ -30,13 +30,40 @@ export default defineConfig({
       },
       '/api-gateway/': {
         // target: 'http://localhost:8080/',
-        target: 'http://127.0.0.1:3002/',
-        // target: 'http://10.110.32.62/',
+        // target: 'http://127.0.0.1:3002/',
+        target: 'http://10.110.32.62/',
         changeOrigin: true,
         rewrite: path => {
           return path.replace(/^\/api-gateway/, '')
         }
       },
+      '/api-wazx/': {
+        // target: 'http://localhost:8080/',
+        // target: 'http://127.0.0.1:3002/',
+        target: 'http://10.110.49.2:8090/api-wazx/',
+        changeOrigin: true,
+        rewrite: path => {
+          return path.replace(/^\/api-wazx/, '')
+        }
+      },
+      '/api-csb/': {
+        // target: 'http://localhost:8080/',
+        // target: 'http://127.0.0.1:3002/',
+        target: 'http://10.110.49.2:8090/api-csb/',
+        changeOrigin: true,
+        rewrite: path => {
+          return path.replace(/^\/api-csb/, '')
+        }
+      },
+      '/api-screen/': {
+        // target: 'http://localhost:8080/',
+        // target: 'http://127.0.0.1:3002/',
+        target: 'http://10.110.49.2:8090/api-screen/',
+        changeOrigin: true,
+        rewrite: path => {
+          return path.replace(/^\/api-screen/, '')
+        }
+      },
       '/api-tes/': {
         // target: 'http://localhost:8080/',
         target: 'http://10.110.31.81/odae-video/',