fzq #31

Closed
fanzhiqin wants to merge 215 commits from fzq into test
Showing only changes of commit 5158d9a315 - Show all commits

View File

@ -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)
}) })
}, },
// //