| | |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | }, |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let del = false |
| | | let add = false |
| | | // let check = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageDocumentControlled') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addManageDocumentControlled') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageDocumentControlled') { |
| | | del = true |
| | | } |
| | | // if (power[i].menuMethod == 'checkManageDocumentControlled') { |
| | | // check = true |
| | | // } |
| | | } |
| | | // if (!check) { |
| | | // this.componentData.do.splice(2, 1) |
| | | // } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | |
| | | handleUpdate(row) { |
| | | this.title = '文件变更申请' |
| | | this.addInfo = this.HaveJson(row) |
| | | this.file = null |
| | | this.addDialogVisible = true |
| | | }, |
| | | // 查看附件 |
| | |
| | | }, |
| | | handleDown(row) { |
| | | if (!row.url) return this.$message.warning('文件未上传') |
| | | let url = this.javaApi + '/word/' + row.url |
| | | this.$download.saveAs(url, row.url); |
| | | this.$download.saveAs(row.url, row.url); |
| | | }, |
| | | async uploadPDF(pdfBlob) { |
| | | const formData = new FormData(); |
| | |
| | | formData.append('state', this.type); // 文件名字段 |
| | | formData.append('writer', this.currentInfo.writer); // 文件名字段 |
| | | |
| | | let res = await checkManageDocumentControlled(formData) |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: '操作成功', type: 'success' }); |
| | | this.checkDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: '操作失败', type: 'error' }); |
| | | return false |
| | | try { |
| | | let res = await checkManageDocumentControlled(formData) |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: '操作成功', type: 'success' }); |
| | | this.checkDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: '操作失败', type: 'error' }); |
| | | return false |
| | | } |
| | | } catch (e) { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | } |
| | | |
| | | |
| | | }, |
| | | handleCheckSub(type) { |
| | | this.type = type |
| | |
| | | }) |
| | | .then(() => { |
| | | delManageDocumentControlled({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | }); |