hookehuyr

refactor(CheckinDetailPage): 移除mock数据并使用真实数据

清理测试用的mock数据,改为从接口获取真实数据
......@@ -230,19 +230,6 @@ const fetchTargetList = async (person_type) => {
if (code) {
targetList.value = data.gratitude_people || []
}
// TODO: 暂时mock数据
targetList.value = [{
id: '1',
name: '张三',
city: '北京',
unit: '公司'
}, {
id: '2',
name: '李四',
city: '上海',
unit: '公司'
}]
}
// 动态表单字段 (默认值,实际会根据选择的作业动态更新)
......@@ -285,13 +272,6 @@ const onConfirmTask = ({ selectedOptions }) => {
]
}
// TODO: 暂时mock数据
dynamicFormFields.value = [
{ id: 'name', label: '姓名', type: 'text', required: true },
{ id: 'city', label: '城市', type: 'textarea', required: true },
{ id: 'unit', label: '单位', type: 'textarea', required: true },
]
// 如果是计数打卡,根据选中的作业ID查询计数对象
if (taskType.value === 'count') {
fetchTargetList(personType.value)
......@@ -890,8 +870,8 @@ onMounted(async () => {
text: item.is_makeup ? '补卡:' + item.title : item.title,
value: item.id,
is_makeup: item.is_makeup, // 是否为补录
field_list: item.field_list || [], // 动态字段列表
person_type: item.person_type || '', // 打卡对象类型
field_list: item.field_list, // 动态字段列表
person_type: item.person_type, // 打卡对象类型
}))
]
}
......