|
|
@ -4,7 +4,9 @@ |
|
|
|
<view class="flex"> |
|
|
|
<TimeStatus :content="JSON.stringify(item.process)" :status="item.process" /> |
|
|
|
<view class="flex justify-between items-center flex-1 ml-2"> |
|
|
|
<view>{{ $moment(+item.planStart).format('MM-DD HH:mm') }} {{ $t.time.formatDuration(item.planDuration) }}</view> |
|
|
|
<view> |
|
|
|
<span>{{ $moment(+item.planStart).format('MM-DD HH:mm') }}</span> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view class="flex justify-between" style="min-width: 180rpx"> |
|
|
|
<u-icon custom-prefix="custom-icon" name="C-bxl-redux" size="34"></u-icon> |
|
|
@ -23,33 +25,28 @@ |
|
|
|
@click="changeTimeNode(item.planStart)" |
|
|
|
class="h-16" |
|
|
|
margin="0" |
|
|
|
v-if="item.plugins && item.plugins.length" |
|
|
|
> |
|
|
|
<!-- 任务面板插件 --> |
|
|
|
<view slot="body"> |
|
|
|
<skeleton :banner="false" :loading="!item.plugins.length" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton> |
|
|
|
<view class="p-0 u-col-between"> |
|
|
|
<view class="grid grid-cols-3 gap-2 h-36" v-if="item.plugins.length"> |
|
|
|
<Plugin |
|
|
|
:class="getClass(plugin.col, plugin.row)" |
|
|
|
:key="pluginIndex" |
|
|
|
:pluginId="plugin.pluginId" |
|
|
|
:styleType="styleType" |
|
|
|
v-for="(plugin, pluginIndex) in item.plugins" |
|
|
|
/> |
|
|
|
</view> |
|
|
|
<view v-if="!item.plugins && !item.plugins.length && taskLoading"> |
|
|
|
<skeleton :banner="false" :loading="true" :row="4" animate class="mt-2 u-line-2 skeleton"></skeleton> |
|
|
|
</view> |
|
|
|
<!-- <view :key="pluginIndex" class="p-0 u-col-between u-skeleton" v-for="(plugin, pluginIndex) in item.plugins"> |
|
|
|
<view :key="p.pluginId" v-for="p in plugin"> |
|
|
|
<p-task-title :item="item" v-if="p.pluginId === 1" /> |
|
|
|
<p-task-description :item="item" v-if="p.pluginId === 2" /> |
|
|
|
<p-task-duration-delay :item="item" v-if="p.pluginId === 3" /> |
|
|
|
<p-task-start-time-delay :item="item" v-if="p.pluginId === 4" /> |
|
|
|
<p-deliverable :item="item" v-if="p.pluginId === 5" /> |
|
|
|
<p-subtasks :item="item" v-if="p.pluginId === 6" /> |
|
|
|
<p-subproject :item="item" v-if="p.pluginId === 7" /> |
|
|
|
<p-task-countdown :item="item" v-if="p.pluginId === 8" /> |
|
|
|
<view class="p-0 u-col-between" v-else> |
|
|
|
<view :key="pIndex" v-for="(p, pIndex) in item.plugins"> |
|
|
|
<view class="grid gap-2" v-if="p.length"> |
|
|
|
<Plugin |
|
|
|
:class="getClass(plugin.col, plugin.row)" |
|
|
|
:item="item" |
|
|
|
:key="pluginIndex" |
|
|
|
:pluginId="plugin.pluginId" |
|
|
|
:styleType="styleType" |
|
|
|
@changeLoading="taskLoading = false" |
|
|
|
v-for="(plugin, pluginIndex) in p" |
|
|
|
/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view>--> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</u-card> |
|
|
|
</view> |
|
|
@ -68,7 +65,7 @@ export default { |
|
|
|
name: 'TimeBox', |
|
|
|
components: { TimeStatus, Skeleton }, |
|
|
|
data() { |
|
|
|
return { currentComponent: '', styleType: 0 }; |
|
|
|
return { currentComponent: '', styleType: 0, taskLoading: true }; |
|
|
|
}, |
|
|
|
|
|
|
|
computed: mapState('home', ['roleId', 'timeNode', 'timeUnit', 'tasks']), |
|
|
@ -92,6 +89,7 @@ export default { |
|
|
|
this.setTimeNode(time); |
|
|
|
}, |
|
|
|
|
|
|
|
// 设置网格布局 |
|
|
|
getClass(col, row) { |
|
|
|
return [`row-span-${row}`, `col-span-${col}`]; |
|
|
|
}, |
|
|
|