修改看板切换菜单

master
夜笙歌 7 months ago
parent f592646416
commit 1448619fee

@ -4,13 +4,15 @@
<div class="data" id="data">{{ data }}</div> <div class="data" id="data">{{ data }}</div>
<div class="time" id="time">{{ time }}</div> <div class="time" id="time">{{ time }}</div>
<div class="date" id="date">{{ date }}</div> <div class="date" id="date">{{ date }}</div>
<div class="top"> <div class="top">
<div class="select"> <div class="select">
<el-dropdown @command="handleCommand"> <el-dropdown @command="handleCommand">
<span class="el-dropdown-link"> <el-button type="primary" size="mini">
下拉菜单<i class="el-icon-arrow-down el-icon--right"></i> 切换看板
</span> <i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="/index">后台系统</el-dropdown-item>
<el-dropdown-item command="/board/firstFloorProduction">一楼生产</el-dropdown-item> <el-dropdown-item command="/board/firstFloorProduction">一楼生产</el-dropdown-item>
<el-dropdown-item command="/board/firstFloorWarehouse">一楼能源</el-dropdown-item> <el-dropdown-item command="/board/firstFloorWarehouse">一楼能源</el-dropdown-item>
<el-dropdown-item command="/board/secondFloorProduction">二楼生产</el-dropdown-item> <el-dropdown-item command="/board/secondFloorProduction">二楼生产</el-dropdown-item>
@ -22,21 +24,21 @@
<el-dropdown-item command="/board/fifthFloorProduction">五楼生产</el-dropdown-item> <el-dropdown-item command="/board/fifthFloorProduction">五楼生产</el-dropdown-item>
<el-dropdown-item command="/board/fifthFloorWarehouse">五楼仓储</el-dropdown-item> <el-dropdown-item command="/board/fifthFloorWarehouse">五楼仓储</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
let getDateIntervalFun = null let getDateIntervalFun = null
export default { export default {
name: 'BoardIndex', name: 'BoardIndex',
data() { data() {
return { return {
data:'', data: '',
time: '', time: '',
date: '', date: '',
value: '' value: ''
@ -59,61 +61,65 @@ export default {
getDate() getDate()
getDateIntervalFun = setInterval(getDate, 1000) getDateIntervalFun = setInterval(getDate, 1000)
}, },
methods:{ methods: {
handleCommand(e){ handleCommand(e) {
this.$router.push(e) this.$router.push(e)
} }
}, },
beforeDestroy() { beforeDestroy() {
getDateIntervalFun = null getDateIntervalFun = null
} }
} }
</script> </script>
<style lang='less' scoped> <style lang="less" scoped>
/deep/ .el-dropdown { /deep/ .el-dropdown {
color: #fff; color: #fff;
} }
.top{
position:absolute;
top:0;
left:0;
width:100%;
height:10%;
&:hover{
.select{
display:block
}
}
.select{
display:none;
position:absolute;
top:65%;
left:50%;
transform:translate(-50%,-50%);
color:#fff
}
}
.time, .date, .data { .top {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 10%;
&:hover {
.select {
display: block
}
}
.select {
display: none;
position: absolute;
top: 65%;
right: 3%;
transform: translateY(-50%);
color: #fff
}
}
.time, .date, .data {
position: absolute; position: absolute;
font-size: 0.8vw; font-size: 0.8vw;
color: #fcfcfc; color: #fcfcfc;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
white-space: nowrap; white-space: nowrap;
} }
.data { .data {
top: 3.2%; top: 3.2%;
right: 17%; right: 17%;
} }
.time { .time {
top: 3.2%; top: 3.2%;
left: 85.8%; left: 85.8%;
} }
.date { .date {
top: 3.2%; top: 3.2%;
left: 94.1%; left: 94.1%;
} }
</style> </style>

Loading…
Cancel
Save