feat: 优化知识库与工作流卡片布局
- 统一紧凑卡片、完整标题与状态元信息展示 - 移除多余入口指示并将工作流分享操作前置
This commit is contained in:
@@ -19,7 +19,6 @@ import {
|
||||
Delete,
|
||||
Edit,
|
||||
Lock,
|
||||
Notebook,
|
||||
OfficeBuilding,
|
||||
Plus,
|
||||
Promotion,
|
||||
@@ -188,7 +187,7 @@ interface FieldDefinition {
|
||||
placeholder?: string;
|
||||
}
|
||||
const primaryAction: CardPrimaryAction = {
|
||||
icon: Notebook,
|
||||
showIndicator: false,
|
||||
text: $t('documentCollection.actions.knowledge'),
|
||||
permission: '/api/v1/documentCollection/query',
|
||||
onClick(row) {
|
||||
@@ -702,12 +701,15 @@ function changeCategory(category: any) {
|
||||
:data="pageList"
|
||||
:primary-action="primaryAction"
|
||||
:actions="actions"
|
||||
density="compact"
|
||||
meta-layout="compact"
|
||||
tag-field="collectionType"
|
||||
tag-layout="stacked"
|
||||
tag-placement="details"
|
||||
:tag-map="collectionTypeLabelMap"
|
||||
:title-line-clamp="0"
|
||||
>
|
||||
<template #corner="{ item }">
|
||||
<AiResourceCornerMeta publish-placement="below">
|
||||
<template #details="{ item }">
|
||||
<AiResourceCornerMeta>
|
||||
<template #publish>
|
||||
<div
|
||||
class="knowledge-publish-chip"
|
||||
@@ -715,7 +717,10 @@ function changeCategory(category: any) {
|
||||
>
|
||||
<span class="knowledge-publish-chip__dot"></span>
|
||||
<span>{{
|
||||
resolvePublishStatusMeta(item.displayPublishStatus, item.publishStatus).label
|
||||
resolvePublishStatusMeta(
|
||||
item.displayPublishStatus,
|
||||
item.publishStatus,
|
||||
).label
|
||||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -874,10 +879,9 @@ function changeCategory(category: any) {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 22px;
|
||||
min-width: 70px;
|
||||
padding: 0 9px;
|
||||
padding: 0 8px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 999px;
|
||||
@@ -928,10 +932,9 @@ h1 {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 22px;
|
||||
min-width: 70px;
|
||||
padding: 0 9px;
|
||||
padding: 0 8px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
color: hsl(var(--text-strong));
|
||||
background: transparent;
|
||||
|
||||
@@ -57,7 +57,6 @@ import { api } from '#/api/request';
|
||||
import workflowIcon from '#/assets/ai/workflow/workflowIcon.png';
|
||||
// import workflowSvg from '#/assets/workflow.svg';
|
||||
import HeaderSearch from '#/components/headerSearch/HeaderSearch.vue';
|
||||
import DesignIcon from '#/components/icons/DesignIcon.vue';
|
||||
import CardList from '#/components/page/CardList.vue';
|
||||
import PageData from '#/components/page/PageData.vue';
|
||||
import PageSide from '#/components/page/PageSide.vue';
|
||||
@@ -118,7 +117,7 @@ interface ApiFieldDoc {
|
||||
}
|
||||
|
||||
const primaryAction: CardPrimaryAction = {
|
||||
icon: DesignIcon,
|
||||
showIndicator: false,
|
||||
text: $t('button.design'),
|
||||
permission: '/api/v1/workflow/save',
|
||||
onClick: (row: any) => {
|
||||
@@ -185,6 +184,18 @@ const actions: ActionButton[] = [
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: Share,
|
||||
text: $t('button.share'),
|
||||
permission: '/api/v1/workflow/save',
|
||||
placement: 'inline',
|
||||
disabled: (row: any) =>
|
||||
row.publishStatus !== 'PUBLISHED' || sharingWorkflowId.value === row.id,
|
||||
loading: (row: any) => sharingWorkflowId.value === row.id,
|
||||
onClick: (row: any) => {
|
||||
shareWorkflow(row);
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: Tickets,
|
||||
text: $t('aiWorkflowExecRecord.moduleName'),
|
||||
@@ -207,19 +218,6 @@ const actions: ActionButton[] = [
|
||||
showApiInstruction(row);
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: Share,
|
||||
text: $t('button.share'),
|
||||
permission: '/api/v1/workflow/save',
|
||||
placement: 'menu',
|
||||
disabled: (row: any) =>
|
||||
row.publishStatus !== 'PUBLISHED' ||
|
||||
sharingWorkflowId.value === row.id,
|
||||
loading: (row: any) => sharingWorkflowId.value === row.id,
|
||||
onClick: (row: any) => {
|
||||
shareWorkflow(row);
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: Download,
|
||||
text: $t('button.export'),
|
||||
@@ -1204,9 +1202,12 @@ function handleHeaderButtonClick(data: any) {
|
||||
:data="pageList"
|
||||
:primary-action="primaryAction"
|
||||
:actions="actions"
|
||||
density="compact"
|
||||
meta-layout="compact"
|
||||
:title-line-clamp="0"
|
||||
>
|
||||
<template #corner="{ item }">
|
||||
<AiResourceCornerMeta publish-placement="below">
|
||||
<template #details="{ item }">
|
||||
<AiResourceCornerMeta>
|
||||
<template #publish>
|
||||
<div
|
||||
class="workflow-publish-chip"
|
||||
@@ -1371,10 +1372,9 @@ function handleHeaderButtonClick(data: any) {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 22px;
|
||||
min-width: 70px;
|
||||
padding: 0 9px;
|
||||
padding: 0 8px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 999px;
|
||||
@@ -1419,10 +1419,9 @@ function handleHeaderButtonClick(data: any) {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 22px;
|
||||
min-width: 70px;
|
||||
padding: 0 9px;
|
||||
padding: 0 8px;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
color: hsl(var(--text-strong));
|
||||
background: transparent;
|
||||
|
||||
Reference in New Issue
Block a user