main
HuangHai 1 month ago
parent 213672ba4f
commit b5b230e762

@ -104,9 +104,10 @@
background-color: #f8f9fa; background-color: #f8f9fa;
font-family: 'Courier New', monospace; font-family: 'Courier New', monospace;
font-size: 14px; font-size: 14px;
line-height: 1.4; line-height: 1.6;
white-space: pre-wrap; white-space: pre-line;
word-wrap: break-word; word-wrap: break-word;
overflow-wrap: break-word;
} }
.download-section { .download-section {
@ -502,43 +503,93 @@
function processTextBuffer() { function processTextBuffer() {
const dataArea = document.getElementById('dataArea'); const dataArea = document.getElementById('dataArea');
// 检查缓冲区中是否包含完整的句子或段落 // 首先处理明确的换行符
const sentences = textBuffer.match(/[^。!?\n]*[。!?\n]/g); if (textBuffer.includes('\n')) {
const lines = textBuffer.split('\n');
const completedLines = lines.slice(0, -1);
const remainingText = lines[lines.length - 1];
if (sentences) { completedLines.forEach(line => {
// 显示完整的句子 if (line.trim()) {
sentences.forEach(sentence => { dataArea.innerHTML += line + '<br>';
if (sentence.trim()) { } else {
dataArea.textContent += sentence.trim() + '\n'; dataArea.innerHTML += '<br>';
} }
}); });
// 从缓冲区中移除已显示的句子 textBuffer = remainingText;
const processedText = sentences.join(''); }
textBuffer = textBuffer.substring(processedText.length);
// 简化表格处理:只处理完整的表格行
if (textBuffer.includes('|')) {
// 检测并处理完整的表格行(至少包含两个|符号)
const tableRowRegex = /\|[^|]*\|[^|]*\|/;
if (tableRowRegex.test(textBuffer)) {
// 查找表格行的起始位置
const match = textBuffer.match(tableRowRegex);
if (match) {
const beforeTable = textBuffer.substring(0, match.index);
const tableRow = match[0];
const afterTable = textBuffer.substring(match.index + match[0].length);
// 输出表格前的内容
if (beforeTable.trim()) {
dataArea.innerHTML += beforeTable.trim() + '<br>';
}
// 输出表格行
const cleanTableRow = tableRow.replace(/\|/g, ' | ').replace(/\s+/g, ' ').trim();
dataArea.innerHTML += cleanTableRow + '<br>';
// 更新缓冲区
textBuffer = afterTable;
}
}
}
// 处理标题(只在标题前添加换行)
if (textBuffer.includes('#')) {
textBuffer = textBuffer.replace(/(#{1,6}\s*[^#\n]+)/g, '<br>$1');
}
// 处理列表项(简化处理)
if (textBuffer.includes('- ')) {
textBuffer = textBuffer.replace(/([^\n])(-\s+)/g, '$1<br>$2');
}
// 如果缓冲区有内容且包含<br>标签,立即输出
if (textBuffer.includes('<br>')) {
const parts = textBuffer.split('<br>');
for (let i = 0; i < parts.length - 1; i++) {
if (parts[i].trim()) {
dataArea.innerHTML += parts[i].trim() + '<br>';
} else { } else {
// 如果缓冲区太长但没有句号,按长度分割显示 dataArea.innerHTML += '<br>';
if (textBuffer.length > 100) { }
// 寻找合适的分割点(空格、逗号等) }
let splitIndex = textBuffer.lastIndexOf(' ', 80); textBuffer = parts[parts.length - 1];
}
// 处理过长的普通文本
if (textBuffer.length > 200) {
let splitIndex = textBuffer.lastIndexOf(' ', 150);
if (splitIndex === -1) { if (splitIndex === -1) {
splitIndex = textBuffer.lastIndexOf('', 80); splitIndex = textBuffer.lastIndexOf('', 150);
} }
if (splitIndex === -1) { if (splitIndex === -1) {
splitIndex = textBuffer.lastIndexOf('、', 80); splitIndex = textBuffer.lastIndexOf('、', 150);
} }
if (splitIndex === -1) { if (splitIndex === -1) {
splitIndex = 80; // 强制分割 splitIndex = 150;
} }
const textToShow = textBuffer.substring(0, splitIndex + 1); const textToShow = textBuffer.substring(0, splitIndex + 1);
if (textToShow.trim()) { if (textToShow.trim()) {
dataArea.textContent += textToShow.trim() + '\n'; dataArea.innerHTML += textToShow + '<br>';
} }
textBuffer = textBuffer.substring(splitIndex + 1); textBuffer = textBuffer.substring(splitIndex + 1);
} }
} }
}
function checkForDownloadLinks(data) { function checkForDownloadLinks(data) {
// 使用正则表达式匹配URL模式 // 使用正则表达式匹配URL模式
@ -581,7 +632,7 @@
function clearData() { function clearData() {
const dataArea = document.getElementById('dataArea'); const dataArea = document.getElementById('dataArea');
dataArea.textContent = '等待数据...'; dataArea.innerHTML = '等待数据...';
textBuffer = ''; // 清空文本缓冲区 textBuffer = ''; // 清空文本缓冲区
downloadUrls = []; downloadUrls = [];
updateDownloadLinks(); updateDownloadLinks();

@ -0,0 +1,758 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>怒江州与昭通市人口变化趋势对基础教育的影响分析报告</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body {
font-family: 'Microsoft YaHei', Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: #f9f9f9;
}
header {
text-align: center;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 2px solid #3498db;
}
h1 {
color: #2c3e50;
font-size: 28px;
margin-bottom: 10px;
}
h2 {
color: #3498db;
font-size: 22px;
margin-top: 30px;
border-left: 4px solid #3498db;
padding-left: 10px;
}
h3 {
color: #2c3e50;
font-size: 18px;
margin-top: 25px;
}
p {
margin-bottom: 15px;
text-align: justify;
}
.section {
background-color: white;
padding: 20px;
margin-bottom: 30px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.chart-container {
margin: 30px 0;
padding: 15px;
background-color: white;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
canvas {
width: 100% !important;
height: 400px !important;
}
.conclusion {
background-color: #f1f9fe;
padding: 20px;
border-left: 4px solid #3498db;
}
.summary {
background-color: #f8f9fa;
padding: 20px;
border-radius: 5px;
margin-bottom: 30px;
}
@media (max-width: 768px) {
body {
padding: 10px;
}
h1 {
font-size: 24px;
}
.section {
padding: 15px;
}
}
</style>
</head>
<body>
<header>
<h1>怒江州与昭通市人口变化趋势对基础教育的影响分析报告</h1>
<p>云南省教育资源配置发展预测数据对比分析</p>
</header>
<div class="summary">
<h2>报告摘要</h2>
<p>本报告基于怒江州与昭通市2012-2035年的人口变化趋势数据分析了两地城乡人口结构变化、学生数量变化以及教职工需求变化对基础教育资源配置的影响。报告显示两地人口均呈现下降趋势但城乡人口结构变化存在差异这对基础教育资源配置提出了新的挑战和要求。</p>
</div>
<div class="section">
<h2>一、总人口变化趋势</h2>
<p>怒江州总人口在2012-2019年呈平稳增长趋势2019年达到顶峰55.7万人后开始下降预计2035年将下降至48.4万人。昭通市总人口在2012-2019年持续大幅增长2020年后迅速下降预计2035年将减少至393.6万人。</p>
<div class="chart-container">
<canvas id="populationTrendChart"></canvas>
</div>
</div>
<div class="section">
<h2>二、城乡人口变化趋势</h2>
<p>怒江州城镇人口数量呈缓慢增长趋势乡村人口数量显著减少。昭通市乡村人口明显下降城镇人口呈现稳步增长趋势但2026年后城乡人口均呈现下降趋势。</p>
<div class="chart-container">
<canvas id="urbanRuralTrendChart1"></canvas>
</div>
<div class="chart-container">
<canvas id="urbanRuralTrendChart2"></canvas>
</div>
</div>
<div class="section">
<h2>三、学生数量变化趋势</h2>
<p>怒江州各学段学生数量总体呈下降趋势,城区学生数量略有增长,镇区和乡村学生数量明显减少。昭通市各学段学生数量也呈现明显下降趋势,城区相对稳定,乡村下降显著。</p>
<div class="chart-container">
<canvas id="studentTrendChart1"></canvas>
</div>
<div class="chart-container">
<canvas id="studentTrendChart2"></canvas>
</div>
<div class="chart-container">
<canvas id="studentComparisonChart"></canvas>
</div>
</div>
<div class="section">
<h2>四、教职工需求变化趋势</h2>
<p>怒江州基础教育教职工数总体需求保持平缓,但存在区域性、结构性、学科性短缺。昭通市基础教育教职工数总体需求呈现减少趋势,各学段教职工需求均有不同程度减少。</p>
<div class="chart-container">
<canvas id="teacherTrendChart1"></canvas>
</div>
<div class="chart-container">
<canvas id="teacherTrendChart2"></canvas>
</div>
</div>
<div class="section">
<h2>五、学校占地面积需求对比</h2>
<p>怒江州基础教育学校占地面积总量需求略有下降,各学段占地面积总体满足需求。昭通市基础教育学校占地面积总量需求逐步减少,各学段占地面积需求均有不同程度减少。</p>
<div class="chart-container">
<canvas id="schoolAreaChart"></canvas>
</div>
</div>
<div class="section conclusion">
<h2>六、结论与建议</h2>
<p>1. 两地人口均呈现下降趋势,但城乡结构变化不同,怒江州城镇化进程相对缓慢,昭通市城镇化进程较快。</p>
<p>2. 学生数量总体下降,但城区学生数量相对稳定或略有增长,乡村学生数量明显减少,需调整教育资源城乡配置。</p>
<p>3. 教职工需求怒江州保持平稳,昭通市明显减少,但两地均存在结构性短缺问题,需优化教师队伍结构。</p>
<p>4. 学校占地面积需求总体减少,为教育资源整合提供了空间,可考虑合并乡村小型学校,提高城区学校资源利用效率。</p>
</div>
<script>
// 图表1总人口变化趋势图
const populationTrendCtx = document.getElementById('populationTrendChart').getContext('2d');
const populationTrendChart = new Chart(populationTrendCtx, {
type: 'line',
data: {
labels: ['2012', '2015', '2019', '2021', '2025', '2030', '2035'],
datasets: [
{
label: '怒江州总人口(万人)',
data: [50.5, 52.3, 55.7, 53.2, 51.8, 50.1, 48.4],
borderColor: 'rgba(75, 192, 192, 1)',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
tension: 0.3,
fill: true
},
{
label: '昭通市总人口(万人)',
data: [480, 490, 509.3, 501.4, 470, 430, 393.6],
borderColor: 'rgba(153, 102, 255, 1)',
backgroundColor: 'rgba(153, 102, 255, 0.2)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '怒江州与昭通市总人口变化趋势(2012-2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: false,
title: {
display: true,
text: '人口数量(万人)'
}
},
x: {
title: {
display: true,
text: '年份'
}
}
}
}
});
// 图表2城乡人口变化趋势图1 - 怒江州
const urbanRuralTrend1Ctx = document.getElementById('urbanRuralTrendChart1').getContext('2d');
const urbanRuralTrendChart1 = new Chart(urbanRuralTrend1Ctx, {
type: 'line',
data: {
labels: ['2023', '2025', '2030', '2035'],
datasets: [
{
label: '怒江州城镇人口(万人)',
data: [18, 19, 20.5, 22],
borderColor: 'rgba(54, 162, 235, 1)',
backgroundColor: 'rgba(54, 162, 235, 0.2)',
tension: 0.3,
fill: true
},
{
label: '怒江州乡村人口(万人)',
data: [35, 32.8, 29.6, 26.4],
borderColor: 'rgba(255, 99, 132, 1)',
backgroundColor: 'rgba(255, 99, 132, 0.2)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '怒江州城乡人口变化趋势(2023-2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: false,
title: {
display: true,
text: '人口数量(万人)'
}
},
x: {
title: {
display: true,
text: '年份'
}
}
}
}
});
// 图表3城乡人口变化趋势图2 - 昭通市
const urbanRuralTrend2Ctx = document.getElementById('urbanRuralTrendChart2').getContext('2d');
const urbanRuralTrendChart2 = new Chart(urbanRuralTrend2Ctx, {
type: 'line',
data: {
labels: ['2022', '2025', '2030', '2035'],
datasets: [
{
label: '昭通市城镇人口(万人)',
data: [202.6, 198, 190, 183.1],
borderColor: 'rgba(54, 162, 235, 1)',
backgroundColor: 'rgba(54, 162, 235, 0.2)',
tension: 0.3,
fill: true
},
{
label: '昭通市乡村人口(万人)',
data: [292.3, 270, 240, 210.5],
borderColor: 'rgba(255, 99, 132, 1)',
backgroundColor: 'rgba(255, 99, 132, 0.2)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '昭通市城乡人口变化趋势(2022-2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: false,
title: {
display: true,
text: '人口数量(万人)'
}
},
x: {
title: {
display: true,
text: '年份'
}
}
}
}
});
// 图表4学生数量变化趋势图1 - 怒江州
const studentTrend1Ctx = document.getElementById('studentTrendChart1').getContext('2d');
const studentTrendChart1 = new Chart(studentTrend1Ctx, {
type: 'line',
data: {
labels: ['2022', '2025', '2030', '2035'],
datasets: [
{
label: '怒江州学前在园幼儿(万人)',
data: [2.77, 2.65, 2.55, 2.46],
borderColor: 'rgba(255, 159, 64, 1)',
backgroundColor: 'rgba(255, 159, 64, 0.2)',
tension: 0.3,
fill: true
},
{
label: '怒江州小学在校生(万人)',
data: [5.35, 5.1, 4.9, 4.74],
borderColor: 'rgba(75, 192, 192, 1)',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
tension: 0.3,
fill: true
},
{
label: '怒江州初中在校生(万人)',
data: [2.26, 2.15, 2.08, 2.0],
borderColor: 'rgba(153, 102, 255, 1)',
backgroundColor: 'rgba(153, 102, 255, 0.2)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '怒江州各学段学生数量变化趋势(2022-2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: false,
title: {
display: true,
text: '学生数量(万人)'
}
},
x: {
title: {
display: true,
text: '年份'
}
}
}
}
});
// 图表5学生数量变化趋势图2 - 昭通市
const studentTrend2Ctx = document.getElementById('studentTrendChart2').getContext('2d');
const studentTrendChart2 = new Chart(studentTrend2Ctx, {
type: 'line',
data: {
labels: ['2022', '2025', '2030', '2035'],
datasets: [
{
label: '昭通市学前在园幼儿(万人)',
data: [7.5, 7.0, 6.5, 6.0],
borderColor: 'rgba(255, 159, 64, 1)',
backgroundColor: 'rgba(255, 159, 64, 0.2)',
tension: 0.3,
fill: true
},
{
label: '昭通市小学在校生(万人)',
data: [50, 47, 43, 40],
borderColor: 'rgba(75, 192, 192, 1)',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
tension: 0.3,
fill: true
},
{
label: '昭通市初中在校生(万人)',
data: [26.5, 25, 23, 21],
borderColor: 'rgba(153, 102, 255, 1)',
backgroundColor: 'rgba(153, 102, 255, 0.2)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '昭通市各学段学生数量变化趋势(2022-2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: false,
title: {
display: true,
text: '学生数量(万人)'
}
},
x: {
title: {
display: true,
text: '年份'
}
}
}
}
});
// 图表6学生数量对比图
const studentComparisonCtx = document.getElementById('studentComparisonChart').getContext('2d');
const studentComparisonChart = new Chart(studentComparisonCtx, {
type: 'bar',
data: {
labels: ['学前', '小学', '初中'],
datasets: [
{
label: '怒江州2022年',
data: [2.77, 5.35, 2.26],
backgroundColor: 'rgba(75, 192, 192, 0.6)'
},
{
label: '怒江州2035年',
data: [2.46, 4.74, 2.0],
backgroundColor: 'rgba(75, 192, 192, 0.2)'
},
{
label: '昭通市2022年',
data: [7.5, 50, 26.5],
backgroundColor: 'rgba(153, 102, 255, 0.6)'
},
{
label: '昭通市2035年',
data: [6.0, 40, 21],
backgroundColor: 'rgba(153, 102, 255, 0.2)'
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '怒江州与昭通市各学段学生数量对比(2022 vs 2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: '学生数量(万人)'
}
},
x: {
title: {
display: true,
text: '学段'
}
}
}
}
});
// 图表7教职工需求变化趋势图1 - 怒江州
const teacherTrend1Ctx = document.getElementById('teacherTrendChart1').getContext('2d');
const teacherTrendChart1 = new Chart(teacherTrend1Ctx, {
type: 'line',
data: {
labels: ['2022', '2025', '2030', '2035'],
datasets: [
{
label: '怒江州学前教职工(千人)',
data: [1.5, 1.5, 1.5, 1.5],
borderColor: 'rgba(255, 159, 64, 1)',
backgroundColor: 'rgba(255, 159, 64, 0.2)',
tension: 0.3,
fill: true
},
{
label: '怒江州小学教职工(千人)',
data: [3.2, 3.2, 3.2, 3.2],
borderColor: 'rgba(75, 192, 192, 1)',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
tension: 0.3,
fill: true
},
{
label: '怒江州初中教职工(千人)',
data: [2.0, 2.0, 2.0, 2.0],
borderColor: 'rgba(153, 102, 255, 1)',
backgroundColor: 'rgba(153, 102, 255, 0.2)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '怒江州各学段教职工需求变化趋势(2022-2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: false,
title: {
display: true,
text: '教职工数量(千人)'
}
},
x: {
title: {
display: true,
text: '年份'
}
}
}
}
});
// 图表8教职工需求变化趋势图2 - 昭通市
const teacherTrend2Ctx = document.getElementById('teacherTrendChart2').getContext('2d');
const teacherTrendChart2 = new Chart(teacherTrend2Ctx, {
type: 'line',
data: {
labels: ['2022', '2025', '2030', '2035'],
datasets: [
{
label: '昭通市学前教职工(千人)',
data: [3.1, 2.9, 2.7, 2.5],
borderColor: 'rgba(255, 159, 64, 1)',
backgroundColor: 'rgba(255, 159, 64, 0.2)',
tension: 0.3,
fill: true
},
{
label: '昭通市小学教职工(千人)',
data: [15, 14.5, 14, 13.5],
borderColor: 'rgba(75, 192, 192, 1)',
backgroundColor: 'rgba(75, 192, 192, 0.2)',
tension: 0.3,
fill: true
},
{
label: '昭通市初中教职工(千人)',
data: [10, 9.5, 9, 8.5],
borderColor: 'rgba(153, 102, 255, 1)',
backgroundColor: 'rgba(153, 102, 255, 0.2)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '昭通市各学段教职工需求变化趋势(2022-2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: false,
title: {
display: true,
text: '教职工数量(千人)'
}
},
x: {
title: {
display: true,
text: '年份'
}
}
}
}
});
// 图表9学校占地面积需求对比图
const schoolAreaCtx = document.getElementById('schoolAreaChart').getContext('2d');
const schoolAreaChart = new Chart(schoolAreaCtx, {
type: 'bar',
data: {
labels: ['学前', '小学', '初中', '高中'],
datasets: [
{
label: '怒江州2022年(万平方米)',
data: [15, 50, 30, 25],
backgroundColor: 'rgba(75, 192, 192, 0.6)'
},
{
label: '怒江州2035年(万平方米)',
data: [14, 48, 28, 24],
backgroundColor: 'rgba(75, 192, 192, 0.2)'
},
{
label: '昭通市2022年(万平方米)',
data: [120, 400, 250, 200],
backgroundColor: 'rgba(153, 102, 255, 0.6)'
},
{
label: '昭通市2035年(万平方米)',
data: [77, 273, 163, 100],
backgroundColor: 'rgba(153, 102, 255, 0.2)'
}
]
},
options: {
responsive: true,
plugins: {
title: {
display: true,
text: '怒江州与昭通市各学段学校占地面积需求对比(2022 vs 2035)',
font: {
size: 16
}
},
legend: {
position: 'top'
},
tooltip: {
mode: 'index',
intersect: false
}
},
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: '占地面积(万平方米)'
}
},
x: {
title: {
display: true,
text: '学段'
}
}
}
}
});
</script>
</body>
</html>
Loading…
Cancel
Save