This commit is contained in:
zpc 2026-02-21 23:42:15 +08:00
parent a313e5a7f8
commit f36f25ac26
9 changed files with 917 additions and 305 deletions

View File

@ -9,6 +9,8 @@
"version": "0.0.0",
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"axios": "^1.7.9",
"echarts": "^6.0.0",
"element-plus": "^2.9.7",
@ -74,6 +76,15 @@
"node": ">=6.0.0"
}
},
"node_modules/@babel/runtime": {
"version": "7.28.6",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz",
"integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/types": {
"version": "7.28.5",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz",
@ -1012,6 +1023,12 @@
"win32"
]
},
"node_modules/@transloadit/prettier-bytes": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/@transloadit/prettier-bytes/-/prettier-bytes-0.0.7.tgz",
"integrity": "sha512-VeJbUb0wEKbcwaSlj5n+LscBl9IPgLPkHVGBkh00cztv6X4L/TJXK58LzFuBKX7/GAfiGhIwH67YTLTlzvIzBA==",
"license": "MIT"
},
"node_modules/@types/estree": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
@ -1019,6 +1036,12 @@
"dev": true,
"license": "MIT"
},
"node_modules/@types/event-emitter": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@types/event-emitter/-/event-emitter-0.3.5.tgz",
"integrity": "sha512-zx2/Gg0Eg7gwEiOIIh5w9TrhKKTeQh7CPCOPNc0el4pLSwzebA8SmnHwZs2dWlLONvyulykSwGSQxQHLhjGLvQ==",
"license": "MIT"
},
"node_modules/@types/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.21.tgz",
@ -1040,6 +1063,61 @@
"integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==",
"license": "MIT"
},
"node_modules/@uppy/companion-client": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/@uppy/companion-client/-/companion-client-2.2.2.tgz",
"integrity": "sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==",
"license": "MIT",
"dependencies": {
"@uppy/utils": "^4.1.2",
"namespace-emitter": "^2.0.1"
}
},
"node_modules/@uppy/core": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/@uppy/core/-/core-2.3.4.tgz",
"integrity": "sha512-iWAqppC8FD8mMVqewavCz+TNaet6HPXitmGXpGGREGrakZ4FeuWytVdrelydzTdXx6vVKkOmI2FLztGg73sENQ==",
"license": "MIT",
"dependencies": {
"@transloadit/prettier-bytes": "0.0.7",
"@uppy/store-default": "^2.1.1",
"@uppy/utils": "^4.1.3",
"lodash.throttle": "^4.1.1",
"mime-match": "^1.0.2",
"namespace-emitter": "^2.0.1",
"nanoid": "^3.1.25",
"preact": "^10.5.13"
}
},
"node_modules/@uppy/store-default": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@uppy/store-default/-/store-default-2.1.1.tgz",
"integrity": "sha512-xnpTxvot2SeAwGwbvmJ899ASk5tYXhmZzD/aCFsXePh/v8rNvR2pKlcQUH7cF/y4baUGq3FHO/daKCok/mpKqQ==",
"license": "MIT"
},
"node_modules/@uppy/utils": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/@uppy/utils/-/utils-4.1.3.tgz",
"integrity": "sha512-nTuMvwWYobnJcytDO3t+D6IkVq/Qs4Xv3vyoEZ+Iaf8gegZP+rEyoaFT2CK5XLRMienPyqRqNbIfRuFaOWSIFw==",
"license": "MIT",
"dependencies": {
"lodash.throttle": "^4.1.1"
}
},
"node_modules/@uppy/xhr-upload": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@uppy/xhr-upload/-/xhr-upload-2.1.3.tgz",
"integrity": "sha512-YWOQ6myBVPs+mhNjfdWsQyMRWUlrDLMoaG7nvf/G6Y3GKZf8AyjFDjvvJ49XWQ+DaZOftGkHmF1uh/DBeGivJQ==",
"license": "MIT",
"dependencies": {
"@uppy/companion-client": "^2.2.2",
"@uppy/utils": "^4.1.2",
"nanoid": "^3.1.25"
},
"peerDependencies": {
"@uppy/core": "^2.3.3"
}
},
"node_modules/@vitejs/plugin-vue": {
"version": "5.2.4",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz",
@ -1426,6 +1504,165 @@
}
}
},
"node_modules/@wangeditor/basic-modules": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz",
"integrity": "sha512-cY9CPkLJaqF05STqfpZKWG4LpxTMeGSIIF1fHvfm/mz+JXatCagjdkbxdikOuKYlxDdeqvOeBmsUBItufDLXZg==",
"license": "MIT",
"dependencies": {
"is-url": "^1.2.4"
},
"peerDependencies": {
"@wangeditor/core": "1.x",
"dom7": "^3.0.0",
"lodash.throttle": "^4.1.1",
"nanoid": "^3.2.0",
"slate": "^0.72.0",
"snabbdom": "^3.1.0"
}
},
"node_modules/@wangeditor/code-highlight": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@wangeditor/code-highlight/-/code-highlight-1.0.3.tgz",
"integrity": "sha512-iazHwO14XpCuIWJNTQTikqUhGKyqj+dUNWJ9288Oym9M2xMVHvnsOmDU2sgUDWVy+pOLojReMPgXCsvvNlOOhw==",
"license": "MIT",
"dependencies": {
"prismjs": "^1.23.0"
},
"peerDependencies": {
"@wangeditor/core": "1.x",
"dom7": "^3.0.0",
"slate": "^0.72.0",
"snabbdom": "^3.1.0"
}
},
"node_modules/@wangeditor/core": {
"version": "1.1.19",
"resolved": "https://registry.npmjs.org/@wangeditor/core/-/core-1.1.19.tgz",
"integrity": "sha512-KevkB47+7GhVszyYF2pKGKtCSj/YzmClsD03C3zTt+9SR2XWT5T0e3yQqg8baZpcMvkjs1D8Dv4fk8ok/UaS2Q==",
"license": "MIT",
"dependencies": {
"@types/event-emitter": "^0.3.3",
"event-emitter": "^0.3.5",
"html-void-elements": "^2.0.0",
"i18next": "^20.4.0",
"scroll-into-view-if-needed": "^2.2.28",
"slate-history": "^0.66.0"
},
"peerDependencies": {
"@uppy/core": "^2.1.1",
"@uppy/xhr-upload": "^2.0.3",
"dom7": "^3.0.0",
"is-hotkey": "^0.2.0",
"lodash.camelcase": "^4.3.0",
"lodash.clonedeep": "^4.5.0",
"lodash.debounce": "^4.0.8",
"lodash.foreach": "^4.5.0",
"lodash.isequal": "^4.5.0",
"lodash.throttle": "^4.1.1",
"lodash.toarray": "^4.4.0",
"nanoid": "^3.2.0",
"slate": "^0.72.0",
"snabbdom": "^3.1.0"
}
},
"node_modules/@wangeditor/editor": {
"version": "5.1.23",
"resolved": "https://registry.npmjs.org/@wangeditor/editor/-/editor-5.1.23.tgz",
"integrity": "sha512-0RxfeVTuK1tktUaPROnCoFfaHVJpRAIE2zdS0mpP+vq1axVQpLjM8+fCvKzqYIkH0Pg+C+44hJpe3VVroSkEuQ==",
"license": "MIT",
"dependencies": {
"@uppy/core": "^2.1.1",
"@uppy/xhr-upload": "^2.0.3",
"@wangeditor/basic-modules": "^1.1.7",
"@wangeditor/code-highlight": "^1.0.3",
"@wangeditor/core": "^1.1.19",
"@wangeditor/list-module": "^1.0.5",
"@wangeditor/table-module": "^1.1.4",
"@wangeditor/upload-image-module": "^1.0.2",
"@wangeditor/video-module": "^1.1.4",
"dom7": "^3.0.0",
"is-hotkey": "^0.2.0",
"lodash.camelcase": "^4.3.0",
"lodash.clonedeep": "^4.5.0",
"lodash.debounce": "^4.0.8",
"lodash.foreach": "^4.5.0",
"lodash.isequal": "^4.5.0",
"lodash.throttle": "^4.1.1",
"lodash.toarray": "^4.4.0",
"nanoid": "^3.2.0",
"slate": "^0.72.0",
"snabbdom": "^3.1.0"
}
},
"node_modules/@wangeditor/editor-for-vue": {
"version": "5.1.12",
"resolved": "https://registry.npmjs.org/@wangeditor/editor-for-vue/-/editor-for-vue-5.1.12.tgz",
"integrity": "sha512-0Ds3D8I+xnpNWezAeO7HmPRgTfUxHLMd9JKcIw+QzvSmhC5xUHbpCcLU+KLmeBKTR/zffnS5GQo6qi3GhTMJWQ==",
"license": "MIT",
"peerDependencies": {
"@wangeditor/editor": ">=5.1.0",
"vue": "^3.0.5"
}
},
"node_modules/@wangeditor/list-module": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@wangeditor/list-module/-/list-module-1.0.5.tgz",
"integrity": "sha512-uDuYTP6DVhcYf7mF1pTlmNn5jOb4QtcVhYwSSAkyg09zqxI1qBqsfUnveeDeDqIuptSJhkh81cyxi+MF8sEPOQ==",
"license": "MIT",
"peerDependencies": {
"@wangeditor/core": "1.x",
"dom7": "^3.0.0",
"slate": "^0.72.0",
"snabbdom": "^3.1.0"
}
},
"node_modules/@wangeditor/table-module": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@wangeditor/table-module/-/table-module-1.1.4.tgz",
"integrity": "sha512-5saanU9xuEocxaemGdNi9t8MCDSucnykEC6jtuiT72kt+/Hhh4nERYx1J20OPsTCCdVr7hIyQenFD1iSRkIQ6w==",
"license": "MIT",
"peerDependencies": {
"@wangeditor/core": "1.x",
"dom7": "^3.0.0",
"lodash.isequal": "^4.5.0",
"lodash.throttle": "^4.1.1",
"nanoid": "^3.2.0",
"slate": "^0.72.0",
"snabbdom": "^3.1.0"
}
},
"node_modules/@wangeditor/upload-image-module": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@wangeditor/upload-image-module/-/upload-image-module-1.0.2.tgz",
"integrity": "sha512-z81lk/v71OwPDYeQDxj6cVr81aDP90aFuywb8nPD6eQeECtOymrqRODjpO6VGvCVxVck8nUxBHtbxKtjgcwyiA==",
"license": "MIT",
"peerDependencies": {
"@uppy/core": "^2.0.3",
"@uppy/xhr-upload": "^2.0.3",
"@wangeditor/basic-modules": "1.x",
"@wangeditor/core": "1.x",
"dom7": "^3.0.0",
"lodash.foreach": "^4.5.0",
"slate": "^0.72.0",
"snabbdom": "^3.1.0"
}
},
"node_modules/@wangeditor/video-module": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@wangeditor/video-module/-/video-module-1.1.4.tgz",
"integrity": "sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg==",
"license": "MIT",
"peerDependencies": {
"@uppy/core": "^2.1.4",
"@uppy/xhr-upload": "^2.0.7",
"@wangeditor/core": "1.x",
"dom7": "^3.0.0",
"nanoid": "^3.2.0",
"slate": "^0.72.0",
"snabbdom": "^3.1.0"
}
},
"node_modules/agent-base": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
@ -1564,6 +1801,12 @@
"node": ">= 0.8"
}
},
"node_modules/compute-scroll-into-view": {
"version": "1.0.20",
"resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz",
"integrity": "sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==",
"license": "MIT"
},
"node_modules/copy-anything": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-4.0.5.tgz",
@ -1606,6 +1849,19 @@
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
"license": "MIT"
},
"node_modules/d": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz",
"integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==",
"license": "ISC",
"dependencies": {
"es5-ext": "^0.10.64",
"type": "^2.7.2"
},
"engines": {
"node": ">=0.12"
}
},
"node_modules/data-urls": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz",
@ -1677,6 +1933,15 @@
"node": ">=0.4.0"
}
},
"node_modules/dom7": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-3.0.0.tgz",
"integrity": "sha512-oNlcUdHsC4zb7Msx7JN3K0Nro1dzJ48knvBOnDPKJ2GV9wl1i5vydJZUSyOfrkKFDZEud/jBsTk92S/VGSAe/g==",
"license": "MIT",
"dependencies": {
"ssr-window": "^3.0.0-alpha.1"
}
},
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
@ -1790,6 +2055,46 @@
"node": ">= 0.4"
}
},
"node_modules/es5-ext": {
"version": "0.10.64",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz",
"integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==",
"hasInstallScript": true,
"license": "ISC",
"dependencies": {
"es6-iterator": "^2.0.3",
"es6-symbol": "^3.1.3",
"esniff": "^2.0.1",
"next-tick": "^1.1.0"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/es6-iterator": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
"integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==",
"license": "MIT",
"dependencies": {
"d": "1",
"es5-ext": "^0.10.35",
"es6-symbol": "^3.1.1"
}
},
"node_modules/es6-symbol": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz",
"integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==",
"license": "ISC",
"dependencies": {
"d": "^1.0.2",
"ext": "^1.7.0"
},
"engines": {
"node": ">=0.12"
}
},
"node_modules/esbuild": {
"version": "0.25.12",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
@ -1832,12 +2137,37 @@
"@esbuild/win32-x64": "0.25.12"
}
},
"node_modules/esniff": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz",
"integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==",
"license": "ISC",
"dependencies": {
"d": "^1.0.1",
"es5-ext": "^0.10.62",
"event-emitter": "^0.3.5",
"type": "^2.7.2"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"license": "MIT"
},
"node_modules/event-emitter": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
"integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==",
"license": "MIT",
"dependencies": {
"d": "1",
"es5-ext": "~0.10.14"
}
},
"node_modules/expect-type": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",
@ -1848,6 +2178,15 @@
"node": ">=12.0.0"
}
},
"node_modules/ext": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz",
"integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==",
"license": "ISC",
"dependencies": {
"type": "^2.7.2"
}
},
"node_modules/fast-check": {
"version": "3.23.2",
"resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz",
@ -2066,6 +2405,16 @@
"node": ">=18"
}
},
"node_modules/html-void-elements": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-2.0.1.tgz",
"integrity": "sha512-0quDb7s97CfemeJAnW9wC0hw78MtW7NU3hqtCD75g2vFlDLt36llsYD7uB7SUzojLMP24N5IatXf7ylGXiGG9A==",
"license": "MIT",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/http-proxy-agent": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
@ -2094,6 +2443,15 @@
"node": ">= 14"
}
},
"node_modules/i18next": {
"version": "20.6.1",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-20.6.1.tgz",
"integrity": "sha512-yCMYTMEJ9ihCwEQQ3phLo7I/Pwycf8uAx+sRHwwk5U9Aui/IZYgQRyMqXafQOw5QQ7DM1Z+WyEXWIqSuJHhG2A==",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.12.0"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
@ -2107,6 +2465,31 @@
"node": ">=0.10.0"
}
},
"node_modules/immer": {
"version": "9.0.21",
"resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz",
"integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==",
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/immer"
}
},
"node_modules/is-hotkey": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/is-hotkey/-/is-hotkey-0.2.0.tgz",
"integrity": "sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==",
"license": "MIT"
},
"node_modules/is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-potential-custom-element-name": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
@ -2114,6 +2497,12 @@
"dev": true,
"license": "MIT"
},
"node_modules/is-url": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz",
"integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==",
"license": "MIT"
},
"node_modules/is-what": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-5.5.0.tgz",
@ -2190,6 +2579,49 @@
"lodash-es": "*"
}
},
"node_modules/lodash.camelcase": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"license": "MIT"
},
"node_modules/lodash.clonedeep": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==",
"license": "MIT"
},
"node_modules/lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
"license": "MIT"
},
"node_modules/lodash.foreach": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz",
"integrity": "sha512-aEXTF4d+m05rVOAUG3z4vZZ4xVexLKZGF0lIxuHZ1Hplpk/3B6Z1+/ICICYRLm7c41Z2xiejbkCkJoTlypoXhQ==",
"license": "MIT"
},
"node_modules/lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==",
"deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.",
"license": "MIT"
},
"node_modules/lodash.throttle": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
"integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==",
"license": "MIT"
},
"node_modules/lodash.toarray": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz",
"integrity": "sha512-QyffEA3i5dma5q2490+SgCvDN0pXLmRGSyAANuVi0HQ01Pkfr9fuoKQW8wm1wGBnJITs/mS7wQvS6VshUEBFCw==",
"license": "MIT"
},
"node_modules/loupe": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz",
@ -2237,6 +2669,15 @@
"node": ">= 0.6"
}
},
"node_modules/mime-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/mime-match/-/mime-match-1.0.2.tgz",
"integrity": "sha512-VXp/ugGDVh3eCLOBCiHZMYWQaTNUHv2IJrut+yXA6+JbLPXHglHwfS/5A5L0ll+jkCY7fIzRJcH6OIunF+c6Cg==",
"license": "ISC",
"dependencies": {
"wildcard": "^1.1.0"
}
},
"node_modules/mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
@ -2285,6 +2726,12 @@
"dev": true,
"license": "MIT"
},
"node_modules/namespace-emitter": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/namespace-emitter/-/namespace-emitter-2.0.1.tgz",
"integrity": "sha512-N/sMKHniSDJBjfrkbS/tpkPj4RAbvW3mr8UAzvlMHyun93XEm83IAvhWtJVHo+RHn/oO8Job5YN4b+wRjSVp5g==",
"license": "MIT"
},
"node_modules/nanoid": {
"version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
@ -2303,6 +2750,12 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"node_modules/next-tick": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==",
"license": "ISC"
},
"node_modules/normalize-wheel-es": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
@ -2440,6 +2893,25 @@
"node": "^10 || ^12 || >=14"
}
},
"node_modules/preact": {
"version": "10.28.4",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.28.4.tgz",
"integrity": "sha512-uKFfOHWuSNpRFVTnljsCluEFq57OKT+0QdOiQo8XWnQ/pSvg7OpX5eNOejELXJMWy+BwM2nobz0FkvzmnpCNsQ==",
"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
}
},
"node_modules/prismjs": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz",
"integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==",
"license": "MIT",
"engines": {
"node": ">=6"
}
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
@ -2548,6 +3020,15 @@
"node": ">=v12.22.7"
}
},
"node_modules/scroll-into-view-if-needed": {
"version": "2.2.31",
"resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-2.2.31.tgz",
"integrity": "sha512-dGCXy99wZQivjmjIqihaBQNjryrz5rueJY7eHfTdyWEiR4ttYpsajb14rn9s5d4DY4EcY6+4+U/maARBXJedkA==",
"license": "MIT",
"dependencies": {
"compute-scroll-into-view": "^1.0.20"
}
},
"node_modules/siginfo": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
@ -2555,6 +3036,38 @@
"dev": true,
"license": "ISC"
},
"node_modules/slate": {
"version": "0.72.8",
"resolved": "https://registry.npmjs.org/slate/-/slate-0.72.8.tgz",
"integrity": "sha512-/nJwTswQgnRurpK+bGJFH1oM7naD5qDmHd89JyiKNT2oOKD8marW0QSBtuFnwEbL5aGCS8AmrhXQgNOsn4osAw==",
"license": "MIT",
"dependencies": {
"immer": "^9.0.6",
"is-plain-object": "^5.0.0",
"tiny-warning": "^1.0.3"
}
},
"node_modules/slate-history": {
"version": "0.66.0",
"resolved": "https://registry.npmjs.org/slate-history/-/slate-history-0.66.0.tgz",
"integrity": "sha512-6MWpxGQZiMvSINlCbMW43E2YBSVMCMCIwQfBzGssjWw4kb0qfvj0pIdblWNRQZD0hR6WHP+dHHgGSeVdMWzfng==",
"license": "MIT",
"dependencies": {
"is-plain-object": "^5.0.0"
},
"peerDependencies": {
"slate": ">=0.65.3"
}
},
"node_modules/snabbdom": {
"version": "3.6.3",
"resolved": "https://registry.npmjs.org/snabbdom/-/snabbdom-3.6.3.tgz",
"integrity": "sha512-W2lHLLw2qR2Vv0DcMmcxXqcfdBaIcoN+y/86SmHv8fn4DazEQSH6KN3TjZcWvwujW56OHiiirsbHWZb4vx/0fg==",
"license": "MIT",
"engines": {
"node": ">=12.17.0"
}
},
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
@ -2573,6 +3086,12 @@
"node": ">=0.10.0"
}
},
"node_modules/ssr-window": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-3.0.0.tgz",
"integrity": "sha512-q+8UfWDg9Itrg0yWK7oe5p/XRCJpJF9OBtXfOPgSJl+u3Xd5KI328RUEvUqSMVM9CiQUEf1QdBzJMkYGErj9QA==",
"license": "MIT"
},
"node_modules/stackback": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
@ -2606,6 +3125,12 @@
"dev": true,
"license": "MIT"
},
"node_modules/tiny-warning": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==",
"license": "MIT"
},
"node_modules/tinybench": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
@ -2719,6 +3244,12 @@
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
"license": "0BSD"
},
"node_modules/type": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz",
"integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==",
"license": "ISC"
},
"node_modules/typescript": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
@ -4068,6 +4599,12 @@
"node": ">=8"
}
},
"node_modules/wildcard": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/wildcard/-/wildcard-1.1.2.tgz",
"integrity": "sha512-DXukZJxpHA8LuotRwL0pP1+rS6CS7FF2qStDDE1C7DDg2rLud2PXRMuEDYIPhgEezwnlHNL4c+N6MfMTjCGTng==",
"license": "MIT"
},
"node_modules/ws": {
"version": "8.18.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",

View File

@ -13,6 +13,8 @@
},
"dependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^5.1.12",
"axios": "^1.7.9",
"echarts": "^6.0.0",
"element-plus": "^2.9.7",

