edbDetailPopover.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <el-popover
  3. placement="right"
  4. title=""
  5. width="350"
  6. offset="100"
  7. trigger="hover"
  8. >
  9. <ul class="edb-info-cont">
  10. <li v-for="key in keysArr" :key="key">
  11. <label class="li-label">{{keysLabel[key]}}</label>
  12. {{info[key]}}
  13. </li>
  14. </ul>
  15. <div slot="reference">
  16. <slot name="reference"/>
  17. </div>
  18. </el-popover>
  19. </template>
  20. <script>
  21. export default {
  22. name: "mDialog",
  23. props: {
  24. info: {
  25. type: Object,
  26. default: {}
  27. }
  28. },
  29. computed: {
  30. keysArr(){
  31. return Object.keys(this.keysLabel)
  32. }
  33. },
  34. data() {
  35. return {
  36. keysLabel: {
  37. 'EdbName': /* '指标名称' */ this.$t('Edb.Detail.e_name'),
  38. 'EdbCode': /* '指标ID' */this.$t('Edb.Detail.e_id'),
  39. 'Frequency': /* '更新频度' */this.$t('Edb.Detail.e_fre'),
  40. 'Unit': /* '单位' */this.$t('Edb.Detail.e_unit'),
  41. 'StartDate': /* '起始时间' */this.$t('Edb.Detail.e_start_time'),
  42. 'LatestDate': /* '最新日期' */this.$t('Edb.Detail.e_latest_date'),
  43. 'LatestValue': /* '最新值' */this.$t('Edb.Detail.e_latest_value'),
  44. 'ModifyTime': /* '最近更新' */this.$t('Edb.Detail.e_recent_time'),
  45. 'SourceName': /* '数据来源' */this.$t('Edb.Detail.source'),
  46. }
  47. };
  48. }
  49. };
  50. </script>
  51. <style scoped lang="scss">
  52. .edb-info-cont {
  53. background: #fff;
  54. padding: 20px 20px 10px;
  55. li {
  56. margin-bottom: 20px;
  57. display: flex;
  58. font-size: 14px;
  59. .li-label {
  60. min-width: 100px;
  61. margin-right: 20px;
  62. }
  63. }
  64. }
  65. </style>