From 832896ccaf8ac6a8ca31394e55577f064bc5eacf Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期一, 20 十二月 2021 11:05:48 +0800
Subject: [PATCH] 暂存

---
 src/pages/library/components/baseList.vue |  226 +++++++------------------------------------------------
 1 files changed, 31 insertions(+), 195 deletions(-)

diff --git a/src/pages/library/components/baseList.vue b/src/pages/library/components/baseList.vue
index e2e91b9..d834691 100644
--- a/src/pages/library/components/baseList.vue
+++ b/src/pages/library/components/baseList.vue
@@ -26,18 +26,7 @@
             @click.stop="add('sync')"
             v-if="isShow('library:set')"
           ></span>
-          <!-- <i
-            class="el-icon-circle-plus-outline ml10"
-            style="font-size: 20px; color: #3d68e1"
-           
-          ></i> -->
-          <!-- <span
-            class="m5"
-            style="font-size: 14px; color: #3d68e1"
-            @click.stop="add('sync')"
-            v-if="isShow('library:set')"
-            >鏂板</span
-          > -->
+        
         </template>
         <div class="max-height">
           <el-row
@@ -70,45 +59,11 @@
               </p>
             </el-col>
             <el-col :span="10" :offset="1">
-              <!-- <el-switch
-                :active-value="1"
-                :inactive-value="0"
-                v-model="item.enable"
-                size="small"
-                style="margin-top: -7px"
-                :disabled="isDisabled(item)"
-                @change="setEnable(item)"
-              >
-              
-              </el-switch> -->
-              <!-- <div class="status-dot"></div> -->
+            
               <div
                 class="status-dot"
                 :style="item.enable == 1 ? { background: '#4E94FF' } : {}"
               ></div>
-              <!-- <el-tooltip
-                content="缂栬緫"
-                placement="top"
-                popper-class="atooltip"
-              >
-                <span
-                  class="iconfont iconbianji iconStyle1"
-                  @click.stop="edit(item, 'sync')"
-                  v-if="isShow('library:set')"
-                ></span>
-              </el-tooltip> -->
-              <!-- <el-tooltip
-                content="鍒犻櫎"
-                placement="top"
-                popper-class="atooltip"
-              >
-                <span
-                  class="iconfont iconshanchu iconStyle1"
-                  style="color: #e74c3c"
-                  v-if="isShow('library:set')"
-                  @click.stop="deleteBase(item.id)"
-                ></span>
-              </el-tooltip> -->
             </el-col>
             <el-col
               :span="24"
@@ -143,19 +98,6 @@
             @click.stop="add('local')"
             v-if="isShow('library:set')"
           ></span>
-
-          <!-- <i
-            class="el-icon-circle-plus-outline ml10"
-            style="font-size: 20px; color: #3d68e1"
-          
-          ></i> -->
-          <!-- <span
-            class="m5"
-            style="font-size: 14px; color: #3d68e1"
-            @click.stop="add('local')"
-            v-if="isShow('library:set')"
-            >鏂板</span
-          > -->
         </template>
         <div class="max-height">
           <el-row
@@ -186,43 +128,11 @@
               </p>
             </el-col>
             <el-col :span="10" :offset="1">
-              <!-- <el-switch
-                :active-value="1"
-                :inactive-value="0"
-                v-model="item.enable"
-                size="small"
-                style="margin-top: -7px"
-                :disabled="isDisabled(item)"
-                @change="setEnable(item)"
-              ></el-switch> -->
+           
               <div
                 class="status-dot"
                 :style="item.enable == 1 ? { background: '#4E94FF' } : {}"
               ></div>
-
-              <!-- <el-tooltip
-                content="缂栬緫"
-                placement="top"
-                popper-class="atooltip"
-              >
-                <span
-                  class="iconfont iconbianji iconStyle1"
-                  @click.stop="edit(item, 'local')"
-                  v-if="isShow('library:set')"
-                ></span>
-              </el-tooltip> -->
-              <!-- <el-tooltip
-                content="鍒犻櫎"
-                placement="top"
-                popper-class="atooltip"
-              >
-                <span
-                  class="iconfont iconshanchu iconStyle1"
-                  style="color: #e74c3c"
-                  v-if="isShow('library:set')"
-                  @click.stop="deleteBase(item.id)"
-                ></span>
-              </el-tooltip> -->
             </el-col>
             <el-col
               :span="24"
