update 设备效率分析接口联调
This commit is contained in:
parent
cc5aa4d72f
commit
5158d9a315
@ -213,12 +213,12 @@ export default {
|
|||||||
getTimeRange() {
|
getTimeRange() {
|
||||||
let startTime
|
let startTime
|
||||||
let endTime
|
let endTime
|
||||||
if (this.headFormValue.timeValue instanceof Array) {
|
if (this.rawTime instanceof Array) {
|
||||||
startTime = this.headFormValue.timeValue[0] ? moment(this.headFormValue.timeValue[0]).format('YYYY-MM-DDTHH:mm:ss') : '' // 强制axios使用北京时间
|
startTime = this.rawTime[0] ? moment(this.rawTime[0]).format('YYYY-MM-DDTHH:mm:ss') : '' // 强制axios使用北京时间
|
||||||
endTime = this.headFormValue.timeValue[1] ? moment(this.headFormValue.timeValue[1]).format('YYYY-MM-DDTHH:mm:ss') : ''
|
endTime = this.rawTime[1] ? moment(this.rawTime[1]).format('YYYY-MM-DDTHH:mm:ss') : ''
|
||||||
} else {
|
} else {
|
||||||
if (this.headFormValue.timeValue) {
|
if (this.rawTime) {
|
||||||
startTime = moment(this.headFormValue.timeValue).format('YYYY-MM-DDTHH:mm:ss')
|
startTime = moment(this.rawTime).format('YYYY-MM-DDTHH:mm:ss')
|
||||||
endTime = moment(startTime)
|
endTime = moment(startTime)
|
||||||
.add(1, 'd')
|
.add(1, 'd')
|
||||||
.format('YYYY-MM-DDTHH:mm:ss')
|
.format('YYYY-MM-DDTHH:mm:ss')
|
||||||
@ -232,24 +232,23 @@ export default {
|
|||||||
|
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
|
const { startTime, endTime } = this.getTimeRange()
|
||||||
|
|
||||||
this.dataListLoading = true
|
this.dataListLoading = true
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl('/monitoring/equipment/page'),
|
url: this.$http.adornUrl('/monitoring/eqAnalysis/oee'),
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: this.$http.adornParams({
|
data: {
|
||||||
page: this.pageIndex,
|
startTime,
|
||||||
limit: this.pageSize,
|
endTime,
|
||||||
key: this.dataForm.key
|
ftId: this.dataForm.ftId,
|
||||||
})
|
productlines: this.dataForm.productlines,
|
||||||
}).then(({ data }) => {
|
limit: this.pageIndex,
|
||||||
if (data && data.code === 0) {
|
page: this.pageSize,
|
||||||
this.dataList = data.data.list
|
type: 1
|
||||||
this.totalPage = data.data.total
|
|
||||||
} else {
|
|
||||||
this.dataList = []
|
|
||||||
this.totalPage = 0
|
|
||||||
}
|
}
|
||||||
this.dataListLoading = false
|
}).then(({ data: res }) => {
|
||||||
|
console.log('oee data:', res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 每页数
|
// 每页数
|
||||||
|
Loading…
Reference in New Issue
Block a user