|
|
@@ -74,15 +74,16 @@ echarts.registerMap('china', chinaGeo)
|
|
|
|
|
|
// 中期评估数据(旧系统硬编码)
|
|
|
const provinceData = [
|
|
|
- { name:'北京',total:98 },{ name:'天津',total:97.1 },{ name:'河北',total:96.3 },{ name:'山西',total:95.8 },
|
|
|
- { name:'内蒙古',total:94.2 },{ name:'辽宁',total:93.5 },{ name:'吉林',total:92.8 },{ name:'黑龙江',total:91.6 },
|
|
|
- { name:'上海',total:99.1 },{ name:'江苏',total:98.5 },{ name:'浙江',total:97.8 },{ name:'安徽',total:94.5 },
|
|
|
- { name:'福建',total:96.1 },{ name:'江西',total:93.2 },{ name:'山东',total:95.0 },{ name:'河南',total:91.8 },
|
|
|
- { name:'湖北',total:93.7 },{ name:'湖南',total:92.1 },{ name:'广东',total:96.8 },{ name:'广西',total:90.5 },
|
|
|
- { name:'海南',total:89.2 },{ name:'重庆',total:94.8 },{ name:'四川',total:92.5 },{ name:'贵州',total:88.9 },
|
|
|
- { name:'云南',total:89.7 },{ name:'西藏',total:85.3 },{ name:'陕西',total:91.2 },{ name:'甘肃',total:87.6 },
|
|
|
- { name:'青海',total:86.4 },{ name:'宁夏',total:88.1 },{ name:'新疆',total:84.8 },
|
|
|
+ { name:'北京',code:'110000',total:98 },{ name:'天津',code:'120000',total:97.1 },{ name:'河北',code:'130000',total:96.3 },{ name:'山西',code:'140000',total:95.8 },
|
|
|
+ { name:'内蒙古',code:'150000',total:94.2 },{ name:'辽宁',code:'210000',total:93.5 },{ name:'吉林',code:'220000',total:92.8 },{ name:'黑龙江',code:'230000',total:91.6 },
|
|
|
+ { name:'上海',code:'310000',total:99.1 },{ name:'江苏',code:'320000',total:98.5 },{ name:'浙江',code:'330000',total:97.8 },{ name:'安徽',code:'340000',total:94.5 },
|
|
|
+ { name:'福建',code:'350000',total:96.1 },{ name:'江西',code:'360000',total:93.2 },{ name:'山东',code:'370000',total:95.0 },{ name:'河南',code:'410000',total:91.8 },
|
|
|
+ { name:'湖北',code:'420000',total:93.7 },{ name:'湖南',code:'430000',total:92.1 },{ name:'广东',code:'440000',total:96.8 },{ name:'广西',code:'450000',total:90.5 },
|
|
|
+ { name:'海南',code:'460000',total:89.2 },{ name:'重庆',code:'500000',total:94.8 },{ name:'四川',code:'510000',total:92.5 },{ name:'贵州',code:'520000',total:88.9 },
|
|
|
+ { name:'云南',code:'530000',total:89.7 },{ name:'西藏',code:'540000',total:85.3 },{ name:'陕西',code:'610000',total:91.2 },{ name:'甘肃',code:'620000',total:87.6 },
|
|
|
+ { name:'青海',code:'630000',total:86.4 },{ name:'宁夏',code:'640000',total:88.1 },{ name:'新疆',code:'650000',total:84.8 },
|
|
|
].sort((a,b)=>b.total-a.total)
|
|
|
+const nameMap = Object.fromEntries(provinceData.map(d => [d.code, d.name]))
|
|
|
|
|
|
const sixScoreData = [
|
|
|
{ name:'工作方案', gzfa:25 },{ name:'组织体系', zztx:30 },{ name:'制度建设', zdjs:15 },
|
|
|
@@ -99,9 +100,9 @@ const initCharts = () => {
|
|
|
const c0 = echarts.init(scoreMap.value)
|
|
|
c0.setOption({
|
|
|
title: { text: '各省中期评估总分分布', left: 'center', textStyle: { fontSize: 14 } },
|
|
|
- tooltip: { trigger: 'item', formatter: '{b}: {c} 分' },
|
|
|
+ tooltip: { trigger: 'item', formatter: (p) => `${nameMap[p.name] || p.name}: ${p.value} 分` },
|
|
|
visualMap: { min: 84, max: 100, left: 'left', bottom: 10, text: ['高', '低'], inRange: { color: ['#e0f3f8','#abd9e9','#74add1','#4575b4','#313695'] } },
|
|
|
- series: [{ type: 'map', map: 'china', roam: false, label: { show: true, fontSize: 10 }, data: provinceData.map(d=>({name:d.name,value:d.total})) }]
|
|
|
+ series: [{ type: 'map', map: 'china', roam: false, label: { show: true, fontSize: 10, formatter: (p) => nameMap[p.name] || p.name }, data: provinceData.map(d=>({name:d.code,value:d.total})) }]
|
|
|
})
|
|
|
window.addEventListener('resize', () => c0.resize())
|
|
|
}
|