build / task (16.x, npm, macOS-latest) (push) Canceled after 0s
build / task (16.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, npm, windows-latest) (push) Canceled after 0s
build / task (16.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (16.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (16.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (16.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (16.x, yarn, windows-latest) (push) Canceled after 0s
build / task (18.x, npm, macOS-latest) (push) Canceled after 0s
build / task (18.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, npm, windows-latest) (push) Canceled after 0s
build / task (18.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (18.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (18.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (18.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (18.x, yarn, windows-latest) (push) Canceled after 0s
build / task (20.x, npm, macOS-latest) (push) Canceled after 0s
build / task (20.x, npm, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, npm, windows-latest) (push) Canceled after 0s
build / task (20.x, pnpm, macOS-latest) (push) Canceled after 0s
build / task (20.x, pnpm, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, pnpm, windows-latest) (push) Canceled after 0s
build / task (20.x, yarn, macOS-latest) (push) Canceled after 0s
build / task (20.x, yarn, ubuntu-latest) (push) Canceled after 0s
build / task (20.x, yarn, windows-latest) (push) Canceled after 0s
30 lines
1.4 KiB
Vue
30 lines
1.4 KiB
Vue
<template>
|
|
<el-button v-if="canView" plain icon="DataAnalysis"
|
|
:title="`对比 ICC 与本地已同步的全部${resourceConfig.label}数据`" @click="openComparison">
|
|
ICC 数据对比
|
|
</el-button>
|
|
<platform-resource-dialog v-if="canView" ref="resourceDialogRef" @changed="emit('changed')" />
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { PlatformResourceType } from '/@/api/collection/videoPlatform';
|
|
import { auth } from '/@/utils/authFunction';
|
|
import PlatformResourceDialog from './platform-resource-dialog.vue';
|
|
|
|
const props = defineProps<{ resourceType: PlatformResourceType }>();
|
|
const emit = defineEmits<{ (event: 'changed'): void }>();
|
|
const resourceDialogRef = ref<InstanceType<typeof PlatformResourceDialog>>();
|
|
const resourceConfigs = {
|
|
PERSON: { label: '人员', viewPermission: 'admin_sysPerson_view' },
|
|
CAR: { label: '车辆', viewPermission: 'car_carManage_view' },
|
|
DEVICE: { label: '设备', viewPermission: 'admin_deviceManage_view' },
|
|
CHANNEL: { label: '通道', viewPermission: 'admin_deviceManage_view' },
|
|
};
|
|
const resourceConfig = computed(() => resourceConfigs[props.resourceType]);
|
|
const canView = computed(() => auth(resourceConfig.value.viewPermission));
|
|
const openComparison = () => {
|
|
if (!canView.value) return;
|
|
resourceDialogRef.value?.open(props.resourceType, 'DIFFERENCE', `ICC ${resourceConfig.value.label}数据对比`);
|
|
};
|
|
</script>
|