src/views/dnc/base/modules/ProductStructure/Cutter/CutterTableList.vue
@@ -20,11 +20,7 @@
            <a-space>
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="handleAdd" icon="plus" v-has="'cutter_add'">新增</a-button>
              <a-button type="primary" @click="handleExportXls('刀具列表')" icon="export">导出</a-button>
              <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
                        :action="importExcelUrl" @change="handleImportExcel">
                <a-button type="primary" icon="import">导入</a-button>
              </a-upload>
              <a-button type="primary" @click="handleAdd()" icon="export">发送刀具系统</a-button>
            </a-space>
          </a-col>
        </a-row>
@@ -34,7 +30,8 @@
    <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" :size="size" rowKey="id"
             @change="handleTableChange" :scroll="{y:189}">
      <template slot="action" slot-scope="text, record">
        <a @click="handleEdit(record)">编辑</a>
        <a @click="handleEdit(record)">选择刀具</a>
        <a-divider type="vertical"/>
@@ -92,12 +89,14 @@
            return parseInt(index) + 1
          }
        },
        { title: '刀具编号', dataIndex: 'cutterCode', align: 'center' },
        { title: '刀具名称', dataIndex: 'cutterName', align: 'center' },
        { title: '刀具类型', dataIndex: 'cutterType_dictText', align: 'center' },
        { title: '刀具编号', dataIndex: 'cutterCode', width: 100, align: 'center' },
        { title: '刀具名称', dataIndex: 'cutterName', width: 100, align: 'center' },
        { title: '刀具简称', dataIndex: 'cutterType', width: 80, align: 'center' },
        { title: '刀具规格', dataIndex: 'cutterSpec', align: 'center' },
        { title: '额定寿命', dataIndex: 'lifetime', width: 150, align: 'center' },
        { title: '刀位', dataIndex: 'cutterSpacing', width: 150, align: 'center' },
        { title: '刀具数量', dataIndex: 'quantity', width: 150, align: 'center' },
        { title: '刀位', dataIndex: 'cutterSpacing', width: 50, align: 'center' },
        { title: '刀具数量', dataIndex: 'quantity', width: 80, align: 'center' },
        { title: '描述', dataIndex: 'description', width: 200, align: 'center' },
        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, align: 'center', width: 150 }
      ],
      url: {
@@ -115,8 +114,33 @@
  },
  methods: {
    setQueryParamAndLoadData(pageNo = 1) {
      const { id, type } = this.currentLevelInfo
      this.queryParam = Object.assign({}, { attributionId: id, attributionType: type })
      if (this.currentLevelInfo.classificationId_dictText==='nc'){
        const {docId,attributionType,attributionId} = this.currentLevelInfo
        this.queryParam = Object.assign({}, { docId:docId,attributionType:attributionType,attributionId:attributionId })
      }
      if (this.currentLevelInfo.deviceManagementId !== null && this.currentLevelInfo.deviceManagementId !== undefined){
        const {attributionType,id} = this.currentLevelInfo
        this.queryParam = Object.assign({}, {attributionType:attributionType,attributionId:id })
      }
      if (this.currentLevelInfo.id !== null && this.currentLevelInfo.type !== null && this.currentLevelInfo.type !== undefined && this.currentLevelInfo.id !== undefined){
        const { id, type } = this.currentLevelInfo
        this.queryParam = Object.assign({}, { attributionId: id, attributionType: type })
      }
      this.loadData(pageNo)
    },
    searchQuery(pageNo = 1) {
      if (this.currentLevelInfo.classificationId_dictText==='nc'){
        const {docId,attributionType,attributionId} = this.currentLevelInfo
        this.queryParam = Object.assign({}, { docId:docId,attributionType:attributionType,attributionId:attributionId })
      }
      if (this.currentLevelInfo.deviceManagementId !== null && this.currentLevelInfo.deviceManagementId !== undefined){
        const {attributionType,id} = this.currentLevelInfo
        this.queryParam = Object.assign({}, {attributionType:attributionType,attributionId:id })
      }
      if (this.currentLevelInfo.id !== null && this.currentLevelInfo.type !== null && this.currentLevelInfo.type !== undefined && this.currentLevelInfo.id !== undefined){
        const { id, type } = this.currentLevelInfo
        this.queryParam = Object.assign({}, { attributionId: id, attributionType: type })
      }
      this.loadData(pageNo)
    },