fix: 修复编辑数据返回延迟导致报错
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<el-form-item :label="$t('profile.mobile')" prop="mobile">
|
||||
<el-input maxlength="64" show-word-limit v-model="editProfile.mobile" size="small" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('profile.role')" v-if="editProfile.roles[0].i18n != ''" prop="roles">
|
||||
<el-form-item :label="$t('profile.role')" v-if="editProfile.roles[0].i18n !== ''" prop="roles">
|
||||
<el-input maxlength="64" show-word-limit v-model="editProfile.roles[0].i18n" disabled size="small" type="text"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('profile.role')" v-else prop="roles">
|
||||
@@ -82,7 +82,6 @@ export default {
|
||||
{ value: 'en', label: 'English' },
|
||||
{ value: 'cn', label: '简体中文' }
|
||||
],
|
||||
roles: [],
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
|
||||
@@ -116,7 +116,6 @@ export default {
|
||||
permission: 'header_add_rule'
|
||||
}
|
||||
],
|
||||
showChangePin: false,
|
||||
showGuide: false
|
||||
}
|
||||
},
|
||||
@@ -165,7 +164,6 @@ export default {
|
||||
// })
|
||||
// },
|
||||
showPinDialog () {
|
||||
// this.showChangePin = true
|
||||
this.$router.push({
|
||||
path: '/profile',
|
||||
query: {
|
||||
@@ -174,7 +172,6 @@ export default {
|
||||
})
|
||||
},
|
||||
dialogClosed () {
|
||||
this.showChangePin = false
|
||||
this.showGuide = false
|
||||
},
|
||||
cancel () {
|
||||
|
||||
@@ -142,7 +142,7 @@ import QRCode from "qrcodejs2"
|
||||
import MessageBox from "element-ui/packages/message-box/src/main"
|
||||
import i18n from "@/components/common/i18n"
|
||||
import profileBox from '@/components/common/rightBox/profileBox'
|
||||
import dataList from '@/components/common/mixin/dataList'
|
||||
// import dataList from '@/components/common/mixin/dataList'
|
||||
|
||||
export default {
|
||||
name: 'profile',
|
||||
@@ -150,7 +150,7 @@ export default {
|
||||
operationRecord,
|
||||
profileBox
|
||||
},
|
||||
mixins: [dataList],
|
||||
// mixins: [dataList],
|
||||
data () {
|
||||
return {
|
||||
username: sessionStorage.getItem('nz-username'),
|
||||
@@ -165,6 +165,10 @@ export default {
|
||||
authToken: '',
|
||||
url: 'sys/user/profile',
|
||||
object: {},
|
||||
// 侧滑
|
||||
rightBox: {
|
||||
show: false
|
||||
},
|
||||
blankObject: { // 空白对象
|
||||
id: '',
|
||||
name: '',
|
||||
@@ -306,11 +310,14 @@ export default {
|
||||
})
|
||||
},
|
||||
profileBox () {
|
||||
this.rightBox.show = true
|
||||
this.$get(this.url).then(res => {
|
||||
this.object = res.user
|
||||
this.rightBox.show = true
|
||||
})
|
||||
},
|
||||
closeRightBox () {
|
||||
this.rightBox.show = false
|
||||
},
|
||||
clickProfile () {
|
||||
this.personalCenter()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user