feat: bugs
This commit is contained in:
parent
67bb79079f
commit
f6c5d6d9b7
@ -12,9 +12,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="width: 90%">
|
<div style="width: 90%">
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
<div>
|
<span class="ellipsis-1 mb-4" :title="title" style="width: 80%">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</div>
|
</span>
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="subTitle"> </slot>
|
<slot name="subTitle"> </slot>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
:model="folderForm"
|
:model="folderForm"
|
||||||
label-position="top"
|
label-position="top"
|
||||||
require-asterisk-position="right"
|
require-asterisk-position="right"
|
||||||
|
@submit.prevent
|
||||||
>
|
>
|
||||||
<el-form-item :label="$t('common.name')" prop="name">
|
<el-form-item :label="$t('common.name')" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
|
|||||||
@ -10,71 +10,75 @@
|
|||||||
<div
|
<div
|
||||||
@click="handleSharedNodeClick"
|
@click="handleSharedNodeClick"
|
||||||
v-if="showShared && hasPermission(EditionConst.IS_EE, 'OR')"
|
v-if="showShared && hasPermission(EditionConst.IS_EE, 'OR')"
|
||||||
class="shared-knowledge"
|
class="shared-button flex cursor"
|
||||||
:class="currentNodeKey === 'share' && 'active'"
|
:class="currentNodeKey === 'share' && 'active'"
|
||||||
>
|
>
|
||||||
<AppIcon :iconName="iconName" style="font-size: 18px"></AppIcon>
|
<AppIcon iconName="app-folder-share-active" style="font-size: 18px"></AppIcon>
|
||||||
<span class="ml-8 lighter">{{ shareTitle }}</span>
|
<span class="ml-8 lighter">{{ shareTitle }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-tree
|
<div class="tree-height border-t" :style="treeStyle">
|
||||||
ref="treeRef"
|
<el-scrollbar>
|
||||||
:data="data"
|
<el-tree
|
||||||
:props="defaultProps"
|
ref="treeRef"
|
||||||
@node-click="handleNodeClick"
|
:data="data"
|
||||||
:filter-node-method="filterNode"
|
:props="defaultProps"
|
||||||
:default-expanded-keys="[currentNodeKey]"
|
@node-click="handleNodeClick"
|
||||||
:current-node-key="currentNodeKey"
|
:filter-node-method="filterNode"
|
||||||
highlight-current
|
:default-expanded-keys="[currentNodeKey]"
|
||||||
class="overflow-inherit_node__children"
|
:current-node-key="currentNodeKey"
|
||||||
node-key="id"
|
highlight-current
|
||||||
v-loading="loading"
|
class="overflow-inherit_node__children"
|
||||||
>
|
node-key="id"
|
||||||
<template #default="{ node, data }">
|
v-loading="loading"
|
||||||
<div class="flex-between w-full" @mouseenter.stop="handleMouseEnter(data)">
|
>
|
||||||
<div class="flex align-center">
|
<template #default="{ node, data }">
|
||||||
<AppIcon iconName="app-folder" style="font-size: 16px"></AppIcon>
|
<div class="flex-between w-full" @mouseenter.stop="handleMouseEnter(data)">
|
||||||
<span class="ml-8 ellipsis" style="max-width: 110px" :label="node.label">{{
|
<div class="flex align-center">
|
||||||
node.label
|
<AppIcon iconName="app-folder" style="font-size: 16px"></AppIcon>
|
||||||
}}</span>
|
<span class="ml-8 ellipsis" style="max-width: 110px" :title="node.label">{{
|
||||||
</div>
|
node.label
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="canOperation && node.level !== 3"
|
v-if="canOperation && node.level !== 3"
|
||||||
@click.stop
|
@click.stop
|
||||||
v-show="hoverNodeId === data.id"
|
v-show="hoverNodeId === data.id"
|
||||||
@mouseenter.stop="handleMouseEnter(data)"
|
@mouseenter.stop="handleMouseEnter(data)"
|
||||||
@mouseleave.stop="handleMouseleave"
|
@mouseleave.stop="handleMouseleave"
|
||||||
class="mr-16"
|
class="mr-16"
|
||||||
>
|
>
|
||||||
<el-dropdown trigger="click" :teleported="false">
|
<el-dropdown trigger="click" :teleported="false">
|
||||||
<el-button text class="w-full">
|
<el-button text class="w-full">
|
||||||
<el-icon class="rotate-90"><MoreFilled /></el-icon>
|
<el-icon class="rotate-90"><MoreFilled /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item @click.stop="openCreateFolder(data)">
|
<el-dropdown-item @click.stop="openCreateFolder(data)">
|
||||||
<AppIcon iconName="app-add-folder"></AppIcon>
|
<AppIcon iconName="app-add-folder"></AppIcon>
|
||||||
{{ '添加子文件夹' }}
|
{{ $t('components.folder.addChildFolder') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click.stop="openEditFolder(data)">
|
<el-dropdown-item @click.stop="openEditFolder(data)">
|
||||||
<el-icon><EditPen /></el-icon>
|
<el-icon><EditPen /></el-icon>
|
||||||
{{ $t('common.edit') }}
|
{{ $t('common.edit') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
divided
|
divided
|
||||||
@click.stop="deleteFolder(data)"
|
@click.stop="deleteFolder(data)"
|
||||||
:disabled="!data.parent_id"
|
:disabled="!data.parent_id"
|
||||||
>
|
>
|
||||||
<el-icon><Delete /></el-icon>
|
<el-icon><Delete /></el-icon>
|
||||||
{{ $t('common.delete') }}
|
{{ $t('common.delete') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
<CreateFolderDialog ref="CreateFolderDialogRef" @refresh="refreshFolder" :title="title" />
|
<CreateFolderDialog ref="CreateFolderDialogRef" @refresh="refreshFolder" :title="title" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -108,10 +112,6 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
iconName: {
|
|
||||||
type: String,
|
|
||||||
default: 'app-folder-share-active',
|
|
||||||
},
|
|
||||||
shareTitle: {
|
shareTitle: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
@ -120,6 +120,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
treeStyle: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const { folder } = useStore()
|
const { folder } = useStore()
|
||||||
@ -184,11 +188,11 @@ function deleteFolder(row: Tree) {
|
|||||||
|
|
||||||
const CreateFolderDialogRef = ref()
|
const CreateFolderDialogRef = ref()
|
||||||
function openCreateFolder(row: Tree) {
|
function openCreateFolder(row: Tree) {
|
||||||
title.value = '添加子文件夹'
|
title.value = t('components.folder.addChildFolder')
|
||||||
CreateFolderDialogRef.value.open(props.source, row.id)
|
CreateFolderDialogRef.value.open(props.source, row.id)
|
||||||
}
|
}
|
||||||
function openEditFolder(row: Tree) {
|
function openEditFolder(row: Tree) {
|
||||||
title.value = '编辑文件夹'
|
title.value = t('components.folder.editFolder')
|
||||||
CreateFolderDialogRef.value.open(props.source, row.id, row)
|
CreateFolderDialogRef.value.open(props.source, row.id, row)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,39 +201,35 @@ function refreshFolder() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.shared-knowledge {
|
.folder-tree {
|
||||||
padding-left: 8px;
|
.shared-button {
|
||||||
display: flex;
|
padding: 10px 8px;
|
||||||
align-items: center;
|
font-weight: 400;
|
||||||
height: 40px;
|
font-size: 14px;
|
||||||
position: relative;
|
margin-bottom: 4px;
|
||||||
margin-bottom: 8px;
|
&.active {
|
||||||
border-radius: 4px;
|
background: var(--el-color-primary-light-9);
|
||||||
cursor: pointer;
|
border-radius: 4px;
|
||||||
|
color: var(--el-color-primary);
|
||||||
&:hover {
|
font-weight: 500;
|
||||||
background: var(--app-text-color-light-1);
|
&:hover {
|
||||||
color: var(--el-menu-text-color);
|
background: var(--el-color-primary-light-9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
border-radius: 4px;
|
||||||
|
background: var(--app-text-color-light-1);
|
||||||
|
}
|
||||||
|
&.is-active {
|
||||||
|
&:hover {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
background: var(--el-color-primary-light-9);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.tree-height {
|
||||||
&.active {
|
padding-top: 4px;
|
||||||
color: var(--el-color-primary);
|
height: calc(100vh - 210px);
|
||||||
background: var(--el-color-primary-light-9);
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
bottom: -4px;
|
|
||||||
background-color: #1f232926;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:deep(.overflow-inherit_node__children) {
|
|
||||||
.el-tree-node__children {
|
|
||||||
overflow: inherit !important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
93
ui/src/components/loading/DownloadLoading.vue
Normal file
93
ui/src/components/loading/DownloadLoading.vue
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<div class="loading-container loader">
|
||||||
|
<div class="download-loading">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts"></script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.loading-container {
|
||||||
|
display: -webkit-flex; /*safari弹性布局*/
|
||||||
|
justify-content: center;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes loader {
|
||||||
|
0% {
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
80% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.download-loading {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.download-loading div {
|
||||||
|
width: 5px;
|
||||||
|
height: 12px;
|
||||||
|
background: var(--el-color-info);
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 2px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.download-loading div:nth-child(1) {
|
||||||
|
top: -20px;
|
||||||
|
left: 0;
|
||||||
|
-webkit-animation: loader 1s -0.8s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
.download-loading div:nth-child(2) {
|
||||||
|
top: -13px;
|
||||||
|
left: 13px;
|
||||||
|
-webkit-transform: rotate(45deg);
|
||||||
|
-webkit-animation: loader 1s -0.6s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
.download-loading div:nth-child(3) {
|
||||||
|
top: 0px;
|
||||||
|
left: 20px;
|
||||||
|
-webkit-transform: rotate(90deg);
|
||||||
|
-webkit-animation: loader 1s -0.5s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
.download-loading div:nth-child(4) {
|
||||||
|
top: 13px;
|
||||||
|
left: 13px;
|
||||||
|
-webkit-transform: rotate(-45deg);
|
||||||
|
-webkit-animation: loader 1s -0.4s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
.download-loading div:nth-child(5) {
|
||||||
|
top: 20px;
|
||||||
|
left: 0px;
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
-webkit-animation: loader 1s -0.3s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
.download-loading div:nth-child(6) {
|
||||||
|
top: 13px;
|
||||||
|
left: -13px;
|
||||||
|
-webkit-transform: rotate(45deg);
|
||||||
|
-webkit-animation: loader 1s -0.2s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
.download-loading div:nth-child(7) {
|
||||||
|
top: 0px;
|
||||||
|
left: -20px;
|
||||||
|
-webkit-transform: rotate(90deg);
|
||||||
|
-webkit-animation: loader 1s -0.1s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
.download-loading div:nth-child(8) {
|
||||||
|
top: -13px;
|
||||||
|
left: -13px;
|
||||||
|
-webkit-transform: rotate(-45deg);
|
||||||
|
-webkit-animation: loader 1s 0s infinite ease-in-out;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -7,12 +7,14 @@ export default {
|
|||||||
selectParagraph: {
|
selectParagraph: {
|
||||||
title: 'Select Segments',
|
title: 'Select Segments',
|
||||||
error: 'Process only the failed segments',
|
error: 'Process only the failed segments',
|
||||||
all: 'All Segments'
|
all: 'All Segments',
|
||||||
},
|
},
|
||||||
folder: {
|
folder: {
|
||||||
addFolder: 'Add Folder',
|
addFolder: 'Add Folder',
|
||||||
|
addChildFolder: 'Add Child Folder',
|
||||||
|
editFolder: 'Edit Folder',
|
||||||
folderNamePlaceholder: 'Please enter a name',
|
folderNamePlaceholder: 'Please enter a name',
|
||||||
description: 'Description',
|
description: 'Description',
|
||||||
descriptionPlaceholder: 'Please enter a description',
|
descriptionPlaceholder: 'Please enter a description',
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,8 @@ export default {
|
|||||||
},
|
},
|
||||||
folder: {
|
folder: {
|
||||||
addFolder: '添加文件夹',
|
addFolder: '添加文件夹',
|
||||||
|
addChildFolder: '添加子文件夹',
|
||||||
|
editFolder: '编辑文件夹',
|
||||||
folderNamePlaceholder: '请输入名称',
|
folderNamePlaceholder: '请输入名称',
|
||||||
description: '描述',
|
description: '描述',
|
||||||
descriptionPlaceholder: '请输入描述',
|
descriptionPlaceholder: '请输入描述',
|
||||||
|
|||||||
@ -11,6 +11,8 @@ export default {
|
|||||||
},
|
},
|
||||||
folder: {
|
folder: {
|
||||||
addFolder: '添加文件夾',
|
addFolder: '添加文件夾',
|
||||||
|
addChildFolder: '添加子文件夾',
|
||||||
|
editFolder: '編輯文件夾',
|
||||||
folderNamePlaceholder: '請輸入名稱',
|
folderNamePlaceholder: '請輸入名稱',
|
||||||
description: '描述',
|
description: '描述',
|
||||||
descriptionPlaceholder: '請輸入描述',
|
descriptionPlaceholder: '請輸入描述',
|
||||||
|
|||||||
@ -179,3 +179,26 @@
|
|||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 下载中
|
||||||
|
.dotting {
|
||||||
|
display: inline-block;
|
||||||
|
width: 10px;
|
||||||
|
min-height: 2px;
|
||||||
|
padding-right: 2px;
|
||||||
|
margin-left: 2px;
|
||||||
|
padding-left: 2px;
|
||||||
|
border-left: 2px solid currentColor;
|
||||||
|
border-right: 2px solid currentColor;
|
||||||
|
background-color: currentColor;
|
||||||
|
background-clip: content-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-webkit-animation: dot 0.8s infinite step-start both;
|
||||||
|
animation: dot 0.8s infinite step-start both;
|
||||||
|
&:before {
|
||||||
|
content: '...';
|
||||||
|
}
|
||||||
|
&::before {
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -203,6 +203,9 @@
|
|||||||
.el-dialog {
|
.el-dialog {
|
||||||
--el-dialog-padding-primary: 24px;
|
--el-dialog-padding-primary: 24px;
|
||||||
--el-dialog-border-radius: 8px;
|
--el-dialog-border-radius: 8px;
|
||||||
|
.el-dialog__body {
|
||||||
|
color: var(--el-text-color-primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.el-dialog__headerbtn {
|
.el-dialog__headerbtn {
|
||||||
top: 8px;
|
top: 8px;
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<img :src="detail?.icon" alt="" />
|
<img :src="detail?.icon" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
|
|
||||||
<LogoIcon v-else height="28px" style="width: 28px; height: 28px; display: block" />
|
<LogoIcon v-else height="32px" />
|
||||||
<el-avatar
|
<el-avatar
|
||||||
v-if="showEditIcon"
|
v-if="showEditIcon"
|
||||||
shape="square"
|
shape="square"
|
||||||
|
|||||||
@ -41,11 +41,7 @@
|
|||||||
>
|
>
|
||||||
<img :src="detail?.icon" alt="" />
|
<img :src="detail?.icon" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
<LogoIcon
|
<LogoIcon v-else height="32px" />
|
||||||
v-else
|
|
||||||
height="28px"
|
|
||||||
style="width: 28px; height: 28px; display: block"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="ellipsis">
|
<h4 class="ellipsis">
|
||||||
|
|||||||
@ -92,7 +92,7 @@
|
|||||||
>
|
>
|
||||||
<img :src="detail?.icon" alt="" />
|
<img :src="detail?.icon" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
<LogoIcon v-else height="28px" style="width: 28px; height: 28px; display: block" />
|
<LogoIcon v-else height="32px" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
|
|||||||
@ -45,29 +45,33 @@
|
|||||||
v-loading="folderLoading"
|
v-loading="folderLoading"
|
||||||
:canOperation="false"
|
:canOperation="false"
|
||||||
showShared
|
showShared
|
||||||
|
:shareTitle="$t('views.system.shared.shared_knowledge')"
|
||||||
|
:treeStyle="{ height: 'calc(100vh - 320px)' }"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<el-scrollbar>
|
<div class="layout-bg h-full">
|
||||||
<div class="max-height layout-bg p-16-24">
|
<el-scrollbar>
|
||||||
<el-row :gutter="12" v-loading="loading">
|
<div class="p-16-24">
|
||||||
<el-col
|
<el-row :gutter="12" v-loading="loading">
|
||||||
:span="12"
|
<el-col
|
||||||
v-for="(item, index) in filterData.filter((v: any) => v.resource_type !== 'folder')"
|
:span="12"
|
||||||
:key="index"
|
v-for="(item, index) in filterData.filter((v: any) => v.resource_type !== 'folder')"
|
||||||
class="mb-16"
|
:key="index"
|
||||||
>
|
class="mb-16"
|
||||||
<CardCheckbox
|
|
||||||
value-field="id"
|
|
||||||
:data="item"
|
|
||||||
v-model="checkList"
|
|
||||||
@change="changeHandle"
|
|
||||||
>
|
>
|
||||||
<span class="ellipsis cursor ml-12" :title="item.name"> {{ item.name }}</span>
|
<CardCheckbox
|
||||||
</CardCheckbox>
|
value-field="id"
|
||||||
</el-col>
|
:data="item"
|
||||||
</el-row>
|
v-model="checkList"
|
||||||
</div>
|
@change="changeHandle"
|
||||||
</el-scrollbar>
|
>
|
||||||
|
<span class="ellipsis cursor ml-12" :title="item.name"> {{ item.name }}</span>
|
||||||
|
</CardCheckbox>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
</LayoutContainer>
|
</LayoutContainer>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -216,9 +220,5 @@ defineExpose({ open })
|
|||||||
top: 6px;
|
top: 6px;
|
||||||
right: 6px;
|
right: 6px;
|
||||||
}
|
}
|
||||||
.max-height {
|
|
||||||
max-height: calc(100vh - 260px);
|
|
||||||
min-height: 500px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-if="search_type === 'name'"
|
v-if="search_type === 'name'"
|
||||||
v-model="search_form.name"
|
v-model="search_form.name"
|
||||||
@change="getList"
|
@change="searchHandel"
|
||||||
:placeholder="$t('common.searchBar.placeholder')"
|
:placeholder="$t('common.searchBar.placeholder')"
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
clearable
|
clearable
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-else-if="search_type === 'create_user'"
|
v-else-if="search_type === 'create_user'"
|
||||||
v-model="search_form.create_user"
|
v-model="search_form.create_user"
|
||||||
@change="getList"
|
@change="searchHandel"
|
||||||
clearable
|
clearable
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
>
|
>
|
||||||
@ -177,7 +177,7 @@
|
|||||||
@click="router.push({ path: `/application/${item.id}/${item.type}/overview` })"
|
@click="router.push({ path: `/application/${item.id}/${item.type}/overview` })"
|
||||||
>
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<LogoIcon height="28px" style="width: 28px; height: 28px; display: block" />
|
<LogoIcon height="32px" />
|
||||||
</template>
|
</template>
|
||||||
<template #subTitle>
|
<template #subTitle>
|
||||||
<el-text class="color-secondary" size="small">
|
<el-text class="color-secondary" size="small">
|
||||||
@ -507,6 +507,13 @@ function refreshFolder() {
|
|||||||
applicationList.value = []
|
applicationList.value = []
|
||||||
getFolder()
|
getFolder()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function searchHandel() {
|
||||||
|
paginationConfig.current_page = 1
|
||||||
|
applicationList.value = []
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getFolder(true)
|
getFolder(true)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
>
|
>
|
||||||
<img :src="applicationDetail?.icon" alt="" />
|
<img :src="applicationDetail?.icon" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
<LogoIcon v-else height="28px" style="width: 28px; height: 28px; display: block" />
|
<LogoIcon v-else height="32px" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>{{ applicationDetail?.name }}</h4>
|
<h4>{{ applicationDetail?.name }}</h4>
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
>
|
>
|
||||||
<img :src="applicationDetail?.icon" alt="" />
|
<img :src="applicationDetail?.icon" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
<LogoIcon v-else height="28px" style="width: 28px; height: 28px; display: block" />
|
<LogoIcon v-else height="32px" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>{{ applicationDetail?.name }}</h4>
|
<h4>{{ applicationDetail?.name }}</h4>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
>
|
>
|
||||||
<img :src="applicationDetail?.icon" alt="" />
|
<img :src="applicationDetail?.icon" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
<LogoIcon v-else height="28px" style="width: 28px; height: 28px; display: block" />
|
<LogoIcon v-else height="32px" />
|
||||||
</div>
|
</div>
|
||||||
<h4 v-show="!isPcCollapse">{{ applicationDetail?.name }}</h4>
|
<h4 v-show="!isPcCollapse">{{ applicationDetail?.name }}</h4>
|
||||||
</div>
|
</div>
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<!-- TODO -->
|
<!-- TODO -->
|
||||||
<span v-show="!isPcCollapse" class="ml-8 color-text-primary">{{ 222 }}</span>
|
<span v-show="!isPcCollapse" class="ml-8 color-text-primary">{{ 222 }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="avatar-dropdown">
|
<el-dropdown-menu class="avatar-dropdown">
|
||||||
<div class="flex align-center" style="padding: 12px;">
|
<div class="flex align-center" style="padding: 12px;">
|
||||||
@ -724,4 +724,4 @@ onMounted(() => {
|
|||||||
.avatar-dropdown {
|
.avatar-dropdown {
|
||||||
min-width: 240px;
|
min-width: 240px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -128,17 +128,4 @@ const submitHandle = () => {
|
|||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss"></style>
|
||||||
// .select-knowledge-dialog {
|
|
||||||
// padding: 0;
|
|
||||||
// .el-dialog__header {
|
|
||||||
// padding: 24px 24px 0 24px;
|
|
||||||
// }
|
|
||||||
// .el-dialog__body {
|
|
||||||
// padding: 8px !important;
|
|
||||||
// }
|
|
||||||
// .el-dialog__footer {
|
|
||||||
// padding: 0 24px 24px;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-if="search_type === 'name'"
|
v-if="search_type === 'name'"
|
||||||
v-model="search_form.name"
|
v-model="search_form.name"
|
||||||
@change="getList"
|
@change="searchHandel"
|
||||||
:placeholder="$t('common.searchBar.placeholder')"
|
:placeholder="$t('common.searchBar.placeholder')"
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
clearable
|
clearable
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-else-if="search_type === 'create_user'"
|
v-else-if="search_type === 'create_user'"
|
||||||
v-model="search_form.create_user"
|
v-model="search_form.create_user"
|
||||||
@change="getList"
|
@change="searchHandel"
|
||||||
clearable
|
clearable
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
>
|
>
|
||||||
@ -364,7 +364,6 @@ const paginationConfig = reactive({
|
|||||||
total: 0,
|
total: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
const knowledgeList = ref<any[]>([])
|
|
||||||
|
|
||||||
const CreateKnowledgeDialogRef = ref()
|
const CreateKnowledgeDialogRef = ref()
|
||||||
const currentCreateDialog = shallowRef<any>(null)
|
const currentCreateDialog = shallowRef<any>(null)
|
||||||
@ -487,7 +486,7 @@ function getList() {
|
|||||||
.getKnowledgeListPage(paginationConfig, params, loading)
|
.getKnowledgeListPage(paginationConfig, params, loading)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
paginationConfig.total = res.data?.total
|
paginationConfig.total = res.data?.total
|
||||||
knowledge.setKnowledgeList([...knowledgeList.value, ...res.data.records])
|
knowledge.setKnowledgeList([...knowledge.knowledgeList, ...res.data.records])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,6 +494,12 @@ function clickFolder(item: any) {
|
|||||||
folder.setCurrentFolder(item)
|
folder.setCurrentFolder(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function searchHandel() {
|
||||||
|
paginationConfig.current_page = 1
|
||||||
|
knowledge.setKnowledgeList([])
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (apiType.value !== 'workspace') {
|
if (apiType.value !== 'workspace') {
|
||||||
folder.setCurrentFolder({
|
folder.setCurrentFolder({
|
||||||
|
|||||||
@ -52,15 +52,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<!-- progress -->
|
<!-- progress -->
|
||||||
<div class="progress-mask" v-if="currentModel.status === 'DOWNLOAD'">
|
<div class="progress-mask" v-if="currentModel.status === 'DOWNLOAD'">
|
||||||
<!-- <DownloadLoading class="percentage" /> -->
|
<DownloadLoading class="percentage" />
|
||||||
|
|
||||||
<div class="percentage-label flex-center">
|
<div class="percentage-label flex-center">
|
||||||
{{ $t('views.model.download.downloading') }} <span class="dotting"></span>
|
{{ $t('views.model.download.downloading') }} <span class="dotting"></span>
|
||||||
<el-button
|
<el-button link type="primary" class="ml-16" @click.stop="cancelDownload"
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
class="ml-16"
|
|
||||||
@click.stop="cancelDownload"
|
|
||||||
>{{ $t('views.model.download.cancelDownload') }}
|
>{{ $t('views.model.download.cancelDownload') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -128,7 +124,7 @@
|
|||||||
import type { Provider, Model } from '@/api/type/model'
|
import type { Provider, Model } from '@/api/type/model'
|
||||||
import { computed, ref, onMounted, onBeforeUnmount } from 'vue'
|
import { computed, ref, onMounted, onBeforeUnmount } from 'vue'
|
||||||
import EditModel from '@/views/model/component/EditModel.vue'
|
import EditModel from '@/views/model/component/EditModel.vue'
|
||||||
// import DownloadLoading from '@/components/loading/DownloadLoading.vue'
|
import DownloadLoading from '@/components/loading/DownloadLoading.vue'
|
||||||
import { MsgConfirm } from '@/utils/message'
|
import { MsgConfirm } from '@/utils/message'
|
||||||
import { modelType } from '@/enums/model'
|
import { modelType } from '@/enums/model'
|
||||||
import ParamSettingDialog from './ParamSettingDialog.vue'
|
import ParamSettingDialog from './ParamSettingDialog.vue'
|
||||||
@ -146,14 +142,12 @@ const props = defineProps<{
|
|||||||
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
apiType: 'systemShare' | 'workspace' | 'systemManage'
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
|
||||||
const permissionPrecise = computed(() => {
|
const permissionPrecise = computed(() => {
|
||||||
return permissionMap['model'][props.apiType]
|
return permissionMap['model'][props.apiType]
|
||||||
})
|
})
|
||||||
|
|
||||||
const downModel = ref<Model>()
|
const downModel = ref<Model>()
|
||||||
|
|
||||||
|
|
||||||
const currentModel = computed(() => {
|
const currentModel = computed(() => {
|
||||||
if (downModel.value) {
|
if (downModel.value) {
|
||||||
return downModel.value
|
return downModel.value
|
||||||
@ -287,12 +281,6 @@ onBeforeUnmount(() => {
|
|||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .percentage-value {
|
|
||||||
// display: flex;
|
|
||||||
// font-size: 13px;
|
|
||||||
// align-items: center;
|
|
||||||
// color: var(--app-text-color-secondary);
|
|
||||||
// }
|
|
||||||
.percentage-label {
|
.percentage-label {
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|||||||
@ -55,12 +55,7 @@
|
|||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
<LogoIcon
|
<LogoIcon v-else-if="isApplication" height="32px" class="mr-12" />
|
||||||
v-else-if="isApplication"
|
|
||||||
height="28px"
|
|
||||||
style="width: 28px; height: 28px; display: block"
|
|
||||||
class="mr-12"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<KnowledgeIcon class="mr-12" :size="20" v-else-if="isKnowledge" :type="row.icon" />
|
<KnowledgeIcon class="mr-12" :size="20" v-else-if="isKnowledge" :type="row.icon" />
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-if="search_type === 'name'"
|
v-if="search_type === 'name'"
|
||||||
v-model="search_form.name"
|
v-model="search_form.name"
|
||||||
@change="getList"
|
@change="searchHandel"
|
||||||
:placeholder="$t('common.searchBar.placeholder')"
|
:placeholder="$t('common.searchBar.placeholder')"
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
clearable
|
clearable
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-else-if="search_type === 'create_user'"
|
v-else-if="search_type === 'create_user'"
|
||||||
v-model="search_form.create_user"
|
v-model="search_form.create_user"
|
||||||
@change="getList"
|
@change="searchHandel"
|
||||||
clearable
|
clearable
|
||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
>
|
>
|
||||||
@ -573,7 +573,7 @@ function getList() {
|
|||||||
const params = {
|
const params = {
|
||||||
[search_type.value]: search_form.value[search_type.value],
|
[search_type.value]: search_form.value[search_type.value],
|
||||||
folder_id: folder.currentFolder?.id || user.getWorkspaceId(),
|
folder_id: folder.currentFolder?.id || user.getWorkspaceId(),
|
||||||
scope: systemType === 'systemShare' ? 'SHARED' : 'WORKSPACE',
|
scope: apiType.value === 'systemShare' ? 'SHARED' : 'WORKSPACE',
|
||||||
}
|
}
|
||||||
loadSharedApi({ type: 'tool', isShared: isShared.value, systemType: apiType.value })
|
loadSharedApi({ type: 'tool', isShared: isShared.value, systemType: apiType.value })
|
||||||
.getToolListPage(paginationConfig, params, loading)
|
.getToolListPage(paginationConfig, params, loading)
|
||||||
@ -587,6 +587,12 @@ function clickFolder(item: any) {
|
|||||||
folder.setCurrentFolder(item)
|
folder.setCurrentFolder(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function searchHandel() {
|
||||||
|
paginationConfig.current_page = 1
|
||||||
|
tool.setToolList([])
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (apiType.value !== 'workspace') {
|
if (apiType.value !== 'workspace') {
|
||||||
getList()
|
getList()
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
>
|
>
|
||||||
<img :src="item?.icon" alt="" />
|
<img :src="item?.icon" alt="" />
|
||||||
</el-avatar>
|
</el-avatar>
|
||||||
<LogoIcon v-else height="28px" style="width: 28px; height: 28px; display: block" />
|
<LogoIcon v-else height="32px" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { isAppIcon } from '@/utils/common'
|
import { isAppIcon } from '@/utils/common'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user