diff --git a/src/renderer/src/api/ai/index.js b/src/renderer/src/api/ai/index.js new file mode 100644 index 0000000..ef5cfd6 --- /dev/null +++ b/src/renderer/src/api/ai/index.js @@ -0,0 +1,20 @@ +import request from '@/utils/request' + +// 创建对话 +export const createChart = ({ headers, data }) => { + return request({ + url: '/qf/createChart', + method: 'post', + headers, + data, + }) +} +// 大模型对话 +export const sendChart = ({ headers, data }) => { + return request({ + url: '/qf/sendTalk', + method: 'post', + headers, + 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 623c98c..da8460e 100644 --- a/src/renderer/src/assets/iconfont/iconfont.css +++ b/src/renderer/src/assets/iconfont/iconfont.css @@ -1,9 +1,9 @@ @font-face { font-family: "iconfont"; /* Project id 2794390 */ - src: url('iconfont.woff2?t=1725691484835') format('woff2'), - url('iconfont.woff?t=1725691484835') format('woff'), - url('iconfont.ttf?t=1725691484835') format('truetype'), - url('iconfont.svg?t=1725691484835#iconfont') format('svg'); + src: url('iconfont.woff2?t=1725847033097') format('woff2'), + url('iconfont.woff?t=1725847033097') format('woff'), + url('iconfont.ttf?t=1725847033097') format('truetype'), + url('iconfont.svg?t=1725847033097#iconfont') format('svg'); } .iconfont { @@ -14,6 +14,10 @@ -moz-osx-font-smoothing: grayscale; } +.icon-aijiqiren:before { + content: "\e73c"; +} + .icon-saoyisao:before { content: "\e691"; } diff --git a/src/renderer/src/assets/iconfont/iconfont.js b/src/renderer/src/assets/iconfont/iconfont.js index ec85b94..acf827f 100644 --- a/src/renderer/src/assets/iconfont/iconfont.js +++ b/src/renderer/src/assets/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_2794390='',(l=>{var h=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,t,z,i,p,v=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_2794390,(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?v(c,h.firstChild):h.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),a()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(z=a,i=l.document,p=!1,d(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,M())})}function M(){p||(p=!0,z())}function d(){try{i.documentElement.doScroll("left")}catch(h){return void setTimeout(d,50)}M()}})(window); \ No newline at end of file +window._iconfont_svg_string_2794390='',(l=>{var c=(h=(h=document.getElementsByTagName("script"))[h.length-1]).getAttribute("data-injectcss"),h=h.getAttribute("data-disable-injectsvg");if(!h){var a,t,z,i,p,v=function(c,h){h.parentNode.insertBefore(c,h)};if(c&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}a=function(){var c,h=document.createElement("div");h.innerHTML=l._iconfont_svg_string_2794390,(h=h.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",h=h,(c=document.body).firstChild?v(h,c.firstChild):c.appendChild(h))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),a()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(z=a,i=l.document,p=!1,d(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,M())})}function M(){p||(p=!0,z())}function d(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(d,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 872d803..1536757 100644 --- a/src/renderer/src/assets/iconfont/iconfont.json +++ b/src/renderer/src/assets/iconfont/iconfont.json @@ -5,6 +5,13 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "34666608", + "name": "ai机器人", + "font_class": "aijiqiren", + "unicode": "e73c", + "unicode_decimal": 59196 + }, { "icon_id": "12657402", "name": "资源库", diff --git a/src/renderer/src/assets/iconfont/iconfont.svg b/src/renderer/src/assets/iconfont/iconfont.svg index 0be4660..4949c8e 100644 --- a/src/renderer/src/assets/iconfont/iconfont.svg +++ b/src/renderer/src/assets/iconfont/iconfont.svg @@ -14,6 +14,8 @@ /> + + diff --git a/src/renderer/src/assets/iconfont/iconfont.ttf b/src/renderer/src/assets/iconfont/iconfont.ttf index 9e198f4..43ac2dc 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 8185a5b..10961b9 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 acbf5ae..e8cb594 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/assets/images/ai-01.png b/src/renderer/src/assets/images/ai-01.png new file mode 100644 index 0000000..f2c02f2 Binary files /dev/null and b/src/renderer/src/assets/images/ai-01.png differ diff --git a/src/renderer/src/assets/images/ai-02.png b/src/renderer/src/assets/images/ai-02.png new file mode 100644 index 0000000..f330465 Binary files /dev/null and b/src/renderer/src/assets/images/ai-02.png differ diff --git a/src/renderer/src/assets/images/ai-03.png b/src/renderer/src/assets/images/ai-03.png new file mode 100644 index 0000000..c7e3c98 Binary files /dev/null and b/src/renderer/src/assets/images/ai-03.png differ diff --git a/src/renderer/src/assets/images/ai-04.png b/src/renderer/src/assets/images/ai-04.png new file mode 100644 index 0000000..09cd45a Binary files /dev/null and b/src/renderer/src/assets/images/ai-04.png differ diff --git a/src/renderer/src/components/ai-chart/container/text.vue b/src/renderer/src/components/ai-chart/container/text.vue new file mode 100644 index 0000000..68524ae --- /dev/null +++ b/src/renderer/src/components/ai-chart/container/text.vue @@ -0,0 +1,47 @@ + + + {{ displayedText }} + + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/ai-chart/index.vue b/src/renderer/src/components/ai-chart/index.vue new file mode 100644 index 0000000..af8e99e --- /dev/null +++ b/src/renderer/src/components/ai-chart/index.vue @@ -0,0 +1,449 @@ + + + + + + + + + + + + + 教学助手 + + + + + + + + + + + 你好,{{ userStore.nickName }} + 我是AIx教学助手,我可以帮助你: + + + + + + {{ item.title }} + {{ item.secondTit }} + + + + + + + + + + + {{ item.content }} + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/renderer/src/layout/index.vue b/src/renderer/src/layout/index.vue index 4768cd4..2dba250 100644 --- a/src/renderer/src/layout/index.vue +++ b/src/renderer/src/layout/index.vue @@ -14,6 +14,7 @@ + @@ -23,6 +24,7 @@ import { useRouter } from 'vue-router' import Header from './components/Header.vue' import AppMain from './components/AppMain.vue' import Uploader from './components/Uploader.vue' +import AiChart from '@/components/ai-chart/index.vue' import uploaderState from '@/store/modules/uploader' import { ref } from 'vue' diff --git a/src/renderer/src/views/desktop/index.vue b/src/renderer/src/views/desktop/index.vue index 566d764..97bb4aa 100644 --- a/src/renderer/src/views/desktop/index.vue +++ b/src/renderer/src/views/desktop/index.vue @@ -254,6 +254,7 @@ onMounted(async ()=>{ .iconfont{ font-size: 28px; color: #707070; + font-weight: bold; } &:hover{ color: #409EFF;