Просмотр исходного кода

✨ feat(supply-chain): add image support for supply chain dashboards

- add imageUrls field to PopupData interface for displaying images
- add placeholder images for all seed and fruit bases in supply chain context
- add actual images to public supply-chain images directory

📦 build(assets): add supply chain images to public assets

- add "农业物联网智能感知设备部署图 1.png" to supply-chain images
- add "智能水肥一体化系统 1.png" to supply-chain images
yourname 2 месяцев назад
Родитель
Сommit
22a990a2a7

BIN
public/supply-chain/images/康宏公司张湖粮油基地示范片区 1.png


BIN
public/supply-chain/images/省储备粮咸宁库 1.png


+ 46 - 9
src/client/home/pages/SupplyChainDashboards/context/SupplyChainContext.tsx

@@ -56,6 +56,7 @@ interface PopupData {
   content: string;
   content: string;
   position?: { x: number; y: number };
   position?: { x: number; y: number };
   industry: IndustryType;
   industry: IndustryType;
+  imageUrls?: string[];
   metrics?: Array<{
   metrics?: Array<{
     label: string;
     label: string;
     value: string;
     value: string;
@@ -449,6 +450,11 @@ const seedFruitData: SupplyChainData = {
         title: '种业基地1',
         title: '种业基地1',
         content: '江汉水稻育种核心示范基地',
         content: '江汉水稻育种核心示范基地',
         industry: '种业',
         industry: '种业',
+        imageUrls: [
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=水稻育种基地1",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=水稻育种基地2",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=水稻育种基地3"
+        ],
         metrics: [
         metrics: [
           { label: '育种面积:', value: '2.5', unit: '万亩' },
           { label: '育种面积:', value: '2.5', unit: '万亩' },
           { label: '年产量:', value: '15', unit: '万公斤' },
           { label: '年产量:', value: '15', unit: '万公斤' },
@@ -460,6 +466,10 @@ const seedFruitData: SupplyChainData = {
         title: '种业基地2',
         title: '种业基地2',
         content: '优质玉米繁育示范基地',
         content: '优质玉米繁育示范基地',
         industry: '种业',
         industry: '种业',
+        imageUrls: [
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=玉米繁育基地1",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=玉米繁育基地2"
+        ],
         metrics: [
         metrics: [
           { label: '繁育面积:', value: '3.2', unit: '万亩' },
           { label: '繁育面积:', value: '3.2', unit: '万亩' },
           { label: '年产量:', value: '18', unit: '万公斤' },
           { label: '年产量:', value: '18', unit: '万公斤' },
@@ -470,8 +480,11 @@ const seedFruitData: SupplyChainData = {
         id: 'seed-popup-base3',
         id: 'seed-popup-base3',
         title: '种业基地3',
         title: '种业基地3',
         content: '小麦良种繁育核心区',
         content: '小麦良种繁育核心区',
-        
         industry: '种业',
         industry: '种业',
+        imageUrls: [
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=小麦繁育基地1",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=小麦繁育基地2"
+        ],
         metrics: [
         metrics: [
           { label: '繁育面积:', value: '2.8', unit: '万亩' },
           { label: '繁育面积:', value: '2.8', unit: '万亩' },
           { label: '年产量:', value: '12', unit: '万公斤' },
           { label: '年产量:', value: '12', unit: '万公斤' },
@@ -482,8 +495,11 @@ const seedFruitData: SupplyChainData = {
         id: 'seed-popup-base4',
         id: 'seed-popup-base4',
         title: '种业基地4',
         title: '种业基地4',
         content: '大豆育种示范基地',
         content: '大豆育种示范基地',
-        
         industry: '种业',
         industry: '种业',
+        imageUrls: [
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=大豆育种基地1",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=大豆育种基地2"
+        ],
         metrics: [
         metrics: [
           { label: '育种面积:', value: '1.8', unit: '万亩' },
           { label: '育种面积:', value: '1.8', unit: '万亩' },
           { label: '年产量:', value: '8', unit: '万公斤' },
           { label: '年产量:', value: '8', unit: '万公斤' },
@@ -494,8 +510,11 @@ const seedFruitData: SupplyChainData = {
         id: 'seed-popup-chain1',
         id: 'seed-popup-chain1',
         title: '种业产业链1',
         title: '种业产业链1',
         content: '水稻种子加工中心',
         content: '水稻种子加工中心',
-        
         industry: '种业',
         industry: '种业',
+        imageUrls: [
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=种子加工中心1",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=种子加工中心2"
+        ],
         metrics: [
         metrics: [
           { label: '加工能力:', value: '25', unit: '万公斤/年' },
           { label: '加工能力:', value: '25', unit: '万公斤/年' },
           { label: '仓储容量:', value: '50', unit: '万公斤' },
           { label: '仓储容量:', value: '50', unit: '万公斤' },
@@ -506,8 +525,11 @@ const seedFruitData: SupplyChainData = {
         id: 'seed-popup-chain2',
         id: 'seed-popup-chain2',
         title: '种业产业链2',
         title: '种业产业链2',
         content: '玉米种子检测中心',
         content: '玉米种子检测中心',
-        
         industry: '种业',
         industry: '种业',
+        imageUrls: [
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=种子检测中心1",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=种子检测中心2"
+        ],
         metrics: [
         metrics: [
           { label: '检测能力:', value: '30', unit: '万公斤/年' },
           { label: '检测能力:', value: '30', unit: '万公斤/年' },
           { label: '检测精度:', value: '99.8', unit: '%' },
           { label: '检测精度:', value: '99.8', unit: '%' },
@@ -518,8 +540,11 @@ const seedFruitData: SupplyChainData = {
         id: 'seed-popup-chain3',
         id: 'seed-popup-chain3',
         title: '种业产业链3',
         title: '种业产业链3',
         content: '小麦种子研发中心',
         content: '小麦种子研发中心',
-        
         industry: '种业',
         industry: '种业',
+        imageUrls: [
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=种子研发中心1",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=种子研发中心2"
+        ],
         metrics: [
         metrics: [
           { label: '研发投入:', value: '500', unit: '万元/年' },
           { label: '研发投入:', value: '500', unit: '万元/年' },
           { label: '新品种:', value: '8', unit: '个' },
           { label: '新品种:', value: '8', unit: '个' },
@@ -530,8 +555,11 @@ const seedFruitData: SupplyChainData = {
         id: 'seed-popup-chain4',
         id: 'seed-popup-chain4',
         title: '种业产业链4',
         title: '种业产业链4',
         content: '大豆种子销售中心',
         content: '大豆种子销售中心',
-        
         industry: '种业',
         industry: '种业',
+        imageUrls: [
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=种子销售中心1",
+          "https://placehold.co/960x640/5DEF8B/FFFFFF?text=种子销售中心2"
+        ],
         metrics: [
         metrics: [
           { label: '年销售额:', value: '800', unit: '万元' },
           { label: '年销售额:', value: '800', unit: '万元' },
           { label: '覆盖区域:', value: '5', unit: '个省份' },
           { label: '覆盖区域:', value: '5', unit: '个省份' },
@@ -544,8 +572,11 @@ const seedFruitData: SupplyChainData = {
         id: 'fruit-popup-base1',
         id: 'fruit-popup-base1',
         title: '果蔬基地1',
         title: '果蔬基地1',
         content: '优质苹果种植示范基地',
         content: '优质苹果种植示范基地',
-        
         industry: '果蔬',
         industry: '果蔬',
+        imageUrls: [
+          "https://placehold.co/960x640/FFF586/000000?text=苹果种植基地1",
+          "https://placehold.co/960x640/FFF586/000000?text=苹果种植基地2"
+        ],
         metrics: [
         metrics: [
           { label: '种植面积:', value: '3.5', unit: '万亩' },
           { label: '种植面积:', value: '3.5', unit: '万亩' },
           { label: '年产量:', value: '8', unit: '万吨' },
           { label: '年产量:', value: '8', unit: '万吨' },
@@ -556,8 +587,11 @@ const seedFruitData: SupplyChainData = {
         id: 'fruit-popup-base2',
         id: 'fruit-popup-base2',
         title: '果蔬基地2',
         title: '果蔬基地2',
         content: '柑橘类水果核心产区',
         content: '柑橘类水果核心产区',
-        
         industry: '果蔬',
         industry: '果蔬',
+        imageUrls: [
+          "https://placehold.co/960x640/FFF586/000000?text=柑橘种植基地1",
+          "https://placehold.co/960x640/FFF586/000000?text=柑橘种植基地2"
+        ],
         metrics: [
         metrics: [
           { label: '种植面积:', value: '4.2', unit: '万亩' },
           { label: '种植面积:', value: '4.2', unit: '万亩' },
           { label: '年产量:', value: '12', unit: '万吨' },
           { label: '年产量:', value: '12', unit: '万吨' },
@@ -568,8 +602,11 @@ const seedFruitData: SupplyChainData = {
         id: 'fruit-popup-base3',
         id: 'fruit-popup-base3',
         title: '果蔬基地3',
         title: '果蔬基地3',
         content: '葡萄种植示范基地',
         content: '葡萄种植示范基地',
-        
         industry: '果蔬',
         industry: '果蔬',
+        imageUrls: [
+          "https://placehold.co/960x640/FFF586/000000?text=葡萄种植基地1",
+          "https://placehold.co/960x640/FFF586/000000?text=葡萄种植基地2"
+        ],
         metrics: [
         metrics: [
           { label: '种植面积:', value: '2.8', unit: '万亩' },
           { label: '种植面积:', value: '2.8', unit: '万亩' },
           { label: '年产量:', value: '6', unit: '万吨' },
           { label: '年产量:', value: '6', unit: '万吨' },