last year log statistics source code download

博客提示某资源仅提供两天下载时间,下周一就会失效。

只提供两天下载,下周一就失效!!

<template> <!-- 异常统计 --> <div class="abnormal-statistics"> <tableFormworkPage> <template v-slot:btnBox> <import-download-document :exportParams="exportParams" :importParams="importParams" :exportData="exportData"> <a-button slot="export" icon="upload" type="primary" class="mgr10">{{ $t('导出') }}</a-button> </import-download-document> </template> <template v-slot:serchBox> <div class="searchBox"> <div class="searchBody"> <div class="searchInputBox"> <div class="searchInput"> <div class="type-tabs base-flex-align"> <div class="tabs-item" :class="item.value === tabActive ? 'tabs-item-active' : ''" v-for="item in tabs" :key="item.value" @click="onTabEvent(item.value)" > {{ item.name }} </div> </div> <div class="searchInput"> <a-month-picker :allowClear="false" format="YYYY-M" v-model="searchData.dateTime" v-if="tabActive == 0" :placeholder="$t('请选择月份')" /> <a-date-picker :allowClear="false" :open="open" @openChange="openYearDatePicker" v-else v-model="searchData.dateTime" mode="year" :placeholder="$t('请选择年份')" format="YYYY" @panelChange="onSearchDateEvent" /> </div> </div> </div> <div class="searchButton"> <a-button type="primary" @click="onSearch"> {{ $t('common.scf.btn.search') }} </a-button> <!-- <a-button @click="onReset"> {{ $t('common.scf.btn.reset') }} </a-button> --> </div> </div> </div> </template> <template v-slot:tableBox> <div class="table-card"> <a-table :scroll="{ x: '100%', y: tableHeight }" :bordered="false" :columns.sync="columns" :dataSource="tableData" :pagination="false" rowKey="detector_code" > </a-table> </div> </template> <template v-slot:paginationBox> <!-- 分页 --> <div> <my-pagination style="padding: 0" :showSizeChanger="true" :pageIndex.sync="pagination.currentPage" @changePage="changePage" :pageSize="pagination.pageSize" :total="pagination.totalRows" @onShowSizeChange="onShowSizeChange" v-if="tableData.length" ></my-pagination> </div> </template> </tableFormworkPage> </div> </template> <script> import factory from '../factory' import myPagination from '@/components/scfComponents/paginationFormwork/myPagination' import tableFormworkPage from '@/components/scfComponents/tableFormwork/tableFormworkPage' import importDownloadDocument from '../../../components/importDownloadDocument.vue' export default { components: { tableFormworkPage, myPagination, importDownloadDocument, }, data() { return { tableHeight: 0, searchData: { analysisType: 'MONTH', dateTime: moment(), }, tabActive: 0, open: false, baseColumns: [ { key: 'departmen_name', title: this.$t('所属部门'), dataIndex: 'department_name', ellipsis: true, resizable: true, minWidth: 100, }, { key: 'detector_name', title: this.$t('设备名称'), dataIndex: 'detector_name', ellipsis: true, resizable: true, minWidth: 100, }, { key: 'detector_code', title: this.$t('设备编号'), dataIndex: 'detector_code', ellipsis: true, resizable: true, minWidth: 100, }, ], dynamicColumns: [], actionColumn: [ { key: 'rowTotal', title: this.$t('总计'), dataIndex: 'rowTotal', ellipsis: true, resizable: true, minWidth: 100, }, ], columns: [], tableData: [], pagination: { pageSize: 10, currentPage: 1, totalRows: 0, }, importParams: { isShowImport: false, }, } }, props: { companyInfo: { type: Object, default: {}, }, }, computed: { tabs() { return [ { name: this.$t('月'), value: 0 }, { name: this.$t('年'), value: 1 }, ] }, exportParams() { const exportUrl = this.tabActive == 0 ? 'abnormalAnalysis/monthInfo' : 'abnormalAnalysis/yearInfo' return { isExtract: true, isShowExport: true, exportUrl, } }, exportData() { const dateFormat = this.tabActive == 0 ? 'YYYY-M' : 'YYYY' return { analysisType: this.searchData.analysisType, value: this.searchData.dateTime.format(dateFormat), deptIdListSelect: [1, 2], // 选中部门Id列表 } }, }, created() { this.getTableData() }, mounted() { this.tableHeight = 0 this.tableHeight = document.getElementsByClassName('tableBox')[0].offsetHeight - 48 window.onresize = () => { this.tableHeight = 0 this.tableHeight = document.getElementsByClassName('tableBox')[0].offsetHeight - 48 } }, methods: { onTabEvent(key) { if (key != this.tabActive) { this.tabActive = key this.searchData.analysisType = key == 0 ? 'MONTH' : 'YEAR' } this.getTableData() }, onSearchDateEvent(val) { this.searchData.dateTime = val this.open = false }, openYearDatePicker(status) { this.open = status }, // 搜索 onSearch() { this.pagination.currentPage = 1 this.getTableData() }, // 获取表格数据 async getTableData() { try { const dateFormat = this.tabActive == 0 ? 'YYYY-M' : 'YYYY' const dateValue = this.searchData.dateTime.format(dateFormat) const params = { analysisType: this.searchData.analysisType, value: dateValue, deptIdListSelect: [1, 2], page: this.pagination.currentPage, pageSize: this.pagination.pageSize, } console.log(params, 'paramsparamsparamsparams') const apiMap = { 0: factory.getMonthInfo, 1: factory.getYearInfo } const apiMethod = apiMap[this.tabActive] const res = await apiMethod(params) if (res && res.success) { let headerData = res.data.headers || [] this.dynamicColumns = headerData.map(item => ({ title: item.headerName, dataIndex: item.headerKey, ellipsis: true, resizable: true, minWidth: 100, width: 100, })) this.columns = [...this.baseColumns, ...this.dynamicColumns, ...this.actionColumn] this.tableData = res.data.data.pageData || [] this.pagination.totalRows = res.data.data.totalCount || 0 } else { this.columns = [...this.baseColumns, ...this.dynamicColumns, ...this.actionColumn] } } catch (error) { this.columns = [...this.baseColumns, ...this.dynamicColumns, ...this.actionColumn] this.$message.error(error) } }, // 分页 changePage(currentPage) { this.pagination.currentPage = currentPage this.getTableData() }, // 每页条数发生变化 onShowSizeChange(pageSize) { this.pagination.currentPage = 1 this.pagination.pageSize = pageSize this.getTableData() }, }, } </script> <style lang="less" scoped> .abnormal-statistics { width: 100%; height: 100%; box-sizing: border-box; position: relative; .type-tabs { margin-right: 4px; .tabs-item { padding: 0 18px; line-height: 30px; border: 1px solid #e9ebee; cursor: pointer; font-size: 14px; color: #fff; margin-right: -1px; &:first-child { border-radius: 3px 0 0 3px; } &:last-child { border-radius: 0 3px 3px 0; } &-active { color: #1c79f4; border: 1px solid #1c79f4; background: rgba(28, 121, 244, 0.1); z-index: 2; } } } } </style> 代码评审
07-29
<template> <!-- 异常统计 --> <div class="abnormal-statistics"> <tableFormworkPage> <template v-slot:btnBox> <import-download-document :exportParams="exportParams" :importParams="importParams" :exportData="exportData" @getTableList="getTableList" > <a-button slot="export" icon="upload" type="primary" class="mgr10">{{ $t('导出') }}</a-button> </import-download-document> </template> <template v-slot:serchBox> <div class="searchBox"> <div class="searchBody"> <div class="searchInputBox"> <div class="searchInput"> <div class="type-tabs base-flex-align"> <div class="tabs-item" :class="item.value === tabActive ? 'tabs-item-active' : ''" v-for="item in tabs" :key="item.value" @click="onTabEvent(item.value)" > {{ item.name }} </div> </div> <div class="searchInput"> <a-month-picker :allowClear="false" format="YYYY-M" v-model="searchData.dateTime" v-if="tabActive == 0" :placeholder="$t('请选择月份')" /> <a-date-picker :allowClear="false" :open="open" @openChange="openYearDatePicker" v-else v-model="searchData.dateTime" mode="year" :placeholder="$t('请选择年份')" format="YYYY" @panelChange="onSearchDateEvent" /> </div> </div> </div> <div class="searchButton"> <a-button type="primary" @click="onSearch"> {{ $t('common.scf.btn.search') }} </a-button> <!-- <a-button @click="onReset"> {{ $t('common.scf.btn.reset') }} </a-button> --> </div> </div> </div> </template> <template v-slot:tableBox> <div class="table-card"> <a-table :scroll="{ x: '100%', y: tableHeight }" :bordered="false" :columns.sync="columns" :dataSource="tableData" :pagination="false" rowKey="facilityCode" > </a-table> </div> </template> <template v-slot:paginationBox> <!-- 分页 --> <div> <my-pagination style="padding: 0" :showSizeChanger="true" :pageIndex.sync="pagination.currentPage" @changePage="changePage" :pageSize="pagination.pageSize" :total="pagination.totalRows" @onShowSizeChange="onShowSizeChange" v-if="tableData.length" ></my-pagination> </div> </template> </tableFormworkPage> </div> </template> <script> import factory from '../factory' import myPagination from '@/components/scfComponents/paginationFormwork/myPagination' import tableFormworkPage from '@/components/scfComponents/tableFormwork/tableFormworkPage' import importDownloadDocument from '../../../components/importDownloadDocument.vue' export default { components: { tableFormworkPage, myPagination, importDownloadDocument, }, data() { return { tableHeight: 0, searchData: {}, tabActive: 0, tabs: [ { name: this.$t('月'), value: 0 }, { name: this.$t('年'), value: 1 }, ], open: false, analysisType: null, baseColumns: [ { key: 'departmen_name', title: this.$t('所属部门'), dataIndex: 'department_name', ellipsis: true, resizable: true, minWidth: 100, }, { key: 'detector_name', title: this.$t('设备名称'), dataIndex: 'detector_name', ellipsis: true, resizable: true, minWidth: 100, }, { key: 'detector_code', title: this.$t('设备编号'), dataIndex: 'detector_code', ellipsis: true, resizable: true, minWidth: 100, }, ], dynamicColumns: [], actionColumn: [ { key: 'rowTotal', title: this.$t('总计'), dataIndex: 'rowTotal', ellipsis: true, resizable: true, minWidth: 100, }, ], tableData: [ { detector_code: '457897846874545', department_name: '测试部门', '2025-05': 0, '2025-04': 0, '2025-07': 0, '2025-06': 7600, '2025-09': 0, detector_name: '采集能耗探测器', '2025-08': 0, '2025-10': 0, rowTotal: 7600, '2025-01': 0, '2025-12': 0, '2025-11': 0, '2025-03': 0, '2025-02': 0, }, ], pagination: { pageSize: 10, currentPage: 1, totalRows: 0, }, importParams: { isShowImport: false, }, } }, computed: { exportParams() { return { isExtract: true, isShowExport: true, exportUrl: +this.tabActive === 0 ? 'abnormalAnalysis/monthInfo' : 'abnormalAnalysis/yearInfo', } }, columns() { return [...this.baseColumns, ...this.dynamicColumns, ...this.actionColumn] }, }, created() { this.searchData = { analysisType: 'MONTH', dateTime: moment(), } this.getTableData() }, mounted() { this.tableHeight = 0 this.tableHeight = document.getElementsByClassName('tableBox')[0].offsetHeight - 48 window.onresize = () => { this.tableHeight = 0 this.tableHeight = document.getElementsByClassName('tableBox')[0].offsetHeight - 48 } }, methods: { onTabEvent(key) { if (key !== this.tabActive) { this.tabActive = key this.searchData.analysisType = key == 0 ? 'MONTH' : 'YEAR' } }, onSearchDateEvent(val) { this.searchData.dateTime = val this.open = false }, openYearDatePicker(status) { this.open = status }, // 搜索 onSearch() { this.pagination.currentPage = 1 this.getTableData() }, // 获取表格数据 async getTableData() { try { const dateFormat = +this.tabActive === 0 ? 'YYYY-M' : 'YYYY' const dateValue = this.searchData.dateTime.format(dateFormat) const params = { analysisType: this.searchData.analysisType, value: dateValue, deptIdListSelect: [1, 2], page: this.pagination.currentPage, pageSize: this.pagination.pageSize, } console.log(params, 'paramsparamsparamsparams') // 根据标签页调用不同接口 const apiMethod = +this.tabActive === 0 ? factory.getMonthInfo : factory.getYearInfo const res = await apiMethod if (res && res.data) { this.dynamicColumns = [] let headerData = res.data.header || [] this.dynamicColumns = headerData.map(item => ({ key: item.headerKey, title: item.headerName, dataIndex: item.headerKey, ellipsis: true, resizable: true, minWidth: 100, })) this.tableData = res.data.pageData || [] this.pagination.totalRows = res.data.totalCount || 0 } } catch (error) { this.$message.error(error) } }, // 分页 changePage(currentPage) { this.pagination.currentPage = currentPage this.getTableData() }, // 每页条数发生变化 onShowSizeChange(pageSize) { this.pagination.currentPage = 1 this.pagination.pageSize = pageSize this.getTableData() }, }, } </script> <style lang="less" scoped> .abnormal-statistics { width: 100%; height: 100%; box-sizing: border-box; position: relative; .type-tabs { margin-right: 4px; .tabs-item { padding: 0 18px; line-height: 30px; border: 1px solid #e9ebee; cursor: pointer; font-size: 14px; color: #fff; margin-right: -1px; &:first-child { border-radius: 3px 0 0 3px; } &:last-child { border-radius: 0 3px 3px 0; } &-active { color: #1c79f4; border: 1px solid #1c79f4; background: rgba(28, 121, 244, 0.1); z-index: 2; } } } } </style> dynamicColumns请求道数据后 columns会实时渲染的吗
07-17
内容概要:本文介绍了一个基于MATLAB实现的无人机三维路径规划项目,采用蚁群算法(ACO)与多层感知机(MLP)相结合的混合模型(ACO-MLP)。该模型通过三维环境离散化建模,利用ACO进行全局路径搜索,并引入MLP对环境特征进行自适应学习与启发因子优化,实现路径的动态调整与多目标优化。项目解决了高维空间建模、动态障碍规避、局部最优陷阱、算法实时性及多目标权衡等关键技术难题,结合并行计算与参数自适应机制,提升了路径规划的智能性、安全性和工程适用性。文中提供了详细的模型架构、核心算法流程及MATLAB代码示例,涵盖空间建模、信息素更新、MLP训练与融合优化等关键步骤。; 适合人群:具备一定MATLAB编程基础,熟悉智能优化算法与神经网络的高校学生、科研人员及从事无人机路径规划相关工作的工程师;适合从事智能无人系统、自动驾驶、机器人导航等领域的研究人员; 使用场景及目标:①应用于复杂三维环境下的无人机路径规划,如城市物流、灾害救援、军事侦察等场景;②实现飞行安全、能耗优化、路径平滑与实时避障等多目标协同优化;③为智能无人系统的自主决策与环境适应能力提供算法支持; 阅读建议:此资源结合理论模型与MATLAB实践,建议读者在理解ACO与MLP基本原理的基础上,结合代码示例进行仿真调试,重点关注ACO-MLP融合机制、多目标优化函数设计及参数自适应策略的实现,以深入掌握混合智能算法在工程中的应用方法。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值