<!--
 * @Author: ssl 710450920@qq.com
 * @Date: 2023-08-04 13:46:53
 * @LastEditors: ssl 710450920@qq.com
 * @LastEditTime: 2023-08-06 20:20:10
 * @FilePath: \csc\src\views\resource-apply\alteration\components\volume.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div>
  <basic-table border :data="list" style="width:500px;">
    <el-table-column prop="name" label="硬盘名称" show-overflow-tooltip></el-table-column>
    <el-table-column prop="size" label="容量(GB)" show-overflow-tooltip></el-table-column>
    <el-table-column  v-if="detail.service !== 'vmware.standard.server'"  prop="diskPolicieName" label="存储策略" show-overflow-tooltip></el-table-column>
    <template  v-else>
      <el-table-column prop="lvmMntp" label="挂载目录" show-overflow-tooltip></el-table-column>
      <el-table-column prop="device" label="设备路径" show-overflow-tooltip></el-table-column>
    </template>
    <slot name="el-table-column"></slot>
    <div slot="pagination"></div>
  </basic-table>
</div>

</template>

<script>
import { conditionVoleme } from 'services/platform/index'

export default {
  props: {
    detail: {
      type: Object,
      default: function () {
        return {};
      }
    }
  },
  computed: {
  },
  data () {
    return {
      list: []
    };
  },
  created () {
    this.getList()
  },
  methods: {
    getList (page) {
      conditionVoleme({
        condition: 'listByVmId',
        serverId: this.detail.serverId
      }).then(data => {
        if (data.success) {
          this.list = data.data
          this.$emit('back', data.data.length)
        }
      })
    }
  }
};

</script>
<style lang="scss">
</style>
