diff --git a/components/form-template/form-cell/form-positive-find.vue b/components/form-template/form-cell/form-positive-find.vue index 31d3973..0be0a5c 100644 --- a/components/form-template/form-cell/form-positive-find.vue +++ b/components/form-template/form-cell/form-positive-find.vue @@ -9,20 +9,16 @@ - - - - {{ idx + 1 }}、{{ i.category || '' }} - {{ i.opinion || '' }} - - - - + + + {{ idx + 1 }}、{{ i.category || '' }} + {{ i.opinion || '' }} + + + 编辑 + 删除 + + 暂无内容,点击右侧 + 添加 @@ -90,12 +86,14 @@ function edit(item, idx) { function remove(idx) { if (props.disableChange) return; - confirm('确定删除吗?', () => { - const list = value.value.map((i) => ({ category: i.category, opinion: i.opinion })); - list.splice(idx, 1); - emitChange(list); - toast('已删除'); - }); + confirm('确定删除吗?') + .then(() => { + const list = value.value.map((i) => ({ category: i.category, opinion: i.opinion })); + list.splice(idx, 1); + emitChange(list); + toast('已删除'); + }) + .catch(() => {}); } @@ -127,37 +125,49 @@ function remove(idx) { margin-top: 20rpx; } .item { - padding: 20rpx 0; + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 24rpx; + padding: 24rpx 0; + border-bottom: 2rpx solid #f3f4f6; +} +.item:last-child { + border-bottom: none; +} +.item-main { + flex: 1; + min-width: 0; } .item-title { font-size: 28rpx; color: #111827; font-weight: 600; + word-break: break-all; } .item-sub { margin-top: 12rpx; font-size: 26rpx; color: #6b7280; white-space: pre-wrap; + word-break: break-all; } -.actions { - display: flex; - height: 100%; - align-items: stretch; -} -.action { - width: 140rpx; +.item-actions { display: flex; align-items: center; - justify-content: center; + gap: 20rpx; + flex-shrink: 0; + padding-top: 4rpx; +} +.text-action { font-size: 26rpx; - color: #fff; + line-height: 1; } -.action.edit { - background: #0877F1; +.text-action.edit { + color: #0877F1; } -.action.del { - background: #ff4d4f; +.text-action.del { + color: #ff4d4f; } .empty { margin-top: 20rpx; diff --git a/pages/others/edit-positive-find.vue b/pages/others/edit-positive-find.vue index c4233a2..ddf614d 100644 --- a/pages/others/edit-positive-find.vue +++ b/pages/others/edit-positive-find.vue @@ -44,7 +44,17 @@ const eventName = ref(''); onLoad((opt) => { eventName.value = String(opt?.eventName || ''); - if (opt?.title) uni.setNavigationBarTitle({ title: String(opt.title) }); + if (opt?.title) { + let title = String(opt.title); + try { + title = decodeURIComponent(title); + } catch { + title = String(opt.title); + } + uni.setNavigationBarTitle({ title: title || '阳性发现及处理意见' }); + } else { + uni.setNavigationBarTitle({ title: '阳性发现及处理意见' }); + } const data = uni.getStorageSync('current-positive-find') || {}; category.value = typeof data?.category === 'string' ? data.category : ''; opinion.value = typeof data?.opinion === 'string' ? data.opinion : '';