From 3908a403cb3a852bee96414a8bb82b88371e7b5a Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 22 十月 2024 11:42:33 +0800 Subject: [PATCH] 1. 任务调整模块修改(暂存) --- src/views/fysp/task/components/CompSubTaskList.vue | 43 ++++++++++++++++++++++++++++++++++--------- 1 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/views/fysp/task/components/CompSubTaskList.vue b/src/views/fysp/task/components/CompSubTaskList.vue index 70f3f85..b84adbd 100644 --- a/src/views/fysp/task/components/CompSubTaskList.vue +++ b/src/views/fysp/task/components/CompSubTaskList.vue @@ -1,18 +1,40 @@ <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> @@ -24,7 +46,10 @@ height: { type: String, default: '70vh' - } + }, + // 鏄惁鏄剧ず娣诲姞浠诲姟鎸夐挳 + create: Boolean, + loading: Boolean }); const curSubTaskList = ref([]); -- Gitblit v1.9.3