|
|
|
@ -27,13 +27,13 @@ |
|
|
|
<!-- ></el-option>--> |
|
|
|
<!-- </el-select>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<el-form-item label="文章标签" prop="taglist"> |
|
|
|
<el-select v-model="queryParams.taglist" placeholder="请选择文章标签" clearable> |
|
|
|
<el-form-item label="文章标签" prop="tags"> |
|
|
|
<el-select v-model="queryParams.tags" placeholder="请选择文章标签" clearable> |
|
|
|
<el-option |
|
|
|
v-for="item in taglist" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
v-for="tags in tagOptions" |
|
|
|
:key="tags.value" |
|
|
|
:label="tags.label" |
|
|
|
:value="tags.value" |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
@ -109,10 +109,10 @@ |
|
|
|
<div class="card-body"> |
|
|
|
<div class="category-list"> |
|
|
|
<div |
|
|
|
v-for="tags in taglist" |
|
|
|
v-for="tags in tagOptions" |
|
|
|
:key="tags.value" |
|
|
|
class="category-item" |
|
|
|
:class="{ active: queryParams.taglistName === tags.value }" |
|
|
|
:class="{ active: queryParams.tagOptionsName === tags.value }" |
|
|
|
@click="handleTagsClick(tags.value)" |
|
|
|
> |
|
|
|
{{ tags.label }} |
|
|
|
@ -139,12 +139,15 @@ |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- </el-row>--> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
<!-- <el-row :gutter="10" class="mb8">--> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="primary"--> |
|
|
|
@ -155,97 +158,97 @@ |
|
|
|
<!-- v-hasPermi="['vet:article:add']"--> |
|
|
|
<!-- >发新帖</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
plain |
|
|
|
icon="el-icon-edit" |
|
|
|
size="mini" |
|
|
|
:disabled="single" |
|
|
|
@click="handleUpdate" |
|
|
|
v-hasPermi="['vet:article:edit']" |
|
|
|
>修改</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
plain |
|
|
|
icon="el-icon-delete" |
|
|
|
size="mini" |
|
|
|
:disabled="multiple" |
|
|
|
@click="handleDelete" |
|
|
|
v-hasPermi="['vet:article:remove']" |
|
|
|
>删除</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="warning" |
|
|
|
plain |
|
|
|
icon="el-icon-download" |
|
|
|
size="mini" |
|
|
|
@click="handleExport" |
|
|
|
v-hasPermi="['vet:article:export']" |
|
|
|
>导出</el-button> |
|
|
|
</el-col> |
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="articleList" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
<!-- <el-table-column label="主键ID" align="center" prop="id" />--> |
|
|
|
<el-table-column label="文章标题" align="center" prop="title" /> |
|
|
|
<el-table-column label="文章内容" align="center" prop="content"> |
|
|
|
<template #default="scope"> |
|
|
|
<div v-html="scope.row.content"></div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="文章摘要" align="center" prop="summary" /> |
|
|
|
<el-table-column label="封面图片" align="center" prop="coverImage" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<image-preview :src="scope.row.coverImage" :width="50" :height="50"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="文章图片" align="center" prop="images" /> |
|
|
|
<!-- <el-table-column label="作者" align="center" prop="vetId" />--> |
|
|
|
<!-- <el-table-column label="兽医姓名" align="center" prop="vetName" />--> |
|
|
|
<!-- <el-table-column label="兽医头像" align="center" prop="vetAvatar" />--> |
|
|
|
<!-- <el-table-column label="兽医职称" align="center" prop="vetTitle" />--> |
|
|
|
<!-- <el-table-column label="分类ID" align="center" prop="categoryId" />--> |
|
|
|
<el-table-column label="分类名称" align="center" prop="categoryName" /> |
|
|
|
<el-table-column label="标签" align="center" prop="tags" /> |
|
|
|
<!-- <el-table-column label="是否置顶" align="center" prop="isTop" />--> |
|
|
|
<!-- <el-table-column label="是否精选" align="center" prop="isFeatured" />--> |
|
|
|
<!-- <el-table-column label="状态" align="center" prop="status" />--> |
|
|
|
<!-- <el-table-column label="是否包含敏感词" align="center" prop="isSensitive" />--> |
|
|
|
<!-- <el-table-column label="敏感词列表" align="center" prop="sensitiveWords" />--> |
|
|
|
<el-table-column label="发布时间" align="center" prop="publishTime" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ parseTime(scope.row.publishTime, '{y}-{m}-{d}') }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-edit" |
|
|
|
style="color: #42B983" |
|
|
|
class = "article-btn alter-btn" |
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
v-hasPermi="['vet:info:edit']" |
|
|
|
>修改</el-button> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-delete" |
|
|
|
style="color: #f28888" |
|
|
|
class = "article-btn delete-btn" |
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
v-hasPermi="['vet:info:remove']" |
|
|
|
>删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="success"--> |
|
|
|
<!-- plain--> |
|
|
|
<!-- icon="el-icon-edit"--> |
|
|
|
<!-- size="mini"--> |
|
|
|
<!-- :disabled="single"--> |
|
|
|
<!-- @click="handleUpdate"--> |
|
|
|
<!-- v-hasPermi="['vet:article:edit']"--> |
|
|
|
<!-- >修改</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="danger"--> |
|
|
|
<!-- plain--> |
|
|
|
<!-- icon="el-icon-delete"--> |
|
|
|
<!-- size="mini"--> |
|
|
|
<!-- :disabled="multiple"--> |
|
|
|
<!-- @click="handleDelete"--> |
|
|
|
<!-- v-hasPermi="['vet:article:remove']"--> |
|
|
|
<!-- >删除</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="warning"--> |
|
|
|
<!-- plain--> |
|
|
|
<!-- icon="el-icon-download"--> |
|
|
|
<!-- size="mini"--> |
|
|
|
<!-- @click="handleExport"--> |
|
|
|
<!-- v-hasPermi="['vet:article:export']"--> |
|
|
|
<!-- >导出</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> |
|
|
|
<!-- </el-row>--> |
|
|
|
|
|
|
|
<!-- <el-table v-loading="loading" :data="articleList" @selection-change="handleSelectionChange">--> |
|
|
|
<!-- <el-table-column type="selection" width="55" align="center" />--> |
|
|
|
<!-- <!– <el-table-column label="主键ID" align="center" prop="id" />–>--> |
|
|
|
<!-- <el-table-column label="文章标题" align="center" prop="title" />--> |
|
|
|
<!-- <el-table-column label="文章内容" align="center" prop="content">--> |
|
|
|
<!-- <template #default="scope">--> |
|
|
|
<!-- <div v-html="scope.row.content"></div>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- <el-table-column label="文章摘要" align="center" prop="summary" />--> |
|
|
|
<!-- <el-table-column label="封面图片" align="center" prop="coverImage" width="100">--> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <image-preview :src="scope.row.coverImage" :width="50" :height="50"/>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- <el-table-column label="文章图片" align="center" prop="images" />--> |
|
|
|
<!-- <!– <el-table-column label="作者" align="center" prop="vetId" />–>--> |
|
|
|
<!-- <!– <el-table-column label="兽医姓名" align="center" prop="vetName" />–>--> |
|
|
|
<!-- <!– <el-table-column label="兽医头像" align="center" prop="vetAvatar" />–>--> |
|
|
|
<!-- <!– <el-table-column label="兽医职称" align="center" prop="vetTitle" />–>--> |
|
|
|
<!-- <!– <el-table-column label="分类ID" align="center" prop="categoryId" />–>--> |
|
|
|
<!-- <el-table-column label="分类名称" align="center" prop="categoryName" />--> |
|
|
|
<!-- <el-table-column label="标签" align="center" prop="tags" />--> |
|
|
|
<!-- <!– <el-table-column label="是否置顶" align="center" prop="isTop" />–>--> |
|
|
|
<!-- <!– <el-table-column label="是否精选" align="center" prop="isFeatured" />–>--> |
|
|
|
<!-- <!– <el-table-column label="状态" align="center" prop="status" />–>--> |
|
|
|
<!-- <!– <el-table-column label="是否包含敏感词" align="center" prop="isSensitive" />–>--> |
|
|
|
<!-- <!– <el-table-column label="敏感词列表" align="center" prop="sensitiveWords" />–>--> |
|
|
|
<!-- <el-table-column label="发布时间" align="center" prop="publishTime" width="180">--> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <span>{{ parseTime(scope.row.publishTime, '{y}-{m}-{d}') }}</span>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="180">--> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- size="mini"--> |
|
|
|
<!-- type="text"--> |
|
|
|
<!-- icon="el-icon-edit"--> |
|
|
|
<!-- style="color: #42B983"--> |
|
|
|
<!-- class = "article-btn alter-btn"--> |
|
|
|
<!-- @click="handleUpdate(scope.row)"--> |
|
|
|
<!-- v-hasPermi="['vet:info:edit']"--> |
|
|
|
<!-- >修改</el-button>--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- size="mini"--> |
|
|
|
<!-- type="text"--> |
|
|
|
<!-- icon="el-icon-delete"--> |
|
|
|
<!-- style="color: #f28888"--> |
|
|
|
<!-- class = "article-btn delete-btn"--> |
|
|
|
<!-- @click="handleDelete(scope.row)"--> |
|
|
|
<!-- v-hasPermi="['vet:info:remove']"--> |
|
|
|
<!-- >删除</el-button>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- </el-table>--> |
|
|
|
|
|
|
|
<pagination |
|
|
|
v-show="total>0" |
|
|
|
@ -321,7 +324,7 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 查看我的所有文章弹窗 --> |
|
|
|
<!-- 查看我的所有文章弹窗 --> |
|
|
|
<!-- <el-dialog :title="title" :visible.sync="flag" width="50%" append-to-body>--> |
|
|
|
<!-- <el-row :gutter="10" class="mb8">--> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
@ -347,7 +350,7 @@ |
|
|
|
<!-- >删除</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- </el-row>--> |
|
|
|
<!-- --> |
|
|
|
|
|
|
|
<!-- <el-table v-loading="loading" :data="articleList" @selection-change="handleSelectionChange">--> |
|
|
|
<!-- <el-table-column type="selection" width="55" align="center" />--> |
|
|
|
<!-- <el-table-column label="文章标题" align="center" prop="title" />--> |
|
|
|
@ -444,7 +447,7 @@ export default { |
|
|
|
categoryId: null, |
|
|
|
categoryName: null, |
|
|
|
|
|
|
|
taglistName: null, |
|
|
|
tagOptionsName: null, |
|
|
|
|
|
|
|
tags: null, |
|
|
|
isTop: null, |
|
|
|
@ -473,7 +476,7 @@ export default { |
|
|
|
// 分类列表 |
|
|
|
categories: [], |
|
|
|
// 标签列表 |
|
|
|
taglist: [], |
|
|
|
tagOptions: [], |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
@ -500,13 +503,7 @@ export default { |
|
|
|
/* 查看我的所有文章 */ |
|
|
|
handleViewMyArticles() { |
|
|
|
this.flag = true |
|
|
|
this.queryParams.pageNum = 1 |
|
|
|
this.queryParams.vetId = this.$store.state.user.userId; |
|
|
|
const query = { |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10, |
|
|
|
vetId: this.$store.state.user.userId |
|
|
|
} |
|
|
|
getMyForumArticles(this.queryParams).then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
|
this.articleList = response.data; |
|
|
|
@ -784,6 +781,7 @@ export default { |
|
|
|
/* 操作按钮 */ |
|
|
|
.forum-main { |
|
|
|
flex: 1; |
|
|
|
margin-left: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
.forum-actions { |
|
|
|
|