修改回滚导致的代码丢失

This commit is contained in:
zhangsir
2024-02-23 10:52:01 +08:00
parent 115401b4b5
commit 1b4d94d409
25 changed files with 422 additions and 197 deletions

View File

@@ -34,7 +34,7 @@ import {USER_PERMISSION, VALIDATE_TOKEN} from "@/api/apis";
const store = useStore();
const isLogin = ref(false);
console.log("版本3.3.2------------");
console.log("版本3.3.1------------");
// 监听关闭浏览器

View File

@@ -9,8 +9,6 @@
import {message} from "ant-design-vue";
import axios from "axios";
import router from "@/router";
import {REFRESH_TOKEN_API} from "@/api/ThirdApi";
import {boeRequest} from "@/api/request";
// import { getCookie } from '../api/method'
// const Qs = require("qs");
@@ -59,15 +57,13 @@ http.interceptors.response.use(
return response;
}
if (code === 1000) {
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ?
router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) :
(window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath))
// TODO token过期后退出登录 清空当前用户标记 - 为了刷新页面使用
localStorage.removeItem('refreshPage')
return Promise.reject(response);
}
if (code === 1001) {
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
return Promise.reject(response);
}
show ? message.error(msg):message.error('系统接口数据异常,请联系管理员');
console.log("api %o", msg);
return Promise.reject(response);

View File

@@ -53,6 +53,7 @@ export const getProjectList = (obj) => http.post('/admin/project/list', obj)
// 获取项目详情信息(包含阶段及任务列表)
export const getProjectDetail = (obj) => http.get('/admin/project/detail', {params: obj})
export const getDraftTask = (obj) => http.get('/admin/project/detailDraft', { params: obj })
//发布项目
export const releaseProject = (obj) => http.post('/admin/project/publish', obj)
//获取项目学员

View File

@@ -133,7 +133,7 @@ export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', o
//获取用户登录
export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true })
//公共信息---------------------------------------------------
export const courseData =(obj)=> http.post("/admin/offcourse/allPlanList",obj);
//添加项目学员
export const addStudentProject = (obj) => http.post('/admin/project/addStudent', obj)
//添加课程学员
@@ -178,6 +178,7 @@ export const exportHomeWork = (obj) => http.get('/admin/student/exportHomeWork',
export const exportHomeWorkTemplate = (obj) => http.get('/admin/student/exportHomeWorkTemplate', { params: obj })
//签到
export const attendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj)
export const attendanceSignAll = (obj) => http.post('/stu/task/all/sign', obj)
//请假
export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave', obj)

View File

@@ -495,7 +495,9 @@ export async function request(_url, params) {
return res;
}
if (res.code === 1000 || res.code === 1002) {
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ?
router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) :
(window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath))
localStorage.removeItem('refreshPage')
return Promise.reject(res);
}else if(res.code=== 1001){

View File

@@ -374,6 +374,234 @@ textarea {
}
}
.drawerMain {
.header {
height: 73px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
.headerTitle {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-left: 24px;
}
}
.contentMain {
.main_items {
display: flex;
margin-bottom: 12px;
margin-top: 32px;
flex-wrap: wrap;
.mi_ipts {
display: flex;
margin-bottom: 20px;
.mii_ipt {
display: flex;
align-items: center;
margin-right: 24px;
.ipt_name {
white-space: nowrap;
}
}
}
.mi_btns {
display: flex;
margin-left: 38px;
margin-bottom: 20px;
cursor: pointer;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-left: 14px;
flex-shrink: 0;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 36px;
margin-left: 5px;
}
}
.btn1 {
background: rgb(64, 158, 255);
.search {
width: 15px;
height: 17px;
background-image: url("@/assets/images/coursewareManage/search0.png");
}
.btnText {
color: rgb(255, 255, 255);
}
}
.btn2 {
background: rgb(255, 255, 255);
.search {
width: 15px;
height: 17px;
background-image: url("@/assets/images/coursewareManage/reset1.png");
}
.btnText {
color: rgb(64, 158, 255);
}
}
.btn1:hover {
background: rgb(255, 255, 255);
.search {
background-image: url("@/assets/images/courseManage/search1.png");
}
.btnText {
color: #4ea6ff;
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("@/assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.main_notice {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
height: 40px;
background-color: #e9f6fe;
.mntc_left {
display: flex;
align-items: center;
.title {
color: rgba(0, 0, 0, 0.65);
margin-right: 17px;
}
.data {
color: #4ea6ff;
}
.notice_icon {
width: 14px;
height: 14px;
margin-right: 9px;
margin-left: 9px;
background-image: url(@/assets/images/coursewareManage/gan.png);
background-size: 100% 100%;
}
}
.mntc_right {
cursor: pointer;
}
}
}
.main_table {
position: relative;
padding-bottom: 80px;
.ant-checkbox-wrapper {
align-items: center;
margin-top: -2px;
}
.ant-table-selection-column {
padding: 0px !important;
padding-left: 5px !important;
}
.ant-table-thead>tr>th {
background-color: rgba(239, 244, 252, 1);
}
th.h {
background-color: #eff4fc !important;
}
.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td {
background: #f6f9fd;
}
.pa {
left: 0;
width: 100%;
display: flex;
justify-content: center;
position: absolute;
bottom: 20px;
}
}
.main_btns {
height: 72px;
width: 100%;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
color: #4ea6ff;
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
}
}
}
}
//抽屉--------------------------------------------------------

