| | |
| | | <style scoped> |
| | | .reportPreparation { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | height: 50px; |
| | | width: 230px; |
| | | width: 210px; |
| | | } |
| | | |
| | | .search_label { |
| | |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="inspection_order"> |
| | | <div style="width: 100%; height: 100%"> |
| | | <div> |
| | | <div class="reportPreparation bg-1"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px; text-align: left" |
| | |
| | | :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" |
| | | style="color: #3a7bfa" |
| | | @click="more = !more" |
| | | v-hasPermi="['bbusiness:reportPreparation:more']" |
| | | >{{ !more ? "更多" : "收起" }}</el-button |
| | | > |
| | | <div class="search_thing" style="padding-left: 20px"> |
| | |
| | | <el-dropdown-item |
| | | icon="el-icon-download" |
| | | command="batchDownload" |
| | | v-hasPermi="['business:reportPreparation:batchDownload']" |
| | | >批量下载</el-dropdown-item |
| | | > |
| | | <el-dropdown-item |
| | | icon="el-icon-upload" |
| | | command="batchUpload" |
| | | v-hasPermi="['business:reportPreparation:batchUpload']" |
| | | >批量上传</el-dropdown-item |
| | | > |
| | | <el-dropdown-item |
| | | icon="el-icon-s-check" |
| | | command="oneClickApproval" |
| | | v-hasPermi="['business:reportPreparation:oneClickApproval']" |
| | | >一键审批</el-dropdown-item |
| | | > |
| | | <el-dropdown-item |
| | | icon="el-icon-setting" |
| | | command="approvalConfig" |
| | | v-hasPermi="['business:reportPreparation:signatureConfiguration']" |
| | | >审批签名配置</el-dropdown-item |
| | | > |
| | | </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> |
| | | <el-button size="small" type="primary" @click="openBatchUploadDia()" :loading="inLoading">批量上传</el-button> |
| | | </div> --> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </p> |
| | | </div> |
| | | <lims-table |
| | | :handleSelectionChange="handleSelectionChange" |
| | | isSelection |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 270px)'" |
| | | :height="tableHeight+''" |
| | | :page="page" |
| | | @pagination="pagination" |
| | | ></lims-table> |
| | |
| | | style="cursor: pointer; font-size: 18px" |
| | | @click="fullscreen = true" |
| | | ></i> |
| | | <!-- <img |
| | | v-else |
| | | alt="" |
| | | src="../../../static/img/no-full.svg" |
| | | style="cursor: pointer" |
| | | @click="fullscreen = false" |
| | | /> --> |
| | | </div> |
| | | <div v-if="viewIssuedVisible" style="height: 80vh"> |
| | | <onlyoffice |
| | |
| | | @click="fullscreen = true" |
| | | v-if="!fullscreen" |
| | | ></i> |
| | | <!-- <img |
| | | src="../../../static/img/no-full.svg" |
| | | alt="" |
| | | v-else |
| | | style="cursor: pointer" |
| | | @click="fullscreen = false" |
| | | /> --> |
| | | </div> |
| | | <Word |
| | | style="height: 70vh" |
| | |
| | | @click="fullscreen = true" |
| | | v-if="!fullscreen" |
| | | ></i> |
| | | <!-- <img |
| | | src="../../../static/img/no-full.svg" |
| | | alt="" |
| | | v-else |
| | | style="cursor: pointer" |
| | | @click="fullscreen = false" |
| | | /> --> |
| | | </div> |
| | | <div style="height: 75vh" v-if="issuedVisible"> |
| | | <onlyoffice |
| | |
| | | @click="fullscreen = true" |
| | | v-if="!fullscreen" |
| | | ></i> |
| | | <!-- <img |
| | | src="../../../static/img/no-full.svg" |
| | | alt="" |
| | | v-else |
| | | style="cursor: pointer" |
| | | @click="fullscreen = false" |
| | | /> --> |
| | | </div> |
| | | <div style="height: 75vh" v-if="approveVisible"> |
| | | <onlyoffice |
| | |
| | | top="5vh" |
| | | > |
| | | <div> |
| | | <!-- <el-upload |
| | | class="upload-demo" |
| | | :action="action" |
| | | :headers="headers" |
| | | :show-file-list="false" |
| | | accept=".doc,.docx" |
| | | :limit="1" |
| | | :before-upload="beforeUpload" |
| | | :on-success="handleSuccess" |
| | | ref="upload" |
| | | :on-error="onError"> |
| | | </el-upload> --> |
| | | <el-upload |
| | | ref="upload" |
| | | class="upload-demo custom-upload" |
| | |
| | | downAll, |
| | | getBatchApprovalProgress, |
| | | getReportCountInfo, |
| | | downReport, |
| | | upReportUrl, |
| | | ratifyReport, |
| | | writeReport, |
| | | examineReport, |
| | | downLoad, |
| | | getReportInfo, |
| | | getURL, |
| | | batchApprovalReport, |
| | | downReport, |
| | | } from "../../../api/business/reportPreparation"; |
| | | |
| | | import { getToken } from "@/utils/auth"; |
| | | |
| | | import auth from "@/plugins/auth.js"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | tableHeight: "", |
| | | tagField: { |
| | | isUpload: { |
| | | select: [ |
| | |
| | | disabled: (row) => { |
| | | return row.isExamine != -9; |
| | | }, |
| | | showHide: () => { |
| | | return auth.hasPermi("business:reportPreparation:establishment"); |
| | | }, |
| | | }, |
| | | { |
| | | name: "下载", |
| | |
| | | clickFun: (row) => { |
| | | this.download(row); |
| | | }, |
| | | showHide: () => { |
| | | return auth.hasPermi("business:reportPreparation:download"); |
| | | }, |
| | | }, |
| | | { |
| | | name: "上传", |
| | | type: "upload", |
| | | url: "/file/attachmentType/upload", |
| | | url: "/insReport/inReport", |
| | | data: (row) => { |
| | | return { |
| | | id: row.id, |
| | | type: 1, |
| | | }; |
| | | }, |
| | | uploadIdFun: (row) => { |
| | |
| | | }, |
| | | disabled: (row) => { |
| | | return row.isExamine != -9; |
| | | }, |
| | | showHide: () => { |
| | | return auth.hasPermi("business:reportPreparation:upload"); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | disabled: (row) => { |
| | | return row.isExamine != -9; |
| | | }, |
| | | showHide: () => { |
| | | return auth.hasPermi("business:reportPreparation:restore"); |
| | | }, |
| | | }, |
| | | { |
| | | name: "提交", |
| | |
| | | }, |
| | | disabled: (row) => { |
| | | return row.state != 0; |
| | | }, |
| | | showHide: () => { |
| | | return auth.hasPermi("business:reportPreparation:submit"); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | return ( |
| | | row.state == null || row.state == 0 || row.isExamine == 1 |
| | | ); |
| | | }, |
| | | showHide: () => { |
| | | return auth.hasPermi("business:reportPreparation:examine"); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | row.isRatify == 1 |
| | | ); |
| | | }, |
| | | showHide: () => { |
| | | return auth.hasPermi("business:reportPreparation:approve"); |
| | | }, |
| | | }, |
| | | { |
| | | name: "撤回", |
| | |
| | | }, |
| | | disabled: (row) => { |
| | | return row.state == 1; |
| | | }, |
| | | showHide: () => { |
| | | return auth.hasPermi("business:reportPreparation:withdraw"); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | let token = getToken(); |
| | | return { |
| | | token: sessionStorage.getItem("token"), |
| | | authorization: token, |
| | | }; |
| | | }, |
| | | action() { |
| | | return ""; |
| | | return this.javaApi + "/insReport/upAll"; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getAuthorizedPerson(); |
| | | this.handleResize(); |
| | | // 监听窗口大小改变事件 |
| | | window.addEventListener("resize", this.handleResize); |
| | | window.addEventListener("resize", this.handleResize); |
| | | }, |
| | | beforeDestroy() { |
| | | if (this.time != null) { |
| | |
| | | this.entityCopy = this.HaveJson(this.entity); |
| | | this.getList(); |
| | | this.getReportCountInfo(); |
| | | this.getTableHeight(); |
| | | window.addEventListener('resize', this.calculateTableHeight); // 监听窗口大小变化 |
| | | }, |
| | | beforeDestroy() { |
| | | window.removeEventListener('resize', this.calculateTableHeight); // 移除监听 |
| | | }, |
| | | watch: { |
| | | batchUploadDia(newVal) { |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 获取表格高度 |
| | | getTableHeight() { |
| | | const windowHeight = window.innerHeight; // 浏览器窗口高度 |
| | | this.tableHeight = windowHeight - 60 - 80 - 46 - 50 - 32 - 44 -30 - 30; |
| | | console.log('this.tableHeight',this.tableHeight); |
| | | }, |
| | | // 返回分页值 |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | |
| | | }, |
| | | // 撤回 弹框 |
| | | 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, |
| | |
| | | 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, |
| | |
| | | this.loadingApproveReason = true; |
| | | examineReport({ |
| | | id: this.currentInfo.id, |
| | | isRatify: 0, |
| | | ratifyTell: this.reason, |
| | | isExamine: 0, |
| | | examineTell: this.reason, |
| | | }) |
| | | .then((res) => { |
| | | this.loadingApproveReason = false; |