fixedEntry.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!-- 基础信息 -->
  2. <template>
  3. <div>
  4. <div class="cont-table">
  5. <el-table
  6. :data="dingzhiData"
  7. stripe
  8. style="width: 100%"
  9. :cell-style="{ color: '#000',cursor:'pointer' }"
  10. @row-click="svSendRowClick3"
  11. :highlight-current-row="true"
  12. ref="myTable5"
  13. >
  14. <el-table-column type="index" label="序号" width="80" />
  15. <el-table-column prop="accesspoint_name" label="访问点" width="180" />
  16. <el-table-column label="数据集名称">
  17. <template #default="scope">
  18. {{ `${scope.row.ld_desc}(${scope.row.ld_name})` }}
  19. </template>
  20. </el-table-column>
  21. <el-table-column prop="dataset_desc" label="数据集描述" />
  22. </el-table>
  23. <div class="title">
  24. 定值条目列表详情(共<span v-if="gooseList">{{ gooseList.length }}</span
  25. >条)
  26. </div>
  27. <el-table
  28. :data="dingzhiDataChild"
  29. style="width: 100%"
  30. stripe
  31. :cell-style="{ color: '#000' }"
  32. >
  33. <el-table-column type="index" label="序号" width="80" />
  34. <el-table-column prop="doi_desc" label="条目描述" width="180" />
  35. <el-table-column label="最大值" prop="da_maxval"/>
  36. <el-table-column label="最小值" prop="da_minval"/>
  37. <el-table-column prop="da_units" label="单位" />
  38. <el-table-column prop="da_stepsize" label="步长" />
  39. <el-table-column prop="da_datatype" label="数据类型" />
  40. <el-table-column prop="short_addr" label="内部地址" />
  41. </el-table>
  42. </div>
  43. </div>
  44. </template>
  45. <script setup>
  46. import { onMounted, watch, ref, nextTick, defineEmits, inject } from "vue";
  47. import {
  48. getDingzhis
  49. } from "@/api/iedNetwork";
  50. const props = defineProps({
  51. checkData: {
  52. type: Object,
  53. default: () => {},
  54. },
  55. isPhoto: {
  56. type: String,
  57. default: "",
  58. },
  59. svInfo: {
  60. type: Array,
  61. default: [],
  62. },
  63. });
  64. const scdIdValue = inject("scdId");
  65. const dingzhiData = ref(null);
  66. const dingzhiDataChild = ref(null);
  67. const myTable5 = ref(null);
  68. const getDingzhisList = async () => {
  69. const dingRes= await getDingzhis({
  70. scd_id: scdIdValue,
  71. ied_name: props.checkData.ied_name,
  72. })
  73. if(dingRes.data.length>0){
  74. dingzhiData.value = dingRes.data;
  75. dingzhiDataChild.value = dingRes.data[0].list
  76. }
  77. myTable5.value.setCurrentRow(dingzhiData.value[0]);
  78. }
  79. const svSendRowClick3 = (row, column) => {
  80. dingzhiDataChild.value = row.list
  81. }
  82. watch(
  83. () => props.checkData,
  84. (newValue) => {
  85. dingzhiData.value = [];
  86. dingzhiDataChild.value = [];
  87. if (newValue != null) {
  88. getDingzhisList()
  89. }
  90. }
  91. );
  92. onMounted(() => {
  93. getDingzhisList()
  94. });
  95. </script>
  96. <style scoped lang="scss">
  97. .cont-table {
  98. height: 65vh;
  99. display: flex;
  100. flex-direction: column;
  101. justify-content: space-between;
  102. }
  103. :deep(.el-table) {
  104. flex-basis: 45%;
  105. }
  106. .title {
  107. margin: 16px;
  108. color: #51637f;
  109. }
  110. </style>