diff --git a/src/api/analysis/energyAnalysis.js b/src/api/analysis/energyAnalysis.js index 204f5137..5b4a9d4c 100644 --- a/src/api/analysis/energyAnalysis.js +++ b/src/api/analysis/energyAnalysis.js @@ -1,3 +1,10 @@ +/* + * @Author: zwq + * @Date: 2024-06-28 17:03:29 + * @LastEditors: zwq + * @LastEditTime: 2024-09-27 09:24:09 + * @Description: + */ import request from '@/utils/request' // 获取走势分析数据 @@ -17,6 +24,15 @@ export function exportTrend(data) { responseType: 'blob' }) } +// 导出对比分析数据 +export function exportCompare(data) { + return request({ + url: '/analysis/energy-analysis/exportCompare', + method: 'post', + data: data, + responseType: 'blob' + }) +} // 获取对比分析数据 export function getCompare(data) { return request({ @@ -35,6 +51,24 @@ export function getYoy(data) { }) } +// 导出同比分析数据 +export function exportYoy(data) { + return request({ + url: '/analysis/energy-analysis/exportYoy', + method: 'post', + data: data, + responseType: 'blob' + }) +} +// 导出环比分析数据 +export function exportChain(data) { + return request({ + url: '/analysis/energy-analysis/exportChain', + method: 'post', + data: data, + responseType: 'blob' + }) +} // 获取环比分析数据(1:月,2:周,3:日) export function getQoq(data) { return request({ diff --git a/src/api/base/coreWorkOrder.js b/src/api/base/coreWorkOrder.js index 656d4a69..ba6b362c 100644 --- a/src/api/base/coreWorkOrder.js +++ b/src/api/base/coreWorkOrder.js @@ -3,7 +3,7 @@ * @Date: 2023-10-21 11:50:46 * @LastEditTime: 2023-11-15 17:19:19 * @LastEditors: DY - * @Description: + * @Description: */ import request from '@/utils/request' @@ -16,6 +16,14 @@ export function createCoreWO(data) { }) } +// 获取工艺模式工单预计消耗物料 +export function getMaterialCostWorkOrder(data) { + return request({ + url: '/extend/process-retrospect/getMaterialCostWorkOrder', + method: 'post', + data: data + }) +} // 更新工单 export function updateCoreWO(data) { return request({ diff --git a/src/api/base/orderManage.js b/src/api/base/orderManage.js index 2c4a59c8..5d9af080 100644 --- a/src/api/base/orderManage.js +++ b/src/api/base/orderManage.js @@ -50,6 +50,22 @@ export function getOrderById(query) { params: query }) } +// 订单进度-获取普通模式订单剩余数量 +export function getOrderRemainNum(id) { + return request({ + url: '/base/order/getOrderRemainNum?id=' + id, + method: 'get' + }) +} + +// 订单进度-获取工艺模式订单预计消耗物料(计算后) +export function getMaterialCostOrder(data) { + return request({ + url: '/extend/process-retrospect/getMaterialCostOrder', + method: 'post', + data: data + }) +} // 获得工艺流程列表 export function getProcessFlowList() { @@ -59,6 +75,16 @@ export function getProcessFlowList() { }) } + +// 获得工艺流程列表 +export function getProcessFlowPage(query) { + return request({ + url: '/extend/process-flow/page', + method: 'get', + params: query + }) +} + // 创建订单 export function orderCreate(data) { return request({ diff --git a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue index e742441d..eb531e7c 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue @@ -150,6 +150,10 @@ 查询 重置 + + + 导出 + @@ -326,8 +330,16 @@ export default { }) } }, + // 查询 + search() { + if (this.validateData()) { + this.queryParams.startTime = this.queryParams.startTime + ''; + this.queryParams.endTime = this.queryParams.endTime + ''; + this.$emit('submit', this.queryParams); + } + }, // 查询 - search() { + validateData() { if (!this.queryParams.energyTypeId) { this.$modal.msgError('请选择能源类型') return false @@ -397,10 +409,7 @@ export default { this.$modal.msgError('请选择对象') return false } - this.queryParams.startTime = this.queryParams.startTime + '' - this.queryParams.endTime = this.queryParams.endTime + '' - console.log(this.queryParams) - this.$emit('submit', this.queryParams) + return true; }, resetBtn() { this.queryParams.energyTypeId = null @@ -436,7 +445,14 @@ export default { } else { element.classList.add('divHeight') } - } + }, + exportData() { + if (this.validateData()) { + this.queryParams.startTime = this.queryParams.startTime + ''; + this.queryParams.endTime = this.queryParams.endTime + ''; + this.$emit('exportD', this.queryParams); + } + }, } } @@ -494,4 +510,4 @@ export default { vertical-align: middle; margin: 0 10px; } - \ No newline at end of file + diff --git a/src/views/energy/analysis/contrastAnalysis/index.vue b/src/views/energy/analysis/contrastAnalysis/index.vue index 259c3619..2a140670 100644 --- a/src/views/energy/analysis/contrastAnalysis/index.vue +++ b/src/views/energy/analysis/contrastAnalysis/index.vue @@ -1,7 +1,7 @@ diff --git a/src/views/energy/analysis/qoqAnalysis/components/searchArea.vue b/src/views/energy/analysis/qoqAnalysis/components/searchArea.vue index 0db3d844..07d3f28f 100644 --- a/src/views/energy/analysis/qoqAnalysis/components/searchArea.vue +++ b/src/views/energy/analysis/qoqAnalysis/components/searchArea.vue @@ -158,14 +158,33 @@ export default { this.$emit('submit', this.queryParams) }, exportData() { - let name - if (this.queryParams.objId) { - name = this.getObjName(this.objList, this.queryParams.objId) + if (this.objArr.length === 0) { + this.$modal.msgError('请选择对象') + return false } else { - this.$modal.msgWarning("对象不能为空") + this.queryParams.objId = this.objArr[this.objArr.length-1] + } + if (!this.queryParams.type) { + this.$modal.msgError('请选择时间维度') return false } - this.$emit('exportD', {name: name}) + if (!this.queryParams.searchTime) { + this.$modal.msgError('请选择时间') + return false + } + switch (this.queryParams.type) { + case 1: + this.queryParams.searchTime = this.transformTime(this.monthValue) + break; + case 2: + let value = moment(this.weekValue).day(6).format('YYYY-MM-DD') + ' 23:59:59' + this.queryParams.searchTime = new Date(value).getTime() + break; + default: + let value2 = moment(this.dateValue).format('YYYY-MM-DD') + ' 23:59:59' + this.queryParams.searchTime = new Date(value2).getTime() + } + this.$emit('exportD', this.queryParams) }, // 递归取对象name getObjName(list, id) { @@ -229,4 +248,4 @@ export default { margin-top: 10px; } } - \ No newline at end of file + diff --git a/src/views/energy/analysis/qoqAnalysis/index.vue b/src/views/energy/analysis/qoqAnalysis/index.vue index 6c2ac964..b90776f5 100644 --- a/src/views/energy/analysis/qoqAnalysis/index.vue +++ b/src/views/energy/analysis/qoqAnalysis/index.vue @@ -19,7 +19,7 @@ + + + + diff --git a/src/views/equipment/base/spareParts/List/index.vue b/src/views/equipment/base/spareParts/List/index.vue index 10bd5dcc..1e61269c 100644 --- a/src/views/equipment/base/spareParts/List/index.vue +++ b/src/views/equipment/base/spareParts/List/index.vue @@ -37,12 +37,14 @@ @close="cancel" @cancel="cancel" @confirm="submitForm"> - @@ -51,14 +53,16 @@ diff --git a/src/views/extend/processTraceability/index.vue b/src/views/extend/processTraceability/index.vue index d3b9f026..18ea4a8c 100644 --- a/src/views/extend/processTraceability/index.vue +++ b/src/views/extend/processTraceability/index.vue @@ -1,8 +1,8 @@