Compare commits

...

80 Commits

Author SHA1 Message Date
a85f0d61b4 6/5第二版 2025-06-05 18:24:42 +08:00
d926dae0cb remove 2025-06-05 18:13:01 +08:00
4f494ae406 6/5日发布 2025-06-05 18:02:20 +08:00
6dcf4a846e title修改 2025-05-29 10:31:29 +08:00
57b8751bc2 fix(面包屑):政务服务改为农业产业政务平台 2025-05-29 10:15:38 +08:00
ed9593b049 fix(AddGrid) 2025-05-27 17:33:03 +08:00
4a49e3fa2e 溯源 2025-05-27 14:33:48 +08:00
53cdca5961 Merge remote-tracking branch 'origin/dev' into dev 2025-05-27 11:59:06 +08:00
f772d65c03 模拟农资交易部分数据 2025-05-27 11:58:55 +08:00
0bcd46de7b Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-27 09:50:02 +08:00
7be265d84f 政务服务 2025-05-27 09:49:55 +08:00
d95b421ff1 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-27 09:40:22 +08:00
20e36a0f5a xiabin 2025-05-27 09:40:19 +08:00
1cc5f6bb0a Merge remote-tracking branch 'origin/dev' into dev 2025-05-27 09:39:31 +08:00
f037010515 采购商服务样式覆盖问题 2025-05-27 09:39:23 +08:00
c0a4e5ba42 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-27 09:32:14 +08:00
7c40a85242 xiabin 2025-05-27 09:32:12 +08:00
e8e62576e1 Merge remote-tracking branch 'origin/dev' into dev 2025-05-27 09:23:39 +08:00
11cd6a5e6c 主页高度问题 2025-05-27 09:23:30 +08:00
6f17345c1a Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-26 17:54:35 +08:00
4075b1bf83 xiabin 2025-05-26 17:54:32 +08:00
5d9936e734 土地巡查取消 2025-05-26 17:52:54 +08:00
9e1580d8ad Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-26 17:44:49 +08:00
01c7faac9d 修改 2025-05-26 17:44:41 +08:00
1c1b1369b3 Merge remote-tracking branch 'origin/dev' into dev 2025-05-26 17:10:16 +08:00
25a555d6b1 智慧种植页面组件修改 、电商页面修改、公共品牌不显示问题。 2025-05-26 17:10:06 +08:00
9f58884a5b Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-26 16:10:55 +08:00
ffed524cd7 xiabin 2025-05-26 16:10:52 +08:00
dc54d40853 政务大屏第二次修改 2025-05-26 10:18:05 +08:00
2090205686@qq.com
254cf8ca01 产出品管理和土地资源部分调整 2025-05-23 17:36:09 +08:00
2090205686@qq.com
bdb5330e63 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-23 17:04:12 +08:00
2090205686@qq.com
c2d9778468 政务云产出品管理,生成经营主体,农产品溯源数据大屏调整 2025-05-23 17:04:04 +08:00
088c3bdd65 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-23 17:03:53 +08:00
473e09ee29 合作社修改 2025-05-23 17:03:49 +08:00
602e72f2bf Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-23 16:58:59 +08:00
761ae3eb6f xiabin 2025-05-23 16:58:57 +08:00
61be13b963 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-23 16:42:59 +08:00
74aa210c5f 政务大屏数据处理。 2025-05-23 16:42:43 +08:00
185a09f152 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-23 16:40:42 +08:00
1c56ca1d0f 土地资源管理 2025-05-23 16:40:36 +08:00
c6b5b7b94b Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-23 14:33:06 +08:00
1502ba1d63 夏滨修改数据为真实数据 2025-05-23 14:33:04 +08:00
beb22c91f9 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-23 13:08:54 +08:00
cf7762c281 三级菜单效果修改 2025-05-23 13:02:15 +08:00
92cf909ee6 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-22 16:14:04 +08:00
5bdde25ceb 电商平台开发页面 2025-05-22 16:11:32 +08:00
2090205686@qq.com
304be8b129 政务云智慧大屏-部分细节调整 2025-05-22 16:10:22 +08:00
07dbd6398d xiabin 2025-05-22 15:47:44 +08:00
2090205686@qq.com
33956d49cb 冲突合并 2025-05-22 15:43:17 +08:00
2090205686@qq.com
f62526a22b 产出品管理页面调整 2025-05-22 15:40:33 +08:00
29db0c4024 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-22 15:37:07 +08:00
11c56eabe4 xiabin 2025-05-22 15:37:05 +08:00
a8aef9a012 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-22 15:12:45 +08:00
01fdb0c07c 政务云土地资源路由修改,运营云数据使用本地 2025-05-22 15:12:38 +08:00
2090205686@qq.com
79ac695e43 合并冲突处理 2025-05-22 14:59:20 +08:00
2090205686@qq.com
f609ab304c 生产经营主体页面调整 2025-05-22 14:54:50 +08:00
9eca7214bb Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-22 14:43:59 +08:00
fc6d3a5cd4 夏滨修改 农产品溯源,溯源列表 2025-05-22 14:43:57 +08:00
9f8508398d Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-22 13:54:39 +08:00
35554268b9 运营云PC-公共品牌管理-新增品牌制度管理 2025-05-22 13:54:28 +08:00
93f13af072 政务大屏产出品管理 大屏修改优化 2025-05-22 11:17:06 +08:00
1d983eba78 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-22 10:39:13 +08:00
85285d80c1 公共品牌新增 2025-05-22 10:38:36 +08:00
b653e6a28b 隐藏土地交易 2025-05-22 10:08:35 +08:00
efa30129c5 大屏土地资源修改 2025-05-22 09:09:35 +08:00
2090205686@qq.com
1c338e34a6 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-21 17:21:07 +08:00
2090205686@qq.com
b5d6451b39 环境监测页面添加拟动态数据 2025-05-21 17:21:03 +08:00
24f4a42ca4 修改菜单BUG 2025-05-21 17:13:19 +08:00
78255cea06 随机数据生成 田间监测 2025-05-21 15:36:06 +08:00
af11fa876b 页面回滚病虫害页面 2025-05-21 14:51:24 +08:00
2090205686@qq.com
05d99fb7e0 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-21 14:33:39 +08:00
2090205686@qq.com
9e193feb0e 智能灌溉和智能浸种开发完成,含右侧展示组件,原文件结构调整,路由调整 2025-05-21 14:33:34 +08:00
a60301fba5 模拟数据变动 2025-05-21 14:31:53 +08:00
2da225162e Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-21 13:45:08 +08:00
dd1cd7cf03 运营云公共品牌 2025-05-21 13:44:54 +08:00
2090205686@qq.com
f72e2a2f14 Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-21 10:46:54 +08:00
2090205686@qq.com
0e2a09d77b 页面文件夹调整,路由调整 2025-05-21 10:46:48 +08:00
15637ac3ee Merge branch 'dev' of http://47.109.205.240:3000/Web/daimp-front into dev 2025-05-21 10:16:49 +08:00
21661bf0c9 1 2025-05-21 10:16:21 +08:00
7f86f02178 智能配肥 2025-05-21 10:14:25 +08:00
215 changed files with 8135 additions and 3328 deletions

View File

@ -11,6 +11,10 @@ VITE_APP_SUB_GSS = '//localhost:9529/sub-government-screen-service/'
VITE_APP_SUB_GSR = '//localhost:9530/new-digital-agriculture-screen/'
# 接口
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
VITE_APP_UPLOAD_API = '/uploadApis'
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080'
# 阿里云接口地址
VITE_APP_BASE_URL = 'http://47.109.205.240:8080'
VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
# 内网接口地址
# VITE_APP_BASE_URL = 'http://192.168.18.9:8080'
# VITE_APP_UPLOAD_URL = 'http://192.168.18.9:9300'

View File

