mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: typos
This commit is contained in:
parent
493939017e
commit
e15dc64be9
|
|
@ -7,64 +7,64 @@ const prefix = '/application'
|
|||
|
||||
/**
|
||||
* API_KEY列表
|
||||
* @param 参数 applicaiton_id
|
||||
* @param 参数 application_id
|
||||
*/
|
||||
const getAPIKey: (applicaiton_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
applicaiton_id,
|
||||
const getAPIKey: (application_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
application_id,
|
||||
loading
|
||||
) => {
|
||||
return get(`${prefix}/${applicaiton_id}/api_key`, undefined, loading)
|
||||
return get(`${prefix}/${application_id}/api_key`, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增API_KEY
|
||||
* @param 参数 applicaiton_id
|
||||
* @param 参数 application_id
|
||||
*/
|
||||
const postAPIKey: (applicaiton_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
applicaiton_id,
|
||||
const postAPIKey: (application_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
application_id,
|
||||
loading
|
||||
) => {
|
||||
return post(`${prefix}/${applicaiton_id}/api_key`, {}, undefined, loading)
|
||||
return post(`${prefix}/${application_id}/api_key`, {}, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除API_KEY
|
||||
* @param 参数 applicaiton_id api_key_id
|
||||
* @param 参数 application_id api_key_id
|
||||
*/
|
||||
const delAPIKey: (
|
||||
applicaiton_id: String,
|
||||
application_id: String,
|
||||
api_key_id: String,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<boolean>> = (applicaiton_id, api_key_id, loading) => {
|
||||
return del(`${prefix}/${applicaiton_id}/api_key/${api_key_id}`, undefined, undefined, loading)
|
||||
) => Promise<Result<boolean>> = (application_id, api_key_id, loading) => {
|
||||
return del(`${prefix}/${application_id}/api_key/${api_key_id}`, undefined, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改API_KEY
|
||||
* @param 参数 applicaiton_id,api_key_id
|
||||
* @param 参数 application_id,api_key_id
|
||||
* data {
|
||||
* is_active: boolean
|
||||
* }
|
||||
*/
|
||||
const putAPIKey: (
|
||||
applicaiton_id: string,
|
||||
application_id: string,
|
||||
api_key_id: String,
|
||||
data: any,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<any>> = (applicaiton_id, api_key_id, data, loading) => {
|
||||
return put(`${prefix}/${applicaiton_id}/api_key/${api_key_id}`, data, undefined, loading)
|
||||
) => Promise<Result<any>> = (application_id, api_key_id, data, loading) => {
|
||||
return put(`${prefix}/${application_id}/api_key/${api_key_id}`, data, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计
|
||||
* @param 参数 applicaiton_id, data
|
||||
* @param 参数 application_id, data
|
||||
*/
|
||||
const getStatistics: (
|
||||
applicaiton_id: string,
|
||||
application_id: string,
|
||||
data: any,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<any>> = (applicaiton_id, data, loading) => {
|
||||
return get(`${prefix}/${applicaiton_id}/statistics/chat_record_aggregate_trend`, data, loading)
|
||||
) => Promise<Result<any>> = (application_id, data, loading) => {
|
||||
return get(`${prefix}/${application_id}/statistics/chat_record_aggregate_trend`, data, loading)
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -49,70 +49,70 @@ const postApplication: (
|
|||
|
||||
*/
|
||||
const putApplication: (
|
||||
applicaiton_id: String,
|
||||
application_id: String,
|
||||
data: ApplicationFormType,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<any>> = (applicaiton_id, data, loading) => {
|
||||
return put(`${prefix}/${applicaiton_id}`, data, undefined, loading)
|
||||
) => Promise<Result<any>> = (application_id, data, loading) => {
|
||||
return put(`${prefix}/${application_id}`, data, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应用
|
||||
* @param 参数 applicaiton_id
|
||||
* @param 参数 application_id
|
||||
*/
|
||||
const delApplication: (
|
||||
applicaiton_id: String,
|
||||
application_id: String,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<boolean>> = (applicaiton_id, loading) => {
|
||||
return del(`${prefix}/${applicaiton_id}`, undefined, {}, loading)
|
||||
) => Promise<Result<boolean>> = (application_id, loading) => {
|
||||
return del(`${prefix}/${application_id}`, undefined, {}, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用详情
|
||||
* @param 参数 applicaiton_id
|
||||
* @param 参数 application_id
|
||||
*/
|
||||
const getApplicationDetail: (
|
||||
applicaiton_id: string,
|
||||
application_id: string,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<any>> = (applicaiton_id, loading) => {
|
||||
return get(`${prefix}/${applicaiton_id}`, undefined, loading)
|
||||
) => Promise<Result<any>> = (application_id, loading) => {
|
||||
return get(`${prefix}/${application_id}`, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得当前应用可使用的知识库
|
||||
* @param 参数 applicaiton_id
|
||||
* @param 参数 application_id
|
||||
*/
|
||||
const getApplicationDataset: (
|
||||
applicaiton_id: string,
|
||||
application_id: string,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<any>> = (applicaiton_id, loading) => {
|
||||
return get(`${prefix}/${applicaiton_id}/list_dataset`, undefined, loading)
|
||||
) => Promise<Result<any>> = (application_id, loading) => {
|
||||
return get(`${prefix}/${application_id}/list_dataset`, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取AccessToken
|
||||
* @param 参数 applicaiton_id
|
||||
* @param 参数 application_id
|
||||
*/
|
||||
const getAccessToken: (applicaiton_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
applicaiton_id,
|
||||
const getAccessToken: (application_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
application_id,
|
||||
loading
|
||||
) => {
|
||||
return get(`${prefix}/${applicaiton_id}/access_token`, undefined, loading)
|
||||
return get(`${prefix}/${application_id}/access_token`, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改AccessToken
|
||||
* @param 参数 applicaiton_id
|
||||
* @param 参数 application_id
|
||||
* data {
|
||||
* "is_active": true
|
||||
* }
|
||||
*/
|
||||
const putAccessToken: (
|
||||
applicaiton_id: string,
|
||||
application_id: string,
|
||||
data: any,
|
||||
loading?: Ref<boolean>
|
||||
) => Promise<Result<any>> = (applicaiton_id, data, loading) => {
|
||||
return put(`${prefix}/${applicaiton_id}/access_token`, data, undefined, loading)
|
||||
) => Promise<Result<any>> = (application_id, data, loading) => {
|
||||
return put(`${prefix}/${application_id}/access_token`, data, undefined, loading)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -161,8 +161,8 @@ const postChatOpen: (data: ApplicationFormType) => Promise<Result<any>> = (data)
|
|||
]
|
||||
}
|
||||
*/
|
||||
const getChatOpen: (applicaiton_id: String) => Promise<Result<any>> = (applicaiton_id) => {
|
||||
return get(`${prefix}/${applicaiton_id}/chat/open`)
|
||||
const getChatOpen: (application_id: String) => Promise<Result<any>> = (application_id) => {
|
||||
return get(`${prefix}/${application_id}/chat/open`)
|
||||
}
|
||||
/**
|
||||
* 对话
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const prefix = '/dataset'
|
|||
"name": "string",
|
||||
}
|
||||
*/
|
||||
const getDateset: (
|
||||
const getDataset: (
|
||||
page: pageRequest,
|
||||
param: any,
|
||||
loading?: Ref<boolean>
|
||||
|
|
@ -29,7 +29,7 @@ const getDateset: (
|
|||
* 获取全部知识库
|
||||
* @param 参数
|
||||
*/
|
||||
const getAllDateset: (loading?: Ref<boolean>) => Promise<Result<any[]>> = (loading) => {
|
||||
const getAllDataset: (loading?: Ref<boolean>) => Promise<Result<any[]>> = (loading) => {
|
||||
return get(`${prefix}`, undefined, loading)
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ const getAllDateset: (loading?: Ref<boolean>) => Promise<Result<any[]>> = (loadi
|
|||
* 删除知识库
|
||||
* @param 参数 dataset_id
|
||||
*/
|
||||
const delDateset: (dataset_id: String, loading?: Ref<boolean>) => Promise<Result<boolean>> = (
|
||||
const delDataset: (dataset_id: String, loading?: Ref<boolean>) => Promise<Result<boolean>> = (
|
||||
dataset_id,
|
||||
loading
|
||||
) => {
|
||||
|
|
@ -69,7 +69,7 @@ const delDateset: (dataset_id: String, loading?: Ref<boolean>) => Promise<Result
|
|||
]
|
||||
}
|
||||
*/
|
||||
const postDateset: (data: datasetData, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
const postDataset: (data: datasetData, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
data,
|
||||
loading
|
||||
) => {
|
||||
|
|
@ -86,7 +86,7 @@ const postDateset: (data: datasetData, loading?: Ref<boolean>) => Promise<Result
|
|||
"selector": "string",
|
||||
}
|
||||
*/
|
||||
const postWebDateset: (data: any, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
const postWebDataset: (data: any, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
data,
|
||||
loading
|
||||
) => {
|
||||
|
|
@ -97,7 +97,7 @@ const postWebDateset: (data: any, loading?: Ref<boolean>) => Promise<Result<any>
|
|||
* 知识库详情
|
||||
* @param 参数 dataset_id
|
||||
*/
|
||||
const getDatesetDetail: (dataset_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
const getDatasetDetail: (dataset_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
|
||||
dataset_id,
|
||||
loading
|
||||
) => {
|
||||
|
|
@ -113,7 +113,7 @@ const getDatesetDetail: (dataset_id: string, loading?: Ref<boolean>) => Promise<
|
|||
"desc": true
|
||||
}
|
||||
*/
|
||||
const putDateset: (dataset_id: string, data: any) => Promise<Result<any>> = (
|
||||
const putDataset: (dataset_id: string, data: any) => Promise<Result<any>> = (
|
||||
dataset_id,
|
||||
data: any
|
||||
) => {
|
||||
|
|
@ -152,7 +152,7 @@ const getDatasetHitTest: (
|
|||
* @param 参数 dataset_id
|
||||
* @query 参数 sync_type // 同步类型->replace:替换同步,complete:完整同步
|
||||
*/
|
||||
const putSyncWebDateset: (
|
||||
const putSyncWebDataset: (
|
||||
dataset_id: string,
|
||||
sync_type: string,
|
||||
loading?: Ref<boolean>
|
||||
|
|
@ -161,14 +161,14 @@ const putSyncWebDateset: (
|
|||
}
|
||||
|
||||
export default {
|
||||
getDateset,
|
||||
getAllDateset,
|
||||
delDateset,
|
||||
postDateset,
|
||||
getDatesetDetail,
|
||||
putDateset,
|
||||
getDataset,
|
||||
getAllDataset,
|
||||
delDataset,
|
||||
postDataset,
|
||||
getDatasetDetail,
|
||||
putDataset,
|
||||
listUsableApplication,
|
||||
getDatasetHitTest,
|
||||
postWebDateset,
|
||||
putSyncWebDateset
|
||||
postWebDataset,
|
||||
putSyncWebDataset
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<template v-for="(item, index) in prologueList" :key="index">
|
||||
<div
|
||||
v-if="item.type === 'question'"
|
||||
@click="quickProblemHandel(item.str)"
|
||||
@click="quickProblemHandle(item.str)"
|
||||
class="problem-button ellipsis-2 mb-8"
|
||||
:class="log ? 'disabled' : 'cursor'"
|
||||
>
|
||||
|
|
@ -266,7 +266,7 @@ function openParagraph(row: any, id?: string) {
|
|||
ParagraphSourceDialogRef.value.open(row, id)
|
||||
}
|
||||
|
||||
function quickProblemHandel(val: string) {
|
||||
function quickProblemHandle(val: string) {
|
||||
if (!props.log && !loading.value) {
|
||||
// inputValue.value = val
|
||||
// nextTick(() => {
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ function initChart() {
|
|||
myChart = echarts.init(document.getElementById(props.id))
|
||||
}
|
||||
const series: any = []
|
||||
if (props.option?.yDatas?.length) {
|
||||
props.option?.yDatas.forEach((item: any, index: number) => {
|
||||
if (props.option?.yData?.length) {
|
||||
props.option?.yData.forEach((item: any, index: number) => {
|
||||
series.push({
|
||||
itemStyle: {
|
||||
color: color[index]
|
||||
|
|
@ -83,7 +83,7 @@ function initChart() {
|
|||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: props.option.xDatas
|
||||
data: props.option.xData
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ defineProps({
|
|||
option: {
|
||||
type: Object,
|
||||
required: true
|
||||
} // { title , xDatas, yDatas, formatStr }
|
||||
} // { title , xData, yData, formatStr }
|
||||
})
|
||||
|
||||
const typeComponentMap = { line } as any
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<el-button type="primary" @click="submitHandle" :disabled="loading">创建</el-button>
|
||||
<el-button @click="showInput = false" :disabled="loading">取消</el-button>
|
||||
</div>
|
||||
<div v-else @click="quickCreateHandel" class="w-full">
|
||||
<div v-else @click="quickCreateHandle" class="w-full">
|
||||
<el-button type="primary" link class="quich-button">
|
||||
<el-icon><Plus /></el-icon>
|
||||
<span class="ml-4">{{ quickCreatePlaceholder }}</span>
|
||||
|
|
@ -104,7 +104,7 @@ function submitHandle() {
|
|||
}
|
||||
}
|
||||
|
||||
function quickCreateHandel() {
|
||||
function quickCreateHandle() {
|
||||
showInput.value = true
|
||||
nextTick(() => {
|
||||
quickInputRef.value?.focus()
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
:parent_field="formField.field + '.' + index"
|
||||
></DynamicsForm>
|
||||
<el-tooltip effect="dark" content="删除" placement="top">
|
||||
<el-button text @click.stop="deleteDateset(item)" class="delete-button">
|
||||
<el-button text @click.stop="deleteDataset(item)" class="delete-button">
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
|
|
@ -46,7 +46,7 @@ const props = defineProps<{
|
|||
const render_data = () => {
|
||||
return Promise.resolve(Result.success(props.formField.children as Array<FormField>))
|
||||
}
|
||||
const deleteDateset = (item: any) => {
|
||||
const deleteDataset = (item: any) => {
|
||||
_data.value = _data.value.filter((row) => row !== item)
|
||||
}
|
||||
const emit = defineEmits(['update:modelValue', 'change'])
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ function changeMenu(id: string) {
|
|||
function getDataset() {
|
||||
loading.value = true
|
||||
dataset
|
||||
.asyncGetAllDateset()
|
||||
.asyncGetAllDataset()
|
||||
.then((res: any) => {
|
||||
list.value = res.data
|
||||
common.saveBreadcrumb(list.value)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const applicationRouter = {
|
|||
parentPath: '/application/:id',
|
||||
parentName: 'ApplicationDetail'
|
||||
},
|
||||
component: () => import('@/views/applicaiton-overview/index.vue')
|
||||
component: () => import('@/views/application-overview/index.vue')
|
||||
},
|
||||
{
|
||||
path: 'setting',
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ const useDatasetStore = defineStore({
|
|||
saveDocumentsFile(file: UploadUserFile[]) {
|
||||
this.documentsFiles = file
|
||||
},
|
||||
async asyncGetAllDateset(loading?: Ref<boolean>) {
|
||||
async asyncGetAllDataset(loading?: Ref<boolean>) {
|
||||
return new Promise((resolve, reject) => {
|
||||
datasetApi
|
||||
.getAllDateset(loading)
|
||||
.getAllDataset(loading)
|
||||
.then((data) => {
|
||||
resolve(data)
|
||||
})
|
||||
|
|
@ -39,10 +39,10 @@ const useDatasetStore = defineStore({
|
|||
})
|
||||
})
|
||||
},
|
||||
async asyncGetDatesetDetail(id: string, loading?: Ref<boolean>) {
|
||||
async asyncGetDatasetDetail(id: string, loading?: Ref<boolean>) {
|
||||
return new Promise((resolve, reject) => {
|
||||
datasetApi
|
||||
.getDatesetDetail(id, loading)
|
||||
.getDatasetDetail(id, loading)
|
||||
.then((data) => {
|
||||
resolve(data)
|
||||
})
|
||||
|
|
@ -51,10 +51,10 @@ const useDatasetStore = defineStore({
|
|||
})
|
||||
})
|
||||
},
|
||||
async asyncSyncDateset(id: string, sync_type: string, loading?: Ref<boolean>) {
|
||||
async asyncSyncDataset(id: string, sync_type: string, loading?: Ref<boolean>) {
|
||||
return new Promise((resolve, reject) => {
|
||||
datasetApi
|
||||
.putSyncWebDateset(id, sync_type, loading)
|
||||
.putSyncWebDataset(id, sync_type, loading)
|
||||
.then((data) => {
|
||||
resolve(data)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@
|
|||
.el-checkbox {
|
||||
height: 23px;
|
||||
}
|
||||
tr.hightlight {
|
||||
tr.highlight {
|
||||
background: var(--el-table-current-row-bg-color);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ class Theme {
|
|||
/**
|
||||
* 转换外推数据
|
||||
* @param setting 设置
|
||||
* @param inferDatas 外推数据
|
||||
* @param inferData 外推数据
|
||||
*/
|
||||
mapInferData = (setting: ThemeSetting, inferDatas: Array<InferData>) => {
|
||||
return inferDatas
|
||||
mapInferData = (setting: ThemeSetting, inferData: Array<InferData>) => {
|
||||
return inferData
|
||||
.map((itemData) => {
|
||||
return this.mapInferMainStyle(setting, itemData)
|
||||
})
|
||||
|
|
@ -173,7 +173,7 @@ class Theme {
|
|||
*
|
||||
* @param setting 主题设置
|
||||
* @param keyValue 主题键值对数据
|
||||
* @param inferDatas 外推数据
|
||||
* @param inferData 外推数据
|
||||
* @returns 合并后的键值对数据
|
||||
*/
|
||||
tokeyValueStyle = () => {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export function isRightType(name: string) {
|
|||
/*
|
||||
从指定数组中过滤出对应的对象
|
||||
*/
|
||||
export function realatedObject(list: any, val: any, attr: string) {
|
||||
export function relatedObject(list: any, val: any, attr: string) {
|
||||
const filterData: any = list.filter((item: any) => item[attr] === val)?.[0]
|
||||
return filterData || null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ const statisticsType = computed(() => [
|
|||
],
|
||||
option: {
|
||||
title: '用户总数',
|
||||
xDatas: getAttrsArray(props.data, 'day'),
|
||||
yDatas: [
|
||||
xData: getAttrsArray(props.data, 'day'),
|
||||
yData: [
|
||||
{
|
||||
name: '用户总数',
|
||||
type: 'line',
|
||||
|
|
@ -102,8 +102,8 @@ const statisticsType = computed(() => [
|
|||
sum: [getSum(getAttrsArray(props.data, 'chat_record_count') || 0)],
|
||||
option: {
|
||||
title: '提问次数',
|
||||
xDatas: getAttrsArray(props.data, 'day'),
|
||||
yDatas: [
|
||||
xData: getAttrsArray(props.data, 'day'),
|
||||
yData: [
|
||||
{
|
||||
type: 'line',
|
||||
data: getAttrsArray(props.data, 'chat_record_count')
|
||||
|
|
@ -120,8 +120,8 @@ const statisticsType = computed(() => [
|
|||
sum: [getSum(getAttrsArray(props.data, 'tokens_num') || 0)],
|
||||
option: {
|
||||
title: 'Tokens 总数',
|
||||
xDatas: getAttrsArray(props.data, 'day'),
|
||||
yDatas: [
|
||||
xData: getAttrsArray(props.data, 'day'),
|
||||
yData: [
|
||||
{
|
||||
type: 'line',
|
||||
data: getAttrsArray(props.data, 'tokens_num')
|
||||
|
|
@ -141,8 +141,8 @@ const statisticsType = computed(() => [
|
|||
],
|
||||
option: {
|
||||
title: '用户满意度',
|
||||
xDatas: getAttrsArray(props.data, 'day'),
|
||||
yDatas: [
|
||||
xData: getAttrsArray(props.data, 'day'),
|
||||
yData: [
|
||||
{
|
||||
name: '赞同',
|
||||
type: 'line',
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
<el-option-group
|
||||
v-for="(value, label) in modelOptions"
|
||||
:key="value"
|
||||
:label="realatedObject(providerOptions, label, 'provider')?.name"
|
||||
:label="relatedObject(providerOptions, label, 'provider')?.name"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in value.filter((v: any) => v.status === 'SUCCESS')"
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
>
|
||||
<div class="flex">
|
||||
<span
|
||||
v-html="realatedObject(providerOptions, label, 'provider')?.icon"
|
||||
v-html="relatedObject(providerOptions, label, 'provider')?.icon"
|
||||
class="model-icon mr-8"
|
||||
></span>
|
||||
<span>{{ item.name }}</span>
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
>
|
||||
<div class="flex">
|
||||
<span
|
||||
v-html="realatedObject(providerOptions, label, 'provider')?.icon"
|
||||
v-html="relatedObject(providerOptions, label, 'provider')?.icon"
|
||||
class="model-icon mr-8"
|
||||
></span>
|
||||
<span>{{ item.name }}</span>
|
||||
|
|
@ -242,7 +242,7 @@
|
|||
<div class="flex-between">
|
||||
<div class="flex align-center">
|
||||
<AppAvatar
|
||||
v-if="realatedObject(datasetList, item, 'id')?.type === '1'"
|
||||
v-if="relatedObject(datasetList, item, 'id')?.type === '1'"
|
||||
class="mr-8 avatar-purple"
|
||||
shape="square"
|
||||
:size="32"
|
||||
|
|
@ -254,7 +254,7 @@
|
|||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||
</AppAvatar>
|
||||
<div class="ellipsis">
|
||||
{{ realatedObject(datasetList, item, 'id')?.name }}
|
||||
{{ relatedObject(datasetList, item, 'id')?.name }}
|
||||
</div>
|
||||
</div>
|
||||
<el-button text @click="removeDataset(item)">
|
||||
|
|
@ -338,7 +338,7 @@ import applicationApi from '@/api/application'
|
|||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import type { ApplicationFormType } from '@/api/type/application'
|
||||
import type { Provider } from '@/api/type/model'
|
||||
import { realatedObject } from '@/utils/utils'
|
||||
import { relatedObject } from '@/utils/utils'
|
||||
import { MsgSuccess } from '@/utils/message'
|
||||
import useStore from '@/stores'
|
||||
|
||||
|
|
@ -474,7 +474,7 @@ function getDataset() {
|
|||
datasetList.value = res.data
|
||||
})
|
||||
} else {
|
||||
dataset.asyncGetAllDateset(datasetLoading).then((res: any) => {
|
||||
dataset.asyncGetAllDataset(datasetLoading).then((res: any) => {
|
||||
datasetList.value = res.data?.filter((v: any) => v.user_id === user.userInfo?.id)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ function submit() {
|
|||
loading.value = false
|
||||
})
|
||||
} else {
|
||||
datasetApi.postDateset(obj, loading).then((res) => {
|
||||
datasetApi.postDataset(obj, loading).then((res) => {
|
||||
successInfo.value = res.data
|
||||
active.value = 2
|
||||
clearStore()
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ async function submit() {
|
|||
...BaseFormRef.value.form
|
||||
}
|
||||
datasetApi
|
||||
.putDateset(id, obj)
|
||||
.putDataset(id, obj)
|
||||
.then((res) => {
|
||||
MsgSuccess('保存成功')
|
||||
loading.value = false
|
||||
|
|
@ -140,7 +140,7 @@ async function submit() {
|
|||
}
|
||||
|
||||
function getDetail() {
|
||||
dataset.asyncGetDatesetDetail(id, loading).then((res: any) => {
|
||||
dataset.asyncGetDatasetDetail(id, loading).then((res: any) => {
|
||||
detail.value = res.data
|
||||
if (detail.value.type === '1') {
|
||||
form.value = res.data.meta
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ const open = (id: string) => {
|
|||
}
|
||||
|
||||
const submit = () => {
|
||||
dataset.asyncSyncDateset(datasetId.value, method.value, loading).then((res: any) => {
|
||||
dataset.asyncSyncDataset(datasetId.value, method.value, loading).then((res: any) => {
|
||||
emit('refresh', res.data)
|
||||
dialogVisible.value = false
|
||||
})
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<el-text type="info">{{ filesize(item && item?.size) || '0K' }}</el-text>
|
||||
</div>
|
||||
</div>
|
||||
<el-button text @click="deleteFlie(index)">
|
||||
<el-button text @click="deleteFile(index)">
|
||||
<el-icon><Delete /></el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -78,7 +78,7 @@ const FormRef = ref()
|
|||
watch(form.value, (value) => {
|
||||
dataset.saveDocumentsFile(value.fileList)
|
||||
})
|
||||
function deleteFlie(index: number) {
|
||||
function deleteFile(index: number) {
|
||||
form.value.fileList.splice(index, 1)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
@click.stop="router.push({ path: `/dataset/${item.id}/setting` })"
|
||||
>设置</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item icon="Delete" @click.stop="deleteDateset(item)"
|
||||
<el-dropdown-item icon="Delete" @click.stop="deleteDataset(item)"
|
||||
>删除</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
|
|
@ -131,7 +131,7 @@ function searchHandle() {
|
|||
getList()
|
||||
}
|
||||
|
||||
function deleteDateset(row: any) {
|
||||
function deleteDataset(row: any) {
|
||||
MsgConfirm(
|
||||
`是否删除知识库:${row.name} ?`,
|
||||
`此知识库关联 ${row.application_mapping_count} 个应用,删除后无法恢复,请谨慎操作。`,
|
||||
|
|
@ -141,7 +141,7 @@ function deleteDateset(row: any) {
|
|||
}
|
||||
)
|
||||
.then(() => {
|
||||
datasetApi.delDateset(row.id, loading).then(() => {
|
||||
datasetApi.delDataset(row.id, loading).then(() => {
|
||||
const index = datasetList.value.findIndex((v) => v.id === row.id)
|
||||
datasetList.value.splice(index, 1)
|
||||
MsgSuccess('删除成功')
|
||||
|
|
@ -152,7 +152,7 @@ function deleteDateset(row: any) {
|
|||
|
||||
function getList() {
|
||||
datasetApi
|
||||
.getDateset(paginationConfig, searchValue.value && { name: searchValue.value }, loading)
|
||||
.getDataset(paginationConfig, searchValue.value && { name: searchValue.value }, loading)
|
||||
.then((res) => {
|
||||
paginationConfig.total = res.data.total
|
||||
datasetList.value = [...datasetList.value, ...res.data.records]
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ const onSubmit = async () => {
|
|||
await webFormRef.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
const obj = { ...BaseFormRef.value.form, ...form.value }
|
||||
datasetApi.postWebDateset(obj, loading).then((res) => {
|
||||
datasetApi.postWebDataset(obj, loading).then((res) => {
|
||||
MsgSuccess('提交成功')
|
||||
dataset.saveBaseInfo(null)
|
||||
dataset.saveWebInfo(null)
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ function getList(bool?: boolean) {
|
|||
}
|
||||
|
||||
function getDetail() {
|
||||
dataset.asyncGetDatesetDetail(id, loading).then((res: any) => {
|
||||
dataset.asyncGetDatasetDetail(id, loading).then((res: any) => {
|
||||
datasetDetail.value = res.data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-drawer v-model="visible" size="60%" @close="closeHandel" class="chat-record-drawer">
|
||||
<el-drawer v-model="visible" size="60%" @close="closeHandle" class="chat-record-drawer">
|
||||
<template #header>
|
||||
<h4>{{ currentAbstract }}</h4>
|
||||
</template>
|
||||
|
|
@ -77,7 +77,7 @@ const paginationConfig = reactive({
|
|||
total: 0
|
||||
})
|
||||
|
||||
function closeHandel() {
|
||||
function closeHandle() {
|
||||
recordList.value = []
|
||||
paginationConfig.total = 0
|
||||
paginationConfig.current_page = 1
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ function rowClickHandle(row: any) {
|
|||
}
|
||||
|
||||
const setRowClass = ({ row }: any) => {
|
||||
return currentChatId.value === row?.id ? 'hightlight' : ''
|
||||
return currentChatId.value === row?.id ? 'highlight' : ''
|
||||
}
|
||||
|
||||
function deleteLog(row: any) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-drawer v-model="visible" size="60%" @close="closeHandel">
|
||||
<el-drawer v-model="visible" size="60%" @close="closeHandle">
|
||||
<template #header>
|
||||
<h4>问题详情</h4>
|
||||
</template>
|
||||
|
|
@ -148,7 +148,7 @@ function editName(val: string) {
|
|||
}
|
||||
}
|
||||
|
||||
function closeHandel() {
|
||||
function closeHandle() {
|
||||
paragraphList.value = []
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ function rowClickHandle(row: any) {
|
|||
}
|
||||
|
||||
const setRowClass = ({ row }: any) => {
|
||||
return currentClickId.value === row?.id ? 'hightlight' : ''
|
||||
return currentClickId.value === row?.id ? 'highlight' : ''
|
||||
}
|
||||
|
||||
function handleSizeChange() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue