diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/NewsCategoryController.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/NewsCategoryController.java
index 8aa2e851..60f65e22 100644
--- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/NewsCategoryController.java
+++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/controller/NewsCategoryController.java
@@ -55,7 +55,7 @@ public class NewsCategoryController extends BaseController
/**
* 查询新闻分类简短列表
*/
- @PreAuthorize("@ss.hasPermi('iot:newsCategory:list')")
+ @PreAuthorize("@ss.hasPermi('iot:news:list')")
@GetMapping("/newsCategoryShortList")
@ApiOperation("分类简短列表")
public AjaxResult newsCategoryShortList()
diff --git a/vue/src/views/index.vue b/vue/src/views/index.vue
index 0e1059a1..32424c2d 100644
--- a/vue/src/views/index.vue
+++ b/vue/src/views/index.vue
@@ -147,12 +147,12 @@
信息
{{item.noticeTitle}}
-
{{ parseTime(item.createTime, '{y}-{m}-{d}') }}
+ {{ parseTime(item.createTime, '{y}-{m}-{d}') }}
-
+
diff --git a/vue/src/views/iot/news/index.vue b/vue/src/views/iot/news/index.vue
index f162a4ac..d113ed93 100644
--- a/vue/src/views/iot/news/index.vue
+++ b/vue/src/views/iot/news/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -168,6 +168,8 @@ export default {
},
data() {
return {
+ // 是否为管理员
+ isAdmin:false,
// 遮罩层
loading: true,
// 选中数组
@@ -196,7 +198,7 @@ export default {
isTop: null,
isBanner: null,
categoryName: null,
- status: null,
+ status: '1', // 默认为发布
},
// 表单参数
form: {},
@@ -228,13 +230,18 @@ export default {
},
created() {
this.getList();
-
+ this.init();
// 获取分类列表
listShortNewsCategory().then(response => {
this.categoryList = response.data;
})
},
methods: {
+ init() {
+ if (this.$store.state.user.roles.indexOf("tenant") === -1 || this.$store.state.user.roles.indexOf("tenant") === -1) {
+ this.isAdmin = true
+ }
+ },
/** 查询新闻资讯列表 */
getList() {
this.loading = true;
diff --git a/vue/src/views/system/notice/index.vue b/vue/src/views/system/notice/index.vue
index 764516ac..10f9ff5c 100644
--- a/vue/src/views/system/notice/index.vue
+++ b/vue/src/views/system/notice/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -113,6 +113,8 @@ export default {
dicts: ['sys_notice_status', 'sys_notice_type'],
data() {
return {
+ // 是否为管理员
+ isAdmin:false,
// 遮罩层
loading: true,
// 选中数组
@@ -158,8 +160,14 @@ export default {
},
created() {
this.getList();
+ this.init();
},
methods: {
+ init() {
+ if (this.$store.state.user.roles.indexOf("tenant") === -1 || this.$store.state.user.roles.indexOf("tenant") === -1) {
+ this.isAdmin = true
+ }
+ },
/** 查询公告列表 */
getList() {
this.loading = true;