| | |
| | | initData() { |
| | | this.tableData = [] |
| | | getPageResults(this.page).then(res => { |
| | | if (res.code === 201) return; |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | }); |
| | |
| | | // 审批接口 |
| | | approvalApi(userId, status) { |
| | | dangerousRiskApproval({ approval: userId, status: status }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | // 批准接口 |
| | | approveApi(userId, status) { |
| | | hazardIdentificationAndRiskApproval({ approve: userId, status: status }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | }, |
| | | // 文件上传成功 |
| | | onSuccess(response) { |
| | | if (response.code == 201) { |
| | | if (response.code != 200) { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: response.message, |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | removeRiskFactors({ id: row.id }).then(res => { |
| | | if (res.code === 201) return; |
| | | this.initData() |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | addApi() { |
| | | this.loading = true |
| | | addNewRiskFactors(this.form).then(res => { |
| | | if (res.code === 201) return; |
| | | this.dialogVisible = false |
| | | this.loading = false |
| | | this.initData() |