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