| | |
| | | <span>{{filterRole(scope.row.roles)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="departName" label="所属部门" min-width="8"> |
| | | </el-table-column> --> |
| | | <el-table-column prop="jobTitle" label="所属职务" min-width="8"> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" min-width="10"> |
| | |
| | | }, |
| | | methods: { |
| | | async selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | this.preMyIdx = list; |
| | | if (list === 3) { |
| | |
| | | list.forEach(item => { |
| | | this.tempList.push(item.id); |
| | | }) |
| | | if (list.length === this.tableData.length) { |
| | | this.all = true; |
| | | } else { |
| | | this.all = false |
| | | } |
| | | this.all = list.length === this.tableData.length; |
| | | }, |
| | | // 批量删除用户信息 |
| | | mulDelte(idArr) { |
| | | console.log(idArr); |
| | | this.$confirm("您确定要进行批量删除用户吗?") |
| | | .then(_ => { |
| | | this.$axios({ |
| | |
| | | } |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | .catch(err => { }) |
| | | }, |
| | | // 批量修改账号 |
| | | mulUpdateStatus(idArr, flag) { |
| | | console.log(flag); |
| | | this.$confirm(flag === 1 ? "您确定要进行批量启用用户吗?" : '您确定要进行批量禁用用户吗?') |
| | | .then(_ => { |
| | | this.$axios({ |
| | |
| | | } |
| | | }) |
| | | }) |
| | | .catch(err => { console.log(err) }) |
| | | .catch(err => { }) |
| | | }, |
| | | changeTime({ createTime }) { |
| | | return helper(createTime); |
| | |
| | | this.dialogUpdate = true; |
| | | this.updateFlag = true; |
| | | for (let key in this.flag) { |
| | | if (key == mykey) { |
| | | if (key === mykey) { |
| | | this.flag[key] = true; |
| | | } else { |
| | | this.flag[key] = false; |
| | |
| | | // 修改用户状态 |
| | | handleChangeStatus(obj) { |
| | | let { id, status } = obj; |
| | | status == true ? status = 1 : status = 0; |
| | | status === true ? status = 1 : status = 0; |
| | | this.$axios.post(`sccg/admin/updateStatus/` + id + '?status=' + status).then(res => { |
| | | }) |
| | | }, |
| | |
| | | this.$axios.get(`sccg/admin/list?keyword=${search}¤t=${currentPage}&pageSize=${pageSize}`).then(res => { |
| | | if (res.code === 200) { |
| | | res.data.records.forEach(item => { |
| | | item.status == 1 ? item.status = true : item.status = false; |
| | | item.status === 1 ? item.status = true : item.status = false; |
| | | }) |
| | | that.totalNum = res.data.total; |
| | | that.tableData = res.data.records; |
| | |
| | | }, |
| | | // 设置表格斑马纹 |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if ((rowIndex + 1) % 2 == 0) { |
| | | if ((rowIndex + 1) % 2 === 0) { |
| | | return 'warning-row'; |
| | | } else { |
| | | return 'success-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | // 处理用户所属角色 |
| | | filterRole(arr){ |
| | |
| | | watch: { |
| | | refresh: { |
| | | handler(newValue, oldValue) { |
| | | if (newValue == true) { |
| | | if (newValue) { |
| | | this.search = ''; |
| | | if (this.keyword != '') { |
| | | if (this.keyword !== '') { |
| | | this.search = this.keyword; |
| | | } |
| | | this.currentPage = 1; |
| | |
| | | <style lang="scss" scoped> |
| | | .mainContent { |
| | | display: flex; |
| | | justify-content: start; |
| | | justify-content: flex-start; |
| | | flex-wrap: nowrap; |
| | | |
| | | .grid-content { |