通知公告
parent
a63afb1aff
commit
67fc6a31d5
|
@ -176,6 +176,88 @@ let dictDataMap =
|
||||||
"status": "0",
|
"status": "0",
|
||||||
"remark": "系统默认否"
|
"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() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listNotice(this.queryParams).then(response => {
|
let response = {
|
||||||
this.noticeList = response.data.rows;
|
"code": 200,
|
||||||
this.total = response.data.total;
|
"msg": "查询成功",
|
||||||
this.loading = false;
|
"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() {
|
cancel() {
|
||||||
|
@ -276,29 +307,20 @@ export default {
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const noticeId = row.noticeId || this.ids
|
this.form = row;
|
||||||
getNotice(noticeId).then(response => {
|
this.open = true;
|
||||||
this.form = response.data;
|
this.title = "修改公告";
|
||||||
this.open = true;
|
|
||||||
this.title = "修改公告";
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.noticeId != undefined) {
|
if (this.form.noticeId != undefined) {
|
||||||
updateNotice(this.form).then(response => {
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.open = false;
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
addNotice(this.form).then(response => {
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.open = false;
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -306,12 +328,8 @@ export default {
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const noticeIds = row.noticeId || this.ids
|
const noticeIds = row.noticeId || this.ids
|
||||||
this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(function () {
|
this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(() => {
|
||||||
return delNotice(noticeIds);
|
this.$modal.msgSuccess("删除成功")
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue