mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
通知公告和新闻咨询完善
This commit is contained in:
@@ -327,11 +327,11 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!--通知公告详情 -->
|
<!--通知公告详情 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
<el-dialog :title="notice.noticeTitle" :visible.sync="open" width="800px" append-to-body>
|
||||||
<div style="margin-top:-20px;margin-bottom:10px;">
|
<div style="margin-top:-20px;margin-bottom:10px;">
|
||||||
<el-tag size="mini" effect="dark" type="warning" v-if="notice.noticeType==2">公告</el-tag>
|
<el-tag size="mini" effect="dark" type="warning" v-if="notice.noticeType==2">公告</el-tag>
|
||||||
<el-tag size="mini" effect="dark" v-else>信息</el-tag>
|
<el-tag size="mini" effect="dark" v-else>信息</el-tag>
|
||||||
{{notice.createTime}}
|
<span style="margin-left:20px;">{{notice.createTime}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-loading="loading" style="line-height:24px;padding:10px;border:1px solid #eee;border-radius:10px;">
|
<div v-loading="loading" style="line-height:24px;padding:10px;border:1px solid #eee;border-radius:10px;">
|
||||||
<div v-html="notice.noticeContent"></div>
|
<div v-html="notice.noticeContent"></div>
|
||||||
@@ -385,8 +385,6 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 信息列表
|
// 信息列表
|
||||||
noticeList: [],
|
noticeList: [],
|
||||||
// 信息详情
|
// 信息详情
|
||||||
@@ -462,7 +460,6 @@ export default {
|
|||||||
getNotice(id).then(response => {
|
getNotice(id).then(response => {
|
||||||
this.notice = response.data;
|
this.notice = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = this.notice.noticeTitle;
|
|
||||||
this.loading=false;
|
this.loading=false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-view" @click="openDetailDialog(scope.row.newsId)">查看</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:news:edit']">修改</el-button>
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:news:edit']">修改</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:news:remove']">删除</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:news:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -144,6 +145,20 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--通知公告详情 -->
|
||||||
|
<el-dialog :title="form.title" :visible.sync="openDetail" width="800px" append-to-body>
|
||||||
|
<div style="margin-top:-20px;margin-bottom:10px;">
|
||||||
|
<el-tag size="mini" effect="dark" type="success">{{form.categoryName}}</el-tag>
|
||||||
|
<span style="margin-left:20px;">{{form.createTime}}</span>
|
||||||
|
</div>
|
||||||
|
<div v-loading="loadingDetail" style="line-height:24px;padding:10px;border:1px solid #eee;border-radius:10px;">
|
||||||
|
<div v-html="form.content"></div>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="closeDetail"> 关 闭 </el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -170,6 +185,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
// 是否为管理员
|
// 是否为管理员
|
||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
|
// 详情加载
|
||||||
|
loadingDetail: false,
|
||||||
|
// 打开详情
|
||||||
|
openDetail: false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@@ -231,15 +250,16 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.init();
|
this.init();
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
if (this.$store.state.user.roles.indexOf("tenant") === -1 && this.$store.state.user.roles.indexOf("general") === -1) {
|
||||||
|
this.isAdmin = true
|
||||||
// 获取分类列表
|
// 获取分类列表
|
||||||
listShortNewsCategory().then(response => {
|
listShortNewsCategory().then(response => {
|
||||||
this.categoryList = response.data;
|
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
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 查询新闻资讯列表 */
|
/** 查询新闻资讯列表 */
|
||||||
@@ -364,6 +384,22 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 打开信息详情
|
||||||
|
openDetailDialog(newsId ) {
|
||||||
|
this.openDetail = true;
|
||||||
|
this.loadingDetail = true;
|
||||||
|
getNews(newsId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.openDetail = true;
|
||||||
|
this.loadingDetail = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
closeDetail() {
|
||||||
|
this.titleDetail = "详情";
|
||||||
|
this.openDetail = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-view" @click="openDetailDialog(scope.row.noticeId)">查看</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:notice:edit']">修改</el-button>
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:notice:edit']">修改</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']">删除</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -96,6 +97,21 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--通知公告详情 -->
|
||||||
|
<el-dialog :title="form.noticeTitle" :visible.sync="openDetail" width="800px" append-to-body>
|
||||||
|
<div style="margin-top:-20px;margin-bottom:10px;">
|
||||||
|
<el-tag size="mini" effect="dark" type="warning" v-if="form.noticeType==2">公告</el-tag>
|
||||||
|
<el-tag size="mini" effect="dark" v-else>信息</el-tag>
|
||||||
|
<span style="margin-left:20px;">{{form.createTime}}</span>
|
||||||
|
</div>
|
||||||
|
<div v-loading="loadingDetail" style="line-height:24px;padding:10px;border:1px solid #eee;border-radius:10px;">
|
||||||
|
<div v-html="form.noticeContent"></div>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="closeDetail"> 关 闭 </el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -115,6 +131,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
// 是否为管理员
|
// 是否为管理员
|
||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
|
// 详情加载
|
||||||
|
loadingDetail: false,
|
||||||
|
// 打开详情
|
||||||
|
openDetail: false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@@ -164,7 +184,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
if (this.$store.state.user.roles.indexOf("tenant") === -1 || this.$store.state.user.roles.indexOf("tenant") === -1) {
|
if (this.$store.state.user.roles.indexOf("tenant") === -1 && this.$store.state.user.roles.indexOf("general") === -1) {
|
||||||
this.isAdmin = true
|
this.isAdmin = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -254,7 +274,23 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
},
|
||||||
|
// 打开信息详情
|
||||||
|
openDetailDialog(id) {
|
||||||
|
this.openDetail = true;
|
||||||
|
this.loadingDetail = true;
|
||||||
|
getNotice(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.openDetail = true;
|
||||||
|
this.loadingDetail = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
closeDetail() {
|
||||||
|
this.titleDetail = "详情";
|
||||||
|
this.openDetail = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user