From 971c7c5993ff475157b0c9ed137998fd39f6c548 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 17 十月 2024 17:17:33 +0800
Subject: [PATCH] 1. 完成总任务的管理模块(单日任务的管理未完成)

---
 src/views/fysp/task/components/CompMonitorObj.vue |   60 ++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 46 insertions(+), 14 deletions(-)

diff --git a/src/views/fysp/task/components/CompMonitorObj.vue b/src/views/fysp/task/components/CompMonitorObj.vue
index 327787e..0047d9f 100644
--- a/src/views/fysp/task/components/CompMonitorObj.vue
+++ b/src/views/fysp/task/components/CompMonitorObj.vue
@@ -1,17 +1,40 @@
 <template>
-  <div>
-    <el-segmented :model-value="activeName" :options="activeTabs" @change="tabChange" />
+  <div class="monitor-obj-wrapper">
+    <el-affix v-if="affix" :offset="60" target=".monitor-obj-wrapper">
+      <div>
+        <el-segmented
+          :model-value="activeName"
+          :options="activeTabs"
+          @change="tabChange"
+        />
+      </div>
+    </el-affix>
+    <div v-else>
+      <el-segmented
+        :model-value="activeName"
+        :options="activeTabs"
+        @change="tabChange"
+      />
+    </div>
+    <el-scrollbar :height="height">
+      <el-space wrap>
+        <ItemMonitorObj v-for="obj in activeData" :key="obj.movid" :item="obj">
+          <template #default="{ item }">
+            <slot :item="item">
+              <el-button
+                v-if="showBtn"
+                size="small"
+                plain
+                :type="btnType"
+                @click="itemClick(item)"
+                >{{ btnName }}</el-button
+              >
+            </slot>
+          </template>
+        </ItemMonitorObj>
+      </el-space>
+    </el-scrollbar>
   </div>
-  <el-space wrap>
-    <ItemMonitorObj v-for="obj in activeData" :key="obj.movid" :item="obj">
-      <template #default="{ item }">
-        <!-- <slot :item="item"></slot> -->
-        <el-button v-if="showBtn" size="small" type="danger" @click="itemClick(item)">{{
-          btnName
-        }}</el-button>
-      </template>
-    </ItemMonitorObj>
-  </el-space>
 </template>
 
 <script>
@@ -34,7 +57,14 @@
     btnName: {
       type: String,
       default: '绉婚櫎'
-    }
+    },
+    btnType: {
+      type: String,
+      default: 'danger'
+    },
+    // 澶撮儴閫夐」鏄惁鍚搁《
+    affix: Boolean,
+    height: String
   },
   emits: ['update:tabName', 'update:showData', 'itemClick'],
   data() {
@@ -46,7 +76,9 @@
   computed: {
     activeData() {
       const list = this.data.filter((v) => {
-        return this.activeName == defaultTabName || v.sceneType == this.activeName;
+        return (
+          this.activeName == defaultTabName || v.sceneType == this.activeName
+        );
         // return this.tabName == defaultTabName || v.sceneType == this.tabName;
       });
       this.$emit('update:showData', list);

--
Gitblit v1.9.3