From c7a16ca1b6fbcb0b82a4a09c2e75014624082e37 Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期四, 27 三月 2025 22:45:48 +0800
Subject: [PATCH] 修复走航融合功能bug
---
src/components/monitor/FactorRadio.vue | 43 +++++++++++++++++++++++++++++++++++++++----
1 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/src/components/monitor/FactorRadio.vue b/src/components/monitor/FactorRadio.vue
index f77cf2f..262228b 100644
--- a/src/components/monitor/FactorRadio.vue
+++ b/src/components/monitor/FactorRadio.vue
@@ -1,7 +1,7 @@
<template>
<BaseCard>
<template #content>
- <el-radio-group v-model="radio">
+ <el-radio-group v-model="radio" size="default" @change="handleChange">
<el-radio v-for="(item, i) in options" :key="i" :value="item.value">{{
item.label
}}</el-radio>
@@ -12,13 +12,48 @@
<script>
// 鐩戞祴鍥犲瓙鍗曢�夋
-import { radioOptions } from '@/constant/radio-options';
+import { radioOptions, defaultOptions } from '@/constant/radio-options';
+import { TYPE0 } from '@/constant/device-type';
+
export default {
+ props: {
+ deviceType: {
+ type: String,
+ // type0: 杞﹁浇鎴栨棤浜烘満; type1:鏃犱汉鑸�
+ default: TYPE0
+ }
+ },
+ emits: ['change'],
data() {
return {
- radio: radioOptions.type0[0].value,
- options: radioOptions.type0
+ radio: defaultOptions(TYPE0)
};
+ },
+ computed: {
+ options() {
+ return radioOptions(this.deviceType);
+ }
+ },
+ watch: {
+ deviceType(nV, oV) {
+ if (nV != oV) {
+ this.radio = this.options[0].value;
+ }
+ }
+ },
+ methods: {
+ handleChange(value) {
+ this.$emit('change', value);
+ // todo 鍦板浘3d鍥惧儚鍒囨崲灞曠ず鐩戞祴鍥犲瓙
+ }
}
};
</script>
+<style scoped>
+.el-radio {
+ --el-radio-text-color: white;
+ --el-color-primary: #23dad1;
+ margin-right: 10px;
+ height: initial;
+}
+</style>
--
Gitblit v1.9.3