Browse Source

fix: 定期任务插件

develop
lucky 4 years ago
parent
commit
92b3254720
  1. 1
      CHANGELOG.md
  2. 4
      src/components/Plugin/Plugin.vue
  3. 27
      src/components/TimeLine/component/TimeBox.vue

1
CHANGELOG.md

@ -50,6 +50,7 @@
- | 定期任务接口 | [aa4981c](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/aa4981c) - | 定期任务接口 | [aa4981c](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/aa4981c)
- | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71) - | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71)
- | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/19228d6) - | 角色栏修改 | [19228d6](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/19228d6)
- | 解决时间轴报错 | [da1eece](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/da1eece)
- | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/d533a01) - | 上下滚动时间轴 | [d533a01](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/d533a01)
- | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89) - | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89)
- | 时间轴插件 | [225d3cc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/225d3cc) - | 时间轴插件 | [225d3cc](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/225d3cc)

4
src/components/Plugin/Plugin.vue

@ -56,9 +56,9 @@ export default {
pluginId, pluginId,
styleType, styleType,
}); });
this.$emit('changeLoading', false);
this.pluginContent = res; this.pluginContent = res;
console.log(this.pluginContent); this.$emit('changeLoading', false);
console.log('+++++++++', this.pluginContent);
}, },
}, },
}; };

27
src/components/TimeLine/component/TimeBox.vue

@ -25,11 +25,11 @@
@click="changeTimeNode(item.planStart)" @click="changeTimeNode(item.planStart)"
class="h-16" class="h-16"
margin="0" margin="0"
v-if="item.plugins && item.plugins.length" v-if="showCard(item.plugins)"
> >
<!-- 任务面板插件 --> <!-- 任务面板插件 -->
<view slot="body"> <view slot="body">
<view v-if="!item.plugins && !item.plugins.length && taskLoading"> <view v-if="taskLoading">
<skeleton :banner="false" :loading="true" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton> <skeleton :banner="false" :loading="true" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton>
</view> </view>
<view class="p-0 u-col-between" v-else> <view class="p-0 u-col-between" v-else>
@ -38,11 +38,12 @@
<Plugin <Plugin
:class="getClass(plugin.colspan, plugin.rowspan)" :class="getClass(plugin.colspan, plugin.rowspan)"
:item="item" :item="item"
:key="pluginIndex" :key="plugin.pluginTaskId"
:pluginId="plugin.pluginId" :pluginId="plugin.pluginId"
:styleType="styleType" :pluginTaskId="plugin.pluginTaskId"
@changeLoading="taskLoading = false" :styleType="styleType || 0"
v-for="(plugin, pluginIndex) in p" @changeLoading="changeLoading"
v-for="plugin in p"
/> />
</view> </view>
</view> </view>
@ -93,6 +94,20 @@ export default {
getClass(col, row) { getClass(col, row) {
return [`row-span-${row}`, `col-span-${col}`]; return [`row-span-${row}`, `col-span-${col}`];
}, },
changeLoading(show) {
console.log('show: ', show);
this.taskLoading = show;
},
showCard(arr) {
console.log('arr: ', arr);
if (!arr) {
return false;
} else {
return true;
}
},
}, },
}; };
</script> </script>

Loading…
Cancel
Save