diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 111cee4..624b859 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -42,7 +42,7 @@ module.exports = { 'no-useless-escape': 'off', // 禁止不必要的转义字符 // typeScript (https://typescript-eslint.io/rules) - '@typescript-eslint/no-unused-vars': 'error', // 禁止定义未使用的变量 + '@typescript-eslint/no-unused-vars': 'warn', // 禁止定义未使用的变量 '@typescript-eslint/prefer-ts-expect-error': 'error', // 禁止使用 @ts-ignore '@typescript-eslint/no-explicit-any': 'off', // 禁止使用 any 类型 '@typescript-eslint/no-non-null-assertion': 'off', diff --git a/package.json b/package.json index f09a05c..a2df517 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "@antv/g6": "3.8.3", "@element-plus/icons-vue": "^2.3.1", "axios": "^1.6.8", + "echarts": "^5.5.0", + "echarts-liquidfill": "^3.1.0", "element-plus": "^2.6.2", "install": "^0.13.0", "lib-flexible": "^0.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ee9f2d..523a786 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,6 +13,12 @@ dependencies: axios: specifier: ^1.6.8 version: 1.6.8 + echarts: + specifier: ^5.5.0 + version: 5.5.0 + echarts-liquidfill: + specifier: ^3.1.0 + version: 3.1.0(echarts@5.5.0) element-plus: specifier: ^2.6.2 version: 2.6.2(vue@3.4.21) @@ -2273,6 +2279,21 @@ packages: domhandler: 5.0.3 dev: true + /echarts-liquidfill@3.1.0(echarts@5.5.0): + resolution: {integrity: sha512-5Dlqs/jTsdTUAsd+K5LPLLTgrbbNORUSBQyk8PSy1Mg2zgHDWm83FmvA4s0ooNepCJojFYRITTQ4GU1UUSKYLw==} + peerDependencies: + echarts: ^5.0.1 + dependencies: + echarts: 5.5.0 + dev: false + + /echarts@5.5.0: + resolution: {integrity: sha512-rNYnNCzqDAPCr4m/fqyUFv7fD9qIsd50S6GDFgO1DxZhncCsNsG7IfUlAlvZe5oSEQxtsjnHiUuppzccry93Xw==} + dependencies: + tslib: 2.3.0 + zrender: 5.5.0 + dev: false + /electron-to-chromium@1.4.717: resolution: {integrity: sha512-6Fmg8QkkumNOwuZ/5mIbMU9WI3H2fmn5ajcVya64I5Yr5CcNmO7vcLt0Y7c96DCiMO5/9G+4sI2r6eEvdg1F7A==} dev: true @@ -5210,6 +5231,10 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: false + /tslib@2.3.0: + resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==} + dev: false + /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} @@ -5540,3 +5565,9 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + + /zrender@5.5.0: + resolution: {integrity: sha512-O3MilSi/9mwoovx77m6ROZM7sXShR/O/JIanvzTwjN3FORfLSr81PsUGd7jlaYOeds9d8tw82oP44+3YucVo+w==} + dependencies: + tslib: 2.3.0 + dev: false diff --git a/src/Layout/index.vue b/src/Layout/index.vue index 5f3c27d..bf87edf 100644 --- a/src/Layout/index.vue +++ b/src/Layout/index.vue @@ -4,6 +4,7 @@ +
diff --git a/src/assets/icons/PPT.svg b/src/assets/icons/PPT.svg new file mode 100644 index 0000000..40ac510 --- /dev/null +++ b/src/assets/icons/PPT.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/六边形2号.svg b/src/assets/icons/六边形2号.svg new file mode 100644 index 0000000..7c5d262 --- /dev/null +++ b/src/assets/icons/六边形2号.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/博士帽.svg b/src/assets/icons/博士帽.svg new file mode 100644 index 0000000..3cd4051 --- /dev/null +++ b/src/assets/icons/博士帽.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/排序.svg b/src/assets/icons/排序.svg new file mode 100644 index 0000000..5f15279 --- /dev/null +++ b/src/assets/icons/排序.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/文本.svg b/src/assets/icons/文本.svg new file mode 100644 index 0000000..7869124 --- /dev/null +++ b/src/assets/icons/文本.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/案例.svg b/src/assets/icons/案例.svg new file mode 100644 index 0000000..93a47f4 --- /dev/null +++ b/src/assets/icons/案例.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/测试.svg b/src/assets/icons/测试.svg new file mode 100644 index 0000000..c994e3c --- /dev/null +++ b/src/assets/icons/测试.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/知识点.svg b/src/assets/icons/知识点.svg new file mode 100644 index 0000000..8fa2be9 --- /dev/null +++ b/src/assets/icons/知识点.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/简介.svg b/src/assets/icons/简介.svg new file mode 100644 index 0000000..b9c1022 --- /dev/null +++ b/src/assets/icons/简介.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/视频.svg b/src/assets/icons/视频.svg new file mode 100644 index 0000000..6524bc8 --- /dev/null +++ b/src/assets/icons/视频.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/jinglingtu.png b/src/assets/images/jinglingtu.png new file mode 100644 index 0000000..8e1a58e Binary files /dev/null and b/src/assets/images/jinglingtu.png differ diff --git a/src/permissions.ts b/src/permissions.ts index f3d07e3..6d6d78a 100644 --- a/src/permissions.ts +++ b/src/permissions.ts @@ -4,12 +4,15 @@ import pinia from './store' import { constRouter } from '@/router/module/constRouter' import useSettingStore from '@/store/module/setting' const settingStore = useSettingStore(pinia) //重新指向pinia仓储 -router.beforeEach((to, from, next) => { - console.log(from) +router.beforeEach((to, _from, next) => { let index = constRouter[0].children.findIndex((item:any) => { + console.log(to.path,item.path); + return to.path.includes(item.path) }); + console.log(index); + settingStore.setuseIndex(index) document.title = `教学一体化-${to.meta.title}` next() diff --git a/src/router/module/constRouter/index.ts b/src/router/module/constRouter/index.ts index e7d80a0..0c653a4 100644 --- a/src/router/module/constRouter/index.ts +++ b/src/router/module/constRouter/index.ts @@ -53,9 +53,9 @@ export const constRouter: any = [ }, }, { - path: '/pedagogicalReform', // 科学研究 - component: () => import('@/views/pedagogicalReform/index.vue'), - name: 'PedagogicalReform', + path: '/scientificResearch', // 科学研究 + component: () => import('@/views/scientificResearch/index.vue'), + name: 'CcientificResearch', meta: { icon: '', title: '科学研究', diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 8099ce1..1f53d04 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -27,7 +27,7 @@ import {} from 'vue'