diff --git a/CHANGELOG.md b/CHANGELOG.md
index b408836..d27499f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -113,6 +113,7 @@
- | 广告页不显示 | [d749dfb](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/d749dfb)
- | 获取c插件信息 | [7b02efc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/7b02efc)
- | 交付物未上传显示小红点 | [b07621e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b07621e)
+ - | 交付物消息提示 | [880023a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/880023a)
交付物 | 修复检查人选择组件之间相互影响的bug | [435c0bd](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/435c0bd)
交付物 | 重构交付物审核部分,修复审核bug | [5fd8889](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5fd8889)
- | 解决默认角色不是第一个时显示出错问题 | [8dba578](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8dba578)
diff --git a/components/Roles/Roles.vue b/components/Roles/Roles.vue
index 17d8474..bf79dbc 100644
--- a/components/Roles/Roles.vue
+++ b/components/Roles/Roles.vue
@@ -22,7 +22,9 @@
{{ item.name }}
- {{ item.remindNum > 99 ? '99+' : item.remindNum }}
+ {{
+ item.remindNum > 99 ? '99+' : item.remindNum
+ }}
@@ -42,11 +44,14 @@ const data = reactive({
tabList: [], // tab dom节点集合
scrollLeft: 0, // scrollview需要滚动的距离
loading: false, // 是否显示骨架屏组件
- roles: [{ id: 1, name: '项目经理', mine: 0, pm: 1, sequence: 1 }, { id: 2, name: '运维', mine: 0, pm: 0, sequence: 2 }],
+ roles: [
+ { id: 1, name: '项目经理', mine: 0, pm: 1, sequence: 1 },
+ { id: 2, name: '运维', mine: 0, pm: 0, sequence: 2 },
+ ],
roleLeft: 0,
clickNum: 0,
firstClickTime: 0,
- secClickTime: 0
+ secClickTime: 0,
});
const store = useStore();
@@ -66,8 +71,8 @@ watchEffect(() => {
if (remind_data.data.roleId === role.id) {
role.remindNum++;
}
- })
- })
+ });
+ });
}
if (visibleRoles.value && visibleRoles.value.length) {
@@ -164,12 +169,12 @@ function changeRole(id, index) {
setTimeout(() => {
data.clickNum = data.firstClickTime = data.secClickTime = 0;
- }, 500)
+ }, 500);
} else if (data.clickNum === 2) {
data.secClickTime = new Date().getTime();
if (data.secClickTime - data.firstClickTime < 500) {
- let arr = [];
+ const arr = [];
remindData.value.forEach(item => {
const remind_data = JSON.parse(item.data);
if (remind_data.data.taskType === 1) {
@@ -193,7 +198,7 @@ function changeRole(id, index) {
if (i === arr.length - 1) {
nextLocationTaskId = first_option.data.taskId;
} else {
- const next_option = JSON.parse(arr[i+1].data);
+ const next_option = JSON.parse(arr[i + 1].data);
nextLocationTaskId = next_option.data.taskId;
}
}
@@ -205,8 +210,11 @@ function changeRole(id, index) {
store.commit('task/setUpNextPage', 1);
store.commit('task/setDownNextPage', 1);
// store.commit('task/setTimeLineType', timeLineType.value === 1 ? 2 : 1);
- let params = { pageNum: 1, taskId: nextLocationTaskId };
- getTasksHook.getTasks(params);
+
+ if (nextLocationTaskId) {
+ const params = { pageNum: 1, taskId: nextLocationTaskId };
+ getTasksHook.getTasks(params);
+ }
}
}
diff --git a/pages/project/project.vue b/pages/project/project.vue
index aaf3f31..e8fbfb5 100644
--- a/pages/project/project.vue
+++ b/pages/project/project.vue
@@ -28,7 +28,9 @@
- {{timeLineType === 1 ? '切换到任务模式' : '切换到时间轴模式'}}
+ {{
+ timeLineType === 1 ? '切换到任务模式' : '切换到时间轴模式'
+ }}
@@ -94,10 +96,10 @@ watch([allTasks, remindData], () => {
plugin.remindNum++;
}
}
- })
- })
- })
- })
+ });
+ });
+ });
+ });
}
if (item.task) {
@@ -120,14 +122,13 @@ watch([allTasks, remindData], () => {
plugin.remindNum++;
}
}
- })
- })
- })
+ });
+ });
+ });
}
-
- })
+ });
}
- })
+ });
}
store.commit('task/setAllTasks', allTasks.value);
@@ -151,13 +152,14 @@ watch(roleId, () => {
store.commit('task/setTimeNode', Date.now());
- let currRoleRealTasks = [], currRoleShowTasks = [];
+ let currRoleRealTasks = [];
+ let currRoleShowTasks = [];
if (allTasks.value.length) {
const index = visibleRoles.value.findIndex(role => role.id === roleId.value);
- currRoleRealTasks = allTasks.value[index].realTasks || [];
+ currRoleRealTasks = allTasks.value[index].realTasks || [];
currRoleShowTasks = allTasks.value[index].task || [];
}
- store.commit('task/setCurrRoleRealTasks', currRoleRealTasks); // 设置当前角色的真实任务数据
+ store.commit('task/setCurrRoleRealTasks', currRoleRealTasks); // 设置当前角色的真实任务数据
store.commit('task/setCurrRoleShowTasks', currRoleShowTasks); // 设置当前角色的真实任务数据
}
});
@@ -266,11 +268,12 @@ function tabsChange(e) {
const index = visibleRoles.value.findIndex(role => role.id === id);
const arr = [...allTasks.value];
store.commit('task/updateTasks', arr[index].task || []); // 更新当前store中存储的显示任务数据为当前角色的
- store.commit('task/updateRealTasks', arr[index].realTasks || []);// 更新当前store中存储的真实任务数据为当前角色的
+ store.commit('task/updateRealTasks', arr[index].realTasks || []); // 更新当前store中存储的真实任务数据为当前角色的
store.commit('task/setCurrRoleRealTasks', arr[index].realTasks || []); // 设置当前角色的真实任务数据
store.commit('task/setCurrRoleShowTasks', arr[index].task || []); // 设置当前角色的展示任务数据
store.commit('task/setUpNextPage', arr[index].upNextPage || 1); // 设置当前角色的真实任务数据的向上查询页数
store.commit('task/setDownNextPage', arr[index].downNextPage || 1); // 设置当前角色的真实任务数据向下查询页数
+ store.commit('socket/setCurrLocationTaskId', '');
}
// 设置自动滚动位置
@@ -305,7 +308,7 @@ function changeModal() {
store.commit('task/setUpNextPage', 1);
store.commit('task/setDownNextPage', 1);
store.commit('task/setTimeLineType', timeLineType.value === 1 ? 2 : 1);
- let params = { pageNum: 1, taskId: currLocationTaskId.value };
+ const params = { pageNum: 1, taskId: currLocationTaskId.value };
getTasksHook.getTasks(params);
}