lb #3
@ -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)
|
||||
})
|
||||
},
|
||||
// 每页数
|
||||
|
Loading…
Reference in New Issue
Block a user