|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<view class="px-3 pb-10"> |
|
|
|
<view :key="index" v-for="(item, index) in list"> |
|
|
|
<view :key="index" v-for="(item, index) in tasks"> |
|
|
|
<view class="flex items-center"> |
|
|
|
<TimeStatus :content="JSON.stringify(item.state)" :status="item.state" /> |
|
|
|
<view class="flex-1 ml-2 flex justify-between"> |
|
|
@ -16,23 +16,30 @@ |
|
|
|
</view> |
|
|
|
<view class="border-l-2 border-gray-300 ml-3.5 my-2"> |
|
|
|
<view class="ml-4 shadow-lg task-box overflow-hidden"> |
|
|
|
<u-card :show-foot="false" :show-head="false" :style="{ height: item.TaskPanel.height + 'px' }" class="h-16" margin="0"> |
|
|
|
<u-card |
|
|
|
:show-foot="false" |
|
|
|
:show-head="false" |
|
|
|
:style="{ height: item.panel.height + 'px' }" |
|
|
|
class="h-16" |
|
|
|
margin="0" |
|
|
|
v-if="item.panel.height" |
|
|
|
> |
|
|
|
<view slot="body"> |
|
|
|
<view :key="pluginIndex" class="u-col-between p-0 u-skeleton" v-for="(plugin, pluginIndex) in item.plugins"> |
|
|
|
<!-- <view :key="p.pluginId" v-for="p in plugin"> |
|
|
|
<view :key="p.pluginId" v-for="p in plugin"> |
|
|
|
<component |
|
|
|
:is="$t.plugin.defaults.find(item => item.id === p.pluginId).component" |
|
|
|
:item="item" |
|
|
|
v-if="$t.plugin.defaults.find(item => item.id === p.pluginId)" |
|
|
|
></component> |
|
|
|
</view>--> |
|
|
|
<view :key="p.pluginId" v-for="p in plugin"> |
|
|
|
</view> |
|
|
|
<!-- <view :key="p.pluginId" v-for="p in plugin"> |
|
|
|
<text v-if="p.pluginId === 4">这是个基准线</text> |
|
|
|
<component :is="currentComponent"></component> |
|
|
|
<task-title v-if="p.pluginId === 1" /> |
|
|
|
<task-description v-if="p.pluginId === 2" /> |
|
|
|
<task-duration-delay v-if="p.pluginId === 3" /> |
|
|
|
</view> |
|
|
|
</view>--> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</u-card> |
|
|
@ -56,59 +63,28 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
currentComponent: '', |
|
|
|
list: [ |
|
|
|
{ |
|
|
|
state: 0, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 2 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
state: 1, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 2 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
state: 2, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 3 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
state: 3, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 4 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
state: 0, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 5 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
state: 1, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 6 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
}, |
|
|
|
], |
|
|
|
|
|
|
|
addList: [ |
|
|
|
{ |
|
|
|
state: 0, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 2 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
panel: { height: '100' }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
state: 0, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 2 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
panel: { height: '100' }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
state: 0, |
|
|
|
plugins: [[{ pluginId: 1 }], [{ pluginId: 3 }]], |
|
|
|
TaskPanel: { height: '100' }, |
|
|
|
panel: { height: '100' }, |
|
|
|
}, |
|
|
|
], |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
computed: mapState('home', ['roleId', 'timeNode', 'timeUnit']), |
|
|
|
computed: mapState('home', ['roleId', 'timeNode', 'timeUnit', 'tasks']), |
|
|
|
|
|
|
|
created() {}, |
|
|
|
|
|
|
@ -116,11 +92,11 @@ export default { |
|
|
|
...mapMutations('home', ['setTipsContent', 'setTipsContent']), |
|
|
|
|
|
|
|
addTopList() { |
|
|
|
this.list = this.addList.concat(this.list); |
|
|
|
this.tasks = this.addList.concat(this.tasks); |
|
|
|
}, |
|
|
|
|
|
|
|
addBottomList() { |
|
|
|
this.list = this.list.concat(this.addList); |
|
|
|
this.tasks = this.tasks.concat(this.addList); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|