Merge branch 'master' of http://47.103.154.90:83/r/WI/Web.V1.0
| | |
| | | redirect: null, |
| | | showTitle: false, |
| | | }, |
| | | //åºç¨åºæ¯ |
| | | //åºç¨åºæ¯(ä¸»åºæ¯æ ¹æ®å½åIDæ¾ç¤ºæ¬¡åºæ¯) |
| | | { |
| | | name: 'Scenario', |
| | | isKeepAlive: false, |
| | |
| | | redirect: null, |
| | | showTitle: true, |
| | | }, |
| | | //åºç¨åºæ¯(ä¸»åºæ¯æ¾ç¤ºææçæ¬¡åºæ¯) |
| | | { |
| | | name: 'AllScenario', |
| | | isKeepAlive: false, |
| | | isAffix: false, |
| | | path: '/AllScenario', |
| | | component: '/project/ch/home/AllScenario.vue', |
| | | redirect: null, |
| | | showTitle: true, |
| | | }, |
| | | //åºç¨åºæ¯è¯¦æ
|
| | | { |
| | | name: 'ScenarioDetails', |
| | |
| | | SortCode: 5, |
| | | Description: '', |
| | | }, |
| | | { |
| | | Children: [], |
| | | ID: '1', |
| | | ParentID: '0', |
| | | Type: 2, |
| | | Name: 'åºç¨åºæ¯', |
| | | Path: '/AllScenario', |
| | | Permission: '', |
| | | Icon: '', |
| | | IsIframe: false, |
| | | OutLink: '', |
| | | IsHide: true, |
| | | Weight: 0, |
| | | SortCode: 5, |
| | | Description: '', |
| | | }, |
| | | ]; |
| | | |
| | | |
| | | const c = [ |
| | | { |
| | | "group_id": "d0b8cdd94b07407190a594eb35297055", |
| | | "group_title": "chat room", |
| | | "chat_count": "2", |
| | | "create_time": "2024-07-06 19:54:10" |
| | | group_id: 'd0b8cdd94b07407190a594eb35297055', |
| | | group_title: 'chat room', |
| | | chat_count: '2', |
| | | create_time: '2024-07-06 19:54:10', |
| | | }, |
| | | { |
| | | "group_id": "a2daa57b53b44a089fed94cc876673d9", |
| | | "group_title": "chat room", |
| | | "chat_count": "0", |
| | | "create_time": "2024-07-06 22:50:30" |
| | | group_id: 'a2daa57b53b44a089fed94cc876673d9', |
| | | group_title: 'chat room', |
| | | chat_count: '0', |
| | | create_time: '2024-07-06 22:50:30', |
| | | }, |
| | | { |
| | | "group_id": "89b89d6920a640a9a7179909644beca8", |
| | | "group_title": "chat room", |
| | | "chat_count": "0", |
| | | "create_time": "2024-07-06 22:50:59" |
| | | group_id: '89b89d6920a640a9a7179909644beca8', |
| | | group_title: 'chat room', |
| | | chat_count: '0', |
| | | create_time: '2024-07-06 22:50:59', |
| | | }, |
| | | { |
| | | "group_id": "bf3e1aa15c22414faab077cffd694cf1", |
| | | "group_title": "chat room", |
| | | "chat_count": "0", |
| | | "create_time": "2024-07-06 22:51:19" |
| | | group_id: 'bf3e1aa15c22414faab077cffd694cf1', |
| | | group_title: 'chat room', |
| | | chat_count: '0', |
| | | create_time: '2024-07-06 22:51:19', |
| | | }, |
| | | { |
| | | "group_id": "7d95ede8afab4366aaa88171d974ca4e", |
| | | "group_title": "chat room", |
| | | "chat_count": "0", |
| | | "create_time": "2024-07-06 22:51:24" |
| | | group_id: '7d95ede8afab4366aaa88171d974ca4e', |
| | | group_title: 'chat room', |
| | | chat_count: '0', |
| | | create_time: '2024-07-06 22:51:24', |
| | | }, |
| | | { |
| | | "group_id": "f1603a395feb4fbfa52304274034346d", |
| | | "group_title": "chat room", |
| | | "chat_count": "0", |
| | | "create_time": "2024-07-06 22:51:42" |
| | | } |
| | | ] |
| | | group_id: 'f1603a395feb4fbfa52304274034346d', |
| | | group_title: 'chat room', |
| | | chat_count: '0', |
| | | create_time: '2024-07-06 22:51:42', |
| | | }, |
| | | ]; |
| | | |
| | | c.sort((a,b)=>a.create_time.localeCompare(b.create_time)); |
| | |
| | | id: 1, |
| | | icon: '/static/images/wave/AsideIcon.png', |
| | | title: 'åºç¨åºæ¯', |
| | | routerName: 'Scenario', |
| | | routerName: 'AllScenario', |
| | | }, |
| | | { |
| | | id: 2, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- åºç¨åºæ¯ --> |
| | | <div class="w100 h100 box-border text-[14px] bg-[#f7f8fa] overflow-auto pr-[32px] pb-[50px] pl-[32px] pt-[42px]"> |
| | | <div class="set-body"> |
| | | <!-- <div class="productivity recently"> |
| | | <p class="mb-[24px] flex items-center"> |
| | | <el-icon color="#409eff" :size="20" class="mr-2"><Clock /></el-icon> |
| | | <span>æè¿ä½¿ç¨</span> |
| | | </p> |
| | | <div class="flex flex-wrap items-center"> |
| | | <div class="list_app" v-for="item in state.recentlyList" :key="item.ID" > |
| | | <img :src="item.Icon" alt="" class="w-[20px] h-[20px] mr-[14px]" /> |
| | | <span class="text-[14px] text-[#333f4e]">{{ item.Name }}</span> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | <div |
| | | class="productivity" |
| | | v-for="product in state.productivityList" |
| | | :key="product.section_id" |
| | | v-show="product.children && product.children.length > 0" |
| | | > |
| | | <div class="mb-[24px]"> |
| | | <span class="productivity-span"><i></i>{{ product.section_name }}</span> |
| | | </div> |
| | | <div class="flex flex-wrap items-center"> |
| | | , |
| | | <div class="list_app" v-for="item in product.children" :key="item.section_id" @click="changeApp(product.section_id, item)"> |
| | | <img :src="item.Icon" alt="" class="w-[20px] h-[20px] mr-[14px]" /> |
| | | <span class="text-[14px] text-[#333f4e]">{{ item.section_name }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { onMounted, reactive } from 'vue'; |
| | | import { getSectionByAllList } from '/@/api/ai/chat'; |
| | | |
| | | import router from '/@/router'; |
| | | let state = reactive({ |
| | | recentlyList: [ |
| | | { |
| | | ID: 1, |
| | | Name: '项ç®ç®¡ç', |
| | | Icon: '/static/images/scene/scene_1.png', |
| | | }, |
| | | { |
| | | ID: 2, |
| | | Name: 'å·¥ä½å
容', |
| | | Icon: '/static/images/scene/scene_2.png', |
| | | }, |
| | | ], //æè¿ä½¿ç¨ |
| | | productivityList: [], //éç¨çåºæ¯ |
| | | }); |
| | | //忢å°åºç¨åºæ¯è¯¦æ
çäºä»¶ |
| | | const changeApp = (section_id, item: any) => { |
| | | if (section_id === 'office_assistant') { |
| | | router.push({ |
| | | name: 'ScenarioDetails', |
| | | query: { |
| | | ID: section_id, |
| | | Name: item.section_name, |
| | | Title: item.section_title, |
| | | }, |
| | | }); |
| | | } |
| | | }; |
| | | const getSectionByList = async () => { |
| | | const res = await getSectionByAllList(); |
| | | const iconList = ['/static/images/scene/scene_1.png', '/static/images/scene/scene_2.png', '/static/images/scene/scene_3.png']; |
| | | res.sections.forEach((item: any) => { |
| | | if (item.children && item.children.length > 0) { |
| | | item.children = item.children.map((child: any) => { |
| | | child.Icon = iconList[Math.floor(Math.random() * 3)]; |
| | | return child; |
| | | }); |
| | | } |
| | | }); |
| | | state.productivityList = res.sections; |
| | | }; |
| | | onMounted(() => { |
| | | getSectionByList(); |
| | | }); |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .set-body { |
| | | max-width: 1000px; |
| | | min-height: calc(100% - 42px); |
| | | margin: 0 auto; |
| | | -webkit-box-sizing: border-box; |
| | | box-sizing: border-box; |
| | | border-radius: 8px; |
| | | margin-top: 32px; |
| | | -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.16); |
| | | box-shadow: 0 0 1px rgba(0, 0, 0, 0.16); |
| | | .productivity { |
| | | padding: 24px 30px 10px; |
| | | background-color: #fff; |
| | | margin-bottom: 20px; |
| | | border-radius: 12px; |
| | | p { |
| | | span { |
| | | font-size: 14px; |
| | | color: #081735; |
| | | line-height: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | .list_app { |
| | | width: 180px; |
| | | display: flex; |
| | | align-items: center; |
| | | border-radius: 8px; |
| | | border: 1px solid #ccc; |
| | | padding: 15px; |
| | | margin-right: 14px; |
| | | margin-bottom: 14px; |
| | | cursor: pointer; |
| | | position: relative; |
| | | background-color: #fff; |
| | | &:hover { |
| | | border: 1px solid #1c86ff; |
| | | } |
| | | } |
| | | .productivity-span { |
| | | font-size: 14px; |
| | | color: #081735; |
| | | line-height: 20px; |
| | | display: flex; |
| | | align-items: center; |
| | | i { |
| | | display: block; |
| | | width: 4px; |
| | | height: 14px; |
| | | background: #1c86ff; |
| | | border-radius: 0 100px 100px 0; |
| | | margin-right: 10px; |
| | | } |
| | | } |
| | | } |
| | | .recently { |
| | | border: 1px solid #e5eaf9; |
| | | background-color: #e9eff8; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | class="productivity" |
| | | v-for="product in state.productivityList" |
| | | :key="product.section_id" |
| | | v-show="product.children && product.children.length > 0" |
| | | v-show="state.productivityList && state.productivityList.length > 0" |
| | | > |
| | | <div class="mb-[24px]"> |
| | | <span class="productivity-span"><i></i>{{ product.section_name }}</span> |
| | | </div> |
| | | <div class="flex flex-wrap items-center"> |
| | | , |
| | | <div class="list_app" v-for="item in product.children" :key="item.section_id" @click="changeApp(product.section_id, item)"> |
| | | <img :src="item.Icon" alt="" class="w-[20px] h-[20px] mr-[14px]" /> |
| | | <span class="text-[14px] text-[#333f4e]">{{ item.section_name }}</span> |
| | | <div class="list_app" @click="changeApp(product.section_id, product)"> |
| | | <img :src="product.Icon" alt="" class="w-[20px] h-[20px] mr-[14px]" /> |
| | | <span class="text-[14px] text-[#333f4e]">{{ product.section_name }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-empty description="ææ æ°æ®" v-show="state.productivityList.length === 0" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { onMounted, reactive } from 'vue'; |
| | | import { getSectionByAllList } from '/@/api/ai/chat'; |
| | | |
| | | import { useRoute } from 'vue-router'; |
| | | import { getSectionByIdList } from '/@/api/ai/chat'; |
| | | import router from '/@/router'; |
| | | const route = useRoute(); |
| | | let state = reactive({ |
| | | recentlyList: [ |
| | | { |
| | |
| | | }, |
| | | ], //æè¿ä½¿ç¨ |
| | | productivityList: [], //éç¨çåºæ¯ |
| | | scenarioID: null, |
| | | }); |
| | | //忢å°åºç¨åºæ¯è¯¦æ
çäºä»¶ |
| | | const changeApp = (section_id, item: any) => { |
| | | if (section_id === 'office_summarize') { |
| | | router.push({ |
| | | name: 'ScenarioDetails', |
| | | query: { |
| | |
| | | Title: item.section_title, |
| | | }, |
| | | }); |
| | | } |
| | | }; |
| | | const getSectionByList = async () => { |
| | | const res = await getSectionByAllList(); |
| | | const res = await getSectionByIdList({ section_a_id: state.scenarioID }); |
| | | const iconList = ['/static/images/scene/scene_1.png', '/static/images/scene/scene_2.png', '/static/images/scene/scene_3.png']; |
| | | res.sections.forEach((item: any) => { |
| | | if (item.children && item.children.length > 0) { |
| | | item.children = item.children.map((child: any) => { |
| | | res.sections.forEach((child: any) => { |
| | | child.Icon = iconList[Math.floor(Math.random() * 3)]; |
| | | return child; |
| | | }); |
| | | } |
| | | }); |
| | | state.productivityList = res.sections; |
| | | }; |
| | | onMounted(() => { |
| | | state.scenarioID = route.query.ID; |
| | | getSectionByList(); |
| | | }); |
| | | </script> |
| | |
| | | <i class="ywicon icon-gongzuozongjie text-[#1c86ff]" style="font-size: 20px !important"></i> |
| | | <span class="text-[14px] text-[#000] leading-5 ml-1">{{ state.select_name ? state.select_name : '' }}</span> |
| | | </div> |
| | | <el-select v-model="state.seriesModel" placeholder="è¯·éæ©" size="large" @change="handleModelChange"> |
| | | <!-- <el-select v-model="state.seriesModel" placeholder="è¯·éæ©" size="large" @change="handleModelChange"> |
| | | <el-option v-for="item in state.modelOptionList" :key="item.id" :label="item.title" :value="item.id" /> |
| | | </el-select> |
| | | </el-select> --> |
| | | </div> |
| | | <div class="pt-[30px]"> |
| | | <el-form |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { onMounted, reactive, computed } from 'vue'; |
| | | import { computed, onMounted, reactive } from 'vue'; |
| | | import { getSectionList } from '/@/api/ai/chat'; |
| | | import router from '/@/router'; |
| | | import { activeRoomId, activeSectionAId, setRoomConfig } from '/@/stores/chatRoom'; |
| | |
| | | const getMainSectionList = async () => { |
| | | const res = await getSectionList(); |
| | | let result = []; |
| | | const iconList = ['biaodan', 'putong', 'zhongduancanshuchaxun', 'shidu']; |
| | | const iconList = [ |
| | | 'biaodan', |
| | | 'putong', |
| | | 'zhongduancanshuchaxun', |
| | | 'shidu', |
| | | 'fuwenbenkuang', |
| | | 'fuwenben', |
| | | 'jiliandongxuanzeqi', |
| | | 'jinridaiban', |
| | | 'gongju', |
| | | ]; |
| | | res.sections.forEach((sectionItem, index) => { |
| | | sectionItem.Icon = iconList[index]; |
| | | }); |
| | |
| | | const lookMore = () => { |
| | | router.push({ |
| | | name: 'Scenario', |
| | | query: { |
| | | ID: activeSectionAId.value, |
| | | }, |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | |
| | | <p class="set-waterTitle"><strong>WI æ°´å¡æºè½ä¸å®¶</strong>æºæ
§æ°´å¡å©æ</p> |
| | | </div> |
| | | <div class="flex items-center pc-roleList"> |
| | | <div v-for="(item, index) in llmList" :key="item.logicId" class="flex items-center pl-6" @click="handleClick(item)"> |
| | | <!-- <div v-for="(item, index) in llmList" :key="item.logicId" class="flex items-center pl-6" @click="handleClick(item)"> |
| | | <div class="modelItem cursor-pointer flex items-center" :class="{ modelItemActive: item.logicId === activeLLMId }"> |
| | | <img :src="item.icon" alt="icon" class="set-icon box-border" /> |
| | | <span>{{ item.logicTitle }}</span> |
| | | </div> |
| | | <!-- <el-tooltip :content="item.Content" placement="top" effect="light" popper-class="my-pop"> |
| | | <div class="modelItem cursor-pointer flex items-center " :class="{ modelItemActive: item.ID === state.activeRole }"> |
| | | <img :src="item.Icon" alt="icon" class="set-icon box-border" /> |
| | | <span>{{ item.Title }}</span> |
| | | </div> |
| | | </el-tooltip> --> |
| | | </div> |
| | | <div class="flex items-center cursor-pointer pl-5"> |
| | | <div class="modelItem cursor-pointer flex items-center"> |
| | | <img src="/static/images/wave/More.png" alt="icon" class="set-icon-more box-border" /> |
| | | <span>æ´å¤</span> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <PlayBar v-model="inputValue" @send-click="sendClick" /> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { onMounted, reactive, ref } from 'vue'; |
| | | import { GetLLMList, SetLLM } from '/@/api/ai/chat'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { onMounted, ref } from 'vue'; |
| | | import { GetLLMList } from '/@/api/ai/chat'; |
| | | import PlayBar from '/@/components/chat/components/playBar/PlayBar.vue'; |
| | | import router from '/@/router'; |
| | | import { activeChatRoom, activeLLMId, activeSectionAId } from '/@/stores/chatRoom'; |
| | | import emitter from '/@/utils/mitt'; |
| | | import { ElMessage } from 'element-plus'; |
| | | const emits = defineEmits(['sendClick']); |
| | | const inputValue = ref(''); |
| | | |
| | |
| | | }, |
| | | }); |
| | | }; |
| | | let state = reactive({ |
| | | roleList: [ |
| | | { |
| | | ID: 1, |
| | | Icon: '/static/images/wave/Glm.jpg', |
| | | Title: 'æ°´å¡GLM', |
| | | Content: 'ä½¿ç¨æä¸ºå¹¿æ³çç¥åAI模åï¼ååºéåº¦å¿«ï¼æºè½åç¨åº¦é«ï¼æ
é¿å¤é¢åé®é¢è§£å³ï¼å
æ¬åä½ãç¿»è¯ãå¤è¯ç§ç¾ç§ç¥è¯ãæ°å¦é®é¢çã', |
| | | }, |
| | | { |
| | | ID: 2, |
| | | Icon: '/static/images/wave/Glm.jpg', |
| | | Title: 'æ°´å¡-3.5', |
| | | Content: |
| | | 'ç®åä¸çæå¼ºå¤§ç模åï¼å¨éè¦é«çº§æ¨çãæ·±åº¦æä»¤çè§£åæ´å
·åé åçä»»å¡ä¸ï¼è¡¨ç°æ¯å
¶ä»æ¨¡åæ´å¼ºï¼ä¾å¦å¤æçææ¬åé»è¾åæãå¤æçæ°å¦é®é¢çã', |
| | | }, |
| | | { |
| | | ID: 3, |
| | | Icon: '/static/images/wave/Glm.jpg', |
| | | Title: 'æ°´å¡-4.0', |
| | | Content: |
| | | 'ç®åä¸çæå¼ºå¤§ç模åï¼å¨éè¦é«çº§æ¨çãæ·±åº¦æä»¤çè§£åæ´å
·åé åçä»»å¡ä¸ï¼è¡¨ç°æ¯å
¶ä»æ¨¡åæ´å¼ºï¼ä¾å¦å¤æçææ¬åé»è¾åæãå¤æçæ°å¦é®é¢çã', |
| | | }, |
| | | ], |
| | | activeRole: 0, |
| | | }); |
| | | |
| | | const llmList = ref([]); |
| | | const iconList = ['/static/images/wave/Glm.jpg', '/static/images/wave/Glm.jpg', '/static/images/wave/Glm.jpg']; |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getLLMList(); |
| | | // getLLMList(); |
| | | emitter.on('updateChatInput', (value) => { |
| | | inputValue.value = value; |
| | | }); |