feat: 日志增加时间

This commit is contained in:
wangdan-fit2cloud 2023-12-12 17:07:34 +08:00
parent 075dce9d99
commit db9c818b2b
3 changed files with 15 additions and 6 deletions

View File

@ -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: {

View File

@ -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>

View File

@ -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,6 @@ const active = ref(0)
const successInfo = ref<any>(null)
async function next() {
console.log(StepFirstRef.value)
if (await StepFirstRef.value?.onSubmit()) {
if (active.value++ > 2) active.value = 0
}