jiangsu-kaogong 1.3.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/index.js +26 -87
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -544,10 +544,13 @@ program
544
544
  // 根据用户条件过滤
545
545
  let match = true;
546
546
 
547
- // 地区过滤(只显示盐城)
548
- if (position.district && !position.district.includes('盐城')) {
549
- // 如果只想要盐城岗位,可以打开这个过滤
550
- // match = false;
547
+ // 地区过滤 - 只显示盐城地区
548
+ if (position.district) {
549
+ const yanchengDistricts = ['盐城', '亭湖', '盐都', '大丰', '响水', '滨海', '阜宁', '射阳', '建湖', '东台'];
550
+ const isYancheng = yanchengDistricts.some(d => position.district.includes(d));
551
+ if (!isYancheng) {
552
+ match = false;
553
+ }
551
554
  }
552
555
 
553
556
  // 学历过滤
@@ -603,43 +606,17 @@ program
603
606
  }
604
607
 
605
608
  if (match) {
606
- // 模拟分数(根据盐城往年情况)
607
- const category = position.category || 'A';
608
- const baseScores = { 'A': 120, 'B': 115, 'C': 110 };
609
- const base = baseScores[category] || 115;
610
-
611
- // 根据单位级别调整分数
612
- let addScore = 0;
613
- if (position.unit.includes('市纪委') || position.unit.includes('市委')) addScore = 15;
614
- else if (position.unit.includes('政府') || position.unit.includes('司法局')) addScore = 10;
615
- else if (position.unit.includes('民政') || position.unit.includes('自然资源')) addScore = 5;
616
-
617
- position.minScore = base + addScore;
618
- position.maxScore = position.minScore + 15;
619
- position.remark = position.other; // 把政治面貌、应届等条件放到备注
620
-
621
- // 分档
622
- if (totalScore > 0) {
623
- const diff = totalScore - position.minScore;
624
- if (diff < 5) position.rank = '冲';
625
- else if (diff < 10) position.rank = '稳';
626
- else position.rank = '保';
627
-
628
- // 计算差距
629
- position.firstScore = (position.maxScore / 2) * 0.5 + 72 * 0.5;
630
- position.gap = (position.firstScore - finalScore).toFixed(2);
631
- }
632
-
609
+ // 只使用Excel里的真实数据,不做任何模拟
633
610
  allPositions.push(position);
634
611
  }
635
612
  }
636
613
  }
637
614
  }
638
615
 
639
- // 分档
640
- rushPositions = allPositions.filter(p => p.rank === '冲').slice(0, 20);
641
- stablePositions = allPositions.filter(p => p.rank === '稳').slice(0, 20);
642
- safePositions = allPositions.filter(p => p.rank === '保').slice(0, 20);
616
+ // 分档逻辑去掉,只显示所有符合条件的岗位
617
+ rushPositions = allPositions;
618
+ stablePositions = [];
619
+ safePositions = [];
643
620
 
