jinhui.wang

代码更新

......@@ -84,7 +84,7 @@
padding-bottom:5px;
.formItem {
width: 100%;
max-width: 310px;
// max-width: 310px;
}
}
......
......@@ -33,8 +33,9 @@
class="avatar-container right-menu-item hover-effect"
trigger="click"
>
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar" />
<div class="userName-wrapper">
<!-- <img :src="avatar" class="user-avatar" /> -->
<span>欢迎!{{userName}}</span>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="logout">
......@@ -69,12 +70,14 @@ export default {
},
data() {
return {
userName:"",
portNameList: [],
locale: "zh",
};
},
created() {
this.portNameList = this.$store.state.user.portNames;
this.userName = this.$store.state.user.name;
},
computed: {
...mapGetters(["sidebar", "avatar", "device"]),
......@@ -207,12 +210,11 @@ export default {
}
.avatar-container {
text-align: center;
margin-right: 15px;
.avatar-wrapper {
margin-top: 5px;
.userName-wrapper {
position: relative;
font-size:14px;
.user-avatar {
cursor: pointer;
width: 40px;
......
......@@ -28,6 +28,7 @@
:label="item.name"
:key="index"
:show-overflow-tooltip="true"
:formatter="formatter"
>
</el-table-column>
</el-table>
......@@ -210,6 +211,16 @@ export default {
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
},
formatter(row, column, cellValue, index){
if(column.property == "cargoRulesStatus"){
if(cellValue == 1){
return "手动"
}else{
return "自动"
}
}
return cellValue
}
},
computed: {
fltNo: {
......
......@@ -241,7 +241,7 @@
:limitStart="limitStart"
:page="page"
:shiftKey="shiftKey"
height="550"
height="450"
@tableSelect="tableSelect"
@tableSelectAll="tableSelectAll"
@currentChange="currentChange"
......
......@@ -248,11 +248,11 @@ export default {
drawer(val,oldVal){
if(val){
this.userForm = this.userData;
if (this.userData.roleIds) {
this.roleid = this.userData.roleIds;
if (this.userForm.roleIds) {
this.roleid = this.userForm.roleIds;
}
if (this.userData.portName) {
this.port = this.userData.portName;
if (this.userForm.portName) {
this.port = this.userForm.portName;
}
}
}
......
......@@ -28,7 +28,7 @@
</el-col>
</el-row>
</el-form>
<div style="marginLeft: 20px">
<div style="margin:20px">
<el-button
type="primary"
icon="el-icon-search"
......@@ -266,6 +266,8 @@ export default {
userDetail(id) {
detailUser(id)
.then((res) => {
this.drawer = true;
this.drawerTitle = "查看/修改用户";
if (res.code === 200) {
this.userData = res.data;
this.userData.portName
......@@ -294,9 +296,6 @@ export default {
//查询修改用户
buttonClick(row, status) {
this.userDetail(row.row.id);
this.userData = row.row;
this.drawer = true;
this.drawerTitle = "查看/修改用户";
status == 0
? (this.userFormDisabled = true)
: (this.userFormDisabled = false);
......