This commit is contained in:
@@ -45,50 +45,6 @@
|
||||
@select="handleContextMenuSelect"
|
||||
/>
|
||||
|
||||
<!-- 授权详情对话框 -->
|
||||
<ElDialog v-model="detailDialogVisible" title="授权详情" width="700px">
|
||||
<ElDescriptions v-if="currentRecord" :column="2" border>
|
||||
<ElDescriptionsItem label="企业ID">{{
|
||||
currentRecord.enterprise_id
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="企业名称">{{
|
||||
currentRecord.enterprise_name
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="卡ID">{{ currentRecord.card_id }}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="ICCID">{{ currentRecord.iccid }}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="手机号">{{
|
||||
currentRecord.msisdn || '--'
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="授权人ID">{{
|
||||
currentRecord.authorized_by
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="授权人">{{
|
||||
currentRecord.authorizer_name
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="授权人类型">
|
||||
<ElTag :type="getAuthorizerTypeTag(currentRecord.authorizer_type)">
|
||||
{{ getAuthorizerTypeText(currentRecord.authorizer_type) }}
|
||||
</ElTag>
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="授权时间" :span="2">{{
|
||||
formatDateTime(currentRecord.authorized_at)
|
||||
}}</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="状态" :span="2">
|
||||
<ElTag :type="getStatusTag(currentRecord.status)">
|
||||
{{ getStatusText(currentRecord.status) }}
|
||||
</ElTag>
|
||||
</ElDescriptionsItem>
|
||||
<ElDescriptionsItem label="备注" :span="2">{{
|
||||
currentRecord.remark || '--'
|
||||
}}</ElDescriptionsItem>
|
||||
</ElDescriptions>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<ElButton type="primary" @click="detailDialogVisible = false">关闭</ElButton>
|
||||
</div>
|
||||
</template>
|
||||
</ElDialog>
|
||||
|
||||
<!-- 修改备注对话框 -->
|
||||
<ElDialog v-model="remarkDialogVisible" title="修改备注" width="500px">
|
||||
<ElForm ref="remarkFormRef" :model="remarkForm" :rules="remarkRules" label-width="80px">
|
||||
@@ -136,19 +92,18 @@
|
||||
AuthorizerType
|
||||
} from '@/types/api/authorization'
|
||||
import { CommonStatus } from '@/config/constants'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
|
||||
defineOptions({ name: 'AuthorizationRecords' })
|
||||
|
||||
const { hasAuth } = useAuth()
|
||||
const router = useRouter()
|
||||
const loading = ref(false)
|
||||
const detailDialogVisible = ref(false)
|
||||
const remarkDialogVisible = ref(false)
|
||||
const remarkLoading = ref(false)
|
||||
const tableRef = ref()
|
||||
const remarkFormRef = ref<FormInstance>()
|
||||
const currentRecordId = ref<number>(0)
|
||||
const currentRecord = ref<AuthorizationItem | null>(null)
|
||||
const contextMenuRef = ref<InstanceType<typeof ArtMenuRight>>()
|
||||
const currentRow = ref<AuthorizationItem | null>(null)
|
||||
|
||||
@@ -394,8 +349,9 @@
|
||||
|
||||
// 查看详情
|
||||
const viewDetail = (row: AuthorizationItem) => {
|
||||
currentRecord.value = row
|
||||
detailDialogVisible.value = true
|
||||
router.push({
|
||||
path: `${RoutesAlias.AuthorizationRecords}/detail/${row.id}`
|
||||
})
|
||||
}
|
||||
|
||||
// 显示修改备注对话框
|
||||
@@ -433,7 +389,9 @@
|
||||
const contextMenuItems = computed((): MenuItemType[] => {
|
||||
const items: MenuItemType[] = []
|
||||
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
if (hasAuth('authorization_records:view_detail')) {
|
||||
items.push({ key: 'detail', label: '详情' })
|
||||
}
|
||||
|
||||
if (hasAuth('authorization_records:update_remark')) {
|
||||
items.push({ key: 'edit', label: '编辑' })
|
||||
|
||||
Reference in New Issue
Block a user