diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 110d9bc..9139186 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -53,6 +53,7 @@ "monaco-editor": "^0.52.2", "pinia": "catalog:", "rxjs": "^7.8.2", + "shiyzhangcron": "^0.1.5", "tinymce": "^7.3.0", "unplugin-vue-components": "^0.27.3", "vite-plugin-monaco-editor": "^1.1.0", diff --git a/apps/web-antd/src/components/CronPickerModal/index.vue b/apps/web-antd/src/components/CronPickerModal/index.vue new file mode 100644 index 0000000..68b30e1 --- /dev/null +++ b/apps/web-antd/src/components/CronPickerModal/index.vue @@ -0,0 +1,65 @@ + + + diff --git a/apps/web-antd/src/views/demo/test/detail.vue b/apps/web-antd/src/views/demo/test/detail.vue index e4221e6..a124a00 100644 --- a/apps/web-antd/src/views/demo/test/detail.vue +++ b/apps/web-antd/src/views/demo/test/detail.vue @@ -1,10 +1,57 @@ diff --git a/apps/web-antd/src/views/device/device/detail/index.vue b/apps/web-antd/src/views/device/device/detail/index.vue index 6463b87..65d3dbf 100644 --- a/apps/web-antd/src/views/device/device/detail/index.vue +++ b/apps/web-antd/src/views/device/device/detail/index.vue @@ -2,6 +2,7 @@ import { computed, defineAsyncComponent, onMounted, onUnmounted } from 'vue'; import { useRoute, useRouter } from 'vue-router'; +import { useAccess } from '@vben/access'; import { Page } from '@vben/common-ui'; import { ArrowLeftOutlined } from '@ant-design/icons-vue'; @@ -12,6 +13,8 @@ import { deviceStateOptions } from '#/constants/dicts'; import { useDeviceStore } from '#/store/device'; import { getWebSocket } from '#/utils/websocket'; +const { hasAccessByCodes } = useAccess(); + const BasicInfo = defineAsyncComponent( () => import('./components/BasicInfo.vue'), ); @@ -106,6 +109,10 @@ const handleTabChange = (key: string) => { }; const handleProductClick = () => { + if (!hasAccessByCodes(['device:product:query'])) { + message.warning('暂无权限'); + return; + } router.push(`/device/product/detail/${currentDevice.value.productId}`); }; diff --git a/apps/web-antd/src/views/device/device/index.vue b/apps/web-antd/src/views/device/device/index.vue index 84b9509..9b821c4 100644 --- a/apps/web-antd/src/views/device/device/index.vue +++ b/apps/web-antd/src/views/device/device/index.vue @@ -349,10 +349,7 @@ const [DeviceDrawer, drawerApi] = useVbenDrawer({