|
|
@ -28,9 +28,10 @@ |
|
|
|
<!-- <u-button @click="$store.commit('setTheme', 'theme-test')">测试切换主题</u-button> --> |
|
|
|
</view> |
|
|
|
|
|
|
|
<u-button size="mini" style="position: fixed; bottom: 20px; left: 100px;" @click="changeModal"> |
|
|
|
<!-- 点击切换时间轴样式 --> |
|
|
|
<!-- <u-button size="mini" style="position: fixed; bottom: 20px; left: 100px;" @click="changeModal"> |
|
|
|
{{ timeLineType === 1 ? '切换到任务模式' : '切换到时间轴模式' }} |
|
|
|
</u-button> |
|
|
|
</u-button> --> |
|
|
|
</theme> |
|
|
|
</template> |
|
|
|
|
|
|
@ -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); |
|
|
|
} |
|
|
|
</script> |
|
|
|