perf: Optimize front-end code
This commit is contained in:
parent
3c46251eae
commit
dadebd03a2
@ -372,7 +372,7 @@ const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF', 'BMP']
|
||||
const documentExtensions = ['PDF', 'DOCX', 'TXT', 'XLS', 'XLSX', 'MD', 'HTML', 'CSV']
|
||||
const videoExtensions: any = []
|
||||
const audioExtensions = ['MP3', 'WAV', 'OGG', 'AAC', 'M4A']
|
||||
let otherExtensions = ref(['PPT', 'DOC'])
|
||||
const otherExtensions = ref(['PPT', 'DOC'])
|
||||
|
||||
const getAcceptList = () => {
|
||||
const { image, document, audio, video, other } = props.applicationDetails.file_upload_setting
|
||||
@ -554,7 +554,7 @@ const switchMicrophone = (status: boolean) => {
|
||||
}
|
||||
}
|
||||
|
||||
const TouchEnd = (bool?: Boolean) => {
|
||||
const TouchEnd = (bool?: boolean) => {
|
||||
if (bool) {
|
||||
stopRecording()
|
||||
recorderStatus.value = 'STOP'
|
||||
|
||||
@ -99,7 +99,7 @@ const menus = ref([
|
||||
*/
|
||||
const clearSelectedText = () => {
|
||||
if (window.getSelection) {
|
||||
var selection = window.getSelection()
|
||||
const selection = window.getSelection()
|
||||
if (selection) {
|
||||
selection.removeAllRanges()
|
||||
}
|
||||
|
||||
@ -1,25 +1,34 @@
|
||||
<template>
|
||||
<el-scrollbar>
|
||||
<div class="execution-details p-8">
|
||||
<template v-if="isWorkFlow(props.appType)" v-for="(item, index) in arraySort(props.detail ?? [], 'index')"
|
||||
:key="index">
|
||||
<div v-if="isWorkFlow(props.appType)">
|
||||
<template v-for="(item, index) in arraySort(props.detail ?? [], 'index')" :key="index">
|
||||
<el-card class="mb-8" shadow="never" style="--el-card-padding: 12px 16px">
|
||||
<div class="flex-between cursor" @click="item['show'] = !item['show']">
|
||||
<div class="flex align-center">
|
||||
<el-icon class="mr-8 arrow-icon" :class="item['show'] ? 'rotate-90' : ''">
|
||||
<CaretRight />
|
||||
</el-icon>
|
||||
<component :is="iconComponent(`${item.type}-icon`)" class="mr-8" :size="24" :item="item.info" />
|
||||
<component
|
||||
:is="iconComponent(`${item.type}-icon`)"
|
||||
class="mr-8"
|
||||
:size="24"
|
||||
:item="item.info"
|
||||
/>
|
||||
<h4>{{ item.name }}</h4>
|
||||
</div>
|
||||
<div class="flex align-center">
|
||||
<span class="mr-16 color-secondary" v-if="
|
||||
<span
|
||||
class="mr-16 color-secondary"
|
||||
v-if="
|
||||
item.type === WorkflowType.Question ||
|
||||
item.type === WorkflowType.AiChat ||
|
||||
item.type === WorkflowType.ImageUnderstandNode ||
|
||||
item.type === WorkflowType.ImageGenerateNode ||
|
||||
item.type === WorkflowType.Application
|
||||
">{{ item?.message_tokens + item?.answer_tokens }} tokens</span>
|
||||
"
|
||||
>{{ item?.message_tokens + item?.answer_tokens }} tokens</span
|
||||
>
|
||||
<span class="mr-16 color-secondary">{{ item?.run_time?.toFixed(2) || 0.0 }} s</span>
|
||||
<el-icon class="color-success" :size="16" v-if="item.status === 200">
|
||||
<CircleCheck />
|
||||
@ -33,7 +42,11 @@
|
||||
<div class="mt-12" v-if="item['show']">
|
||||
<template v-if="item.status === 200">
|
||||
<!-- 开始 -->
|
||||
<template v-if="item.type === WorkflowType.Start || item.type === WorkflowType.Application">
|
||||
<template
|
||||
v-if="
|
||||
item.type === WorkflowType.Start || item.type === WorkflowType.Application
|
||||
"
|
||||
>
|
||||
<div class="card-never border-r-6">
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('common.param.inputParam') }}
|
||||
@ -42,7 +55,8 @@
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<div class="mb-8">
|
||||
<span class="color-secondary">
|
||||
{{ $t('chat.paragraphSource.question') }}:</span>
|
||||
{{ $t('chat.paragraphSource.question') }}:</span
|
||||
>
|
||||
|
||||
{{ item.question || '-' }}
|
||||
</div>
|
||||
@ -51,11 +65,17 @@
|
||||
<span class="color-secondary">{{ f.label }}:</span> {{ f.value }}
|
||||
</div>
|
||||
<div v-if="item.document_list?.length > 0">
|
||||
<p class="mb-8 color-secondary">{{ $t('common.fileUpload.document') }}:</p>
|
||||
<p class="mb-8 color-secondary">
|
||||
{{ $t('common.fileUpload.document') }}:
|
||||
</p>
|
||||
|
||||
<el-space wrap>
|
||||
<template v-for="(f, i) in item.document_list" :key="i">
|
||||
<el-card shadow="never" style="--el-card-padding: 8px" class="file cursor">
|
||||
<el-card
|
||||
shadow="never"
|
||||
style="--el-card-padding: 8px"
|
||||
class="file cursor"
|
||||
>
|
||||
<div class="flex align-center">
|
||||
<img :src="getImgUrl(f && f?.name)" alt="" width="24" />
|
||||
<div class="ml-4 ellipsis" :title="f && f?.name">
|
||||
@ -71,8 +91,13 @@
|
||||
|
||||
<el-space wrap>
|
||||
<template v-for="(f, i) in item.image_list" :key="i">
|
||||
<el-image :src="f.url" alt="" fit="cover" style="width: 40px; height: 40px; display: block"
|
||||
class="border-r-6" />
|
||||
<el-image
|
||||
:src="f.url"
|
||||
alt=""
|
||||
fit="cover"
|
||||
style="width: 40px; height: 40px; display: block"
|
||||
class="border-r-6"
|
||||
/>
|
||||
</template>
|
||||
</el-space>
|
||||
</div>
|
||||
@ -83,16 +108,27 @@
|
||||
|
||||
<el-space wrap>
|
||||
<template v-for="(f, i) in item.audio_list" :key="i">
|
||||
<audio :src="f.url" controls style="width: 300px; height: 43px" class="border-r-6" />
|
||||
<audio
|
||||
:src="f.url"
|
||||
controls
|
||||
style="width: 300px; height: 43px"
|
||||
class="border-r-6"
|
||||
/>
|
||||
</template>
|
||||
</el-space>
|
||||
</div>
|
||||
<div v-if="item.other_list?.length > 0">
|
||||
<p class="mb-8 color-secondary">{{ $t('common.fileUpload.document') }}:</p>
|
||||
<p class="mb-8 color-secondary">
|
||||
{{ $t('common.fileUpload.document') }}:
|
||||
</p>
|
||||
|
||||
<el-space wrap>
|
||||
<template v-for="(f, i) in item.other_list" :key="i">
|
||||
<el-card shadow="never" style="--el-card-padding: 8px" class="file cursor">
|
||||
<el-card
|
||||
shadow="never"
|
||||
style="--el-card-padding: 8px"
|
||||
class="file cursor"
|
||||
>
|
||||
<div class="flex align-center">
|
||||
<img :src="getImgUrl(f && f?.name)" alt="" width="24" />
|
||||
<div class="ml-4 ellipsis" :title="f && f?.name">
|
||||
@ -120,12 +156,19 @@
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<template v-if="item.paragraph_list?.length > 0">
|
||||
<template v-for="(paragraph, paragraphIndex) in arraySort(
|
||||
<template
|
||||
v-for="(paragraph, paragraphIndex) in arraySort(
|
||||
item.paragraph_list,
|
||||
'similarity',
|
||||
true,
|
||||
)" :key="paragraphIndex">
|
||||
<ParagraphCard :data="paragraph" :content="paragraph.content" :index="paragraphIndex" />
|
||||
)"
|
||||
:key="paragraphIndex"
|
||||
>
|
||||
<ParagraphCard
|
||||
:data="paragraph"
|
||||
:content="paragraph.content"
|
||||
:index="paragraphIndex"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else> -</template>
|
||||
@ -144,12 +187,17 @@
|
||||
</div>
|
||||
</template>
|
||||
<!-- AI 对话 / 问题优化-->
|
||||
<template v-if="
|
||||
<template
|
||||
v-if="
|
||||
item.type == WorkflowType.AiChat ||
|
||||
item.type == WorkflowType.Question ||
|
||||
item.type == WorkflowType.Application
|
||||
">
|
||||
<div class="card-never border-r-6" v-if="item.type !== WorkflowType.Application">
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="card-never border-r-6"
|
||||
v-if="item.type !== WorkflowType.Application"
|
||||
>
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('views.application.form.roleSettings.label') }}
|
||||
</h5>
|
||||
@ -157,20 +205,29 @@
|
||||
{{ item.system || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-never border-r-6 mt-8" v-if="item.type !== WorkflowType.Application">
|
||||
<div
|
||||
class="card-never border-r-6 mt-8"
|
||||
v-if="item.type !== WorkflowType.Application"
|
||||
>
|
||||
<h5 class="p-8-12">{{ $t('chat.history') }}</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<template v-if="item.history_message?.length > 0">
|
||||
<p class="mt-4 mb-4" v-for="(history, historyIndex) in item.history_message"
|
||||
:key="historyIndex">
|
||||
<span class="color-secondary mr-4">{{ history.role }}:</span><span>{{ history.content
|
||||
}}</span>
|
||||
<p
|
||||
class="mt-4 mb-4"
|
||||
v-for="(history, historyIndex) in item.history_message"
|
||||
:key="historyIndex"
|
||||
>
|
||||
<span class="color-secondary mr-4">{{ history.role }}:</span
|
||||
><span>{{ history.content }}</span>
|
||||
</p>
|
||||
</template>
|
||||
<template v-else> -</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-never border-r-6 mt-8" v-if="item.type !== WorkflowType.Application">
|
||||
<div
|
||||
class="card-never border-r-6 mt-8"
|
||||
v-if="item.type !== WorkflowType.Application"
|
||||
>
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('chat.executionDetails.currentChat') }}
|
||||
</h5>
|
||||
@ -195,8 +252,14 @@
|
||||
}}
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<MdPreview v-if="item.answer" ref="editorRef" editorId="preview-only" :modelValue="item.answer"
|
||||
style="background: none" noImgZoomIn />
|
||||
<MdPreview
|
||||
v-if="item.answer"
|
||||
ref="editorRef"
|
||||
editorId="preview-only"
|
||||
:modelValue="item.answer"
|
||||
style="background: none"
|
||||
noImgZoomIn
|
||||
/>
|
||||
<template v-else> -</template>
|
||||
</div>
|
||||
</div>
|
||||
@ -210,8 +273,14 @@
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<el-scrollbar height="150">
|
||||
<MdPreview v-if="item.answer" ref="editorRef" editorId="preview-only" :modelValue="item.answer"
|
||||
style="background: none" noImgZoomIn />
|
||||
<MdPreview
|
||||
v-if="item.answer"
|
||||
ref="editorRef"
|
||||
editorId="preview-only"
|
||||
:modelValue="item.answer"
|
||||
style="background: none"
|
||||
noImgZoomIn
|
||||
/>
|
||||
<template v-else> -</template>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@ -224,17 +293,31 @@
|
||||
<h5 class="p-8-12 flex align-center">
|
||||
<span class="mr-4"> {{ $t('common.param.outputParam') }}</span>
|
||||
|
||||
<el-tooltip effect="dark" :content="$t('chat.executionDetails.paramOutputTooltip')"
|
||||
placement="right">
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
:content="$t('chat.executionDetails.paramOutputTooltip')"
|
||||
placement="right"
|
||||
>
|
||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||
</el-tooltip>
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<el-scrollbar height="150">
|
||||
<el-card shadow="never" style="--el-card-padding: 8px"
|
||||
v-for="(file_content, index) in item.content" :key="index" class="mb-8">
|
||||
<MdPreview v-if="file_content" ref="editorRef" editorId="preview-only"
|
||||
:modelValue="file_content" style="background: none" noImgZoomIn />
|
||||
<el-card
|
||||
shadow="never"
|
||||
style="--el-card-padding: 8px"
|
||||
v-for="(file_content, index) in item.content"
|
||||
:key="index"
|
||||
class="mb-8"
|
||||
>
|
||||
<MdPreview
|
||||
v-if="file_content"
|
||||
ref="editorRef"
|
||||
editorId="preview-only"
|
||||
:modelValue="file_content"
|
||||
style="background: none"
|
||||
noImgZoomIn
|
||||
/>
|
||||
<template v-else> -</template>
|
||||
</el-card>
|
||||
</el-scrollbar>
|
||||
@ -255,7 +338,12 @@
|
||||
|
||||
<el-space wrap>
|
||||
<template v-for="(f, i) in item.audio_list" :key="i">
|
||||
<audio :src="f.url" controls style="width: 300px; height: 43px" class="border-r-6" />
|
||||
<audio
|
||||
:src="f.url"
|
||||
controls
|
||||
style="width: 300px; height: 43px"
|
||||
class="border-r-6"
|
||||
/>
|
||||
</template>
|
||||
</el-space>
|
||||
</div>
|
||||
@ -267,10 +355,21 @@
|
||||
{{ $t('common.param.outputParam') }}
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<el-card shadow="never" style="--el-card-padding: 8px"
|
||||
v-for="(file_content, index) in item.content" :key="index" class="mb-8">
|
||||
<MdPreview v-if="file_content" ref="editorRef" editorId="preview-only"
|
||||
:modelValue="file_content" style="background: none" noImgZoomIn />
|
||||
<el-card
|
||||
shadow="never"
|
||||
style="--el-card-padding: 8px"
|
||||
v-for="(file_content, index) in item.content"
|
||||
:key="index"
|
||||
class="mb-8"
|
||||
>
|
||||
<MdPreview
|
||||
v-if="file_content"
|
||||
ref="editorRef"
|
||||
editorId="preview-only"
|
||||
:modelValue="file_content"
|
||||
style="background: none"
|
||||
noImgZoomIn
|
||||
/>
|
||||
<template v-else> -</template>
|
||||
</el-card>
|
||||
</div>
|
||||
@ -288,8 +387,13 @@
|
||||
{{ $t('chat.executionDetails.textContent') }}:
|
||||
</p>
|
||||
<div v-if="item.content">
|
||||
<MdPreview ref="editorRef" editorId="preview-only" :modelValue="item.content"
|
||||
style="background: none" noImgZoomIn />
|
||||
<MdPreview
|
||||
ref="editorRef"
|
||||
editorId="preview-only"
|
||||
:modelValue="item.content"
|
||||
style="background: none"
|
||||
noImgZoomIn
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -308,9 +412,11 @@
|
||||
</template>
|
||||
|
||||
<!-- 工具库 -->
|
||||
<template v-if="
|
||||
<template
|
||||
v-if="
|
||||
item.type === WorkflowType.ToolLib || item.type === WorkflowType.ToolLibCustom
|
||||
">
|
||||
"
|
||||
>
|
||||
<div class="card-never border-r-6 mt-8">
|
||||
<h5 class="p-8-12">{{ $t('chat.executionDetails.input') }}</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter pre-wrap">
|
||||
@ -338,9 +444,15 @@
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<template v-if="item.document_list?.length > 0">
|
||||
<template v-for="(paragraph, paragraphIndex) in item.document_list" :key="paragraphIndex">
|
||||
<ParagraphCard :data="paragraph.metadata" :content="paragraph.page_content"
|
||||
:index="paragraphIndex" />
|
||||
<template
|
||||
v-for="(paragraph, paragraphIndex) in item.document_list"
|
||||
:key="paragraphIndex"
|
||||
>
|
||||
<ParagraphCard
|
||||
:data="paragraph.metadata"
|
||||
:content="paragraph.page_content"
|
||||
:index="paragraphIndex"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else> -</template>
|
||||
@ -352,9 +464,16 @@
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<template v-if="item.result_list?.length > 0">
|
||||
<template v-for="(paragraph, paragraphIndex) in item.result_list" :key="paragraphIndex">
|
||||
<ParagraphCard :data="paragraph.metadata" :content="paragraph.page_content"
|
||||
:index="paragraphIndex" :score="paragraph.metadata?.relevance_score" />
|
||||
<template
|
||||
v-for="(paragraph, paragraphIndex) in item.result_list"
|
||||
:key="paragraphIndex"
|
||||
>
|
||||
<ParagraphCard
|
||||
:data="paragraph.metadata"
|
||||
:content="paragraph.page_content"
|
||||
:index="paragraphIndex"
|
||||
:score="paragraph.metadata?.relevance_score"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else> -</template>
|
||||
@ -373,15 +492,25 @@
|
||||
</h5>
|
||||
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<DynamicsForm :disabled="true" label-position="top" require-asterisk-position="right"
|
||||
ref="dynamicsFormRef" :render_data="item.form_field_list" label-suffix=":"
|
||||
v-model="item.form_data" :model="item.form_data"></DynamicsForm>
|
||||
<DynamicsForm
|
||||
:disabled="true"
|
||||
label-position="top"
|
||||
require-asterisk-position="right"
|
||||
ref="dynamicsFormRef"
|
||||
:render_data="item.form_field_list"
|
||||
label-suffix=":"
|
||||
v-model="item.form_data"
|
||||
:model="item.form_data"
|
||||
></DynamicsForm>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 图片理解 -->
|
||||
<template v-if="item.type == WorkflowType.ImageUnderstandNode">
|
||||
<div class="card-never border-r-6" v-if="item.type !== WorkflowType.Application">
|
||||
<div
|
||||
class="card-never border-r-6"
|
||||
v-if="item.type !== WorkflowType.Application"
|
||||
>
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('views.application.form.roleSettings.label') }}
|
||||
</h5>
|
||||
@ -389,18 +518,30 @@
|
||||
{{ item.system || '-' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-never border-r-6 mt-8" v-if="item.type !== WorkflowType.Application">
|
||||
<div
|
||||
class="card-never border-r-6 mt-8"
|
||||
v-if="item.type !== WorkflowType.Application"
|
||||
>
|
||||
<h5 class="p-8-12">{{ $t('chat.history') }}</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<template v-if="item.history_message?.length > 0">
|
||||
<p class="mt-4 mb-4" v-for="(history, historyIndex) in item.history_message"
|
||||
:key="historyIndex">
|
||||
<p
|
||||
class="mt-4 mb-4"
|
||||
v-for="(history, historyIndex) in item.history_message"
|
||||
:key="historyIndex"
|
||||
>
|
||||
<span class="color-secondary mr-4">{{ history.role }}:</span>
|
||||
|
||||
<span v-if="Array.isArray(history.content)">
|
||||
<template v-for="(h, i) in history.content" :key="i">
|
||||
<el-image v-if="h.type === 'image_url'" :src="h.image_url.url" alt="" fit="cover"
|
||||
style="width: 40px; height: 40px; display: inline-block" class="border-r-6 mr-8" />
|
||||
<el-image
|
||||
v-if="h.type === 'image_url'"
|
||||
:src="h.image_url.url"
|
||||
alt=""
|
||||
fit="cover"
|
||||
style="width: 40px; height: 40px; display: inline-block"
|
||||
class="border-r-6 mr-8"
|
||||
/>
|
||||
|
||||
<span v-else>{{ h.text }}<br /></span>
|
||||
</template>
|
||||
@ -420,8 +561,13 @@
|
||||
<div v-if="item.image_list?.length > 0">
|
||||
<el-space wrap>
|
||||
<template v-for="(f, i) in item.image_list" :key="i">
|
||||
<el-image :src="f.url" alt="" fit="cover" style="width: 40px; height: 40px; display: block"
|
||||
class="border-r-6" />
|
||||
<el-image
|
||||
:src="f.url"
|
||||
alt=""
|
||||
fit="cover"
|
||||
style="width: 40px; height: 40px; display: block"
|
||||
class="border-r-6"
|
||||
/>
|
||||
</template>
|
||||
</el-space>
|
||||
</div>
|
||||
@ -439,8 +585,14 @@
|
||||
}}
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<MdPreview v-if="item.answer" ref="editorRef" editorId="preview-only" :modelValue="item.answer"
|
||||
style="background: none" noImgZoomIn />
|
||||
<MdPreview
|
||||
v-if="item.answer"
|
||||
ref="editorRef"
|
||||
editorId="preview-only"
|
||||
:modelValue="item.answer"
|
||||
style="background: none"
|
||||
noImgZoomIn
|
||||
/>
|
||||
<template v-else> -</template>
|
||||
</div>
|
||||
</div>
|
||||
@ -457,7 +609,11 @@
|
||||
</div>
|
||||
<div class="card-never border-r-6 mt-8">
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('views.applicationWorkflow.nodes.imageGenerateNode.negative_prompt.label') }}
|
||||
{{
|
||||
$t(
|
||||
'views.applicationWorkflow.nodes.imageGenerateNode.negative_prompt.label',
|
||||
)
|
||||
}}
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter pre-wrap">
|
||||
{{ item.negative_prompt || '-' }}
|
||||
@ -472,8 +628,14 @@
|
||||
}}
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
<MdPreview v-if="item.answer" ref="editorRef" editorId="preview-only" :modelValue="item.answer"
|
||||
style="background: none" noImgZoomIn />
|
||||
<MdPreview
|
||||
v-if="item.answer"
|
||||
ref="editorRef"
|
||||
editorId="preview-only"
|
||||
:modelValue="item.answer"
|
||||
style="background: none"
|
||||
noImgZoomIn
|
||||
/>
|
||||
<template v-else> -</template>
|
||||
</div>
|
||||
</div>
|
||||
@ -550,15 +712,15 @@
|
||||
</el-collapse-transition>
|
||||
</el-card>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<div class="card-never border-r-6 mb-12">
|
||||
<h5 class="p-8-12">
|
||||
{{ $t('chat.paragraphSource.question') }}
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
|
||||
<span class="mb-8">user: {{ problem }}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="paddedProblem" class="card-never border-r-6 mb-12">
|
||||
@ -566,9 +728,7 @@
|
||||
{{ $t('chat.paragraphSource.questionPadded') }}
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
|
||||
<span class="mb-8">user: {{ paddedProblem }}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="system" class="card-never border-r-6 mb-12">
|
||||
@ -576,9 +736,7 @@
|
||||
{{ $t('chat.paragraphSource.system') }}
|
||||
</h5>
|
||||
<div class="p-8-12 border-t-dashed lighter">
|
||||
|
||||
<span class="mb-8">{{ system }}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -591,7 +749,6 @@
|
||||
<span>{{ msg.role }}: </span>
|
||||
<span>{{ msg.content }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -636,26 +793,27 @@ const props = defineProps<{
|
||||
appType?: string
|
||||
}>()
|
||||
|
||||
|
||||
const messageList = computed(() => {
|
||||
const chat_step = props.detail?.find(item => item.step_type == "chat_step")
|
||||
const chat_step = props.detail?.find((item) => item.step_type == 'chat_step')
|
||||
if (chat_step) {
|
||||
return chat_step.message_list
|
||||
}
|
||||
return []
|
||||
})
|
||||
const get_padding_problem = () => {
|
||||
return props.detail?.find(item => item.step_type == "problem_padding")
|
||||
return props.detail?.find((item) => item.step_type == 'problem_padding')
|
||||
}
|
||||
|
||||
const get_padded_problem = () => {
|
||||
return props.detail?.find(item => item.step_type == "problem_padding")
|
||||
return props.detail?.find((item) => item.step_type == 'problem_padding')
|
||||
}
|
||||
|
||||
const paddedProblem = computed(() => {
|
||||
const problem_padded = get_padded_problem()
|
||||
if (problem_padded) {
|
||||
return problem_padded.padding_problem_text
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
})
|
||||
|
||||
@ -664,46 +822,40 @@ const problem = computed(() => {
|
||||
if (problem_padding) {
|
||||
return problem_padding.problem_text
|
||||
}
|
||||
const user_list = messageList.value.filter((item: any) => item.role == "user")
|
||||
const user_list = messageList.value.filter((item: any) => item.role == 'user')
|
||||
if (user_list.length > 0) {
|
||||
return user_list[user_list.length - 1].content
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
})
|
||||
|
||||
const system = computed(() => {
|
||||
const user_list = messageList.value.filter((item: any) => item.role == "system")
|
||||
const user_list = messageList.value.filter((item: any) => item.role == 'system')
|
||||
if (user_list.length > 0) {
|
||||
return user_list[user_list.length - 1].content
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
})
|
||||
|
||||
const historyRecord = computed<any>(() => {
|
||||
|
||||
if (messageList.value) {
|
||||
const messages = messageList.value.filter((item: any) => item.role != "system")
|
||||
const messages = messageList.value.filter((item: any) => item.role != 'system')
|
||||
if (messages.length > 2) {
|
||||
return messages.slice(0, messages.length - 2)
|
||||
}
|
||||
return []
|
||||
}
|
||||
})
|
||||
const messages = messageList.value.filter((item: any) => item.role != "system")
|
||||
|
||||
const currentChat = computed(() => {
|
||||
if (messageList.value) {
|
||||
const messages = messageList.value.filter((item: any) => item.role != "system")
|
||||
const messages = messageList.value.filter((item: any) => item.role != 'system')
|
||||
return messages.slice(messages.length - 2, messages.length - 1)
|
||||
}
|
||||
})
|
||||
|
||||
const AiResponse = computed(() => {
|
||||
if (messageList.value) {
|
||||
const messages = messageList.value.filter((item: any) => item.role != "system")
|
||||
const messages = messageList.value?.filter((item: any) => item.role != 'system')
|
||||
return messages.slice(messages.length - 1, messages.length)
|
||||
}
|
||||
})
|
||||
|
||||
const current = ref<number | string>('')
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.execution-details {
|
||||
|
||||
@ -106,7 +106,7 @@ watch(
|
||||
|
||||
function handleInputFieldList() {
|
||||
dynamicsFormRefresh.value++
|
||||
let default_value: any = {}
|
||||
const default_value: any = {}
|
||||
props.application.work_flow?.nodes
|
||||
?.filter((v: any) => v.id === 'base-node')
|
||||
.map((v: any) => {
|
||||
@ -312,8 +312,8 @@ const validate = () => {
|
||||
}
|
||||
const validate_query = () => {
|
||||
// 浏览器query参数找到接口传参
|
||||
let msg = []
|
||||
for (let f of apiInputFieldList.value) {
|
||||
const msg = []
|
||||
for (const f of apiInputFieldList.value) {
|
||||
if (f.required && !api_form_data_context.value[f.field]) {
|
||||
msg.push(f.field)
|
||||
}
|
||||
@ -328,9 +328,9 @@ const validate_query = () => {
|
||||
}
|
||||
|
||||
const initRouteQueryValue = () => {
|
||||
for (let f of apiInputFieldList.value) {
|
||||
for (const f of apiInputFieldList.value) {
|
||||
if (!api_form_data_context.value[f.field]) {
|
||||
let _value = getRouteQueryValue(f.field)
|
||||
const _value = getRouteQueryValue(f.field)
|
||||
if (_value != null) {
|
||||
api_form_data_context.value[f.field] = _value
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ function sendMessage(val: string, other_params_data?: any, chat?: chatType): Pro
|
||||
return userFormRef.value
|
||||
?.validate()
|
||||
.then((ok) => {
|
||||
let userFormData = accessToken
|
||||
const userFormData = accessToken
|
||||
? JSON.parse(localStorage.getItem(`${accessToken}userForm`) || '{}')
|
||||
: {}
|
||||
const newData = Object.keys(form_data.value).reduce((result: any, key: string) => {
|
||||
@ -640,7 +640,7 @@ const handleScroll = () => {
|
||||
|
||||
onMounted(() => {
|
||||
if (isUserInput.value && localStorage.getItem(`${accessToken}userForm`)) {
|
||||
let userFormData = JSON.parse(localStorage.getItem(`${accessToken}userForm`) || '{}')
|
||||
const userFormData = JSON.parse(localStorage.getItem(`${accessToken}userForm`) || '{}')
|
||||
form_data.value = userFormData
|
||||
}
|
||||
if (window.speechSynthesis) {
|
||||
|
||||
@ -19,7 +19,11 @@ const emit = defineEmits(['click'])
|
||||
const back: any = router.options.history.state.back
|
||||
function jump() {
|
||||
if (props.to === '-1') {
|
||||
back ? router.push(back) : router.go(-1)
|
||||
if (back) {
|
||||
router.push(back)
|
||||
} else {
|
||||
router.go(-1)
|
||||
}
|
||||
} else if (props.to) {
|
||||
router.push(props.to as RouteLocationRaw)
|
||||
} else {
|
||||
|
||||
@ -149,6 +149,8 @@ const resourceType = computed(() => {
|
||||
return 'model'
|
||||
} else if (props.source === 'TOOL') {
|
||||
return 'tool'
|
||||
} else {
|
||||
return 'application'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -44,8 +44,7 @@ function evalParseOption(option_json: any) {
|
||||
if (option_json.style) {
|
||||
style.value = option_json.style
|
||||
}
|
||||
let option = {}
|
||||
echarts
|
||||
const option = {}
|
||||
tmp.value = echarts
|
||||
eval(option_json.option)
|
||||
return option
|
||||
|
||||
@ -20,7 +20,7 @@ onMounted(() => {
|
||||
range.selectNode(htmlRef.value)
|
||||
const scripts = htmlRef.value.getElementsByTagName('script')
|
||||
if (scripts) {
|
||||
var documentFragment = range.createContextualFragment(
|
||||
const documentFragment = range.createContextualFragment(
|
||||
[...scripts]
|
||||
.map((item: HTMLElement) => {
|
||||
htmlRef.value?.removeChild(item)
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
import { ref, computed, watch } from 'vue'
|
||||
defineOptions({ name: 'MdEditorMagnify' })
|
||||
const props = defineProps<{
|
||||
title: String
|
||||
title: string
|
||||
modelValue: any
|
||||
}>()
|
||||
const emit = defineEmits(['update:modelValue', 'submitDialog'])
|
||||
|
||||
@ -61,8 +61,8 @@ import useStore from '@/stores'
|
||||
import { t } from '@/locales'
|
||||
const props = defineProps<{
|
||||
data?: {
|
||||
type: Object
|
||||
default: () => {}
|
||||
type: object
|
||||
default: () => null
|
||||
}
|
||||
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
||||
isApplication?: boolean,
|
||||
|
||||
@ -98,13 +98,12 @@ function settingApiKey(row: any) {
|
||||
|
||||
function deleteApiKey(row: any) {
|
||||
MsgConfirm(
|
||||
// @ts-ignore
|
||||
`${t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1')}: ${row.secret_key}?`,
|
||||
t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2'),
|
||||
{
|
||||
confirmButtonText: t('common.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
confirmButtonClass: 'color-danger',
|
||||
confirmButtonClass: 'danger',
|
||||
},
|
||||
)
|
||||
.then(() => {
|
||||
|
||||
@ -104,7 +104,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
||||
.putAccessToken(id as string, form.value, loading)
|
||||
.then(() => {
|
||||
emit('refresh')
|
||||
// @ts-ignore
|
||||
|
||||
MsgSuccess(t('common.settingSuccess'))
|
||||
dialogVisible.value = false
|
||||
})
|
||||
|
||||
@ -118,7 +118,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
||||
.putAccessToken(id as string, obj, loading)
|
||||
.then(() => {
|
||||
emit('refresh')
|
||||
// @ts-ignore
|
||||
|
||||
MsgSuccess(t('common.settingSuccess'))
|
||||
dialogVisible.value = false
|
||||
})
|
||||
|
||||
@ -113,7 +113,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
||||
|
||||
apiCall.then(() => {
|
||||
emit('refresh')
|
||||
//@ts-ignore
|
||||
|
||||
MsgSuccess(t('common.settingSuccess'))
|
||||
dialogVisible.value = false
|
||||
})
|
||||
|
||||
@ -68,7 +68,6 @@ const props = defineProps({
|
||||
const statisticsType = computed(() => [
|
||||
{
|
||||
id: 'customerCharts',
|
||||
// @ts-ignore
|
||||
name: t('views.applicationOverview.monitor.charts.customerTotal'),
|
||||
icon: 'app-user',
|
||||
background: '#EBF1FF',
|
||||
|
||||
@ -255,7 +255,6 @@ const shareUrl = computed(
|
||||
const dayOptions = [
|
||||
{
|
||||
value: 7,
|
||||
// @ts-ignore
|
||||
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'),
|
||||
},
|
||||
{
|
||||
@ -373,7 +372,6 @@ function refreshAccessToken() {
|
||||
const obj = {
|
||||
access_token_reset: true,
|
||||
}
|
||||
// @ts-ignore
|
||||
const str = t('views.applicationOverview.appInfo.refreshToken.refreshSuccess')
|
||||
updateAccessToken(obj, str)
|
||||
})
|
||||
|
||||
@ -603,7 +603,6 @@ const onChange = (file: any, fileList: UploadFiles, attr: string) => {
|
||||
//1、判断文件大小是否合法,文件限制不能大于 10 MB
|
||||
const isLimit = file?.size / 1024 / 1024 < 10
|
||||
if (!isLimit) {
|
||||
// @ts-ignore
|
||||
MsgError(t('common.EditAvatarDialog.fileSizeExceeded'))
|
||||
return false
|
||||
} else {
|
||||
@ -675,7 +674,6 @@ const submit = async (formEl: FormInstance | undefined) => {
|
||||
.putXpackAccessToken(id as string, fd, loading)
|
||||
.then(() => {
|
||||
emit('refresh')
|
||||
// @ts-ignore
|
||||
MsgSuccess(t('common.settingSuccess'))
|
||||
dialogVisible.value = false
|
||||
})
|
||||
|
||||
@ -227,7 +227,6 @@ const submit = async (formEl: FormInstance | undefined) => {
|
||||
.putAccessToken(id as string, obj, loading)
|
||||
.then(() => {
|
||||
emit('refresh')
|
||||
// @ts-ignore
|
||||
MsgSuccess(t('common.settingSuccess'))
|
||||
dialogVisible.value = false
|
||||
})
|
||||
|
||||
@ -218,7 +218,9 @@ function back() {
|
||||
saveApplication(true, true)
|
||||
})
|
||||
.catch((action: Action) => {
|
||||
action === 'cancel' && go()
|
||||
if (action === 'cancel') {
|
||||
go()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
go()
|
||||
@ -275,7 +277,11 @@ function openHistory() {
|
||||
}
|
||||
|
||||
function changeSave(bool: boolean) {
|
||||
bool ? initInterval() : closeInterval()
|
||||
if (bool) {
|
||||
initInterval()
|
||||
} else {
|
||||
closeInterval()
|
||||
}
|
||||
localStorage.setItem('workflowAutoSave', bool.toString())
|
||||
}
|
||||
|
||||
|
||||
@ -474,7 +474,6 @@ const permissionPrecise = computed(() => {
|
||||
return permissionMap['application'][apiType.value]
|
||||
})
|
||||
|
||||
// @ts-ignore
|
||||
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
||||
data: '{data}',
|
||||
question: '{question}',
|
||||
|
||||
@ -60,7 +60,6 @@ import useStore from '@/stores'
|
||||
const router = useRouter()
|
||||
const { common, user } = useStore()
|
||||
|
||||
// @ts-ignore
|
||||
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
||||
data: '{data}',
|
||||
question: '{question}',
|
||||
@ -69,7 +68,7 @@ const applicationFormRef = ref()
|
||||
|
||||
const loading = ref(false)
|
||||
const dialogVisible = ref<boolean>(false)
|
||||
// @ts-ignore
|
||||
|
||||
const applicationForm = ref<ApplicationFormType>({
|
||||
name: '',
|
||||
desc: '',
|
||||
|
||||
@ -109,7 +109,6 @@ const { user } = useStore()
|
||||
const router = useRouter()
|
||||
const emit = defineEmits(['refresh'])
|
||||
|
||||
// @ts-ignore
|
||||
const defaultPrompt = t('views.application.form.prompt.defaultPrompt', {
|
||||
data: '{data}',
|
||||
question: '{question}',
|
||||
|
||||
@ -205,7 +205,6 @@ const noReferencesformRef = ref()
|
||||
|
||||
const defaultValue = {
|
||||
ai_questioning: '{question}',
|
||||
// @ts-ignore
|
||||
designated_answer: t('views.application.dialog.designated_answer'),
|
||||
}
|
||||
|
||||
|
||||
@ -259,7 +259,6 @@ const formRef = ref()
|
||||
const dayOptions = [
|
||||
{
|
||||
value: 7,
|
||||
// @ts-ignore
|
||||
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'), // 使用 t 方法来国际化显示文本
|
||||
},
|
||||
{
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
:before-close="close"
|
||||
append-to-body
|
||||
>
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<template #header>
|
||||
<el-breadcrumb separator=">">
|
||||
<el-breadcrumb-item>
|
||||
<span @click="toSelectProvider" class="select-provider">
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
:destroy-on-close="true"
|
||||
:before-close="close"
|
||||
>
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<template #header>
|
||||
<el-breadcrumb separator=">">
|
||||
<el-breadcrumb-item
|
||||
><span class="active-breadcrumb">{{
|
||||
|
||||
@ -66,7 +66,7 @@ import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||
import permissionMap from '@/permission'
|
||||
|
||||
const props = defineProps<{
|
||||
title: String
|
||||
title: string
|
||||
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
||||
}>()
|
||||
|
||||
|
||||
@ -64,9 +64,9 @@ import permissionMap from '@/permission'
|
||||
|
||||
|
||||
const props = defineProps<{
|
||||
paragraphId: String
|
||||
docId: String
|
||||
knowledgeId: String
|
||||
paragraphId: string
|
||||
docId: string
|
||||
knowledgeId: string
|
||||
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
||||
}>()
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
container=".paragraph-scollbar"
|
||||
@click="handleClick"
|
||||
>
|
||||
<template v-for="(item, index) in paragraphDetail" :key="item.id">
|
||||
<template v-for="(item) in paragraphDetail" :key="item.id">
|
||||
<el-anchor-link :href="`#m${item.id}`" :title="item.title" v-if="item.title">
|
||||
<span :title="item.title">
|
||||
{{ item.title }}
|
||||
|
||||
@ -204,7 +204,9 @@ function associationClick(item: any) {
|
||||
function searchHandle() {
|
||||
paginationConfig.current_page = 1
|
||||
paragraphList.value = []
|
||||
currentDocument.value && getParagraphList(currentDocument.value)
|
||||
if (currentDocument.value) {
|
||||
getParagraphList(currentDocument.value)
|
||||
}
|
||||
}
|
||||
|
||||
function clickDocumentHandle(item: any) {
|
||||
@ -222,7 +224,10 @@ function getDocument() {
|
||||
documentList.value = res.data
|
||||
currentDocument.value =
|
||||
cloneDocumentList.value?.length > 0 ? cloneDocumentList.value[0].id : ''
|
||||
currentDocument.value && getParagraphList(currentDocument.value)
|
||||
|
||||
if (currentDocument.value) {
|
||||
getParagraphList(currentDocument.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -363,7 +363,6 @@ function mapToUrlParams(map: any[]) {
|
||||
|
||||
function deleteApplication(row: any) {
|
||||
MsgConfirm(
|
||||
// @ts-ignore
|
||||
`${t('views.application.delete.confirmTitle')}${row.name} ?`,
|
||||
t('views.application.delete.confirmMessage'),
|
||||
{
|
||||
|
||||
@ -367,7 +367,7 @@ const search_type_change = () => {
|
||||
}
|
||||
|
||||
function getRequestParams() {
|
||||
let obj: any = {
|
||||
const obj: any = {
|
||||
name: model_search_form.value.name,
|
||||
create_user: model_search_form.value.create_user,
|
||||
model_type: model_search_form.value.model_type,
|
||||
|
||||
@ -313,7 +313,6 @@ const rules = reactive<FormRules>({
|
||||
const onChange = (file: any, fileList: UploadFiles, attr: string) => {
|
||||
const isLimit = file?.size / 1024 / 1024 < 10
|
||||
if (!isLimit) {
|
||||
// @ts-ignore
|
||||
MsgError(t('theme.fileMessageError'))
|
||||
return false
|
||||
} else {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog modal-class="authorized-workspace" v-model="centerDialogVisible" width="840">
|
||||
<template #header="{ titleId, titleClass }">
|
||||
<template #header>
|
||||
<h4 class="mb-8">{{ $t('views.shared.authorized_workspace') }}</h4>
|
||||
<el-text class="color-secondary lighter">{{ $t('views.shared.authorized_tip') }}</el-text>
|
||||
</template>
|
||||
@ -11,7 +11,7 @@
|
||||
<el-radio value="BLACK_LIST">{{ $t('views.shared.BLACK_LIST') }}</el-radio>
|
||||
</el-radio-group>
|
||||
<p class="mb-8 lighter mt-16">{{ $t('views.shared.select_workspace') }}</p>
|
||||
<div class="flex border" v-loading="loading" style="overflow: hidden;">
|
||||
<div class="flex border" v-loading="loading" style="overflow: hidden">
|
||||
<div class="border-r">
|
||||
<el-input
|
||||
v-model="search"
|
||||
@ -69,7 +69,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<el-scrollbar max-height="250" wrap-class="p-16 pt-0">
|
||||
<template v-for="ele in checkedWorkspace">
|
||||
<template v-for="(ele, index) in checkedWorkspace" :key="index">
|
||||
<div class="flex-between">
|
||||
<div class="flex align-center">
|
||||
<AppIcon iconName="app-workspace"></AppIcon>
|
||||
@ -97,7 +97,6 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import type { CheckboxValueType } from 'element-plus'
|
||||
import authorizationApi from '@/api/system-shared/authorization'
|
||||
import workspaceApi from '@/api/workspace/workspace'
|
||||
import { loadPermissionApi } from '@/utils/dynamics-api/permission-api.ts'
|
||||
|
||||
const checkAll = ref(false)
|
||||
@ -137,7 +136,7 @@ const open = async ({ id }: any, type = 'Knowledge') => {
|
||||
])
|
||||
workspace.value = systemWorkspaceList.data as any
|
||||
listType.value = (authList.data || {}).authentication_type || 'WHITE_LIST'
|
||||
let workspace_id_list = (authList.data || {}).workspace_id_list || []
|
||||
const workspace_id_list = (authList.data || {}).workspace_id_list || []
|
||||
checkedWorkspace.value = workspace.value.filter((ele) => workspace_id_list.includes(ele.id))
|
||||
handleCheckedWorkspaceChange(checkedWorkspace.value)
|
||||
loading.value = false
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<KnowledgeListContainer>
|
||||
<template #header>
|
||||
<el-breadcrumb separator-icon="ArrowRight">
|
||||
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>{{ $t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<h5 class="ml-4 color-text-primary">{{ t('views.knowledge.title') }}</h5>
|
||||
</el-breadcrumb-item>
|
||||
@ -18,8 +18,6 @@ import { onMounted, ref, reactive, computed } from 'vue'
|
||||
|
||||
import KnowledgeListContainer from '@/views/knowledge/component/KnowledgeListContainer.vue'
|
||||
|
||||
import { t } from '@/locales'
|
||||
|
||||
onMounted(() => {})
|
||||
</script>
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<ContentContainer>
|
||||
<template #header>
|
||||
<el-breadcrumb separator-icon="ArrowRight">
|
||||
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>{{ $t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<h5 class="ml-4 color-text-primary">{{ t('views.model.title') }}</h5>
|
||||
</el-breadcrumb-item>
|
||||
@ -18,7 +18,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, ref, computed } from 'vue'
|
||||
import { t } from '@/locales'
|
||||
import modelListContainer from '@/views/model/index.vue'
|
||||
|
||||
onMounted(() => {})
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<template #header>
|
||||
<el-space wrap>
|
||||
<el-breadcrumb separator-icon="ArrowRight">
|
||||
<el-breadcrumb-item>{{ t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>{{ $t('views.shared.shared_resources') }}</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>
|
||||
<h5 class="ml-4 color-text-primary">{{ t('views.tool.title') }}</h5>
|
||||
</el-breadcrumb-item>
|
||||
@ -26,7 +26,6 @@ import { onMounted, ref, reactive, computed } from 'vue'
|
||||
|
||||
import ToolListContainer from '@/views/tool/component/ToolListContainer.vue'
|
||||
|
||||
import { t } from '@/locales'
|
||||
import useStore from '@/stores'
|
||||
|
||||
const { tool } = useStore()
|
||||
|
||||
@ -281,7 +281,6 @@ const daterangeValue = ref('')
|
||||
const dayOptions = [
|
||||
{
|
||||
value: 7,
|
||||
// @ts-ignore
|
||||
label: t('views.applicationOverview.monitor.pastDayOptions.past7Days'), // 使用 t 方法来国际化显示文本
|
||||
},
|
||||
{
|
||||
@ -380,7 +379,7 @@ function handleSizeChange() {
|
||||
}
|
||||
|
||||
function getRequestParams() {
|
||||
let obj: any = {
|
||||
const obj: any = {
|
||||
start_time: daterange.value.start_time,
|
||||
end_time: daterange.value.end_time,
|
||||
}
|
||||
@ -408,7 +407,7 @@ function getList() {
|
||||
|
||||
function getMenuList() {
|
||||
return operateLog.getMenuList().then((res) => {
|
||||
let arr: any[] = res.data
|
||||
const arr: any[] = res.data
|
||||
arr
|
||||
.filter((item, index, self) => index === self.findIndex((i) => i['menu'] === item['menu']))
|
||||
.forEach((ele) => {
|
||||
|
||||
@ -106,7 +106,6 @@ const onChange = (file: any) => {
|
||||
//1、判断文件大小是否合法,文件限制不能大于10MB
|
||||
const isLimit = file?.size / 1024 / 1024 < 10
|
||||
if (!isLimit) {
|
||||
// @ts-ignore
|
||||
MsgError(t('common.EditAvatarDialog.fileSizeExceeded'))
|
||||
return false
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user