AttributePopup.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <div
  3. class="attribute"
  4. :style="{ width: boxWidth + 'px', height: boxHeight + 'px' }"
  5. >
  6. <div class="close-btn" @click="closeEvent"></div>
  7. <el-table
  8. :header-cell-style="{ 'text-align': 'center' }"
  9. :data="tableData"
  10. v-if="tableType === 'normal'"
  11. height="100%"
  12. >
  13. <el-table-column label="版本" prop="version"></el-table-column>
  14. <el-table-column label="shape-long" prop="long"></el-table-column>
  15. <el-table-column label="shape-area" prop="area"></el-table-column>
  16. <el-table-column
  17. label="性质"
  18. prop="nature"
  19. align="center"
  20. ></el-table-column>
  21. <el-table-column label="面积" prop="area"></el-table-column>
  22. </el-table>
  23. <el-table height="100%" v-if="tableType === 'personal'" :data="tableData">
  24. <el-table-column label="名称" prop="name"></el-table-column>
  25. <el-table-column label="类别" prop="type"></el-table-column>
  26. <el-table-column label="描述" prop="des"></el-table-column>
  27. </el-table>
  28. </div>
  29. </template>
  30. <script>
  31. /**
  32. * 疑点详细属性(预设模型 - 图层详细信息)
  33. *
  34. * tableType (normal,personal)
  35. *
  36. * normal -- 预设模型中的默认图层详细属性
  37. *
  38. * personal -- 我的标记
  39. */
  40. export default {
  41. name: "AttributePopup",
  42. components: {},
  43. props: ["tableType", "boxWidth", "boxHeight", "tableData"],
  44. watch: {},
  45. methods: {
  46. closeEvent() {
  47. this.$emit("close");
  48. },
  49. },
  50. };
  51. </script>
  52. <style lang="less" scoped>
  53. @borderColor: #00aaff;
  54. @borderColor32: #00aaff32;
  55. @borderColor64: #00aaff64;
  56. @topTitleBgLeft: #002645;
  57. @topTitleMinLeft: #002f56;
  58. @lightColor: #74ffff;
  59. .attribute {
  60. display: flex;
  61. align-items: center;
  62. justify-content: center;
  63. .close-btn {
  64. cursor: pointer;
  65. position: absolute;
  66. right: -15px;
  67. top: -15px;
  68. width: 40px;
  69. height: 40px;
  70. background: url("../../assets/image/close.png") no-repeat center;
  71. z-index: 1;
  72. }
  73. /deep/.el-table__empty-text {
  74. color: #fff;
  75. }
  76. /deep/.el-table {
  77. font-size: 0.95rem;
  78. font-family: PingFang SC;
  79. font-weight: 500;
  80. color: #ffffff;
  81. background: rgba(0, 39, 77, 0.6);
  82. border: 1px solid #2fb8ff;
  83. .el-table__body-wrapper,
  84. .el-table__footer-wrapper,
  85. .el-table__header-wrapper {
  86. width: 100%;
  87. }
  88. thead {
  89. color: #fff;
  90. background-image: --webkit-linear-gradient(
  91. to left,
  92. @topTitleMinLeft,
  93. @borderColor,
  94. @topTitleMinLeft
  95. );
  96. background-image: --moz-linear-gradient(
  97. to left,
  98. @topTitleMinLeft,
  99. @borderColor,
  100. @topTitleMinLeft
  101. );
  102. background-image: linear-gradient(
  103. to left,
  104. @topTitleMinLeft,
  105. @borderColor,
  106. @topTitleMinLeft
  107. );
  108. }
  109. th {
  110. position: relative;
  111. left: 2px;
  112. padding: 5px 0;
  113. background: transparent;
  114. }
  115. tr {
  116. background: transparent;
  117. .is-leaf {
  118. border-bottom: 0px solid #ebeef5;
  119. }
  120. }
  121. td {
  122. padding: 2px 0;
  123. position: relative;
  124. border-bottom: 0px solid #ebeef5;
  125. font-size: 0.85rem;
  126. }
  127. }
  128. /deep/.el-table::before {
  129. height: 0px;
  130. }
  131. }
  132. </style>