From 01fdb0c07cdf7950990d7fd7674fd7b967247e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E9=B8=BF?= Date: Thu, 22 May 2025 15:12:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=BF=E5=8A=A1=E4=BA=91=E5=9C=9F?= =?UTF-8?q?=E5=9C=B0=E8=B5=84=E6=BA=90=E8=B7=AF=E7=94=B1=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E8=BF=90=E8=90=A5=E4=BA=91=E6=95=B0=E6=8D=AE=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=9C=AC=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/router/modules/resource.js | 28 +++++++++++-------- .../src/views/brand/components/ApplyList.vue | 23 ++++++++++++++- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/sub-government-affairs-service/src/router/modules/resource.js b/sub-government-affairs-service/src/router/modules/resource.js index d4ebf3a..cc07d30 100644 --- a/sub-government-affairs-service/src/router/modules/resource.js +++ b/sub-government-affairs-service/src/router/modules/resource.js @@ -7,30 +7,36 @@ import dictRoutes from './dict'; export default [ { path: '/sub-government-affairs-service/resource', - name: 'resource', + name: 'resourceManagement', component: Layout, redirect: '/sub-government-affairs-service/grid', meta: { title: '土地资源管理', icon: 'icon-test' }, children: [ { - redirect: '/sub-government-affairs-service/grid', + redirect: '/sub-government-affairs-service/add-grid', path: '/sub-government-affairs-service/grid', - component: () => import('@/views/resource/grid/index.vue'), + // component: () => import('@/views/resource/grid/index.vue'), name: 'grid', meta: { title: '网格化管理', icon: 'Memo' }, children: [ { - path: '/sub-government-affairs-service/grid', + path: '/sub-government-affairs-service/add-grid', component: () => import('@/views/resource/grid/index.vue'), - name: 'grid1', + name: 'add', meta: { title: '新增网格', icon: '' }, }, - // { - // path: '/sub-government-affairs-service/grid', - // component: () => import('@/views/resource/grid/index.vue'), - // name: 'grid2', - // meta: { title: '网格化地图', icon: '' }, - // }, + { + path: '/sub-government-affairs-service/add--grid-member', + component: () => import('@/views/resource/grid/AddGridMember.vue'), + name: 'member', + meta: { title: '新增网格员', icon: '' }, + }, + { + path: '/sub-government-affairs-service/grid--management', + component: () => import('@/views/resource/grid/GridManagement.vue'), + name: 'management', + meta: { title: '网格化管理', icon: '' }, + }, ], }, ...annualplanRouters, diff --git a/sub-operation-service/src/views/brand/components/ApplyList.vue b/sub-operation-service/src/views/brand/components/ApplyList.vue index fef228d..ba2b99a 100644 --- a/sub-operation-service/src/views/brand/components/ApplyList.vue +++ b/sub-operation-service/src/views/brand/components/ApplyList.vue @@ -28,13 +28,34 @@ getApplyList().then((res) => { products.value = res.data; }); +const applyData = [ + { id: 1, name: '耿马绿色蔬菜', imageUrl: 'images/brand/11.png' }, + { id: 2, name: '云南高山茶', imageUrl: 'images/brand/12.png' }, + { id: 3, name: '新疆大枣', imageUrl: 'images/brand/13.png' }, + { id: 4, name: '东北大米', imageUrl: 'images/brand/14.png' }, + { id: 5, name: '山东苹果', imageUrl: 'images/brand/15.png' }, + { id: 6, name: '四川泡菜', imageUrl: 'images/brand/16.png' }, + { id: 7, name: '江苏阳澄湖大闸蟹', imageUrl: 'images/brand/11.png' }, + { id: 8, name: '海南椰子', imageUrl: 'images/brand/12.png' }, + { id: 9, name: '广东早茶', imageUrl: 'images/brand/13.png' }, + { id: 10, name: '北京烤鸭', imageUrl: 'images/brand/14.png' }, + { id: 11, name: '西藏青稞酒', imageUrl: 'images/brand/15.png' }, + { id: 12, name: '青海牦牛肉', imageUrl: 'images/brand/16.png' }, +]; + function gotoApplication(id) { router.push(`/sub-operation-service/brand/apply/${id}`); } +// TODO: 对接口需要删除这个方法 +function data() { + products.value = applyData; +} + // 组件挂载时获取数据 onMounted(() => { - getApplyList; + // getApplyList; + data(); }); From 11c56eabe45cffba7f40f09a0cbc88f30fba98e5 Mon Sep 17 00:00:00 2001 From: 13713575202 <1345916905@qq.com> Date: Thu, 22 May 2025 15:37:05 +0800 Subject: [PATCH 2/2] xiabin --- .../components/custom-echart-bar/index.vue | 118 +++++++++--------- .../business/components/businessThere.vue | 7 +- 2 files changed, 66 insertions(+), 59 deletions(-) diff --git a/new-digital-agriculture-screen/src/components/custom-echart-bar/index.vue b/new-digital-agriculture-screen/src/components/custom-echart-bar/index.vue index d1b5e37..38fcc69 100644 --- a/new-digital-agriculture-screen/src/components/custom-echart-bar/index.vue +++ b/new-digital-agriculture-screen/src/components/custom-echart-bar/index.vue @@ -43,34 +43,34 @@ export default { const chartRef = ref(null); const { setOptions, getInstance, startAutoPlay } = useEcharts(chartRef); let option = reactive({ - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow', - label: { - show: true, - backgroundColor: '#333', - }, - }, - }, - legend: { - top: 30, - }, - grid: { - top: 60, - }, - xAxis: { - type: 'category', - data: [], - }, - yAxis: { - type: 'value', - }, - series: [], - isHorizontal: { - type: Boolean, - default: false, - }, + // tooltip: { + // trigger: 'axis', + // axisPointer: { + // type: 'shadow', + // label: { + // show: true, + // backgroundColor: '#333', + // }, + // }, + // }, + // legend: { + // top: 30, + // }, + // grid: { + // top: 60, + // }, + // xAxis: { + // type: 'category', + // data: [], + // }, + // yAxis: { + // type: 'value', + // }, + // series: [], + // isHorizontal: { + // type: Boolean, + // default: false, + // }, }); watchEffect(() => { @@ -78,38 +78,40 @@ export default { }); function initCharts() { - if (props.option) { + if (props.option && props.option.grid.top == '15%') { Object.assign(option, cloneDeep(props.option)); - } - let typeArr = Array.from(new Set(props.chartData.map((item) => item.type))); - let xAxisData = Array.from(new Set(props.chartData.map((item) => item.name))); - let seriesData = []; - typeArr.forEach((type, index) => { - const barStyle = props.option?.barStyle ?? {}; - let obj = { name: type, type: props.type, ...barStyle }; - let data = []; - xAxisData.forEach((x) => { - let dataArr = props.chartData.filter((item) => type === item.type && item.name == x); - if (dataArr && dataArr.length > 0) { - data.push(dataArr[0].value); - } else { - data.push(null); - } - }); - obj['data'] = data; - if (props.option?.color) { - obj.color = props.option?.color[index]; - } - if (props.option.series && props.option.series.length > 0) { - obj.stack = props.option.series[index].stack ? props.option.series[index].stack : ''; - } - seriesData.push(obj); - }); - option.series = props.isSeries && option.series.length > 0 ? option.series : seriesData; - if (props.isHorizontal) { - option.yAxis.data = xAxisData; } else { - option.xAxis.data = []; + Object.assign(option, cloneDeep(props.option)); + let typeArr = Array.from(new Set(props.chartData.map((item) => item.type))); + let xAxisData = Array.from(new Set(props.chartData.map((item) => item.name))); + let seriesData = []; + typeArr.forEach((type, index) => { + const barStyle = props.option?.barStyle ?? {}; + let obj = { name: type, type: props.type, ...barStyle }; + let data = []; + xAxisData.forEach((x) => { + let dataArr = props.chartData.filter((item) => type === item.type && item.name == x); + if (dataArr && dataArr.length > 0) { + data.push(dataArr[0].value); + } else { + data.push(null); + } + }); + obj['data'] = data; + if (props.option?.color) { + obj.color = props.option?.color[index]; + } + if (props.option.series && props.option.series.length > 0) { + obj.stack = props.option.series[index].stack ? props.option.series[index].stack : ''; + } + seriesData.push(obj); + }); + option.series = props.isSeries && option.series.length > 0 ? option.series : seriesData; + if (props.isHorizontal) { + option.yAxis.data = xAxisData; + } else { + option.xAxis.data = []; + } } console.log(option); setOptions(option); diff --git a/new-digital-agriculture-screen/src/views/business/components/businessThere.vue b/new-digital-agriculture-screen/src/views/business/components/businessThere.vue index 0c14aee..1fcb058 100644 --- a/new-digital-agriculture-screen/src/views/business/components/businessThere.vue +++ b/new-digital-agriculture-screen/src/views/business/components/businessThere.vue @@ -72,6 +72,11 @@ const series = types.map((type, idx) => { borderRadius: 4, formatter: '{@value}万亩', z: 100, + normal: { + show: true, + position: 'inside', + formatter: '{c}%', + }, }, emphasis: { focus: 'series', @@ -112,7 +117,7 @@ const state = reactive({ }, yAxis: { type: 'category', // 分类轴(横向条形图的标签) - data: towns, // 分类数据放在 yAxis + data: [120, 230, 152, 136, 145, 17], // 分类数据放在 yAxis axisTick: { show: false }, // 隐藏刻度线 }, color: colors,