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 @@ - - - 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 @@