| | |
| | | <template> |
| | | <!-- 文件修订申请审批记录 --> |
| | | <div class="DocumentRevisionRequestApprovalRecords"> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">文件编号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="文件编号" prop="documentCode"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 询</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | <div class="btn"> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openAdd" v-if="addPower">新增</el-button> |
| | | <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" |
| | | style="display:inline-block;margin-left: 20px;">导出</el-button> |
| | | style="display:inline-block;margin-left: 20px;">导出</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | |
| | | selectUserCondition, |
| | | } from "@/api/business/inspectionTask.js"; |
| | | export default { |
| | | components: { |
| | | filePreview, |
| | | limsTable |
| | | }, |
| | | name: 'RevisionRecord', |
| | | components: {filePreview, limsTable}, |
| | | data() { |
| | | return { |
| | | addPower: true, |
| | |
| | | this.selectTreeList() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let out = false; |
| | | let ratify = false |
| | | let audit1 = false |
| | | let audit2 = false |
| | | let audit3 = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordAudit') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordAudit') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordAudit') { |
| | | ratify = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordAudit') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit1') { |
| | | audit1 = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit2') { |
| | | audit2 = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit3') { |
| | | audit3 = true |
| | | } |
| | | } |
| | | if (!audit3) { |
| | | this.componentData.do.splice(8, 1) |
| | | } |
| | | if (!audit2) { |
| | | this.componentData.do.splice(7, 1) |
| | | } |
| | | if (!audit1) { |
| | | this.componentData.do.splice(6, 1) |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(5, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | }, |
| | | openAdd() { |
| | | this.addInfo = { |
| | | method: '修订', |
| | | } |
| | | this.title = '新增' |
| | | this.file = null |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // 导出 |
| | |
| | | this.outLoading = true |
| | | exportOutManageRecordAudit(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导出失败') |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, "文件修订表"); |
| | | this.$download.saveAs(res.data, "文件修订表"); |
| | | }) |
| | | }, |
| | | getList() { |
| | |
| | | handleEdit(row) { |
| | | this.addInfo = row |
| | | this.title = '修改' |
| | | this.file = null |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // 审批 |
| | |
| | | }) |
| | | .then(() => { |
| | | ratifyManageRecordAudit({ id: row.id }).then(res => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('操作成功'); |
| | | this.refreshTable(); |
| | | }) |
| | |
| | | }) |
| | | .then(() => { |
| | | delManageRecordAudit({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | }); |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | height: 46px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search_thing { |
| | |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | padding-top: 0; |
| | | } |
| | | |
| | | .tables { |
| | |
| | | left: 0; |
| | | } |
| | | |
| | | >>>.el-dialog__body { |
| | | height: auto; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 16px; |
| | | } |
| | | </style> |