corala 2 лет назад
Родитель
Сommit
747c388c9d
7 измененных файлов: 102 добавлений и 53 удалений
  1. +6
    -0
      src/views/Statistics/BuildingContrast.vue
  2. +29
    -0
      src/views/Statistics/ConsultantBrand.vue
  3. +4
    -0
      src/views/Statistics/MentoringAbility.vue
  4. +24
    -53
      src/views/Statistics/ReceptionOverview.vue
  5. +31
    -0
      src/views/Statistics/ReceptionStatistical.vue
  6. +4
    -0
      src/views/Statistics/TheTeamCompared.vue
  7. +4
    -0
      src/views/Statistics/index.vue

+ 6
- 0
src/views/Statistics/BuildingContrast.vue Просмотреть файл

@@ -652,6 +652,12 @@ export default {
//切换时间
tabtimetap(index) {
this.TimetoAhoose = index;

if (index == 0) {
this.customtime = []
}

if (index == 4) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7;
let startDate = `${new Date(starTime).getFullYear()}-${


+ 29
- 0
src/views/Statistics/ConsultantBrand.vue Просмотреть файл

@@ -1081,6 +1081,35 @@ export default {
},
//切换时间
tabtimetap(index) {
if (index == 0) {
this.customtime = []
}
if (index == 4) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7;
let startDate = `${new Date(starTime).getFullYear()}-${
new Date(starTime).getMonth() + 1
}-${new Date(starTime).getDate()}`;
let endTime = new Date().getTime() - 24 * 60 * 60 * 1000;
let endDate = `${new Date(endTime).getFullYear()}-${
new Date(endTime).getMonth() + 1
}-${new Date(endTime).getDate()}`;

this.customtime = [startDate, endDate];
}

if (index == 6) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 30;
let startDate = `${new Date(starTime).getFullYear()}-${
new Date(starTime).getMonth() + 1
}-${new Date(starTime).getDate()}`;
let endTime = new Date().getTime() - 24 * 60 * 60 * 1000;
let endDate = `${new Date(endTime).getFullYear()}-${
new Date(endTime).getMonth() + 1
}-${new Date(endTime).getDate()}`;

this.customtime = [startDate, endDate];
}
this.statDateStart = "";
this.statDateEnd = "";
this.dateType = index;


+ 4
- 0
src/views/Statistics/MentoringAbility.vue Просмотреть файл

@@ -1292,6 +1292,10 @@ export default {
//切换时间
tabtimetap(index) {
this.TimetoAhoose = index;
if (index == 0) {
this.customtime = []
}
if (index == 4) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7;
let startDate = `${new Date(starTime).getFullYear()}-${


+ 24
- 53
src/views/Statistics/ReceptionOverview.vue Просмотреть файл

@@ -344,7 +344,8 @@
{{ activeName == "3" ? "平均执行率" : "合计" }}
</div>
<div class="text1-2">
{{activeName == "3" ? (ceratelist.avg || 0) : (ceratelist.sum || 0 )}}{{ activeName | company }}
{{ activeName == "3" ? ceratelist.avg || 0 : ceratelist.sum || 0
}}{{ activeName | company }}
</div>
</div>
<div class="sanbox1" style="width: 40%; text-align: center">
@@ -768,7 +769,7 @@ export default {
} else {
this.zkhousePage();
}
if (this.TimetoAhoose == 4) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7;
let startDate = `${new Date(starTime).getFullYear()}-${
@@ -890,15 +891,6 @@ export default {
}
this.$api.http.overviewreceptionRanking(parmo).then((res) => {
let arr = [];
// <div class="text1-2">{{ ceratelist.sum || 0 }}{{ activeName | company }}</div>
// </div>
// <div class="sanbox1" style="width: 40%">
// <div class="text1-1">顾问</div>
// <div class="text1-2">{{ ceratelist.num || 0 }}个</div>
// </div>
// <div class="sanbox1" style="width: 30%">
// <div class="text1-1">{{ activeName | comName }}</div>
// <div class="text1-2">{{ ceratelist.avg || 0 }}次</div>
if (this.activeName == "1") {
res.data.avg = this.formatDate(res.data.avg);
res.data.sum = this.formatDate(res.data.sum);
@@ -910,7 +902,7 @@ export default {
obj.zxl = item.activeCustomer;
}
if (this.activeName == "1") {
obj.zxl = this.formatDate(item.avgDuration);
obj.zxl = this.formatDate(item.avgDuration || 0);
}
if (this.activeName == "2") {
obj.zxl = item.prohibitedCustomer;
@@ -938,49 +930,25 @@ export default {
e.map((i) => {
values.push(i.zxl);
});
let colorArr = ["#E6625B", "#FF981E", "#FFCC00", "#07B79D"];
values = values.map((i, k) => {
switch (k) {
case 0:
return {
value: values[0],
itemStyle: {
color: "#E6625B",
},
};
break;
case 1:
return {
value: values[1],
itemStyle: {
color: "#FF981E",
},
};
case 2:
return {
value: values[2],
itemStyle: {
color: "#FFCC00",
},
};

default:
return {
value: values[k],
itemStyle: {
color: "#07B79D",
},
};
break;
}
return {
value: i || "0",
itemStyle: {
color: colorArr[k <= 2 ? k : 3],
},
};
});

if (this.activeName == "1") {
values.map((i) => {
let m = i.value.split(":")[0];
let s = i.value.split(":")[1];
let totalS = Number(m) * 60 + Number(s);
i.value = totalS;
console.log(i);
if (i.value.indexOf(":") != -1) {
let m = i.value.split(":")[0];
let s = i.value.split(":")[1];
let totalS = Number(m) * 60 + Number(s);
i.value = totalS;
}
});
}

@@ -1063,7 +1031,7 @@ export default {
type: "value",
axisLabel: {
formatter: function (params) {
console.log(params)
console.log(params);
switch (_this.activeName) {
case "1":
let s = params % 60;
@@ -1670,8 +1638,11 @@ export default {
//时间选择
tabtimetap(index) {
this.TimetoAhoose = index;

if (index == 0) {
this.customtime = [];
}

if (index == 4) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7;
let startDate = `${new Date(starTime).getFullYear()}-${


+ 31
- 0
src/views/Statistics/ReceptionStatistical.vue Просмотреть файл

@@ -40,6 +40,7 @@
type="daterange"
range-separator="-"
:default-time="['00:00:00', '23:59:59']"
:clearable="false"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
@@ -593,6 +594,24 @@ export default {
this.statDateEnd = "";
this.dateType = index;
this.customtime = [];
//给时间选择器赋值
let num = 24 * 3600 * 1000;
// 获取当前时间戳转换为日期格式
if (index == 4) {
num = 24 * 3600 * 1000 * 7;
}
if (index == 5) {
num = 24 * 3600 * 1000 * 15;
}
if (index == 6) {
num = 24 * 3600 * 1000 * 30;
}
this.customtime = [
this.timestampToTime(new Date().getTime() - num),
this.timestampToTime(new Date().getTime() - 24 * 3600 * 1000),
];

this.init();
},
dealData(arr) {
@@ -607,6 +626,18 @@ export default {
});
return arr;
},

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();
return yyyy + MM + dd;
},
},
};
</script>


+ 4
- 0
src/views/Statistics/TheTeamCompared.vue Просмотреть файл

@@ -1174,7 +1174,11 @@ export default {
//切换时间
tabtimetap(index) {
this.TimetoAhoose = index;

if (index == 0) {
this.customtime = []
}
if (index == 4) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7;
let startDate = `${new Date(starTime).getFullYear()}-${


+ 4
- 0
src/views/Statistics/index.vue Просмотреть файл

@@ -385,6 +385,10 @@ export default {
tabtimetap(index) {
this.TimetoAhoose = index;

if (index == 0) {
this.customtime = []
}
if (index == 4) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * 7;
let startDate = `${new Date(starTime).getFullYear()}-${


Загрузка…
Отмена
Сохранить