-
-
-
-
+
+
+
操作
+
+
+
+
+
+
+
-
-
+
- const boardThicknessOptions = {
- fr4Item: {
- '1': ['0.6', '0.8', '1.0', '1.2', '1.6', '2.0'],
- '2': ['0.4', '0.6', '0.8', '1.0', '1.2', '1.6', '2.0', '2.4', '3.0', '3.6', '4.0'],
- '4': ['0.4', '0.6', '0.8', '1.0', '1.2', '1.6', '2.0', '2.4', '2.5', '3.0', '3.2'],
- '6': ['0.8', '1.0', '1.2', '1.6', '2.0', '2.5', '3.0'],
- '8': ['1.2', '1.6', '2.0', '2.5'],
- '10': ['1.2', '1.6', '2.0', '2.5'],
- '12': ['1.6', '2.0', '2.5'],
- '14': ['1.6', '2.0', '2.5', '3.0'],
- '16': ['2.0', '2.5', '3.0', '3.2'],
- '18': ['2.0', '2.5', '3.0', '3.2'],
- '20': ['2.0', '2.5', '3.0', '3.2'],
- '22': ['2.5', '3.0', '3.2'],
- '24': ['2.5', '3.0', '3.2'],
- '26': ['2.5', '3.0', '3.2'],
- '28': ['2.5', '3.0', '3.2'],
- '30': ['2.5', '3.0', '3.2'],
- '32': ['2.5', '3.0', '3.2'],
- },
- aluminumItem: {
- '1': ['0.4', '0.6', '0.8', '1.0', '1.2', '1.6', '2.0', '2.5', '3.0'],
- '2': ['0.8', '1.0', '1.2', '1.6', '2.0'],
- },
- copperItem: {
- '1': ['1.0', '1.2', '1.5', '1.6', '2.0'],
- '2': ['1.0', '1.2', '1.5', '1.6', '2.0'],
- '4': ['1.0', '1.2', '1.5', '1.6', '2.0'],
- },
- rogersItem: {
- '1': {
- '2': ['0.203', '0.254', '0.305', '0.335', '0.406', '0.422', '0.508', '0.762', '0.813', '1.524'],
- '4': ['0.4', '0.6', '0.8', '1.0', '1.2', '1.6', '2.0', '2.4'],
- '6': ['1.0', '1.2', '1.6', '2.0', '2.4'],
- '8': ['1.0', '1.2', '1.6', '2.0', '2.4', '3.0']
- },
- '2': {
- '4': ['0.4', '0.6', '0.8', '1.0', '1.2', '1.6', '2.0', '2.4'],
- '6': ['1.0', '1.2', '1.6', '2.0', '2.4'],
- '8': ['1.0', '1.2', '1.6', '2.0', '2.4', '3.0']
- }
- },
- hdiItem: {
- '1': {
- '4': ['0.6', '0.8', '1.0', '1.2', '1.6', '2.0'],
- '6': ['0.8', '1.0', '1.2', '1.6', '2.0', '2.4', '2.5'],
- '8': ['1.0', '1.2', '1.6', '2.0', '2.4', '2.5'],
- '10': ['1.2', '1.6', '2.0', '2.4', '2.5'],
- '12': ['1.6', '2.0', '2.4', '2.5'],
- '14': ['1.6', '2.0', '2.4', '2.5', '3.0'],
- '16': ['2.0', '2.4', '2.5', '3.0', '3.2'],
- '18': ['2.0', '2.4', '2.5', '3.0', '3.2'],
- '20': ['2.0', '2.4', '2.5', '3.0', '3.2']
- },
- '2': {
- '6': ['0.8', '1.0', '1.2', '1.6', '2.0', '2.4', '2.5'],
- '8': ['1.0', '1.2', '1.6', '2.0', '2.4', '2.5'],
- '10': ['1.2', '1.6', '2.0', '2.4', '2.5'],
- '12': ['1.6', '2.0', '2.4', '2.5'],
- '14': ['1.6', '2.0', '2.4', '2.5', '3.0'],
- '16': ['2.0', '2.4', '2.5', '3.0', '3.2'],
- '18': ['2.0', '2.4', '2.5', '3.0', '3.2'],
- '20': ['2.0', '2.4', '2.5', '3.0', '3.2']
- },
- '3': {
- '8': ['1.0', '1.2', '1.6', '2.0', '2.4', '2.5'],
- '10': ['1.2', '1.6', '2.0', '2.4', '2.5'],
- '12': ['1.6', '2.0', '2.4', '2.5'],
- '14': ['1.6', '2.0', '2.4', '2.5', '3.0'],
- '16': ['2.0', '2.4', '2.5', '3.0', '3.2'],
- '18': ['2.0', '2.4', '2.5', '3.0', '3.2'],
- '20': ['2.0', '2.4', '2.5', '3.0', '3.2']
- }
- },
- cem1Item: {
- '1': ['1.0', '1.2', '1.6']
- },
- '22fItem': {
- '1': ['1.0', '1.2', '1.6']
- },
- fr1Item: {
- '1': ['1.0', '1.2', '1.6']
- },
- cem3Item: {
- '1': ['1.0', '1.2']
- }
- }
+
+ url += mixedCategory ? `&MixedCategory=${encodeURIComponent(mixedCategory)}` : '';
+ url += hdiBuilds ? `&HDIBuilds=${encodeURIComponent(hdiBuilds)}` : '';
+ url += boardThickness ? `&BoardThickness=${encodeURIComponent(boardThickness)}` : '';
+ url += CopperThickness ? `&CopperThickness=${encodeURIComponent(CopperThickness)}` : '';
+ url += innerCopperThickness ? `&InnerCopperThickness=${encodeURIComponent(innerCopperThickness)}` : '';
+ url += aluminumType ? `&AluminumType=${encodeURIComponent(aluminumType)}` : '';
+ url += solderColor ? `&SolderColor=${encodeURIComponent(solderColor)}` : '';
+ url += fontColor ? `&FontColor=${encodeURIComponent(fontColor)}` : '';
+ url += invoice ? `&Invoice=${encodeURIComponent(invoice)}` : '';
+ url += lineWeight ? `&LineWeight=${encodeURIComponent(lineWeight)}` : '';
+ url += vias ? `&Vias=${encodeURIComponent(vias)}` : '';
+ url += solderCover ? `&SolderCover=${encodeURIComponent(solderCover)}` : '';
+ url += flyingProbe ? `&FlyingProbe=${encodeURIComponent(flyingProbe)}` : '';
+ url += surfaceFinish ? `&SurfaceFinish=${encodeURIComponent(surfaceFinish)}` : '';
+ url += imGoldThinckness ? `&ImGoldThinckness=${encodeURIComponent(imGoldThinckness)}` : '';
+ url += halfHole ? `&HalfHole=${encodeURIComponent(halfHole)}` : '';
+ url += holeThickness ? `&HoleThickness_=${encodeURIComponent(holeThickness)}` : '';
+ url += WithstandVoltage ? `&WithstandVoltage=${encodeURIComponent(WithstandVoltage)}` : '';
+ url += impedanceSize ? `&ImpedanceSize=${encodeURIComponent(impedanceSize)}` : '';
+ url += QualityCompensation ? `&QualityCompensation=${encodeURIComponent(QualityCompensation)}` : '';
+ url += LowResistanceTest ? `&LowResistanceTest=${encodeURIComponent(LowResistanceTest)}` : '';
+ url += ProductFileSure ? `&ProductFileSure=${encodeURIComponent(ProductFileSure)}` : '';
+ url += ReportMaterial ? `&ReportMaterial=${encodeURIComponent(ReportMaterial)}` : '';
+ url += GongBoundaryTolerance ? `&GongBoundaryTolerance=${encodeURIComponent(GongBoundaryTolerance)}` : '';
+ url += PanelAppearanceRequire ? `&PanelAppearanceRequire=${encodeURIComponent(PanelAppearanceRequire)}` : '';
+ url += WhitePaperService ? `&WhitePaperService=${encodeURIComponent(WhitePaperService)}` : '';
+ url += IsNoneFont ? `&IsNoneFont=${encodeURIComponent(IsNoneFont)}` : '';
-
-
-
- // Attach a method to the container to easily get the selected value
- container.getValue = () => {
- const selectedRadio = container.querySelector(`input[name="${radioName}"]:checked`);
- return selectedRadio ? selectedRadio.value : null;
- };
- }
+
- if (selectedCategory === 'fr4Item' || selectedCategory === 'rogersItem') {
- document.getElementById('SolderCover-container').style.display = 'block';
- } else {
- document.getElementById('SolderCover-container').style.display = 'none';
- }
+
-
-
-
+ // 传入预设名称,自动使用setupRadioGroup所有选项
+ function autoSetupPreset(presetName) {
+ if (presetList[presetName]) {
+ setupRadioGroup('proCategory', 'proCategory', presetList[presetName].proCategory || '');
+ presetList[presetName].proCategory ? updateBoardCraft(presetList[presetName].proCategory) : '';
+ setupRadioGroup('BoardLayers', 'BoardLayers', presetList[presetName].BoardLayers || '');
+ presetList[presetName].proCategory ? updateBoardCraft(presetList[presetName].proCategory) : '';
+ setupRadioGroup('MixedCategory', 'MixedCategory', presetList[presetName].MixedCategory || '');
+ presetList[presetName].proCategory ? updateBoardCraft(presetList[presetName].proCategory) : '';
+ setupRadioGroup('HDIBuilds', 'HDIBuilds', presetList[presetName].HDIBuilds || '');
+ presetList[presetName].proCategory ? updateBoardCraft(presetList[presetName].proCategory) : '';
+ document.getElementById('BoardHeight').value = presetList[presetName].BoardHeight;
+ document.getElementById('BoardWidth').value = presetList[presetName].BoardWidth;
+ document.getElementById('num').value = presetList[presetName].num;
+ setupRadioGroup('BoardType', 'BoardType', presetList[presetName].BoardType);
+ setupRadioGroup('OrderStage', 'OrderStage', presetList[presetName].OrderStage);
+ setupRadioGroup('AluminumType', 'AluminumType', presetList[presetName].AluminumType);
+ setupRadioGroup('CopperStructure', 'CopperStructure', presetList[presetName].CopperStructure);
+ setupRadioGroup('BoardThickness', 'BoardThickness', presetList[presetName].BoardThickness);
+ setupRadioGroup('CopperThickness', 'CopperThickness', presetList[presetName].CopperThickness);
+ setupRadioGroup('Invoice', 'Invoice', presetList[presetName].Invoice);
+ setupRadioGroup('InnerCopperThickness', 'InnerCopperThickness', presetList[presetName].InnerCopperThickness);
+ setupRadioGroup('SolderColor', 'SolderColor', presetList[presetName].SolderColor);
+ setupRadioGroup('FontColor', 'FontColor', presetList[presetName].FontColor);
+ setupRadioGroup('LineWeight', 'LineWeight', presetList[presetName].LineWeight);
+ setupRadioGroup('Vias', 'Vias', presetList[presetName].Vias);
+ setupRadioGroup('SolderCover', 'SolderCover', presetList[presetName].SolderCover);
+ setupRadioGroup('FlyingProbe', 'FlyingProbe', presetList[presetName].FlyingProbe);
+ setupRadioGroup('SurfaceFinish', 'SurfaceFinish', presetList[presetName].SurfaceFinish);
+ setupRadioGroup('ImpedanceSize', 'ImpedanceSize', presetList[presetName].ImpedanceSize);
+ setupRadioGroup('HalfHole', 'HalfHole', presetList[presetName].HalfHole);
+ setupRadioGroup('HoleThickness_', 'HoleThickness_', presetList[presetName].HoleThickness_);
+ setupRadioGroup('WithstandVoltage', 'WithstandVoltage', presetList[presetName].WithstandVoltage);
+ setupRadioGroup('QualityCompensation', 'QualityCompensation', presetList[presetName].QualityCompensation);
+ setupRadioGroup('LowResistanceTest', 'LowResistanceTest', presetList[presetName].LowResistanceTest);
+ setupRadioGroup('ProductFileSure', 'ProductFileSure', presetList[presetName].ProductFileSure);
+ setupRadioGroup('ReportMaterial', 'ReportMaterial', presetList[presetName].ReportMaterial);
+ setupRadioGroup('GongBoundaryTolerance', 'GongBoundaryTolerance', presetList[presetName].GongBoundaryTolerance);
+ setupRadioGroup('PanelAppearanceRequire', 'PanelAppearanceRequire', presetList[presetName].PanelAppearanceRequire);
+ setupRadioGroup('WhitePaperService', 'WhitePaperService', presetList[presetName].WhitePaperService);
+ setupRadioGroup('IsNoneFont', 'IsNoneFont', presetList[presetName].IsNoneFont);
+ }
+ }
+
+
diff --git a/package-lock.json b/package-lock.json
index f7d5124..8686c15 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
"version": "1.1.1",
"license": "Apache-2.0",
"devDependencies": {
- "@jlceda/pro-api-types": "^0.1.156",
+ "@jlceda/pro-api-types": "^0.1.175",
"@microsoft/tsdoc": "^0.15.1",
"@tailwindcss/cli": "^4.1.8",
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
@@ -900,9 +900,9 @@
}
},
"node_modules/@jlceda/pro-api-types": {
- "version": "0.1.156",
- "resolved": "https://registry.npmjs.org/@jlceda/pro-api-types/-/pro-api-types-0.1.156.tgz",
- "integrity": "sha512-U26OzNETxZZfwGS3sfqQ7emclnwWgD72gWCtgU99TwMBAV+G5kP8Fd65w7nKqMcTVVG0TlSbsgUdNW/IPD8HcA==",
+ "version": "0.1.175",
+ "resolved": "https://registry.npmjs.org/@jlceda/pro-api-types/-/pro-api-types-0.1.175.tgz",
+ "integrity": "sha512-83opK7FZmtm5GFkfulYuCWHOhFO+WYocjfiuRh1K2PQaPeIe+/e3wKE4vUBcKptGajePpyDlfKL4UXTFVBe+Vg==",
"dev": true,
"license": "Apache-2.0"
},
diff --git a/package.json b/package.json
index 5086129..d0952b3 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
"build": "npm run tailwind && npm run compile && ts-node ./build/packaged.ts"
},
"devDependencies": {
- "@jlceda/pro-api-types": "^0.1.156",
+ "@jlceda/pro-api-types": "^0.1.175",
"@microsoft/tsdoc": "^0.15.1",
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
"@types/fs-extra": "^11.0.4",