| | |
| | | </el-upload> |
| | | </div> |
| | | <div v-if="filesDialogVisible"> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | @pagination="pagination" height="500px" key="tableData" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | <lims-table :tableData="tableDataFile" :column="columnFile" |
| | | @pagination="paginationFile" height="500px" key="tableDataFile" |
| | | :page="pageFile" :tableLoading="tableLoadingFile"></lims-table> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | tableDataFile: [], |
| | | tableLoadingFile: false, |
| | | columnFile: [ |
| | | { |
| | | dataType: 'tag', |
| | | label: '类型', |
| | | prop: 'type', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return '合格' |
| | | } else if (params == 0) { |
| | | return '不合格' |
| | | } else if (params == 3) { |
| | | return '不判定' |
| | | return '图片' |
| | | } else if (params == 2) { |
| | | return '文件' |
| | | } else { |
| | | return '' |
| | | } |
| | |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 0) { |
| | | return 'danger' |
| | | } else if (params == 3) { |
| | | return '' |
| | | } else { |
| | | } else if (params == 2) { |
| | | return 'warning' |
| | | } else { |
| | | return '' |
| | | } |
| | | } |
| | |
| | | ] |
| | | } |
| | | ], |
| | | page: { |
| | | pageFile: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | this.getFileList() |
| | | }, |
| | | // 方法集合 |
| | | methods: { |
| | | // 切换数据查看tab栏 |
| | | handleDataVisibleTab (m, i) { |
| | | this.dataVisibleIndex = i |
| | | this.refreshTable() |
| | | this.getFileList() |
| | | }, |
| | | // 查询回调 |
| | | refreshTable() { |
| | | getFileList() { |
| | | if (this.dataVisibleIndex === 0) { |
| | | this.entity.insOrderId = this.filesLookInfo.enterOrderId |
| | | } else { |
| | | this.entity.insOrderId = this.filesLookInfo.quarterOrderId |
| | | } |
| | | this.tableLoading = true |
| | | this.tableLoadingFile = true |
| | | const params = {...this.entity} |
| | | getFileList(params).then(res => { |
| | | this.tableLoading = false |
| | | this.tableLoadingFile = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | this.tableDataFile = res.data.records |
| | | this.pageFile.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | this.tableLoadingFile = false |
| | | }) |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.limit |
| | | this.refreshTable() |
| | | paginationFile (page) { |
| | | this.pageFile.size = page.limit |
| | | this.getFileList() |
| | | }, |
| | | // 下载 |
| | | handleDown(row){ |