Browse Source

fix: 返回之后重新打开未刷新

test2
xuesinan 3 years ago
parent
commit
56fa411897
  1. 3
      CHANGELOG.md
  2. 1
      components/Roles/Roles.vue
  3. 23
      pages/project/project.vue

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 1.0.0 (2022-07-26)
# 1.0.0 (2022-07-28)
### 🌟 新功能
范围|描述|commitId
@ -46,6 +46,7 @@
- | 切换时间轴模式按钮变小 | [f8a333d](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/f8a333d)
- | 日历页首页 | [561c8e6](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/561c8e6)
- | 日历页添加 | [1b46a91](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/1b46a91)
- | 删除无用代码 | [e075321](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/e075321)
- | 删除项目 | [f43d4ba](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/f43d4ba)
- | 上传新项目结果提示 | [2625734](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/2625734)
- | 设置项目域名 | [1a835f1](https://101.201.226.163:50022/ccsens_tall/TALL-MUI-4/commits/1a835f1)

1
components/Roles/Roles.vue

@ -64,7 +64,6 @@ const remindData = computed(() => store.state.socket.remindData); // 小红点
const currLocationTaskId = computed(() => store.state.socket.currLocationTaskId); // id
watch(visibleRoles, () => {
console.log('角色列表更新')
if (remindData.value && visibleRoles.value) {
visibleRoles.value.forEach(role => {
role.remindNum = 0;

23
pages/project/project.vue

@ -78,7 +78,8 @@ if (!userInfo.value) {
onUnmounted(() => {
console.log('卸载组件实例后调用');
clearTasksData();
store.commit('socket/setCurrLocationTaskId', '');
store.commit('role/setRoleId', ''); // id
store.commit('socket/setCurrLocationTaskId', ''); // id
});
watch(remindData, () => {
@ -199,26 +200,6 @@ watch(timeNode, newValue => {
}
});
/**
* 当收到打开新项目消息状态时
* 重新根据时间和角色查询普通日常任务
* 永久日常任务不发生改变
*/
// watch(newProjectInfo, newValue => {
// if (newValue && newValue.value.projectId && newValue.value.url) {
// uni.$u.route('/', {
// u: userId.value,
// p: newValue.value.projectId,
// url: newValue.value.url,
// });
// clearTasksData();
// store.commit('role/setRoleId', '');
// const options = uni.$route.query;
// initHook.init(options);
// }
// });
watch(globals, () => {
// allTasks
const index = visibleRoles.value.findIndex(role => role.id === roleId.value);

Loading…
Cancel
Save