From 3f4115d10b4a5a7157ca3d0b27ba346c0391f560 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 19 三月 2024 14:28:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/system/check-result/index.vue |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/views/system/check-result/index.vue b/src/views/system/check-result/index.vue
index 3392f60..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">
@@ -221,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",
@@ -352,6 +356,16 @@
       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(() => {});
+
+    },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
       this.queryParams.pageNum = 1;

--
Gitblit v1.8.0