|
@@ -8,7 +8,7 @@ |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
v-model="time" |
|
|
v-model="time" |
|
|
type="month" |
|
|
type="month" |
|
|
:clearable='false' |
|
|
|
|
|
|
|
|
:clearable="false" |
|
|
value-format="yyyy-MM" |
|
|
value-format="yyyy-MM" |
|
|
@change="confirmtime" |
|
|
@change="confirmtime" |
|
|
placeholder="选择月" |
|
|
placeholder="选择月" |
|
@@ -122,9 +122,25 @@ |
|
|
<div class="zuo"> |
|
|
<div class="zuo"> |
|
|
<div class="title"> |
|
|
<div class="title"> |
|
|
<div class="text1">运营目标完成排名</div> |
|
|
<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> |
|
|
</div> |
|
|
<div |
|
|
<div |
|
@@ -155,9 +171,25 @@ |
|
|
<div class="zuo"> |
|
|
<div class="zuo"> |
|
|
<div class="title"> |
|
|
<div class="title"> |
|
|
<div class="text1">运营目标排名</div> |
|
|
<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> |
|
|
</div> |
|
|
<div |
|
|
<div |
|
@@ -264,7 +296,12 @@ |
|
|
</div> --> |
|
|
</div> --> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<el-dialog title="目标" :visible.sync="targetVisible" width="400px" @close='reset'> |
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="目标" |
|
|
|
|
|
:visible.sync="targetVisible" |
|
|
|
|
|
width="400px" |
|
|
|
|
|
@close="reset" |
|
|
|
|
|
> |
|
|
<el-form |
|
|
<el-form |
|
|
:model="receiveForm" |
|
|
:model="receiveForm" |
|
|
ref="receiveForm" |
|
|
ref="receiveForm" |
|
@@ -346,8 +383,8 @@ export default { |
|
|
num3: "", |
|
|
num3: "", |
|
|
}, |
|
|
}, |
|
|
receiveRules: {}, |
|
|
receiveRules: {}, |
|
|
tabFlag:1, |
|
|
|
|
|
tabFlag2:1, |
|
|
|
|
|
|
|
|
tabFlag: 1, |
|
|
|
|
|
tabFlag2: 1, |
|
|
objList: [ |
|
|
objList: [ |
|
|
{ |
|
|
{ |
|
|
name: "顾文一", |
|
|
name: "顾文一", |
|
@@ -374,52 +411,142 @@ export default { |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
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.getList(); |
|
|
this.getOperaList(); |
|
|
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: { |
|
|
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: "", |
|
|
num1: "", |
|
|
num2: "", |
|
|
num2: "", |
|
|
num3: "", |
|
|
num3: "", |
|
|
} |
|
|
|
|
|
this.$refs.receiveForm.resetFields() |
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
this.$refs.receiveForm.resetFields(); |
|
|
|
|
|
}, |
|
|
|
|
|
screen() { |
|
|
|
|
|
this.targetAnalysis(); |
|
|
|
|
|
this.operationalGoals(); |
|
|
|
|
|
this.targetAnalysisCompared(); |
|
|
|
|
|
this.operationalGoalsCompared(); |
|
|
}, |
|
|
}, |
|
|
screen() {}, |
|
|
|
|
|
clascreen() { |
|
|
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() {}, |
|
|
sava() {}, |
|
|
getAnalyse(row) { |
|
|
getAnalyse(row) { |
|
@@ -598,7 +725,7 @@ export default { |
|
|
.findMyOrg({ |
|
|
.findMyOrg({ |
|
|
orgType: localStorage.getItem("orgType"), |
|
|
orgType: localStorage.getItem("orgType"), |
|
|
agentId: localStorage.getItem("agentId"), |
|
|
agentId: localStorage.getItem("agentId"), |
|
|
houseTypes:'0,1' |
|
|
|
|
|
|
|
|
houseTypes: "0,1", |
|
|
}) |
|
|
}) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
this.houseList = res.data; |
|
|
this.houseList = res.data; |
|
@@ -608,7 +735,7 @@ export default { |
|
|
.findHouseByUser({ |
|
|
.findHouseByUser({ |
|
|
orgType: localStorage.getItem("orgType"), |
|
|
orgType: localStorage.getItem("orgType"), |
|
|
houseId: localStorage.getItem("houseId"), |
|
|
houseId: localStorage.getItem("houseId"), |
|
|
houseTypes:'0,1' |
|
|
|
|
|
|
|
|
houseTypes: "0,1", |
|
|
}) |
|
|
}) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
this.houseList = res.data; |
|
|
this.houseList = res.data; |
|
@@ -617,7 +744,7 @@ export default { |
|
|
this.$api.api |
|
|
this.$api.api |
|
|
.findMyAgent({ |
|
|
.findMyAgent({ |
|
|
orgType: localStorage.getItem("orgType"), |
|
|
orgType: localStorage.getItem("orgType"), |
|
|
houseTypes:'0,1' |
|
|
|
|
|
|
|
|
houseTypes: "0,1", |
|
|
}) |
|
|
}) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
this.houseList = res.data; |
|
|
this.houseList = res.data; |
|
@@ -923,7 +1050,7 @@ export default { |
|
|
text-indent: 16px; |
|
|
text-indent: 16px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.colostyle{ |
|
|
|
|
|
color: #1E90FF; |
|
|
|
|
|
|
|
|
.colostyle { |
|
|
|
|
|
color: #1e90ff; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |