feat: 优化艺术品新建页子资源提示
This commit is contained in:
@@ -209,6 +209,8 @@
|
||||
"dynamicFields": "Fields",
|
||||
"nodes": "Timeline",
|
||||
"certificates": "Certificates",
|
||||
"saveBeforeNodes": "Save basic info before editing the timeline",
|
||||
"saveBeforeCertificates": "Save basic info before uploading certificates",
|
||||
"traceCode": "Trace Code",
|
||||
"status": "Status",
|
||||
"create": "New Artwork",
|
||||
|
||||
@@ -209,6 +209,8 @@
|
||||
"dynamicFields": "动态字段",
|
||||
"nodes": "溯源时间轴",
|
||||
"certificates": "认证文件",
|
||||
"saveBeforeNodes": "保存基础信息后可维护溯源时间轴",
|
||||
"saveBeforeCertificates": "保存基础信息后可上传认证文件",
|
||||
"traceCode": "追溯码",
|
||||
"status": "状态",
|
||||
"create": "新建作品",
|
||||
|
||||
@@ -115,17 +115,19 @@
|
||||
</n-card>
|
||||
</n-grid-item>
|
||||
|
||||
<template v-if="!isNew">
|
||||
<!-- 溯源时间轴 -->
|
||||
<n-grid-item>
|
||||
<n-card :title="t('pages.artwork.nodes')" :bordered="false">
|
||||
<template #header-extra>
|
||||
<template v-if="!isNew" #header-extra>
|
||||
<n-button v-if="auth.canWrite" size="small" type="primary" @click="openNode()">
|
||||
<template #icon><n-icon :component="AddOutline" /></template>
|
||||
{{ t('pages.artwork.addNode') }}
|
||||
</n-button>
|
||||
</template>
|
||||
<n-empty v-if="!nodes.length" :description="t('common.msg.noData')" />
|
||||
<n-empty v-if="isNew" class="locked-section" :description="t('pages.artwork.saveBeforeNodes')">
|
||||
<template #icon><n-icon :component="LockClosedOutline" /></template>
|
||||
</n-empty>
|
||||
<n-empty v-else-if="!nodes.length" :description="t('common.msg.noData')" />
|
||||
<n-timeline v-else>
|
||||
<n-timeline-item v-for="n in nodes" :key="n.id" type="info" :title="n.title">
|
||||
<template #header>
|
||||
@@ -159,13 +161,16 @@
|
||||
<!-- 认证文件 -->
|
||||
<n-grid-item>
|
||||
<n-card :title="t('pages.artwork.certificates')" :bordered="false">
|
||||
<template #header-extra>
|
||||
<template v-if="!isNew" #header-extra>
|
||||
<n-button v-if="auth.canWrite" size="small" type="primary" @click="openCert()">
|
||||
<template #icon><n-icon :component="AddOutline" /></template>
|
||||
{{ t('pages.artwork.addCert') }}
|
||||
</n-button>
|
||||
</template>
|
||||
<n-empty v-if="!certs.length" :description="t('common.msg.noData')" />
|
||||
<n-empty v-if="isNew" class="locked-section" :description="t('pages.artwork.saveBeforeCertificates')">
|
||||
<template #icon><n-icon :component="LockClosedOutline" /></template>
|
||||
</n-empty>
|
||||
<n-empty v-else-if="!certs.length" :description="t('common.msg.noData')" />
|
||||
<n-grid v-else :cols="4" :x-gap="12" :y-gap="12" item-responsive responsive="screen">
|
||||
<n-grid-item v-for="c in certs" :key="c.id" span="2 m:1">
|
||||
<n-card size="small" :title="c.name">
|
||||
@@ -185,7 +190,6 @@
|
||||
</n-card>
|
||||
</n-grid-item>
|
||||
|
||||
</template>
|
||||
</n-grid>
|
||||
|
||||
<!-- 节点弹窗 -->
|
||||
@@ -251,7 +255,7 @@ import { computed, h, onMounted, reactive, ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { NTag, type FormInst, type FormRules } from 'naive-ui';
|
||||
import { ArrowBackOutline, AddOutline } from '@vicons/ionicons5';
|
||||
import { ArrowBackOutline, AddOutline, LockClosedOutline } from '@vicons/ionicons5';
|
||||
import { ArtworkStatus, CertType, NodeType } from '@artveris/shared';
|
||||
import { artworkApi, templateApi } from '@/api';
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
@@ -507,4 +511,10 @@ onMounted(async () => {
|
||||
color: #9ca3af;
|
||||
background: #f4f7fc;
|
||||
}
|
||||
.locked-section {
|
||||
padding: 28px 0;
|
||||
border: 1px dashed var(--border-color);
|
||||
border-radius: 8px;
|
||||
background: var(--table-header-bg);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user