通知公告
parent
a63afb1aff
commit
67fc6a31d5
|
@ -176,6 +176,88 @@ let dictDataMap =
|
|||
"status": "0",
|
||||
"remark": "系统默认否"
|
||||
}
|
||||
],
|
||||
// 公告类型
|
||||
"sys_notice_type": [
|
||||
{
|
||||
"createBy": 1,
|
||||
"createTime": "2023-09-29 11:47:28",
|
||||
"updateBy": null,
|
||||
"updateTime": null,
|
||||
"params": {
|
||||
"@type": "java.util.HashMap"
|
||||
},
|
||||
"dictCode": 14,
|
||||
"dictSort": 1,
|
||||
"dictLabel": "通知",
|
||||
"dictValue": "1",
|
||||
"dictType": "sys_notice_type",
|
||||
"cssClass": "",
|
||||
"listClass": "warning",
|
||||
"isDefault": "Y",
|
||||
"status": "0",
|
||||
"remark": "通知"
|
||||
},
|
||||
{
|
||||
"createBy": 1,
|
||||
"createTime": "2023-09-29 11:47:28",
|
||||
"updateBy": null,
|
||||
"updateTime": null,
|
||||
"params": {
|
||||
"@type": "java.util.HashMap"
|
||||
},
|
||||
"dictCode": 15,
|
||||
"dictSort": 2,
|
||||
"dictLabel": "公告",
|
||||
"dictValue": "2",
|
||||
"dictType": "sys_notice_type",
|
||||
"cssClass": "",
|
||||
"listClass": "success",
|
||||
"isDefault": "N",
|
||||
"status": "0",
|
||||
"remark": "公告"
|
||||
}
|
||||
],
|
||||
// 通知状态
|
||||
"sys_notice_status": [
|
||||
{
|
||||
"createBy": 1,
|
||||
"createTime": "2023-09-29 11:47:28",
|
||||
"updateBy": null,
|
||||
"updateTime": null,
|
||||
"params": {
|
||||
"@type": "java.util.HashMap"
|
||||
},
|
||||
"dictCode": 16,
|
||||
"dictSort": 1,
|
||||
"dictLabel": "正常",
|
||||
"dictValue": "0",
|
||||
"dictType": "sys_notice_status",
|
||||
"cssClass": "",
|
||||
"listClass": "primary",
|
||||
"isDefault": "Y",
|
||||
"status": "0",
|
||||
"remark": "正常状态"
|
||||
},
|
||||
{
|
||||
"createBy": 1,
|
||||
"createTime": "2023-09-29 11:47:28",
|
||||
"updateBy": null,
|
||||
"updateTime": null,
|
||||
"params": {
|
||||
"@type": "java.util.HashMap"
|
||||
},
|
||||
"dictCode": 17,
|
||||
"dictSort": 2,
|
||||
"dictLabel": "关闭",
|
||||
"dictValue": "1",
|
||||
"dictType": "sys_notice_status",
|
||||
"cssClass": "",
|
||||
"listClass": "danger",
|
||||
"isDefault": "N",
|
||||
"status": "0",
|
||||
"remark": "关闭状态"
|
||||
}
|
||||
]
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -229,11 +229,42 @@ export default {
|
|||
/** 查询公告列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listNotice(this.queryParams).then(response => {
|
||||
this.noticeList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
let response = {
|
||||
"code": 200,
|
||||
"msg": "查询成功",
|
||||
"data": {
|
||||
"total": 2,
|
||||
"rows": [
|
||||
{
|
||||
"createBy": 1,
|
||||
"createTime": "2023-09-29 11:47:28",
|
||||
"updateBy": null,
|
||||
"updateTime": null,
|
||||
"noticeId": 1,
|
||||
"noticeTitle": "温馨提醒:2018-07-01 锐腾新版本发布啦",
|
||||
"noticeType": "2",
|
||||
"noticeContent": "新版本内容",
|
||||
"status": "0",
|
||||
"remark": "管理员"
|
||||
},
|
||||
{
|
||||
"createBy": 1,
|
||||
"createTime": "2023-09-29 11:47:28",
|
||||
"updateBy": null,
|
||||
"updateTime": null,
|
||||
"noticeId": 2,
|
||||
"noticeTitle": "维护通知:2018-07-01 锐腾系统凌晨维护",
|
||||
"noticeType": "1",
|
||||
"noticeContent": "维护内容",
|
||||
"status": "0",
|
||||
"remark": "管理员"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
this.noticeList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
@ -276,29 +307,20 @@ export default {
|
|||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const noticeId = row.noticeId || this.ids
|
||||
getNotice(noticeId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改公告";
|
||||
});
|
||||
this.form = row;
|
||||
this.open = true;
|
||||
this.title = "修改公告";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.noticeId != undefined) {
|
||||
updateNotice(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
} else {
|
||||
addNotice(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -306,12 +328,8 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const noticeIds = row.noticeId || this.ids
|
||||
this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(function () {
|
||||
return delNotice(noticeIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(() => {
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue