修改样式及布局及优化交互
This commit is contained in:
parent
b498bd0c9b
commit
87ce06a1f1
|
|
@ -23,7 +23,7 @@ export const menuData: Menus[] = [
|
||||||
id: '52',
|
id: '52',
|
||||||
pid: '1',
|
pid: '1',
|
||||||
index: '/manage-model',
|
index: '/manage-model',
|
||||||
title: '模型管理',
|
title: '模型推理接入点管理',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '54',
|
id: '54',
|
||||||
|
|
@ -218,7 +218,7 @@ export const menuData: Menus[] = [
|
||||||
id: '53',
|
id: '53',
|
||||||
icon: 'ChatDotSquare',
|
icon: 'ChatDotSquare',
|
||||||
index: '/gen-chat',
|
index: '/gen-chat',
|
||||||
title: '通用人机对话',
|
title: '通用智能交互',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '55',
|
id: '55',
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import { ElMessage } from 'element-plus';
|
||||||
const handle = (rawFile: any) => {
|
const handle = (rawFile: any) => {
|
||||||
console.log(rawFile);
|
console.log(rawFile);
|
||||||
};
|
};
|
||||||
const allowedTypes = ['doc', 'docx', 'pdf', 'txt', 'png', 'jpg', 'jpeg','md', "epub"];
|
const allowedTypes = ['doc', 'docx', 'pdf', 'txt', 'png', 'jpg', 'jpeg','md', "epub", 'go', 'java', 'py', 'js', 'html', 'css', 'json', 'xml', 'yaml', 'yml'];
|
||||||
|
|
||||||
interface UploadData {
|
interface UploadData {
|
||||||
upload_type: string;
|
upload_type: string;
|
||||||
|
|
@ -65,7 +65,7 @@ const headers = {
|
||||||
const fileExtension = file.name.split('.').pop().toLowerCase();
|
const fileExtension = file.name.split('.').pop().toLowerCase();
|
||||||
const isAllowedType = allowedTypes.includes(fileExtension);
|
const isAllowedType = allowedTypes.includes(fileExtension);
|
||||||
if (!isAllowedType) {
|
if (!isAllowedType) {
|
||||||
ElMessage.error('不允许的文件类型,仅支持 doc, docx, pdf, txt, png, jpg, jpeg, md, epub 格式');
|
ElMessage.error('不允许的文件类型,仅支持 doc, docx, pdf, txt, png, jpg, jpeg, md, epub 及代码文本格式');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 可以在这里进行文件验证等操作
|
// 可以在这里进行文件验证等操作
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ const routes: RouteRecordRaw[] = [
|
||||||
path: '/kbase-chat',
|
path: '/kbase-chat',
|
||||||
name: 'kbase-chat',
|
name: 'kbase-chat',
|
||||||
meta: {
|
meta: {
|
||||||
title: '智能选题推荐',
|
title: '智能知识库',
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "reco-topic" */ '../views/system/kbase-chat.vue'),
|
component: () => import(/* webpackChunkName: "reco-topic" */ '../views/system/kbase-chat.vue'),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-card :body-style="{ height: '400px' }" shadow="hover">
|
<el-card :body-style="{ height: '400px' }" shadow="hover">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="content-title">饼状图</div>
|
<div class="content-title"></div>
|
||||||
</template>
|
</template>
|
||||||
<v-chart class="schart" :option="pieOptions" />
|
<v-chart class="schart" :option="pieOptions" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ import { ElMessage } from "element-plus";
|
||||||
import { loginService } from "@/api/user";
|
import { loginService } from "@/api/user";
|
||||||
import { GetUserInfoService } from "@/api/user";
|
import { GetUserInfoService } from "@/api/user";
|
||||||
import { usePermissStore } from "@/store/permiss";
|
import { usePermissStore } from "@/store/permiss";
|
||||||
|
|
||||||
// 从本地存储获取登录参数
|
// 从本地存储获取登录参数
|
||||||
const lgStr = localStorage.getItem("login-param");
|
const lgStr = localStorage.getItem("login-param");
|
||||||
const defParam = lgStr ? JSON.parse(lgStr) : null;
|
const defParam = lgStr ? JSON.parse(lgStr) : null;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
>
|
>
|
||||||
<div class="message-avatar">
|
<div class="message-avatar">
|
||||||
<span v-if="message.role === 'assistant'">💬</span>
|
<span v-if="message.role === 'assistant'">💬</span>
|
||||||
<span v-else>👤</span>
|
<span v-else>🧑🎓</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="message-content">
|
<div class="message-content">
|
||||||
<div v-html="renderMarkdown(message.content)"></div>
|
<div v-html="renderMarkdown(message.content)"></div>
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
>
|
>
|
||||||
<div class="message-avatar">
|
<div class="message-avatar">
|
||||||
<span v-if="message.role === 'assistant'">💬</span>
|
<span v-if="message.role === 'assistant'">💬</span>
|
||||||
<span v-else>👤</span>
|
<span v-else>🧑🎓</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="message-content">
|
<div class="message-content">
|
||||||
<div v-html="renderMarkdown(message.content)"></div>
|
<div v-html="renderMarkdown(message.content)"></div>
|
||||||
|
|
@ -537,6 +537,10 @@
|
||||||
ElMessage.warning("消息不能为空");
|
ElMessage.warning("消息不能为空");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(sessionID.value == 0){
|
||||||
|
ElMessage.warning("请先选择知识库!若果没有知识库,请先创建知识库!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
let end_msg = {
|
let end_msg = {
|
||||||
msg: inputMessage.value,
|
msg: inputMessage.value,
|
||||||
type: "ollama",
|
type: "ollama",
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,8 @@ let columns = ref([
|
||||||
{ prop: 'ID', label: '文件ID', width: 50 },
|
{ prop: 'ID', label: '文件ID', width: 50 },
|
||||||
{ prop: 'UserFileName', label: '文件名' ,width: 300},
|
{ prop: 'UserFileName', label: '文件名' ,width: 300},
|
||||||
{ prop: "UploadType", label: "上传类型",width: 100},
|
{ prop: "UploadType", label: "上传类型",width: 100},
|
||||||
{ prop: 'CreatedAt', label: '创建时间',type: 'date',width: 200 },
|
{ prop: 'CreatedAt', label: '创建时间',type: 'date',width: 220 },
|
||||||
{ prop: 'UpdatedAt', label: '更新时间',type: 'date',width: 200 },
|
{ prop: 'UpdatedAt', label: '更新时间',type: 'date',width: 220 },
|
||||||
{ prop: 'operator', label: '操作' , operate: { view: false, edit: true, delete: true,push: {link: false,label:"继续该会话"} ,gen: {show: true,label:"下载文件"}},
|
{ prop: 'operator', label: '操作' , operate: { view: false, edit: true, delete: true,push: {link: false,label:"继续该会话"} ,gen: {show: true,label:"下载文件"}},
|
||||||
align: 'center', fixed: 'right' },
|
align: 'center', fixed: 'right' },
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -87,10 +87,10 @@ let columns = ref([
|
||||||
{ prop: 'ID', label: '会话ID', width: 50 },
|
{ prop: 'ID', label: '会话ID', width: 50 },
|
||||||
{ prop: 'Name', label: '会话名' ,width: 300},
|
{ prop: 'Name', label: '会话名' ,width: 300},
|
||||||
{ prop: 'MsgCount', label: '消息数',width:50},
|
{ prop: 'MsgCount', label: '消息数',width:50},
|
||||||
{ prop: 'TokenUsage', label: '消耗token数',width:50},
|
{ prop: 'TokenUsage', label: '消耗token数',width:150},
|
||||||
{ prop: "Context", label: "会话背景参数" ,width: 100},
|
{ prop: "Context", label: "会话背景参数" ,width: 100},
|
||||||
{ prop: 'CreatedAt', label: '创建时间',type: 'date',width: 150 },
|
{ prop: 'CreatedAt', label: '创建时间',type: 'date',width: 180 },
|
||||||
{ prop: 'UpdatedAt', label: '更新时间',type: 'date',width: 150 },
|
{ prop: 'UpdatedAt', label: '更新时间',type: 'date',width: 180 },
|
||||||
{ prop: 'operator', label: '操作' , operate: { view: false, edit: true, delete: true,push: {link: true,label:"继续该会话"},gen: {show: false,label:"下载文件"}}},
|
{ prop: 'operator', label: '操作' , operate: { view: false, edit: true, delete: true,push: {link: true,label:"继续该会话"},gen: {show: false,label:"下载文件"}}},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue