<template>
  <view class="msg-container">
    <view class="oa-header-section">
      <view class="menu-list mt0 mlr0">
        <view class="list-cell">
          <view class="menu-item">
            <view class="title" style="width: 100%">通知公告</view>
            <u-switch v-model="state.switchList.noticeBulletin" size="20"></u-switch>
          </view>
        </view>
        <view class="list-cell">
          <view class="menu-item">
            <view class="title" style="width: 100%">设备告警</view>
            <u-switch v-model="state.switchList.deviceAlarm" size="20"></u-switch>
          </view>
        </view>
        <view class="list-cell">
          <view class="menu-item">
            <view class="title" style="width: 100%">巡检系统</view>
            <u-switch v-model="state.switchList.inspectionSystem" size="20"></u-switch>
          </view>
        </view>
        <view class="list-cell">
          <view class="menu-item">
            <view class="title" style="width: 100%">会议系统</view>
            <u-switch v-model="state.switchList.meetingNotice" size="20"></u-switch>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import config from "@/config";
import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
import { useStores, commonStores } from "@/store/modules/index";
import { msgApi } from "@/api/mine";

const useStore = useStores();
const { proxy } = getCurrentInstance();

const state = reactive({
  switchList: {},
});

/**
 * @初始化
 */
function init() {
  msgApi()
    .Select()
    .then((res) => {
      state.switchList = res.data.appMode;
    });
}

onLoad(() => {
  init();
});

onShow(() => {
  //调用系统主题颜色
  proxy.$settingStore.systemThemeColor([1]);
});
</script>

<style lang="scss" scoped>
.msg-container {
}
</style>
