index copy.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="msg-container">
  3. <view class="oa-header-section">
  4. <view class="menu-list mt0 mlr0">
  5. <view class="list-cell">
  6. <view class="menu-item">
  7. <view class="title" style="width: 100%">通知公告</view>
  8. <u-switch v-model="state.switchList.noticeBulletin" size="20"></u-switch>
  9. </view>
  10. </view>
  11. <view class="list-cell">
  12. <view class="menu-item">
  13. <view class="title" style="width: 100%">设备告警</view>
  14. <u-switch v-model="state.switchList.deviceAlarm" size="20"></u-switch>
  15. </view>
  16. </view>
  17. <view class="list-cell">
  18. <view class="menu-item">
  19. <view class="title" style="width: 100%">巡检系统</view>
  20. <u-switch v-model="state.switchList.inspectionSystem" size="20"></u-switch>
  21. </view>
  22. </view>
  23. <view class="list-cell">
  24. <view class="menu-item">
  25. <view class="title" style="width: 100%">会议系统</view>
  26. <u-switch v-model="state.switchList.meetingNotice" size="20"></u-switch>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script setup>
  34. import config from "@/config";
  35. import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
  36. import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
  37. import { useStores, commonStores } from "@/store/modules/index";
  38. import { msgApi } from "@/api/mine";
  39. const useStore = useStores();
  40. const { proxy } = getCurrentInstance();
  41. const state = reactive({
  42. switchList: {},
  43. });
  44. /**
  45. * @初始化
  46. */
  47. function init() {
  48. msgApi()
  49. .Select()
  50. .then((res) => {
  51. state.switchList = res.data.appMode;
  52. });
  53. }
  54. onLoad(() => {
  55. init();
  56. });
  57. onShow(() => {
  58. //调用系统主题颜色
  59. proxy.$settingStore.systemThemeColor([1]);
  60. });
  61. </script>
  62. <style lang="scss" scoped>
  63. .msg-container {
  64. }
  65. </style>