diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/router/index.ts b/zdxt-web-client/zdxt-admin-plus-ui/src/router/index.ts index 5e0466ce..2406319c 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/router/index.ts +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/router/index.ts @@ -70,7 +70,8 @@ export const constantRoutes: RouteRecordRaw[] = [ children: [ { path: '/home', - component: () => import('@/views/home/index.vue'), + // component: () => import('@/views/home/index.vue'), + component: () => import('@/views/supervision/statistical/home/index.vue'), name: 'Home', meta: { title: '首页', icon: 'dashboard', affix: true } } @@ -314,31 +315,31 @@ export const constantRoutes: RouteRecordRaw[] = [ } ] }, - // { - // path: '/enforcement-code/statistical', - // component: Layout, - // hidden: true, - // children: [ - // { - // path: 'home', - // component: () => import('@/views/supervision/statistical/home/index.vue'), - // name: 'StatisticalHome', - // meta: { title: '首页统计分析', fullscreen: true } - // }, - // { - // path: 'city-direct', - // component: () => import('@/views/supervision/statistical/city-direct/index.vue'), - // name: 'StatisticalCityDirect', - // meta: { title: '市直综合分析', fullscreen: true } - // }, - // { - // path: 'district-direct', - // component: () => import('@/views/supervision/statistical/district-direct/index.vue'), - // name: 'StatisticalDistrictDirect', - // meta: { title: '各区综合分析', fullscreen: true } - // } - // ] - // } + { + path: '/enforcement-code/statistical', + component: Layout, + hidden: true, + children: [ + { + path: 'home', + component: () => import('@/views/supervision/statistical/home/index.vue'), + name: 'StatisticalHome', + meta: { title: '首页统计分析', fullscreen: true } + }, + { + path: 'city-direct', + component: () => import('@/views/supervision/statistical/city-direct/index.vue'), + name: 'StatisticalCityDirect', + meta: { title: '市直综合分析', fullscreen: true } + }, + { + path: 'district-direct', + component: () => import('@/views/supervision/statistical/district-direct/index.vue'), + name: 'StatisticalDistrictDirect', + meta: { title: '各区综合分析', fullscreen: true } + } + ] + } ]; // 动态路由,基于用户权限动态去加载 diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/home/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/home/index.vue index a0ce1b78..b5a7da0d 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/home/index.vue +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/home/index.vue @@ -548,7 +548,7 @@ async function loadAdminTrend() { let { times, ins, ent } = res ? normalizeTimeSeries(unwrapData(res)) : { times: [] as string[], ins: [] as number[], ent: [] as number[] }; if (!times.length) { times = ['2024-08', '2024-10', '2024-12', '2025-02', '2025-04', '2025-06', '2025-08', '2025-10', '2025-12', '2026-02', '2026-04', '2026-06', '2026-08']; - ins = [2800, 3200, 3800, 3500, 4200, 4800, 5200, 5800, 6400, 6000, 6800, 7200, 7600]; + ins = ['2800', '3200', '3800', '3500', '4200', '4800', '5200', '5800', '6400', '6000', '6800', '7200', '7600']; ent = [1200, 1500, 1800, 1600, 2200, 2500, 2800, 3100, 3400, 3200, 3600, 3900, 4100]; } await nextTick(); @@ -557,7 +557,7 @@ async function loadAdminTrend() { adminTrendChart = echarts.init(adminTrendRef.value); } adminTrendChart.setOption( - buildTrendLineOption(times, ins, ent, '行政执法数量', '被检查企业数量', '行政执法数量(宗)', '被执法企业数量(家)'), + buildTrendLineOption(times, ins.map(Number), ent.map(Number), '行政执法数量', '被检查企业数量', '行政执法数量(宗)', '被执法企业数量(家)'), true ); adminTrendChart.resize(); @@ -578,7 +578,7 @@ async function loadNonTrend() { nonTrendChart = echarts.init(nonTrendRef.value); } nonTrendChart.setOption( - buildTrendLineOption(times, ins, ent, '非行政执法数量', '被检查企业数量', '行政执法数量(宗)', '被检查企业数量(家)'), + buildTrendLineOption(times, ins.map(Number), ent.map(Number), '非行政执法数量', '被检查企业数量', '非行政执法数量(宗)', '被检查企业数量(家)'), true ); nonTrendChart.resize(); diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/city-direct/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/city-direct/index.vue index 303d5684..a81cb142 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/city-direct/index.vue +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/city-direct/index.vue @@ -19,19 +19,21 @@
- + 综合数据
- -
{{ fmt(m.singleLaw?.yoy) }}
-
{{ fmt(m.singleLaw?.mom) }}
+
+ + + + {{ fmt(m.singleLaw?.yoy) }} +
+
+ + + + {{ fmt(m.singleLaw?.mom) }} +
联合执法数量
@@ -21,8 +31,18 @@
{{ m.unionLaw?.thisMonth ?? '-' }}
-
{{ fmt(m.unionLaw?.yoy) }}
-
{{ fmt(m.unionLaw?.mom) }}
+
+ + + + {{ fmt(m.unionLaw?.yoy) }} +
+
+ + + + {{ fmt(m.unionLaw?.mom) }} +
被执法企业数量
@@ -33,8 +53,18 @@
{{ m.enfEnt?.thisMonth ?? '-' }}
-
{{ fmt(m.enfEnt?.yoy) }}
-
{{ fmt(m.enfEnt?.mom) }}
+
+ + + + {{ fmt(m.enfEnt?.yoy) }} +
+
+ + + + {{ fmt(m.enfEnt?.mom) }} +
入企压减率
@@ -56,8 +86,18 @@
{{ m.entComplaint?.thisMonth ?? '-' }}
-
{{ fmt(m.entComplaint?.yoy) }}
-
{{ fmt(m.entComplaint?.mom) }}
+
+ + + + {{ fmt(m.entComplaint?.yoy) }} +
+
+ + + + {{ fmt(m.entComplaint?.mom) }} +
企业数量
@@ -68,8 +108,18 @@
{{ m.ent?.thisMonth ?? '-' }}
-
{{ fmt(m.ent?.yoy) }}
-
{{ fmt(m.ent?.mom) }}
+
+ + + + {{ fmt(m.ent?.yoy) }} +
+
+ + + + {{ fmt(m.ent?.mom) }} +
@@ -84,4 +134,14 @@ function fmt(val?: string | number) { if (val === undefined || val === null || val === '-') return '-%'; return formatPercent(val); } + +function isRise(val?: string | number) { + if (val === undefined || val === null || val === '-') return false; + return parseFloat(String(val)) >= 0; +} + +function isFall(val?: string | number) { + if (val === undefined || val === null || val === '-') return false; + return parseFloat(String(val)) < 0; +} diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/home/index copy.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/home/index copy.vue new file mode 100644 index 00000000..9f7ccbd4 --- /dev/null +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/home/index copy.vue @@ -0,0 +1,439 @@ + + + + + diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/home/index.vue b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/home/index.vue index 9f7ccbd4..a0ce1b78 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/home/index.vue +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/home/index.vue @@ -1,5 +1,5 @@ - diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/styles/analysis-layout.css b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/styles/analysis-layout.css index 20bad468..8b264c0d 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/styles/analysis-layout.css +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/styles/analysis-layout.css @@ -29,3 +29,48 @@ .statistical-analysis .el-date-editor { margin-left: 8px; } + +/* select_time 标签样式 */ +.select_time { + position: relative; + display: inline-block; + margin: 0 5px 0 0; + padding: 0 25px 0 10px; + height: 28px; + line-height: 28px; + color: #315EFB; + font-weight: 500; + background: rgba(59, 145, 253, 0.12); + text-align: center; + border-radius: 6px; + cursor: pointer; +} + +.select_time > a { + display: inline-block; + position: absolute; + right: 0; + width: 18px; + height: 100%; +} + +.select_time > a::after { + position: absolute; + right: 0; + width: 18px; + height: 18px; + content: "\f105"; + color: #678dfe; + font-family: "FontAwesome"; + font-size: 1.25rem; +} + +/* FontAwesome 图标修复 */ +.statistical-analysis .fa { + font-family: "FontAwesome"; +} + +/* 日期选择器弹窗暗色适配 */ +.analysis-date-picker { + background: #fff !important; +} diff --git a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/utils/chartOptions.ts b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/utils/chartOptions.ts index 1e57c4f0..a53213d3 100644 --- a/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/utils/chartOptions.ts +++ b/zdxt-web-client/zdxt-admin-plus-ui/src/views/supervision/statistical/utils/chartOptions.ts @@ -110,7 +110,7 @@ export function buildNonAdminPieOption(data: { value: number; name: string }[]): export function buildTrendLineOption( times: string[], - ins: number[], + ins: number[] , ent: number[], insName: string, entName: string,