Browse Source

兽医PC端消息通知新增消息

master
王妍洁 1 month ago
parent
commit
09dda4283f
  1. 8
      chenhai-ui/src/api/vet/article.js
  2. 216
      chenhai-ui/src/views/vet/article/index.vue
  3. 28
      chenhai-ui/src/views/vet/notification/index.vue

8
chenhai-ui/src/api/vet/article.js

@ -84,6 +84,14 @@ export function getArticleOptions() {
});
}
// 获取文章统计信息
export function getMySimpleStats() {
return request({
url: '/vet/article/my/simpleStats',
method: 'get'
});
}
// 查询兽医经验文章列表
export function listArticle(query) {
return request({

216
chenhai-ui/src/views/vet/article/index.vue

@ -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" />-->
<!-- &lt;!&ndash; <el-table-column label="主键ID" align="center" prop="id" />&ndash;&gt;-->
<!-- <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" />-->
<!-- &lt;!&ndash; <el-table-column label="作者" align="center" prop="vetId" />&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="兽医姓名" align="center" prop="vetName" />&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="兽医头像" align="center" prop="vetAvatar" />&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="兽医职称" align="center" prop="vetTitle" />&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="分类ID" align="center" prop="categoryId" />&ndash;&gt;-->
<!-- <el-table-column label="分类名称" align="center" prop="categoryName" />-->
<!-- <el-table-column label="标签" align="center" prop="tags" />-->
<!-- &lt;!&ndash; <el-table-column label="是否置顶" align="center" prop="isTop" />&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="是否精选" align="center" prop="isFeatured" />&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="状态" align="center" prop="status" />&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="是否包含敏感词" align="center" prop="isSensitive" />&ndash;&gt;-->
<!-- &lt;!&ndash; <el-table-column label="敏感词列表" align="center" prop="sensitiveWords" />&ndash;&gt;-->
<!-- <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"
@ -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 {

28
chenhai-ui/src/views/vet/notification/index.vue

@ -215,32 +215,32 @@
<!-- 添加或修改兽医通知对话框 -->
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
<!-- <el-form-item label="接收用户ID" prop="userId">-->
<!-- <el-input v-model="form.userId" placeholder="请输入接收用户ID" />-->
<!-- </el-form-item>-->
<!--&lt;!&ndash; <el-form-item label="接收用户ID" prop="userId">&ndash;&gt;-->
<!--&lt;!&ndash; <el-input v-model="form.userId" placeholder="请输入接收用户ID" />&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- <el-form-item label="通知标题" prop="title">-->
<!-- <el-input v-model="form.title" placeholder="请输入通知标题" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="通知内容">-->
<!-- <editor v-model="form.content" :min-height="192"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="关联ID" prop="relatedId">-->
<!-- <el-input v-model="form.relatedId" placeholder="请输入关联ID" />-->
<!-- </el-form-item>-->
<!--&lt;!&ndash; <el-form-item label="关联ID" prop="relatedId">&ndash;&gt;-->
<!--&lt;!&ndash; <el-input v-model="form.relatedId" placeholder="请输入关联ID" />&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- <el-form-item label="是否已读 0:未读 1:已读" prop="isRead">-->
<!-- <el-input v-model="form.isRead" placeholder="请输入是否已读 0:未读 1:已读" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="提醒级别 1:一般通知 2:重要通知 3:紧急通知" prop="remindLevel">-->
<!-- <el-input v-model="form.remindLevel" placeholder="请输入提醒级别 1:一般通知 2:重要通知 3:紧急通知" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="阅读时间" prop="readTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.readTime"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择阅读时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!--&lt;!&ndash; <el-form-item label="阅读时间" prop="readTime">&ndash;&gt;-->
<!--&lt;!&ndash; <el-date-picker clearable&ndash;&gt;-->
<!--&lt;!&ndash; v-model="form.readTime"&ndash;&gt;-->
<!--&lt;!&ndash; type="date"&ndash;&gt;-->
<!--&lt;!&ndash; value-format="yyyy-MM-dd"&ndash;&gt;-->
<!--&lt;!&ndash; placeholder="请选择阅读时间">&ndash;&gt;-->
<!--&lt;!&ndash; </el-date-picker>&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm"> </el-button>-->

Loading…
Cancel
Save