zenglf
2023-08-17 7442a435d058bd17d6fc679e1b7956bf3a5d32ae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<template>
  <a-drawer
    :title="title"
    :width="drawerWidth"
    :visible="visible"
    @close="handleCancel"
    :confirmLoading="confirmLoading"
    :maskClosable="maskClosable"
  >
    <a-card :style="getBackground()">
      <template>
        <a-row
          type="flex"
          :gutter="16"
        >
          <a-col
            :md="6"
            :sm="24"
          >
            <equipment-structure-left @clickTreeNode="getSelectNode" />
          </a-col>
          <a-col
            :md="24-6"
            :sm="24"
          >
            <equipment-spares-right :recordSelect="currentNodeSelect" />
          </a-col>
        </a-row>
      </template>
    </a-card>
 
    <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
      <a-row :style="{textAlign:'right'}">
        <a-button
          :style="{marginRight: '8px'}"
          @click="handleCancel"
        >
          取消
        </a-button>
        <a-button
          @click="handleOk"
          :disabled="false"
          type="primary"
        >确定</a-button>
      </a-row>
    </div>
  </a-drawer>
</template>
 
<script>
import EquipmentStructureLeft from './EquipmentStructureLeft'
import EquipmentSparesRight from './EquipmentSparesRight.vue'
 
export default {
  name: 'EquipmentStructureDrawer',
  components: {
    EquipmentStructureLeft,
    EquipmentSparesRight
  },
  data() {
    return {
      title: "设备结构",
      maskClosable: true,
      confirmLoading: false,
      drawerWidth: "100%",
      visible: false,
      currentNodeSelect: '',
      // equipmentRecord: {},
    }
  },
  // created() {
  //   this.equipmentRecord = {}
  // },
  methods: {
    getSelectNode(val) {
      this.currentNodeSelect = val;
    },
    getBackground() {
      return "background-color:rgba(127, 127, 127,0.08)";
    },
    loadData() {
 
    },
    handleCancel() {
      this.close()
    },
    close() {
      this.visible = false;
    },
    handleOk() { this.close() }
  }
}
</script>
 
<style scoped>
@import '~@assets/less/common.less';
</style>