| | |
| | | <DropdownItem name="reset">重置用户密码</DropdownItem> |
| | | <DropdownItem name="exportData">导出所选数据</DropdownItem> |
| | | <DropdownItem name="exportAll">导出全部数据</DropdownItem> |
| | | <DropdownItem name="importData">导入数据(付费)</DropdownItem> |
| | | <!--<DropdownItem name="importData">导入数据(付费)</DropdownItem>--> |
| | | </DropdownMenu> |
| | | </Dropdown> |
| | | <Button type="dashed" @click="openSearch = !openSearch">{{ |
| | | <Button typ e="dashed" @click="openSearch = !openSearch">{{ |
| | | openSearch ? "关闭搜索" : "开启搜索" |
| | | }}</Button> |
| | | <Button type="dashed" @click="openTip = !openTip">{{ |
| | |
| | | import excel from "@/libs/excel"; |
| | | import addEdit from "./addEdit.vue"; |
| | | import dict from "@/views/my-components/xboot/dict"; |
| | | import {getSessionStore} from "../../../libs/storage"; |
| | | export default { |
| | | name: "user-manage", |
| | | components: { |
| | |
| | | minWidth: 125, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | title: "邮箱", |
| | | key: "email", |
| | | minWidth: 180, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | title: "性别", |
| | | key: "sex", |
| | | width: 70, |
| | | align: "center", |
| | | }, |
| | | // { |
| | | // title: "邮箱", |
| | | // key: "email", |
| | | // minWidth: 180, |
| | | // sortable: true, |
| | | // }, |
| | | // { |
| | | // title: "性别", |
| | | // key: "sex", |
| | | // width: 70, |
| | | // align: "center", |
| | | // }, |
| | | { |
| | | title: "类型", |
| | | key: "type", |
| | |
| | | this.getDataList(); |
| | | }, |
| | | }, |
| | | { |
| | | title: "状态", |
| | | key: "status", |
| | | align: "center", |
| | | width: 100, |
| | | render: (h, params) => { |
| | | if (params.row.status == 0) { |
| | | return h("div", [ |
| | | h("Badge", { |
| | | props: { |
| | | status: "success", |
| | | text: "启用", |
| | | }, |
| | | }), |
| | | ]); |
| | | } else if (params.row.status == -1) { |
| | | return h("div", [ |
| | | h("Badge", { |
| | | props: { |
| | | status: "error", |
| | | text: "禁用", |
| | | }, |
| | | }), |
| | | ]); |
| | | } |
| | | }, |
| | | filters: [ |
| | | { |
| | | label: "启用", |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: "禁用", |
| | | value: -1, |
| | | }, |
| | | ], |
| | | filterMultiple: false, |
| | | filterRemote: (e) => { |
| | | let v = ""; |
| | | if (e.length > 0) { |
| | | v = e[0]; |
| | | } |
| | | this.searchForm.status = v; |
| | | this.searchForm.pageNumber = 1; |
| | | this.getDataList(); |
| | | }, |
| | | }, |
| | | { |
| | | title: "创建时间", |
| | | key: "createTime", |
| | | sortable: true, |
| | | sortType: "desc", |
| | | width: 180, |
| | | }, |
| | | // { |
| | | // title: "状态", |
| | | // key: "status", |
| | | // align: "center", |
| | | // width: 100, |
| | | // render: (h, params) => { |
| | | // if (params.row.status == 0) { |
| | | // return h("div", [ |
| | | // h("Badge", { |
| | | // props: { |
| | | // status: "success", |
| | | // text: "启用", |
| | | // }, |
| | | // }), |
| | | // ]); |
| | | // } else if (params.row.status == -1) { |
| | | // return h("div", [ |
| | | // h("Badge", { |
| | | // props: { |
| | | // status: "error", |
| | | // text: "禁用", |
| | | // }, |
| | | // }), |
| | | // ]); |
| | | // } |
| | | // }, |
| | | // filters: [ |
| | | // { |
| | | // label: "启用", |
| | | // value: 0, |
| | | // }, |
| | | // { |
| | | // label: "禁用", |
| | | // value: -1, |
| | | // }, |
| | | // ], |
| | | // filterMultiple: false, |
| | | // filterRemote: (e) => { |
| | | // let v = ""; |
| | | // if (e.length > 0) { |
| | | // v = e[0]; |
| | | // } |
| | | // this.searchForm.status = v; |
| | | // this.searchForm.pageNumber = 1; |
| | | // this.getDataList(); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // title: "创建时间", |
| | | // key: "createTime", |
| | | // sortable: true, |
| | | // sortType: "desc", |
| | | // width: 180, |
| | | // }, |
| | | { |
| | | title: "操作", |
| | | key: "action", |
| | |
| | | fixed: "right", |
| | | render: (h, params) => { |
| | | let enableOrDisable = ""; |
| | | if (params.row.status == 0) { |
| | | enableOrDisable = h( |
| | | "a", |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.disable(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "禁用" |
| | | ); |
| | | } else { |
| | | enableOrDisable = h( |
| | | "a", |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.enable(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "启用" |
| | | ); |
| | | } |
| | | // if (params.row.status == 0) { |
| | | // enableOrDisable = h( |
| | | // "a", |
| | | // { |
| | | // on: { |
| | | // click: () => { |
| | | // this.disable(params.row); |
| | | // }, |
| | | // }, |
| | | // }, |
| | | // "禁用" |
| | | // ); |
| | | // } else { |
| | | // enableOrDisable = h( |
| | | // "a", |
| | | // { |
| | | // on: { |
| | | // click: () => { |
| | | // this.enable(params.row); |
| | | // }, |
| | | // }, |
| | | // }, |
| | | // "启用" |
| | | // ); |
| | | // } |
| | | return h("div", [ |
| | | h( |
| | | "a", |
| | |
| | | this.init(); |
| | | }, |
| | | }; |
| | | </script> |
| | | </script> |