View File

@ -0,0 +1,113 @@
<template>
<div class="rich-text-editor">
<Toolbar
:editor="editorRef"
:defaultConfig="toolbarConfig"
:mode="mode"
class="toolbar"
/>
<Editor
v-model="valueHtml"
:defaultConfig="editorConfig"
:mode="mode"
class="editor"
@onCreated="handleCreated"
/>
</div>
</template>
<script setup lang="ts">
/**
* 富文本编辑器组件
* @description 基于 wangeditor 封装的富文本编辑器
*/
import { ref, shallowRef, onBeforeUnmount, watch } from 'vue'
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import type { IDomEditor, IEditorConfig, IToolbarConfig } from '@wangeditor/editor'
import '@wangeditor/editor/dist/css/style.css'
// Props
const props = defineProps<{
modelValue: string
placeholder?: string
height?: string
}>()
// Emits
const emit = defineEmits<{
(e: 'update:modelValue', value: string): void
}>()
//
const editorRef = shallowRef<IDomEditor>()
// HTML
const valueHtml = ref(props.modelValue || '')
//
const mode = 'default'
//
const toolbarConfig: Partial<IToolbarConfig> = {
excludeKeys: [
'group-video', //
'fullScreen' //
]
}
//
const editorConfig: Partial<IEditorConfig> = {
placeholder: props.placeholder || '请输入内容...',
MENU_CONF: {}
}
// props
watch(() => props.modelValue, (newVal) => {
if (newVal !== valueHtml.value) {
valueHtml.value = newVal || ''
}
})
//
watch(valueHtml, (newVal) => {
emit('update:modelValue', newVal)
})
//
function handleCreated(editor: IDomEditor) {
editorRef.value = editor
}
//
onBeforeUnmount(() => {
const editor = editorRef.value
if (editor) {
editor.destroy()
}
})
</script>
<style scoped>
.rich-text-editor {
border: 1px solid #dcdfe6;
border-radius: 4px;
overflow: hidden;
}
.toolbar {
border-bottom: 1px solid #dcdfe6;
}
.editor {
height: v-bind('props.height || "400px"');
overflow-y: auto;
}
:deep(.w-e-text-container) {
background-color: #fff;
}
:deep(.w-e-toolbar) {
background-color: #f5f7fa;
}
</style>

