| | |
| | | <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" |
| | |
| | | </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> |
| | |
| | | import { |
| | | newPersonnelAddedToTrainingRecords, |
| | | outOfFocusPreservation, trainingAndAssessmentRecordsAdded, trainingAndAssessmentRecordsEvaluate, |
| | | trainingAndAssessmentRecordsPage |
| | | trainingAndAssessmentRecordsPage, deleteTrainingAndAssessmentRecords |
| | | } from "@/api/cnas/personal/personalTraining"; |
| | | |
| | | export default { |
| | |
| | | if (params == 0) { |
| | | return '启用' |
| | | } else { |
| | | return '' |
| | | return '停用' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | |
| | | }, |
| | | addUserTableInfo: { |
| | | name: null, |
| | | type: 2 |
| | | }, |
| | | multipleSelection: [], |
| | | userList: [], |
| | |
| | | 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) { |
| | |
| | | }, |
| | | 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() |
| | |
| | | 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; |
| | |
| | | width: 50%; |
| | | float: right; |
| | | margin-bottom: 1em; |
| | | } |
| | | |
| | | .search { |
| | | width: 180px; |
| | | padding: 0 16px; |
| | | } |
| | | </style> |