339 lines
9.1 KiB
TypeScript
339 lines
9.1 KiB
TypeScript
|
export const useInfoStore = defineStore('info', {
|
||
|
state: (): {
|
||
|
data: {
|
||
|
name: string
|
||
|
value: number[]
|
||
|
info: {
|
||
|
city: string
|
||
|
collect_year: number
|
||
|
economic: {
|
||
|
area: number
|
||
|
population: number
|
||
|
revenue: number
|
||
|
}
|
||
|
climate: {
|
||
|
temperature: number
|
||
|
precipitation: number
|
||
|
sunshine: number
|
||
|
}
|
||
|
monitor: {
|
||
|
name: string
|
||
|
value: number[]
|
||
|
link: string
|
||
|
}[]
|
||
|
soil: {
|
||
|
type: string
|
||
|
nutrient: string[]
|
||
|
env: string[]
|
||
|
organic_carbon: boolean
|
||
|
microorganism_count: number
|
||
|
gene: string
|
||
|
}[]
|
||
|
industry: {
|
||
|
name: string
|
||
|
value: number[]
|
||
|
construction: string
|
||
|
premium_requirement: string
|
||
|
crop: {
|
||
|
name: string
|
||
|
type: string
|
||
|
area: number
|
||
|
yield: number
|
||
|
}[]
|
||
|
livestock: {
|
||
|
type: string
|
||
|
name: string
|
||
|
count: number
|
||
|
}[]
|
||
|
}[]
|
||
|
garbage_feature: {
|
||
|
collect_year: number
|
||
|
data: {
|
||
|
type: string
|
||
|
icon: string
|
||
|
details: {
|
||
|
type: string
|
||
|
count: number
|
||
|
quotient: {
|
||
|
water: number
|
||
|
organic_material: number
|
||
|
carbon: number
|
||
|
nitrogen: number
|
||
|
kalium: number
|
||
|
heavy_metal: number
|
||
|
}
|
||
|
physical: {
|
||
|
unit_weight: number
|
||
|
porosity: number
|
||
|
pHvalue: number
|
||
|
}
|
||
|
biochemical: string
|
||
|
energy: string
|
||
|
dispose_way: string
|
||
|
}[]
|
||
|
}[]
|
||
|
}
|
||
|
}
|
||
|
}[]
|
||
|
showIndex: number
|
||
|
} => ({
|
||
|
showIndex: 0,
|
||
|
data: [{
|
||
|
name: '北京',
|
||
|
value: [...geoCoordMap['北京']],
|
||
|
info: {
|
||
|
city: '北京',
|
||
|
collect_year: 2024,
|
||
|
monitor: [{
|
||
|
name: 'xx检测站',
|
||
|
value: [222, 222],
|
||
|
link: 'http://www.baidu.com',
|
||
|
}, {
|
||
|
name: 'yy检测站',
|
||
|
value: [222, 222],
|
||
|
link: 'http://www.baidu.com',
|
||
|
}],
|
||
|
economic: {
|
||
|
area: 1000,
|
||
|
population: 1000,
|
||
|
revenue: 2000,
|
||
|
},
|
||
|
climate: {
|
||
|
temperature: 26,
|
||
|
precipitation: 400,
|
||
|
sunshine: 4050,
|
||
|
},
|
||
|
soil: [{
|
||
|
type: 'xx土壤',
|
||
|
nutrient: ['xx', 'yy', 'zz'],
|
||
|
env: ['丘陵'],
|
||
|
organic_carbon: false,
|
||
|
microorganism_count: 10000,
|
||
|
gene: '未知',
|
||
|
}, {
|
||
|
type: 'yy土壤',
|
||
|
nutrient: ['xx', 'yy', 'zz'],
|
||
|
env: ['盆地'],
|
||
|
organic_carbon: true,
|
||
|
microorganism_count: 2000,
|
||
|
gene: '未知',
|
||
|
}],
|
||
|
industry: [{
|
||
|
name: 'xx企业',
|
||
|
value: [222, 222],
|
||
|
construction: '产业结构',
|
||
|
premium_requirement: '什么什么什么什么什么什么什么什么什么',
|
||
|
crop: [{
|
||
|
name: 'test',
|
||
|
type: 'test',
|
||
|
area: 1000,
|
||
|
yield: 120000990,
|
||
|
}],
|
||
|
livestock: [{
|
||
|
type: 'test2',
|
||
|
name: 'test2',
|
||
|
count: 123123451,
|
||
|
}],
|
||
|
}],
|
||
|
garbage_feature: {
|
||
|
collect_year: 2012,
|
||
|
data: [{
|
||
|
type: '厨余垃圾',
|
||
|
icon: 'solar:airbuds-remove-line-duotone',
|
||
|
details: [{
|
||
|
type: '香蕉皮',
|
||
|
count: 12312312,
|
||
|
quotient: {
|
||
|
water: 12,
|
||
|
organic_material: 23,
|
||
|
carbon: 35,
|
||
|
nitrogen: 21,
|
||
|
kalium: 1,
|
||
|
heavy_metal: 23,
|
||
|
},
|
||
|
physical: {
|
||
|
unit_weight: 12,
|
||
|
porosity: 23,
|
||
|
pHvalue: 213,
|
||
|
},
|
||
|
biochemical: '什么什么升华特性',
|
||
|
energy: '什么什么能量特征',
|
||
|
dispose_way: '怎么怎么怎么怎么怎么去处理',
|
||
|
}, {
|
||
|
type: '西瓜皮',
|
||
|
count: 12312,
|
||
|
quotient: {
|
||
|
water: 2,
|
||
|
organic_material: 3,
|
||
|
carbon: 32,
|
||
|
nitrogen: 41,
|
||
|
kalium: 12,
|
||
|
heavy_metal: 3,
|
||
|
},
|
||
|
physical: {
|
||
|
unit_weight: 1,
|
||
|
porosity: 3,
|
||
|
pHvalue: 23,
|
||
|
},
|
||
|
biochemical: '什么什么升华特性',
|
||
|
energy: '什么什么能量特征',
|
||
|
dispose_way: '怎么怎么怎么怎么怎么去处理',
|
||
|
}],
|
||
|
}, {
|
||
|
type: '非集约化禽畜粪便',
|
||
|
icon: 'solar:airbuds-right-line-duotone',
|
||
|
details: [],
|
||
|
}, {
|
||
|
type: '田园尾菜桔秆',
|
||
|
icon: 'solar:airbuds-case-open-line-duotone',
|
||
|
details: [],
|
||
|
}],
|
||
|
},
|
||
|
},
|
||
|
}, {
|
||
|
name: '成都',
|
||
|
value: [...geoCoordMap['成都']],
|
||
|
info: {
|
||
|
city: '成都',
|
||
|
collect_year: 2024,
|
||
|
economic: {
|
||
|
area: 200,
|
||
|
population: 400,
|
||
|
revenue: 2450,
|
||
|
},
|
||
|
climate: {
|
||
|
temperature: 24,
|
||
|
precipitation: 700,
|
||
|
sunshine: 3050,
|
||
|
},
|
||
|
monitor: [{
|
||
|
name: '成都xx检测站',
|
||
|
value: [222, 222],
|
||
|
link: 'http://www.baidu.com',
|
||
|
}, {
|
||
|
name: '吃的yy检测站',
|
||
|
value: [222, 222],
|
||
|
link: 'http://www.baidu.com',
|
||
|
}],
|
||
|
soil: [{
|
||
|
type: 'aa土壤',
|
||
|
nutrient: ['aa', 'yy', 'zz', 'sdf'],
|
||
|
env: ['丘陵'],
|
||
|
organic_carbon: false,
|
||
|
microorganism_count: 1000,
|
||
|
gene: '未知',
|
||
|
}, {
|
||
|
type: 'bb土壤',
|
||
|
nutrient: ['xa', 'dy', 'gz'],
|
||
|
env: ['盆地', '平原'],
|
||
|
organic_carbon: true,
|
||
|
microorganism_count: 2000,
|
||
|
gene: '未知',
|
||
|
}],
|
||
|
industry: [{
|
||
|
name: 'yy企业',
|
||
|
value: [100, 100],
|
||
|
construction: '产业结构',
|
||
|
premium_requirement: '什么什么什么什么什么什么什么什么什么',
|
||
|
crop: [{
|
||
|
name: 'test',
|
||
|
type: 'test',
|
||
|
area: 1000,
|
||
|
yield: 120000990,
|
||
|
}],
|
||
|
livestock: [{
|
||
|
type: 'test2',
|
||
|
name: 'test2',
|
||
|
count: 123123451,
|
||
|
}],
|
||
|
}],
|
||
|
garbage_feature: {
|
||
|
collect_year: 2012,
|
||
|
data: [{
|
||
|
type: '厨余垃圾',
|
||
|
icon: 'solar:airbuds-remove-line-duotone',
|
||
|
details: [{
|
||
|
type: '香蕉皮',
|
||
|
count: 12312312,
|
||
|
quotient: {
|
||
|
water: 12,
|
||
|
organic_material: 23,
|
||
|
carbon: 35,
|
||
|
nitrogen: 21,
|
||
|
kalium: 1,
|
||
|
heavy_metal: 23,
|
||
|
},
|
||
|
physical: {
|
||
|
unit_weight: 12,
|
||
|
porosity: 23,
|
||
|
pHvalue: 213,
|
||
|
},
|
||
|
biochemical: '什么什么升华特性',
|
||
|
energy: '什么什么能量特征',
|
||
|
dispose_way: '怎么怎么怎么怎么怎么去处理',
|
||
|
}, {
|
||
|
type: '西瓜皮',
|
||
|
count: 12312,
|
||
|
quotient: {
|
||
|
water: 2,
|
||
|
organic_material: 3,
|
||
|
carbon: 32,
|
||
|
nitrogen: 41,
|
||
|
kalium: 12,
|
||
|
heavy_metal: 3,
|
||
|
},
|
||
|
physical: {
|
||
|
unit_weight: 1,
|
||
|
porosity: 3,
|
||
|
pHvalue: 23,
|
||
|
},
|
||
|
biochemical: '什么什么升华特性',
|
||
|
energy: '什么什么能量特征',
|
||
|
dispose_way: '怎么怎么怎么怎么怎么去处理',
|
||
|
}],
|
||
|
}, {
|
||
|
type: '非集约化禽畜粪便',
|
||
|
icon: 'solar:airbuds-right-line-duotone',
|
||
|
details: [{
|
||
|
type: '猪粪',
|
||
|
count: 12312,
|
||
|
quotient: {
|
||
|
water: 2,
|
||
|
organic_material: 3,
|
||
|
carbon: 3,
|
||
|
nitrogen: 21,
|
||
|
kalium: 12,
|
||
|
heavy_metal: 3,
|
||
|
},
|
||
|
physical: {
|
||
|
unit_weight: 122,
|
||
|
porosity: 2,
|
||
|
pHvalue: 2123,
|
||
|
},
|
||
|
biochemical: '什么什么升华特性',
|
||
|
energy: '什么什么能量特征',
|
||
|
dispose_way: '怎么怎么怎么怎么怎么去处理',
|
||
|
}],
|
||
|
}, {
|
||
|
type: '田园尾菜桔秆',
|
||
|
icon: 'solar:airbuds-case-open-line-duotone',
|
||
|
details: [],
|
||
|
}],
|
||
|
},
|
||
|
},
|
||
|
}],
|
||
|
}),
|
||
|
|
||
|
actions: {
|
||
|
setShow(index: number) {
|
||
|
this.showIndex = index
|
||
|
},
|
||
|
},
|
||
|
// persist: {
|
||
|
// storage: persistedState.sessionStorage,
|
||
|
// },
|
||
|
})
|
||
|
|
||
|
if (import.meta.hot)
|
||
|
import.meta.hot.accept(acceptHMRUpdate(useInfoStore, import.meta.hot))
|