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 * @param
* dataset_id, document_id, * dataset_id
* { * {
"name": "string", "name": "string",
"desc": true "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; font-size: 14px;
position: relative; position: relative;
min-height: var(--card-min-height); min-height: var(--card-min-height);
border: 1px solid #ffffff;
.description { .description {
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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