From f3e2eece29c95bc3c1965a912cb74cf2482b2855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Wed, 30 Oct 2024 13:58:55 +0800 Subject: [PATCH] fix: modify --- src/views/task/graph/software/data.ts | 76 ++++++++++++++++----------- vue.config.js | 4 +- 2 files changed, 47 insertions(+), 33 deletions(-) diff --git a/src/views/task/graph/software/data.ts b/src/views/task/graph/software/data.ts index 2b8ef5a..7569298 100644 --- a/src/views/task/graph/software/data.ts +++ b/src/views/task/graph/software/data.ts @@ -1,36 +1,50 @@ -export const clusterTypeList = [{ - name: '主从模式(一主一从)', - value: 'msv' -}, { - name: '主备模式(一主一从)', - value: 'msb' -}, { - name: 'MHA模式(一主两从)', - value: 'mha' -}, { - name: 'MGR单主(一主两从)', - value: 'mgr.single' -}, { - name: 'MGR多主(三|五|七)', - value: 'mgr.multi' -}]; -export const redisClusterTypeList = [{ - name: '一主两从', - value: 'omts' -}, { - name: '一主两从三哨兵', - value: 'omtsts' -}, { - name: '三主三从', - value: 'tmts' -}]; +export const clusterTypeList = [ + { + name: '主从模式(一主一从)', + value: 'msv' + }, + { + name: '主备模式(一主一从)', + value: 'msb' + }, + { + name: 'MHA模式(一主两从)', + value: 'mha' + }, + { + name: 'MGR单主(一主两从)', + value: 'mgr.single' + }, + { + name: 'MGR多主(三|五|七)', + value: 'mgr.multi' + } +] +export const redisClusterTypeList = [ + { + name: '一主两从', + value: 'omts' + }, + { + name: '一主两从三哨兵', + value: 'omtsts' + }, + { + name: '三主三从', + value: 'tmts' + }, + { + name: '三主三从2', + value: 'tmts2' + } +] const translateArrToMap = (list: any[]) => { - const map: any = {}; + const map: any = {} list.forEach(item => { - const { name, value } = item; - map[value] = name; - }); - return map; + const { name, value } = item + map[value] = name + }) + return map } export const clusterModeTypeMap = translateArrToMap([...clusterTypeList, ...redisClusterTypeList]) diff --git a/vue.config.js b/vue.config.js index 0ee667e..45302ab 100644 --- a/vue.config.js +++ b/vue.config.js @@ -12,9 +12,9 @@ const CompressPlugin = require('compress-webpack-plugin') function resolve(dir) { return path.join(__dirname, dir) } -const httpType = 'https://' +const httpType = 'http://' // const proxyUrl = 'develop.cmp56.com:60006/' // 代理地址设置 -const proxyUrl = '23.33.3.22:60006/' // 代理地址设置 +const proxyUrl = '10.10.33.54:60006' // 代理地址设置 // const publicPath = process.env.NODE_ENV === 'production' ? '/cop-web/' : '/cop-web/'; const publicPath = '/cop-web/' module.exports = {