| | |
| | | } from '@/api/cnas/systemManagement/documentControl.js' |
| | | import { mapGetters } from "vuex"; |
| | | export default { |
| | | name: 'DistributionCollectionRecord', |
| | | components: { |
| | | limsTable |
| | | }, |
| | |
| | | // this.selectTreeList() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let edit = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordIssueRecycle') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordIssueRecycle') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordIssueRecycle') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'doManageRecordIssueRecycle') { |
| | | edit = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordIssueRecycle') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!add) { |
| | | this.componentData.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.outLoading = true |
| | | exportOutManageRecordIssueRecycle(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() { |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('上传成功'); |
| | | this.refreshTable()() |
| | | this.refreshTable() |
| | | } else { |
| | | this.$message.error('上传失败'); |
| | | } |
| | |
| | | if (this.title == '新增') { |
| | | addManageRecordIssueRecycle(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | } else { |
| | | doManageRecordIssueRecycle(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: this.userId } |
| | | doManageRecordIssueRecycle(obj).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | }) |
| | | .then(() => { |
| | | delManageRecordIssueRecycle({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | }); |