diff --git a/src/api/modules/api.js b/src/api/modules/api.js index 86cb6bd..f9a1700 100644 --- a/src/api/modules/api.js +++ b/src/api/modules/api.js @@ -1071,3 +1071,32 @@ export function addLoginCount(data) { data }) } +export function targetAnalysis(query) { + return request({ + url: '/autoSR/cusStageStatistics/targetAnalysis', + method:'get', + params:query + }) +} +export function operationalGoals(query) { + return request({ + url: '/autoSR/cusStageStatistics/operationalGoals', + method:'get', + params:query + }) +} +export function targetAnalysisCompared(query) { + return request({ + url: '/autoSR/cusStageStatistics/targetAnalysisCompared', + method:'get', + params:query + }) +} + +export function operationalGoalsCompared(query) { + return request({ + url: '/autoSR/cusStageStatistics/operationalGoalsCompared', + method:'get', + params:query + }) +} diff --git a/src/views/houseData/analyse.vue b/src/views/houseData/analyse.vue index 99489bc..456cc2e 100644 --- a/src/views/houseData/analyse.vue +++ b/src/views/houseData/analyse.vue @@ -8,7 +8,7 @@
运营目标完成排名
-
-
达标
-
未达标
+
+
+ 达标 +
+
+ 未达标 +
运营目标排名
-
-
上升
-
下降
+
+
+ 上升 +
+
+ 下降 +
--> - + { + let arr = [ + { + value: res.data.upToStandard, + name: "达标", + }, + { + value: res.data.didNotMakeIt, + name: "未达标", + }, + ]; + // console.log(res); + this.getChart("data1", arr); + }); }, - tabClick1(idx){ - this.tabFlag=idx + // 第一个柱状图 + operationalGoals() { + let obj = { + month: this.time, + agentId: this.selValue == 0 ? this.choicValue : null, + orgCode: this.selValue == 1 ? this.choicValue : null, + houseId: this.selValue == 2 ? this.choicValue : null, + operationType: localStorage.getItem("orgType")/1+1, + houseTypes: "0,1", + operationStaffId: this.operationStaffId, + }; + this.$api.api.operationalGoals(obj).then((res) => { + console.log(res); + }); }, - reset(){ - this.receiveForm={ + //第二个饼状图 + targetAnalysisCompared() { + let obj = { + month: this.time, + agentId: this.selValue == 0 ? this.choicValue : null, + orgCode: this.selValue == 1 ? this.choicValue : null, + houseId: this.selValue == 2 ? this.choicValue : null, + operationType: localStorage.getItem("orgType")/1+1, + houseTypes: "0,1", + operationStaffId: this.operationStaffId, + }; + this.$api.api.targetAnalysisCompared(obj).then((res) => { + let arr = [ + { + value: res.data.upToStandard, + name: "达标", + }, + { + value: res.data.didNotMakeIt, + name: "未达标", + }, + ]; + // console.log(res); + this.getChart("data2", arr); + }); + }, + // 第二个柱状图 + operationalGoalsCompared() { + let obj = { + month: this.time, + agentId: this.selValue == 0 ? this.choicValue : null, + orgCode: this.selValue == 1 ? this.choicValue : null, + houseId: this.selValue == 2 ? this.choicValue : null, + operationType: localStorage.getItem("orgType")/1+1, + houseTypes: "0,1", + operationStaffId: this.operationStaffId, + }; + this.$api.api.operationalGoalsCompared(obj).then((res) => { + console.log(res); + }); + }, + tabClick2(idx) { + this.tabFlag2 = idx; + }, + tabClick1(idx) { + this.tabFlag = idx; + }, + reset() { + this.receiveForm = { num1: "", num2: "", num3: "", - } - this.$refs.receiveForm.resetFields() + }; + this.$refs.receiveForm.resetFields(); + }, + screen() { + this.targetAnalysis(); + this.operationalGoals(); + this.targetAnalysisCompared(); + this.operationalGoalsCompared(); }, - screen() {}, clascreen() { - this.time=new Date().getFullYear() + "-" + (new Date().getMonth() + 1); - this.choicValue='' - if(this.orgType==0){ - this.selValue='0' - }else if(this.orgType==1){ - this.selValue='1' - }else{ - this.selValue='2' + this.time = new Date().getFullYear() + "-" + (new Date().getMonth() + 1); + this.choicValue = ""; + if (this.orgType == 0) { + this.selValue = "0"; + } else if (this.orgType == 1) { + this.selValue = "1"; + } else { + this.selValue = "2"; } - this.operationStaffId='' - this.getList() - + this.operationStaffId = ""; + this.getList(); }, sava() {}, getAnalyse(row) { @@ -598,7 +725,7 @@ export default { .findMyOrg({ orgType: localStorage.getItem("orgType"), agentId: localStorage.getItem("agentId"), - houseTypes:'0,1' + houseTypes: "0,1", }) .then((res) => { this.houseList = res.data; @@ -608,7 +735,7 @@ export default { .findHouseByUser({ orgType: localStorage.getItem("orgType"), houseId: localStorage.getItem("houseId"), - houseTypes:'0,1' + houseTypes: "0,1", }) .then((res) => { this.houseList = res.data; @@ -617,7 +744,7 @@ export default { this.$api.api .findMyAgent({ orgType: localStorage.getItem("orgType"), - houseTypes:'0,1' + houseTypes: "0,1", }) .then((res) => { this.houseList = res.data; @@ -923,7 +1050,7 @@ export default { text-indent: 16px; } } -.colostyle{ - color: #1E90FF; +.colostyle { + color: #1e90ff; }