From df0dc6bfa0604d2a0b6f648908a46cf824fe3270 Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Fri, 8 Sep 2023 16:01:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E6=BA=90=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/equipment.js | 8 + src/api/base/productionLine.js | 8 + src/api/base/workshopSection.js | 8 + .../contrastAnalysis/components/barChart.vue | 37 ++- .../contrastAnalysis/components/lineChart.vue | 38 ++- .../components/searchArea.vue | 48 +++- .../analysis/contrastAnalysis/index.vue | 21 +- .../components/groupUpperLower.vue | 147 +++++++++++ .../base/groupTeamScheduling/index copy.vue | 233 ----------------- .../group/base/groupTeamScheduling/index.vue | 240 +++--------------- 10 files changed, 317 insertions(+), 471 deletions(-) create mode 100644 src/api/base/equipment.js create mode 100644 src/api/base/productionLine.js create mode 100644 src/api/base/workshopSection.js create mode 100644 src/views/group/base/groupTeamScheduling/components/groupUpperLower.vue delete mode 100644 src/views/group/base/groupTeamScheduling/index copy.vue diff --git a/src/api/base/equipment.js b/src/api/base/equipment.js new file mode 100644 index 00000000..71feef4b --- /dev/null +++ b/src/api/base/equipment.js @@ -0,0 +1,8 @@ +import request from '@/utils/request' +// 获得所有设备列表 +export function getEquipmentAll() { + return request({ + url: '/base/equipment/listAll', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/api/base/productionLine.js b/src/api/base/productionLine.js new file mode 100644 index 00000000..7fade9c9 --- /dev/null +++ b/src/api/base/productionLine.js @@ -0,0 +1,8 @@ +import request from '@/utils/request' +// 获得所有工厂产线列表 +export function getLineAll() { + return request({ + url: '/base/production-line/listAll', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/api/base/workshopSection.js b/src/api/base/workshopSection.js new file mode 100644 index 00000000..bf5e65d5 --- /dev/null +++ b/src/api/base/workshopSection.js @@ -0,0 +1,8 @@ +import request from '@/utils/request' +// 获得所有产线工段列表 +export function getWorkShopAll() { + return request({ + url: '/base/workshop-section/listAll', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/views/energy/analysis/contrastAnalysis/components/barChart.vue b/src/views/energy/analysis/contrastAnalysis/components/barChart.vue index ecb26ae1..846a6d2f 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/barChart.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/barChart.vue @@ -48,13 +48,39 @@ export default { } this.chartDom = document.getElementById('analysischartBar') this.chart = echarts.init(this.chartDom) + let tempArr = [] let xData = [] let yData = [] + let legendData = [] + if (this.chartData.length === 0) { + return false + } else { + tempArr = this.chartData[0].trendRespVOList + } + for (let k = 0; k < tempArr.length; k++) { + xData.push(tempArr[k].time) + } for (let i = 0; i < this.chartData.length; i++) { - xData.push(this.chartData[i].time) - yData.push(this.chartData[i].useNum) + let obj = { + name: this.chartData[i].objName + this.chartData[i].objCode, + type: 'bar', + data: [] + } + legendData.push(this.chartData[i].objName + this.chartData[i].objCode) + let temp = this.chartData[i].trendRespVOList + for (let j = 0; j < temp.length; j++) { + let num = temp[j].useNum ? temp[j].useNum : 0 + obj.data.push(num) + } + yData.push(obj) } var option = { + tooltip: { + trigger: 'axis' + }, + legend: { + data: legendData + }, xAxis: { type: 'category', data: xData @@ -62,12 +88,7 @@ export default { yAxis: { type: 'value' }, - series: [ - { - data: yData, - type: 'bar' - } - ] + series: yData }; option && this.chart.setOption(option); diff --git a/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue b/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue index 593017aa..35b1b108 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/lineChart.vue @@ -48,14 +48,41 @@ export default { } this.chartDom = document.getElementById('analysischartLine') this.chart = echarts.init(this.chartDom) + let tempArr = [] let xData = [] let yData = [] + let legendData = [] + if (this.chartData.length === 0) { + return false + } else { + tempArr = this.chartData[0].trendRespVOList + } + for (let k = 0; k < tempArr.length; k++) { + xData.push(tempArr[k].time) + } for (let i = 0; i < this.chartData.length; i++) { - xData.push(this.chartData[i].time) - yData.push(this.chartData[i].useNum) + let obj = { + name: this.chartData[i].objName + this.chartData[i].objCode, + type: 'line', + stack: 'Total', + data: [] + } + legendData.push(this.chartData[i].objName + this.chartData[i].objCode) + let temp = this.chartData[i].trendRespVOList + for (let j = 0; j < temp.length; j++) { + let num = temp[j].useNum ? temp[j].useNum : 0 + obj.data.push(num) + } + yData.push(obj) } var option = { + tooltip: { + trigger: 'axis' + }, + legend: { + data: legendData + }, xAxis: { type: 'category', data: xData @@ -63,12 +90,7 @@ export default { yAxis: { type: 'value' }, - series: [ - { - data: yData, - type: 'line' - } - ] + series: yData }; option && this.chart.setOption(option); diff --git a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue index bfe7af22..af75b2df 100644 --- a/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue +++ b/src/views/energy/analysis/contrastAnalysis/components/searchArea.vue @@ -33,6 +33,7 @@ :picker-options="pickerOptions" popper-class="noneMinute" @change="timeSelect" + :clearable="false" > @@ -45,6 +46,7 @@ end-placeholder="结束日期" value-format="timestamp" :picker-options="pickerOptions" + :clearable="false" @change="timeSelect" > @@ -57,6 +59,7 @@ style='width:150px;' :picker-options="pickerOptionsWeek" @change="startWeek" + :clearable="false" placeholder="选择周"> - @@ -77,6 +81,7 @@ start-placeholder="开始日期" end-placeholder="结束日期" value-format="timestamp" + :clearable="false" :picker-options="pickerOptions" @change="timeSelect" > @@ -91,6 +96,7 @@ value-format="timestamp" placeholder="选择年" @change="startYear" + :clearable="false" > - @@ -116,12 +123,14 @@ - + + :key="item.id" + :label="item.name" + :value="item.id"> + {{ item.name }} + {{ item.code }} @@ -132,6 +141,9 @@ + \ No newline at end of file diff --git a/src/views/group/base/groupTeamScheduling/index copy.vue b/src/views/group/base/groupTeamScheduling/index copy.vue deleted file mode 100644 index 6346df1f..00000000 --- a/src/views/group/base/groupTeamScheduling/index copy.vue +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - 搜索 - 重置 - - - - - - - 新增 - - - 导出 - - - - - - - - - - - - - {{ parseTime(scope.row.startTime) }} - - - - - {{ parseTime(scope.row.endTime) }} - - - - - {{ parseTime(scope.row.createTime) }} - - - - - 修改 - 删除 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/group/base/groupTeamScheduling/index.vue b/src/views/group/base/groupTeamScheduling/index.vue index 6346df1f..74e36336 100644 --- a/src/views/group/base/groupTeamScheduling/index.vue +++ b/src/views/group/base/groupTeamScheduling/index.vue @@ -1,232 +1,66 @@ - - - - - - - - 搜索 - 重置 - - - - - - - 新增 - - - 导出 - - - - - - - - - - - - - {{ parseTime(scope.row.startTime) }} - - - - - {{ parseTime(scope.row.endTime) }} - - - - - {{ parseTime(scope.row.createTime) }} - - - - - 修改 - 删除 - - - - - - - - - - - + + + + + - - + + 自动排班 - - + + 编辑 - - + + 班组上下片查询 - - + + 班组能源查询 + + + 班组检测查询 - - + + +