From 3e9d420384e8c076b03be439b6410878f1f6f373 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期四, 29 二月 2024 15:18:56 +0800
Subject: [PATCH] feat:折线图表选择切换数据

---
 src/views/setting.vue |   47 ++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/src/views/setting.vue b/src/views/setting.vue
index 1302013..d637f3b 100644
--- a/src/views/setting.vue
+++ b/src/views/setting.vue
@@ -1,11 +1,20 @@
 <script setup lang="ts">
 import { useSettingStore } from "@/stores/index";
 import { ref } from "vue";
+import {storeToRefs} from "pinia"
 const isScaleRadio = ref(false);
+const leftBottomRadio=ref(true)
+const rightBottomRadio=ref(true)
 const settingStore = useSettingStore();
+const {indexConfig}=storeToRefs(settingStore)
+
 const init = () => {
   settingStore.initSetting();
   isScaleRadio.value = settingStore.isScale;
+
+  leftBottomRadio.value=indexConfig.value.leftBottomSwiper
+  rightBottomRadio.value=indexConfig.value.rightBottomSwiper
+
 };
 init();
 const handleClose = () => {};
@@ -18,11 +27,16 @@
 const isScaleChange = (flag: boolean) => {
   settingStore.setIsScale(flag);
 };
-const radiochange = (blag: boolean, type: string) => {
-  console.log(blag, type);
+const radiochange = (blag: boolean) => {
   settingStore.setIsScale(blag);
   // this.$store.commit('setting/updateSwiper', { val, type })
 };
+const indexRadioChange=(flag: boolean)=>{
+  settingStore.setIndexConfig({
+    leftBottomSwiper: leftBottomRadio.value,//宸﹁疆鎾�
+    rightBottomSwiper:rightBottomRadio.value,//鍙充笅杞挱
+  });
+}
 </script>
 
 <template>
@@ -39,7 +53,34 @@
           >:
         </span>
         <div class="setting_content">
-          <el-radio-group v-model="isScaleRadio" @change="isScaleChange">
+          <el-radio-group v-model="isScaleRadio" @change="(flag)=>isScaleChange(flag as boolean)">
+            <el-radio :label="true">鏄�</el-radio>
+            <el-radio :label="false">鍚�</el-radio>
+          </el-radio-group>
+        </div>
+      </div>
+      <div class="left_shu">瀹炴椂鐩戞祴</div>
+      <div class="setting_item">
+        <span class="setting_label">
+          璁惧鎻愰啋鑷姩杞: <span class="setting_label_tip"></span>
+        </span>
+        <div class="setting_content">
+          <el-radio-group
+            v-model="leftBottomRadio"
+            @change="(flag)=>indexRadioChange(flag as boolean)"
+          >
+            <el-radio :label="true">鏄�</el-radio>
+            <el-radio :label="false">鍚�</el-radio>
+          </el-radio-group>
+        </div>
+      </div>
+      <div class="setting_item">
+        <span class="setting_label"> 瀹炴椂棰勮杞挱: </span>
+        <div class="setting_content">
+          <el-radio-group
+            v-model="rightBottomRadio"
+            @change="(flag)=>indexRadioChange(flag as boolean)"
+          >
             <el-radio :label="true">鏄�</el-radio>
             <el-radio :label="false">鍚�</el-radio>
           </el-radio-group>

--
Gitblit v1.8.0