| | |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </template> |
| | | <template> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="handleDowns" |
| | | :loading="outLoading" |
| | | style="margin-right: 6px" |
| | | >批量下载</el-button |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="openBatchUploadDia()" |
| | | :loading="inLoading" |
| | | >批量上传</el-button |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="oneClickApproval()" |
| | | :loading="approvalLoading" |
| | | >一键审批</el-button |
| | | > |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="openApprovalConfig()" |
| | | :loading="approvalConfigLoading" |
| | | >审批签名配置</el-button |
| | | > |
| | | </template> |
| | | </div> |
| | | <!-- <div class="btns"> |
| | | <el-button size="small" type="primary" @click="handleDowns" :loading="outLoading" style="margin-right: 16px;">批量下载</el-button> |
| | |
| | | </p> |
| | | </div> |
| | | <lims-table |
| | | :handleSelectionChange="handleSelectionChange" |
| | | isSelection |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :tableLoading="tableLoading" |
| | |
| | | downAll, |
| | | getBatchApprovalProgress, |
| | | getReportCountInfo, |
| | | downReport, |
| | | upReportUrl, |
| | | ratifyReport, |
| | | writeReport, |
| | | examineReport, |
| | | downLoad, |
| | | getReportInfo, |
| | | getURL |
| | | getURL, |
| | | batchApprovalReport, |
| | | downReport, |
| | | } from "../../../api/business/reportPreparation"; |
| | | |
| | | import { getToken } from "@/utils/auth"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | { |
| | | name: "上传", |
| | | type: "upload", |
| | | url: "/file/attachmentType/upload", |
| | | url: "/insReport/inReport", |
| | | data: (row) => { |
| | | return { |
| | | id: row.id, |
| | | type: 1, |
| | | }; |
| | | }, |
| | | uploadIdFun: (row) => { |
| | |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | let token = getToken(); |
| | | return { |
| | | token: sessionStorage.getItem("token"), |
| | | authorization: token, |
| | | }; |
| | | }, |
| | | action() { |
| | | return ""; |
| | | return this.javaApi + "/insReport/upAll"; |
| | | }, |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | // 撤回 弹框 |
| | | withdraw(row) { |
| | | getLaboratoryByReportId(row.id).then((res) => { |
| | | getLaboratoryByReportId({ id: row.id }).then((res) => { |
| | | this.laboratorys = res.data; |
| | | this.reportId = row.id; |
| | | this.withdrawDialogVisible = true; |
| | |
| | | withdraw(data).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("撤回成功"); |
| | | this.laboratory = []; |
| | | this.withdrawDialogVisible = false; |
| | | this.refresh(); |
| | | } |
| | |
| | | getAuthorizedPerson() { |
| | | getUserList() |
| | | .then((res) => { |
| | | console.log('res',res); |
| | | this.personList = res.data; |
| | | }) |
| | | .catch((error) => { |
| | |
| | | handleChange(arr) { |
| | | this.mutiList = arr; |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.mutiList = val; |
| | | console.log(`output->val`, val); |
| | | }, |
| | | handleDowns() { |
| | | if (this.mutiList.length == 0) { |
| | | this.$message.error("请选择报告"); |
| | |
| | | downAll({ ids: str }).then((res) => { |
| | | this.outLoading = false; |
| | | this.$message.success("导出成功"); |
| | | // const blob = new Blob([res],{ type: 'application/octet-stream' }); |
| | | // const url = URL.createObjectURL(blob); |
| | | // const link = document.createElement('a'); |
| | | // link.href = url; |
| | | // link.download = '报告.zip'; |
| | | // link.click(); |
| | | const link = document.createElement("a"); |
| | | link.href = this.javaApi + res.message; |
| | | link.href = this.javaApi + res.data; |
| | | link.target = "_blank"; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | |
| | | console.log(`output->row`, row); |
| | | }, |
| | | download(row) { |
| | | getReportInfo({ id: row.id, type: 1,suffix:'.docx' }).then((response) => { |
| | | if (response.data && response.data.contentType) { |
| | | downLoad({ id: row.id, type: 1, code: row.code,suffix: '.docx' }) |
| | | .then((res) => { |
| | | // 获取文件名 |
| | | const blob = new Blob([res], { type: response.data.contentType }); |
| | | const url = URL.createObjectURL(blob); |
| | | let link = document.createElement("a"); |
| | | link.href = url; |
| | | link.download = row.code; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | URL.revokeObjectURL(url); |
| | | }) |
| | | .catch((error) => { |
| | | this.$message.error(error); |
| | | }); |
| | | } else { |
| | | this.$message.error("未找到文件"); |
| | | } |
| | | downReport({ id: row.id, type: 0 }).then((res) => { |
| | | let rowUrl = row.urlS ? row.urlS : row.url; |
| | | let fileName = |
| | | rowUrl.indexOf("_") == -1 |
| | | ? rowUrl.split("/")[2] |
| | | : rowUrl.split("_")[1]; |
| | | console.log(fileName); |
| | | const blod = new Blob([res], { type: "application/octet-stream" }); |
| | | const url = URL.createObjectURL(blod); |
| | | const link = document.createElement("a"); |
| | | link.href = url; |
| | | link.target = "_blank"; |
| | | link.download = fileName; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | }); |
| | | }, |
| | | // 还原操作 |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | upReportUrl({ id: row.id,type:1 }).then((res) => { |
| | | upReportUrl({ id: row.id, type: 1 }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | | this.refreshTable("page"); |
| | |
| | | this.currentInfo = row; |
| | | let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS; |
| | | fileName = fileName.replace("/word/", ""); |
| | | const userName = JSON.parse(localStorage.getItem("user")).name; |
| | | const userName = this.$store.state.user.name; |
| | | this.option = { |
| | | url: this.javaApi + "/word/" + fileName, |
| | | isEdit: false, |
| | |
| | | }, |
| | | handleApprove(row) { |
| | | this.currentInfo = row; |
| | | getURL().then(res => { |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS; |
| | | fileName = fileName.replace("/word/", ""); |
| | | const userName = this.$store.state.user.name; |
| | | this.option = { |
| | | url: javaApi + "/word/" + fileName, |
| | | url: this.javaApi + "/word/" + fileName, |
| | | isEdit: false, |
| | | fileType: "docx", |
| | | title: fileName, |
| | |
| | | this.loadingApproveReason = true; |
| | | examineReport({ |
| | | id: this.currentInfo.id, |
| | | isRatify: 0, |
| | | ratifyTell: this.reason, |
| | | isExamine: 0, |
| | | examineTell: this.reason, |
| | | }) |
| | | .then((res) => { |
| | | this.loadingApproveReason = false; |