| | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import AddUserLevel from "@/views/unifiedManage/userLevel/components/AddUserLevel" |
| | | import { getListRole, getUserList, roleChange, deleteRole } from "@/api/unifiedManage/userLevel" |
| | | import { getListRole, getUserList, roleChange, deleteRole, getTotal } from "@/api/unifiedManage/userLevel" |
| | | export default { |
| | | name: "UserLevel", |
| | | props: { |
| | |
| | | this.getData() |
| | | }, |
| | | methods: { |
| | | // 数量统计 |
| | | overview() { |
| | | getTotal({ |
| | | useType: 1 |
| | | }).then((reply) => { |
| | | console.log(reply) |
| | | if (reply.code == 200) { |
| | | this.totalObject.value = reply.data.total |
| | | this.otherOptions.map((item) => { |
| | | if (item.label === "启用") { |
| | | item.value = reply.data.use |
| | | } else if (item.label === "停用") { |
| | | item.value = reply.data.ban |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 角色列表 |
| | | async getData(val) { |
| | | this.data.page = this.pagerOptions.currPage |
| | |
| | | this.getUserList(row.id) |
| | | } |
| | | if (val !== "search") { |
| | | // this.overview(); |
| | | this.overview() |
| | | } |
| | | }, |
| | | // 用户列表 |
| | |
| | | searchClick(val) { |
| | | this.data.keyword = val |
| | | this.pagerOptions.currPage = 1 |
| | | // this.getData(); |
| | | this.getData("search") |
| | | }, |
| | | // 停用 |
| | | changeStatusClick(row) { |