2026-03-17 20:30:04 +08:00
|
|
|
"use strict";(self["webpackChunkvue_antd_pro"]=self["webpackChunkvue_antd_pro"]||[]).push([[438],{89438:function(t,e,a){a.r(e),a.d(e,{default:function(){return v}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-manage-page",class:{"theme-dark":t.isDarkTheme}},[e("div",{staticClass:"page-header"},[e("h2",{staticClass:"page-title"},[e("a-icon",{attrs:{type:"team"}}),e("span",[t._v(t._s(t.$t("userManage.title")||"User Management"))])],1),e("p",{staticClass:"page-desc"},[t._v(t._s(t.$t("userManage.description")||"Manage system users, roles and permissions"))])]),e("a-tabs",{staticClass:"manage-tabs",on:{change:t.handleTabChange},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("a-tab-pane",{key:"users",attrs:{tab:t.$t("userManage.tabUsers")||"User Management"}},[e("div",{staticClass:"toolbar"},[e("div",{staticClass:"toolbar-left"},[e("a-button",{attrs:{type:"primary"},on:{click:t.showCreateModal}},[e("a-icon",{attrs:{type:"user-add"}}),t._v(" "+t._s(t.$t("userManage.createUser")||"Create User")+" ")],1),e("a-button",{on:{click:t.loadUsers}},[e("a-icon",{attrs:{type:"reload"}}),t._v(" "+t._s(t.$t("common.refresh")||"Refresh")+" ")],1)],1),e("div",{staticClass:"toolbar-right"},[e("a-input-search",{staticStyle:{width:"280px"},attrs:{placeholder:t.$t("userManage.searchPlaceholder")||"Search by username/email",allowClear:""},on:{search:t.handleSearch,pressEnter:t.handleSearch},model:{value:t.searchKeyword,callback:function(e){t.searchKeyword=e},expression:"searchKeyword"}})],1)]),e("a-card",{staticClass:"user-table-card",attrs:{bordered:!1}},[e("a-table",{attrs:{columns:t.columns,dataSource:t.users,loading:t.loading,pagination:t.pagination,rowKey:function(t){return t.id}},on:{change:t.handleTableChange},scopedSlots:t._u([{key:"status",fn:function(a){return[e("a-tag",{attrs:{color:"active"===a?"green":"red"}},[t._v(" "+t._s("active"===a?t.$t("userManage.active")||"Active":t.$t("userManage.disabled")||"Disabled")+" ")])]}},{key:"role",fn:function(a){return[e("a-tag",{attrs:{color:t.getRoleColor(a)}},[t._v(" "+t._s(t.getRoleLabel(a))+" ")])]}},{key:"last_login_at",fn:function(a){return[a?e("span",[t._v(t._s(t.formatTime(a)))]):e("span",{staticClass:"text-muted"},[t._v(t._s(t.$t("userManage.neverLogin")||"Never"))])]}},{key:"credits",fn:function(a){return[e("span",{staticClass:"credits-value"},[t._v(t._s(t.formatCredits(a)))])]}},{key:"vip_expires_at",fn:function(a){return[a&&t.isVipActive(a)?[e("a-tag",{attrs:{color:"gold"}},[e("a-icon",{attrs:{type:"crown"}}),t._v(" "+t._s(t.formatDate(a))+" ")],1)]:e("span",{staticClass:"text-muted"},[t._v("-")])]}},{key:"action",fn:function(a,s){return[e("a-space",[e("a-tooltip",{attrs:{title:t.$t("common.edit")||"Edit"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showEditModal(s)}}},[e("a-icon",{attrs:{type:"edit"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.adjustCredits")||"Adjust Credits"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showCreditsModal(s)}}},[e("a-icon",{staticStyle:{color:"#722ed1"},attrs:{type:"wallet"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.setVip")||"Set VIP"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showVipModal(s)}}},[e("a-icon",{staticStyle:{color:"#faad14"},attrs:{type:"crown"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("userManage.resetPassword")||"Reset Password"}},[e("a-button",{attrs:{type:"link",size:"small"},on:{click:function(e){return t.showResetPasswordModal(s)}}},[e("a-icon",{attrs:{type:"key"}})],1)],1),e("a-tooltip",{attrs:{title:t.$t("common.delete")||"Delete"}},[e("a-popconfirm",{attrs:{title:t.$t("userManage.confirmDelete")||"Are you sure to delete this user?"},on:{confirm:function(e){return t.handleDelete(s.id)}}},[e("a-button",{attrs:{type:"link",size:"small",disabled:s.id===t.currentUserId}},[e("a-icon",{staticStyle:{color:"#ff4d4f"},attrs:{type:"delete"}})],1)],1)],1)],1)]}}])})],1)],1),e("a-tab-pane",{key:"strategies",attrs:{tab:t.$t("systemOvervi
|