| | |
| | | <script> |
| | | import createUser from "./createUser" |
| | | import updateUser from "./updateUser" |
| | | import helper from "@/utils/mydate.js" |
| | | export default { |
| | | components: { |
| | | createUser, updateUser |
| | |
| | | this.all = false |
| | | } |
| | | }, |
| | | changeTime({ createTime }) { |
| | | return helper(createTime); |
| | | }, |
| | | selectAll() { |
| | | |
| | | this.$refs.multipleTable.toggleAllSelection(); |
| | |
| | | }) |
| | | .catch(_ => { }); |
| | | }, |
| | | // 修改用户状态 |
| | | // 修改状态 |
| | | handleChangeStatus(obj) { |
| | | let { id, status } = obj; |
| | | status == true ? status = 1 : status = 0; |
| | | console.log(id, status); |
| | | this.$axios.post(`sccg/depart/status`, { id: id, status: status }).then(res => { |
| | | if (res.code == 200) { |
| | | this.getUserList(); |
| | |
| | | this.$axios.get('sccg/depart/page').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; |
| | | item.status == 0 ? item.status = false : item.status = true; |
| | | }) |
| | | that.totalNum = res.data.records.length; |
| | | that.tableData = res.data.records.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize) |
| | |
| | | this.$axios.get('sccg/depart/page', { params: { currentPage: this.currentPage, pageSize: this.pageSize, departName: this.context } }).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.records.length; |