@ -18,7 +18,7 @@ export const leftApps = [
icon: 'images/platform/icon-admin.png',
},
{
name: 'sub-app',
name: 'sub-app2',
entry: VITE_APP_SUB_GAS,
activeRule: '/sub-app',
title: 'APP',
@ -49,7 +49,7 @@ export const rightApps = [
icon: 'images/platform/icon-admin.png',
},
{
name: 'sub-app',
name: 'sub-app1',
entry: VITE_APP_SUB_GAS,
activeRule: '/sub-app',
title: 'APP',

View File

@ -36,7 +36,13 @@ import { getAssetsFile } from '@/utils';
const gotoPage = (row) => {
// window.history.pushState({}, row.name, row.activeRule);
window.location.href = row.activeRule;
if (row.name == 'sub-app1') {
window.location.href = 'https://www.pgyer.com/MXd3uUrO';
} else if (row.name == 'sub-app2') {
window.location.href = 'https://www.pgyer.com/4SVVtpob';
} else {
window.location.href = row.activeRule;
}
};
</script>
<style lang="scss" scoped>

View File

@ -16,7 +16,7 @@
</template>
</el-input>
</el-form-item>
<el-form-item v-if="captchaEnabled" prop="code">
<!-- <el-form-item v-if="captchaEnabled" prop="code">
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter="handleLogin">
<template #prefix>
<svg-icon icon-class="validCode" class="el-input__icon input-icon" />
@ -25,7 +25,7 @@
<div class="login-code">
<img :src="codeUrl" class="login-code-img" @click="getCode" />
</div>
</el-form-item>
</el-form-item> -->
<el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px">记住密码</el-checkbox>
<el-form-item style="width: 100%">
<el-button :loading="loading" size="large" type="primary" style="width: 100%" @click.prevent="handleLogin">
@ -61,13 +61,13 @@ export default {
username: 'admin',
password: 'admin123',
rememberMe: false,
code: '',
code: '1',
uuid: '',
},
loginRules: {
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
code: [{ required: true, trigger: 'change', message: '请输入验证码' }],
// code: [{ required: true, trigger: 'change', message: '' }],
},
loading: false,
//

View File

@ -31,6 +31,14 @@ export default defineConfig(({ command, mode }) => {
'Access-Control-Allow-Origin': '*',
},
proxy: {
// // 仅 Brand 模块走子应用 DevServer
// '/api/brand': {
// target: 'http://localhost:9526',
// changeOrigin: true,
// // 如果想去掉 /api/brand 前缀(比如子应用实际监听的是 /brand/...
// // 可以加一个 rewrite
// // rewrite: path => path.replace(/^\/api\/brand/, '/brand'),
// },
[VITE_APP_BASE_API]: {
target: VITE_APP_BASE_URL,
changeOrigin: true,

View File

@ -12,7 +12,6 @@ declare module 'vue' {
'CenterMap copy': typeof import('./src/components/centerMap copy.vue')['default']
CodeDialog: typeof import('./src/components/code-dialog/index.vue')['default']
Components: typeof import('./src/components/index.js')['default']
copy: typeof import('./src/components/centerMap copy.vue')['default']
CurrentTime: typeof import('./src/components/currentTime.vue')['default']
CustomBack: typeof import('./src/components/customBack.vue')['default']
CustomCarouselPicture: typeof import('./src/components/custom-carousel-picture/index.vue')['default']

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

View File

@ -2,8 +2,8 @@
<div ref="chartRef" :style="{ height, width }"></div>
</template>
<script>
import { ref, reactive, watchEffect } from 'vue';
import { cloneDeep } from 'lodash';
import { ref, reactive, watchEffect, toRefs } from 'vue';
import { merge, cloneDeep } from 'lodash';
import { useEcharts } from '@/hooks/useEcharts';
export default {
name: 'CustomEchartBar',
@ -33,36 +33,50 @@ export default {
type: Boolean,
default: false,
},
//
showMarkPoint: {
type: Boolean,
default: false,
},
//
isHorizontal: {
type: Boolean,
default: false,
},
},
emits: ['click'],
setup(props, { emit }) {
const chartRef = ref(null);
const { setOptions, getInstance, startAutoPlay } = useEcharts(chartRef);
const 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: [],
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,
// },
});
watchEffect(() => {
@ -70,37 +84,49 @@ 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);
} else {
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);
});
obj['data'] = data;
if (props.option?.color) {
obj.color = props.option?.color[index];
option.series = props.isSeries && option.series.length > 0 ? option.series : seriesData;
if (props.isHorizontal) {
option.yAxis.data = xAxisData;
option.xAxis.data = [];
} else {
option.xAxis.data = xAxisData;
}
seriesData.push(obj);
});
option.series = props.isSeries && option.series.length > 0 ? option.series : seriesData;
option.xAxis.data = xAxisData;
}
console.log(option);
setOptions(option);
startAutoPlay({
interval: 2000,
seriesIndex: 0,
showTooltip: true,
showMarkPoint: props.showMarkPoint,
});
getInstance()?.off('click', onClick);
getInstance()?.on('click', onClick);

View File

@ -55,6 +55,7 @@ const props = defineProps({
default() {
return [
// { label: '', value: '/new-digital-agriculture-screen/v2/home' },
{ label: '首页', value: 'home' },
{ label: '土地资源', value: '/new-digital-agriculture-screen/v2/land' },
{ label: '投入品监管', value: '/new-digital-agriculture-screen/v2/inputs' },
{ label: '产出品管理', value: '/new-digital-agriculture-screen/v2/entities' },
@ -120,6 +121,10 @@ function handleTitleBtn(t = -1) {
}
}
function handleTitleClick(val) {
if (val === 'home') {
window.location.href = 'http://47.109.205.240/platform';
return;
}
activeTitle.value = val;
// emit('changeTitle', val);
router.push({ path: val });

View File

@ -11,8 +11,6 @@
.custom-tooltip-container{
border-radius: 8px !important;
padding: 6px 16px 6px 8px !important;
background-color: rgba(0,0,0,0.7) !important;
backdrop-filter: blur(8px) !important;
& span{
width: 8px !important;

View File

@ -23,7 +23,7 @@ const state = reactive({
type: 'row',
rowNum: 6,
isAnimation: true,
waitTime: 12,
waitTime: 2,
unit: '万元',
sort: true,
height: 12,

View File

@ -1,10 +1,10 @@
<template>
<div class="business">
<div class="business-left">
<div class="business-left" style="padding-left: 30px">
<custom-echart-water-droplet width="100%" height="100%" :option="state.option" />
<div class="business-title">件齐全</div>
<div class="business-title">照合格</div>
</div>
<div class="business-right">
<div class="business-right" style="padding-top: 20px">
<div class="business-title">临期预警</div>
<ul class="business-info">
<li class="success">
@ -13,18 +13,18 @@
</li>
<li class="warning">
<b>临期</b>
<span>5</span>
<span>25</span>
</li>
<li class="danger">
<b>已过</b>
<span>0</span>
<b></b>
<span>7</span>
</li>
</ul>
</div>
</div>
</template>
<script setup>
import { reactive, ref, watch } from 'vue';
import { onMounted, reactive, ref, watch } from 'vue';
import { isEmpty } from '@/utils';
const props = defineProps({
@ -142,6 +142,9 @@ watch(
immediate: true,
}
);
onMounted(() => {
console.log(props.data);
});
</script>
<style lang="scss" scoped>
.business {

View File

@ -100,7 +100,7 @@ let testInfo = reactive({});
let currentRegion = ref(null);
const doMapclick = (data) => {
currentRegion.value = data;
if (data.name == '永星食品加工厂') {
if (data.name == '永星食品合作社') {
testInfo = {
addr: '云南省临沧市耿马傣族佤族自治县孟定镇101号',
user: '张强',
@ -111,13 +111,13 @@ const doMapclick = (data) => {
imglist: ['images/business/b1-1.png', 'images/business/b1-2.png', 'images/business/b1-3.png'],
};
}
if (data.name == '欣欣种源企业') {
if (data.name == '耿马原生茶叶种植专业合作社') {
testInfo = {
addr: '云南省临沧市耿马傣族佤族自治耿马镇102号',
user: '李',
addr: '云南省临沧市耿马傣族佤族自治',
user: '李伟荣',
tel: '13713575206',
capital: '600万',
time: '2020年10月1日',
capital: '400万',
time: '2013年08月26日',
credit: 'AA',
imglist: ['images/business/b2-1.png', 'images/business/b1-2.png', 'images/business/b1-2.png'],
};
@ -127,7 +127,7 @@ const doMapclick = (data) => {
let markerData = reactive([
//
{
name: '永星食品加工厂',
name: '永星食品合作社',
value: [99.081993, 23.524045, 150], // , ,
symbol: 'image://' + getAssetsFile('images/vsualized/marker.png'),
itemStyle: {
@ -135,7 +135,7 @@ let markerData = reactive([
},
},
{
name: '欣欣种源企业',
name: '耿马原生茶叶种植专业合作社',
value: [99.402267, 23.538889, 150], // , ,
symbol: 'image://' + getAssetsFile('images/vsualized/marker.png'),
itemStyle: {

View File

@ -194,7 +194,8 @@ function getPie3D(pieData, internalDiameterRatio) {
formatter: (name) => {
if (state.data.length) {
const item = state.data.filter((item) => item.name === name)[0];
return `${name} ${item.pieData.value}${state.option.legendSuffix ?? ''}`;
console.log(item);
return `${name} ${item.pieData.value}${state.option.legendSuffix ?? ''}` + `\n` + `${item.pieData.quantity}`;
}
},
},
@ -239,7 +240,7 @@ function getPie3D(pieData, internalDiameterRatio) {
width:10px;
height:10px;
background-color:${params.color};"></span>
${option.series[params.seriesIndex].pieData.value}
${option.series[params.seriesIndex].pieData.quantity}
</span>
`;
}
@ -291,6 +292,7 @@ watch(
return {
name: row.name,
value: row.value,
quantity: row.quantity,
};
});
initData(pieData);

View File

@ -1,9 +1,9 @@
<template>
<custom-echart-line :chart-data="state.data" height="100%" :option="state.option" />
<custom-echart-bar :chart-data="state.data" height="100%" :option="state.option" :is-horizontal="true" :show-mark-point="false" />
</template>
<script setup>
import { reactive, watch } from 'vue';
import { isEmpty } from '@/utils';
import * as echarts from 'echarts';
const props = defineProps({
data: {
@ -11,69 +11,145 @@ const props = defineProps({
default: () => [],
},
});
const rawData = [
{ name: '勐撒镇', type: '农户', value: 164 },
{ name: '勐撒镇', type: '农企/合作社', value: 152 },
{ name: '勐永镇', type: '农户', value: 179 },
{ name: '勐永镇', type: '农企/合作社', value: 243 },
{ name: '孟定镇', type: '农户', value: 189 },
{ name: '孟定镇', type: '农企/合作社', value: 254 },
{ name: '大兴乡', type: '农户', value: 243 },
{ name: '大兴乡', type: '农企/合作社', value: 167 },
{ name: '耿马镇', type: '农户', value: 265 },
{ name: '耿马镇', type: '农企/合作社', value: 213 },
];
const towns = ['勐撒镇', '勐永镇', '孟定镇', '大兴乡', '耿马镇'];
const types = ['农户', '农企/合作社'];
const colors = [
//
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{ offset: 0, color: 'rgba(53,208,192,0.2)' },
{ offset: 1, color: '#35d0c0' },
]),
// 绿
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{ offset: 0, color: 'rgba(21,235,144,0.2)' }, //
{ offset: 1, color: '#15EB90' }, //
]),
//
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{ offset: 0, color: '#F3F70F' },
{ offset: 1, color: '#D4D70A' },
]),
];
const series = types.map((type, idx) => {
return {
name: type,
type: 'bar',
barWidth: 16,
stack: 'total',
barGap: '0%', //
itemStyle: {
color: colors[idx],
barBorderRadius: 0,
shadowColor: colors[idx],
// shadowBlur: 8,
shadowOffsetY: 0,
},
label: {
//
show: true,
position: 'inside',
color: '#000', //
backgroundColor: 'rgba(255,255,255,0.7)', //
padding: [2, 4],
borderRadius: 4,
z: 100,
normal: {
show: true,
position: 'inside',
formatter: '{c}万亩',
},
},
silent: true, //
animation: false, //
emphasis: {
focus: 'series',
disabled: true, //
},
z: 100 - idx,
data: towns.map((town) => {
const found = rawData.find((d) => d.name === town && d.type === type);
return found ? found.value : 0;
}),
};
});
console.log(series);
const state = reactive({
data: rawData,
option: {
color: ['#35D0C0'],
legend: {
data: types,
textStyle: {
color: '#fff',
},
selectedMode: false, //
inactiveColor: '#fff', //
},
grid: {
left: '5%',
right: '5%',
top: '15%',
left: '3%',
right: '10%',
bottom: '5%',
top: '10%',
containLabel: true,
},
xAxis: {
type: 'value', //
axisLine: { lineStyle: { opacity: 1, width: 0 } },
axisTick: { show: false },
axisLabel: {
margin: 8,
formatter: (value) => `${value}万亩`, // X
},
},
yAxis: {
type: 'category', //
data: towns, // yAxis
axisTick: { show: false }, // 线
},
color: colors,
series,
tooltip: {
show: false,
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
// tooltip
className: 'custom-tooltip-container', //
backgroundColor: 'rgba(0,0,0,0.5)',
backgroundColor: 'rgba(0,0,0,0);',
borderColor: '#35d0c0',
formatter: (data) => {
const params = data[0];
let str = `<div class="custom-echarts-tips">
<span>${params.name}</span><br/>
<span>${params.marker} ${params.data} 万亩</span>
</div>`;
return str;
},
},
xAxis: {
type: 'category',
// name: '',
axisTick: {
show: false,
alignWithLabel: false,
interval: 'auto',
inside: false,
length: 5,
lineStyle: {
type: 'solid',
width: 1,
color: 'rgba(28, 158, 222, 1)',
},
},
},
yAxis: {
type: 'value',
// name: '',
borderRadius: 8,
formatter: (params) => `
<div style="font-weight:700;margin-bottom:5px;color:#fff;font-size: 16px;">${params[0].name}</div>
${params
.map(
(p) => `
<div style="display:flex;align-items:center;margin:3px 0;color:#fff">
<span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:${p.color};margin-right:6px;color:#fff"></span>
${p.seriesName}: <span style="font-weight:bold;margin-left:5px;color:#fff">${p.value} </span>
</div>
`
)
.join('')}
`,
extraCssText: 'backdrop-filter: blur(8px);',
},
},
data: [],
});
watch(
() => props.data,
(val) => {
if (!isEmpty(val)) {
state.data = val;
}
},
{
deep: true,
immediate: true,
}
);
</script>

View File

@ -1,5 +1,5 @@
<template>
<custom-echart-bar :chart-data="state.data" height="100%" :option="state.option" />
<custom-echart-bar :chart-data="state.data" height="100%" :option="state.option" :show-mark-point="true" />
</template>
<script setup>
import { reactive, watch } from 'vue';
@ -26,6 +26,7 @@ const state = reactive({
containLabel: true,
},
tooltip: {
show: true,
trigger: 'axis',
axisPointer: {
type: 'shadow',
@ -38,7 +39,7 @@ const state = reactive({
const params = data[0];
let str = `<div class="custom-echarts-tips">
<span>${params.name}</span><br/>
<span>${params.marker} ${params.data} </span>
<span>${params.marker} ${params.data} </span>
</div>`;
return str;
},
@ -56,7 +57,7 @@ const state = reactive({
y2: 1,
colorStops: [
{ offset: 0, color: '#35D0C0' },
{ offset: 1, color: '#35D0C0' },
{ offset: 1, color: 'rgba(53,208,192,0.2)' },
],
global: false,
},
@ -106,7 +107,6 @@ const loadData = async (code = '') => {
{ name: '贺派乡', value: 62 },
{ name: '四排山乡', value: 84 },
{ name: '芒洪乡', value: 82 },
{ name: '大兴乡', value: 64 },
];
};
@ -123,16 +123,16 @@ watch(
}
);
watch(
() => props.query,
(val) => {
if (!isEmpty(val)) {
loadData(val);
}
},
{
deep: true,
immediate: true,
}
);
// watch(
// () => props.query,
// (val) => {
// if (!isEmpty(val)) {
// loadData(val);
// }
// },
// {
// deep: true,
// immediate: true,
// }
// );
</script>

View File

@ -12,19 +12,16 @@
<customBack
top-title="生产经营主体数量"
:top-postion="'left'"
:down-title="'农资企业'"
:down-title="'农企/合作社'"
:label-field="'label'"
:value-field="'value'"
:down-width="''"
:options="[
{ value: 1, label: '农企/合作社' },
{ value: 2, label: '农资企业' },
{ value: 3, label: '种源企业' },
{ value: 4, label: '生产加工企业' },
{ value: 5, label: '农户' },
{ value: 2, label: '农户' },
]"
:is-down="true"
@command="handleCommand"
@command="handleCommand($event)"
>
<template #back>
<businessTwo :data="state.data.two" :query="state.queryCode" />
@ -32,7 +29,7 @@
</customBack>
</div>
<div class="left-charts-item">
<customBack top-title="历年用地规模曲线" :top-postion="'left'">
<customBack top-title="生产经营主体用地面积" :top-postion="'left'">
<template #back>
<businessThere :data="state.data.there" />
</template>
@ -44,7 +41,7 @@
</el-col>
<el-col :span="6" class="right-charts">
<div class="right-charts-item">
<customBack top-title="状态看板" :top-postion="'right'">
<customBack top-title="状态看板" :top-postion="'right'">
<template #back>
<businessFour :data="state.data.four" />
</template>
@ -100,34 +97,34 @@ const loadData = async () => {
await sleep(500);
state.data = {
one: [
{ value: 13.8, name: '农企/合作社' },
{ value: 23.8, name: '农资企业' },
{ value: 24.1, name: '种源企业' },
{ value: 29.8, name: '生产加工企业' },
{ value: 8.5, name: '农户' },
{ value: 7.14, name: '农企/合作社', quantity: 152 },
// { value: 23.8, name: '' },
// { value: 24.1, name: '' },
// { value: 29.8, name: '' },
{ value: 64.7, name: '农户', quantity: 1376 },
],
two: [
{ name: '耿马镇', value: 870 },
{ name: '勐撒镇', value: 603 },
{ name: '勐永镇', value: 854 },
{ name: '孟定镇', value: 635 },
{ name: '勐简乡', value: 795 },
{ name: '贺派乡', value: 662 },
{ name: '四排山乡', value: 584 },
{ name: '芒洪乡', value: 682 },
{ name: '耿马镇', value: 50 },
{ name: '勐撒镇', value: 20 },
{ name: '勐永镇', value: 54 },
{ name: '孟定镇', value: 35 },
{ name: '勐简乡', value: 45 },
{ name: '贺派乡', value: 52 },
{ name: '四排山乡', value: 34 },
{ name: '芒洪乡', value: 52 },
],
there: [
{ value: 66, name: '2021' },
{ value: 100, name: '2022' },
{ value: 50, name: '2023' },
{ value: 150, name: '2024' },
{ value: 80, name: '2025' },
{ name: '耿马镇', value: 870, value2: 455 },
{ name: '勐撒镇', value: 603, value2: 555 },
{ name: '勐永镇', value: 854, value2: 322 },
{ name: '孟定镇', value: 635, value2: 298 },
{ name: '大兴乡', value: 795, value2: 382 },
],
four: {
percent: 0.3998,
percent: 0.825,
success: 253,
warning: 5,
danger: 0,
warning: 25,
danger: 7,
},
five: [
{ name: '耿马镇', value: 87.84 },
@ -141,26 +138,8 @@ const loadData = async () => {
{ name: '大兴乡', value: 66.34 },
],
six: [
{
name: '农企/合作社',
value: 25,
},
{
name: '农资企业',
value: 40,
},
{
name: '种源企业',
value: 24,
},
{
name: '生产加工企业',
value: 32,
},
{
name: '农户',
value: 32,
},
{ value: 25, name: '农企/合作社' },
{ value: 66, name: '农户' },
],
};
state.loading = false;
@ -169,7 +148,32 @@ const loadData = async () => {
loadData();
const handleCommand = (data) => {
console.log(data);
state.queryCode = data.value;
// id
if (data.value == 1) {
state.data.two = [
{ name: '耿马镇', value: 50 },
{ name: '勐撒镇', value: 20 },
{ name: '勐永镇', value: 54 },
{ name: '孟定镇', value: 35 },
{ name: '勐简乡', value: 45 },
{ name: '贺派乡', value: 52 },
{ name: '四排山乡', value: 34 },
{ name: '芒洪乡', value: 52 },
];
} else if (data.value == 2) {
state.data.two = [
{ name: '耿马镇', value: 870 },
{ name: '勐撒镇', value: 603 },
{ name: '勐永镇', value: 854 },
{ name: '孟定镇', value: 635 },
{ name: '勐简乡', value: 795 },
{ name: '贺派乡', value: 662 },
{ name: '四排山乡', value: 584 },
{ name: '芒洪乡', value: 682 },
];
}
};
</script>
<style lang="scss" scoped>

View File

@ -18,67 +18,49 @@
<script setup>
import { reactive, ref } from 'vue';
import tomatoImg from '@/assets/images/entities/tomatoImg.png';
import a from '@/assets/images/entities/1.jpg';
import b from '@/assets/images/entities/2.jpg';
import c from '@/assets/images/entities/3.jpg';
import d from '@/assets/images/entities/4.jpg';
import e from '@/assets/images/entities/5.jpg';
import f from '@/assets/images/entities/6.jpg';
import g from '@/assets/images/entities/7.jpg';
import h from '@/assets/images/entities/8.png';
import a from '@/assets/images/entities/1.png';
import b from '@/assets/images/entities/2.png';
import c from '@/assets/images/entities/3.png';
import d from '@/assets/images/entities/4.png';
import e from '@/assets/images/entities/5.png';
const list = ref([
{
name: '西红柿',
price: '2.5元/公斤',
price: '1.35元/公斤',
img: tomatoImg,
},
{
name: '核桃',
price: '3.5元/公斤',
name: '南瓜',
price: '2.45元/公斤',
img: a,
},
{
name: '玉米',
price: '4.5元/公斤',
name: '彩椒',
price: '2.22元/公斤',
img: b,
},
{
name: '黄豆',
price: '5.5元/公斤',
name: '甘蔗',
price: '0.84元/公斤',
img: c,
},
{
name: '韭菜',
price: '34.5元/公斤',
name: '石斛',
price: '56.24元/公斤',
img: d,
},
{
name: '辣椒',
price: '55.5元/公斤',
name: '土豆',
price: '0.76元/公斤',
img: e,
},
{
name: '豌豆',
price: '222.5元/公斤',
img: f,
},
{
name: '香蕉',
price: '32.5元/公斤',
img: g,
},
{
name: '青花',
price: '2.7元/公斤',
img: h,
},
]);
const current = reactive({
index: 0,
length: list.value.length - 1,
info: {
name: '西红柿',
price: '2.5元/公斤',
price: '1.35元/公斤',
img: tomatoImg,
},
});

View File

@ -10,22 +10,22 @@ const chartRef = ref(null);
// #region
const data = ref([
{
name: ' 企业',
name: '农企/合作社',
value: 10.8,
itemStyle: { color: '#5b7bc7', opacity: 0.8 },
},
// {
// name: ' ',
// value: 18.4,
// itemStyle: { color: '#8ed0f3', opacity: 0.8 },
// },
// {
// name: ' ',
// value: 14.3,
// itemStyle: { color: '#65be97', opacity: 0.8 },
// },
{
name: ' 合作社',
value: 18.4,
itemStyle: { color: '#8ed0f3', opacity: 0.8 },
},
{
name: ' 村集体',
value: 14.3,
itemStyle: { color: '#65be97', opacity: 0.8 },
},
{
name: ' 个体',
name: '农户',
value: 23.7,
itemStyle: { color: '#f0c94d', opacity: 0.8 },
},

View File

@ -23,7 +23,7 @@ import { ref, reactive } from 'vue';
const unit = ref('家');
const list = reactive([
{ title: '年总产值', value: 3.49, color: '#01FEFD', unit: '亿元' },
{ title: '年总产值', value: 3.49, color: '#01FEFD', unit: '元' },
{ title: '年人均收入', value: 6.98, color: '#FEF906', unit: '万元' },
]);

View File

@ -38,12 +38,10 @@ const state = reactive({
backgroundColor: 'rgba(0,0,0,0.5)',
borderColor: '#35d0c0',
formatter: (data) => {
console.log('data', data);
const params = data[0];
let str = `<div class="custom-echarts-tips">
<span>${params.name}</span><br/>
<span>${params.marker} ${params.data} 万吨</span><br />
<span>${data[1].marker} ${data[1].data} 万吨</span>
</div>`;
return str;
},
@ -145,7 +143,7 @@ const state = reactive({
fontSize: 16,
color: '#fff',
},
data: ['总产量(吨)', '平均产量(吨)'],
data: ['总产量(吨)'],
selectedMode: false,
},
series: [
@ -241,16 +239,16 @@ watch(
}
);
watch(
() => props.query,
(val) => {
if (!isEmpty(val)) {
loadData(val);
}
},
{
deep: true,
immediate: true,
}
);
// watch(
// () => props.query,
// (val) => {
// if (!isEmpty(val)) {
// loadData(val);
// }
// },
// {
// deep: true,
// immediate: true,
// }
// );
</script>

View File

@ -9,29 +9,24 @@ import { reactive, ref } from 'vue';
// #region
const dataList = ref([
{
name: '烟草',
value: 60.8,
money: 100,
name: '蔬菜',
value: 1290.76,
},
{
name: '甘蔗',
value: 44.4,
money: 88,
value: 9333.5,
},
{
name: '核桃',
value: 24.3,
money: 92,
name: '石斛',
value: 1366.2,
},
{
name: '蔬菜',
value: 32.7,
money: 56,
name: '茶叶',
value: 2698.7,
},
{
name: '其他',
value: 32.9,
money: 18,
value: 269.9,
},
]);
@ -39,7 +34,8 @@ const option = reactive({
k: 0.3,
opacity: 1,
itemGap: 0,
autoItemHeight: 2,
autoItemHeight: 0.01,
legendSuffix: ' 万元',
grid3D: {
show: false,
boxHeight: 4, //

View File

@ -0,0 +1,262 @@
<template>
<custom-echart-bar :chart-data="state.data" height="100%" :option="state.option" />
</template>
<script setup>
import { reactive, watch } from 'vue';
import { isEmpty } from '@/utils';
import { get } from 'lodash';
const props = defineProps({
data: {
type: Array,
default: () => [],
},
query: {
type: String,
default: '',
},
});
let titles = reactive([]);
let values = reactive([]);
const getValue = (dataList) => {
let arr = [];
for (let i = 0; i < dataList.length; i++) {
arr.push(dataList[i].value);
}
return arr;
};
const getName = (dataList) => {
let arr = [];
for (let i = 0; i < dataList.length; i++) {
arr.push(dataList[i].name);
}
return arr;
};
let max = reactive([]);
let maxData = reactive([]);
const getMaxData = (dataList) => {
return dataList.map((item, index) => {
return {
value: [max, index],
name: titles[index],
};
});
};
const state = reactive({
data: [],
option: {
grid: {
left: '5%',
right: '5%',
bottom: '5%',
top: '10%',
containLabel: true,
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
backgroundColor: 'rgba(0,0,0,0.6);',
borderColor: '#35d0c0',
borderRadius: 8,
formatter: (data) => {
const params = data[0];
let str = `<div class="custom-echarts-tips" >
<span>${params.name}</span><br/>
<span>${params.marker} ${params.data} 万元</span>
</div>`;
return str;
},
extraCssText: 'backdrop-filter: blur(8px);',
},
barStyle: {
barWidth: 14,
itemStyle: {
borderWidth: 14,
borderRadius: [10, 10, 10, 10], //
},
color: {
type: 'linear',
x: 1,
y: 0,
x2: 0,
y2: 0,
colorStops: [
{ offset: 0, color: '#35D0C0' },
{ offset: 1, color: 'rgba(53,208,192,0)' },
],
global: false,
},
},
xAxis: {
type: 'value',
splitLine: {
show: false,
lineStyle: {
type: 'dashed',
color: '#E5E5E5',
},
},
axisLabel: {
show: false,
textStyle: {
color: '#424242',
},
},
show: false,
axisLine: {
show: true,
},
axisTick: {
show: false,
},
},
yAxis: [
{
type: 'category',
data: ['耿马镇', '勐撒镇', '勐永镇', '孟定镇', '大兴乡'],
axisTick: {
show: false,
},
splitLine: {
show: false,
},
axisLine: {
show: false,
},
},
{
//
type: 'category',
inverse: true,
offset: 10,
axisTick: 'none',
axisLine: 'none',
show: true,
axisLabel: {
textStyle: {
color: '#ffffff',
fontSize: '16',
},
formatter: function (value) {
let str = '{title|' + value + '万元}';
return str;
},
rich: {
title: {
color: '#fff',
fontSize: 16,
},
},
},
data: [8653.1, 9455.7, 4502.8, 4907.2, 4152],
},
],
series: [
{
name: '值',
type: 'bar',
zlevel: 1,
barBorderRadius: 10,
itemStyle: {
borderRadius: [10, 10, 10, 10],
color: 'rgba(100, 200, 255, 0.3)',
},
backgroundStyle: {
color: 'rgba(100, 200, 255, 0.3)',
borderRadius: [10, 10, 10, 10], // barBorderRadius
},
barWidth: 20,
data: values,
label: {
position: [0, -16],
align: 'left',
show: true,
formatter: (params) => {
return params.name;
},
},
barMaxWidth: 40,
markLine: {
label: {
color: '#26a69a',
},
},
},
{
name: '背景',
type: 'bar',
barWidth: 20,
barGap: '-100%',
data: maxData,
barBorderRadius: 30,
itemStyle: {
normal: {
color: 'rgba(105,131,242,.3)',
borderRadius: 10,
},
},
label: {
show: false,
},
barMaxWidth: 40,
markLine: {
label: {
color: '#26a69a',
},
},
},
],
},
});
watch(
() => props.data,
(val) => {
if (!isEmpty(val)) {
state.data = val;
}
},
{
deep: true,
immediate: true,
}
);
watch(
() => props.query,
(val) => {
if (!isEmpty(val)) {
loadData(val);
}
},
{
deep: true,
immediate: true,
}
);
const loadData = (val) => {
console.log(val);
if (val === 'all') {
state.data = props.data;
state.option.yAxis.data = ['耿马镇', '勐撒镇', '勐永镇', '孟定镇', '大兴乡'];
} else {
for (let i in props.data) {
if (val === props.data[i].name) {
state.data = [];
state.data.push(props.data[i]);
state.option.yAxis.data = [props.data[i].name];
}
}
}
console.log(state.data);
console.log(state.option.yAxis);
values = getValue(state.data);
titles = getName(state.data);
max = Math.max(...state.data);
maxData = getMaxData(state.data);
};
</script>

View File

@ -3,28 +3,26 @@
<el-col :span="6" class="left-charts">
<div class="left-charts-item">
<customBack
top-title="全县历年产值对比"
top-title="全县各乡镇产值对比"
:top-postion="'left'"
:down-title="'全县'"
:label-field="'label'"
:value-field="'value'"
:down-width="''"
:options="[
{ label: '全县', value: '530926' },
{ label: '耿马镇', value: '42611' },
{ label: '勐撒镇', value: '9259' },
{ label: '勐永镇', value: '17787' },
{ label: '孟定镇', value: '42610' },
{ label: '勐简乡', value: '17788' },
{ label: '贺派乡', value: '40161' },
{ label: '四排山乡', value: '40163' },
{ label: '大兴乡', value: '40159' },
{ label: '全县', value: 'all' },
{ label: '耿马镇', value: '耿马镇' },
{ label: '勐撒镇', value: '勐撒镇' },
{ label: '勐永镇', value: '勐永镇' },
{ label: '孟定镇', value: '孟定镇' },
{ label: '大兴乡', value: '大兴乡' },
]"
:is-down="true"
@command="handleCommand"
:is-down="false"
@command="handleCommand($event)"
>
<template #back>
<entitiesCategoryCharts ref="oneRef" :data="state.data.one" :query="state.queryCode"></entitiesCategoryCharts>
<value-charts :data="state.data.one" :query="state.queryCode"></value-charts>
<!--<entitiesCategoryCharts ref="oneRef" :data="state.data.one" :query="state.queryCode"></entitiesCategoryCharts>-->
</template>
</customBack>
</div>
@ -39,19 +37,19 @@
<customBack
top-title="全县作物产量对比"
:top-postion="'left'"
:down-title="'烟草'"
:down-title="'蔬菜'"
:label-field="'label'"
:value-field="'value'"
:down-width="''"
:options="[
{ label: '烟草', value: 1 },
{ label: '蔬菜', value: 1 },
{ label: '甘蔗', value: 2 },
{ label: '核桃', value: 3 },
{ label: '蔬菜', value: 4 },
{ label: '石斛', value: 3 },
{ label: '茶叶', value: 4 },
{ label: '其他', value: 5 },
]"
:is-down="true"
@command="handleContrast"
@command="handleContrast($event)"
>
<template #back>
<entitiesStatistics ref="thirdRef" :data="state.data.third" :query="state.contrastCode"></entitiesStatistics>
@ -88,7 +86,7 @@
</el-row>
</template>
<script setup>
import { nextTick, reactive, ref } from 'vue';
import { nextTick, onMounted, reactive, ref } from 'vue';
import centerMap from '@/components/centerMap.vue';
import categoryCharts from './components/categoryCharts.vue';
import entitieslist from './components/entitieslist.vue';
@ -98,6 +96,28 @@ import entitiesStatistics from './components/entitiesStatistics.vue';
import entitiesCategoryCharts from './components/entitiesCategoryCharts.vue';
import entitiesMap from './components/entitiesMap.vue';
import { sleep } from '@/utils';
import ValueCharts from '@/views/entities/components/valueCharts.vue';
import Mock from 'mockjs';
const thirdRes = () => {
return Mock.mock({
'data|9': [
{
id: '@id',
name: '@pick(["耿马镇", "勐撒镇", "勐永镇","孟定镇","勐简乡", "贺派乡", "四排山乡","芒洪乡","大兴乡"])',
value1: function () {
const num = Mock.Random.float(100, 300, 0, 2);
return num % 1 === 0 ? num : parseFloat(num.toFixed(2));
},
// value: function () {
// // this.value1
// const num = Mock.Random.float(100, 300, 0, 2);
// return parseFloat((num / 5).toFixed(2));
// },
},
],
});
};
const oneRef = ref(null);
const thirdRef = ref(null);
@ -113,23 +133,22 @@ const loadData = async () => {
await sleep(500);
state.data = {
one: [
{ value: 5, name: '2020' },
{ value: 36, name: '2021' },
{ value: 70, name: '2022' },
{ value: 56, name: '2023' },
{ value: 70, name: '2024' },
{ value: 20, name: '2025' },
{ value: 4152, name: '大兴乡' },
{ value: 4907.2, name: '勐撒镇' },
{ value: 4502.8, name: '勐永镇' },
{ value: 9455.7, name: '孟定镇' },
{ value: 8653.1, name: '耿马镇' },
],
third: [
{ value: 98, value1: 88, name: '耿马镇' },
{ value: 55, value1: 117, name: '勐撒镇' },
{ value: 65, value1: 145, name: '勐永镇' },
{ value: 60, value1: 126, name: '孟定镇' },
{ value: 40, value1: 86, name: '勐简乡' },
{ value: 81, value1: 152, name: '贺派乡' },
{ value: 41, value1: 130, name: '四排山乡' },
{ value: 100, value1: 101, name: '芒洪乡' },
{ value: 79, value1: 184, name: '大兴乡' },
// { value: 35.61, value1: 178.06, name: '' },
// { value: 11.81, value1: 59.06, name: '' },
// { value: 11.08, value1: 55.41, name: '' },
// { value: 28.42, value1: 142.12, name: '' },
// { value: 12, value1: 65.99, name: '' },
// { value: 10.19, value1: 50.97, name: '' },
// { value: 6.61, value1: 33.08, name: '' },
// { value: 7.73, value1: 38.69, name: '' },
// { value: 13.08, value1: 65.4, name: '' },
],
};
};
@ -143,12 +162,17 @@ const handleCommand = (data) => {
// });
};
const handleContrast = (data) => {
state.contrastCode = data.value;
// console.info('data=', data);
nextTick(() => {
thirdRef.value && thirdRef.value.refresData();
});
state.contrastCode = data.value.toString();
state.data.third = [...thirdRes().data];
console.info(state.data.third);
// nextTick(() => {
// thirdRef.value && thirdRef.value.refresData();
// });
};
onMounted(() => {
state.data.third = thirdRes().data;
});
</script>
<style lang="scss" scoped>
.data-home-index {

View File

@ -27,9 +27,9 @@ const chartData = ref(
//
return [
{ type: '种子种苗', values: generateWaveData(15) },
{ type: '种子', values: generateWaveData(1) },
{ type: '化肥', values: generateWaveData(20) },
{ type: '农药', values: generateWaveData(10) },
{ type: '农药', values: generateWaveData(2) },
].flatMap(({ type, values }) =>
values.map((value, i) => ({
type,
@ -50,7 +50,7 @@ function hexToRGBA(hex, alpha = 1) {
const chartOption = ref({
color: ['#02FD94', '#FEF906', '#01FEFD'],
legend: {
data: ['种子种苗', '化肥', '农药'],
data: ['种子', '化肥', '农药'],
top: 8,
itemWidth: 12, //
itemHeight: 12, //
@ -104,7 +104,7 @@ const chartOption = ref({
},
series: [
{
name: '种子种苗',
name: '种子',
type: 'line',
smooth: true,
symbol: 'none',

View File

@ -1,12 +1,20 @@
<template>
<div class="order-stats">
<el-row :gutter="20">
<el-col v-for="item in state.list" :key="item.label" :span="12">
<el-col :span="12">
<div class="order-stats-item flex-column">
<div class="order-stats-value">
{{ item.value }}<span>{{ item.unit }}</span>
{{ currentChoose[0].value }}<span>{{ currentChoose[0].unit }}</span>
</div>
<div class="order-stats-label">{{ item.label }}</div>
<div class="order-stats-label">{{ currentChoose[0].label }}</div>
</div>
</el-col>
<el-col :span="12">
<div class="order-stats-item flex-column">
<div class="order-stats-value">
{{ currentChoose[1].value }}<span>{{ currentChoose[1].unit }}</span>
</div>
<div class="order-stats-label">{{ currentChoose[1].label }}</div>
</div>
</el-col>
</el-row>
@ -14,10 +22,18 @@
</template>
<script setup>
import { reactive } from 'vue';
import { reactive, onMounted, watch, ref } from 'vue';
import { isEmpty } from '@/utils/index.js';
const props = defineProps({
data: {
type: String,
default: () => '3',
},
});
const state = reactive({
list: [
year: [
{
label: '订单金额',
value: '548.86',
@ -29,7 +45,66 @@ const state = reactive({
unit: '笔',
},
],
day: [
{
label: '订单金额',
value: '0.95',
unit: '万元',
},
{
label: '订单数量',
value: '583',
unit: '笔',
},
],
month: [
{
label: '订单金额',
value: '34.85',
unit: '万元',
},
{
label: '订单数量',
value: '16517',
unit: '笔',
},
],
quarter: [
{
label: '订单金额',
value: '117.51',
unit: '万元',
},
{
label: '订单数量',
value: '46120',
unit: '笔',
},
],
});
const currentChoose = ref(state.year);
watch(
() => props.data,
(val) => {
if (!isEmpty(val)) {
if (val === '3') {
currentChoose.value = state.year;
} else if (val === '2') {
currentChoose.value = state.quarter;
} else if (val === '1') {
currentChoose.value = state.month;
} else if (val === '0') {
currentChoose.value = state.day;
}
}
},
{
deep: true,
immediate: true,
}
);
</script>
<style lang="scss" scoped>

View File

@ -3,7 +3,7 @@
<template #header>
<div class="land-map-pop-header">
<div class="title">{{ currentRegion?.name || '投入品' }}</div>
<a class="view-case" @click.prevent="handleViewCase">查看案件 &gt;</a>
<!-- <a class="view-case" @click.prevent="handleViewCase">查看案件 &gt;</a>-->
</div>
</template>
<template #dialogContent>

View File

@ -83,8 +83,8 @@ const state = reactive({
},
},
data: [
{ value: 221.8, name: '产业运营平台' },
{ value: 70.01, name: '其它', floatZ: 1 },
{ value: 221.8, name: '合资公司' },
{ value: 70.01, name: '其它实体', floatZ: 1 },
],
});
</script>

View File

@ -40,11 +40,12 @@ const chartConfig = ref({
option: {
header: ['投入品种类', '平台价格', '市场价格'],
dataset: [
['圆茄种苗', '0.3元/棵', '0.4元/棵'],
['高氮复合肥', '1850元/吨', '1980元/吨'],
['硫酸钾', '1250元/吨', '1380元/吨'],
['高氮复合肥', '1850元/吨', '1980元/吨'],
['西红柿种苗', '0.3元/棵', '0.4元/棵'],
['西红柿种苗', '0.45元/株', '0.6元/株'],
['美玉27号甜糯玉米种子', '102元/kg', '126元/kg'],
['磷酸二氢钾99% 全水溶叶面肥磷钾肥', '6750元/吨', '8400元/吨'],
['大量元素水溶肥 平衡,高钾,高氮', '6550元/吨', '7980元/吨'],
['20%氯虫苯甲酰胺', '69885元/吨', '76880元/吨'],
['21.9%精草铵膦铵盐高浓度除草剂', '2748元/吨', '3416元/吨'],
],
//
headerBGC: 'rgba(53, 208, 192, 0.4)', //

View File

@ -6,34 +6,34 @@
import { reactive } from 'vue';
const rawData = [
{ name: '勐撒镇', type: '种子农药', value: 15 },
{ name: '勐撒镇', type: '化肥', value: 30 },
{ name: '勐撒镇', type: '农药', value: 22 },
{ name: '勐永镇', type: '种子农药', value: 18 },
{ name: '勐永镇', type: '化肥', value: 28 },
{ name: '勐永镇', type: '农药', value: 20 },
{ name: '孟定镇', type: '种子农药', value: 21 },
{ name: '孟定镇', type: '化肥', value: 25 },
{ name: '孟定镇', type: '农药', value: 24 },
{ name: '勐简乡', type: '种子农药', value: 13 },
{ name: '勐简乡', type: '化肥', value: 20 },
{ name: '勐简乡', type: '农药', value: 15 },
{ name: '贺派乡', type: '种子农药', value: 17 },
{ name: '贺派乡', type: '化肥', value: 18 },
{ name: '贺派乡', type: '农药', value: 16 },
{ name: '芒洪乡', type: '种子农药', value: 14 },
{ name: '芒洪乡', type: '化肥', value: 23 },
{ name: '芒洪乡', type: '农药', value: 21 },
{ name: '大兴乡', type: '种子农药', value: 12 },
{ name: '大兴乡', type: '化肥', value: 17 },
{ name: '大兴乡', type: '农药', value: 14 },
{ name: '耿马镇', type: '种子农药', value: 19 },
{ name: '耿马镇', type: '化肥', value: 26 },
{ name: '耿马镇', type: '农药', value: 23 },
{ name: '勐撒镇', type: '种子', value: 0.15 },
{ name: '勐撒镇', type: '化肥', value: 3.0 },
{ name: '勐撒镇', type: '农药', value: 2.2 },
{ name: '勐永镇', type: '种子', value: 0.18 },
{ name: '勐永镇', type: '化肥', value: 2.8 },
{ name: '勐永镇', type: '农药', value: 2.0 },
{ name: '孟定镇', type: '种子', value: 0.21 },
{ name: '孟定镇', type: '化肥', value: 2.5 },
{ name: '孟定镇', type: '农药', value: 2.4 },
{ name: '勐简乡', type: '种子', value: 0.13 },
{ name: '勐简乡', type: '化肥', value: 2.0 },
{ name: '勐简乡', type: '农药', value: 1.5 },
{ name: '贺派乡', type: '种子', value: 0.17 },
{ name: '贺派乡', type: '化肥', value: 1.8 },
{ name: '贺派乡', type: '农药', value: 1.6 },
{ name: '芒洪乡', type: '种子', value: 0.14 },
{ name: '芒洪乡', type: '化肥', value: 2.3 },
{ name: '芒洪乡', type: '农药', value: 2.1 },
{ name: '大兴乡', type: '种子', value: 0.2 },
{ name: '大兴乡', type: '化肥', value: 3 },
{ name: '大兴乡', type: '农药', value: 1.14 },
{ name: '耿马镇', type: '种子', value: 0.5 },
{ name: '耿马镇', type: '化肥', value: 4 },
{ name: '耿马镇', type: '农药', value: 2.3 },
];
const towns = ['勐撒镇', '勐永镇', '孟定镇', '勐简乡', '贺派乡', '芒洪乡', '大兴乡', '耿马镇'];
const types = ['种子农药', '化肥', '农药'];
const types = ['种子', '化肥', '农药'];
const colors = ['#15EB90', '#F3F70F', '#08DFE4'];
const series = types.map((type, idx) => {

View File

@ -51,13 +51,13 @@
:value-field="'value'"
:down-width="'100px'"
:options="[
{ label: '按日', value: '0' },
{ label: '按月', value: '1' },
{ label: '按季度', value: '2' },
{ label: '按年', value: '3' },
{ label: '按季度', value: '2' },
{ label: '按月', value: '1' },
{ label: '按日', value: '0' },
]"
:is-down="true"
command="handleCommand"
@command="handleCommand"
>
<template #back>
<inputsFour :data="state.data.ProductEntity" />
@ -135,7 +135,7 @@ const loadData = async () => {
unit: '家',
},
],
InputDetector: [{ JCFGL: 33.33, JCYPPC: 15684, zero_count: 13, JCHGL: 86.67, counts: 45 }],
InputDetector: [{ JCFGL: 49.58, JCYPPC: 15684, zero_count: 13, JCHGL: 86.67, counts: 45 }],
there: [
{ value: 530, name: '种子' },
{ value: 1215, name: '化肥' },
@ -143,11 +143,7 @@ const loadData = async () => {
{ value: 916, name: '地膜' },
{ value: 108, name: '水' },
],
ProductEntity: [
{ manufacturerCount: 2, percentage: 16.67, category: '种源企业' },
{ manufacturerCount: 5, percentage: 41.67, category: '农药厂家' },
{ manufacturerCount: 5, percentage: 41.67, category: '肥料厂家' },
],
ProductEntity: '3',
five: [
{ value: 10, name: '2020' },
{ value: 66, name: '2021' },
@ -365,7 +361,8 @@ const loadData = async () => {
loadData();
const handleCommand = (data) => {
state.queryCode = data.value;
console.log(data);
state.data.ProductEntity = data.value;
// console.info('data=', data);
// nextTick(() => {
// fiveRef.value && fiveRef.value.refresData();

View File

@ -0,0 +1,61 @@
<template>
<div style="width: 100%; height: 100%">
<div class="basic">
<div v-for="(item, index) in data" :key="index" class="line">
<div class="title">{{ item.title }}</div>
<div class="values">{{ item.value }}</div>
</div>
</div>
</div>
</template>
<script setup>
import { ref } from 'vue';
/* --------------- data --------------- */
// #region
const props = defineProps({
data: {
type: Array,
default: () => [],
},
});
// #endregion
/* --------------- methods --------------- */
// #region
// #endregion
</script>
<style lang="scss" scoped>
.basic {
width: 100%;
margin-top: 10px;
height: 95%;
border: 2px solid #01fefd;
border-radius: 16px;
backdrop-filter: blur(2px);
display: flex;
flex-direction: column;
justify-content: flex-start;
color: #ffffff;
padding: 20px;
.line {
display: flex;
justify-content: space-between;
text-align: left;
line-height: 50px;
.title {
font-size: 14px;
width: 40%;
color: #ddd;
}
.values {
font-size: 16px;
width: 60%;
}
}
}
</style>

View File

@ -27,12 +27,14 @@ import { ref, reactive, computed } from 'vue';
const unit = ref('万亩');
const list = reactive([
{ title: '望天田', value: '60.8', color: '#01FEFD' },
{ title: '地', value: '60.8', color: '#FEF906' },
{ title: '田', value: '60.8', color: '#01FEFD' },
{ title: '地', value: '60.8', color: '#FEF906' },
{ title: '水浇地', value: '60.8', color: '#02FD94' },
{ title: '果园', value: '60.8', color: '#FE7F03' },
{ title: '灌溉水田', value: '60.8', color: '#41BDFC' },
{ title: '旱地', value: '60.8', color: '#FC0003' },
{ title: '灌木林地', value: '60.8', color: '#FE7F03' },
{ title: '竹林地', value: '60.8', color: '#41BDFC' },
{ title: '果园', value: '60.8', color: '#FC0003' },
{ title: '茶园', value: '60.8', color: '#9C27B0' },
{ title: '人工牧草地', value: '60.8', color: '#4CAF50' },
]);
function doMapclick() {
list.forEach((v) => {

View File

@ -13,6 +13,7 @@ const props = defineProps({
});
const state = reactive({
total: 0, //
option: {
grid: {
left: '5%',
@ -22,6 +23,7 @@ const state = reactive({
containLabel: true,
},
tooltip: {
show: true,
trigger: 'axis',
axisPointer: {
type: 'shadow',
@ -31,11 +33,12 @@ const state = reactive({
borderRadius: 8,
formatter: (data) => {
const params = data[0];
let str = `<div class="custom-echarts-tips" >
const percentage = ((params.value / state.total) * 100).toFixed(2);
return `<div class="custom-echarts-tips" >
<span>${params.name}</span><br/>
<span>${params.marker} ${params.data} 万亩</span>
<span>${params.marker} ${params.data} km²</span><br/>
<span>占比 ${percentage}%</span>
</div>`;
return str;
},
extraCssText: 'backdrop-filter: blur(8px);',
},
@ -85,6 +88,7 @@ watch(
(val) => {
if (!isEmpty(val)) {
state.data = val;
state.total = val.reduce((sum, item) => sum + item.value, 0); //
}
},
{

View File

@ -0,0 +1,118 @@
<template>
<div style="display: flex; justify-content: space-around; width: 100%">
<section class="land_area_all">
<section v-for="(item, index) in data" :key="index" class="_left">
<section class="_circle">{{ item.value }}</section>
<section class="_text">{{ item.title }}</section>
</section>
</section>
</div>
</template>
<script setup>
import { ref } from 'vue';
/* --------------- data --------------- */
// #region
const props = defineProps({
data: {
type: Array,
default: () => [],
},
});
// #endregion
/* --------------- methods --------------- */
// #region
// #endregion
</script>
<style lang="scss" scoped>
.land_area_all {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
height: 100%;
width: 100%; /* 限制宽度 */
max-width: 400px; /* 可选最大值 */
._left {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
height: 100%;
._circle {
padding-top: 18%;
display: flex;
justify-content: center;
align-items: center;
font-family: 'JinBuTi';
width: 80%;
aspect-ratio: 1/1;
font-size: 18px;
color: #fff;
border-radius: 50%;
font-weight: bold;
background: url('../../../assets/images/land/countCircleBG.png') no-repeat center center / cover;
}
._text {
width: 100%;
height: 40px;
background: url('../../../assets/images/land/countTextBG.png') no-repeat center center / cover;
text-align: center;
line-height: 40px;
color: #fff;
font-size: 18px;
text-shadow: 0 0 1px #fff;
}
}
._right {
padding-right: 4px;
height: 100%;
overflow-y: auto;
.list_item {
padding: 0 24px;
position: relative;
display: flex;
grid-template-columns: 60% 40%;
justify-content: space-between;
align-items: center;
height: 32px;
color: #fff;
cursor: pointer;
user-select: none;
&.active {
background: rgba(38, 122, 102, 0.3);
border: 1px solid #35d0c0;
border-radius: 4px;
overflow: hidden;
.spot {
transform: scale(1.2);
}
._label {
font-size: 16px;
}
}
._label {
._spot {
display: inline-block;
position: absolute;
left: 8px;
top: 50%;
transform: translateY(-25%);
width: 8px;
height: 8px;
border-radius: 50%;
}
}
._value {
text-align: right;
}
}
}
._right::-webkit-scrollbar {
display: none;
}
}
</style>

View File

@ -2,53 +2,27 @@
<el-row class="data-home-index">
<el-col :span="6" class="left-charts">
<div class="left-charts-item">
<customBack top-title="耕地面积统计" :top-postion="'left'">
<customBack top-title="基础地理信息" :top-postion="'left'">
<template #back>
<!-- <landTwo :data="state.data.two" />-->
<basic-info :data="state.data.basic"></basic-info>
</template>
</customBack>
</div>
<div class="left-charts-item">
<customBack top-title="土地分布数据" :top-postion="'left'">
<template #back>
<landOne :data="state.data.one" />
</template>
</customBack>
</div>
<div class="left-charts-item">
<customBack top-title="农村土地资源" :top-postion="'left'">
<template #back>
<landTwo :data="state.data.two" />
</template>
</customBack>
</div>
<div class="left-charts-item">
<customBack
top-title="项目效益分析"
:top-postion="'left'"
:down-title="'全县'"
:label-field="'label'"
:value-field="'value'"
:down-width="'100px'"
:options="[
{ label: '全县', value: '530926' },
{ label: '耿马镇', value: '42611' },
{ label: '勐撒镇', value: '9259' },
{ label: '勐永镇', value: '17787' },
{ label: '孟定镇', value: '42610' },
{ label: '勐简乡', value: '17788' },
{ label: '贺派乡', value: '40161' },
{ label: '四排山乡', value: '40163' },
{ label: '大兴乡', value: '40159' },
]"
:is-down="true"
@command="handleCommand"
>
<template #back>
<landThere :data="state.data.there" :query="state.queryCode" />
</template>
</customBack>
</div>
</el-col>
<el-col :span="12">
<landMap />
</el-col>
<el-col :span="6" class="right-charts">
<div class="right-charts-item">
<customBack top-title="全县耕地面积" :top-postion="'right'">
<customBack top-title="全县土地用地数据" :top-postion="'right'">
<template #back>
<landFour :data="state.data.four" />
</template>
@ -56,32 +30,34 @@
</div>
<div class="right-charts-item">
<customBack
top-title="管理需求分类"
:down-title="'永久基本农田'"
top-title="乡镇土地用地数据"
:down-title="'所有类型'"
:top-postion="'right'"
:down-width="'140px'"
:options="[
{ label: '永久基本农田', value: '530926' },
{ label: '耿马镇', value: '42611' },
{ label: '勐撒镇', value: '9259' },
{ label: '勐永镇', value: '17787' },
{ label: '孟定镇', value: '42610' },
{ label: '勐简乡', value: '17788' },
{ label: '贺派乡', value: '40161' },
{ label: '四排山乡', value: '40163' },
{ label: '大兴乡', value: '40159' },
{ label: '所有类型', value: '530926' },
{ label: '水田', value: '42611' },
{ label: '灌溉水田', value: '9259' },
{ label: '水浇地', value: '17787' },
{ label: '灌木林地', value: '42610' },
{ label: '竹林地', value: '17788' },
{ label: '果园', value: '40161' },
{ label: '茶园', value: '40163' },
{ label: '人工牧草地', value: '40159' },
]"
:is-down="true"
@command="handleContrast"
>
<template #back>
<landFive :data="state.data.five" />
<land-five :data="state.data.five"></land-five>
</template>
</customBack>
</div>
<div class="right-charts-item">
<customBack top-title="全县作物情况" :top-postion="'right'">
<customBack top-title="土地违规使用风险预警" :top-postion="'right'">
<template #back>
<landSix :data="state.data.six" />
<warning :data="state.data.warnings"></warning>
<!-- <landSix :data="state.data.six" />-->
</template>
</customBack>
</div>
@ -89,7 +65,7 @@
</el-row>
</template>
<script setup>
import { nextTick, reactive } from 'vue';
import { nextTick, reactive, onMounted } from 'vue';
import landMap from './components/landMap.vue';
import landOne from './components/landOne.vue';
import landTwo from './components/landTwo.vue';
@ -100,6 +76,8 @@ import landSix from './components/landSix.vue';
import { useApp } from '@/hooks';
import { sleep } from '@/utils';
import { GetLandInfo } from '@/apis/land';
import BasicInfo from './components/basicInfo.vue';
import Warning from '@/views/land/components/warning.vue';
const state = reactive({
loading: false,
@ -107,6 +85,153 @@ const state = reactive({
queryCode: '',
});
const landData = [
{
area: '耿马镇',
land: [
{ type: '水田', value: 15.2 },
{ type: '菜地', value: 12.5 },
{ type: '水浇地', value: 8.3 },
{ type: '果园', value: 5.1 },
{ type: '灌溉水田', value: 10.8 },
{ type: '旱地', value: 28.6 },
{ type: '竹林地', value: 1.2 },
{ type: '茶园', value: 0.8 },
{ type: '人工牧草地', value: 0.5 },
{ type: '灌木林地', value: 6.7 },
],
total: 89.7, // 15.2 + 12.5 + 8.3 + 5.1 + 10.8 + 28.6 + 1.2 + 0.8 + 0.5 + 6.7
},
{
area: '勐永镇',
land: [
{ type: '水田', value: 8.5 },
{ type: '菜地', value: 9.2 },
{ type: '水浇地', value: 6.7 },
{ type: '果园', value: 4.3 },
{ type: '灌溉水田', value: 7.9 },
{ type: '旱地', value: 22.4 },
{ type: '竹林地', value: 0.9 },
{ type: '茶园', value: 0.6 },
{ type: '人工牧草地', value: 0.3 },
{ type: '灌木林地', value: 5.2 },
],
total: 66.0, // 8.5 + 9.2 + 6.7 + 4.3 + 7.9 + 22.4 + 0.9 + 0.6 + 0.3 + 5.2
},
{
area: '勐撒镇',
land: [
{ type: '水田', value: 12.1 },
{ type: '菜地', value: 15.3 },
{ type: '水浇地', value: 10.2 },
{ type: '果园', value: 7.8 },
{ type: '灌溉水田', value: 14.5 },
{ type: '旱地', value: 18.9 },
{ type: '竹林地', value: 1.5 },
{ type: '茶园', value: 1.2 },
{ type: '人工牧草地', value: 0.7 },
{ type: '灌木林地', value: 8.4 },
],
total: 91.6, // 12.1 + 15.3 + 10.2 + 7.8 + 14.5 + 18.9 + 1.5 + 1.2 + 0.7 + 8.4
},
{
area: '孟定镇',
land: [
{ type: '水田', value: 5.8 },
{ type: '菜地', value: 7.0 },
{ type: '水浇地', value: 4.5 },
{ type: '果园', value: 3.2 },
{ type: '灌溉水田', value: 6.7 },
{ type: '旱地', value: 12.3 },
{ type: '竹林地', value: 0.7 },
{ type: '茶园', value: 0.4 },
{ type: '人工牧草地', value: 0.2 },
{ type: '灌木林地', value: 3.9 },
],
total: 44.7, // 5.8 + 7.0 + 4.5 + 3.2 + 6.7 + 12.3 + 0.7 + 0.4 + 0.2 + 3.9
},
{
area: '大兴乡',
land: [
{ type: '水田', value: 6.3 },
{ type: '菜地', value: 8.1 },
{ type: '水浇地', value: 5.4 },
{ type: '果园', value: 3.9 },
{ type: '灌溉水田', value: 7.2 },
{ type: '旱地', value: 15.6 },
{ type: '竹林地', value: 1.1 },
{ type: '茶园', value: 0.9 },
{ type: '人工牧草地', value: 0.4 },
{ type: '灌木林地', value: 4.8 },
],
total: 53.7, // 6.3 + 8.1 + 5.4 + 3.9 + 7.2 + 15.6 + 1.1 + 0.9 + 0.4 + 4.8
},
{
area: '芒洪乡',
land: [
{ type: '水田', value: 4.2 },
{ type: '菜地', value: 5.6 },
{ type: '水浇地', value: 3.8 },
{ type: '果园', value: 2.5 },
{ type: '灌溉水田', value: 5.1 },
{ type: '旱地', value: 11.5 },
{ type: '竹林地', value: 0.5 },
{ type: '茶园', value: 0.3 },
{ type: '人工牧草地', value: 0.1 },
{ type: '灌木林地', value: 3.2 },
],
total: 36.8, // 4.2 + 5.6 + 3.8 + 2.5 + 5.1 + 11.5 + 0.5 + 0.3 + 0.1 + 3.2
},
{
area: '四排山乡',
land: [
{ type: '水田', value: 3.7 },
{ type: '菜地', value: 4.8 },
{ type: '水浇地', value: 3.2 },
{ type: '果园', value: 2.1 },
{ type: '灌溉水田', value: 4.6 },
{ type: '旱地', value: 9.8 },
{ type: '竹林地', value: 0.4 },
{ type: '茶园', value: 0.2 },
{ type: '人工牧草地', value: 0.1 },
{ type: '灌木林地', value: 2.7 },
],
total: 31.6, // 3.7 + 4.8 + 3.2 + 2.1 + 4.6 + 9.8 + 0.4 + 0.2 + 0.1 + 2.7
},
{
area: '贺派乡',
land: [
{ type: '水田', value: 7.9 },
{ type: '菜地', value: 10.4 },
{ type: '水浇地', value: 7.1 },
{ type: '果园', value: 5.6 },
{ type: '灌溉水田', value: 9.3 },
{ type: '旱地', value: 20.1 },
{ type: '竹林地', value: 1.3 },
{ type: '茶园', value: 1 },
{ type: '人工牧草地', value: 0.6 },
{ type: '灌木林地', value: 7.1 },
],
total: 70.4, // 7.9 + 10.4 + 7.1 + 5.6 + 9.3 + 20.1 + 1.3 + 1 + 0.6 + 7.1
},
{
area: '勐简乡',
land: [
{ type: '水田', value: 5.1 },
{ type: '菜地', value: 6.7 },
{ type: '水浇地', value: 4.6 },
{ type: '果园', value: 3.4 },
{ type: '灌溉水田', value: 6.2 },
{ type: '旱地', value: 13.8 },
{ type: '竹林地', value: 0.8 },
{ type: '茶园', value: 0.5 },
{ type: '人工牧草地', value: 0.3 },
{ type: '灌木林地', value: 4.3 },
],
total: 45.7, // 5.1 + 6.7 + 4.6 + 3.4 + 6.2 + 13.8 + 0.8 + 0.5 + 0.3 + 4.3
},
];
//
const loadData = async () => {
state.loading = true;
@ -122,15 +247,15 @@ const loadData = async () => {
await sleep(500);
state.data = {
one: [
{ value: 20, name: '耿马镇' },
{ value: 15, name: '勐撒镇' },
{ value: 12, name: '勐永镇' },
{ value: 16, name: '孟定镇' },
{ value: 8, name: '勐简乡' },
{ value: 12, name: '贺派乡' },
{ value: 10, name: '四排山乡' },
{ value: 9, name: '芒洪乡' },
{ value: 8, name: '大兴乡' },
{ value: 441.96, name: '耿马镇' },
{ value: 515.11, name: '勐撒镇' },
{ value: 399.6, name: '勐永镇' },
{ value: 1069.15, name: '孟定镇' },
{ value: 281.19, name: '勐简乡' },
{ value: 251.74, name: '贺派乡' },
{ value: 349.86, name: '四排山乡' },
{ value: 314, name: '芒洪乡' },
{ value: 456, name: '大兴乡' },
],
two: [
{ name: '耿马镇', value: 87.84 },
@ -152,28 +277,26 @@ const loadData = async () => {
{ value: 80, name: '2025' },
],
four: [
{ value: 58.9, label: '灌溉水田' },
{ value: 56.1, label: '基地地' },
{ value: 60.8, label: '望天田' },
{ value: 60.8, label: '水田' },
{ value: 58.9, label: '旱地' },
{ value: 60.6, label: '水浇地' },
{ value: 32.6, label: '林地' },
{ value: 25.8, label: '育苗地' },
{ value: 56.1, label: '灌木林地' },
{ value: 32.6, label: '竹林地' },
{ value: 56.0, label: '果园' },
{ value: 52.4, label: '草地' },
{ value: 6.3, label: '观测用地' },
{ value: 6.1, label: '监测用地' },
],
five: [
{ value: 20, name: '耿马镇' },
{ value: 15, name: '勐撒镇' },
{ value: 12, name: '勐永镇' },
{ value: 16, name: '孟定镇' },
{ value: 8, name: '勐简乡' },
{ value: 12, name: '贺派乡' },
{ value: 10, name: '四排山乡' },
{ value: 9, name: '芒洪乡' },
{ value: 8, name: '大兴乡' },
{ value: 25.8, label: '茶园' },
{ value: 52.4, label: '人工牧草地' },
],
// five: [
// { value: 20, name: '' },
// { value: 15, name: '' },
// { value: 12, name: '' },
// { value: 16, name: '' },
// { value: 8, name: '' },
// { value: 12, name: '' },
// { value: 10, name: '' },
// { value: 9, name: '' },
// { value: 8, name: '' },
// ],
six: [
{
name: '小麦',
@ -200,18 +323,55 @@ const loadData = async () => {
value: 32.1,
},
],
basic: [
{ value: '3837km²', title: '行政区域面积' },
{ value: '9个乡,3个农场', title: '下辖地区' },
{ value: '27.88万人', title: '常住人口' },
{ value: '18.8℃ - 19.2℃', title: '年均气温' },
{ value: '946.2毫米(山区)', title: '年降水量' },
{ value: '优越,适宜农业发展', title: '光热水土条件' },
],
warnings: [
{ value: 2, title: '当前风险预警数量' },
{ value: 30, title: '已处理土地违规案件' },
],
};
state.loading = false;
};
loadData();
const handleCommand = (data) => {
state.queryCode = data.value;
// console.info('data=', data);
// nextTick(() => {
// fiveRef.value && fiveRef.value.refresData();
// });
onMounted(() => {
state.data.five = [];
for (let i in landData) {
state.data.five.push({ name: landData[i].area, value: landData[i].total });
}
});
const handleContrast = (data) => {
state.data.five = [];
if (data.label === '所有类型') {
for (let i in landData) {
let obj = {
name: landData[i].area,
value: landData[i].total,
};
state.data.five.push(obj);
}
} else {
for (let i in landData) {
let obj = {
name: landData[i].area,
value: 0,
};
for (let k in landData[i].land) {
if (landData[i].land[k].type === data.label) {
obj.value = landData[i].land[k].value;
}
}
state.data.five.push(obj);
}
}
};
</script>
<style lang="scss" scoped>
@ -240,7 +400,7 @@ const handleCommand = (data) => {
}
.left-charts-item {
width: calc(100% - 5px);
height: calc((100% - 30px) / 3);
height: calc((100% - 30px) / 2);
}
.right-charts {

View File

@ -2,46 +2,29 @@
<custom-echart-bar :chart-data="dataList" height="100%" :option="state.option" />
</template>
<script setup>
import { onMounted, reactive } from 'vue';
import { onMounted, reactive, watch } from 'vue';
import { isEmpty } from '@/utils';
const dataList = reactive([
{
name: '其他',
value: 3500,
const props = defineProps({
data: {
type: Array,
default: () => [],
},
{
name: '烟叶',
value: 4000,
query: {
type: String,
default: '',
},
{
name: '甘蔗',
value: 6000,
},
{
name: '核桃',
value: 8000,
},
{
name: '茶叶',
value: 12000,
},
]);
});
//
let dataList = reactive([]);
let titles = reactive([]);
let values = reactive([]);
const max = Math.max(...dataList);
const maxData = dataList.map((item, index) => {
return {
value: [max, index],
name: titles[index],
};
});
const barData = dataList.map((item, index) => {
return {
value: [item, index],
name: titles[index],
};
});
let max = reactive([]);
let maxData = reactive([]);
let barData = reactive([]);
const getValue = () => {
let arr = [];
@ -58,12 +41,35 @@ const getName = () => {
return arr;
};
onMounted(() => {
titles = getName();
values = getValue();
console.log(titles);
console.log(values);
});
watch(
() => props.data,
(val) => {
if (!isEmpty(val)) {
dataList = val;
titles = getName();
values = getValue();
console.log(titles);
console.log(values);
max = Math.max(...values);
maxData = dataList.map((item, index) => {
return {
value: [max, index],
name: titles[index],
};
});
console.log(max);
console.log(maxData);
barData = dataList.map((item, index) => {
return {
value: [item, index],
name: titles[index],
};
});
console.log(barData);
}
},
{ deep: true, immediate: true }
);
const state = reactive({
option: {
@ -139,7 +145,7 @@ const state = reactive({
{
// title
type: 'category',
data: ['茶叶', '核桃', '甘蔗', '烟叶', '其他'],
data: [...titles].reverse(),
axisLabel: {
textStyle: {
color: '#ffffff',
@ -180,99 +186,7 @@ const state = reactive({
},
},
},
data: [12000, 8000, 6000, 4000, 3500],
},
],
series: [
{
name: '值',
type: 'bar',
zlevel: 1,
barBorderRadius: 10,
itemStyle: {
borderRadius: [10, 10, 10, 10],
color: 'rgba(100, 200, 255, 0.3)',
},
backgroundStyle: {
color: 'rgba(100, 200, 255, 0.3)',
borderRadius: [10, 10, 10, 10], // barBorderRadius
},
barWidth: 20,
data: values,
label: {
position: [0, -16],
align: 'left',
show: true,
formatter: (params) => {
return params.name;
},
},
barMaxWidth: 40,
markLine: {
label: {
color: '#26a69a',
},
},
},
{
name: '背景',
type: 'bar',
barWidth: 20,
barGap: '-100%',
data: maxData,
barBorderRadius: 30,
itemStyle: {
normal: {
color: 'rgba(105,131,242,.3)',
borderRadius: 10,
},
},
label: {
show: false,
},
barMaxWidth: 40,
markLine: {
label: {
color: '#26a69a',
},
},
},
{
name: '内圆',
type: 'scatter',
hoverAnimation: false,
data: barData,
yAxisIndex: 0,
symbolSize: 22,
itemStyle: {
normal: {
color: '#26a69a',
opacity: 1,
},
},
zlevel: 2,
label: {
show: false,
},
},
{
name: '外圆',
type: 'scatter',
hoverAnimation: false,
data: barData,
yAxisIndex: 0,
symbolSize: 28,
symbol: `path://M512 960C264.576 960 64 759.424 64 512S264.576 64 512 64s448 200.576 448 448-200.576 448-448 448z m0-268.8a179.2 179.2 0 1 0 0-358.4 179.2 179.2 0 0 0 0 358.4z`,
itemStyle: {
color: 'rgb(255, 255, 255)',
opacity: 1,
borderColor: 'rgba(44, 111, 226, 0.2)',
borderWidth: 2,
},
zlevel: 3,
label: {
show: false,
},
},
],
},

View File

@ -22,45 +22,76 @@
<section class="line_info" :style="{ '--top': info.show ? '18vh' : '140vh' }">
<i class="el-icon-close" @click="handleCloseInfo"></i>
<section>
<section class="info_box">
<div>
<span class="_label">产品名称</span>
<span>{{ info.productName }}</span>
<div class="traceability_info">
<div class="_label" style="font-size: 30px">溯源信息</div>
<div class="traceability_info_box">
<div class="traceability_info_box_image">
<img v-if="info.productType === '番茄'" src="../../../assets/images/entities/tomatoImg.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '芹菜'" src="../../../assets/images/entities/芹菜.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '白菜'" src="../../../assets/images/entities/白菜.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '铁皮石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '紫皮石斛'" src="../../../assets/images/entities/石斛.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '黑皮甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '黄皮甘蔗'" src="../../../assets/images/entities/3.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '红茶'" src="../../../assets/images/entities/红茶.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '核桃'" src="../../../assets/images/entities/核桃.png" style="width: 100%; height: 100%" />
<img v-else-if="info.productType === '核桃仁'" src="../../../assets/images/entities/核桃.png" style="width: 100%; height: 100%" />
</div>
<div class="traceability_info_box_title">
<div class="traceability_info_right">新鲜{{ info.productType }}</div>
<div class="traceability_info_right_bottom">检测通过</div>
</div>
</div>
<div>
<span class="_label">产品批次号</span>
<span>{{ info.productCode }}</span>
</div>
<div>
<span class="_label">产品规格</span>
<span>{{ info.specs }}</span>
</div>
<div>
<span class="_label">产品类型</span>
<span>{{ info.productType }}</span>
</div>
<div>
<span class="_label">生产厂家</span>
<span>{{ info.info && info.info.manufacturer }}</span>
</div>
<div>
<span class="_label">生产时间</span>
<span>{{ info.info && info.info.productTime }}</span>
</div>
<div>
<span class="_label">终端零售店</span>
<span>{{ info.info && info.info.shop }}</span>
</div>
<div class="detection_text">权威检测</div>
<section>
<div v-for="item in list1" :key="item.name" class="info_box">
<div v-if="item.title === '样品名称'">
<span class="_label">{{ item.title }}</span>
<span>{{ info.productType }}</span>
</div>
<div v-else class="info_box">
<span class="_label">{{ item.title }}</span>
<span>{{ item.name }}</span>
</div>
</div>
</section>
<section class="route_box">
<div v-for="(item, i) in info.info && info.info.route" :key="`route_${i}`" class="route_item">
<!-- <div v-for="(item, i) in info.info && info.info.route" :key="`route_${i}`" class="route_item">
<div class="_circle"></div>
<div class="_name">{{ item.name }}</div>
<div class="_time">{{ item.time }}</div>
</div>
</div> -->
<div style="text-align: center">
<img src="../../../assets/images/trace/testReport.png" style="width: 30%" />
<div>检测报告</div>
<img src="../../../assets/images/trace/testReport.png" style="width: 100%" />
<!-- <div>检测报告</div> -->
</div>
</section>
<div class="detection_text">产地信息</div>
<div class="traceability_info">
<div class="traceability_info_box" style="flex-direction: column">
<div class="traceability_info_box_images">
<img style="width: 100%; height: 100%" src="../../../assets/images/trace/maprl.png" />
</div>
<div class="traceability_info_box_titles">
<div class="traceability_info_rights">临沧市耿马县耿马镇</div>
</div>
</div>
</div>
<div class="detection_text">仓储环节</div>
<section class="info_box">
<div v-for="item in list2" :key="item.name">
<span class="_label">{{ item.title }}</span>
<span>{{ item.name }}</span>
</div>
</section>
<div class="detection_text">物流环节</div>
<section class="info_box">
<div v-for="item in list3" :key="item.name">
<span class="_label">{{ item.title }}</span>
<span>{{ item.name }}</span>
</div>
</section>
</section>
@ -82,6 +113,44 @@ onMounted(() => {
});
let list = ref([]);
let list1 = ref([
{ title: '报告编号', name: 'H1212457' },
{ title: '送检单位', name: '水果综合种植基地' },
{ title: '送检日期', name: '2021-12-11' },
{ title: '送样人', name: '李宏微' },
{ title: '联系方式', name: '19876782134' },
{ title: '样品数量', name: '1000克' },
{ title: '样品名称', name: '新鲜番茄' },
{ title: '检测单位', name: '农残检测中心' },
{ title: '检测类型', name: '农残检测' },
{ title: '检测方法', name: '食品快速检测法' },
{ title: '评判标准', name: 'GB/T5009.199-2003' },
{ title: '检测结果', name: '合格' },
]);
let list2 = ref([
{ title: '仓库位置', name: '耿马县耿马村仓储站' },
{ title: '仓储数量', name: '5吨' },
{ title: '入库时间', name: '2021-12-11' },
{ title: '仓库类型', name: '冷藏仓库' },
{ title: '批次编号', name: 'AP20211212001' },
{ title: '出库时间', name: '2021-12-15' },
]);
let list3 = ref([
{ title: '运输批次', name: '第一批次' },
{ title: '运输工具', name: '冷藏车' },
{ title: '运输路线', name: '耿马县一昆明市' },
{ title: '运输数量', name: '4吨' },
{ title: '运输时间', name: '2021-12-15 5:30~12-16 8:30' },
{ title: '', name: '' },
{ title: '运输批次', name: '第二批次' },
{ title: '运输工具', name: '小型运载卡车' },
{ title: '运输路线', name: '耿马县一四排乡' },
{ title: '运输数量', name: '1吨' },
{ title: '运输时间', name: '2021-12-15 5:30~12-16 7:30' },
]);
const classOptions = {
singleHeight: 48,
};
@ -103,7 +172,7 @@ function handleCloseInfo() {
.label {
display: grid;
grid-template-columns: 25% 40% 18% 17%;
background-color: rgba(53, 208, 192, 0.3);
background-color: rgba(70, 109, 109, 0.8);
color: #ffffff;
height: 30px;
line-height: 30px;
@ -162,6 +231,58 @@ function handleCloseInfo() {
z-index: 9999;
transition: all 0.8s cubic-bezier(0.58, 0.15, 0.4, 1.42);
font-size: 18px;
.detection_text {
font-size: 25px;
margin-bottom: 20px;
}
.traceability_info {
.traceability_info_box {
justify-content: space-evenly;
padding: 10px;
display: flex;
margin: 20px 0px;
background-color: rgba(70, 109, 109, 0.8);
border-radius: 10px;
.traceability_info_box_image {
width: 130px;
height: 75px;
}
.traceability_info_box_images {
width: 100%;
height: 150px;
}
.traceability_info_box_title {
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: center;
height: 75px;
}
.traceability_info_box_titles {
margin-top: 10px;
display: flex;
flex-direction: column;
justify-content: space-evenly;
align-items: start;
}
.traceability_info_right {
font-size: 23px;
color: #fff;
}
.traceability_info_rights {
font-size: 15px;
color: #fff;
}
.traceability_info_right_bottom {
padding: 5px 20px;
border-radius: 40px;
background-color: rgba(0, 0, 0, 0.2);
color: #04ed8c;
font-size: 17px;
}
}
}
._label {
color: #01fefd;
}
@ -207,7 +328,6 @@ function handleCloseInfo() {
}
}
.route_box {
padding: 0 34px;
> div {
position: relative;
padding-bottom: 16px;

View File

@ -1,16 +1,16 @@
{
"data": [
{
"productName": "核桃",
"productName": "蔬菜",
"productCode": "10062787341458",
"specs": "袋装",
"productType": "核桃仁",
"productType": "芹菜",
"type": "2",
"info": {
"productName": "核桃",
"productName": "蔬菜",
"productCode": "10062787341458",
"specs": "袋装",
"productType": "核桃仁",
"productType": "芹菜",
"manufacturer": "老灶坊食品加工厂",
"shop": "深圳市吉祥干果店",
"productTime": "2025年03月23日",
@ -39,16 +39,16 @@
}
},
{
"productName": "核桃",
"productName": "蔬菜",
"productCode": "10062787348741",
"specs": "袋装",
"productType": "核桃仁",
"productType": "白菜",
"type": "2",
"info": {
"productName": "核桃",
"productName": "蔬菜",
"productCode": "10062787348741",
"specs": "袋装",
"productType": "核桃仁",
"productType": "白菜",
"manufacturer": "九鼎香食品有限公司",
"shop": "秦岭核香店",
"productTime": "2025年02月18日",
@ -77,16 +77,16 @@
}
},
{
"productName": "核桃",
"productName": "石斛",
"productCode": "10062787349847",
"specs": "袋装",
"productType": "核桃仁",
"productType": "铁皮石斛",
"type": "2",
"info": {
"productName": "核桃",
"productName": "石斛",
"productCode": "10062787349847",
"specs": "袋装",
"productType": "核桃仁",
"productType": "铁皮石斛",
"manufacturer": "绿源智造食品加工厂",
"shop": "晋南核味店",
"productTime": "2025年01月20日",
@ -115,16 +115,16 @@
}
},
{
"productName": "核桃",
"productName": "石斛",
"productCode": "10062787346574",
"specs": "袋装",
"productType": "核桃仁",
"productType": "紫皮石斛",
"type": "2",
"info": {
"productName": "核桃",
"productName": "石斛",
"productCode": "10062787346574",
"specs": "袋装",
"productType": "核桃仁",
"productType": "紫皮石斛",
"manufacturer": "绿源智造食品加工厂",
"shop": "福核斋店",
"productTime": "2025年01月13日",
@ -153,16 +153,16 @@
}
},
{
"productName": "核桃",
"productName": "甘蔗",
"productCode": "10062787341478",
"specs": "袋装",
"productType": "核桃仁",
"productType": "黑皮甘蔗",
"type": "2",
"info": {
"productName": "核桃",
"productName": "甘蔗",
"productCode": "10062787341478",
"specs": "袋装",
"productType": "核桃仁",
"productType": "黑皮甘蔗",
"manufacturer": "一口鲜食品加工厂",
"shop": "核养坊",
"productTime": "2025年01月04日",
@ -191,16 +191,16 @@
}
},
{
"productName": "红茶",
"productName": "甘蔗",
"productCode": "10062787346524",
"specs": "袋装",
"productType": "红茶",
"productType": "黄皮甘蔗",
"type": "1",
"info": {
"productName": "红茶",
"productName": "甘蔗",
"productCode": "10062787346524",
"specs": "袋装",
"productType": "红茶",
"productType": "黄皮甘蔗",
"manufacturer": "粤膳坊食品加工厂",
"shop": "茗香居店",
"productTime": "2025年03月04日",
@ -228,120 +228,6 @@
]
}
},
{
"productName": "白茶",
"productCode": "10062787343574",
"specs": "袋装",
"productType": "白茶",
"type": "1",
"info": {
"productName": "白茶",
"productCode": "10062787343574",
"specs": "袋装",
"productType": "白茶",
"manufacturer": "粤膳坊食品加工厂",
"shop": "茗香居店",
"productTime": "2025年03月21日",
"route": [
{
"name": "出库",
"time": "2025-03-22 05:32.45"
},
{
"name": "到达临沧市",
"time": "2025-03-22 21:43.41"
},
{
"name": "到达昆明市",
"time": "2025-03-23 04:15.20"
},
{
"name": "到达广州市",
"time": "2025-03-23 22:55.05"
},
{
"name": "出售",
"time": "2025-03-25 07:23.46"
}
]
}
},
{
"productName": "乌龙茶",
"productCode": "10062787348745",
"specs": "袋装",
"productType": "乌龙茶",
"type": "1",
"info": {
"productName": "乌龙茶",
"productCode": "10062787348745",
"specs": "袋装",
"productType": "乌龙茶",
"manufacturer": "粤膳坊食品加工厂",
"shop": "茗香居店",
"productTime": "2025年03月21日",
"route": [
{
"name": "出库",
"time": "2025-03-22 05:32.45"
},
{
"name": "到达临沧市",
"time": "2025-03-22 21:43.41"
},
{
"name": "到达昆明市",
"time": "2025-03-23 04:15.20"
},
{
"name": "到达广州市",
"time": "2025-03-23 22:55.05"
},
{
"name": "出售",
"time": "2025-03-25 07:23.46"
}
]
}
},
{
"productName": "黄茶",
"productCode": "10062787343254",
"specs": "袋装",
"productType": "黄茶",
"type": "1",
"info": {
"productName": "黄茶",
"productCode": "10062787343254",
"specs": "袋装",
"productType": "黄茶",
"manufacturer": "粤膳坊食品加工厂",
"shop": "茗香居店",
"productTime": "2025年03月21日",
"route": [
{
"name": "出库",
"time": "2025-03-22 05:32.45"
},
{
"name": "到达临沧市",
"time": "2025-03-22 21:43.41"
},
{
"name": "到达昆明市",
"time": "2025-03-23 04:15.20"
},
{
"name": "到达广州市",
"time": "2025-03-23 22:55.05"
},
{
"name": "出售",
"time": "2025-03-25 07:23.46"
}
]
}
},
{
"productName": "核桃",
"productCode": "10062787346958",
@ -380,158 +266,6 @@
]
}
},
{
"productName": "核桃",
"productCode": "10062787346923",
"specs": "袋装",
"productType": "核桃仁",
"type": "1",
"info": {
"productName": "核桃",
"productCode": "10062787346923",
"specs": "袋装",
"productType": "核桃仁",
"manufacturer": "粤膳坊食品加工厂",
"shop": "茗香居店",
"productTime": "2025年03月21日",
"route": [
{
"name": "出库",
"time": "2025-03-22 05:32.45"
},
{
"name": "到达临沧市",
"time": "2025-03-22 21:43.41"
},
{
"name": "到达昆明市",
"time": "2025-03-23 04:15.20"
},
{
"name": "到达广州市",
"time": "2025-03-23 22:55.05"
},
{
"name": "出售",
"time": "2025-03-25 07:23.46"
}
]
}
},
{
"productName": "核桃",
"productCode": "10062787343256",
"specs": "袋装",
"productType": "核桃仁",
"type": "1",
"info": {
"productName": "核桃",
"productCode": "10062787343256",
"specs": "袋装",
"productType": "核桃仁",
"manufacturer": "粤膳坊食品加工厂",
"shop": "茗香居店",
"productTime": "2025年03月21日",
"route": [
{
"name": "出库",
"time": "2025-03-22 05:32.45"
},
{
"name": "到达临沧市",
"time": "2025-03-22 21:43.41"
},
{
"name": "到达昆明市",
"time": "2025-03-23 04:15.20"
},
{
"name": "到达广州市",
"time": "2025-03-23 22:55.05"
},
{
"name": "出售",
"time": "2025-03-25 07:23.46"
}
]
}
},
{
"productName": "白茶",
"productCode": "10062787347489",
"specs": "袋装",
"productType": "白茶",
"type": "1",
"info": {
"productName": "白茶",
"productCode": "10062787347489",
"specs": "袋装",
"productType": "白茶",
"manufacturer": "粤膳坊食品加工厂",
"shop": "茗香居店",
"productTime": "2025年03月21日",
"route": [
{
"name": "出库",
"time": "2025-03-22 05:32.45"
},
{
"name": "到达临沧市",
"time": "2025-03-22 21:43.41"
},
{
"name": "到达昆明市",
"time": "2025-03-23 04:15.20"
},
{
"name": "到达广州市",
"time": "2025-03-23 22:55.05"
},
{
"name": "出售",
"time": "2025-03-25 07:23.46"
}
]
}
},
{
"productName": "核桃",
"productCode": "10062787347536",
"specs": "袋装",
"productType": "核桃仁",
"type": "2",
"info": {
"productName": "核桃",
"productCode": "10062787347536",
"specs": "袋装",
"productType": "核桃仁",
"manufacturer": "一口鲜食品加工厂",
"shop": "茗香居店",
"productTime": "2025年03月23日",
"route": [
{
"name": "出库",
"time": "2025-03-25 07:30.46"
},
{
"name": "到达临沧市",
"time": "2025-03-25 14:38.41"
},
{
"name": "到达昆明市",
"time": "2025-03-26 00:15.35"
},
{
"name": "到达广州市",
"time": "2025-03-26 16:55.08"
},
{
"name": "出售",
"time": "2025-03-27 09:26.40"
}
]
}
},
{
"productName": "红茶",
"productCode": "10062787345641",

View File

@ -21,12 +21,12 @@ import producer from '@/assets/images/trace/producer.png';
import batch from '@/assets/images/trace/batch.png';
import publicize from '@/assets/images/trace/publicize.png';
let valData = reactive([
{ value: 356, name: '扫码统计', unit: '次', bg: all },
{ value: 47865, name: '扫码统计', unit: '次', bg: all },
{ value: 86, name: '溯源产品', unit: '种', bg: producer },
{ value: 90, name: '溯源产品', unit: '个', bg: batch },
{ value: 136, name: '宣传门店', unit: '家', bg: publicize },
{ value: 6, name: '线上门店', unit: '家', bg: online },
{ value: 63, name: '业务人员', unit: '人', bg: person },
{ value: 90, name: '溯源批次', unit: '个', bg: batch },
{ value: 136, name: '追溯主体数', unit: '家', bg: publicize },
{ value: 32654, name: '发放溯源码', unit: '家', bg: online },
{ value: 23578, name: '有效期内溯源码', unit: '人', bg: person },
]);
onMounted(() => {});
@ -43,11 +43,12 @@ onMounted(() => {});
._item {
display: flex;
align-items: center;
width: 45%;
justify-content: flex-start;
width: 47%;
height: calc((100% / 3) - 16px);
color: #fff;
&:nth-child(2n + 2) {
justify-content: flex-end;
//justify-content: flex-end;
}
._value {
> span {

View File

@ -9,7 +9,7 @@ import { reactive, ref } from 'vue';
// #region
const data = ref([
{
name: '烟草',
name: '蔬菜',
value: 60.8,
},
{
@ -17,16 +17,16 @@ const data = ref([
value: 44.4,
},
{
name: '核桃',
name: '石斛',
value: 24.3,
},
{
name: '蔬菜',
name: '茶叶',
value: 32.7,
},
{
name: '其他',
value: 32.9,
value: 22.9,
},
]);
const option = reactive({
@ -34,6 +34,7 @@ const option = reactive({
opacity: 1,
itemGap: 0,
autoItemHeight: 2,
legendSuffix: '万件',
grid3D: {
show: false,
boxHeight: 3,

View File

@ -1,7 +1,7 @@
<template>
<section class="_container">
<div class="_left">
<video src="../../../assets/video.mp4" autoplay loop controls></video>
<video src="../../../assets/video2.mp4" autoplay loop controls></video>
<div class="video_footer">核桃仁原材料</div>
</div>
<div class="_right">
@ -42,7 +42,7 @@ import { ref } from 'vue';
<style lang="scss" scoped>
._container {
padding: 12px 0;
padding-top: 20px;
width: 100%;
height: 100%;
display: grid;
@ -57,9 +57,10 @@ import { ref } from 'vue';
font-size: 18px;
video {
width: 100%;
height: calc(100% - 60px);
// height: calc(100% - 60px);
border: 2px solid #01fefd;
border-radius: 16px;
margin-bottom: 10px;
}
.video_footer {
width: 64%;
@ -70,7 +71,7 @@ import { ref } from 'vue';
}
}
._right {
padding: 24px 0;
padding: 10px;
> div {
display: flex;
color: #fff;

View File

@ -82,15 +82,15 @@ onMounted(() => {});
.item_3 {
right: 0;
top: 5%;
width: 26%;
width: 24%;
background-image: url('../../../assets/images/trace/bubbleC.png');
._num {
color: #fef906;
}
}
.item_4 {
top: 40px;
left: 36%;
top: 30px;
left: 38%;
width: 22%;
background-image: url('../../../assets/images/trace/bubbleD.png');
._num {

View File

@ -26,68 +26,68 @@ const chinaGeoCoordMap = ref({
广东: [113.12244, 23.009505],
香港: [114.133834, 22.381374],
四川: [104.063707, 30.658753],
河北: [114.511072, 38.054693],
北京: [116.46, 39.92],
浙江: [120.19, 30.26],
山东: [117, 36.65],
福建: [119.3, 26.08],
上海: [121.48, 31.22],
重庆: [106.54, 29.59],
江西: [115.89, 28.68],
山西: [112.53, 37.87],
黑龙江: [126.63, 45.75],
陕西: [108.95, 34.27],
辽宁: [123.38, 41.8],
// : [114.511072, 38.054693],
// : [116.46, 39.92],
// : [120.19, 30.26],
// : [117, 36.65],
// : [119.3, 26.08],
// : [121.48, 31.22],
// : [106.54, 29.59],
// 西: [115.89, 28.68],
// 西: [112.53, 37.87],
// : [126.63, 45.75],
// 西: [108.95, 34.27],
// : [123.38, 41.8],
海南: [110.35, 20.02],
湖南: [113, 28.21],
宁夏: [106.27, 38.47],
湖北: [114.31, 30.52],
内蒙古: [111.65, 40.82],
天津: [117.2, 39.13],
贵州: [106.71, 26.57],
甘肃: [103.73, 36.03],
江苏: [118.78, 32.04],
吉林: [125.35, 43.88],
河南: [113.65, 34.76],
青海: [101.74, 36.56],
安徽: [117.27, 31.86],
广西: [108.33, 22.84],
西藏: [91.11, 29.97],
新疆: [87.68, 43.77],
// : [106.27, 38.47],
// : [114.31, 30.52],
// : [111.65, 40.82],
// : [117.2, 39.13],
// : [106.71, 26.57],
// : [103.73, 36.03],
// : [118.78, 32.04],
// : [125.35, 43.88],
// : [113.65, 34.76],
// : [101.74, 36.56],
// : [117.27, 31.86],
// 广西: [108.33, 22.84],
// 西: [91.11, 29.97],
// : [87.68, 43.77],
});
const chinaDatas = ref([
[{ name: '云南', value: 382 }],
[{ name: '广东', value: 62256 }],
[{ name: '香港', value: 9256 }],
[{ name: '四川', value: 1256 }],
[{ name: '河北', value: 382 }],
[{ name: '北京', value: 88 }],
[{ name: '浙江', value: 87 }],
[{ name: '山东', value: 87 }],
[{ name: '福建', value: 87 }],
[{ name: '上海', value: 87 }],
[{ name: '重庆', value: 87 }],
[{ name: '江西', value: 86 }],
[{ name: '山西', value: 84 }],
[{ name: '黑龙江', value: 83 }],
[{ name: '陕西', value: 83 }],
[{ name: '辽宁', value: 82 }],
// [{ name: '', value: 382 }],
// [{ name: '', value: 88 }],
// [{ name: '', value: 87 }],
// [{ name: '', value: 87 }],
// [{ name: '', value: 87 }],
// [{ name: '', value: 87 }],
// [{ name: '', value: 87 }],
// [{ name: '西', value: 86 }],
// [{ name: '西', value: 84 }],
// [{ name: '', value: 83 }],
// [{ name: '西', value: 83 }],
// [{ name: '', value: 82 }],
[{ name: '海南', value: 82 }],
[{ name: '湖南', value: 82 }],
[{ name: '宁夏', value: 82 }],
[{ name: '湖北', value: 81 }],
[{ name: '内蒙古', value: 81 }],
[{ name: '天津', value: 80 }],
[{ name: '贵州', value: 80 }],
[{ name: '甘肃', value: 80 }],
[{ name: '江苏', value: 80 }],
[{ name: '吉林', value: 80 }],
[{ name: '河南', value: 79 }],
[{ name: '青海', value: 79 }],
[{ name: '广西', value: 78 }],
[{ name: '安徽', value: 77 }],
[{ name: '新疆', value: 76 }],
[{ name: '西藏', value: 76 }],
// [{ name: '', value: 82 }],
// [{ name: '', value: 81 }],
// [{ name: '', value: 81 }],
// [{ name: '', value: 80 }],
// [{ name: '', value: 80 }],
// [{ name: '', value: 80 }],
// [{ name: '', value: 80 }],
// [{ name: '', value: 80 }],
// [{ name: '', value: 79 }],
// [{ name: '', value: 79 }],
// [{ name: '广西', value: 78 }],
// [{ name: '', value: 77 }],
// [{ name: '', value: 76 }],
// [{ name: '西', value: 76 }],
]);
//
const convertData = (data) => {
@ -222,7 +222,7 @@ const getSeries = () => {
const chartsData = reactive({
option: {
title: {
text: '地图统计图表',
text: '',
subtext: '',
x: 'center',
y: 'top',

View File

@ -5,12 +5,12 @@
<div class="left-charts-item">
<customBack top-title="原材料供应" :top-postion="'left'">
<template #back>
<codeNumCharts :data="one"></codeNumCharts>
<codeNumCharts :data="oneData"></codeNumCharts>
</template>
</customBack>
</div>
<div class="left-charts-item">
<customBack top-title="生产加工数据" :top-postion="'left'">
<customBack top-title="生产加工包装" :top-postion="'left'">
<template #back>
<principalTypeCharts></principalTypeCharts>
</template>
@ -76,7 +76,29 @@ import productTypeCharts from './components/productTypeCharts.vue';
import traceBarCharts from './components/traceBarCharts.vue';
import detectionCharts from './components/detectionCharts.vue';
const one = ref([]);
//
const oneData = ref([
{
name: '蔬菜',
value: 4000,
},
{
name: '甘蔗',
value: 6500,
},
{
name: '石斛',
value: 8000,
},
{
name: '茶叶',
value: 6000,
},
{
name: '其他',
value: 3500,
},
]);
const handleCommand = (data) => {
// state.queryCode = data.value;

View File

@ -4,7 +4,14 @@ VITE_MODE = 'DEV'
VITE_APP_MIAN = 'daimp-front-main'
VITE_APP_MIAN_URL = 'http://localhost:9000'
VITE_APP_NAME = 'sub-government-affairs-service'
VITE_APP_BASE_API = '/apis'
VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
VITE_APP_UPLOAD_API = '/uploadApis'
VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300'
# 阿里云接口地址
VITE_APP_BASE_URL = 'http://47.109.205.240:8080'
VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
# 内网接口地址
# VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
# VITE_APP_UPLOAD_URL = 'http://192.168.18.99:9300'

View File

@ -1,7 +1,8 @@
# 生产环境
VITE_MODE = 'PRO'
VITE_APP_MIAN = 'daimp-front-main'
VITE_APP_MIAN_URL = 'http://47.109.205.240:88'
# VITE_APP_MIAN_URL = 'http://47.109.205.240:88'
VITE_APP_MIAN_URL = 'http://192.168.18.14:8080'
VITE_APP_NAME = 'sub-government-affairs-service'
# 接口
VITE_APP_BASE_API = '/apis'

View File

@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>政务服务</title>
<title>产业政务平台</title>
</head>
<body>

View File

@ -0,0 +1,85 @@
// src/apis/businessEntity/index.js
import request from '@/utils/axios';
/**
* 生产经营主体 - 新增
* @param {Object} data 经营主体数据
*/
export function saveBusinessSubject(data) {
return request({
url: '/product-business/business/businessSave',
method: 'post',
data,
});
}
/**
* 生产经营主体 - 编辑
* @param {Object} data 经营主体数据
*/
export function editBusinessSubject(data) {
return request({
url: '/product-business/business/businessEdit',
method: 'put',
data,
});
}
/**
* 生产经营主体 - 分页查询
* @param {Object} params 查询参数
*/
export function fetchBusinessSubjectList(params) {
return request({
url: '/product-business/business/businessPage',
method: 'get',
params,
});
}
/**
* 生产经营主体 - 详情查询
* @param {string} id 主体ID
*/
export function fetchBusinessSubjectInfo(id) {
return request({
url: `/product-business/business/businessInfo/${id}`,
method: 'get',
});
}
/**
* 生产经营主体 - 批量删除
* @param {string} businessId 主体ID
*/
export function deleteBusinessSubject(businessId) {
return request({
url: '/product-business/business/deleteBusiness',
method: 'delete',
params: { businessId },
});
}
/**
* 生产经营主体 - 审核
* @param {Object} data 审核数据
*/
export function checkBusinessSubject(data) {
return request({
url: '/product-business/business/businessCheck',
method: 'put',
data,
});
}
/**
* 经营主体审核 - 分页查询
* @param {Object} params 查询参数
*/
export function fetchBusinessCheckList(params) {
return request({
url: '/product-business/business/businessCheckPage',
method: 'get',
params,
});
}

View File

@ -0,0 +1,54 @@
import request from '@/utils/axios';
// 获取网格列表
export const GetGridList = (params = {}) => {
return request('/land-resource/gridManage/page', {
method: 'get',
params,
});
};
// 网格员管理 - 列表
export function GetMemberList(params = {}) {
return request('/land-resource/grid-member/page', {
method: 'GET',
params,
});
}
// 网格员管理 - 新增
export function AddMember(data = {}) {
return request('/land-resource/grid-member', {
method: 'POST',
data,
});
}
// 网格员管理 - 修改
export function UpdateMember(data = {}) {
return request('/land-resource/grid-member', {
method: 'PUT',
data,
});
}
// 网格员管理 - 删除
export function DeleteMember(id) {
return request(`/land-resource/grid-member/${id}`, {
method: 'DELETE',
});
}
// // 网格员管理 - 导出
// export function ExportMember() {
// return request('/land-resource/grid-member/export', {
// method: 'POST',
// });
// }
export function ExportMember(data = {}) {
return request('/land-resource/grid-member/export', {
method: 'POST',
data,
responseType: 'blob', // 明确告诉 axios 返回 blob
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -8,9 +8,9 @@
<template>
<el-breadcrumb class="layout-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-if="matched[0].meta.title !== '政务服务'" key="home" :to="{ path: '/' }">
<el-breadcrumb-item v-if="matched[0].meta.title !== '农业产业政务平台'" key="home" :to="{ path: '/' }">
<div class="layout-breadcrumb-item">
<span class="layout-breadcrumb-title">政务服务</span>
<span class="layout-breadcrumb-title">农业产业政务平台</span>
</div>
</el-breadcrumb-item>
<el-breadcrumb-item v-for="(item, index) in matched" :key="item.name">

View File

@ -1,10 +1,3 @@
<!--
* @Description:
* @Author: zenghua.wang
* @Date: 2023-06-20 14:29:45
* @LastEditors: zenghua.wang
* @LastEditTime: 2024-01-26 23:04:29
-->
<template>
<div class="layout-hamburger" @click="handleCollapse">
<el-icon v-if="isCollapse" class="icon"><expand /></el-icon>

View File

@ -1,10 +1,3 @@
<!--
* @Description:
* @Author: zenghua.wang
* @Date: 2023-06-20 14:29:45
* @LastEditors: zenghua.wang
* @LastEditTime: 2025-01-24 15:11:22
-->
<template>
<div class="layout-header-placeholder" :style="stylePlaceholder()"></div>
<div

View File

@ -7,8 +7,8 @@
-->
<template>
<div class="logo">
<!-- <img src="/images/logo.png" class="logo-picture" /> -->
<h2 v-show="!isCollapse" class="logo-title">{{ VITE_APP_TITLE }}</h2>
<!-- <img src="../../../assets/images/logo.png" class="logo-picture" />
<h2 v-show="!isCollapse" class="logo-title">{{ VITE_APP_TITLE }}</h2> -->
</div>
</template>
@ -43,5 +43,9 @@ const { VITE_APP_TITLE } = import.meta.env;
line-height: 35px;
color: $color-primary;
}
.logo-picture {
width: 100%;
height: 50px;
}
}
</style>

View File

@ -1,10 +1,3 @@
<!--
* @Description:
* @Author: zenghua.wang
* @Date: 2024-01-27 16:02:43
* @LastEditors: zenghua.wang
* @LastEditTime: 2024-04-12 21:12:01
-->
<template>
<el-icon v-if="icon.includes('icon')" :class="`iconfont ${icon}`" :size="size" />
<el-icon v-else :size="size"> <component :is="icon" /></el-icon>

View File

@ -1,10 +1,3 @@
<!--
* @Description:
* @Author: zenghua.wang
* @Date: 2023-06-20 14:29:45
* @LastEditors: zenghua.wang
* @LastEditTime: 2024-01-27 09:29:36
-->
<template>
<component :is="type" v-bind="linkProps(to)">
<slot />

View File

@ -1,10 +1,3 @@
<!--
* @Description:
* @Author: zenghua.wang
* @Date: 2023-06-20 14:29:45
* @LastEditors: zenghua.wang
* @LastEditTime: 2024-01-27 16:07:37
-->
<template>
<template v-if="!item.hidden">
<template v-if="!item.alwaysShow && hasOneShowingChild(item.children, item)">
@ -15,21 +8,41 @@
</el-menu-item>
</layout-link>
</template>
<template v-else-if="level === 2 && !isCollapse">
<el-dropdown trigger="hover" placement="right-start" style="width: 100%" :show-timeout="100" @visible-change="(val) => (isDropdownOpen = val)">
<span class="el-dropdown-link el-menu-item" @mouseenter.prevent>
<layout-icon :size="20" :icon="item.meta?.icon" />
<span>{{ item.meta?.title }}</span>
<el-icon v-if="item.children?.length" :size="12" class="arrow-icon">
<component :is="isDropdownOpen ? 'arrow-left' : 'arrow-right'" />
</el-icon>
</span>
<template #dropdown>
<el-menu class="third-level-menu el-menu--vertical el-menu--popup-container" :default-active="$route.path" @select="$router.push">
<el-menu-item v-for="child in item.children" :key="child.path" :index="child.path">
<layout-icon :size="20" :icon="child.meta?.icon" />
<span>{{ child.meta?.title }}</span>
</el-menu-item>
</el-menu>
</template>
</el-dropdown>
</template>
<el-sub-menu v-else :index="item.path" teleported>
<template #title>
<layout-icon :size="20" :icon="item?.meta?.icon" />
<span>{{ item.meta && item.meta?.title }}</span>
</template>
<sub-item v-for="child in item.children" :key="child.path" :item="child" />
<sub-item v-for="child in item.children" :key="child.path" :item="child" :level="level + 1" />
</el-sub-menu>
</template>
</template>
<script setup name="sub-item">
import { ref } from 'vue';
import { ref, computed } from 'vue';
// import { isExternal } from '@/utils/validate.js';
import LayoutLink from './Link';
import LayoutIcon from './Icon';
import { useSettingStore } from '@/store/modules/setting';
// import path from 'path-browserify';
defineProps({
@ -37,6 +50,10 @@ defineProps({
type: Object,
required: true,
},
level: {
type: Number,
default: 1,
},
basePath: {
type: String,
default: '',
@ -44,6 +61,10 @@ defineProps({
});
const onlyOneChild = ref(null);
const SettingStore = useSettingStore();
const isDropdownOpen = ref(false);
const isCollapse = computed(() => !SettingStore.isCollapse);
const hasOneShowingChild = (children = [], parent) => {
const showingChildren = children.filter((item) => {
//
@ -79,3 +100,24 @@ const hasOneShowingChild = (children = [], parent) => {
// return path.resolve(props.basePath, routePath);
// };
</script>
<style scoped>
.third-level-menu {
background: #fff;
border-radius: 4px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
min-width: 180px;
}
.el-dropdown-link {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
box-sizing: border-box;
padding-right: 10px;
}
.arrow-icon {
margin-left: auto;
}
</style>

View File

@ -1,10 +1,3 @@
<!--
* @Description:
* @Author: zenghua.wang
* @Date: 2024-01-27 20:01:45
* @LastEditors: zenghua.wang
* @LastEditTime: 2024-03-30 14:32:07
-->
<template>
<div class="layout-sider" :class="{ 'has-logo': themeConfig.showLogo }">
<Logo v-if="themeConfig.showLogo" :is-collapse="isCollapse" />
@ -19,7 +12,7 @@
:collapse-transition="false"
:collapse="isCollapse"
>
<SubItem v-for="item in permissionRoutes" :key="item.path" :item="item" />
<SubItem v-for="item in permissionRoutes" :key="item.path" :item="item" :level="1" />
</el-menu>
</el-scrollbar>
</div>

View File

@ -1,10 +1,3 @@
<!--
* @Description: layout
* @Author: zenghua.wang
* @Date: 2024-01-26 20:13:37
* @LastEditors: zenghua.wang
* @LastEditTime: 2024-02-05 16:03:31
-->
<template>
<div
class="basic-layout"

View File

@ -34,7 +34,7 @@ export const constantRoutes = [
name: 'layout',
component: Layout,
redirect: '/sub-government-affairs-service/home',
meta: { title: '政务服务', icon: 'House' },
meta: { title: '农业产业政务平台', icon: 'House' },
children: [
{
path: '/sub-government-affairs-service/home',
@ -47,10 +47,10 @@ export const constantRoutes = [
...resourceRouter,
...productOperateMainRoutes,
...inputSuppliesRoutes,
produceGoods,
...plantingAndBreedingRouter,
// produceGoods,
// ...plantingAndBreedingRouter,
...traceRouter,
...systemRouter,
// ...systemRouter,
];
/**

View File

@ -9,12 +9,12 @@ const dictRoutes = [
redirect: '/sub-government-affairs-service/region',
meta: { title: '基础信息维护', icon: 'DocumentRemove' },
children: [
{
path: '/sub-government-affairs-service/region',
name: 'region',
component: () => import('@/views/dict/component/region/index.vue'),
meta: { title: '行政信息', icon: '' },
},
// {
// path: '/sub-government-affairs-service/region',
// name: 'region',
// component: () => import('@/views/dict/component/region/index.vue'),
// meta: { title: '行政信息', icon: '' },
// },
{
path: '/sub-government-affairs-service/landCassification',
name: 'landCassification',

View File

@ -3,99 +3,117 @@ import Views from '@/layouts/Views.vue';
const inputSuppliesRoutes = [
{
path: '/sub-government-affairs-service/inputSuppliesManage',
path: '/sub-government-affairs-service/material',
name: 'inputSuppliesManage',
component: Layout,
redirect: '/sub-government-affairs-service/materialManage',
meta: { title: '投入品监管平台', icon: 'FullScreen' },
redirect: '/sub-government-affairs-service/material/pesticide',
meta: { title: '投入品管理', icon: 'FullScreen' },
children: [
{
path: '/sub-government-affairs-service/material/pesticide',
name: 'input-supplies-pesticide',
component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
meta: { title: '农药管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/fertilizer',
name: 'input-supplies-fertilizer',
component: () => import('@/views/inputSuppliesManage/material/fertilizer/index.vue'),
meta: { title: '肥料管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/seed',
name: 'input-supplies-seed',
component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
meta: { title: '种子管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/others',
name: 'input-supplies-others',
component: () => import('@/views/inputSuppliesManage/material/others/index.vue'),
meta: { title: '其他投入品', icon: '' },
},
// {
// path: '/sub-government-affairs-service/inputDataView',
// name: 'inputDataView',
// component: () => import('@/views/inputSuppliesManage/inputDataView/index.vue'),
// meta: { title: '投入品资源一张图', icon: 'Document' },
// path: '/sub-government-affairs-service/materialManage',
// name: 'materialManage',
// component: Views,
// redirect: '/sub-government-affairs-service/material/pesticide',
// meta: { title: '投入品管理', icon: 'OfficeBuilding' },
// children: [
// {
// path: '/sub-government-affairs-service/material/pesticide',
// name: 'input-supplies-pesticide',
// component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
// meta: { title: '农药管理', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/material/fertilizer',
// name: 'input-supplies-fertilizer',
// component: () => import('@/views/inputSuppliesManage/material/fertilizer/index.vue'),
// meta: { title: '肥料管理', icon: '' },
// },
// // {
// // path: '/sub-government-affairs-service/material/pesticide',
// // name: 'input-supplies-pesticide',
// // component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
// // meta: { title: '农药管理', icon: '' },
// // },
// // {
// // path: '/sub-government-affairs-service/material/ratPoison',
// // name: 'input-supplies-ratPoison',
// // component: () => import('@/views/inputSuppliesManage/material/ratPoison/index.vue'),
// // meta: { title: '兽药管理', icon: '' },
// // },
// {
// path: '/sub-government-affairs-service/material/seed',
// name: 'input-supplies-seed',
// component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
// meta: { title: '种子管理', icon: '' },
// },
// // {
// // path: '/sub-government-affairs-service/material/farmMachinery',
// // name: 'input-supplies-farmMachinery',
// // component: () => import('@/views/inputSuppliesManage/material/farmMachinery/index.vue'),
// // meta: { title: '农机管理', icon: '' },
// // },
// ],
// },
// {
// path: '/sub-government-affairs-service/productionDealer',
// name: 'productionDealer',
// component: () => import('@/views/inputSuppliesManage/productionDealer/index.vue'),
// meta: { title: '企业经销商管理', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/enterpriseDealerCheck',
// name: 'enterpriseDealerCheck',
// component: () => import('@/views/inputSuppliesManage/enterpriseDealerCheck/index.vue'),
// meta: { title: '企业经销商抽检', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/useSupervise',
// name: 'useSupervise',
// component: () => import('@/views/inputSuppliesManage/useSupervise/index.vue'),
// meta: { title: '使用监管', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/leaseSupervise',
// name: 'leaseSupervise',
// component: () => import('@/views/inputSuppliesManage/leaseSupervise/index.vue'),
// meta: { title: '农机租赁监管', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/redBlackRank',
// name: 'redBlackRank',
// component: () => import('@/views/inputSuppliesManage/redBlackRank/index.vue'),
// meta: { title: '企业红黑榜', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/knowledgeManage',
// name: 'knowledgeManage',
// component: () => import('@/views/inputSuppliesManage/knowledgeManage/index.vue'),
// meta: { title: '知识库', icon: '' },
// },
{
path: '/sub-government-affairs-service/material',
name: 'material',
component: Views,
redirect: '/sub-government-affairs-service/material/pesticide',
meta: { title: '投入品管理', icon: 'OfficeBuilding' },
children: [
{
path: '/sub-government-affairs-service/material/pesticide',
name: 'input-supplies-pesticide',
component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
meta: { title: '农药管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/fertilizer',
name: 'input-supplies-fertilizer',
component: () => import('@/views/inputSuppliesManage/material/fertilizer/index.vue'),
meta: { title: '肥料管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/pesticide',
name: 'input-supplies-pesticide',
component: () => import('@/views/inputSuppliesManage/material/pesticide/index.vue'),
meta: { title: '农药管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/ratPoison',
name: 'input-supplies-ratPoison',
component: () => import('@/views/inputSuppliesManage/material/ratPoison/index.vue'),
meta: { title: '兽药管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/seed',
name: 'input-supplies-seed',
component: () => import('@/views/inputSuppliesManage/material/seed/index.vue'),
meta: { title: '种源管理', icon: '' },
},
{
path: '/sub-government-affairs-service/material/farmMachinery',
name: 'input-supplies-farmMachinery',
component: () => import('@/views/inputSuppliesManage/material/farmMachinery/index.vue'),
meta: { title: '农机管理', icon: '' },
},
],
},
{
path: '/sub-government-affairs-service/productionDealer',
name: 'productionDealer',
component: () => import('@/views/inputSuppliesManage/productionDealer/index.vue'),
meta: { title: '企业经销商管理', icon: '' },
},
{
path: '/sub-government-affairs-service/enterpriseDealerCheck',
name: 'enterpriseDealerCheck',
component: () => import('@/views/inputSuppliesManage/enterpriseDealerCheck/index.vue'),
meta: { title: '企业经销商抽检', icon: '' },
},
{
path: '/sub-government-affairs-service/useSupervise',
name: 'useSupervise',
component: () => import('@/views/inputSuppliesManage/useSupervise/index.vue'),
meta: { title: '使用监管', icon: '' },
},
{
path: '/sub-government-affairs-service/leaseSupervise',
name: 'leaseSupervise',
component: () => import('@/views/inputSuppliesManage/leaseSupervise/index.vue'),
meta: { title: '农机租赁监管', icon: '' },
},
{
path: '/sub-government-affairs-service/redBlackRank',
name: 'redBlackRank',
component: () => import('@/views/inputSuppliesManage/redBlackRank/index.vue'),
meta: { title: '企业红黑榜', icon: '' },
},
{
path: '/sub-government-affairs-service/knowledgeManage',
name: 'knowledgeManage',
component: () => import('@/views/inputSuppliesManage/knowledgeManage/index.vue'),
meta: { title: '知识库', icon: '' },
},
// {
// path: '/sub-government-affairs-service/patrolCaseManage',
// name: 'patrolCaseManage',

View File

@ -15,18 +15,18 @@ const landsRoutes = [
// component: () => import('@/views/landManage/component/landsManage/index.vue'),
// meta: { title: '土地信息登记', icon: '' },
// },
{
path: '/sub-government-affairs-service/plantPlan',
name: 'plantPlan',
component: () => import('@/views/landManage/component/plantPlan/index.vue'),
meta: { title: '种植计划', icon: '' },
},
{
path: '/sub-government-affairs-service/operationRecord',
name: 'operationRecord',
component: () => import('@/views/landManage/component/operationRecord/index.vue'),
meta: { title: '作业记录', icon: '' },
},
// {
// path: '/sub-government-affairs-service/plantPlan',
// name: 'plantPlan',
// component: () => import('@/views/landManage/component/plantPlan/index.vue'),
// meta: { title: '种植计划', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/operationRecord',
// name: 'operationRecord',
// component: () => import('@/views/landManage/component/operationRecord/index.vue'),
// meta: { title: '作业记录', icon: '' },
// },
{
path: '/sub-government-affairs-service/landPartol',
name: 'landPartol',

View File

@ -8,37 +8,37 @@ export default [
redirect: '/sub-government-affairs-service/mainHome',
meta: { title: '生产经营主体', icon: 'icon-shop' },
children: [
{
path: '/sub-government-affairs-service/mainHome',
component: () => import('@/views/productOperateMain/home/index.vue'),
name: 'mainHome',
meta: { title: '数据可视化管理', icon: '' },
},
// {
// path: '/sub-government-affairs-service/mainHome',
// component: () => import('@/views/productOperateMain/home/index.vue'),
// name: 'mainHome',
// meta: { title: '数据可视化管理', icon: '' },
// },
{
path: '/sub-government-affairs-service/individual',
component: () => import('@/views/productOperateMain/individual/index.vue'),
name: 'individual',
meta: { title: '个体户', icon: '' },
},
{
path: '/sub-government-affairs-service/collective',
component: () => import('@/views/productOperateMain/collective/index.vue'),
name: 'collective',
meta: { title: '村集体', icon: '' },
meta: { title: '农户管理', icon: '' },
},
// {
// path: '/sub-government-affairs-service/collective',
// component: () => import('@/views/productOperateMain/collective/index.vue'),
// name: 'collective',
// meta: { title: '村集体', icon: '' },
// },
{
path: '/sub-government-affairs-service/coop',
component: () => import('@/views/productOperateMain/coOp/index.vue'),
name: 'coop',
meta: { title: '合作社', icon: '' },
},
{
path: '/sub-government-affairs-service/enterprise',
component: () => import('@/views/productOperateMain/enterprise/index.vue'),
name: 'enterprise',
meta: { title: '经营企业', icon: '' },
meta: { title: '农企合作社管理', icon: '' },
},
// {
// path: '/sub-government-affairs-service/enterprise',
// component: () => import('@/views/productOperateMain/enterprise/index.vue'),
// name: 'enterprise',
// meta: { title: '经营企业', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/individual',
// component: () => import('@/views/productOperateMain/individual/index.vue'),
// name: 'individual',
@ -62,18 +62,18 @@ export default [
// name: 'enterprise',
// meta: { title: '经营企业', icon: 'Document' },
// },
{
path: '/sub-government-affairs-service/examineList',
component: () => import('@/views/productOperateMain/examine/list.vue'),
name: 'examineList',
meta: { title: '主体审核管理', icon: '' },
},
{
path: '/sub-government-affairs-service/examineRecord',
component: () => import('@/views/productOperateMain/examine/record.vue'),
name: 'examineRecord',
meta: { title: '主体审核历史', icon: '' },
},
// {
// path: '/sub-government-affairs-service/examineList',
// component: () => import('@/views/productOperateMain/examine/list.vue'),
// name: 'examineList',
// meta: { title: '主体审核管理', icon: '' },
// },
// {
// path: '/sub-government-affairs-service/examineRecord',
// component: () => import('@/views/productOperateMain/examine/record.vue'),
// name: 'examineRecord',
// meta: { title: '主体审核历史', icon: '' },
// },
],
},
];

View File

@ -7,35 +7,41 @@ 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',
component: () => import('@/views/resource/grid/index.vue'),
name: 'grid1',
path: '/sub-government-affairs-service/add-grid',
component: () => import('@/views/resource/grid/AddGrid.vue'),
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/GridMember.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,
...landsRoutes,
...statisticsRoutes,
// ...statisticsRoutes,
...dictRoutes,
],
},

View File

@ -8,12 +8,12 @@ export default [
redirect: '/sub-government-affairs-service/analysis-land',
meta: { title: '统计分析', icon: 'icon-test' },
children: [
{
path: '/sub-government-affairs-service/analysis-land',
component: () => import('@/views/resource/statisticAnalysis/land/index.vue'),
name: 'analysis-land',
meta: { title: '土地利用与规划分析', icon: '' },
},
// {
// path: '/sub-government-affairs-service/analysis-land',
// component: () => import('@/views/resource/statisticAnalysis/land/index.vue'),
// name: 'analysis-land',
// meta: { title: '土地利用与规划分析', icon: '' },
// },
{
path: '/sub-government-affairs-service/analysis-agriculture',
name: 'analysis-agriculture',

View File

@ -13,7 +13,7 @@ export default [
path: '/sub-government-affairs-service/record',
name: 'record',
component: Views,
meta: { title: '种植档案', icon: 'Tickets' },
meta: { title: '种植档案', icon: 'Tickets' },
redirect: '/sub-government-affairs-service/record-base',
children: [
{
@ -26,7 +26,7 @@ export default [
path: '/sub-government-affairs-service/record-seed',
component: () => import('@/views/trace/record/seed/index.vue'),
name: 'record-seed',
meta: { title: '种档案', icon: '' },
meta: { title: '种档案', icon: '' },
},
],
},

View File

@ -19,7 +19,7 @@ const whiteList = [];
router.beforeEach(async (to, from, next) => {
NProgress.start();
if (typeof to.meta.title === 'string') {
document.title = '政务服务 | ' + to.meta.title;
document.title = '产业政务平台 | ' + to.meta.title;
}
const userStore = useUserStore();

View File

@ -33,13 +33,13 @@
<template #growthCycle-form="{ row, column, value, type }">
<el-input-number v-model="growthCycleVal[0]" :disabled="type == 'view' ? true : false" :min="1" :max="30" style="width: 130px">
<template #suffix>
<span></span>
<span></span>
</template>
</el-input-number>
&nbsp; - &nbsp;
<el-input-number v-model="growthCycleVal[1]" :min="1" :disabled="type == 'view' ? true : false" :max="30" style="width: 130px">
<template #suffix>
<span></span>
<span></span>
</template>
</el-input-number>
</template>
@ -137,6 +137,9 @@ const state = reactive({
message: '请输入',
trigger: 'blur',
},
formatter: (row, column, cellValue) => {
return cellValue ? cellValue + '亩' : '';
},
},
{
label: '种植月份',
@ -154,6 +157,9 @@ const state = reactive({
}
},
},
formatter: (row, column, cellValue) => {
return cellValue ? cellValue + '月' : '';
},
},
{
label: '生长周期',
@ -172,6 +178,9 @@ const state = reactive({
}
},
},
formatter: (row, column, cellValue) => {
return cellValue ? cellValue + '天' : '';
},
},
{
label: '备注',

View File

@ -2,7 +2,7 @@
<div class="custom-page">
<el-row :gutter="20">
<splitpanes class="default-theme">
<pane size="16">
<!-- <pane size="16">
<el-col>
<custom-table-tree title="土地用途分类信息" :data="treeData" :option="treeOption" filter @node-click="handleNodeClick">
<template #default="{ data }">
@ -12,7 +12,7 @@
</template>
</custom-table-tree>
</el-col>
</pane>
</pane> -->
<pane size="84">
<el-col>
<avue-crud
@ -32,6 +32,46 @@
@row-del="rowDel"
@row-save="rowSave"
@row-update="rowUpdate"
>
<template #icon="{ row }">
<i :class="row.icon" style="font-size: 24px"></i>
</template>
<!-- <template #icon="{ row }">
<i :class="row.icon" style="font-size: 24px"></i>
</template>
<template #menu="{ row, size }">
<el-button :size="size" text type="primary" @click="handleAdd(row)">新增子级</el-button>
</template> -->
<template #menu-left>
<el-button type="success" icon="download" @click="onExport">导出</el-button>
</template>
<template #status="{ row }">
<el-tag v-if="row.status == 1" type="success">启用</el-tag>
<el-tag v-if="row.status == 0" type="danger">禁用</el-tag>
</template>
<template #menu="scope">
<custom-table-operate :actions="state.options.actions" :data="scope" />
</template>
</avue-crud>
<!-- <avue-crud
ref="crudRef"
v-model="state.form"
v-model:search="state.query"
v-model:page="state.pageData"
:table-loading="state.loading"
:data="state.data"
:option="state.options"
@refresh-change="refreshChange"
@search-reset="searchChange"
@search-change="searchChange"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@row-del="rowDel"
@row-save="rowSave"
@row-update="rowUpdate"
>
<template #menu-left>
<el-button type="success" icon="download" @click="onExport">导出</el-button>
@ -45,7 +85,7 @@
<template #menu="scope">
<custom-table-operate :actions="state.options.actions" :data="scope" />
</template>
</avue-crud>
</avue-crud> -->
</el-col>
</pane>
</splitpanes>
@ -83,10 +123,16 @@ const state = reactive({
selection: [],
options: {
...CRUD_OPTIONS,
headerAlign: 'center',
align: 'center',
border: true,
index: true,
rowKey: 'id',
rowParentKey: 'pid',
dialogWidth: 600,
selection: false,
column: [
{ label: '编号', prop: 'id', addDisplay: false, editDisplay: false },
// { label: '', prop: 'id', addDisplay: false, editDisplay: false },
{
label: '分类名称',
prop: 'landType',
@ -198,7 +244,14 @@ const getLandTree = async () => {
try {
const res = await getLandTypeTree();
if (res.code == 200) {
const { current, size, total, records } = res.data;
treeData.value = [{ id: '0', landType: '土地分类', children: res.data }];
state.data = treeData.value;
state.pageData = {
currentPage: current || 1,
pageSize: size || 10,
total: total,
};
}
} catch (err) {
app.$message.error(err.msg);
@ -235,24 +288,28 @@ const loadData = () => {
const handleNodeClick = (data, node) => {
treeSelected.value = data;
loadData();
// loadData();
getLandTree();
};
onMounted(() => {
loadData();
// loadData();
getLandTree();
});
//
const currentChange = (current) => {
state.query.current = current;
loadData();
// loadData();
getLandTree();
};
//
const sizeChange = (size) => {
state.query.current = 1;
state.query.size = size;
loadData();
// loadData();
getLandTree();
};
//
@ -260,12 +317,14 @@ const searchChange = (params, done) => {
if (done) done();
state.query = params;
state.query.current = 1;
loadData();
// loadData();
getLandTree();
};
//
const refreshChange = () => {
loadData();
// loadData();
getLandTree();
app.$message.success('刷新成功');
};
@ -286,8 +345,9 @@ async function rowStatus(row) {
if (res.code == 200) {
app.$message.success('操作成功!');
nextTick(() => {
state.data[row.$index].status = status;
loadData();
row.status = status;
// loadData();
// getLandTree();
});
}
}
@ -298,7 +358,7 @@ async function rowDel(row, done, loading) {
if (res.code === 200) {
app.$message.success('已删除!');
getLandTree();
loadData();
// loadData();
done();
}
loading();
@ -320,7 +380,7 @@ const rowSave = async (row, done, loading) => {
app.$message.success('添加成功!');
done();
getLandTree();
loadData();
// loadData();
}
})
.catch((err) => {
@ -343,7 +403,7 @@ const rowUpdate = (row, index, done, loading) => {
editLandType(row).then((res) => {
if (res.code === 200) {
app.$message.success('更新成功!');
loadData();
// loadData();
getLandTree();
done();
}

View File

@ -26,7 +26,7 @@
@row-del="rowDel"
>
<template #menu-left>
<el-button type="primary" icon="Plus" @click="onAdd">新增</el-button>
<!-- <el-button type="primary" icon="Plus" @click="onAdd">新增</el-button> -->
<el-button type="success" icon="download" @click="onExport">导出</el-button>
</template>
@ -46,6 +46,7 @@ import { useApp } from '@/hooks';
import { CRUD_OPTIONS } from '@/config';
import { useUserStore } from '@/store/modules/user';
import { getRegion } from '@/apis/index';
import { getAnnualList } from '@/apis/land';
const { VITE_APP_BASE_API } = import.meta.env;
const app = useApp();
@ -133,26 +134,26 @@ const infoData = reactive({
});
const loadData = () => {
//state.loading = true;
// getAnnualList(state.query)
// .then((res) => {
// if (res.code === 200) {
// const { current, size, total, records } = res.data;
// state.data = records;
// state.pageData = {
// currentPage: current || 1,
// pageSize: size || 10,
// total: total,
// };
// }
// })
// .catch((err) => {
// app.$message.error(err.msg);
// state.data = [];
// })
// .finally(() => {
// state.loading = false;
// });
state.loading = true;
getAnnualList(state.query)
.then((res) => {
if (res.code === 200) {
const { current, size, total, records } = res.data;
state.data = records;
state.pageData = {
currentPage: current || 1,
pageSize: size || 10,
total: total,
};
}
})
.catch((err) => {
app.$message.error(err.msg);
state.data = [];
})
.finally(() => {
state.loading = false;
});
};
const getTree = () => {
@ -202,24 +203,24 @@ const selectionChange = (rows) => {
};
const handleNodeClick = (data) => {
// if (data.level == '2') {
// return;
// }
// if (data.level == '0') {
// infoData.countyId = data.id;
// infoData.townId = '';
// }
// if (data.level == '1') {
// let countys =
// typeTree.filter((m) => {
// return m.id == data.pId;
// }) || [];
// let town = countys[0] && countys[0].children ? countys[0].children : [];
// townOptions = town;
// infoData.townId = data.id;
// infoData.countyId = data.pId;
// }
// console.info('infoData', infoData);
if (data.level == '2') {
return;
}
if (data.level == '0') {
infoData.countyId = data.id;
infoData.townId = '';
}
if (data.level == '1') {
let countys =
typeTree.value.filter((m) => {
return m.id == data.pId;
}) || [];
let town = countys[0] && countys[0].children ? countys[0].children : [];
townOptions.value = town;
infoData.townId = data.id;
infoData.countyId = data.pId;
}
console.info('infoData', infoData);
};
//
const rowStatus = (row) => {

View File

@ -6,13 +6,13 @@
<b class="statistic-title">综合数据统计</b>
<el-row :gutter="16" style="margin-top: 40px">
<el-col :span="8" class="text-center">
<p>农村人口</p>
<p>人口</p>
<avue-count-up end="27.88" :decimals="2" class="text-primary" />
<em>万人</em>
</el-col>
<el-col :span="8" class="text-center">
<p>耕地面积</p>
<avue-count-up end="103.88" :decimals="2" class="text-warning" />
<avue-count-up end="17" :decimals="2" class="text-warning" />
<em>万亩</em>
</el-col>
<el-col :span="8" class="text-center">
@ -38,7 +38,8 @@
<el-row :gutter="16" style="margin-bottom: 20px">
<el-col :span="12">
<el-card shadow="hover">
<custom-echart-bar :chart-data="state.breedingData" height="400px" :option="state.breedingOption" />
<!-- <custom-echart-bar :chart-data="state.breedingData" height="400px" :option="state.breedingOption" /> -->
<custom-echart-pie :chart-data="state.businessData" height="400px" :option="state.businessOption" />
</el-card>
</el-col>
<el-col :span="12">
@ -51,14 +52,15 @@
<el-row :gutter="16" style="margin-bottom: 20px">
<el-col :span="12">
<el-card shadow="hover">
<custom-echart-pie :chart-data="state.businessData" height="400px" :option="state.businessOption" />
</el-card>
</el-col>
<el-col :span="12">
<el-card shadow="hover">
<!-- <custom-echart-pie :chart-data="state.businessData" height="400px" :option="state.businessOption" /> -->
<custom-echart-mixin :chart-data="state.codingData" :option="state.codingOption" height="400px" />
</el-card>
</el-col>
<!-- <el-col :span="12">
<el-card shadow="hover">
<custom-echart-mixin :chart-data="state.codingData" :option="state.codingOption" height="400px" />
</el-card>
</el-col> -->
</el-row>
</div>
</template>
@ -85,11 +87,11 @@ const state = reactive({
},
yAxis: {
type: 'value',
name: '亩',
name: '亩',
},
tooltip: {
formatter: function (params) {
return `${params.name}${params.value}`;
return `${params.name}${params.value}`;
},
},
barStyle: {
@ -101,16 +103,16 @@ const state = reactive({
},
},
areaData: [
{ value: 230, name: '耿马镇' },
{ value: 165, name: '勐永镇' },
{ value: 217, name: '勐撒镇' },
{ value: 200, name: '孟定镇' },
{ value: 305, name: '大兴乡' },
{ value: 2, name: '耿马镇' },
{ value: 6, name: '勐永镇' },
{ value: 4, name: '勐撒镇' },
{ value: 2, name: '孟定镇' },
{ value: 3, name: '大兴乡' },
],
breedingOption: {
color: ['#41b879', '#fed500'],
title: {
text: '种殖综合数据统计',
text: '种殖综合数据统计',
textStyle: {
color: '#333',
},
@ -131,9 +133,9 @@ const state = reactive({
},
breedingData: [
{ value: 230, name: '种植面积', unit: '亩' },
{ value: 165, name: '养殖面积', unit: '亩' },
// { value: 165, name: '', unit: '' },
{ value: 217, name: '种植基地', unit: '个' },
{ value: 200, name: '养殖基地', unit: '个' },
// { value: 200, name: '', unit: '' },
],
inputsOption: {
color: ['#ffd500'],
@ -192,9 +194,9 @@ const state = reactive({
},
inputsData: [
{ value: 75, 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: 38, name: '使', type: '', max: 100, unit: '' },
{ value: 18, name: '种子使用', type: '投入品', max: 100, unit: '吨' },
// { value: 55, name: '使', type: '', max: 100, unit: '' },
{ value: 65, name: '肥料使用', type: '投入品', max: 100, unit: '吨' },
],
businessOption: {
@ -233,12 +235,12 @@ const state = reactive({
],
},
businessData: [
{ value: 28, name: '个体户' },
{ value: 358, name: '村集体' },
{ value: 217, name: '合作社' },
{ value: 128, name: '农资企业' },
{ value: 22, name: '种源企业' },
{ value: 41, name: '生产加工企业' },
{ value: 217, name: '农户' },
// { value: 358, name: '' },
{ value: 28, name: '农企/合作社' },
// { value: 128, name: '' },
// { value: 22, name: '' },
// { value: 41, name: '' },
],
codingOption: {
color: ['#41b879', '#ffd500'],

View File

@ -21,7 +21,8 @@
@row-update="handleRowUpdate"
>
<template #menu="{ row }">
<el-button type="primary">详情</el-button>
<!-- <el-button type="primary">详情</el-button> -->
暂无
</template>
</avue-crud>
</section>
@ -154,16 +155,65 @@ async function getData(resetPage) {
searchCondition.value
);
console.log('params', params);
for (let i = 0; i < 14; i++) {
data.value.push({
taskNum: '20220101' + `${i}${i}${i}${i}${i}`,
taskType: i % 2 == 0 ? '0' : '1',
enterpriseName: '上海XX有限公司',
enterpriseOwner: '张三',
phone: '123456789',
status: i % 2 == 0 ? '0' : '1',
});
}
data.value = [
{
taskNum: '202451211',
taskType: '0',
enterpriseName: '合肥丰乐种业股份有限公司',
enterpriseOwner: '戴登安',
phone: '18785733748',
status: '0',
},
{
taskNum: '202471241',
taskType: '0',
enterpriseName: '山东登海种业股份有限公司',
enterpriseOwner: '唐世伟',
phone: '18785733748',
status: '0',
},
{
taskNum: '2024111241',
taskType: '0',
enterpriseName: '甘肃省敦煌种业股份有限公司',
enterpriseOwner: '李世晓',
phone: '15685474526',
status: '0',
},
{
taskNum: '2024112244',
taskType: '1',
enterpriseName: '河南秋乐种业科技股份有限公司',
enterpriseOwner: '侯传伟',
phone: '17485693256',
status: '1',
},
{
taskNum: '2024122242',
taskType: '0',
enterpriseName: '安徽荃银高科种业股份有限公司',
enterpriseOwner: '应敏杰',
phone: '18423568745',
status: '0',
},
{
taskNum: '2024122242',
taskType: '0',
enterpriseName: '辽宁东亚种业有限公司',
enterpriseOwner: '杨永华',
phone: '15236989568',
status: '0',
},
{
taskNum: '202472255',
taskType: '0',
enterpriseName: '云南广大种业有限公司',
enterpriseOwner: '王云贵',
phone: '13888965335',
status: '0',
},
];
pageData.value.total = data.value.length;
_loading.value = false;
}

View File

@ -0,0 +1,270 @@
<template>
<div class="custom-page">
<!-- 替换为 avue-crud 表格区域 -->
<avue-crud ref="crudRef" v-model:data="tableData" v-model:page="pagination" :option="options">
<template #search>
<!-- 搜索区域 -->
<div class="search-area">
<el-input v-model="searchForm.name" placeholder="投入品名称" style="width: 200px; margin-right: 10px"></el-input>
<el-button type="primary" @click="searchData">搜索</el-button>
<el-button @click="resetSearch">重置</el-button>
</div>
</template>
<template #menu-left><el-button type="primary" icon="Plus" @click="openDialog">新增</el-button></template>
<template #menu="scope">
<custom-table-operate :actions="options.actions" :data="scope" />
</template>
</avue-crud>
<!-- 新增/编辑弹窗 -->
<el-dialog v-model="dialogVisible" :title="isEdit ? '编辑投入品' : '新增投入品'" width="600px">
<el-form ref="formRef" :model="formData" label-width="100px" class="custom-form">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" class="custom-input"></el-input>
</el-form-item>
<el-form-item label="规格" prop="specification">
<el-input v-model="formData.specification" class="custom-input"></el-input>
</el-form-item>
<el-form-item label="厂家" prop="manufacturer">
<el-input v-model="formData.manufacturer" class="custom-input"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" class="custom-input" type="textarea" :rows="3"></el-input>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer custom-footer">
<el-button @click="dialogVisible = false" class="custom-button">取消</el-button>
<el-button type="primary" @click="submitForm" class="custom-button">确定</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { ref, reactive, computed } from 'vue';
import { ElMessage } from 'element-plus';
import { CRUD_OPTIONS, customRules } from '@/config';
//
const initialTableData = [
{
id: 1,
name: '甘蔗专用全生物降解地膜',
specification: '厚度0.008mm-0.012mm宽度800mm-1200mm',
manufacturer: '耿马特斯郎全生物降解材料有限公司',
remark: '可根据甘蔗种植需求定制',
},
{
id: 2,
name: '华丰牌加厚地膜',
specification: '厚度≥0.01mm宽度75cm-140cm',
manufacturer: '河南省银丰塑料有限公司',
remark: '符合新国标',
},
{
id: 3,
name: '高速贴片式滴灌带',
specification: '管径16mm-20mm出水流量2.0L/h、2.7L/h',
manufacturer: '库车拉依苏裕丰农民专业合作社(新疆)',
remark: '多种规格可选',
},
{
id: 4,
name: '再生滴灌带',
specification: '500米/卷',
manufacturer: '宁夏佳稼旺生态农业科技有限公司',
remark: '以旧换新50公斤废旧滴灌带兑换500米新带',
},
{
id: 5,
name: '防草布PP编织',
specification: '宽度1.2m克重90g/㎡',
manufacturer: '昆明绿保塑业有限公司',
remark: '用于果园/经济作物抑草',
},
];
//
const searchForm = reactive({
name: '',
});
// avue-crud
const crudRef = ref(null);
//
const tableData = ref([...initialTableData]);
//
const pagination = reactive({
currentPage: 1,
pageSize: 10,
total: initialTableData.length,
});
// avue-crud
const options = reactive({
...CRUD_OPTIONS,
addBtn: false,
searchBtn: false,
emptyBtn: false,
column: [
{
label: '名称',
prop: 'name',
},
{
label: '规格',
prop: 'specification',
},
{
label: '厂家',
prop: 'manufacturer',
},
{
label: '备注',
prop: 'remark',
},
],
actions: [
{
name: '编辑',
icon: 'edit',
event: ({ row }) => editData(row),
},
{
type: 'danger',
name: '删除',
icon: 'delete',
event: ({ row }) => deleteData(row.id),
},
],
});
//
const dialogVisible = ref(false);
const isEdit = ref(false);
const formRef = ref(null);
const formData = reactive({
id: null,
name: '',
specification: '',
manufacturer: '',
remark: '',
});
//
const searchData = () => {
pagination.currentPage = 1;
const filteredData = initialTableData.filter((item) => item.name.includes(searchForm.name));
tableData.value = filteredData;
pagination.total = filteredData.length;
};
//
const resetSearch = () => {
searchForm.name = '';
pagination.currentPage = 1;
tableData.value = [...initialTableData];
pagination.total = initialTableData.length;
};
//
const openDialog = () => {
isEdit.value = false;
Object.keys(formData).forEach((key) => {
if (key !== 'id') {
formData[key] = '';
}
});
formData.id = tableData.value.length > 0 ? Math.max(...tableData.value.map((item) => item.id)) + 1 : 1;
dialogVisible.value = true;
};
//
const editData = (row) => {
isEdit.value = true;
Object.assign(formData, row);
dialogVisible.value = true;
};
//
const deleteData = (id) => {
tableData.value = tableData.value.filter((item) => item.id !== id);
pagination.total = tableData.value.length;
ElMessage.success('删除成功');
};
//
const submitForm = () => {
if (isEdit.value) {
const index = tableData.value.findIndex((item) => item.id === formData.id);
if (index !== -1) {
tableData.value[index] = { ...formData };
ElMessage.success('编辑成功');
}
} else {
tableData.value.push({ ...formData });
pagination.total = tableData.value.length;
ElMessage.success('新增成功');
}
dialogVisible.value = false;
};
</script>
<style scoped>
.custom-page {
padding: 20px;
height: calc(100vh - 150px);
}
.search-area {
margin-bottom: 20px;
}
.custom-form {
padding: 20px;
}
/* 自定义输入框样式 */
.custom-input {
border-radius: 6px;
transition:
border-color 0.3s,
box-shadow 0.3s;
}
.custom-input:hover {
border-color: #409eff;
}
.custom-input:focus-within {
box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}
/* 自定义备注输入框样式 */
.custom-input textarea {
border-radius: 6px;
}
/* 对话框底部按钮区域样式 */
.custom-footer {
padding: 10px 20px 20px;
}
/* 自定义按钮样式 */
.custom-button {
border-radius: 6px;
transition: transform 0.2s;
}
.custom-button:hover {
transform: translateY(-2px);
}
/* 主按钮悬停效果 */
.custom-button[type='primary']:hover {
opacity: 0.9;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<section class="custom-page">
<h2>基本信息</h2>
<h2>基本信息</h2>
<TypeMenu v-if="materialTypes['4'].length > 1" v-model:type="_type" :types="materialTypes['4']" />
<br />
<avue-crud
@ -77,7 +77,7 @@ const option = ref({
menuWidth: 160,
column: [
{
label: '种名称',
label: '种名称',
prop: 'keywords',
hide: true,
search: true,
@ -86,9 +86,9 @@ const option = ref({
editDisplay: false,
},
{
label: '种名称',
label: '种名称',
prop: 'seedName',
rules: customRules({ msg: '请输入种名称' }),
rules: customRules({ msg: '请输入种名称' }),
},
{
prop: 'manufacturer',

View File

@ -4,7 +4,6 @@
ref="crudRef"
v-model:search="searchCondition"
v-model:page="pageData"
:table-loading="_loading"
:option="option"
:data="data"
@search-change="

View File

@ -6,7 +6,7 @@
v-model:search="state.query"
v-model:page="state.pageData"
:table-loading="state.loading"
:data="state.data"
:data="data"
:option="state.options"
@refresh-change="refreshChange"
@search-reset="searchChange"
@ -77,17 +77,101 @@ const handleLandChange = async (value, form, done) => {
const productTypeOptions = reactive([
{ label: '蔬菜', value: '0' },
{ label: '水果', value: '1' },
{ label: '畜产品', value: '2' },
{ label: '水产品', value: '3' },
{ label: '谷物', value: '4' },
{ label: '农资', value: '5' },
{ label: '种源', value: '6' },
{ label: '农产品加工', value: '7' },
{ label: '其他', value: '8' },
]);
const bTypeOptions = reactive([
{ label: '养殖', value: '0' },
{ label: '种植', value: '1' },
{ label: '畜牧业', value: '1' },
{ label: '农户', value: '0' },
// { label: '', value: '1' },
{ label: '合作社', value: '2' },
]);
let timeVal = ref([]);
const licenseImg = ref('');
const permitImg = ref('');
const data = reactive([
{
crop1: '100001',
crop2: '耿马佑氏种植专业合作社',
crop3: '蔬菜',
crop4: '>20人',
crop5: '云南省临沧市耿马县耿马镇城区甘东村允楞芒抗山',
crop6: '何仙义',
crop7: '18008834114',
crop8: '93530926MA6K3M3K5U',
crop9: '图片',
crop10: '无固定期限',
crop11: '已通过',
crop12: '暂无',
crop13: '2025-03-01',
},
{
crop1: '100002',
crop2: '耿马金田园种植专业合作社',
crop3: '蔬菜',
crop4: '>20人',
crop5: '云南省临沧市耿马县四排山公路6公里处',
crop6: '董福良',
crop7: '13578302599',
crop8: '93530926MA6N6C4N8U',
crop9: '图片',
crop10: '无固定期限',
crop11: '已通过',
crop12: '暂无',
crop13: '2025-01-01',
},
{
crop1: '100003',
crop2: '耿马原生茶叶种植专业合作社',
crop3: '蔬菜',
crop4: '>20人',
crop5: '云南省临沧市耿马县四排山公路20公里处',
crop6: '李伟荣',
crop7: '13529623147',
crop8: '935309260752901376',
crop9: '图片',
crop10: '无固定期限',
crop11: '已通过',
crop12: '暂无',
crop13: '2025-02-11',
},
{
crop1: '100004',
crop2: '耿马华侨金果源农业专业合作社',
crop3: '蔬菜',
crop4: '>20人',
crop5: '云南省临沧市耿马县华侨管理区第五居民小组',
crop6: '严共洪',
crop7: '13987011022',
crop8: '93530926MA6L3A7F8T',
crop9: '图片',
crop10: '无固定期限',
crop11: '已通过',
crop12: '暂无',
crop13: '2025-03-01',
},
{
crop1: '100005',
crop2: '耿马尖山沿边魔芋种植农民专业合作社',
crop3: '蔬菜',
crop4: '>20人',
crop5: '云南省临沧市耿马傣族佤族自治县孟定镇尖山村沿线9公里处',
crop6: '商德伟',
crop7: '13888526321',
crop8: '93530926MA6KR6E41C',
crop9: '图片',
crop10: '无固定期限',
crop11: '已通过',
crop12: '暂无',
crop13: '2025-04-25',
},
]);
const state = reactive({
loading: false,
@ -107,7 +191,7 @@ const state = reactive({
column: [
{
label: '主体代码',
prop: 'executor',
prop: 'crop1',
addDisplay: false,
editDisplay: false,
search: true,
@ -119,7 +203,7 @@ const state = reactive({
},
{
label: '主体名称',
prop: 'executor',
prop: 'crop2',
search: true,
addDisplay: false,
editDisplay: false,
@ -131,7 +215,7 @@ const state = reactive({
},
{
label: '经营产品种类',
prop: 'landId',
prop: 'crop3',
type: 'select',
remote: false,
search: true,
@ -155,21 +239,21 @@ const state = reactive({
],
change: handleLandChange,
},
{
label: '主要经营产品',
showOverflowTooltip: true,
search: false,
addDisplay: false,
editDisplay: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
// {
// label: '',
// showOverflowTooltip: true,
// search: false,
// addDisplay: false,
// editDisplay: false,
// rules: {
// required: true,
// message: '',
// trigger: 'blur',
// },
// },
{
label: '合作社规模',
prop: 'crop',
prop: 'crop4',
search: false,
addDisplay: false,
editDisplay: false,
@ -179,9 +263,38 @@ const state = reactive({
trigger: 'blur',
},
},
// {
// label: '',
// prop: 'cities',
// type: 'cascader',
// hide: true,
// addDisplay: true,
// editDisplay: true,
// viewDisplay: false,
// // multiple: true,
// // checkStrictly: true,
// // collapseTags: true,
// // emitPath: false,
// // checkDescendants: false,
// props: {
// label: 'areaName',
// value: 'areaCode',
// children: 'areaChildVOS',
// },
// dicUrl: `${VITE_APP_BASE_API}/system/area/region?areaCode=530000`,
// dicHeaders: {
// authorization: UserStore.token,
// },
// dicFormatter: (res) => res.data ?? [],
// rules: {
// required: true,
// message: '',
// trigger: 'blur',
// },
// },
{
label: '合作社地址',
prop: 'villageCode',
prop: 'crop5',
type: 'cascader',
addDisplay: false,
editDisplay: false,
@ -207,7 +320,7 @@ const state = reactive({
},
{
label: '负责人',
prop: 'crop',
prop: 'crop6',
search: false,
addDisplay: false,
editDisplay: false,
@ -219,7 +332,7 @@ const state = reactive({
},
{
label: '负责人电话',
prop: 'crop',
prop: 'crop7',
search: false,
addDisplay: false,
editDisplay: false,
@ -231,19 +344,7 @@ const state = reactive({
},
{
label: '企业信用代码',
prop: 'crop',
search: false,
addDisplay: false,
editDisplay: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{
label: '经营许可证',
prop: 'crop',
prop: 'crop8',
search: false,
addDisplay: false,
editDisplay: false,
@ -253,9 +354,21 @@ const state = reactive({
trigger: 'blur',
},
},
// {
// label: '',
// prop: 'crop9',
// search: false,
// addDisplay: false,
// editDisplay: false,
// rules: {
// required: true,
// message: '',
// trigger: 'blur',
// },
// },
{
label: '经营有效期',
prop: 'crop',
prop: 'crop10',
search: false,
addDisplay: false,
editDisplay: false,
@ -267,7 +380,7 @@ const state = reactive({
},
{
label: '审核状态',
prop: 'crop',
prop: 'crop11',
addDisplay: false,
editDisplay: false,
search: false,
@ -279,7 +392,7 @@ const state = reactive({
},
{
label: '审核意见',
prop: 'crop',
prop: 'crop12',
addDisplay: false,
editDisplay: false,
rules: {
@ -288,7 +401,7 @@ const state = reactive({
trigger: 'blur',
},
},
{ label: '创建时间', prop: 'crop', addDisplay: false, editDisplay: false, search: false },
{ label: '创建时间', prop: 'crop13', addDisplay: false, editDisplay: false, search: false },
],
group: [
{
@ -297,7 +410,7 @@ const state = reactive({
column: [
{
label: '主体名称',
prop: 'taskCode',
prop: 'businessName',
rules: { required: true, message: '请输入', trigger: 'blur' },
},
{
@ -315,7 +428,7 @@ const state = reactive({
},
{
label: '主要产品',
prop: 'product',
prop: 'primaryProduct',
rules: { required: false, message: '请输入', trigger: 'blur' },
},
{
@ -335,9 +448,9 @@ const state = reactive({
},
{
label: '合作社地址',
prop: 'inspectionTarget',
prop: 'villageCode',
rules: { required: true, message: '请输入', trigger: 'blur' },
type: 'select',
type: 'cascader',
props: {
label: 'areaName',
value: 'areaCode',

View File

@ -344,7 +344,7 @@ const state = reactive({
label: '合作社地址',
prop: 'inspectionTarget',
rules: { required: true, message: '请输入', trigger: 'blur' },
type: 'select',
type: 'cascader',
props: {
label: 'areaName',
value: 'areaCode',

View File

@ -6,7 +6,7 @@
v-model:search="state.query"
v-model:page="state.pageData"
:table-loading="state.loading"
:data="state.data"
:data="data"
:option="state.options"
@refresh-change="refreshChange"
@search-reset="searchChange"
@ -93,6 +93,31 @@ const enterpriseBase = [
{ label: '公司地址', prop: 'crop' },
];
const data = reactive([
{
executor: '100001',
executors: '好又来蔬菜批发公司',
BType: '农企合作社',
operationDate: '2030-05-23',
crop: '蔬菜',
status: '通过',
seek: '暂无',
seektime: '2025-01-12',
creatTime: '2025-01-1-01',
},
{
executor: '100002',
executors: '亚恒商贸有限公司',
BType: '农企合作社',
operationDate: '2030-03-22',
crop: '蔬菜',
status: '通过',
seek: '暂无',
seektime: '2025-01-05',
creatTime: '2025-01-1-01',
},
]);
const state = reactive({
loading: false,
query: {
@ -124,7 +149,7 @@ const state = reactive({
},
{
label: '主体名称',
prop: 'executor',
prop: 'executors',
search: true,
addDisplay: false,
editDisplay: false,
@ -171,18 +196,18 @@ const state = reactive({
addDisplay: false,
editDisplay: false,
},
{
label: '经营产品种类',
showOverflowTooltip: true,
search: false,
addDisplay: false,
editDisplay: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
// {
// label: '',
// showOverflowTooltip: true,
// search: false,
// addDisplay: false,
// editDisplay: false,
// rules: {
// required: true,
// message: '',
// trigger: 'blur',
// },
// },
{
label: '主要产品',
prop: 'crop',
@ -197,19 +222,19 @@ const state = reactive({
},
{
label: '审核状态',
prop: 'crop',
prop: 'status',
addDisplay: false,
editDisplay: false,
search: false,
},
{
label: '审核意见',
prop: 'crop',
prop: 'seek',
addDisplay: false,
editDisplay: false,
},
{ label: '审核时间', prop: 'crop', addDisplay: false, editDisplay: false, search: false },
{ label: '创建时间', prop: 'crop', addDisplay: false, editDisplay: false, search: false },
{ label: '审核时间', prop: 'seektime', addDisplay: false, editDisplay: false, search: false },
{ label: '创建时间', prop: 'creatTime', addDisplay: false, editDisplay: false, search: false },
],
searchColumn: [
{ label: '主体代码', prop: 'landName', search: true },

View File

@ -3,14 +3,11 @@
<avue-crud
ref="crudRef"
v-model="state.form"
v-model:search="state.query"
v-model:page="state.pageData"
:table-loading="state.loading"
:data="state.data"
:option="state.options"
@refresh-change="refreshChange"
@search-reset="searchChange"
@search-change="searchChange"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@ -20,7 +17,7 @@
>
<template #menu-left>
<!-- <el-button type="primary" icon="Upload" @click="onImport">导入</el-button> -->
<el-button type="danger" icon="Delete" @click="onBatchDel">批量删除</el-button>
<!-- <el-button type="danger" icon="Delete" @click="onBatchDel">批量删除</el-button> -->
</template>
<!-- <template #operationDate-search>
@ -39,279 +36,132 @@ import { useApp } from '@/hooks';
import { CRUD_OPTIONS } from '@/config';
import { isEmpty, downloadFile } from '@/utils';
import { useUserStore } from '@/store/modules/user';
import {
getOperationRecord,
saveOperationRecord,
editOperationRecord,
delOperationRecord,
exportOperationRecord,
getAddrCropByLand,
importOperationRecord,
} from '@/apis/land';
fetchBusinessSubjectList,
saveBusinessSubject,
editBusinessSubject,
deleteBusinessSubject,
fetchBusinessSubjectInfo,
} from '@/apis/businessEntity';
const { VITE_APP_BASE_API } = import.meta.env;
const app = useApp();
const UserStore = useUserStore();
const crudRef = ref(null);
const handleLandChange = async (value, form, done) => {
if (!value || !value.item || !value.item.id) return; //
let val = {};
getAddrCropByLand(value.item?.id || '')
.then((res) => {
if (res.code === 200) {
val = res.data || {};
}
})
.catch((err) => {
val = {};
})
.finally(() => {});
state.form.crop = val?.crop || value.item?.crop;
state.form.address = val?.county + val?.town + val?.village || value.item?.address;
};
const jobTypeOptions = reactive([
{ label: '蔬菜', value: '0' },
{ label: '水果', value: '1' },
]);
let timeVal = ref([]);
const state = reactive({
loading: false,
query: {
current: 1,
size: 10,
},
query: { current: 1, size: 10, businessType: 0 },
form: {},
selection: [],
pageData: { currentPage: 1, pageSize: 10, total: 0 },
data: [],
options: {
...CRUD_OPTIONS,
addBtnText: '添加',
searchLabelWidth: '120px',
searchSpan: 8,
searchGutter: 100,
searchMenuPosition: 'center',
column: [
{
label: '主体代码',
prop: 'executor',
addDisplay: false,
editDisplay: false,
search: true,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{
label: '主体名称',
prop: 'executor',
search: true,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{ label: '主体代码', prop: 'id' },
{ label: '主体名称', prop: 'businessName' },
{
label: '经营产品种类',
prop: 'landId',
prop: 'productType',
type: 'select',
remote: false,
search: true,
props: {
label: 'landName',
value: 'id',
},
dicHeaders: {
authorization: UserStore.token,
},
dicUrl: `${VITE_APP_BASE_API}/land-resource/landManage/page?current=1&size=9999&draftsSaveType=0&landName=&gridName=&owner=`,
dicFormatter: (res) => res.data.records ?? [],
rules: [
{
required: true,
message: '请选择地块',
trigger: 'blur',
},
dicData: [
{ label: '蔬菜', value: '0' },
{ label: '水果', value: '1' },
{ label: '畜产品', value: '2' },
{ label: '水产品', value: '3' },
{ label: '谷物', value: '4' },
{ label: '农资', value: '5' },
{ label: '种源', value: '6' },
{ label: '农产品加工', value: '7' },
{ label: '其他', value: '8' },
],
change: handleLandChange,
},
{
label: '主要经营产品',
showOverflowTooltip: true,
search: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{
label: '户主身份证号',
prop: 'crop',
search: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{ label: '主要经营产品', prop: 'primaryProduct' },
{ label: '户主身份证号', prop: 'idCard' },
{
label: '联系地址',
prop: 'villageCode',
prop: 'address',
type: 'cascader',
checkStrictly: false,
search: false,
props: {
label: 'areaName',
value: 'areaCode',
children: 'areaChildVOS',
},
props: { label: 'areaName', value: 'areaCode', children: 'areaChildVOS' },
dicUrl: `${VITE_APP_BASE_API}/system/area/region?areaCode=530000`,
dicHeaders: {
authorization: UserStore.token,
},
dicFormatter: (res) => res.data ?? [],
rules: [
{
required: true,
message: '请选择',
trigger: 'blur',
},
],
},
{
label: '详细地址',
prop: 'crop',
search: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{
label: '联系电话',
prop: 'crop',
search: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{
label: '联系电话',
prop: 'crop',
search: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
dicHeaders: { authorization: UserStore.token },
},
{ label: '详细地址', prop: 'detailAddress' },
{ label: '联系电话', prop: 'phone' },
{
label: '审核状态',
prop: 'crop',
addDisplay: false,
editDisplay: false,
search: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{
label: '审核意见',
prop: 'crop',
addDisplay: false,
editDisplay: false,
rules: {
required: true,
message: '请输入',
trigger: 'blur',
},
},
{ label: '创建时间', prop: 'crop', addDisplay: false, editDisplay: false, search: false },
],
searchColumn: [
{ label: '主体代码', prop: 'landName', search: true },
{ label: '主体名称', prop: 'crop', search: true },
{
label: '经营产品种类',
prop: 'operationType',
prop: 'status',
type: 'select',
search: true,
dicData: jobTypeOptions,
},
{
label: '创建日期',
prop: 'operationDate',
type: 'daterange',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
width: 200,
search: true,
dicData: [
{ label: '未审核', value: 0 },
{ label: '通过', value: 1 },
{ label: '拒绝', value: 2 },
],
},
{ label: '审核意见', prop: 'reviewSuggestion' },
{ label: '创建时间', prop: 'createTime', type: 'datetime', format: 'YYYY-MM-DD HH:mm:ss' },
],
actions: [
{
name: '详情',
icon: 'View',
event: ({ row }) => doDetail(row),
},
{
name: '编辑',
icon: 'edit',
event: ({ row }) => rowEdit(row),
},
{
type: 'danger',
name: '删除',
icon: 'delete',
event: ({ row }) => rowDel(row),
},
{ name: '详情', event: ({ row }) => viewRow(row) },
{ name: '编辑', event: ({ row }) => editRow(row) },
{ type: 'danger', name: '删除', event: ({ row }) => deleteRow(row) },
],
},
pageData: {
total: 0,
currentPage: 1,
pageSize: 10,
},
data: [],
currentRow: {},
});
//
const loadData = () => {
// state.loading = true;
// getOperationRecord(state.query)
// .then((res) => {
// if (res.code === 200) {
// const { current, size, total, records } = res.data;
// state.data = records;
// state.pageData = {
// currentPage: current || 1,
// pageSize: size || 10,
// total: total,
// };
// }
// })
// .catch((err) => {
// app.$message.error(err.msg);
// state.data = [];
// })
// .finally(() => {
// state.loading = false;
// });
state.loading = true;
fetchBusinessSubjectList(state.query)
.then((res) => {
if (res.code === 200) {
const { current, size, total, records } = res.data;
state.data = records;
state.pageData = {
currentPage: current || 1,
pageSize: size || 10,
total: total,
};
}
})
.catch((err) => {
app.$message.error(err.msg);
state.data = [];
})
.finally(() => {
state.loading = false;
});
};
loadData();
const editRow = (row) => {
fetchBusinessSubjectInfo(row.id).then((res) => {
crudRef.value.rowEdit(res.data);
});
};
const viewRow = (row) => {
fetchBusinessSubjectInfo(row.id).then((res) => {
crudRef.value.rowView(res.data);
});
};
const deleteRow = (row) => {
app
.$confirm('确认删除?', '删除', { type: 'warning' })
.then(() =>
deleteBusinessSubject(row.id).then(() => {
app.$message.success('删除成功');
loadData();
})
)
.catch(() => {});
};
//
const currentChange = (current) => {
state.query.current = current;
@ -367,35 +217,19 @@ function uniqueObjects(arr, key) {
}
//
const rowSave = (row, done, loading) => {
// console.info('', row);
saveOperationRecord(row)
.then((res) => {
if (res.code === 200) {
app.$message.success('添加成功!');
done();
loadData();
}
saveBusinessSubject(row)
.then(() => {
app.$message.success('添加成功');
done();
loadData();
})
.catch((err) => {
app.$message.error(err.msg);
})
.finally(() => {
loading();
});
.catch((e) => app.$message.error(e.msg))
.finally(() => loading());
};
//
const rowEdit = (row) => {
console.info('编辑', row);
crudRef.value.rowEdit(row);
};
const doDetail = (row) => {
crudRef.value.rowView(row);
};
const rowUpdate = (row, index, done, loading) => {
console.info('更新');
editOperationRecord(row)
editBusinessSubject(row)
.then((res) => {
if (res.code === 200) {
app.$message.success('更新成功!');
@ -411,32 +245,6 @@ const rowUpdate = (row, index, done, loading) => {
});
};
//
const rowDel = (row, index, done) => {
if (isEmpty(row)) return;
app
.$confirm(`删除后信息将不可查看,确认要删除吗?`, '确定删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
console.info('删除', row.recordId);
delOperationRecord(row.recordId || '')
.then((res) => {
if (res.code === 200) {
app.$message.success('删除成功!');
loadData();
done();
}
})
.catch((err) => {
app.$message.error(err.msg);
});
})
.catch(() => {});
};
const onBatchDel = () => {
let ids = handleIds();
if (!ids.length || ids.length <= 0) {

Some files were not shown because too many files have changed in this diff Show More