Ethanfly hai 18 horas
pai
achega
8eb2fc6936

+ 0 - 11
client/src/components.d.ts

@@ -15,18 +15,11 @@ declare module 'vue' {
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElButton: typeof import('element-plus/es')['ElButton']
     ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
-    ElCascader: typeof import('element-plus/es')['ElCascader']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
-    ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
-    ElCol: typeof import('element-plus/es')['ElCol']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElContainer: typeof import('element-plus/es')['ElContainer']
-    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
-    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
-    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDivider: typeof import('element-plus/es')['ElDivider']
-    ElDrawer: typeof import('element-plus/es')['ElDrawer']
     ElDropdown: typeof import('element-plus/es')['ElDropdown']
     ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
     ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
@@ -39,11 +32,9 @@ declare module 'vue' {
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
-    ElPagination: typeof import('element-plus/es')['ElPagination']
     ElProgress: typeof import('element-plus/es')['ElProgress']
     ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
     ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
-    ElRow: typeof import('element-plus/es')['ElRow']
     ElSelect: typeof import('element-plus/es')['ElSelect']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
@@ -52,8 +43,6 @@ declare module 'vue' {
     ElTabPane: typeof import('element-plus/es')['ElTabPane']
     ElTabs: typeof import('element-plus/es')['ElTabs']
     ElTag: typeof import('element-plus/es')['ElTag']
-    ElText: typeof import('element-plus/es')['ElText']
-    ElUpload: typeof import('element-plus/es')['ElUpload']
     Icons: typeof import('./components/icons/index.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']
     RouterView: typeof import('vue-router')['RouterView']

+ 5 - 2
server/src/config/index.ts

@@ -2,10 +2,13 @@ import dotenv from 'dotenv';
 import path from 'path';
 import { fileURLToPath } from 'url';
 
-dotenv.config();
-
 const __dirname = path.dirname(fileURLToPath(import.meta.url));
 
+// 显式从 server/.env 加载配置,避免在不同工作目录下找不到正确的 env
+dotenv.config({
+  path: path.resolve(__dirname, '../../.env'),
+});
+
 export const config = {
   env: process.env.NODE_ENV || 'development',
   version: process.env.npm_package_version || '1.0.0',

+ 19 - 0
server/src/scripts/print-python-service-url.ts

@@ -0,0 +1,19 @@
+import { AppDataSource, SystemConfig, initDatabase } from '../models/index.js';
+import { getPythonServiceBaseUrl } from '../services/PythonServiceConfigService.js';
+
+async function main() {
+  await initDatabase();
+
+  const url = await getPythonServiceBaseUrl();
+  console.log('Effective Python service base URL:', url);
+
+  const repo = AppDataSource.getRepository(SystemConfig);
+  const row = await repo.findOne({ where: { configKey: 'python_publish_service_url' } });
+  console.log('system_config.python_publish_service_url row:', row);
+}
+
+main().catch((err) => {
+  console.error(err);
+  process.exit(1);
+});
+

+ 3 - 2
server/tsconfig.json

@@ -5,8 +5,9 @@
     "rootDir": "./src",
     "lib": ["ES2022"],
     "types": ["node"],
-    "emitDecoratorMetadata": true,
-    "experimentalDecorators": true
+    "emitDecoratorMetadata": false,
+    "experimentalDecorators": true,
+    "noEmitOnError": false
   },
   "include": ["src/**/*"],
   "exclude": ["node_modules", "dist"]