| | |
| | | </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="'calc(100vh - 290px)'" :tableLoading="tableLoading1"></lims-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="selectUserDia = false">取 消</el-button> |
| | |
| | | if (params == 0) { |
| | | return '启用' |
| | | } else { |
| | | return '' |
| | | return '停用' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | |
| | | 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) { |
| | |
| | | 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> |