style 表格样式调整

This commit is contained in:
bootx
2024-07-21 22:58:44 +08:00
parent ccb683050d
commit 88dfdc9e86
6 changed files with 257 additions and 244 deletions

View File

@@ -9,7 +9,7 @@ export default function <T>(queryPageCallback: CallableFunction) {
// 数据内容
const model = reactive({
pages: {
size: 10,
size: 15,
current: 1,
},
queryParam: {},

View File

@@ -16,93 +16,98 @@
>
</template>
</vxe-toolbar>
<vxe-table
row-id="id"
ref="xTable"
:cell-style="cellStyle"
:data="pagination.records"
:loading="loading"
:sort-config="{ remote: true, trigger: 'cell' }"
@sort-change="sortChange"
>
<vxe-column type="seq" title="序号" width="60" />
<vxe-column field="orderNo" title="订单号" :min-width="230">
<template #default="{ row }">
<a @click="show(row)">
{{ row.orderNo }}
</a>
</template>
</vxe-column>
<vxe-column field="title" title="标题" :min-width="230" />
<vxe-column field="channel" title="支付通道" :min-width="120">
<template #default="{ row }">
{{ dictConvert('PayChannel', row.channel) }}
</template>
</vxe-column>
<vxe-column field="bizOrderNo" title="商户订单号" :min-width="230" />
<vxe-column field="amount" title="金额(元)" :min-width="120" sortable>
<template #default="{ row }">
{{ row.amount }}
</template>
</vxe-column>
<vxe-column field="refundableBalance" title="可退余额(元)" :min-width="120" sortable>
<template #default="{ row }">
{{ row.refundableBalance }}
</template>
</vxe-column>
<vxe-column field="status" title="支付状态" :min-width="120">
<template #default="{ row }">{{ dictConvert('PayStatus', row.status) || '无' }}</template>
</vxe-column>
<vxe-column field="refundStatus" title="退款终态" :min-width="120">
<template #default="{ row }">{{
dictConvert('PayOrderRefundStatus', row.refundStatus) || '无'
}}</template>
</vxe-column>
<vxe-column field="allocation" title="分账" :min-width="160">
<template #default="{ row }">
<a-tag v-if="row.allocation" color="green">支持</a-tag>
<a-tag v-else color="red">不支持</a-tag>
</template>
</vxe-column>
<vxe-column field="allocStatus" title="分账状态" :min-width="160">
<template #default="{ row }">
{{ dictConvert('PayOrderAllocStatus', row.allocStatus) || '无' }}
</template>
</vxe-column>
<vxe-column field="createTime" title="创建时间" sortable :min-width="230" />
<vxe-column fixed="right" width="120" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="show(row)">查看</a-link>
<a-divider type="vertical" />
<a-dropdown>
<a>
更多
<icon icon="ant-design:down-outlined" :size="12" />
<div class="h-65vh">
<vxe-table
height="auto"
row-id="id"
ref="xTable"
:cell-style="cellStyle"
:data="pagination.records"
:loading="loading"
:sort-config="{ remote: true, trigger: 'cell' }"
@sort-change="sortChange"
>
<vxe-column type="seq" title="序号" width="60" />
<vxe-column field="orderNo" title="订单号" :min-width="230">
<template #default="{ row }">
<a @click="show(row)">
{{ row.orderNo }}
</a>
<template #overlay>
<a-menu>
<!-- <a-menu-item>-->
<!-- <a-link @click="sync(row)">同步</a-link>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item v-if="[payStatus.PROGRESS].includes(row.status)">-->
<!-- <a-link @click="closeOrder(row)" danger>关闭</a-link>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item-->
<!-- v-if="row.allocStatus === 'waiting' && payStatus.SUCCESS === row.status"-->
<!-- >-->
<!-- <a-link @click="allocation(row)">分账</a-link>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item-->
<!-- v-if="[payStatus.SUCCESS].includes(row.status) && row.refundableBalance > 0"-->
<!-- >-->
<!-- <a-link @click="refund(row)" danger>退款</a-link>-->
<!-- </a-menu-item>-->
</a-menu>
</template>
</a-dropdown>
</template>
</vxe-column>
</vxe-table>
</template>
</vxe-column>
<vxe-column field="title" title="标题" :min-width="230" />
<vxe-column field="channel" title="支付通道" :min-width="120">
<template #default="{ row }">
{{ dictConvert('PayChannel', row.channel) }}
</template>
</vxe-column>
<vxe-column field="bizOrderNo" title="商户订单号" :min-width="230" />
<vxe-column field="amount" title="金额(元)" :min-width="120" sortable>
<template #default="{ row }">
{{ row.amount }}
</template>
</vxe-column>
<vxe-column field="refundableBalance" title="可退余额(元)" :min-width="120" sortable>
<template #default="{ row }">
{{ row.refundableBalance }}
</template>
</vxe-column>
<vxe-column field="status" title="支付状态" :min-width="120">
<template #default="{ row }">{{
dictConvert('PayStatus', row.status) || '无'
}}</template>
</vxe-column>
<vxe-column field="refundStatus" title="退款终态" :min-width="120">
<template #default="{ row }">{{
dictConvert('PayOrderRefundStatus', row.refundStatus) || '无'
}}</template>
</vxe-column>
<vxe-column field="allocation" title="分账" :min-width="160">
<template #default="{ row }">
<a-tag v-if="row.allocation" color="green">支持</a-tag>
<a-tag v-else color="red">不支持</a-tag>
</template>
</vxe-column>
<vxe-column field="allocStatus" title="分账状态" :min-width="160">
<template #default="{ row }">
{{ dictConvert('PayOrderAllocStatus', row.allocStatus) || '无' }}
</template>
</vxe-column>
<vxe-column field="createTime" title="创建时间" sortable :min-width="230" />
<vxe-column fixed="right" width="120" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="show(row)">查看</a-link>
<a-divider type="vertical" />
<a-dropdown>
<a>
更多
<icon icon="ant-design:down-outlined" :size="12" />
</a>
<template #overlay>
<a-menu>
<!-- <a-menu-item>-->
<!-- <a-link @click="sync(row)">同步</a-link>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item v-if="[payStatus.PROGRESS].includes(row.status)">-->
<!-- <a-link @click="closeOrder(row)" danger>关闭</a-link>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item-->
<!-- v-if="row.allocStatus === 'waiting' && payStatus.SUCCESS === row.status"-->
<!-- >-->
<!-- <a-link @click="allocation(row)">分账</a-link>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item-->
<!-- v-if="[payStatus.SUCCESS].includes(row.status) && row.refundableBalance > 0"-->
<!-- >-->
<!-- <a-link @click="refund(row)" danger>退款</a-link>-->
<!-- </a-menu-item>-->
</a-menu>
</template>
</a-dropdown>
</template>
</vxe-column>
</vxe-table>
</div>
<vxe-pager
size="medium"
:loading="loading"
@@ -128,7 +133,7 @@
import { VxeTableInstance, VxeToolbarInstance, VxeTable, VxeToolbar } from 'vxe-table'
import ALink from '@/components/Link/Link.vue'
import { LabeledValue } from 'ant-design-vue/lib/select'
import {Icon} from "@/components/Icon";
import { Icon } from '@/components/Icon'
const payStatus = ref('')
// 使用hooks

View File

@@ -29,40 +29,42 @@
</a-space>
</template>
</vxe-toolbar>
<vxe-table
resizable
:height="650"
ref="xTable"
border="inner"
:stripe="false"
:loading="loading"
:tree-config="{ childrenField: 'children' }"
:data="tableData"
>
<vxe-column field="name" title="名称" tree-node />
<vxe-column field="code" title="权限码" />
<vxe-column title="操作" fixed="right" width="220" :showOverflow="false">
<template #default="{ row }">
<a href="javascript:" @click="show(row)">查看</a>
<a-divider type="vertical" />
<a href="javascript:" @click="edit(row)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a> 更多 <icon icon="ant-design:down-outlined" :size="12" /> </a>
<template #overlay>
<a-menu>
<a-menu-item v-if="!row.leaf">
<a-link @click="addChildren(row)">添加下级</a-link>
</a-menu-item>
<a-menu-item>
<a-link href="javascript:" danger>删除</a-link>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</template>
</vxe-column>
</vxe-table>
<div class="h-70vh">
<vxe-table
resizable
height="auto"
ref="xTable"
border="inner"
:stripe="false"
:loading="loading"
:tree-config="{ childrenField: 'children' }"
:data="tableData"
>
<vxe-column field="name" title="名称" tree-node />
<vxe-column field="code" title="权限码" />
<vxe-column title="操作" fixed="right" width="220" :showOverflow="false">
<template #default="{ row }">
<a href="javascript:" @click="show(row)">查看</a>
<a-divider type="vertical" />
<a href="javascript:" @click="edit(row)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a> 更多 <icon icon="ant-design:down-outlined" :size="12" /> </a>
<template #overlay>
<a-menu>
<a-menu-item v-if="!row.leaf">
<a-link @click="addChildren(row)">添加下级</a-link>
</a-menu-item>
<a-menu-item>
<a-link href="javascript:" danger>删除</a-link>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</template>
</vxe-column>
</vxe-table>
</div>
<PermCodeEdit ref="codeEdit" @ok="queryPage" />
</div>
</div>

