| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result"; |
| | | import { getCalculateReports, getCalculateReportById, deleteCalculateReportByIds, addCalculateReport, editCalculateReport } from "@/api/platform/calculate-report"; |
| | | |
| | | export default { |
| | | name: "CheckResult", |
| | |
| | | this.queryParams["start"] = this.daterangeCheckTime[0]; |
| | | this.queryParams["end"] = this.daterangeCheckTime[1]; |
| | | } |
| | | listCheckResult(this.queryParams).then(response => { |
| | | getCalculateReports(this.queryParams).then(response => { |
| | | this.checkResultList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | |
| | | this.$modal.msgWarning("请填写分数"); |
| | | return |
| | | } |
| | | manualScore(this.manualScoreForm).then(res => { |
| | | this.$modal.msgSuccess("操作成功"); |
| | | this.cancelManualScore(); |
| | | this.getList(); |
| | | }) |
| | | // manualScore(this.manualScoreForm).then(res => { |
| | | // this.$modal.msgSuccess("操作成功"); |
| | | // this.cancelManualScore(); |
| | | // this.getList(); |
| | | // }) |
| | | }, |
| | | handleDetail(row) { |
| | | console.log("row", row) |
| | |
| | | let text = row.publish == 1 ? '取消发布' : '发布'; |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认' + text + '考核结果编号为"' + ids + '"的数据项?').then(function() { |
| | | return publishCheckResult(ids); |
| | | // return publishCheckResult(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess(text + "成功"); |
| | |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getCheckResult(id).then(response => { |
| | | getCalculateReportById(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改考核结果"; |
| | |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateCheckResult(this.form).then(response => { |
| | | editCalculateReport(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addCheckResult(this.form).then(response => { |
| | | addCalculateReport(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('是否确认删除考核结果编号为"' + ids + '"的数据项?').then(function() { |
| | | return delCheckResult(ids); |
| | | return deleteCalculateReportByIds(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |