diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs index 8e66b38..0d56fc1 100644 --- a/electron.vite.config.mjs +++ b/electron.vite.config.mjs @@ -48,6 +48,11 @@ export default defineConfig({ changeOrigin: true, // 改变请求的起源 rewrite: (path) => path.replace(/^\/parth/, '') // 重写路径 }, + '/v1': { + target: 'https://ai.ysaix.com:7864', + changeOrigin: true, + pathRewrite: { '^/v1': '' } + } }, }, plugins: [vue(), WindiCSS()], diff --git a/src/renderer/src/api/mode/index.js b/src/renderer/src/api/mode/index.js new file mode 100644 index 0000000..6d3d02f --- /dev/null +++ b/src/renderer/src/api/mode/index.js @@ -0,0 +1,39 @@ +import request from '@/utils/request' +import axios from 'axios' + +// 查询模板列表 +export function modelList(params) { + return request({ + url: '/education/llmModel/list', + method: 'get', + params + }) +} + +export function conversation(data) { + return axios({ + url: '/v1/api/new_conversation', + method: 'get', + headers: { + isToken: true, + 'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm', + 'Content-Type': 'application/json', + 'Accept': '*/*' + }, + params: data + }) +} + +// 进行课标研读对话 +export function completion(data) { + return axios({ + url: '/v1/api/completion', + method: 'post', + headers: { + 'Authorization':'Bearer ragflow-IwNzMxMTIyOGY0ZTExZWZiOGE2MDI0Mm', + 'Content-Type': 'application/json', + 'Accept': '*/*' + }, + data: data + }) +} \ No newline at end of file diff --git a/src/renderer/src/assets/iconfont/iconfont.css b/src/renderer/src/assets/iconfont/iconfont.css index 2ed596e..d33400a 100644 --- a/src/renderer/src/assets/iconfont/iconfont.css +++ b/src/renderer/src/assets/iconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 4723712 */ - src: url('iconfont.woff2?t=1730448425319') format('woff2'), - url('iconfont.woff?t=1730448425319') format('woff'), - url('iconfont.ttf?t=1730448425319') format('truetype'); + src: url('iconfont.woff2?t=1731315402630') format('woff2'), + url('iconfont.woff?t=1731315402630') format('woff'), + url('iconfont.ttf?t=1731315402630') format('truetype'); } .iconfont { @@ -13,6 +13,26 @@ -moz-osx-font-smoothing: grayscale; } +.icon-ai1:before { + content: "\e70a"; +} + +.icon-duihua:before { + content: "\e60d"; +} + +.icon-bianji1:before { + content: "\e678"; +} + +.icon-a-ziyuan91:before { + content: "\e611"; +} + +.icon-ai:before { + content: "\e626"; +} + .icon-xiaoxi:before { content: "\e677"; } diff --git a/src/renderer/src/assets/iconfont/iconfont.js b/src/renderer/src/assets/iconfont/iconfont.js index 19c4023..9e2529d 100644 --- a/src/renderer/src/assets/iconfont/iconfont.js +++ b/src/renderer/src/assets/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_4723712='',(l=>{var h=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,v,t,i,z,p=function(h,c){c.parentNode.insertBefore(h,c)};if(h&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(h){console&&console.log(h)}}a=function(){var h,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_4723712,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(h=document.body).firstChild?p(c,h.firstChild):h.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),a()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(t=a,i=l.document,z=!1,o(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,M())})}function M(){z||(z=!0,t())}function o(){try{i.documentElement.doScroll("left")}catch(h){return void setTimeout(o,50)}M()}})(window); \ No newline at end of file +window._iconfont_svg_string_4723712='',(l=>{var h=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,v,t,i,z,p=function(h,c){c.parentNode.insertBefore(h,c)};if(h&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(h){console&&console.log(h)}}a=function(){var h,c=document.createElement("div");c.innerHTML=l._iconfont_svg_string_4723712,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(h=document.body).firstChild?p(c,h.firstChild):h.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),a()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(t=a,i=l.document,z=!1,o(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,M())})}function M(){z||(z=!0,t())}function o(){try{i.documentElement.doScroll("left")}catch(h){return void setTimeout(o,50)}M()}})(window); \ No newline at end of file diff --git a/src/renderer/src/assets/iconfont/iconfont.json b/src/renderer/src/assets/iconfont/iconfont.json index 1542e47..3c05b3c 100644 --- a/src/renderer/src/assets/iconfont/iconfont.json +++ b/src/renderer/src/assets/iconfont/iconfont.json @@ -5,6 +5,41 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "41844021", + "name": "ai", + "font_class": "ai1", + "unicode": "e70a", + "unicode_decimal": 59146 + }, + { + "icon_id": "2286510", + "name": "对话", + "font_class": "duihua", + "unicode": "e60d", + "unicode_decimal": 58893 + }, + { + "icon_id": "4093249", + "name": "编辑", + "font_class": "bianji1", + "unicode": "e678", + "unicode_decimal": 59000 + }, + { + "icon_id": "39732311", + "name": "AI分析", + "font_class": "a-ziyuan91", + "unicode": "e611", + "unicode_decimal": 58897 + }, + { + "icon_id": "41784801", + "name": "ai", + "font_class": "ai", + "unicode": "e626", + "unicode_decimal": 58918 + }, { "icon_id": "2158298", "name": "消息", diff --git a/src/renderer/src/assets/iconfont/iconfont.ttf b/src/renderer/src/assets/iconfont/iconfont.ttf index e9417dd..8aa23b4 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.ttf and b/src/renderer/src/assets/iconfont/iconfont.ttf differ diff --git a/src/renderer/src/assets/iconfont/iconfont.woff b/src/renderer/src/assets/iconfont/iconfont.woff index 7d3e222..077f1cf 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.woff and b/src/renderer/src/assets/iconfont/iconfont.woff differ diff --git a/src/renderer/src/assets/iconfont/iconfont.woff2 b/src/renderer/src/assets/iconfont/iconfont.woff2 index bf9da5f..8dea413 100644 Binary files a/src/renderer/src/assets/iconfont/iconfont.woff2 and b/src/renderer/src/assets/iconfont/iconfont.woff2 differ diff --git a/src/renderer/src/components/template-study/container/dialog.vue b/src/renderer/src/components/template-study/container/dialog.vue new file mode 100644 index 0000000..e1cd782 --- /dev/null +++ b/src/renderer/src/components/template-study/container/dialog.vue @@ -0,0 +1,135 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/header.vue b/src/renderer/src/components/template-study/container/header.vue new file mode 100644 index 0000000..100545c --- /dev/null +++ b/src/renderer/src/components/template-study/container/header.vue @@ -0,0 +1,124 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/pdf.vue b/src/renderer/src/components/template-study/container/pdf.vue new file mode 100644 index 0000000..26f1ea9 --- /dev/null +++ b/src/renderer/src/components/template-study/container/pdf.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/result.vue b/src/renderer/src/components/template-study/container/result.vue new file mode 100644 index 0000000..2efeb1e --- /dev/null +++ b/src/renderer/src/components/template-study/container/result.vue @@ -0,0 +1,356 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/template-study/index.vue b/src/renderer/src/components/template-study/index.vue new file mode 100644 index 0000000..37d443e --- /dev/null +++ b/src/renderer/src/components/template-study/index.vue @@ -0,0 +1,44 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue index 8d69928..d183267 100644 --- a/src/renderer/src/layout/components/Aside.vue +++ b/src/renderer/src/layout/components/Aside.vue @@ -12,7 +12,7 @@