chenrui
2025-06-13 ce9b8903d77aa0bed9644703d47a81756f18ab4a
src/views/equipment/lossrecord/index.vue
@@ -13,6 +13,24 @@
        <template #toolbar></template>
      </ttable>
    </basic-container>
    <el-dialog width="80%" title="实验数据" :visible.sync="dialogShow">
      <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="specification1" label="规格" width="180">
        </el-table-column>
        <el-table-column prop="channel1" label="频道" width="180">
        </el-table-column>
        <el-table-column prop="insertionLoss1" label="插入损耗">
        </el-table-column>
        <el-table-column prop="returnLoss1" label="回波损耗"> </el-table-column>
        <el-table-column prop="specification2" label="规格" width="180">
        </el-table-column>
        <el-table-column prop="channel2" label="频道" width="180">
        </el-table-column>
        <el-table-column prop="insertionLoss2" label="插入损耗">
        </el-table-column>
        <el-table-column prop="returnLoss2" label="回波损耗"> </el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>
@@ -20,7 +38,8 @@
import {
  downloadLossWord,
  recordList,
  syncLossRecordFile
  syncLossRecordFile,
  getLossRecords
} from '@/api/equipment/lossRecord'
import { mapGetters } from 'vuex'
import ttable from '@/views/common/ztt-table.vue'
@@ -60,7 +79,6 @@
        column: [
          {
            minWidth: '150',
            width: '100',
            prop: 'sourceFile',
            label: '数据来源',
            sort: false,
@@ -69,7 +87,6 @@
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'productNum1',
            label: '产品编号1',
            sort: false,
@@ -78,7 +95,6 @@
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'productNum2',
            label: '产品编号2',
            sort: false,
@@ -87,7 +103,6 @@
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'batchNum1',
            label: '批次编号1',
            sort: false,
@@ -96,7 +111,6 @@
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'batchNum2',
            label: '批次编号2',
            sort: false,
@@ -105,79 +119,6 @@
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'specification1',
            label: '规格',
            sort: false,
            isTrue: true,
            isSearch: true
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'channel1',
            label: '频道',
            sort: false,
            isTrue: true,
            isSearch: true
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'insertionLoss1',
            label: '插入损耗',
            sort: false,
            isTrue: true,
            isSearch: true
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'returnLoss1',
            label: '回波损耗',
            sort: false,
            isTrue: true,
            isSearch: true
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'specification2',
            label: '规格',
            sort: false,
            isTrue: true,
            isSearch: true
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'channel2',
            label: '频道',
            sort: false,
            isTrue: true,
            isSearch: true
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'insertionLoss2',
            label: '插入损耗',
            sort: false,
            isTrue: true,
            isSearch: true
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'returnLoss2',
            label: '回波损耗',
            sort: false,
            isTrue: true,
            isSearch: true
          },
          {
            minWidth: '150',
            width: '100',
            prop: 'createTime',
            label: '创建时间',
            sort: true,
@@ -197,7 +138,10 @@
        }
      },
      addOrUpdateVisible: false,
      workshopList: []
      workshopList: [],
      tableData: [
      ],
      dialogShow: false
    }
  },
  components: {
@@ -215,8 +159,13 @@
    })
    const arr = []
    arr.push({
      text: '详情',
      type: 'text',
      size: 'small',
      fun: this.showExperimentalData
    })
    arr.push({
      text: '导出',
      icon: 'el-icon-download',
      type: 'text',
      size: 'small',
      fun: this.downloadFile
@@ -239,6 +188,19 @@
      })
    },
    // 展示实验数据
    showExperimentalData(row) {
      getLossRecords(row.id)
        .then((res) => {
          console.log('res', res)
          this.tableData = res.data.data
          this.dialogShow = true
        })
        .error((err) => {
          console.log('err', err)
        })
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
    }