From 1823e7dd35dedc6d90862f34e7eb50bcf4015b9a Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Mon, 22 Dec 2025 13:14:47 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../archivesList/mixins/archives.js | 17 ++-- src/views/components/AccessDoor.vue | 21 +++-- src/views/components/WarehouseWarning.vue | 82 +++++++++++++++++-- src/views/environmentalScreen/index.vue | 8 +- 4 files changed, 105 insertions(+), 23 deletions(-) diff --git a/src/views/archivesManage/archivesList/mixins/archives.js b/src/views/archivesManage/archivesList/mixins/archives.js index 3ee663b..36c7389 100644 --- a/src/views/archivesManage/archivesList/mixins/archives.js +++ b/src/views/archivesManage/archivesList/mixins/archives.js @@ -320,13 +320,16 @@ export const archivesCrud = { // 选择删除 toDelete(data) { // 已装盒的档案不可删除 - const indexCaseBool = data.findIndex(item => item.case_no !== '') - if (indexCaseBool !== -1) { - this.$message.error('已装盒的档案不可删除!') - } else { - this.$refs.deltArchives.deleteVisible = true - this.getTotalSumAll() - } + // const indexCaseBool = data.findIndex(item => item.case_no !== '') + // if (indexCaseBool !== -1) { + // this.$message.error('已装盒的档案不可删除!') + // } else { + // this.$refs.deltArchives.deleteVisible = true + // this.getTotalSumAll() + // } + + this.$refs.deltArchives.deleteVisible = true + this.getTotalSumAll() }, getTotalSumAll(data) { this.totalSumAll = 0 diff --git a/src/views/components/AccessDoor.vue b/src/views/components/AccessDoor.vue index dc57f9b..ad91c04 100644 --- a/src/views/components/AccessDoor.vue +++ b/src/views/components/AccessDoor.vue @@ -13,12 +13,12 @@
{{ scope.row.time | parseTime }}
- + - + @@ -56,13 +56,18 @@ export default { }, watch: { // 如果 `tableData` 发生改变,这个函数就会运行 - tableData: function(newData, oldData) { - this.tableRefScroll() - } + // tableData: function(newData, oldData) { + // this.tableRefScroll() + // } }, created() { this.getAccessdoor() }, + mounted() { + this.scrollTimer = setInterval(() => { + this.getAccessdoor() + }, 15000) + }, destroyed() { clearInterval(this.scrollTimer) this.scrollTimer = null @@ -131,8 +136,12 @@ export default { }, getAccessdoor() { FetchInitHikDoorLog({ page: 0, size: this.size }).then((data) => { + this.tableData = [] if (data.content && data.content.length > 0) { - this.tableData.splice(0, data.content.length, ...data.content) + // this.tableData.splice(0, data.content.length, ...data.content) + this.tableData = data.content + } else { + this.tableData = [] } }) } diff --git a/src/views/components/WarehouseWarning.vue b/src/views/components/WarehouseWarning.vue index f09cd77..4e1daf7 100644 --- a/src/views/components/WarehouseWarning.vue +++ b/src/views/components/WarehouseWarning.vue @@ -12,10 +12,11 @@ - - + + @@ -51,13 +52,18 @@ export default { }, watch: { // 如果 `tableData` 发生改变,这个函数就会运行 - tableData: function(newData, oldData) { - this.tableRefScroll() - } + // tableData: function(newData, oldData) { + // this.tableRefScroll() + // } }, created() { this.getAlarmInfo() }, + mounted() { + this.scrollTimer = setInterval(() => { + this.getAlarmInfo() + }, 15000) + }, destroyed() { clearInterval(this.scrollTimer) this.scrollTimer = null @@ -140,8 +146,72 @@ export default { }, getAlarmInfo() { alarmApi.info({ storeroomId: this.storeroomId }).then((data) => { + // this.tableData = [ + // { + // 'id': 'eb6b8653', + // 'lscid': 0, + // 'wyid': '', + // 'itemLevels': 1, + // 'siteName': '.环境监控', + // 'TS': 1765944141000, + // 'isAd': true, + // 'type': 0, + // 'ip': '192.168.99.101:6003', + // 'name': '开关量', + // 'value': '设备断线', + // 'dw': '', + // 'itemClass': 1 + // }, + // { + // 'id': 'eeeeeeee', + // 'lscid': 0, + // 'wyid': null, + // 'itemLevels': 1, + // 'siteName': '红外外线', + // 'TS': 1765867832000, + // 'isAd': true, + // 'type': 0, + // 'ip': '192.168.99.100', + // 'name': '红外外线', + // 'value': '红外线报警', + // 'dw': null, + // 'itemClass': 1 + // }, + // { + // 'id': 'eb6b8653', + // 'lscid': 0, + // 'wyid': '', + // 'itemLevels': 1, + // 'siteName': '.环境监控', + // 'TS': 1765944141000, + // 'isAd': true, + // 'type': 0, + // 'ip': '192.168.99.101:6003', + // 'name': '开关量', + // 'value': '设备断线', + // 'dw': '', + // 'itemClass': 1 + // }, + // { + // 'id': 'eeeeeeee', + // 'lscid': 0, + // 'wyid': null, + // 'itemLevels': 1, + // 'siteName': '红外外线', + // 'TS': 1765867832000, + // 'isAd': true, + // 'type': 0, + // 'ip': '192.168.99.100', + // 'name': '红外外线', + // 'value': '红外线报警', + // 'dw': null, + // 'itemClass': 1 + // } + // ] + this.tableData = [] if (data && data.length > 0) { - this.tableData.splice(0, data.length, ...data) + // this.tableData.splice(0, data.length, ...data) + this.tableData = data } else { this.tableData = [] } diff --git a/src/views/environmentalScreen/index.vue b/src/views/environmentalScreen/index.vue index 934a749..d91a117 100644 --- a/src/views/environmentalScreen/index.vue +++ b/src/views/environmentalScreen/index.vue @@ -89,21 +89,21 @@
{{ avgData.tvoc }} -

TVOC
{{ avgData.tvocUnit }}

+

TVOC {{ avgData.tvocUnit }}

  • {{ avgData.co2 }} -

    二氧化碳
    {{ avgData.co2Unit }}

    +

    二氧化碳 {{ avgData.co2Unit }}

  • {{ avgData.formaldehyde }} -

    甲醛
    {{ avgData.formaldehydeUnit }}

    +

    甲醛 {{ avgData.formaldehydeUnit }}

  • @@ -253,7 +253,7 @@ - +