修改订单管理
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 2m28s

This commit is contained in:
sexygoat
2026-02-28 16:49:28 +08:00
parent ce1032c7f9
commit 7b459b5c8d
6 changed files with 219 additions and 21 deletions

View File

@@ -36,11 +36,18 @@
@refresh="handleRefresh"
>
<template #left>
<ElButton type="primary" @click="showAllocateDialog">授权卡</ElButton>
<ElButton
type="primary"
@click="showAllocateDialog"
v-permission="'enterprise_cards:allocate'"
>
授权卡
</ElButton>
<ElButton
type="warning"
:disabled="selectedCards.length === 0"
@click="showRecallDialog"
v-permission="'enterprise_cards:batch_recall'"
>
批量回收
</ElButton>
@@ -215,6 +222,7 @@
import type { FormInstance, FormRules } from 'element-plus'
import type { SearchFormItem } from '@/types'
import { useCheckedColumns } from '@/composables/useCheckedColumns'
import { useAuth } from '@/composables/useAuth'
import { formatDateTime } from '@/utils/business/format'
import ArtButtonTable from '@/components/core/forms/ArtButtonTable.vue'
import { BgColorEnum } from '@/enums/appEnum'
@@ -228,6 +236,8 @@
defineOptions({ name: 'EnterpriseCards' })
const { hasAuth } = useAuth()
const route = useRoute()
const router = useRouter()
const loading = ref(false)
@@ -537,19 +547,33 @@
width: 100,
fixed: 'right',
formatter: (row: EnterpriseCardItem) => {
return h('div', { style: 'display: flex; gap: 8px;' }, [
row.network_status === 0
? h(ArtButtonTable, {
const buttons = []
if (row.network_status === 0) {
// 停机状态,显示复机按钮
if (hasAuth('enterprise_cards:resume')) {
buttons.push(
h(ArtButtonTable, {
text: '复机',
iconClass: BgColorEnum.SUCCESS,
onClick: () => handleResume(row)
})
: h(ArtButtonTable, {
)
}
} else {
// 开机状态,显示停机按钮
if (hasAuth('enterprise_cards:suspend')) {
buttons.push(
h(ArtButtonTable, {
text: '停机',
iconClass: BgColorEnum.ERROR,
onClick: () => handleSuspend(row)
})
])
)
}
}
return h('div', { style: 'display: flex; gap: 8px;' }, buttons)
}
}
])