Browse Source

fix: 如果插件列表为空

test2
xuesinan 3 years ago
parent
commit
f6a8fcefe6
  1. 1
      CHANGELOG.md
  2. 2
      components/Plugin/Plugin.vue
  3. 30
      components/Roles/Roles.vue

1
CHANGELOG.md

@ -141,6 +141,7 @@
- | 未登录时查询成员列表出错,导致角色任务获取出错问题 | [04fddb7](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/04fddb7)
- | 向上查向下查 | [1933e1b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1933e1b)
- | 项目列表排序 | [ad0ce75](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ad0ce75)
- | 消息id | [f79918b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/f79918b)
- | 小红点修复 | [ef33187](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ef33187)
- | 修复一些内容 | [3cdb1ce](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3cdb1ce)
- | 修复app打开详情页失败的问题 | [ecb943e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ecb943e)

2
components/Plugin/Plugin.vue

@ -1,6 +1,6 @@
<template>
<view class="u-font-14 rounded-md bg-white relative" style="height: 100%" @click="setStorage">
<u-badge :is-dot="true" :offset="[0, 0]" v-show="pluginInfo.remindNum > 0"></u-badge>
<u-badge :is-dot="true" :offset="[0, 0]" v-show="pluginInfo && pluginInfo.remindNum > 0"></u-badge>
<!-- <plugin-default /> -->
<!-- <component :task="task" :is="pluginComponent"></component> -->

30
components/Roles/Roles.vue

@ -87,24 +87,26 @@ watchEffect(() => {
item.global.forEach(global => {
global.remindNum = 0;
global.plugins.forEach(pluginArr => {
pluginArr.forEach(plugin => {
plugin.remindNum = 0;
remindData.value.forEach(remind => {
const remind_data = JSON.parse(remind.data);
if (item.role.id === remind_data.data.roleId) {
if (remind_data.data.taskId === global.id) {
global.remindNum++;
}
if (global.plugins && global.plugins.length) {
global.plugins.forEach(pluginArr => {
pluginArr.forEach(plugin => {
plugin.remindNum = 0;
remindData.value.forEach(remind => {
const remind_data = JSON.parse(remind.data);
if (item.role.id === remind_data.data.roleId) {
if (remind_data.data.taskId === global.id) {
global.remindNum++;
}
if (remind_data.data.taskId === global.id && remind_data.data.pluginId === plugin.pluginTaskId) {
plugin.remindNum++;
if (remind_data.data.taskId === global.id && remind_data.data.pluginId === plugin.pluginTaskId) {
plugin.remindNum++;
}
}
}
});
});
});
});
}
});
}

Loading…
Cancel
Save