refactor(打卡): 移除测试数据和删除功能
清理CheckinDetailPage中的测试数据并移除CheckinTargetList的删除选项
Showing
2 changed files
with
2 additions
and
17 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-12-16 11:44:27 | 2 | * @Date: 2025-12-16 11:44:27 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-12-16 17:59:29 | 4 | + * @LastEditTime: 2025-12-16 18:19:56 |
| 5 | * @FilePath: /mlaj/src/components/count/CheckinTargetList.vue | 5 | * @FilePath: /mlaj/src/components/count/CheckinTargetList.vue |
| 6 | * @Description: 打卡动态对象列表组件 | 6 | * @Description: 打卡动态对象列表组件 |
| 7 | --> | 7 | --> |
| ... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
| 10 | <div class="flex justify-between items-center mb-2 mx-2"> | 10 | <div class="flex justify-between items-center mb-2 mx-2"> |
| 11 | <div class="flex items-center gap-2"> | 11 | <div class="flex items-center gap-2"> |
| 12 | <div class="text-sm font-bold text-gray-700">{{ dynamicFieldText }}列表</div> | 12 | <div class="text-sm font-bold text-gray-700">{{ dynamicFieldText }}列表</div> |
| 13 | - <div class="text-xs text-gray-400 font-normal scale-90 origin-left">(长按可编辑/删除)</div> | 13 | + <div class="text-xs text-gray-400 font-normal scale-90 origin-left">(列表项长按可编辑)</div> |
| 14 | </div> | 14 | </div> |
| 15 | <van-button size="small" type="primary" plain icon="plus" @click="onAdd" class="!h-7">添加</van-button> | 15 | <van-button size="small" type="primary" plain icon="plus" @click="onAdd" class="!h-7">添加</van-button> |
| 16 | </div> | 16 | </div> |
| ... | @@ -115,7 +115,6 @@ const currentItem = ref(null) | ... | @@ -115,7 +115,6 @@ const currentItem = ref(null) |
| 115 | 115 | ||
| 116 | const actions = [ | 116 | const actions = [ |
| 117 | { name: '编辑', color: '#1989fa', action: 'edit' }, | 117 | { name: '编辑', color: '#1989fa', action: 'edit' }, |
| 118 | - { name: '删除', color: '#ee0a24', action: 'delete' } | ||
| 119 | ] | 118 | ] |
| 120 | 119 | ||
| 121 | const startLongPress = (item) => { | 120 | const startLongPress = (item) => { | ... | ... |
| ... | @@ -229,18 +229,6 @@ const fetchTargetList = async (subtask_id) => { | ... | @@ -229,18 +229,6 @@ const fetchTargetList = async (subtask_id) => { |
| 229 | if (code) { | 229 | if (code) { |
| 230 | targetList.value = data.gratitude_people || [] | 230 | targetList.value = data.gratitude_people || [] |
| 231 | } | 231 | } |
| 232 | - | ||
| 233 | - targetList.value = [{ | ||
| 234 | - id: 1, | ||
| 235 | - name: '张三', | ||
| 236 | - city: '北京', | ||
| 237 | - unit: '公司', | ||
| 238 | - }, { | ||
| 239 | - id: 2, | ||
| 240 | - name: '李四', | ||
| 241 | - city: '上海', | ||
| 242 | - unit: '公司', | ||
| 243 | - }] | ||
| 244 | } | 232 | } |
| 245 | 233 | ||
| 246 | // 动态表单字段 (默认值,实际会根据选择的作业动态更新) | 234 | // 动态表单字段 (默认值,实际会根据选择的作业动态更新) |
| ... | @@ -386,8 +374,6 @@ const confirmAddTarget = async (formFields) => { | ... | @@ -386,8 +374,6 @@ const confirmAddTarget = async (formFields) => { |
| 386 | targetList.value.push({ | 374 | targetList.value.push({ |
| 387 | ...formData, | 375 | ...formData, |
| 388 | }) | 376 | }) |
| 389 | - console.warn(formData); | ||
| 390 | - console.warn(targetList.value); | ||
| 391 | showToast('新增成功') | 377 | showToast('新增成功') |
| 392 | } | 378 | } |
| 393 | 379 | ... | ... |
-
Please register or login to post a comment