Commit 2c6eb7bf authored by 王晓旭's avatar 王晓旭

修改数据精算业务数据分析

parent a17bbfba
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</a-col> </a-col>
<a-col :span="20"> <a-col :span="20">
<div class="table_title">排队业务分布情况</div> <div class="table_title">排队业务分布情况</div>
<a-table :row-key="record => record.key" :dataSource="lineUp" :columns="lineUpColumns" :pagination="false" :scroll="{ x: 1400, y: 0 }"/> <a-table :row-key="(record,index) => index" :dataSource="lineUp" :columns="lineUpColumns" :pagination="false" :scroll="{ x: 1400, y: 0 }"/>
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</a-col> </a-col>
<a-col :span="20"> <a-col :span="20">
<div>预约业务分布情况</div> <div>预约业务分布情况</div>
<a-table :row-key="record => record.id" :dataSource="appointment" :columns="appointmentColumns" :pagination="false" :scroll="{ x: 1400, y: 0 }"/> <a-table :row-key="(record,index) => index" :dataSource="appointment" :columns="appointmentColumns" :pagination="false" :scroll="{ x: 1400, y: 0 }"/>
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
...@@ -125,14 +125,14 @@ ...@@ -125,14 +125,14 @@
<template #extra> <template #extra>
<a-select <a-select
ref="select" ref="select"
v-model:value="takeNumberTopDate" v-model="takeNumberTopDate"
:options="options" :options="options"
style="width: 120px" style="width: 120px"
@change="changeTakeNumberTopDate" @change="changeTakeNumberTopDate"
> >
</a-select> </a-select>
</template> </template>
<a-table :row-key="record => record.index" :dataSource="takeNumberTop" :columns="takeNumberTopColumns" :pagination="false"> <a-table :row-key="(record,index) => index" :dataSource="takeNumberTop" :columns="takeNumberTopColumns" :pagination="false">
<span slot="index" slot-scope="text, record, index"> <span slot="index" slot-scope="text, record, index">
{{ index + 1 }} {{ index + 1 }}
</span> </span>
...@@ -153,14 +153,14 @@ ...@@ -153,14 +153,14 @@
<template #extra> <template #extra>
<a-select <a-select
ref="select" ref="select"
v-model:value="appointmentTopDate" v-model="appointmentTopDate"
:options="options" :options="options"
style="width: 120px" style="width: 120px"
@change="changeAppointmentTopDate" @change="changeAppointmentTopDate"
> >
</a-select> </a-select>
</template> </template>
<a-table :row-key="record => record.index" :dataSource="appointmentTop" :columns="appointmentTopColumns" :pagination="false"> <a-table :row-key="(record,index) => index" :dataSource="appointmentTop" :columns="appointmentTopColumns" :pagination="false">
<span slot="index" slot-scope="text, record, index"> <span slot="index" slot-scope="text, record, index">
{{ index + 1 }} {{ index + 1 }}
</span> </span>
...@@ -183,14 +183,14 @@ ...@@ -183,14 +183,14 @@
<template #extra> <template #extra>
<a-select <a-select
ref="select" ref="select"
v-model:value="takeNumberLessDate" v-model="takeNumberLessDate"
:options="options" :options="options"
style="width: 120px" style="width: 120px"
@change="changeTakeNumberLessDate" @change="changeTakeNumberLessDate"
> >
</a-select> </a-select>
</template> </template>
<a-table :row-key="record => record.index" :dataSource="takeNumberLess" :columns="takeNumberLessColumns" :pagination="false"> <a-table :row-key="(record,index) => index" :dataSource="takeNumberLess" :columns="takeNumberLessColumns" :pagination="false">
<span slot="index" slot-scope="text, record, index"> <span slot="index" slot-scope="text, record, index">
{{ index + 1 }} {{ index + 1 }}
</span> </span>
...@@ -211,14 +211,14 @@ ...@@ -211,14 +211,14 @@
<template #extra> <template #extra>
<a-select <a-select
ref="select" ref="select"
v-model:value="appointmentLessDate" v-model="appointmentLessDate"
:options="options" :options="options"
style="width: 120px" style="width: 120px"
@change="changeAppointmentLessDate" @change="changeAppointmentLessDate"
> >
</a-select> </a-select>
</template> </template>
<a-table :row-key="record => record.index" :dataSource="appointmentLess" :columns="appointmentLessColumns" :pagination="false"> <a-table :row-key="(record,index) => index" :dataSource="appointmentLess" :columns="appointmentLessColumns" :pagination="false">
<span slot="index" slot-scope="text, record, index"> <span slot="index" slot-scope="text, record, index">
{{ index + 1 }} {{ index + 1 }}
</span> </span>
...@@ -422,7 +422,7 @@ import moment from "moment" ...@@ -422,7 +422,7 @@ import moment from "moment"
key:'index', key:'index',
title: '排名', title: '排名',
dataIndex: 'index', dataIndex: 'index',
scopedSlots: { customRender: 'index' }, // scopedSlots: { customRender: 'index' },
}, },
{ {
key:'businessName', key:'businessName',
...@@ -433,16 +433,20 @@ import moment from "moment" ...@@ -433,16 +433,20 @@ import moment from "moment"
key:'number', key:'number',
title: '办理数量', title: '办理数量',
dataIndex: 'nums', dataIndex: 'nums',
scopedSlots: { customRender: 'nums' }, // scopedSlots: { customRender: 'nums' },
}, },
], ],
takeNumberTopDate: '0', takeNumberTopDate: '0',
appointmentTopDate: '0', appointmentTopDate: '0',
takeNumberLessDate: '0', takeNumberLessDate: '0',
appointmentLessDate: '0', appointmentLessDate: '0',
siteid:localStorage.getItem("siteId")
} }
}, },
mounted(){ mounted(){
this.$bus.$on("changeSite", () => {
this.siteid = localStorage.getItem("siteId")
});
this.getAllData() this.getAllData()
this.getTakeLineData() this.getTakeLineData()
this.getAppointmentData() this.getAppointmentData()
...@@ -451,11 +455,22 @@ import moment from "moment" ...@@ -451,11 +455,22 @@ import moment from "moment"
this.getTakeNumberLess() this.getTakeNumberLess()
this.getAppointmentLess() this.getAppointmentLess()
}, },
watch:{
siteid(){
this.getAllData()
this.getTakeLineData()
this.getAppointmentData()
this.getTakeNumberTop()
this.getAppointmentTop()
this.getTakeNumberLess()
this.getAppointmentLess()
}
},
methods:{ methods:{
//获取全部基本数据 //获取全部基本数据
async getAllData() { async getAllData() {
this.nowDate= moment(new Date()).format('YYYY-MM-DD h:mm:ss') this.nowDate= moment(new Date()).format('YYYY-MM-DD h:mm:ss')
const res = await getAllInfo() const res = await getAllInfo({siteid:this.siteid})
if(res.code == 1){ if(res.code == 1){
this.situation= res.data this.situation= res.data
this.firstPie= { this.firstPie= {
...@@ -474,7 +489,7 @@ import moment from "moment" ...@@ -474,7 +489,7 @@ import moment from "moment"
}, },
// 排队取号 // 排队取号
async getTakeLineData() { async getTakeLineData() {
const res = await getBusinessInfo() const res = await getBusinessInfo({siteid:this.siteid})
if(res.code == 1){ if(res.code == 1){
let arr= res.data.info let arr= res.data.info
let newArr= [] let newArr= []
...@@ -503,7 +518,7 @@ import moment from "moment" ...@@ -503,7 +518,7 @@ import moment from "moment"
}, },
// 预约情况 // 预约情况
async getAppointmentData() { async getAppointmentData() {
const res = await getWyInfo() const res = await getWyInfo({siteid:this.siteid})
if(res.code == 1){ if(res.code == 1){
let arr= res.data.info let arr= res.data.info
let newArr= [] let newArr= []
...@@ -535,7 +550,7 @@ import moment from "moment" ...@@ -535,7 +550,7 @@ import moment from "moment"
if(val== undefined){ if(val== undefined){
val = 0 val = 0
} }
const res = getTopBusiness({selected: val,sort: 'DESC'}) const res = await getTopBusiness({selected: val,sort: 'DESC',siteid:this.siteid})
if(res.code == 1) { if(res.code == 1) {
this.takeNumberTop= res.data this.takeNumberTop= res.data
} }
...@@ -545,7 +560,7 @@ import moment from "moment" ...@@ -545,7 +560,7 @@ import moment from "moment"
if(val== undefined){ if(val== undefined){
val = 0 val = 0
} }
const res = getTopBusiness({selected: val,sort: 'ASC'}) const res = await getTopBusiness({selected: val,sort: 'ASC',siteid:this.siteid})
if(res.code == 1) { if(res.code == 1) {
this.takeNumberLess= res.data this.takeNumberLess= res.data
} }
...@@ -555,7 +570,7 @@ import moment from "moment" ...@@ -555,7 +570,7 @@ import moment from "moment"
if(val== undefined){ if(val== undefined){
val = 0 val = 0
} }
const res = getTopWy({selected: val,sort: 'DESC'}) const res = await getTopWy({selected: val,sort: 'DESC',siteid:this.siteid})
if(res.code == 1) { if(res.code == 1) {
this.appointmentTop= res.data this.appointmentTop= res.data
} }
...@@ -565,7 +580,7 @@ import moment from "moment" ...@@ -565,7 +580,7 @@ import moment from "moment"
if(val== undefined){ if(val== undefined){
val = 0 val = 0
} }
const res = getTopWy({selected: val,sort: 'ASC'}) const res = await getTopWy({selected: val,sort: 'ASC',siteid:this.siteid})
if(res.code == 1) { if(res.code == 1) {
this.appointmentLess= res.data this.appointmentLess= res.data
} }
......
...@@ -40,13 +40,13 @@ export default { ...@@ -40,13 +40,13 @@ export default {
businessName: '', businessName: '',
dataSource: [], dataSource: [],
sourceList:[], sourceList:[],
dataList: [], // dataList: [],
btnShow: false, btnShow: false,
} }
}, },
mounted() { mounted() {
this.getList() // this.getList()
}, },
created(){ created(){
}, },
...@@ -69,15 +69,15 @@ export default { ...@@ -69,15 +69,15 @@ export default {
this.btnShow= false this.btnShow= false
this.businessName= '' this.businessName= ''
}, },
async getList(){ // async getList(){
await axios.get('http://192.168.0.98:8090/inter/statistic/busList',{params: {siteid: 1}}).then((res)=>{ // await axios.get('http://192.168.0.98:8090/inter/statistic/busList',{params: {siteid: 1}}).then((res)=>{
if(res && res.status==200){ // if(res && res.status==200){
res.data.data.forEach(item=>{ // res.data.data.forEach(item=>{
this.dataList.push(item.name) // this.dataList.push(item.name)
}) // })
} // }
}) // })
}, // },
onSearch: _.debounce(function(val){ onSearch: _.debounce(function(val){
this.dataSource= [] this.dataSource= []
userSiteBus({siteid: localStorage.getItem('siteId'),bus_name:val}).then(res => { userSiteBus({siteid: localStorage.getItem('siteId'),bus_name:val}).then(res => {
......
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