@@ -71,18 +63,19 @@
AppMain
} from './components'
import ResizeMixin from './mixin/ResizeHandler'
-
+import worker from "./components/worker"
export default {
name: 'Layout',
components: {
Navbar,
Sidebar,
- AppMain
+ AppMain,
+ worker
},
mixins: [ResizeMixin],
data(){
return {
- active:'1'
+ active:0
}
},
computed: {
@@ -110,6 +103,8 @@
withoutAnimation: false
})
}
+ },
+ mounted() {
}
}
@@ -135,8 +130,8 @@
height: 50px;
filter: drop-shadow(0 1px 1px #49a0f3);
display: grid;
- grid-template-columns: auto 2fr 6fr .5fr 1fr;
- grid-template-rows: auto;
+ grid-template-columns: auto .5fr 6fr .2fr 1.2fr;
+ grid-template-rows: 50px;
grid-template-areas:
"logo . menu . user";
@@ -147,14 +142,18 @@
right: 0;
&__logo{
- color: #fff;
- font-size: 20px;
- line-height: 50px;
- font-weight: 600;
+ height: 50px;
grid-area:logo;
+ display: flex;
+ align-items: center;
padding:0 20px;
}
+ @media screen and (max-width: 1000px){
+ &__logo{
+ display: none;
+ }
+ }
&__user{
grid-area: user;
@@ -175,6 +174,9 @@
transition: all 300ms ease-out;
border-top-right-radius: 6px;
border-top-left-radius: 6px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
padding: 0 20px;
position: relative;
@@ -241,32 +243,37 @@
}
.avatar-container {
+ height: 100%;
margin-right: 30px;
- .avatar-wrapper {
- margin-top: 5px;
- position: relative;
-
+ .avatar-wrapper{
+ height: 100%;
+ display: flex;
+ align-items: center;
.user-avatar {
cursor: pointer;
width: 40px;
height: 40px;
border-radius: 10px;
}
+ &__name{
+ color: #fff;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ padding: 0 6px;
+ }
.el-icon-caret-bottom {
cursor: pointer;
+ color: #FFF;
position: absolute;
right: -20px;
- top: 25px;
+ top: 32px;
font-size: 12px;
}
}
}
- .worker-container{
- display: flex;
- align-content: flex-start;
- flex-wrap: wrap;
- }
+
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 75b2948..605cfe5 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -195,9 +195,9 @@
align: 'left',
fixed: "right",
customFn: (row) => {
- let m2 = row.money_total_2;
- let m1 = row.money_total_1;
- let m3 = row.use_money_total;
+ let m2 = row?.money_total_2;
+ let m1 = row?.money_total_1;
+ let m3 = row?.use_money_total;
let per = 0;
if (m2 != 0) {