Files
hospital-rescue-app-v2/pages/mine/settings.uvue
T
2026-09-24 16:25:22 +08:00

81 lines
2.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<hr-page page-bg="#F3F4F6" status-bg="#FFFFFF" nav-title="设置" :xloading="true">
<view class="hr-body">
<!-- ============ 通知 ============ -->
<hr-sec title="通知" first></hr-sec>
<hr-card variant="list">
<view v-for="(s, i) in switches" :key="i" class="hr-lrow"
:class="i == switches.length - 1 ? 'hr-lrow-last' : ''">
<view class="hr-lmain">
<text class="hr-lmain-b">{{ s.title }}</text>
<text class="hr-lmain-s">{{ s.sub }}</text>
</view>
<x-switch v-model="s.on" color="#10B981" size="small"></x-switch>
</view>
</hr-card>
<!-- ============ 离线与存储 ============ -->
<hr-sec title="离线与存储"></hr-sec>
<hr-card variant="list">
<hr-lrow v-for="(r, i) in offlineRows" :key="i" :title="r.title" :sub="r.sub" :value="r.value"
:is-last="i == offlineRows.length - 1" @click="onRowClick(i, true)"></hr-lrow>
</hr-card>
<!-- ============ 通用 ============ -->
<hr-sec title="通用"></hr-sec>
<hr-card variant="list">
<hr-lrow v-for="(r, i) in commonRows" :key="i" :title="r.title" :sub="r.sub" :value="r.value"
:is-last="i == commonRows.length - 1" @click="onRowClick(i, false)"></hr-lrow>
</hr-card>
<hr-tip style="margin-top:16px" theme="info" icon=""
text="P0 派单强提醒开启后,收到 P0 派单将全屏告警并强制震动,请保持开启。"></hr-tip>
<view style="height:14px"></view>
</view>
</hr-page>
</template>
<script lang="uts" setup>
import { ref } from 'vue'
import { settingSwitches, offlineSettingRows, commonSettingRows } from '@/mock/index.uts'
import { HrSettingSwitch, HrSettingRow } from '@/mock/types.uts'
import { navTo } from '@/utils/nav.uts'
/** s39 设置 */
const switches = ref<HrSettingSwitch[]>(settingSwitches)
const offlineRows = ref<HrSettingRow[]>(offlineSettingRows)
const commonRows = ref<HrSettingRow[]>(commonSettingRows)
function onRowClick(i : number, isOffline : boolean) : void {
if (isOffline) {
if (i == 0) { navTo('/pages/triage/offline-sync'); return }
uni.showModal({
title: '清理已下载资料',
content: '将删除 8.6 MB 离线学习资料,无网络时需重新下载。',
success: (res) => {
if (res.confirm) { uni.showToast({ title: '已清理 8.6 MB', icon: 'success' }) }
}
})
return
}
if (i == 0) {
uni.showModal({
title: '清理缓存',
content: '当前缓存 24.3 MB,清理后不影响账号数据。',
success: (res) => {
if (res.confirm) { uni.showToast({ title: '已清理 24.3 MB', icon: 'success' }) }
}
})
return
}
if (i == 1) {
uni.showModal({ title: '医院救援管理平台', content: '版本 v2.0.0\n移动端逻辑重构版', showCancel: false })
return
}
uni.showModal({ title: '隐私政策', content: '本平台严格保护伤患与医护人员的个人信息,数据仅用于院前急救调度。', showCancel: false })
}
</script>