阅行客电子档案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.4 KiB

  1. <template>
  2. <el-dialog class="detail-dialog" :title="detailTitle" append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="detailVisible" :before-close="handleClose">
  3. <span class="dialog-right-top" />
  4. <span class="dialog-left-bottom" />
  5. <div class="setting-dialog">
  6. <div class="detail-tab tab-content">
  7. <!-- tab -->
  8. <ul class="tab-nav" style="padding: 0;">
  9. <li :class="{'active-tab-nav': activeIndex == 0}" @click="changeActiveTab(0)">基本信息</li>
  10. <li v-if="(selectedDeviceType==='网络视频录像机(NVR)' || selectedDeviceType==='环境监控主机')" :class="{'active-tab-nav': activeIndex == 1}" @click="changeActiveTab(1)">子设备列表</li>
  11. </ul>
  12. <!-- 基本信息 -->
  13. <div v-if="activeIndex==0" class="base-info item-content">
  14. <el-row>
  15. <el-col v-for="(item,index) in DetailsInfoData" :key="index" class="base-info-item">
  16. <span>{{ item.fieldCnName }}</span>
  17. <p>{{ item.context }}</p>
  18. </el-col>
  19. </el-row>
  20. </div>
  21. <!-- 子设备列表 -->
  22. <div v-if="activeIndex==1 && (selectedDeviceType==='网络视频录像机NVR' || selectedDeviceType==='环境监控主机')" class="item-content" />
  23. </div>
  24. </div>
  25. <div slot="footer" class="dialog-footer">
  26. <el-button v-if=" selectedDeviceType === '网络视频录像机(NVR)' || selectedDeviceType ==='环境监控主机'" class="device-child-btn" @click="ChildDevice"><i class="iconfont icon-zishebeiguanli" />子设备管理</el-button>
  27. <el-button type="primary" @click="detailVisible=false">确定</el-button>
  28. </div>
  29. </el-dialog>
  30. </template>
  31. <script>
  32. export default {
  33. name: 'Detail',
  34. components: { },
  35. mixins: [],
  36. props: {
  37. selectedDeviceType: {
  38. type: String,
  39. default: function() {
  40. return ''
  41. }
  42. }
  43. },
  44. data() {
  45. return {
  46. detailTitle: '',
  47. activeIndex: 0,
  48. detailVisible: false,
  49. DetailsInfoData: []
  50. }
  51. },
  52. mounted() {
  53. },
  54. methods: {
  55. changeActiveTab(index) {
  56. this.activeIndex = index
  57. },
  58. ChildDevice() {
  59. this.$emit('childDevice')
  60. },
  61. // 删除 - 关闭
  62. handleClose(done) {
  63. this.detailVisible = false
  64. done()
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss" scoped>
  70. .base-info{
  71. background: #F6F8FC;
  72. }
  73. </style>