diff --git a/main/src/components/custom-echart-bar/index.vue b/main/src/components/custom-echart-bar/index.vue index 9c8f82a..c2b5e78 100644 --- a/main/src/components/custom-echart-bar/index.vue +++ b/main/src/components/custom-echart-bar/index.vue @@ -37,10 +37,20 @@ export default { emits: ['click'], setup(props, { emit }) { const chartRef = ref(null); - const { setOptions, getInstance } = useEcharts(chartRef); + const { setOptions, getInstance, startAutoPlay } = useEcharts(chartRef); const option = reactive({ tooltip: { trigger: 'axis', + tooltip: { + backgroundColor: 'rgba(12, 36, 56, 0.9)', // 背景颜色(支持RGBA格式) + borderColor: '#2cf4fd', // 边框颜色 + borderWidth: 1, // 边框宽度 + textStyle: { + color: '#fff', // 文字颜色 + fontSize: 12, + }, + formatter: '{b}:{c}', + }, axisPointer: { type: 'shadow', label: { @@ -97,6 +107,11 @@ export default { option.series = props.isSeries && option.series.length > 0 ? option.series : seriesData; option.xAxis.data = xAxisData; setOptions(option); + startAutoPlay({ + interval: 2000, + seriesIndex: 0, + showTooltip: true, + }); getInstance()?.off('click', onClick); getInstance()?.on('click', onClick); } diff --git a/main/src/components/custom-echart-line-line/index.vue b/main/src/components/custom-echart-line-line/index.vue index cf0ae9e..d647ab1 100644 --- a/main/src/components/custom-echart-line-line/index.vue +++ b/main/src/components/custom-echart-line-line/index.vue @@ -33,7 +33,7 @@ export default { emits: ['click'], setup(props, { emit }) { const chartRef = ref(null); - const { setOptions, getInstance, resize } = useEcharts(chartRef); + const { setOptions, getInstance, resize, startAutoPlay } = useEcharts(chartRef); const optionVal = reactive({}); watchEffect(() => { @@ -55,6 +55,11 @@ export default { Object.assign(optionVal, cloneDeep(props.option)); } setOptions(props.option); + startAutoPlay({ + interval: 2000, + seriesIndex: 0, + showTooltip: true, + }); resize(); getInstance()?.off('click', onClick); getInstance()?.on('click', onClick); diff --git a/main/src/components/custom-echart-line/index.vue b/main/src/components/custom-echart-line/index.vue index 00d47fd..4ec7c45 100644 --- a/main/src/components/custom-echart-line/index.vue +++ b/main/src/components/custom-echart-line/index.vue @@ -34,7 +34,7 @@ export default { emits: ['click'], setup(props, { emit }) { const chartRef = ref(null); - const { setOptions, getInstance } = useEcharts(chartRef); + const { setOptions, getInstance, startAutoPlay } = useEcharts(chartRef); const option = reactive({ tooltip: { trigger: 'axis', @@ -138,6 +138,11 @@ export default { option.series = seriesData; option.xAxis.data = xAxisData; setOptions(option); + startAutoPlay({ + interval: 2000, + seriesIndex: 0, + showTooltip: true, + }); getInstance()?.off('click', onClick); getInstance()?.on('click', onClick); } diff --git a/main/src/components/custom-echart-mixin/index.vue b/main/src/components/custom-echart-mixin/index.vue index 3660351..e8e3aa0 100644 --- a/main/src/components/custom-echart-mixin/index.vue +++ b/main/src/components/custom-echart-mixin/index.vue @@ -29,10 +29,17 @@ export default { }, setup(props) { const chartRef = ref(null); - const { setOptions } = useEcharts(chartRef); + const { setOptions, startAutoPlay } = useEcharts(chartRef); const option = reactive({ tooltip: { trigger: 'axis', + backgroundColor: 'rgba(12, 36, 56, 0.9)', // 背景颜色(支持RGBA格式) + borderColor: '#2cf4fd', // 边框颜色 + borderWidth: 1, // 边框宽度 + textStyle: { + color: '#fff', // 文字颜色 + fontSize: 12, + }, axisPointer: { type: 'shadow', label: { @@ -84,6 +91,11 @@ export default { option.series = seriesData; option.xAxis.data = xAxisData; setOptions(option); + startAutoPlay({ + interval: 2000, + seriesIndex: 0, + showTooltip: true, + }); } return { chartRef }; }, diff --git a/main/src/components/custom-echart-pictorial-bar/index.vue b/main/src/components/custom-echart-pictorial-bar/index.vue index 693ea50..9f8ab69 100644 --- a/main/src/components/custom-echart-pictorial-bar/index.vue +++ b/main/src/components/custom-echart-pictorial-bar/index.vue @@ -33,7 +33,7 @@ export default { emits: ['click'], setup(props, { emit }) { const chartRef = ref(null); - const { setOptions, getInstance, resize } = useEcharts(chartRef); + const { setOptions, getInstance, resize, startAutoPlay } = useEcharts(chartRef); const option = reactive({ grid: { left: '3%', @@ -42,9 +42,6 @@ export default { top: '11%', containLabel: true, }, - tooltip: { - formatter: '{b}', - }, series: [ { type: 'pictorialBar', @@ -104,6 +101,11 @@ export default { Object.assign(option, cloneDeep(props.option)); } setOptions(option); + startAutoPlay({ + interval: 2000, + seriesIndex: 0, + showTooltip: true, + }); resize(); getInstance()?.off('click', onClick); getInstance()?.on('click', onClick); diff --git a/main/src/components/custom-echart-pie/index.vue b/main/src/components/custom-echart-pie/index.vue index b00c971..dc75bd3 100644 --- a/main/src/components/custom-echart-pie/index.vue +++ b/main/src/components/custom-echart-pie/index.vue @@ -36,6 +36,13 @@ export default { const { setOptions, getInstance, resize, startAutoPlay } = useEcharts(chartRef); const option = reactive({ tooltip: { + backgroundColor: 'rgba(12, 36, 56, 0.9)', // 背景颜色(支持RGBA格式) + borderColor: '#2cf4fd', // 边框颜色 + borderWidth: 1, // 边框宽度 + textStyle: { + color: '#fff', // 文字颜色 + fontSize: 12, + }, formatter: '{b} ({c})', }, series: [ diff --git a/sub-government-affairs-service/src/views/home/index.vue b/sub-government-affairs-service/src/views/home/index.vue index 78ebb27..f38dcfc 100644 --- a/sub-government-affairs-service/src/views/home/index.vue +++ b/sub-government-affairs-service/src/views/home/index.vue @@ -192,9 +192,9 @@ const state = reactive({ }, inputsData: [ { value: 75, name: '农药使用', type: '投入品', max: 100, unit: '吨' }, - { value: 38, name: '农机使用', type: '投入品', max: 100, unit: '台' }, + // { value: 38, name: '农机使用', type: '投入品', max: 100, unit: '台' }, { value: 74, name: '种源使用', type: '投入品', max: 100, unit: '万吨' }, - { value: 55, name: '兽药使用', type: '投入品', max: 100, unit: '千克' }, + // { value: 55, name: '兽药使用', type: '投入品', max: 100, unit: '千克' }, { value: 65, name: '肥料使用', type: '投入品', max: 100, unit: '吨' }, ], businessOption: { diff --git a/sub-government-screen-service/components.d.ts b/sub-government-screen-service/components.d.ts index ea50d1a..219d560 100644 --- a/sub-government-screen-service/components.d.ts +++ b/sub-government-screen-service/components.d.ts @@ -8,7 +8,7 @@ export {} declare module 'vue' { export interface GlobalComponents { BaseBg: typeof import('./src/components/baseBg.vue')['default'] - 'BaseBg copy': typeof import('./src/components/baseBg copy.vue')['default'] + BaseBg_old: typeof import('./src/components/baseBg_old.vue')['default'] CenterMap: typeof import('./src/components/centerMap.vue')['default'] CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default'] copy: typeof import('./src/components/baseBg copy.vue')['default'] diff --git a/sub-government-screen-service/src/components/baseBg copy.vue b/sub-government-screen-service/src/components/baseBg copy.vue deleted file mode 100644 index ea58702..0000000 --- a/sub-government-screen-service/src/components/baseBg copy.vue +++ /dev/null @@ -1,170 +0,0 @@ - - - diff --git a/sub-government-screen-service/src/components/baseBg.vue b/sub-government-screen-service/src/components/baseBg.vue index 2f464a7..5c1ee2a 100644 --- a/sub-government-screen-service/src/components/baseBg.vue +++ b/sub-government-screen-service/src/components/baseBg.vue @@ -4,51 +4,10 @@
- -
+
-
-
- -
- - -
{{ '农业产业政务云平台' }}
-
- -
-
+ {{ topTitle }}
@@ -146,72 +105,16 @@ div { } .top-content { width: calc(100% - 400px); - height: 100%; - display: inline-flex; - justify-content: center; - flex-direction: column; - .top-content-p { - width: 100%; - } - .title, - .b-nav-l, - .b-nav-r { - display: inline-block; - vertical-align: middle; - } - .b-nav-l, - .b-nav-r { - width: calc((100% - 300px) / 2); - } - .b-nav-r { - text-align: right; - } - .title { - width: 300px; - line-height: 38px; - text-align: center; - font-size: 22px; - font-weight: bold; - transform: skewX(-8deg); - background: linear-gradient(to bottom, '#ff7e5f', '#548fff'); - -webkit-background-clip: text; - color: #fff; - letter-spacing: 8px; - text-shadow: -6px 0 0 1px #add8f1; - max-height: unset !important; - } - } - .b-nav-l, - .b-nav-r { - margin: auto; - display: inline-flex; - gap: 20px; - .b-nav-item { - display: inline-block; - cursor: pointer; - min-width: 132px; - height: 38px; - text-align: center; - line-height: 38px; - span { - font-size: 14px; - font-weight: bold; - display: inline-flex; - transform: skewX(-8deg); - background: linear-gradient(to bottom, '#ff7e5f', '#548fff'); - -webkit-background-clip: text; - - letter-spacing: 4px; - text-shadow: -2px 0 0 1px #add8f1; - } - - &.nav-act { - color: rgba(255, 255, 255, 1); - } - &.nav-normal { - color: rgba(255, 255, 255, 0.6); - } - } + line-height: 42px; + text-align: center; + font-size: 26px; + font-weight: bold; + transform: skewX(-8deg); + background: linear-gradient(to bottom, '#ff7e5f', '#548fff'); + -webkit-background-clip: text; + color: #fff; + letter-spacing: 8px; + text-shadow: -6px 0 0 1px #add8f1; } .top-left { width: 200px; @@ -260,7 +163,7 @@ div { } } .content { - height: calc(100% - 60px); + height: calc(100% - 138px); } } } diff --git a/sub-government-screen-service/src/components/baseBg_old.vue b/sub-government-screen-service/src/components/baseBg_old.vue new file mode 100644 index 0000000..2f464a7 --- /dev/null +++ b/sub-government-screen-service/src/components/baseBg_old.vue @@ -0,0 +1,267 @@ + + + diff --git a/sub-government-screen-service/src/components/subTop.vue b/sub-government-screen-service/src/components/subTop.vue index d6b236d..6584d90 100644 --- a/sub-government-screen-service/src/components/subTop.vue +++ b/sub-government-screen-service/src/components/subTop.vue @@ -60,7 +60,7 @@ watch( } .title-top-content { line-height: 38px; - font-size: 14px; + font-size: 18px; font-weight: bold; display: inline-block; transform: skewX(-13deg); @@ -70,7 +70,7 @@ watch( letter-spacing: 4px; text-shadow: -2px 0 0 1px #add8f1; width: 100%; - padding: 0 36px; + padding: 0 38px; box-sizing: border-box; position: absolute; left: 0; diff --git a/sub-government-screen-service/src/layouts/component/Bottom/index.vue b/sub-government-screen-service/src/layouts/component/Bottom/index.vue index 11f8cf8..109fcd6 100644 --- a/sub-government-screen-service/src/layouts/component/Bottom/index.vue +++ b/sub-government-screen-service/src/layouts/component/Bottom/index.vue @@ -47,8 +47,8 @@ const navlist = ref([ { title: '土地资源', name: 'land' }, { title: '投入品', name: 'inputs' }, { title: '生产经营主体', name: 'entities' }, - { title: '智慧种植监测', name: 'plant' }, - { title: '智慧养殖监测', name: 'breed' }, + // { title: '智慧种植监测', name: 'plant' }, + // { title: '智慧养殖监测', name: 'breed' }, { title: '全流程溯源', name: 'trace' }, { title: '产业预警决策', name: 'early' }, ]); @@ -83,12 +83,13 @@ const itemAct = (name) => { .b-nav-item { display: inline-block; cursor: pointer; - min-width: 132px; + min-width: 180px; height: 42px; text-align: center; line-height: 38px; + background-size: 100% 100%; span { - font-size: 14px; + font-size: 20px; font-weight: bold; display: inline-flex; transform: skewX(-8deg); diff --git a/sub-government-screen-service/src/layouts/index.vue b/sub-government-screen-service/src/layouts/index.vue index b59a745..853954d 100644 --- a/sub-government-screen-service/src/layouts/index.vue +++ b/sub-government-screen-service/src/layouts/index.vue @@ -9,7 +9,7 @@
- +
diff --git a/sub-government-screen-service/src/router/index.js b/sub-government-screen-service/src/router/index.js index 8109994..c887985 100644 --- a/sub-government-screen-service/src/router/index.js +++ b/sub-government-screen-service/src/router/index.js @@ -43,12 +43,14 @@ export const constantRoutes = [ path: '/sub-government-screen-service/inputs', name: 'inputs', component: () => import('@/views/inputs/index.vue'), + meta: { title: '投入品' }, hidden: true, }, { path: '/sub-government-screen-service/entities', name: 'entities', component: () => import('@/views/entities/index.vue'), + meta: { title: '生产经营主体' }, hidden: true, }, { @@ -56,74 +58,31 @@ export const constantRoutes = [ name: 'breed', component: () => import('@/views/breed/index.vue'), hidden: true, + meta: { title: '智慧养殖监测' }, }, { path: '/sub-government-screen-service/plant', name: 'plant', component: () => import('@/views/plant/index.vue'), hidden: true, + meta: { title: '智慧种植监测' }, }, { path: '/sub-government-screen-service/trace', name: 'trace', component: () => import('@/views/trace/index.vue'), + meta: { title: '全流程溯源' }, hidden: true, }, { path: '/sub-government-screen-service/early', name: 'early', component: () => import('@/views/early/index.vue'), + meta: { title: '产业预警决策' }, hidden: true, }, ], }, - // { - // path: '/sub-government-screen-service/home', - // name: 'home', - // component: () => import('@/views/home/index.vue'), - // }, - // { - // path: '/sub-government-screen-service/land', - // name: 'land', - // component: () => import('@/views/land/index.vue'), - // hidden: true, - // }, - // { - // path: '/sub-government-screen-service/inputs', - // name: 'inputs', - // component: () => import('@/views/inputs/index.vue'), - // hidden: true, - // }, - // { - // path: '/sub-government-screen-service/entities', - // name: 'entities', - // component: () => import('@/views/entities/index.vue'), - // hidden: true, - // }, - // { - // path: '/sub-government-screen-service/breed', - // name: 'breed', - // component: () => import('@/views/breed/index.vue'), - // hidden: true, - // }, - // { - // path: '/sub-government-screen-service/plant', - // name: 'plant', - // component: () => import('@/views/plant/index.vue'), - // hidden: true, - // }, - // { - // path: '/sub-government-screen-service/trace', - // name: 'trace', - // component: () => import('@/views/trace/index.vue'), - // hidden: true, - // }, - // { - // path: '/sub-government-screen-service/early', - // name: 'early', - // component: () => import('@/views/early/index.vue'), - // hidden: true, - // }, ]; /** diff --git a/sub-government-screen-service/src/views/breed/index.vue b/sub-government-screen-service/src/views/breed/index.vue index c85c5a5..2ff4677 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 @@