Browse Source

fix: 定期任务插件

tall
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)
- | 骨架屏替换 | [e9fdd71](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/e9fdd71)
- | 角色栏修改 | [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)
- | 上下滑动加载定期任务 | [4090d89](https://dd.tall.wiki/gitea/wally/TALL-MUI-3/commits/4090d89)
- | 时间轴插件 | [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,
styleType,
});
this.$emit('changeLoading', false);
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)"
class="h-16"
margin="0"
v-if="item.plugins && item.plugins.length"
v-if="showCard(item.plugins)"
>
<!-- 任务面板插件 -->
<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>
</view>
<view class="p-0 u-col-between" v-else>
@ -38,11 +38,12 @@
<Plugin
:class="getClass(plugin.colspan, plugin.rowspan)"
:item="item"
:key="pluginIndex"
:key="plugin.pluginTaskId"
:pluginId="plugin.pluginId"
:styleType="styleType"
@changeLoading="taskLoading = false"
v-for="(plugin, pluginIndex) in p"
:pluginTaskId="plugin.pluginTaskId"
:styleType="styleType || 0"
@changeLoading="changeLoading"
v-for="plugin in p"
/>
</view>
</view>
@ -93,6 +94,20 @@ export default {
getClass(col, row) {
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>

Loading…
Cancel
Save