mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
Merge branch 'main' of github.com:maxkb-dev/maxkb
This commit is contained in:
commit
1f5b0d3616
|
|
@ -1,4 +1,10 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-text type="info">
|
||||
消耗: {{ data?.message_tokens + data?.answer_tokens }} tokens
|
||||
<span class="ml-4">{{ datetimeFormat(data.create_time) }}</span>
|
||||
</el-text>
|
||||
</div>
|
||||
<div>
|
||||
<el-tooltip effect="dark" content="修改内容" placement="top">
|
||||
<el-button text @click="editContent(data)">
|
||||
|
|
@ -26,6 +32,7 @@
|
|||
import { reactive, ref, watch, onMounted } from 'vue'
|
||||
import { copyClick } from '@/utils/clipboard'
|
||||
import EditContentDialog from '@/views/log/component/EditContentDialog.vue'
|
||||
import { datetimeFormat } from '@/utils/time'
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -68,9 +68,6 @@
|
|||
></MarkdownRenderer>
|
||||
</el-card>
|
||||
<div class="flex-between mt-8" v-if="log">
|
||||
<el-text type="info">
|
||||
消耗 {{ item?.message_tokens + item?.answer_tokens }} tokens
|
||||
</el-text>
|
||||
<LogOperationButton :data="item" :applicationId="appId" />
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<el-progress v-bind="$attrs" :percentage="row[value_field]"></el-progress
|
||||
></template>
|
||||
<div>
|
||||
<el-row v-for="item in view_card"
|
||||
<el-row v-for="(item, index) in view_card" :key="index"
|
||||
><el-col :span="6">{{ item.title }}</el-col
|
||||
><el-col :span="18"> <span class="value" :innerHTML="value_html(item)"> </span></el-col
|
||||
></el-row>
|
||||
|
|
|
|||
|
|
@ -26,8 +26,14 @@
|
|||
</template>
|
||||
<div class="create-dataset__main flex" v-loading="loading">
|
||||
<div class="create-dataset__component main-calc-height">
|
||||
<template v-if="steps[active]?.component">
|
||||
<!-- <template v-if="steps[active]?.component">
|
||||
<component :is="steps[active].component" :ref="steps[active]?.ref" />
|
||||
</template> -->
|
||||
<template v-if="active === 0">
|
||||
<StepFirst ref="StepFirstRef" />
|
||||
</template>
|
||||
<template v-else-if="active === 1">
|
||||
<StepSecond ref="StepSecondRef" />
|
||||
</template>
|
||||
<template v-else-if="active === 2">
|
||||
<ResultSuccess :data="successInfo" />
|
||||
|
|
@ -47,7 +53,7 @@
|
|||
</LayoutContainer>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed, nextTick } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import StepFirst from './step/StepFirst.vue'
|
||||
import StepSecond from './step/StepSecond.vue'
|
||||
|
|
@ -89,7 +95,7 @@ const active = ref(0)
|
|||
const successInfo = ref<any>(null)
|
||||
|
||||
async function next() {
|
||||
if (await StepFirstRef.value.onSubmit()) {
|
||||
if (await StepFirstRef.value?.onSubmit()) {
|
||||
if (active.value++ > 2) active.value = 0
|
||||
}
|
||||
}
|
||||
|
|
@ -104,7 +110,7 @@ function clearStore() {
|
|||
function submit() {
|
||||
loading.value = true
|
||||
const documents = [] as any[]
|
||||
StepSecondRef.value.paragraphList.map((item: any) => {
|
||||
StepSecondRef.value?.paragraphList.map((item: any) => {
|
||||
documents.push({
|
||||
name: item.name,
|
||||
paragraphs: item.content
|
||||
|
|
|
|||
Loading…
Reference in New Issue