123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <template>
- <div id="left_toolbar">
- <ul class="list-1">
- <li
- v-on:mouseout="mouseoutActive(item)"
- v-on:mouseover="mouseoverActive(item)"
- v-for="(item,i) in baseChoice"
- :key="i"
- @click="toolActionClick(item)"
- >
- <div class="item">
- <img v-show="!item.isHover" :src="require(`./../../assets/images/${item.img}`)" alt />
- <img v-show="item.isHover" :src="require(`./../../assets/images/${item.hoverImg}`)" alt />
- </div>
- </li>
- </ul>
- <ul class="list-2">
- <!-- <li>
- <div class="item">
- <a-icon type="team" />
- <div>消防系统</div>
- </div>
- <div class="tooltip">
- <a-card style="width: 300px">
- <p>Card content</p>
- <p>Card content</p>
- <p>Card content</p>
- </a-card>
- </div>
- </li>-->
- <li
- v-on:mouseout="mouseoutActive(item)"
- v-on:mouseover="mouseoverActive(item)"
- v-for="(item,i) in systemChoice"
- :key="i"
- >
- <div class="item">
- <img v-show="!item.isHover" :src="require(`./../../assets/images/${item.img}`)" alt/>
- <img v-show="item.isHover" :src="require(`./../../assets/images/${item.hoverImg}`)" alt/>
- <div>{{item.name}}</div>
- </div>
- </li>
- </ul>
- <!-- 提取-->
- <ul class="list-2 border-top">
- <li
- v-on:mouseout="mouseoutActive(item)"
- v-on:mouseover="mouseoverActive(item)"
- v-for="(item,i) in extractChoice"
- :key="i"
- >
- <div class="item">
- <img v-show="!item.isHover" :src="require(`./../../assets/images/${item.img}`)" alt/>
- <img v-show="item.isHover" :src="require(`./../../assets/images/${item.hoverImg}`)" alt/>
- <div>{{item.name}}</div>
- </div>
- </li>
- </ul>
- <div class="bottom-item">
- <a-icon type="ellipsis"/>
- <span>选择原件</span>
- </div>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- // 基础选择
- baseChoice: [
- {
- img: "t-select.png", //logo
- hoverImg: "t-select-hover.png", //hoverlogo
- isHover: false, //是否hover
- name: "选择" //类型
- },
- {
- img: "t-line.png", //logo
- hoverImg: "t-line-hover.png", //hoverlogo
- isHover: false, //是否hover
- name: "画线" //类型
- },
- {
- img: "t-text.png", //logo
- hoverImg: "t-text-hover.png", //hoverlogo
- isHover: false, //是否hover
- name: "画文字" //类型
- },
- {
- img: "t-img.png", //logo
- hoverImg: "t-img-hover.png", //hoverlogo
- isHover: false, //是否hover
- name: "画图片" //类型
- }
- ],
- // 系统选择
- systemChoice: [
- {
- img: "t-position.png", //logo
- hoverImg: "t-position-hover.png", //hoverlogo
- isHover: false, //是否hover
- name: "位置区域" //类型
- },
- {
- img: "t-equipment.png", //logo
- hoverImg: "t-equipment-hover.png", //hoverlogo
- isHover: false, //是否hover
- name: "设备设施" //类型
- },
- {
- img: "t-papeline.png", //logo
- hoverImg: "t-papeline-hover.png", //hoverlogo
- isHover: false, //是否hover
- name: "管线桥架" //类型
- }
- ],
- //提取
- extractChoice: [
- {
- img: "t-slices.png", //logo
- hoverImg: "t-slices-hover.png", //hoverlogo
- isHover: false, //是否hover
- name: "提取" //类型
- }
- ]
- };
- },
- methods: {
- // 触入
- mouseoverActive(item) {
- item.isHover = true;
- },
- mouseoutActive(item) {
- item.isHover = false;
- },
- toolActionClick(item) {
- this.$emit('toolActionClick',item.name);
- }
- }
- };
- </script>
- <style lang="less">
- #left_toolbar {
- width: 68px;
- /*height: 707px;*/
- height: 100%;
- background: rgba(255, 255, 255, 1);
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.11);
- padding: 0 0 12px 0;
- box-sizing: border-box;
- position: relative;
- ul,
- li {
- padding: 0;
- margin: 0;
- list-style: none;
- }
- .list-1 {
- padding-top: 1px;
- box-sizing: border-box;
- border-bottom: 1px solid #c3c7cb;
- li {
- width: 64px;
- min-height: 42px;
- margin: 6px auto;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- .item {
- margin: 0 auto;
- display: flex;
- flex-direction: column;
- position: relative;
- cursor: pointer;
- font-size: 12px;
- img {
- width: 25px;
- height: 25px;
- }
- }
- &:hover {
- background: #e1f2ff;
- border-radius: 8px;
- opacity: 0.89;
- color: #fff;
- }
- .tooltip {
- position: absolute;
- left: 90px;
- top: 0;
- }
- }
- }
- .list-2 {
- padding-top: 1px;
- box-sizing: border-box;
- li {
- width: 64px;
- min-height: 42px;
- margin: 6px auto;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- .item {
- margin: 0 auto;
- height: 54px;
- display: flex;
- flex-direction: column;
- position: relative;
- cursor: pointer;
- align-items: center;
- font-size: 12px;
- img {
- width: 25px;
- height: 25px;
- margin-top: 6px;
- }
- }
- &:hover {
- background: #e1f2ff;
- border-radius: 8px;
- opacity: 0.89;
- color: #0091ff;
- }
- .tooltip {
- position: absolute;
- left: 90px;
- top: 0;
- }
- }
- }
- .bottom-item {
- position: absolute;
- font-size: 18px;
- width: 100%;
- bottom: 12px;
- height: 54px;
- left: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- cursor: pointer;
- span {
- font-size: 12px;
- }
- &:hover {
- background: #e1f2ff;
- border-radius: 8px;
- opacity: 0.89;
- color: #0091ff;
- height: 54px;
- }
- }
- .border-top{
- border-top: 1px solid #c3c7cb;
- }
- }
- </style>
|