View File

@ -4,13 +4,15 @@ import ImageUpload from './ImageUpload/index.vue'
import DictSelect from './DictSelect/index.vue'
import DictRadio from './DictRadio/index.vue'
import DictCheckbox from './DictCheckbox/index.vue'
import RichTextEditor from './RichTextEditor/index.vue'
// 组件列表
const components = {
ImageUpload,
DictSelect,
DictRadio,
DictCheckbox
DictCheckbox,
RichTextEditor
}
// 全局注册
@ -21,7 +23,7 @@ export function registerComponents(app: App) {
}
// 按需导出
export { ImageUpload, DictSelect, DictRadio, DictCheckbox }
export { ImageUpload, DictSelect, DictRadio, DictCheckbox, RichTextEditor }
export default {
install: registerComponents

View File

@ -39,59 +39,31 @@
<el-table-column label="配置值" min-width="250">
<template #default="{ row }">
<!-- 编辑模式 -->
<div v-if="state.editingKey === row.configKey" class="edit-form">
<el-input
v-model="state.editValue"
:placeholder="getPlaceholder(row.configType)"
size="default"
clearable
@keyup.enter="handleSave(row)"
@keyup.escape="handleCancel"
/>
<span v-if="state.validationError" class="validation-error">
{{ state.validationError }}
<!-- 富文本类型显示预览 -->
<template v-if="isRichTextConfig(row.configKey)">
<span class="config-value rich-text-preview">
{{ getPlainText(row.configValue) || '点击编辑设置内容' }}
</span>
</div>
<!-- 显示模式 -->
<span v-else class="config-value">
{{ formatConfigValue(row) }}
</span>
</template>
<!-- 普通类型显示值 -->
<template v-else>
<span class="config-value">
{{ formatConfigValue(row) }}
</span>
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="180" fixed="right">
<template #default="{ row }">
<!-- 编辑模式按钮 -->
<template v-if="state.editingKey === row.configKey">
<el-button
type="primary"
size="small"
:loading="state.saving"
@click="handleSave(row)"
>
保存
</el-button>
<el-button
size="small"
:disabled="state.saving"
@click="handleCancel"
>
取消
</el-button>
</template>
<!-- 显示模式按钮 -->
<template v-else>
<el-button
type="primary"
size="small"
:disabled="state.editingKey !== null"
@click="handleEdit(row)"
>
<el-icon><Edit /></el-icon>
编辑
</el-button>
</template>
<el-button
type="primary"
size="small"
@click="handleEdit(row)"
>
<el-icon><Edit /></el-icon>
编辑
</el-button>
</template>
</el-table-column>
</el-table>
@ -101,18 +73,69 @@
<!-- 空状态 -->
<el-empty v-if="!state.loading && state.configGroups.length === 0" description="暂无配置数据" />
</el-card>
<!-- 普通配置编辑对话框 -->
<el-dialog
v-model="state.dialogVisible"
:title="'编辑配置 - ' + state.editingItem?.description"
width="500px"
:close-on-click-modal="false"
>
<el-form label-width="80px">
<el-form-item label="配置键">
<el-input :model-value="state.editingItem?.configKey" disabled />
</el-form-item>
<el-form-item label="配置值">
<el-input
v-model="state.editValue"
:placeholder="getPlaceholder(state.editingItem?.configType || '')"
clearable
/>
<span v-if="state.validationError" class="validation-error">
{{ state.validationError }}
</span>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" :loading="state.saving" @click="handleSave">
保存
</el-button>
</template>
</el-dialog>
<!-- 富文本编辑对话框 -->
<el-dialog
v-model="state.richTextDialogVisible"
:title="'编辑 - ' + state.editingItem?.description"
width="900px"
:close-on-click-modal="false"
destroy-on-close
>
<RichTextEditor
v-model="state.richTextValue"
:placeholder="'请输入' + (state.editingItem?.description || '内容')"
height="500px"
/>
<template #footer>
<el-button @click="handleRichTextCancel">取消</el-button>
<el-button type="primary" :loading="state.saving" @click="handleRichTextSave">
保存
</el-button>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
/**
* 系统配置页面
* @description 管理系统配置项 ConfigType 分组显示支持内联编辑
* @requirements 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7
* @description 管理系统配置项 ConfigType 分组显示支持内联编辑和富文本编辑
*/
import { reactive, onMounted } from 'vue'
import { Setting, Edit } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
import { RichTextEditor } from '@/components'
import {
getConfigList,
updateConfig,
@ -126,24 +149,53 @@ interface ConfigPageState {
loading: boolean
configGroups: ConfigGroup[]
activeGroups: string[]
editingKey: string | null
editingItem: ConfigItem | null
editValue: string
richTextValue: string
dialogVisible: boolean
richTextDialogVisible: boolean
saving: boolean
validationError: string
}
//
const RICH_TEXT_CONFIG_KEYS = ['user_agreement', 'privacy_policy', 'about_us']
// ============ State ============
const state = reactive<ConfigPageState>({
loading: false,
configGroups: [],
activeGroups: [],
editingKey: null,
editingItem: null,
editValue: '',
richTextValue: '',
dialogVisible: false,
richTextDialogVisible: false,
saving: false,
validationError: ''
})
// ============ Helper Functions ============
/**
* 判断是否为富文本配置
*/
function isRichTextConfig(configKey: string): boolean {
return RICH_TEXT_CONFIG_KEYS.includes(configKey)
}
/**
* HTML 中提取纯文本用于预览
*/
function getPlainText(html: string): string {
if (!html) return ''
// HTML
const text = html.replace(/<[^>]+>/g, '').trim()
// 50
return text.length > 50 ? text.substring(0, 50) + '...' : text
}
// ============ Validation Functions ============
function validatePrice(value: string): { valid: boolean; error: string } {
@ -186,8 +238,6 @@ function validateConfigValue(configType: string, value: string): { valid: boolea
return { valid: true, error: '' }
}
// ============ Helper Functions ============
function getPlaceholder(configType: string): string {
const type = configType.toLowerCase()
if (type.includes('price') || type.includes('amount') || type.includes('fee')) {
@ -243,19 +293,37 @@ async function loadConfigList() {
// ============ Event Handlers ============
function handleEdit(item: ConfigItem) {
state.editingKey = item.configKey
state.editValue = item.configValue
state.editingItem = item
state.validationError = ''
if (isRichTextConfig(item.configKey)) {
//
state.richTextValue = item.configValue || ''
state.richTextDialogVisible = true
} else {
//
state.editValue = item.configValue
state.dialogVisible = true
}
}
function handleCancel() {
state.editingKey = null
state.dialogVisible = false
state.editingItem = null
state.editValue = ''
state.validationError = ''
}
async function handleSave(item: ConfigItem) {
const validation = validateConfigValue(item.configType, state.editValue)
function handleRichTextCancel() {
state.richTextDialogVisible = false
state.editingItem = null
state.richTextValue = ''
}
async function handleSave() {
if (!state.editingItem) return
const validation = validateConfigValue(state.editingItem.configType, state.editValue)
if (!validation.valid) {
state.validationError = validation.error
return
@ -266,14 +334,39 @@ async function handleSave(item: ConfigItem) {
try {
const res = await updateConfig({
configKey: item.configKey,
configKey: state.editingItem.configKey,
configValue: state.editValue.trim()
})
if (res.code === 0) {
ElMessage.success('配置更新成功')
state.editingKey = null
state.editValue = ''
handleCancel()
await loadConfigList()
} else {
throw new Error(res.message || '更新配置失败')
}
} catch (error) {
const message = error instanceof Error ? error.message : '更新配置失败'
ElMessage.error(message)
} finally {
state.saving = false
}
}
async function handleRichTextSave() {
if (!state.editingItem) return
state.saving = true
try {
const res = await updateConfig({
configKey: state.editingItem.configKey,
configValue: state.richTextValue
})
if (res.code === 0) {
ElMessage.success('配置更新成功')
handleRichTextCancel()
await loadConfigList()
} else {
throw new Error(res.message || '更新配置失败')
@ -360,20 +453,17 @@ onMounted(() => {
color: var(--text-primary, #303133);
}
.edit-form {
display: flex;
flex-direction: column;
gap: 4px;
}
.edit-form .el-input {
width: 200px;
.config-value.rich-text-preview {
color: var(--text-secondary, #909399);
font-style: italic;
}
.validation-error {
display: block;
color: var(--color-danger, #F56C6C);
font-size: 12px;
line-height: 1.4;
margin-top: 4px;
}
:deep(.el-collapse-item__header) {

View File

@ -53,7 +53,7 @@ const { statusBarHeight, navbarHeight, totalNavbarHeight } = useNavbar()
const navbarStyle = computed(() => {
const style = {
paddingTop: `${statusBarHeight.value}px`,
height: `${totalNavbarHeight.value}px`
height: `${totalNavbarHeight.value}rpx`
}
if (!props.transparent) {

View File

@ -63,14 +63,6 @@ const totalCount = computed(() => {
return questions.value.length
})
/**
* 进度百分比
*/
const progressPercent = computed(() => {
if (totalCount.value === 0) return 0
return Math.round((answeredCount.value / totalCount.value) * 100)
})
/**
* 加载题目列表
*/
@ -81,12 +73,10 @@ async function loadQuestions() {
if (res && res.code === 0 && res.data) {
questions.value = res.data.list || res.data || []
} else {
// API使
questions.value = generateMockQuestions()
}
} catch (error) {
console.error('加载题目失败:', error)
// 使
questions.value = generateMockQuestions()
} finally {
pageLoading.value = false
@ -146,11 +136,9 @@ async function handleSubmit() {
return
}
//
submitting.value = true
try {
//
const answerList = questions.value.map((q, index) => {
const qId = q.id || index + 1
const scoreIndex = answers.value[qId]
@ -168,7 +156,6 @@ async function handleSubmit() {
})
if (res && res.code === 0) {
//
const recordId = res.data?.recordId || res.data?.id || ''
uni.redirectTo({
url: `/pages/assessment/loading/index?recordId=${recordId}`
@ -202,7 +189,6 @@ function closeUnansweredPopup() {
*/
function scrollToQuestion(questionNo) {
closeUnansweredPopup()
//
uni.pageScrollTo({
selector: `#question-${questionNo}`,
duration: 300
@ -216,10 +202,7 @@ onLoad((options) => {
typeId.value = Number(options.typeId) || 1
orderId.value = options.orderId || ''
inviteCode.value = options.inviteCode || ''
//
userStore.restoreFromStorage()
loadQuestions()
})
</script>
@ -227,18 +210,7 @@ onLoad((options) => {
<template>
<view class="assessment-questions-page">
<!-- 导航栏 -->
<Navbar title="测评答题" :showBack="true" />
<!-- 进度条 -->
<view class="progress-bar">
<view class="progress-info">
<text class="progress-text">答题进度</text>
<text class="progress-count">{{ answeredCount }}/{{ totalCount }}</text>
</view>
<view class="progress-track">
<view class="progress-fill" :style="{ width: progressPercent + '%' }"></view>
</view>
</view>
<Navbar title="多元智能测评" :showBack="true" backgroundColor="rgba(255, 241, 231, 1)" />
<!-- 加载状态 -->
<view v-if="pageLoading" class="loading-container">
@ -246,58 +218,53 @@ onLoad((options) => {
<text class="loading-text">加载题目中...</text>
</view>
<!-- 题目列表 -->
<view v-else class="questions-container">
<!-- 评分说明 -->
<view class="score-guide">
<view class="guide-title">评分标准</view>
<view class="guide-desc">请根据符合程度选择对应分值1-极弱 10-极强</view>
</view>
<!-- 题目卡片 -->
<view
v-for="(question, index) in questions"
:key="question.id || index"
:id="'question-' + (question.questionNo || index + 1)"
class="question-card"
>
<!-- 题目标题 -->
<view class="question-header">
<view class="question-no">{{ question.questionNo || index + 1 }}</view>
<view class="question-content">{{ question.content }}</view>
</view>
<!-- 选项列表 -->
<view class="options-list">
<view
v-for="(option, optIndex) in scoreOptions"
:key="optIndex"
class="option-item"
:class="{ 'option-selected': isSelected(question.id || index + 1, optIndex) }"
@click="selectAnswer(question.id || index + 1, optIndex)"
>
<view class="option-radio">
<view v-if="isSelected(question.id || index + 1, optIndex)" class="radio-inner"></view>
</view>
<view class="option-score">{{ option.score }}</view>
<view class="option-label">{{ option.label }}</view>
<view class="option-desc">{{ option.desc }}</view>
</view>
</view>
</view>
<!-- 底部提交按钮 -->
<view class="submit-section">
<!-- 题目列表 - 所有题目在一个白色卡片内 -->
<view v-else class="questions-wrapper">
<view class="questions-card">
<view
class="submit-btn"
:class="{ 'btn-loading': submitting }"
@click="handleSubmit"
v-for="(question, index) in questions"
:key="question.id || index"
:id="'question-' + (question.questionNo || index + 1)"
class="question-item"
>
<text>{{ submitting ? '提交中...' : '提交' }}</text>
<!-- 题目标题 -->
<view class="question-header">
<text class="question-no">{{ question.questionNo || index + 1 }}</text>
<text class="question-content">{{ question.content }}</text>
</view>
<!-- 选项列表 -->
<view class="options-list">
<view
v-for="(option, optIndex) in scoreOptions"
:key="optIndex"
class="option-item"
@click="selectAnswer(question.id || index + 1, optIndex)"
>
<view class="option-radio" :class="{ 'radio-selected': isSelected(question.id || index + 1, optIndex) }">
<view v-if="isSelected(question.id || index + 1, optIndex)" class="radio-inner"></view>
</view>
<text class="option-text">{{ option.label }}{{ option.desc }}</text>
</view>
</view>
<!-- 题目之间的分隔 -->
<view v-if="index < questions.length - 1" class="question-divider"></view>
</view>
</view>
</view>
<!-- 底部提交按钮固定在底部 -->
<view v-if="!pageLoading" class="submit-section">
<view
class="submit-btn"
:class="{ 'btn-loading': submitting }"
@click="handleSubmit"
>
<text>{{ submitting ? '提交中...' : '提交' }}</text>
</view>
</view>
<!-- 未答题弹窗 -->
<view v-if="showUnansweredPopup" class="popup-mask" @click="closeUnansweredPopup">
<view class="popup-container" @click.stop>
@ -307,7 +274,6 @@ onLoad((options) => {
<text>×</text>
</view>
</view>
<view class="popup-body">
<view class="popup-message">以下题目尚未作答请完成后再提交</view>
<scroll-view class="unanswered-list" scroll-y>
@ -322,7 +288,6 @@ onLoad((options) => {
</view>
</scroll-view>
</view>
<view class="popup-footer">
<view class="popup-btn" @click="closeUnansweredPopup">
<text>我知道了</text>
@ -333,58 +298,15 @@ onLoad((options) => {
</view>
</template>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.assessment-questions-page {
min-height: 100vh;
background-color: $bg-color;
background-color: rgba(255, 241, 231, 1);
padding-bottom: env(safe-area-inset-bottom);
}
//
.progress-bar {
position: sticky;
top: 0;
z-index: 100;
background-color: $bg-white;
padding: $spacing-md $spacing-lg;
box-shadow: $shadow-sm;
.progress-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: $spacing-sm;
}
.progress-text {
font-size: $font-size-sm;
color: $text-secondary;
}
.progress-count {
font-size: $font-size-sm;
color: $primary-color;
font-weight: $font-weight-medium;
}
.progress-track {
height: 8rpx;
background-color: $border-light;
border-radius: 4rpx;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, $primary-color 0%, $primary-light 100%);
border-radius: 4rpx;
transition: width 0.3s ease;
}
}
//
.loading-container {
display: flex;
@ -397,7 +319,7 @@ onLoad((options) => {
width: 60rpx;
height: 60rpx;
border: 4rpx solid $border-color;
border-top-color: $primary-color;
border-top-color: rgba(255, 107, 96, 1);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@ -410,64 +332,41 @@ onLoad((options) => {
}
@keyframes spin {
to {
transform: rotate(360deg);
}
to { transform: rotate(360deg); }
}
//
.questions-container {
//
.questions-wrapper {
padding: $spacing-lg;
padding-top: $spacing-xl;
padding-bottom: 180rpx;
}
//
.score-guide {
background-color: #FFF9E6;
border-radius: $border-radius-lg;
padding: $spacing-lg;
margin-bottom: $spacing-lg;
border: 1rpx solid #FFE4B5;
.guide-title {
font-size: $font-size-md;
font-weight: $font-weight-medium;
color: #B8860B;
margin-bottom: $spacing-xs;
}
.guide-desc {
font-size: $font-size-sm;
color: #DAA520;
line-height: 1.5;
}
}
//
.question-card {
//
.questions-card {
background-color: $bg-white;
border-radius: $border-radius-lg;
border-radius: $border-radius-xl;
padding: $spacing-lg;
margin-bottom: $spacing-lg;
box-shadow: $shadow-sm;
box-shadow: $shadow-md;
}
//
.question-item {
padding: $spacing-md 0;
}
.question-header {
display: flex;
margin-bottom: $spacing-lg;
align-items: flex-start;
margin-bottom: $spacing-md;
.question-no {
width: 48rpx;
height: 48rpx;
background: linear-gradient(135deg, $primary-color 0%, $primary-light 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: $font-size-sm;
color: rgba(255, 107, 96, 1);
font-size: $font-size-lg;
font-weight: $font-weight-bold;
color: $text-white;
flex-shrink: 0;
margin-right: $spacing-md;
margin-right: $spacing-sm;
line-height: 1.6;
}
.question-content {
@ -480,98 +379,73 @@ onLoad((options) => {
//
.options-list {
display: flex;
flex-direction: column;
gap: $spacing-sm;
padding-left: 40rpx;
}
.option-item {
display: flex;
align-items: center;
padding: $spacing-md $spacing-lg;
background-color: $bg-gray;
border-radius: $border-radius-md;
border: 2rpx solid transparent;
transition: all 0.2s ease;
padding: $spacing-sm 0;
&:active {
opacity: 0.8;
}
&.option-selected {
background-color: rgba($primary-color, 0.08);
border-color: $primary-color;
.option-radio {
border-color: $primary-color;
}
.option-score {
color: $primary-color;
}
.option-label {
color: $primary-color;
}
opacity: 0.7;
}
}
.option-radio {
width: 36rpx;
height: 36rpx;
border: 3rpx solid $border-color;
width: 32rpx;
height: 32rpx;
border: 2rpx solid $border-color;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: $spacing-md;
transition: border-color 0.2s ease;
margin-right: $spacing-sm;
.radio-inner {
width: 20rpx;
height: 20rpx;
background-color: $primary-color;
border-radius: 50%;
&.radio-selected {
border-color: rgba(255, 107, 96, 1);
.radio-inner {
width: 20rpx;
height: 20rpx;
background-color: rgba(255, 107, 96, 1);
border-radius: 50%;
}
}
}
.option-score {
width: 80rpx;
font-size: $font-size-md;
font-weight: $font-weight-medium;
color: $text-color;
flex-shrink: 0;
}
.option-label {
width: 80rpx;
.option-text {
font-size: $font-size-sm;
color: $text-secondary;
flex-shrink: 0;
color: $text-color;
line-height: 1.5;
}
.option-desc {
flex: 1;
font-size: $font-size-xs;
color: $text-placeholder;
text-align: right;
// 线
.question-divider {
height: 1rpx;
background-color: $border-light;
margin: $spacing-md 0;
}
//
//
.submit-section {
padding: $spacing-xl 0;
padding-bottom: calc(#{$spacing-xl} + 100rpx);
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: $spacing-lg $spacing-lg calc(#{$spacing-lg} + env(safe-area-inset-bottom));
z-index: 100;
background-color: rgba(255, 241, 231, 1);
}
.submit-btn {
height: 96rpx;
background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
background-color: rgba(255, 107, 96, 1);
border-radius: 48rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8rpx 24rpx rgba(255, 82, 82, 0.3);
text {
font-size: $font-size-xl;
@ -597,7 +471,7 @@ onLoad((options) => {
left: 0;
right: 0;
bottom: 0;
background-color: $bg-mask;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
@ -619,7 +493,6 @@ onLoad((options) => {
padding: $spacing-lg;
text-align: center;
border-bottom: 1rpx solid $border-light;
flex-shrink: 0;
.popup-title {
font-size: $font-size-lg;
@ -649,19 +522,15 @@ onLoad((options) => {
padding: $spacing-lg;
flex: 1;
overflow: hidden;
display: flex;
flex-direction: column;
.popup-message {
font-size: $font-size-md;
color: $text-secondary;
margin-bottom: $spacing-md;
flex-shrink: 0;
}
}
.unanswered-list {
flex: 1;
max-height: 400rpx;
}
@ -676,7 +545,7 @@ onLoad((options) => {
text {
font-size: $font-size-md;
color: $error-color;
color: rgba(255, 107, 96, 1);
}
.goto-icon {
@ -691,12 +560,11 @@ onLoad((options) => {
.popup-footer {
padding: $spacing-lg;
flex-shrink: 0;
}
.popup-btn {
height: 88rpx;
background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
background-color: rgba(255, 107, 96, 1);
border-radius: 44rpx;
display: flex;
align-items: center;

View File

@ -21,7 +21,7 @@ const businessDetail = ref(null)
//
const navbarStyle = computed(() => ({
paddingTop: statusBarHeight.value + 'px',
height: totalNavbarHeight.value + 'px'
height: totalNavbarHeight.value + 'rpx'
}))
/**

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 42 KiB