From 1d4246ec700c86cb0c0630f63df2cf4f9bbe8fa2 Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Tue, 12 Dec 2023 17:48:49 +0800
Subject: [PATCH] 评优任务、考核任务页面修改

---
 src/views/evaluate/evaluateTask.vue |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/src/views/evaluate/evaluateTask.vue b/src/views/evaluate/evaluateTask.vue
index 1659fe8..d113676 100644
--- a/src/views/evaluate/evaluateTask.vue
+++ b/src/views/evaluate/evaluateTask.vue
@@ -20,7 +20,7 @@
         <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="dialogVisible = true">
+        <el-button type="primary" text plain icon="el-icon-position" @click="publicTimeBtn(row)">
           发布
         </el-button>
         <el-button type="primary" text plain icon="el-icon-download" @click="">
@@ -32,13 +32,14 @@
     <el-dialog v-model="dialogVisible" title="发布" width="500px">
       <el-form :model="publicForm">
         <el-form-item label="评优评先截止时间:">
-          <el-date-picker v-model="publicForm.publicData" type="datetime" placeholder="请选择截止时间" style="width: 100%;" />
+          <el-date-picker v-model="publicForm.publicData" type="datetime" placeholder="请选择截止时间"
+            value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;" />
         </el-form-item>
       </el-form>
       <template #footer>
         <span class="dialog-footer">
           <el-button @click="dialogVisible = false">取消</el-button>
-          <el-button type="primary" @click="dialogVisible = false">确认</el-button>
+          <el-button type="primary" @click="timeSubmit">确认</el-button>
         </span>
       </template>
     </el-dialog>
@@ -66,6 +67,7 @@
   },
   data() {
     return {
+      rowData: {},
       form: {},
       query: {},
       search: {},
@@ -289,6 +291,30 @@
         })
         return deptList
       });
+    },
+    publicTimeBtn(row) {
+      this.rowData = row
+      this.dialogVisible = true
+    },
+    timeSubmit() {
+      const { id } = this.rowData
+      const params = {
+        id,
+        evaluateCutoffTime: this.publicForm.publicData
+      }
+      add(params).then(res => {
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        this.refreshChange()
+      }, error => {
+        this.$message({
+          type: "success",
+          message: error
+        });
+      })
+      this.dialogVisible = false
     }
   }
 };

--
Gitblit v1.9.3