644
621
  if (allPositions.length === 0) {
645
622
  noDataTip = '📂 已解析文件,但未找到符合条件的岗位,请调整筛选条件';
@@ -772,72 +749,34 @@ program
772
749
  </div>
773
750
  ` : `
774
751
  <div class="card rank-rush">
775
- <h2>🔴 冲档(${rushPositions.length}个)— 与综合第一差距5分以内</h2>
752
+ <h2>📋 符合条件的岗位(${allPositions.length}个)</h2>
776
753
  <table class="table">
777
754
  <thead>
778
- <tr><th>#</th><th>地区</th><th>单位 - 岗位</th><th>进面最低~最高</th><th>综合第一</th><th>综合第一面试</th><th>你与第一差距</th><th>备注</th></tr>
755
+ <tr><th>#</th><th>地区</th><th>单位</th><th>岗位</th><th>专业</th><th>学历</th><th>考试类别</th><th>其他条件</th></tr>
779
756
  </thead>
780
757
  <tbody>
781
- ${rushPositions.map((p, i) => `
758
+ ${allPositions.map((p, i) => `
782
759
  <tr>
783
- <td class="star">${p.tag}${i+1}</td>
760
+ <td>${i+1}</td>
784
761
  <td>${p.district}</td>
785
- <td>${p.unit} - ${p.position}</td>
786
- <td>${p.minScore}~${p.maxScore}</td>
787
- <td>${p.firstScore || '—'}</td>
788
- <td>${p.firstInterview || '—'}</td>
789
- <td><span class="badge badge-red">${p.gap !== null ? p.gap + ' 分' : '—'}</span></td>
790
- <td>${p.remark}</td>
762
+ <td>${p.unit}</td>
763
+ <td>${p.position}</td>
764
+ <td style="font-size: 12px; max-width: 150px;">${p.major}</td>
765
+ <td>${p.education}</td>
766
+ <td>${p.category}</td>
767
+ <td style="font-size: 11px; max-width: 200px;">${p.other}</td>
791
768
  </tr>
792
769
  `).join('')}
793
770
  </tbody>
794
771
  </table>
795
772
  </div>
796
773
 
797
- <div class="card rank-stable">
798
- <h2>🟡 稳档(${stablePositions.length}个)— 笔试超进面线5~10分</h2>
799
- <table class="table">
800
- <thead>
801
- <tr><th>#</th><th>地区</th><th>单位 - 岗位</th><th>进面最低~最高</th><th>综合第一</th><th>综合第一面试</th><th>你与第一差距</th><th>备注</th></tr>
802
- </thead>
803
- <tbody>
804
- ${stablePositions.map((p, i) => `
805
- <tr>
806
- <td class="star">${p.tag}${i+1}</td>
807
- <td>${p.district}</td>
808
- <td>${p.unit} - ${p.position}</td>
809
- <td>${p.minScore}~${p.maxScore}</td>
810
- <td>${p.firstScore || '—'}</td>
811
- <td>${p.firstInterview || '—'}</td>
812
- <td><span class="badge badge-yellow">${p.gap !== null ? (parseFloat(p.gap) >= 0 ? '+' : '') + p.gap + ' 分' : '—'}</span></td>
813
- <td>${p.remark}</td>
814
- </tr>
815
- `).join('')}
816
- </tbody>
817
- </table>
774
+ <div class="card" style="display: none;">
775
+ <h2>🟡 稳档(0个)</h2>
818
776
  </div>
819
777
 
820
- <div class="card rank-safe">
821
- <h2>🟢 保档(${safePositions.length}个)— 笔试超进面线10分以上</h2>
822
- <table class="table">
823
- <thead>
824
- <tr><th>#</th><th>地区</th><th>单位 - 岗位</th><th>进面最低~最高</th><th>综合第一</th><th>综合第一面试</th><th>你与第一差距</th><th>备注</th></tr>
825
- </thead>
826
- <tbody>
827
- ${safePositions.map((p, i) => `
828
- <tr>
829
- <td class="star">${p.tag}${i+1}</td>
830
- <td>${p.district}</td>
831
- <td>${p.unit} - ${p.position}</td>
832
- <td>${p.minScore}~${p.maxScore}</td>
833
- <td>${p.firstScore || '—'}</td>
834
- <td>${p.firstInterview || '—'}</td>
835
- <td><span class="badge badge-green">+${p.gap} 分</span></td>
836
- <td>${p.remark}</td>
837
- </tr>
838
- `).join('')}
839
- </tbody>
840
- </table>
778
+ <div class="card" style="display: none;">
779
+ <h2>🟢 保档(0个)</h2>
841
780
  </div>
842
781
  `}
843
782
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jiangsu-kaogong",
3
- "version": "1.3.0",
3
+ "version": "3.1.0",
4
4
  "description": "江苏省考选岗CLI工具 - 解析职位表、进面分数线,智能推荐岗位",
5
5
  "main": "index.js",
6
6
  "bin": {