CzRger 1 gadu atpakaļ
vecāks
revīzija
41bf1dff4e
5 mainītis faili ar 54 papildinājumiem un 8 dzēšanām
  1. 15 1
      src/out/config.js
  2. 32 0
      src/utils/util.ts
  3. 1 1
      src/views/pc/index.vue
  4. 2 2
      src/views/screen/index.vue
  5. 4 4
      vite.config.ts

+ 15 - 1
src/out/config.js

@@ -15,6 +15,11 @@ window.cusConfig = {
       {
         label: '赋能工具',
         children: [
+          {label:'指挥处置中台', href: 'http://10.110.35.47/#/18fb6a8c73ad039b47f3692d104779628p06931RW2m?sessionToken=${token}'},
+          {label:'智慧新搜索', href: 'http://10.110.31.95/zhxss/token.action?new=yes&sessionToken=${token}&menu=JCZJ'},
+          {label:'数据魔方', href: 'https://dataexplore.dataq.base.sgpt.gov/data-explore?new=yes&sessionToken=${token}&menu=JCZJ'},
+          {label:'全息档案', href: 'http://10.110.31.10:81/qxda/token.action?new=yes&sessionToken=${token}&menu=JCZJ'},
+          {label:'知识图谱', href: 'http://10.110.31.21:9090/kg/main.action?o1=sgpthn_zbz&k1=${token}&menuId=5ab0b6c913c0161460d9ced1&sj=${Y}${M}${D}${H}${m}${s}'},
         ]
       },
       {
@@ -25,12 +30,21 @@ window.cusConfig = {
       {
         label: '监测预警',
         children: [
+          {label:'人员监测预警', href: 'http://10.110.35.47/#/37d819244d11ccc378b5ab81ab0bf3c82ROvvkHxCWl?sessionToken=${token}'},
+          {label:'车辆监测预警', href: 'http://10.110.35.47/#/ec6a44faf281d8b26ba6212d8630fd80aC22mf7Ulo5?sessionToken=${token}'},
+          {label:'船舶监测预警', href: 'http://10.110.35.47/#/285d14382590899aa0ae03057652dc8dLd3Xs6UMSjB?sessionToken=${token}'},
+          {label:'低慢小监测预警', href: 'http://10.110.35.47/#/2762daa317e26f0a2702cd47b12a2082AOi6e2iaQHI?sessionToken=${token}'},
+          {label:'金融风险防护', href: 'http://10.110.35.47/#/67f16a90373f30585fca3f4d253c9b6eTNt3Ma2724K?sessionToken=${token}'},
         ]
       },
       {
         label: '其他',
         children: [
-          {label:'总体平台二期', href: 'http://10.110.35.47/#/login'},
+          {label:'总体平台二期', href: 'http://10.110.35.47/#/be140952abede706ffc654e817ffe0014F2oB6MfXS0?sessionToken=${token}'},
+          {label:'监测预警', href: 'http://10.110.35.47/#/56b3447bf45143c7186709702078575duR0qnFpe9Rq?sessionToken=${token}'},
+          {label:'分析研判', href: 'http://10.110.35.47/#/01378bd8ea2527bc09cd0b94dd4efa6bPswntGWJycY?sessionToken=${token}'},
+          {label:'指挥调度', href: 'http://10.110.35.47/#/375ba5b3de5ffd41d73995508023fd69JmcAWjACKfc?sessionToken=${token}'},
+          {label:'效能评估', href: 'http://10.110.35.47/#/45a08df481385f66ea06f8bea9dfd02ejxDNEpsX1Ik?sessionToken=${token}'},
         ]
       },
     ],

+ 32 - 0
src/utils/util.ts

@@ -1,3 +1,5 @@
+import store from '@/store/index'
+
 export const isValue = (val: any) => {
   if (val === null || val === undefined || val === '') {
     return false
@@ -95,3 +97,33 @@ export const downloadFile = ({ data, headers }: any, fName: string = '') => {
   a.dispatchEvent(new MouseEvent("click"));
   (window.URL || window.webkitURL).revokeObjectURL(url);
 }
+
+export const formatUrlByInfo = (url: string) => {
+  let _url = url
+  const _date = new Date()
+  const Y = `${_date.getFullYear()}`;
+  const M = `${_date.getMonth() + 1 < 10 ? `0${_date.getMonth() + 1}` : _date.getMonth() + 1}`;
+  const D = `${_date.getDate() + 1 < 10 ? `0${_date.getDate()}` : _date.getDate()}`;
+  const H = `${_date.getHours() < 10 ? `0${_date.getHours()}` : _date.getHours()}`;
+  const m = `${_date.getMinutes() < 10 ? `0${_date.getMinutes()}` : _date.getMinutes()}`;
+  const s = _date.getSeconds() < 10 ? `0${_date.getSeconds()}` : _date.getSeconds();
+  const mapper = {
+    "${token}": localStorage.getItem("sc_token"),
+    "${displayName}": store.state.app.userInfo.displayName,
+    "${username}": store.state.app.userInfo.username,
+    "${Y}": Y,
+    "${M}": M,
+    "${D}": D,
+    "${H}": H,
+    "${m}": m,
+    "${s}": s,
+  }
+  Object.entries(mapper).forEach(([k, v]: any, i) => {
+    if (_url.includes(k)) {
+      const before = _url.split(k)[0]
+      const after = _url.split(k)[1]
+      _url = before + v + after
+    }
+  })
+  return _url
+}

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

@@ -103,7 +103,7 @@ export default defineComponent({
     });
 
     const toHref = (val: { href: string | URL | undefined }) => {
-      window.open(val.href, '_blank')
+      window.open(that.$util.formatUrlByInfo(val.href), '_blank')
     }
 
     const switchInfo = (img) => {

+ 2 - 2
src/views/screen/index.vue

@@ -155,8 +155,8 @@ export default defineComponent({
         })
       })
     }
-    const toHref = (val) => {
-      window.open(val.href, '_blank')
+    const toHref = (val: { href: string | URL | undefined }) => {
+      window.open(that.$util.formatUrlByInfo(val.href), '_blank')
     }
     onMounted(() => {
       setInterval(() => {

+ 4 - 4
vite.config.ts

@@ -21,8 +21,8 @@ export default defineConfig({
     proxy: {
       '/api/': {
         // target: 'http://localhost:8080/',
-        target: 'http://127.0.0.1:3333/',
-        // target: 'http://192.168.1.110:8080/',
+        // target: 'http://127.0.0.1:3333/',
+        target: 'http://10.110.35.47/',
         changeOrigin: true,
         rewrite: path => {
           return path.replace(/^\/api/, '')
@@ -30,8 +30,8 @@ export default defineConfig({
       },
       '/api-gateway/': {
         // target: 'http://localhost:8080/',
-        target: 'http://127.0.0.1:4444/',
-        // target: 'http://192.168.1.110:8080/',
+        // target: 'http://127.0.0.1:4444/',
+        target: 'http://10.110.32.62/',
         changeOrigin: true,
         rewrite: path => {
           return path.replace(/^\/api-gateway/, '')