| | |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let del = false |
| | | let add = false |
| | | let out = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'doProcessEvaluate') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addProcessEvaluate') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delProcessEvaluate') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportProcessEvaluate') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.outPower = out |
| | | this.addPower = add |
| | | }, |
| | | handleDown0() { |
| | | this.outLoading = true |
| | | exportProcessEvaluate(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | if (res.code === 201) return |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, '测量不确定度的评定.xlsx'); |
| | | }) |
| | | }, |
| | | handleDown(row) { |
| | | let url = this.javaApi + '/word/' + row.reportUrl |
| | | this.$download.saveAs(url, row.reportName); |
| | | if (!row.reportUrl) { |
| | | this.$message.warning('暂无文件') |
| | | return |
| | | } |
| | | this.$download.saveAs(row.reportUrl, row.reportName); |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | |
| | | evaluateUser: this.userId |
| | | }).then((res) => { |
| | | this.addLoading = false; |
| | | if (res.code == 201) { |
| | | this.$message.error('评价失败'); |
| | | return; |
| | | } |
| | | this.$message.success('评价成功'); |
| | | this.addDialogVisible = false; |
| | | this.refreshTable() |
| | |
| | | }) |
| | | .then(() => { |
| | | delProcessEvaluate({ id: row.id }).then((res) => { |
| | | if (res.code == 201) return; |
| | | this.$message.success("删除成功"); |
| | | this.refresh(); |
| | | }); |