View File

@@ -41,63 +41,65 @@
</a-space>
</template>
</vxe-toolbar>
<vxe-table
resizable
:height="650"
ref="xTable"
border="inner"
:stripe="false"
:loading="loading"
:tree-config="{ childrenField: 'children' }"
:data="tableData"
>
<vxe-column field="title" title="菜单名称" tree-node />
<vxe-column field="name" title="路由名称" />
<vxe-column field="path" title="请求路径" />
<vxe-column field="sortNo" title="排序" :visible="false" />
<vxe-column field="component" title="组件" />
<vxe-column field="icon" title="图标">
<template #default="{ row }">
<div v-if="row.icon">
<icon :icon="row.icon" />
</div>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="220" :showOverflow="false">
<template #default="{ row }">
<a href="javascript:" @click="show(row)">查看</a>
<template v-if="String(row.menuType) !== '2'">
<a-divider type="vertical" />
<a href="javascript:" v-if="!row.internal" @click="edit(row)">编辑</a>
<a href="javascript:" v-else disabled>编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a> 更多 <icon icon="ant-design:down-outlined" :size="12" /> </a>
<template #overlay>
<a-menu>
<a-menu-item>
<a @click="addChildren(row)">添加下级</a>
</a-menu-item>
<a-menu-item>
<a @click="copy(row.id)">复制</a>
</a-menu-item>
<a-menu-item>
<a
href="javascript:"
v-if="!row.internal"
@click="remove(row)"
style="color: red"
>删除</a
>
<a href="javascript:" v-else disabled>删除</a>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
<div class="h-70vh">
<vxe-table
resizable
height="auto"
ref="xTable"
border="inner"
:stripe="false"
:loading="loading"
:tree-config="{ childrenField: 'children' }"
:data="tableData"
>
<vxe-column field="title" title="菜单名称" tree-node />
<vxe-column field="name" title="路由名称" />
<vxe-column field="path" title="请求路径" />
<vxe-column field="sortNo" title="排序" :visible="false" />
<vxe-column field="component" title="组件" />
<vxe-column field="icon" title="图标">
<template #default="{ row }">
<div v-if="row.icon">
<icon :icon="row.icon" />
</div>
</template>
</template>
</vxe-column>
</vxe-table>
</vxe-column>
<vxe-column title="操作" fixed="right" width="220" :showOverflow="false">
<template #default="{ row }">
<a href="javascript:" @click="show(row)">查看</a>
<template v-if="String(row.menuType) !== '2'">
<a-divider type="vertical" />
<a href="javascript:" v-if="!row.internal" @click="edit(row)">编辑</a>
<a href="javascript:" v-else disabled>编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a> 更多 <icon icon="ant-design:down-outlined" :size="12" /> </a>
<template #overlay>
<a-menu>
<a-menu-item>
<a @click="addChildren(row)">添加下级</a>
</a-menu-item>
<a-menu-item>
<a @click="copy(row.id)">复制</a>
</a-menu-item>
<a-menu-item>
<a
href="javascript:"
v-if="!row.internal"
@click="remove(row)"
style="color: red"
>删除</a
>
<a href="javascript:" v-else disabled>删除</a>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</template>
</template>
</vxe-column>
</vxe-table>
</div>
<MenuEdit ref="menuEdit" @ok="queryPage" />
</div>
</div>

View File

