Commit 03871138 by wangweidong

统计查询修改

parent 42781453
......@@ -211,5 +211,9 @@ export default {
pageCustomerEntrustStatistics: data =>
http
.post('meter/v1/sample/page_customer_entrust_statistics', data)
.then(res => res),
pageCertificateRateStatistics: data =>
http
.post('meter/v1/sample/page_certificate_rate_statistics', data)
.then(res => res)
}
......@@ -16,22 +16,22 @@
<!--@on-change="_endDateChange"></DatePicker>-->
<el-date-picker
v-model="queryDate"
@change="_dateChange"
type="monthrange"
range-separator="-"
start-placeholder="开始月份"
end-placeholder="结束月份"
size="small"
value-format="yyyy-MM">
value-format="yyyy-MM"
@change="_dateChange">
</el-date-picker>
</Form-item>
<Form-item class="marginLeft-70" style="margin-left: -60px;">
<Button @click="_search" type="primary" class="width-80">搜索</Button>
<Button type="primary" class="width-80" @click="_search">搜索</Button>
</Form-item>
</Form>
</div>
<div class="fr">
<Button @click="_export" class="width-80">导出</Button>
<Button class="width-80" @click="_export">导出</Button>
</div>
<div class="clear"></div>
</Col>
......@@ -55,6 +55,7 @@
</template>
<script>
import { meterSample } from '../../../api'
import ReportTimelyTable from './ReportTimelyTable'
import ReportTimelyPie from './ReportTimelyPie'
......@@ -66,6 +67,7 @@ export default {
data() {
const date = this.$dateformat(new Date(), 'yyyy-mm')
return {
forObject: {},
tempData: {
beginDate: date,
endDate: date
......@@ -78,7 +80,7 @@ export default {
}
},
mounted() {
// this._open()
this._getData()
// this._search();
},
methods: {
......@@ -99,22 +101,17 @@ export default {
_pieResult(res) {
this.$refs.contractTableModal._pieOpen(res)
},
_open() {
this.$store
.dispatch('LmsBaseDict/getItem', '报告及时率预警期')
.then(() => {
const timeWrning = this.$store.state.LmsBaseDict.item[0].name
this.$refs.contractTableModal._openTable({
beginDate: this.tempData.beginDate,
endDate: this.tempData.endDate,
warningDate: timeWrning
})
this.$refs.contractPieModal._openPie({
beginDate: this.tempData.beginDate,
endDate: this.tempData.endDate,
warningDate: timeWrning
})
})
_getData: async function() {
const result = await meterSample.pageCertificateRateStatistics(
this.forObject
)
if (result) {
this._open(result)
}
},
_open(result) {
this.$refs.contractPieModal._openPie(result)
},
_search() {
this.$refs.contractTableModal._searchTable({
......
......@@ -53,13 +53,7 @@ export default {
type: 'pie',
radius: ['30%', '65%'],
center: ['40%', '50%'],
data: [
{ value: 335, name: '直接访问' },
{ value: 310, name: '邮件营销' },
{ value: 234, name: '联盟广告' },
{ value: 135, name: '视频广告' },
{ value: 1548, name: '搜索引擎' }
],
data: [],
avoidLabelOverlap: false,
label: {
normal: {
......@@ -101,31 +95,27 @@ export default {
(document.documentElement.clientWidth - 200) / 2.6 + 'px'
},
_openPie(data) {
$('input[name="warningDate"]').val(data.warningDate)
$('input[name="beginDate"]').val(data.beginDate)
$('input[name="endDate"]').val(data.endDate)
// this._page()
// this.option.series[0].data = []
// this.option.legend.data = []
for (let i = 0; i < data.length; i++) {
this.option.series[0].data.push({
name: data[i].type,
value: data[i].quantity
})
this.option.legend.data.push(this.pie[i].type)
}
alert(this.option.series[0].data)
},
_searchPie(data) {
$('input[name="beginDate"]').val(data.beginDate)
$('input[name="endDate"]').val(data.endDate)
// this._page()
},
_page() {
this.$store
.dispatch('FoodSample/listPromptnessPie', this._searchParams())
.then(() => {
this.pie = this.$store.state.FoodSample.list
this.option.series[0].data = []
this.option.legend.data = []
for (let i = 0; i < this.pie.length; i++) {
this.option.series[0].data.push({
name: this.pie[i].type,
value: this.pie[i].total
})
this.option.legend.data.push(this.pie[i].type)
}
this.option.series[0].data = []
this.option.legend.data = []
for (let i = 0; i < data.length; i++) {
this.option.series[0].data.push({
name: this.pie[i].type,
value: this.pie[i].quantity
})
this.option.legend.data.push(this.pie[i].type)
}
},
_searchParams() {
const data = this.$serialize('report-timely-pie')
......
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