系统配置

master
dongzeliang 2024-04-12 19:14:11 +08:00
parent f4ece97056
commit a63afb1aff
2 changed files with 135 additions and 33 deletions

View File

@ -135,6 +135,47 @@ let dictDataMap =
"status": "0",
"remark": "隐藏菜单"
}
],
// 系统是否
"sys_yes_no": [
{
"createBy": 1,
"createTime": "2023-09-29 11:47:28",
"updateBy": null,
"updateTime": null,
"params": {
"@type": "java.util.HashMap"
},
"dictCode": 12,
"dictSort": 1,
"dictLabel": "是",
"dictValue": "Y",
"dictType": "sys_yes_no",
"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": 13,
"dictSort": 2,
"dictLabel": "否",
"dictValue": "N",
"dictType": "sys_yes_no",
"cssClass": "",
"listClass": "danger",
"isDefault": "N",
"status": "0",
"remark": "系统默认否"
}
]
}
/**

View File

@ -247,12 +247,90 @@ export default {
/** 查询参数列表 */
getList() {
this.loading = true;
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
let response = {
"code": 200,
"msg": "查询成功",
"data": {
"total": 6,
"rows": [
{
"createBy": 1,
"createTime": "2023-09-29 11:47:28",
"updateBy": null,
"updateTime": null,
"configId": 1,
"configName": "主框架页-默认皮肤样式名称",
"configKey": "sys.index.skinName",
"configValue": "skin-blue",
"configType": "Y",
"remark": "蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow"
},
{
"createBy": 1,
"createTime": "2023-09-29 11:47:28",
"updateBy": null,
"updateTime": null,
"configId": 2,
"configName": "用户管理-账号初始密码",
"configKey": "sys.user.initPassword",
"configValue": "123456",
"configType": "Y",
"remark": "初始化密码 123456"
},
{
"createBy": 1,
"createTime": "2023-09-29 11:47:28",
"updateBy": null,
"updateTime": null,
"configId": 3,
"configName": "主框架页-侧边栏主题",
"configKey": "sys.index.sideTheme",
"configValue": "theme-dark",
"configType": "Y",
"remark": "深色主题theme-dark浅色主题theme-light"
},
{
"createBy": 1,
"createTime": "2023-09-29 11:47:28",
"updateBy": null,
"updateTime": null,
"configId": 4,
"configName": "账号自助-验证码开关",
"configKey": "sys.account.captchaEnabled",
"configValue": "true",
"configType": "Y",
"remark": "是否开启验证码功能true开启false关闭"
},
{
"createBy": 1,
"createTime": "2023-09-29 11:47:28",
"updateBy": 1,
"updateTime": "2024-03-24 16:01:53",
"configId": 5,
"configName": "账号自助-是否开启用户注册功能",
"configKey": "sys.account.registerUser",
"configValue": "true",
"configType": "Y",
"remark": "是否开启注册用户功能true开启false关闭"
},
{
"createBy": 1,
"createTime": "2023-09-29 11:47:28",
"updateBy": null,
"updateTime": null,
"configId": 6,
"configName": "用户登录-黑名单列表",
"configKey": "sys.login.blackIPList",
"configValue": "",
"configType": "Y",
"remark": "设置登录IP黑名单限制多个匹配项以;分隔,支持匹配(*通配、网段)"
}
]
}
}
this.configList = response.data.rows;
this.total = response.data.total;
this.loading = false;
}
);
},
//
cancel() {
@ -297,29 +375,20 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const configId = row.configId || this.ids
getConfig(configId).then(response => {
this.form = response.data;
this.form = row;
this.open = true;
this.title = "修改参数";
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.configId != undefined) {
updateConfig(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addConfig(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
@ -327,25 +396,17 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const configIds = row.configId || this.ids;
this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function () {
return delConfig(configIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(() => {
this.$modal.msgSuccess("删除成功")
});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/config/export', {
...this.queryParams
}, `config_${new Date().getTime()}.xlsx`)
this.$modal.msgSuccess("导出成功")
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
});
}
}
};