diff --git a/src/api/modules/http.js b/src/api/modules/http.js index 24061b6..4cd434e 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -192,3 +192,14 @@ export function insertupdate(data) { data }) } + + +//用户洞察 +export function findmatchdata(query) { + return request({ + url: '/autoSR/matchKeywords/findmatchdata', + method:'get', + params:query + }) +} + diff --git a/src/router/views/index.js b/src/router/views/index.js index 3fb50dd..6d9e97e 100644 --- a/src/router/views/index.js +++ b/src/router/views/index.js @@ -10,12 +10,15 @@ export default [{ component: () => import(/* webpackChunkName: "page" */ '@/views/admin/user/info') }, - // { - // path: '/building/chose', - // component: () => - // import(/* webpackChunkName: "page" */ '@/views/building/chose'), - // name: '楼盘选择', - // }, + { + path: '/Statistics/Insightintothedetails', + component: () => + import(/* webpackChunkName: "page" */ '@/views/Statistics/Insightintothedetails'), + name: '洞察详情', + }, + + + ] }, { path: '/activti', diff --git a/src/views/Statistics/Insightintothedetails.vue b/src/views/Statistics/Insightintothedetails.vue new file mode 100644 index 0000000..c221440 --- /dev/null +++ b/src/views/Statistics/Insightintothedetails.vue @@ -0,0 +1,319 @@ + + + + + diff --git a/src/views/Statistics/index.vue b/src/views/Statistics/index.vue index cd5af11..e30b88b 100644 --- a/src/views/Statistics/index.vue +++ b/src/views/Statistics/index.vue @@ -4,12 +4,12 @@
楼盘选择: - + + :label="item.propertyName" + :value="item.id">
@@ -26,10 +26,12 @@
@@ -152,26 +154,7 @@ import * as echarts from "echarts"; export default { data() { return { - alllist: [ - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - { name: "阿达", num: "5" }, - ], - customtime: "", - TimetoAhoose: 2, - fromobj: { - starttime: "", - endoftime: "", - }, + alllist: [], namelist: [], numlist: [], objlist: [ @@ -229,9 +212,16 @@ export default { unit: "", }, ], + value:'', + houseId: "", - options:{}, - value:'' + buildingoptions:[], + TimetoAhoose: 2, + customtime: [], + fromobj: { + starttime: "", + endoftime: "", + }, }; }, mounted() { @@ -239,6 +229,10 @@ export default { // this.zkhousePage() }, methods: { + Toview(){ + this.$router.push({ path: "/Statistics/Insightintothedetails", query: { flag: 1 } }); + }, + //获取楼盘  zkhousePage() {       let obj = {         current: 1, @@ -246,30 +240,62 @@ export default {       };       this.$api.api.zkhousePage(obj).then((res) => {         console.log(res) - //         this.tableData = res.data.records; - //         this.total = res.data.total; + this.houseId=res.data.records[0].id; +         this.buildingoptions= res.data.records; + this.getorgCode();       });     }, - - + //自定义时间 + confirmtime() { + this.TimetoAhoose = 6; + this.fromobj.starttime = this.customtime[0]; + this.fromobj.endoftime = this.customtime[1]; + }, + //切换时间 tabtimetap(index) { this.TimetoAhoose = index; this.fromobj.starttime = ""; this.fromobj.endoftime = ""; - this.customtime = ""; + this.customtime = []; this.getorgCode(); }, - confirmtime() { - if (this.customtime == "") { + //初始化 + getorgCode(){ + this.namelist=[]; + this.numlist=[]; + this.objlist=[]; + var dateType=''; + if(this.TimetoAhoose==6){ + dateType=''; + }else { + dateType=this.TimetoAhoose; + } + + this.$api.http.findmatchdata({ + dateType:dateType, + houseId:this.houseId, + statDateStart:this.fromobj.starttime, + statDateEnd:this.fromobj.endoftime + }).then((res) => { + if(data.data.res==1){ + this.objlist=data.data.obj.list; + this.alllist=[{"name":'客户数量',"num":data.data.obj.total}] + data.data.obj.list.forEach((item,index)=>{ + this.alllist.push({ + name:item.name, + num:item.total + }) + }) + // this.$nextTick(() => { + // this.myChartinit() + // }) + } + }); + }, + + + - } else { - this.TimetoAhoose = 6; - const d = new Date(this.customtime[0]); - this.fromobj.starttime = d.getFullYear() + "-" + this.Zeropadding(d.getMonth() + 1) + "-" + this.Zeropadding(d.getDate()); - const c = new Date(this.customtime[1]); - this.fromobj.endoftime = c.getFullYear() + "-" + this.Zeropadding(c.getMonth() + 1) + "-" + this.Zeropadding(c.getDate()); - } - }, myChartinit() { this.objlist.forEach((item, index) => { if (item.total != 0) { diff --git a/src/views/Template/taboo,vue b/src/views/Template/taboo,vue deleted file mode 100644 index e69de29..0000000 diff --git a/src/views/Template/taboo.vue b/src/views/Template/taboo.vue new file mode 100644 index 0000000..a9cb294 --- /dev/null +++ b/src/views/Template/taboo.vue @@ -0,0 +1,220 @@ + + + + +