deviceControl.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <div class="device-control">
  3. <div class="control-container">
  4. <a-checkbox-group v-model:value="deviceChoiceList" class="check-box">
  5. <a-row v-for="(item, index) in deviceControlData" :key="index" class="row-box">
  6. <a-col :span="24">
  7. <a-checkbox :value="item.id">{{ item.strinstallpos }}</a-checkbox>
  8. </a-col>
  9. </a-row>
  10. </a-checkbox-group>
  11. <a-button class="device-control-btn" type="primary" @click="confirmChoice">确定</a-button>
  12. </div>
  13. </div>
  14. </template>
  15. <script setup lang="ts">
  16. import { ref } from 'vue'
  17. let props = defineProps({
  18. deviceControlData: {
  19. type: Array,
  20. default: () => {
  21. return []
  22. }
  23. }
  24. })
  25. const deviceChoiceList = ref([]);
  26. const $emit = defineEmits(['confirmChoice'])
  27. function confirmChoice() {
  28. $emit('confirmChoice', deviceChoiceList.value)
  29. }
  30. </script>
  31. <style lang="less" scoped>
  32. @import '/@/design/theme.less';
  33. @{theme-deepblue} {
  34. .door-content-r {
  35. --image-left-bd: url('@/assets/images/themify/deepblue/home-container/configurable/wind-door/left-bd.png');
  36. }
  37. }
  38. .device-control {
  39. --image-left-bd: url('@/assets/images/home-container/configurable/wind-door/left-bd.png');
  40. width: 200px;
  41. height: 280px;
  42. background-image: var(--image-left-bd);
  43. background-size: 100% 100%;
  44. position: absolute;
  45. right: 35px;
  46. top: 70px;
  47. .control-container {
  48. display: flex;
  49. flex-direction: column;
  50. align-items: center;
  51. width: calc(100% - 10px);
  52. height: calc(100% - 10px);
  53. margin: 4px;
  54. padding: 5px 8px;
  55. box-sizing: border-box;
  56. background-color: rgba(54, 198, 254, .5);
  57. }
  58. .check-box {
  59. width: 100%;
  60. height: 230px;
  61. overflow: hidden;
  62. overflow-y: auto;
  63. }
  64. .row-box {
  65. margin: 10px 0px;
  66. }
  67. .zxm-checkbox-wrapper {
  68. color: #fff;
  69. }
  70. .device-control-btn{
  71. position: absolute;
  72. bottom: 5px;
  73. }
  74. }
  75. </style>