对接首页消息通知、巡检点 切换小区获取最新数据
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user