2023.10.30提测能源&班组
This commit is contained in:
@@ -96,7 +96,7 @@ const tableProps = [
|
||||
}
|
||||
]
|
||||
import { getEnergyTypeListAll } from '@/api/base/energyType'
|
||||
import { orderList, workOrderList } from '@/api/base/orderManage'
|
||||
import { workOrderList } from '@/api/base/orderManage'
|
||||
import { getWorkOrderMsg, getOrderEnergyData } from '@/api/monitoring/orderEnergy'
|
||||
import BarChart from "./components/barChart"
|
||||
export default {
|
||||
@@ -104,25 +104,21 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '订单',
|
||||
selectOptions: [],
|
||||
param: 'energyTypeId'
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '工单',
|
||||
selectOptions: [],
|
||||
param: 'energyTypeId1'
|
||||
param: 'workOrderId',
|
||||
clearable: false
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '能源类型',
|
||||
selectOptions: [],
|
||||
param: 'energyTypeId2',
|
||||
param: 'objType',
|
||||
filterable: true,
|
||||
width: 120
|
||||
width: 120,
|
||||
clearable: false
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@@ -130,8 +126,9 @@ export default {
|
||||
selectOptions: this.getDictDatas(this.DICT_TYPE.OBJECT_TYPE),
|
||||
labelField: 'label',
|
||||
valueField: 'value',
|
||||
param: 'energyTypeId3',
|
||||
width: 100
|
||||
param: 'energyTypeId',
|
||||
width: 100,
|
||||
clearable: false
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@@ -145,8 +142,9 @@ export default {
|
||||
tableH: this.tableHeight(400),
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10000
|
||||
workOrderId: '',
|
||||
objType: '',
|
||||
energyTypeId: ''
|
||||
},
|
||||
orderMsg: {},
|
||||
chartData: [],
|
||||
@@ -162,34 +160,38 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getListArr() {
|
||||
getEnergyTypeListAll().then(res => {
|
||||
this.formConfig[2].selectOptions = res.data || []
|
||||
})
|
||||
orderList().then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
workOrderList().then(res => {
|
||||
console.log(res)
|
||||
this.formConfig[0].selectOptions = res.data || []
|
||||
})
|
||||
getEnergyTypeListAll().then(res => {
|
||||
this.formConfig[1].selectOptions = res.data || []
|
||||
})
|
||||
},
|
||||
buttonClick() {
|
||||
getWorkOrderMsg({
|
||||
"workOrderId": 1,
|
||||
"objType": "3",
|
||||
"energyTypeId": '1681183397517406210'
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
buttonClick(val) {
|
||||
if (!val.workOrderId) {
|
||||
this.$modal.msgWarning('工单不能为空')
|
||||
return false
|
||||
}
|
||||
if (!val.objType) {
|
||||
this.$modal.msgWarning('能源类型不能为空')
|
||||
return false
|
||||
}
|
||||
if (!val.energyTypeId) {
|
||||
this.$modal.msgWarning('对象维度不能为空')
|
||||
return false
|
||||
}
|
||||
this.queryParams.workOrderId = val.workOrderId
|
||||
this.queryParams.objType = val.objType
|
||||
this.queryParams.energyTypeId = val.energyTypeId
|
||||
getWorkOrderMsg({ ...this.queryParams }).then(res => {
|
||||
this.orderMsg = res.data || {}
|
||||
getOrderEnergyData({
|
||||
"workOrderId": 1,
|
||||
"objType": "3",
|
||||
"energyTypeId": '1681183397517406210',
|
||||
"startProduceTime": "1694239523000",
|
||||
"finishProduceTime": "1694498723000"
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.tableData = res.data || []
|
||||
this.chartData = res.data || []
|
||||
...this.queryParams,
|
||||
startProduceTime: res.data.startProduceTime || '',
|
||||
finishProduceTime: res.data.finishProduceTime || ''
|
||||
}).then(result => {
|
||||
this.tableData = result.data || []
|
||||
this.chartData = result.data || []
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user