Commit b8c8a74f authored by 赵伟庚's avatar 赵伟庚

[feat](配置管理): 首选项配置&访问规则管理列表接口联调

parent 765100c1
......@@ -282,6 +282,7 @@ div {
color: #404a62;
text-align: center;
padding: 0 16px;
line-height: 1;
}
.dialog_box .el-dialog__body {
padding: 24px;
......
This diff is collapsed.
......@@ -159,7 +159,7 @@
<el-input placeholder="请输入分钟数" v-model.number="registerFormData.login_lock_time"></el-input>
</el-form-item>
<span>分钟</span>
<el-button type="primary">一键还原受限</el-button>
<el-button type="primary" @click="restoreLimited">一键还原受限</el-button>
</div>
<bg-form-gap title="注册配置"></bg-form-gap>
<el-form-item label="允许注册" prop="register_config_state">
......@@ -174,6 +174,19 @@
</div>
</div>
</div>
<el-dialog
class="dialog_box"
title="提示"
v-model="restoreDialog"
width="420px">
<div>该操作将还原所有锁定账号和输错次数,是否继续?</div>
<template v-slot:footer>
<div class="apaas_button">
<el-button type="default" @click="restoreDialog = false">取 消</el-button>
<el-button type="primary" @click="confirm">确 定</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
......@@ -295,8 +308,7 @@ const state = reactive({
},
//选中项索引
activeIndex: 1,
//首选项配置
preferenceConfig: {},
restoreDialog: false,
});
const {
authorizeFormData,
......@@ -306,7 +318,7 @@ const {
registerFormData,
registerRules,
activeIndex,
preferenceConfig,
restoreDialog,
} = toRefs(state);
onBeforeMount(() => {
getPreferenceConfig();
......@@ -329,7 +341,6 @@ const getPreferenceConfig = () => {
Object.keys(state.registerFormData).forEach((item) => {
state.registerFormData[item] = data[item];
});
state.preferenceConfig = res.data.data;
} else {
ElMessage.error(res.data.data);
}
......@@ -378,6 +389,7 @@ const save = () => {
});
}
};
// 请求接口发送消息
const postData = (url, params) => {
axios.post(url, params).then((res) => {
if (res.data.code == 200) {
......@@ -388,6 +400,22 @@ const postData = (url, params) => {
}
});
};
// 一键还原受限
const restoreLimited = () => {
state.restoreDialog = true
}
const confirm = () => {
axios.post(`/apaas/system/v5/sysOptions/reStartConfig`).then(res => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg)
state.restoreDialog = false
}else {
ElMessage.error(res.data.data)
}
})
}
</script>
<style lang="scss" scoped>
......
......@@ -642,12 +642,12 @@ const {
</style>
<style>
.select_dialog {
margin-top: 80px;
margin-top: 8vh;
}
.el-dialog .el-dialog__body {
.select_dialog .el-dialog__body {
padding: 0;
}
.el-dialog .el-dialog__footer {
.select_dialog .el-dialog__footer {
padding: 16px;
}
</style>
<!-- banner管理 -->
<!-- 推荐管理 -->
<template>
<div class="detail_container">
<bg-breadcrumb></bg-breadcrumb>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment