diff --git a/src/components/TableActions/TableActions.vue b/src/components/TableActions/TableActions.vue new file mode 100644 index 0000000..9bd9b18 --- /dev/null +++ b/src/components/TableActions/TableActions.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/modules/openapi/CompanyAccountListView.vue b/src/modules/openapi/CompanyAccountListView.vue index 8d53eaf..586ac05 100644 --- a/src/modules/openapi/CompanyAccountListView.vue +++ b/src/modules/openapi/CompanyAccountListView.vue @@ -24,6 +24,7 @@ import { httpGet, httpPost } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' import DataTable from '@/components/DataTable/DataTable.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface CompanyAccount { id: string @@ -266,7 +267,7 @@ onMounted(() => { load(); loadCustomers() }) { prop: 'activitySummary', label: '动态摘要', width: 280 }, { prop: 'status', label: '状态', width: 100, slot: 'status' }, { prop: 'createDate', label: '创建时间', width: 170, slot: 'createDate' }, - { label: '操作', width: 280, slot: 'action' } + { label: '操作', width: 140, slot: 'action' } ]" :data="list" :borderless="true" :loading="loading" @@ -299,24 +300,14 @@ onMounted(() => { load(); loadCustomers() }) diff --git a/src/modules/openapi/OpenAppListView.vue b/src/modules/openapi/OpenAppListView.vue index 7fce5e0..dcca8f4 100644 --- a/src/modules/openapi/OpenAppListView.vue +++ b/src/modules/openapi/OpenAppListView.vue @@ -26,6 +26,7 @@ import { httpGet, httpPost } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' import DataTable from '@/components/DataTable/DataTable.vue' +import TableActions from '@/components/TableActions/TableActions.vue' import ApplyApiKeyDialog from './ApplyApiKeyDialog.vue' interface OpenApp { @@ -164,7 +165,7 @@ const columns = [ { prop: 'appId', label: 'AppID', minWidth: 220 }, { prop: 'status', label: '状态', width: 100, slot: 'status' as const }, { prop: 'createDate', label: '创建时间', width: 170, slot: 'createDate' as const }, - { label: '操作', width: 280, slot: 'action' as const } + { label: '操作', width: 140, slot: 'action' as const } ] function onSearch() { page.value = 1; load() } @@ -371,35 +372,16 @@ onMounted(() => { load(); loadCustomers() }) {{ fmtDate(row.createDate) }} diff --git a/src/modules/order/OrderListView.vue b/src/modules/order/OrderListView.vue index 6f5f716..6fe327f 100644 --- a/src/modules/order/OrderListView.vue +++ b/src/modules/order/OrderListView.vue @@ -23,6 +23,7 @@ import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' import ListTabs from '@/components/ListTabs/ListTabs.vue' import DataTable from '@/components/DataTable/DataTable.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface Order { id: string @@ -94,7 +95,7 @@ const columns: any = computed(() => [ { prop: 'shippedNum', label: '已发', width: 80, align: 'center' }, { prop: 'status', label: '状态', width: 110, align: 'center', slot: 'status' }, { prop: 'createDate', label: '下单时间', width: 170, slot: 'time' }, - { label: '操作', width: 280, align: 'center', slot: 'action' } + { label: '操作', width: 140, align: 'center', slot: 'action' } ]) const tabItems = computed(() => STATUS_TABS.map(t => ({ key: t.value, @@ -273,18 +274,18 @@ onMounted(load) @@ -293,19 +294,6 @@ onMounted(load) diff --git a/src/modules/other/categoryGood/CategoryGoodListView.vue b/src/modules/other/categoryGood/CategoryGoodListView.vue index cfbac19..59b5a30 100644 --- a/src/modules/other/categoryGood/CategoryGoodListView.vue +++ b/src/modules/other/categoryGood/CategoryGoodListView.vue @@ -17,6 +17,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { httpGet } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface Category { id: string @@ -184,11 +185,16 @@ onMounted(load) 下移 - + diff --git a/src/modules/other/label/LabelListView.vue b/src/modules/other/label/LabelListView.vue index 862a21c..bc6b98a 100644 --- a/src/modules/other/label/LabelListView.vue +++ b/src/modules/other/label/LabelListView.vue @@ -19,6 +19,7 @@ import { httpGet } from '@/utils/request' import DataTable from '@/components/DataTable/DataTable.vue' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface Label { id: string @@ -126,7 +127,7 @@ onMounted(load) { prop: 'name', label: '标签名称', minWidth: 200 }, { prop: 'createDate', label: '创建时间', width: 180 }, { prop: 'status', label: '状态', width: 100, slot: 'status' }, - { label: '操作', width: 240, align: 'center', slot: 'action' } + { label: '操作', width: 140, align: 'center', slot: 'action' } ]" :data="list" :loading="loading" @@ -147,11 +148,14 @@ onMounted(load) diff --git a/src/modules/supplier/coupon/CouponListView.vue b/src/modules/supplier/coupon/CouponListView.vue index b1cecdf..6cb8e8e 100644 --- a/src/modules/supplier/coupon/CouponListView.vue +++ b/src/modules/supplier/coupon/CouponListView.vue @@ -15,6 +15,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { httpGet } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface Coupon { id: string @@ -179,13 +180,17 @@ onMounted(load) - + diff --git a/src/modules/supplier/good/GoodListView.vue b/src/modules/supplier/good/GoodListView.vue index 52aa6f2..8d52dbe 100644 --- a/src/modules/supplier/good/GoodListView.vue +++ b/src/modules/supplier/good/GoodListView.vue @@ -6,7 +6,7 @@ * - 搜索: 商品名/供应商/分类/品牌 * - 状态 tab: 全部/待审核/已通过/已驳回/已下架 * - 表格列: 封面/商品/供应商/3级分类/品牌/单位/申请时间/铺货/审核意见/状态 - * - 操作: 详情/审核/下架/修改分类/删除 + * - 操作: 详情(常驻) + 审核/上下架/改分类/删除(收纳⋯) [W17.6 主次分离] * - 批量: 批量审核/批量驳回/批量下架/批量改分类/批量删除 * - 详情弹窗: 含 SKU 列表 (编码/组合/封面/原价/现价/秒杀价/拼团价/库存/最小购买) * - 审核弹窗: 通过/驳回 + 审核意见 @@ -21,6 +21,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import DataTable from '@/components/DataTable/DataTable.vue' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' +import TableActions from '@/components/TableActions/TableActions.vue' import ListTabs from '@/components/ListTabs/ListTabs.vue' import { httpGet, httpPost } from '@/utils/request' @@ -141,7 +142,7 @@ const columns = [ { prop: 'onShelf', label: '铺货', width: 100, align: 'center' as const, slot: 'onShelf' }, { prop: 'checkStatus', label: '状态', width: 100, align: 'center' as const, slot: 'checkStatus' }, { prop: 'createDate', label: '申请时间', width: 170 }, - { label: '操作', width: 240, align: 'center' as const, fixed: 'right' as const, slot: 'action' } + { label: '操作', width: 140, align: 'center' as const, fixed: 'right' as const, slot: 'action' } ] async function buildSearchParamsForStats() { @@ -389,21 +390,16 @@ onMounted(() => Promise.all([load(), loadStats()])) @@ -598,17 +594,4 @@ onMounted(() => Promise.all([load(), loadStats()])) .rr-good-title { font-size: 13.5px; color: var(--ink); } .rr-sku-title { font-size: 14px; font-weight: 600; color: var(--ink); margin: 24px 0 12px 0; } .rr-empty-tip { text-align: center; padding: 30px 0; color: var(--ink-3); } -.rr-actions { - display: inline-flex; - align-items: center; - gap: 0; - &__sep { - color: var(--rr-border-color, #E2E8F0); - margin: 0 6px; - font-size: 12px; - } - :deep(.el-link) { - font-size: 13px; - } -} diff --git a/src/modules/supplier/ordercomment/OrderCommentListView.vue b/src/modules/supplier/ordercomment/OrderCommentListView.vue index 909d55c..8909190 100644 --- a/src/modules/supplier/ordercomment/OrderCommentListView.vue +++ b/src/modules/supplier/ordercomment/OrderCommentListView.vue @@ -12,6 +12,7 @@ import { httpGet } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' import DataTable from '@/components/DataTable/DataTable.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface CommentRow { id:string; userId:string; parentId:string; goodType:number; skuDetailId:string; orderGoodId:string; supplierId:string; supplierGoodId:string; star:number; content:string; createTime:string } const ENDPOINTS = [ @@ -47,7 +48,7 @@ const columns: Col[] = [ { prop:'star', label:'评分', width:80, slot:'star' }, { prop:'content', label:'内容', width:280, slot:'content' }, { prop:'createTime', label:'时间', width:160, slot:'time' }, - { prop:'actions', label:'操作', width:200, slot:'actions', fixed:'right' } + { prop:'actions', label:'操作', width:140, slot:'actions', fixed:'right' } ] const STATUS_DEFAULTS = [ { value:'', label:'全部' }, @@ -109,9 +110,14 @@ onMounted(load) diff --git a/src/modules/supplier/promoter/PromoterListView.vue b/src/modules/supplier/promoter/PromoterListView.vue index e2943c8..8c8be83 100644 --- a/src/modules/supplier/promoter/PromoterListView.vue +++ b/src/modules/supplier/promoter/PromoterListView.vue @@ -12,6 +12,7 @@ import { httpGet } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' import DataTable from '@/components/DataTable/DataTable.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface PromoterRow { id:string; enterpriseId:string; enterpriseName:string; promoterName:string; promoterRadio:number; promoterGood:string; beginTime:string; endTime:string; createTime:string } const ENDPOINTS = [ @@ -45,7 +46,7 @@ const columns: Col[] = [ { prop:'beginTime', label:'开始时间', width:120, slot:'date1' }, { prop:'endTime', label:'结束时间', width:120, slot:'date2' }, { prop:'createTime', label:'创建时间', width:160, slot:'time' }, - { prop:'actions', label:'操作', width:200, slot:'actions', fixed:'right' } + { prop:'actions', label:'操作', width:140, slot:'actions', fixed:'right' } ] const STATUS_DEFAULTS = [ { value:'', label:'全部' }, @@ -103,9 +104,14 @@ onMounted(load) diff --git a/src/modules/supplier/servicegood/ServiceGoodListView.vue b/src/modules/supplier/servicegood/ServiceGoodListView.vue index d6a15a7..0b98690 100644 --- a/src/modules/supplier/servicegood/ServiceGoodListView.vue +++ b/src/modules/supplier/servicegood/ServiceGoodListView.vue @@ -17,6 +17,7 @@ import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' import ListTabs from '@/components/ListTabs/ListTabs.vue' import DataTable from '@/components/DataTable/DataTable.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface ServiceGood { id: string @@ -81,7 +82,7 @@ const columns = [ { prop: 'onShelf', label: '铺货', width: 100, align: 'center' as const, slot: 'onShelf' }, { prop: 'checkStatus', label: '状态', width: 100, align: 'center' as const, slot: 'checkStatus' }, { prop: 'createDate', label: '申请时间', width: 170 }, - { label: '操作', width: 280, align: 'center' as const, fixed: 'right' as const, slot: 'action' } + { label: '操作', width: 140, align: 'center' as const, fixed: 'right' as const, slot: 'action' } ] const tabItems = computed(() => [ @@ -256,19 +257,16 @@ onMounted(() => Promise.all([load(), loadStats()])) {{ CHECK_STATUS_MAP[row.checkStatus]?.label }} @@ -353,17 +351,4 @@ onMounted(() => Promise.all([load(), loadStats()])) .rr-good-cell { display: flex; align-items: center; gap: 10px; } .rr-good-icon-placeholder { width: 40px; height: 40px; border-radius: 4px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-weight: 600; flex-shrink: 0; } .rr-price { font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace; font-size: 13px; font-weight: 500; color: var(--primary); } -.rr-actions { - display: inline-flex; - align-items: center; - gap: 0; - &__sep { - color: var(--rr-border-color, #E2E8F0); - margin: 0 6px; - font-size: 12px; - } - :deep(.el-link) { - font-size: 13px; - } -} diff --git a/src/modules/sys/ScheduleListView.vue b/src/modules/sys/ScheduleListView.vue index 54c3f97..3d63f3e 100644 --- a/src/modules/sys/ScheduleListView.vue +++ b/src/modules/sys/ScheduleListView.vue @@ -13,6 +13,7 @@ import { httpGet, httpPost, httpPut, httpDelete } from '@/utils/request' import DataTable from '@/components/DataTable/DataTable.vue' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface Schedule { id: string @@ -148,7 +149,7 @@ onMounted(load) { prop: 'remark', label: '备注', minWidth: 200 }, { prop: 'status', label: '状态', width: 100, slot: 'status' }, { prop: 'createDate', label: '创建时间', width: 170, slot: 'createDate' }, - { label: '操作', width: 280, slot: 'action' } + { label: '操作', width: 140, slot: 'action' } ]" :data="list" :loading="loading" @@ -170,10 +171,15 @@ onMounted(load) diff --git a/src/modules/sys/UserListView.vue b/src/modules/sys/UserListView.vue index 8d367ff..e3fefe0 100644 --- a/src/modules/sys/UserListView.vue +++ b/src/modules/sys/UserListView.vue @@ -28,6 +28,7 @@ import { httpGet, httpPost, httpPut, httpDelete } from '@/utils/request' import DataTable from '@/components/DataTable/DataTable.vue' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface SysUser { id: string @@ -252,7 +253,7 @@ onMounted(() => { load() }) { prop: 'userType', label: '类型', width: 100, slot: 'userType' }, { prop: 'status', label: '状态', width: 80, slot: 'status' }, { prop: 'createDate', label: '创建时间', width: 170, slot: 'createDate' }, - { label: '操作', width: 260, slot: 'action' } + { label: '操作', width: 140, slot: 'action' } ]" :data="list" :borderless="true" :loading="loading" @@ -293,32 +294,14 @@ onMounted(() => { load() }) diff --git a/src/modules/sys/region/RegionListView.vue b/src/modules/sys/region/RegionListView.vue index fdb976f..0495fed 100644 --- a/src/modules/sys/region/RegionListView.vue +++ b/src/modules/sys/region/RegionListView.vue @@ -14,6 +14,7 @@ import { ref, onMounted, reactive } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { httpGet } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface Region { id: string @@ -138,11 +139,16 @@ onMounted(load) - + diff --git a/src/modules/user/UserListView.vue b/src/modules/user/UserListView.vue index 0720561..8a32e01 100644 --- a/src/modules/user/UserListView.vue +++ b/src/modules/user/UserListView.vue @@ -13,6 +13,7 @@ import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' import ListTabs from '@/components/ListTabs/ListTabs.vue' import UserFormDialog from './UserFormDialog.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface FrontUser { id: string @@ -87,7 +88,7 @@ const columns: any[] = [ width: 180, formatter: (row: FrontUser) => fmtDate(row.createDate) }, - { label: '操作', width: 220, slot: 'action', fixed: 'right' } + { label: '操作', width: 140, slot: 'action', fixed: 'right' } ] function fmtDate(ts: number | null | undefined) { @@ -340,15 +341,14 @@ onMounted(load) 禁用 @@ -356,17 +356,4 @@ onMounted(load) diff --git a/src/modules/user/enterpriselevel/EnterpriselevelListView.vue b/src/modules/user/enterpriselevel/EnterpriselevelListView.vue index fdb5ee2..ccd8d6c 100644 --- a/src/modules/user/enterpriselevel/EnterpriselevelListView.vue +++ b/src/modules/user/enterpriselevel/EnterpriselevelListView.vue @@ -12,6 +12,7 @@ import { httpGet } from '@/utils/request' import PageHeader from '@/components/PageHeader/PageHeader.vue' import SearchBar from '@/components/SearchBar/SearchBar.vue' import DataTable from '@/components/DataTable/DataTable.vue' +import TableActions from '@/components/TableActions/TableActions.vue' interface LevelRow { id:string; enterpriseLevel:string; scoreFrom:number; scoreTo:number; createTime:string } const ENDPOINTS = [ @@ -34,7 +35,7 @@ const columns: Col[] = [ { prop:'enterpriseLevel', label:'等级', width:140 }, { prop:'scoreFrom', label:'起始分', width:100 }, { prop:'scoreTo', label:'截止分', width:100 }, - { prop:'actions', label:'操作', width:200, slot:'actions', fixed:'right' } + { prop:'actions', label:'操作', width:140, slot:'actions', fixed:'right' } ] const STATUS_DEFAULTS = [ { value:'', label:'全部' } @@ -89,9 +90,14 @@ onMounted(load) :borderless="true" :loading="loading" :page="page" :limit="limit" :total="total" row-key="id" @page-change="(p: number) => { page = p; load() }" @limit-change="(l: number) => { limit = l; page = 1; load() }">