2024-07-05 02:07:18 +08:00
|
|
|
export interface ResourceTechnologyInfo {
|
|
|
|
properThing: string[]
|
|
|
|
craftImage: string
|
|
|
|
device: string
|
|
|
|
env: {
|
|
|
|
yieldDistance: number
|
|
|
|
area: number
|
|
|
|
terrain: string
|
|
|
|
supplyWater: string
|
|
|
|
supplyElectricity: string
|
|
|
|
dischargeWater: string
|
|
|
|
temperature: number
|
|
|
|
airPressure: number
|
|
|
|
// ...
|
|
|
|
}
|
|
|
|
production: string[]
|
|
|
|
discharge: {
|
|
|
|
effluent: string[]
|
|
|
|
sludge: string[]
|
|
|
|
gas: string[]
|
|
|
|
}
|
|
|
|
work: string
|
|
|
|
cost: number
|
|
|
|
efficiency: string
|
|
|
|
utilization: string
|
|
|
|
}
|
2024-06-30 21:39:37 +08:00
|
|
|
|
2024-07-05 02:07:18 +08:00
|
|
|
export const useResourceStore = defineStore('resource', {
|
2024-06-30 21:39:37 +08:00
|
|
|
state: (): {
|
2024-07-05 02:07:18 +08:00
|
|
|
resources: ResourceTechnologyInfo[]
|
|
|
|
policy: {
|
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
url: string
|
|
|
|
type: '国家' | '地方' | '企业'
|
|
|
|
}[]
|
2024-06-30 21:39:37 +08:00
|
|
|
} => ({
|
2024-07-05 02:07:18 +08:00
|
|
|
resources: [{
|
|
|
|
properThing: ['易拉罐', '垃圾箱'],
|
|
|
|
craftImage: 'https://pic1.zhimg.com/v2-f24231dafa70ba95a2f84262471dadfc_r.jpg',
|
|
|
|
device: '垃圾箱',
|
|
|
|
env: {
|
|
|
|
yieldDistance: 110,
|
|
|
|
area: 4042,
|
|
|
|
terrain: '丘陵',
|
|
|
|
supplyWater: '什么什么供水要求',
|
|
|
|
supplyElectricity: '什么什么供电要求',
|
|
|
|
dischargeWater: '什么什么排水要求',
|
|
|
|
temperature: 29,
|
|
|
|
airPressure: 1000,
|
|
|
|
// ...
|
|
|
|
},
|
|
|
|
production: ['塑料', '金属'],
|
|
|
|
discharge: {
|
|
|
|
effluent: ['水', '污水'],
|
|
|
|
sludge: ['污泥', 'xx污泥'],
|
|
|
|
gas: ['氢', '甲烷', '乙烷'],
|
|
|
|
},
|
|
|
|
work: '6名工人',
|
|
|
|
cost: 222450,
|
|
|
|
efficiency: '100%',
|
|
|
|
utilization: '高效',
|
|
|
|
},
|
|
|
|
// 帮我再编写5条类似数据
|
|
|
|
{
|
|
|
|
properThing: ['玩具', '塑料袋'],
|
|
|
|
craftImage: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.BsxwuPonB9eNr4ti6SnbnAHaGV?pid=ImgDet&w=474&h=405&rs=1',
|
|
|
|
device: '垃圾管理系统',
|
|
|
|
env: {
|
|
|
|
yieldDistance: 140,
|
|
|
|
area: 2800,
|
|
|
|
terrain: '湿地',
|
|
|
|
supplyWater: '湖水',
|
|
|
|
supplyElectricity: '水力发电',
|
|
|
|
dischargeWater: '湖泊',
|
|
|
|
temperature: 27,
|
|
|
|
airPressure: 1002,
|
|
|
|
},
|
|
|
|
production: ['塑料', '再生材料'],
|
|
|
|
discharge: {
|
|
|
|
effluent: ['废水'],
|
|
|
|
sludge: ['废渣'],
|
|
|
|
gas: ['氧气', '氮气'],
|
|
|
|
},
|
|
|
|
work: '4名工人',
|
|
|
|
cost: 160000,
|
|
|
|
efficiency: '92%',
|
|
|
|
utilization: '高效',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
properThing: ['纸杯', '食品包装'],
|
|
|
|
craftImage: 'https://img.zcool.cn/community/019559594098fca8012193a303c702.png@2o.png',
|
|
|
|
device: '垃圾处理装置',
|
|
|
|
env: {
|
|
|
|
yieldDistance: 130,
|
|
|
|
area: 3200,
|
|
|
|
terrain: '山区',
|
|
|
|
supplyWater: '地下水',
|
|
|
|
supplyElectricity: '生物质能',
|
|
|
|
dischargeWater: '河流',
|
|
|
|
temperature: 26,
|
|
|
|
airPressure: 1008,
|
|
|
|
},
|
|
|
|
production: ['纸张', '有机肥料'],
|
|
|
|
discharge: {
|
|
|
|
effluent: ['废水'],
|
|
|
|
sludge: ['有机废物'],
|
|
|
|
gas: ['氧气', '甲烷'],
|
|
|
|
},
|
|
|
|
work: '5名工人',
|
|
|
|
cost: 170000,
|
|
|
|
efficiency: '88%',
|
|
|
|
utilization: '中等',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
properThing: ['食品包装', '塑料袋'],
|
|
|
|
craftImage: 'https://www.yuaoq.com/template/draw/uncategorized/10378/10378_template.png',
|
|
|
|
device: '垃圾处理机',
|
|
|
|
env: {
|
|
|
|
yieldDistance: 150,
|
|
|
|
area: 3500,
|
|
|
|
terrain: '沿海',
|
|
|
|
supplyWater: '海水',
|
|
|
|
supplyElectricity: '风力发电',
|
|
|
|
dischargeWater: '海洋',
|
|
|
|
temperature: 28,
|
|
|
|
airPressure: 1003,
|
|
|
|
},
|
|
|
|
production: ['塑料', '有机肥料'],
|
|
|
|
discharge: {
|
|
|
|
effluent: ['废水'],
|
|
|
|
sludge: ['有机废物'],
|
|
|
|
gas: ['二氧化碳', '氢气'],
|
|
|
|
},
|
|
|
|
work: '6名工人',
|
|
|
|
cost: 200000,
|
|
|
|
efficiency: '95%',
|
|
|
|
utilization: '高效',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
properThing: ['玻璃瓶', '金属罐'],
|
|
|
|
craftImage: 'https://ts1.cn.mm.bing.net/th/id/R-C.ea57da618322715a29309637a45aa83b?rik=rvuZvWzTb2t%2bFA&riu=http%3a%2f%2fdocs-aliyun.cn-hangzhou.oss.aliyun-inc.com%2fassets%2fpic%2f117771%2fcn_zh%2f1557311249692%2f%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7+2019-05-08+%E4%B8%8B%E5%8D%886.26.51.png&ehk=AEDi9kQLAwki5lezNmCNfa0H4cHaLsSAyiNrcKmTr9k%3d&risl=&pid=ImgRaw&r=0',
|
|
|
|
device: '垃圾回收机',
|
|
|
|
env: {
|
|
|
|
yieldDistance: 100,
|
|
|
|
area: 2500,
|
|
|
|
terrain: '城市',
|
|
|
|
supplyWater: '循环水',
|
|
|
|
supplyElectricity: '太阳能',
|
|
|
|
dischargeWater: '雨水管道',
|
|
|
|
temperature: 30,
|
|
|
|
airPressure: 1005,
|
|
|
|
},
|
|
|
|
production: ['玻璃', '金属'],
|
|
|
|
discharge: {
|
|
|
|
effluent: ['废水'],
|
|
|
|
sludge: ['废渣'],
|
|
|
|
gas: ['氧气', '氮气'],
|
|
|
|
},
|
|
|
|
work: '5名工人',
|
|
|
|
cost: 180000,
|
|
|
|
efficiency: '85%',
|
|
|
|
utilization: '高效',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
properThing: ['纸箱', '塑料瓶'],
|
|
|
|
craftImage: 'https://www.yuaoq.com/template/draw/uncategorized/11562/11562_template.png',
|
|
|
|
device: '垃圾桶',
|
|
|
|
env: {
|
|
|
|
yieldDistance: 120,
|
|
|
|
area: 3000,
|
|
|
|
terrain: '平原',
|
|
|
|
supplyWater: '自来水',
|
|
|
|
supplyElectricity: '市电',
|
|
|
|
dischargeWater: '污水处理厂',
|
|
|
|
temperature: 25,
|
|
|
|
airPressure: 1010,
|
|
|
|
},
|
|
|
|
production: ['塑料', '纸张'],
|
|
|
|
discharge: {
|
|
|
|
effluent: ['废水'],
|
|
|
|
sludge: ['污泥'],
|
|
|
|
gas: ['二氧化碳', '氧气'],
|
|
|
|
},
|
|
|
|
work: '4名工人',
|
|
|
|
cost: 150000,
|
|
|
|
efficiency: '90%',
|
|
|
|
utilization: '中等',
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
policy: [
|
|
|
|
{
|
|
|
|
name: '政策1',
|
|
|
|
url: 'https://www.baidu.com/policy1',
|
|
|
|
description: '这是政策1的描述',
|
|
|
|
type: '国家',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '政策2',
|
|
|
|
url: 'https://www.baidu.com/policy1',
|
|
|
|
description: '这是政策1的描述',
|
|
|
|
type: '国家',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '政策3',
|
|
|
|
url: 'https://www.baidu.com/policy1',
|
|
|
|
description: '这是政策1的描述',
|
|
|
|
type: '国家',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '政策2',
|
|
|
|
url: 'https://www.example.com/policy2',
|
|
|
|
description: '这是政策2的描述',
|
|
|
|
type: '企业',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: '政策3',
|
|
|
|
url: 'https://www.example.com/policy3',
|
|
|
|
description: '这是政策3的描述',
|
|
|
|
type: '地方',
|
|
|
|
},
|
|
|
|
],
|
2024-06-30 21:39:37 +08:00
|
|
|
}),
|
|
|
|
persist: {
|
2024-07-05 02:07:18 +08:00
|
|
|
storage: persistedState.sessionStorage,
|
|
|
|
},
|
2024-06-30 21:39:37 +08:00
|
|
|
})
|
|
|
|
|
|
|
|
if (import.meta.hot)
|
|
|
|
import.meta.hot.accept(acceptHMRUpdate(useResourceStore, import.meta.hot))
|