diff --git a/main/src/components/custom-echart-bar/index.vue b/main/src/components/custom-echart-bar/index.vue index 8592346..9c8f82a 100644 --- a/main/src/components/custom-echart-bar/index.vue +++ b/main/src/components/custom-echart-bar/index.vue @@ -29,6 +29,10 @@ export default { type: String, default: 'calc(100vh - 78px)', }, + isSeries: { + type: Boolean, + default: false, + }, }, emits: ['click'], setup(props, { emit }) { @@ -90,7 +94,7 @@ export default { } seriesData.push(obj); }); - option.series = seriesData; + option.series = props.isSeries && option.series.length > 0 ? option.series : seriesData; option.xAxis.data = xAxisData; setOptions(option); getInstance()?.off('click', onClick); diff --git a/main/src/components/custom-echart-bubble/index.vue b/main/src/components/custom-echart-bubble/index.vue new file mode 100644 index 0000000..3a96834 --- /dev/null +++ b/main/src/components/custom-echart-bubble/index.vue @@ -0,0 +1,103 @@ + + diff --git a/main/src/components/custom-echart-mixin/index.vue b/main/src/components/custom-echart-mixin/index.vue index 1d00039..3660351 100644 --- a/main/src/components/custom-echart-mixin/index.vue +++ b/main/src/components/custom-echart-mixin/index.vue @@ -53,6 +53,9 @@ export default { name: 'bar', type: 'bar', data: [], + itemStyle: { + barWidth: 10, + }, }, ], }); @@ -69,10 +72,13 @@ export default { let xAxisData = Array.from(new Set(props.chartData.map((item) => item.name))); let seriesData = []; typeArr.forEach((type, index) => { - let obj = { name: type }; + const barStyle = props.option?.barStyle ?? {}; + let obj = { name: type, ...barStyle }; let chartArr = props.chartData.filter((item) => type === item.type); obj['data'] = chartArr.map((item) => item.value); obj['type'] = chartArr[0].seriesType; + obj['stack'] = chartArr[0].stack; + obj['itemStyle'] = chartArr[0].itemStyle; seriesData.push(obj); }); option.series = seriesData; diff --git a/main/src/components/custom-echart-pie-3d/index.vue b/main/src/components/custom-echart-pie-3d/index.vue new file mode 100644 index 0000000..08b5f3f --- /dev/null +++ b/main/src/components/custom-echart-pie-3d/index.vue @@ -0,0 +1,90 @@ + + diff --git a/main/src/components/index.js b/main/src/components/index.js index 1d73a28..9f5408d 100644 --- a/main/src/components/index.js +++ b/main/src/components/index.js @@ -11,6 +11,8 @@ import CustomEchartMixin from './custom-echart-mixin'; import CustomEchartBarLine from './custom-echart-bar-line'; import customEchartPictorialBar from './custom-echart-pictorial-bar'; import CustomEchartLineLine from './custom-echart-line-line'; +import CustomEchartBubble from './custom-echart-bubble'; +import CustomEchartPie3d from './custom-echart-pie-3d'; export { SvgIcon, @@ -26,4 +28,6 @@ export { CustomEchartBarLine, customEchartPictorialBar, CustomEchartLineLine, + CustomEchartBubble, + CustomEchartPie3d, }; diff --git a/main/src/utils/echarts.js b/main/src/utils/echarts.js index 72ceb57..7806107 100644 --- a/main/src/utils/echarts.js +++ b/main/src/utils/echarts.js @@ -1,6 +1,6 @@ import * as echarts from 'echarts/core'; -import { BarChart, LineChart, PieChart, MapChart, PictorialBarChart, RadarChart } from 'echarts/charts'; +import { BarChart, LineChart, PieChart, MapChart, PictorialBarChart, RadarChart, GraphChart } from 'echarts/charts'; import { TitleComponent, @@ -43,6 +43,7 @@ echarts.use([ TimelineComponent, CalendarComponent, GraphicComponent, + GraphChart, ]); export default echarts; diff --git a/sub-government-screen-service/components.d.ts b/sub-government-screen-service/components.d.ts index 3634602..e6bffc0 100644 --- a/sub-government-screen-service/components.d.ts +++ b/sub-government-screen-service/components.d.ts @@ -11,6 +11,7 @@ declare module 'vue' { CenterMap: typeof import('./src/components/centerMap.vue')['default'] CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default'] CurrentTime: typeof import('./src/components/currentTime.vue')['default'] + CustomBack: typeof import('./src/components/customBack.vue')['default'] CustomCard: typeof import('./src/components/CustomCard.vue')['default'] CustomSelect: typeof import('./src/components/CustomSelect.vue')['default'] GridSelect: typeof import('./src/components/GridSelect.vue')['default'] diff --git a/sub-government-screen-service/src/App.vue b/sub-government-screen-service/src/App.vue index c6e0e25..acc815e 100644 --- a/sub-government-screen-service/src/App.vue +++ b/sub-government-screen-service/src/App.vue @@ -25,13 +25,13 @@ const size = computed(() => SettingStore.themeConfig.globalComSize); let apptime = ref(null); -onMounted(() => { - apptime.value && apptime.value.startTime(); -}); +// onMounted(() => { +// apptime.value && apptime.value.startTime(); +// }); -onUnmounted(() => { - apptime.value && apptime.value.chearTime(); -}); +// onUnmounted(() => { +// apptime.value && apptime.value.chearTime(); +// }); diff --git a/sub-government-screen-service/src/components/subTop.vue b/sub-government-screen-service/src/components/subTop.vue index 263bd72..d6b236d 100644 --- a/sub-government-screen-service/src/components/subTop.vue +++ b/sub-government-screen-service/src/components/subTop.vue @@ -1,5 +1,14 @@ diff --git a/sub-government-screen-service/src/views/breed/index.vue b/sub-government-screen-service/src/views/breed/index.vue index 33cc2ac..ed1cc85 100644 --- a/sub-government-screen-service/src/views/breed/index.vue +++ b/sub-government-screen-service/src/views/breed/index.vue @@ -1,6 +1,6 @@