| | |
| | | <template> |
| | | <el-row justify="space-between"> |
| | | <el-text>单日计划</el-text> |
| | | <el-button type="success" size="small" @click="add">新增</el-button> |
| | | <el-button |
| | | v-show="create && data && data.length > 0" |
| | | type="success" |
| | | size="small" |
| | | @click="add" |
| | | >任务调整</el-button |
| | | > |
| | | </el-row> |
| | | <el-divider /> |
| | | <div> |
| | | <el-scrollbar :height="height"> |
| | | <ItemSubTask v-for="s in data" :key="s.guid" :item="s"> |
| | | <template #default="{ item }"> |
| | | <el-button type="danger" size="small" @click="remove(item)" |
| | | >移除</el-button |
| | | <el-scrollbar v-loading="loading" :height="height"> |
| | | <el-space |
| | | v-if="data && data.length > 0" |
| | | fill |
| | | :fill-ratio="100" |
| | | direction="vertical" |
| | | style="width: 100%" |
| | | > |
| | | <ItemSubTask v-for="s in data" :key="s.guid" :item="s"> |
| | | <template #default="{ item }"> |
| | | <el-button type="danger" size="small" @click="remove(item)" |
| | | >移除</el-button |
| | | > |
| | | </template> |
| | | </ItemSubTask> |
| | | </el-space> |
| | | <div v-else> |
| | | <el-empty description="无任务记录" /> |
| | | <el-row justify="center"> |
| | | <el-button type="success" size="small" @click="add" |
| | | >添加任务</el-button |
| | | > |
| | | </template> |
| | | </ItemSubTask> |
| | | </el-row> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | |
| | | height: { |
| | | type: String, |
| | | default: '70vh' |
| | | } |
| | | }, |
| | | // 是否显示添加任务按钮 |
| | | create: Boolean, |
| | | loading: Boolean |
| | | }); |
| | | const curSubTaskList = ref([]); |
| | | |