├── Edivator-PPT.pptx ├── Edivator-创新点.docx ├── Edivator-功能架构设计说明书.docx ├── Edivator-技术流程文档.docx ├── Edivator-接口设计文档.pdf ├── Edivator-用户手册.docx ├── Edivator-类图.png ├── README.md ├── backend ├── .gitignore ├── Edivator │ ├── Edivator │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── routing.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ ├── apps │ │ ├── __init__.py │ │ ├── ai │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializers.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── chat │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── consumers.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializers.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── companies │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializers.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── documents │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_initial.py │ │ │ │ ├── 0003_alter_template_content.py │ │ │ │ ├── 0004_keyword_document_keywords.py │ │ │ │ ├── 0005_alter_keyword_name.py │ │ │ │ ├── 0006_template_avatar.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializers.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── invitations │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializers.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── teams │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ ├── 0002_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── serializer.py │ │ │ ├── signals.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── users │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── apps.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── permissions.py │ │ │ ├── serializer.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── common │ │ ├── authenticate.py │ │ ├── db.py │ │ ├── utils.py │ │ └── views.py │ ├── files │ │ ├── doc_avatars │ │ │ ├── 1.png │ │ │ ├── 1869ba4c9a0f382712df4aa71d93cc9.png │ │ │ ├── 2772672da5a645b695c075a7c6554ed.png │ │ │ ├── 2772672da5a645b695c075a7c6554ed_91DPGQ7.png │ │ │ ├── 2772672da5a645b695c075a7c6554ed_FArF8ng.png │ │ │ ├── 2772672da5a645b695c075a7c6554ed_MQ497A4.png │ │ │ ├── 2772672da5a645b695c075a7c6554ed_OUI5rFY.png │ │ │ ├── 2772672da5a645b695c075a7c6554ed_Z6BgAEd.png │ │ │ ├── 2772672da5a645b695c075a7c6554ed_hd1LCKN.png │ │ │ ├── 2772672da5a645b695c075a7c6554ed_vYNMPKJ.png │ │ │ ├── 70353c4161658f39fa107b3166db6d2.png │ │ │ ├── IMG_3263.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-192x192_AJX7l0t.png │ │ │ ├── avatar.jpg │ │ │ ├── avatar_5JkZaLg.jpg │ │ │ ├── avatar_6jWXS3a.jpg │ │ │ ├── avatar_AaXDre7.jpg │ │ │ ├── avatar_CyHj88G.jpg │ │ │ ├── avatar_CydRvJH.jpg │ │ │ ├── avatar_Ks7PAvE.jpg │ │ │ ├── avatar_NhK6uqE.jpg │ │ │ ├── avatar_R0kMDGN.jpg │ │ │ ├── avatar_UjQVxjC.jpg │ │ │ ├── avatar_WvS3pwC.jpg │ │ │ ├── avatar_XpAENVF.jpg │ │ │ ├── avatar_Xw2Wstx.jpg │ │ │ ├── avatar_cAumb47.jpg │ │ │ ├── avatar_cXPcB60.jpg │ │ │ ├── avatar_nqCELGL.jpg │ │ │ ├── avatar_rT8P1oq.jpg │ │ │ ├── avatar_xouV1pW.jpg │ │ │ ├── avatar_zSL15yU.jpg │ │ │ ├── 周文钰生活照.jpg │ │ │ ├── 周文钰生活照_WKFxOsk.jpg │ │ │ ├── 周文钰签名.png │ │ │ ├── 图标.jpg │ │ │ ├── 图标_1rTt0QI.jpg │ │ │ ├── 图标_DiMBbkB.jpg │ │ │ ├── 图标_SpPrLeG.jpg │ │ │ ├── 图标_fuY3x6T.jpg │ │ │ ├── 图标_zSX5rlG.jpg │ │ │ ├── 屏幕截图_2023-09-14_001952.png │ │ │ ├── 每日站会.jpg │ │ │ ├── 每日站会_DxZYh5J.jpg │ │ │ └── 每日站会_MpYTdYr.jpg │ │ ├── ocr_res │ │ │ ├── 02a4f660c29a4c0f8c364884d46310d2.jpg │ │ │ ├── 0aea05e595a7408c93b8ac006c25d0f9.jpg │ │ │ ├── 0df8cf5d375042d6927726e5bfeb4f94.jpg │ │ │ ├── 0f1466d4a9224301bea7ef2d7f621482.jpg │ │ │ ├── 1396a2b3a6e84ddd9e5f401d82c82159.jpg │ │ │ ├── 157054e2f6fa463a9cbc8d4f1cdb9b31.jpg │ │ │ ├── 1b88aa1d5bf34610bf46f75de561e9f3.jpg │ │ │ ├── 22ab30f4c1544feab06f795d66c34486.jpg │ │ │ ├── 2604b0ce64df40aaba8d9ee02fe2e804.jpg │ │ │ ├── 26aa744a9bf14b0099700bb91f81c240.jpg │ │ │ ├── 2bb1306fa353472d8bfbb51b1f7b4821.jpg │ │ │ ├── 2cb964b6a74b4a54bd58938f24d9037b.jpg │ │ │ ├── 31c4d638491d4435962459664d981258.jpg │ │ │ ├── 40470d73912244a29401bffd2c3b4892.jpg │ │ │ ├── 48865b19971548129dd70e6b05064d6d.jpg │ │ │ ├── 489d6e4668dc4500b36c91921436f622.jpg │ │ │ ├── 4926d2515af74fceabf21625b8ea40bd.jpg │ │ │ ├── 5d7679da4c2542468c17fb75120cb9a2.jpg │ │ │ ├── 6108b0208272455db68456d5b1b1847c.jpg │ │ │ ├── 715bdefd8ec847a7bd33c1c5403183cf.jpg │ │ │ ├── 733f86fcd74f4329a3fbfda2e8b0731d.jpg │ │ │ ├── 73cd8d53d2614ebc8f0a4d644e10473d.jpg │ │ │ ├── 74022b0e81734d238687b36f1790a2fb.jpg │ │ │ ├── 76c2c766003b42bfb6dfed747e29a8d5.jpg │ │ │ ├── 76d6c50582bc49cabf604a65d92c70ab.jpg │ │ │ ├── 7c32669a5da348c6a721eeb9752feee8.jpg │ │ │ ├── 857d62bd88184a2d82e757e5cd6ef862.jpg │ │ │ ├── 8f907e57a42b4be9b78035ef01d7a794.jpg │ │ │ ├── 9aed576854d94ad59909d279a9929cd1.jpg │ │ │ ├── b3b6b32729ae4b98a0f05e2dc6c57a53.jpg │ │ │ ├── b4d53312d3b8436fbe17b9af38d3f021.jpg │ │ │ ├── b602d795f44c4a2e9c73135c9b5ebbeb.jpg │ │ │ ├── c29ebb38330449889103b4138dcda2c0.jpg │ │ │ ├── c5e4d151417b49b398a0f29f141c8875.jpg │ │ │ ├── c6fb43248ac04acaadbc829d56cf47f2.jpg │ │ │ ├── cb4294ad6c4c4ea7b46ffa861d8edc44.jpg │ │ │ ├── cee65cb8eccc497d943e4280383e6bf2.jpg │ │ │ ├── da6db175150c4e4484ba88db2762633e.jpg │ │ │ ├── db52dbd2c2d4474dafc9d5d5f83a15cb.jpg │ │ │ ├── e6a882faa62847128df59a695fe054d5.jpg │ │ │ └── ec302c7058104b9ca70c9f725f07ab84.jpg │ │ ├── template_avatars │ │ │ ├── 76a464f64b091978105ae88e79af421.png │ │ │ ├── 76a464f64b091978105ae88e79af421_1CGxIHO.png │ │ │ ├── 76a464f64b091978105ae88e79af421_8uMAkoU.png │ │ │ ├── 91add9fda91db35d5ac5c45239709fa.png │ │ │ ├── 91af01d9af2c9b45db502683f06af65.png │ │ │ ├── a91717ceaaf25b86e98b7b0436483a0.png │ │ │ ├── b88a30d8625e809f0dc5e541de0ccf0.png │ │ │ ├── b88a30d8625e809f0dc5e541de0ccf0_uXCdVQQ.png │ │ │ ├── blog.png │ │ │ ├── blog_cover.png │ │ │ ├── blog_cover_Kw3MRVN.png │ │ │ ├── blog_cover_L0oletB.png │ │ │ ├── blog_cover_SbRjkeR.png │ │ │ ├── blog_cover_fAPfBxv.png │ │ │ ├── blog_cover_v6M1fTU.png │ │ │ ├── blog_cover_wAtLnyC.png │ │ │ ├── eb435a37d75fc07109fa6cf2d05bcba.png │ │ │ ├── eb435a37d75fc07109fa6cf2d05bcba_WRq3Lt4.png │ │ │ ├── empty.jpg │ │ │ ├── 个人博客.png │ │ │ ├── 技术文档.png │ │ │ ├── 水獭.jpg │ │ │ ├── 水獭_QAXCTot.jpg │ │ │ ├── 水獭_cBQYdig.jpg │ │ │ ├── 水獭_clGaOah.jpg │ │ │ ├── 水獭_dwalq8c.jpg │ │ │ ├── 水獭_g7sNhGd.jpg │ │ │ ├── 水獭_iyQUMP1.jpg │ │ │ ├── 水獭_j6oNAwd.jpg │ │ │ └── 软件使用说明书.png │ │ ├── templates │ │ │ ├── 04a18b89-fbb3-4027-95e2-241d8ba48a5f.css │ │ │ ├── 19756027-3b54-495b-8fb0-e90ecf7c9804.css │ │ │ ├── 8362c97a-8169-43f7-8fd4-648988a42cd6.css │ │ │ ├── 8c4f4590-8fd9-47df-9eeb-44b6de705540.css │ │ │ ├── 8c7c1b77-0482-4c53-aceb-74034a606ccb.css │ │ │ ├── 8d602d60-7489-4b5c-887c-a0f7253dc1f9.css │ │ │ ├── 9175431d-bce9-47f7-a47f-bd21f422f7d8.css │ │ │ ├── a65941d0-050f-4229-8858-6f70fcf58d64.css │ │ │ ├── a931e2b1-0499-4018-9b7c-9783cb128877.css │ │ │ ├── b69f964f-d619-4693-834c-0d460b4b9541.css │ │ │ ├── bb9eb4f2-6c3f-492e-ab7a-f59aaa36bd14.css │ │ │ ├── bcc338ee-032e-4ebd-88d3-957f4afa0d38.css │ │ │ ├── bd3388f8-0a26-47e3-8555-ed38d82c249b.css │ │ │ ├── c04d10a0-144c-4427-a9cf-1370bd6dc2a4.css │ │ │ ├── c106f27c-09e6-4625-83c1-f2c67a7c6c77.css │ │ │ ├── ccec5d27-8b4c-41c7-b958-af9c8cb3d2c4.css │ │ │ ├── d1ac08c8-911a-49f0-b449-a0db15a891e0.css │ │ │ ├── da93a762-645c-4b1b-b5c8-7b9a52e7cf60.css │ │ │ ├── dbcbc2d2-8aad-4171-b781-b5b0ec45328d.css │ │ │ ├── e76010e4-b5fe-45ca-8d37-ffd5a7333fc4.css │ │ │ ├── ebd780a6-332a-4578-bc1c-d918cc931266.css │ │ │ ├── ec6153ca-631d-46a9-b38f-aa3cd02dd337.css │ │ │ ├── f59a3ba8-b6af-4651-a79f-ccf78ee5361e.css │ │ │ ├── febc2579-5795-47f7-bae1-dff0ae7e78b6.css │ │ │ └── ff238fd2-7ec9-464b-88a8-9567c127abfe.css │ │ └── user_avatars │ │ │ ├── 2370617f3f4f4fe196d6c219aee8f860.png │ │ │ ├── 27216f0d01b9428a8b792248dbcb2b0b.png │ │ │ ├── 2ed91d11b68a4b169dd8d5db4d54fa4d.png │ │ │ ├── 94cb2f8bd9964e4c99a50554b5c43e17.png │ │ │ ├── b6faa9128e1442b5ac4d4840584181da.jpg │ │ │ ├── dc2e7c58db304ac39729267df3aca1bf.jpg │ │ │ ├── e403f591b7594194b619ec29356019f9.png │ │ │ └── ff34698873474739a7ae4e40f02b1d30.jpeg │ ├── fonts │ │ └── simfang.ttf │ ├── intelli │ │ ├── chat │ │ │ ├── __init__.py │ │ │ ├── chatbot.py │ │ │ └── gpt_webcall │ │ │ │ ├── __init__.py │ │ │ │ ├── _token_manager.py │ │ │ │ ├── fuyu.py │ │ │ │ ├── yichat_multi_round.py │ │ │ │ ├── yichat_single_round.py │ │ │ │ └── yichat_stream.py │ │ ├── keyword │ │ │ └── keyword.py │ │ ├── mind │ │ │ └── mind.py │ │ ├── ocr │ │ │ ├── __init__.py │ │ │ ├── ocr_bot.py │ │ │ ├── readme.md │ │ │ └── test_base64_img_sample.py │ │ ├── pictures │ │ │ └── picture_bot.py │ │ ├── resume │ │ │ └── resume_bot.py │ │ ├── speech │ │ │ ├── speech_bot.py │ │ │ └── test.py │ │ ├── style │ │ │ ├── extract.py │ │ │ └── test.docx │ │ └── test │ │ │ └── test_chat.py │ ├── manage.py │ ├── requirements.txt │ ├── res.jpg │ └── start_dahpne.py ├── README.md ├── docker-compose.yml ├── dockerfile ├── 设计文档 - 副本.md └── 设计文档.md └── frontend ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc ├── README.md ├── babel.config.js ├── element-tiptap-vue3-niyuta-0.0.1.tgz ├── index.html ├── package-lock.json ├── package.json ├── pnpm-lock.yaml ├── public ├── favicon.ico ├── img │ └── icons │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── android-chrome-maskable-192x192.png │ │ ├── android-chrome-maskable-512x512.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── msapplication-icon-144x144.png │ │ ├── mstile-150x150.png │ │ └── safari-pinned-tab.svg ├── index.html └── robots.txt ├── src-tauri ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── build.rs ├── icons │ ├── 128x128.png │ ├── 128x128@2x.png │ ├── 32x32.png │ ├── Square107x107Logo.png │ ├── Square142x142Logo.png │ ├── Square150x150Logo.png │ ├── Square284x284Logo.png │ ├── Square30x30Logo.png │ ├── Square310x310Logo.png │ ├── Square44x44Logo.png │ ├── Square71x71Logo.png │ ├── Square89x89Logo.png │ ├── StoreLogo.png │ ├── icon.icns │ ├── icon.ico │ └── icon.png ├── src │ └── main.rs └── tauri.conf.json ├── src ├── App.vue ├── api │ └── index.ts ├── assets │ ├── Global │ │ └── avatar.jpg │ ├── Login&Register │ │ └── background.png │ ├── ai.png │ ├── copy-icon.png │ ├── images │ │ ├── avatar.png │ │ ├── card.png │ │ ├── chat-icon.png │ │ └── teamAvatar.png │ ├── logo.png │ ├── logo2.png │ └── yunxiao.png ├── components │ ├── AI │ │ ├── AiImage.vue │ │ ├── AiWriter.vue │ │ ├── ChatButton.vue │ │ ├── ChatComponent.vue │ │ ├── TextBlock.vue │ │ └── VoiceRecognition.vue │ ├── ChatCenter │ │ ├── ChatDetail.vue │ │ ├── ChatList.vue │ │ └── UserMessage.vue │ ├── Editor │ │ ├── AiContextMenu.vue │ │ ├── Dialog.vue │ │ ├── Editor.vue │ │ ├── EditorMenu.vue │ │ ├── MenuItem.vue │ │ ├── Outline.vue │ │ └── VersionControl.vue │ ├── Editor2 │ │ ├── AllExtensionsEditor.vue │ │ ├── Editor.vue │ │ ├── SimpleEditor.vue │ │ └── TestEditor.vue │ ├── GlobalComponents │ │ ├── AntSidebar.vue │ │ ├── DocLogList.vue │ │ ├── GlobalHeader.vue │ │ ├── GlobalMessage.vue │ │ └── GlobalSidebar.vue │ ├── Home │ │ ├── CollectList.vue │ │ ├── Information.vue │ │ ├── MainPage.vue │ │ └── PictureList.vue │ ├── SlashMenu │ │ ├── CommandsList.vue │ │ ├── Icon.vue │ │ ├── slash.ts │ │ └── suggestion.ts │ ├── Staging │ │ ├── StagingChart.vue │ │ ├── StagingCollectList.vue │ │ ├── StagingNavi.vue │ │ └── WordCloud.vue │ ├── Team │ │ └── MessageList.vue │ └── registerGlobComp.ts ├── extensions │ ├── AiImage.ts │ ├── AiWriter.ts │ ├── BlockEquation.ts │ ├── BlockQuote.ts │ ├── CustomImage.ts │ ├── InlineEquation.ts │ ├── Table.ts │ ├── TextBlock.ts │ └── voiceRecognition.ts ├── main.ts ├── registerServiceWorker.ts ├── router │ └── index.ts ├── shims-vue.d.ts ├── store │ ├── edit.ts │ ├── editorUpdate.ts │ ├── index.ts │ └── profile.ts ├── styles │ └── style.css ├── utils │ ├── UtilMethod.ts │ └── env.ts └── views │ ├── ChatCenter.vue │ ├── Company │ ├── CreateCompany.vue │ └── SwitchCompany.vue │ ├── CompanyDocuments │ └── CompanyDocumentCardsList.vue │ ├── DocTemplate │ └── DocTemplate.vue │ ├── Editor │ └── Editor.vue │ ├── Home │ ├── Home.vue │ └── Modify.vue │ ├── Login&Register │ └── LoginRegister.vue │ ├── MainPage.vue │ ├── Panel │ └── MainStaging.vue │ ├── PersonalDocuments │ └── DocumentCardsList.vue │ └── Team │ ├── CompanyDocumentsList.vue │ ├── TeamCreate.vue │ ├── TeamDoc.vue │ └── TeamManage.vue ├── tsconfig.json ├── vite.config.js └── vue.config.js /Edivator-PPT.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/Edivator-PPT.pptx -------------------------------------------------------------------------------- /Edivator-创新点.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/Edivator-创新点.docx -------------------------------------------------------------------------------- /Edivator-功能架构设计说明书.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/Edivator-功能架构设计说明书.docx -------------------------------------------------------------------------------- /Edivator-技术流程文档.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/Edivator-技术流程文档.docx -------------------------------------------------------------------------------- /Edivator-接口设计文档.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/Edivator-接口设计文档.pdf -------------------------------------------------------------------------------- /Edivator-用户手册.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/Edivator-用户手册.docx -------------------------------------------------------------------------------- /Edivator-类图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/Edivator-类图.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Edivator 2 | 2024年中国软件杯大赛作品,大小模型协同的在线智能编辑器,获全国二等奖。 3 | 4 | 前端使用vue框架,后端使用Django框架,具体代码见相应文件夹。 5 | -------------------------------------------------------------------------------- /backend/Edivator/Edivator/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/Edivator/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/Edivator/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for backend project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from . import routing 13 | from django.core.asgi import get_asgi_application 14 | from channels.routing import ProtocolTypeRouter, URLRouter 15 | 16 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') 17 | 18 | # application = get_asgi_application() 19 | application = ProtocolTypeRouter({ 20 | 'http': get_asgi_application(), 21 | 'websocket': URLRouter(routing.websocket_urlpatterns) 22 | }) 23 | 24 | -------------------------------------------------------------------------------- /backend/Edivator/Edivator/routing.py: -------------------------------------------------------------------------------- 1 | from channels.routing import URLRouter 2 | from django.urls import re_path, path 3 | 4 | from apps.chat.consumers import ChatConsumer 5 | 6 | websocket_urlpatterns = [ 7 | path('ws/chat//', ChatConsumer.as_asgi()), 8 | ] -------------------------------------------------------------------------------- /backend/Edivator/Edivator/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for Edivator project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.urls import path, include, re_path 18 | from common.views import FileView 19 | 20 | # from apps.files.views import AvatarGetView 21 | 22 | urlpatterns = [ 23 | # path("admin/", admin.site.urls), 24 | path('users/', include('apps.users.urls')), # 用户 25 | path('companies/', include('apps.companies.urls')), # 企业 26 | path('invitations/', include('apps.invitations.urls')), # 邀请码 27 | path('teams/', include('apps.teams.urls')), # 团队 28 | path('documents/', include('apps.documents.urls')), # 文档 29 | path('ai/', include('apps.ai.urls')), # AI功能 30 | re_path(r'^files/(?P.*)$', FileView.as_view(), name='serve-file'), # 获取静态文件 31 | path('api/users/', include('apps.users.urls')), # 用户 32 | path('api/companies/', include('apps.companies.urls')), # 企业 33 | path('api/invitations/', include('apps.invitations.urls')), # 邀请码 34 | path('api/teams/', include('apps.teams.urls')), # 团队 35 | path('api/documents/', include('apps.documents.urls')), # 文档 36 | path('api/ai/', include('apps.ai.urls')), # AI功能 37 | path('api/messages/', include('apps.chat.urls')), 38 | re_path(r'^files/(?P.*)$', FileView.as_view(), 39 | name='serve-file'), # 获取静态文件 40 | re_path(r'api/^files/(?P.*)$', FileView.as_view(), 41 | name='serve-file'), # 获取静态文件 42 | re_path(r'^api/files/(?P.*)$', FileView.as_view(), 43 | name='serve-file'), # 获取静态文件 44 | ] 45 | -------------------------------------------------------------------------------- /backend/Edivator/Edivator/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for Edivator project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Edivator.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /backend/Edivator/apps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/ai/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AiConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'apps.ai' 7 | -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-15 07:04 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name="Dialog", 15 | fields=[ 16 | ( 17 | "id", 18 | models.BigAutoField( 19 | auto_created=True, 20 | primary_key=True, 21 | serialize=False, 22 | verbose_name="ID", 23 | ), 24 | ), 25 | ( 26 | "create_time", 27 | models.DateTimeField(auto_now_add=True, verbose_name="创建时间"), 28 | ), 29 | ( 30 | "update_time", 31 | models.DateTimeField(auto_now=True, verbose_name="更新时间"), 32 | ), 33 | ("is_delete", models.BooleanField(default=False, verbose_name="删除标记")), 34 | ("text", models.TextField()), 35 | ( 36 | "sender", 37 | models.CharField( 38 | choices=[("bot", "Bot"), ("user", "User")], max_length=10 39 | ), 40 | ), 41 | ], 42 | options={ 43 | "verbose_name": "对话记录", 44 | "verbose_name_plural": "对话记录列表", 45 | "db_table": "dialog", 46 | }, 47 | ), 48 | ] 49 | -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/migrations/0002_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-15 07:04 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ("ai", "0001_initial"), 15 | ] 16 | 17 | operations = [ 18 | migrations.AddField( 19 | model_name="dialog", 20 | name="user", 21 | field=models.ForeignKey( 22 | on_delete=django.db.models.deletion.CASCADE, 23 | related_name="dialogs", 24 | to=settings.AUTH_USER_MODEL, 25 | ), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/ai/migrations/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | from apps.users.models import User 4 | from common.db import BaseModel 5 | 6 | 7 | # Create your models here. 8 | 9 | 10 | class Dialog(BaseModel): 11 | TYPE_CHOICES = ( 12 | ('bot', 'Bot'), 13 | ('user', 'User'), 14 | ) 15 | user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='dialogs') 16 | text = models.TextField() 17 | sender = models.CharField(max_length=10, choices=TYPE_CHOICES) 18 | 19 | class Meta: 20 | db_table = 'dialog' 21 | verbose_name = '对话记录' 22 | verbose_name_plural = '对话记录列表' 23 | 24 | -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | 3 | from apps.ai.models import Dialog 4 | 5 | 6 | class DialogSerializer(serializers.ModelSerializer): 7 | class Meta: 8 | model = Dialog 9 | fields = '__all__' 10 | -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/ai/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for Edivator project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.urls import path 18 | from .views import AiChatViewSet, OcrViewSet, DialogViewSet, WordStylesView, PictureViewSet, SpeechViewSet 19 | 20 | urlpatterns = [ 21 | path('chat/summarize/', AiChatViewSet.as_view({'post': 'summarize'})), 22 | path('chat/translate/', AiChatViewSet.as_view({'post': 'translate'})), 23 | path('chat/polish/', AiChatViewSet.as_view({'post': 'polish'})), 24 | path('chat/continue_write/', 25 | AiChatViewSet.as_view({'post': 'continue_write'})), 26 | path('chat/common_chat/', AiChatViewSet.as_view({'post': 'common_chat'})), 27 | path('chat/form/', AiChatViewSet.as_view({'post': 'form'})), 28 | # 文字识别 29 | path('ocr/infer/', OcrViewSet.as_view({'post': 'ocr_pic'})), 30 | # 模式识别 31 | path('ocr/pattern/', OcrViewSet.as_view({'post': 'ocr_pattern'})), 32 | 33 | path('correct/', AiChatViewSet.as_view({'post': 'correct'})), 34 | 35 | path('chat/styled_ggenerate/', AiChatViewSet.as_view({'post': 'styled_generate'})), 36 | 37 | # 生成图片 38 | path('pictures/generate/', PictureViewSet.as_view({'post': 'generate'})), 39 | # 获取图片 40 | path('pictures/get_img/', PictureViewSet.as_view({'post': 'query'})), 41 | 42 | # 增加对话记录 43 | path('dialogs/create/', DialogViewSet.as_view({'post': 'create'})), 44 | 45 | # 查询用户的历史聊天记录 46 | path('dialogs/query/', DialogViewSet.as_view({'get': 'list'})), 47 | # 提取样式 48 | path('extract_style/', WordStylesView.as_view()), 49 | 50 | # 语音提取 51 | path('speeches/recognize/', SpeechViewSet.as_view({'post': 'recognize'})), 52 | 53 | # 生成思维导图 54 | path('gen_mind/', AiChatViewSet.as_view({'post': 'gen_mind'})), 55 | ] 56 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/chat/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ChatConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "apps.chat" 7 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/consumers.py: -------------------------------------------------------------------------------- 1 | import base64 2 | import json 3 | import time 4 | 5 | from asgiref.sync import async_to_sync 6 | from channels.generic.websocket import WebsocketConsumer 7 | from django.contrib.auth import get_user_model 8 | from django.core.files.base import ContentFile 9 | 10 | from .models import ChatMessage 11 | from ..teams.models import Team 12 | 13 | User = get_user_model() 14 | 15 | 16 | class ChatConsumer(WebsocketConsumer): 17 | def connect(self): 18 | print(self.scope['url_route']['kwargs']) 19 | self.team_id = self.scope['url_route']['kwargs']['team_id'] 20 | self.user_id = self.scope['query_string'].decode().split('=')[1] 21 | 22 | self.group_name = f'chat_{self.team_id}' 23 | 24 | async_to_sync(self.channel_layer.group_add)( 25 | self.group_name, 26 | self.channel_name 27 | ) 28 | 29 | self.accept() 30 | 31 | def disconnect(self, close_code): 32 | async_to_sync(self.channel_layer.group_discard)( 33 | self.group_name, 34 | self.channel_name 35 | ) 36 | 37 | def receive(self, text_data): 38 | data = json.loads(text_data) 39 | 40 | # 调试输出 41 | print(f"Received message from user_id: {self.user_id} in group_id: {self.team_id}") 42 | 43 | try: 44 | sender = User.objects.get(id=self.user_id) 45 | except User.DoesNotExist: 46 | print(f"User with id {self.user_id} does not exist") 47 | return 48 | 49 | team = Team.objects.get(id=self.team_id) 50 | 51 | image_data = data.get('image') 52 | image = None 53 | 54 | if image_data: 55 | format, imgstr = image_data.split(';base64,') 56 | ext = format.split('/')[-1] 57 | image = ContentFile(base64.b64decode(imgstr), name=f'{sender.username}_{time.time()}.{ext}') 58 | 59 | message = ChatMessage.objects.create( 60 | sender=sender, 61 | team=team, 62 | text=data.get('text'), 63 | image=image 64 | ) 65 | 66 | response = { 67 | 'id': message.id, 68 | 'sender': { 69 | 'username': message.sender.username, 70 | 'id': message.sender.id 71 | }, 72 | 'team': message.team.id, 73 | 'text': message.text, 74 | 'image': message.image.url if message.image else None, 75 | 'created_at': message.created_at.strftime("%Y-%m-%d %H:%M:%S") 76 | } 77 | 78 | async_to_sync(self.channel_layer.group_send)( 79 | self.group_name, 80 | { 81 | 'type': 'chat_message', 82 | 'message': json.dumps(response) 83 | } 84 | ) 85 | 86 | def chat_message(self, event): 87 | message = event['message'] 88 | self.send(text_data=message) 89 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-08-17 06:20 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ] 10 | 11 | operations = [ 12 | ] 13 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/migrations/0002_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-08-17 06:20 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ('teams', '0002_initial'), 14 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 15 | ('chat', '0001_initial'), 16 | ] 17 | 18 | operations = [ 19 | migrations.CreateModel( 20 | name='ChatMessage', 21 | fields=[ 22 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 23 | ('text', models.TextField(blank=True, null=True)), 24 | ('image', models.ImageField(blank=True, null=True, upload_to='messages')), 25 | ('created_at', models.DateTimeField(auto_now_add=True)), 26 | ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chat_messages', to=settings.AUTH_USER_MODEL)), 27 | ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chat_messages', to='teams.team')), 28 | ], 29 | options={ 30 | 'db_table': 'chat_messages', 31 | 'ordering': ('created_at',), 32 | }, 33 | ), 34 | ] 35 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/chat/migrations/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | from apps.teams.models import Team 4 | from apps.users.models import User 5 | 6 | 7 | # Create your models here. 8 | 9 | class ChatMessage(models.Model): 10 | sender = models.ForeignKey(User, on_delete=models.CASCADE, related_name='chat_messages', db_index=True) 11 | team = models.ForeignKey(Team, on_delete=models.CASCADE, related_name='chat_messages', db_index=True) 12 | text = models.TextField(null=True, blank=True) 13 | image = models.ImageField(upload_to='messages', null=True, blank=True) 14 | created_at = models.DateTimeField(auto_now_add=True) 15 | 16 | class Meta: 17 | db_table = 'chat_messages' 18 | ordering = ('created_at',) 19 | 20 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/serializers.py: -------------------------------------------------------------------------------- 1 | from apps.chat.models import ChatMessage 2 | from rest_framework import serializers 3 | 4 | from apps.users.serializer import UserSerializer 5 | 6 | 7 | class ChatMessageSerializer(serializers.ModelSerializer): 8 | sender = UserSerializer(read_only=True) 9 | 10 | class Meta: 11 | model = ChatMessage 12 | fields = '__all__' 13 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.static import static 2 | from django.contrib import admin 3 | from django.urls import path, include 4 | 5 | from apps import ai 6 | from apps.chat.views import ChatMessageViewSet 7 | 8 | 9 | urlpatterns = [ 10 | path('query/', ChatMessageViewSet.as_view({'get': 'query'})), 11 | ] 12 | -------------------------------------------------------------------------------- /backend/Edivator/apps/chat/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from rest_framework import viewsets, status 3 | from rest_framework.response import Response 4 | 5 | from apps.chat.models import ChatMessage 6 | from apps.chat.serializers import ChatMessageSerializer 7 | from apps.teams.models import Team 8 | 9 | 10 | # Create your views here. 11 | 12 | 13 | class ChatMessageViewSet(viewsets.ModelViewSet): 14 | queryset = ChatMessage.objects.all() 15 | serializer_class = ChatMessageSerializer 16 | 17 | def query(self, request, *args, **kwargs): 18 | group_id = request.query_params.get('group_id', None) 19 | if group_id is None: 20 | return Response({'error': '缺少group_id参数'}, status=status.HTTP_400_BAD_REQUEST) 21 | 22 | group = Team.objects.filter(id=group_id).first() 23 | if not group: 24 | return Response({'error': '没有该群组'}, status=status.HTTP_400_BAD_REQUEST) 25 | 26 | messages = ChatMessage.objects.filter(team=group) 27 | serializer = ChatMessageSerializer(messages, many=True) 28 | return Response(serializer.data) 29 | -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/companies/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CompaniesConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "apps.companies" 7 | 8 | -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-15 07:04 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name="Company", 15 | fields=[ 16 | ( 17 | "id", 18 | models.BigAutoField( 19 | auto_created=True, 20 | primary_key=True, 21 | serialize=False, 22 | verbose_name="ID", 23 | ), 24 | ), 25 | ( 26 | "create_time", 27 | models.DateTimeField(auto_now_add=True, verbose_name="创建时间"), 28 | ), 29 | ( 30 | "update_time", 31 | models.DateTimeField(auto_now=True, verbose_name="更新时间"), 32 | ), 33 | ("is_delete", models.BooleanField(default=False, verbose_name="删除标记")), 34 | ( 35 | "name", 36 | models.CharField(max_length=255, unique=True, verbose_name="企业名称"), 37 | ), 38 | ("description", models.TextField(verbose_name="企业描述")), 39 | ], 40 | options={ 41 | "verbose_name": "企业", 42 | "verbose_name_plural": "公司列表", 43 | "db_table": "companies", 44 | }, 45 | ), 46 | ] 47 | -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/migrations/0002_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-15 07:04 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ("companies", "0001_initial"), 15 | ] 16 | 17 | operations = [ 18 | migrations.AddField( 19 | model_name="company", 20 | name="admin", 21 | field=models.ForeignKey( 22 | on_delete=django.db.models.deletion.CASCADE, 23 | related_name="owner_companies", 24 | to=settings.AUTH_USER_MODEL, 25 | verbose_name="企业创建者", 26 | ), 27 | ), 28 | migrations.AddField( 29 | model_name="company", 30 | name="administrators", 31 | field=models.ManyToManyField( 32 | blank=True, 33 | related_name="admin_teams", 34 | to=settings.AUTH_USER_MODEL, 35 | verbose_name="团队管理员", 36 | ), 37 | ), 38 | migrations.AddField( 39 | model_name="company", 40 | name="users", 41 | field=models.ManyToManyField( 42 | blank=True, 43 | related_name="affiliated_companies", 44 | to=settings.AUTH_USER_MODEL, 45 | verbose_name="企业人员", 46 | ), 47 | ), 48 | ] 49 | -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/companies/migrations/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.utils import timezone 3 | 4 | from apps.users.models import User 5 | from common.db import BaseModel 6 | 7 | 8 | # Create your models here. 9 | 10 | class Company(BaseModel): 11 | """企业表""" 12 | name = models.CharField(max_length=255, unique=True, verbose_name='企业名称') 13 | admin = models.ForeignKey(User, on_delete=models.CASCADE, related_name='owner_companies', verbose_name='企业创建者') 14 | description = models.TextField(verbose_name='企业描述') 15 | users = models.ManyToManyField(User, related_name='affiliated_companies', verbose_name='企业人员', blank=True) 16 | administrators = models.ManyToManyField(User, related_name='admin_teams', verbose_name='团队管理员', blank=True) 17 | class Meta: 18 | db_table = 'companies' 19 | verbose_name = '企业' 20 | verbose_name_plural = '公司列表' 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from .models import Company 3 | 4 | 5 | class CompanySerializer(serializers.ModelSerializer): 6 | """企业序列化容器""" 7 | class Meta: 8 | model = Company 9 | fields = '__all__' 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/companies/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for Edivator project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.urls import path 18 | 19 | from apps.companies.views import CompaniesViewSet 20 | 21 | urlpatterns = [ 22 | # 创建企业 23 | path('create/', CompaniesViewSet.as_view({'post': 'create'})), 24 | # 添加管理员 25 | path('appoint_admin/', CompaniesViewSet.as_view({'post': 'appoint_administrator'})), 26 | # 查询企业创建者 27 | path('query_admin//', CompaniesViewSet.as_view({'get': 'get_admin'})), 28 | # 查询企业的管理员 29 | path('query_administrators//', CompaniesViewSet.as_view({'get': 'get_administrators'})), 30 | # 获取企业的所有团队 31 | path('query_teams//', CompaniesViewSet.as_view({'get': 'get_teams'})), 32 | # 获取企业中的用户 33 | path('query_users//', CompaniesViewSet.as_view({'get': 'get_users'})), 34 | # 获取企业信息 35 | path('query_detail//', CompaniesViewSet.as_view({'get': 'get_detail'})), 36 | # 删除企业 37 | path('delete//', CompaniesViewSet.as_view({'delete': 'destroy'})), 38 | 39 | 40 | path('query_teams_short//', CompaniesViewSet.as_view({'get': 'get_teams_short'})), 41 | ] 42 | -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/documents/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DocumentsConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "apps.documents" 7 | -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/migrations/0003_alter_template_content.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-17 06:39 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("documents", "0002_initial"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="template", 15 | name="content", 16 | field=models.FileField(blank=True, null=True, upload_to="templates/"), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/migrations/0004_keyword_document_keywords.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-17 07:53 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("documents", "0003_alter_template_content"), 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name="Keyword", 15 | fields=[ 16 | ( 17 | "id", 18 | models.BigAutoField( 19 | auto_created=True, 20 | primary_key=True, 21 | serialize=False, 22 | verbose_name="ID", 23 | ), 24 | ), 25 | ("name", models.CharField(max_length=100)), 26 | ], 27 | options={ 28 | "db_table": "keywords", 29 | }, 30 | ), 31 | migrations.AddField( 32 | model_name="document", 33 | name="keywords", 34 | field=models.ManyToManyField( 35 | related_name="documents", to="documents.keyword" 36 | ), 37 | ), 38 | ] 39 | -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/migrations/0005_alter_keyword_name.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-17 08:23 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("documents", "0004_keyword_document_keywords"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name="keyword", 15 | name="name", 16 | field=models.CharField(db_index=True, max_length=100, verbose_name="关键词"), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/migrations/0006_template_avatar.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-17 10:59 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ("documents", "0005_alter_keyword_name"), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name="template", 15 | name="avatar", 16 | field=models.ImageField( 17 | blank=True, null=True, upload_to="template_avatars/" 18 | ), 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/documents/migrations/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/documents/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for Edivator project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | from django.urls import path 18 | 19 | from apps.documents import views 20 | 21 | urlpatterns = [ 22 | # 创建模板 23 | path('templates/create/', views.TemplateViewSet.as_view({'post':'create'})), 24 | # 查询公共模板 25 | path('templates/query_public/', views.TemplateViewSet.as_view({'get':'query_public'})), 26 | # 查询私有模板 27 | path('templates/query_private/', views.TemplateViewSet.as_view({'get':'query_private'})), 28 | # 删除模板 29 | path('templates/delete//', views.TemplateViewSet.as_view({'delete': 'destroy'})), 30 | # 更新文档图片 31 | path('templates/update//', views.TemplateViewSet.as_view({'put': 'update'})), 32 | # 创建文档 33 | path('create/', views.DocumentView.as_view()), 34 | # 更新文档 35 | path('update//', views.DocumentView.as_view()), 36 | # 删除文档 37 | path('delete//', views.DocumentView.as_view()), 38 | # 创建版本 39 | path('versions/create/', views.DocVersionView.as_view()), 40 | # 更新版本的内容 41 | path('versions/update//', views.DocVersionView.as_view()), 42 | # 删除版本 43 | path('versions/delete//', views.DocVersionView.as_view()), 44 | # 上传文档中的文件 45 | path('inner_files/create/', views.InnerFileCreateView.as_view()), 46 | # 查询文档 47 | path('query_doc/', views.DocumentView.as_view()), 48 | #查询单个文档 49 | path('query_single_doc//', views.DocumentViewSet.as_view({'get':'query'})), 50 | # 查询文档版本 51 | path('query_version/', views.DocVersionView.as_view()), 52 | # 查询文档日志 53 | path('query_logs/', views.DocLogView.as_view()), 54 | # 收藏文档 55 | path('collects/do/', views.DocumentCollectView.as_view()), 56 | # 获取所有的收藏文档 57 | path('collects/query/', views.DocumentCollectView.as_view()), 58 | # 更新文档关键词 59 | path('update_keywords//', views.DocumentViewSet.as_view({'put': 'update_keywords'})), 60 | # 根据关键词搜索 61 | path('search_by_keyword/', views.DocumentViewSet.as_view({'get': 'search'})), 62 | ] 63 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/invitations/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class InvitationsConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "apps.invitations" 7 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-15 07:04 2 | 3 | from django.db import migrations, models 4 | import django.db.models.deletion 5 | import django.utils.timezone 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ("companies", "0001_initial"), 14 | ] 15 | 16 | operations = [ 17 | migrations.CreateModel( 18 | name="Invitation", 19 | fields=[ 20 | ( 21 | "id", 22 | models.BigAutoField( 23 | auto_created=True, 24 | primary_key=True, 25 | serialize=False, 26 | verbose_name="ID", 27 | ), 28 | ), 29 | ( 30 | "token", 31 | models.CharField(max_length=255, unique=True, verbose_name="邀请码"), 32 | ), 33 | ( 34 | "created_at", 35 | models.DateTimeField( 36 | default=django.utils.timezone.now, verbose_name="创建时间" 37 | ), 38 | ), 39 | ("expires_at", models.DateTimeField(verbose_name="过期时间")), 40 | ( 41 | "is_accepted", 42 | models.BooleanField(default=False, verbose_name="是否已接受"), 43 | ), 44 | ( 45 | "company", 46 | models.ForeignKey( 47 | on_delete=django.db.models.deletion.CASCADE, 48 | related_name="invitations", 49 | to="companies.company", 50 | verbose_name="企业", 51 | ), 52 | ), 53 | ], 54 | options={ 55 | "verbose_name": "邀请码", 56 | "verbose_name_plural": "邀请码列表", 57 | "db_table": "invitations", 58 | }, 59 | ), 60 | ] 61 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/migrations/0002_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-15 07:04 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ("invitations", "0001_initial"), 15 | ] 16 | 17 | operations = [ 18 | migrations.AddField( 19 | model_name="invitation", 20 | name="user_id", 21 | field=models.ForeignKey( 22 | on_delete=django.db.models.deletion.CASCADE, 23 | related_name="invitings", 24 | to=settings.AUTH_USER_MODEL, 25 | verbose_name="被邀请", 26 | ), 27 | ), 28 | ] 29 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/invitations/migrations/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.utils import timezone 3 | import hashlib 4 | import secrets 5 | 6 | from apps.companies.models import Company 7 | from apps.users.models import User 8 | 9 | 10 | # Create your models here. 11 | 12 | class Invitation(models.Model): 13 | """邀请码模型""" 14 | company = models.ForeignKey(Company, on_delete=models.CASCADE, related_name='invitations', verbose_name='企业') 15 | user_id = models.ForeignKey(User, on_delete=models.CASCADE, related_name='invitings', verbose_name='被邀请') 16 | token = models.CharField(max_length=255, unique=True, verbose_name='邀请码') 17 | created_at = models.DateTimeField(default=timezone.now, verbose_name='创建时间') 18 | expires_at = models.DateTimeField(verbose_name='过期时间') 19 | is_accepted = models.BooleanField(default=False, verbose_name='是否已接受') 20 | 21 | class Meta: 22 | db_table = 'invitations' 23 | verbose_name = '邀请码' 24 | verbose_name_plural = '邀请码列表' 25 | 26 | def save(self, *args, **kwargs): 27 | # 假设我们在生成邀请码时直接设置一个过期时间 28 | if not self.expires_at: 29 | self.expires_at = timezone.now() + timezone.timedelta(days=7) # 假设邀请码有效期为7天 30 | super().save(*args, **kwargs) 31 | 32 | def generate_token(self): 33 | """生成秘钥""" 34 | salt = secrets.token_hex(16) 35 | hashed = hashlib.sha256((str(self.id) + salt).encode()).hexdigest() 36 | self.token = hashed[:16] # 取前16位作为邀请码 37 | 38 | def __str__(self): 39 | return self.token 40 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | 3 | from apps.companies.models import Company 4 | from apps.invitations.models import Invitation 5 | 6 | 7 | class InvitationSerializer(serializers.ModelSerializer): 8 | company_id = serializers.PrimaryKeyRelatedField( 9 | source='company', 10 | queryset=Company.objects.all(), 11 | write_only=True, 12 | required=True 13 | ) 14 | 15 | class Meta: 16 | model = Invitation 17 | fields = ['company_id', 'user_id', 'token'] 18 | extra_kwargs = { 19 | 'company_id': {'required': True}, 20 | } 21 | 22 | def create(self, validated_data): 23 | company_id = validated_data.pop('company').id 24 | 25 | # 创建Invitation实例,但不设置token和expires_at(这些将在save方法中处理) 26 | invitation = Invitation(**validated_data) 27 | 28 | # 调用generate_token方法来设置token 29 | invitation.generate_token() 30 | 31 | # 查找相应的Company并设置到Invitation上 32 | company = Company.objects.get(pk=company_id) 33 | invitation.company = company 34 | 35 | # 保存Invitation实例,这会触发save方法中的逻辑来设置expires_at 36 | invitation.save() 37 | 38 | return invitation 39 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for Edivator project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | 18 | from django.urls import path 19 | from .views import InvitationViewSet 20 | 21 | 22 | urlpatterns = [ 23 | # 创建邀请码 24 | path('generate/', InvitationViewSet.as_view({'post':'create'})), 25 | ] 26 | -------------------------------------------------------------------------------- /backend/Edivator/apps/invitations/views.py: -------------------------------------------------------------------------------- 1 | from rest_framework import status 2 | from rest_framework.response import Response 3 | from rest_framework.viewsets import ModelViewSet 4 | from rest_framework.permissions import IsAuthenticated 5 | 6 | from apps.companies.models import Company 7 | from apps.users.permissions import UserPermission 8 | 9 | from apps.invitations.models import Invitation 10 | from apps.invitations.serializers import InvitationSerializer 11 | 12 | 13 | # Create your views here. 14 | 15 | 16 | class InvitationViewSet(ModelViewSet): 17 | """验证码模型""" 18 | queryset = Invitation.objects.all() 19 | serializer_class = InvitationSerializer 20 | permission_classes = [IsAuthenticated, UserPermission] 21 | pagination_class = None 22 | 23 | def create(self, request, *args, **kwargs): 24 | company_id = request.data.get('company_id') 25 | user_id = request.data.get('user_id') 26 | if not company_id: 27 | return Response({'error': '提交数据缺失'}, status=status.HTTP_400_BAD_REQUEST) 28 | 29 | # 校验 company_id是否匹配 30 | company = Company.objects.filter(id=company_id).first() 31 | if not company: 32 | return Response({'error': '公司不存在'}, status=status.HTTP_400_BAD_REQUEST) 33 | 34 | serializer = self.get_serializer(data={ 35 | 'company_id': company_id, 36 | 'user_id': user_id, 37 | 'token': '1' 38 | }) 39 | 40 | # 确保数据有效 41 | serializer.is_valid(raise_exception=True) 42 | serializer.save() 43 | headers = self.get_success_headers(serializer.data) 44 | return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers) 45 | -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/teams/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class TeamsConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "apps.teams" 7 | 8 | def ready(self): 9 | import apps.teams.signals 10 | -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/migrations/0002_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.13 on 2024-07-15 07:04 2 | 3 | from django.conf import settings 4 | from django.db import migrations, models 5 | import django.db.models.deletion 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), 14 | ("teams", "0001_initial"), 15 | ] 16 | 17 | operations = [ 18 | migrations.AddField( 19 | model_name="team", 20 | name="users", 21 | field=models.ManyToManyField( 22 | blank=True, 23 | related_name="affiliated_teams", 24 | to=settings.AUTH_USER_MODEL, 25 | verbose_name="团队所属的企业", 26 | ), 27 | ), 28 | migrations.AddField( 29 | model_name="notification", 30 | name="user", 31 | field=models.ForeignKey( 32 | on_delete=django.db.models.deletion.CASCADE, 33 | related_name="notifications", 34 | to=settings.AUTH_USER_MODEL, 35 | ), 36 | ), 37 | migrations.AddField( 38 | model_name="message", 39 | name="applicant", 40 | field=models.ForeignKey( 41 | on_delete=django.db.models.deletion.CASCADE, 42 | related_name="sent_requests", 43 | to=settings.AUTH_USER_MODEL, 44 | verbose_name="申请人", 45 | ), 46 | ), 47 | migrations.AddField( 48 | model_name="message", 49 | name="team", 50 | field=models.ForeignKey( 51 | on_delete=django.db.models.deletion.CASCADE, 52 | related_name="team_requests", 53 | to="teams.team", 54 | verbose_name="申请的团队", 55 | ), 56 | ), 57 | ] 58 | -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/teams/migrations/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | from apps.companies.models import Company 4 | from apps.users.models import User 5 | from common.db import BaseModel 6 | 7 | 8 | # Create your models here. 9 | 10 | 11 | class Team(BaseModel): 12 | name = models.CharField(max_length=100) 13 | company = models.ForeignKey(Company, on_delete=models.CASCADE, related_name='teams', verbose_name='团队名') 14 | users = models.ManyToManyField(User, related_name='affiliated_teams', verbose_name='团队所属的企业', blank=True) 15 | description = models.TextField(verbose_name='团队描述', null=True, blank=True) 16 | avatar = models.ImageField(upload_to='team_avatars', null=True, blank=True, verbose_name='团队头像') 17 | cover = models.ImageField(upload_to='team_covers', null=True, blank=True, verbose_name='团队封面') 18 | 19 | class Meta: 20 | db_table = 'teams' 21 | verbose_name = '团队' 22 | verbose_name_plural = '团队列表' 23 | 24 | 25 | class Message(BaseModel): 26 | STATUS_CHOICES = ( 27 | ('pending', 'Pending'), 28 | ('approved', 'Approved'), 29 | ('rejected', 'Rejected'), 30 | ) 31 | 32 | applicant = models.ForeignKey(User, on_delete=models.CASCADE, related_name='sent_requests', verbose_name='申请人') 33 | team = models.ForeignKey(Team, on_delete=models.CASCADE, related_name='team_requests', verbose_name='申请的团队') 34 | status = models.CharField(max_length=10, choices=STATUS_CHOICES, default='pending', verbose_name='状态') 35 | 36 | class Meta: 37 | db_table = 'messages' 38 | 39 | 40 | class Notification(models.Model): 41 | user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='notifications') 42 | message = models.TextField(verbose_name='通知内容') 43 | is_read = models.BooleanField(default=False, verbose_name='是否已读') 44 | created_at = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') 45 | 46 | class Meta: 47 | db_table = 'notifications' 48 | -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/serializer.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | 3 | from apps.companies.models import Company 4 | from apps.teams.models import Team, Message, Notification 5 | 6 | 7 | class TeamSerializer(serializers.ModelSerializer): 8 | company_id = serializers.PrimaryKeyRelatedField( 9 | source='company', 10 | queryset=Company.objects.all(), 11 | write_only=True, 12 | required=True 13 | ) 14 | 15 | class Meta: 16 | model = Team 17 | fields = ['name', 'description', 'avatar', 'cover', 'company_id', 'id'] 18 | extra_kwargs = { 19 | 'company_id': {'required': True}, 20 | } 21 | 22 | 23 | class MessageSerializer(serializers.ModelSerializer): 24 | class Meta: 25 | model = Message 26 | fields = '__all__' 27 | 28 | 29 | class NotificationSerializer(serializers.ModelSerializer): 30 | class Meta: 31 | model = Notification 32 | fields = '__all__' 33 | -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/signals.py: -------------------------------------------------------------------------------- 1 | from django.db.models.signals import post_save 2 | from django.dispatch import receiver 3 | from .models import Message, Notification 4 | 5 | @receiver(post_save, sender=Message) 6 | def create_notification(sender, instance, **kwargs): 7 | if instance.status in ['approved', 'rejected']: 8 | message = f'Your request to join the team {instance.team.name} has been {instance.status}.' 9 | Notification.objects.create(user=instance.applicant, message=message) 10 | -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/teams/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for Edivator project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | 18 | from django.urls import path 19 | from .views import TeamViewSet, MessageViewSet, NotificationViewSet 20 | 21 | urlpatterns = [ 22 | # 创建团队 23 | path('create/', TeamViewSet.as_view({'post': 'create'})), 24 | # 拉人进团队 25 | path('add_user/', TeamViewSet.as_view({'post': 'add_user'})), 26 | # 查询团队用户 27 | path('query_users//', TeamViewSet.as_view({'get': 'get_users'})), 28 | # 查询团队信息 29 | path('query_detail//', TeamViewSet.as_view({'get': 'get_detail'})), 30 | # 查询某个用户所在的企业里所在的所有团队 31 | path('query_belonged_teams/', TeamViewSet.as_view({'get': 'get_user_company_teams'})), 32 | # 退出团队 33 | path('exit//', TeamViewSet.as_view({'post': 'exit'})), 34 | 35 | # 申请加入团队 36 | path('messages/applicate/', MessageViewSet.as_view({'post': 'create'})), 37 | # 批准进入团队 38 | path('messages/approve//', MessageViewSet.as_view({'post': 'approve'})), 39 | # 拒绝进入团队 40 | path('messages/reject//', MessageViewSet.as_view({'post': 'reject'})), 41 | # 获取自己所有的请求列表 42 | path('messages/query_mine/', MessageViewSet.as_view({'get': 'my_requests'})), 43 | # 获取当前企业里处理pending状态的消息 44 | path('messages/query_pendings/', MessageViewSet.as_view({'get': 'pending_requests'})), 45 | # 获取通知 46 | path('notifications/', NotificationViewSet.as_view({'get': 'list'}), name='notification-list'), 47 | # 标记通知为已读 48 | path('notifications/mark-as-read/', NotificationViewSet.as_view({'post': 'mark_as_read'}), name='notification-mark-as-read'), 49 | 50 | # 删除团队 51 | path('delete//', TeamViewSet.as_view({'delete': 'destroy'})) 52 | ] 53 | -------------------------------------------------------------------------------- /backend/Edivator/apps/users/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/users/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/users/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/users/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class UsersConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "apps.users" 7 | -------------------------------------------------------------------------------- /backend/Edivator/apps/users/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/apps/users/migrations/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/apps/users/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from common.db import BaseModel 3 | from django.contrib.auth.models import AbstractUser 4 | 5 | # Create your models here. 6 | 7 | 8 | class User(AbstractUser, BaseModel): 9 | """用户模型""" 10 | mobile = models.CharField(max_length=11, unique=True, null=True, blank=True, verbose_name='手机号') 11 | avatar = models.ImageField(upload_to='user_avatars', null=True, blank=True, verbose_name='用户头像') 12 | point = models.IntegerField(default=100, null=True, blank=True) 13 | 14 | class Meta: 15 | db_table = 'users' 16 | verbose_name = '用户表' 17 | 18 | -------------------------------------------------------------------------------- /backend/Edivator/apps/users/permissions.py: -------------------------------------------------------------------------------- 1 | from rest_framework import permissions 2 | from rest_framework.exceptions import PermissionDenied 3 | 4 | from apps.users.models import User 5 | 6 | 7 | class UserPermission(permissions.BasePermission): 8 | """用户权限""" 9 | def has_object_permission(self, request, view, obj): 10 | # 判断是否为管理员账号 11 | if request.user.is_superuser: 12 | return True 13 | # 如果不是管理员,判断操作对象和登录对象是否为同一个 14 | return obj == request.user 15 | 16 | 17 | class SuperUserPermission(permissions.BasePermission): 18 | """超级管理员权限""" 19 | def has_permission(self, request, view): 20 | # 检查用户是否是管理员(超级用户) 21 | return request.user and request.user.is_superuser 22 | 23 | def has_object_permission(self, request, view, obj): 24 | return self.has_permission(request, view) 25 | 26 | 27 | # class AdminPermission(permissions.BasePermission): 28 | # """企业管理员权限""" 29 | # def has_permission(self, request, view): 30 | # admin_id = request.data.get('admin') 31 | # if admin_id is None: 32 | # raise PermissionDenied("admin参数不可省略") 33 | # 34 | # if not isinstance(admin_id, int): 35 | # admin_id = int(admin_id) 36 | # 37 | # # 检查admin_id是否等于当前登录用户的ID 38 | # if admin_id != request.user.id: 39 | # raise PermissionDenied("身份校验未通过") 40 | # 41 | # return True 42 | -------------------------------------------------------------------------------- /backend/Edivator/apps/users/serializer.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | 3 | from apps.users.models import User 4 | 5 | 6 | class UserSerializer(serializers.ModelSerializer): 7 | """用户模型的序列化器""" 8 | class Meta: 9 | model = User 10 | fields = ['id', 'username', 'email', 'mobile', 'avatar', 'point'] 11 | -------------------------------------------------------------------------------- /backend/Edivator/apps/users/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /backend/Edivator/apps/users/urls.py: -------------------------------------------------------------------------------- 1 | """ 2 | URL configuration for Edivator project. 3 | 4 | The `urlpatterns` list routes URLs to views. For more information please see: 5 | https://docs.djangoproject.com/en/4.2/topics/http/urls/ 6 | Examples: 7 | Function views 8 | 1. Add an import: from my_app import views 9 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 10 | Class-based views 11 | 1. Add an import: from other_app.views import Home 12 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 13 | Including another URLconf 14 | 1. Import the include() function: from django.urls import include, path 15 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 16 | """ 17 | 18 | from django.urls import path 19 | from rest_framework_simplejwt.views import TokenRefreshView, TokenVerifyView 20 | 21 | from apps.users import views 22 | from apps.users.views import LoginView, RegisterView 23 | 24 | urlpatterns = [ 25 | # 登录 26 | path('login/', LoginView.as_view(), name='login'), 27 | # 注册 28 | path('register/', RegisterView.as_view(), name='register'), 29 | # 刷新token 30 | path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), 31 | # 校验token 32 | path('token/verify/', TokenVerifyView.as_view(), name='token_verify'), 33 | # 获取单个用户信息 34 | path('/', views.UserView.as_view({'get': 'retrieve'}), name='user_detail'), 35 | # 上传图片 36 | path('/avatar/upload/', views.UserView.as_view({'post': 'upload_avatar'}), name='upload_avatar'), 37 | # 通过邀请码加入企业 38 | path('join_company/', views.UserView.as_view({'post': 'join_company'}), name='join_company'), 39 | # 获取用户信息 40 | path('me/', views.UserView.as_view({'get': 'get_detail'}), name='me'), 41 | # 获取文档总数 42 | path('get_doc_num/', views.UserView.as_view({'get': 'get_doc_nums'})), 43 | # 充值 44 | path('recharge/', views.UserView.as_view({'post': 'recharge'})), 45 | ] 46 | -------------------------------------------------------------------------------- /backend/Edivator/common/authenticate.py: -------------------------------------------------------------------------------- 1 | """ 2 | 自定义用户登录认证类, 3 | 实现多字段登录 4 | """ 5 | 6 | from django.contrib.auth.backends import ModelBackend 7 | from django.db.models import Q 8 | from apps.users.models import User 9 | from rest_framework import serializers 10 | 11 | 12 | class MyBackend(ModelBackend): 13 | """自定义登录类""" 14 | 15 | def authenticate(self, request, username=None, password=None, **kwargs): 16 | try: 17 | user = User.objects.get(Q(username=username) | Q(email=username) | Q(mobile=username)) 18 | except: 19 | raise serializers.ValidationError({'error': "未找到该用户"}) 20 | 21 | # 验证密码是否正确 22 | if user.check_password(password): 23 | return user 24 | else: 25 | raise serializers.ValidationError({'error': "密码不正确 "}) 26 | -------------------------------------------------------------------------------- /backend/Edivator/common/db.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class BaseModel(models.Model): 5 | """抽象的模型基类,用于定义一些公共的字段""" 6 | create_time = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') 7 | update_time = models.DateTimeField(auto_now=True, verbose_name='更新时间') 8 | is_delete = models.BooleanField(default=False, verbose_name='删除标记') 9 | 10 | class Meta: 11 | abstract = True # 声明为抽象模型 12 | verbose_name = '公共字段表' 13 | db_table = 'BaseTable' 14 | -------------------------------------------------------------------------------- /backend/Edivator/common/utils.py: -------------------------------------------------------------------------------- 1 | from rest_framework.response import Response 2 | 3 | 4 | def has_permission_for_document(user, document): 5 | return ((document.owner == 1 and document.user.id == user.id) or 6 | (document.owner == 2 and document.team.users.filter(id=user.id).exists()) or 7 | (document.owner == 3 and document.company.users.filter(id=user.id).exists())) 8 | 9 | 10 | # 检测参数是否全 11 | def check_is_all(params): 12 | for param in params: 13 | if param is None: 14 | return False 15 | return True 16 | -------------------------------------------------------------------------------- /backend/Edivator/common/views.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from django.http import FileResponse 4 | from rest_framework import status 5 | from rest_framework.response import Response 6 | from rest_framework.views import APIView 7 | 8 | from Edivator.settings import MEDIA_ROOT 9 | 10 | 11 | class FileView(APIView): 12 | """获取文件的视图""" 13 | def get(self, request, name): 14 | path = os.path.join(MEDIA_ROOT, name) 15 | if os.path.isfile(path): 16 | return FileResponse(open(path, 'rb')) 17 | return Response({'error':"没有找到该文件"}, status=status.HTTP_404_NOT_FOUND) -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/1.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/1869ba4c9a0f382712df4aa71d93cc9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/1869ba4c9a0f382712df4aa71d93cc9.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_91DPGQ7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_91DPGQ7.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_FArF8ng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_FArF8ng.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_MQ497A4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_MQ497A4.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_OUI5rFY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_OUI5rFY.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_Z6BgAEd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_Z6BgAEd.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_hd1LCKN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_hd1LCKN.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_vYNMPKJ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/2772672da5a645b695c075a7c6554ed_vYNMPKJ.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/70353c4161658f39fa107b3166db6d2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/70353c4161658f39fa107b3166db6d2.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/IMG_3263.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/IMG_3263.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/android-chrome-192x192.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/android-chrome-192x192_AJX7l0t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/android-chrome-192x192_AJX7l0t.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_5JkZaLg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_5JkZaLg.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_6jWXS3a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_6jWXS3a.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_AaXDre7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_AaXDre7.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_CyHj88G.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_CyHj88G.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_CydRvJH.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_CydRvJH.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_Ks7PAvE.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_Ks7PAvE.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_NhK6uqE.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_NhK6uqE.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_R0kMDGN.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_R0kMDGN.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_UjQVxjC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_UjQVxjC.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_WvS3pwC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_WvS3pwC.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_XpAENVF.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_XpAENVF.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_Xw2Wstx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_Xw2Wstx.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_cAumb47.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_cAumb47.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_cXPcB60.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_cXPcB60.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_nqCELGL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_nqCELGL.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_rT8P1oq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_rT8P1oq.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_xouV1pW.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_xouV1pW.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/avatar_zSL15yU.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/avatar_zSL15yU.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/周文钰生活照.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/周文钰生活照.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/周文钰生活照_WKFxOsk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/周文钰生活照_WKFxOsk.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/周文钰签名.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/周文钰签名.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/图标.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/图标.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/图标_1rTt0QI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/图标_1rTt0QI.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/图标_DiMBbkB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/图标_DiMBbkB.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/图标_SpPrLeG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/图标_SpPrLeG.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/图标_fuY3x6T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/图标_fuY3x6T.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/图标_zSX5rlG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/图标_zSX5rlG.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/屏幕截图_2023-09-14_001952.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/屏幕截图_2023-09-14_001952.png -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/每日站会.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/每日站会.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/每日站会_DxZYh5J.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/每日站会_DxZYh5J.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/doc_avatars/每日站会_MpYTdYr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/doc_avatars/每日站会_MpYTdYr.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/02a4f660c29a4c0f8c364884d46310d2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/02a4f660c29a4c0f8c364884d46310d2.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/0aea05e595a7408c93b8ac006c25d0f9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/0aea05e595a7408c93b8ac006c25d0f9.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/0df8cf5d375042d6927726e5bfeb4f94.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/0df8cf5d375042d6927726e5bfeb4f94.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/0f1466d4a9224301bea7ef2d7f621482.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/0f1466d4a9224301bea7ef2d7f621482.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/1396a2b3a6e84ddd9e5f401d82c82159.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/1396a2b3a6e84ddd9e5f401d82c82159.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/157054e2f6fa463a9cbc8d4f1cdb9b31.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/157054e2f6fa463a9cbc8d4f1cdb9b31.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/1b88aa1d5bf34610bf46f75de561e9f3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/1b88aa1d5bf34610bf46f75de561e9f3.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/22ab30f4c1544feab06f795d66c34486.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/22ab30f4c1544feab06f795d66c34486.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/2604b0ce64df40aaba8d9ee02fe2e804.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/2604b0ce64df40aaba8d9ee02fe2e804.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/26aa744a9bf14b0099700bb91f81c240.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/26aa744a9bf14b0099700bb91f81c240.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/2bb1306fa353472d8bfbb51b1f7b4821.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/2bb1306fa353472d8bfbb51b1f7b4821.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/2cb964b6a74b4a54bd58938f24d9037b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/2cb964b6a74b4a54bd58938f24d9037b.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/31c4d638491d4435962459664d981258.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/31c4d638491d4435962459664d981258.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/40470d73912244a29401bffd2c3b4892.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/40470d73912244a29401bffd2c3b4892.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/48865b19971548129dd70e6b05064d6d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/48865b19971548129dd70e6b05064d6d.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/489d6e4668dc4500b36c91921436f622.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/489d6e4668dc4500b36c91921436f622.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/4926d2515af74fceabf21625b8ea40bd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/4926d2515af74fceabf21625b8ea40bd.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/5d7679da4c2542468c17fb75120cb9a2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/5d7679da4c2542468c17fb75120cb9a2.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/6108b0208272455db68456d5b1b1847c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/6108b0208272455db68456d5b1b1847c.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/715bdefd8ec847a7bd33c1c5403183cf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/715bdefd8ec847a7bd33c1c5403183cf.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/733f86fcd74f4329a3fbfda2e8b0731d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/733f86fcd74f4329a3fbfda2e8b0731d.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/73cd8d53d2614ebc8f0a4d644e10473d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/73cd8d53d2614ebc8f0a4d644e10473d.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/74022b0e81734d238687b36f1790a2fb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/74022b0e81734d238687b36f1790a2fb.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/76c2c766003b42bfb6dfed747e29a8d5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/76c2c766003b42bfb6dfed747e29a8d5.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/76d6c50582bc49cabf604a65d92c70ab.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/76d6c50582bc49cabf604a65d92c70ab.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/7c32669a5da348c6a721eeb9752feee8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/7c32669a5da348c6a721eeb9752feee8.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/857d62bd88184a2d82e757e5cd6ef862.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/857d62bd88184a2d82e757e5cd6ef862.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/8f907e57a42b4be9b78035ef01d7a794.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/8f907e57a42b4be9b78035ef01d7a794.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/9aed576854d94ad59909d279a9929cd1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/9aed576854d94ad59909d279a9929cd1.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/b3b6b32729ae4b98a0f05e2dc6c57a53.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/b3b6b32729ae4b98a0f05e2dc6c57a53.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/b4d53312d3b8436fbe17b9af38d3f021.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/b4d53312d3b8436fbe17b9af38d3f021.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/b602d795f44c4a2e9c73135c9b5ebbeb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/b602d795f44c4a2e9c73135c9b5ebbeb.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/c29ebb38330449889103b4138dcda2c0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/c29ebb38330449889103b4138dcda2c0.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/c5e4d151417b49b398a0f29f141c8875.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/c5e4d151417b49b398a0f29f141c8875.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/c6fb43248ac04acaadbc829d56cf47f2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/c6fb43248ac04acaadbc829d56cf47f2.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/cb4294ad6c4c4ea7b46ffa861d8edc44.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/cb4294ad6c4c4ea7b46ffa861d8edc44.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/cee65cb8eccc497d943e4280383e6bf2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/cee65cb8eccc497d943e4280383e6bf2.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/da6db175150c4e4484ba88db2762633e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/da6db175150c4e4484ba88db2762633e.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/db52dbd2c2d4474dafc9d5d5f83a15cb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/db52dbd2c2d4474dafc9d5d5f83a15cb.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/e6a882faa62847128df59a695fe054d5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/e6a882faa62847128df59a695fe054d5.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/ocr_res/ec302c7058104b9ca70c9f725f07ab84.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/ocr_res/ec302c7058104b9ca70c9f725f07ab84.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/76a464f64b091978105ae88e79af421.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/76a464f64b091978105ae88e79af421.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/76a464f64b091978105ae88e79af421_1CGxIHO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/76a464f64b091978105ae88e79af421_1CGxIHO.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/76a464f64b091978105ae88e79af421_8uMAkoU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/76a464f64b091978105ae88e79af421_8uMAkoU.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/91add9fda91db35d5ac5c45239709fa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/91add9fda91db35d5ac5c45239709fa.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/91af01d9af2c9b45db502683f06af65.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/91af01d9af2c9b45db502683f06af65.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/a91717ceaaf25b86e98b7b0436483a0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/a91717ceaaf25b86e98b7b0436483a0.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/b88a30d8625e809f0dc5e541de0ccf0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/b88a30d8625e809f0dc5e541de0ccf0.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/b88a30d8625e809f0dc5e541de0ccf0_uXCdVQQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/b88a30d8625e809f0dc5e541de0ccf0_uXCdVQQ.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/blog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/blog.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/blog_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/blog_cover.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/blog_cover_Kw3MRVN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/blog_cover_Kw3MRVN.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/blog_cover_L0oletB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/blog_cover_L0oletB.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/blog_cover_SbRjkeR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/blog_cover_SbRjkeR.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/blog_cover_fAPfBxv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/blog_cover_fAPfBxv.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/blog_cover_v6M1fTU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/blog_cover_v6M1fTU.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/blog_cover_wAtLnyC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/blog_cover_wAtLnyC.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/eb435a37d75fc07109fa6cf2d05bcba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/eb435a37d75fc07109fa6cf2d05bcba.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/eb435a37d75fc07109fa6cf2d05bcba_WRq3Lt4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/eb435a37d75fc07109fa6cf2d05bcba_WRq3Lt4.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/empty.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/empty.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/个人博客.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/个人博客.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/技术文档.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/技术文档.png -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/水獭.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/水獭.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/水獭_QAXCTot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/水獭_QAXCTot.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/水獭_cBQYdig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/水獭_cBQYdig.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/水獭_clGaOah.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/水獭_clGaOah.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/水獭_dwalq8c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/水獭_dwalq8c.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/水獭_g7sNhGd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/水獭_g7sNhGd.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/水獭_iyQUMP1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/水獭_iyQUMP1.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/水獭_j6oNAwd.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/水獭_j6oNAwd.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/template_avatars/软件使用说明书.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/template_avatars/软件使用说明书.png -------------------------------------------------------------------------------- /backend/Edivator/files/templates/04a18b89-fbb3-4027-95e2-241d8ba48a5f.css: -------------------------------------------------------------------------------- 1 | .tiptap h1 {color: orange;} -------------------------------------------------------------------------------- /backend/Edivator/files/templates/19756027-3b54-495b-8fb0-e90ecf7c9804.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | /* 个人博客样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #333; 10 | border-bottom: 2px solid #ddd; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #444; 22 | border-bottom: 1px solid #ddd; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #555; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.8; 42 | color: #666; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 超链接 */ 49 | a { 50 | color: #3498db; 51 | text-decoration: none; 52 | } 53 | 54 | a:hover { 55 | text-decoration: underline; 56 | } 57 | 58 | /* 表格 */ 59 | table { 60 | width: 100%; 61 | border-collapse: collapse; 62 | margin-top: 1em; 63 | margin-bottom: 1em; 64 | } 65 | 66 | th, 67 | td { 68 | border: 1px solid #ddd; 69 | padding: 0.5em; 70 | text-align: left; 71 | } 72 | 73 | th { 74 | background-color: #f4f4f4; 75 | } 76 | 77 | /* 全局字体 */ 78 | body { 79 | font-family: "Georgia", serif; 80 | padding: 20px; 81 | background-color: #f9f9f9; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/8362c97a-8169-43f7-8fd4-648988a42cd6.css: -------------------------------------------------------------------------------- 1 | .edivator { 2 | /* 个人博客样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #333; 10 | border-bottom: 2px solid #ddd; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #444; 22 | border-bottom: 1px solid #ddd; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #555; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.8; 42 | color: #666; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 超链接 */ 49 | a { 50 | color: #3498db; 51 | text-decoration: none; 52 | } 53 | 54 | a:hover { 55 | text-decoration: underline; 56 | } 57 | 58 | /* 表格 */ 59 | table { 60 | width: 100%; 61 | border-collapse: collapse; 62 | margin-top: 1em; 63 | margin-bottom: 1em; 64 | } 65 | 66 | th, 67 | td { 68 | border: 1px solid #ddd; 69 | padding: 0.5em; 70 | text-align: left; 71 | } 72 | 73 | th { 74 | background-color: #f4f4f4; 75 | } 76 | 77 | /* 全局字体 */ 78 | body { 79 | font-family: "Georgia", serif; 80 | padding: 20px; 81 | background-color: #f9f9f9; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/8c4f4590-8fd9-47df-9eeb-44b6de705540.css: -------------------------------------------------------------------------------- 1 | /* 设置正文样式 */ 2 | body { 3 | font-family: 'Arial', sans-serif; 4 | font-size: 16px; 5 | line-height: 1.6; 6 | margin: 0; 7 | padding: 0; 8 | color: #333; 9 | } 10 | 11 | /* 一级标题样式 */ 12 | h1 { 13 | font-family: 'Georgia', serif; 14 | font-size: 32px; 15 | font-weight: bold; 16 | margin-top: 24px; 17 | margin-bottom: 16px; 18 | line-height: 1.2; 19 | } 20 | 21 | /* 二级标题样式 */ 22 | h2 { 23 | font-family: 'Georgia', serif; 24 | font-size: 28px; 25 | font-weight: bold; 26 | margin-top: 20px; 27 | margin-bottom: 14px; 28 | line-height: 1.3; 29 | } 30 | 31 | /* 三级标题样式 */ 32 | h3 { 33 | font-family: 'Georgia', serif; 34 | font-size: 24px; 35 | font-weight: bold; 36 | margin-top: 18px; 37 | margin-bottom: 12px; 38 | line-height: 1.4; 39 | } 40 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/8c7c1b77-0482-4c53-aceb-74034a606ccb.css: -------------------------------------------------------------------------------- 1 | /* 设置正文样式 */ 2 | body { 3 | font-family: 'Arial', sans-serif; 4 | font-size: 16px; 5 | line-height: 1.6; 6 | margin: 0; 7 | padding: 0; 8 | color: #333; 9 | } 10 | 11 | /* 一级标题样式 */ 12 | h1 { 13 | font-family: 'Georgia', serif; 14 | font-size: 32px; 15 | font-weight: bold; 16 | margin-top: 24px; 17 | margin-bottom: 16px; 18 | line-height: 1.2; 19 | } 20 | 21 | /* 二级标题样式 */ 22 | h2 { 23 | font-family: 'Georgia', serif; 24 | font-size: 28px; 25 | font-weight: bold; 26 | margin-top: 20px; 27 | margin-bottom: 14px; 28 | line-height: 1.3; 29 | } 30 | 31 | /* 三级标题样式 */ 32 | h3 { 33 | font-family: 'Georgia', serif; 34 | font-size: 24px; 35 | font-weight: bold; 36 | margin-top: 18px; 37 | margin-bottom: 12px; 38 | line-height: 1.4; 39 | } 40 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/8d602d60-7489-4b5c-887c-a0f7253dc1f9.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | text-align: center; 3 | font-weight: bold; 4 | font-size: 2.5em; 5 | color: #2c3e50; 6 | border-bottom: 3px solid #3498db; 7 | padding-bottom: 0.5em; 8 | margin-top: 1em; 9 | margin-bottom: 0.5em; 10 | } 11 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/9175431d-bce9-47f7-a47f-bd21f422f7d8.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | /* 全局字体设置 */ 3 | font-family: "Arial", sans-serif; 4 | background-color: #f4f6f9; 5 | padding: 20px; 6 | color: #2c3e50; 7 | 8 | /* 标题样式 */ 9 | h1 { 10 | text-align: center; 11 | font-weight: bold; 12 | font-size: 3em; 13 | color: #2c3e50; 14 | border-bottom: 3px solid #2980b9; 15 | padding-bottom: 0.75em; 16 | margin-bottom: 1.5em; 17 | } 18 | 19 | h2 { 20 | font-weight: bold; 21 | font-size: 2.25em; 22 | color: #2980b9; 23 | margin-top: 1.5em; 24 | margin-bottom: 0.75em; 25 | } 26 | 27 | /* 正文段落 */ 28 | p { 29 | font-size: 1.25em; 30 | line-height: 1.8; 31 | margin-top: 0.5em; 32 | margin-bottom: 1em; 33 | text-align: justify; 34 | } 35 | 36 | /* 数字高亮 */ 37 | strong { 38 | font-weight: bold; 39 | color: #e74c3c; 40 | } 41 | 42 | /* 表格样式 */ 43 | table { 44 | width: 100%; 45 | border-collapse: collapse; 46 | margin-top: 1em; 47 | margin-bottom: 1em; 48 | font-size: 1.25em; 49 | } 50 | 51 | th, td { 52 | border: 1px solid #bdc3c7; 53 | padding: 1em; 54 | text-align: right; 55 | } 56 | 57 | th { 58 | background-color: #ecf0f1; 59 | color: #2980b9; 60 | text-align: center; 61 | } 62 | 63 | td { 64 | background-color: #ffffff; 65 | } 66 | 67 | /* 总计行 */ 68 | tfoot td { 69 | font-weight: bold; 70 | background-color: #eaf1f8; 71 | color: #2980b9; 72 | } 73 | 74 | /* 页脚注释 */ 75 | small { 76 | font-size: 0.9em; 77 | color: #7f8c8d; 78 | margin-top: 2em; 79 | text-align: center; 80 | display: block; 81 | } 82 | 83 | 84 | } 85 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/a65941d0-050f-4229-8858-6f70fcf58d64.css: -------------------------------------------------------------------------------- 1 | 模板的内容: -------------------------------------------------------------------------------- /backend/Edivator/files/templates/a931e2b1-0499-4018-9b7c-9783cb128877.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/b69f964f-d619-4693-834c-0d460b4b9541.css: -------------------------------------------------------------------------------- 1 | h1 {font-size: 24px;} -------------------------------------------------------------------------------- /backend/Edivator/files/templates/bb9eb4f2-6c3f-492e-ab7a-f59aaa36bd14.css: -------------------------------------------------------------------------------- 1 | .edivator { 2 | /* 软件使用说明书样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #34495e; 10 | border-bottom: 2px dashed #95a5a6; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #2c3e50; 22 | border-bottom: 1px dashed #95a5a6; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #7f8c8d; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.7; 42 | color: #2c3e50; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 全局字体 */ 49 | body { 50 | font-family: "Verdana", sans-serif; 51 | padding: 20px; 52 | background-color: #f5f5f5; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/bcc338ee-032e-4ebd-88d3-957f4afa0d38.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | /* 技术文档样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #2c3e50; 10 | border-bottom: 3px solid #3498db; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #34495e; 22 | border-bottom: 2px solid #3498db; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #7f8c8d; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.6; 42 | color: #2c3e50; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 全局字体 */ 49 | body { 50 | font-family: "Arial", sans-serif; 51 | padding: 20px; 52 | background-color: #ecf0f1; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/bd3388f8-0a26-47e3-8555-ed38d82c249b.css: -------------------------------------------------------------------------------- 1 | .tiptap h1 {color: orange;} -------------------------------------------------------------------------------- /backend/Edivator/files/templates/c04d10a0-144c-4427-a9cf-1370bd6dc2a4.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/c106f27c-09e6-4625-83c1-f2c67a7c6c77.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | /* 技术文档样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #2c3e50; 10 | border-bottom: 3px solid #3498db; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #34495e; 22 | border-bottom: 2px solid #3498db; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #7f8c8d; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.6; 42 | color: #2c3e50; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 全局字体 */ 49 | body { 50 | font-family: "Arial", sans-serif; 51 | padding: 20px; 52 | background-color: #ecf0f1; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/ccec5d27-8b4c-41c7-b958-af9c8cb3d2c4.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | /* 全局字体设置 */ 3 | font-family: "Times New Roman", serif; 4 | background-color: #f7f9fc; 5 | padding: 20px; 6 | color: #2c3e50; 7 | line-height: 1.8; 8 | 9 | /* 标题样式 */ 10 | h1 { 11 | text-align: center; 12 | font-weight: bold; 13 | font-size: 2.75em; 14 | color: #2c3e50; 15 | border-bottom: 4px solid #34495e; 16 | padding-bottom: 0.75em; 17 | margin-bottom: 1.5em; 18 | } 19 | 20 | h2 { 21 | font-weight: bold; 22 | font-size: 2em; 23 | color: #34495e; 24 | margin-top: 1.5em; 25 | margin-bottom: 0.75em; 26 | text-indent: 2em; 27 | } 28 | 29 | h3 { 30 | font-weight: bold; 31 | font-size: 1.25em; 32 | color: #7f8c8d; 33 | margin-top: 1em; 34 | margin-bottom: 0.5em; 35 | text-indent: 2em; 36 | } 37 | 38 | /* 正文内容 */ 39 | p { 40 | font-size: 1.15em; 41 | margin-top: 0.5em; 42 | margin-bottom: 1em; 43 | text-align: justify; 44 | text-indent: 2em; 45 | } 46 | 47 | /* 表格样式 */ 48 | table { 49 | width: 100%; 50 | border-collapse: collapse; 51 | margin-top: 1em; 52 | margin-bottom: 1em; 53 | font-size: 1em; 54 | } 55 | 56 | th, td { 57 | border: 1px solid #ddd; 58 | padding: 0.75em; 59 | text-align: left; 60 | } 61 | 62 | th { 63 | background-color: #ecf0f1; 64 | color: #34495e; 65 | } 66 | 67 | td { 68 | background-color: #ffffff; 69 | } 70 | 71 | /* 签名和日期部分 */ 72 | address { 73 | margin-top: 3em; 74 | text-align: right; 75 | font-size: 1.5em; 76 | font-style: italic; 77 | color: #2c3e50; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/d1ac08c8-911a-49f0-b449-a0db15a891e0.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/da93a762-645c-4b1b-b5c8-7b9a52e7cf60.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | /* 软件使用说明书样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #34495e; 10 | border-bottom: 2px dashed #95a5a6; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #2c3e50; 22 | border-bottom: 1px dashed #95a5a6; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #7f8c8d; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.7; 42 | color: #2c3e50; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 超链接 */ 49 | a { 50 | color: #e74c3c; 51 | text-decoration: none; 52 | } 53 | 54 | a:hover { 55 | text-decoration: underline; 56 | } 57 | 58 | /* 表格 */ 59 | table { 60 | width: 100%; 61 | border-collapse: collapse; 62 | margin-top: 1em; 63 | margin-bottom: 1em; 64 | } 65 | 66 | th, 67 | td { 68 | border: 1px solid #ddd; 69 | padding: 0.5em; 70 | text-align: left; 71 | } 72 | 73 | th { 74 | background-color: #f5f5f5; 75 | } 76 | 77 | /* 全局字体 */ 78 | body { 79 | font-family: "Verdana", sans-serif; 80 | padding: 20px; 81 | background-color: #f5f5f5; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/dbcbc2d2-8aad-4171-b781-b5b0ec45328d.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/e76010e4-b5fe-45ca-8d37-ffd5a7333fc4.css: -------------------------------------------------------------------------------- 1 | .editor{} -------------------------------------------------------------------------------- /backend/Edivator/files/templates/ebd780a6-332a-4578-bc1c-d918cc931266.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/ec6153ca-631d-46a9-b38f-aa3cd02dd337.css: -------------------------------------------------------------------------------- 1 | .edivator { 2 | /* 技术文档样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #2c3e50; 10 | border-bottom: 3px solid #3498db; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #34495e; 22 | border-bottom: 2px solid #3498db; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #7f8c8d; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.6; 42 | color: #2c3e50; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 全局字体 */ 49 | body { 50 | font-family: "Arial", sans-serif; 51 | padding: 20px; 52 | background-color: #ecf0f1; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/f59a3ba8-b6af-4651-a79f-ccf78ee5361e.css: -------------------------------------------------------------------------------- 1 | .edivator { 2 | /* 个人博客样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #333; 10 | border-bottom: 2px solid #ddd; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #444; 22 | border-bottom: 1px solid #ddd; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #555; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.8; 42 | color: #666; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 全局字体 */ 49 | body { 50 | font-family: "Georgia", serif; 51 | padding: 20px; 52 | background-color: #f9f9f9; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/febc2579-5795-47f7-bae1-dff0ae7e78b6.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | /* 技术文档样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #2c3e50; 10 | border-bottom: 3px solid #3498db; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /backend/Edivator/files/templates/ff238fd2-7ec9-464b-88a8-9567c127abfe.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | /* 技术文档样式 */ 3 | 4 | /* 一级标题 */ 5 | h1 { 6 | text-align: center; 7 | font-weight: bold; 8 | font-size: 2.5em; 9 | color: #2c3e50; 10 | border-bottom: 3px solid #3498db; 11 | padding-bottom: 0.5em; 12 | margin-top: 1em; 13 | margin-bottom: 0.5em; 14 | } 15 | 16 | /* 二级标题 */ 17 | h2 { 18 | text-align: left; 19 | font-weight: bold; 20 | font-size: 2em; 21 | color: #34495e; 22 | border-bottom: 2px solid #3498db; 23 | padding-bottom: 0.5em; 24 | margin-top: 1em; 25 | margin-bottom: 0.5em; 26 | } 27 | 28 | /* 三级标题 */ 29 | h3 { 30 | text-align: left; 31 | font-weight: bold; 32 | font-size: 1.75em; 33 | color: #7f8c8d; 34 | margin-top: 1em; 35 | margin-bottom: 0.5em; 36 | } 37 | 38 | /* 正文 */ 39 | p { 40 | font-size: 1em; 41 | line-height: 1.6; 42 | color: #2c3e50; 43 | margin-top: 0.5em; 44 | margin-bottom: 0.5em; 45 | text-align: justify; 46 | } 47 | 48 | /* 超链接 */ 49 | a { 50 | color: #3498db; 51 | text-decoration: none; 52 | } 53 | 54 | a:hover { 55 | text-decoration: underline; 56 | } 57 | 58 | /* 表格 */ 59 | table { 60 | width: 100%; 61 | border-collapse: collapse; 62 | margin-top: 1em; 63 | margin-bottom: 1em; 64 | } 65 | 66 | th, 67 | td { 68 | border: 1px solid #ddd; 69 | padding: 0.5em; 70 | text-align: left; 71 | } 72 | 73 | th { 74 | background-color: #ecf0f1; 75 | } 76 | 77 | /* 全局字体 */ 78 | body { 79 | font-family: "Arial", sans-serif; 80 | padding: 20px; 81 | background-color: #ecf0f1; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /backend/Edivator/files/user_avatars/2370617f3f4f4fe196d6c219aee8f860.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/user_avatars/2370617f3f4f4fe196d6c219aee8f860.png -------------------------------------------------------------------------------- /backend/Edivator/files/user_avatars/27216f0d01b9428a8b792248dbcb2b0b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/user_avatars/27216f0d01b9428a8b792248dbcb2b0b.png -------------------------------------------------------------------------------- /backend/Edivator/files/user_avatars/2ed91d11b68a4b169dd8d5db4d54fa4d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/user_avatars/2ed91d11b68a4b169dd8d5db4d54fa4d.png -------------------------------------------------------------------------------- /backend/Edivator/files/user_avatars/94cb2f8bd9964e4c99a50554b5c43e17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/user_avatars/94cb2f8bd9964e4c99a50554b5c43e17.png -------------------------------------------------------------------------------- /backend/Edivator/files/user_avatars/b6faa9128e1442b5ac4d4840584181da.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/user_avatars/b6faa9128e1442b5ac4d4840584181da.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/user_avatars/dc2e7c58db304ac39729267df3aca1bf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/user_avatars/dc2e7c58db304ac39729267df3aca1bf.jpg -------------------------------------------------------------------------------- /backend/Edivator/files/user_avatars/e403f591b7594194b619ec29356019f9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/user_avatars/e403f591b7594194b619ec29356019f9.png -------------------------------------------------------------------------------- /backend/Edivator/files/user_avatars/ff34698873474739a7ae4e40f02b1d30.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/files/user_avatars/ff34698873474739a7ae4e40f02b1d30.jpeg -------------------------------------------------------------------------------- /backend/Edivator/fonts/simfang.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/fonts/simfang.ttf -------------------------------------------------------------------------------- /backend/Edivator/intelli/chat/__init__.py: -------------------------------------------------------------------------------- 1 | import os 2 | os.environ["QIANFAN_ACCESS_KEY"] = "XAfWvj0k0MfTww8Lk89BSVOB" 3 | os.environ["QIANFAN_SECRET_KEY"] = "YHEr1UI1SVD9Uo6ohoRo56kdlrEcGgkA" 4 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/chat/gpt_webcall/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/intelli/chat/gpt_webcall/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/intelli/chat/gpt_webcall/_token_manager.py: -------------------------------------------------------------------------------- 1 | from pprint import pprint 2 | import requests 3 | import json 4 | 5 | def get_tokens(): 6 | url = "https://aip.baidubce.com/oauth/2.0/token?client_id=jMi5FcOK8w0EaTMOMhY8sA2H&client_secret=CEep2PHZPSgep9sH4ayzzDfHnrLYCQpz&grant_type=client_credentials" 7 | 8 | payload = json.dumps("") 9 | headers = { 10 | 'Content-Type': 'application/json', 11 | 'Accept': 'application/json' 12 | } 13 | 14 | response = requests.request("POST", url, headers=headers, data=payload) 15 | return response.json() 16 | 17 | def get_access_token(): 18 | return get_tokens().get("access_token") 19 | 20 | 21 | if __name__ == '__main__': 22 | # token = get_access_token() 23 | token = get_tokens() 24 | pprint(token) 25 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/chat/gpt_webcall/fuyu.py: -------------------------------------------------------------------------------- 1 | from pprint import pprint 2 | import requests 3 | import json 4 | from Edivator.intelli.gpt_web._token_manager import get_access_token 5 | 6 | 7 | def main(): 8 | 9 | url = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/image2text/fuyu_8b?access_token=" + get_access_token() 10 | payload = json.dumps({ 11 | "prompt": "introduce the picture", 12 | "image": "9j/4AAQSkZJRgABAQAAAQABAAD/xxxxx" # base64 encoded image 13 | }) 14 | headers = { 15 | 'Content-Type': 'application/json' 16 | } 17 | 18 | response = requests.request("POST", url, headers=headers, data=payload) 19 | 20 | pprint(response.text) 21 | 22 | 23 | if __name__ == '__main__': 24 | main() 25 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/chat/gpt_webcall/yichat_multi_round.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | from _token_manager import get_access_token 4 | 5 | 6 | def main(): 7 | 8 | url = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/yi_34b_chat?access_token=" + get_access_token() 9 | 10 | payload = json.dumps({ 11 | "messages": [ 12 | { 13 | "role": "user", 14 | "content": "hi" 15 | }, 16 | { 17 | "role": "assistant", 18 | "content": "Hello! How can I assist you today? If you have any questions or need information on a specific topic, feel free to ask." 19 | }, 20 | { 21 | "role": "user", 22 | "content": "Please introduce The Great Wall" 23 | } 24 | ] 25 | }) 26 | headers = { 27 | 'Content-Type': 'application/json' 28 | } 29 | 30 | response = requests.request("POST", url, headers=headers, data=payload) 31 | 32 | print(response.text) 33 | 34 | 35 | if __name__ == '__main__': 36 | main() 37 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/chat/gpt_webcall/yichat_single_round.py: -------------------------------------------------------------------------------- 1 | import pprint 2 | import requests 3 | import json 4 | from _token_manager import get_access_token 5 | 6 | 7 | def yichat_single_round(content: str): 8 | url = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/yi_34b_chat?access_token=" + get_access_token() 9 | payload = json.dumps({ 10 | "messages": [ 11 | { 12 | "role": "user", 13 | "content": content 14 | } 15 | ] 16 | }) 17 | headers = { 18 | 'Content-Type': 'application/json' 19 | } 20 | response = requests.request("POST", url, headers=headers, data=payload) 21 | return response.json().get("result") 22 | 23 | 24 | if __name__ == '__main__': 25 | response = yichat_single_round("你可以文生图吗?") 26 | pprint.pprint(response) 27 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/chat/gpt_webcall/yichat_stream.py: -------------------------------------------------------------------------------- 1 | from pprint import pprint 2 | import requests 3 | import json 4 | from _token_manager import get_access_token 5 | 6 | 7 | def yichat_stream(content: str): 8 | url = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/yi_34b_chat?access_token=" + get_access_token() 9 | 10 | payload = json.dumps({ 11 | "messages": [ 12 | { 13 | "role": "assistant", 14 | "content": content 15 | } 16 | ], 17 | "stream": True 18 | }) 19 | headers = { 20 | 'Content-Type': 'application/json' 21 | } 22 | 23 | response = requests.request( 24 | "POST", url, headers=headers, data=payload, stream=True) 25 | 26 | for line in response.iter_lines(): 27 | if line: 28 | yield line.decode("UTF-8") 29 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/keyword/keyword.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | 4 | API_KEY = "" 5 | SECRET_KEY = "" 6 | 7 | 8 | def get_keywords(content, title): 9 | url = "https://aip.baidubce.com/rpc/2.0/nlp/v1/keyword?charset=UTF-8&access_token=" + get_access_token() 10 | 11 | payload = json.dumps({ 12 | "content": content, 13 | "title": title 14 | }) 15 | headers = { 16 | 'Content-Type': 'application/json', 17 | 'Accept': 'application/json' 18 | } 19 | 20 | response = requests.request("POST", url, headers=headers, data=payload) 21 | 22 | return response.json() 23 | 24 | 25 | def get_access_token(): 26 | """ 27 | 使用 AK,SK 生成鉴权签名(Access Token) 28 | :return: access_token,或是None(如果错误) 29 | """ 30 | url = "https://aip.baidubce.com/oauth/2.0/token" 31 | params = {"grant_type": "client_credentials", "client_id": API_KEY, "client_secret": SECRET_KEY} 32 | return str(requests.post(url, params=params).json().get("access_token")) 33 | 34 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/mind/mind.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | 4 | API_KEY = "" 5 | SECRET_KEY = "" 6 | 7 | import re 8 | 9 | def generate_node_array(markdown_text): 10 | # 正则表达式匹配 Markdown 标题 11 | title_pattern = re.compile(r'^(#+)\s+(.*)') 12 | lines = markdown_text.split('\n') 13 | 14 | # 用于存储结果的列表 15 | result = [] 16 | 17 | # 用于存储当前层级的父id 18 | parent_ids = {0: None} 19 | current_level = 0 20 | 21 | for line in lines: 22 | match = title_pattern.match(line) 23 | if match: 24 | hashes, title = match.groups() 25 | level = len(hashes) # 标题层级 26 | 27 | # 更新parent_ids字典 28 | if level > current_level: 29 | parent_ids[level] = title 30 | elif level < current_level: 31 | for i in range(current_level, level, -1): 32 | del parent_ids[i] 33 | 34 | current_level = level 35 | parent_id = parent_ids.get(level - 1, None) 36 | 37 | # 创建节点字典 38 | node = { 39 | 'id': title, 40 | 'topic': title 41 | } 42 | if level == 1: 43 | node['isroot'] = True 44 | else: 45 | node['parentid'] = parent_id 46 | 47 | result.append(node) 48 | 49 | return result 50 | 51 | 52 | def gen_mind(content): 53 | url = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions?access_token=" + get_access_token() 54 | 55 | payload = json.dumps({ 56 | "messages": [ 57 | { 58 | 'role': "user", 59 | 'content': f'我要写一篇文章,标题为“{content}”,请给我推荐一个文章结构,即各级标题(每行都以若干#开头),用markdown语法输出。只要输出markdown内容,不要输出任何其他内容' 60 | } 61 | ], 62 | "temperature": 0.95, 63 | "top_p": 0.8, 64 | "penalty_score": 1, 65 | "disable_search": False, 66 | "enable_citation": False, 67 | "response_format": "text" 68 | }) 69 | headers = { 70 | 'Content-Type': 'application/json' 71 | } 72 | 73 | response = requests.request("POST", url, headers=headers, data=payload) 74 | 75 | markdown = response.json()['result'] 76 | return generate_node_array(markdown) 77 | 78 | 79 | def get_access_token(): 80 | """ 81 | 使用 AK,SK 生成鉴权签名(Access Token) 82 | :return: access_token,或是None(如果错误) 83 | """ 84 | url = "https://aip.baidubce.com/oauth/2.0/token" 85 | params = {"grant_type": "client_credentials", "client_id": API_KEY, "client_secret": SECRET_KEY} 86 | return str(requests.post(url, params=params).json().get("access_token")) 87 | 88 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/ocr/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/intelli/ocr/__init__.py -------------------------------------------------------------------------------- /backend/Edivator/intelli/ocr/ocr_bot.py: -------------------------------------------------------------------------------- 1 | import io 2 | from PIL import Image 3 | import numpy as np 4 | from paddleocr import PaddleOCR, draw_ocr # type: ignore 5 | import base64 6 | 7 | import urllib 8 | import requests 9 | 10 | # from intelli.ocr.test_base64_img_sample import base64_str 11 | 12 | API_KEY = "" 13 | SECRET_KEY = "" 14 | 15 | 16 | def pattern_recognition(base64_image): 17 | url = "https://aip.baidubce.com/rest/2.0/image-classify/v2/advanced_general?access_token=" + get_access_token() 18 | 19 | payload = 'image=' + base64_image + '&baike_num=5' 20 | headers = { 21 | 'Content-Type': 'application/x-www-form-urlencoded', 22 | 'Accept': 'application/json' 23 | } 24 | 25 | response = requests.request("POST", url, headers=headers, data=payload) 26 | 27 | return response.json() 28 | 29 | 30 | def get_access_token(): 31 | """ 32 | 使用 AK,SK 生成鉴权签名(Access Token) 33 | :return: access_token,或是None(如果错误) 34 | """ 35 | url = "https://aip.baidubce.com/oauth/2.0/token" 36 | params = {"grant_type": "client_credentials", 37 | "client_id": API_KEY, "client_secret": SECRET_KEY} 38 | return str(requests.post(url, params=params).json().get("access_token")) 39 | 40 | 41 | class OCRbot(): 42 | def __init__(self, language='ch') -> None: 43 | 44 | self.ocr_service = PaddleOCR(use_angle_cls=True, lang=language) 45 | 46 | def infer_img_base64(self, base64_img_code: str): 47 | img = base64.urlsafe_b64decode(base64_img_code) 48 | image = Image.open(io.BytesIO(img)) 49 | image = np.array(image) 50 | result = self.ocr_service.ocr(image) 51 | return result[0] 52 | 53 | def infer_img_path(self, img_path: str): 54 | result = self.ocr_service.ocr(img_path) 55 | return result 56 | 57 | def infer_img_and_return(self, base64_img_code: str): 58 | result = self.infer_img_base64(base64_img_code) 59 | image = base64.b64decode(base64_img_code) 60 | image = Image.open(io.BytesIO(image)).convert('RGB') 61 | boxes = [line[0] for line in result] 62 | txts = [line[1][0] for line in result] 63 | im_show = draw_ocr(image, boxes, txts, 64 | font_path='./fonts/simfang.ttf') 65 | im_show = Image.fromarray(im_show) 66 | return im_show, txts 67 | 68 | def recognize_pattern(self, base64_img_code: str): 69 | result = pattern_recognition(base64_img_code) 70 | return result 71 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/ocr/readme.md: -------------------------------------------------------------------------------- 1 | # Doc 2 | https://github.com/PaddlePaddle/PaddleOCR/blob/main/doc/doc_ch/quickstart.md -------------------------------------------------------------------------------- /backend/Edivator/intelli/pictures/picture_bot.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | 4 | API_KEY = "" 5 | SECRET_KEY = "" 6 | 7 | 8 | def get_access_token(): 9 | """ 10 | 使用 AK,SK 生成鉴权签名(Access Token) 11 | :return: access_token,或是None(如果错误) 12 | """ 13 | url = "https://aip.baidubce.com/oauth/2.0/token" 14 | params = {"grant_type": "client_credentials", "client_id": API_KEY, "client_secret": SECRET_KEY} 15 | return str(requests.post(url, params=params).json().get("access_token")) 16 | 17 | 18 | def generate(text, resolution="512*512", style=None): 19 | url = "https://aip.baidubce.com/rpc/2.0/wenxin/v1/basic/textToImage?access_token=" + get_access_token() 20 | 21 | data = { 22 | "text": f"{text}", 23 | "resolution": f"{resolution}" 24 | } 25 | if style: 26 | data['style'] = style 27 | 28 | payload = json.dumps(data) 29 | headers = { 30 | 'Content-Type': 'application/json', 31 | 'Accept': 'application/json' 32 | } 33 | 34 | response = requests.request("POST", url, headers=headers, data=payload) 35 | 36 | return response.text 37 | 38 | 39 | def get_img(taskId): 40 | url = "https://aip.baidubce.com/rpc/2.0/wenxin/v1/basic/getImg?access_token=" + get_access_token() 41 | 42 | payload = json.dumps({ 43 | "taskId": f"{taskId}" 44 | }) 45 | headers = { 46 | 'Content-Type': 'application/json', 47 | 'Accept': 'application/json' 48 | } 49 | 50 | response = requests.request("POST", url, headers=headers, data=payload) 51 | 52 | return response.text 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/resume/resume_bot.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | current_dir = os.path.dirname(__file__) 4 | parent_dir = os.path.dirname(current_dir) 5 | sys.path.append(parent_dir) 6 | 7 | from apps.chat import ChatBot 8 | from paddleocr import PaddleOCR 9 | import PyPDF2 10 | 11 | 12 | PAGE_NUM = 5 # 识别的页数 13 | 14 | 15 | def extract_text(pdf_path: str) -> str: 16 | text = extract_text_origin(pdf_path) 17 | if text == "": 18 | text = extract_text_ocr(pdf_path) 19 | return text 20 | 21 | 22 | def extract_text_origin(pdf_path: str) -> str: 23 | with open(pdf_path, 'rb') as pdf: 24 | reader = PyPDF2.PdfReader(pdf) 25 | page_count = len(reader.pages) 26 | txt = "" 27 | for p in range(page_count): 28 | page = reader.pages[p] 29 | txt += page.extract_text() 30 | return txt 31 | 32 | 33 | def extract_text_ocr(pdf_path: str) -> str: 34 | ocr_service = PaddleOCR(use_angle_cls=True, lang="ch", page_num=PAGE_NUM) 35 | result = ocr_service.ocr(pdf_path) 36 | text = "" 37 | for page_idx in range(len(result)): 38 | page_result = result[page_idx] 39 | if page_result is None: 40 | continue 41 | for line in page_result: 42 | text += str(line[1][0]) 43 | text += '\n' 44 | return text 45 | 46 | 47 | def score(pdf_path: str) -> str: 48 | chatbot = ChatBot() 49 | text = extract_text_origin(pdf_path) 50 | prompt = '请帮我给这个简历一个评分,满分100分。注意,返回格式是:[数字]分,不需要其他任何多余信息。\n' 51 | return chatbot.common_chat(prompt + text) 52 | 53 | 54 | def suggest(pdf_path: str) -> str: 55 | chatbot = ChatBot() 56 | text = extract_text_origin(pdf_path) 57 | prompt = '请帮我给这个简历提一些建议,不超过50字。注意,请结合简历具体分析,只需要返回一段建议文字,以“建议:”开头,不需要其他任何多余信息。可以发送一些emoji表情。\n' 58 | return chatbot.common_chat(prompt + text) 59 | 60 | 61 | def innovation(pdf_path: str) -> str: 62 | chatbot = ChatBot() 63 | text = extract_text_origin(pdf_path) 64 | prompt = '请给这个简历提取创新之处,不超过50字。注意,请结合简历具体分析,并且只需要返回一段文字,不需要其他任何多余信息。\n' 65 | return chatbot.common_chat(prompt + text) 66 | 67 | 68 | if __name__ == '__main__': 69 | result = innovation( 70 | "D:/Projects/Edivator/Edivator/intelli/resume/北京航空航天大学_刘雨承_本科3年级-2(1).pdf") 71 | print(result) 72 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/speech/speech_bot.py: -------------------------------------------------------------------------------- 1 | import base64 2 | import urllib 3 | import requests 4 | import json 5 | 6 | from intelli.speech.test import base64_speech 7 | 8 | API_KEY = "" 9 | SECRET_KEY = "" 10 | 11 | 12 | def recognize(file_format, user_id, speech, dev_pid=1537): 13 | url = "https://vop.baidu.com/server_api" 14 | payload = json.dumps({ 15 | "format": file_format, 16 | "rate": 16000, 17 | "channel": 1, 18 | "cuid": f"{user_id}", 19 | "token": get_access_token(), 20 | "speech": speech, 21 | "len": len(base64.b64decode(speech)), 22 | "dev_pid": dev_pid 23 | }) 24 | headers = { 25 | 'Content-Type': 'application/json', 26 | 'Accept': 'application/json' 27 | } 28 | 29 | response = requests.request("POST", url, headers=headers, data=payload) 30 | 31 | return response.text 32 | 33 | 34 | def get_access_token(): 35 | """ 36 | 使用 AK,SK 生成鉴权签名(Access Token) 37 | :return: access_token,或是None(如果错误) 38 | """ 39 | url = "https://aip.baidubce.com/oauth/2.0/token" 40 | params = {"grant_type": "client_credentials", "client_id": API_KEY, "client_secret": SECRET_KEY} 41 | return str(requests.post(url, params=params).json().get("access_token")) 42 | -------------------------------------------------------------------------------- /backend/Edivator/intelli/style/test.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/intelli/style/test.docx -------------------------------------------------------------------------------- /backend/Edivator/intelli/test/test_chat.py: -------------------------------------------------------------------------------- 1 | from apps.chat import ChatBot 2 | 3 | if __name__ == '__main__': 4 | chatbot = ChatBot() 5 | test_txt = """ 6 | 本赛题要求选手实现三大基础功能,功能要求清晰,并在一个产品中,有机融合大模型与小模型技术。 7 | * 功能一:智能润色 8 | 9 | 在功能上:利用大语言模型,根据上下文,实现如摘要、修饰、续写、病句改写、翻译等等常见写作辅助功能; 10 | 在交互形式上:需要考虑到不同能力的整合、管理与切换,降低用户选择负担。 选手可面对某一或某多个特定场景,如大创项目书文档撰写、竞赛文书撰写、代码编辑等,进行功能的合理策划,不求多而全,要把产品置于特定的场景之下,基于对场景的真实有效洞察,进行功能的精致布局。 11 | 12 | 功能二:多媒体信息提取 13 | 14 | 在功能上:利用OCR、目标检测和语音识别等多模态感知技术,实现对图像(如截图、海报、pdf等)、语音甚至视频等多媒体信息的在线信息提取,并能允许用户将内容有机整合到编辑器中。 15 | 在交互形式上:能够有效的管理和检索多模态数据。 除了做多模态信息的转录,选手也可以关注多模态数据如何作为专业领域知识库,成为可以重复利用的结构化知识,丰富编辑器的专业知识辅助能力 。 16 | 17 | 功能三:智能格式排版 18 | 19 | 在功能上:根据内容类型识别,自动进行格式排版,如自动调整字体、字号、行间距等,同时提供多种排版模板供用户选择; 20 | 在交互形式上:注重样式库的管理和二次编辑。选手可以考虑手动输入样式规则,或提取已有文章的格式,两种方式。 21 | 22 | 附加功能:智能信息可视化 23 | 24 | 在功能上:根据内容及可视化类型,结合大语言模型,进行包括但不限于表格生成、思维导图生成和数据可视化生成等功能。 25 | 在交互形式上:选手可以自由发挥,加入动态可视化效果、画布二次编辑等符合用户体验需求的创意点。附加功能合理即可 。 26 | 27 | 本赛题要求选手在功能需求以外,也要关注以下内容: 28 | 29 |  产品体验:网站运行无卡顿,有较好的流畅度;  产品运营:选手需考虑项目可持续性,即如何设计合理的商业付费模式,在产品开发上设置相关付费通道,权衡自身市场化收入与产品本身的资源成本。  产品推广:网站部署后,需以http嵌入的方式,上架至飞桨星河社区应用中心,通过百度AI生态,面向全社会提供服务。  产品孵化:产品获奖后,可以申请百度更多生态宣传资源,在更大范围内获得市场与商业成功。 30 | """ 31 | print(chatbot.common_chat('你好')) 32 | print(chatbot.polish(test_txt)) 33 | print(chatbot.summarize(test_txt)) 34 | -------------------------------------------------------------------------------- /backend/Edivator/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Edivator.settings") 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /backend/Edivator/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/requirements.txt -------------------------------------------------------------------------------- /backend/Edivator/res.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/backend/Edivator/res.jpg -------------------------------------------------------------------------------- /backend/Edivator/start_dahpne.py: -------------------------------------------------------------------------------- 1 | import os 2 | import django 3 | import sys 4 | from daphne.cli import CommandLineInterface 5 | 6 | # 设置环境变量 7 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Edivator.settings') 8 | 9 | # 初始化 Django 应用 10 | django.setup() 11 | 12 | # 启动 Daphne 服务器 13 | sys.argv = ['daphne', '-b', '0.0.0.0', '-p', '8000', 'Edivator.asgi:application'] 14 | CommandLineInterface.entrypoint() 15 | -------------------------------------------------------------------------------- /backend/README.md: -------------------------------------------------------------------------------- 1 | ## 项目启动方式 2 | 3 | `requirements.txt`文件中列出了运行所需环境,用Pycharm打开的话按照提示创建虚拟环境即可 4 | 5 | 启动项目:`python manage.py runserver` -------------------------------------------------------------------------------- /backend/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | backend: 5 | image: edivator-django 6 | build: 7 | context: ./ 8 | dockerfile: dockerfile 9 | volumes: 10 | - ./Edivator:/app 11 | ports: 12 | - "8000:8000" 13 | environment: 14 | PYTHONUNBUFFERED: 1 15 | command: python manage.py runserver 0.0.0.0:8000 16 | restart: unless-stopped 17 | -------------------------------------------------------------------------------- /backend/dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.9 2 | WORKDIR /app 3 | COPY ./Edivator /app/ 4 | RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 libgl1 -y 5 | RUN pip install -r requirements.txt 6 | ENV PYTHONUNBUFFERED=1 7 | ENTRYPOINT ["python", "manage.py", "runserver", "0.0.0.0:8000"] -------------------------------------------------------------------------------- /backend/设计文档 - 副本.md: -------------------------------------------------------------------------------- 1 | # Edivate后端设计文档 2 | 3 | ## 接口说明 4 | 5 | ### 用户相关 6 | 7 | ### 文件相关 8 | 9 | #### 创建文档模板 10 | 11 | > - URL:documents/templates/create/ 12 | > 13 | > - 请求方式:POST 14 | > 15 | > - 请求头参数:jwt校验token,同上 16 | > 17 | > - 请求体参数: 18 | > 19 | > | 参数 | 含义 | 说明 | 20 | > | ----------- | -------- | ------------------------ | 21 | > | name | 模板名 | 字符数限制20(可以修改) | 22 | > | description | 模板描述 | 参数可省略 | 23 | > 24 | > - 返回值:略 25 | > 26 | > - **注**:此操作只有超级用户可执行。 27 | 28 | #### 上传文档中的文件 29 | 30 | > - URL:documents/innner_files/create/ 31 | > 32 | > - 请求方式:POST 33 | > 34 | > - 请求头参数:jwt校验token,同上 35 | > 36 | > - 请求体参数: 37 | > 38 | > | 参数 | 含义 | 说明 | 39 | > | ---------------------- | -------------------------- | ---------------- | 40 | > | file | 要上传的文件 | 目前大小限制10Mb | 41 | > | affiliated_document_id | 要上传的文件所属的文档的id | | 42 | > 43 | >- 返回值:略 44 | > 45 | >- **注**:测试不算很充分 46 | 47 | ### AI相关 48 | 49 | #### 普通大模型对话 50 | 51 | - URL:ai/chat/common_chat/ 52 | 53 | - 请求方式:POST 54 | 55 | - 请求头参数:无 56 | 57 | - 请求体参数: 58 | 59 | | 参数 | 含义 | 说明 | 60 | | ------- | -------- | ---- | 61 | | content | 文本内容 | | 62 | 63 | - 返回值:略 64 | 65 | - **注**:无 66 | 67 | #### ocr识别 68 | 69 | - URL:ai/ocr/infer/ 70 | 71 | - 请求方式:POST 72 | 73 | - 请求头参数:无 74 | 75 | - 请求体参数: 76 | 77 | | 参数 | 含义 | 说明 | 78 | | ---------- | ---------------- | ---- | 79 | | base64_img | base64编码的图片 | | 80 | 81 | - 返回值: 82 | 83 | | 参数 | 含义 | 说明 | 84 | | --------- | ------------ | ---------- | 85 | | image_url | 识别结果url | | 86 | | texts | 识别结果文字 | 字符串列表 | 87 | 88 | - **注**:无 89 | -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /frontend/.npmrc: -------------------------------------------------------------------------------- 1 | @tiptap-pro:registry=https://registry.tiptap.dev/ 2 | //registry.tiptap.dev/:_authToken=6t0AMFKLnTkv1q0OxMNUQAEkKcxV0pkG7rs/mLpjR/x9zAn2u5I+FXl0xELCxWX6 3 | -------------------------------------------------------------------------------- /frontend/.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ -------------------------------------------------------------------------------- /frontend/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": false, 4 | "tabWidth": 4, 5 | "printWidth": 120 6 | } 7 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # edivator2 2 | 3 | ## Project setup 4 | 5 | ``` 6 | npm install 7 | ``` 8 | 9 | ### Compiles and hot-reloads for development 10 | 11 | ``` 12 | npm run serve 13 | ``` 14 | 15 | ### Compiles and minifies for production 16 | 17 | ``` 18 | npm run build 19 | ``` 20 | 21 | ### Lints and fixes files 22 | 23 | ``` 24 | npm run lint 25 | ``` 26 | 27 | ### Customize configuration 28 | 29 | See [Configuration Reference](https://cli.vuejs.org/config/). 30 | -------------------------------------------------------------------------------- /frontend/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'], 3 | } 4 | -------------------------------------------------------------------------------- /frontend/element-tiptap-vue3-niyuta-0.0.1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/element-tiptap-vue3-niyuta-0.0.1.tgz -------------------------------------------------------------------------------- /frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Edivator 8 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/favicon.ico -------------------------------------------------------------------------------- /frontend/public/img/icons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/android-chrome-192x192.png -------------------------------------------------------------------------------- /frontend/public/img/icons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/android-chrome-512x512.png -------------------------------------------------------------------------------- /frontend/public/img/icons/android-chrome-maskable-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/android-chrome-maskable-192x192.png -------------------------------------------------------------------------------- /frontend/public/img/icons/android-chrome-maskable-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/android-chrome-maskable-512x512.png -------------------------------------------------------------------------------- /frontend/public/img/icons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /frontend/public/img/icons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /frontend/public/img/icons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /frontend/public/img/icons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /frontend/public/img/icons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /frontend/public/img/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /frontend/public/img/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/favicon-16x16.png -------------------------------------------------------------------------------- /frontend/public/img/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/favicon-32x32.png -------------------------------------------------------------------------------- /frontend/public/img/icons/msapplication-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/msapplication-icon-144x144.png -------------------------------------------------------------------------------- /frontend/public/img/icons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/public/img/icons/mstile-150x150.png -------------------------------------------------------------------------------- /frontend/public/img/icons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 14 | 15 | 16 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /frontend/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | -------------------------------------------------------------------------------- /frontend/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "app" 3 | version = "0.1.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | license = "" 7 | repository = "" 8 | default-run = "app" 9 | edition = "2021" 10 | rust-version = "1.60" 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [build-dependencies] 15 | tauri-build = { version = "1.5.3", features = [] } 16 | 17 | [dependencies] 18 | serde_json = "1.0" 19 | serde = { version = "1.0", features = ["derive"] } 20 | tauri = { version = "1.7.0", features = [] } 21 | 22 | [features] 23 | # this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. 24 | # If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes. 25 | # DO NOT REMOVE!! 26 | custom-protocol = [ "tauri/custom-protocol" ] 27 | -------------------------------------------------------------------------------- /frontend/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /frontend/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /frontend/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /frontend/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /frontend/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /frontend/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | tauri::Builder::default() 6 | .run(tauri::generate_context!()) 7 | .expect("error while running tauri application"); 8 | } 9 | -------------------------------------------------------------------------------- /frontend/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "beforeBuildCommand": "npm run build", 4 | "beforeDevCommand": "npm run dev", 5 | "devPath": "http://localhost:3000", 6 | "distDir": "../dist" 7 | }, 8 | "package": { 9 | "productName": "edivator", 10 | "version": "0.1.0" 11 | }, 12 | "tauri": { 13 | "allowlist": { 14 | "all": false 15 | }, 16 | "bundle": { 17 | "active": true, 18 | "category": "DeveloperTool", 19 | "copyright": "", 20 | "deb": { 21 | "depends": [] 22 | }, 23 | "externalBin": [], 24 | "icon": [ 25 | "icons/32x32.png", 26 | "icons/128x128.png", 27 | "icons/128x128@2x.png", 28 | "icons/icon.icns", 29 | "icons/icon.ico" 30 | ], 31 | "identifier": "com.edivator.dev", 32 | "longDescription": "", 33 | "macOS": { 34 | "entitlements": null, 35 | "exceptionDomain": "", 36 | "frameworks": [], 37 | "providerShortName": null, 38 | "signingIdentity": null 39 | }, 40 | "resources": [], 41 | "shortDescription": "", 42 | "targets": "all", 43 | "windows": { 44 | "certificateThumbprint": null, 45 | "digestAlgorithm": "sha256", 46 | "timestampUrl": "" 47 | } 48 | }, 49 | "security": { 50 | "csp": null 51 | }, 52 | "updater": { 53 | "active": false 54 | }, 55 | "windows": [ 56 | { 57 | "fullscreen": false, 58 | "height": 600, 59 | "resizable": true, 60 | "title": "edivator", 61 | "width": 800 62 | } 63 | ] 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /frontend/src/App.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 45 | 46 | 71 | -------------------------------------------------------------------------------- /frontend/src/assets/Global/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/Global/avatar.jpg -------------------------------------------------------------------------------- /frontend/src/assets/Login&Register/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/Login&Register/background.png -------------------------------------------------------------------------------- /frontend/src/assets/ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/ai.png -------------------------------------------------------------------------------- /frontend/src/assets/copy-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/copy-icon.png -------------------------------------------------------------------------------- /frontend/src/assets/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/images/avatar.png -------------------------------------------------------------------------------- /frontend/src/assets/images/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/images/card.png -------------------------------------------------------------------------------- /frontend/src/assets/images/chat-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/images/chat-icon.png -------------------------------------------------------------------------------- /frontend/src/assets/images/teamAvatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/images/teamAvatar.png -------------------------------------------------------------------------------- /frontend/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/logo.png -------------------------------------------------------------------------------- /frontend/src/assets/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/logo2.png -------------------------------------------------------------------------------- /frontend/src/assets/yunxiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/assets/yunxiao.png -------------------------------------------------------------------------------- /frontend/src/components/AI/ChatButton.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 25 | 26 | 80 | -------------------------------------------------------------------------------- /frontend/src/components/AI/TextBlock.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | 17 | 28 | -------------------------------------------------------------------------------- /frontend/src/components/Editor/MenuItem.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 24 | 25 | 49 | -------------------------------------------------------------------------------- /frontend/src/components/Editor2/TestEditor.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/components/Editor2/TestEditor.vue -------------------------------------------------------------------------------- /frontend/src/components/GlobalComponents/GlobalSidebar.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 50 | 51 | 73 | -------------------------------------------------------------------------------- /frontend/src/components/Home/CollectList.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 45 | 46 | 99 | -------------------------------------------------------------------------------- /frontend/src/components/Home/MainPage.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 30 | 31 | 84 | -------------------------------------------------------------------------------- /frontend/src/components/Home/PictureList.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | 16 | 39 | -------------------------------------------------------------------------------- /frontend/src/components/SlashMenu/Icon.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 16 | -------------------------------------------------------------------------------- /frontend/src/components/SlashMenu/slash.ts: -------------------------------------------------------------------------------- 1 | import { Extension } from '@tiptap/core' 2 | import suggestion from '@tiptap/suggestion' 3 | 4 | export default Extension.create({ 5 | name: 'slash', 6 | addOptions() { 7 | return { 8 | suggestion: { 9 | char: '/', 10 | command: ({ editor, range, props }) => { 11 | props.command({ editor, range }) 12 | }, 13 | }, 14 | } 15 | }, 16 | 17 | addProseMirrorPlugins() { 18 | return [ 19 | suggestion({ 20 | editor: this.editor, 21 | ...this.options.suggestion, 22 | }), 23 | ] 24 | }, 25 | }) 26 | -------------------------------------------------------------------------------- /frontend/src/components/Staging/StagingChart.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 57 | 58 | 61 | -------------------------------------------------------------------------------- /frontend/src/components/Staging/StagingNavi.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 36 | 37 | 42 | -------------------------------------------------------------------------------- /frontend/src/components/Staging/WordCloud.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 78 | 79 | 85 | -------------------------------------------------------------------------------- /frontend/src/components/Team/MessageList.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 69 | 70 | 89 | -------------------------------------------------------------------------------- /frontend/src/components/registerGlobComp.ts: -------------------------------------------------------------------------------- 1 | import type { App } from 'vue' 2 | import { Input, Layout, Modal, Select } from 'ant-design-vue' 3 | import VXETable from 'vxe-table' 4 | import Antd from 'ant-design-vue' 5 | 6 | export function registerGlobComp(app: App) { 7 | app.use(Input).use(Layout).use(Modal).use(Select).use(VXETable).use(Antd) 8 | } 9 | -------------------------------------------------------------------------------- /frontend/src/extensions/BlockEquation.ts: -------------------------------------------------------------------------------- 1 | import { Node, mergeAttributes } from '@tiptap/core' 2 | import katex from 'katex' 3 | import 'katex/dist/katex.min.css' 4 | 5 | export const BlockEquation = Node.create({ 6 | name: 'blockEquation', 7 | 8 | group: 'block', 9 | content: 'text*', 10 | 11 | addAttributes() { 12 | return { 13 | equation: { 14 | default: '', 15 | }, 16 | } 17 | }, 18 | 19 | parseHTML() { 20 | return [ 21 | { 22 | tag: 'div[data-type="block-equation"]', 23 | }, 24 | ] 25 | }, 26 | 27 | renderHTML({ HTMLAttributes }) { 28 | return ['div', mergeAttributes(HTMLAttributes, { 'data-type': 'block-equation' }), 0] 29 | }, 30 | 31 | addNodeView() { 32 | return ({ node }) => { 33 | const dom = document.createElement('div') 34 | dom.setAttribute('data-type', 'block-equation') 35 | const equation = node.attrs.equation 36 | katex.render(equation, dom, { 37 | displayMode: true, 38 | throwOnError: false, 39 | }) 40 | return { 41 | dom, 42 | } 43 | } 44 | }, 45 | 46 | addCommands() { 47 | return { 48 | setBlockEquation: equation => ({ commands }) => { 49 | return commands.insertContent({ 50 | type: this.name, 51 | attrs: { equation }, 52 | }) 53 | }, 54 | } 55 | }, 56 | }) 57 | -------------------------------------------------------------------------------- /frontend/src/extensions/BlockQuote.ts: -------------------------------------------------------------------------------- 1 | import Blockquote from '@tiptap/extension-blockquote' 2 | 3 | export default Blockquote.extend({ 4 | addCommands() { 5 | return { 6 | setBlockquote: () => ({ commands }) => { 7 | return commands.setNode('blockquote') 8 | }, 9 | toggleBlockquote: () => ({ commands }) => { 10 | return commands.toggleNode('blockquote', 'paragraph') 11 | }, 12 | unsetBlockquote: () => ({ commands }) => { 13 | return commands.lift('blockquote') 14 | }, 15 | } 16 | }, 17 | }) 18 | -------------------------------------------------------------------------------- /frontend/src/extensions/InlineEquation.ts: -------------------------------------------------------------------------------- 1 | import { Node, mergeAttributes } from '@tiptap/core' 2 | import katex from 'katex' 3 | import 'katex/dist/katex.min.css' 4 | 5 | export const InlineEquation = Node.create({ 6 | name: 'inlineEquation', 7 | 8 | inline: true, 9 | group: 'inline', 10 | atom: true, 11 | 12 | addAttributes() { 13 | return { 14 | equation: { 15 | default: '', 16 | }, 17 | } 18 | }, 19 | 20 | parseHTML() { 21 | return [ 22 | { 23 | tag: 'span[data-equation]', 24 | }, 25 | ] 26 | }, 27 | 28 | renderHTML({ HTMLAttributes }) { 29 | return ['span', mergeAttributes(HTMLAttributes, { 'data-equation': HTMLAttributes.equation })] 30 | }, 31 | 32 | addNodeView() { 33 | return ({ node }) => { 34 | const dom = document.createElement('span') 35 | const equation = node.attrs.equation 36 | dom.setAttribute('data-equation', equation) 37 | katex.render(equation, dom, { 38 | throwOnError: false, 39 | }) 40 | return { 41 | dom, 42 | } 43 | } 44 | }, 45 | 46 | addCommands() { 47 | return { 48 | setInlineEquation: equation => ({ commands }) => { 49 | return commands.insertContent({ 50 | type: this.name, 51 | attrs: { equation }, 52 | }) 53 | }, 54 | } 55 | }, 56 | }) 57 | -------------------------------------------------------------------------------- /frontend/src/extensions/Table.ts: -------------------------------------------------------------------------------- 1 | import Table from '@tiptap/extension-table' 2 | import TableRow from '@tiptap/extension-table-row' 3 | import TableCell from '@tiptap/extension-table-cell' 4 | import TableHeader from '@tiptap/extension-table-header' 5 | 6 | export const TableExtensions = [ 7 | Table.configure({ 8 | resizable: true, 9 | }), 10 | TableRow, 11 | TableCell, 12 | TableHeader, 13 | ] 14 | -------------------------------------------------------------------------------- /frontend/src/extensions/TextBlock.ts: -------------------------------------------------------------------------------- 1 | import { Node, mergeAttributes } from '@tiptap/core' 2 | 3 | export const TextBlock = Node.create({ 4 | name: 'textBlock', 5 | 6 | group: 'block', 7 | 8 | content: 'text*', 9 | 10 | parseHTML() { 11 | return [ 12 | { 13 | tag: 'div', 14 | getAttrs: dom => dom.classList.contains('text-block') ? {} : false, 15 | }, 16 | ] 17 | }, 18 | 19 | renderHTML({ HTMLAttributes }) { 20 | return ['div', mergeAttributes(HTMLAttributes, { class: 'text-block' }), 0] 21 | }, 22 | 23 | addNodeView() { 24 | return ({ node, HTMLAttributes }) => { 25 | const dom = document.createElement('div') 26 | dom.setAttribute('class', 'text-block') 27 | dom.setAttribute('style', 'border: 1px solid #e0e0e0; padding: 8px; margin: 4px 0;') 28 | dom.innerText = node.textContent 29 | return { 30 | dom, 31 | contentDOM: dom, 32 | } 33 | } 34 | }, 35 | }) 36 | -------------------------------------------------------------------------------- /frontend/src/extensions/voiceRecognition.ts: -------------------------------------------------------------------------------- 1 | import { Node, mergeAttributes, NodeViewRenderer } from '@tiptap/core' 2 | import { VueNodeViewRenderer } from '@tiptap/vue-3' 3 | import VoiceRecognition from '@/components/AI/VoiceRecognition.vue' 4 | 5 | export default Node.create({ 6 | name: 'voiceRecognition', 7 | 8 | group: 'block', 9 | 10 | atom: true, 11 | 12 | addAttributes() { 13 | return { 14 | content: { 15 | default: '', 16 | }, 17 | editor: { 18 | default: null, 19 | }, 20 | } 21 | }, 22 | 23 | parseHTML() { 24 | return [ 25 | { 26 | tag: 'voice-recognition', 27 | }, 28 | ] 29 | }, 30 | 31 | renderHTML({ HTMLAttributes }) { 32 | return ['voice-recognition', mergeAttributes(HTMLAttributes)] 33 | }, 34 | 35 | addNodeView() { 36 | return VueNodeViewRenderer(VoiceRecognition) 37 | }, 38 | }) 39 | -------------------------------------------------------------------------------- /frontend/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import './registerServiceWorker' 4 | import ElementPlus from 'element-plus' 5 | import 'element-plus/dist/index.css' 6 | import router from './router' 7 | import { createPinia } from 'pinia' 8 | import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' 9 | import 'normalize.css' 10 | import 'ant-design-vue/dist/reset.css' 11 | import 'vxe-table/lib/style.css' 12 | import { message } from 'ant-design-vue' 13 | 14 | import { registerGlobComp } from '@/components/registerGlobComp' 15 | import ElementTiptapPlugin from 'element-tiptap-vue3-niyuta' 16 | import '@/styles/style.css' 17 | const app = createApp(App).use(router).use(ElementPlus).use(createPinia().use(piniaPluginPersistedstate)).use(ElementTiptapPlugin) 18 | app.config.globalProperties.$message = message 19 | registerGlobComp(app) 20 | app.mount('#app') 21 | -------------------------------------------------------------------------------- /frontend/src/registerServiceWorker.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | 3 | import { register } from 'register-service-worker' 4 | 5 | if (process.env.NODE_ENV === 'production') { 6 | register(`${process.env.BASE_URL}service-worker.js`, { 7 | ready() { 8 | console.log( 9 | 'App is being served from cache by a service worker.\n' + 10 | 'For more details, visit https://goo.gl/AFskqB' 11 | ) 12 | }, 13 | registered() { 14 | console.log('Service worker has been registered.') 15 | }, 16 | cached() { 17 | console.log('Content has been cached for offline use.') 18 | }, 19 | updatefound() { 20 | console.log('New content is downloading.') 21 | }, 22 | updated() { 23 | console.log('New content is available; please refresh.') 24 | }, 25 | offline() { 26 | console.log('No internet connection found. App is running in offline mode.') 27 | }, 28 | error(error) { 29 | console.error('Error during service worker registration:', error) 30 | }, 31 | }) 32 | } 33 | -------------------------------------------------------------------------------- /frontend/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | -------------------------------------------------------------------------------- /frontend/src/store/edit.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Poseidon-fan/Edivator/23d44c0102095efa4825f4ff4837aa02d3953840/frontend/src/store/edit.ts -------------------------------------------------------------------------------- /frontend/src/store/editorUpdate.ts: -------------------------------------------------------------------------------- 1 | // src/store/editorUpdate.js 2 | 3 | import { defineStore } from 'pinia' 4 | import { ref } from 'vue' 5 | 6 | export const useEditorUpdateStore = defineStore('editorUpdate', () => { 7 | const editorUpdateInProgress = ref(false) 8 | 9 | return { 10 | editorUpdateInProgress, 11 | } 12 | }, { 13 | persist: { 14 | key: 'editor-update-store', 15 | storage: window.sessionStorage, 16 | paths: ['editorUpdateInProgress'], 17 | } 18 | }) 19 | -------------------------------------------------------------------------------- /frontend/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { h, ref, type Component } from 'vue' 3 | 4 | export const mainStore = defineStore('main', { 5 | state: () => { 6 | return { 7 | helloPinia: '你好 Pinia!', 8 | } 9 | }, 10 | getters: {}, 11 | actions: {}, 12 | persist: true, 13 | }) 14 | 15 | export const useEditorStore = defineStore('editor', () => { 16 | const headings = ref() 17 | const activeHeading = ref() 18 | const editorInstance = ref() 19 | 20 | const setHeadings = (data) => { 21 | headings.value = data 22 | } 23 | const setActiveHeading = (data) => { 24 | activeHeading.value = data 25 | } 26 | const setEditorInstance = (data) => { 27 | console.log(editorInstance.value) 28 | editorInstance.value = data 29 | } 30 | 31 | return { 32 | headings, 33 | setHeadings, 34 | activeHeading, 35 | setActiveHeading, 36 | editorInstance, 37 | setEditorInstance, 38 | } 39 | }, { 40 | persist: { 41 | key: 'editor-store', 42 | storage: window.sessionStorage, 43 | paths: ['headings', 'activeHeading'], 44 | } 45 | }) 46 | -------------------------------------------------------------------------------- /frontend/src/utils/UtilMethod.ts: -------------------------------------------------------------------------------- 1 | import router from '@/router' 2 | import env from './env' 3 | function catAvatarUrl(avatar: string) { 4 | return env.backEnd + avatar 5 | } 6 | 7 | function jump(path: string) { 8 | router.push(path) 9 | } 10 | 11 | function jumpToHome() { 12 | router.push('/documentCardsList') 13 | } 14 | 15 | function jumpToUserHome() { 16 | router.push('/home') 17 | } 18 | 19 | export default { 20 | jump, 21 | jumpToHome, 22 | jumpToUserHome, 23 | } 24 | -------------------------------------------------------------------------------- /frontend/src/utils/env.ts: -------------------------------------------------------------------------------- 1 | const env = { 2 | backEnd: 'http://101.201.173.118/api/', 3 | } 4 | export default env 5 | -------------------------------------------------------------------------------- /frontend/src/views/ChatCenter.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 23 | 24 | -------------------------------------------------------------------------------- /frontend/src/views/Editor/Editor.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 20 | -------------------------------------------------------------------------------- /frontend/src/views/Home/Home.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "esnext", 5 | "strict": false, 6 | "strictNullChecks": false, 7 | "jsx": "preserve", 8 | "moduleResolution": "node", 9 | "skipLibCheck": true, 10 | "esModuleInterop": true, 11 | "allowSyntheticDefaultImports": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "useDefineForClassFields": true, 14 | "sourceMap": true, 15 | "baseUrl": ".", 16 | "types": ["node", "webpack-env"], 17 | "paths": { 18 | "@/*": ["src/*"] 19 | }, 20 | "lib": ["esnext", "dom", "dom.iterable", "scripthost"] 21 | }, 22 | "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx"], 23 | "exclude": ["node_modules"] 24 | } 25 | -------------------------------------------------------------------------------- /frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import { resolve } from 'path' 4 | import VueDevTools from 'vite-plugin-vue-devtools' 5 | 6 | export default defineConfig({ 7 | // prevent vite from obscuring rust errors 8 | clearScreen: false, 9 | plugins: [vue(), VueDevTools()], 10 | // to access the Tauri environment variables set by the CLI with information about the current target 11 | envPrefix: ['VITE_', 'TAURI_PLATFORM', 'TAURI_ARCH', 'TAURI_FAMILY', 'TAURI_PLATFORM_VERSION', 'TAURI_PLATFORM_TYPE', 'TAURI_DEBUG'], 12 | server: { 13 | // Tauri expects a fixed port, fail if that port is not available 14 | strictPort: true, 15 | port: 3000, // 可选:指定开发服务器的端口 16 | // proxy:{ 17 | // '/api':{ 18 | // target:"http://127.0.0.1:8000", //跨域地址 19 | // changeOrigin:true, //支持跨域 20 | // rewrite:(path) => path.replace(/^\/api/, "")//重写路径,替换/api 21 | // } 22 | // } 23 | }, 24 | resolve: { 25 | alias: { 26 | '@': resolve(__dirname, './src'), 27 | '*': resolve(''), 28 | }, 29 | }, 30 | build: { 31 | // Tauri uses Chromium on Windows and WebKit on macOS and Linux 32 | target: process.env.TAURI_PLATFORM == 'windows' ? 'chrome105' : 'safari13', 33 | // don't minify for debug builds 34 | minify: !process.env.TAURI_DEBUG ? 'esbuild' : false, 35 | // 为调试构建生成源代码映射 (sourcemap) 36 | sourcemap: !!process.env.TAURI_DEBUG, 37 | }, 38 | esbuild: { 39 | // drop: ['console', 'debugger'], 40 | }, 41 | }) 42 | -------------------------------------------------------------------------------- /frontend/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service') 2 | module.exports = defineConfig({ 3 | transpileDependencies: true, 4 | lintOnSave: false, 5 | devServer: { 6 | client: { 7 | overlay: { 8 | warnings: false, 9 | errors: false, 10 | }, 11 | }, 12 | }, 13 | publicPath: './', 14 | }) 15 | --------------------------------------------------------------------------------