| | |
| | | <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 = () => {};
|
| | |
| | | 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>
|
| | |
| | | >:
|
| | | </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>
|