@@ -263,7 +173,6 @@
     };
   },
   computed: {
-    // eslint-disable-next-line vue/return-in-computed-property
     isAdmin() {
       if (
         sessionStorage.getItem("userInfo") &&
@@ -296,90 +205,14 @@
       this.localTableList = this.BaseManageData.localTables;
       this.defaultShow();
     },
-    handleChange(val) {
-      console.log(val);
-    },
-    async setEnable(item) {
-      let res = await updateDbTableStatus({
-        id: item.id,
-        enable: item.enable,
-      });
-      if (res.success === true) {
-        this.$notify({
-          type: "success",
-          message: "搴曞簱鎴愬姛鍙樻洿鐢熸晥鐘舵�侊紒",
-        });
-      } else {
-        this.$notify({
-          type: "error",
-          message: "搴曞簱鍙樻洿鐢熸晥鐘舵�佸け璐ワ紒",
-        });
-      }
-    },
     add(type) {
       this.$emit("changeShow", null, type);
     },
-    isDisabled(item) {
-      var flag = true;
-      if (this.isShow("library:set")) {
-        if (item.endTime == "") {
-          flag = false;
-        } else {
-          flag = !this.$moment(new Date()).isBetween(
-            item.startTime,
-            item.endTime
-          );
-        }
-      }
-      return flag;
-    },
     clickCategory(index, type, item) {
-      // 杩欓噷鎴戜滑浼犲叆涓�涓綋鍓嶅��
       this.categoryIndex = type + index;
       // 璋冪敤鍒囨崲鍙充晶闈㈡澘鐨勫嚱鏁板苟涓斿垏鎹㈢埗缁勪欢涓璱sSelected鐨勫�艰鍙︿竴涓粍浠舵竻闄よ閫変腑鐘舵��
-      // this.$emit('clearSelected')
       this.clickBase = item;
       this.$emit("getList", item, type);
-    },
-    edit(item, type) {
-      this.$emit("changeShow", item, type);
-    },
-    deleteBase(id) {
-      debugger;
-      let token =
-        sessionStorage.getItem("loginedInfo") &&
-        JSON.parse(sessionStorage.getItem("loginedInfo")).access_token;
-      this.$confirm("鎻愮ず锛氱‘瀹氬垹闄ゅ簳搴擄紵", {
-        center: true,
-        cancelButtonClass: "comfirm-class-cancle",
-        confirmButtonClass: "comfirm-class-sure",
-      }).then(() => {
-        fetch(`/data/api-v/dbtable/deleteDBtablesById?id=${id}`, {
-          method: "GET",
-          headers: {
-            "Content-Type": "application/json",
-            Authorization: token,
-          },
-        })
-          .then((res) => {
-            return res.json();
-          })
-          .then((res) => {
-            if (res.success) {
-              this.$notify({
-                type: "success",
-                message: "搴曞簱鍒犻櫎鎴愬姛锛�",
-              });
-            }
-            this.init();
-          })
-          .catch((err) => {
-            this.$notify({
-              type: "error",
-              message: err,
-            });
-          });
-      });
     },
     // 榛樿鏄剧ず绗竴涓簱鐨勬暟鎹�
     defaultShow() {
@@ -413,29 +246,29 @@
         return false;
       }
     },
-    dateCompare(dateString, compareDateString) {
-      // dateString:褰撳墠鏃堕棿
-      // compareDateString:闇�瑕佹瘮杈冪殑鏃堕棿
-      if (this.isEmpty(dateString)) {
-        return;
-      }
-      if (this.isEmpty(compareDateString)) {
-        return 1;
-      }
-      var dateTime = this.dateParse(dateString).getTime();
-      var compareDateTime = this.dateParse(compareDateString).getTime();
-      if (compareDateTime > dateTime) {
-        return 1;
-      } else if (compareDateTime === dateTime) {
-        return 0;
-      } else {
-        return -1;
-      }
-    },
+    // dateCompare(dateString, compareDateString) {
+    //   // dateString:褰撳墠鏃堕棿
+    //   // compareDateString:闇�瑕佹瘮杈冪殑鏃堕棿
+    //   if (this.isEmpty(dateString)) {
+    //     return;
+    //   }
+    //   if (this.isEmpty(compareDateString)) {
+    //     return 1;
+    //   }
+    //   var dateTime = this.dateParse(dateString).getTime();
+    //   var compareDateTime = this.dateParse(compareDateString).getTime();
+    //   if (compareDateTime > dateTime) {
+    //     return 1;
+    //   } else if (compareDateTime === dateTime) {
+    //     return 0;
+    //   } else {
+    //     return -1;
+    //   }
+    // },
   },
   props: {
     listWidth: {
-      default: "234px",
+      default: "224px",
       type: String,
     },
     title: {
@@ -474,6 +307,7 @@
     display: flex;
     align-items: center;
     justify-content: right;
+    width: auto;
     float: right;
     margin-right: 10px;
   }
@@ -496,8 +330,7 @@
   font-size: 14px;
 }
 .out-div {
-  // overflow: hidden auto;
-  max-height: 100%;
+  max-height: 100%;    height: 100%;
   .el-collapse-item__wrap {
     will-change: height;
     background-color: #fff;
@@ -510,8 +343,11 @@
     display: none;
   }
   .el-row {
-    border-radius: 9px;    background: rgba(239, 241, 245, 0.35);
-
+    border-radius: 9px;
+    background: rgba(239, 241, 245, 0.35);
+    margin-bottom: 4px;    min-height: 72px;
+    box-sizing: border-box;
+    padding: 10px 5px;
   }
   .time-start {
     display: inline-block;
@@ -520,7 +356,7 @@
     display: inline-block;
   }
   .activeRow {
-    background: #4e94ff;
+    background: var(--colorCard);
     color: #fff;
     .time-start {
       color: #e9e9e9;

--
Gitblit v1.8.0