| | |
| | | <template> |
| | | <div class="sample-disposal"> |
| | | <div class="capacity-scope"> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="queryParams.totaldealId = ''"> |
| | | <el-tab-pane label="填写" name="填写" style="height: 100%;" :key="1"> |
| | | <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;">新增</el-button> |
| | | <div class="table" style="height: calc(100% - 200px)" v-if="activeName == '填写'"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" |
| | | key="tableData" |
| | | :height="'calc(100vh - 290px)'" :page="page" @pagination="pagination"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading" |
| | | key="tableData0" |
| | | :height="'calc(100vh - 300px)'" :page="page0" @pagination="pagination0"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | |
| | | pageProcessTotaldeal, |
| | | } from "@/api/cnas/process/sampleDisposal"; |
| | | export default { |
| | | name: 'SampleDisposal', |
| | | components: { |
| | | limsTable, |
| | | filePreview, |
| | | }, |
| | | name: "SampleDisposal", |
| | | data() { |
| | | return { |
| | | activeName: '填写', |
| | |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getCustomPageList() |
| | | this.getList() |
| | | this.getList0() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let out = false |
| | | let submitProcessTotaldeal = false |
| | | let checkProcessTotaldeal = false |
| | | let ratifyProcessTotaldeal = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addProcessDeal') { |
| | | add = true |
| | | } |
| | | // if (power[i].menuMethod == 'exportProcessEvaluate') { |
| | | // out = true |
| | | // } |
| | | if (power[i].menuMethod == 'submitProcessTotaldeal') { |
| | | submitProcessTotaldeal = true |
| | | } |
| | | if (power[i].menuMethod == 'checkProcessTotaldeal') { |
| | | checkProcessTotaldeal = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyProcessTotaldeal') { |
| | | ratifyProcessTotaldeal = true |
| | | } |
| | | } |
| | | if (!ratifyProcessTotaldeal) { |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | if (!checkProcessTotaldeal) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!submitProcessTotaldeal) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData0.do.splice(1, 1) |
| | | this.componentData0.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | // 获取送样单位列表 |
| | | getCustomPageList() { |
| | | selectCustomPageList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.customPageList = res.data.body.records |
| | | this.customPageList = res.data.records |
| | | }).catch(err => { }); |
| | | }, |
| | | handleDown() { }, |
| | |
| | | ...this.addInfo |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code === 201) return |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | ...this.addInfo |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code === 201) return |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | submitProcessTotaldeal({ |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '提交成功!' |
| | |
| | | }, |
| | | // 查看 |
| | | handleLook(row) { |
| | | // console.log(row) |
| | | // this.title0 = '查看' |
| | | // this.commonFun(row) |
| | | this.activeName = '填写' |
| | | this.queryParams.totaldealId = row.id |
| | | this.$nextTick(() => { |
| | | this.page.current = 0; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }) |
| | | }, |
| | |
| | | }).then(res => { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!' |
| | |
| | | }).then(res => { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!' |
| | |
| | | }, |
| | | // 导出详情 |
| | | handleDown0(row) { |
| | | if (!row.url) { |
| | | this.$message.warning('暂无文件') |
| | | return |
| | | } |
| | | // 后端下载 |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, row.month + ' 样品处理申请表'); |
| | | this.$download.saveAs(row.url, row.month + ' 样品处理申请表'); |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("是否删除该条数据?", "提示", { |
| | |
| | | }) |
| | | .then(() => { |
| | | delProcessDeal({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | this.page.current = 0; |
| | | this.getList(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |