From 160793b11c43b362f788378e7c4b44a45adb4e2c Mon Sep 17 00:00:00 2001 From: yangqiao <2818046800@qq.com> Date: Mon, 24 Feb 2025 15:09:00 +0800 Subject: [PATCH] 'pagedit' --- frontend/src/components/TextareaView.vue | 11 +++-- frontend/src/lang/en.ts | 54 ++++++++++++------------ frontend/src/lang/zh.ts | 54 ++++++++++++------------ frontend/src/view/home/index.vue | 2 +- frontend/src/view/reasoning/index.less | 1 + frontend/src/view/reasoning/index.vue | 8 +++- 6 files changed, 72 insertions(+), 58 deletions(-) diff --git a/frontend/src/components/TextareaView.vue b/frontend/src/components/TextareaView.vue index a97a12a..546b94c 100755 --- a/frontend/src/components/TextareaView.vue +++ b/frontend/src/components/TextareaView.vue @@ -3,7 +3,9 @@
{{generateTitle('发送')}}{{ generateTitle('发送') }}
@@ -20,7 +23,7 @@ import { ref, defineProps, defineEmits, defineExpose } from 'vue' import { Promotion } from '@element-plus/icons-vue' import { ElMessage } from 'element-plus' -import {generateTitle} from '../utils/i18n' +import { generateTitle } from '../utils/i18n' // import { chat } from "../api/user"; const handleKeydown = (event: any) => { @@ -39,6 +42,7 @@ const props = defineProps({ const chatData = ref({ // chat_id: '', + source: 'user', content: '' }) //如何在室温条件下合成CsPbBr3 @@ -57,6 +61,7 @@ const submitFun = async () => { emits('submitFun', JSON.stringify(chatData.value)) chatData.value = { // chat_id: '', + source: 'user', content: '' } } diff --git a/frontend/src/lang/en.ts b/frontend/src/lang/en.ts index 96b2481..0916fc9 100755 --- a/frontend/src/lang/en.ts +++ b/frontend/src/lang/en.ts @@ -1,31 +1,33 @@ export default { - routers:{ - logOut:'Log Out', - restore:'Restore data', - '智能协作无界,材料创新无限':'Collaborative Intelligence, Revolutionary Materials', - '问题设定':'Problem Setting', - '模型名称':'Model Name', - '新建对话':'Create New Conversation', - '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。':'The reasoning is complete. If you wish to learn more, you can continue to ask questions or create a new conversation in the box below.', - '推理中':'In Reasoning', - '角色':'Role', - '模型调用流程':'Model Calling Process', - '发送':'send', - '您好,多智能体MARS为您服务':'Hello,multi-agent MARS is at your service', - '推荐问题':'Recommended Questions', - '在此输入您的问题或需求,有问必答,Shift+Enter换行':'Enter your question or requirement here, answer all questions, Shift+Enter line break', - 'MARS多智能体材料创制系统':'MARS Model Creation System', - '账号':'account', - '密码':'password', - '验证码':'code', - '登录':'login', - '请输入账号':'Please enter your account', - '请输入密码':'Please enter your password', - '请输入验证码':'Please enter your code', - '验证码错误':'code error', - '请输入问题':'Please enter the question', - '回答输出中,暂不能再次提问':'Answer output, cannot be asked again temporarily', + routers: { + logOut: 'Log Out', + restore: 'Restore data', + '智能协作无界,材料创新无限': 'Collaborative Intelligence, Revolutionary Materials', + '问题设定': 'Problem Setting', + '模型名称': 'Model Name', + '新建对话': 'Create New Conversation', + '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。': 'The reasoning is complete. If you wish to learn more, you can continue to ask questions or create a new conversation in the box below.', + '推理中': 'In Reasoning', + '角色': 'Role', + '模型调用流程': 'Model Calling Process', + '发送': 'send', + '您好,多智能体MARS为您服务': 'Hello,multi-agent MARS is at your service', + '推荐问题': 'Recommended Questions', + '在此输入您的问题或需求,有问必答,Shift+Enter换行': 'Enter your question or requirement here, answer all questions, Shift+Enter line break', + 'MARS多智能体材料创制系统': 'MARS Model Creation System', + '账号': 'account', + '密码': 'password', + '验证码': 'code', + '登录': 'login', + '请输入账号': 'Please enter your account', + '请输入密码': 'Please enter your password', + '请输入验证码': 'Please enter your code', + '验证码错误': 'code error', + '请输入问题': 'Please enter the question', + '回答输出中,暂不能再次提问': 'Answer output, cannot be asked again temporarily', + '监控1': 'monitor one', + '监控2': 'monitor two', } } diff --git a/frontend/src/lang/zh.ts b/frontend/src/lang/zh.ts index ac43b9b..85aa63d 100755 --- a/frontend/src/lang/zh.ts +++ b/frontend/src/lang/zh.ts @@ -1,30 +1,32 @@ export default { - routers:{ - logOut:'退出登录', - restore:'还原数据', - '智能协作无界,材料创新无限':'智能协作无界,材料创新无限', - '问题设定':'问题设定', - '模型名称':'模型名称', - '新建对话':'新建对话', - '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。':'推理完成,如果希望了解更多可继续在下面框中提问或新建对话。', - '推理中':'推理中', - '角色':'角色', - '模型调用流程':'模型调用流程', - '发送':'发送', - '您好,多智能体MARS为您服务':'您好,多智能体MARS为您服务', - '推荐问题':'推荐问题', - '在此输入您的问题或需求,有问必答,Shift+Enter换行':'在此输入您的问题或需求,有问必答,Shift+Enter换行', - 'MARS多智能体材料创制系统':'MARS多智能体材料创制系统', - '账号':'账号', - '密码':'密码', - '验证码':'验证码', - '登录':'登录', - '请输入账号':'请输入账号', - '请输入密码':'请输入密码', - '请输入验证码':'请输入验证码', - '验证码错误':'验证码错误', - '请输入问题':'请输入问题', - '回答输出中,暂不能再次提问':'回答输出中,暂不能再次提问', + routers: { + logOut: '退出登录', + restore: '还原数据', + '智能协作无界,材料创新无限': '智能协作无界,材料创新无限', + '问题设定': '问题设定', + '模型名称': '模型名称', + '新建对话': '新建对话', + '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。': '推理完成,如果希望了解更多可继续在下面框中提问或新建对话。', + '推理中': '推理中', + '角色': '角色', + '模型调用流程': '模型调用流程', + '发送': '发送', + '您好,多智能体MARS为您服务': '您好,多智能体MARS为您服务', + '推荐问题': '推荐问题', + '在此输入您的问题或需求,有问必答,Shift+Enter换行': '在此输入您的问题或需求,有问必答,Shift+Enter换行', + 'MARS多智能体材料创制系统': 'MARS多智能体材料创制系统', + '账号': '账号', + '密码': '密码', + '验证码': '验证码', + '登录': '登录', + '请输入账号': '请输入账号', + '请输入密码': '请输入密码', + '请输入验证码': '请输入验证码', + '验证码错误': '验证码错误', + '请输入问题': '请输入问题', + '回答输出中,暂不能再次提问': '回答输出中,暂不能再次提问', + '监控1': '监控1', + '监控2': '监控2', } } diff --git a/frontend/src/view/home/index.vue b/frontend/src/view/home/index.vue index eb76e55..aa3cabe 100755 --- a/frontend/src/view/home/index.vue +++ b/frontend/src/view/home/index.vue @@ -43,7 +43,7 @@ const submitFun = (e: any) => { // chat_id: new Date().getTime(), // message: e content: e, - source: "user" + source: 'user' } router.push('/reasoning?content=' + JSON.stringify(data)) } diff --git a/frontend/src/view/reasoning/index.less b/frontend/src/view/reasoning/index.less index 5184564..ea0e9e0 100755 --- a/frontend/src/view/reasoning/index.less +++ b/frontend/src/view/reasoning/index.less @@ -85,6 +85,7 @@ align-items: center; flex-direction: column; cursor: pointer; + width: 72px; span { font-size: 12px; diff --git a/frontend/src/view/reasoning/index.vue b/frontend/src/view/reasoning/index.vue index 352cffb..959e07b 100755 --- a/frontend/src/view/reasoning/index.vue +++ b/frontend/src/view/reasoning/index.vue @@ -34,11 +34,11 @@
- 监控1 + {{ generateTitle('监控1') }}
- 监控2 + {{ generateTitle('监控2') }}