2023-12-07 11:28:38 +00:00
|
|
|
<template>
|
2023-12-12 09:07:34 +00:00
|
|
|
<div>
|
|
|
|
|
<el-text type="info">
|
|
|
|
|
消耗: {{ data?.message_tokens + data?.answer_tokens }} tokens
|
|
|
|
|
<span class="ml-4">{{ datetimeFormat(data.create_time) }}</span>
|
|
|
|
|
</el-text>
|
|
|
|
|
</div>
|
2023-12-07 11:28:38 +00:00
|
|
|
<div>
|
2023-12-14 03:33:35 +00:00
|
|
|
<el-tooltip effect="dark" content="复制" placement="top">
|
|
|
|
|
<el-button text @click="copyClick(data?.answer_text)">
|
|
|
|
|
<AppIcon iconName="app-copy"></AppIcon>
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-divider direction="vertical" />
|
2023-12-14 10:00:01 +00:00
|
|
|
<el-tooltip
|
|
|
|
|
v-if="data.improve_paragraph_id_list.length === 0"
|
|
|
|
|
effect="dark"
|
|
|
|
|
content="修改内容"
|
|
|
|
|
placement="top"
|
|
|
|
|
>
|
2023-12-07 11:28:38 +00:00
|
|
|
<el-button text @click="editContent(data)">
|
|
|
|
|
<el-icon><EditPen /></el-icon>
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-tooltip>
|
2023-12-14 08:24:10 +00:00
|
|
|
|
2023-12-14 10:00:01 +00:00
|
|
|
<el-tooltip v-else effect="dark" content="修改标注" placement="top">
|
|
|
|
|
<el-button text @click="editContent(data)">
|
|
|
|
|
<AppIcon iconName="app-document-active" class="primary"></AppIcon>
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
2023-12-07 11:28:38 +00:00
|
|
|
<el-divider direction="vertical" v-if="buttonData?.vote_status !== '-1'" />
|
2023-12-14 10:00:01 +00:00
|
|
|
<el-button text disabled v-if="buttonData?.vote_status === '0'">
|
2023-12-14 08:24:10 +00:00
|
|
|
<AppIcon iconName="app-like-color"></AppIcon>
|
2023-12-07 11:28:38 +00:00
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button text disabled v-if="buttonData?.vote_status === '1'">
|
|
|
|
|
<AppIcon iconName="app-oppose-color"></AppIcon>
|
|
|
|
|
</el-button>
|
2023-12-12 08:00:54 +00:00
|
|
|
<EditContentDialog ref="EditContentDialogRef" />
|
2023-12-07 11:28:38 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { reactive, ref, watch, onMounted } from 'vue'
|
|
|
|
|
import { copyClick } from '@/utils/clipboard'
|
|
|
|
|
import EditContentDialog from '@/views/log/component/EditContentDialog.vue'
|
2023-12-12 09:07:34 +00:00
|
|
|
import { datetimeFormat } from '@/utils/time'
|
2023-12-07 11:28:38 +00:00
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
data: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => {}
|
|
|
|
|
},
|
|
|
|
|
applicationId: {
|
|
|
|
|
type: String,
|
|
|
|
|
default: ''
|
|
|
|
|
},
|
|
|
|
|
log: Boolean
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['update:data'])
|
|
|
|
|
|
|
|
|
|
const EditContentDialogRef = ref()
|
|
|
|
|
|
|
|
|
|
const buttonData = ref(props.data)
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
|
|
|
|
|
function editContent(data: any) {
|
|
|
|
|
EditContentDialogRef.value.open(data)
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-12 08:00:54 +00:00
|
|
|
// function updateContent(data: any) {
|
|
|
|
|
// emit('update:data', data)
|
|
|
|
|
// }
|
2023-12-07 11:28:38 +00:00
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped></style>
|