Commit 3d4c003b by lichengming

修改了统计分析搜索按钮

parent dace1969
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</el-date-picker> </el-date-picker>
</Form-item> </Form-item>
<Form-item class="marginLeft-70" style="margin-left: -60px;"> <Form-item class="marginLeft-70" style="margin-left: -60px;">
<Button type="primary" class="width-80" @click="_search">搜索</Button> <Button type="primary" class="width-80" @click="_getData">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</div> </div>
...@@ -99,11 +99,15 @@ export default { ...@@ -99,11 +99,15 @@ export default {
this.tempData.endDate = data[1] this.tempData.endDate = data[1]
this.pieData.beginDate = data[0] this.pieData.beginDate = data[0]
this.pieData.endDate = data[1] this.pieData.endDate = data[1]
this.forObject.edateBegin = data[0]
this.forObject.edateEnd = data[1]
} else { } else {
this.tempData.beginDate = '' this.tempData.beginDate = ''
this.tempData.endDate = '' this.tempData.endDate = ''
this.pieData.beginDate = '' this.pieData.beginDate = ''
this.pieData.endDate = '' this.pieData.endDate = ''
this.forObject.edateBegin = ''
this.forObject.edateEnd = ''
} }
this.$refs.contractTableModal._changeDate(this.tempData) this.$refs.contractTableModal._changeDate(this.tempData)
}, },
...@@ -111,14 +115,15 @@ export default { ...@@ -111,14 +115,15 @@ export default {
this.$refs.contractTableModal._pieOpen(res) this.$refs.contractTableModal._pieOpen(res)
}, },
_getData: async function() { _getData: async function() {
console.log('753951')
console.log('选择时间后的请求', this.forObject) console.log('选择时间后的请求', this.forObject)
const result = await meterSample.pageCertificateRateStatistics( const result = await meterSample.pageCertificateRateStatistics(
this.forObject this.forObject
) )
if (result) { if (result) {
console.log('result=>', result)
this._open(result) this._open(result)
} }
this._search()
}, },
_open(result) { _open(result) {
...@@ -129,10 +134,10 @@ export default { ...@@ -129,10 +134,10 @@ export default {
beginDate: this.tempData.beginDate, beginDate: this.tempData.beginDate,
endDate: this.tempData.endDate endDate: this.tempData.endDate
}) })
this.$refs.contractPieModal._searchPie({ // this.$refs.contractPieModal._searchPie({
beginDate: this.pieData.beginDate, // beginDate: this.pieData.beginDate,
endDate: this.pieData.endDate // endDate: this.pieData.endDate
}) // })
}, },
_export() { _export() {
this.$refs.contractTableModal._exportSampleForm() this.$refs.contractTableModal._exportSampleForm()
......
...@@ -57,7 +57,6 @@ export default { ...@@ -57,7 +57,6 @@ export default {
methods: { methods: {
// 日期变化时,将时间赋值,导出根据查询条件 // 日期变化时,将时间赋值,导出根据查询条件
_changeDate(data) { _changeDate(data) {
console.log(123456)
console.log(data) console.log(data)
$('input[name=beginDate]').val(data.beginDate) $('input[name=beginDate]').val(data.beginDate)
$('input[name=endDate]').val(data.endDate) $('input[name=endDate]').val(data.endDate)
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</el-date-picker> </el-date-picker>
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_search" type="primary" class="width-80">搜索</Button> <Button @click="_getData" type="primary" class="width-80">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</div> </div>
...@@ -119,6 +119,10 @@ export default { ...@@ -119,6 +119,10 @@ export default {
getPage: { getPage: {
records: [] records: []
}, },
formObj: {
edateBegin: undefined,
edateEnd: undefined
},
tempData: { tempData: {
groupId: '', groupId: '',
groupName: '', groupName: '',
...@@ -138,6 +142,8 @@ export default { ...@@ -138,6 +142,8 @@ export default {
}, },
mounted() { mounted() {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.formObj.edateBegin = this.tempData.beginDate
this.formObj.edateEnd = this.tempData.endDate
// this._contHide() // this._contHide()
// this._getUserGroup() // this._getUserGroup()
this._getData() this._getData()
...@@ -146,7 +152,9 @@ export default { ...@@ -146,7 +152,9 @@ export default {
methods: { methods: {
// 服务类型 // 服务类型
_getData: async function() { _getData: async function() {
const result = await meterSample.pageSampleQuantityStatistics() const result = await meterSample.pageSampleQuantityStatistics(
this.formObj
)
if (result) { if (result) {
this.getPage.records = result this.getPage.records = result
this.$refs.testPieModal._openPie(this.getPage.records) this.$refs.testPieModal._openPie(this.getPage.records)
...@@ -167,9 +175,13 @@ export default { ...@@ -167,9 +175,13 @@ export default {
if (data) { if (data) {
this.tempData.beginDate = data[0] this.tempData.beginDate = data[0]
this.tempData.endDate = data[1] this.tempData.endDate = data[1]
this.formObj.edateBegin = data[0]
this.formObj.edateEnd = data[1]
} else { } else {
this.tempData.beginDate = '' this.tempData.beginDate = ''
this.tempData.endDate = '' this.tempData.endDate = ''
this.formObj.edateBegin = undefined
this.formObj.edateEnd = undefined
} }
}, },
_contHide() { _contHide() {
......
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