【修改】修改bug
This commit is contained in:
@@ -172,9 +172,15 @@ export default {
|
|||||||
}
|
}
|
||||||
return file
|
return file
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
// this.handleDelete(info.file)
|
||||||
|
this.fileList = []
|
||||||
|
this.$message.error(`上传失败`)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
// this.$message.success(`${info.file.name} 上传成功!`);
|
// this.$message.success(`${info.file.name} 上传成功!`);
|
||||||
} else if (info.file.status === 'error') {
|
} else if (info.file.status === 'error') {
|
||||||
|
|
||||||
this.$message.error(`${info.file.name} 上传失败.`)
|
this.$message.error(`${info.file.name} 上传失败.`)
|
||||||
} else if (info.file.status === 'removed') {
|
} else if (info.file.status === 'removed') {
|
||||||
this.handleDelete(info.file)
|
this.handleDelete(info.file)
|
||||||
|
|||||||
@@ -15,21 +15,30 @@
|
|||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="旧密码">
|
label="旧密码">
|
||||||
<a-input type="password" placeholder="请输入旧密码" v-decorator="[ 'oldpassword', validatorRules.oldpassword]" />
|
<a-input :type="passwordType1" placeholder="请输入旧密码" v-decorator="[ 'oldpassword', validatorRules.oldpassword]" >
|
||||||
|
<a-icon title="显示密码" @click="passwordType1='text'" slot="suffix" v-if="passwordType1==='password'" type="eye" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||||
|
<a-icon title="隐藏密码" @click="passwordType1='password'" slot="suffix" v-else type="eye-invisible" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||||
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="新密码">
|
label="新密码">
|
||||||
<a-input type="password" placeholder="请输入新密码" :maxLength="20" v-decorator="[ 'password', validatorRules.password]" />
|
<a-input :type="passwordType2" placeholder="请输入新密码" :maxLength="20" v-decorator="[ 'password', validatorRules.password]" >
|
||||||
|
<a-icon title="显示密码" @click="passwordType2='text'" slot="suffix" v-if="passwordType2==='password'" type="eye" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||||
|
<a-icon title="隐藏密码" @click="passwordType2='password'" slot="suffix" v-else type="eye-invisible" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||||
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
label="确认新密码">
|
label="确认新密码">
|
||||||
<a-input type="password" @blur="handleConfirmBlur" placeholder="请确认新密码" :maxLength="20" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
<a-input :type="passwordType3" @blur="handleConfirmBlur" placeholder="请确认新密码" :maxLength="20" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]">
|
||||||
|
<a-icon title="显示密码" @click="passwordType3='text'" slot="suffix" v-if="passwordType3==='password'" type="eye" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||||
|
<a-icon title="隐藏密码" @click="passwordType3='password'" slot="suffix" v-else type="eye-invisible" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||||
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
</a-form>
|
</a-form>
|
||||||
@@ -40,11 +49,15 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { postAction } from '@/api/manage'
|
import { postAction } from '@/api/manage'
|
||||||
|
import { mapActions } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserPassword',
|
name: 'UserPassword',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
passwordType1: 'password',
|
||||||
|
passwordType2: 'password',
|
||||||
|
passwordType3: 'password',
|
||||||
title: '修改密码',
|
title: '修改密码',
|
||||||
modalWidth: 800,
|
modalWidth: 800,
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -86,6 +99,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions(['Logout']),
|
||||||
show (uname) {
|
show (uname) {
|
||||||
if (!uname) {
|
if (!uname) {
|
||||||
this.$message.warning('当前系统无登录用户!')
|
this.$message.warning('当前系统无登录用户!')
|
||||||
@@ -117,6 +131,9 @@ export default {
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.close()
|
that.close()
|
||||||
|
that.Logout().then(()=>{
|
||||||
|
window.location.replace('/user/login')
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message)
|
that.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user