diff --git a/new-digital-agriculture-screen/components.d.ts b/new-digital-agriculture-screen/components.d.ts index 1cad2d5..ca0fa36 100644 --- a/new-digital-agriculture-screen/components.d.ts +++ b/new-digital-agriculture-screen/components.d.ts @@ -12,7 +12,7 @@ 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/custom-echart-bar/index-horizontal.vue/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'] @@ -42,7 +42,6 @@ declare module 'vue' { CustomScrollTitle: typeof import('./src/components/custom-scroll-title/index.vue')['default'] CustomTableOperate: typeof import('./src/components/custom-table-operate/index.vue')['default'] CustomTableTree: typeof import('./src/components/custom-table-tree/index.vue')['default'] - IndexHorizontal: typeof import('./src/components/custom-echart-bar/index-horizontal.vue')['default'] NewHyalineCake: typeof import('./src/components/custom-echart-hyaline-cake/new-hyaline-cake.vue')['default'] NewPie: typeof import('./src/components/custom-echart-hyaline-cake/new-pie.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/new-digital-agriculture-screen/src/assets/images/trace/maprl.png b/new-digital-agriculture-screen/src/assets/images/trace/maprl.png new file mode 100644 index 0000000..ac392ac Binary files /dev/null and b/new-digital-agriculture-screen/src/assets/images/trace/maprl.png differ diff --git a/new-digital-agriculture-screen/src/views/entities/components/categoryCharts.vue b/new-digital-agriculture-screen/src/views/entities/components/categoryCharts.vue index 7e654b2..2027b24 100644 --- a/new-digital-agriculture-screen/src/views/entities/components/categoryCharts.vue +++ b/new-digital-agriculture-screen/src/views/entities/components/categoryCharts.vue @@ -14,16 +14,16 @@ const data = ref([ 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: ' 个体', value: 23.7, diff --git a/new-digital-agriculture-screen/src/views/entities/components/entitiesMap.vue b/new-digital-agriculture-screen/src/views/entities/components/entitiesMap.vue index 13c213a..5fad641 100644 --- a/new-digital-agriculture-screen/src/views/entities/components/entitiesMap.vue +++ b/new-digital-agriculture-screen/src/views/entities/components/entitiesMap.vue @@ -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: '万元' }, ]); diff --git a/new-digital-agriculture-screen/src/views/entities/components/entitiesStatistics.vue b/new-digital-agriculture-screen/src/views/entities/components/entitiesStatistics.vue index 5ebd08b..a494c28 100644 --- a/new-digital-agriculture-screen/src/views/entities/components/entitiesStatistics.vue +++ b/new-digital-agriculture-screen/src/views/entities/components/entitiesStatistics.vue @@ -38,7 +38,6 @@ const state = reactive({ backgroundColor: 'rgba(0,0,0,0.5)', borderColor: '#35d0c0', formatter: (data) => { - console.log('data', data); const params = data[0]; let str = `
${params.name}
diff --git a/new-digital-agriculture-screen/src/views/entities/components/valueCharts.vue b/new-digital-agriculture-screen/src/views/entities/components/valueCharts.vue new file mode 100644 index 0000000..397fe75 --- /dev/null +++ b/new-digital-agriculture-screen/src/views/entities/components/valueCharts.vue @@ -0,0 +1,153 @@ + + diff --git a/new-digital-agriculture-screen/src/views/entities/index.vue b/new-digital-agriculture-screen/src/views/entities/index.vue index c3bfd86..e2a351d 100644 --- a/new-digital-agriculture-screen/src/views/entities/index.vue +++ b/new-digital-agriculture-screen/src/views/entities/index.vue @@ -10,21 +10,19 @@ :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" >
@@ -98,6 +96,7 @@ 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'; const oneRef = ref(null); const thirdRef = ref(null); @@ -113,12 +112,11 @@ 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: 3500, name: '耿马镇' }, + { value: 6000, name: '勐撒镇' }, + { value: 4000, name: '勐永镇' }, + { value: 8000, name: '孟定镇' }, + { value: 12000, name: '大兴乡' }, ], third: [ { value: 98, value1: 88, name: '耿马镇' }, diff --git a/new-digital-agriculture-screen/src/views/trace/components/detectionCharts.vue b/new-digital-agriculture-screen/src/views/trace/components/detectionCharts.vue index 4ec0555..8bf6c36 100644 --- a/new-digital-agriculture-screen/src/views/trace/components/detectionCharts.vue +++ b/new-digital-agriculture-screen/src/views/trace/components/detectionCharts.vue @@ -22,45 +22,59 @@
+
+
溯源信息
+
+
+ +
+
+
新鲜番茄
+
检测通过
+
+
+
+
权威检测
-
- 产品名称 - {{ info.productName }} -
-
- 产品批次号 - {{ info.productCode }} -
-
- 产品规格 - {{ info.specs }} -
-
- 产品类型 - {{ info.productType }} -
-
- 生产厂家 - {{ info.info && info.info.manufacturer }} -
-
- 生产时间 - {{ info.info && info.info.productTime }} -
-
- 终端零售店 - {{ info.info && info.info.shop }} +
+ {{ item.title }} + {{ item.name }}
-
+
- -
检测报告
+ + +
+
+
产地信息
+
+
+
+ +
+
+
临沧市耿马县耿马镇
+
+
+
+
仓储环节
+
+
+ {{ item.title }} + {{ item.name }} +
+
+
物流环节
+
+
+ {{ item.title }} + {{ item.name }}
@@ -82,6 +96,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 +155,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 +214,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 +311,6 @@ function handleCloseInfo() { } } .route_box { - padding: 0 34px; > div { position: relative; padding-bottom: 16px; diff --git a/sub-government-affairs-service/src/layouts/component/Header/index.vue b/sub-government-affairs-service/src/layouts/component/Header/index.vue index 3ad7fdb..3f80024 100644 --- a/sub-government-affairs-service/src/layouts/component/Header/index.vue +++ b/sub-government-affairs-service/src/layouts/component/Header/index.vue @@ -1,10 +1,3 @@ - @@ -41,6 +118,8 @@ import { getAssetsFile } from '@/utils/index.js'; import { getMonitorList } from '@/apis/brand'; const activeTab = ref('onSale'); +const dialogVisible = ref(false); +const traceData = ref(null); const tabLabels = { onSale: '在售中', @@ -83,10 +162,52 @@ const products = ref([ // 根据当前 Tab 过滤 const filteredProducts = computed(() => products.value.filter((p) => p.status === activeTab.value)); -// 操作回调 -const onInspect = (p) => { - console.log('抽查商品', p); -}; +// 点击抽查后,根据 id 单独拉取或赋值 traceData +function onInspect(id) { + console.log('查看产品:', id); + // 这里用硬编码模拟请求,实际中可换成接口调用:getTraceById(id).then(res=> traceData.value = res) + const mock = { + productName: '无土栽培土豆', + quantity: '200KG', + producer: '北大荒技术有限公司', + origin: '耿马县孟定镇下坝村', + productionDate: '2025-1-2', + traceCode: '10.5487542154785XSE254.1040201', + traceCount: 30, + base: { + address: '耿马县孟定镇下坝村', + location: '东经102° · 北纬24°', + area: 12000, + climate: '亚热带高原季风型,温和多雨', + soil: '红壤', + }, + farmingRecords: [ + { date: '2024/1/2', operation: '播种 20250102批土豆种', operator: '张小东' }, + { date: '2024/2/2', operation: '施肥 氮肥', operator: '张小东' }, + { date: '2024/3/2', operation: '浇水', operator: '张小东' }, + { date: '2024/4/2', operation: '采摘', operator: '张小东' }, + ], + packaging: { + company: '瑞禾农产品包装公司', + type: '纸箱', + person: '王大福', + time: '2025-1-2 14:00:47', + }, + logistics: { + storageType: '冷藏', + temperature: '2°C', + shipFrom: '北京市朝阳区解放路24号', + shipTo: '上海市黄浦区南京路36号', + }, + trade: { + time: '2025-1-2 14:00:47', + buyer: '刘小花', + }, + img: 'images/brand/product6.png', + }; + traceData.value = mock; + dialogVisible.value = true; +} const onRevoke = (p) => { console.log('取消授权', p); }; @@ -191,5 +312,31 @@ const statusClass = (tab) => { } } } + + .trace-record { + position: relative; + padding-right: 160px; /* 给图片预留空间 */ + } + .trace-record .section { + margin-bottom: 16px; + } + .trace-record h3 { + margin-bottom: 8px; + font-size: 18px; + color: #409eff; + border-left: 4px solid #409eff; + padding-left: 8px; + } + .trace-img { + position: absolute; + top: 16px; + right: 16px; + width: 128px; + text-align: center; + } + .trace-img img { + width: 100%; + border-radius: 4px; + } } diff --git a/sub-operation-service/src/views/brand/index.vue b/sub-operation-service/src/views/brand/index.vue index 70ff13e..34fea47 100644 --- a/sub-operation-service/src/views/brand/index.vue +++ b/sub-operation-service/src/views/brand/index.vue @@ -3,16 +3,20 @@ - + 申请图标 使用申请 - - - 授权管理 - + + + 授权记录 + 品牌制度 + @@ -29,20 +33,27 @@