mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
新闻和通知的多租户修改
This commit is contained in:
@@ -55,7 +55,7 @@ public class NewsCategoryController extends BaseController
|
|||||||
/**
|
/**
|
||||||
* 查询新闻分类简短列表
|
* 查询新闻分类简短列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('iot:newsCategory:list')")
|
@PreAuthorize("@ss.hasPermi('iot:news:list')")
|
||||||
@GetMapping("/newsCategoryShortList")
|
@GetMapping("/newsCategoryShortList")
|
||||||
@ApiOperation("分类简短列表")
|
@ApiOperation("分类简短列表")
|
||||||
public AjaxResult newsCategoryShortList()
|
public AjaxResult newsCategoryShortList()
|
||||||
|
|||||||
@@ -147,7 +147,7 @@
|
|||||||
<el-tag size="mini" effect="dark" v-else>信息</el-tag>
|
<el-tag size="mini" effect="dark" v-else>信息</el-tag>
|
||||||
{{item.noticeTitle}}
|
{{item.noticeTitle}}
|
||||||
</div>
|
</div>
|
||||||
<div style="display:table-cell;width:90px;">{{ parseTime(item.createTime, '{y}-{m}-{d}') }}</div>
|
<div style="display:table-cell;width:90px;font-size:14px;"><i class="el-icon-time"></i> {{ parseTime(item.createTime, '{y}-{m}-{d}') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="60px">
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="60px" v-if="isAdmin">
|
||||||
<el-form-item label="标题" prop="title">
|
<el-form-item label="标题" prop="title">
|
||||||
<el-input v-model="queryParams.title" placeholder="请输入标题" clearable size="small" @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.title" placeholder="请输入标题" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -168,6 +168,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// 是否为管理员
|
||||||
|
isAdmin:false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@@ -196,7 +198,7 @@ export default {
|
|||||||
isTop: null,
|
isTop: null,
|
||||||
isBanner: null,
|
isBanner: null,
|
||||||
categoryName: null,
|
categoryName: null,
|
||||||
status: null,
|
status: '1', // 默认为发布
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
@@ -228,13 +230,18 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.init();
|
||||||
// 获取分类列表
|
// 获取分类列表
|
||||||
listShortNewsCategory().then(response => {
|
listShortNewsCategory().then(response => {
|
||||||
this.categoryList = response.data;
|
this.categoryList = response.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
init() {
|
||||||
|
if (this.$store.state.user.roles.indexOf("tenant") === -1 || this.$store.state.user.roles.indexOf("tenant") === -1) {
|
||||||
|
this.isAdmin = true
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 查询新闻资讯列表 */
|
/** 查询新闻资讯列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" v-if="isAdmin">
|
||||||
<el-form-item label="公告标题" prop="noticeTitle">
|
<el-form-item label="公告标题" prop="noticeTitle">
|
||||||
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter.native="handleQuery" />
|
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter.native="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -113,6 +113,8 @@ export default {
|
|||||||
dicts: ['sys_notice_status', 'sys_notice_type'],
|
dicts: ['sys_notice_status', 'sys_notice_type'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
// 是否为管理员
|
||||||
|
isAdmin:false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@@ -158,8 +160,14 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.init();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
init() {
|
||||||
|
if (this.$store.state.user.roles.indexOf("tenant") === -1 || this.$store.state.user.roles.indexOf("tenant") === -1) {
|
||||||
|
this.isAdmin = true
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 查询公告列表 */
|
/** 查询公告列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user