核心修复: - 状态机加 SELECT FOR UPDATE 行锁,消除并发竞态 - hss_md_staff 加 role 列,登录从数据库读取真实角色 - 申请重复校验排除自身,全流程 20 步闭环通过 - 派单 SQL 修复 + 支付状态机过渡 + 完成服务 plan_item_id 修复 并发控制新增: - RedisLockService (SET NX PX + Lua 安全解锁) - RateLimiterService (Redis 滑动窗口 + API 拦截器) - TransactionIsolationConfig (SERIALIZABLE for 支付回调) - MqttPublisher (异步队列 + JDK TCP 探测) - ObjectStorageService (AWS SigV4 预签名, 纯 JDK) 冗余清理: - 删除 6 个死代码文件 (~620 行) - hutool-all → JDK MessageDigest, 去 MapStruct, 去 jsr310 - haversine 提取到 GeoUtil, count/round 提取到 JdbcUtil - 创建 platform layout 组件 前端修复: - 登录页移除角色选择器, 由后端 JWT 返回 - 移除 ClientOnly 包裹, 页面正常渲染 - SPA fallback Nginx 配置修复 Docker: 运行时镜像 eclipse-temurin:17-jre-jammy (缩小 ~300MB) 文档: 新增系统实现与修复报告.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
49 lines
2.4 KiB
Vue
49 lines
2.4 KiB
Vue
<template>
|
|
<view class="page">
|
|
<text class="title">异常上报</text>
|
|
<view class="types">
|
|
<view v-for="t in exceptionTypes" :key="t.value" @click="selected = t.value"
|
|
:class="['type-item', selected === t.value ? 'active' : '']">{{ t.label }}</view>
|
|
</view>
|
|
<textarea v-model="desc" placeholder="请描述异常情况" class="textarea" />
|
|
<button @click="submit" :loading="submitting" :disabled="!selected" class="btn">提交异常</button>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { apiPost } from '@/common/api.js';
|
|
|
|
const exceptionTypes = [
|
|
{ value: 'PATIENT_ABSENT', label: '对象不在家' }, { value: 'PATIENT_REFUSE', label: '对象拒绝服务' },
|
|
{ value: 'WRONG_ADDRESS', label: '地址错误' }, { value: 'CANNOT_CONTACT', label: '无法联系' },
|
|
{ value: 'CONDITION_NOT_READY', label: '服务条件不具备' }, { value: 'HEALTH_EMERGENCY', label: '身体突发异常' },
|
|
];
|
|
|
|
export default {
|
|
data() { return { workOrderId: 0, selected: '', desc: '', submitting: false, exceptionTypes }; },
|
|
onLoad(options) { this.workOrderId = parseInt(options.id) || 0; },
|
|
methods: {
|
|
async submit() {
|
|
this.submitting = true;
|
|
try {
|
|
const res = await apiPost('/work-orders/' + this.workOrderId + '/report-exception', { exceptionType: this.selected, description: this.desc });
|
|
if (res.data.code === 200) { uni.showToast({ title: '异常已上报' }); setTimeout(() => uni.navigateBack(), 800); }
|
|
else { uni.showToast({ title: res.data.message, icon: 'none' }); }
|
|
} catch(e) { uni.showToast({ title: '网络错误', icon: 'none' }); }
|
|
this.submitting = false;
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
.page { padding: 24rpx; background: #F8F8F8; min-height: 100vh; }
|
|
.title { font-size: 36rpx; font-weight: 700; display: block; margin-bottom: 24rpx; }
|
|
.types { display: flex; flex-wrap: wrap; gap: 16rpx; margin-bottom: 24rpx; }
|
|
.type-item { padding: 20rpx 28rpx; border-radius: 12rpx; background: #fff; border: 1px solid #ddd; font-size: 28rpx; }
|
|
.type-item.active { background: #FF4D4F; color: #fff; border-color: #FF4D4F; }
|
|
.textarea { width: 100%; height: 200rpx; border: 1px solid #ddd; border-radius: 12rpx; padding: 16rpx; font-size: 28rpx; margin-bottom: 24rpx; background: #fff; }
|
|
.btn { background: #FF4D4F; color: #fff; border-radius: 12rpx; padding: 24rpx; font-size: 32rpx; font-weight: 600; }
|
|
.btn[disabled] { opacity: 0.4; }
|
|
</style>
|