| | |
| | | </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> |
| | |
| | | <a-space> |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | import AlarmLogList from './AlarmLogList' |
| | | import WorkChartModel from './WorkChartModel' |
| | | import WorkHistoryModel from './WorkHistoryModel' |
| | | import { getAction } from '@/api/manage' |
| | | import { downFile, getAction } from '@/api/manage' |
| | | import DeviceLogBatchExportModal from './DeviceLogBatchExportModal' |
| | | |
| | | export default { |
| | | components: { |
| | | components: { |
| | | DeviceLogBatchExportModal, |
| | | LogList, |
| | | WorkLogList, |
| | | AlarmLogList, |
| | | WorkChartModel, |
| | | WorkHistoryModel |
| | | }, |
| | | props: { equipment: {} }, |
| | | props: { selectEquipment: {} }, |
| | | data() { |
| | | return { |
| | | readOnly: true, |
| | |
| | | url: { |
| | | getBaseTree: '/mdc/mdcequipment/loadTree', |
| | | getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid', |
| | | list: '/mdc/mdcEquipmentRunningSection/logList' |
| | | list: '/mdc/mdcEquipmentRunningSection/logList', |
| | | exportXlsUrl: '/mdc/mdcEquipmentRunningSection/exportLogXls' |
| | | }, |
| | | ProStartId: '' |
| | | } |
| | |
| | | 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) |
| | |
| | | }, |
| | | searchReset() { |
| | | this.queryParams = { |
| | | collectTime : moment() |
| | | } |
| | | collectTime: moment() |
| | | } |
| | | this.equipment = {} |
| | | this.queryChart() |
| | | }, |
| | |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleExport() { |
| | | this.$refs.logList.queryParam = Object.assign({}, this.queryParams) |
| | | this.$refs.logList.handleExportXls('设备日志') |
| | | }, |
| | | |
| | | openBatchExportModal() { |
| | | this.$refs.batchExportModalRef.visible = true |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.initEquipment() |
| | | }, |
| | | watch: { |
| | | equipment(val) { |
| | | selectEquipment(val) { |
| | | if (val && val.equipmentId) { |
| | | this.$set(this.queryParams, 'equipmentName', val.equipmentName) |
| | | this.$set(this.queryParams, 'equipmentId', val.equipmentId) |