Commit 03871138 by wangweidong

统计查询修改

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