xy 1 year ago
parent 58bb926101
commit 9699e902f6

@ -281,6 +281,7 @@ export default {
await this.$store.dispatch('user/logout')
await this.$store.commit('permission/SET_ROUTES', [])
await this.$store.commit('permission/RESET_ADD_ROUTES')
await this.$store.commit('app/SET_LAYOUT', {})
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
}
}

@ -45,7 +45,7 @@ const files = require.context(
const cpns = files.keys().map((key) => {
return files(key).default || files(key)
})
const layout = cpns.map((item) => {
const layout = cpns.filter(item => !item.layout.disabled).map((item) => {
return {
...item.layout,
component: item

@ -68,7 +68,8 @@ export default {
w: 8,
h: 5,
i: 'AddressBook',
name: '通讯录'
name: '通讯录',
disabled: true
},
data() {
return {

@ -22,12 +22,14 @@
}"
:limit="1"
:action="action"
:show-file-list="false"
:show-file-list="true"
:file-list="imgUrl ? [{url: imgUrl}] : []"
:on-success="uploadSuccess"
:on-remove="uploadRemove"
:before-upload="beforeAvatarUpload"
>
<img v-if="imgUrl" :src="imgUrl" alt="" style="width: 146px;height: 146px;object-fit: contain;display: block;border-radius: 6px;">
<i v-else class="el-icon-plus" />
<!-- <img v-if="imgUrl" :src="imgUrl" alt="" style="width: 146px;height: 146px;object-fit: contain;display: block;border-radius: 6px;">-->
<i class="el-icon-plus" />
</el-upload>
</el-form-item>
<el-form-item>
@ -98,17 +100,24 @@ export default {
}
},
watch: {
user(newVal) {
user: {
handler: function(newVal) {
if (newVal) {
for (const key in this.form) {
this.form[key] = newVal[key]
}
this.imgUrl = (newVal.sign_file && typeof newVal.sign_file === 'object') ? newVal.sign_file.url : ''
}
},
immediate: true
}
},
methods: {
getToken,
uploadRemove(file, fileList) {
this.form.sign_id = ''
this.imgUrl = ''
},
uploadSuccess(res, file) {
if (!res.code) {
this.imgUrl = res.data.url

@ -88,7 +88,7 @@ const files = require.context(
const cpns = files.keys().map((key) => {
return files(key).default || files(key)
})
const layout = cpns.map((item) => {
const layout = cpns.filter(item => !item.layout.disabled).map((item) => {
return {
...item.layout,
component: item

Loading…
Cancel
Save