diff --git a/src/permission.ts b/src/permission.ts index 6862acd..1294ba2 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -44,8 +44,9 @@ router.beforeEach(async (to:any, from:any, next:any) => { // const { roles } = await userStore.getInfo(); const { perms } = await userStore.getInfo(); const accessRoutes = await permissionStore.generateRoutes(perms); - // console.log("路由权限--perms--》",accessRoutes); + console.log("路由权限--perms--》",accessRoutes); accessRoutes.forEach((route:any) => { + console.log("路由权限--addRoutecessRoutes",route); router.addRoute(route); }); next({ ...to, replace: true }); diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index d0d0f3c..7843ea9 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -103,8 +103,13 @@ export const usePermissionStore = defineStore("permission", () => { listRoutes() .then(({ data: asyncRoutes }) => { // 根据角色获取有访问权限的路由 - // console.log("获取到的路由---->",asyncRoutes, roles); + console.log("获取到的路由---->",asyncRoutes); const accessedRoutes = filterAsyncRoutes(asyncRoutes, roles); + + console.log("获取到的路由--1-->",accessedRoutes); + + console.log("获取到的路由--2-->",roles); + setRoutes(accessedRoutes); resolve(accessedRoutes); }) @@ -113,6 +118,9 @@ export const usePermissionStore = defineStore("permission", () => { }); }); } + console.log("获取到的路由--3->",routes) + console.log("获取到的路由--4->",setRoutes) + console.log("获取到的路由--5->",generateRoutes) return { routes, setRoutes, generateRoutes }; }); diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 1a3e7ac..bafda16 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -2,97 +2,90 @@
+ +
+ +
+ - -
- + - - - - - - + + + + + + + + + + + -
- -
-
+ + + + + + - {{ $t("login.login") }} - +
+ +
+
- -
- {{ $t("login.username") }}: ceshi - {{ $t("login.password") }}: 123456 -
- + {{ $t("login.login") }} + + + +
+ {{ $t("login.username") }}: ceshi + {{ $t("login.password") }}: 123456 +
+
- @@ -190,18 +183,15 @@ function handleLogin() { const redirect = (query.redirect as LocationQueryValue) ?? "/"; - const otherQueryParams = Object.keys(query).reduce( - (acc: any, cur: string) => { - if (cur !== "redirect") { - acc[cur] = query[cur]; - } - return acc; - }, - {} - ); - //console.log("登陆输出:",redirect,otherQueryParams); + const otherQueryParams = Object.keys(query).reduce((acc: any, cur: string) => { + if (cur !== "redirect") { + acc[cur] = query[cur]; + } + return acc; + }, {}); + //console.log("登陆输出:",redirect,otherQueryParams); router.push({ path: redirect, query: otherQueryParams }); - getCaptcha(); + getCaptcha(); }) .catch(() => { // 验证失败,重新生成验证码 @@ -227,11 +217,11 @@ onMounted(() => { background-image: url(../../assets/login/bg.png); background-repeat: no-repeat; background-size: 100% 100%; - background-color: #ECEFF5; + background-color: #eceff5; display: flex; justify-content: center; align-items: center; - .login-main{ + .login-main { width: 800px; height: 700px; position: relative; @@ -239,11 +229,11 @@ onMounted(() => { background-repeat: no-repeat; background-size: 100% 100%; margin-left: -18%; - .login-title{ + .login-title { font-weight: bold; font-size: 37px; text-align: center; - color: #1E5EFF; + color: #1e5eff; line-height: 43px; margin-bottom: 30px; } @@ -252,12 +242,12 @@ onMounted(() => { width: 500px; background-color: #fff; border-radius: 6px; - box-shadow: 0px 0px 42px -28px #37508E; + box-shadow: 0px 0px 42px -28px #37508e; padding: 60px 30px; position: absolute; left: 50%; top: 50%; - transform: translate(-50%,-50%); + transform: translate(-50%, -50%); margin-left: 60%; overflow: hidden; box-sizing: border-box; @@ -278,12 +268,11 @@ onMounted(() => { .el-form-item { border-radius: 5px; - border: solid 1px #D9D9D9; + border: solid 1px #d9d9d9; color: #666; } .el-input { - // 子组件 scoped 无效,使用 :deep :deep(.el-input__wrapper) { padding: 0; diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue index 158e38b..f188556 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/bar.vue @@ -7,6 +7,8 @@ import { analyzeChartData } from "@/api/chart/index"; import { echatsViews } from "@/api/DesignForm/types"; import * as echarts from "echarts"; +import { useDesignEchartsStore } from "@/store/DesignForm/designForm"; +const store = useDesignEchartsStore() as any; //自定义表单存储器 const props = withDefaults( defineProps<{ @@ -36,18 +38,23 @@ var myChart = ref(); const drawPictures = () => { if (props.uuid && props.uuid != "") { myChart.value = echarts.init(document.getElementById(props.uuid) as HTMLDivElement); - analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { - console.log("火兔", data); - if (data.code == 0) { + analyzeChartData({ + tableKey: props.tableKey, + chartId: props.uuid, + setConfig: controlData.value, + }).then((data) => { + console.log("火1111111兔", data); + if (data.code == 0 && data.data != null) { let optVal = data.data; - optVal.grid = { - left: "2%", - right: "2%", - bottom: "15%", - top: "15%", - containLabel: true, - }; + // optVal.grid = { + // left: "2%", + // right: "2%", + // bottom: "15%", + // top: "15%", + // containLabel: true, + // }; myChart.value.setOption(optVal); + myChart.value.resize(); } else { myChart.value.setOption({ grid: { @@ -77,6 +84,7 @@ const drawPictures = () => { }, ], }); + // myChart.value.resize(); } }); // myChart.value.setOption({ @@ -111,6 +119,10 @@ const drawPictures = () => { // myChart.value.resize(); } }; +//获取当前激活的项目 +const controlData = computed(() => { + return store.controlAttr; +}); watch( () => props.kuandu, (val: any) => { @@ -120,7 +132,7 @@ watch( { deep: true } ); watch( - () => props.data, + () => controlData.value, (val: any) => { console.log("画图完毕--改变-->", val); drawPictures(); diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue index 692e731..2cec10d 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/barRace.vue @@ -34,10 +34,10 @@ const drawPictures = () => { myChart.value = echarts.init(document.getElementById(props.uuid) as HTMLDivElement); analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { console.log("画图排行榜---->1", data); - if (data.code == 0) { + if (data.code == 0 && data.data != null) { let radMap = data.data; let seriesList = new Array(); - if (Array.isArray(radMap.seriesData)) { + if (radMap.seriesData && Array.isArray(radMap.seriesData)) { radMap.seriesData.forEach((item: any) => { seriesList.push({ realtimeSort: true, @@ -78,6 +78,7 @@ const drawPictures = () => { series: seriesList, }; myChart.value.setOption(optionData); + myChart.value.resize(); } else { myChart.value.setOption({ grid: { @@ -110,6 +111,7 @@ const drawPictures = () => { }, ], }); + myChart.value.resize(); } }); diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue index 82e0234..8e35837 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/line.vue @@ -7,7 +7,11 @@ import { analyzeChartData } from "@/api/chart/index"; import { echatsViews } from "@/api/DesignForm/types"; import * as echarts from "echarts"; - +import { useDesignEchartsStore } from "@/store/DesignForm/designForm"; +const store = useDesignEchartsStore() as any; //自定义表单存储器 +const controlData = computed(() => { + return store.controlAttr; +}); const props = withDefaults( defineProps<{ uuid: string; @@ -24,6 +28,7 @@ const props = withDefaults( } ); var myChartPie = ref(); + /** @ 作者: 秦东 @ 时间: 2025-06-26 11:34:21 @@ -34,9 +39,13 @@ const drawPie = () => { myChartPie.value = echarts.init( document.getElementById(props.uuid) as HTMLDivElement ); - analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { + analyzeChartData({ + tableKey: props.tableKey, + chartId: props.uuid, + etConfig: controlData.value, + }).then((data) => { console.log("火兔", data); - if (data.code == 0) { + if (data.code == 0 && data.data != null) { let optVal = data.data; optVal.grid = { left: "2%", @@ -46,6 +55,7 @@ const drawPie = () => { containLabel: true, }; myChartPie.value.setOption(optVal); + myChartPie.value.resize(); } else { myChartPie.value.setOption({ grid: { @@ -80,6 +90,7 @@ const drawPie = () => { }, ], }); + myChartPie.value.resize(); } }); diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/pie.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/pie.vue index fcc8ccd..ca5a178 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/pie.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/pie.vue @@ -7,7 +7,11 @@ import { analyzeChartData } from "@/api/chart/index"; import { echatsViews } from "@/api/DesignForm/types"; import * as echarts from "echarts"; - +import { useDesignEchartsStore } from "@/store/DesignForm/designForm"; +const store = useDesignEchartsStore() as any; //自定义表单存储器 +const controlData = computed(() => { + return store.controlAttr; +}); const props = withDefaults( defineProps<{ uuid: string; @@ -34,9 +38,13 @@ const drawPie = () => { myChartPie.value = echarts.init( document.getElementById(props.uuid) as HTMLDivElement ); - analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { + analyzeChartData({ + tableKey: props.tableKey, + chartId: props.uuid, + etConfig: controlData.value, + }).then((data) => { console.log("火兔---->1", data); - if (data.code == 0) { + if (data.code == 0 && data.data != null) { let optionData = { tooltip: { trigger: "item", @@ -92,6 +100,7 @@ const drawPie = () => { }; console.log("火兔---->2", optionData); myChartPie.value.setOption(optionData); + myChartPie.value.resize(); } else { myChartPie.value.setOption({ legend: { diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/radar.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/radar.vue index fb1fcef..6c9797a 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/radar.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/radar.vue @@ -7,7 +7,11 @@ import { analyzeChartData } from "@/api/chart/index"; import { echatsViews } from "@/api/DesignForm/types"; import * as echarts from "echarts"; - +import { useDesignEchartsStore } from "@/store/DesignForm/designForm"; +const store = useDesignEchartsStore() as any; //自定义表单存储器 +const controlData = computed(() => { + return store.controlAttr; +}); const props = withDefaults( defineProps<{ uuid: string; @@ -34,16 +38,20 @@ const drawRadar = () => { myChartPie.value = echarts.init( document.getElementById(props.uuid) as HTMLDivElement ); - analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { + analyzeChartData({ + tableKey: props.tableKey, + chartId: props.uuid, + etConfig: controlData.value, + }).then((data) => { console.log("画图雷达---->1", data); - if (data.code == 0) { + if (data.code == 0 && data.data != null) { let radMap = data.data; let optionData = { tooltip: { trigger: "item", }, legend: { - data: radMap.legend, + data: radMap.legend ? radMap.legend : [], left: "left", }, radar: { @@ -58,6 +66,7 @@ const drawRadar = () => { ], }; myChartPie.value.setOption(optionData); + myChartPie.value.resize(); } else { myChartPie.value.setOption({ grid: { diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/target.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/target.vue index b05f8b4..f50aba4 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/target.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/chart/target.vue @@ -27,7 +27,11 @@ const listAry = ref([]); */ const getTargetData = () => { if (props.uuid && props.uuid != "") { - analyzeChartData({ tableKey: props.tableKey, chartId: props.uuid }).then((data) => { + analyzeChartData({ + tableKey: props.tableKey, + chartId: props.uuid, + etConfig: controlData.value, + }).then((data) => { console.log("获取指标数据---->1", data); listAry.value = data.data; }); diff --git a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/winBox/dimMea.vue b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/winBox/dimMea.vue index 60baddc..3c1c646 100644 --- a/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/winBox/dimMea.vue +++ b/src/views/sysworkflow/lowcodepage/appPage/appPageForm/echatesUnit/winBox/dimMea.vue @@ -636,7 +636,7 @@ const duliangBianhua = () => { :title="drawTitle" direction="rtl" :before-close="handleClose" - >{{ controlData.type }}--->{{ props.dimMeaType }} + >