Commit e92de757 authored by jiaxu.yan's avatar jiaxu.yan

Merge branch 'ylk-dev' into develop

* ylk-dev:
  修改问题
parents 389685a4 f178ddf3
......@@ -15,7 +15,7 @@
<el-button type="text">板面切换</el-button>
</div>
<div class="title-button">
<el-button type="text" @click="setSte(true)">皮肤切换</el-button>
<el-button type="text" @click.stop="setting = true">皮肤切换</el-button>
</div>
<div class="title-kaiguan">
<img src="../../assets/themeIImage/kaiguan.png" class="kaiguan-logo" />
......@@ -31,29 +31,32 @@
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown" class="user-dropdown">
<el-dropdown-item>
<router-link to="/reSetPsw">
<el-dropdown-item @click.native="toReset">
修改密码
</router-link>
</el-dropdown-item>
<el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
<!-- </router-link> -->
</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">
<span style="display:block;">退出</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<el-dialog :title="'修改密码'" :visible.sync="restopen" width="600px" append-to-body>
<resetPwd @reback="toResetClose"></resetPwd>
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import Hamburger from '@/components/Hamburger'
import resetPwd from './resetPwd'
export default {
components: {
Hamburger
Hamburger,
resetPwd
},
data() {
return {
......@@ -61,7 +64,8 @@ export default {
userName: this.$store.state.user.name,
specialTag: this.$store.state.user.specialTag,
timer: "",
timny: null
timny: null,
restopen:false
}
},
computed: {
......@@ -79,17 +83,9 @@ export default {
value: val
})
}
},
computed: {
// 根据选择的风格切换图标
// eslint-disable-next-line vue/return-in-computed-property
kaiguan() {
if (localStorage.getItem('theme') === '9') {
return require('@/assets/themeIImage/kaiguan.png')
}
}
}
},
mounted() {
// this.getInAdhibitions()
......@@ -107,6 +103,12 @@ export default {
window.location.href = param
}
},
toReset(){
this.restopen = true
},
toResetClose(){
this.restopen = false
},
setSte(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
......
<template>
<el-form ref="form" :model="user" :rules="rules" label-width="4.2vw">
<el-form-item label="旧密码" prop="oldPassword">
<el-input v-model.trim="user.oldPassword" placeholder="请输入旧密码" type="password" />
</el-form-item>
<el-form-item label="新密码" prop="newPassword">
<el-input v-model.trim="user.newPassword" placeholder="请输入新密码" type="password" />
</el-form-item>
<el-form-item label="确认密码" prop="confirmPassword">
<el-input v-model.trim="user.confirmPassword" placeholder="请确认密码" type="password" />
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini" @click="submit">确 定</el-button>
<el-button type="danger" size="mini" @click="close">关闭</el-button>
</el-form-item>
</el-form>
</template>
<script>
import { updateUserPwd } from '@/api/system/user'
export default {
data() {
const equalToPassword = (rule, value, callback) => {
if (this.user.newPassword !== value) {
callback(new Error('两次输入的密码不一致'))
} else {
callback()
}
}
return {
test: '1test',
user: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined
},
// 表单校验
rules: {
oldPassword: [
{ required: true, message: '旧密码不能为空', trigger: 'blur' }
],
newPassword: [
{ required: true, message: '新密码不能为空', trigger: 'blur' },
{ min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' }
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: 'blur' },
{ required: true, validator: equalToPassword, trigger: 'blur' }
]
}
}
},
methods: {
submit() {
this.$refs['form'].validate(valid => {
if (valid) {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(
response => {
if (response.code === 200) {
this.$message({
message: '修改成功',
type: 'success'
})
this.$emit('reback')
}
}
)
}
})
},
close() {
this.$emit('reback')
// this.$store.dispatch('tagsView/delView', this.$route)
// this.$router.push({ path: '/index' })
}
}
}
</script>
<template>
<div>
<div class="topSubMenu">
<el-button :class="activeTab == '1' ? 'tsmBtn tsmactive' : 'tsmBtn'"
@click="changeMenu('1')">登录日志</el-button>
<el-button :class="activeTab == '2' ? 'tsmBtn tsmactive' : 'tsmBtn'"
@click="changeMenu('2')">操作日志</el-button>
<el-button :class="activeTab == '3' ? 'tsmBtn tsmactive' : 'tsmBtn'"
@click="changeMenu('3')">异常日志</el-button>
</div>
<div v-if="activeTab == '1'" class="BdoySubMenu">
<logininfoIndex></logininfoIndex>
</div>
<div v-if="activeTab == '2'" class="BdoySubMenu">
<operLogIndex></operLogIndex>
</div>
<div v-if="activeTab == '3'" class="BdoySubMenu">
<errorLogIndex></errorLogIndex>
</div>
</div>
</template>
<script>
import errorLogIndex from './errorLog/index.vue'
import logininfoIndex from './loginInfo/index.vue'
import operLogIndex from './operLog/index.vue'
export default {
components:{
errorLogIndex,
logininfoIndex,
operLogIndex
},
data() {
return {
activeTab: '1',
tabs: [
{ title: '标签1', name: '1', content: '内容1' },
{ title: '标签2', name: '2', content: '内容2' }
],
tabIndex: 2
}
},
methods: {
changeMenu(index) {
this.activeTab = index
}
}
}
</script>
<style lang="scss" scoped>
.topSubMenu {
display: flex;
width: 98%;
margin: 0 1%;
.tsmBtn {
width: 180px;
height: 72px;
background: #EBF1FF;
border-radius: 10px;
margin-right: 24px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 20px;
color: #98A4BF;
letter-spacing: 0;
line-height: 15px;
border: none !important;
}
.tsmactive {
background-image: linear-gradient(180deg, #679CF6 0%, #4072EE 100%);
box-shadow: 0 2px 2px 0 #ACB2C1;
border-radius: 10px;
font-family: PingFangSC-Semibold;
font-weight: 600;
font-size: 20px;
color: #FFFFFF;
letter-spacing: 0;
line-height: 15px;
text-decoration: underline;
}
}
.BdoySubMenu{
margin-top: 20px;
}
</style>
\ No newline at end of file
<template>
<div>
<div class="topSubMenu">
<el-button :class="activeTab == '1' ? 'tsmBtn tsmactive' : 'tsmBtn'"
@click="changeMenu('1')">用户管理</el-button>
<el-button :class="activeTab == '2' ? 'tsmBtn tsmactive' : 'tsmBtn'"
@click="changeMenu('2')">角色管理</el-button>
<el-button :class="activeTab == '3' ? 'tsmBtn tsmactive' : 'tsmBtn'"
@click="changeMenu('3')">字典管理</el-button>
</div>
<div v-if="activeTab == '1'" class="BdoySubMenu">
<userIndex></userIndex>
</div>
<div v-if="activeTab == '2'" class="BdoySubMenu">
<roleIndex></roleIndex>
</div>
<div v-if="activeTab == '3'" class="BdoySubMenu">
<dictIndex></dictIndex>
</div>
</div>
</template>
<script>
import userIndex from './user/index.vue'
import roleIndex from './role/index.vue'
import dictIndex from './dict/index.vue'
export default {
components:{
userIndex,
roleIndex,
dictIndex
},
data() {
return {
activeTab: '1',
tabs: [
{ title: '标签1', name: '1', content: '内容1' },
{ title: '标签2', name: '2', content: '内容2' }
],
tabIndex: 2
}
},
methods: {
changeMenu(index) {
this.activeTab = index
}
}
}
</script>
<style lang="scss" scoped>
.topSubMenu {
display: flex;
width: 98%;
margin: 0 1%;
.tsmBtn {
width: 180px;
height: 72px;
background: #EBF1FF;
border-radius: 10px;
margin-right: 24px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 20px;
color: #98A4BF;
letter-spacing: 0;
line-height: 15px;
border: none !important;
}
.tsmactive {
background-image: linear-gradient(180deg, #679CF6 0%, #4072EE 100%);
box-shadow: 0 2px 2px 0 #ACB2C1;
border-radius: 10px;
font-family: PingFangSC-Semibold;
font-weight: 600;
font-size: 20px;
color: #FFFFFF;
letter-spacing: 0;
line-height: 15px;
text-decoration: underline;
}
}
.BdoySubMenu{
margin-top: 20px;
}
</style>
\ No newline at end of file
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