diff --git a/src/api/modules/http.js b/src/api/modules/http.js index c82f15d..be33ab8 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -31,6 +31,17 @@ export function putObj(obj) { }) } +// 首页卡片 +export function houseIndex(query) { + return request({ + url: 'autoSR/cusStageStatistics/houseIndex', + method:'get', + params:query + }) +} + + + // 代理商管理列表 export function getAgentList(query) { return request({ diff --git a/src/page/wel.vue b/src/page/wel.vue index c7acf0a..27e95fd 100644 --- a/src/page/wel.vue +++ b/src/page/wel.vue @@ -1,218 +1,243 @@ @@ -221,9 +246,19 @@ export default { name: 'Wel', data() { return { + role:'', + houseId:"", + houseList:[], classatec:1, customtime:[], + statDateStart:'', + statDateEnd:'', TimetoAhoose:0, + cardlist:{ + datalist:{}, + liftlist:{}, + sequential:{}, + }, tableData: [ { date: '80%', @@ -305,16 +340,94 @@ export default { }, ] } + }, + mounted() { + this.role=localStorage.getItem("orgType"); + if(this.role==3){ + this.zkhousePage() + } + + // comparedStat升降 + //todayStat今天 + //yesterdayStat环比 + }, methods: { + //获取看片数据 + getgicd(){ + let obj = { + houseId:this.houseId, + dateType: this.TimetoAhoose, + statDateStart: this.statDateStart, + statDateEnd:this.statDateEnd + }; + this.$api.http.houseIndex(obj).then((res) => { + + this.cardlist.datalist={ + receptionCount:res.data.todayStat.receptionCount, + activeCustomer:res.data.todayStat.activeCustomer, + receivingCustomer:res.data.todayStat.receivingCustomer, + avgDuration:res.data.todayStat.avgDuration, + fraction:res.data.todayStat.fraction, + prohibitedCustomer:res.data.todayStat.prohibitedCustomer, + prohibitedZb:res.data.todayStat.prohibitedZb, + accountNum:res.data.todayStat.accountNum, + + } + this.cardlist.liftlist={ + receptionCount:res.data.comparedStat.receptionCount, + activeCustomer:res.data.comparedStat.activeCustomer, + receivingCustomer:res.data.comparedStat.receivingCustomer, + avgDuration:res.data.comparedStat.avgDuration, + fraction:res.data.comparedStat.fraction, + prohibitedCustomer:res.data.comparedStat.prohibitedCustomer, + prohibitedZb:res.data.comparedStat.prohibitedZb, + accountNum:res.data.comparedStat.accountNum, + } + this.cardlist.sequential={ + receptionCount:res.data.yesterdayStat.receptionCount, + activeCustomer:res.data.yesterdayStat.activeCustomer, + receivingCustomer:res.data.yesterdayStat.receivingCustomer, + avgDuration:res.data.yesterdayStat.avgDuration, + fraction:res.data.yesterdayStat.fraction, + prohibitedCustomer:res.data.yesterdayStat.prohibitedCustomer, + prohibitedZb:res.data.yesterdayStat.prohibitedZb, + accountNum:res.data.yesterdayStat.accountNum, + } + }); + }, + //切换楼盘 + houseChange() { + + }, + //获取楼盘 + zkhousePage() { + this.$api.api + .findHouseByUser({ + orgType: localStorage.getItem("orgType"), + }) + .then((res) => { + this.houseList = res.data; + this.houseId = res.data[0].id; + this.getgicd() + }); + }, tabclick(i){ this.classatec=i; }, tabtimetap(i){ - this.TimetoAhoose=i + this.statDateStart=''; + this.statDateEnd=''; + this.customtime=[]; + this.TimetoAhoose=i; + this.getgicd() }, + //切换世间 confirmtime() { - console.log(this.customtime) + this.statDateStart=this.customtime[0]; + this.statDateEnd=this.customtime[1]; + this.TimetoAhoose=5; + this.getgicd() }, } } @@ -331,6 +444,13 @@ export default { width: 100%; display: flex; margin-top: 16px; + .pagechen1{ + flex: 1; + min-width: 223px; + border-radius: 4px; + margin-right: 20px; + padding: 20px; + } .pagechen{ flex: 1; min-width: 223px; diff --git a/vue.config.js b/vue.config.js index 367e9d3..66382a7 100644 --- a/vue.config.js +++ b/vue.config.js @@ -4,7 +4,7 @@ */ // const url = 'http://pigx-gateway' // const url = 'http://39.97.167.65:9999' //测试 -// const url = 'http://192.168.31.160:9999' //长龙 +// const url = 'http://192.168.31.168:9999' //长龙 const url = 'http://192.168.31.133:9999' //嘉豪 // const url = 'http://192.168.31.100:9999' //王笑