fuliqi
2024-04-24 1a0b6c69df8bafa8d9c612a5ea04a34be712001c
src/views/system/calculate/report/index.vue
@@ -171,7 +171,7 @@
</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",
@@ -262,7 +262,7 @@
        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;
@@ -299,11 +299,11 @@
        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)
@@ -317,7 +317,7 @@
      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 + "成功");
@@ -351,7 +351,7 @@
    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 = "修改考核结果";
@@ -363,13 +363,13 @@
      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();
@@ -382,7 +382,7 @@
    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("删除成功");