import('@/views/resource/grid/index.vue'),
- name: 'grid2',
- meta: { title: '网格化地图', icon: '' },
- },
+ // {
+ // path: '/sub-government-affairs-service/grid',
+ // component: () => import('@/views/resource/grid/index.vue'),
+ // name: 'grid2',
+ // meta: { title: '网格化地图', icon: '' },
+ // },
],
},
...annualplanRouters,
diff --git a/sub-operation-service/package.json b/sub-operation-service/package.json
index 00434ae..cd6ecb0 100644
--- a/sub-operation-service/package.json
+++ b/sub-operation-service/package.json
@@ -31,6 +31,7 @@
"hls.js": "^1.6.2",
"js-base64": "^3.7.6",
"lodash": "^4.17.21",
+ "marked": "^15.0.12",
"moment": "^2.30.1",
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
diff --git a/sub-operation-service/src/router/index.js b/sub-operation-service/src/router/index.js
index e3adc0a..bd0a5f8 100644
--- a/sub-operation-service/src/router/index.js
+++ b/sub-operation-service/src/router/index.js
@@ -7,6 +7,7 @@
*/
import { createRouter, createWebHistory } from 'vue-router';
import Layout from '@/layouts/index.vue';
+import BrandLayout from '@/views/brand/index.vue';
import Views from '@/layouts/Views.vue';
import userCentre from '@/layouts/userCentre.vue';
@@ -224,43 +225,37 @@ export const constantRoutes = [
meta: { title: '公共品牌' },
children: [
{
- path: 'apply',
- component: () => import('@/views/brand/index.vue'),
+ path: '',
+ component: BrandLayout,
children: [
{
- path: '',
- component: () => import('@/views/brand/components/ApplyList.vue'),
+ path: 'apply',
name: 'brandApplyList',
+ component: () => import('@/views/brand/components/ApplyList.vue'),
meta: { title: '使用申请' },
},
{
- path: ':id',
- component: () => import('@/views/brand/components/ApplyDetail.vue'),
+ path: 'apply/:id',
name: 'brandApplyDetail',
+ component: () => import('@/views/brand/components/ApplyDetail.vue'),
meta: { title: '产品申请' },
},
- ],
- },
- {
- path: 'auth',
- component: () => import('@/views/brand/index.vue'),
- children: [
{
- path: '',
- component: () => import('@/views/brand/components/Auth.vue'),
+ path: 'auth/record',
name: 'brandAuth',
- meta: { title: '授权管理' },
+ component: () => import('@/views/brand/components/Auth.vue'),
+ meta: { title: '授权记录' },
},
- ],
- },
- {
- path: 'monitor',
- component: () => import('@/views/brand/index.vue'),
- children: [
{
- path: '',
- component: () => import('@/views/brand/components/Monitor.vue'),
+ path: 'auth/system',
+ name: 'brandSystem',
+ component: () => import('@/views/brand/components/BrandSystem.vue'),
+ meta: { title: '品牌制度' },
+ },
+ {
+ path: 'monitor',
name: 'brandMonitor',
+ component: () => import('@/views/brand/components/Monitor.vue'),
meta: { title: '使用监管' },
},
],
diff --git a/sub-operation-service/src/views/brand/components/Auth.vue b/sub-operation-service/src/views/brand/components/Auth.vue
index 82ad282..3a84398 100644
--- a/sub-operation-service/src/views/brand/components/Auth.vue
+++ b/sub-operation-service/src/views/brand/components/Auth.vue
@@ -63,7 +63,7 @@
-
{{ product.statusLabel }}
+
{{ product.statusLabel }}
{
height: 100%;
}
.product-list {
- height: 100%;
+ height: calc(100% - 40px);
overflow: auto;
}
diff --git a/sub-operation-service/src/views/brand/components/BrandSystem.vue b/sub-operation-service/src/views/brand/components/BrandSystem.vue
new file mode 100644
index 0000000..2959b43
--- /dev/null
+++ b/sub-operation-service/src/views/brand/components/BrandSystem.vue
@@ -0,0 +1,504 @@
+
+
+
+
+
+
+
diff --git a/sub-operation-service/src/views/brand/components/Monitor.vue b/sub-operation-service/src/views/brand/components/Monitor.vue
index 5db0d1d..d4146c1 100644
--- a/sub-operation-service/src/views/brand/components/Monitor.vue
+++ b/sub-operation-service/src/views/brand/components/Monitor.vue
@@ -26,12 +26,89 @@
{{ tabLabels[activeTab] }}
- 抽查
+ 抽查
取消授权
+
+
+
+
+
+
+ 基本信息
+
+ 产品名称:{{ traceData.productName }} 产品数量:{{ traceData.quantity }} 生产经营主体:{{ traceData.producer }} 原产地:{{ traceData.origin }} 生产日期:{{ traceData.productionDate }} 追溯码:{{ traceData.traceCode }} 追溯次数:{{ traceData.traceCount }} 次
+
+
+
+
+
+ 基地信息
+
+ 基地地址:{{ traceData.base.address }} 地理位置:{{ traceData.base.location }} 面积:{{ traceData.base.area }} 亩 气候条件:{{ traceData.base.climate }} 土壤类型:{{ traceData.base.soil }}
+
+
+
+
+
+
+
+
+ 分拣包装
+
+ 包装企业:{{ traceData.packaging.company }} 包装类型:{{ traceData.packaging.type }} 包装人:{{ traceData.packaging.person }} 包装时间:{{ traceData.packaging.time }}
+
+
+
+
+
+ 仓储物流信息
+
+ 存储类型:{{ traceData.logistics.storageType }}
+ 存储温度:{{ traceData.logistics.temperature }}
+ 发货地址:{{ traceData.logistics.shipFrom }} 收货地址:{{ traceData.logistics.shipTo }}
+
+
+
+
+
+ 交易信息
+
+ 交易时间:{{ traceData.trade.time }} 买家:{{ traceData.trade.buyer }}
+
+
+
+
+
+
![产品图]()
+
+
+
@@ -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..99fefad 100644
--- a/sub-operation-service/src/views/brand/index.vue
+++ b/sub-operation-service/src/views/brand/index.vue
@@ -3,16 +3,20 @@