feat: applicaiton setting
This commit is contained in:
parent
bf630b9d07
commit
201e6f5da2
@ -38,10 +38,10 @@
|
|||||||
>{{ 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="success" :size="16" v-if="item.status === 200">
|
<el-icon class="color-success" :size="16" v-if="item.status === 200">
|
||||||
<CircleCheck />
|
<CircleCheck />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<el-icon class="danger" :size="16" v-else>
|
<el-icon class="color-danger" :size="16" v-else>
|
||||||
<CircleClose />
|
<CircleClose />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
class="model-icon mr-8"
|
class="model-icon mr-8"
|
||||||
></span>
|
></span>
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
<span class="danger">{{ $t('common.unavailable') }}</span>
|
<span class="color-danger">{{ $t('common.unavailable') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-icon class="check-icon" v-if="item.id === modelValue">
|
<el-icon class="check-icon" v-if="item.id === modelValue">
|
||||||
<Check />
|
<Check />
|
||||||
|
|||||||
@ -113,7 +113,7 @@ function deleteApiKey(row: any) {
|
|||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
cancelButtonText: t('common.cancel'),
|
cancelButtonText: t('common.cancel'),
|
||||||
confirmButtonClass: 'danger'
|
confirmButtonClass: 'color-danger'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
<span class="label">{{ $t('layout.about.expiredTime') }}</span>
|
<span class="label">{{ $t('layout.about.expiredTime') }}</span>
|
||||||
<span
|
<span
|
||||||
>{{ licenseInfo?.expired || '-' }}
|
>{{ licenseInfo?.expired || '-' }}
|
||||||
<span class="danger" v-if="licenseInfo?.expired && fromNowDate(licenseInfo?.expired)"
|
<span class="color-danger" v-if="licenseInfo?.expired && fromNowDate(licenseInfo?.expired)"
|
||||||
>({{ fromNowDate(licenseInfo?.expired) }})</span
|
>({{ fromNowDate(licenseInfo?.expired) }})</span
|
||||||
></span
|
></span
|
||||||
>
|
>
|
||||||
|
|||||||
@ -128,8 +128,8 @@ export default {
|
|||||||
addModel: 'Add Model',
|
addModel: 'Add Model',
|
||||||
},
|
},
|
||||||
dialog: {
|
dialog: {
|
||||||
addDataset: 'Add Related Knowledge',
|
addKnowledge: 'Add Related Knowledge',
|
||||||
addDatasetPlaceholder: 'The selected knowledge must use the same embedding model',
|
addKnowledgePlaceholder: 'The selected knowledge must use the same embedding model',
|
||||||
selected: 'Selected',
|
selected: 'Selected',
|
||||||
countDataset: 'Knowledge',
|
countDataset: 'Knowledge',
|
||||||
|
|
||||||
|
|||||||
@ -119,8 +119,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
dialog: {
|
dialog: {
|
||||||
addDataset: '添加关联知识库',
|
addKnowledge: '添加关联知识库',
|
||||||
addDatasetPlaceholder: '所选知识库必须使用相同的 Embedding 模型',
|
addKnowledgePlaceholder: '所选知识库必须使用相同的 Embedding 模型',
|
||||||
selected: '已选',
|
selected: '已选',
|
||||||
countDataset: '个知识库',
|
countDataset: '个知识库',
|
||||||
|
|
||||||
|
|||||||
@ -119,8 +119,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
dialog: {
|
dialog: {
|
||||||
addDataset: '新增關聯知識庫',
|
addKnowledge: '新增關聯知識庫',
|
||||||
addDatasetPlaceholder: '所選知識庫必須使用相同的 Embedding 模型',
|
addKnowledgePlaceholder: '所選知識庫必須使用相同的 Embedding 模型',
|
||||||
selected: '已選',
|
selected: '已選',
|
||||||
countDataset: '個知識庫',
|
countDataset: '個知識庫',
|
||||||
|
|
||||||
|
|||||||
@ -373,18 +373,30 @@ h5 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 颜色
|
// 颜色
|
||||||
|
|
||||||
.color-primary {
|
.color-primary {
|
||||||
color: var(--el-color-primary);
|
color: var(--el-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.color-danger {
|
||||||
|
color: var(--el-color-danger);
|
||||||
|
}
|
||||||
|
.color-warning {
|
||||||
|
color: var(--el-color-warning);
|
||||||
|
}
|
||||||
|
.color-success {
|
||||||
|
color: var(--el-color-success);
|
||||||
|
}
|
||||||
|
.color-info {
|
||||||
|
color: var(--el-color-info);
|
||||||
|
}
|
||||||
.color-text-primary {
|
.color-text-primary {
|
||||||
color: var(--el-text-color-primary);
|
color: var(--el-text-color-primary);
|
||||||
}
|
}
|
||||||
.color-secondary {
|
.color-secondary {
|
||||||
color: var(--app-text-color-secondary);
|
color: var(--app-text-color-secondary);
|
||||||
}
|
}
|
||||||
.color-success {
|
|
||||||
color: var(--el-color-success);
|
|
||||||
}
|
|
||||||
.color-input-placeholder {
|
.color-input-placeholder {
|
||||||
color: var(--app-input-color-placeholder);
|
color: var(--app-input-color-placeholder);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -211,3 +211,32 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// el-form
|
||||||
|
|
||||||
|
.el-form {
|
||||||
|
--el-form-inline-content-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-form-item__label {
|
||||||
|
font-weight: 400;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__error {
|
||||||
|
position: unset;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form--label-top .el-form-item .el-form-item__label {
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|||||||
@ -96,7 +96,7 @@ function deleteApiKey(row: any) {
|
|||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
cancelButtonText: t('common.cancel'),
|
cancelButtonText: t('common.cancel'),
|
||||||
confirmButtonClass: 'danger'
|
confirmButtonClass: 'color-danger'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span
|
<span
|
||||||
>{{ $t('views.application.form.appName.label') }}
|
>{{ $t('views.application.form.appName.label') }}
|
||||||
<span class="danger">*</span></span
|
<span class="color-danger">*</span></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -118,7 +118,7 @@
|
|||||||
>
|
>
|
||||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<span class="danger ml-4" v-if="applicationForm.model_id">*</span>
|
<span class="color-danger ml-4" v-if="applicationForm.model_id">*</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -233,7 +233,7 @@
|
|||||||
>
|
>
|
||||||
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
<AppIcon iconName="app-warning" class="app-warning-icon"></AppIcon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<span class="danger ml-4" v-if="applicationForm.model_id">*</span>
|
<span class="color-danger ml-4" v-if="applicationForm.model_id">*</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -290,7 +290,7 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<span class="mr-4">
|
<span class="mr-4">
|
||||||
{{ $t('views.application.form.voiceInput.label') }}
|
{{ $t('views.application.form.voiceInput.label') }}
|
||||||
<span class="danger" v-if="applicationForm.stt_model_enable">*</span>
|
<span class="color-danger" v-if="applicationForm.stt_model_enable">*</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
@ -330,7 +330,7 @@
|
|||||||
<span class="mr-4"
|
<span class="mr-4"
|
||||||
>{{ $t('views.application.form.voicePlay.label') }}
|
>{{ $t('views.application.form.voicePlay.label') }}
|
||||||
<span
|
<span
|
||||||
class="danger"
|
class="color-danger"
|
||||||
v-if="
|
v-if="
|
||||||
applicationForm.tts_type === 'TTS' && applicationForm.tts_model_enable
|
applicationForm.tts_type === 'TTS' && applicationForm.tts_model_enable
|
||||||
"
|
"
|
||||||
@ -395,41 +395,6 @@
|
|||||||
{{ $t('views.application.appTest') }}
|
{{ $t('views.application.appTest') }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="dialog-bg">
|
<div class="dialog-bg">
|
||||||
<div class="flex align-center p-16 mb-8">
|
|
||||||
<div
|
|
||||||
class="edit-avatar mr-12"
|
|
||||||
@mouseenter="showEditIcon = true"
|
|
||||||
@mouseleave="showEditIcon = false"
|
|
||||||
>
|
|
||||||
<el-avatar
|
|
||||||
v-if="isAppIcon(applicationForm?.icon)"
|
|
||||||
shape="square"
|
|
||||||
:size="32"
|
|
||||||
style="background: none"
|
|
||||||
>
|
|
||||||
<img :src="applicationForm?.icon" alt="" />
|
|
||||||
</el-avatar>
|
|
||||||
<el-avatar
|
|
||||||
v-else-if="applicationForm?.name"
|
|
||||||
:name="applicationForm?.name"
|
|
||||||
pinyinColor
|
|
||||||
shape="square"
|
|
||||||
:size="32"
|
|
||||||
/>
|
|
||||||
<el-avatar
|
|
||||||
v-if="showEditIcon"
|
|
||||||
shape="square"
|
|
||||||
class="edit-mask"
|
|
||||||
:size="32"
|
|
||||||
@click="openEditAvatar"
|
|
||||||
>
|
|
||||||
<el-icon><EditPen /></el-icon>
|
|
||||||
</el-avatar>
|
|
||||||
</div>
|
|
||||||
<h4>
|
|
||||||
{{ applicationForm?.name || $t('views.application.form.appName.label') }}
|
|
||||||
</h4>
|
|
||||||
</div>
|
|
||||||
<div class="scrollbar-height">
|
<div class="scrollbar-height">
|
||||||
<AiChat :applicationDetails="applicationForm" :type="'debug-ai-chat'"></AiChat>
|
<AiChat :applicationDetails="applicationForm" :type="'debug-ai-chat'"></AiChat>
|
||||||
</div>
|
</div>
|
||||||
@ -768,7 +733,8 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scrollbar-height {
|
.scrollbar-height {
|
||||||
height: calc(var(--app-main-height) - 166px);
|
padding-top: 16px;
|
||||||
|
height: calc(var(--app-main-height) - 96px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,37 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="$t('views.application.form.dialog.addDataset')"
|
:title="$t('views.application.dialog.addKnowledge')"
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
width="600"
|
width="1000"
|
||||||
append-to-body
|
append-to-body
|
||||||
class="addDataset-dialog"
|
class="addKnowledge-dialog"
|
||||||
align-center
|
align-center
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
>
|
>
|
||||||
<template #header="{ titleId, titleClass }">
|
<template #header="{ titleId, titleClass }">
|
||||||
<div class="flex-between mb-8">
|
<div class="flex-between mb-8">
|
||||||
<h4 :id="titleId" :class="titleClass">
|
<div class="flex">
|
||||||
{{ $t('views.application.form.dialog.addDataset') }}
|
<h4 :id="titleId" :class="titleClass" class="mr-8">
|
||||||
|
{{ $t('views.application.dialog.addKnowledge') }}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="flex align-center mr-8">
|
<el-text type="info">
|
||||||
<el-button link class="ml-16" @click="refresh">
|
{{ $t('views.application.dialog.addKnowledgePlaceholder') }}
|
||||||
<el-icon class="mr-4"><Refresh /></el-icon>{{ $t('common.refresh') }}
|
|
||||||
</el-button>
|
|
||||||
<el-divider direction="vertical" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-between">
|
|
||||||
<el-text type="info" class="color-secondary">
|
|
||||||
{{ $t('views.application.form.dialog.addDatasetPlaceholder') }}
|
|
||||||
</el-text>
|
</el-text>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex align-center mr-8">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchValue"
|
v-model="searchValue"
|
||||||
:placeholder="$t('common.search')"
|
:placeholder="$t('common.search')"
|
||||||
prefix-icon="Search"
|
prefix-icon="Search"
|
||||||
class="w-240"
|
class="w-240 mr-8"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<el-divider direction="vertical" />
|
||||||
|
<el-button link class="mr-16" @click="refresh">
|
||||||
|
<el-icon class="mr-4" :size="18"><Refresh /></el-icon>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
@ -49,8 +50,8 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<el-text type="info" class="color-secondary mr-8" v-if="checkList.length > 0">
|
<el-text type="info" class="color-secondary mr-8" v-if="checkList.length > 0">
|
||||||
{{ $t('views.application.form.dialog.selected') }} {{ checkList.length }}
|
{{ $t('views.application.dialog.selected') }} {{ checkList.length }}
|
||||||
{{ $t('views.application.form.dialog.countDataset') }}
|
{{ $t('views.application.dialog.countDataset') }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-button link type="primary" v-if="checkList.length > 0" @click="clearCheck">
|
<el-button link type="primary" v-if="checkList.length > 0" @click="clearCheck">
|
||||||
{{ $t('common.clear') }}
|
{{ $t('common.clear') }}
|
||||||
@ -73,9 +74,9 @@ import { computed, ref, watch } from 'vue'
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Array<any>,
|
type: Array<any>,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
loading: Boolean
|
loading: Boolean,
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['addData', 'refresh'])
|
const emit = defineEmits(['addData', 'refresh'])
|
||||||
@ -111,7 +112,7 @@ watch(searchValue, (val) => {
|
|||||||
function changeHandle() {
|
function changeHandle() {
|
||||||
if (checkList.value.length > 0) {
|
if (checkList.value.length > 0) {
|
||||||
currentEmbedding.value = props.data.filter(
|
currentEmbedding.value = props.data.filter(
|
||||||
(v) => v.id === checkList.value[0]
|
(v) => v.id === checkList.value[0],
|
||||||
)[0].embedding_mode_id
|
)[0].embedding_mode_id
|
||||||
} else if (checkList.value.length === 0) {
|
} else if (checkList.value.length === 0) {
|
||||||
currentEmbedding.value = ''
|
currentEmbedding.value = ''
|
||||||
@ -127,7 +128,7 @@ const open = (checked: any) => {
|
|||||||
checkList.value = checked
|
checkList.value = checked
|
||||||
if (checkList.value.length > 0) {
|
if (checkList.value.length > 0) {
|
||||||
currentEmbedding.value = props.data.filter(
|
currentEmbedding.value = props.data.filter(
|
||||||
(v) => v.id === checkList.value[0]
|
(v) => v.id === checkList.value[0],
|
||||||
)[0].embedding_mode_id
|
)[0].embedding_mode_id
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,20 +146,22 @@ const refresh = () => {
|
|||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.addDataset-dialog {
|
.addKnowledge-dialog {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
.el-dialog__header {
|
.el-dialog__header {
|
||||||
padding: 24px 24px 8px 24px;
|
padding: 12px 20px 4px 24px;
|
||||||
|
border-bottom: 1px solid var(--el-border-color-light);
|
||||||
}
|
}
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
padding: 8px !important;
|
padding: 8px !important;
|
||||||
}
|
}
|
||||||
.el-dialog__footer {
|
.el-dialog__footer {
|
||||||
padding: 8px 24px 24px 24px;
|
padding: 0 24px 16px 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog__headerbtn {
|
.el-dialog__headerbtn {
|
||||||
top: 9px;
|
top: 6px;
|
||||||
|
right: 6px;
|
||||||
}
|
}
|
||||||
.max-height {
|
.max-height {
|
||||||
max-height: calc(100vh - 260px);
|
max-height: calc(100vh - 260px);
|
||||||
|
|||||||
@ -375,7 +375,7 @@ function deleteApplication(row: any) {
|
|||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
cancelButtonText: t('common.cancel'),
|
cancelButtonText: t('common.cancel'),
|
||||||
confirmButtonClass: 'danger',
|
confirmButtonClass: 'color-danger',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -463,21 +463,6 @@ const handleSelectionChange = (val: any[]) => {
|
|||||||
multipleSelection.value = val
|
multipleSelection.value = val
|
||||||
}
|
}
|
||||||
|
|
||||||
// function deleteLog(row: any) {
|
|
||||||
// MsgConfirm(`是否删除对话:${row.abstract} ?`, `删除后无法恢复,请谨慎操作。`, {
|
|
||||||
// confirmButtonText: t('common.delete'),
|
|
||||||
// confirmButtonClass: 'danger'
|
|
||||||
// })
|
|
||||||
// .then(() => {
|
|
||||||
// loading.value = true
|
|
||||||
// logApi.delChatLog(id as string, row.id, loading).then(() => {
|
|
||||||
// MsgSuccess(t('common.deleteSuccess'))
|
|
||||||
// getList()
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// .catch(() => {})
|
|
||||||
// }
|
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
let obj: any = {
|
let obj: any = {
|
||||||
start_time: daterange.value.start_time,
|
start_time: daterange.value.start_time,
|
||||||
|
|||||||
@ -16,23 +16,23 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-text v-if="aggStatus?.value === State.SUCCESS || aggStatus?.value === State.REVOKED">
|
<el-text v-if="aggStatus?.value === State.SUCCESS || aggStatus?.value === State.REVOKED">
|
||||||
<el-icon class="success"><SuccessFilled /></el-icon>
|
<el-icon class="color-success"><SuccessFilled /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="aggStatus?.value === State.FAILURE">
|
<el-text v-else-if="aggStatus?.value === State.FAILURE">
|
||||||
<el-icon class="danger"><CircleCloseFilled /></el-icon>
|
<el-icon class="color-danger"><CircleCloseFilled /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="aggStatus?.value === State.STARTED">
|
<el-text v-else-if="aggStatus?.value === State.STARTED">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="aggStatus?.value === State.PENDING">
|
<el-text v-else-if="aggStatus?.value === State.PENDING">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="aggStatus?.value === State.REVOKE">
|
<el-text v-else-if="aggStatus?.value === State.REVOKE">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -3,23 +3,23 @@
|
|||||||
<span> {{ taskTypeMap[status.type] }}:</span>
|
<span> {{ taskTypeMap[status.type] }}:</span>
|
||||||
<span>
|
<span>
|
||||||
<el-text v-if="status.state === State.SUCCESS || status.state === State.REVOKED">
|
<el-text v-if="status.state === State.SUCCESS || status.state === State.REVOKED">
|
||||||
<el-icon class="success"><SuccessFilled /></el-icon>
|
<el-icon class="color-success"><SuccessFilled /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="status.state === State.FAILURE">
|
<el-text v-else-if="status.state === State.FAILURE">
|
||||||
<el-icon class="danger"><CircleCloseFilled /></el-icon>
|
<el-icon class="color-danger"><CircleCloseFilled /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="status.state === State.STARTED">
|
<el-text v-else-if="status.state === State.STARTED">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="status.state === State.PENDING">
|
<el-text v-else-if="status.state === State.PENDING">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="status.state === State.REVOKE">
|
<el-text v-else-if="status.state === State.REVOKE">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -41,15 +41,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-text type="info" class="mr-16"
|
<el-text type="color-info" class="mr-16"
|
||||||
>{{ item && item?.paragraph_count }}
|
>{{ item && item?.paragraph_count }}
|
||||||
{{ $t('views.knowledge.ResultSuccess.paragraph_count') }}</el-text
|
{{ $t('views.knowledge.ResultSuccess.paragraph_count') }}</el-text
|
||||||
>
|
>
|
||||||
<el-text v-if="item.status === '1'">
|
<el-text v-if="item.status === '1'">
|
||||||
<el-icon class="success"><SuccessFilled /></el-icon>
|
<el-icon class="color-success"><SuccessFilled /></el-icon>
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="item.status === '2'">
|
<el-text v-else-if="item.status === '2'">
|
||||||
<el-icon class="danger"><CircleCloseFilled /></el-icon>
|
<el-icon class="color-danger"><CircleCloseFilled /></el-icon>
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="item.status === '0'">
|
<el-text v-else-if="item.status === '0'">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon> {{ $t('views.knowledge.ResultSuccess.loading') }}...
|
<el-icon class="is-loading primary"><Loading /></el-icon> {{ $t('views.knowledge.ResultSuccess.loading') }}...
|
||||||
|
|||||||
@ -16,23 +16,23 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-text v-if="aggStatus?.value === State.SUCCESS || aggStatus?.value === State.REVOKED">
|
<el-text v-if="aggStatus?.value === State.SUCCESS || aggStatus?.value === State.REVOKED">
|
||||||
<el-icon class="success"><SuccessFilled /></el-icon>
|
<el-icon class="color-success"><SuccessFilled /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="aggStatus?.value === State.FAILURE">
|
<el-text v-else-if="aggStatus?.value === State.FAILURE">
|
||||||
<el-icon class="danger"><CircleCloseFilled /></el-icon>
|
<el-icon class="color-danger"><CircleCloseFilled /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="aggStatus?.value === State.STARTED">
|
<el-text v-else-if="aggStatus?.value === State.STARTED">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="aggStatus?.value === State.PENDING">
|
<el-text v-else-if="aggStatus?.value === State.PENDING">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="aggStatus?.value === State.REVOKE">
|
<el-text v-else-if="aggStatus?.value === State.REVOKE">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
{{ stateMap[aggStatus.value](aggStatus.key) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -3,23 +3,23 @@
|
|||||||
<span> {{ taskTypeMap[status.type] }}:</span>
|
<span> {{ taskTypeMap[status.type] }}:</span>
|
||||||
<span>
|
<span>
|
||||||
<el-text v-if="status.state === State.SUCCESS || status.state === State.REVOKED">
|
<el-text v-if="status.state === State.SUCCESS || status.state === State.REVOKED">
|
||||||
<el-icon class="success"><SuccessFilled /></el-icon>
|
<el-icon class="color-success"><SuccessFilled /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="status.state === State.FAILURE">
|
<el-text v-else-if="status.state === State.FAILURE">
|
||||||
<el-icon class="danger"><CircleCloseFilled /></el-icon>
|
<el-icon class="color-danger"><CircleCloseFilled /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="status.state === State.STARTED">
|
<el-text v-else-if="status.state === State.STARTED">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="status.state === State.PENDING">
|
<el-text v-else-if="status.state === State.PENDING">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="status.state === State.REVOKE">
|
<el-text v-else-if="status.state === State.REVOKE">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon>
|
<el-icon class="is-loading color-primary"><Loading /></el-icon>
|
||||||
{{ stateMap[status.state](status.type) }}
|
{{ stateMap[status.state](status.type) }}
|
||||||
</el-text>
|
</el-text>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -723,7 +723,7 @@ function syncDocument(row: any) {
|
|||||||
function syncLarkDocument(row: any) {
|
function syncLarkDocument(row: any) {
|
||||||
MsgConfirm(t('views.document.sync.confirmTitle'), t('views.document.sync.confirmMessage1'), {
|
MsgConfirm(t('views.document.sync.confirmTitle'), t('views.document.sync.confirmMessage1'), {
|
||||||
confirmButtonText: t('views.document.sync.label'),
|
confirmButtonText: t('views.document.sync.label'),
|
||||||
confirmButtonClass: 'danger',
|
confirmButtonClass: 'color-danger',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
documentApi.putLarkDocumentSync(id, row.id).then(() => {
|
documentApi.putLarkDocumentSync(id, row.id).then(() => {
|
||||||
@ -737,7 +737,7 @@ function syncWebDocument(row: any) {
|
|||||||
if (row.meta?.source_url) {
|
if (row.meta?.source_url) {
|
||||||
MsgConfirm(t('views.document.sync.confirmTitle'), t('views.document.sync.confirmMessage1'), {
|
MsgConfirm(t('views.document.sync.confirmTitle'), t('views.document.sync.confirmMessage1'), {
|
||||||
confirmButtonText: t('views.document.sync.label'),
|
confirmButtonText: t('views.document.sync.label'),
|
||||||
confirmButtonClass: 'danger',
|
confirmButtonClass: 'color-danger',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
documentApi.putDocumentSync(row.dataset_id, row.id).then(() => {
|
documentApi.putDocumentSync(row.dataset_id, row.id).then(() => {
|
||||||
@ -821,7 +821,7 @@ function deleteMulDocument() {
|
|||||||
t('views.document.delete.confirmMessage'),
|
t('views.document.delete.confirmMessage'),
|
||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
confirmButtonClass: 'danger',
|
confirmButtonClass: 'color-danger',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -857,7 +857,7 @@ function deleteDocument(row: any) {
|
|||||||
`${t('views.document.delete.confirmMessage1')} ${row.paragraph_count} ${t('views.document.delete.confirmMessage2')}`,
|
`${t('views.document.delete.confirmMessage1')} ${row.paragraph_count} ${t('views.document.delete.confirmMessage2')}`,
|
||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
confirmButtonClass: 'danger',
|
confirmButtonClass: 'color-danger',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<el-result icon="success" :title="`🎉 ${$t('views.knowledge.ResultSuccess.title')} 🎉`">
|
<el-result icon="color-success" :title="`🎉 ${$t('views.knowledge.ResultSuccess.title')} 🎉`">
|
||||||
<template #sub-title>
|
<template #sub-title>
|
||||||
<div class="mt-8">
|
<div class="mt-8">
|
||||||
<span class="bold">{{ data?.document_list.length || 0 }}</span>
|
<span class="bold">{{ data?.document_list.length || 0 }}</span>
|
||||||
@ -46,10 +46,10 @@
|
|||||||
{{ $t('views.knowledge.ResultSuccess.paragraph_count') }}</el-text
|
{{ $t('views.knowledge.ResultSuccess.paragraph_count') }}</el-text
|
||||||
>
|
>
|
||||||
<el-text v-if="item.status === '1'">
|
<el-text v-if="item.status === '1'">
|
||||||
<el-icon class="success"><SuccessFilled /></el-icon>
|
<el-icon class="color-success"><SuccessFilled /></el-icon>
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="item.status === '2'">
|
<el-text v-else-if="item.status === '2'">
|
||||||
<el-icon class="danger"><CircleCloseFilled /></el-icon>
|
<el-icon class="color-danger"><CircleCloseFilled /></el-icon>
|
||||||
</el-text>
|
</el-text>
|
||||||
<el-text v-else-if="item.status === '0'">
|
<el-text v-else-if="item.status === '0'">
|
||||||
<el-icon class="is-loading primary"><Loading /></el-icon> {{ $t('views.knowledge.ResultSuccess.loading') }}...
|
<el-icon class="is-loading primary"><Loading /></el-icon> {{ $t('views.knowledge.ResultSuccess.loading') }}...
|
||||||
|
|||||||
@ -416,7 +416,7 @@ function deleteKnowledge(row: any) {
|
|||||||
`${t('views.knowledge.delete.confirmMessage1')} ${row.application_mapping_count} ${t('views.knowledge.delete.confirmMessage2')}`,
|
`${t('views.knowledge.delete.confirmMessage1')} ${row.application_mapping_count} ${t('views.knowledge.delete.confirmMessage2')}`,
|
||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
confirmButtonClass: 'danger',
|
confirmButtonClass: 'color-danger',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -425,7 +425,7 @@ function deleteKnowledge(row: any) {
|
|||||||
`${t('views.knowledge.delete.confirmMessage1')} ${row.application_mapping_count} ${t('views.knowledge.delete.confirmMessage2')}`,
|
`${t('views.knowledge.delete.confirmMessage1')} ${row.application_mapping_count} ${t('views.knowledge.delete.confirmMessage2')}`,
|
||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
confirmButtonClass: 'danger',
|
confirmButtonClass: 'color-danger',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -95,7 +95,7 @@ const deleteHandle = (item: any, cIndex: number) => {
|
|||||||
t('views.paragraph.delete.confirmMessage'),
|
t('views.paragraph.delete.confirmMessage'),
|
||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
confirmButtonClass: 'danger'
|
confirmButtonClass: 'color-danger'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
</el-radio>
|
</el-radio>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<p class="danger">{{ $t('views.knowledge.syncWeb.tip') }}</p>
|
<p class="color-danger">{{ $t('views.knowledge.syncWeb.tip') }}</p>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click.prevent="dialogVisible = false"> {{ $t('common.cancel') }} </el-button>
|
<el-button @click.prevent="dialogVisible = false"> {{ $t('common.cancel') }} </el-button>
|
||||||
|
|||||||
@ -415,7 +415,7 @@ function deleteKnowledge(row: any) {
|
|||||||
`${t('views.knowledge.delete.confirmMessage1')} ${row.application_mapping_count} ${t('views.knowledge.delete.confirmMessage2')}`,
|
`${t('views.knowledge.delete.confirmMessage1')} ${row.application_mapping_count} ${t('views.knowledge.delete.confirmMessage2')}`,
|
||||||
{
|
{
|
||||||
confirmButtonText: t('common.confirm'),
|
confirmButtonText: t('common.confirm'),
|
||||||
confirmButtonClass: 'danger',
|
confirmButtonClass: 'color-danger',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@ -103,7 +103,7 @@
|
|||||||
<ParamSettingDialog ref="ParamSettingDialogRef" @refresh="refreshParam" />
|
<ParamSettingDialog ref="ParamSettingDialogRef" @refresh="refreshParam" />
|
||||||
<AddDatasetDialog
|
<AddDatasetDialog
|
||||||
ref="AddDatasetDialogRef"
|
ref="AddDatasetDialogRef"
|
||||||
@addData="addDataset"
|
@addData="addKnowledge"
|
||||||
:data="datasetList"
|
:data="datasetList"
|
||||||
@refresh="refresh"
|
@refresh="refresh"
|
||||||
:loading="datasetLoading"
|
:loading="datasetLoading"
|
||||||
@ -173,7 +173,7 @@ function removeDataset(id: any) {
|
|||||||
set(props.nodeModel.properties.node_data, 'dataset_id_list', list)
|
set(props.nodeModel.properties.node_data, 'dataset_id_list', list)
|
||||||
}
|
}
|
||||||
|
|
||||||
function addDataset(val: Array<string>) {
|
function addKnowledge(val: Array<string>) {
|
||||||
set(props.nodeModel.properties.node_data, 'dataset_id_list', val)
|
set(props.nodeModel.properties.node_data, 'dataset_id_list', val)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user