| | |
| | | <el-table-column prop="mobile" label="联系方式" min-width="7"> |
| | | </el-table-column> |
| | | <el-table-column prop="note" label="所属角色" min-width="8"> |
| | | <template slot-scope="scope"> |
| | | <span>{{filterRole(scope.row.roles)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="departName" label="所属部门" min-width="8"> |
| | | </el-table-column> |
| | |
| | | }, |
| | | selectAll() { |
| | | this.$refs.multipleTable.toggleAllSelection(); |
| | | |
| | | }, |
| | | disSame(list) { |
| | | // console.log(this.$refs.multipleTable); |
| | | // const row = this.$refs.table.data |
| | | list.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row) |
| | | }) |
| | |
| | | this.getUserList(); |
| | | }, |
| | | handleClose(done) { |
| | | if (this.updateFlag) { |
| | | this.$confirm('确认关闭?') |
| | | .then(_ => { |
| | | this.dialogUpdate = false |
| | | this.dialogUpdate = false; |
| | | this.updateFlag = false; |
| | | done(); |
| | | }) |
| | | .catch(_ => { }); |
| | | }else{ |
| | | done(); |
| | | } |
| | | }, |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | |
| | | this.$axios.get(`sccg/admin/list?keyword=${search}¤t=${currentPage}&pageSize=${pageSize}`).then(res => { |
| | | if (res.code === 200) { |
| | | res.data.records.forEach(item => { |
| | | // item.createTime = helper(item.createTime); |
| | | item.status == 1 ? item.status = true : item.status = false; |
| | | }) |
| | | that.totalNum = res.data.pages * pageSize; |
| | | that.totalNum = res.data.total; |
| | | that.tableData = res.data.records; |
| | | this.renderFlag = true; |
| | | } |
| | |
| | | } |
| | | return ''; |
| | | }, |
| | | // 处理用户所属角色 |
| | | filterRole(arr){ |
| | | let str = ''; |
| | | if(arr.length === 0){ |
| | | return; |
| | | } |
| | | arr.forEach((item,index)=>{ |
| | | if(item!==null){ |
| | | if(index<arr.length-1){ |
| | | str+=item.name +','; |
| | | }else{ |
| | | str+=item.name; |
| | | } |
| | | } |
| | | }) |
| | | return str; |
| | | } |
| | | }, |
| | | props: ['refresh', 'keyword', 'resetFresh'], |
| | | watch: { |