From a622aad2cc6b12ca2deff7a9d4e433270ec97064 Mon Sep 17 00:00:00 2001
From: xieb <vip_xiaobin810@163.com>
Date: Mon, 25 Dec 2023 10:25:46 +0800
Subject: [PATCH] 系统配置

---
 src/views/evaluate/evaluateTask.vue |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/views/evaluate/evaluateTask.vue b/src/views/evaluate/evaluateTask.vue
index 04b0bd6..7eb8338 100644
--- a/src/views/evaluate/evaluateTask.vue
+++ b/src/views/evaluate/evaluateTask.vue
@@ -13,10 +13,11 @@
         <el-button type="warning" plain icon="el-icon-download" @click="handleExport">导出</el-button>
       </template>
       <template #menu="{ size, row, index }">
+        <el-button type="primary" text plain icon="el-icon-view" @click="viewDateilDialog(row)">详情</el-button>
         <el-button type="primary" text plain icon="el-icon-edit" @click="editDialog(row)">编辑</el-button>
         <el-button type="primary" text plain icon="el-icon-position" @click="publicTimeBtn(row)"
-          v-if="row.status === 2">发布</el-button>
-        <!-- <el-button type="primary" v-if="row.type === 0" text plain icon="el-icon-plus" @click="addCandidateHandle(row)">新增候选人</el-button> -->
+          v-if="row.candidateState === 2">发布</el-button>
+        <el-button type="primary" v-if="row.type === 0 && row.candidateState === 2" text plain icon="el-icon-plus" @click="addCandidateHandle(row)">新增候选人</el-button>
         <el-button type="primary" text plain icon="el-icon-download">导出</el-button>
       </template>
     </avue-crud>
@@ -39,6 +40,8 @@
     <addDialog :params="addParams" @refreshTable="this.onLoad" />
     <!-- 新增候选人 -->
     <addCandidate :params="addCandidateParams" @refreshTable="this.onLoad" />
+    <!-- 预览弹窗 -->
+    <viewEvaluateDetail :params="viewEvaluateDetailParams" />
   </basic-container>
 </template>
 
@@ -54,12 +57,14 @@
 import 'nprogress/nprogress.css';
 import addDialog from './components/addDialog.vue';
 import addCandidate from './components/addCandidate.vue';
+import viewEvaluateDetail from './components/viewEvaluateDetail.vue';
 import { getDeptTree } from '@/api/system/dept';
 
 export default {
   components: {
     addDialog,
-    addCandidate
+    addCandidate,
+    viewEvaluateDetail
   },
   data() {
     return {
@@ -101,6 +106,8 @@
       },
       // 新增候选人params
       addCandidateParams: {},
+      // 信息预览弹窗
+      viewEvaluateDetailParams: {},
     };
   },
   watch: {
@@ -173,6 +180,12 @@
           ...row,
         },
       };
+    },
+    viewDateilDialog(row) {
+      this.viewEvaluateDetailParams = {
+        visible: true,
+        data: row
+      }
     },
     rowUpdate(row, index, done, loading) {
       update(row).then(
@@ -335,9 +348,11 @@
       const { id } = this.rowData;
       const params = {
         id,
+        // candidateState: 1,
+        evaluateState: 1,
         evaluateCutoffTime: this.publicForm.publicData,
       };
-      add(params).then(
+      update(params).then(
         res => {
           this.$message({
             type: 'success',

--
Gitblit v1.9.3