hookehuyr

fix: 修复多类型附件提交时的错误提示信息

更新错误提示信息,使其更清晰地指导用户操作,并移除调试用的console.warn语句
......@@ -482,9 +482,8 @@ export function useCheckin() {
} else if (files.length > 0) {
const types = new Set(files.map(f => f.file_type).filter(Boolean))
const hasMixedTypes = types.size > 1
console.warn(multiAttachmentEnabled.value);
if (hasMixedTypes && !multiAttachmentEnabled.value) {
showToast('当前接口暂不支持多类型附件,请分别提交')
showToast('当前接口暂不支持多类型附件,请删除其他类型附件之后再提交')
return
}
......@@ -532,7 +531,7 @@ export function useCheckin() {
if (hasMixedTypes) {
if (!multiAttachmentEnabled.value) {
showToast('当前接口暂不支持多类型附件,请分别提交')
showToast('当前接口暂不支持多类型附件,请删除其他类型附件之后再提交')
return
}
showToast(result?.msg || '提交失败,请重试')
......@@ -717,6 +716,7 @@ export function useCheckin() {
}
return {
multiAttachmentEnabled,
uploading,
loading,
message,
......
<!--
* @Date: 2025-09-30 17:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-24 15:32:45
* @LastEditTime: 2026-01-24 16:39:39
* @FilePath: /mlaj/src/views/checkin/CheckinDetailPage.vue
* @Description: 用户打卡详情页
-->
......@@ -89,6 +89,7 @@
}]">
<van-icon :name="getIconName(option.key)" size="1.2rem" />
<span class="tab-text">{{ option.value }}</span>
<!-- <div v-if="multiAttachmentEnabled && getTypeCount(option.key) > 0" class="absolute -top-2 -right-2 bg-red-500 text-white text-[10px] rounded-full min-w-[16px] h-[16px] flex items-center justify-center px-1"> -->
<div v-if="getTypeCount(option.key) > 0" class="absolute -top-2 -right-2 bg-red-500 text-white text-[10px] rounded-full min-w-[16px] h-[16px] flex items-center justify-center px-1">
{{ getTypeCount(option.key) }}
</div>
......@@ -205,6 +206,7 @@ const {
message,
fileList,
activeType,
multiAttachmentEnabled,
subTaskId,
selectedTaskText,
selectedTaskValue,
......