Merge branch 'main' of github.com:maxkb-dev/maxkb

This commit is contained in:
shaohuzhang1 2023-11-17 17:45:49 +08:00
commit 2032c83ba1
12 changed files with 35 additions and 14 deletions

View File

@ -75,7 +75,7 @@ const getDatesetDetail: (dataset_id: string) => Promise<Result<any>> = (dataset_
/**
*
* @param
* dataset_id, document_id,
* dataset_id
* {
"name": "string",
"desc": true

View File

@ -0,0 +1,20 @@
<template>
<div class="flex">
<AppAvatar>
<img src="@/assets/user-icon.svg" style="width: 54%" alt="" />
</AppAvatar>
<div class="ml-8 w-full">
<el-card shadow="always"> XXXXXXXXX </el-card>
<el-card shadow="always" class="mt-12"> XXXXXXXXX </el-card>
</div>
</div>
</template>
<script setup lang="ts">
const props = defineProps({
data: {
type: Array<any>,
default: () => []
}
})
</script>
<style lang="scss" scoped></style>

View File

@ -53,7 +53,7 @@ function cardLeave() {
font-size: 14px;
position: relative;
min-height: var(--card-min-height);
border: 1px solid #ffffff;
.description {
display: -webkit-box;
-webkit-box-orient: vertical;

View File

@ -16,7 +16,7 @@
import { ref, computed, useSlots } from 'vue'
defineOptions({ name: 'TagEllipsis' })
const slots = useSlots()
const tooltipContent = slots.default()?.[0].children || ''
const tooltipContent = slots.default?.()?.[0].children || ''
const tagLabel = ref()
const isShowTooltip = computed(() => {
const containerWeight = tagLabel.value?.scrollWidth

View File

@ -11,7 +11,7 @@ const applicationRouter = {
component: () => import('@/views/application/index.vue')
},
{
path: '/application/create', // create
path: '/application/create',
name: 'CreateApplication',
meta: { activeMenu: '/application' },
component: () => import('@/views/application/CreateApplication.vue'),

View File

@ -9,7 +9,7 @@ export const routes: Array<RouteRecordRaw> = [
path: '/',
name: 'home',
component: () => import('@/layout/app-layout/index.vue'),
redirect: '/dataset',
redirect: '/application',
children: [
// {
// path: '/first',

View File

@ -1,8 +1,9 @@
<template>
<div>
创建应用
</div>
<LayoutContainer header="创建应用" back-to="-1">
<AiDialog></AiDialog>
</LayoutContainer>
</template>
<script setup lang="ts">
import AiDialog from '@/components/ai-dialog/index.vue'
</script>
<style lang="scss" scoped></style>

View File

@ -1,6 +1,6 @@
<template>
<el-dialog title="编辑分段" v-model="dialogVisible" width="600">
<ParagraphForm ref="paragraphFormRef" :data="detail" />
<ParagraphForm ref="paragraphFormRef" :data="detail" :isEdit="true"/>
<template #footer>
<span class="dialog-footer">
<el-button @click.prevent="dialogVisible = false"> 取消 </el-button>

View File

@ -1,7 +1,7 @@
<template>
<div class="set-rules">
<el-row class="set-rules-height">
<el-col :span="12" class="p-24">
<el-col :span="10" class="p-24">
<h4 class="title-decoration-1 mb-8">设置分段规则</h4>
<div>
<el-scrollbar>
@ -70,7 +70,7 @@
</div>
</el-col>
<el-col :span="12" class="p-24 border-l">
<el-col :span="14" class="p-24 border-l">
<div v-loading="loading">
<h4 class="title-decoration-1 mb-8">分段预览</h4>
<ParagraphPreview v-model:data="paragraphList" />

View File

@ -29,7 +29,7 @@ async function submit() {
if (await BaseFormRef.value?.validate()) {
loading.value = true
datasetApi
.postDocument(datasetId, BaseFormRef.value.form)
.putDateset(datasetId, BaseFormRef.value.form)
.then((res) => {
MsgSuccess('保存成功')
loading.value = false

View File

@ -42,7 +42,6 @@
<script setup lang="ts">
import { ref, watch, nextTick } from 'vue'
import { useRoute } from 'vue-router'
import type { FormInstance, FormRules } from 'element-plus'
import ParagraphForm from '@/views/paragraph/component/ParagraphForm.vue'
import ProblemComponent from '@/views/paragraph/component/ProblemComponent.vue'
import datasetApi from '@/api/dataset'
@ -62,7 +61,7 @@ const {
const emit = defineEmits(['refresh'])
const ProblemRef = ref()
const paragraphFormRef = ref<FormInstance>()
const paragraphFormRef = ref<any>()
const dialogVisible = ref<boolean>(false)

View File

@ -14,6 +14,7 @@
</div>
<div class="template-manage__right p-24">
<h4>全部模型</h4>
</div>
</div>
</LayoutContainer>