+
+
一级:
-
+
- 二级:
-
+ 二级:
+
-
+
-
+
对比报表
-
- {{scope.row.shiduan1}}%
-
+
+ {{ scope.row.shiduan1 }}%
+
-
- {{scope.row.shiduan2}}%
-
+
+ {{ scope.row.shiduan2 }}%
+
-
- {{scope.row.heji}}%
- {{scope.row.heji}}%
- {{scope.row.heji}}%
-
+
+
+ {{ scope.row.heji }}%
+ {{ scope.row.heji }}%
+
+ {{ scope.row.heji }}%
+
-
-
-
-
-
-
- {{item.name}} |
-
-
- {{item.name}} |
-
-
- {{item.name}} |
-
-
-
- {{item.name}}
- {{item.name}}%
- {{item.name}}%
- {{item.name}}%
- |
-
-
-
-
-
+
+
+
+
+
+
+ {{ item.name }}
+ |
+
+
+
+ {{ item.name }}
+ |
+
+
+
+ {{ item.name }}
+ |
+
+
+
+ {{ item.name }}
+ {{ item.name }}%
+ {{ item.name }}%
+ {{ item.name }}%
+ |
+
+
+
+
+
@@ -266,64 +418,63 @@ export default {
// return time.getTime() > Date.now();
},
},
- time: "",//对比时间的数组
+ time: "", //对比时间的数组
page: {
openTime: "",
closeTime: "",
},
- customtime: [],//自定义时间
- selectTime1: "",//对比时间
- selectTime: "",//对比时间
- aliasclass: 1,//tab下标
- houseId: "",//楼盘id
+ customtime: [], //自定义时间
+ selectTime1: "", //对比时间
+ selectTime: "", //对比时间
+ aliasclass: 1, //tab下标
+ houseId: "", //楼盘id
options: [],
value: "",
- checked: false,//是否对比
- Confirmthecontrast:false,
- tableData: [],//表格数据
- cardobj:{},
- departmentlist:[],
- departmentid:'',
- echartsisshow:true,
- consultantlist:[],
- consultantid:'',
- tablelist1:[],
- tablelist2:[],
- tablelist3:[],
- tablelist4:[],
- Level1:[],
- Level2:[],
- Level1id:'',
- Level2id:'',
- houseList:[],
- role:''
+ checked: false, //是否对比
+ Confirmthecontrast: false,
+ tableData: [], //表格数据
+ cardobj: {},
+ departmentlist: [],
+ departmentid: "",
+ echartsisshow: true,
+ consultantlist: [],
+ consultantid: "",
+ tablelist1: [],
+ tablelist2: [],
+ tablelist3: [],
+ tablelist4: [],
+ Level1: [],
+ Level2: [],
+ Level1id: "",
+ Level2id: "",
+ houseList: [],
+ role: "",
};
},
mounted() {
- this.role=localStorage.getItem("orgType");
- if(this.role==3){
- this.houseId = localStorage.getItem("houseId");
- this.tabtimetap(4);
- this.overviewfindList()
-
- }else{
- this.zkhousePage()
+ this.role = localStorage.getItem("orgType");
+ if (this.role == 3) {
+ this.houseId = localStorage.getItem("houseId");
+ this.tabtimetap(4);
+ this.overviewfindList();
+ } else {
+ this.zkhousePage();
}
},
methods: {
- houseChange(){
- this.customtime=[];
- this.TimetoAhoose=4;
- this.selectTime1= "";//对比时间
- this.selectTime= "";//对比时间
- this.aliasclass= 1;//tab下标
- this.page.openTime='';
- this.page.closeTime='';
- this.checked=false;
- this.tabtimetap(4);
- this.overviewfindList()
+ houseChange() {
+ this.customtime = [];
+ this.TimetoAhoose = 4;
+ this.selectTime1 = ""; //对比时间
+ this.selectTime = ""; //对比时间
+ this.aliasclass = 1; //tab下标
+ this.page.openTime = "";
+ this.page.closeTime = "";
+ this.checked = false;
+ this.tabtimetap(4);
+ this.overviewfindList();
},
- zkhousePage() {
+ zkhousePage() {
this.$api.api
.findHouseByUser({
orgType: localStorage.getItem("orgType"),
@@ -331,382 +482,402 @@ export default {
.then((res) => {
this.houseList = res.data;
this.houseId = res.data[0].id;
- this.tabtimetap(4);
- this.overviewfindList()
+ this.tabtimetap(4);
+ this.overviewfindList();
});
},
//销讲二级
- trendAnalysisLevel2(){
- let pamaet={
- showStatus:'',
- houseId:this.houseId,
- timeType:0,
- firstStartDate:this.page.openTime,
- firstEndDate:this.page.closeTime,
- lastStartDate:this.selectTime,
- lastEndDate:this.selectTime1,
- marketingId:this.Level2id
- }
+ trendAnalysisLevel2() {
+ let pamaet = {
+ showStatus: "",
+ houseId: this.houseId,
+ timeType: 0,
+ firstStartDate: this.page.openTime,
+ firstEndDate: this.page.closeTime,
+ lastStartDate: this.selectTime,
+ lastEndDate: this.selectTime1,
+ marketingId: this.Level2id,
+ };
- if(this.timeType==-1){
- pamaet.timeType=null
- }else{
- pamaet.timeType=this.timeType
+ if (this.timeType == -1) {
+ pamaet.timeType = null;
+ } else {
+ pamaet.timeType = this.timeType;
}
- if(this.checked==true){
- pamaet.showStatus=1;
- pamaet.timeType=null
- }else{
- pamaet.showStatus=0
+ if (this.checked == true) {
+ pamaet.showStatus = 1;
+ pamaet.timeType = null;
+ } else {
+ pamaet.showStatus = 0;
}
this.$api.http.trendAnalysisLevel2(pamaet).then((res) => {
- if(this.Confirmthecontrast==false){
- let newlist=res.data.startList || [];
- var newline=[];
- var newline2=[];
- newlist.map(item=>{
- newline.push(item.zxl)
- newline2.push(item.statDate.slice(5,10))
- })
- this.SwitchCARDS(newline,newline2)
- }else{
- let newlist=res.data.startList || [];
- let newlist2=res.data.endList || [];
- let hejilist=res.data.comparedList || [];
- var newline=[];//起始数据
- var newline2=[];//对比数据
- var newline1=[];//时间
-
- let arr=[];
- newlist.map(item=>{
- newline.push(item.zxl)
- })
- newlist2.map(item=>{
- newline1.push(item.zxl)
- })
- newlist.forEach((item, sdf) => {
- newlist2.forEach((child, zxc) => {
- if (sdf == zxc) {
- newline2.push(item.statDate.substring(5,10) + 'vs' + child.statDate.substring(5, 10))
- arr.push({
- name:item.statDate.substring(5,10) + 'vs' + child.statDate.substring(5, 10),
- shiduan1:item.zxl,
- shiduan2:child.zxl,
- });
- }
- })
- })
- hejilist.forEach((acd,xdx)=>{
- arr.forEach((che,ind)=>{
- if(xdx==ind){
- che.heji=acd.zxl;
- }
- })
- })
- arr.unshift({
- name:'项目合计',
- shiduan1:res.data.startSum,
- shiduan2:res.data.endSum,
- heji:res.data.comparedSum,
- })
+ if (this.Confirmthecontrast == false) {
+ let newlist = res.data.startList || [];
+ var newline = [];
+ var newline2 = [];
+ newlist.map((item) => {
+ newline.push(item.zxl);
+ newline2.push(item.statDate.slice(5, 10));
+ });
+ this.SwitchCARDS(newline, newline2);
+ } else {
+ let newlist = res.data.startList || [];
+ let newlist2 = res.data.endList || [];
+ let hejilist = res.data.comparedList || [];
+ var newline = []; //起始数据
+ var newline2 = []; //对比数据
+ var newline1 = []; //时间
- this.SwitchCARDS2(newline,newline1,newline2)
- this.tableData=arr;
- console.log( this.tableData)
- }
- })
+ let arr = [];
+ newlist.map((item) => {
+ newline.push(item.zxl);
+ });
+ newlist2.map((item) => {
+ newline1.push(item.zxl);
+ });
+ newlist.forEach((item, sdf) => {
+ newlist2.forEach((child, zxc) => {
+ if (sdf == zxc) {
+ newline2.push(
+ item.statDate.substring(5, 10) +
+ "vs" +
+ child.statDate.substring(5, 10)
+ );
+ arr.push({
+ name:
+ item.statDate.substring(5, 10) +
+ "vs" +
+ child.statDate.substring(5, 10),
+ shiduan1: item.zxl,
+ shiduan2: child.zxl,
+ });
+ }
+ });
+ });
+ hejilist.forEach((acd, xdx) => {
+ arr.forEach((che, ind) => {
+ if (xdx == ind) {
+ che.heji = acd.zxl;
+ }
+ });
+ });
+ arr.unshift({
+ name: "项目合计",
+ shiduan1: res.data.startSum,
+ shiduan2: res.data.endSum,
+ heji: res.data.comparedSum,
+ });
+ this.SwitchCARDS2(newline, newline1, newline2);
+ this.tableData = arr;
+ console.log(this.tableData);
+ }
+ });
},
//切换一级
- Level1tap(){
- this.Level1.forEach((item,index)=>{
- if(this.Level1id==item.marketingId){
- this.Level2=item.children || [];
- this.Level2id=item.children[0].marketingId || '';
+ Level1tap() {
+ this.Level1.forEach((item, index) => {
+ if (this.Level1id == item.marketingId) {
+ this.Level2 = item.children || [];
+ this.Level2id = item.children[0].marketingId || "";
}
- })
- this.trendAnalysisLevel2()
+ });
+ this.trendAnalysisLevel2();
},
- //切换er级
- Level2tap(){
- this.trendAnalysisLevel2()
+ //切换er级
+ Level2tap() {
+ this.trendAnalysisLevel2();
},
//一二级
- trendAnalysisAllLevel(){
- let pamaet={
- showStatus:'',
- houseId:this.houseId,
- timeType:0,
- firstStartDate:this.page.openTime,
- firstEndDate:this.page.closeTime,
- lastStartDate:this.selectTime,
- lastEndDate:this.selectTime1,
- }
+ trendAnalysisAllLevel() {
+ let pamaet = {
+ showStatus: "",
+ houseId: this.houseId,
+ timeType: 0,
+ firstStartDate: this.page.openTime,
+ firstEndDate: this.page.closeTime,
+ lastStartDate: this.selectTime,
+ lastEndDate: this.selectTime1,
+ };
- if(this.timeType==-1){
- pamaet.timeType=null
- }else{
- pamaet.timeType=this.timeType
+ if (this.timeType == -1) {
+ pamaet.timeType = null;
+ } else {
+ pamaet.timeType = this.timeType;
}
- if(this.checked==true){
- pamaet.showStatus=1;
- pamaet.timeType=null
- }else{
- pamaet.showStatus=0
+ if (this.checked == true) {
+ pamaet.showStatus = 1;
+ pamaet.timeType = null;
+ } else {
+ pamaet.showStatus = 0;
}
this.$api.http.trendAnalysisAllLevel(pamaet).then((res) => {
- this.Level1=res.data || [];
- this.Level1id=res.data[0].marketingId || '';
- this.Level2=res.data[0].children || [];
- this.Level2id=res.data[0].children[0].marketingId || '';
- this.trendAnalysisLevel2()
- })
+ this.Level1 = res.data || [];
+ this.Level1id = res.data[0].marketingId || "";
+ this.Level2 = res.data[0].children || [];
+ this.Level2id = res.data[0].children[0].marketingId || "";
+ this.trendAnalysisLevel2();
+ });
},
//切换顾问
- consultanttap(){
- this.trendAnalysisAccount()
+ consultanttap() {
+ this.trendAnalysisAccount();
},
// 获取顾问
- trendAnalysisAllAccount(pamaet){
+ trendAnalysisAllAccount(pamaet) {
this.$api.http.trendAnalysisAllAccount(pamaet).then((res) => {
- this.consultantlist=res.data || [];
- if( this.consultantlist.length!=0){
- this.consultantid=res.data[0].accountId;
- this.trendAnalysisAccount()
- }else{
- echarts.init(document.getElementById("main")).dispose();
- this.echartsisshow=false;
- this.tableData=[];
+ this.consultantlist = res.data || [];
+ if (this.consultantlist.length != 0) {
+ this.consultantid = res.data[0].accountId;
+ this.trendAnalysisAccount();
+ } else {
+ echarts.init(document.getElementById("main")).dispose();
+ this.echartsisshow = false;
+ this.tableData = [];
}
- })
+ });
},
- trendAnalysisAccount(){
- var that=this;
- let pamaet={
- showStatus:'',
- houseId:this.houseId,
- timeType:0,
- firstStartDate:this.page.openTime,
- firstEndDate:this.page.closeTime,
- lastStartDate:this.selectTime,
- lastEndDate:this.selectTime1,
-
- }
- if(this.aliasclass==3){
- pamaet.accountId=this.consultantid
+ trendAnalysisAccount() {
+ var that = this;
+ let pamaet = {
+ showStatus: "",
+ houseId: this.houseId,
+ timeType: 0,
+ firstStartDate: this.page.openTime,
+ firstEndDate: this.page.closeTime,
+ lastStartDate: this.selectTime,
+ lastEndDate: this.selectTime1,
+ };
+ if (this.aliasclass == 3) {
+ pamaet.accountId = this.consultantid;
}
- if(this.timeType==-1){
- pamaet.timeType=null
- }else{
- pamaet.timeType=this.timeType
+ if (this.timeType == -1) {
+ pamaet.timeType = null;
+ } else {
+ pamaet.timeType = this.timeType;
}
- if(this.checked==true){
- pamaet.showStatus=1;
- pamaet.timeType=null
- }else{
- pamaet.showStatus=0
+ if (this.checked == true) {
+ pamaet.showStatus = 1;
+ pamaet.timeType = null;
+ } else {
+ pamaet.showStatus = 0;
}
this.$api.http.trendAnalysisAccount(pamaet).then((res) => {
- if(this.Confirmthecontrast==false){
- let newlist=res.data.firstList || [];
- var newline=[];//起始数据
- var newlinename=[];
- let tablist=[
- {name:'时间',}
- ]
- let tablist2=[
- {name:that.customtime[0].substring(5,10)+'/'+that.customtime[1].substring(5,10),}
- ]
- newlist.map(item=>{
- newline.push(item.zxl)
- newlinename.push({name:item.name,max:100})
- tablist.push({name:item.name})
- tablist2.push({name:item.zxl+'%',})
- })
- this.tablelist1=tablist;
- this.tablelist2=tablist2;
- this.tablelist3=[];
- this.tablelist4=[];
- this.piechart(newline,newlinename)
- }else{
-
- let newlist=res.data.firstList || [];
- let newlist2=res.data.secondList|| [];
- let newlist4=res.data.thirdList|| [];
+ if (this.Confirmthecontrast == false) {
+ let newlist = res.data.firstList || [];
+ var newline = []; //起始数据
+ var newlinename = [];
+ let tablist = [{ name: "时间" }];
+ let tablist2 = [
+ {
+ name:
+ that.customtime[0].substring(5, 10) +
+ "/" +
+ that.customtime[1].substring(5, 10),
+ },
+ ];
+ newlist.map((item) => {
+ newline.push(item.zxl);
+ newlinename.push({ name: item.name, max: 100 });
+ tablist.push({ name: item.name });
+ tablist2.push({ name: item.zxl + "%" });
+ });
+ this.tablelist1 = tablist;
+ this.tablelist2 = tablist2;
+ this.tablelist3 = [];
+ this.tablelist4 = [];
+ this.piechart(newline, newlinename);
+ } else {
+ let newlist = res.data.firstList || [];
+ let newlist2 = res.data.secondList || [];
+ let newlist4 = res.data.thirdList || [];
- var newline=[];//起始数据
- let newline2=[];//对比数据
- var newlinename=[];
+ var newline = []; //起始数据
+ let newline2 = []; //对比数据
+ var newlinename = [];
- let tablist1=[
- {name:'时间',}
- ]
- let tablist2=[
- {name:that.customtime[0].substring(5,10)+'/'+that.customtime[1].substring(5,10),}
- ]
- let tablist3=[
- {name:that.selectTime.substring(5,10)+'/'+that.selectTime1.substring(5,10),}
- ]
- let tablist4=[
- {name:'变化',}
- ]
+ let tablist1 = [{ name: "时间" }];
+ let tablist2 = [
+ {
+ name:
+ that.customtime[0].substring(5, 10) +
+ "/" +
+ that.customtime[1].substring(5, 10),
+ },
+ ];
+ let tablist3 = [
+ {
+ name:
+ that.selectTime.substring(5, 10) +
+ "/" +
+ that.selectTime1.substring(5, 10),
+ },
+ ];
+ let tablist4 = [{ name: "变化" }];
- newlist.map(item=>{
- newline.push(item.zxl)
- newlinename.push({name:item.name,max:100})
- tablist1.push({name:item.name})
- tablist2.push({name:item.zxl+'%',})
- })
- newlist2.map(item=>{
- newline2.push(item.zxl)
- tablist3.push({name:item.zxl+'%',})
- })
- newlist4.map(item=>{
- tablist4.push({name:item.zxl,})
- })
+ newlist.map((item) => {
+ newline.push(item.zxl);
+ newlinename.push({ name: item.name, max: 100 });
+ tablist1.push({ name: item.name });
+ tablist2.push({ name: item.zxl + "%" });
+ });
+ newlist2.map((item) => {
+ newline2.push(item.zxl);
+ tablist3.push({ name: item.zxl + "%" });
+ });
+ newlist4.map((item) => {
+ tablist4.push({ name: item.zxl });
+ });
- this.tablelist1=tablist1;
- this.tablelist2=tablist2;
- this.tablelist3=tablist3;
- this.tablelist4=tablist4;
- this.piechart2(newline,newlinename,newline2)
- }
- })
+ this.tablelist1 = tablist1;
+ this.tablelist2 = tablist2;
+ this.tablelist3 = tablist3;
+ this.tablelist4 = tablist4;
+ this.piechart2(newline, newlinename, newline2);
+ }
+ });
},
//获取卡片
- trendtrendAnalysis(){
- let pamaet={
- showStatus:'',
- houseId:this.houseId,
- timeType:0,
- firstStartDate:this.page.openTime,
- firstEndDate:this.page.closeTime,
- lastStartDate:this.selectTime,
- lastEndDate:this.selectTime1
- }
+ trendtrendAnalysis() {
+ let pamaet = {
+ showStatus: "",
+ houseId: this.houseId,
+ timeType: 0,
+ firstStartDate: this.page.openTime,
+ firstEndDate: this.page.closeTime,
+ lastStartDate: this.selectTime,
+ lastEndDate: this.selectTime1,
+ };
- if(this.timeType==-1){
- pamaet.timeType=null
- }else{
- pamaet.timeType=this.timeType
+ if (this.timeType == -1) {
+ pamaet.timeType = null;
+ } else {
+ pamaet.timeType = this.timeType;
}
- if(this.checked==true){
- pamaet.showStatus=1;
- pamaet.timeType=null
- }else{
- pamaet.showStatus=0
+ if (this.checked == true) {
+ pamaet.showStatus = 1;
+ pamaet.timeType = null;
+ } else {
+ pamaet.showStatus = 0;
}
this.$api.http.trendtrendAnalysis(pamaet).then((res) => {
- this.cardobj=res.data;
- if(this.aliasclass==1){
- this.echartsisshow=true;
- this.trendtrendAnalysisProject(pamaet)
- }else if(this.aliasclass==2){
- if(this.departmentid!=''){
- pamaet.deptId=this.departmentid
- this.trendtrendAnalysisProject(pamaet)
- }else{
+ this.cardobj = res.data;
+ if (this.aliasclass == 1) {
+ this.echartsisshow = true;
+ this.trendtrendAnalysisProject(pamaet);
+ } else if (this.aliasclass == 2) {
+ if (this.departmentid != "") {
+ pamaet.deptId = this.departmentid;
+ this.trendtrendAnalysisProject(pamaet);
+ } else {
echarts.init(document.getElementById("main")).dispose();
- this.echartsisshow=false;
- this.tableData=[];
+ this.echartsisshow = false;
+ this.tableData = [];
}
- }else if(this.aliasclass==3){
- if(this.consultantid.length==0){
- this.trendAnalysisAllAccount(pamaet)
- }else{
- this.trendAnalysisAccount()
+ } else if (this.aliasclass == 3) {
+ if (this.consultantid.length == 0) {
+ this.trendAnalysisAllAccount(pamaet);
+ } else {
+ this.trendAnalysisAccount();
}
- }else if(this.aliasclass==4){
- this.trendAnalysisAccount()
- }else{
- this.trendAnalysisAllLevel()
+ } else if (this.aliasclass == 4) {
+ this.trendAnalysisAccount();
+ } else {
+ this.trendAnalysisAllLevel();
}
-
- })
+ });
},
//项目
- trendtrendAnalysisProject(pamaet){
- this.$api.http.trendtrendAnalysisProject(pamaet).then((res) => {
- if(this.Confirmthecontrast==false){
- let newlist=res.data.startList || [];
- var newline=[];
- var newline2=[];
- newlist.map(item=>{
- newline.push(item.fraction)
- newline2.push(item.statDate.slice(5,10))
- })
- this.SwitchCARDS(newline,newline2)
- }else{
- let newlist=res.data.startList || [];
- let newlist2=res.data.endList || [];
- let hejilist=res.data.comparedList || [];
- var newline=[];//起始数据
- var newline2=[];//对比数据
- var newline1=[];//时间
+ trendtrendAnalysisProject(pamaet) {
+ this.$api.http.trendtrendAnalysisProject(pamaet).then((res) => {
+ if (this.Confirmthecontrast == false) {
+ let newlist = res.data.startList || [];
+ var newline = [];
+ var newline2 = [];
+ newlist.map((item) => {
+ newline.push(item.fraction);
+ newline2.push(item.statDate.slice(5, 10));
+ });
+ this.SwitchCARDS(newline, newline2);
+ } else {
+ let newlist = res.data.startList || [];
+ let newlist2 = res.data.endList || [];
+ let hejilist = res.data.comparedList || [];
+ var newline = []; //起始数据
+ var newline2 = []; //对比数据
+ var newline1 = []; //时间
- let arr=[];
- newlist.map(item=>{
- newline.push(item.fraction)
- })
- newlist2.map(item=>{
- newline1.push(item.fraction)
- })
- newlist.forEach((item, sdf) => {
- newlist2.forEach((child, zxc) => {
- if (sdf == zxc) {
- newline2.push(item.statDate.substring(5,10) + 'vs' + child.statDate.substring(5, 10))
- arr.push({
- name:item.statDate.substring(5,10) + 'vs' + child.statDate.substring(5, 10),
- shiduan1:item.fraction,
- shiduan2:child.fraction,
- });
- }
- })
- })
- hejilist.forEach((acd,xdx)=>{
- arr.forEach((che,ind)=>{
- if(xdx==ind){
- che.heji=acd.fraction;
- }
- })
- })
- arr.unshift({
- name:'项目合计',
- shiduan1:res.data.startSum,
- shiduan2:res.data.endSum,
- heji:res.data.comparedSum,
- })
+ let arr = [];
+ newlist.map((item) => {
+ newline.push(item.fraction);
+ });
+ newlist2.map((item) => {
+ newline1.push(item.fraction);
+ });
+ newlist.forEach((item, sdf) => {
+ newlist2.forEach((child, zxc) => {
+ if (sdf == zxc) {
+ newline2.push(
+ item.statDate.substring(5, 10) +
+ "vs" +
+ child.statDate.substring(5, 10)
+ );
+ arr.push({
+ name:
+ item.statDate.substring(5, 10) +
+ "vs" +
+ child.statDate.substring(5, 10),
+ shiduan1: item.fraction,
+ shiduan2: child.fraction,
+ });
+ }
+ });
+ });
+ hejilist.forEach((acd, xdx) => {
+ arr.forEach((che, ind) => {
+ if (xdx == ind) {
+ che.heji = acd.fraction;
+ }
+ });
+ });
+ arr.unshift({
+ name: "项目合计",
+ shiduan1: res.data.startSum,
+ shiduan2: res.data.endSum,
+ heji: res.data.comparedSum,
+ });
- this.SwitchCARDS2(newline,newline1,newline2)
- this.tableData=arr;
- console.log( this.tableData)
- }
- })
+ this.SwitchCARDS2(newline, newline1, newline2);
+ this.tableData = arr;
+ console.log(this.tableData);
+ }
+ });
},
//获取部门下拉菜单
- overviewfindList(){
- this.$api.http.overviewfindList({
- houseId:this.houseId,
- }).then((res) => {
- this.departmentlist=res.data || [];
- if(this.departmentlist.length!=0){
- this.departmentid=res.data[0].deptId
- }else{
- this.departmentid=''
- }
+ overviewfindList() {
+ this.$api.http
+ .overviewfindList({
+ houseId: this.houseId,
})
+ .then((res) => {
+ this.departmentlist = res.data || [];
+ if (this.departmentlist.length != 0) {
+ this.departmentid = res.data[0].deptId;
+ } else {
+ this.departmentid = "";
+ }
+ });
},
//切换部门
- departmenttap(){
- this.trendtrendAnalysis()
+ departmenttap() {
+ this.trendtrendAnalysis();
},
-
//选项卡切换
- tapChange(idx){
- this.aliasclass=idx;
- this.trendtrendAnalysis()
+ tapChange(idx) {
+ this.aliasclass = idx;
+ this.trendtrendAnalysis();
},
//时间tab切换
tabtimetap(i) {
@@ -731,8 +902,8 @@ export default {
this.timestampToTime(new Date().getTime()),
];
this.$set(this, "time", null);
- this.Confirmthecontrast=false;
- this.trendtrendAnalysis()
+ this.Confirmthecontrast = false;
+ this.trendtrendAnalysis();
},
// 对比时间选择弹框显示
show() {
@@ -745,12 +916,16 @@ export default {
this.selectTime = "";
this.selectTime1 = "";
this.timeSelect(e);
- console.log(e,'asdasdajdasjdgasdghasdgsajdggh');
+ console.log(e, "asdasdajdasjdgasdghasdgsajdggh");
},
timeSelect(e) {
if (this.timeType == -1) {
this.selectTime = e;
- this.selectTime1 = this.timestampToTime(new Date(e).getTime()+new Date(this.page.closeTime).getTime()-new Date(this.page.openTime).getTime());
+ this.selectTime1 = this.timestampToTime(
+ new Date(e).getTime() +
+ new Date(this.page.closeTime).getTime() -
+ new Date(this.page.openTime).getTime()
+ );
} else {
// 获取今天昨天近一周
// 获取一天的时间戳
@@ -768,18 +943,18 @@ export default {
this.selectTime = e;
this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
}
- this.Confirmthecontrast=true;
- this.page.openTime=this.customtime[0]
- this.page.closeTime=this.customtime[1]
- this.trendtrendAnalysis()
+ this.Confirmthecontrast = true;
+ this.page.openTime = this.customtime[0];
+ this.page.closeTime = this.customtime[1];
+ this.trendtrendAnalysis();
},
radioChange() {
this.selectTime = "";
this.selectTime1 = "";
this.$set(this, "time", null);
- if(!this.checked){
- this.trendtrendAnalysis()
- this.Confirmthecontrast=false
+ if (!this.checked) {
+ this.trendtrendAnalysis();
+ this.Confirmthecontrast = false;
}
},
//选择自定义时间
@@ -792,20 +967,21 @@ export default {
if (!e) return;
this.page.openTime = this.customtime[0];
this.page.closeTime = this.customtime[1];
- this.Confirmthecontrast=false;
- this.trendtrendAnalysis()
+ this.Confirmthecontrast = false;
+ this.trendtrendAnalysis();
},
timestampToTime(timestamp) {
var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
var yyyy = date.getFullYear() + "-";
- var MM =(date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1): date.getMonth() + 1) + "-";
- var dd =(date.getDate() < 10 ? "0" + date.getDate() : date.getDate());
+ var MM =
+ (date.getMonth() + 1 < 10
+ ? "0" + (date.getMonth() + 1)
+ : date.getMonth() + 1) + "-";
+ var dd = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
return yyyy + MM + dd;
},
-
-
- SwitchCARDS(newline,newline2) {
+ SwitchCARDS(newline, newline2) {
echarts.init(document.getElementById("main")).dispose();
var chartDom = document.getElementById("main");
var myChart = echarts.init(chartDom);
@@ -814,7 +990,7 @@ export default {
option = {
tooltip: {
trigger: "axis",
- formatter: '{b0}: {c0}'+'%'
+ formatter: "{b0}: {c0}" + "%",
},
legend: {
data: ["起始时间"],
@@ -845,9 +1021,9 @@ export default {
},
yAxis: {
type: "value",
- splitNumber:5,
- max:100,
- min:0,
+ splitNumber: 5,
+ max: 100,
+ min: 0,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
@@ -874,7 +1050,7 @@ export default {
series: [
{
name: "起始时间",
- data:newline,
+ data: newline,
type: "line",
smooth: true,
},
@@ -886,8 +1062,8 @@ export default {
myChart.resize();
});
},
- SwitchCARDS2(newline,newline1,newline2) {
- echarts.init(document.getElementById("main")).dispose();
+ SwitchCARDS2(newline, newline1, newline2) {
+ echarts.init(document.getElementById("main")).dispose();
var chartDom = document.getElementById("main");
var myChart = echarts.init(chartDom);
var option;
@@ -896,12 +1072,24 @@ export default {
tooltip: {
trigger: "axis",
formatter: function (params) {
- let src= '
'+params[0].seriesName+':'+params[0].data+'%'+'
'+'
'+params[1].seriesName+':'+ params[1].data+'%'+'
';
- return src
- }
+ let src =
+ "
" +
+ params[0].seriesName +
+ ":" +
+ params[0].data +
+ "%" +
+ "
" +
+ "
" +
+ params[1].seriesName +
+ ":" +
+ params[1].data +
+ "%" +
+ "
";
+ return src;
+ },
},
legend: {
- data: ["起始时间","对比时间"],
+ data: ["起始时间", "对比时间"],
bottom: "10",
},
grid: {
@@ -929,9 +1117,9 @@ export default {
},
yAxis: {
type: "value",
- splitNumber:5,
- max:100,
- min:0,
+ splitNumber: 5,
+ max: 100,
+ min: 0,
axisLabel: {
//重点在这一块,其余可以忽略
textStyle: {
@@ -958,16 +1146,16 @@ export default {
series: [
{
name: "起始时间",
- data:newline,
+ data: newline,
type: "line",
smooth: true,
},
{
name: "对比时间",
- data:newline1,
+ data: newline1,
type: "line",
smooth: true,
- }
+ },
],
};
@@ -976,95 +1164,88 @@ export default {
myChart.resize();
});
},
- piechart2(newline,newlinename,newline2){
+ piechart2(newline, newlinename, newline2) {
echarts.init(document.getElementById("main")).dispose();
var chartDom = document.getElementById("main");
var myChart = echarts.init(chartDom);
var option;
option = {
tooltip: {
- trigger: 'axis'
+ trigger: "axis",
},
legend: {
- data: ['起始时间','对比时间'],
- right: "10",
- top:'10'
+ data: ["起始时间", "对比时间"],
+ right: "10",
+ top: "10",
},
- color:[
- '#2671E2',
- '#F3787B',
- ],
+ color: ["#2671E2", "#F3787B"],
radar: {
// shape: 'circle',
- indicator: newlinename
+ indicator: newlinename,
},
series: [
{
- type: 'radar',
+ type: "radar",
tooltip: {
- trigger: 'item'
+ trigger: "item",
},
data: [
{
- value:newline,
- name: '起始时间'
+ value: newline,
+ name: "起始时间",
},
{
- value:newline2,
- name: '对比时间'
+ value: newline2,
+ name: "对比时间",
},
- ]
- }
- ]
+ ],
+ },
+ ],
};
option && myChart.setOption(option);
window.addEventListener("resize", () => {
- myChart.resize();
+ myChart.resize();
});
},
- piechart(newline,newlinename){
+ piechart(newline, newlinename) {
echarts.init(document.getElementById("main")).dispose();
var chartDom = document.getElementById("main");
var myChart = echarts.init(chartDom);
var option;
option = {
tooltip: {
- trigger: 'axis'
+ trigger: "axis",
},
legend: {
- data: ['起始时间'],
- right: "10",
- top:'10'
+ data: ["起始时间"],
+ right: "10",
+ top: "10",
},
- color:[
- '#2671E2',
- '#F3787B',
- ],
+ color: ["#2671E2", "#F3787B"],
radar: {
// shape: 'circle',
- indicator: newlinename
+ indicator: newlinename,
},
series: [
{
- type: 'radar',
+ type: "radar",
tooltip: {
- trigger: 'item'
+ trigger: "item",
},
data: [
{
- value:newline,
- name: '起始时间'
+ value: newline,
+ name: "起始时间",
},
- ]
- }
- ]
+ ],
+ },
+ ],
};
option && myChart.setOption(option);
window.addEventListener("resize", () => {
- myChart.resize();
+ myChart.resize();
});
- }
-
+ },
},
};
@@ -1183,7 +1364,7 @@ export default {
}
}
.you {
- width:50%;
+ width: 50%;
display: flex;
align-items: center;
.youimg {
@@ -1260,14 +1441,13 @@ export default {
cursor: pointer;
color: #606266;
}
- .theadtd{
- width: 140px;
- height: 48px;
- border: 1px solid #E0E0E0;
- text-align: center;
- line-height: 48px;
- font-size: 16px;
- color: #32363D;
-
- }
+.theadtd {
+ width: 140px;
+ height: 48px;
+ border: 1px solid #e0e0e0;
+ text-align: center;
+ line-height: 48px;
+ font-size: 16px;
+ color: #32363d;
+}
diff --git a/src/views/Statistics/houseDataSys.vue b/src/views/Statistics/houseDataSys.vue
index 1c2f32f..e8d7484 100644
--- a/src/views/Statistics/houseDataSys.vue
+++ b/src/views/Statistics/houseDataSys.vue
@@ -1,7 +1,7 @@
-
+
-
+
@@ -75,7 +75,7 @@
-
楼盘趋势
+
楼盘趋势
近7天
@@ -87,7 +87,7 @@
近30天
-
+
- {{ selectTime1 ? "时段二: " : "请选择: " }}
- {{ selectTime + "-" + selectTime1 }}
+
+
+
+ {{ selectTime1 ? "时段二: " : "请选择: " }}
+
+
+
+
+ {{ selectTime }}
+
+
-
+
+ {{ selectTime1 }}
+
+
+
-
+
活跃楼盘数
@@ -149,10 +171,19 @@
- 对比时段: {{compare1.activeHouseQuantity||0}}
+ 对比时段:
+ {{
+ compare1.activeHouseQuantity || 0
+ }}
-
- {{compare2.activeHouseQuantity||0}}
+
+ {{ compare2.activeHouseQuantity || 0 }}
@@ -160,9 +191,9 @@
-
+
-
+
@@ -172,12 +203,9 @@
{{ scope.row.data3 }}
+ :style="scope.row.data3 >= 0 ? 'color:green;' : 'color:red;'"
+ >{{ scope.row.data3 }}
@@ -198,15 +226,18 @@ export default {
},
},
firstTab: {},
- tableData:[],
+ tableData: [],
secondTab: {},
thirdTab: {},
- selValue: localStorage.getItem('orgType')==0?'0':'1',
+ selValue: localStorage.getItem("orgType") == 0 ? "0" : "1",
checked: false,
selectTime1: "", //对比时间
selectTime: "", //对比时间
- choicValue:localStorage.getItem('orgType')==2?localStorage.getItem('orgCode'):'',
- orgType:localStorage.getItem('orgType'),
+ choicValue:
+ localStorage.getItem("orgType") == 2
+ ? localStorage.getItem("orgCode")
+ : "",
+ orgType: localStorage.getItem("orgType"),
houseList: [],
secindex: "1",
dateType: 4,
@@ -227,7 +258,6 @@ export default {
value: "1",
},
],
-
};
},
mounted() {
@@ -240,7 +270,12 @@ export default {
this.$api.api
.houseDataAll({
// agentId: this.selValue == 0 ? this.choicValue : null,
- agentId: this.orgType==0?(this.selValue == 0 ? this.choicValue : null):localStorage.getItem('agentId'),
+ agentId:
+ this.orgType == 0
+ ? this.selValue == 0
+ ? this.choicValue
+ : null
+ : localStorage.getItem("agentId"),
orgCode: this.selValue == 1 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
})
@@ -259,7 +294,12 @@ export default {
contrastEndDate: this.selectTime1,
dateType: this.dateType,
// agentId: this.selValue == 0 ? this.choicValue : null,
- agentId: this.orgType==0?(this.selValue == 0 ? this.choicValue : null):localStorage.getItem('agentId'),
+ agentId:
+ this.orgType == 0
+ ? this.selValue == 0
+ ? this.choicValue
+ : null
+ : localStorage.getItem("agentId"),
orgCode: this.selValue == 1 ? this.choicValue : null,
orgType: localStorage.getItem("orgType"),
})
@@ -269,14 +309,14 @@ export default {
this.compare = res.data.firstData;
if (this.selectTime1) {
- console.log("4444")
+ console.log("4444");
// 有对比
this.compare1 = res.data.secondData;
// 将得到的三者的数据进行组装为一个数组
this.compare2 = res.data.thirdData;
- }else{
- this.compare1=[]
- this.compare2=[]
+ } else {
+ this.compare1 = [];
+ this.compare2 = [];
}
this.getChars(1);
});
@@ -365,16 +405,16 @@ export default {
];
this.SwitchCARDS(arr, "main", timeDate, Strname);
let tableData = [];
- timeDate.map((item,idx) => {
+ timeDate.map((item, idx) => {
let obj = {
- time:item,
- data1:arr1[idx],
- data2:arr2[idx],
- data3:arr3[idx],
+ time: item,
+ data1: arr1[idx],
+ data2: arr2[idx],
+ data3: arr3[idx],
};
- tableData.push(obj)
+ tableData.push(obj);
});
- this.tableData=tableData
+ this.tableData = tableData;
}
},
//时间tab切换
@@ -421,24 +461,23 @@ export default {
new Date(this.customtime[1]).getTime() -
new Date(this.customtime[0]).getTime()
);
- }else{
- let num = 24 * 3600 * 1000;
- // 获取当前时间戳转换为日期格式
- if (this.dateType == 4) {
- num = 24 * 3600 * 1000 * 6;
- }
- if (this.dateType == 5) {
- num = 24 * 3600 * 1000 * 14;
- }
- if (this.dateType == 6) {
- num = 24 * 3600 * 1000 * 29;
- }
- this.selectTime = e;
- this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
+ } else {
+ let num = 24 * 3600 * 1000;
+ // 获取当前时间戳转换为日期格式
+ if (this.dateType == 4) {
+ num = 24 * 3600 * 1000 * 6;
+ }
+ if (this.dateType == 5) {
+ num = 24 * 3600 * 1000 * 14;
+ }
+ if (this.dateType == 6) {
+ num = 24 * 3600 * 1000 * 29;
+ }
+ this.selectTime = e;
+ this.selectTime1 = this.timestampToTime(new Date(e).getTime() + num);
}
this.Confirmthecontrast = true;
this.houseTrends();
-
},
getList() {
// 当为楼盘选择时
@@ -446,7 +485,7 @@ export default {
this.$api.api
.findMyOrg({
orgType: localStorage.getItem("orgType"),
- agentId:localStorage.getItem('agentId')
+ agentId: localStorage.getItem("agentId"),
})
.then((res) => {
this.houseList = res.data;
@@ -494,8 +533,8 @@ export default {
this.selectTime = "";
this.selectTime1 = "";
this.$set(this, "time", null);
- if(!this.checked){
- this.houseTrends();
+ if (!this.checked) {
+ this.houseTrends();
}
},
timestampToTime(timestamp) {
@@ -518,7 +557,7 @@ export default {
SwitchCARDS(arr, str, timeDate, Strname) {
console.log(arr);
var chartDom = document.getElementById(str);
- echarts.init(chartDom).dispose()
+ echarts.init(chartDom).dispose();
var myChart = echarts.init(chartDom);
var option;
@@ -595,7 +634,7 @@ export default {
.box-center {
width: 100%;
padding: 15px;
- min-width:1000px;
+ min-width: 1000px;
padding-bottom: 100px;
}
@@ -827,7 +866,7 @@ export default {
display: flex;
justify-content: space-between;
}
-.text33{
+.text33 {
font-size: 12px;
text-indent: 20px;
line-height: 20px;
diff --git a/src/views/Statistics/trend.vue b/src/views/Statistics/trend.vue
index 65992a1..86b4d83 100644
--- a/src/views/Statistics/trend.vue
+++ b/src/views/Statistics/trend.vue
@@ -9,9 +9,8 @@
style="width: 100px"
placeholder="请选择"
>
-
-
-
+
+
@@ -70,9 +69,11 @@
-
+
-
楼盘趋势
+
+ 楼盘趋势
+
近7天
@@ -112,15 +113,33 @@
min-width: 220px;
height: 30px;
border-radius: 4px;
- max-width: 250px;
+ max-width: 360px;
font-size: 13px;
line-height: 30px;
text-indent: 8px;
+ cursor: pointer;
"
@click="show"
>
- {{ selectTime1 ? "时段二: " : "请选择: " }}
-
{{ selectTime + "-" + selectTime1 }}
+
+
+
+ {{ selectTime1 ? "时段二: " : "请选择: " }}
+
+
+
+
+ {{ selectTime }}
+
+
-
+
+ {{ selectTime1 }}
+
+
+
@@ -197,7 +216,7 @@
@@ -329,33 +348,54 @@
-
- {{row.data1}}%
- {{row.data1}}
+
+
+ {{ row.data1 }}%
+ {{ row.data1 }}
-
- {{row.data2}}%
- {{row.data2}}
+
+
+ {{ row.data2 }}%
+ {{ row.data2 }}
- {{ scope.row.data3 }}%
- {{ scope.row.data3 }}
+ {{ scope.row.data3 }}%
+ {{ scope.row.data3 }}
-