Commit 21a3ab39 authored by jiaxu.yan's avatar jiaxu.yan

fix: 70973 70978

parent b7e6cbbc
...@@ -79,7 +79,12 @@ ...@@ -79,7 +79,12 @@
.orange { .orange {
color: #f9a221; color: #f9a221;
} }
.taskLeader {
width:120px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.standard-box { .standard-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -133,6 +133,7 @@ export default { ...@@ -133,6 +133,7 @@ export default {
// const regex = /[\s~`!@#$%^&*()\-_=+[\]{}|;:'",<>/?]/ // const regex = /[\s~`!@#$%^&*()\-_=+[\]{}|;:'",<>/?]/
const regex = /[~`!@#$%^&*=[\]{}|;:'",<>/?]/ const regex = /[~`!@#$%^&*=[\]{}|;:'",<>/?]/
const result = regex.test(file.name) const result = regex.test(file.name)
if (result === true) { if (result === true) {
this.fileList = [] this.fileList = []
// this.$refs.imageUpload.clearFiles() // this.$refs.imageUpload.clearFiles()
...@@ -141,6 +142,7 @@ export default { ...@@ -141,6 +142,7 @@ export default {
let isImg = false let isImg = false
if (this.fileType.length) { if (this.fileType.length) {
let fileExtension = '' let fileExtension = ''
if (file.name.lastIndexOf('.') > -1) { if (file.name.lastIndexOf('.') > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1) fileExtension = file.name.slice(file.name.lastIndexOf('.') + 1)
} }
...@@ -149,6 +151,7 @@ export default { ...@@ -149,6 +151,7 @@ export default {
if (fileExtension && fileExtension.indexOf(type) > -1) return true if (fileExtension && fileExtension.indexOf(type) > -1) return true
return false return false
}) })
console.log(isImg)
} else { } else {
isImg = file.type.indexOf('image') > -1 isImg = file.type.indexOf('image') > -1
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
> >
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="avatar" class="user-avatar" /> <img :src="avatar" class="user-avatar" />
<div class="user-name">{{ name }}</div>
<i class="el-icon-caret-bottom" /> <i class="el-icon-caret-bottom" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
...@@ -67,7 +68,7 @@ export default { ...@@ -67,7 +68,7 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters(['sidebar', 'device']), ...mapGetters(['sidebar', 'device', 'name']),
setting: { setting: {
get() { get() {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
...@@ -177,7 +178,19 @@ export default { ...@@ -177,7 +178,19 @@ export default {
.avatar-wrapper { .avatar-wrapper {
margin-top: 5px; margin-top: 5px;
position: relative; position: relative;
display: flex;
align-items: flex;
.user-name {
line-height: 40px;
font-size: 14px;
font-weight: bold;
max-width: 100px;
margin: 0 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.user-avatar { .user-avatar {
cursor: pointer; cursor: pointer;
width: 40px; width: 40px;
......
...@@ -71,7 +71,7 @@ const user = { ...@@ -71,7 +71,7 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT']) commit('SET_ROLES', ['ROLE_DEFAULT'])
} }
commit('SET_ID', user.userId) commit('SET_ID', user.userId)
commit('SET_NAME', user.userName) commit('SET_NAME', user.nickName)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
resolve(res) resolve(res)
}) })
......
...@@ -136,7 +136,9 @@ ...@@ -136,7 +136,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -135,7 +135,9 @@ ...@@ -135,7 +135,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
<div class="card-buttons"> <div class="card-buttons">
......
...@@ -127,7 +127,9 @@ ...@@ -127,7 +127,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -85,6 +85,18 @@ ...@@ -85,6 +85,18 @@
width="260" width="260"
align="left" align="left"
></el-table-column> ></el-table-column>
<el-table-column
prop="address"
label="地址"
width="260"
align="left"
></el-table-column>
<el-table-column
prop="postcode"
label="邮政编码"
width="260"
align="left"
></el-table-column>
<el-table-column <el-table-column
prop="orderNum" prop="orderNum"
label="排序" label="排序"
......
<template> <template>
<div> <div>
<div class="user-info-head" @click="editCropper()"> <!-- <div class="user-info-head" @click="editCropper()">
<img :src="options.img" title="点击上传头像" class="img-circle img-lg" /> <img :src="options.img" title="点击上传头像" class="img-circle img-lg" />
</div> -->
<div class="user-info-head" @click="editCropper()">
<img :src="avatar" title="点击上传头像" class="img-circle img-lg" />
</div> </div>
<el-dialog <!-- <el-dialog
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
width="800px" width="800px"
...@@ -81,20 +84,21 @@ ...@@ -81,20 +84,21 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog> -->
</div> </div>
</template> </template>
<script> <script>
import store from '@/store' import store from '@/store'
import { VueCropper } from 'vue-cropper' // import { VueCropper } from 'vue-cropper'
import { uploadAvatar } from '@/api/system/user' import { uploadAvatar } from '@/api/system/user'
import { debounce } from '@/utils' import { debounce } from '@/utils'
import avatar from '@/assets/images/touxiang.png'
export default { export default {
components: { VueCropper }, // components: { VueCropper },
data() { data() {
return { return {
avatar,
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 是否显示cropper // 是否显示cropper
...@@ -197,21 +201,21 @@ export default { ...@@ -197,21 +201,21 @@ export default {
height: 120px; height: 120px;
} }
.user-info-head:hover:after { // .user-info-head:hover:after {
content: '+'; // content: '+';
position: absolute; // position: absolute;
left: 0; // left: 0;
right: 0; // right: 0;
top: 0; // top: 0;
bottom: 0; // bottom: 0;
color: #eee; // color: #eee;
background: rgba(0, 0, 0, 0.5); // background: rgba(0, 0, 0, 0.5);
font-size: 24px; // font-size: 24px;
font-style: normal; // font-style: normal;
-webkit-font-smoothing: antialiased; // -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; // -moz-osx-font-smoothing: grayscale;
cursor: pointer; // cursor: pointer;
line-height: 110px; // line-height: 110px;
border-radius: 50%; // border-radius: 50%;
} // }
</style> </style>
...@@ -137,7 +137,9 @@ ...@@ -137,7 +137,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
<div class="card-cell"> <div class="card-cell">
...@@ -406,7 +408,9 @@ ...@@ -406,7 +408,9 @@
style="margin-right: 5px" style="margin-right: 5px"
fill="#999999" fill="#999999"
/> />
{{ item.leader ? item.leader : '---' }} <span class="taskLeader">{{
item.leader ? item.leader : '---'
}}</span>
</div> </div>
</div> </div>
<div class="card-buttons"> <div class="card-buttons">
......
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