'pagedit'

This commit is contained in:
yangqiao
2025-02-24 15:09:00 +08:00
parent c28234d5cd
commit 160793b11c
6 changed files with 72 additions and 58 deletions

View File

@@ -3,7 +3,9 @@
<el-input
v-model="chatData.content"
@keydown="handleKeydown"
:placeholder="generateTitle('在此输入您的问题或需求有问必答Shift+Enter换行')"
:placeholder="
generateTitle('在此输入您的问题或需求有问必答Shift+Enter换行')
"
type="textarea"
:autosize="{ minRows: props.minRows }"
:disabled="disableStatus"
@@ -11,7 +13,8 @@
</el-input>
<div class="btn-box">
<el-button type="primary" @click="submitFun" :disabled="disableStatus"
><el-icon color="#fff" size="16"><Promotion /></el-icon>{{generateTitle('发送')}}</el-button
><el-icon color="#fff" size="16"><Promotion /></el-icon
>{{ generateTitle('发送') }}</el-button
>
</div>
</div>
@@ -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<any>({
// 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: ''
}
}

View File

@@ -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',
}
}

View File

@@ -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',
}
}

View File

@@ -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))
}

View File

@@ -85,6 +85,7 @@
align-items: center;
flex-direction: column;
cursor: pointer;
width: 72px;
span {
font-size: 12px;

View File

@@ -34,11 +34,11 @@
<div class="camera_dialog">
<div class="camera_item" @click="cameraFun(1)">
<el-icon color="#fff" size="16"><VideoCameraFilled /></el-icon>
<span>监控1</span>
<span>{{ generateTitle('监控1') }}</span>
</div>
<div class="camera_item" @click="cameraFun(2)">
<el-icon color="#fff" size="16"><VideoCameraFilled /></el-icon>
<span>监控2</span>
<span>{{ generateTitle('监控2') }}</span>
</div>
</div>
<!-- <div class="message_btn">
@@ -108,6 +108,8 @@ const reasoningList = ref<Array<any>>([])
const submitFun = (val: any) => {
completeFun()
addMode(JSON.parse(val).content)
// let data = val
// data.content = JSON.stringify(data.content)
ws.send(val)
}
const addMode = (val: any) => {
@@ -166,6 +168,8 @@ const sendFun = () => {
setTimeout(() => {
addMode(JSON.parse(route.query.content).content)
completeFun()
// let data = route.query.content
// data.content = JSON.stringify(data.content)
ws.send(route.query.content)
}, 300)
}