From 2bd38f3c07fa4ec63c5b5fd99bca19d2b1b4ee2d Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期二, 19 三月 2024 14:54:50 +0800
Subject: [PATCH] refactor
---
src/views/system/check-result/index.vue | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/views/system/check-result/index.vue b/src/views/system/check-result/index.vue
index b8ed730..34a1ad1 100644
--- a/src/views/system/check-result/index.vue
+++ b/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;" v-show="item.publish == 1" disabled="true">宸插彂甯�</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,19 @@
},
handleDetail(row) {
this.detail = row;
+ this.detail.carOnlineRate = '97%';
this.detailTitle = row.checkUnitName + '鑰冩牳缁撴灉';
this.detailOpen = true;
+
+ },
+ handlePublish(row) {
+ const ids = row.id || this.ids;
+ this.$modal.confirm('鏄惁纭鍙戝竷鑰冩牳缁撴灉缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() {
+ return publishCheckResult(ids);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍙戝竷鎴愬姛");
+ }).catch(() => {});
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -437,4 +461,4 @@
.box-card {
width: 480px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0