gaoluyang
9 天以前 4cd66de5c36ab7c72272abe1406995679c643f14
src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
@@ -1,7 +1,7 @@
<template>
  <div>
    <el-dialog title="零件绑定" :visible.sync="isShow" width="800px" @close="$emit('closeBindPartDialog')">
      <lims-table :tableData="tableData" :column="column" height="460"
      <lims-table :tableData="tableData" :column="column" height="460"  @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
      <span slot="footer" class="dialog-footer">
        <el-button @click="$emit('closeBindPartDialog')">取 消</el-button>
@@ -151,11 +151,15 @@
  },
  // 方法集合
  methods: {
    pagination(page) {
      this.page.size = page.limit
      this.getList()
    },
    getList() {
      this.tableLoading = true
      // 根据类型判断是检验对象零件绑定还是产品维护零件绑定
      if (this.type === 0) {
        selectByTestObjectId({testObjectId: this.currentRow.id}).then(res => {
        selectByTestObjectId({testObjectId: this.currentRow.id, ...this.page}).then(res => {
          this.tableLoading = false
          if (res.code === 200) {
            this.tableData = res.data.records
@@ -165,7 +169,7 @@
          this.tableLoading = false
        })
      } else {
        selectByProductId({productId: this.currentRow.id}).then(res => {
        selectByProductId({productId: this.currentRow.id, ...this.page}).then(res => {
          this.tableLoading = false
          if (res.code === 200) {
            this.tableData = res.data.records