页面样式修改,工作组统计
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<div @click="toPage">
|
||||
<div>
|
||||
<div v-if="label">
|
||||
<span class="card-font">{{ label }}</span>
|
||||
<div v-if="label" class="icon-style">
|
||||
<span v-for="item in icons" v-if="item.label === label" :class="item.icon">
|
||||
<span style="padding-left: 10px">
|
||||
{{ label }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="labelNull">
|
||||
@@ -17,7 +21,43 @@
|
||||
export default {
|
||||
name: 'EnterCard',
|
||||
props: ['icon', 'label', 'path'],
|
||||
data () {
|
||||
return {
|
||||
icons: [],
|
||||
iconList: ['el-icon-help','el-icon-s-order',
|
||||
'el-icon-document-remove','el-icon-document-checked',
|
||||
'el-icon-folder','el-icon-notebook-2',
|
||||
'el-icon-bangzhu','el-icon-reading'],
|
||||
iconInfo: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData (){
|
||||
this.$http.get('/sarPersonalCenter/sar-user-personal-menu/getList',
|
||||
{
|
||||
userId: this.$store.getters.userInfo.userId
|
||||
}, {_this: this}, res => {
|
||||
if (res.ok) {
|
||||
res.data.records.forEach(item => {
|
||||
this.icons.push({
|
||||
label: item.menuName,
|
||||
icon: ''
|
||||
})
|
||||
})
|
||||
}
|
||||
this.icons.forEach((item,index)=>{
|
||||
if (index > this.iconList.length) {
|
||||
let i = index % this.iconList.length
|
||||
item.icon = this.iconList[i]
|
||||
} else {
|
||||
item.icon = this.iconList[index]
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
toPage() {
|
||||
this.$router.push(this.path)
|
||||
}
|
||||
@@ -40,13 +80,14 @@
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
background-color: #99BEDB;
|
||||
color: #fff;
|
||||
background-color: #4788c0;
|
||||
}
|
||||
}
|
||||
.wx-card:hover {
|
||||
& > div {
|
||||
color: #fff;
|
||||
background-color: #0068B7;
|
||||
background-color: #3a8ee6;
|
||||
}
|
||||
}
|
||||
.wx-card1 {
|
||||
|
||||
Reference in New Issue
Block a user