| | |
| | | <template> |
| | | <!-- 文件定期审查记录 --> |
| | | <div class="PeriodicDocumentReviewRecords"> |
| | | <div class="capacity-scope"> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;"> |
| | | <el-tab-pane label="填写" name="填写" style="height: 100%;"> |
| | | <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.documentName" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="文件名称" prop="documentName"> |
| | | <el-input size="small" placeholder="请输入" clearable |
| | | v-model="queryParams.documentName" @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <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" size="mini" @click="refreshTable">查询</el-button> |
| | | <el-button size="mini" @click="refresh">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <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> |
| | | <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="btns"> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openAdd" v-if="addPower">新增</el-button> |
| | | <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' |
| | | :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload' v-if="upPower" |
| | | :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | :headers="uploadHeader" :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="small">导入</el-button></el-upload> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="历史记录" name="历史记录" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">年:</div> |
| | | <div class="search_input"> |
| | | <div> |
| | | <el-form :model="queryParams0" ref="queryParams0" size="small" :inline="true"> |
| | | <el-form-item label="年" prop="year"> |
| | | <el-date-picker v-model="queryParams0.year" type="year" placeholder="选择年" format="yyyy" |
| | | value-format="yyyy" size="small" @change="refreshTable(1)"> |
| | | value-format="yyyy" size="small" @change="refreshTable(1)"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh(1)">重 置</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable(1)">查 询</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="mini" @click="refreshTable(1)">查询</el-button> |
| | | <el-button size="mini" @click="refresh(1)">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading" |
| | |
| | | pageManageDocumentList, |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | export default { |
| | | name: 'RegularReviewsRecord', |
| | | components: { |
| | | limsTable, |
| | | filePreview |
| | |
| | | lookDialogVisible: false, |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | componentData: { |
| | | entity: { |
| | | documentName: null, |
| | | documentCode: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | // selectMethod: 'handleChangeTask', |
| | | do: [{ |
| | | id: 'handleEdit', |
| | | font: '修改', |
| | | type: 'text', |
| | | method: 'handleEdit', |
| | | field: [], |
| | | }, { |
| | | id: 'delete', |
| | | font: '删除', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | }], |
| | | tagField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | selectField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | addUpload: ['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | datePicker: ['receiveDate'], |
| | | noHead: ['signedUserName', 'signedDate', 'departLims'],//不参与新增编辑的字段 |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | componentData0: { |
| | | entity: { |
| | | year: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleLook', |
| | | font: '查看', |
| | | type: 'text', |
| | | method: 'handleLook', |
| | | disabled: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, { |
| | | id: 'handleDown0', |
| | | font: '下载', |
| | | type: 'text', |
| | | method: 'handleDown0', |
| | | disabled: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | { |
| | | id: 'handleSubmit', |
| | | font: '提交', |
| | | type: 'text', |
| | | method: 'handleSubmit', |
| | | disabled: (row, index) => { |
| | | return !!row.submitUserName |
| | | } |
| | | }, { |
| | | id: 'handleApproval', |
| | | font: '批准', |
| | | type: 'text', |
| | | method: 'handleApproval', |
| | | disabled: (row, index) => { |
| | | return !row.submitUserName || !!row.ratifyUserName |
| | | } |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | entityCopy: {}, |
| | | entityCopy0: {}, |
| | | upIndex: 0, |
| | | addInfo: {}, |
| | | title: '新增', |
| | | addInfo: {}, |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | // this.entityCopy0 = this.HaveJson(this.componentData0.entity); |
| | | this.getList() |
| | | this.getList0() |
| | | this.getFileList() |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let submit = false |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordIntervals') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordIntervals') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordIntervals') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordIntervals') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'submitManageRecordIntervalsTotal') { |
| | | submit = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordIntervalsTotal') { |
| | | ratify = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData0.do.splice(3, 1) |
| | | } |
| | | if (!submit) { |
| | | this.componentData0.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | // 新增 |
| | | openAdd() { |
| | | // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle); |
| | | this.addInfo = {} |
| | | this.title = '新增' |
| | | this.addDialogVisible = true; |
| | |
| | | this.outLoading = true |
| | | exportOutManageRecordIntervals(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code == 201) return this.$message.error('导出失败') |
| | | let url = this.javaApi + 'word/' + res.message |
| | | this.$download.saveAs(url, "文件定期审查记录"); |
| | | this.$download.saveAs(res.message, "文件定期审查记录"); |
| | | }) |
| | | }, |
| | | getList() { |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('上传成功'); |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | } else { |
| | | this.$message.error('上传失败'); |
| | | } |
| | |
| | | if (this.title == '新增') { |
| | | addManageRecordIntervals(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } else { |
| | | doManageRecordIntervals(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | ratifyState: state |
| | | }).then(res => { |
| | | this.checkLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.noCheckLoading = false |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } |
| | | }, |
| | | handleDown0(row) { |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, "所有文件定期检查记录"); |
| | | this.$download.saveAs(row.url, "所有文件定期检查记录"); |
| | | }, |
| | | // 提交 |
| | | handleSubmit(row) { |
| | |
| | | submitManageRecordIntervalsTotal({ |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '提交成功!' |
| | |
| | | }) |
| | | .then(() => { |
| | | delManageRecordIntervals({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refreshTable(); |
| | | }); |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | height: 46px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .search_thing { |
| | |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | height: calc(100% - 60px - 140px); |
| | | padding: 20px; |
| | | padding-top: 0; |
| | | } |
| | | |
| | | >>>.el-tabs__content { |
| | | height: 100%; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | </style> |