From 510f02a5302ae52cdbc21311e0c4b4a2fcbcbb28 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Wed, 8 Jan 2025 13:45:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=93=E5=8C=85=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 ++ .env.yc | 4 +++- .env.yc2 | 2 ++ electron-builder-yc.yml | 2 +- electron-builder-yc2.yml | 2 +- package.json | 9 ++++---- src/renderer/src/utils/comm.js | 41 ++++++++++++++++++++++++++++++++++ updatePackageJsonName.js | 14 ++++++++++++ 8 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 updatePackageJsonName.js diff --git a/.env.production b/.env.production index c3b1489..b6dfa01 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,8 @@ # 页面标题 VITE_APP_TITLE = 文枢课堂 +VITE_APP_ID = 'aix-win-ws' + # 生产环境配置 VITE_APP_ENV = 'production' diff --git a/.env.yc b/.env.yc index c3b1489..d60ed5c 100644 --- a/.env.yc +++ b/.env.yc @@ -1,5 +1,7 @@ # 页面标题 -VITE_APP_TITLE = 文枢课堂 +VITE_APP_TITLE = 永川中小学AI教学系统 + +VITE_APP_ID = 'aix-win-ws-yc' # 生产环境配置 VITE_APP_ENV = 'production' diff --git a/.env.yc2 b/.env.yc2 index c4a88ef..1f76587 100644 --- a/.env.yc2 +++ b/.env.yc2 @@ -1,6 +1,8 @@ # 页面标题 VITE_APP_TITLE = 实训教学 +VITE_APP_ID = 'aix-win-ws-yc2' + # 生产环境配置 VITE_APP_ENV = 'production' diff --git a/electron-builder-yc.yml b/electron-builder-yc.yml index fd34471..89158a2 100644 --- a/electron-builder-yc.yml +++ b/electron-builder-yc.yml @@ -17,7 +17,7 @@ asarUnpack: nsis: oneClick: false allowToChangeInstallationDirectory: true - artifactName: ${name}-yc-${version}-setup.${ext} + artifactName: ${name}-${version}-setup.${ext} shortcutName: ${productName} uninstallDisplayName: ${productName} createDesktopShortcut: always diff --git a/electron-builder-yc2.yml b/electron-builder-yc2.yml index a7bfd2f..3f9322a 100644 --- a/electron-builder-yc2.yml +++ b/electron-builder-yc2.yml @@ -17,7 +17,7 @@ asarUnpack: nsis: oneClick: false allowToChangeInstallationDirectory: true - artifactName: ${name}-ycsx-${version}-setup.${ext} + artifactName: ${name}-${version}-setup.${ext} shortcutName: ${productName} uninstallDisplayName: ${productName} createDesktopShortcut: always diff --git a/package.json b/package.json index 7fb23eb..4fba2cd 100644 --- a/package.json +++ b/package.json @@ -10,14 +10,13 @@ "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix", "start": "electron-vite preview", "dev": "electron-vite dev", - "build": "electron-vite build", "postinstall": "electron-builder install-app-deps", "build:unpack": "npm run build && electron-builder --dir", "build:dev": "npm run build && electron-builder --win --config ./electron-builder-test.yml", - "build:test": "electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml", - "build:prod": "electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml", - "build:yc": "electron-vite build --mode yc && electron-builder --win --config ./electron-builder-yc.yml", - "build:yc2": "electron-vite build --mode yc2 && electron-builder --win --config ./electron-builder-yc2.yml", + "build:test": "node updatePackageJsonName.js && electron-vite build --mode test && electron-builder --win --config ./electron-builder.yml", + "build": "node updatePackageJsonName.js && electron-vite build --mode production && electron-builder --win --config ./electron-builder-prod.yml", + "build:yc": "node updatePackageJsonName.js && electron-vite build --mode yc && electron-builder --win --config ./electron-builder-yc.yml", + "build:yc2": "node updatePackageJsonName.js && electron-vite build --mode yc2 && electron-builder --win --config ./electron-builder-yc2.yml", "build:lt": "electron-vite build --mode lt && electron-builder --win --config ./electron-builder-lt.yml", "build:mac": "electron-vite build --mode production && electron-builder --mac --config ./electron-builder-prod.yml", "build:linux": "npm run build && electron-builder --linux" diff --git a/src/renderer/src/utils/comm.js b/src/renderer/src/utils/comm.js index 3f21fb1..4c78313 100644 --- a/src/renderer/src/utils/comm.js +++ b/src/renderer/src/utils/comm.js @@ -407,11 +407,52 @@ export const dataSetJson = { "教材-高中-数学": "e03aa4fe9fd011ef91270242ac140006", "教材-高中-地理": "270516829fd111efb13c0242ac140006", "教材-高中-政治": "a2f0b247b85d11ef84290242ac140005", + + "考试-小学-语文": "570f7ed2cc9d11ef9e070242ac140002", + "考试-小学-数学": "983270b8cc9d11efbbd80242ac140002", + "考试-小学-英语": "d5f80e4ccc9d11ef96fa0242ac140002", "课标-小学-科学": "935cfec8bf6a11ef98950242ac140006", "课标-小学-数学": "3c4e298fbf7911ef8e8b0242ac140002", "课标-小学-语文": "f76f1aa5bf7111ef90c80242ac140002", + "课标-小学-道德": "8da87869cbd711ef92280242ac140002", + "课标-小学-英语": "dc963316cbd811ef8d820242ac140002", + "课标-小学-劳动": "fc047d81cbdc11efa1740242ac140002", "教材-小学-科学": "935cfec8bf6a11ef98950242ac140006", "教材-小学-数学": "3c4e298fbf7911ef8e8b0242ac140002", "教材-小学-语文": "f76f1aa5bf7111ef90c80242ac140002", + "教材-小学-道德": "8da87869cbd711ef92280242ac140002", + "教材-小学-英语": "dc963316cbd811ef8d820242ac140002", + "教材-小学-劳动": "fc047d81cbdc11efa1740242ac140002", + + "教材-初中-道德与法治": "df9f3ccccbdd11ef9e550242ac140002", + "教材-初中-语文": "3770ad18cbde11efadaa0242ac140002", + "教材-初中-数学": "8cc0a799cbde11ef8b440242ac140002", + "教材-初中-英语": "07b58ca2cbdf11efaa180242ac140002", + "教材-初中-物理": "86f2c018cbf211ef9d6a0242ac140002", + "教材-初中-化学": "c7b34790cbf211ef92350242ac140002", + "教材-初中-生物": "083ac3edcbf311efaad30242ac140002", + "教材-初中-地理": "7ee584e1cbf311efbd270242ac140002", + "教材-初中-历史": "8ae07971cbf411ef81e70242ac140002", + "教材-初中-信息技术": "ca476233cbf411efa9860242ac140002", + "课标-初中-道德与法治": "df9f3ccccbdd11ef9e550242ac140002", + "课标-初中-语文": "3770ad18cbde11efadaa0242ac140002", + "课标-初中-数学": "8cc0a799cbde11ef8b440242ac140002", + "课标-初中-英语": "07b58ca2cbdf11efaa180242ac140002", + "课标-初中-物理": "86f2c018cbf211ef9d6a0242ac140002", + "课标-初中-化学": "c7b34790cbf211ef92350242ac140002", + "课标-初中-生物": "083ac3edcbf311efaad30242ac140002", + "课标-初中-地理": "7ee584e1cbf311efbd270242ac140002", + "课标-初中-历史": "8ae07971cbf411ef81e70242ac140002", + "课标-初中-信息技术": "ca476233cbf411efa9860242ac140002", + + "考试-初中-语文": "6be6d201cc0111ef89100242ac140002", + "考试-初中-数学": "d764b539cc0111ef8f1b0242ac140002", + "考试-初中-英语": "3477cff7cc9911efbfa50242ac140002", + "考试-初中-政治": "7ac981d8cc9a11efa5dc0242ac140002", + "考试-初中-历史": "c058a33acc9a11efb7f00242ac140002", + "考试-初中-地理": "5548224ecc9b11efa76d0242ac140002", + "考试-初中-生物": "206c5fd3cc9c11ef990f0242ac140002", + "考试-初中-物理": "93039442cc9c11ef89b10242ac140002", + "考试-初中-化学": "f8d78002cc9c11efbbf60242ac140002", "鉴权": "ragflow-IwMDI1MGU2YTU3NjExZWZiNWEzMDI0Mm" } diff --git a/updatePackageJsonName.js b/updatePackageJsonName.js new file mode 100644 index 0000000..de5811c --- /dev/null +++ b/updatePackageJsonName.js @@ -0,0 +1,14 @@ +const fs = require('fs'); +const path = require('path'); +const { env } = require('process'); + +// 读取当前的package.json文件 +const packageJsonPath = path.join(__dirname, 'package.json'); +const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); +console.log(env) +let res = env.npm_lifecycle_event.replace("build", "").replace(":", ""); +res = res?"-" + res:""; +packageJson.name = "aix-win-ws" + res + +// 将修改后的内容写回package.json文件 +fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2)); From 01e7dfbc2b8b6c5ed9883653049c615110765905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Wed, 8 Jan 2025 14:02:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=AD=A6?= =?UTF-8?q?=E7=A7=91=E5=AD=A6=E6=AE=B5=E7=9A=84=E6=96=B9=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/profile/components/selectClass.vue | 221 ++++++++++++------ 1 file changed, 147 insertions(+), 74 deletions(-) diff --git a/src/renderer/src/views/profile/components/selectClass.vue b/src/renderer/src/views/profile/components/selectClass.vue index 7110967..963025f 100644 --- a/src/renderer/src/views/profile/components/selectClass.vue +++ b/src/renderer/src/views/profile/components/selectClass.vue @@ -1,36 +1,74 @@ - + + +.sidebar { + width: 100%; + padding: 5px; + display: flex; + justify-content: space-between; +} - \ No newline at end of file +.nav-level-one,.nav-level-two { + margin-bottom: 20px; + width: 120px; +} +.nav-level-two .nav-item{ + text-align: center; +} + +.nav-item { + display: flex; + align-items: center; + margin-bottom: 10px; + padding: 8px 10px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +.nav-item:hover { + background-color: rgb(245, 247, 250); +} + +.nav-text { + flex: 1; + font-size: 14px; + color: #333; +} + +.nav-arrow { + font-size: 12px; + margin-left: auto; +} + +.nav-level-one.nav-item:first-child.nav-text { + color: blue; +} +.active .nav-text{ + font-weight: bold; + color:rgb(64, 158, 255) +} +.active .icon{ + font-weight: bold; + color:rgb(64, 158, 255) +} + \ No newline at end of file