فهرست منبع

各主页顶部样式适配

zengy 5 روز پیش
والد
کامیت
4a95d025eb

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 3
src/components/ActionFormDrawer.vue


+ 4 - 4
src/components/WarningActionDrawer.vue

@@ -59,8 +59,8 @@ function submit() {
       <view class="drawer-head"><text>{{ title }}</text><text class="close" @tap="!submitting && $emit('update:modelValue', false)">×</text></view>
       <scroll-view class="drawer-body" scroll-y>
         <template v-if="action === 'PUBLISH'">
-          <view class="field"><text class="label"><b>*</b>处置人</text><picker :range="handlerLabels" :value="handlerIndex + 1" :disabled="!handlers.length" @change="selectIndex($event, 'handler')"><view class="select">{{ handlerLabels[handlerIndex + 1] }}<text>⌄</text></view></picker><text v-if="!handlers.length" class="tip">暂无符合条件且拥有预警处置权限的人员</text></view>
-          <view class="field"><text class="label"><b>*</b>核验人</text><picker :range="reviewerLabels" :value="reviewerIndex + 1" :disabled="!reviewers.length" @change="selectIndex($event, 'reviewer')"><view class="select">{{ reviewerLabels[reviewerIndex + 1] }}<text>⌄</text></view></picker><text v-if="!reviewers.length" class="tip">暂无符合条件且拥有预警核验权限的人员</text></view>
+          <view class="field"><text class="label"><text class="required-mark">*</text>处置人</text><picker :range="handlerLabels" :value="handlerIndex + 1" :disabled="!handlers.length" @change="selectIndex($event, 'handler')"><view class="select">{{ handlerLabels[handlerIndex + 1] }}<text>⌄</text></view></picker><text v-if="!handlers.length" class="tip">暂无符合条件且拥有预警处置权限的人员</text></view>
+          <view class="field"><text class="label"><text class="required-mark">*</text>核验人</text><picker :range="reviewerLabels" :value="reviewerIndex + 1" :disabled="!reviewers.length" @change="selectIndex($event, 'reviewer')"><view class="select">{{ reviewerLabels[reviewerIndex + 1] }}<text>⌄</text></view></picker><text v-if="!reviewers.length" class="tip">暂无符合条件且拥有预警核验权限的人员</text></view>
         </template>
         <FormField v-if="action === 'RECEIVE' || action === 'START'" v-model="remark" label="备注" type="textarea" placeholder="可填写现场情况或操作说明" />
         <template v-if="action === 'HANDLE'">
@@ -68,7 +68,7 @@ function submit() {
           <view class="field"><text class="label">现场图片</text><UploadPanel v-model="files" :max-count="9" :max-size-mb="20" /><text class="tip">支持 JPG、JPEG、PNG,单张不超过20MB</text></view>
         </template>
         <template v-if="action === 'VERIFY'">
-          <view class="field"><text class="label"><b>*</b>核验结果</text><view class="choices"><button :class="{ active: result === 'CLEAR' }" @tap="result = 'CLEAR'">通过并解除</button><button :class="{ active: result === 'RETURN' }" @tap="result = 'RETURN'">退回重办</button></view></view>
+          <view class="field"><text class="label"><text class="required-mark">*</text>核验结果</text><view class="choices"><button :class="{ active: result === 'CLEAR' }" @tap="result = 'CLEAR'">通过并解除</button><button :class="{ active: result === 'RETURN' }" @tap="result = 'RETURN'">退回重办</button></view></view>
           <FormField v-model="opinion" label="核验意见" type="textarea" required placeholder="请输入现场核验结论和依据" />
         </template>
       </scroll-view>
@@ -78,5 +78,5 @@ function submit() {
 </template>
 
 <style scoped lang="scss">
-.drawer-root{position:fixed;inset:0;z-index:100}.mask{position:absolute;inset:0;background:rgba(5,18,35,.55)}.drawer{position:absolute;right:0;bottom:0;left:0;overflow:hidden;border-radius:28rpx 28rpx 0 0;background:#fff}.drawer-head{display:flex;align-items:center;justify-content:space-between;height:96rpx;padding:0 30rpx;color:#122b48;border-bottom:1rpx solid #edf1f5;font-size:31rpx;font-weight:700}.close{display:flex;align-items:center;justify-content:center;width:58rpx;height:58rpx;color:#7f8c9b;border-radius:50%;background:#f2f5f8;font-size:42rpx}.drawer-body{max-height:62vh;padding:5rpx 30rpx 25rpx}.field{padding:22rpx 0;border-bottom:1rpx solid #edf1f5}.label{display:block;margin-bottom:16rpx;color:#34485f;font-size:27rpx}.label b{margin-right:6rpx;color:#e34d59}.select{display:flex;align-items:center;justify-content:space-between;height:78rpx;padding:0 20rpx;color:#43566d;border:1rpx solid #dce4ed;border-radius:12rpx;background:#f8fafc;font-size:27rpx}.choices{display:grid;grid-template-columns:1fr 1fr;gap:14rpx}.choices button{height:72rpx;margin:0;color:#52647a;border:1rpx solid #d9e1ea;border-radius:12rpx;background:#fff;font-size:24rpx;line-height:72rpx}.choices button.active{color:#08264c;border-color:#08264c;background:#eef3f8;font-weight:600}.confirm{display:flex;flex-direction:column;margin:25rpx 0;padding:26rpx;color:#2e435b;border-radius:12rpx;background:#f3f7fb;font-size:29rpx;font-weight:650}.confirm text:last-child{margin-top:12rpx;color:#7d8c9e;font-size:23rpx;font-weight:400}.tip{display:block;margin-top:14rpx;color:#97a3b1;font-size:21rpx}.drawer-actions{display:grid;grid-template-columns:1fr 1fr;gap:18rpx;padding:18rpx 26rpx calc(18rpx + env(safe-area-inset-bottom));border-top:1rpx solid #edf1f5}.drawer-actions button{height:80rpx;margin:0;border-radius:999rpx;font-size:27rpx;line-height:80rpx}.cancel{color:#43566d;border:1rpx solid #d7e0e9;background:#fff}.submit{color:#fff;background:#08264c}
+.drawer-root{position:fixed;inset:0;z-index:100}.mask{position:absolute;inset:0;background:rgba(5,18,35,.55)}.drawer{position:absolute;right:0;bottom:0;left:0;overflow:hidden;border-radius:28rpx 28rpx 0 0;background:#fff}.drawer-head{display:flex;align-items:center;justify-content:space-between;height:96rpx;padding:0 30rpx;color:#122b48;border-bottom:1rpx solid #edf1f5;font-size:31rpx;font-weight:700}.close{display:flex;align-items:center;justify-content:center;width:58rpx;height:58rpx;color:#7f8c9b;border-radius:50%;background:#f2f5f8;font-size:42rpx}.drawer-body{max-height:62vh;padding:5rpx 30rpx 25rpx}.field{padding:22rpx 0;border-bottom:1rpx solid #edf1f5}.label{display:block;margin-bottom:16rpx;color:#34485f;font-size:27rpx}.required-mark{margin-right:6rpx;color:#e34d59}.select{display:flex;align-items:center;justify-content:space-between;height:78rpx;padding:0 20rpx;color:#43566d;border:1rpx solid #dce4ed;border-radius:12rpx;background:#f8fafc;font-size:27rpx}.choices{display:grid;grid-template-columns:1fr 1fr;gap:14rpx}.choices button{height:72rpx;margin:0;color:#52647a;border:1rpx solid #d9e1ea;border-radius:12rpx;background:#fff;font-size:24rpx;line-height:72rpx}.choices button.active{color:#08264c;border-color:#08264c;background:#eef3f8;font-weight:600}.confirm{display:flex;flex-direction:column;margin:25rpx 0;padding:26rpx;color:#2e435b;border-radius:12rpx;background:#f3f7fb;font-size:29rpx;font-weight:650}.confirm text:last-child{margin-top:12rpx;color:#7d8c9e;font-size:23rpx;font-weight:400}.tip{display:block;margin-top:14rpx;color:#97a3b1;font-size:21rpx}.drawer-actions{display:grid;grid-template-columns:1fr 1fr;gap:18rpx;padding:18rpx 26rpx calc(18rpx + env(safe-area-inset-bottom));border-top:1rpx solid #edf1f5}.drawer-actions button{height:80rpx;margin:0;border-radius:999rpx;font-size:27rpx;line-height:80rpx}.cancel{color:#43566d;border:1rpx solid #d7e0e9;background:#fff}.submit{color:#fff;background:#08264c}
 </style>

+ 1 - 1
src/pages.json

@@ -12,7 +12,7 @@
     { "path": "pages/office/index", "style": { "navigationStyle": "custom", "enablePullDownRefresh": true } },
     { "path": "pages/emergency/index", "style": { "navigationStyle": "custom", "enablePullDownRefresh": true } },
     { "path": "pages/contacts/index", "style": { "navigationStyle": "custom", "enablePullDownRefresh": true } },
-    { "path": "pages/profile/index", "style": { "navigationStyle": "custom" } },
+    { "path": "pages/profile/index", "style": { "navigationStyle": "custom", "enablePullDownRefresh": true } },
     { "path": "pages/message/workorder-detail", "style": { "navigationStyle": "custom", "enablePullDownRefresh": true } },
       { "path": "pages/message/warning-detail", "style": { "navigationStyle": "custom", "enablePullDownRefresh": true } },
     { "path": "pages/message/alarm-detail", "style": { "navigationStyle": "custom", "enablePullDownRefresh": true } },

+ 44 - 1
src/pages/contacts/index.vue

@@ -84,7 +84,50 @@ function call(phone?: string) {
     uni.showToast({ title: '该联系人未设置手机号', icon: 'none' })
     return
   }
-  uni.makePhoneCall({ phoneNumber: phone.replace(/\s/g, '') })
+  const phoneNumber = phone.replace(/[^\d+]/g, '')
+  if (!phoneNumber) {
+    uni.showToast({ title: '手机号格式不正确', icon: 'none' })
+    return
+  }
+
+  // PakePlus's Android shell blocks `tel:` navigation unless its app.json has
+  // callPhone=true. Its JsBridge.openUrl method starts an external ACTION_VIEW
+  // intent directly, which opens the dialer without CALL_PHONE permission and
+  // avoids that WebView policy check.
+  const runtime = globalThis as typeof globalThis & {
+    JsBridge?: {
+      openUrl?: (url: string) => void
+    }
+    __TAURI__?: {
+      core?: {
+        invoke?: (command: string, args?: Record<string, unknown>) => Promise<unknown>
+      }
+    }
+    __TAURI_INTERNALS__?: {
+      invoke?: (command: string, args?: Record<string, unknown>) => Promise<unknown>
+    }
+  }
+  if (runtime.JsBridge?.openUrl) {
+    try {
+      runtime.JsBridge.openUrl(`tel:${phoneNumber}`)
+    } catch {
+      uni.showToast({ title: '无法唤起拨号功能,请检查系统权限', icon: 'none' })
+    }
+    return
+  }
+
+  const invoke = runtime.__TAURI__?.core?.invoke || runtime.__TAURI_INTERNALS__?.invoke
+  if (invoke) {
+    invoke('open_url', { url: `tel:${phoneNumber}` }).catch(() => {
+      uni.showToast({ title: '无法唤起拨号功能,请检查系统权限', icon: 'none' })
+    })
+    return
+  }
+
+  uni.makePhoneCall({
+    phoneNumber,
+    fail: () => uni.showToast({ title: '无法唤起拨号功能,请检查系统权限', icon: 'none' }),
+  })
 }
 
 onLoad(loadContacts)

+ 1 - 1
src/pages/emergency/index.vue

@@ -37,7 +37,7 @@ function openEvent(item: EmergencyEvent) { navigateTo(`/pages/emergency/event-de
 </template>
 
 <style scoped lang="scss">
-.emergency-head{display:flex;flex-direction:column;align-items:center;height:330rpx;padding-top:calc(47rpx + env(safe-area-inset-top));color:#fff;background:linear-gradient(145deg,#061b34,#0b3156 55%,#155376)}.shield{display:flex;align-items:center;justify-content:center;width:90rpx;height:90rpx;border:2rpx solid rgba(255,255,255,.42);border-radius:24rpx;background:rgba(255,255,255,.11);font-size:55rpx}.head-title{margin-top:19rpx;font-size:38rpx;font-weight:650}.head-sub{margin-top:10rpx;color:rgba(255,255,255,.72);font-size:23rpx}
+.emergency-head{display:flex;flex-direction:column;align-items:center;min-height:calc(330rpx + env(safe-area-inset-top));padding:calc(47rpx + env(safe-area-inset-top)) 24rpx 70rpx;color:#fff;background:linear-gradient(145deg,#061b34,#0b3156 55%,#155376)}.shield{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:90rpx;height:90rpx;border:2rpx solid rgba(255,255,255,.42);border-radius:24rpx;background:rgba(255,255,255,.11);font-size:55rpx}.head-title{flex-shrink:0;margin-top:19rpx;font-size:38rpx;font-weight:650;line-height:1.5}.head-sub{display:block;flex-shrink:0;max-width:100%;margin-top:10rpx;color:rgba(255,255,255,.72);font-size:23rpx;line-height:1.5;text-align:center;overflow-wrap:break-word}
 .emergency-content{position:relative;margin-top:-45rpx}.summary{display:grid;grid-template-columns:repeat(3,1fr);padding:27rpx 0}.summary view{display:flex;flex-direction:column;align-items:center;color:#7b899a;font-size:22rpx;border-right:1rpx solid #eef1f5}.summary view:last-child{border:0}.num{margin-bottom:8rpx;font-size:40rpx;font-weight:700}.red{color:#e95157}.orange{color:#eb8b2c}.green{color:#15a36c}
 .menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:20rpx}.menu{display:flex;flex-direction:column;align-items:center;padding:30rpx 15rpx;border:1rpx solid #e1e9ea}.menu-icon{display:flex;align-items:center;justify-content:center;width:86rpx;height:86rpx;color:#fff;border-radius:22rpx;background:#08264c;font-size:42rpx}.menu-title{margin-top:18rpx;color:#263a51;font-size:28rpx;font-weight:650}.menu-sub{margin-top:7rpx;color:#929ead;font-size:21rpx}.dynamic{display:flex;align-items:center;padding:24rpx}.dynamic-icon{display:flex;align-items:center;justify-content:center;width:70rpx;height:70rpx;margin-right:18rpx;color:#fff;border-radius:18rpx;background:#08264c;font-size:36rpx;font-weight:700}.dynamic-main{display:flex;flex:1;flex-direction:column}.dynamic-title{color:#314359;font-size:27rpx}.dynamic-sub{margin-top:9rpx;color:#95a0ae;font-size:22rpx}.arrow{color:#a9b3c0;font-size:48rpx}
 .empty{padding:35rpx;color:#95a0ae;text-align:center;font-size:24rpx}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
src/pages/office/index.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 8 - 1
src/pages/profile/index.vue


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است