From e5454b769d44a34af423bf87ac8a740bf8c20341 Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期二, 29 四月 2025 13:25:29 +0800 Subject: [PATCH] Merge branch 'dev' into dev_tides --- src/views/CNAS/personnel/personnelInfo/components/Edit.vue | 71 ++++++++--------------------------- 1 files changed, 17 insertions(+), 54 deletions(-) diff --git a/src/views/CNAS/personnel/personnelInfo/components/Edit.vue b/src/views/CNAS/personnel/personnelInfo/components/Edit.vue index 639af6b..af8e822 100644 --- a/src/views/CNAS/personnel/personnelInfo/components/Edit.vue +++ b/src/views/CNAS/personnel/personnelInfo/components/Edit.vue @@ -28,7 +28,7 @@ <el-row style="margin: 15px 0"> <el-form> <el-row> - <el-col :span="5"> + <el-col :span="6"> <el-form-item label="鍩硅鏃ユ湡:"> <el-date-picker v-model="trainingForm.openingTime" format="yyyy-MM-dd" :disabled="currentRow.state !== 3" placeholder="閫夋嫨鏃ユ湡" size="small" value-format="yyyy-MM-dd" @@ -103,25 +103,23 @@ </el-table> </div> <el-dialog :visible.sync="selectUserDia" title="閫夋嫨鐢ㄦ埛" width="70%"> - <div class="search" style="margin-bottom: 9px;"> - <div class="search_thing"> - <div class="search_label">鐢ㄦ埛鍚嶏細</div> - <div class="search_input"> + <div> + <el-form :model="addUserTableInfo" ref="addUserTableInfo" size="small" :inline="true" label-position="left" label-width="100"> + <el-form-item label="鐢ㄦ埛鍚�" prop="name"> <el-input v-model="addUserTableInfo.name" clearable placeholder="璇疯緭鍏�" size="small" - @keyup.enter.native="selectUserList" + @input="selectUserList" ></el-input> - </div> - </div> + </el-form-item> + </el-form> </div> <div v-if="selectUserDia" class="body" style="height: 60vh;"> <lims-table :tableData="tableData1" :column="column1" :isSelection="true" :handleSelectionChange="selectMethod" - @pagination="pagination1" :height="'calc(100vh - 290px)'" - :page="page1" :tableLoading="tableLoading1"></lims-table> + height="500" :tableLoading="tableLoading1"></lims-table> </div> <span slot="footer" class="dialog-footer"> <el-button @click="selectUserDia = false">鍙� 娑�</el-button> @@ -139,7 +137,7 @@ import { newPersonnelAddedToTrainingRecords, outOfFocusPreservation, trainingAndAssessmentRecordsAdded, trainingAndAssessmentRecordsEvaluate, - trainingAndAssessmentRecordsPage + trainingAndAssessmentRecordsPage, deleteTrainingAndAssessmentRecords } from "@/api/cnas/personal/personalTraining"; export default { @@ -203,7 +201,7 @@ if (params == 0) { return '鍚敤' } else { - return '' + return '鍋滅敤' } }, formatType: (params) => { @@ -223,6 +221,7 @@ }, addUserTableInfo: { name: null, + type: 2 }, multipleSelection: [], userList: [], @@ -260,19 +259,16 @@ addPerson() { this.isSelectedList = this.trainingTableData.map(item => item.userId) this.selectUserDia = true; + this.selectUserList() }, selectUserList () { this.tableLoading1 = true selectUserCondition({...this.addUserTableInfo}).then(res => { - this.tableData1 = res.data.records - this.page1.total = res.data.total + this.tableLoading1 = false + this.tableData1 = res.data }).catch(err => { this.tableLoading1 = false }) - }, - pagination1 (page) { - this.page1.size = page.limit - this.selectUserList() }, // 琛ㄦ牸閫夋嫨鏂规硶 selectMethod(val) { @@ -305,15 +301,13 @@ }, batchDelete() { if (this.multipleSelection.length > 0) { - let ids = this.multipleSelection.map(item => item.trainingRecordId) + let ids = this.multipleSelection.map(item => item.trainingRecordId).join(',') this.$confirm('鏄惁纭鍒犻櫎鎵�閫夋嫨鐨勬暟鎹�?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - let formData = new FormData() - formData.append('ids', ids) - deleteTrainingAndAssessmentRecords(formData).then(res => { + deleteTrainingAndAssessmentRecords({ids: ids}).then(res => { if (res.code == 200) { this.$message.success('鍒犻櫎鎴愬姛'); this.getInfo() @@ -371,7 +365,7 @@ } }, getUserList(){ - selectUserCondition({ type: 0 }).then((res) => { + selectUserCondition({ type: 2 }).then((res) => { this.userList = res.data; }) }, @@ -407,32 +401,6 @@ margin-bottom: 10px; } -.el-divider { - margin: 0 1em 1em 0; -} - -.form__input_label { - width: 90px; - margin-right: 6px; - color: #606266; -} - -.form__input_label2 { - width: 210px; - margin-right: 6px; - color: #606266; -} -.search_thing { - display: flex; - align-items: center -} -.search_label { - width: 120px; -} -.pagination { - display: flex; - justify-content: space-between -} .items_center { float: left; @@ -444,10 +412,5 @@ width: 50%; float: right; margin-bottom: 1em; -} - -.search { - width: 180px; - padding: 0 16px; } </style> -- Gitblit v1.9.3