对接首页消息通知、巡检点 切换小区获取最新数据

This commit is contained in:
zhouyanli
2026-05-15 16:06:32 +08:00
parent 8324d096c0
commit 856f36455c
17 changed files with 425 additions and 770 deletions

View File

@@ -99,15 +99,25 @@ onLoad(() =>{
fetchProjectList()
})
// 选择项目并跳转到维修项目填写页
// 选择项目并返回到维修项目填写页
const selectProject = (item) => {
// 获取分类名称
const categoryName = categoryList.value.find(c => c.id === item.categoryId)?.projectName
// 跳转并传参
uni.navigateTo({
url: `/pageSubPack/fault-reporting/fault-reporting?category=${categoryName}&project=${item.projectName}&projectId=${item.id}`
const categoryName = categoryList.value.find(c => c.id === item.categoryId)?.projectName || '';
// 用全局事件发送参数
uni.$emit('selectRepairProject', {
category: categoryName, // 分类名
project: item.projectName, // 项目名
projectId: item.id // 项目ID
})
// 返回上一页
uni.navigateBack({
delta: 1
})
}
</script>
<style scoped>