From f360cde8ff0b28ba677a4693cf45f47f206dd746 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期三, 21 五月 2025 17:52:54 +0800 Subject: [PATCH] 1、设备管理中设备属性的字段显隐权限调整到设备状态字段 2、设备日志添加批量导出功能 --- src/views/mdc/base/modules/DeviceLog/LogInfo.vue | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/views/mdc/base/modules/DeviceLog/LogInfo.vue b/src/views/mdc/base/modules/DeviceLog/LogInfo.vue index 6031da0..a12f4d4 100644 --- a/src/views/mdc/base/modules/DeviceLog/LogInfo.vue +++ b/src/views/mdc/base/modules/DeviceLog/LogInfo.vue @@ -16,7 +16,7 @@ </a-col> <a-col :md="4" :sm="4"> <a-form-item label="鏃ユ湡"> - <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" + <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="handleDateChange" format='YYYY-MM-DD'/> </a-form-item> </a-col> @@ -25,6 +25,8 @@ <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button> <a-button type="primary" icon="download" @click="handleExport">瀵煎嚭</a-button> + <a-button v-if="queryParams.equipmentId" type="primary" icon="download" @click="openBatchExportModal">鎵归噺瀵煎嚭 + </a-button> </a-space> </a-col> </a-row> @@ -155,6 +157,8 @@ <work-chart-model ref="workChartModel" :collectTime="this.queryParams.collectTime" :equipment="this.equipment"></work-chart-model> <work-history-model ref="workHistoryModel"></work-history-model> + + <DeviceLogBatchExportModal ref="batchExportModalRef" :equipmentId="queryParams.equipmentId"/> </div> </template> @@ -167,9 +171,11 @@ import WorkChartModel from './WorkChartModel' import WorkHistoryModel from './WorkHistoryModel' import { downFile, getAction } from '@/api/manage' + import DeviceLogBatchExportModal from './DeviceLogBatchExportModal' export default { - components: { + components: { + DeviceLogBatchExportModal, LogList, WorkLogList, AlarmLogList, @@ -255,9 +261,10 @@ this.cardLoading = false }) }, - dataChange(val) { + handleDateChange(val) { this.queryParams.collectTime = val this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD') + }, searchQuery() { // console.log(this.queryParams.collectTime) @@ -273,8 +280,8 @@ }, searchReset() { this.queryParams = { - collectTime : moment() - } + collectTime: moment() + } this.equipment = {} this.queryChart() }, @@ -346,9 +353,13 @@ }) }, - handleExport(){ - this.$refs.logList.queryParam=Object.assign({},this.queryParams,this.$refs.logList.queryParam) + handleExport() { + this.$refs.logList.queryParam = Object.assign({}, this.queryParams) this.$refs.logList.handleExportXls('璁惧鏃ュ織') + }, + + openBatchExportModal() { + this.$refs.batchExportModalRef.visible = true } }, created() { -- Gitblit v1.9.3