update 设备效率分析接口联调

This commit is contained in:
g7hoo 2022-09-21 10:59:35 +08:00
parent cc5aa4d72f
commit 5158d9a315

View File

@ -213,12 +213,12 @@ export default {
getTimeRange() {
let startTime
let endTime
if (this.headFormValue.timeValue instanceof Array) {
startTime = this.headFormValue.timeValue[0] ? moment(this.headFormValue.timeValue[0]).format('YYYY-MM-DDTHH:mm:ss') : '' // axios使
endTime = this.headFormValue.timeValue[1] ? moment(this.headFormValue.timeValue[1]).format('YYYY-MM-DDTHH:mm:ss') : ''
if (this.rawTime instanceof Array) {
startTime = this.rawTime[0] ? moment(this.rawTime[0]).format('YYYY-MM-DDTHH:mm:ss') : '' // axios使
endTime = this.rawTime[1] ? moment(this.rawTime[1]).format('YYYY-MM-DDTHH:mm:ss') : ''
} else {
if (this.headFormValue.timeValue) {
startTime = moment(this.headFormValue.timeValue).format('YYYY-MM-DDTHH:mm:ss')
if (this.rawTime) {
startTime = moment(this.rawTime).format('YYYY-MM-DDTHH:mm:ss')
endTime = moment(startTime)
.add(1, 'd')
.format('YYYY-MM-DDTHH:mm:ss')
@ -232,24 +232,23 @@ export default {
//
getDataList() {
const { startTime, endTime } = this.getTimeRange()
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/monitoring/equipment/page'),
method: 'get',
params: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize,
key: this.dataForm.key
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data.list
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
url: this.$http.adornUrl('/monitoring/eqAnalysis/oee'),
method: 'post',
data: {
startTime,
endTime,
ftId: this.dataForm.ftId,
productlines: this.dataForm.productlines,
limit: this.pageIndex,
page: this.pageSize,
type: 1
}
this.dataListLoading = false
}).then(({ data: res }) => {
console.log('oee data:', res)
})
},
//