mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 20:29:19 +08:00
feat(前端): 增加按钮级权限控制
This commit is contained in:
@@ -37,6 +37,7 @@ import {
|
||||
getOrderStatRebuildStatusApi,
|
||||
reconcileOrderStatApi,
|
||||
} from '#/api/sys/order-stat';
|
||||
import { PermissionGate } from '#/components/permission';
|
||||
import {
|
||||
SIDEBAR_LIST_SHELL_CLASS,
|
||||
sidebarListRowClass,
|
||||
@@ -505,14 +506,16 @@ onMounted(() => {
|
||||
/>
|
||||
</Form.Item>
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="rebuildSubmitting"
|
||||
@click="handleCreateRebuild"
|
||||
>
|
||||
<template #icon><PlayIcon /></template>
|
||||
创建灌数任务
|
||||
</Button>
|
||||
<PermissionGate code="bi:order-stat:calc:create">
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="rebuildSubmitting"
|
||||
@click="handleCreateRebuild"
|
||||
>
|
||||
<template #icon><PlayIcon /></template>
|
||||
创建灌数任务
|
||||
</Button>
|
||||
</PermissionGate>
|
||||
</Space>
|
||||
<div v-if="lastTaskId" class="mt-2 text-sm text-muted-foreground">
|
||||
最近任务 ID:<Tag color="blue">{{ lastTaskId }}</Tag>
|
||||
@@ -526,10 +529,12 @@ onMounted(() => {
|
||||
placeholder="任务 ID"
|
||||
style="width: 160px"
|
||||
/>
|
||||
<Button :loading="pollLoading" @click="fetchRebuildStatus()">
|
||||
<template #icon><RefreshIcon /></template>
|
||||
查询
|
||||
</Button>
|
||||
<PermissionGate code="bi:order-stat:calc:read">
|
||||
<Button :loading="pollLoading" @click="fetchRebuildStatus()">
|
||||
<template #icon><RefreshIcon /></template>
|
||||
查询
|
||||
</Button>
|
||||
</PermissionGate>
|
||||
<span class="text-sm text-muted-foreground">
|
||||
自动刷新(3s)
|
||||
<Switch v-model:checked="autoPoll" class="ml-2" size="small" />
|
||||
@@ -596,14 +601,16 @@ onMounted(() => {
|
||||
class="w-full"
|
||||
/>
|
||||
</Form.Item>
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="reconcileLoading"
|
||||
@click="handleReconcile"
|
||||
>
|
||||
<template #icon><SearchIcon /></template>
|
||||
执行对账
|
||||
</Button>
|
||||
<PermissionGate code="bi:order-stat:calc:read">
|
||||
<Button
|
||||
type="primary"
|
||||
:loading="reconcileLoading"
|
||||
@click="handleReconcile"
|
||||
>
|
||||
<template #icon><SearchIcon /></template>
|
||||
执行对账
|
||||
</Button>
|
||||
</PermissionGate>
|
||||
</Form>
|
||||
|
||||
<div v-if="reconcileReport" class="mt-4">
|
||||
|
||||
Reference in New Issue
Block a user