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-07 11:28:38 +00:00
|
|
|
<el-tooltip effect="dark" content="修改内容" placement="top">
|
|
|
|
|
<el-button text @click="editContent(data)">
|
|
|
|
|
<el-icon><EditPen /></el-icon>
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-tooltip>
|
2023-12-14 08:24:10 +00:00
|
|
|
|
|
|
|
|
<!-- <el-divider direction="vertical" />
|
|
|
|
|
<el-tooltip placement="bottom-start" effect="dark" content="修改内容">
|
|
|
|
|
<el-popover :width="580" trigger="click">
|
|
|
|
|
<template #reference>
|
|
|
|
|
<el-button text>
|
|
|
|
|
<el-icon><Document /></el-icon>
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
<h4>修改内容</h4>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="data.content"
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
maxlength="1024"
|
|
|
|
|
show-word-limit
|
|
|
|
|
:rows="8"
|
|
|
|
|
type="textarea"
|
|
|
|
|
>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-popover>
|
|
|
|
|
</el-tooltip> -->
|
2023-12-07 11:28:38 +00:00
|
|
|
<el-divider direction="vertical" v-if="buttonData?.vote_status !== '-1'" />
|
2023-12-14 08:24:10 +00:00
|
|
|
<el-button text disabled>
|
|
|
|
|
<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>
|