| | |
| | | |
| | | <el-table v-loading="listLoading" :data="tableData" stripe border fit highlight-current-row style="width: 100%"> |
| | | <el-table-column prop="name" label="部门"/> |
| | | <el-table-column prop="adminName" label="部门负责人"/> |
| | | <el-table-column prop="adminNames" label="部门负责人"/> |
| | | <!-- <el-table-column prop="levelName" label="部门" />--> |
| | | <el-table-column width="400px" label="操作" align="center"> |
| | | <template slot-scope="{row}"> |
| | |
| | | :visible.sync="dialogVisible" |
| | | width="400px" |
| | | :before-close="handleClose"> |
| | | <el-select v-model="updateAdminForm.adminId" @change="changSelect" filterable placeholder="选择管理员"> |
| | | <el-select v-model="updateAdminForm.adminIds" @change="changSelect" multiple filterable placeholder="选择管理员"> |
| | | <el-option |
| | | v-for="item in deptUserList" |
| | | :key="item.id" |
| | |
| | | title: '', |
| | | updateAdminForm: { |
| | | id: null, |
| | | adminId: null |
| | | adminIds: [] |
| | | }, |
| | | depart: [], |
| | | queryParam: { |
| | |
| | | this.title = '' |
| | | }, |
| | | submitUpdate () { |
| | | if (!this.updateAdminForm.adminId) { |
| | | if (!this.updateAdminForm.adminIds) { |
| | | this.$message.warning('请选择部门负责人') |
| | | return |
| | | } |
| | |
| | | }, |
| | | updateDeptAdmin (row) { |
| | | this.updateAdminForm.id = row.id |
| | | this.updateAdminForm.adminId = row.adminId |
| | | this.updateAdminForm.adminIds = row.adminIds |
| | | console.log(this.updateAdminForm.adminIds, "dd") |
| | | this.title = row.name + '--管理员修改' |
| | | this.getUserSelect(row.id) |
| | | this.dialogVisible = true |
| | |
| | | departmentApi.pageList(this.queryParam).then(data => { |
| | | const re = data.response |
| | | this.tableData = re.list |
| | | this.tableData.map(item => { |
| | | if (item.adminNames) { |
| | | item.adminNames = item.adminNames.join("、") |
| | | } |
| | | }) |
| | | this.total = re.total |
| | | this.queryParam.pageIndex = re.pageNum |
| | | this.listLoading = false |
| | | |
| | | this.depart = data.response.list |
| | | console.log(this.depart) |
| | | this.depart.map(item => { |
| | | item.key = item.id |
| | | item.value = item.name |