diff --git a/CHANGELOG.md b/CHANGELOG.md index 57fb1ea..65abe94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -149,6 +149,7 @@ - | 解决warning | [dcb0079](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/dcb0079) - | 没有新消息双击按照上一个角色的任务id跳转的问题 | [eade2dd](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/eade2dd) - | 拍照上传交付物 | [1cbb2ac](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/1cbb2ac) + - | 切换时间轴模式更新 | [714ba49](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/714ba49) - | 切换项目存储的任务id未清空 | [77fe17f](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/77fe17f) - | 切换项目任务清空 | [1dd3b4b](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/1dd3b4b) - | 日历列表H5在手机端不显示 | [0b4ae72](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/0b4ae72) diff --git a/hooks/project/useGetTasks.js b/hooks/project/useGetTasks.js index c83fa6b..6d84b0d 100644 --- a/hooks/project/useGetTasks.js +++ b/hooks/project/useGetTasks.js @@ -37,9 +37,8 @@ export default function useGetTasks() { // 初始化 定期任务 async function initPlanTasks(params) { // uni.$ui.showLoading(); - if (timeLineType.value === 1) setNextPlaceholderTasks(); - await getTasks(params); // 获取初始数据 + await getTasks(params || {}); // 获取初始数据 } /** diff --git a/pages/project/project.vue b/pages/project/project.vue index eb18b50..316d07d 100644 --- a/pages/project/project.vue +++ b/pages/project/project.vue @@ -28,9 +28,10 @@ - + + @@ -61,13 +62,7 @@ const height = ref(null); // 页面高度 const timeLineType = computed(() => store.state.task.timeLineType); // 时间轴模式 const remindData = computed(() => store.state.socket.remindData); // 时间轴模式 const currLocationTaskId = computed(() => store.state.socket.currLocationTaskId); // 前需要定位到的任务id -const targetTaskId = computed(() => store.state.task.targetTaskId); // 前需要定位到的任务id - -onMounted(() => { - const system = uni.getSystemInfoSync(); - height.value = `${system.screenHeight}px`; - console.log('项目详情onMounted') -}); +// const targetTaskId = computed(() => store.state.task.targetTaskId); // 前需要定位到的任务id if (!userInfo.value) { const res = uni.$storage.getStorageSync('user'); @@ -76,6 +71,13 @@ if (!userInfo.value) { } } +onMounted(() => { + const system = uni.getSystemInfoSync(); + height.value = `${system.screenHeight}px`; + console.log('项目详情onMounted') + // initHook.init(); +}); + onUnmounted(() => { console.log('卸载组件实例后调用'); clearTasksData(); @@ -326,7 +328,7 @@ function changeModal() { store.commit('task/setUpNextPage', 1); store.commit('task/setDownNextPage', 1); store.commit('task/setTimeLineType', timeLineType.value === 1 ? 2 : 1); - const params = { pageNum: 1, taskId: currLocationTaskId.value }; + const params = { taskId: currLocationTaskId.value }; getTasksHook.initPlanTasks(params); }