diff --git a/mock/user.ts b/mock/user.ts index 638dde8..44fe328 100644 --- a/mock/user.ts +++ b/mock/user.ts @@ -10,18 +10,7 @@ function createUserList() { desc: '平台管理员', roles: ['平台管理员'], buttons: ['cuser.detail'], - routes: [ - 'Home', - 'Course', - 'Student', - 'Group', - 'Message', - 'BasicCourseInformation', - 'CourseObjectives', - 'CourseChapters', - 'KnowledgePoints', - 'CurriculumMap', - ], //老师权限 + routes: ['Home', 'Course', 'Student', 'Group', 'Message','BasicCourseInformation','CourseObjectives','CourseChapters','KnowledgePoints','CurriculumMap','knowledgeAtlas'], //老师权限 token: 'Admin Token', }, { diff --git a/package.json b/package.json index 1c0645f..258a51e 100644 --- a/package.json +++ b/package.json @@ -17,14 +17,17 @@ "preinstall": "node ./scripts/preinstall.js" }, "dependencies": { + "3d-force-graph": "^1.73.3", "@element-plus/icons-vue": "^2.3.1", "@vueuse/core": "^10.9.0", "axios": "^1.6.8", "echarts": "^5.5.0", + "echarts-liquidfill": "^3.1.0", "element-plus": "^2.6.0", "jquery": "^3.7.1", "nprogress": "^0.2.0", "pinia": "^2.1.7", + "three": "^0.163.0", "vue": "^3.4.19", "vue-echarts": "^6.7.2", "vue-router": "^4.3.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 238451c..d55c999 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,6 +1,9 @@ lockfileVersion: '6.0' dependencies: + 3d-force-graph: + specifier: ^1.73.3 + version: 1.73.3 '@element-plus/icons-vue': specifier: ^2.3.1 version: 2.3.1(vue@3.4.19) @@ -13,6 +16,9 @@ dependencies: 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.0 version: 2.6.0(vue@3.4.19) @@ -25,6 +31,9 @@ dependencies: pinia: specifier: ^2.1.7 version: 2.1.7(typescript@5.2.2)(vue@3.4.19) + three: + specifier: ^0.163.0 + version: 0.163.0 vue: specifier: ^3.4.19 version: 3.4.19(typescript@5.2.2) @@ -132,6 +141,17 @@ devDependencies: packages: + /3d-force-graph@1.73.3: + resolution: {integrity: sha512-azb65Lwn2yr/fJ4+qrxjmstVxogjzwJIZL/fdboCKBg6ph/FLW+xdvYFEBZW92XxBn1C8yRKS3d2VkVT3BzLSw==} + engines: {node: '>=12'} + dependencies: + accessor-fn: 1.5.0 + kapsule: 1.14.5 + three: 0.163.0 + three-forcegraph: 1.41.14(three@0.163.0) + three-render-objects: 1.29.4(three@0.163.0) + dev: false + /@aashutoshrathi/word-wrap@1.2.6: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} @@ -311,6 +331,13 @@ packages: dependencies: '@babel/types': 7.24.0 + /@babel/runtime@7.24.6: + resolution: {integrity: sha512-Ja18XcETdEl5mzzACGd+DKgaGJzPTCow7EglgwTmHdwokzDFYh/MHua6lU6DV/hjF2IaOJ4oX2nqnjG7RElKOw==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.1 + dev: false + /@babel/template@7.24.0: resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} engines: {node: '>=6.9.0'} @@ -853,6 +880,10 @@ packages: engines: {node: '>=10.13.0'} dev: true + /@tweenjs/tween.js@23.1.2: + resolution: {integrity: sha512-kMCNaZCJugWI86xiEHaY338CU5JpD0B97p1j1IKNn/Zto8PgACjQx0UxbHjmOcLl/dDOBnItwD07KmCs75pxtQ==} + dev: false + /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true @@ -1228,6 +1259,11 @@ packages: - vue dev: false + /accessor-fn@1.5.0: + resolution: {integrity: sha512-dml7D96DY/K5lt4Ra2jMnpL9Bhw5HEGws4p1OAIxFFj9Utd/RxNfEO3T3f0QIWFNwQU7gNxH9snUfqF/zNkP/w==} + engines: {node: '>=12'} + dev: false + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1800,6 +1836,104 @@ packages: /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + /d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + dependencies: + internmap: 2.0.3 + dev: false + + /d3-binarytree@1.0.2: + resolution: {integrity: sha512-cElUNH+sHu95L04m92pG73t2MEJXKu+GeKUN1TJkFsu93E5W8E9Sc3kHEGJKgenGvj19m6upSn2EunvMgMD2Yw==} + dev: false + + /d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + dev: false + + /d3-dispatch@3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + dev: false + + /d3-force-3d@3.0.5: + resolution: {integrity: sha512-tdwhAhoTYZY/a6eo9nR7HP3xSW/C6XvJTbeRpR92nlPzH6OiE+4MliN9feuSFd0tPtEUo+191qOhCTWx3NYifg==} + engines: {node: '>=12'} + dependencies: + d3-binarytree: 1.0.2 + d3-dispatch: 3.0.1 + d3-octree: 1.0.2 + d3-quadtree: 3.0.1 + d3-timer: 3.0.1 + dev: false + + /d3-format@3.1.0: + resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} + engines: {node: '>=12'} + dev: false + + /d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + dependencies: + d3-color: 3.1.0 + dev: false + + /d3-octree@1.0.2: + resolution: {integrity: sha512-Qxg4oirJrNXauiuC94uKMbgxwnhdda9xRLl9ihq45srlJ4Ga3CSgqGcAL8iW7N5CIv4Oz8x3E734ulxyvHPvwA==} + dev: false + + /d3-quadtree@3.0.1: + resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} + engines: {node: '>=12'} + dev: false + + /d3-scale-chromatic@3.1.0: + resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==} + engines: {node: '>=12'} + dependencies: + d3-color: 3.1.0 + d3-interpolate: 3.0.1 + dev: false + + /d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.0 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + dev: false + + /d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + dependencies: + d3-time: 3.1.0 + dev: false + + /d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.2.4 + dev: false + + /d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + dev: false + + /data-joint@1.3.1: + resolution: {integrity: sha512-tMK0m4OVGqiA3zkn8JmO6YAqD8UwJqIAx4AAwFl1SKTtKAqcXePuT+n2aayiX9uITtlN3DFtKKTOxJRUc2+HvQ==} + engines: {node: '>=12'} + dependencies: + index-array-by: 1.4.1 + dev: false + /dayjs@1.11.10: resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} dev: false @@ -1991,6 +2125,14 @@ 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: @@ -2983,6 +3125,11 @@ packages: engines: {node: '>=0.8.19'} dev: true + /index-array-by@1.4.1: + resolution: {integrity: sha512-Zu6THdrxQdyTuT2uA5FjUoBEsFHPzHcPIj18FszN6yXKHxSfGcR4TPLabfuT//E25q1Igyx9xta2WMvD/x9P/g==} + engines: {node: '>=12'} + dev: false + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -3007,6 +3154,11 @@ packages: side-channel: 1.0.6 dev: true + /internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + dev: false + /is-accessor-descriptor@1.0.1: resolution: {integrity: sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==} engines: {node: '>= 0.10'} @@ -3308,6 +3460,13 @@ packages: graceful-fs: 4.2.11 dev: true + /kapsule@1.14.5: + resolution: {integrity: sha512-H0iSpTynUzZw3tgraDmReprpFRmH5oP5GPmaNsurSwLx2H5iCpOMIkp5q+sfhB4Tz/UJd1E1IbEE9Z6ksnJ6RA==} + engines: {node: '>=12'} + dependencies: + lodash-es: 4.17.21 + dev: false + /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: @@ -3583,6 +3742,32 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true + /ngraph.events@1.2.2: + resolution: {integrity: sha512-JsUbEOzANskax+WSYiAPETemLWYXmixuPAlmZmhIbIj6FH/WDgEGCGnRwUQBK0GjOnVm8Ui+e5IJ+5VZ4e32eQ==} + dev: false + + /ngraph.forcelayout@3.3.1: + resolution: {integrity: sha512-MKBuEh1wujyQHFTW57y5vd/uuEOK0XfXYxm3lC7kktjJLRdt/KEKEknyOlc6tjXflqBKEuYBBcu7Ax5VY+S6aw==} + dependencies: + ngraph.events: 1.2.2 + ngraph.merge: 1.0.0 + ngraph.random: 1.1.0 + dev: false + + /ngraph.graph@20.0.1: + resolution: {integrity: sha512-VFsQ+EMkT+7lcJO1QP8Ik3w64WbHJl27Q53EO9hiFU9CRyxJ8HfcXtfWz/U8okuoYKDctbciL6pX3vG5dt1rYA==} + dependencies: + ngraph.events: 1.2.2 + dev: false + + /ngraph.merge@1.0.0: + resolution: {integrity: sha512-5J8YjGITUJeapsomtTALYsw7rFveYkM+lBj3QiYZ79EymQcuri65Nw3knQtFxQBU1r5iOaVRXrSwMENUPK62Vg==} + dev: false + + /ngraph.random@1.1.0: + resolution: {integrity: sha512-h25UdUN/g8U7y29TzQtRm/GvGr70lK37yQPvPKXXuVfs7gCm82WipYFZcksQfeKumtOemAzBIcT7lzzyK/edLw==} + dev: false + /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true @@ -3809,6 +3994,13 @@ packages: vue-demi: 0.14.7(vue@3.4.19) dev: false + /polished@4.3.1: + resolution: {integrity: sha512-OBatVyC/N7SCW/FaDHrSd+vn0o5cS855TOmYi4OkdWUMSJCET/xip//ch8xGUvtr3i44X9LVyWwQlRMTN3pwSA==} + engines: {node: '>=10'} + dependencies: + '@babel/runtime': 7.24.6 + dev: false + /posix-character-classes@0.1.1: resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} engines: {node: '>=0.10.0'} @@ -4000,6 +4192,10 @@ packages: picomatch: 2.3.1 dev: true + /regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + dev: false + /regex-not@1.0.2: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} engines: {node: '>=0.10.0'} @@ -4707,6 +4903,46 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /three-forcegraph@1.41.14(three@0.163.0): + resolution: {integrity: sha512-W/cZElLXO0l6ffdMmDakh4bUGSYuSv/YxInOHMN9KAQgDwJ8904SOBh8qkTnGu7UPsi0mAsrUgkfViW8heloTA==} + engines: {node: '>=12'} + peerDependencies: + three: '>=0.118.3' + dependencies: + accessor-fn: 1.5.0 + d3-array: 3.2.4 + d3-force-3d: 3.0.5 + d3-scale: 4.0.2 + d3-scale-chromatic: 3.1.0 + data-joint: 1.3.1 + kapsule: 1.14.5 + ngraph.forcelayout: 3.3.1 + ngraph.graph: 20.0.1 + three: 0.163.0 + tinycolor2: 1.6.0 + dev: false + + /three-render-objects@1.29.4(three@0.163.0): + resolution: {integrity: sha512-E6YwTN5zNsaMjo/5rosgnK44b1aq//3YJGJ5BxG9t7+euRm7ZAmNX3NIqFkoDhKtFC5WLoOxZjyNoq8Uc49gaA==} + engines: {node: '>=12'} + peerDependencies: + three: '*' + dependencies: + '@tweenjs/tween.js': 23.1.2 + accessor-fn: 1.5.0 + kapsule: 1.14.5 + polished: 4.3.1 + three: 0.163.0 + dev: false + + /three@0.163.0: + resolution: {integrity: sha512-HlMgCb2TF/dTLRtknBnjUTsR8FsDqBY43itYop2+Zg822I+Kd0Ua2vs8CvfBVefXkBdNDrLMoRTGCIIpfCuDew==} + dev: false + + /tinycolor2@1.6.0: + resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + dev: false + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -5175,3 +5411,7 @@ packages: dependencies: tslib: 2.3.0 dev: false + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/public/data.json b/public/data.json new file mode 100644 index 0000000..b434657 --- /dev/null +++ b/public/data.json @@ -0,0 +1,267 @@ +{ + "nodes": [ + { "id": "node1", "label": "计算机", "color": "#4682B4", "classID": 0 }, + { + "id": "node2", + "label": "前端", + "color": "rgba(254, 241, 0, 1)", + "classID": 1 + }, + { + "id": "node3", + "label": "js", + "color": "rgba(239, 242, 18, 1)", + "classID": 2 + }, + { + "id": "node4", + "label": "html", + "color": "rgba(230, 234, 10, 1)", + "classID": 3 + }, + { + "id": "node5", + "label": "css", + "color": "rgba(244, 231, 0, 1)", + "classID": 4 + }, + { + "id": "node6", + "label": "less", + "color": "rgba(15, 245, 57, 1)", + "classID": 5 + }, + { + "id": "node7", + "label": "scss", + "color": "rgba(133, 255, 11, 1)", + "classID": 6 + }, + { + "id": "node8", + "label": "VUE", + "color": "rgba(42, 255, 0, 1)", + "classID": 7 + }, + { + "id": "node9", + "label": "React", + "color": "rgba(76, 73, 245, 1)", + "classID": 8 + }, + { "id": "node10", "label": "模块化", "color": "#4682B4", "classID": 9 }, + { "id": "node11", "label": "webpack", "color": "#4682B4", "classID": 10 }, + { "id": "node12", "label": "vite", "color": "#4682B4", "classID": 11 }, + { + "id": "node13", + "label": "uniapp", + "color": "rgba(77, 255, 0, 1)", + "classID": 12 + }, + { + "id": "node14", + "label": "element", + "color": "rgba(33, 162, 255, 1)", + "classID": 13 + }, + { + "id": "node15", + "label": "web3", + "color": "rgba(255, 0, 251, 1)", + "classID": 14 + }, + { + "id": "node16", + "label": "webGl", + "color": "rgba(208, 0, 249, 1)", + "classID": 15 + }, + { + "id": "node17", + "label": "three", + "color": "rgba(225, 0, 255, 1)", + "classID": 16 + }, + { + "id": "node18", + "label": "后端", + "color": "rgba(0, 229, 255, 1)", + "classID": 17 + }, + { + "id": "node19", + "label": "java", + "color": "rgba(237, 229, 85, 1)", + "classID": 18 + }, + { + "id": "node20", + "label": "PHP", + "color": "rgba(195, 206, 215, 1)", + "classID": 19 + }, + { + "id": "node21", + "label": "Go", + "color": "rgba(255, 0, 0, 1)", + "classID": 20 + }, + { + "id": "node22", + "label": "Python", + "color": "rgba(109, 238, 180, 1)", + "classID": 21 + }, + { "id": "node23", "label": "MySQL", "color": "#4682B4", "classID": 22 }, + { + "id": "node24", + "label": "人工智能", + "color": "rgba(180, 5, 255, 1)", + "classID": 23 + }, + { + "id": "node25", + "label": "python", + "color": "rgba(255, 8, 8, 1)", + "classID": 24 + }, + { + "id": "node26", + "label": "AI模型", + "color": "rgba(10, 138, 244, 1)", + "classID": 25 + }, + { + "id": "node27", + "label": "Spring Framework", + "color": "rgba(242, 238, 14, 1)", + "classID": 26 + }, + { + "id": "node28", + "label": "Hibernate", + "color": "rgba(242, 238, 14, 1)", + "classID": 27 + }, + { + "id": "node29", + "label": "Spring MVC", + "color": "rgba(242, 238, 14, 1)", + "classID": 28 + }, + { + "id": "node30", + "label": "Gin", + "color": "rgba(255, 0, 0, 1)", + "classID": 29 + }, + { + "id": "node31", + "label": "Echo", + "color": "rgba(255, 0, 0, 1)", + "classID": 30 + }, + { + "id": "node32", + "label": "Beego", + "color": "rgba(255, 8, 0, 1)", + "classID": 31 + }, + { + "id": "node33", + "label": "Laravel", + "color": "rgba(200, 209, 217, 1)", + "classID": 32 + }, + { + "id": "node34", + "label": "Symfony", + "color": "rgba(182, 194, 204, 1)", + "classID": 33 + }, + { + "id": "node35", + "label": "CodeIgniter", + "color": "rgba(188, 197, 204, 1)", + "classID": 34 + }, + { + "id": "node36", + "label": "Django", + "color": "rgba(36, 245, 144, 1)", + "classID": 35 + }, + { + "id": "node37", + "label": "Flask", + "color": "rgba(41, 244, 176, 1)", + "classID": 36 + }, + { + "id": "node38", + "label": "FastAPI", + "color": "rgba(58, 244, 142, 1)", + "classID": 37 + } + ], + "links": [ + { "source": "node2", "target": "node3", "label": "", "classID": 0 }, + { "source": "node2", "target": "node5", "label": "", "classID": 1 }, + { "source": "node2", "target": "node4", "label": "", "classID": 2 }, + { "source": "node1", "target": "node2", "label": "前端方向", "classID": 3 }, + { "source": "node5", "target": "node6", "label": "", "classID": 4 }, + { "source": "node5", "target": "node7", "label": "", "classID": 5 }, + { "source": "node3", "target": "node8", "label": "", "classID": 6 }, + { "source": "node3", "target": "node9", "label": "", "classID": 7 }, + { "source": "node3", "target": "node10", "label": "", "classID": 8 }, + { "source": "node10", "target": "node11", "label": "", "classID": 9 }, + { "source": "node10", "target": "node12", "label": "", "classID": 10 }, + { "source": "node11", "target": "node9", "label": "", "classID": 11 }, + { "source": "node11", "target": "node8", "label": "", "classID": 12 }, + { "source": "node12", "target": "node8", "label": "", "classID": 13 }, + { "source": "node8", "target": "node13", "label": "", "classID": 14 }, + { "source": "node8", "target": "node14", "label": "", "classID": 15 }, + { "source": "node11", "target": "node13", "label": "", "classID": 16 }, + { "source": "node12", "target": "node13", "label": "", "classID": 17 }, + { "source": "node2", "target": "node15", "label": "", "classID": 18 }, + { "source": "node15", "target": "node16", "label": "", "classID": 19 }, + { "source": "node16", "target": "node17", "label": "", "classID": 20 }, + { "source": "node1", "target": "node1", "label": "", "classID": 21 }, + { + "source": "node1", + "target": "node18", + "label": "后端方向", + "classID": 22 + }, + { "source": "node18", "target": "node21", "label": "", "classID": 23 }, + { "source": "node18", "target": "node20", "label": "", "classID": 24 }, + { "source": "node18", "target": "node19", "label": "", "classID": 25 }, + { "source": "node18", "target": "node22", "label": "", "classID": 26 }, + { "source": "node22", "target": "node23", "label": "", "classID": 27 }, + { "source": "node19", "target": "node23", "label": "", "classID": 28 }, + { "source": "node20", "target": "node23", "label": "", "classID": 29 }, + { "source": "node21", "target": "node23", "label": "", "classID": 30 }, + { + "source": "node1", + "target": "node24", + "label": "人工智能方向", + "classID": 31 + }, + { "source": "node24", "target": "node25", "label": "", "classID": 32 }, + { "source": "node24", "target": "node26", "label": "", "classID": 33 }, + { "source": "node12", "target": "node9", "label": "", "classID": 34 }, + { "source": "node19", "target": "node27", "label": "", "classID": 35 }, + { "source": "node19", "target": "node28", "label": "", "classID": 36 }, + { "source": "node19", "target": "node29", "label": "", "classID": 37 }, + { "source": "node21", "target": "node30", "label": "", "classID": 38 }, + { "source": "node21", "target": "node31", "label": "", "classID": 39 }, + { "source": "node21", "target": "node32", "label": "", "classID": 40 }, + { "source": "node20", "target": "node33", "label": "", "classID": 41 }, + { "source": "node20", "target": "node34", "label": "", "classID": 42 }, + { "source": "node20", "target": "node35", "label": "", "classID": 43 }, + { "source": "node22", "target": "node36", "label": "", "classID": 44 }, + { "source": "node22", "target": "node37", "label": "", "classID": 45 }, + { "source": "node22", "target": "node38", "label": "", "classID": 46 } + ] + } + \ No newline at end of file diff --git a/public/nodeList.json b/public/nodeList.json new file mode 100644 index 0000000..3d716a0 --- /dev/null +++ b/public/nodeList.json @@ -0,0 +1,1744 @@ +{ + "nodes": [ + { + "id": "0", + "name": "Myriel", + "symbolSize": 19.12381, + "x": -266.82776, + "y": 299.6904, + "value": 28.685715, + "category": 0 + }, + { + "id": "1", + "name": "Napoleon", + "symbolSize": 2.6666666666666665, + "x": -418.08344, + "y": 446.8853, + "value": 4, + "category": 0 + }, + { + "id": "2", + "name": "MlleBaptistine", + "symbolSize": 6.323809333333333, + "x": -212.76357, + "y": 245.29176, + "value": 9.485714, + "category": 1 + }, + { + "id": "3", + "name": "MmeMagloire", + "symbolSize": 6.323809333333333, + "x": -242.82404, + "y": 235.26283, + "value": 9.485714, + "category": 1 + }, + { + "id": "4", + "name": "CountessDeLo", + "symbolSize": 2.6666666666666665, + "x": -379.30386, + "y": 429.06424, + "value": 4, + "category": 0 + }, + { + "id": "5", + "name": "Geborand", + "symbolSize": 2.6666666666666665, + "x": -417.26337, + "y": 406.03506, + "value": 4, + "category": 0 + }, + { + "id": "6", + "name": "Champtercier", + "symbolSize": 2.6666666666666665, + "x": -332.6012, + "y": 485.16974, + "value": 4, + "category": 0 + }, + { + "id": "7", + "name": "Cravatte", + "symbolSize": 2.6666666666666665, + "x": -382.69568, + "y": 475.09113, + "value": 4, + "category": 0 + }, + { + "id": "8", + "name": "Count", + "symbolSize": 2.6666666666666665, + "x": -320.384, + "y": 387.17325, + "value": 4, + "category": 0 + }, + { + "id": "9", + "name": "OldMan", + "symbolSize": 2.6666666666666665, + "x": -344.39832, + "y": 451.16772, + "value": 4, + "category": 0 + }, + { + "id": "10", + "name": "Labarre", + "symbolSize": 2.6666666666666665, + "x": -89.34107, + "y": 234.56128, + "value": 4, + "category": 1 + }, + { + "id": "11", + "name": "Valjean", + "symbolSize": 66.66666666666667, + "x": -87.93029, + "y": -6.8120565, + "value": 100, + "category": 1 + }, + { + "id": "12", + "name": "Marguerite", + "symbolSize": 4.495239333333333, + "x": -339.77908, + "y": -184.69139, + "value": 6.742859, + "category": 1 + }, + { + "id": "13", + "name": "MmeDeR", + "symbolSize": 2.6666666666666665, + "x": -194.31313, + "y": 178.55301, + "value": 4, + "category": 1 + }, + { + "id": "14", + "name": "Isabeau", + "symbolSize": 2.6666666666666665, + "x": -158.05168, + "y": 201.99768, + "value": 4, + "category": 1 + }, + { + "id": "15", + "name": "Gervais", + "symbolSize": 2.6666666666666665, + "x": -127.701546, + "y": 242.55057, + "value": 4, + "category": 1 + }, + { + "id": "16", + "name": "Tholomyes", + "symbolSize": 17.295237333333333, + "x": -385.2226, + "y": -393.5572, + "value": 25.942856, + "category": 2 + }, + { + "id": "17", + "name": "Listolier", + "symbolSize": 13.638097333333334, + "x": -516.55884, + "y": -393.98975, + "value": 20.457146, + "category": 2 + }, + { + "id": "18", + "name": "Fameuil", + "symbolSize": 13.638097333333334, + "x": -464.79382, + "y": -493.57944, + "value": 20.457146, + "category": 2 + }, + { + "id": "19", + "name": "Blacheville", + "symbolSize": 13.638097333333334, + "x": -515.1624, + "y": -456.9891, + "value": 20.457146, + "category": 2 + }, + { + "id": "20", + "name": "Favourite", + "symbolSize": 13.638097333333334, + "x": -408.12122, + "y": -464.5048, + "value": 20.457146, + "category": 2 + }, + { + "id": "21", + "name": "Dahlia", + "symbolSize": 13.638097333333334, + "x": -456.44113, + "y": -425.13303, + "value": 20.457146, + "category": 2 + }, + { + "id": "22", + "name": "Zephine", + "symbolSize": 13.638097333333334, + "x": -459.1107, + "y": -362.5133, + "value": 20.457146, + "category": 2 + }, + { + "id": "23", + "name": "Fantine", + "symbolSize": 28.266666666666666, + "x": -313.42786, + "y": -289.44803, + "value": 42.4, + "category": 2 + }, + { + "id": "24", + "name": "MmeThenardier", + "symbolSize": 20.95238266666667, + "x": 4.6313396, + "y": -273.8517, + "value": 31.428574, + "category": 7 + }, + { + "id": "25", + "name": "Thenardier", + "symbolSize": 30.095235333333335, + "x": 82.80825, + "y": -203.1144, + "value": 45.142853, + "category": 7 + }, + { + "id": "26", + "name": "Cosette", + "symbolSize": 20.95238266666667, + "x": 78.64646, + "y": -31.512747, + "value": 31.428574, + "category": 6 + }, + { + "id": "27", + "name": "Javert", + "symbolSize": 31.923806666666668, + "x": -81.46074, + "y": -204.20204, + "value": 47.88571, + "category": 7 + }, + { + "id": "28", + "name": "Fauchelevent", + "symbolSize": 8.152382000000001, + "x": -225.73984, + "y": 82.41631, + "value": 12.228573, + "category": 4 + }, + { + "id": "29", + "name": "Bamatabois", + "symbolSize": 15.466666666666667, + "x": -385.6842, + "y": -20.206686, + "value": 23.2, + "category": 3 + }, + { + "id": "30", + "name": "Perpetue", + "symbolSize": 4.495239333333333, + "x": -403.92447, + "y": -197.69823, + "value": 6.742859, + "category": 2 + }, + { + "id": "31", + "name": "Simplice", + "symbolSize": 8.152382000000001, + "x": -281.4253, + "y": -158.45137, + "value": 12.228573, + "category": 2 + }, + { + "id": "32", + "name": "Scaufflaire", + "symbolSize": 2.6666666666666665, + "x": -122.41348, + "y": 210.37503, + "value": 4, + "category": 1 + }, + { + "id": "33", + "name": "Woman1", + "symbolSize": 4.495239333333333, + "x": -234.6001, + "y": -113.15067, + "value": 6.742859, + "category": 1 + }, + { + "id": "34", + "name": "Judge", + "symbolSize": 11.809524666666666, + "x": -387.84915, + "y": 58.7059, + "value": 17.714287, + "category": 3 + }, + { + "id": "35", + "name": "Champmathieu", + "symbolSize": 11.809524666666666, + "x": -338.2307, + "y": 87.48405, + "value": 17.714287, + "category": 3 + }, + { + "id": "36", + "name": "Brevet", + "symbolSize": 11.809524666666666, + "x": -453.26874, + "y": 58.94648, + "value": 17.714287, + "category": 3 + }, + { + "id": "37", + "name": "Chenildieu", + "symbolSize": 11.809524666666666, + "x": -386.44904, + "y": 140.05937, + "value": 17.714287, + "category": 3 + }, + { + "id": "38", + "name": "Cochepaille", + "symbolSize": 11.809524666666666, + "x": -446.7876, + "y": 123.38005, + "value": 17.714287, + "category": 3 + }, + { + "id": "39", + "name": "Pontmercy", + "symbolSize": 6.323809333333333, + "x": 336.49738, + "y": -269.55914, + "value": 9.485714, + "category": 6 + }, + { + "id": "40", + "name": "Boulatruelle", + "symbolSize": 2.6666666666666665, + "x": 29.187843, + "y": -460.13132, + "value": 4, + "category": 7 + }, + { + "id": "41", + "name": "Eponine", + "symbolSize": 20.95238266666667, + "x": 238.36697, + "y": -210.00926, + "value": 31.428574, + "category": 7 + }, + { + "id": "42", + "name": "Anzelma", + "symbolSize": 6.323809333333333, + "x": 189.69513, + "y": -346.50662, + "value": 9.485714, + "category": 7 + }, + { + "id": "43", + "name": "Woman2", + "symbolSize": 6.323809333333333, + "x": -187.00418, + "y": -145.02663, + "value": 9.485714, + "category": 6 + }, + { + "id": "44", + "name": "MotherInnocent", + "symbolSize": 4.495239333333333, + "x": -252.99521, + "y": 129.87549, + "value": 6.742859, + "category": 4 + }, + { + "id": "45", + "name": "Gribier", + "symbolSize": 2.6666666666666665, + "x": -296.07935, + "y": 163.11964, + "value": 4, + "category": 4 + }, + { + "id": "46", + "name": "Jondrette", + "symbolSize": 2.6666666666666665, + "x": 550.3201, + "y": 522.4031, + "value": 4, + "category": 5 + }, + { + "id": "47", + "name": "MmeBurgon", + "symbolSize": 4.495239333333333, + "x": 488.13535, + "y": 356.8573, + "value": 6.742859, + "category": 5 + }, + { + "id": "48", + "name": "Gavroche", + "symbolSize": 41.06667066666667, + "x": 387.89572, + "y": 110.462326, + "value": 61.600006, + "category": 8 + }, + { + "id": "49", + "name": "Gillenormand", + "symbolSize": 13.638097333333334, + "x": 126.4831, + "y": 68.10622, + "value": 20.457146, + "category": 6 + }, + { + "id": "50", + "name": "Magnon", + "symbolSize": 4.495239333333333, + "x": 127.07365, + "y": -113.05923, + "value": 6.742859, + "category": 6 + }, + { + "id": "51", + "name": "MlleGillenormand", + "symbolSize": 13.638097333333334, + "x": 162.63559, + "y": 117.6565, + "value": 20.457146, + "category": 6 + }, + { + "id": "52", + "name": "MmePontmercy", + "symbolSize": 4.495239333333333, + "x": 353.66415, + "y": -205.89165, + "value": 6.742859, + "category": 6 + }, + { + "id": "53", + "name": "MlleVaubois", + "symbolSize": 2.6666666666666665, + "x": 165.43939, + "y": 339.7736, + "value": 4, + "category": 6 + }, + { + "id": "54", + "name": "LtGillenormand", + "symbolSize": 8.152382000000001, + "x": 137.69348, + "y": 196.1069, + "value": 12.228573, + "category": 6 + }, + { + "id": "55", + "name": "Marius", + "symbolSize": 35.58095333333333, + "x": 206.44687, + "y": -13.805411, + "value": 53.37143, + "category": 6 + }, + { + "id": "56", + "name": "BaronessT", + "symbolSize": 4.495239333333333, + "x": 194.82993, + "y": 224.78036, + "value": 6.742859, + "category": 6 + }, + { + "id": "57", + "name": "Mabeuf", + "symbolSize": 20.95238266666667, + "x": 597.6618, + "y": 135.18481, + "value": 31.428574, + "category": 8 + }, + { + "id": "58", + "name": "Enjolras", + "symbolSize": 28.266666666666666, + "x": 355.78366, + "y": -74.882454, + "value": 42.4, + "category": 8 + }, + { + "id": "59", + "name": "Combeferre", + "symbolSize": 20.95238266666667, + "x": 515.2961, + "y": -46.167564, + "value": 31.428574, + "category": 8 + }, + { + "id": "60", + "name": "Prouvaire", + "symbolSize": 17.295237333333333, + "x": 614.29285, + "y": -69.3104, + "value": 25.942856, + "category": 8 + }, + { + "id": "61", + "name": "Feuilly", + "symbolSize": 20.95238266666667, + "x": 550.1917, + "y": -128.17537, + "value": 31.428574, + "category": 8 + }, + { + "id": "62", + "name": "Courfeyrac", + "symbolSize": 24.609526666666667, + "x": 436.17184, + "y": -12.7286825, + "value": 36.91429, + "category": 8 + }, + { + "id": "63", + "name": "Bahorel", + "symbolSize": 22.780953333333333, + "x": 602.55225, + "y": 16.421427, + "value": 34.17143, + "category": 8 + }, + { + "id": "64", + "name": "Bossuet", + "symbolSize": 24.609526666666667, + "x": 455.81955, + "y": -115.45826, + "value": 36.91429, + "category": 8 + }, + { + "id": "65", + "name": "Joly", + "symbolSize": 22.780953333333333, + "x": 516.40784, + "y": 47.242233, + "value": 34.17143, + "category": 8 + }, + { + "id": "66", + "name": "Grantaire", + "symbolSize": 19.12381, + "x": 646.4313, + "y": -151.06331, + "value": 28.685715, + "category": 8 + }, + { + "id": "67", + "name": "MotherPlutarch", + "symbolSize": 2.6666666666666665, + "x": 668.9568, + "y": 204.65488, + "value": 4, + "category": 8 + }, + { + "id": "68", + "name": "Gueulemer", + "symbolSize": 19.12381, + "x": 78.4799, + "y": -347.15146, + "value": 28.685715, + "category": 7 + }, + { + "id": "69", + "name": "Babet", + "symbolSize": 19.12381, + "x": 150.35959, + "y": -298.50797, + "value": 28.685715, + "category": 7 + }, + { + "id": "70", + "name": "Claquesous", + "symbolSize": 19.12381, + "x": 137.3717, + "y": -410.2809, + "value": 28.685715, + "category": 7 + }, + { + "id": "71", + "name": "Montparnasse", + "symbolSize": 17.295237333333333, + "x": 234.87747, + "y": -400.85983, + "value": 25.942856, + "category": 7 + }, + { + "id": "72", + "name": "Toussaint", + "symbolSize": 6.323809333333333, + "x": 40.942253, + "y": 113.78272, + "value": 9.485714, + "category": 1 + }, + { + "id": "73", + "name": "Child1", + "symbolSize": 4.495239333333333, + "x": 437.939, + "y": 291.58234, + "value": 6.742859, + "category": 8 + }, + { + "id": "74", + "name": "Child2", + "symbolSize": 4.495239333333333, + "x": 466.04922, + "y": 283.3606, + "value": 6.742859, + "category": 8 + }, + { + "id": "75", + "name": "Brujon", + "symbolSize": 13.638097333333334, + "x": 238.79364, + "y": -314.06345, + "value": 20.457146, + "category": 7 + }, + { + "id": "76", + "name": "MmeHucheloup", + "symbolSize": 13.638097333333334, + "x": 712.18353, + "y": 4.8131495, + "value": 20.457146, + "category": 8 + } + ], + "links": [ + { + "source": "1", + "target": "0" + }, + { + "source": "2", + "target": "0" + }, + { + "source": "3", + "target": "0" + }, + { + "source": "3", + "target": "2" + }, + { + "source": "4", + "target": "0" + }, + { + "source": "5", + "target": "0" + }, + { + "source": "6", + "target": "0" + }, + { + "source": "7", + "target": "0" + }, + { + "source": "8", + "target": "0" + }, + { + "source": "9", + "target": "0" + }, + { + "source": "11", + "target": "0" + }, + { + "source": "11", + "target": "2" + }, + { + "source": "11", + "target": "3" + }, + { + "source": "11", + "target": "10" + }, + { + "source": "12", + "target": "11" + }, + { + "source": "13", + "target": "11" + }, + { + "source": "14", + "target": "11" + }, + { + "source": "15", + "target": "11" + }, + { + "source": "17", + "target": "16" + }, + { + "source": "18", + "target": "16" + }, + { + "source": "18", + "target": "17" + }, + { + "source": "19", + "target": "16" + }, + { + "source": "19", + "target": "17" + }, + { + "source": "19", + "target": "18" + }, + { + "source": "20", + "target": "16" + }, + { + "source": "20", + "target": "17" + }, + { + "source": "20", + "target": "18" + }, + { + "source": "20", + "target": "19" + }, + { + "source": "21", + "target": "16" + }, + { + "source": "21", + "target": "17" + }, + { + "source": "21", + "target": "18" + }, + { + "source": "21", + "target": "19" + }, + { + "source": "21", + "target": "20" + }, + { + "source": "22", + "target": "16" + }, + { + "source": "22", + "target": "17" + }, + { + "source": "22", + "target": "18" + }, + { + "source": "22", + "target": "19" + }, + { + "source": "22", + "target": "20" + }, + { + "source": "22", + "target": "21" + }, + { + "source": "23", + "target": "11" + }, + { + "source": "23", + "target": "12" + }, + { + "source": "23", + "target": "16" + }, + { + "source": "23", + "target": "17" + }, + { + "source": "23", + "target": "18" + }, + { + "source": "23", + "target": "19" + }, + { + "source": "23", + "target": "20" + }, + { + "source": "23", + "target": "21" + }, + { + "source": "23", + "target": "22" + }, + { + "source": "24", + "target": "11" + }, + { + "source": "24", + "target": "23" + }, + { + "source": "25", + "target": "11" + }, + { + "source": "25", + "target": "23" + }, + { + "source": "25", + "target": "24" + }, + { + "source": "26", + "target": "11" + }, + { + "source": "26", + "target": "16" + }, + { + "source": "26", + "target": "24" + }, + { + "source": "26", + "target": "25" + }, + { + "source": "27", + "target": "11" + }, + { + "source": "27", + "target": "23" + }, + { + "source": "27", + "target": "24" + }, + { + "source": "27", + "target": "25" + }, + { + "source": "27", + "target": "26" + }, + { + "source": "28", + "target": "11" + }, + { + "source": "28", + "target": "27" + }, + { + "source": "29", + "target": "11" + }, + { + "source": "29", + "target": "23" + }, + { + "source": "29", + "target": "27" + }, + { + "source": "30", + "target": "23" + }, + { + "source": "31", + "target": "11" + }, + { + "source": "31", + "target": "23" + }, + { + "source": "31", + "target": "27" + }, + { + "source": "31", + "target": "30" + }, + { + "source": "32", + "target": "11" + }, + { + "source": "33", + "target": "11" + }, + { + "source": "33", + "target": "27" + }, + { + "source": "34", + "target": "11" + }, + { + "source": "34", + "target": "29" + }, + { + "source": "35", + "target": "11" + }, + { + "source": "35", + "target": "29" + }, + { + "source": "35", + "target": "34" + }, + { + "source": "36", + "target": "11" + }, + { + "source": "36", + "target": "29" + }, + { + "source": "36", + "target": "34" + }, + { + "source": "36", + "target": "35" + }, + { + "source": "37", + "target": "11" + }, + { + "source": "37", + "target": "29" + }, + { + "source": "37", + "target": "34" + }, + { + "source": "37", + "target": "35" + }, + { + "source": "37", + "target": "36" + }, + { + "source": "38", + "target": "11" + }, + { + "source": "38", + "target": "29" + }, + { + "source": "38", + "target": "34" + }, + { + "source": "38", + "target": "35" + }, + { + "source": "38", + "target": "36" + }, + { + "source": "38", + "target": "37" + }, + { + "source": "39", + "target": "25" + }, + { + "source": "40", + "target": "25" + }, + { + "source": "41", + "target": "24" + }, + { + "source": "41", + "target": "25" + }, + { + "source": "42", + "target": "24" + }, + { + "source": "42", + "target": "25" + }, + { + "source": "42", + "target": "41" + }, + { + "source": "43", + "target": "11" + }, + { + "source": "43", + "target": "26" + }, + { + "source": "43", + "target": "27" + }, + { + "source": "44", + "target": "11" + }, + { + "source": "44", + "target": "28" + }, + { + "source": "45", + "target": "28" + }, + { + "source": "47", + "target": "46" + }, + { + "source": "48", + "target": "11" + }, + { + "source": "48", + "target": "25" + }, + { + "source": "48", + "target": "27" + }, + { + "source": "48", + "target": "47" + }, + { + "source": "49", + "target": "11" + }, + { + "source": "49", + "target": "26" + }, + { + "source": "50", + "target": "24" + }, + { + "source": "50", + "target": "49" + }, + { + "source": "51", + "target": "11" + }, + { + "source": "51", + "target": "26" + }, + { + "source": "51", + "target": "49" + }, + { + "source": "52", + "target": "39" + }, + { + "source": "52", + "target": "51" + }, + { + "source": "53", + "target": "51" + }, + { + "source": "54", + "target": "26" + }, + { + "source": "54", + "target": "49" + }, + { + "source": "54", + "target": "51" + }, + { + "source": "55", + "target": "11" + }, + { + "source": "55", + "target": "16" + }, + { + "source": "55", + "target": "25" + }, + { + "source": "55", + "target": "26" + }, + { + "source": "55", + "target": "39" + }, + { + "source": "55", + "target": "41" + }, + { + "source": "55", + "target": "48" + }, + { + "source": "55", + "target": "49" + }, + { + "source": "55", + "target": "51" + }, + { + "source": "55", + "target": "54" + }, + { + "source": "56", + "target": "49" + }, + { + "source": "56", + "target": "55" + }, + { + "source": "57", + "target": "41" + }, + { + "source": "57", + "target": "48" + }, + { + "source": "57", + "target": "55" + }, + { + "source": "58", + "target": "11" + }, + { + "source": "58", + "target": "27" + }, + { + "source": "58", + "target": "48" + }, + { + "source": "58", + "target": "55" + }, + { + "source": "58", + "target": "57" + }, + { + "source": "59", + "target": "48" + }, + { + "source": "59", + "target": "55" + }, + { + "source": "59", + "target": "57" + }, + { + "source": "59", + "target": "58" + }, + { + "source": "60", + "target": "48" + }, + { + "source": "60", + "target": "58" + }, + { + "source": "60", + "target": "59" + }, + { + "source": "61", + "target": "48" + }, + { + "source": "61", + "target": "55" + }, + { + "source": "61", + "target": "57" + }, + { + "source": "61", + "target": "58" + }, + { + "source": "61", + "target": "59" + }, + { + "source": "61", + "target": "60" + }, + { + "source": "62", + "target": "41" + }, + { + "source": "62", + "target": "48" + }, + { + "source": "62", + "target": "55" + }, + { + "source": "62", + "target": "57" + }, + { + "source": "62", + "target": "58" + }, + { + "source": "62", + "target": "59" + }, + { + "source": "62", + "target": "60" + }, + { + "source": "62", + "target": "61" + }, + { + "source": "63", + "target": "48" + }, + { + "source": "63", + "target": "55" + }, + { + "source": "63", + "target": "57" + }, + { + "source": "63", + "target": "58" + }, + { + "source": "63", + "target": "59" + }, + { + "source": "63", + "target": "60" + }, + { + "source": "63", + "target": "61" + }, + { + "source": "63", + "target": "62" + }, + { + "source": "64", + "target": "11" + }, + { + "source": "64", + "target": "48" + }, + { + "source": "64", + "target": "55" + }, + { + "source": "64", + "target": "57" + }, + { + "source": "64", + "target": "58" + }, + { + "source": "64", + "target": "59" + }, + { + "source": "64", + "target": "60" + }, + { + "source": "64", + "target": "61" + }, + { + "source": "64", + "target": "62" + }, + { + "source": "64", + "target": "63" + }, + { + "source": "65", + "target": "48" + }, + { + "source": "65", + "target": "55" + }, + { + "source": "65", + "target": "57" + }, + { + "source": "65", + "target": "58" + }, + { + "source": "65", + "target": "59" + }, + { + "source": "65", + "target": "60" + }, + { + "source": "65", + "target": "61" + }, + { + "source": "65", + "target": "62" + }, + { + "source": "65", + "target": "63" + }, + { + "source": "65", + "target": "64" + }, + { + "source": "66", + "target": "48" + }, + { + "source": "66", + "target": "58" + }, + { + "source": "66", + "target": "59" + }, + { + "source": "66", + "target": "60" + }, + { + "source": "66", + "target": "61" + }, + { + "source": "66", + "target": "62" + }, + { + "source": "66", + "target": "63" + }, + { + "source": "66", + "target": "64" + }, + { + "source": "66", + "target": "65" + }, + { + "source": "67", + "target": "57" + }, + { + "source": "68", + "target": "11" + }, + { + "source": "68", + "target": "24" + }, + { + "source": "68", + "target": "25" + }, + { + "source": "68", + "target": "27" + }, + { + "source": "68", + "target": "41" + }, + { + "source": "68", + "target": "48" + }, + { + "source": "69", + "target": "11" + }, + { + "source": "69", + "target": "24" + }, + { + "source": "69", + "target": "25" + }, + { + "source": "69", + "target": "27" + }, + { + "source": "69", + "target": "41" + }, + { + "source": "69", + "target": "48" + }, + { + "source": "69", + "target": "68" + }, + { + "source": "70", + "target": "11" + }, + { + "source": "70", + "target": "24" + }, + { + "source": "70", + "target": "25" + }, + { + "source": "70", + "target": "27" + }, + { + "source": "70", + "target": "41" + }, + { + "source": "70", + "target": "58" + }, + { + "source": "70", + "target": "68" + }, + { + "source": "70", + "target": "69" + }, + { + "source": "71", + "target": "11" + }, + { + "source": "71", + "target": "25" + }, + { + "source": "71", + "target": "27" + }, + { + "source": "71", + "target": "41" + }, + { + "source": "71", + "target": "48" + }, + { + "source": "71", + "target": "68" + }, + { + "source": "71", + "target": "69" + }, + { + "source": "71", + "target": "70" + }, + { + "source": "72", + "target": "11" + }, + { + "source": "72", + "target": "26" + }, + { + "source": "72", + "target": "27" + }, + { + "source": "73", + "target": "48" + }, + { + "source": "74", + "target": "48" + }, + { + "source": "74", + "target": "73" + }, + { + "source": "75", + "target": "25" + }, + { + "source": "75", + "target": "41" + }, + { + "source": "75", + "target": "48" + }, + { + "source": "75", + "target": "68" + }, + { + "source": "75", + "target": "69" + }, + { + "source": "75", + "target": "70" + }, + { + "source": "75", + "target": "71" + }, + { + "source": "76", + "target": "48" + }, + { + "source": "76", + "target": "58" + }, + { + "source": "76", + "target": "62" + }, + { + "source": "76", + "target": "63" + }, + { + "source": "76", + "target": "64" + }, + { + "source": "76", + "target": "65" + }, + { + "source": "76", + "target": "66" + } + ], + "categories": [ + { + "name": "A" + }, + { + "name": "B" + }, + { + "name": "C" + }, + { + "name": "D" + }, + { + "name": "E" + }, + { + "name": "F" + }, + { + "name": "G" + }, + { + "name": "H" + }, + { + "name": "I" + } + ] +} \ No newline at end of file diff --git a/src/api/courseChaptersApi.ts b/src/api/courseChaptersApi.ts new file mode 100644 index 0000000..6e85cfd --- /dev/null +++ b/src/api/courseChaptersApi.ts @@ -0,0 +1,29 @@ +/** + * 获取计算机导论信息 + * @returns + */ +export function getLearnInfoApi() { + return new Promise((resolve) => { + const data = [ + { name: '总学时', value: '36学时' }, + { name: '已分配学时', value: '20学时' }, + { name: '总学分', value: '2.0分' }, + { name: '章节数', value: '10章' }, + { name: '未分配学时', value: '' }, + { name: '知识点总数', value: '33个' }, + ] + setTimeout(() => resolve(data), 500 * Math.random()) + }) +} +/** + * 获取计算机导论信息 + * @returns + */ +export function getOrogramObjectiveApi() { + return new Promise((resolve) => { + const data = { + con: '内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容', + } + setTimeout(() => resolve(data), 500 * Math.random()) + }) +} diff --git a/src/assets/images/gd (3).png b/src/assets/images/gd (3).png new file mode 100644 index 0000000..415488d Binary files /dev/null and b/src/assets/images/gd (3).png differ diff --git a/src/assets/images/minus-circle-filled.png b/src/assets/images/minus-circle-filled.png new file mode 100644 index 0000000..9dd9c1e Binary files /dev/null and b/src/assets/images/minus-circle-filled.png differ diff --git a/src/assets/images/minus-circle-filled@2x.png b/src/assets/images/minus-circle-filled@2x.png new file mode 100644 index 0000000..c344cb5 Binary files /dev/null and b/src/assets/images/minus-circle-filled@2x.png differ diff --git a/src/assets/images/sjx(1).png b/src/assets/images/sjx(1).png new file mode 100644 index 0000000..3b0d2f2 Binary files /dev/null and b/src/assets/images/sjx(1).png differ diff --git a/src/assets/images/sjx.png b/src/assets/images/sjx.png new file mode 100644 index 0000000..acfb26f Binary files /dev/null and b/src/assets/images/sjx.png differ diff --git a/src/main.ts b/src/main.ts index d58c6c0..9e1fa18 100644 --- a/src/main.ts +++ b/src/main.ts @@ -23,7 +23,7 @@ import gloablComponent from '@/components/index' import 'echarts' import ECharts from 'vue-echarts'; // 导入jquery -import $ from 'jquery' +// import $ from 'jquery' app.use(gloablComponent) // 注册仓库 app.use(pinia) diff --git a/src/router/routers.ts b/src/router/routers.ts index c72a332..bd49659 100644 --- a/src/router/routers.ts +++ b/src/router/routers.ts @@ -22,6 +22,16 @@ export const constantRoute: any = [ }, ], }, + { + path: '/knowledgeAtlas', + component: () => import('@/views/course/knowledgeAtlas.vue'), + name: 'knowledgeAtlas', + meta: { + title: '知识图谱', + hidden: true, + icon: 'Notebook', + }, + }, { path: '/curriculumCenter', redirect: '/curriculumCenter/basicCourseInformation', diff --git a/src/views/MyCourseStudy/learningProcess.vue b/src/views/MyCourseStudy/learningProcess.vue index de79071..2982d2f 100644 --- a/src/views/MyCourseStudy/learningProcess.vue +++ b/src/views/MyCourseStudy/learningProcess.vue @@ -4,6 +4,7 @@ diff --git a/src/views/course/components/KnowledgeGraph.vue b/src/views/course/components/KnowledgeGraph.vue new file mode 100644 index 0000000..3dacbd7 --- /dev/null +++ b/src/views/course/components/KnowledgeGraph.vue @@ -0,0 +1,153 @@ + + + + + diff --git a/src/views/course/components/KnowledgeGraphUi/foldInfoUi.vue b/src/views/course/components/KnowledgeGraphUi/foldInfoUi.vue new file mode 100644 index 0000000..ab2b459 --- /dev/null +++ b/src/views/course/components/KnowledgeGraphUi/foldInfoUi.vue @@ -0,0 +1,275 @@ + + + + + + \ No newline at end of file diff --git a/src/views/course/components/KnowledgeGraphUi/index.ts b/src/views/course/components/KnowledgeGraphUi/index.ts new file mode 100644 index 0000000..6a74d19 --- /dev/null +++ b/src/views/course/components/KnowledgeGraphUi/index.ts @@ -0,0 +1,5 @@ +export { default as theoryUi } from './theoryUi.vue' +export { default as objectiveUi } from './objectiveUi.vue' +export { default as atlasUi } from '../atlasUi.vue' +export { default as lookResourceUi } from './lookResourceUi.vue' +export { default as foldInfoUi } from './foldInfoUi.vue' \ No newline at end of file diff --git a/src/views/course/components/KnowledgeGraphUi/lookResourceUi.vue b/src/views/course/components/KnowledgeGraphUi/lookResourceUi.vue new file mode 100644 index 0000000..41983ad --- /dev/null +++ b/src/views/course/components/KnowledgeGraphUi/lookResourceUi.vue @@ -0,0 +1,195 @@ + + + \ No newline at end of file diff --git a/src/views/course/components/KnowledgeGraphUi/objectiveUi.vue b/src/views/course/components/KnowledgeGraphUi/objectiveUi.vue new file mode 100644 index 0000000..c396da1 --- /dev/null +++ b/src/views/course/components/KnowledgeGraphUi/objectiveUi.vue @@ -0,0 +1,96 @@ + + + + + \ No newline at end of file diff --git a/src/views/course/components/KnowledgeGraphUi/theoryUi.vue b/src/views/course/components/KnowledgeGraphUi/theoryUi.vue new file mode 100644 index 0000000..ba1019e --- /dev/null +++ b/src/views/course/components/KnowledgeGraphUi/theoryUi.vue @@ -0,0 +1,116 @@ + + + + + \ No newline at end of file diff --git a/src/views/course/components/atlasUi.vue b/src/views/course/components/atlasUi.vue new file mode 100644 index 0000000..e4cb5ba --- /dev/null +++ b/src/views/course/components/atlasUi.vue @@ -0,0 +1,50 @@ + + + \ No newline at end of file diff --git a/src/views/course/courseChapters.vue b/src/views/course/courseChapters.vue index b84722c..2b45e84 100644 --- a/src/views/course/courseChapters.vue +++ b/src/views/course/courseChapters.vue @@ -1,9 +1,150 @@ - - + diff --git a/src/views/course/knowledgeAtlas.vue b/src/views/course/knowledgeAtlas.vue new file mode 100644 index 0000000..f9e23dc --- /dev/null +++ b/src/views/course/knowledgeAtlas.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/src/views/course/spritetext.js b/src/views/course/spritetext.js new file mode 100644 index 0000000..4b5a759 --- /dev/null +++ b/src/views/course/spritetext.js @@ -0,0 +1,468 @@ +import { LinearFilter, Sprite, SpriteMaterial, SRGBColorSpace, Texture } from 'three'; + +function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); +} +function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); +} +function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = !0, + o = !1; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = !0, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : String(i); +} +function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +} +function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); + } +} +function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; +} +function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function"); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }); + Object.defineProperty(subClass, "prototype", { + writable: false + }); + if (superClass) _setPrototypeOf(subClass, superClass); +} +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + return _setPrototypeOf(o, p); +} +function _assertThisInitialized(self) { + if (self === void 0) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + return self; +} +function _possibleConstructorReturn(self, call) { + if (call && (typeof call === "object" || typeof call === "function")) { + return call; + } else if (call !== void 0) { + throw new TypeError("Derived constructors may only return object or undefined"); + } + return _assertThisInitialized(self); +} +function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); +} +function _toConsumableArray(arr) { + return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); +} +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return _arrayLikeToArray(arr); +} +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); +} +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(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]; + return arr2; +} +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +var three = typeof window !== 'undefined' && window.THREE ? window.THREE // Prefer consumption from global THREE, if exists +: { + LinearFilter: LinearFilter, + Sprite: Sprite, + SpriteMaterial: SpriteMaterial, + SRGBColorSpace: SRGBColorSpace, + Texture: Texture +}; +var _default = /*#__PURE__*/function (_three$Sprite) { + _inherits(_default, _three$Sprite); + function _default() { + var _this; + var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; + var textHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 10; + var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'rgba(255, 255, 255, 1)'; + _classCallCheck(this, _default); + _this = _callSuper(this, _default, [new three.SpriteMaterial()]); + _this._text = "".concat(text); + _this._textHeight = textHeight; + _this._color = color; + _this._backgroundColor = false; // no background color + + _this._padding = 0; + _this._borderWidth = 0; + _this._borderRadius = 0; + _this._borderColor = 'white'; + _this._strokeWidth = 0; + _this._strokeColor = 'white'; + _this._fontFace = 'system-ui'; + _this._fontSize = 90; // defines text resolution + _this._fontWeight = 'normal'; + _this._canvas = document.createElement('canvas'); + _this._genCanvas(); + return _this; + } + _createClass(_default, [{ + key: "text", + get: function get() { + return this._text; + }, + set: function set(text) { + this._text = text; + this._genCanvas(); + } + }, { + key: "textHeight", + get: function get() { + return this._textHeight; + }, + set: function set(textHeight) { + this._textHeight = textHeight; + this._genCanvas(); + } + }, { + key: "color", + get: function get() { + return this._color; + }, + set: function set(color) { + this._color = color; + this._genCanvas(); + } + }, { + key: "backgroundColor", + get: function get() { + return this._backgroundColor; + }, + set: function set(color) { + this._backgroundColor = color; + this._genCanvas(); + } + }, { + key: "padding", + get: function get() { + return this._padding; + }, + set: function set(padding) { + this._padding = padding; + this._genCanvas(); + } + }, { + key: "borderWidth", + get: function get() { + return this._borderWidth; + }, + set: function set(borderWidth) { + this._borderWidth = borderWidth; + this._genCanvas(); + } + }, { + key: "borderRadius", + get: function get() { + return this._borderRadius; + }, + set: function set(borderRadius) { + this._borderRadius = borderRadius; + this._genCanvas(); + } + }, { + key: "borderColor", + get: function get() { + return this._borderColor; + }, + set: function set(borderColor) { + this._borderColor = borderColor; + this._genCanvas(); + } + }, { + key: "fontFace", + get: function get() { + return this._fontFace; + }, + set: function set(fontFace) { + this._fontFace = fontFace; + this._genCanvas(); + } + }, { + key: "fontSize", + get: function get() { + return this._fontSize; + }, + set: function set(fontSize) { + this._fontSize = fontSize; + this._genCanvas(); + } + }, { + key: "fontWeight", + get: function get() { + return this._fontWeight; + }, + set: function set(fontWeight) { + this._fontWeight = fontWeight; + this._genCanvas(); + } + }, { + key: "strokeWidth", + get: function get() { + return this._strokeWidth; + }, + set: function set(strokeWidth) { + this._strokeWidth = strokeWidth; + this._genCanvas(); + } + }, { + key: "strokeColor", + get: function get() { + return this._strokeColor; + }, + set: function set(strokeColor) { + this._strokeColor = strokeColor; + this._genCanvas(); + } + }, { + key: "_genCanvas", + value: function _genCanvas() { + var _this2 = this; + var canvas = this._canvas; + var ctx = canvas.getContext('2d'); + var border = Array.isArray(this.borderWidth) ? this.borderWidth : [this.borderWidth, this.borderWidth]; // x,y border + var relBorder = border.map(function (b) { + return b * _this2.fontSize * 0.1; + }); // border in canvas units + + var borderRadius = Array.isArray(this.borderRadius) ? this.borderRadius : [this.borderRadius, this.borderRadius, this.borderRadius, this.borderRadius]; // tl tr br bl corners + var relBorderRadius = borderRadius.map(function (b) { + return b * _this2.fontSize * 0.1; + }); // border radius in canvas units + + var padding = Array.isArray(this.padding) ? this.padding : [this.padding, this.padding]; // x,y padding + var relPadding = padding.map(function (p) { + return p * _this2.fontSize * 0.1; + }); // padding in canvas units + + var lines = this.text.split('\n'); + var font = "".concat(this.fontWeight, " ").concat(this.fontSize, "px ").concat(this.fontFace); + ctx.font = font; // measure canvas with appropriate font + var innerWidth = Math.max.apply(Math, _toConsumableArray(lines.map(function (line) { + return ctx.measureText(line).width; + }))); + var innerHeight = this.fontSize * lines.length; + canvas.width = innerWidth + relBorder[0] * 2 + relPadding[0] * 2; + canvas.height = innerHeight + relBorder[1] * 2 + relPadding[1] * 2; + + // paint border + if (this.borderWidth) { + ctx.strokeStyle = this.borderColor; + if (relBorder[0]) { + // left + right borders + var hb = relBorder[0] / 2; + ctx.lineWidth = relBorder[0]; + ctx.beginPath(); + ctx.moveTo(hb, relBorderRadius[0]); + ctx.lineTo(hb, canvas.height - relBorderRadius[3]); + ctx.moveTo(canvas.width - hb, relBorderRadius[1]); + ctx.lineTo(canvas.width - hb, canvas.height - relBorderRadius[2]); + ctx.stroke(); + } + if (relBorder[1]) { + // top + bottom borders + var _hb = relBorder[1] / 2; + ctx.lineWidth = relBorder[1]; + ctx.beginPath(); + ctx.moveTo(Math.max(relBorder[0], relBorderRadius[0]), _hb); + ctx.lineTo(canvas.width - Math.max(relBorder[0], relBorderRadius[1]), _hb); + ctx.moveTo(Math.max(relBorder[0], relBorderRadius[3]), canvas.height - _hb); + ctx.lineTo(canvas.width - Math.max(relBorder[0], relBorderRadius[2]), canvas.height - _hb); + ctx.stroke(); + } + if (this.borderRadius) { + // strike rounded corners + var cornerWidth = Math.max.apply(Math, _toConsumableArray(relBorder)); + var _hb2 = cornerWidth / 2; + ctx.lineWidth = cornerWidth; + ctx.beginPath(); + [!!relBorderRadius[0] && [relBorderRadius[0], _hb2, _hb2, relBorderRadius[0]], !!relBorderRadius[1] && [canvas.width - relBorderRadius[1], canvas.width - _hb2, _hb2, relBorderRadius[1]], !!relBorderRadius[2] && [canvas.width - relBorderRadius[2], canvas.width - _hb2, canvas.height - _hb2, canvas.height - relBorderRadius[2]], !!relBorderRadius[3] && [relBorderRadius[3], _hb2, canvas.height - _hb2, canvas.height - relBorderRadius[3]]].filter(function (d) { + return d; + }).forEach(function (_ref) { + var _ref2 = _slicedToArray(_ref, 4), + x0 = _ref2[0], + x1 = _ref2[1], + y0 = _ref2[2], + y1 = _ref2[3]; + ctx.moveTo(x0, y0); + ctx.quadraticCurveTo(x1, y0, x1, y1); + }); + ctx.stroke(); + } + } + + // paint background + if (this.backgroundColor) { + ctx.fillStyle = this.backgroundColor; + if (!this.borderRadius) { + ctx.fillRect(relBorder[0], relBorder[1], canvas.width - relBorder[0] * 2, canvas.height - relBorder[1] * 2); + } else { + // fill with rounded corners + ctx.beginPath(); + ctx.moveTo(relBorder[0], relBorderRadius[0]); + [[relBorder[0], relBorderRadius[0], canvas.width - relBorderRadius[1], relBorder[1], relBorder[1], relBorder[1]], + // t + [canvas.width - relBorder[0], canvas.width - relBorder[0], canvas.width - relBorder[0], relBorder[1], relBorderRadius[1], canvas.height - relBorderRadius[2]], + // r + [canvas.width - relBorder[0], canvas.width - relBorderRadius[2], relBorderRadius[3], canvas.height - relBorder[1], canvas.height - relBorder[1], canvas.height - relBorder[1]], + // b + [relBorder[0], relBorder[0], relBorder[0], canvas.height - relBorder[1], canvas.height - relBorderRadius[3], relBorderRadius[0]] // t + ].forEach(function (_ref3) { + var _ref4 = _slicedToArray(_ref3, 6), + x0 = _ref4[0], + x1 = _ref4[1], + x2 = _ref4[2], + y0 = _ref4[3], + y1 = _ref4[4], + y2 = _ref4[5]; + ctx.quadraticCurveTo(x0, y0, x1, y1); + ctx.lineTo(x2, y2); + }); + ctx.closePath(); + ctx.fill(); + } + } + ctx.translate.apply(ctx, _toConsumableArray(relBorder)); + ctx.translate.apply(ctx, _toConsumableArray(relPadding)); + + // paint text + ctx.font = font; // Set font again after canvas is resized, as context properties are reset + ctx.fillStyle = this.color; + ctx.textBaseline = 'bottom'; + var drawTextStroke = this.strokeWidth > 0; + if (drawTextStroke) { + ctx.lineWidth = this.strokeWidth * this.fontSize / 10; + ctx.strokeStyle = this.strokeColor; + } + lines.forEach(function (line, index) { + var lineX = (innerWidth - ctx.measureText(line).width) / 2; + var lineY = (index + 1) * _this2.fontSize; + drawTextStroke && ctx.strokeText(line, lineX, lineY); + ctx.fillText(line, lineX, lineY); + }); + + // Inject canvas into sprite + if (this.material.map) this.material.map.dispose(); // gc previous texture + var texture = this.material.map = new three.Texture(canvas); + texture.minFilter = three.LinearFilter; + texture.colorSpace = three.SRGBColorSpace; + texture.needsUpdate = true; + var yScale = this.textHeight * lines.length + border[1] * 2 + padding[1] * 2; + this.scale.set(yScale * canvas.width / canvas.height, yScale, 0); + } + }, { + key: "clone", + value: function clone() { + return new this.constructor(this.text, this.textHeight, this.color).copy(this); + } + }, { + key: "copy", + value: function copy(source) { + three.Sprite.prototype.copy.call(this, source); + this.color = source.color; + this.backgroundColor = source.backgroundColor; + this.padding = source.padding; + this.borderWidth = source.borderWidth; + this.borderColor = source.borderColor; + this.fontFace = source.fontFace; + this.fontSize = source.fontSize; + this.fontWeight = source.fontWeight; + this.strokeWidth = source.strokeWidth; + this.strokeColor = source.strokeColor; + return this; + } + }]); + return _default; +}(three.Sprite); + +export { _default as default }; \ No newline at end of file diff --git a/src/views/portal/LearningPathRecommendations.vue b/src/views/portal/LearningPathRecommendations.vue index 9deeca6..d30b22d 100644 --- a/src/views/portal/LearningPathRecommendations.vue +++ b/src/views/portal/LearningPathRecommendations.vue @@ -1,66 +1,134 @@ - diff --git a/src/views/portal/components/KnowledgeGraph.vue b/src/views/portal/components/KnowledgeGraph.vue new file mode 100644 index 0000000..b71fa7b --- /dev/null +++ b/src/views/portal/components/KnowledgeGraph.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/src/views/portal/index.vue b/src/views/portal/index.vue index 3466d08..8849be8 100644 --- a/src/views/portal/index.vue +++ b/src/views/portal/index.vue @@ -52,9 +52,9 @@

计算机导论的简介计算机导论的简介计算机导论的简介计算机导论的简介计算机导论的简介计算机导论的简介计算机导 论的简介计算机导论的简介计算机导论的简介计算机导论的简介计算机导论的简介

-

总学时 :36小时

+

总学时 :36小时 

总学分 :2.0分

-

章节数 :10章

+

章节数 :10章 

知识点总数 :33个

@@ -137,7 +137,7 @@
-

《计算机导论》 {{ userList.name }}

+
@@ -146,7 +146,31 @@
+
+ + +

{{ message }}

+
+ @@ -158,13 +182,15 @@

黄淮学院版权所有@2023 湘豫CP备 19005950号-1
违法和不良信息举报 举报电话:0xxx-8xxxxxxx 举报邮箱:xxxxxxxxx@qq.com

-
+
+ +
// @ts-expect-error - diff --git a/src/views/portal/knowledgePointLearning.vue b/src/views/portal/knowledgePointLearning.vue index 62e9c75..62152c5 100644 --- a/src/views/portal/knowledgePointLearning.vue +++ b/src/views/portal/knowledgePointLearning.vue @@ -10,7 +10,6 @@
  • 学生入口  |
  • 毕业生入口
  • - + + +
    + + + +
    + + + + + +
    diff --git a/vite.config.ts b/vite.config.ts index 48f92c2..5b2293c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -36,16 +36,3 @@ export default ({ command }: any) => { }, } } - -// const webpack = require('webpack') -// module.exports = { -// configureWebpack: { -// plugins: [ -// new webpack.ProvidePlugin({ -// $: 'jquery', -// jQuery: 'jquery', -// 'windows.jQuery': 'jquery' -// }) -// ] -// } -// } \ No newline at end of file