Commit 1fa922b0 by wusiyi

feat: 新增安全设置页面

parent e3b6b5af
<script> <script lang="jsx">
export default { export default {
name: 'CustomForm', name: 'CustomForm',
components: {}, components: {},
...@@ -124,6 +124,7 @@ export default { ...@@ -124,6 +124,7 @@ export default {
<el-input <el-input
v-model={this.formData[item.prop]} v-model={this.formData[item.prop]}
placeholder={item.placeholder || `请输入${item.name}`} placeholder={item.placeholder || `请输入${item.name}`}
show-password={item.password || false}
clearable></el-input> clearable></el-input>
)} )}
{item.type === 'textarea' && ( {item.type === 'textarea' && (
...@@ -131,6 +132,8 @@ export default { ...@@ -131,6 +132,8 @@ export default {
type="textarea" type="textarea"
v-model={this.formData[item.prop]} v-model={this.formData[item.prop]}
placeholder={item.placeholder || `请输入${item.name}`} placeholder={item.placeholder || `请输入${item.name}`}
maxlength={item.maxlength}
show-word-limit={!!item.maxlength}
clearable></el-input> clearable></el-input>
)} )}
{item.type === 'select' && ( {item.type === 'select' && (
......
...@@ -79,6 +79,12 @@ const routes = [ ...@@ -79,6 +79,12 @@ const routes = [
meta: { title: '服务管理' } meta: { title: '服务管理' }
}, },
{ {
path: '/saas/sysSecuritySettings',
component: () => import('@/views/system/sysSecuritySettings.vue'),
name: 'system_security_settings',
meta: { title: '安全设置' }
},
{
path: '/saas/countryCode', path: '/saas/countryCode',
component: () => import('@/views/system/countryCode.vue'), component: () => import('@/views/system/countryCode.vue'),
name: 'system_countryCode', name: 'system_countryCode',
......
...@@ -229,55 +229,7 @@ export default { ...@@ -229,55 +229,7 @@ export default {
index: '/saas/taskManage', index: '/saas/taskManage',
children: [] children: []
}, },
{
id: 2,
path: '',
label: '系统管理',
icon: 'el-icon-setting',
index: '/system',
children: [
{
id: 1,
path: '',
label: '用户管理',
icon: 'el-icon-s-order',
index: 'user',
children: []
},
{
id: 2,
path: '',
label: '角色管理',
icon: 'el-icon-s-order',
index: 'user',
children: []
},
{
id: 3,
path: '',
label: '定时任务',
icon: 'el-icon-message-solid',
index: '/saas/timed_task',
children: []
},
{
id: 4,
path: '',
label: '公告管理',
icon: 'el-icon-s-promotion',
index: '/saas/announceManage',
children: []
},
{
id: 5,
path: '',
label: '服务管理',
icon: 'el-icon-s-order',
index: '/saas/services',
children: []
}
]
},
{ {
id: 5, id: 5,
path: '', path: '',
...@@ -433,6 +385,63 @@ export default { ...@@ -433,6 +385,63 @@ export default {
icon: 'el-icon-suitcase-1', icon: 'el-icon-suitcase-1',
index: '/saas/production/assistant/manage', index: '/saas/production/assistant/manage',
children: [] children: []
},
{
id: 9,
path: '',
label: '系统管理',
icon: 'el-icon-setting',
index: '/system',
children: [
{
id: 1,
path: '',
label: '用户管理',
icon: 'el-icon-s-order',
index: 'user',
children: []
},
{
id: 2,
path: '',
label: '角色管理',
icon: 'el-icon-s-order',
index: 'user',
children: []
},
{
id: 3,
path: '',
label: '定时任务',
icon: 'el-icon-message-solid',
index: '/saas/timed_task',
children: []
},
{
id: 4,
path: '',
label: '公告管理',
icon: 'el-icon-s-promotion',
index: '/saas/announceManage',
children: []
},
{
id: 5,
path: '',
label: '服务管理',
icon: 'el-icon-s-order',
index: '/saas/services',
children: []
},
{
id: 7,
path: '',
label: '安全设置',
icon: 'el-icon-lock',
index: '/saas/sysSecuritySettings',
children: []
}
]
} }
], ],
msg_list: [], msg_list: [],
......
<template>
<div class="wraper">
<div class="card-content">
<el-row class="input-group" align="middle" :gutter="20">
<el-col :span="6" class="input-label">手机号</el-col>
<el-col :span="12" class="input-value">{{ formData.phone }}</el-col>
<el-col :span="6" class="action">
<el-button type="text">解绑</el-button>
<el-button type="text">换绑</el-button>
</el-col>
</el-row>
<el-divider />
<el-row class="input-group" align="middle" :gutter="20">
<el-col :span="6" class="input-label">邮箱</el-col>
<el-col :span="12" class="input-value">
{{ formData.mailbox }}
</el-col>
<el-col :span="6" class="action">
<el-button type="text">解绑</el-button>
<el-button type="text">换绑</el-button>
</el-col>
</el-row>
<el-divider />
<el-row class="input-group" align="middle" :gutter="20">
<el-col :span="6" class="input-label">超级密码</el-col>
<el-col :span="12"></el-col>
<el-col :span="6" class="action">
<el-button type="text">修改密码</el-button>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import axios from '../../common/api/axios'
export default {
name: 'sysSecuritySettings',
data() {
return {
formData: {
phone: '',
mailbox: '',
superPassword: ''
},
isFirstLoad: true
}
},
mounted() {
this.getList()
},
methods: {
// 获取数据
async getList() {
axios
.post('sysSecuritySettings/list_page', {
pageSize: 100,
currentPage: 1
})
.then((res) => {
if (
res.code === 200 &&
res.data.records &&
res.data.records.length > 0
) {
if (this.isFirstLoad) {
this.formData = { ...res.data.records[0] }
this.isFirstLoad = false
}
}
})
},
// 提交修改
async submitAndUpdate() {
const url = '/sysSecuritySettings/update'
try {
const res = await axios.post(url, this.formData)
if (res.code !== 200) {
return
}
this.getList()
this.$message.success('保存成功')
} catch (error) {
console.log(error)
}
}
}
}
</script>
<style scoped>
.wraper {
background: #fff;
display: flex;
flex-direction: column;
height: 100%;
align-items: center;
padding: 10px;
}
.input-group {
margin: 10px 0;
width: 400px;
display: flex;
align-items: center;
}
.input-label {
text-align: left;
color: #494747;
font-weight: 500;
}
.input-value {
text-align: right;
color: #333;
word-break: break-all;
}
.action {
text-align: right;
}
::v-deep .el-divider {
background-color: #dcdfe6c2;
}
::v-deep .el-divider--horizontal {
margin: 5px;
}
.card-content {
flex: 1;
display: flex;
flex-direction: column;
margin: 200px 0 0 0;
}
</style>
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