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 |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/views/fysp/task/components/CompSubTaskList.vue b/src/views/fysp/task/components/CompSubTaskList.vue
index d6cc205..b84adbd 100644
--- a/src/views/fysp/task/components/CompSubTaskList.vue
+++ b/src/views/fysp/task/components/CompSubTaskList.vue
@@ -1,12 +1,24 @@
 <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">
-      <el-space fill direction="vertical">
+    <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)"
@@ -15,6 +27,14 @@
           </template>
         </ItemSubTask>
       </el-space>
+      <div v-else>
+        <el-empty description="鏃犱换鍔¤褰�" />
+        <el-row justify="center">
+          <el-button type="success" size="small" @click="add"
+            >娣诲姞浠诲姟</el-button
+          >
+        </el-row>
+      </div>
     </el-scrollbar>
   </div>
 </template>
@@ -26,7 +46,10 @@
   height: {
     type: String,
     default: '70vh'
-  }
+  },
+  // 鏄惁鏄剧ず娣诲姞浠诲姟鎸夐挳
+  create: Boolean,
+  loading: Boolean
 });
 const curSubTaskList = ref([]);
 

--
Gitblit v1.9.3