mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 18:22:55 +08:00
运营数据概览接口调整
This commit is contained in:
@@ -68,7 +68,7 @@
|
||||
<div class="echartsTwo">
|
||||
<div class="title">
|
||||
<div class="left">学习情况</div>
|
||||
<div v-if="1 == towParmasn.type || 2 == towParmasn.type || 3 == towParmasn.type" class="right" @click="exportTwoData">
|
||||
<div class="right" @click="exportTwoData">
|
||||
<img src="../../assets/images/coursewareManage/export1.png" alt="" />
|
||||
<span>导出学习情况</span>
|
||||
</div>
|
||||
@@ -83,27 +83,27 @@
|
||||
@change="modalChange"
|
||||
:options="[
|
||||
{
|
||||
label: '项目',
|
||||
label: '课程',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '学习路径图',
|
||||
label: '案例',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '课程',
|
||||
label: '文章',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: '案例',
|
||||
label: '问答',
|
||||
value: 4,
|
||||
},
|
||||
{
|
||||
label: '文章',
|
||||
label: '项目',
|
||||
value: 5,
|
||||
},
|
||||
{
|
||||
label: '问答',
|
||||
label: '学习路径图',
|
||||
value: 6,
|
||||
},
|
||||
]"
|
||||
@@ -115,8 +115,8 @@
|
||||
placeholder="请选择日期格式"
|
||||
@change="twoSelectChange"
|
||||
:options="[
|
||||
{ label: '按日查找', value: 0 },
|
||||
{ label: '按月查找', value: 1 },
|
||||
{ label: '按日查找', value: 1 },
|
||||
{ label: '按月查找', value: 2 },
|
||||
]"
|
||||
v-model:value="towParmasn.dateType"
|
||||
></a-select>
|
||||
@@ -124,7 +124,7 @@
|
||||
<div class="leftItem">
|
||||
<div class="timeItemSearch">
|
||||
<a-range-picker
|
||||
v-if="towParmasn.dateType == 0"
|
||||
v-if="towParmasn.dateType == 1"
|
||||
style="width: 100%"
|
||||
format="YYYY-MM-DD"
|
||||
v-model:value="towParmasn.day"
|
||||
@@ -133,7 +133,7 @@
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
<a-range-picker
|
||||
v-if="towParmasn.dateType == 1"
|
||||
v-if="towParmasn.dateType == 2"
|
||||
style="width: 100%"
|
||||
v-model:value="towParmasn.time"
|
||||
@change="twoMonthChange"
|
||||
@@ -334,7 +334,7 @@ export default {
|
||||
forDay: [],
|
||||
towParmasn: {
|
||||
type: 1,
|
||||
dateType: 1,
|
||||
dateType: 2,
|
||||
time: [],
|
||||
day: [],
|
||||
},
|
||||
@@ -371,7 +371,7 @@ export default {
|
||||
const course = [];
|
||||
const project = [];
|
||||
const router = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.xdata.slice(item.xdata.indexOf("-") + 1));
|
||||
item?.list?.forEach((iten) => {
|
||||
if (iten.name == "case") {
|
||||
@@ -406,7 +406,7 @@ export default {
|
||||
const course = [];
|
||||
const project = [];
|
||||
const router = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.xdata);
|
||||
item?.list?.forEach((iten) => {
|
||||
if (iten.name == "case") {
|
||||
@@ -445,7 +445,7 @@ export default {
|
||||
const course = [];
|
||||
const project = [];
|
||||
const router = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.xdata);
|
||||
item?.list?.forEach((iten) => {
|
||||
if (iten.name == "course") {
|
||||
@@ -481,7 +481,7 @@ export default {
|
||||
const course = [];
|
||||
const project = [];
|
||||
const router = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.xdata.slice(item.xdata.indexOf("-") + 1));
|
||||
item?.list?.forEach((iten) => {
|
||||
if (iten.name == "course") {
|
||||
@@ -504,7 +504,7 @@ export default {
|
||||
}
|
||||
};
|
||||
const exportTwoData = async () => {
|
||||
if (state.towParmasn.dateType == 0) {
|
||||
if (state.towParmasn.dateType == 1) {
|
||||
if (!state.towParmasn.day?.length || state.towParmasn.day?.length < 1) {
|
||||
message.error("请选择要导出的时间日期后再进行导出");
|
||||
} else {
|
||||
@@ -536,7 +536,7 @@ export default {
|
||||
}
|
||||
);
|
||||
}
|
||||
} else if (state.towParmasn.dateType == 1) {
|
||||
} else if (state.towParmasn.dateType == 2) {
|
||||
if (
|
||||
!state.towParmasn.time?.length ||
|
||||
state.towParmasn.time?.length < 1
|
||||
@@ -573,9 +573,9 @@ export default {
|
||||
}
|
||||
};
|
||||
const modalChange = async () => {
|
||||
if (state.towParmasn.dateType == 1) {
|
||||
if (state.towParmasn.dateType == 2) {
|
||||
twoMonthChange(state.towParmasn.time);
|
||||
} else if (state.towParmasn.dateType == 0) {
|
||||
} else if (state.towParmasn.dateType == 1) {
|
||||
twoDatChange(state.towParmasn.day);
|
||||
}
|
||||
};
|
||||
@@ -633,7 +633,7 @@ export default {
|
||||
if (e?.length > 0) {
|
||||
const monthEnd = dayjs(e[1])
|
||||
.endOf("month")
|
||||
.format("YYYY-MM-DD hh:mm:ss");
|
||||
.format("YYYY-MM-DD 23:59:59");
|
||||
const res = await api.boeuStudyDataGetStudyStaisticsList({
|
||||
beginTime: dayjs(e[0]).format("YYYY-MM-01 00:00:01"),
|
||||
endTime: monthEnd,
|
||||
@@ -650,9 +650,9 @@ export default {
|
||||
const avgDuration = [];
|
||||
const count = [];
|
||||
const duration = [];
|
||||
res?.data?.forEach((item) => {
|
||||
xData.push(item.month);
|
||||
avgDuration.push(item.viewCount);
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.day);
|
||||
avgDuration.push(item.avgDuration);
|
||||
count.push(item.count);
|
||||
duration.push(item.duration);
|
||||
});
|
||||
@@ -668,8 +668,8 @@ export default {
|
||||
const avgDuration = [];
|
||||
const count = [];
|
||||
const duration = [];
|
||||
res?.data?.forEach((item) => {
|
||||
xData.push(item.month);
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.day);
|
||||
avgDuration.push(item.avgDuration);
|
||||
count.push(item.count);
|
||||
duration.push(item.duration);
|
||||
@@ -690,7 +690,7 @@ export default {
|
||||
const dayStart = dayjs(e[0])
|
||||
.startOf("day")
|
||||
.format("YYYY-MM-DD 00:00:01");
|
||||
const dayEnd = dayjs(e[1]).endOf("day").format("YYYY-MM-DD hh:mm:ss");
|
||||
const dayEnd = dayjs(e[1]).endOf("day").format("YYYY-MM-DD 23:59:59");
|
||||
const res = await api.boeuStudyDataGetStudyStaisticsList({
|
||||
beginTime: dayStart,
|
||||
endTime: dayEnd,
|
||||
@@ -707,9 +707,9 @@ export default {
|
||||
const avgDuration = [];
|
||||
const count = [];
|
||||
const duration = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.day);
|
||||
avgDuration.push(item.viewCount);
|
||||
avgDuration.push(item.avgDuration);
|
||||
count.push(item.count);
|
||||
duration.push(item.duration);
|
||||
});
|
||||
@@ -725,7 +725,7 @@ export default {
|
||||
const avgDuration = [];
|
||||
const count = [];
|
||||
const duration = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.day);
|
||||
avgDuration.push(item.avgDuration);
|
||||
count.push(item.count);
|
||||
@@ -758,7 +758,7 @@ export default {
|
||||
const course = [];
|
||||
const project = [];
|
||||
const router = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.xdata);
|
||||
item?.list?.forEach((iten) => {
|
||||
if (iten.name == "course") {
|
||||
@@ -794,7 +794,7 @@ export default {
|
||||
const course = [];
|
||||
const project = [];
|
||||
const router = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.xdata.slice(item.xdata.indexOf("-") + 1));
|
||||
item?.list?.forEach((iten) => {
|
||||
if (iten.name == "course") {
|
||||
@@ -909,7 +909,7 @@ export default {
|
||||
const course = [];
|
||||
const project = [];
|
||||
const router = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.xdata);
|
||||
item?.list?.forEach((iten) => {
|
||||
if (iten.name == "case") {
|
||||
@@ -945,7 +945,7 @@ export default {
|
||||
const course = [];
|
||||
const project = [];
|
||||
const router = [];
|
||||
res?.data?.forEach((item) => {
|
||||
res?.data?.result.forEach((item) => {
|
||||
xData.push(item.xdata.slice(item.xdata.indexOf("-") + 1));
|
||||
item?.list?.forEach((iten) => {
|
||||
if (iten.name == "case") {
|
||||
@@ -1072,7 +1072,7 @@ export default {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "人均学习时长",
|
||||
name: "人均学习时长111",
|
||||
type: "line",
|
||||
data: [],
|
||||
yAxisIndex: 1,
|
||||
|
||||
Reference in New Issue
Block a user