xiangpei
2024-03-19 5309f0aae4dc789cee92a8d7de4985c22d6ce259
src/views/system/check-result/index.vue
@@ -93,7 +93,11 @@
      <div class="text item">考核范围<span class="time">{{ item.examineRange }}</span></div>
      <div class="text item">考核频率<span class="time">{{ item.frequency }}</span></div>
      <div class="text item">考核分数<span class="time">{{ item.checkScore }}</span></div>
      <div class="text item">考核时间<span class="time">{{ item.checkTime }}</span></div>
      <div class="text item">考核时间
        <span class="time">{{ item.checkTime }}</span>
        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish != 1">确认发布</el-button>
        <el-button size="small" round style="float: right;" @click="handlePublish(item)" v-show="item.publish == 1">已发布</el-button>
      </div>
    </el-card>
    <!-- <el-table v-loading="loading" :data="checkResultList" @selection-change="handleSelectionChange">
@@ -194,6 +198,13 @@
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-medal"></i>
            车辆点位在线率
          </template>
          <el-tag type="danger" size="small">{{detail.carOnlineRate}}</el-tag>
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-medal"></i>
            综合分数
          </template>
          <el-tag type="danger" size="small">{{detail.systemScore}}</el-tag>
@@ -214,7 +225,7 @@
</template>
<script>
import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore } from "@/api/platform/check-result";
import { listCheckResult, getCheckResult, delCheckResult, addCheckResult, updateCheckResult,manualScore, publishCheckResult } from "@/api/platform/check-result";
export default {
  name: "CheckResult",
@@ -222,7 +233,9 @@
    return {
      detailTitle: '',
      detailOpen: false,
      detail: {},
      detail: {
      },
      manualScoreOpen: false,
      manualScoreForm: {},
      manualScoreTitle: '',
@@ -338,8 +351,20 @@
    },
    handleDetail(row) {
      this.detail = row;
      this.detail.carOnlineRate =  '97%';
      this.detailTitle = row.checkUnitName + '考核结果';
      this.detailOpen = true;
    },
    handlePublish(row) {
      let text = row.publish == 1 ? '取消发布' : '发布';
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认' + text + '考核结果编号为"' + ids + '"的数据项?').then(function() {
        return publishCheckResult(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess(text + "成功");
      }).catch(() => {});
    },
    /** 搜索按钮操作 */
@@ -437,4 +462,4 @@
  .box-card {
    width: 480px;
  }
</style>
</style>