| | |
| | | <template> |
| | | <!-- 文件修订申请审批记录 --> |
| | | <div class="DocumentRevisionRequestApprovalRecords"> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">文件修订申请审批记录</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">新增</el-button> |
| | | <!-- <el-upload :action="action" :show-file-list="false" |
| | | accept='.doc,.docx' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="medium">导入</el-button></el-upload> --> |
| | | <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" |
| | | style="display:inline-block;margin-left: 20px;">导出</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <!-- <div class="search_thing"> |
| | | <div class="search_label">文件名称:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> --> |
| | | <div class="search_thing"> |
| | | <div class="search_label">文件编号:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请输入" clearable v-model="componentData.entity.documentCode" |
| | | <el-input size="small" placeholder="请输入" clearable v-model="queryParams.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button> |
| | | </div> |
| | | <div class="btn"> |
| | | <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> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.manageRecordAudit.pageManageRecordAudit" |
| | | :delUrl="$api.manageRecordAudit.delManageRecordAudit" :componentData="componentData" |
| | | :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" /> |
| | | <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 260px)'" @pagination="pagination"></lims-table> |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="800px" top="6vh"> |
| | | <el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '@/components/Table/value-table.vue' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { exportHtmlToPDF } from '@/utils/downHtmlToPDF' |
| | | import filePreview from '@/components/Preview/filePreview.vue' |
| | | import { |
| | | exportOutManageRecordAudit, |
| | | addManageRecordAudit, |
| | | doManageRecordAudit, |
| | | selectCNSAPersonTree, |
| | | ratifyManageRecordAudit, |
| | | pageManageRecordAudit, |
| | | delManageRecordAudit, |
| | | } from '@/api/cnas/systemManagement/documentRecords.js' |
| | | import { |
| | | pageManageDocumentList, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/business/inspectionTask.js"; |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | filePreview |
| | | filePreview, |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | outLoading: false, |
| | | lookDialogVisible: false, |
| | | addLoading: false, |
| | | componentData: { |
| | | entity: { |
| | | // documentName: null, |
| | | documentCode: null, |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | // selectMethod: 'handleChangeTask', |
| | | do: [{ |
| | | id: 'handleLook', |
| | | font: '查看', |
| | | type: 'text', |
| | | method: 'handleLook' |
| | | }, { |
| | | id: 'handleLook0', |
| | | font: '文件预览', |
| | | type: 'text', |
| | | method: 'handleLook0' |
| | | }, { |
| | | id: 'handleOut', |
| | | font: '下载', |
| | | type: 'text', |
| | | method: 'handleOut' |
| | | }, { |
| | | id: 'delete', |
| | | font: '删除', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handleEdit', |
| | | font: '修改', |
| | | type: 'text', |
| | | method: 'handleEdit', |
| | | field: [], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handleRatify', |
| | | font: '批准', |
| | | type: 'text', |
| | | method: 'handleRatify', |
| | | field: [], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handlework0', |
| | | font: '申请意见', |
| | | type: 'text', |
| | | method: 'handlework0', |
| | | field: [], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handlework1', |
| | | font: '原定制意见', |
| | | type: 'text', |
| | | method: 'handlework1', |
| | | field: [], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handlework2', |
| | | font: '原审核意见', |
| | | type: 'text', |
| | | method: 'handlework2', |
| | | field: [], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }], |
| | | tagField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | selectField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | addUpload: ['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | datePicker: ['receiveDate'], |
| | | noHead: ['signedUserName', 'signedDate', 'departLims'],//不参与新增编辑的字段 |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | title: '新增', |
| | | addInfo: { |
| | | method: '修订', |
| | |
| | | file: null, |
| | | title0: '查看', |
| | | currentInfo: {}, |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "文件编号", prop: "documentCode" }, |
| | | { label: "章节号", prop: "capter", width: "120px" }, |
| | | { |
| | | label: "页码", |
| | | prop: "pages", |
| | | }, |
| | | { label: "修订次数", prop: "number" }, |
| | | { label: "修改前版本号", prop: "beforeVersion" }, |
| | | { label: "修改后版本号", prop: "afterVersion" }, |
| | | { label: "修改内容", prop: "alterThing" }, |
| | | { label: "修订人", prop: "alterUserName" }, |
| | | { label: "批准人", prop: "ratifyUserName" }, |
| | | { label: "日期", prop: "date" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "操作", |
| | | operation: [ |
| | | { |
| | | name: "查看", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "文件预览", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook0(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "下载", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleOut(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "删除", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "编辑", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleEdit(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "批准", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleRatify(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "申请意见", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handlework0(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "原定制意见", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handlework1(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | { |
| | | name: "原审核意见", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handlework2(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.ratifyUser |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getPower() |
| | | this.getList() |
| | | this.getFileList() |
| | | this.getAuthorizedPerson() |
| | | this.selectTreeList() |
| | |
| | | // 导出 |
| | | handleDown() { |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.manageRecordAudit.exportOutManageRecordAudit, { entity: this.componentData.entity }, { headers: { 'Content-Type': 'application/json' } }).then(res => { |
| | | exportOutManageRecordAudit(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导出失败') |
| | | this.$message.success('导出成功') |
| | | let url = this.javaApi + 'word/' + res.message |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '文件修订表'; |
| | | link.click(); |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, "文件修订表"); |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.refreshTable()() |
| | | getList() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams, ...this.page }; |
| | | delete param.total; |
| | | pageManageRecordAudit({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | this.refreshTable() |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | // 获取文件列表--文件清单 |
| | | getFileList() { |
| | | this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList, { |
| | | entity: { |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | page: { |
| | | current: -1, |
| | | size: -1 |
| | | } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | pageManageDocumentList({ |
| | | current: -1, |
| | | size: -1 |
| | | }).then(res => { |
| | | this.fileList = res.data.body.records.map(m => { |
| | | this.fileList = res.data.records.map(m => { |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | |
| | | fd.append(m, this.addInfo[m]) |
| | | } |
| | | this.addLoading = true |
| | | this.$axios.post(this.$api.manageRecordAudit.addManageRecordAudit, fd, { |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | addManageRecordAudit(fd).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | |
| | | } |
| | | } |
| | | this.addLoading = true |
| | | this.$axios.post(this.$api.manageRecordAudit.doManageRecordAudit, fd, { |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | doManageRecordAudit(fd).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.refreshTable() |
| | |
| | | } |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | |
| | | value: a.id |
| | | }) |
| | | }) |
| | | // this.componentData.tagField.receiveUserName.select = data |
| | | // this.componentData.selectField.receiveUserName.select = data |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | // 查询树形列表 |
| | | selectTreeList() { |
| | | this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => { |
| | | selectCNSAPersonTree().then((res) => { |
| | | this.list = res.data[0].children; |
| | | }); |
| | | }, |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | this.$axios |
| | | .post(this.$api.manageRecordAudit.ratifyManageRecordAudit, { id: row.id }) |
| | | .then(res => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('操作成功'); |
| | | this.refreshTable(); |
| | | }) |
| | | ratifyManageRecordAudit({ id: row.id }).then(res => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('操作成功'); |
| | | this.refreshTable(); |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error('操作失败'); |
| | | }); |
| | |
| | | handleLook0(row) { |
| | | this.currentInfo = row; |
| | | this.lookDialogVisible = true |
| | | } |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("是否删除该条数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | delManageRecordAudit({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | }); |
| | | }) |
| | | .catch(() => { }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | padding-top: 0; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | border-collapse: collapse; |
| | | } |
| | | |
| | | .tables td { |
| | |
| | | >>>.el-dialog__body { |
| | | height: auto; |
| | | } |
| | | |
| | | .btn { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 16px; |
| | | } |
| | | </style> |