Browse Source

init

newStyle
lancer 2 years ago
parent
commit
0851a20f97
2 changed files with 205 additions and 49 deletions
  1. +29
    -0
      src/api/modules/api.js
  2. +176
    -49
      src/views/houseData/analyse.vue

+ 29
- 0
src/api/modules/api.js View File

@@ -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
})
}

+ 176
- 49
src/views/houseData/analyse.vue View File

@@ -8,7 +8,7 @@
<el-date-picker
v-model="time"
type="month"
:clearable='false'
:clearable="false"
value-format="yyyy-MM"
@change="confirmtime"
placeholder="选择月"
@@ -122,9 +122,25 @@
<div class="zuo">
<div class="title">
<div class="text1">运营目标完成排名</div>
<div style="display:flex;margin-left:auto;line-height: 54px; margin-right:20px;cursor: pointer;" >
<div :class="{ colostyle: tabFlag == 1 }" style="margin-right:10px;" @click="tabClick1(1)">达标</div>
<div :class="{ colostyle: tabFlag == 2 }" @click="tabClick1(2)">未达标</div>
<div
style="
display: flex;
margin-left: auto;
line-height: 54px;
margin-right: 20px;
cursor: pointer;
"
>
<div
:class="{ colostyle: tabFlag == 1 }"
style="margin-right: 10px"
@click="tabClick1(1)"
>
达标
</div>
<div :class="{ colostyle: tabFlag == 2 }" @click="tabClick1(2)">
未达标
</div>
</div>
</div>
<div
@@ -155,9 +171,25 @@
<div class="zuo">
<div class="title">
<div class="text1">运营目标排名</div>
<div style="display:flex;margin-left:auto;line-height: 54px; margin-right:20px;cursor: pointer;" >
<div :class="{ colostyle: tabFlag2 == 1 }" style="margin-right:10px;" @click="tabClick2(1)">上升</div>
<div :class="{ colostyle: tabFlag2 == 2 }" @click="tabClick2(2)">下降</div>
<div
style="
display: flex;
margin-left: auto;
line-height: 54px;
margin-right: 20px;
cursor: pointer;
"
>
<div
:class="{ colostyle: tabFlag2 == 1 }"
style="margin-right: 10px"
@click="tabClick2(1)"
>
上升
</div>
<div :class="{ colostyle: tabFlag2 == 2 }" @click="tabClick2(2)">
下降
</div>
</div>
</div>
<div
@@ -264,7 +296,12 @@
</div> -->
</el-dialog>

<el-dialog title="目标" :visible.sync="targetVisible" width="400px" @close='reset'>
<el-dialog
title="目标"
:visible.sync="targetVisible"
width="400px"
@close="reset"
>
<el-form
:model="receiveForm"
ref="receiveForm"
@@ -346,8 +383,8 @@ export default {
num3: "",
},
receiveRules: {},
tabFlag:1,
tabFlag2:1,
tabFlag: 1,
tabFlag2: 1,
objList: [
{
name: "顾文一",
@@ -374,52 +411,142 @@ export default {
},
mounted() {
// 先默认获取当前月份
this.time = new Date().getFullYear() + "-" + (new Date().getMonth() + 1);
// console.log(new Date().getFullYear() + "-" + (new Date().getMonth() + 1));
this.time =
new Date().getFullYear() +
"-" +
(new Date().getMonth() + 1 < 10
? "0" + (new Date().getMonth() + 1)
: new Date().getMonth() + 1);
console.log(
new Date().getFullYear() +
"-" +
(new Date().getMonth() + 1 < 10
? "0" + (new Date().getMonth() + 1)
: new Date().getMonth() + 1),
"时间"
);
this.getList();
this.getOperaList();
let arr = [
{
value: 10,
name: "达标",
},
{
value: 10,
name: "未达标",
},
];
this.getChart("data1", arr);
this.getChart("data2", arr);
this.screen();
// this.targetAnalysis()
// this.getChart("data1", arr);
// this.getChart("data2", arr);
},
methods: {
tabClick2(idx){
this.tabFlag2=idx
//第一个饼状图
targetAnalysis() {
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.targetAnalysis(obj).then((res) => {
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;
}
</style>

Loading…
Cancel
Save