@@ -105,7 +105,6 @@ export default { | |||||
.zkagentPage({ | .zkagentPage({ | ||||
current: 1, | current: 1, | ||||
pageSize: 10, | pageSize: 10, | ||||
agentName: this.agentName, | |||||
}) | }) | ||||
.then((res) => { | .then((res) => { | ||||
// console.log(res); | // console.log(res); | ||||
@@ -133,7 +133,7 @@ import topTheme from "./top-theme"; | |||||
import topLogs from "./top-logs"; | import topLogs from "./top-logs"; | ||||
import topColor from "./top-color"; | import topColor from "./top-color"; | ||||
import topSetting from "./top-setting"; | import topSetting from "./top-setting"; | ||||
import { getStore, setStore } from "@/util/store"; | |||||
export default { | export default { | ||||
name: "Top", | name: "Top", | ||||
components: { | components: { | ||||
@@ -151,7 +151,7 @@ export default { | |||||
value: "", | value: "", | ||||
companyName: localStorage.getItem('topName'), | companyName: localStorage.getItem('topName'), | ||||
orgType:localStorage.getItem('orgType'), | orgType:localStorage.getItem('orgType'), | ||||
info:{}, | |||||
}; | }; | ||||
}, | }, | ||||
computed: { | computed: { | ||||
@@ -181,6 +181,7 @@ export default { | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
listenfullscreen(this.setScreen); | listenfullscreen(this.setScreen); | ||||
this.info = getStore({ name: "userInfo" }); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
handleScreen() { | handleScreen() { | ||||
@@ -201,33 +202,162 @@ export default { | |||||
// }) | // }) | ||||
// }, | // }, | ||||
goChange() { | goChange() { | ||||
let that = this; | |||||
this.$api.api.getTab().then((res) => { | this.$api.api.getTab().then((res) => { | ||||
// console.log(res) | // console.log(res) | ||||
// 循环数组,给定各种标志 | // 循环数组,给定各种标志 | ||||
if (res.data.length == 0) { | |||||
let idx = res.data[0].orgType; | |||||
// localStorage.setItem("orgType", idx); | |||||
if (idx == 0) { | |||||
// 质控管家后台 | |||||
// this.$router.push({ path: "/wel" }); | |||||
this.$message('不能选择') | |||||
if (res.data.length == 0) { | |||||
// this.$message.warning("您已经被禁用"); | |||||
this.$message.warning("别看了你进不了"); | |||||
} else if (res.data.length == 1) { | |||||
let idx = res.data[0].orgType; | |||||
localStorage.setItem("orgType", idx); | |||||
// 给定一个判断是否可以跳转的东西 | |||||
localStorage.setItem("backFlag", false); | |||||
// 当他只有质控后台时,不需要多余操作 | |||||
if (idx == 0) { | |||||
// 质控管家后台 | |||||
localStorage.setItem("topName", ""); | |||||
localStorage.setItem("orgCode", ""); | |||||
localStorage.setItem("houseId", ""); | |||||
localStorage.setItem("agentId", ""); | |||||
that.$router.push({ path: "/wel" }); | |||||
} | |||||
// 当他为其他时 先获取是否只有一个选项,然后在来进行判断 | |||||
if (idx == 1) { | |||||
this.getAgentList(); | |||||
// 代理商 | |||||
} | |||||
if (idx == 2) { | |||||
this.getCompanyList(); | |||||
// 公司后台 | |||||
} | |||||
if (idx == 3) { | |||||
this.findByUserName(); | |||||
// 楼盘后台 | |||||
} | |||||
} | } | ||||
if (idx == 1) { | |||||
// 代理商 | |||||
else { | |||||
this.$router.push({ path: "/check", query: { backFlag: true } }); | |||||
} | |||||
}); | |||||
}, | |||||
// 获取代理商 | |||||
getAgentList() { | |||||
this.$api.api | |||||
.zkagentPage({ | |||||
current: 1, | |||||
pageSize: 10, | |||||
}) | |||||
.then((res) => { | |||||
// console.log(res); | |||||
// this.list = res.data.records; | |||||
// this.total = res.data.total; | |||||
if (res.data.total == 0) { | |||||
this.$message.warning("您当前并未绑定楼盘"); | |||||
return; | |||||
} else if (res.data.total > 1) { | |||||
// 公司后台 | |||||
this.$router.push({ path: "/chose", query: { flag: 1 } }); | this.$router.push({ path: "/chose", query: { flag: 1 } }); | ||||
} else { | |||||
this.$router.push({ path: "/wel" }); | |||||
localStorage.setItem("topName", res.data.records[0].agentName); | |||||
localStorage.setItem("agentId", res.data.records[0].id); | |||||
localStorage.setItem("orgCode", ""); | |||||
localStorage.setItem("houseId", ""); | |||||
} | } | ||||
if (idx == 2) { | |||||
}); | |||||
}, | |||||
getCompanyList() { | |||||
this.$api.api | |||||
.zkorg({ | |||||
current: 1, | |||||
size: 10, | |||||
name: this.companyName, | |||||
orgType: localStorage.getItem("orgType"), | |||||
}) | |||||
.then((res) => { | |||||
// console.log(res); | |||||
// this.list = res.data.records; | |||||
// this.total = res.data.total; | |||||
if (res.data.total == 0) { | |||||
this.$message.warning("您当前并未绑定楼盘"); | |||||
return; | |||||
} else if (res.data.total > 1) { | |||||
// 公司后台 | // 公司后台 | ||||
this.$router.push({ path: "/chose", query: { flag: 2 } }); | this.$router.push({ path: "/chose", query: { flag: 2 } }); | ||||
} else { | |||||
this.$router.push({ path: "/wel" }); | |||||
localStorage.setItem("topName", res.data.records[0].name); | |||||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||||
localStorage.setItem("agentId", ""); | |||||
localStorage.setItem("houseId", ""); | |||||
} | } | ||||
if (idx == 3) { | |||||
// 楼盘后台 | |||||
}); | |||||
}, | |||||
findByUserName() { | |||||
this.$api.api | |||||
.findByUserName({ | |||||
username: this.info.username, | |||||
}) | |||||
.then((res) => { | |||||
// console.log(res); | |||||
this.info.selectHouseType = res.selectHouseType; | |||||
// 获取楼盘 | |||||
this.zkhousePage(); | |||||
}); | |||||
}, | |||||
zkhousePage() { | |||||
let obj = { | |||||
current: 1, | |||||
size: 10, | |||||
orgType: localStorage.getItem("orgType"), | |||||
}; | |||||
if (this.info.selectHouseType == 1) { | |||||
this.$api.api.zkhousePage(obj).then((res) => { | |||||
// console.log(res) | |||||
// this.list = res.data.records; | |||||
// this.total = res.data.total; | |||||
if (res.data.total == 0) { | |||||
this.$message.warning("您当前并未绑定楼盘"); | |||||
return; | |||||
} else if (res.data.total > 1) { | |||||
// 公司后台 | |||||
this.$router.push({ path: "/chose", query: { flag: 3 } }); | this.$router.push({ path: "/chose", query: { flag: 3 } }); | ||||
} else { | |||||
this.$router.push({ path: "/wel" }); | |||||
localStorage.setItem("topName", res.data.records[0].propertyName); | |||||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||||
localStorage.setItem("agentId", ""); | |||||
localStorage.setItem("houseId", res.data.records[0].id); | |||||
} | } | ||||
} else { | |||||
this.$router.push({ path: "/check", query: { backFlag: true } }); | |||||
} | |||||
}); | |||||
}); | |||||
} | |||||
if (this.info.selectHouseType == 2) { | |||||
this.$api.api | |||||
.findHouseByArea({ | |||||
id: null, | |||||
...obj, | |||||
}) | |||||
.then((res) => { | |||||
// console.log(res) | |||||
// this.list = res.data.records; | |||||
// this.total = res.data.total; | |||||
if (res.data.total == 0) { | |||||
this.$message.warning("您当前并未绑定楼盘"); | |||||
return; | |||||
} else if (res.data.total > 1) { | |||||
// 公司后台 | |||||
this.$router.push({ path: "/chose", query: { flag: 3 } }); | |||||
} else { | |||||
this.$router.push({ path: "/wel" }); | |||||
localStorage.setItem("topName", res.data.records[0].propertyName); | |||||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||||
localStorage.setItem("houseId", res.data.records[0].id); | |||||
localStorage.setItem("agentId", ""); | |||||
} | |||||
}); | |||||
} | |||||
}, | }, | ||||
setCollapse() { | setCollapse() { | ||||
this.$store.commit("SET_COLLAPSE"); | this.$store.commit("SET_COLLAPSE"); | ||||
@@ -61,7 +61,7 @@ import { randomLenNum } from "@/util/util"; | |||||
import { mapGetters } from "vuex"; | import { mapGetters } from "vuex"; | ||||
import { getCode } from "@/api/code"; | import { getCode } from "@/api/code"; | ||||
import Verify from "@/components/verifition/Verify"; | import Verify from "@/components/verifition/Verify"; | ||||
import { getStore, setStore } from "@/util/store"; | |||||
export default { | export default { | ||||
name: "Userlogin", | name: "Userlogin", | ||||
components: { | components: { | ||||
@@ -73,6 +73,7 @@ export default { | |||||
code: "", | code: "", | ||||
state: "", | state: "", | ||||
}, | }, | ||||
info:{}, | |||||
loginForm: { | loginForm: { | ||||
username: "admin", | username: "admin", | ||||
password: "123456", | password: "123456", | ||||
@@ -117,38 +118,166 @@ export default { | |||||
this.loginForm.code = params.captchaVerification; | this.loginForm.code = params.captchaVerification; | ||||
this.$store.dispatch("LoginByUsername", this.loginForm).then(() => { | this.$store.dispatch("LoginByUsername", this.loginForm).then(() => { | ||||
// this.$router.push({ path: this.tagWel.value }); | // this.$router.push({ path: this.tagWel.value }); | ||||
this.info = getStore({ name: "userInfo" }); | |||||
that.$api.api.getTab().then((res) => { | that.$api.api.getTab().then((res) => { | ||||
// console.log(res) | // console.log(res) | ||||
// 循环数组,给定各种标志 | // 循环数组,给定各种标志 | ||||
if (res.data.length == 0) { | if (res.data.length == 0) { | ||||
// this.$message.warning("您已经被禁用"); | // this.$message.warning("您已经被禁用"); | ||||
this.$message.warning("别看了你进不了"); | this.$message.warning("别看了你进不了"); | ||||
} | |||||
// else if (res.data.length == 1) { | |||||
// let idx = res.data[0].orgType; | |||||
// localStorage.setItem("orgType", idx); | |||||
// if (idx == 0) { | |||||
// // 质控管家后台 | |||||
// that.$router.push({ path: "/wel" }); | |||||
// } | |||||
// if (idx == 1) { | |||||
// // 代理商 | |||||
// that.$router.push({ path: "/chose", query: { flag: 1 } }); | |||||
// } | |||||
// if (idx == 2) { | |||||
// // 公司后台 | |||||
// that.$router.push({ path: "/chose", query: { flag: 2 } }); | |||||
// } | |||||
// if (idx == 3) { | |||||
// // 楼盘后台 | |||||
// that.$router.push({ path: "/chose", query: { flag: 3 } }); | |||||
// } | |||||
// } | |||||
else { | |||||
} else if (res.data.length == 1) { | |||||
let idx = res.data[0].orgType; | |||||
localStorage.setItem("orgType", idx); | |||||
// 给定一个判断是否可以跳转的东西 | |||||
localStorage.setItem("backFlag", false); | |||||
// 当他只有质控后台时,不需要多余操作 | |||||
if (idx == 0) { | |||||
// 质控管家后台 | |||||
localStorage.setItem("topName", ""); | |||||
localStorage.setItem("orgCode", ""); | |||||
localStorage.setItem("houseId", ""); | |||||
localStorage.setItem("agentId", ""); | |||||
that.$router.push({ path: "/wel" }); | |||||
} | |||||
// 当他为其他时 先获取是否只有一个选项,然后在来进行判断 | |||||
if (idx == 1) { | |||||
this.getAgentList(); | |||||
// 代理商 | |||||
// that.$router.push({ path: "/chose", query: { flag: 1 } }); | |||||
} | |||||
if (idx == 2) { | |||||
this.getCompanyList(); | |||||
// 公司后台 | |||||
// that.$router.push({ path: "/chose", query: { flag: 2 } }); | |||||
} | |||||
if (idx == 3) { | |||||
this.findByUserName(); | |||||
// 楼盘后台 | |||||
// that.$router.push({ path: "/chose", query: { flag: 3 } }); | |||||
} | |||||
} else { | |||||
that.$router.push({ path: "/check" }); | that.$router.push({ path: "/check" }); | ||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
}, | |||||
// 获取代理商 | |||||
getAgentList() { | |||||
this.$api.api | |||||
.zkagentPage({ | |||||
current: 1, | |||||
pageSize: 10, | |||||
}) | |||||
.then((res) => { | |||||
// console.log(res); | |||||
// this.list = res.data.records; | |||||
// this.total = res.data.total; | |||||
if (res.data.total == 0) { | |||||
this.$message.warning("您当前并未绑定楼盘"); | |||||
return; | |||||
} else if (res.data.total > 1) { | |||||
// 公司后台 | |||||
this.$router.push({ path: "/chose", query: { flag: 1 } }); | |||||
} else { | |||||
this.$router.push({ path: "/wel" }); | |||||
localStorage.setItem("topName", res.data.records[0].agentName); | |||||
localStorage.setItem("agentId", res.data.records[0].id); | |||||
localStorage.setItem("orgCode", ""); | |||||
localStorage.setItem("houseId", ""); | |||||
} | |||||
}); | |||||
}, | |||||
getCompanyList() { | |||||
this.$api.api | |||||
.zkorg({ | |||||
current: 1, | |||||
size: 10, | |||||
name: this.companyName, | |||||
orgType: localStorage.getItem("orgType"), | |||||
}) | |||||
.then((res) => { | |||||
// console.log(res); | |||||
// this.list = res.data.records; | |||||
// this.total = res.data.total; | |||||
if (res.data.total == 0) { | |||||
this.$message.warning("您当前并未绑定楼盘"); | |||||
return; | |||||
} else if (res.data.total > 1) { | |||||
// 公司后台 | |||||
this.$router.push({ path: "/chose", query: { flag: 2 } }); | |||||
} else { | |||||
this.$router.push({ path: "/wel" }); | |||||
localStorage.setItem("topName", res.data.records[0].name); | |||||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||||
localStorage.setItem("agentId", ""); | |||||
localStorage.setItem("houseId", ""); | |||||
} | |||||
}); | |||||
}, | |||||
findByUserName() { | |||||
this.$api.api | |||||
.findByUserName({ | |||||
username: this.info.username, | |||||
}) | |||||
.then((res) => { | |||||
// console.log(res); | |||||
this.info.selectHouseType = res.selectHouseType; | |||||
// 获取楼盘 | |||||
this.zkhousePage(); | |||||
}); | |||||
}, | |||||
zkhousePage() { | |||||
let obj = { | |||||
current: 1, | |||||
size: 10, | |||||
orgType: localStorage.getItem("orgType"), | |||||
}; | |||||
if (this.info.selectHouseType == 1) { | |||||
this.$api.api.zkhousePage(obj).then((res) => { | |||||
// console.log(res) | |||||
// this.list = res.data.records; | |||||
// this.total = res.data.total; | |||||
if (res.data.total == 0) { | |||||
this.$message.warning("您当前并未绑定楼盘"); | |||||
return; | |||||
} else if (res.data.total > 1) { | |||||
// 公司后台 | |||||
this.$router.push({ path: "/chose", query: { flag: 3 } }); | |||||
} else { | |||||
this.$router.push({ path: "/wel" }); | |||||
localStorage.setItem("topName", res.data.records[0].propertyName); | |||||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||||
localStorage.setItem("agentId", ""); | |||||
localStorage.setItem("houseId", res.data.records[0].id); | |||||
} | |||||
}); | |||||
} | |||||
if (this.info.selectHouseType == 2) { | |||||
this.$api.api | |||||
.findHouseByArea({ | |||||
id: null, | |||||
...obj, | |||||
}) | |||||
.then((res) => { | |||||
// console.log(res) | |||||
// this.list = res.data.records; | |||||
// this.total = res.data.total; | |||||
if (res.data.total == 0) { | |||||
this.$message.warning("您当前并未绑定楼盘"); | |||||
return; | |||||
} else if (res.data.total > 1) { | |||||
// 公司后台 | |||||
this.$router.push({ path: "/chose", query: { flag: 3 } }); | |||||
} else { | |||||
this.$router.push({ path: "/wel" }); | |||||
localStorage.setItem("topName", res.data.records[0].propertyName); | |||||
localStorage.setItem("orgCode", res.data.records[0].orgCode); | |||||
localStorage.setItem("houseId", res.data.records[0].id); | |||||
localStorage.setItem("agentId", ""); | |||||
} | |||||
}); | |||||
} | |||||
}, | }, | ||||
}, | }, | ||||
}; | }; | ||||
@@ -262,7 +262,7 @@ | |||||
@current-change="handleCurrentChange" | @current-change="handleCurrentChange" | ||||
:current-page="currentPage4" | :current-page="currentPage4" | ||||
:page-sizes="[6, 10, 14, 20]" | :page-sizes="[6, 10, 14, 20]" | ||||
:page-size="6" | |||||
:page-size="page.pageSize" | |||||
layout="total, sizes, prev, pager, next, jumper" | layout="total, sizes, prev, pager, next, jumper" | ||||
:total="page.total" | :total="page.total" | ||||
> | > | ||||
@@ -2,14 +2,15 @@ | |||||
<div class="box-center"> | <div class="box-center"> | ||||
<!-- 头 --> | <!-- 头 --> | ||||
<div class="app-titel"> | <div class="app-titel"> | ||||
<div class="titel-text"> | |||||
<div class="titel-text" v-if="orgType!=3"> | |||||
楼盘选择: | 楼盘选择: | ||||
<el-select v-model="houseId" @change="houseChange" placeholder="请选择"> | |||||
<el-select v-model="houseId" @change="houseChange" placeholder="请选择"> | |||||
<el-option | <el-option | ||||
v-for="item in buildingoptions" | v-for="item in buildingoptions" | ||||
:key="item.value" | :key="item.value" | ||||
:label="item.propertyName" | :label="item.propertyName" | ||||
:value="item.id"> | |||||
:value="item.id" | |||||
> | |||||
</el-option> | </el-option> | ||||
</el-select> | </el-select> | ||||
</div> | </div> | ||||
@@ -27,11 +28,11 @@ | |||||
<div style="margin-left: 26px"> | <div style="margin-left: 26px"> | ||||
<el-date-picker | <el-date-picker | ||||
v-model="customtime" | v-model="customtime" | ||||
@change="confirmtime()" | |||||
@change="confirmtime()" | |||||
type="daterange" | type="daterange" | ||||
range-separator="-" | range-separator="-" | ||||
:default-time="['00:00:00', '23:59:59']" | :default-time="['00:00:00', '23:59:59']" | ||||
value-format="yyyy-MM-dd" | |||||
value-format="yyyy-MM-dd" | |||||
start-placeholder="开始日期" | start-placeholder="开始日期" | ||||
end-placeholder="结束日期" | end-placeholder="结束日期" | ||||
> | > | ||||
@@ -158,10 +159,10 @@ export default { | |||||
namelist: [], | namelist: [], | ||||
numlist: [], | numlist: [], | ||||
objlist: [], | objlist: [], | ||||
value:'', | |||||
value: "", | |||||
orgType: localStorage.getItem("orgType"), | |||||
houseId: "", | houseId: "", | ||||
buildingoptions:[], | |||||
buildingoptions: [], | |||||
TimetoAhoose: 2, | TimetoAhoose: 2, | ||||
customtime: [], | customtime: [], | ||||
fromobj: { | fromobj: { | ||||
@@ -172,39 +173,49 @@ export default { | |||||
}, | }, | ||||
mounted() { | mounted() { | ||||
// this.myChartinit(); | // this.myChartinit(); | ||||
this.zkhousePage() | |||||
this.zkhousePage(); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
houseChange(){ | |||||
this.getorgCode() | |||||
houseChange() { | |||||
this.getorgCode(); | |||||
}, | }, | ||||
Toview(item,index){ | |||||
let Userrecord={ | |||||
TimetoAhoose:this.TimetoAhoose, | |||||
keywordsId:item.matchKeywords[index].keywordsId, | |||||
customtime:this.customtime, | |||||
starttime:this.fromobj.starttime, | |||||
endoftime:this.fromobj.endoftime, | |||||
houseId:this.houseId, | |||||
} | |||||
this.$router.push({ path: "/Statistics/Insightintothedetails", query: { flag: Userrecord } }); | |||||
Toview(item, index) { | |||||
let Userrecord = { | |||||
TimetoAhoose: this.TimetoAhoose, | |||||
keywordsId: item.matchKeywords[index].keywordsId, | |||||
customtime: this.customtime, | |||||
starttime: this.fromobj.starttime, | |||||
endoftime: this.fromobj.endoftime, | |||||
houseId: this.houseId, | |||||
}; | |||||
this.$router.push({ | |||||
path: "/Statistics/Insightintothedetails", | |||||
query: { flag: Userrecord }, | |||||
}); | |||||
}, | }, | ||||
//获取楼盘 | //获取楼盘 | ||||
zkhousePage() { | |||||
this.$api.api.findHouseByUser({ | |||||
zkhousePage() { | |||||
this.$api.api | |||||
.findHouseByUser({ | |||||
orgType: localStorage.getItem("orgType"), | orgType: localStorage.getItem("orgType"), | ||||
}).then((res) => { | |||||
}) | |||||
.then((res) => { | |||||
this.buildingoptions = res.data; | this.buildingoptions = res.data; | ||||
this.houseId = res.data[0].id; | |||||
this.getorgCode() | |||||
if (localStorage.getItem("orgType") == 3) { | |||||
this.houseId = localStorage.getItem("houseId"); | |||||
} else { | |||||
this.houseId = res.data[0].id; | |||||
} | |||||
// this.houseId = res.data[0].id; | |||||
this.getorgCode(); | |||||
}); | }); | ||||
}, | |||||
}, | |||||
//自定义时间 | //自定义时间 | ||||
confirmtime() { | confirmtime() { | ||||
this.TimetoAhoose = 6; | this.TimetoAhoose = 6; | ||||
this.fromobj.starttime = this.customtime[0]; | |||||
this.fromobj.endoftime = this.customtime[1]; | |||||
this.getorgCode() | |||||
this.fromobj.starttime = this.customtime[0]; | |||||
this.fromobj.endoftime = this.customtime[1]; | |||||
this.getorgCode(); | |||||
}, | }, | ||||
//切换时间 | //切换时间 | ||||
tabtimetap(index) { | tabtimetap(index) { | ||||
@@ -215,39 +226,37 @@ export default { | |||||
this.getorgCode(); | this.getorgCode(); | ||||
}, | }, | ||||
//初始化 | //初始化 | ||||
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) => { | |||||
this.objlist=res.data.list; | |||||
this.alllist=[{"name":'客户数量',"num":res.data.total}] | |||||
res.data.list.forEach((item,index)=>{ | |||||
this.alllist.push({ | |||||
name:item.name, | |||||
num:item.total | |||||
}) | |||||
}) | |||||
this.$nextTick(() => { | |||||
this.myChartinit() | |||||
}) | |||||
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) => { | |||||
this.objlist = res.data.list; | |||||
this.alllist = [{ name: "客户数量", num: res.data.total }]; | |||||
res.data.list.forEach((item, index) => { | |||||
this.alllist.push({ | |||||
name: item.name, | |||||
num: item.total, | |||||
}); | |||||
}); | |||||
this.$nextTick(() => { | |||||
this.myChartinit(); | |||||
}); | |||||
}); | }); | ||||
}, | |||||
}, | |||||
myChartinit() { | myChartinit() { | ||||
this.objlist.forEach((item, index) => { | this.objlist.forEach((item, index) => { | ||||