View File

@@ -90,7 +90,7 @@ const logOut = async () => {
store.replaceState(createStore({state: {openpages: []}}).state);
localStorage.clear();
sessionStorage.clear();
window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: '/login'}) : (window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL)
};
</script>
<style scoped lang="scss">

View File

@@ -21,8 +21,16 @@
</div>
<div class="downloadCode" style="">
<div class="qrm_body">
<div class="codename">
{{ codeInfo.name ? codeInfo.name : "" }}
<div :class="codeInfo.teacherName?'qrm_body_item':''">
<div v-if="codeInfo.name&&!codeInfo.teacherName" class="codename">
{{ codeInfo.name ? codeInfo.name : "" }}
</div>
<div v-if="codeInfo.name&&codeInfo.teacherName" class="codename">
开课{{ codeInfo.name ? codeInfo.name : "" }}
</div>
<div v-if="codeInfo.teacherName" class="codename">
讲师{{ codeInfo.teacherName ? codeInfo.teacherName : "" }}
</div>
</div>
<qrcode-vue
:value="codeInfo.url.startsWith('/')?(`${domain+codeInfo.url}&t=10`):`${codeInfo.url}&t=10`"
@@ -163,6 +171,7 @@ export default {
title: "",
name: "",
url: "",
teacherName: "",
};
state.codeInfo = Object.assign(obj, props.codeInfo);
console.log("codeInfo22222", state.codeInfo, props.index, props.type);
@@ -241,6 +250,10 @@ export default {
display: flex;
flex-direction: column;
align-items: center;
.qrm_body_item{
width: 100%;
margin-left: 270px;
}
.codename {
font-size: 18px;
font-weight: 400;
@@ -249,6 +262,10 @@ export default {
margin-bottom: 20px;
margin-left: 20px;
margin-right: 20px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 300px;
}
}
.codeUrl {

View File

@@ -18,7 +18,11 @@
</div>
<div class="downloadCode" style="">
<div class="qrm_body">
<div class="codename">{{ name }}</div>
<div class="qrm_body_info">
<div class="codename" v-if="courseName">项目{{ courseName }}</div>
<div class="codename">开课{{ name }}</div>
<div class="codename" v-if="createName">讲师{{ createName }}</div>
</div>
<QrcodeVue :value="url" :size="size" style="width: 200px; height: 200px"></QrcodeVue>
</div>
</div>
@@ -65,6 +69,8 @@ const props = defineProps({
default: 800
},
name: String,
createName: String,
courseName: String,
title: {
type: String,
default: "二维码"
@@ -162,15 +168,23 @@ function copyUrl() {
display: flex;
flex-direction: column;
align-items: center;
.qrm_body_info{
width: 100%;
margin-left: 278px;
}
.codename {
font-size: 18px;
font-weight: 400;
color: #333333;
line-height: 25px;
margin-bottom: 20px;
margin-bottom: 5px;
margin-left: 20px;
margin-right: 20px;
text-align: left;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 300px;
}
}

View File

@@ -310,7 +310,7 @@ export default {
customRender: (text) => {
return (
<div class="racona">
<span> {text.record.lastStudyTime && text.record.finishStatus == 1 ?text.record.lastStudyTime:"-"}</span>
<span> {text.record.lastStudyTime?text.record.lastStudyTime:"-"}</span>
</div>
);
},

View File

@@ -288,7 +288,6 @@ const openDrawer = (raw) => {
const changePagination = (page) => {
searchParams.value.pageNo = page;
searchStu();
};
function del(id) {

View File

@@ -404,15 +404,14 @@ export default {
<span
style="cursor:pointer;color:#387DF7"
onClick={() => {
{/* showAudit(
showAudit(
value.record.createrId,
value.record.creater,
value.record.offId,
value.record.type,
value.record.id,
value.record.courseId
); */}
window.open(window.location.protocol + process.env.VUE_APP_BOE_API_URL + '/pc/examine/notapproved','notapproved')
);
}}
>
审核
@@ -436,14 +435,14 @@ export default {
</span>
:''
}
{/* &nbsp;
&nbsp;
<span
onClick={() => {
getFaceDetail(value.record.offId);
}}
style="cursor:pointer;color:#387DF7">
预览
</span> */}
</span>
</div>
);
},

View File

@@ -564,7 +564,15 @@ const closeChangeModal = () => {
};
//暂存
const currentTaskList = computed(() => {
return routerInfo.value?.chapterList[activeIndex.value]?.draftTaskList.length;
});
watch(currentTaskList, (oldValue,newValue) => {
request(ROUTER_DETAIL_MODIFY, routerInfo.value)
getDetail()
});
const temporaryStorage = async () => {
console.log(routerInfo.value,'routerInfo.value')
confirmLoading.value = true;
await request(ROUTER_DETAIL_MODIFY, routerInfo.value);
await getDetail();

View File

@@ -572,6 +572,16 @@
>
</div>
</div>
<div class="set_content">
<div class="setc_name"><span>积分排行榜</span></div>
<div class="setc_main">
<a-radio v-model:checked="projectInfo.rankFlag" :disabled="true"
><span style="color: #333333"
>是否显示积分</span
></a-radio
>
</div>
</div>
<div class="set_content" v-if="projectInfo.remark ">
<div class="setc_name"><span>项目说明</span></div>
<div class="setc_main">
@@ -1205,6 +1215,7 @@ export default defineComponent({
systemId: state.projectInfo.systemId,
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
rankFlag: state.projectInfo.rankFlag ? 1 : 0,
notice: state.projectInfo.notice,
noticeFlag: state.projectInfo.noticeFlag,
projectTemplateId: projectId,
@@ -1226,6 +1237,7 @@ export default defineComponent({
systemId: state.projectInfo.systemId,
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
rankFlag: state.projectInfo.rankFlag ? 1 : 0,
notice: state.projectInfo.notice,
noticeFlag: state.projectInfo.noticeFlag,
projectTemplateId: projectId,

View File

@@ -164,6 +164,22 @@
</a-checkbox>
</div>
</div>
<div class="name name2">
<div class="namebox">
<div class="inname">积分排行榜</div>
</div>
<div class="in ggysxz">
<a-checkbox v-model:checked="rankFlag">
<span style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
">
是否显示积分
</span>
</a-checkbox>
</div>
</div>
<div class="name name2">
<div class="namebox">
<div class="inname" style="margin-top: 13px">项目说明</div>
@@ -285,6 +301,7 @@ export default {
},
classifyList5: [],
courseSyncFlag: true,
rankFlag:false,
auditDescription: "",
ptojectType: "",
changeCondition: false,
@@ -340,6 +357,7 @@ export default {
state.projectInfo.endTime,
];
state.courseSyncFlag = !!state.projectInfo.courseSyncFlag;
state.rankFlag = !!state.projectInfo.rankFlag;
if (Number(state.projectInfo.status) === -5) {
let obj = {
project_id: state.projectInfo.id,
@@ -479,6 +497,7 @@ export default {
}
state.projectInfo.type = 3;
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
state.projectInfo.rankFlag = state.rankFlag ? 1 : 0;
api.createProject(state.projectInfo).then((res) => {
state.loading = false;
message.destroy();

View File

@@ -227,6 +227,25 @@
>
</div>
</div>
<div class="name name2">
<div class="namebox">
<div class="inname">积分排行榜</div>
</div>
<div class="in">
<a-checkbox
v-model:checked="rankFlag"
:disabled="viewDetail ? true : false"
><span
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
"
>是否显示积分</span
></a-checkbox
>
</div>
</div>
<div class="name name2">
<div class="namebox">
<div class="inname" style="margin-top: 13px">项目说明</div>
@@ -365,6 +384,7 @@ export default {
pageSize1: 10, //项目经理
projectInfo: {},
courseSyncFlag: false,
rankFlag:false,
learnBgMore: false,
projectPic: [],
loading: false,
@@ -404,6 +424,7 @@ export default {
state.projectInfo.endTime,
];
state.courseSyncFlag = !!state.projectInfo.courseSyncFlag;
state.rankFlag = !!state.projectInfo.rankFlag
});
}
@@ -473,6 +494,7 @@ export default {
return message.warning("项目名称重复,请重新填写");
}
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
state.projectInfo.rankFlag = state.rankFlag ? 1 : 0;
api.createProject(state.projectInfo).then(() => {
state.loading = false;
message.destroy();

View File

@@ -609,6 +609,14 @@ const selectRowAll = () => {
};
//暂存
const currentTaskList = computed(() => {
return projectInfo.value?.stageList[activeIndex.value]?.taskDraftDtoList.length;
});
watch(currentTaskList, (oldValue,newValue) => {
request(PROJECT_DETAIL_MODIFY, projectInfo.value)
// request(PROJECT_RELEASE, {projectId: route.query.projectId})
getTask()
});
const temporaryStorage = async () => {
confirmLoading.value = true
await request(PROJECT_DETAIL_MODIFY, projectInfo.value)
@@ -623,6 +631,8 @@ const submitStorage = async () => {
content: '该项目已经发布,修改后如未点击暂存当前操作未保存数据将丢失,确认保存?',
ok: async () => {
confirmLoading.value = true
request(PROJECT_DETAIL_MODIFY, projectInfo.value)
await getTask()
await request(PROJECT_RELEASE, {projectId: route.query.projectId})
message.success("保存成功");
confirmLoading.value = false;

View File

@@ -2479,7 +2479,7 @@ export default {
name: qrCodeItems.value[0].name+'课程签到',
createName:qrCodeItems.value[0].offteachers.map(teacher => teacher.teacherName).join(', ')||qrCodeItems.value[0].teacher,
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${qrCodeItems.value[0].id}&taskType=${2}&type=${3}`,
});
});
}
if(qrCodeItems.value.length==0){
message.info("暂无签到二维码")
@@ -2491,18 +2491,13 @@ export default {
const teacher = qrCodeItems.value[key].teacher;
const id = qrCodeItems.value[key].id;
const offteachers = qrCodeItems.value[key].offteachers.map(teacher => teacher.teacherName).join(', ');
if(qrCodeItems.value[key]){
qrCode({
title: "【签到】二维码",
courseName: state.name+'项目',
name: name+'课程签到',
createName:offteachers||teacher,
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${id}&taskType=${2}&type=${3}`,
qrCode({
title: "【签到】二维码",
courseName: state.name+'项目',
name: name+'课程签到',
createName:offteachers||teacher,
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${id}&taskType=${2}&type=${3}`,
});
}else{
const errorMessage = `二维码生成失败,请联系运维人员 ,参数{ name ${name}url${id}}`
message.error(errorMessage);
}
}
const qrCodeItemspg = ref([]);
const visibleEwmpg = ref({});

View File

@@ -543,13 +543,7 @@ export default {
},
}).then(
(res) => {
console.log(res)
console.log(res.data.status)
if(res.data.status && res.data.status == 600){
message.error(res.data.message);
}else{
downLoad(res.data, "课程详细信息.xlsx");
}
downLoad(res.data, "课程详细信息.xlsx");
},
(err) => {
message.error(err);

View File

@@ -155,7 +155,7 @@ export default {
},
}).then(
(res) => {
downLoad(res.data, "考试列表信息.xlsx");
downLoad(res.data, "考试.xlsx");
},
(err) => {
message.error(err);
@@ -403,7 +403,7 @@ export default {
},
}).then(
(res) => {
downLoad(res.data, "考试详细信息.xlsx");
downLoad(res.data, "考试详.xlsx");
},
(err) => {
message.error(err);
@@ -427,7 +427,7 @@ export default {
},
}).then(
(res) => {
downLoad(res.data, "考试详细信息.xlsx");
downLoad(res.data, "考试详.xlsx");
},
(err) => {
message.error(err);

View File

@@ -242,7 +242,7 @@ export default {
ellipsis: true,
key: "boeRouterInfoName",
align: "center",
width: 240,
width: 120,
},
{
title: "归属组织",
@@ -250,7 +250,7 @@ export default {
ellipsis: true,
key: "organizationName",
align: "center",
width: 240,
width: 120,
},
{
title: "关卡数",
@@ -258,7 +258,7 @@ export default {
ellipsis: true,
key: "levelTotal",
align: "center",
width: 90,
width: 120,
},
{
title: "任务数",
@@ -266,7 +266,7 @@ export default {
ellipsis: true,
key: "taskTotal",
align: "center",
width: 90,
width: 120,
},
{
title: "学习人数",
@@ -274,7 +274,7 @@ export default {
ellipsis: true,
key: "learnerNumber",
align: "center",
width: 90,
width: 120,
},
{
title: "参与人数",
@@ -282,7 +282,7 @@ export default {
ellipsis: true,
key: "participantsTotal",
align: "center",
width: 90,
width: 120,
},
{
title: "参与率",
@@ -290,7 +290,7 @@ export default {
ellipsis: true,
key: "participantsRate",
align: "center",
width: 90,
width: 120,
},
{
title: "完成人数",
@@ -298,7 +298,7 @@ export default {
ellipsis: true,
key: "completionNumber",
align: "center",
width: 90,
width: 120,
},
{
title: "完成率",
@@ -306,7 +306,7 @@ export default {
ellipsis: true,
key: "completedRate",
align: "center",
width: 90,
width: 120,
},
{
title: "发布时间",
@@ -375,7 +375,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "路径图历史学习数据.xlsx");
downLoad(res.data, "历史学习数据.xlsx");
});
};
// 导出当前数据
@@ -389,7 +389,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "路径图当前学习数据.xlsx");
downLoad(res.data, "当前学习数据.xlsx");
});
};
//table 分页事件
@@ -445,7 +445,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "学习路径图详细信息.xlsx");
downLoad(res.data, "详细信息.xlsx");
}),
(err) => {
message.error(err);
@@ -468,12 +468,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
if(res.data.status && res.data.status == 600){
message.error(res.data.status)
}else{
downLoad(res.data, "学习路径图详细信息.xlsx");
}
downLoad(res.data, "详细信息.xlsx");
}),
(err) => {
message.error(err);
@@ -492,7 +487,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "学习路径图列表信息.xlsx");
downLoad(res.data, "学习路径图信息.xlsx");
}),
(err) => {
message.error(err);

View File

@@ -349,8 +349,7 @@ export default {
one: "学习人数",
two: "总学习时长",
three: "人均学习时长",
},
topChartData:[],
}
});
const surfaceRef = ref(null);
const surface1Ref = ref(null);
@@ -373,87 +372,9 @@ export default {
state.limitCheckedList = event;
// modalChange();
if (state.towParmasn.dateType == 2) {
// twoMonthChange(state.towParmasn.time);
const xData = [];
const avgDuration = [];
const count = [];
const duration = [];
state.topChartData.forEach((item) => {
xData.push(item.day);
avgDuration.push(item.avgDuration);
count.push(item.count);
duration.push(item.duration);
});
option.value.xAxis.data = xData;
// 右侧坐标轴数据
// option.value.series[0].data = count;
// //左侧坐标轴数据
// option.value.series[1].data = avgDuration;
// option.value.series[2].data = duration;
option.value.series[0].data = [];
option.value.series[1].data = [];
option.value.series[2].data = [];
console.log("checkedList:",state.checkedList);
console.log("666 duration:",duration);
for(let i=0;i<state.checkedList.length;i++){
if(state.checkedList[i]=="学习人数" || state.checkedList[i]=="总阅读人数" || state.checkedList[i]=="总查看人数"){
option.value.series[0].data = count;
option.value.series[0].name = state.checkedList[i];
}
if(state.checkedList[i]=="人均学习时长" || state.checkedList[i]=="人均阅读时长" || state.checkedList[i]=="总回答人数"){
option.value.series[1].data = avgDuration;
option.value.series[1].yAxisIndex = i;
option.value.series[1].name = state.checkedList[i];
}
if(state.checkedList[i]=="总学习时长" || state.checkedList[i]=="总阅读时长" || state.checkedList[i]=="总提问人数"){
option.value.series[2].data = duration;
option.value.series[2].yAxisIndex = i;
option.value.series[2].name = state.checkedList[i];
}
}
console.log("123:",option.value.series)
createEcharts2();
twoMonthChange(state.towParmasn.time);
} else if (state.towParmasn.dateType == 1) {
// twoDatChange(state.towParmasn.day);
const xData = [];
const avgDuration = [];
const count = [];
const duration = [];
state.topChartData.forEach((item) => {
xData.push(item.day);
avgDuration.push(item.avgDuration);
count.push(item.count);
duration.push(item.duration);
});
option.value.xAxis.data = xData;
// 右侧坐标轴数据
// option.value.series[0].data = count;
// //左侧坐标轴数据
// option.value.series[1].data = avgDuration;
// option.value.series[2].data = duration;
option.value.series[0].data = [];
option.value.series[1].data = [];
option.value.series[2].data = [];
console.log("checkedList:",state.checkedList);
for(let i=0;i<state.checkedList.length;i++){
if(state.checkedList[i]=="学习人数" || state.checkedList[i]=="总阅读人数" || state.checkedList[i]=="总查看人数"){
option.value.series[0].data = count;
option.value.series[0].name = state.checkedList[i];
}
if(state.checkedList[i]=="人均学习时长" || state.checkedList[i]=="人均阅读时长" || state.checkedList[i]=="总回答人数"){
option.value.series[1].data = avgDuration;
option.value.series[1].yAxisIndex = i;
option.value.series[1].name = state.checkedList[i];
}
if(state.checkedList[i]=="总学习时长" || state.checkedList[i]=="总阅读时长" || state.checkedList[i]=="总提问人数"){
option.value.series[2].data = duration;
option.value.series[2].yAxisIndex = i;
option.value.series[2].name = state.checkedList[i];
}
}
createEcharts2();
twoDatChange(state.towParmasn.day);
}
}
};
@@ -621,7 +542,7 @@ export default {
.format("YYYY-MM-DD 00:00:01");
const dayEnd = dayjs(state.towParmasn.day[1])
.endOf("day")
.format("YYYY-MM-DD 23:59:59");
.format("YYYY-MM-DD hh:mm:ss");
axios({
method: "post",
url: "/report/boeu/studyData/exportDetailAll",
@@ -653,7 +574,7 @@ export default {
} else {
const monthEnd = dayjs(state.towParmasn.time[1])
.endOf("month")
.format("YYYY-MM-DD 23:59:59");
.format("YYYY-MM-DD hh:mm:ss");
axios({
method: "post",
url: "/report/boeu/studyData/exportDetailAll",
@@ -777,7 +698,6 @@ export default {
type: state.towParmasn.type,
});
if (res) {
state.topChartData = res?.data?.result;
if (
state.towParmasn.type == 4 ||
state.towParmasn.type == 5 ||
@@ -879,7 +799,6 @@ export default {
type: state.towParmasn.type,
});
if (res) {
state.topChartData = res?.data?.result;
if (
state.towParmasn.type == 4 ||
state.towParmasn.type == 5 ||
@@ -969,7 +888,7 @@ export default {
if (e?.length > 0) {
const monthEnd = dayjs(e[1])
.endOf("month")
.format("YYYY-MM-DD 23:59:59");
.format("YYYY-MM-DD hh:mm:ss");
const res = await api.dataStatisticsSelectV1({
startTime: dayjs(e[0]).format("YYYY-MM-01 00:00:01"),
endTime: monthEnd,
@@ -1005,7 +924,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 23:59:59");
const dayEnd = dayjs(e[1]).endOf("day").format("YYYY-MM-DD hh:mm:ss");
const res = await api.dataStatisticsSelectV1({
startTime: dayStart,
endTime: dayEnd,
@@ -1054,7 +973,7 @@ export default {
.format("YYYY-MM-DD 00:00:01");
const dayEnd = dayjs(state.threeDay[1])
.endOf("day")
.format("YYYY-MM-DD 23:59:59");
.format("YYYY-MM-DD hh:mm:ss");
axios({
method: "post",
url: "/report/data/statistics/export/v1",
@@ -1082,7 +1001,7 @@ export default {
} else {
const monthEnd = dayjs(state.threeTime[1])
.endOf("month")
.format("YYYY-MM-DD 23:59:59");
.format("YYYY-MM-DD hh:mm:ss");
axios({
method: "post",
url: "/report/data/statistics/export/v1",
@@ -1120,7 +1039,7 @@ export default {
if (e?.length > 0) {
const monthEnd = dayjs(e[1])
.endOf("month")
.format("YYYY-MM-DD 23:59:59");
.format("YYYY-MM-DD hh:mm:ss");
const res = await api.dataStatisticsSelectV2({
startTime: dayjs(e[0]).format("YYYY-MM-01 00:00:01"),
endTime: monthEnd,
@@ -1156,7 +1075,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 23:59:59");
const dayEnd = dayjs(e[1]).endOf("day").format("YYYY-MM-DD hh:mm:ss");
const res = await api.dataStatisticsSelectV2({
startTime: dayStart,
endTime: dayEnd,
@@ -1198,7 +1117,7 @@ export default {
.format("YYYY-MM-DD 00:00:01");
const dayEnd = dayjs(state.forDay[1])
.endOf("day")
.format("YYYY-MM-DD 23:59:59");
.format("YYYY-MM-DD hh:mm:ss");
axios({
method: "post",
url: "/report/data/statistics/export/v2",
@@ -1226,7 +1145,7 @@ export default {
} else {
const monthEnd = dayjs(state.forTime[1])
.endOf("month")
.format("YYYY-MM-DD 23:59:59");
.format("YYYY-MM-DD hh:mm:ss");
axios({
method: "post",
url: "/report/data/statistics/export/v2",
@@ -1632,8 +1551,7 @@ export default {
// const monthEnd = dayjs(new Date()).endOf("year").format("YYYY-MM");
var year = dayjs(new Date()).year();
var month = dayjs(new Date()).month()+1;
var day = dayjs(new Date()).date();
console.log("initTime year:",year,"month:",month,"day:",day);
console.log("initTime year:",year,"month:",month);
var year1 = year;
var month1 = parseInt(month) - 5;
if(month1<=0){
@@ -1647,9 +1565,9 @@ export default {
state.threeTime = [dayjs(start), dayjs(monthEnd)];
state.forTime = [dayjs(start), dayjs(monthEnd)];
state.towParmasn.time = [dayjs(start), dayjs(monthEnd)];
state.towParmasn.day = [dayjs( year + "-" + month + "-" + day ), dayjs( year + "-" + month + "-" + day )];
state.threeDay = [dayjs( year + "-" + month + "-" + day ), dayjs( year + "-" + month + "-" + day )];
state.forDay = [dayjs( year + "-" + month + "-" + day ), dayjs( year + "-" + month + "-" + day )];
state.towParmasn.day = [dayjs( year + "-" + month + "-" + "01" ), dayjs(monthEnd)];
state.threeDay = [dayjs( year + "-" + month + "-" + "01" ), dayjs(monthEnd)];
state.forDay = [dayjs( year + "-" + month + "-" + "01" ), dayjs(monthEnd)];
leftMonthChange([dayjs(start), dayjs(monthEnd)]);
rightMonthChange([dayjs(start), dayjs(monthEnd)]);
twoMonthChange([dayjs(start), dayjs(monthEnd)]);

View File

@@ -1257,7 +1257,7 @@ export default {
align: "center",
},
{
title: "学习时长",
title: "学习时长(分钟)",
dataIndex: "studyTime",
ellipsis: true,
key: "studyTime",
@@ -1304,14 +1304,14 @@ export default {
width: 120,
align: "center",
},
// {
// title: "状态",
// dataIndex: "publishStatus",
// ellipsis: true,
// key: "publishStatus",
// width: 120,
// align: "center",
// },
{
title: "状态",
dataIndex: "publishStatus",
ellipsis: true,
key: "publishStatus",
width: 120,
align: "center",
},
{
title: "启用状态",
dataIndex: "enabled",
@@ -1359,7 +1359,7 @@ export default {
fixed: "left",
},
{
title: "授课时长(分钟",
title: "授课时长(小时",
dataIndex: "teachingLength",
ellipsis: true,
key: "teachingLength",

View File

@@ -436,7 +436,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "考试详细信息.xlsx");
downLoad(res.data, "考试详细数据.xlsx");
});
};
//table 分页事件

View File

@@ -220,7 +220,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "项目列表.xlsx");
downLoad(res.data, "项目.xlsx");
});
} else {
const params = {};
@@ -293,12 +293,7 @@ export default {
},
}).then(
(res) => {
if(res.data.status && res.data.status == 600){
message.error(res.data.message);
}else{
downLoad(res.data, "项目详情.xlsx");
}
downLoad(res.data, "项目详情.xlsx");
},
(err) => {
message.error(err);
@@ -417,7 +412,7 @@ export default {
title: "项目名称",
dataIndex: "projectName",
key: "projectName",
width: 240,
width: 120,
ellipsis: true,
align: "left",
fixed: "left",
@@ -427,7 +422,7 @@ export default {
dataIndex: "sourceBelongName",
ellipsis: true,
key: "sourceBelongName",
width: 240,
width: 120,
align: "center",
fixed: "left",
},
@@ -445,7 +440,7 @@ export default {
dataIndex: "stageTotal",
ellipsis: true,
key: "stageTotal",
width: 90,
width: 120,
align: "center",
},
{
@@ -453,15 +448,7 @@ export default {
dataIndex: "taskTotal",
ellipsis: true,
key: "taskTotal",
width: 90,
align: "center",
},
{
title: "总人数",
dataIndex: "participantsTotal",
ellipsis: true,
key: "participantsTotal",
width: 90,
width: 120,
align: "center",
},
{
@@ -469,7 +456,15 @@ export default {
dataIndex: "startLearnerTotal",
ellipsis: true,
key: "startLearnerTotal",
width: 90,
width: 120,
align: "center",
},
{
title: "参与人数",
dataIndex: "participantsTotal",
ellipsis: true,
key: "participantsTotal",
width: 120,
align: "center",
},
{
@@ -477,7 +472,7 @@ export default {
dataIndex: "participantsRate",
ellipsis: true,
key: "participantsRate",
width: 90,
width: 120,
align: "center",
},
{
@@ -485,7 +480,7 @@ export default {
dataIndex: "peopleCompletedTotal",
ellipsis: true,
key: "peopleCompletedTotal",
width: 90,
width: 120,
align: "center",
},
{
@@ -558,7 +553,7 @@ export default {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "项目学习记录.xlsx");
downLoad(res.data, "项目详情.xlsx");
});
};
onMounted(() => {