10dec12ec0
用户端 frontend-vue: - jd-publish-shop.ts:shopLabel 只出店名(缺名兜底「店铺 N」),跨店/多店琥珀文案压成一两句,判据逻辑零改动 - JdPublishTab:删工具头/分类解释/品牌句后半,默认店铺/选品/collect-hint/中断回执/加价规则各压一句 - JdCollectTab:删工具头 desc、分类机制句、断点游标行,「页面筛选未生效兜底翻页中」从任务卡撤下 - jd-on-shelf 空态一句、JdConsolePage hero-sub 整段删(含过时的「正在建设中」) - 品牌 10 个 tab:输入/筛选/加载长句压一句或删,任务卡删「结果ID/店铺ID/平台」技术行(店名已显形) - 保留:错误出口、额度「当前在架X/Y」、GROUPS_EMPTY 空态动作句、检测按钮与店铺显形 后管 admin-frontend-vue: - 每页顶部「当前页面操作提示」条整条下线(删 OperationGuide.vue+operation-guides.ts) - 撞款/任务中心/关键词用量/密钥用量/客户端包/教程/软件版本/数字人/菜单/店铺密钥/登录页逐页删说明小字(保留:踢线警示、「留空=永不过期」、「不要带v前缀」、「仅支持.zip」、草稿需手动发布、已授权人数、安全提示) - 编辑/建号弹窗 label 括号收短;代理弹窗/设备日志(删 pywebview/kk-browser 进程名)/密钥 pill title/授权弹窗 dim/品牌门控空态收短 测试同步(16 支改反钉或同步断言,全部当场绿): - align-operation-guide 整份重写为反钉(组件与文案表不得回流) - source-pin 台账 task-center-board 条目手工点名 7/3/5→24/14/28:旧值是切分器把正则字面量内裸引号当字符串开关吞掉 18 支用例的误量(stripNonCode 不识别 regex literal),本次改写恰好移除该文件最后两处带引号正则后测出真值;真实用例数反而 25→24(删 1 支 guide 用例),非真实增长 门禁:后管 node --test 1965/1965+vitest 253/253+vue-tsc rc=0;用户端 node 1150/mount 149/vue-tsc rc=0;ops 快检 --fast overall=pass(后端9.5/后管8.8/客户端9.8/用户端9.6)。本窗不发版;app_client/jar/后端零改动。
634 lines
22 KiB
Vue
634 lines
22 KiB
Vue
<script setup lang="ts">
|
||
import BatchDeleteActions from '@/components/BatchDeleteActions.vue'
|
||
import BatchDeleteCheckbox from '@/components/BatchDeleteCheckbox.vue'
|
||
import { useRowSelection } from '@/utils/use-row-selection'
|
||
import { formatDateTime } from '@/utils/datetime'
|
||
/** 用户管理页 · 像素复刻旧版 admin.html panel-users(自绘:panel-box + 页头按钮 + 筛选 form-row + 旧式表格/分页 + 原生 confirm 删除)。
|
||
* script 逻辑沿用现有 Vue 实现;创建/编辑弹窗保留现有组件(含用户菜单权限树)。 */
|
||
import { computed, onMounted, reactive, ref, watch } from 'vue'
|
||
import { ElMessage } from 'element-plus'
|
||
import type { AdminUser } from '@/types/admin'
|
||
import { isCompanySuperAdminRole, roleLabel } from '@/types/admin'
|
||
import { useAdminSessionStore } from '@/stores/admin-session'
|
||
import { useCompanyTabStore } from '@/stores/company-tab'
|
||
import { usePlatformTabStore } from '@/stores/platform-tab'
|
||
import { deleteUser, fetchUserList, setUserDisabled } from '@/api/users'
|
||
import { fetchCompanies } from '@/api/companies'
|
||
import { createUserFilterState, toUserListParams, type UserFilterState } from './users-filter'
|
||
import { totalPageCount } from './user-pagination'
|
||
import { deleteBlockReason, deleteConfirmMessage } from './user-delete-model'
|
||
import { disableBlockReason, disableConfirmMessage, disabledBadgeText } from './user-disable-model'
|
||
import { listPhaseOf, userListEmptyHint } from './user-list-state'
|
||
import { editableBy, quotaCellTextOf } from './user-edit-model'
|
||
import { formatExpiryCell } from './user-expiry'
|
||
import CreateUserDialog from './CreateUserDialog.vue'
|
||
import EditUserDialog from './EditUserDialog.vue'
|
||
import OldPagination from '@/components/OldPagination.vue'
|
||
import { showAdminFeedback } from '@/components/admin-feedback-ui'
|
||
import { openAdminConfirm } from '@/components/admin-confirm'
|
||
import { createLatestRequestGate } from '@/utils/latest-request'
|
||
|
||
const session = useAdminSessionStore()
|
||
const companyTab = useCompanyTabStore()
|
||
// 平台 tab(V206):账号域三页两 tab 共用本组件,列表/新建/编辑都按当前平台收放。
|
||
const platformTab = usePlatformTabStore()
|
||
/** 京东侧标记:上架上限列与编辑入口只在京东 tab 显示(用户口径「不需要在亚马逊那边」)。 */
|
||
const isJdSide = computed(() => platformTab.active === 'jd')
|
||
const loading = ref(false)
|
||
const loadError = ref('')
|
||
// 用户列表竞态门(S1-F4):快速切公司/翻页只让最后一次响应落地
|
||
const gate = createLatestRequestGate()
|
||
const rows = ref<AdminUser[]>([])
|
||
const total = ref(0)
|
||
/** 所属管理员候选(来自列表响应的 admins),供超管筛选下拉使用。 */
|
||
const admins = ref<Array<{ id: number; username: string }>>([])
|
||
/** 公司候选(仅供建号弹窗的「公司超级管理员」下拉使用,2026-10-05 唯一豁免)。 */
|
||
const companyOptions = ref<Array<{ id: number; companyName: string }>>([])
|
||
/** 操作者自己那家公司(会话里的 current-user.companyId):建号弹窗据此判断当前 tab 是不是自己家。
|
||
* 与 GroupEditorDialog 取的是同一个源——两处各取一份会靠约定对齐。 */
|
||
const operatorCompanyId = computed<number | null>(() => session.user?.companyId ?? null)
|
||
const filters = reactive<UserFilterState>(createUserFilterState())
|
||
const isSuperAdmin = computed(() => session.isSuperAdmin)
|
||
const operatorRole = computed(() => session.user?.role ?? null)
|
||
/**
|
||
* 额度写权(2026-11-24 客户口径「配额只有公司管理员才可以改」):站点超管或公司超管档;
|
||
* 管理员档(非超管档)的编辑弹窗不再渲染/下发「京东上架额度」——后端 403 硬闸早已在,这里收界面假象。
|
||
*/
|
||
const canWriteQuota = computed(() => isSuperAdmin.value || isCompanySuperAdminRole(operatorRole.value))
|
||
const currentUserId = computed(() => session.user?.id ?? null)
|
||
const statePhase = computed(() => listPhaseOf({ loading: loading.value, error: loadError.value, items: rows.value, total: total.value }))
|
||
const jumpPage = ref('')
|
||
const totalPages = computed(() => Math.max(1, totalPageCount(total.value, filters.pageSize)))
|
||
|
||
const createVisible = ref(false)
|
||
const editVisible = ref(false)
|
||
const editUser = ref<AdminUser | null>(null)
|
||
|
||
function openCreate(): void {
|
||
createVisible.value = true
|
||
}
|
||
|
||
function openEdit(row: AdminUser): void {
|
||
if (!editableBy(row.role, operatorRole.value)) return
|
||
editUser.value = row
|
||
editVisible.value = true
|
||
}
|
||
|
||
function editableOf(row: AdminUser): boolean {
|
||
return editableBy(row.role, operatorRole.value)
|
||
}
|
||
|
||
/** 上架上限列文案(仅京东侧渲染):null=旧数据未配('-'),0=按档「不限」/「未分配」,其余为具体条数。
|
||
* 2026-11-25 口径:普通账号的 0 是「未分配」(只作管理员分配账,不单独拦人),管理员档的 0 才是「不限」。
|
||
* 展示规则单出口在 user-edit-model(判据与界面读同一份)。 */
|
||
function quotaCellText(row: AdminUser): string {
|
||
return quotaCellTextOf(row)
|
||
}
|
||
|
||
/** 列表请求参数 = 用户填的筛选态 + 当前公司 + 当前平台。公司/平台值每次现取、不写进 filters:
|
||
* 它们由上方 tab 决定而不是用户填的筛选项,住进 filters 就等于多出第二个取值口径(Store 之外再长一个)。 */
|
||
function listParams() {
|
||
return { ...toUserListParams(filters), companyId: companyTab.requestCompanyId, platform: platformTab.active }
|
||
}
|
||
|
||
async function loadUsers() {
|
||
// S1-F4:快速切公司/翻页时旧响应可能后返回并覆盖新结果——回写前必须过竞态门
|
||
const token = gate.begin()
|
||
loading.value = true
|
||
loadError.value = ''
|
||
try {
|
||
const page = await fetchUserList(listParams())
|
||
if (!gate.isCurrent(token)) return
|
||
rows.value = page.items
|
||
total.value = page.total
|
||
if (Array.isArray(page.admins)) admins.value = page.admins
|
||
// 数据被删/筛选后总页数收缩:页码越界时回钳到末页并重新加载一次。
|
||
const last = totalPageCount(page.total, filters.pageSize)
|
||
if (last > 0 && filters.page > last) {
|
||
filters.page = last
|
||
const retried = await fetchUserList(listParams())
|
||
if (!gate.isCurrent(token)) return
|
||
rows.value = retried.items
|
||
total.value = retried.total
|
||
}
|
||
} catch (error) {
|
||
if (!gate.isCurrent(token)) return
|
||
loadError.value = error instanceof Error ? error.message : '用户列表加载失败'
|
||
showAdminFeedback(loadError.value, 'error')
|
||
} finally {
|
||
if (gate.isCurrent(token)) loading.value = false
|
||
}
|
||
}
|
||
|
||
/** 错误态重试:重新拉取当前筛选列表。 */
|
||
function retry() {
|
||
void loadUsers()
|
||
}
|
||
|
||
/** 提交新筛选条件:重置回第一页再查询。 */
|
||
function search() {
|
||
filters.page = 1
|
||
void loadUsers()
|
||
}
|
||
|
||
const batch = useRowSelection({
|
||
pageRows: () => rows.value,
|
||
rowId: (row) => row.id,
|
||
rowLabel: (row) => row.username,
|
||
deleteOne: (id) => deleteUser(id),
|
||
refresh: loadUsers,
|
||
blocked: () => loading.value || !!loadError.value,
|
||
scope: () => [companyTab.activeId, platformTab.active, currentUserId.value],
|
||
precheck: (row) => deleteBlockReason(row, currentUserId.value),
|
||
})
|
||
|
||
async function removeUser(row: AdminUser) {
|
||
if (batch.busy) return
|
||
const reason = deleteBlockReason(row, currentUserId.value)
|
||
if (reason) {
|
||
ElMessage.warning(reason)
|
||
return
|
||
}
|
||
// 对齐旧版:浏览器原生 confirm 确认后删除。
|
||
if (!(await openAdminConfirm({ message: deleteConfirmMessage(row), danger: true }))) return
|
||
try {
|
||
await deleteUser(row.id)
|
||
batch.removeFromSelection(row.id)
|
||
ElMessage.success('删除成功')
|
||
await loadUsers()
|
||
} catch (error) {
|
||
showAdminFeedback(error instanceof Error ? error.message : '删除失败', 'error')
|
||
}
|
||
}
|
||
|
||
/** 停用/解除停用:先过身份闸,原生 confirm 说出代价(对方会被强制退出到登录页)后提交。 */
|
||
async function toggleDisable(row: AdminUser) {
|
||
const wantDisable = !row.disabledAt
|
||
const reason = disableBlockReason(row, currentUserId.value)
|
||
if (reason) {
|
||
ElMessage.warning(reason)
|
||
return
|
||
}
|
||
if (!(await openAdminConfirm({ message: disableConfirmMessage(row, wantDisable), danger: false }))) return
|
||
try {
|
||
await setUserDisabled(row.id, wantDisable)
|
||
ElMessage.success(wantDisable ? '已停用,该账号会被强制退出到登录页' : '已解除停用')
|
||
await loadUsers()
|
||
} catch (error) {
|
||
showAdminFeedback(error instanceof Error ? error.message : '操作失败', 'error')
|
||
}
|
||
}
|
||
|
||
function changePage(page: number) {
|
||
filters.page = page
|
||
void loadUsers()
|
||
}
|
||
|
||
function changeSize(size: number) {
|
||
filters.pageSize = size
|
||
filters.page = 1
|
||
void loadUsers()
|
||
}
|
||
|
||
function goJump() {
|
||
const n = Number.parseInt(jumpPage.value, 10)
|
||
if (Number.isNaN(n)) {
|
||
ElMessage.warning('请输入页码')
|
||
return
|
||
}
|
||
changePage(Math.min(Math.max(n, 1), totalPages.value))
|
||
}
|
||
|
||
// 切公司 = 重新取数,并清掉两处上一家遗留:
|
||
// ①「所属管理员」下拉的候选(admins)随本公司的列表响应给出,上一家选中的 adminId 在新一家的下拉里不存在;
|
||
// ② 用户名全平台唯一(V143 的唯一索引),留着上一家填的关键字去筛新一家 ⇒ 必然空页,而输入框还显示着那个值。
|
||
watch(() => companyTab.activeId, () => { filters.createdByAdminId = null; filters.keyword = ''; filters.page = 1; void loadUsers() })
|
||
|
||
// 切平台 tab(V206)= 同样的重取数:列表按平台过滤,候选/关键字跨平台无意义,一并清掉;
|
||
// 建「公司超级管理员」的公司候选也按平台换一份(2026-11-17:京东 tab 下不能还选到亚马逊公司)。
|
||
watch(() => platformTab.active, () => {
|
||
filters.createdByAdminId = null
|
||
filters.keyword = ''
|
||
filters.page = 1
|
||
void loadUsers()
|
||
loadCompanyOptions()
|
||
})
|
||
|
||
// 公司目录仅站点超管拉取(建「公司超级管理员」时选公司用);非超管不发这个请求,后端 403 兜底。
|
||
// 按当前平台 tab 过滤(V206)——公司本身已按平台分侧,候选下拉跟着 tab 走。
|
||
function loadCompanyOptions() {
|
||
if (!isSuperAdmin.value) return
|
||
void fetchCompanies(platformTab.active)
|
||
.then((items) => {
|
||
companyOptions.value = items.map((c) => ({ id: c.id, companyName: c.companyName }))
|
||
})
|
||
.catch(() => {
|
||
companyOptions.value = []
|
||
})
|
||
}
|
||
|
||
onMounted(() => {
|
||
void loadUsers()
|
||
loadCompanyOptions()
|
||
})
|
||
</script>
|
||
|
||
<template>
|
||
<div class="users-view">
|
||
<section class="panel-box">
|
||
<div class="users-head">
|
||
<h3>用户列表</h3>
|
||
<button class="btn" type="button" @click="openCreate">新建用户</button>
|
||
</div>
|
||
<div class="form-row users-filter-row">
|
||
<div class="form-group" style="min-width: 180px">
|
||
<label>用户名</label>
|
||
<input v-model="filters.keyword" type="text" placeholder="输入用户名关键字" @keyup.enter="search" />
|
||
</div>
|
||
<div v-if="isSuperAdmin" class="form-group" style="min-width: 160px">
|
||
<label>所属管理员</label>
|
||
<el-select v-model="filters.createdByAdminId" class="admin-filter" filterable clearable placeholder="全部" @change="search">
|
||
<el-option v-for="admin in admins" :key="admin.id" :label="admin.username" :value="admin.id" />
|
||
</el-select>
|
||
</div>
|
||
<div class="form-group" style="min-width: 140px">
|
||
<label>角色</label>
|
||
<el-select v-model="filters.role" class="admin-filter" filterable clearable placeholder="全部角色" @change="search">
|
||
<el-option label="超级管理员" value="super_admin" />
|
||
<el-option label="公司超级管理员" value="company_super_admin" />
|
||
<el-option label="管理员" value="admin" />
|
||
<el-option label="普通账号" value="normal" />
|
||
</el-select>
|
||
</div>
|
||
<button class="btn" type="button" @click="search">查询</button>
|
||
<!-- 批量删除并入筛选行(2026-11-23 用户口径),margin-left:auto 右对齐,不再独占一行。 -->
|
||
<BatchDeleteActions :batch="batch" />
|
||
</div>
|
||
|
||
<div v-if="statePhase === 'error' && loadError" class="msg err">
|
||
<span>加载失败: {{ loadError }}</span>
|
||
<button class="btn btn-sm btn-secondary" type="button" @click="retry">重试</button>
|
||
</div>
|
||
|
||
<div class="table-scroll user-table-scroll">
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th class="batch-delete-cell" scope="col">
|
||
<BatchDeleteCheckbox label="全选当前页可删除记录" :checked="batch.pageAll" :partial="batch.pageSome"
|
||
:disabled="batch.disabled || batch.pageEmpty" @change="batch.togglePage" />
|
||
</th>
|
||
<th style="width: 70px">ID</th>
|
||
<th style="width: 180px">用户名</th>
|
||
<th style="width: 140px">角色</th>
|
||
<th style="width: 160px">所属管理员</th>
|
||
<th style="width: 160px">到期时间</th>
|
||
<th v-if="isJdSide" style="width: 110px">上架上限</th>
|
||
<th style="width: 90px">状态</th>
|
||
<th style="width: 180px">创建时间</th>
|
||
<th style="width: 180px">更新时间</th>
|
||
<th style="width: 160px">操作</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<template v-if="rows.length">
|
||
<tr v-for="row in rows" :key="row.id" :class="{ 'batch-selected': batch.isSelected(row) }">
|
||
<td class="batch-delete-cell">
|
||
<BatchDeleteCheckbox :label="batch.reason(row) || `选择 ${batch.label(row)}`" :checked="batch.isSelected(row)"
|
||
:disabled="batch.disabled || !!batch.reason(row)" @change="batch.toggle(row)" />
|
||
</td>
|
||
<td>{{ row.id }}</td>
|
||
<td>{{ row.username }}</td>
|
||
<td>{{ roleLabel(row.role) }}</td>
|
||
<td>{{ row.creatorUsername || '-' }}</td>
|
||
<td :class="{ 'expiry-cell-expired': formatExpiryCell(row).expired }">
|
||
{{ formatExpiryCell(row).text }}
|
||
</td>
|
||
<td v-if="isJdSide">{{ quotaCellText(row) }}</td>
|
||
<td class="status-cell" :class="{ 'status-cell-disabled': !!row.disabledAt }" :title="row.disabledAt ? `停用于 ${row.disabledAt}` : undefined">
|
||
{{ disabledBadgeText(row) }}
|
||
</td>
|
||
<td>{{ formatDateTime(row.createdAt) }}</td>
|
||
<td>{{ formatDateTime(row.updatedAt) }}</td>
|
||
<td class="ops-cell">
|
||
<button
|
||
class="btn btn-sm"
|
||
type="button"
|
||
:disabled="!editableOf(row)"
|
||
:title="!editableOf(row) ? '该账号不可编辑' : undefined"
|
||
@click="openEdit(row)"
|
||
>
|
||
编辑
|
||
</button>
|
||
<button
|
||
class="btn btn-sm btn-secondary"
|
||
type="button"
|
||
:disabled="disableBlockReason(row, currentUserId) !== undefined || !editableOf(row)"
|
||
:title="disableBlockReason(row, currentUserId) || (!editableOf(row) ? '该账号不可操作' : undefined)"
|
||
@click="toggleDisable(row)"
|
||
>
|
||
{{ row.disabledAt ? '解除停用' : '停用' }}
|
||
</button>
|
||
<button
|
||
class="btn btn-sm btn-danger"
|
||
type="button"
|
||
:disabled="batch.busy || deleteBlockReason(row, currentUserId) !== undefined"
|
||
:title="deleteBlockReason(row, currentUserId) || undefined"
|
||
@click="removeUser(row)"
|
||
>
|
||
删除
|
||
</button>
|
||
</td>
|
||
</tr>
|
||
</template>
|
||
<tr v-else-if="loading">
|
||
<td :colspan="isJdSide ? 11 : 10" class="empty-tip">加载中...</td>
|
||
</tr>
|
||
<tr v-else>
|
||
<td :colspan="isJdSide ? 11 : 10" class="empty-tip">{{ userListEmptyHint() }}</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<OldPagination :total="total" :page="filters.page" :page-size="filters.pageSize" @change="changePage" @size-change="changeSize" />
|
||
</section>
|
||
|
||
<CreateUserDialog
|
||
v-model="createVisible"
|
||
:operator-super="isSuperAdmin"
|
||
:operator-role="operatorRole"
|
||
:admin-options="admins"
|
||
:company-options="companyOptions"
|
||
:operator-company-id="operatorCompanyId"
|
||
:active-company-id="companyTab.requestCompanyId"
|
||
:platform="platformTab.active"
|
||
@created="loadUsers"
|
||
/>
|
||
<EditUserDialog v-model="editVisible" :user="editUser" :operator-super="isSuperAdmin" :operator-can-write-quota="canWriteQuota" :company-id="companyTab.requestCompanyId" :platform="platformTab.active" @updated="loadUsers" />
|
||
</div>
|
||
</template>
|
||
|
||
<style scoped>
|
||
/* 像素复刻旧版 admin.html panel-users(蓝白末层)。 */
|
||
.users-view {
|
||
font-family: inherit;
|
||
color: #24384d;
|
||
}
|
||
.panel-box {
|
||
width: 100%;
|
||
min-width: 0;
|
||
padding: 20px 22px 24px;
|
||
border: 1px solid #d8e3ee;
|
||
border-radius: 14px;
|
||
background: linear-gradient(145deg, #ffffff, #f9fbfd);
|
||
box-shadow: 0 1px 2px rgba(39, 67, 94, 0.04), 0 14px 30px -24px rgba(39, 67, 94, 0.28);
|
||
}
|
||
h3 {
|
||
margin: 0;
|
||
font-size: 15px;
|
||
font-weight: 650;
|
||
color: #24384d;
|
||
letter-spacing: 0.2px;
|
||
}
|
||
.users-head {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 12px;
|
||
}
|
||
.users-desc {
|
||
margin: 10px 0 16px;
|
||
font-size: 13px;
|
||
color: #5b6f83;
|
||
}
|
||
.form-row {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: flex-end;
|
||
gap: 14px 18px;
|
||
margin-bottom: 16px;
|
||
}
|
||
.form-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 7px;
|
||
margin-bottom: 0;
|
||
}
|
||
.form-group label {
|
||
color: #5b6f83;
|
||
font-size: 12.5px;
|
||
font-weight: 600;
|
||
}
|
||
.form-group input {
|
||
min-width: 0;
|
||
min-height: 42px;
|
||
padding: 8px 12px;
|
||
border: 1px solid #cbd9e6;
|
||
border-radius: 9px;
|
||
background: #f8fbfd;
|
||
color: #24384d;
|
||
font-size: 13.5px;
|
||
font-family: inherit;
|
||
color-scheme: light;
|
||
outline: none;
|
||
transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
|
||
}
|
||
.form-group input:hover {
|
||
border-color: #9fb7cd;
|
||
}
|
||
.form-group input:focus {
|
||
background: #ffffff;
|
||
border-color: #5f85ad;
|
||
box-shadow: 0 0 0 3px rgba(95, 133, 173, 0.16);
|
||
}
|
||
.btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 8px;
|
||
min-height: 42px;
|
||
padding: 9px 18px;
|
||
border: 1px solid #4f78a5;
|
||
border-radius: 9px;
|
||
background: linear-gradient(135deg, #5f85ad, #4f78a5);
|
||
color: #ffffff;
|
||
font-family: inherit;
|
||
font-size: 13.5px;
|
||
cursor: pointer;
|
||
box-shadow: 0 8px 18px -14px rgba(79, 120, 165, 0.72);
|
||
transition: background 160ms ease, box-shadow 160ms ease, transform 120ms ease;
|
||
}
|
||
.btn:hover:not(:disabled) {
|
||
background: linear-gradient(135deg, #7094ba, #5d83ac);
|
||
box-shadow: 0 11px 22px -14px rgba(79, 120, 165, 0.8);
|
||
}
|
||
.btn:disabled {
|
||
cursor: not-allowed;
|
||
opacity: 0.55;
|
||
}
|
||
.btn-secondary {
|
||
background: #ffffff;
|
||
color: #5b6f83;
|
||
border-color: #c7d7e5;
|
||
}
|
||
.btn-secondary:hover:not(:disabled) {
|
||
color: #2f5d8b;
|
||
border-color: #95b1cb;
|
||
background: #edf5fb;
|
||
}
|
||
.btn-danger {
|
||
background: linear-gradient(135deg, #c06d77, #b35f6a);
|
||
border-color: #b35f6a;
|
||
}
|
||
.btn-danger:hover:not(:disabled) {
|
||
background: linear-gradient(135deg, #cb7c84, #b96570);
|
||
}
|
||
.btn-sm {
|
||
min-height: 36px;
|
||
padding: 7px 12px;
|
||
}
|
||
.msg {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 12px;
|
||
margin-bottom: 14px;
|
||
padding: 10px 12px;
|
||
border: 1px solid;
|
||
border-radius: 9px;
|
||
font-size: 13px;
|
||
}
|
||
.msg.err {
|
||
color: #91474f;
|
||
background: #f8ebeb;
|
||
border-color: #e4c2c5;
|
||
}
|
||
.table-scroll {
|
||
width: 100%;
|
||
min-width: 0;
|
||
overflow-x: auto;
|
||
border: 1px solid #dbe5ee;
|
||
border-radius: 10px;
|
||
background: #ffffff;
|
||
}
|
||
.table-scroll table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
table-layout: fixed;
|
||
}
|
||
.user-table-scroll > table {
|
||
min-width: 1120px;
|
||
}
|
||
.table-scroll th,
|
||
.table-scroll td {
|
||
padding: 10px 12px;
|
||
text-align: left;
|
||
font-size: 13.5px;
|
||
line-height: 1.5;
|
||
border-bottom: 1px solid #e0e8ef;
|
||
vertical-align: middle;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
.table-scroll th {
|
||
background: #edf4fa;
|
||
color: #4e6479;
|
||
border-bottom-color: #d5e1eb;
|
||
font-size: 12.5px;
|
||
font-weight: 600;
|
||
letter-spacing: 0.4px;
|
||
}
|
||
.table-scroll tbody tr:hover td {
|
||
background: #f1f7fb;
|
||
}
|
||
.table-scroll tbody tr:last-child td {
|
||
border-bottom: 0;
|
||
}
|
||
.ops-cell {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
white-space: nowrap;
|
||
flex-wrap: wrap;
|
||
}
|
||
.expiry-cell-expired {
|
||
color: #c0392b;
|
||
font-weight: 600;
|
||
}
|
||
.status-cell {
|
||
color: #3d7158;
|
||
}
|
||
.status-cell-disabled {
|
||
color: #91474f;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.empty-tip {
|
||
padding: 44px 24px;
|
||
text-align: center;
|
||
color: #8293a5;
|
||
font-size: 13.5px;
|
||
}
|
||
.pagination {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
gap: 10px;
|
||
margin-top: 18px;
|
||
color: #5b6f83;
|
||
font-size: 13px;
|
||
}
|
||
.pagination button {
|
||
min-height: 30px;
|
||
padding: 4px 12px;
|
||
border: 1px solid #c7d7e5;
|
||
border-radius: 8px;
|
||
background: #ffffff;
|
||
color: #5b6f83;
|
||
font-family: inherit;
|
||
font-size: 13px;
|
||
cursor: pointer;
|
||
}
|
||
.pagination button:hover:not(:disabled) {
|
||
background: #edf5fb;
|
||
border-color: #95b1cb;
|
||
color: #2f5d8b;
|
||
}
|
||
.pagination button:disabled {
|
||
background: #eef3f7;
|
||
color: #9baaba;
|
||
cursor: not-allowed;
|
||
}
|
||
.page-size-select {
|
||
min-height: 30px;
|
||
padding: 3px 8px;
|
||
border: 1px solid #cbd9e6;
|
||
border-radius: 8px;
|
||
background: #f8fbfd;
|
||
color: #24384d;
|
||
font-size: 13px;
|
||
font-family: inherit;
|
||
}
|
||
.page-total {
|
||
margin-right: 4px;
|
||
}
|
||
.page-jump {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
}
|
||
.page-jump input {
|
||
width: 56px;
|
||
min-height: 30px;
|
||
padding: 4px 8px;
|
||
border: 1px solid #cbd9e6;
|
||
border-radius: 8px;
|
||
background: #f8fbfd;
|
||
color: #24384d;
|
||
font-size: 13px;
|
||
font-family: inherit;
|
||
}
|
||
</style>
|