Commit 221b8042 by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

parents 60fd52b9 307aa39e
...@@ -405,9 +405,34 @@ export default { ...@@ -405,9 +405,34 @@ export default {
}, },
_inputBack(data) { _inputBack(data) {
console.log(data)
if (undefined !== data) { if (undefined !== data) {
for (let i = 0; i < data.length; i++) { if (this.getPage.records.length > 0) {
this.getPage.records.push(data[i]) const j = this.getPage.records.length
for (let i = j; i < data.length + j; i++) {
console.log(i)
this.getPage.records.push(data[i - j])
if (data[i - j].lastTime !== undefined) {
this.getPage.records[i].lastTime = new Date(data[i - j].lastTime)
}
console.log(this.getPage.records)
// this.getPage.records[i].lastTime = new Date(data[0].lastTime)
}
} else {
for (let i = 0; i < data.length; i++) {
// if (this.getPage.records[i].lastTime !== undefined) {
// const t = this.getPage.records[i].lastTime
// const d = t.valueOf(t)
// console.log('时间戳', d)
// this.getPage.records[i].lastTime = d
// this.getPage.records = []
// }
this.getPage.records.push(data[i])
if (data[i].lastTime !== undefined) {
this.getPage.records[i].lastTime = new Date(data[i].lastTime)
}
console.log(data[i].lastTime)
}
} }
} }
}, },
...@@ -664,21 +689,26 @@ export default { ...@@ -664,21 +689,26 @@ export default {
this._showAddress(formObj) this._showAddress(formObj)
this._showTime(formObj) this._showTime(formObj)
this.getPage.records = formObj.sampleList this.getPage.records = formObj.sampleList
console.log(formObj)
for (let i = 0; i < formObj.sampleList.length; i++) { for (let i = 0; i < formObj.sampleList.length; i++) {
this.getPage.records[i].lastTime = new Date( if (formObj.sampleList[i].lastTime !== undefined) {
formObj.sampleList[i].lastTime this.getPage.records[i].lastTime = new Date(
) formObj.sampleList[i].lastTime
)
}
} }
}, },
_getList: async function() { _getList: async function() {
const result = await meterEntrust.pageList() const result = await meterEntrust.pageList()
const list = [] // const list = []
if (result) { if (result) {
for (let i = 0; i < result.length; i++) { for (let i = 0; i < result.length; i++) {
list.push(result[i].cname) // list.push(result[i].cname)
this.customerData.push(result[i].cname)
console.log(this.customerData)
} }
console.log('委托单位名单', list) // console.log('委托单位名单', list)
this.customerData = list // this.customerData = list
} }
}, },
_getQueryList: async function(data) { _getQueryList: async function(data) {
......
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
], ],
formObj: { formObj: {
// id: '', // id: '',
title: '' title: undefined
// businessTypeList: 0 // businessTypeList: 0
}, },
again: false, again: false,
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
if (result !== undefined) { if (result !== undefined) {
this.formObj.id = result.id this.formObj.id = result.id
} else { } else {
this.formObj.id = '' this.formObj.id = undefined
} }
this._search() this._search()
}, },
...@@ -153,15 +153,18 @@ export default { ...@@ -153,15 +153,18 @@ export default {
this._hideLoading() this._hideLoading()
count = 0 count = 0
}, },
_page: async function(data) { _page: async function() {
const result = await meterPrint.pageSampleTemplate(data) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj)
const result = await meterPrint.pageSampleTemplate(this.formObj)
if (result) { if (result) {
this.getPage = result this.getPage = result
this.$refs.pageTable._hideLoading()
} }
}, },
_search() { _search() {
// this.$refs.pageTable._pageChange(1) this.$refs.pageTable._pageChange(1)
this._page(this.formObj) // this._page(this.formObj)
}, },
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment