refactor(CheckinDetailPage): 移除mock数据并使用真实数据
清理测试用的mock数据,改为从接口获取真实数据
Showing
1 changed file
with
2 additions
and
22 deletions
| ... | @@ -230,19 +230,6 @@ const fetchTargetList = async (person_type) => { | ... | @@ -230,19 +230,6 @@ const fetchTargetList = async (person_type) => { |
| 230 | if (code) { | 230 | if (code) { |
| 231 | targetList.value = data.gratitude_people || [] | 231 | targetList.value = data.gratitude_people || [] |
| 232 | } | 232 | } |
| 233 | - | ||
| 234 | - // TODO: 暂时mock数据 | ||
| 235 | - targetList.value = [{ | ||
| 236 | - id: '1', | ||
| 237 | - name: '张三', | ||
| 238 | - city: '北京', | ||
| 239 | - unit: '公司' | ||
| 240 | - }, { | ||
| 241 | - id: '2', | ||
| 242 | - name: '李四', | ||
| 243 | - city: '上海', | ||
| 244 | - unit: '公司' | ||
| 245 | - }] | ||
| 246 | } | 233 | } |
| 247 | 234 | ||
| 248 | // 动态表单字段 (默认值,实际会根据选择的作业动态更新) | 235 | // 动态表单字段 (默认值,实际会根据选择的作业动态更新) |
| ... | @@ -285,13 +272,6 @@ const onConfirmTask = ({ selectedOptions }) => { | ... | @@ -285,13 +272,6 @@ const onConfirmTask = ({ selectedOptions }) => { |
| 285 | ] | 272 | ] |
| 286 | } | 273 | } |
| 287 | 274 | ||
| 288 | - // TODO: 暂时mock数据 | ||
| 289 | - dynamicFormFields.value = [ | ||
| 290 | - { id: 'name', label: '姓名', type: 'text', required: true }, | ||
| 291 | - { id: 'city', label: '城市', type: 'textarea', required: true }, | ||
| 292 | - { id: 'unit', label: '单位', type: 'textarea', required: true }, | ||
| 293 | - ] | ||
| 294 | - | ||
| 295 | // 如果是计数打卡,根据选中的作业ID查询计数对象 | 275 | // 如果是计数打卡,根据选中的作业ID查询计数对象 |
| 296 | if (taskType.value === 'count') { | 276 | if (taskType.value === 'count') { |
| 297 | fetchTargetList(personType.value) | 277 | fetchTargetList(personType.value) |
| ... | @@ -890,8 +870,8 @@ onMounted(async () => { | ... | @@ -890,8 +870,8 @@ onMounted(async () => { |
| 890 | text: item.is_makeup ? '补卡:' + item.title : item.title, | 870 | text: item.is_makeup ? '补卡:' + item.title : item.title, |
| 891 | value: item.id, | 871 | value: item.id, |
| 892 | is_makeup: item.is_makeup, // 是否为补录 | 872 | is_makeup: item.is_makeup, // 是否为补录 |
| 893 | - field_list: item.field_list || [], // 动态字段列表 | 873 | + field_list: item.field_list, // 动态字段列表 |
| 894 | - person_type: item.person_type || '', // 打卡对象类型 | 874 | + person_type: item.person_type, // 打卡对象类型 |
| 895 | })) | 875 | })) |
| 896 | ] | 876 | ] |
| 897 | } | 877 | } | ... | ... |
-
Please register or login to post a comment