From e2d9978fe885d7855ad873d7f05cc98d00b4dcf0 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期二, 16 七月 2024 14:14:36 +0800
Subject: [PATCH] feat:默认选中当前部门

---
 src/views/exam/personalRandomTemplate/edit.vue |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/views/exam/personalRandomTemplate/edit.vue b/src/views/exam/personalRandomTemplate/edit.vue
index 7fc5262..7a0c84b 100644
--- a/src/views/exam/personalRandomTemplate/edit.vue
+++ b/src/views/exam/personalRandomTemplate/edit.vue
@@ -169,7 +169,7 @@
           <el-button type="primary" @click="selectStudent">鏌ヨ</el-button>
         </el-form-item>
       </el-form>
-      <el-button type="primary" @click="selectAllBoolean ? selectAll() : unselectAll()">{{ selectAllBoolean ? '鍏ㄩ��' : '鍙栨秷鍏ㄩ��' }}</el-button>
+      <el-button type="danger" @click="selectAllBoolean ? selectAll() : unselectAll()" size="small" style="margin-bottom: 3px">{{ selectAllBoolean ? '鍏ㄩ��' : '鍙栨秷鍏ㄩ��' }}</el-button>
       <el-table ref="multipleTable" v-loading="student.listLoading" :data="tableData" border fit highlight-current-row
         style="width: 100%" @selection-change="handleSelection" row-key="id">
         <el-table-column type="selection" :reserve-selection="true"></el-table-column>
@@ -239,6 +239,7 @@
       },
       subjectIdList: [],
       form: {
+        deptId: '',
         aggregateSource: '100',
         id: null,
         departmentIds: [],
@@ -309,6 +310,11 @@
     });
   },
   async mounted() {
+    departmentApi.getCurrentDeptId().then(res => {
+      if (res.response && res.response[0]) {
+        this.form.deptId = res.response[0];
+      }
+    });
 
     let id = this.$route.query.id;
     let _this = this;

--
Gitblit v1.8.0