同步:完善质量分析工作台并更新主题字体

同步已上线的智能分析执行协议、来源查询、图表报告与管理页面配套代码。
补齐数据库迁移、运行依赖和回归测试,保留原有指标计算口径。
统一午夜黑及其他主题的控件细节、中文和业务数字字体。
排除本地业务数据、凭据、预览、发布与验收产物。

验证:生产构建通过,320项前端回归通过;本轮仅同步Git,不再次部署。
This commit is contained in:
2026-10-30 22:40:58 +08:00
parent edef747e3b
commit ff7bbe3e46
393 changed files with 62999 additions and 1783 deletions
+14 -3
View File
@@ -43,13 +43,16 @@ def environment():
value = config()
env = os.environ.copy()
env.update({'JAVA_HOME': str(RUNTIME / 'jdk/Contents/Home'),
'MYSQL_URL': f'jdbc:mysql://127.0.0.1:{value["mysqlPort"]}/{value["mysqlDatabase"]}?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true',
'MYSQL_URL': f'jdbc:mysql://127.0.0.1:{value["mysqlPort"]}/{value["mysqlDatabase"]}?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&forceConnectionTimeZoneToSession=true&useSSL=false&allowPublicKeyRetrieval=true',
'MYSQL_LEGACY_TIMESTAMP_OFFSET_SECONDS': str(value.get('legacyTimestampOffsetSeconds', 'UNCONFIRMED')),
'MYSQL_USER': value['mysqlUser'], 'MYSQL_PASSWORD': value['mysqlPassword'],
'QUALITY_BOOTSTRAP_ADMIN_USERNAME': value['adminUsername'],
'QUALITY_BOOTSTRAP_ADMIN_PASSWORD': value['adminPassword'],
'QUALITY_ARCHIVE_ROOT': str(ROOT / 'runtimedata/archive'),
'QUALITY_ALLOWED_ROOTS': str(ROOT / '质量数据/系统原始数据示例'),
'QUALITY_DATA_WORKFLOW_TEST_MODE': 'true',
'QUALITY_ANALYSIS_PROTOCOL_V1_ENABLED': str(value.get('analysisProtocolV1Enabled', False)).lower(),
'QUALITY_ANALYSIS_AUTONOMOUS_ENABLED': str(value.get('analysisAutonomousEnabled', False)).lower(),
'QUALITY_PROJECT_ROOT': str(ROOT),
'QUALITY_DEFAULT_SOURCE_YEAR': '2026'})
env['PATH'] = str(RUNTIME / 'jdk/Contents/Home/bin') + ':' + str(RUNTIME / 'maven/bin') + ':' + env.get('PATH', '')
@@ -135,6 +138,9 @@ def start_mysql():
with (OUTPUT / 'logs/mysql-initialize.log').open('ab') as log:
run([binary, '--no-defaults', '--initialize-insecure', '--basedir=' + str(RUNTIME / 'mysql'),
'--datadir=' + str(data), '--lower-case-table-names=2'], stdout=log, stderr=log)
# A restored configuration can say ready while this new data directory has no users.
value['databaseReady'] = False
save_private(CONFIG, json.dumps(value, indent=2) + '\n')
start_process('mysql', [binary, '--no-defaults', '--basedir=' + str(RUNTIME / 'mysql'),
'--datadir=' + str(data), '--port=' + str(value['mysqlPort']), '--bind-address=127.0.0.1',
'--socket=' + str(RUNTIME / 'mysql.sock'), '--pid-file=' + str(RUNTIME / 'mysql-server.pid'),
@@ -177,11 +183,13 @@ ALTER USER 'root'@'localhost' IDENTIFIED BY '{value['rootPassword']}';
print('Local MySQL is ready on 127.0.0.1:' + str(value['mysqlPort']), flush=True)
def build(skip_tests=False):
def build(skip_tests=False, private_acceptance=False):
args = [RUNTIME / 'maven/bin/mvn', '-f', ROOT / 'backend/pom.xml',
'-Dmaven.repo.local=' + str(RUNTIME / 'm2'), '--batch-mode', 'package']
if skip_tests:
args.append('-DskipTests')
if private_acceptance:
args.append('-Pprivate-acceptance')
run(args)
run(['pnpm', '--dir', ROOT / 'web', 'build'])
@@ -244,11 +252,14 @@ def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('action', choices=['mysql', 'build', 'start', 'stop', 'status'])
parser.add_argument('--skip-tests', action='store_true')
parser.add_argument('--private-acceptance', action='store_true', help='Also replay the locally configured, private original workbooks')
args = parser.parse_args()
if args.action == 'mysql':
start_mysql()
elif args.action == 'build':
build(args.skip_tests)
if args.skip_tests and args.private_acceptance:
parser.error('--private-acceptance cannot be combined with --skip-tests')
build(args.skip_tests, args.private_acceptance)
elif args.action == 'start':
start()
elif args.action == 'stop':