|
|
@@ -2,10 +2,11 @@
|
|
|
<div class="admin-page">
|
|
|
<div class="article-manage">
|
|
|
<el-card>
|
|
|
- <div slot="header" class="admin-page-header">
|
|
|
- <span class="admin-page-title">文章管理</span>
|
|
|
+ <PageHeader slot="header" title="文章管理">
|
|
|
+
|
|
|
<el-button type="primary" size="small" @click="$router.push('/article-edit')">+ 新建文章</el-button>
|
|
|
- </div>
|
|
|
+
|
|
|
+</PageHeader>
|
|
|
|
|
|
<!-- 状态标签栏 -->
|
|
|
<div class="status-tabs">
|
|
|
@@ -76,9 +77,9 @@
|
|
|
<span class="sort-header" @click.stop="onSortClick('visibility', $event)">可见性<span v-if="sortIndex('visibility') !== null" class="sort-index" :class="sortClass('visibility') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('visibility') }}</span>{{ sortIcon('visibility') }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag v-if="row.visibility === 'public'" size="small" type="success">公开</el-tag>
|
|
|
- <el-tag v-else-if="row.visibility === 'login'" size="small" type="primary">登录</el-tag>
|
|
|
- <el-tag v-else size="small" type="info">私密</el-tag>
|
|
|
+ <StatusTag v-if="row.visibility === 'public'" size="small" type="success" text="公开" />
|
|
|
+ <StatusTag v-else-if="row.visibility === 'login'" size="small" type="primary" text="登录" />
|
|
|
+ <StatusTag v-else size="small" type="info" text="私密" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="内容类型" width="90">
|
|
|
@@ -86,10 +87,10 @@
|
|
|
<span class="sort-header" @click.stop="onSortClick('contentType', $event)">内容类型<span v-if="sortIndex('contentType') !== null" class="sort-index" :class="sortClass('contentType') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('contentType') }}</span>{{ sortIcon('contentType') }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag v-if="row.contentType === 'article'" size="small" type="primary">文章</el-tag>
|
|
|
- <el-tag v-else-if="row.contentType === 'knowledge'" size="small" type="success">知识点</el-tag>
|
|
|
- <el-tag v-else-if="row.contentType === 'course'" size="small" type="warning">课程</el-tag>
|
|
|
- <el-tag v-else-if="row.contentType === 'tip'" size="small" type="info">贴士</el-tag>
|
|
|
+ <StatusTag v-if="row.contentType === 'article'" size="small" type="primary" text="文章" />
|
|
|
+ <StatusTag v-else-if="row.contentType === 'knowledge'" size="small" type="success" text="知识点" />
|
|
|
+ <StatusTag v-else-if="row.contentType === 'course'" size="small" type="warning" text="课程" />
|
|
|
+ <StatusTag v-else-if="row.contentType === 'tip'" size="small" type="info" text="贴士" />
|
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -121,10 +122,10 @@
|
|
|
<span class="sort-header" @click.stop="onSortClick('status', $event)">状态<span v-if="sortIndex('status') !== null" class="sort-index" :class="sortClass('status') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('status') }}</span>{{ sortIcon('status') }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag v-if="row.status === 'draft' && row.auditStatus === 'pending'" size="small" type="warning">待审核</el-tag>
|
|
|
- <el-tag v-else-if="row.status === 'draft'" size="small" type="info">草稿箱</el-tag>
|
|
|
- <el-tag v-else-if="row.status === 'rejected'" size="small" type="danger">已驳回</el-tag>
|
|
|
- <el-tag v-else-if="row.status === 'published'" size="small" type="success">发布中</el-tag>
|
|
|
+ <StatusTag v-if="row.status === 'draft' && row.auditStatus === 'pending'" size="small" type="warning" text="待审核" />
|
|
|
+ <StatusTag v-else-if="row.status === 'draft'" size="small" type="info" text="草稿箱" />
|
|
|
+ <StatusTag v-else-if="row.status === 'rejected'" size="small" type="danger" text="已驳回" />
|
|
|
+ <StatusTag v-else-if="row.status === 'published'" size="small" type="success" text="发布中" />
|
|
|
<el-tag v-else-if="row.status === 'withdrawn'" size="small">已撤回</el-tag>
|
|
|
<el-tag v-else size="small" type="info">{{ row.status }}</el-tag>
|
|
|
</template>
|
|
|
@@ -134,9 +135,9 @@
|
|
|
<span class="sort-header" @click.stop="onSortClick('auditStatus', $event)">审核状态<span v-if="sortIndex('auditStatus') !== null" class="sort-index" :class="sortClass('auditStatus') === 'sort-asc' ? 'sort-asc-badge' : 'sort-desc-badge'">{{ sortIndex('auditStatus') }}</span>{{ sortIcon('auditStatus') }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag v-if="row.auditStatus === 'approved'" size="small" type="success">已通过</el-tag>
|
|
|
- <el-tag v-else-if="row.auditStatus === 'pending'" size="small" type="warning">待审核</el-tag>
|
|
|
- <el-tag v-else-if="row.auditStatus === 'rejected'" size="small" type="danger" :title="row.auditReason || ''">已驳回</el-tag>
|
|
|
+ <StatusTag v-if="row.auditStatus === 'approved'" size="small" type="success" text="已通过" />
|
|
|
+ <StatusTag v-else-if="row.auditStatus === 'pending'" size="small" type="warning" text="待审核" />
|
|
|
+ <StatusTag v-else-if="row.auditStatus === 'rejected'" size="small" type="danger" :title="row.auditReason || ''" text="已驳回" />
|
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|