From 39fc6dace3dda560d68cf6bb97562c635653c177 Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Tue, 30 Aug 2022 18:04:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7=E6=9D=A5?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/check/chose.vue | 5 +---- src/util/indexedDb/indexedDB.js | 16 ++++++++++++++++ src/views/Statistics/TheTeamCompared.vue | 4 ++-- src/views/Template/table.js | 3 ++- src/views/building/index.vue | 12 +++++------- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/src/page/check/chose.vue b/src/page/check/chose.vue index b3c46de..591ea49 100644 --- a/src/page/check/chose.vue +++ b/src/page/check/chose.vue @@ -350,10 +350,6 @@ export default { this.$message.warning("您已经被禁用"); return; } - // if(item.residueTime<=0){ - // this.$message.warning('您已过期') - // return - // } if (this.flag == 1) { localStorage.setItem("agentId", item.id); localStorage.setItem("orgCode", ""); @@ -375,6 +371,7 @@ export default { } this.$router.push({ path: "/wel" }); localStorage.setItem("allClose", true); + this.$db.deleteDB('EquipmentStateFiltter') }, addLoginCount(houseId) { this.$api.api diff --git a/src/util/indexedDb/indexedDB.js b/src/util/indexedDb/indexedDB.js index fef5ca1..71a8579 100644 --- a/src/util/indexedDb/indexedDB.js +++ b/src/util/indexedDb/indexedDB.js @@ -146,5 +146,21 @@ class IndexDBCache { return value; } + + // 删除indexDB + deleteDB(id) { + let transaction = this._db.transaction(this._cacheTableName, 'readwrite') + let store = transaction.objectStore(this._cacheTableName) + let request = store.delete(id) + + request.onsuccess = function() { + console.log('数据删除成功') + } + + request.onerror = function() { + console.log('数据删除失败') + } + } + } export default IndexDBCache \ No newline at end of file diff --git a/src/views/Statistics/TheTeamCompared.vue b/src/views/Statistics/TheTeamCompared.vue index 7788355..985963b 100644 --- a/src/views/Statistics/TheTeamCompared.vue +++ b/src/views/Statistics/TheTeamCompared.vue @@ -602,7 +602,7 @@