From 695d72d1324934330156f93885da1aae8e0f6f90 Mon Sep 17 00:00:00 2001 From: yh Date: Fri, 21 Jun 2024 10:13:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 3 +- .eslintrc copy.cjs | 66 + .eslintrc.cjs | 6 +- .eslintrc_1.cjs | 16 +- .gitignore | 2 +- generated/core/ApiError.ts | 36 +- generated/core/ApiRequestOptions.ts | 31 +- generated/core/ApiResult.ts | 12 +- generated/core/CancelablePromise.ts | 221 +- generated/core/OpenAPI.ts | 33 +- generated/core/request.ts | 591 +-- generated/index.ts | 134 +- generated/models/BaseResponse.ts | 9 +- generated/models/BaseResponse_CoursesDTO_.ts | 11 +- ...seResponse_List_CourseObjectivesTreeVO_.ts | 11 +- .../BaseResponse_List_CourseResources_.ts | 11 +- .../BaseResponse_List_LearningRecords_.ts | 11 +- .../BaseResponse_List_ObjectivesType_.ts | 11 +- .../models/BaseResponse_List_TeacherInfVO_.ts | 11 +- .../models/BaseResponse_Map_string_object_.ts | 9 +- .../BaseResponse_ObjectiveContentKnowVO_.ts | 11 +- .../models/BaseResponse_ObjectiveContents_.ts | 11 +- .../models/BaseResponse_PageDTO_CoursesVO_.ts | 11 +- generated/models/BaseResponse_Page_.ts | 11 +- ...BaseResponse_Page_CourseFavourDetailVO_.ts | 11 +- .../BaseResponse_Page_CourseResources_.ts | 11 +- generated/models/BaseResponse_boolean_.ts | 9 +- generated/models/BaseResponse_long_.ts | 9 +- generated/models/BaseResponse_string_.ts | 9 +- generated/models/CommonResult.ts | 9 +- generated/models/CommonResult_UmsAdmin_.ts | 11 +- generated/models/CommonResult_string_.ts | 9 +- generated/models/CourseFavourAddRequest.ts | 7 +- generated/models/CourseFavourAllRequest.ts | 5 +- generated/models/CourseFavourDetailVO.ts | 33 +- generated/models/CourseFavourQueryRequest.ts | 13 +- generated/models/CourseObjectivesDTO.ts | 35 +- generated/models/CourseObjectivesTreeVO.ts | 85 +- generated/models/CourseResources.ts | 19 +- generated/models/CourseThumbAddRequest.ts | 7 +- generated/models/CoursesDTO.ts | 123 +- generated/models/CoursesVO.ts | 83 +- generated/models/KnowFavourAddRequest.ts | 9 +- generated/models/KnowThumbAddRequest.ts | 7 +- generated/models/LearningRecords.ts | 33 +- generated/models/ObjectiveContentKnowDTO.ts | 15 +- generated/models/ObjectiveContentKnowVO.ts | 31 +- generated/models/ObjectiveContents_.ts | 21 +- generated/models/ObjectivesType_.ts | 19 +- generated/models/OrderItem.ts | 7 +- generated/models/Page.ts | 25 +- generated/models/PageDTO_CoursesVO_.ts | 29 +- .../models/Page_CourseFavourDetailVO_.ts | 27 +- generated/models/Page_CourseResources_.ts | 27 +- generated/models/ResourceFavourAddRequest.ts | 7 +- .../models/ResourceFavourQueryRequest.ts | 15 +- generated/models/ResourceThumbAddRequest.ts | 7 +- generated/models/StudentCoursesDTO.ts | 9 +- generated/models/TeacherInfVO.ts | 19 +- generated/models/UmsAdmin.ts | 19 +- generated/models/UmsAdminParam.ts | 13 +- generated/models/UmsStudentAndTeacherDTO.ts | 41 +- generated/models/UpdateAdminPasswordParam.ts | 27 +- .../CourseResourceControllerService.ts | 184 +- .../FavourInformationControllerService.ts | 82 +- .../LearningRecordsControllerService.ts | 186 +- .../services/ResourceControllerService.ts | 104 +- .../SeCourseFavourControllerService.ts | 186 +- .../SeCourseThumbControllerService.ts | 96 +- .../services/SeKnowFavourControllerService.ts | 52 +- .../services/SeKnowThumbControllerService.ts | 52 +- .../SeResourceFavourControllerService.ts | 98 +- .../SeResourceThumbControllerService.ts | 52 +- generated/services/Service.ts | 1012 ++--- .../services/UmsAdminControllerService.ts | 520 +-- public/data.json | 531 ++- public/nodeList.json | 3486 ++++++++--------- src/api/courseChaptersApi.ts | 44 +- src/api/record.js | 6 +- src/layout/index.vue | 4 +- src/layout/tabbar/setting/index.vue | 2 +- src/main.ts | 6 +- src/permission.ts | 2 +- src/router/index.ts | 4 +- src/store/modules/user.ts | 48 +- src/views/MyCourseStudy/ContainerKno.vue | 127 +- src/views/MyCourseStudy/courseCollections.vue | 8 +- src/views/course/spritetext.js | 4 +- .../portal/LearningPathRecommendations.vue | 1052 ++--- .../portal/components/KnowledgeGraph.vue | 2 + src/views/portal/index.vue | 100 +- tsconfig.json | 1 + 92 files changed, 5156 insertions(+), 5069 deletions(-) create mode 100644 .eslintrc copy.cjs diff --git a/.eslintignore b/.eslintignore index db4c6d9..437c601 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ dist -node_modules \ No newline at end of file +node_modules +src/views/course/spritetext.js diff --git a/.eslintrc copy.cjs b/.eslintrc copy.cjs new file mode 100644 index 0000000..444ba89 --- /dev/null +++ b/.eslintrc copy.cjs @@ -0,0 +1,66 @@ +// @see https://eslint.bootcss.com/docs/rules/ + +module.exports = { + env: { + browser: true, + es2021: true, + node: true, + jest: true, + jquery: true, + }, + globals: { + VANTA: 'readonly', //VANTA 已经cdn引入 这里拒绝eslint报错 全局声明一下 + ElMessage: 'readonly', + ElMessageBox: 'readonly', + ElLoading: 'readonly', + }, + /* 指定如何解析语法 */ + parser: 'vue-eslint-parser', + /** 优先级低于 parse 的语法解析配置 */ + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + parser: '@typescript-eslint/parser', + jsxPragma: 'React', + ecmaFeatures: { + jsx: true, + }, + }, + /* 继承已有的规则 */ + extends: [ + 'eslint:recommended', + 'plugin:vue/vue3-essential', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', + ], + plugins: ['vue', '@typescript-eslint'], + /* + * "off" 或 0 ==> 关闭规则 + * "warn" 或 1 ==> 打开的规则作为警告(不影响代码执行) + * "error" 或 2 ==> 规则作为一个错误(代码不能执行,界面报错) + */ + rules: { + // eslint(https://eslint.bootcss.com/docs/rules/) + 'no-var': 'error', // 要求使用 let 或 const 而不是 var + 'no-multiple-empty-lines': ['warn', { max: 1 }], // 不允许多个空行 + 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'no-unexpected-multiline': 'error', // 禁止空余的多行 + 'no-useless-escape': 'off', // 禁止不必要的转义字符 + + // typeScript (https://typescript-eslint.io/rules) + '@typescript-eslint/no-unused-vars': 'error', // 禁止定义未使用的变量 + '@typescript-eslint/prefer-ts-expect-error': 'off', // 禁止使用 @ts-ignore + '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/no-explicit-any': 'off', // 禁止使用 any 类型 + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-namespace': 'off', // 禁止使用自定义 TypeScript 模块和命名空间。 + '@typescript-eslint/semi': 'off', + + // eslint-plugin-vue (https://eslint.vuejs.org/rules/) + 'vue/multi-word-component-names': 'off', // 要求组件名称始终为 “-” 链接的单词 + 'vue/script-setup-uses-vars': 'error', // 防止 \ No newline at end of file + diff --git a/src/views/MyCourseStudy/courseCollections.vue b/src/views/MyCourseStudy/courseCollections.vue index 01bf227..3bc70f3 100644 --- a/src/views/MyCourseStudy/courseCollections.vue +++ b/src/views/MyCourseStudy/courseCollections.vue @@ -153,7 +153,7 @@ import { ref, watch } from 'vue' import type { TabsPaneContext } from 'element-plus' import ContainerCla from './ContainerCla.vue' import ContainerKno from './ContainerKno.vue' -import { getAssApi } from '@/api/courseChaptersApi' +// import { getAssApi } from '@/api/courseChaptersApi' import { SeResourceFavourControllerService } from '../../../generated/services/SeResourceFavourControllerService' const centerDialogVisible = ref(false) @@ -176,10 +176,10 @@ const currentPage1 = ref(1) const pageSize1 = ref(10) const disabled = ref(false) -const handleSizeChange = (val: number) => { +const handleSizeChange = () => { getDatalist() } -const handleCurrentChange = (val: number) => { +const handleCurrentChange = () => { getDatalist() } @@ -189,7 +189,7 @@ function initFenYie() { pageSize1.value = 10 } -watch(activeIndex, (newVal) => { +watch(activeIndex, () => { initFenYie() getDatalist() }) diff --git a/src/views/course/spritetext.js b/src/views/course/spritetext.js index 57ccb06..fad89eb 100644 --- a/src/views/course/spritetext.js +++ b/src/views/course/spritetext.js @@ -19,7 +19,7 @@ function _callSuper(t, o, e) { } function _isNativeReflectConstruct() { try { - var t = !Boolean.prototype.valueOf.call( + let t = !Boolean.prototype.valueOf.call( Reflect.construct(Boolean, [], function () {}), ) } catch (t) {} @@ -190,7 +190,7 @@ function _unsupportedIterableToArray(o, minLen) { } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i] + for (let i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i] return arr2 } function _nonIterableSpread() { diff --git a/src/views/portal/LearningPathRecommendations.vue b/src/views/portal/LearningPathRecommendations.vue index c836a1c..1226daf 100644 --- a/src/views/portal/LearningPathRecommendations.vue +++ b/src/views/portal/LearningPathRecommendations.vue @@ -34,7 +34,7 @@ -
+ @@ -54,531 +54,531 @@
-