| | |
| | | <template> |
| | | <el-dialog :visible.sync="isShow" class="effect-vol-calc" title="周边资源信息" :modal="false" v-dialog-drag |
| | | <el-dialog :visible.sync="isShow" class="res-info-container" title="周边资源信息" :modal="false" v-dialog-drag |
| | | width="400" > |
| | | <el-row> |
| | | <el-col :span="3" style="text-align: center;"> |
| | | <el-row v-for="item in menuList" :key="item.id"> |
| | | <el-button type="primary" size="mini" @click="menuClickHandle(item)">{{ item.name }}</el-button> |
| | | <el-row v-for="(item,index) in menuList" :key="index"> |
| | | <el-button type="primary" size="mini" :class="index===btnActive?'hover':''" @click="menuClickHandle(item,index)">{{ item.name }}</el-button> |
| | | </el-row> |
| | | <!--<el-row> <el-button type="primary" size="mini" @click="menuClickHandle">在线监测</el-button></el-row>--> |
| | | <!--<el-row> <el-button type="primary" size="mini" @click="menuClickHandle">应急资源</el-button></el-row>--> |
| | |
| | | </el-col> |
| | | <el-col :span="21"> |
| | | <el-row> |
| | | <el-button v-for="item in subMenuList" :key="item.name" type="primary" size="mini" @click="subMenuClickHandle(item)">{{ item.name }}</el-button> |
| | | <el-button v-for="(item,index) in subMenuList" :class="index===subBtnActive?'hover':''" :key="item.name" type="primary" size="mini" @click="subMenuClickHandle(item,index)">{{ item.name }}</el-button> |
| | | <!-- <el-button type="primary" size="mini" @click="subMenuClickHandle">外排口(1)</el-button>--> |
| | | <!-- <el-button type="primary" size="mini" @click="subMenuClickHandle">隔油池(1)</el-button>--> |
| | | <!-- <el-button type="primary" size="mini" @click="subMenuClickHandle">节流阀(1)</el-button>--> |
| | |
| | | data () { |
| | | return { |
| | | isShow: false, |
| | | btnActive: 0, |
| | | subBtnActive: 0, |
| | | menuList: ResInfo.data, |
| | | subMenuList: ResInfo.data[0].child, |
| | | tableData: [ |
| | |
| | | getVisible () { |
| | | return this.isShow |
| | | }, |
| | | menuClickHandle (item) { |
| | | console.log(item) |
| | | menuClickHandle (item, index) { |
| | | this.btnActive = index |
| | | this.subBtnActive = 0 |
| | | this.subMenuList = item.child |
| | | }, |
| | | subMenuClickHandle (subItem) { |
| | | subMenuClickHandle (subItem, index) { |
| | | this.subBtnActive = index |
| | | this.currentTableData.column = subItem.column |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="less"> |
| | | .res-info-container{ |
| | | /deep/ .el-dialog { |
| | | left: 810px; |
| | | } |
| | | |
| | | .el-dialog__header { |
| | | padding: 4px 10px; |
| | | } |
| | | |
| | | .el-dialog__headerbtn { |
| | | top: 10px; |
| | | } |
| | | .hover{ |
| | | color: @color-highlight; |
| | | border-color:@color-highlight; |
| | | } |
| | | .el-button:active .el-button--primary.is-active, .el-button--primary:active ,.el-button--primary:focus, .el-button--primary:hover{ |
| | | background: @background-color; |
| | | color: @color-highlight; |
| | | border-color:@color-highlight; |
| | | } |
| | | } |
| | | |
| | | </style> |