diff --git a/.env.production b/.env.production index 229e046..6897639 100644 --- a/.env.production +++ b/.env.production @@ -20,7 +20,7 @@ VITE_MOCK_BASE_API=/mock VITE_STRICT_PORT=false # 是否启用屏幕转vw适配,可以选择 postcss-px-to-viewport-8-plugin || autofit -VITE_POST_CSS_PX_TO_VIEWPORT8_PLUGIN="autofit" +VITE_POST_CSS_PX_TO_VIEWPORT8_PLUGIN="postcss-px-to-viewport-8-plugin" # 是否在打包时使用cdn替换本地库 替换 true 不替换 false VITE_CDN=false diff --git a/src/assets/images/big-data/bg/bg-content-top-1.png b/src/assets/images/big-data/bg/bg-content-top-1.png new file mode 100644 index 0000000..18a826b Binary files /dev/null and b/src/assets/images/big-data/bg/bg-content-top-1.png differ diff --git a/src/assets/images/big-data/bg/bg-content-top-2.png b/src/assets/images/big-data/bg/bg-content-top-2.png new file mode 100644 index 0000000..518fca0 Binary files /dev/null and b/src/assets/images/big-data/bg/bg-content-top-2.png differ diff --git a/src/assets/images/big-data/bg/bg-content-top-3.png b/src/assets/images/big-data/bg/bg-content-top-3.png new file mode 100644 index 0000000..2f36e6b Binary files /dev/null and b/src/assets/images/big-data/bg/bg-content-top-3.png differ diff --git a/src/assets/images/big-data/bg/bg-content-top-4.png b/src/assets/images/big-data/bg/bg-content-top-4.png new file mode 100644 index 0000000..23726e5 Binary files /dev/null and b/src/assets/images/big-data/bg/bg-content-top-4.png differ diff --git a/src/assets/images/big-data/bg/bg-content-top-item.png b/src/assets/images/big-data/bg/bg-content-top-item.png new file mode 100644 index 0000000..458c47c Binary files /dev/null and b/src/assets/images/big-data/bg/bg-content-top-item.png differ diff --git a/src/assets/images/big-data/bg/bg-middle-move.png b/src/assets/images/big-data/bg/bg-middle-move.png new file mode 100644 index 0000000..2e61d1b Binary files /dev/null and b/src/assets/images/big-data/bg/bg-middle-move.png differ diff --git a/src/assets/images/big-data/bg/bg-middle-title.png b/src/assets/images/big-data/bg/bg-middle-title.png new file mode 100644 index 0000000..a49136b Binary files /dev/null and b/src/assets/images/big-data/bg/bg-middle-title.png differ diff --git a/src/assets/styles/common/common.scss b/src/assets/styles/common/common.scss index 778ba86..d7706b3 100644 --- a/src/assets/styles/common/common.scss +++ b/src/assets/styles/common/common.scss @@ -1,29 +1,35 @@ @use "src/element"; @use "src/digest"; -/* 定义滚动条高宽及背景高宽分别对应横竖滚动条的尺寸 */ -::-webkit-scrollbar { - width: 8px; - height: 8px; - background-color: var(--el-text-color-secondary); -} - -/* 定义滚动条轨道内阴影+圆角 */ -::-webkit-scrollbar-track { - background-color: #ebecef; - border-radius: 5px; - box-shadow: inset 0 0 6px #ebecef; -} - -/* 定义滑块内阴影+圆角 */ -::-webkit-scrollbar-thumb { - background-color: #d0d2d6; - border-radius: 5px; - box-shadow: inset 0 0 6px #d0d2d6; -} +///* 定义滚动条高宽及背景高宽分别对应横竖滚动条的尺寸 */ +//::-webkit-scrollbar { +// width: 8px; +// height: 8px; +// background-color: var(--el-text-color-secondary); +//} +// +///* 定义滚动条轨道内阴影+圆角 */ +//::-webkit-scrollbar-track { +// background-color: #ebecef; +// border-radius: 5px; +// box-shadow: inset 0 0 6px #ebecef; +//} +// +///* 定义滑块内阴影+圆角 */ +//::-webkit-scrollbar-thumb { +// background-color: #d0d2d6; +// border-radius: 5px; +// box-shadow: inset 0 0 6px #d0d2d6; +//} body { background: var(--background-color); - //user-select: none; - //overflow: hidden; + user-select: none; + overflow: auto; + + &::-webkit-scrollbar { + display: none; /* Chrome, Safari, Opera */ + } } + + diff --git a/src/assets/styles/common/src/element.scss b/src/assets/styles/common/src/element.scss index 106a8ba..2d4e869 100644 --- a/src/assets/styles/common/src/element.scss +++ b/src/assets/styles/common/src/element.scss @@ -9,7 +9,6 @@ border-radius: 50%; /* 将元素变成圆形 */ } - .hover { transition: all 0.3s; cursor: pointer; diff --git a/src/layout/index.vue b/src/layout/index.vue index 066f64b..58c67a9 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -11,7 +11,7 @@ const route = useRoute(); const appStore = useAppStore(); onBeforeMount(() => { - appStore.setBackground('../assets/images/common/bg/bg-layout.png'); + appStore.setBackground('@/assets/images/common/bg/bg-layout.png'); }); diff --git a/src/store/app.ts b/src/store/app.ts index 825fd9c..86a3fcc 100644 --- a/src/store/app.ts +++ b/src/store/app.ts @@ -17,7 +17,7 @@ const useAppStore = defineStore('appStore', { const href = new URL(background, import.meta.url).href; this.background = `url(${href})`; } else { - const href = new URL('../assets/images/common/bg/bg-layout.png', import.meta.url).href; + const href = new URL('@/assets/images/common/bg/bg-layout.png', import.meta.url).href; this.background = `url(${href})`; } }, diff --git a/src/utils/chart.ts b/src/utils/chart.ts index ecc275c..0d68ecb 100644 --- a/src/utils/chart.ts +++ b/src/utils/chart.ts @@ -1,6 +1,6 @@ import { useDebounceFn, useEventListener } from '@vueuse/core'; -import type echarts from '@/plugins/echarts'; +import echarts from '@/plugins/echarts'; /** 通用重置图表样式 */ export const debounceChart = (myChart: echarts.ECharts | undefined) => { @@ -20,3 +20,21 @@ export const formatter = (number: any) => { return segs.join(',').split('').reverse().join(''); }; + +/** 颜色渲染 */ +export const graphicLinearGradient = ( + color1: string, + color2: string, + coordinate: Array = [0, 0, 0, 1] +) => { + return new echarts.graphic.LinearGradient( + coordinate[0], + coordinate[1], + coordinate[2], + coordinate[3], + [ + { offset: 0, color: color1 }, + { offset: 1, color: color2 }, + ] + ); +}; diff --git a/src/utils/image.ts b/src/utils/image.ts new file mode 100644 index 0000000..79251cd --- /dev/null +++ b/src/utils/image.ts @@ -0,0 +1,4 @@ +export const getImage = (path: string) => { + const image = new URL(path, import.meta.url); + return image.href; +}; diff --git a/src/views/big-data/charts/content-bottom.tsx b/src/views/big-data/charts/content-bottom.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/views/big-data/charts/leftBottom.tsx b/src/views/big-data/charts/left-bottom.tsx similarity index 90% rename from src/views/big-data/charts/leftBottom.tsx rename to src/views/big-data/charts/left-bottom.tsx index ede4b3a..fac778a 100644 --- a/src/views/big-data/charts/leftBottom.tsx +++ b/src/views/big-data/charts/left-bottom.tsx @@ -9,7 +9,7 @@ let myChart = null; const option = { backgroundColor: 'transparent', - grid: { top: 40, right: 0, left: 0, bottom: 24 }, + grid: { top: '19%', right: 9, left: 9, bottom: '20%' }, tooltip: {}, legend: { data: [ @@ -29,7 +29,7 @@ const option = { show: true, data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], itemStyle: { color: '#ccc' }, - splitLine: { show: true, lineStyle: { color: '#333', width: 1, type: 'dotted' } }, + splitLine: { show: true, lineStyle: { color: '#333', width: 1, type: 'solid' } }, splitArea: { show: false }, }, yAxis: { show: false, type: 'value' }, @@ -37,7 +37,7 @@ const option = { { name: '入园', type: 'line', - data: [3, 9, 2, 8, 3, 4, 8, 2, 8, 3, 4, 8], + // data: [3, 9, 2, 8, 3, 4, 8, 2, 8, 3, 4, 8], smooth: true, symbol: 'circle', symbolSize: 14, @@ -47,7 +47,7 @@ const option = { { name: '出园', type: 'line', - data: [2, 8, 3, 7, 1, 9, 18, 3, 7, 1, 9, 6], + // data: [2, 8, 3, 7, 1, 9, 18, 3, 7, 1, 9, 6], smooth: true, symbol: 'circle', symbolSize: 14, @@ -60,7 +60,7 @@ const option = { /** 渲染图表 */ export const renderEcharts = (element: Ref) => { myChart = echarts.init(element.value, null, { - renderer: 'svg', + renderer: 'canvas', devicePixelRatio: window.devicePixelRatio, }); diff --git a/src/views/big-data/charts/left-middle.tsx b/src/views/big-data/charts/left-middle.tsx index 00b08b5..510fc2f 100644 --- a/src/views/big-data/charts/left-middle.tsx +++ b/src/views/big-data/charts/left-middle.tsx @@ -4,21 +4,11 @@ import type { EChartsOption, EChartsType } from 'echarts'; import { defineComponent, onMounted, type Ref, ref, watch } from 'vue'; import echarts from '@/plugins/echarts'; -import { debounceChart } from '@/utils/chart'; +import { debounceChart, graphicLinearGradient } from '@/utils/chart'; const itemStyles = [ - { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: '#00CCD2' }, - { offset: 1, color: '#00A2FF' }, - ]), - }, - { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: '#CBB668' }, - { offset: 1, color: '#FABC00' }, - ]), - }, + { color: graphicLinearGradient('#00CCD2', '#00A2FF') }, + { color: graphicLinearGradient('#CBB668', '#FABC00') }, ]; const option: Ref = ref(); @@ -44,12 +34,7 @@ option.value = { color: '#fff', formatter: '+{value}%', }, - data: [ - { - name: '环比变化', - detail: { valueAnimation: true, offsetCenter: ['0%', '-20%'] }, - }, - ], + data: [{ name: '环比变化', detail: { valueAnimation: true, offsetCenter: ['0%', '-20%'] } }], }, ], }; @@ -68,11 +53,8 @@ const renderEcharts: any = (myChart: Ref, element: Ref(); const myChart = ref(); diff --git a/src/views/big-data/components/big-data-content/components/content-bottom.vue b/src/views/big-data/components/big-data-content/components/content-bottom.vue index 82f77e3..e14d6f9 100644 --- a/src/views/big-data/components/big-data-content/components/content-bottom.vue +++ b/src/views/big-data/components/big-data-content/components/content-bottom.vue @@ -1,11 +1,19 @@ - - \ No newline at end of file + diff --git a/src/views/big-data/components/big-data-content/components/content-middle.vue b/src/views/big-data/components/big-data-content/components/content-middle.vue index 2df2af1..f281486 100644 --- a/src/views/big-data/components/big-data-content/components/content-middle.vue +++ b/src/views/big-data/components/big-data-content/components/content-middle.vue @@ -1,5 +1,84 @@ - + + + + + diff --git a/src/views/big-data/components/big-data-content/components/content-top.vue b/src/views/big-data/components/big-data-content/components/content-top.vue index 82f77e3..fa79640 100644 --- a/src/views/big-data/components/big-data-content/components/content-top.vue +++ b/src/views/big-data/components/big-data-content/components/content-top.vue @@ -1,11 +1,63 @@ - - \ No newline at end of file + li { + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + width: 171px; + height: 283px; + + img { + width: 171px; + height: 191px; + animation: shakeY 4s linear infinite; + } + + h2 { + width: 130px; + height: 52px; + font-size: 16px; + line-height: 54px; + text-align: center; + color: var(--color-primary-secondary); + background: url('@/assets/images/big-data/bg/bg-content-top-item.png') no-repeat center; + background-size: cover; + } + } + + li:nth-child(1) { + transform: translateY(68px); + } + + li:nth-child(4) { + transform: translateY(68px); + } +} + diff --git a/src/views/big-data/components/big-data-left/components/left-bottom.vue b/src/views/big-data/components/big-data-left/components/left-bottom.vue index 184e54f..14d93f5 100644 --- a/src/views/big-data/components/big-data-left/components/left-bottom.vue +++ b/src/views/big-data/components/big-data-left/components/left-bottom.vue @@ -1,14 +1,14 @@ diff --git a/src/views/business-supervision/charts/contentBottom.ts b/src/views/business-supervision/charts/contentBottom.ts index bcbe1c7..2862b35 100644 --- a/src/views/business-supervision/charts/contentBottom.ts +++ b/src/views/business-supervision/charts/contentBottom.ts @@ -4,8 +4,9 @@ import type { EChartsOption } from 'echarts'; import { type Ref, ref } from 'vue'; import echarts from '@/plugins/echarts'; -import { debounceChart } from '@/utils/chart'; +import { debounceChart, graphicLinearGradient } from '@/utils/chart'; +let myChart = null; const option = ref(); option.value = { tooltip: { @@ -47,12 +48,7 @@ option.value = { name: 'Direct', type: 'bar', barWidth: '40%', - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: '#00CCD2' }, - { offset: 1, color: '#00A2FF' }, - ]), - }, + itemStyle: { color: graphicLinearGradient('#00CCD2', '#00A2FF') }, // emphasis: { // shadowBlur: 10, // 取消阴影模糊 // shadowColor: '#000', // 取消阴影颜色 @@ -64,7 +60,7 @@ option.value = { }; export const renderEcharts = (element: Ref) => { - const myChart: any = echarts.init(element.value, null, { + myChart = echarts.init(element.value, null, { renderer: 'svg', devicePixelRatio: window.devicePixelRatio, }); diff --git a/src/views/business-supervision/components/business-supervision-content/components/content-middle.vue b/src/views/business-supervision/components/business-supervision-content/components/content-middle.vue index 140626f..d77b238 100644 --- a/src/views/business-supervision/components/business-supervision-content/components/content-middle.vue +++ b/src/views/business-supervision/components/business-supervision-content/components/content-middle.vue @@ -1,49 +1,42 @@ - +