equipmentList.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!-- 设备列表 -->
  2. <template>
  3. <div class="equip-list">
  4. <Input
  5. class="baseItemInput"
  6. :width="188"
  7. iconType="search"
  8. v-model="baseItemVal"
  9. @pressEnter="pressEnter"
  10. />
  11. <ul>
  12. <li @click="getEquipItem('lengganji.svg')">
  13. <div class="left">
  14. <div class="icon">
  15. <!-- <svg class="xxx">
  16. <use
  17. xlink:href="@/assets/images/equip/lengganji.svg#notification"
  18. ></use>
  19. </svg> -->
  20. </div>
  21. </div>
  22. <div class="right">
  23. <div class="t">冷干机</div>
  24. <div class="b">W3456112345093</div>
  25. </div>
  26. </li>
  27. <li @click="getEquipItem('shuibeng.svg')">
  28. <div class="left">
  29. <div class="icon"></div>
  30. </div>
  31. <div class="right">
  32. <div class="t">水泵</div>
  33. <div class="b">A245234345287</div>
  34. </div>
  35. </li>
  36. <li @click="getEquipItem('shuixiang.svg')">
  37. <div class="left">
  38. <div class="icon"></div>
  39. </div>
  40. <div class="right">
  41. <div class="t">水箱</div>
  42. <div class="b">Y2344560096</div>
  43. </div>
  44. </li>
  45. </ul>
  46. <!-- 添加设备 -->
  47. <div class="addbtn" @click="openAddEqupModle">
  48. <i class="el-icon-plus"></i>
  49. 添加设备示例
  50. </div>
  51. </div>
  52. </template>
  53. <script>
  54. import { mapMutations, mapState } from "vuex";
  55. export default {
  56. data() {
  57. return {};
  58. },
  59. methods: {
  60. ...mapMutations(["SETCHOICELEHEND", "SETLEGENDOBJ"]),
  61. // 打开添加弹窗
  62. openAddEqupModle() {
  63. this.$emit("openAddEqupModle");
  64. },
  65. // 获取设备图例
  66. getEquipItem(id) {
  67. const obj = {
  68. url: id,
  69. };
  70. this.SETLEGENDOBJ(obj);
  71. const cmd = "EditEuqipment";
  72. this.SETCHOICELEHEND(cmd);
  73. },
  74. },
  75. computed: {
  76. ...mapState(["editCmd"]),
  77. },
  78. };
  79. </script>
  80. <style lang="less" scoped>
  81. ul,
  82. li {
  83. margin: 0;
  84. padding: 0;
  85. list-style-type: none;
  86. }
  87. .equip-list {
  88. width: 100%;
  89. height: 100%;
  90. position: relative;
  91. ul {
  92. li {
  93. width: 100%;
  94. height: 48px;
  95. display: flex;
  96. cursor: pointer;
  97. .left {
  98. width: 28px;
  99. display: flex;
  100. height: 100%;
  101. align-items: center;
  102. .icon {
  103. width: 100%;
  104. height: 28px;
  105. border-radius: 50% 50%;
  106. }
  107. }
  108. .right {
  109. padding: 4px;
  110. box-sizing: border-box;
  111. .t {
  112. font-size: 14px;
  113. color: #1f2429;
  114. }
  115. .b {
  116. font-size: 10px;
  117. color: #8d9399;
  118. }
  119. }
  120. }
  121. }
  122. .addbtn {
  123. width: 100%;
  124. height: 40px;
  125. position: absolute;
  126. bottom: 0;
  127. left: 0;
  128. display: flex;
  129. align-items: center;
  130. justify-content: center;
  131. box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.11);
  132. cursor: pointer;
  133. &:hover {
  134. color: #0091ff;
  135. }
  136. }
  137. }
  138. </style>