ソースを参照

索引区分id

CzRger 1 週間 前
コミット
933d56082d
共有3 個のファイルを変更した13 個の追加11 個の削除を含む
  1. 1 1
      src/views/manage/theme/relation.vue
  2. 11 3
      src/views/web/archive/index-worker.vue
  3. 1 7
      vite.config.ts

+ 1 - 1
src/views/manage/theme/relation.vue

@@ -124,7 +124,7 @@ const ref_search = ref()
 const fetchSuggestions = (queryString: string, cb: any) => {
   const arr = state.indexList.filter(v => state.query.result.data.every(s => s.indexId != v.id))
   const results = queryString
-    ? arr.filter(v => [v.indexName, v.indexTableName].some(s => s.includes(queryString)))
+    ? arr.filter(v => [v.indexName, v.indexTableName].some(s => s?.includes(queryString)))
     : arr
   results.map(v => {
     const str1 = queryString ? v.indexName.replace(new RegExp(queryString, 'g'), `<em>${queryString}</em>`) : v.indexName

+ 11 - 3
src/views/web/archive/index-worker.vue

@@ -489,7 +489,15 @@ const initWorker = () => {
                 datas:[
                   {
                     typeCode: '',
-                    datas: themeConfigCpt.value.chart.nodes.map(v => v.searchParam)
+                    datas: themeConfigCpt.value.chart.nodes.map(v => {
+                      const obj = {...v.searchParam}
+                      if (obj.indexCode) {
+                        obj.indexCode += '|' + v.id
+                      } else if (obj.serviceId) {
+                        obj.serviceId += '|' + v.id
+                      }
+                      return obj
+                    })
                   }
                 ]
               }
@@ -601,9 +609,9 @@ const initWorker = () => {
                       edges: [...themeConfigCpt.value.chart.edges],
                       nodes: themeConfigCpt.value.chart.nodes.map(v => {
                         if (v.__type === 'inner_index') {
-                          v.num = json.datas.filter(s => s.indexCode == v.indexTableName)?.[0]?.data || 0
+                          v.num = json.datas.filter(s => s.indexCode == (v.indexTableName + '|' + v.id))?.[0]?.data || 0
                         } else {
-                          v.num = json.datas.filter(s => s.serviceId == v.indexId)?.[0]?.data || 0
+                          v.num = json.datas.filter(s => s.serviceId == (v.indexId + '|' + v.id))?.[0]?.data || 0
                         }
                         return v
                       })

+ 1 - 7
vite.config.ts

@@ -52,14 +52,8 @@ export default defineConfig({
     open: true,
     strictPort: false,
     proxy: {
-      '/mock-api': {
-        target: 'http://localhost:18061/',
-        changeOrigin: true,
-        rewrite: (path) => {
-          return path.replace(/^\/mock-api/, 'mock-api')
-        }
-      },
       '/ssw-api/api': {
+        // target: 'http://127.0.0.1:4001/',
         target: 'http://10.110.45.26:18069/',
         // target: 'http://8.130.72.63:18068/',
         changeOrigin: true,