diff --git a/.env.development b/.env.development index 982b961..53f349e 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统 VITE_APP_ENV = 'development' # 开发环境 -VITE_APP_BASE_API = 'http://192.168.110.168:8080' +VITE_APP_BASE_API = 'http://192.168.110.168:8008' # 应用访问路径 例如使用前缀 /admin/ VITE_APP_CONTEXT_PATH = '/' diff --git a/.env.production b/.env.production index 1109bc6..a1e2c21 100644 --- a/.env.production +++ b/.env.production @@ -5,7 +5,7 @@ VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统 VITE_APP_ENV = 'production' # 应用访问路径 例如使用前缀 /admin/ -VITE_APP_CONTEXT_PATH = '/' +VITE_APP_CONTEXT_PATH = 'http://192.168.110.2:8008' # 监控地址 VITE_APP_MONITOR_ADMIN = '/admin/applications' diff --git a/package.json b/package.json index 6e2bcd9..372ab15 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "image-conversion": "2.1.1", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", + "moment": "^2.30.1", "nprogress": "0.2.0", "pinia": "3.0.2", "screenfull": "6.0.2", diff --git a/src/assets/styles/customDialog.scss b/src/assets/styles/customDialog.scss index 03b2a4b..809e6e5 100644 --- a/src/assets/styles/customDialog.scss +++ b/src/assets/styles/customDialog.scss @@ -41,5 +41,30 @@ } } } +.bg-fill{ + background-position: center; + background-repeat: no-repeat; + background-size: 100% 100%; +} +.flex-c{ + display: flex; + flex-direction: column; +} +.flex{ + display: flex; +} +.flex-a{ + display: flex; + align-items: center; +} +.flex-c-a{ + display: flex; + flex-direction: column; + align-items: center; +} +.flex-a-cc{ + @extend .flex-a; + justify-content: center; +} diff --git a/src/router/index.ts b/src/router/index.ts index a6497db..4b804b0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -34,6 +34,11 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: '/redirect/:path(.*)', component: () => import('@/views/redirect/index.vue') + }, + { + path: '/historyDetail', + name: 'historyDetail', + component: () => import('@/views/historyDetail/historyDetail.vue') } ] }, @@ -92,9 +97,7 @@ export const constantRoutes: RouteRecordRaw[] = [ ]; // 动态路由,基于用户权限动态去加载 -export const dynamicRoutes: RouteRecordRaw[] = [ - -]; +export const dynamicRoutes: RouteRecordRaw[] = []; /** * 创建路由 diff --git a/src/views/business/inverter/index.vue b/src/views/business/inverter/index.vue index b5eb970..5b30f75 100644 --- a/src/views/business/inverter/index.vue +++ b/src/views/business/inverter/index.vue @@ -1724,6 +1724,7 @@ function initChart(a: any, b: any, c: any, d: any, e?: any, f?: any) { chart1 && chart1.setOption(option); } +const router = useRouter(); const chart1Value = ref([]); const chart1Index = ref([]); const chart2Value = ref([]); @@ -1740,7 +1741,6 @@ const handleCheckDetail = async (row?: InverterVO) => { reset2(); const _id = row?.id || ids.value[0]; const res = await getInverterOther(_id); - console.info(res.data); const data = res.data; for (const key in data) { if (key.includes('iPv') && !key.includes('Str')) { @@ -1786,16 +1786,37 @@ const handleCheckDetail = async (row?: InverterVO) => { batteryFailureInformation02: res.data.batteryFailureInformation02 === '0' ? '正常' : '异常' }; Object.assign(form2.value, res.data); - dialog2.visible = true; - dialog2.title = '逆变器历史数据'; - await nextTick(() => { - initChart(chart1Value.value, chart1Index.value, myChart1.value, '直流电流参数', 25, 'A'); - initChart(chart2Value.value, chart2Index.value, myChart2.value, '直流电压参数', 25, 'V'); - initChart(chart3Value.value, chart3Index.value, myChart3.value, '直流功率参数', 25, 'kwh'); - initChart(chart4Value.value, chart4Index.value, myChart4.value, 'mppt电流参数', 25, 'A'); - initChart(chart5Value.value, chart5Index.value, myChart5.value, 'mppt电压参数', 25, 'V'); - initChart(chart6Value.value, chart6Index.value, myChart6.value, 'mppt功率参数', 25, 'kwh'); + // dialog2.visible = true; + // dialog2.title = '逆变器历史数据'; + const detail = { + ...res.data, + chart1Value: chart1Value.value, + chart1Index: chart1Index.value, + chart2Value: chart2Value.value, + chart2Index: chart2Index.value, + chart3Value: chart3Value.value, + chart3Index: chart3Index.value, + chart4Value: chart4Value.value, + chart4Index: chart4Index.value, + chart5Value: chart5Value.value, + chart5Index: chart5Index.value, + chart6Value: chart6Value.value, + chart6Index: chart6Index.value + }; + router.push({ + path: '/historyDetail', + query: { + detail: JSON.stringify(detail) + } }); + // await nextTick(() => { + // initChart(chart1Value.value, chart1Index.value, myChart1.value, '直流电流参数', 25, 'A'); + // initChart(chart2Value.value, chart2Index.value, myChart2.value, '直流电压参数', 25, 'V'); + // initChart(chart3Value.value, chart3Index.value, myChart3.value, '直流功率参数', 25, 'kwh'); + // initChart(chart4Value.value, chart4Index.value, myChart4.value, 'mppt电流参数', 25, 'A'); + // initChart(chart5Value.value, chart5Index.value, myChart5.value, 'mppt电压参数', 25, 'V'); + // initChart(chart6Value.value, chart6Index.value, myChart6.value, 'mppt功率参数', 25, 'kwh'); + // }); }; /** 提交按钮 */ diff --git a/src/views/historyDetail/historyDetail.vue b/src/views/historyDetail/historyDetail.vue new file mode 100644 index 0000000..c788db4 --- /dev/null +++ b/src/views/historyDetail/historyDetail.vue @@ -0,0 +1,439 @@ + + + + +