@@ -41,28 +41,30 @@
</a-space>
</template>
</vxe-toolbar>
<vxe-table
resizable
:height="650"
ref="xTable"
border="inner"
:stripe="false"
:loading="loading"
:tree-config="{ childrenField: 'children' }"
:data="tableData"
>
<vxe-column field="name" title="名称" :min-width="200" tree-node />
<vxe-column field="path" title="请求路径" :min-width="500">
<template #default="{ row }">
{{ row.leaf ? `[${row.method}] ${row.path}` : '' }}
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" :width="100" :showOverflow="false">
<template #default="{ row }">
<a-link v-if="row.leaf" @click="show(row)">查看</a-link>
</template>
</vxe-column>
</vxe-table>
<div class="h-70vh">
<vxe-table
resizable
height="auto"
ref="xTable"
border="inner"
:stripe="false"
:loading="loading"
:tree-config="{ childrenField: 'children' }"
:data="tableData"
>
<vxe-column field="name" title="名称" :min-width="200" tree-node />
<vxe-column field="path" title="请求路径" :min-width="500">
<template #default="{ row }">
{{ row.leaf ? `[${row.method}] ${row.path}` : '' }}
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" :width="100" :showOverflow="false">
<template #default="{ row }">
<a-link v-if="row.leaf" @click="show(row)">查看</a-link>
</template>
</vxe-column>
</vxe-table>
</div>
</div>
<PermPathInfo ref="permPathInfo" />
</div>

View File

@@ -29,50 +29,52 @@
</a-space>
</template>
</vxe-toolbar>
<vxe-table
resizable
:height="650"
:stripe="false"
ref="xTable"
border="inner"
:loading="loading"
:tree-config="{ childrenField: 'children' }"
:data="tableData"
>
<vxe-column field="name" title="名称" :min-width="200" tree-node>
<template #default="{ row }">
<a-link @click="show(row)">{{ row.name }}</a-link>
</template>
</vxe-column>
<vxe-column field="code" title="编码" :min-width="150" />
<vxe-column field="remark" title="备注" :min-width="200" />
<vxe-column fixed="right" width="270" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="addChildren(row)">添加子角色</a-link>
<a-divider type="vertical" />
<a-link @click="edit(row)">编辑</a-link>
<a-divider type="vertical" />
<a-link danger @click="remove(row)">删除</a-link>
<a-divider type="vertical" />
<a-dropdown>
<a> 授权 <Icon icon="ant-design:down-outlined" :size="12" :min-width="280" /> </a>
<template #overlay>
<a-menu>
<a-menu-item>
<a-link @click="handleRoleMenu(row)">菜单权限</a-link>
</a-menu-item>
<a-menu-item>
<a-link @click="handleRolePath(row)">请求权限</a-link>
</a-menu-item>
<a-menu-item>
<a-link @click="handleRoleCode(row)">权限码</a-link>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</template>
</vxe-column>
</vxe-table>
<div class="h-70vh">
<vxe-table
resizable
height="auto"
:stripe="false"
ref="xTable"
border="inner"
:loading="loading"
:tree-config="{ childrenField: 'children' }"
:data="tableData"
>
<vxe-column field="name" title="名称" :min-width="200" tree-node>
<template #default="{ row }">
<a-link @click="show(row)">{{ row.name }}</a-link>
</template>
</vxe-column>
<vxe-column field="code" title="编码" :min-width="150" />
<vxe-column field="remark" title="备注" :min-width="200" />
<vxe-column fixed="right" width="270" :showOverflow="false" title="操作">
<template #default="{ row }">
<a-link @click="addChildren(row)">添加子角色</a-link>
<a-divider type="vertical" />
<a-link @click="edit(row)">编辑</a-link>
<a-divider type="vertical" />
<a-link danger @click="remove(row)">删除</a-link>
<a-divider type="vertical" />
<a-dropdown>
<a> 授权 <Icon icon="ant-design:down-outlined" :size="12" :min-width="280" /> </a>
<template #overlay>
<a-menu>
<a-menu-item>
<a-link @click="handleRoleMenu(row)">菜单权限</a-link>
</a-menu-item>
<a-menu-item>
<a-link @click="handleRolePath(row)">请求权限</a-link>
</a-menu-item>
<a-menu-item>
<a-link @click="handleRoleCode(row)">权限码</a-link>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</template>
</vxe-column>
</vxe-table>
</div>
<RoleEdit ref="roleEdit" @ok="queryPage" />
<RoleMenuModal ref="roleMenuModal" />
<RoleCodeModal ref="roleCodeModal" />