|
@@ -49,12 +49,13 @@ onMounted(() => {
|
|
});
|
|
});
|
|
|
|
|
|
if (deviceTypes.value.length) {
|
|
if (deviceTypes.value.length) {
|
|
- if (route.query.deviceType && route.query.deviceId) {
|
|
|
|
|
|
+ activeDeviceId.value = route.query.deviceId ? Number(route.query.deviceId) : undefined;
|
|
|
|
+
|
|
|
|
+ if (route.query.deviceType) {
|
|
const deviceType = Number(route.query.deviceType);
|
|
const deviceType = Number(route.query.deviceType);
|
|
const isDeviceTypeExisted = deviceTypes.value.find((item) => item.deviceType === deviceType);
|
|
const isDeviceTypeExisted = deviceTypes.value.find((item) => item.deviceType === deviceType);
|
|
|
|
|
|
if (isDeviceTypeExisted) {
|
|
if (isDeviceTypeExisted) {
|
|
- activeDeviceId.value = Number(route.query.deviceId);
|
|
|
|
activeDeviceType.value = deviceType;
|
|
activeDeviceType.value = deviceType;
|
|
|
|
|
|
router.replace({
|
|
router.replace({
|
|
@@ -206,7 +207,14 @@ const handleDevCardClick = (devId: number, e: Event) => {
|
|
currentDevId.value = devId;
|
|
currentDevId.value = devId;
|
|
viewHistoryData(paramCode);
|
|
viewHistoryData(paramCode);
|
|
} else {
|
|
} else {
|
|
- router.push(`/device-manage/device-list/equipment-details/${devId}`);
|
|
|
|
|
|
+ router.push({
|
|
|
|
+ path: `/device-manage/device-list/equipment-details/${devId}`,
|
|
|
|
+ query: {
|
|
|
|
+ from: 'deviceWorkStatus',
|
|
|
|
+ groupId: props.deviceGroupId,
|
|
|
|
+ deviceType: activeDeviceType.value,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|