Commit 8515fdcc authored by 纪泽龙's avatar 纪泽龙

左侧bar样式修改完毕

parent e0d5ec7f
...@@ -144,8 +144,21 @@ ...@@ -144,8 +144,21 @@
<el-button class="refresh-but" @click="refreshMap()"> <el-button class="refresh-but" @click="refreshMap()">
<i class="iconfont icon-reset"></i> <i class="iconfont icon-reset"></i>
</el-button> </el-button>
<div class="leftBar-wrapper"> <div class="leftBar-wrapper">
燃气公司
<div class="comp-wrapper">
<div
class="comp"
:class="{ active: compChangeArr.indexOf(item) >= 0 }"
v-for="item in comp"
:key="item"
@click="compChange(item)"
>
{{ item }}
</div>
</div>
<div <div
class="box-wrapper" class="box-wrapper"
v-for="(item, index) in changeBtnData" v-for="(item, index) in changeBtnData"
...@@ -157,8 +170,10 @@ ...@@ -157,8 +170,10 @@
active: leftBarNum.indexOf(item.value) >= 0, active: leftBarNum.indexOf(item.value) >= 0,
firstbox: index == 0, firstbox: index == 0,
}" }"
@click="arrowRightChange(item)" @click.stop="leftBarChange(item)"
> >
<!-- @click="arrowRightChange(item)" -->
<span class="upPic"> 上图 </span> <span class="upPic"> 上图 </span>
<div class="left"> <div class="left">
<i class="iconfont" :class="item.icon"></i> <i class="iconfont" :class="item.icon"></i>
...@@ -166,14 +181,12 @@ ...@@ -166,14 +181,12 @@
<div class="right"> <div class="right">
{{ item.label }} {{ item.label }}
</div> </div>
<i <i class="el-icon-check bingo"></i>
@click.stop="leftBarChange(item)"
class="el-icon-check bingo"
></i>
<i class="ju"></i> <i class="ju"></i>
<i <i
class="arrow-right el-icon-arrow-right" class="arrow-right el-icon-arrow-right"
:class="{ active: arrowRightNum.indexOf(item.value) >= 0 }" :class="{ active: arrowRightNum.indexOf(item.value) >= 0 }"
@click.stop="arrowRightChange(item)"
></i> ></i>
</div> </div>
<el-collapse-transition> <el-collapse-transition>
...@@ -371,6 +384,11 @@ export default { ...@@ -371,6 +384,11 @@ export default {
iconClass: "icon-create", iconClass: "icon-create",
createValue: 0, createValue: 0,
createLabel: "新增", createLabel: "新增",
//所有燃气公司
comp: ["公司A", "公司B", "公司C"],
// 公司被选中状态
compChangeArr: [],
changeBtnData: [ changeBtnData: [
{ {
type: "0", type: "0",
...@@ -885,7 +903,16 @@ export default { ...@@ -885,7 +903,16 @@ export default {
} }
}); });
}, },
// 选择公司
compChange(item) {
const index = this.compChangeArr.indexOf(item);
if (index < 0) {
this.compChangeArr.push(item);
} else {
this.compChangeArr.splice(index, 1);
}
console.log(this.compChangeArr);
},
// 左边的Bar修改值 左边抽屉 // 左边的Bar修改值 左边抽屉
leftBarChange(item) { leftBarChange(item) {
// this.leftBarNum= this.leftBarNum != item.value ? item.value:0; // this.leftBarNum= this.leftBarNum != item.value ? item.value:0;
...@@ -1163,6 +1190,8 @@ export default { ...@@ -1163,6 +1190,8 @@ export default {
this.arrowRightNum.push(item.value); this.arrowRightNum.push(item.value);
} }
this.domAllShow(); this.domAllShow();
// 原本是卸载抽屉上的方法,由于冒泡,要单独写一次
this.drawerClick();
}, },
// 管道储存 // 管道储存
...@@ -1875,13 +1904,32 @@ input[type="radio"] { ...@@ -1875,13 +1904,32 @@ input[type="radio"] {
} }
} }
} }
// 燃气公司选项
.comp-wrapper {
display: flex;
color: #fff;
padding-left: 35px;
padding-bottom: 10px;
.comp {
margin-right: 10px;
cursor: pointer;
padding: 2px 4px;
border-radius: 5px;
&:hover {
background-color: #053b6a94;
}
&.active {
background-color: #053b6a;
color: #31eaea !important;
}
}
}
// 左边的bar // 左边的bar
.leftBar-wrapper { .leftBar-wrapper {
// position: fixed; // position: fixed;
width: 340px; width: 340px;
// margin-left: 20px; // margin-left: 20px;
margin-top: 60px; margin-top: 35px;
// box-sizing: border-box; // box-sizing: border-box;
.box-wrapper { .box-wrapper {
width: 340px; width: 340px;
...@@ -1991,17 +2039,20 @@ input[type="radio"] { ...@@ -1991,17 +2039,20 @@ input[type="radio"] {
border-top: 1px solid rgba(5, 59, 106, 0); border-top: 1px solid rgba(5, 59, 106, 0);
} }
} }
// box浮动上去的颜色
&:hover { &:hover {
box-sizing: border-box; box-sizing: border-box;
// background-color: rgba(5, 59, 106, 0.1); // background-color: rgba(5, 59, 106, 0.1);
background-color: #053b6a; // background-color: #053b6a;
border-bottom: none !important; background-color: #053b6a94;
// border-bottom: none !important;
.upPic { .upPic {
color: #31eaea; color: #31eaeaab;
} }
.left, .left,
.right { .right {
color: #31eaea !important; color: #31eaeaab !important;
} }
} }
.upPic { .upPic {
...@@ -2035,23 +2086,49 @@ input[type="radio"] { ...@@ -2035,23 +2086,49 @@ input[type="radio"] {
> i.arrow-right { > i.arrow-right {
color: #fff !important; color: #fff !important;
position: absolute; position: absolute;
right: 32px; right: 0px;
top: 16px; top: 0px;
padding: 16px 15px;
transition: 0.3s linear; transition: 0.3s linear;
font-weight: 700;
&.active { &.active {
color: #fff !important;
font-weight: 700;
transform: rotate(90deg); transform: rotate(90deg);
} }
} }
// 当点击下拉框选项的样式
&.active { &.active {
// background-color: #053b6a; // 选中状态
// .left, box-sizing: border-box;
// .right { background-color: #053b6a;
// color: #fff; // border-bottom: none !important;
// } .upPic {
> i {
color: #31eaea; color: #31eaea;
}
.left,
.right {
color: #31eaea !important;
}
> i {
// color: #31eaea;
color: #053b6a;
font-weight: 600; font-weight: 600;
} }
&:hover {
box-sizing: border-box;
background-color: #053b6a94;
// background-color: #053b6a;
// border-bottom: none !important;
.upPic {
color: #31eaeaab;
}
.left,
.right {
color: #31eaeaab !important;
}
}
} }
.left { .left {
color: #fff; color: #fff;
......
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