feat:合并

This commit is contained in:
lixg
2023-02-11 11:21:42 +08:00
14 changed files with 257 additions and 181 deletions

View File

@@ -91,6 +91,8 @@ export const editLearnInfo = (obj) => http.post('/admin/router/editInfo', obj)
export const scoreRank = (params) => http.get('/points/top/list', { params }) export const scoreRank = (params) => http.get('/points/top/list', { params })
// 项目进度排行 // 项目进度排行
export const completionRank = (params) => http.get('/stu/project/rank_list/completion_list', { params }) export const completionRank = (params) => http.get('/stu/project/rank_list/completion_list', { params })
// 项目学时排行榜
export const studytimeRank = (params) => http.get('/stu/project/rank_list/study_time_list', { params })
//排行榜 //排行榜
export const billboard = (obj) => http.post("/admin/project/billboard", obj); export const billboard = (obj) => http.post("/admin/project/billboard", obj);
//项目基础信息----------------------------------- //项目基础信息-----------------------------------

View File

@@ -22,4 +22,6 @@ export const queryExaminationAloneExtendList = (obj) => http.post('/examination/
// 对接三方考试任务保存接口-三方 // 对接三方考试任务保存接口-三方
export const examinationTaskSave = (obj) => http.post('/examination/examinationTaskSave', obj); export const examinationTaskSave = (obj) => http.post('/examination/examinationTaskSave', obj);
//编辑考试信息 //编辑考试信息
export const updateExamination = (obj) => http.post('/examination/updateExamination', obj); export const updateExamination = (obj) => http.post('/examination/updateExamination', obj);
//编辑外部考试信息
export const updateExternalExam = (obj) => http.post('/external/exam/updateExternalExam', obj);

View File

@@ -17,21 +17,44 @@
</div> </div>
<!-- 2022-11-30注释 后面放开 修改div的padding-topL:32 --> <!-- 2022-11-30注释 后面放开 修改div的padding-topL:32 -->
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;"> <div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
<button
style="width: 100px; cursor: pointer;"
@click="changeOuter(1)"
:class="[isOuter == 1 ? 'outer' : 'notOuter']"
>
系统考试
</button>
<button <div v-if="edit">
style="width: 100px; cursor: pointer;" <button
@click="changeOuter(2)" v-if="isOuter == 1"
:class="[isOuter == 2 ? 'outer' : 'notOuter']" style="width: 100px; cursor: pointer;"
> @click="changeOuter(1)"
外部考试 :class="[isOuter == 1 ? 'outer' : 'notOuter']"
</button> >
系统考试
</button>
<button
v-else
style="width: 100px; cursor: pointer;"
@click="changeOuter(2)"
:class="[isOuter == 2 ? 'outer' : 'notOuter']"
>
外部考试
</button>
</div>
<div v-else>
<button
style="width: 100px; cursor: pointer;"
@click="changeOuter(1)"
:class="[isOuter == 1 ? 'outer' : 'notOuter']"
>
系统考试
</button>
<button
style="width: 100px; cursor: pointer;"
@click="changeOuter(2)"
:class="[isOuter == 2 ? 'outer' : 'notOuter']"
>
外部考试
</button>
</div>
</div> </div>
<div v-if="isOuter==1" class="contentMain"> <div v-if="isOuter==1" class="contentMain">
@@ -48,6 +71,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input <a-input
:disabled="edit"
v-model:value="test.examinationName" v-model:value="test.examinationName"
style="width: 400px; height: 40px; border-radius: 8px" style="width: 400px; height: 40px; border-radius: 8px"
placeholder="请输入考试名称" placeholder="请输入考试名称"
@@ -67,11 +91,11 @@
<span style="margin-right: 3px">选择试卷</span> <span style="margin-right: 3px">选择试卷</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<button class="xkbtn" @click="selectTest"> <button :disabled="edit" class="xkbtn" @click="selectTest">
{{ chooseCourse ? "重选" : "选择" }}试卷 {{ chooseCourse ? "重选" : "选择" }}试卷
</button> </button>
<div v-if="paperName != ''"> <div v-if="paperName != ''">
<a-tag closable color="processing" @close="delTag"> <a-tag closable color="processing" @close="delTag" :closeIcon="edit">
<span style="font-size: 14px; line-height: 33px">{{ <span style="font-size: 14px; line-height: 33px">{{
paperName paperName
}}</span> }}</span>
@@ -122,6 +146,7 @@
</div> </div>
<div class="select"> <div class="select">
<a-input-number <a-input-number
:disabled="edit"
:min="0" :min="0"
:max="300" :max="300"
:precision="0" :precision="0"
@@ -143,6 +168,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input <a-input
:disabled="edit"
v-model:value="test.passLine" v-model:value="test.passLine"
type="number" type="number"
style="width: 400px; height: 40px; border-radius: 8px" style="width: 400px; height: 40px; border-radius: 8px"
@@ -157,6 +183,7 @@
</div> </div>
<div class="textarea"> <div class="textarea">
<a-textarea <a-textarea
:disabled="edit"
v-model:value="test.examinationExplain" v-model:value="test.examinationExplain"
placeholder="请输入考试说明" placeholder="请输入考试说明"
allow-clear allow-clear
@@ -174,7 +201,8 @@
<div class="setbox"> <div class="setbox">
<div class="timerbox"> <div class="timerbox">
<span>允许重复考试</span> <span>允许重复考试</span>
<a-input-number <a-input-number
:disabled="edit"
:min="-1" :min="-1"
:max="300" :max="300"
:precision="0" :precision="0"
@@ -200,6 +228,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="edit"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="test.showAnswers" v-model:value="test.showAnswers"
> >
@@ -218,6 +247,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="edit"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="test.showAnalysis" v-model:value="test.showAnalysis"
> >
@@ -236,6 +266,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="edit"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="test.scoringModel" v-model:value="test.scoringModel"
> >
@@ -256,6 +287,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="edit"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="test.questionArrangement" v-model:value="test.questionArrangement"
> >
@@ -366,6 +398,8 @@ import {message} from "ant-design-vue";
import { import {
createExamination, createExamination,
queryExaminationDetailById, queryExaminationDetailById,
updateExamination,
updateExternalExam
} from "@/api/indexExam"; } from "@/api/indexExam";
// updateExamination, // updateExamination,
import STest from "./SelectTest.vue"; import STest from "./SelectTest.vue";
@@ -496,6 +530,12 @@ export default {
scoringModel: 2, scoringModel: 2,
questionArrangement: 4, questionArrangement: 4,
}; };
state.test1 = {
externalName: '',
source: '',
externalExplain: null
}
}; };
const closeDrawer = () => { const closeDrawer = () => {
@@ -522,7 +562,7 @@ export default {
console.log("props", props); console.log("props", props);
if (props.addtestVisible && props.EditTestId && props.EditTestId >0) { if (props.addtestVisible && props.EditTestId && props.EditTestId >0) {
// 该页面显示同时 edit为true 时,发送查询请求, // 该页面显示同时 edit为true 时,发送查询请求,
// queryTest(); queryTest();
} }
if (bool) { if (bool) {
state.test.showAnswers = 1; state.test.showAnswers = 1;
@@ -541,22 +581,36 @@ export default {
const queryTest = () => { const queryTest = () => {
queryExaminationDetailById({examinationId: props.EditTestId}) queryExaminationDetailById({examinationId: props.EditTestId})
.then((res) => { .then((res) => {
state.test = res.data.data; console.log(res)
state.test.showAnswers = Number(state.test.showAnswers); // 判断获取的考试
state.test.showAnalysis = Number(state.test.showAnalysis); if(res.data.data.examType==2){
state.test.scoringModel = Number(state.test.scoringModel); state.isOuter = 2;
state.test.questionArrangement = Number( // 外部考试
state.test.questionArrangement state.test1 = {
); externalName: res.data.data.examinationName,
state.test.chooseTime = [ source: res.data.data.source,
dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD HH:mm"), externalExplain: res.data.data.examinationExplain
dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD HH:mm"), }
]; }else{
state.paperName = state.test.examinationTestName; // 系统考试
// state.paperId=dayjs state.isOuter = 1;
state.paperId = state.test.examinationTestId; state.test = res.data.data;
state.test.showAnswers = Number(state.test.showAnswers);
state.test.showAnalysis = Number(state.test.showAnalysis);
state.test.scoringModel = Number(state.test.scoringModel);
state.test.questionArrangement = Number(
state.test.questionArrangement
);
state.test.chooseTime = [
dayjs(res.data.data.examinationStartTime, "YYYY-MM-DD HH:mm"),
dayjs(res.data.data.examinationEndTime, "YYYY-MM-DD HH:mm"),
];
state.paperName = state.test.examinationTestName;
// state.paperId=dayjs
state.paperId = state.test.examinationTestId;
console.log("querytest", state.test); console.log("querytest", state.test);
}
}) })
.catch(() => { .catch(() => {
//message.error(`查询失败`); //message.error(`查询失败`);
@@ -630,18 +684,18 @@ export default {
// if (props.EditTestId > 0) { if (props.EditTestId > 0) {
// // 编辑任务 // 编辑任务
// updateExamination(state.test) updateExamination(state.test)
// .then(async (res) => { .then(async (res) => {
// await updateTask(res); await updateTask(res);
// // closeDrawer(); // closeDrawer();
// }) })
// .catch(() => { .catch(() => {
// message.destroy(); message.destroy();
// message.error(`编辑失败`); message.error(`编辑失败`);
// }); });
// } else { } else {
// 创建任务 // 创建任务
createExamination(state.test) createExamination(state.test)
.then(async (res) => { .then(async (res) => {
@@ -652,7 +706,7 @@ export default {
message.destroy(); message.destroy();
message.error(`创建失败`); message.error(`创建失败`);
}); });
// } }
}else{ }else{
// 创建外部考试 // 创建外部考试
console.log('我是点了外部考试') console.log('我是点了外部考试')
@@ -687,14 +741,34 @@ export default {
} }
} }
// 新建外部考试
CreateExternalExam(state.test1).then( async res=>{ if (props.EditTestId > 0) {
console.log(res) console.log('我要开始编辑外部考试任务了 啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊')
// 添加更新到任务 let obj = {
await updateTask1(res); examinationId:props.EditTestId,
}).catch(err=>{ examinationName:state.test1.externalName,
console.log(err) examinationExplain:state.test1.externalExplain,
}) source:state.test1.source
}
updateExternalExam(obj)
.then(async (res) => {
await updateTask1(res);
// closeDrawer();
})
.catch(() => {
message.destroy();
message.error(`编辑失败`);
});
}else{
// 新建外部考试
CreateExternalExam(state.test1).then( async res=>{
console.log('新建外部考试返回的参数',res)
// 添加更新到任务
await updateTask1(res);
}).catch(err=>{
console.log(err)
})
}
} }
}; };
// 系统考试 // 系统考试
@@ -711,6 +785,7 @@ export default {
return message.warning("请先选中关卡"); return message.warning("请先选中关卡");
} }
let editObj1 = { let editObj1 = {
examType: 1,
chapterId: props.isactive, chapterId: props.isactive,
duration: res.data.data.examinationDuration, duration: res.data.data.examinationDuration,
courseId: res.data.data.examinationId, courseId: res.data.data.examinationId,
@@ -732,6 +807,7 @@ export default {
}); });
} else if (props.isLevel == 2) { } else if (props.isLevel == 2) {
let editObj = { let editObj = {
examType: 1,
courseId: res.data.data.examinationId, courseId: res.data.data.examinationId,
duration: res.data.data.examinationDuration, duration: res.data.data.examinationDuration,
name: res.data.data.examinationName, name: res.data.data.examinationName,
@@ -753,6 +829,7 @@ export default {
}); });
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
addTempTask({ addTempTask({
examType: 1,
courseId: res.data.data.examinationId, courseId: res.data.data.examinationId,
duration: res.data.data.examinationDuration, duration: res.data.data.examinationDuration,
name: res.data.data.examinationName, name: res.data.data.examinationName,
@@ -775,9 +852,9 @@ export default {
}; };
// 外部考试 // 外部考试
const updateTask1 = (res) => { const updateTask1 = (res) => {
state.EditTestId = res.data.data.externalId; state.EditTestId = res.data.data.examinationId;
if (props.faceLevel) { if (props.faceLevel) {
state.EditTestId = res.data.data.externalId; state.EditTestId = res.data.data.examinationId;
state.paperName = ""; state.paperName = "";
closeDrawer(); closeDrawer();
} else { } else {
@@ -787,9 +864,10 @@ export default {
return message.warning("请先选中关卡"); return message.warning("请先选中关卡");
} }
let editObj1 = { let editObj1 = {
examType: 2,
chapterId: props.isactive, chapterId: props.isactive,
courseId: res.data.data.externalId, courseId: res.data.data.examinationId,
name: res.data.data.externalName, name: res.data.data.examinationName,
routerId: props.routerId, routerId: props.routerId,
routerTaskId: props.routerTaskId || 0, routerTaskId: props.routerTaskId || 0,
type: 5, type: 5,
@@ -807,8 +885,9 @@ export default {
}); });
} else if (props.isLevel == 2) { } else if (props.isLevel == 2) {
let editObj = { let editObj = {
courseId: res.data.data.externalId, examType: 2,
name: res.data.data.externalName, courseId: res.data.data.examinationId,
name: res.data.data.examinationName,
projectId: props.projectId, projectId: props.projectId,
projectTaskId: props.projectTaskId || 0, projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0, stageId: props.chooseStageId || 0,
@@ -827,8 +906,9 @@ export default {
}); });
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
addTempTask({ addTempTask({
courseId: res.data.data.externalId, examType: 2,
name: res.data.data.externalName, courseId: res.data.data.examinationId,
name: res.data.data.examinationName,
projectTemplateId: props.projectTemplateId, projectTemplateId: props.projectTemplateId,
projectTaskId: props.projectTaskId || 0, projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0, stageId: props.chooseStageId || 0,

View File

@@ -47,20 +47,19 @@
<span class="total">/{{pro.totalReqCnt}}</span> <span class="total">/{{pro.totalReqCnt}}</span>
</div> </div>
</div> </div>
<!-- <a-divider <a-divider
type="vertical" type="vertical"
style=" style="
height: 49px; height: 49px;
margin-left: 34px; margin-left: 34px;
background-color: rgba(170, 166, 166, 0.3); background-color: rgba(170, 166, 166, 0.3);"
"
/> />
<div class="sortbox" style="margin-left: 34px"> <div class="sortbox" style="margin-left: 34px">
<div class="sortname">已修证书</div> <div class="sortname">已修证书</div>
<div class="sortnub"> <div class="sortnub">
<span class="nub1">{{pro.certCnt}}</span> <span class="nub1">{{pro.certCnt?pro.certCnt:0}}</span>
</div> </div>
</div> --> </div>
</div> </div>
<div class="secondrow"> <div class="secondrow">
<div class="rowleft">{{ pro.name }}</div> <div class="rowleft">{{ pro.name }}</div>

View File

@@ -37,7 +37,7 @@
:showUploadList="false" :showUploadList="false"
:data="{ :data="{
type: type, type: type,
targetId: Number(id), targetId: Number(targetId),
chapterId:chapterId, chapterId:chapterId,
taskId:taskId taskId:taskId
}" }"
@@ -235,7 +235,7 @@
const state = reactive({ const state = reactive({
fileType: ["xls", "xlsx"], fileType: ["xls", "xlsx"],
importScore: importScore:
process.env.VUE_APP_BASE_API + "/admin/external/exam/manage/importExternalExamScore", process.env.VUE_APP_BASE_API + "/admin/external/exam/manage/ImportExternalScore",
uploadpercent: -1, uploadpercent: -1,
uploadErr: false, //上传失败 uploadErr: false, //上传失败
addLoading: false, addLoading: false,
@@ -250,6 +250,7 @@
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("closeDraw",true);
ctx.emit("update:eScorevisibleExternalExternal", false); ctx.emit("update:eScorevisibleExternalExternal", false);
state.fileList = []; state.fileList = [];
state.uploadpercent = -1; state.uploadpercent = -1;
@@ -286,6 +287,13 @@
if (status === "done") { if (status === "done") {
state.fileName = info.file.name; state.fileName = info.file.name;
let i = 0; let i = 0;
let timeouts = setTimeout(() => {
clearInterval(timer)
state.addLoading = false;
message.destroy();
message.error(`文件导入超时`);
}, 30000);
let timer = setInterval(() => { let timer = setInterval(() => {
let uid = info.file.response.data; let uid = info.file.response.data;
api api
@@ -306,25 +314,18 @@
state.downloadErrUrl = res.data.data.url; state.downloadErrUrl = res.data.data.url;
console.log("props.getStudent", props.getStudent); console.log("props.getStudent", props.getStudent);
clearInterval(timer); clearInterval(timer);
clearTimeout(timeouts);
} }
}else{
state.addLoading = false;
message.destroy();
message.error(`文件导入超时`);
} }
}) })
.catch((err) => { .catch((err) => {
state.addLoading = false; state.addLoading = false;
clearInterval(timer); clearInterval(timer);
clearTimeout(timeouts);
console.log("查询导入状态失败", err); console.log("查询导入状态失败", err);
}); });
}, 500); }, 500);
setTimeout(() => {
clearInterval(timer)
state.addLoading = false;
message.destroy();
message.error(`文件导入超时`);
}, 30000);
} else if (status === "error") { } else if (status === "error") {
state.uploadErr = true; state.uploadErr = true;
message.error(`${info.file.name}上传失败`); message.error(`${info.file.name}上传失败`);

View File

@@ -48,22 +48,21 @@
<span class="total">/{{ totalReqCnt }}</span> <span class="total">/{{ totalReqCnt }}</span>
</div> </div>
</div> </div>
<!--
<a-divider <a-divider
type="vertical" type="vertical"
style=" style="
height: 49px; height: 49px;
margin-left: 34px; margin-left: 34px;
background-color: rgba(170, 166, 166, 0.3); background-color: rgba(170, 166, 166, 0.3);"
"
/> />
<div class="sortbox" style="margin-left: 34px"> <div class="sortbox" style="margin-left: 34px">
<div class="sortname">已修证书</div> <div class="sortname">已修证书</div>
<div class="sortnub"> <div class="sortnub">
<span class="nub1">{{ certCnt }}</span> <span class="nub1">{{ certCnt?certCnt:0 }}</span>
</div> </div>
</div> </div>
-->
</div> </div>
<div class="secondrow"> <div class="secondrow">
<div class="rowleft">{{ name }}</div> <div class="rowleft">{{ name }}</div>

View File

@@ -116,10 +116,11 @@
</div> </div>
<!-- 导出成绩抽屉 --> <!-- 导出成绩抽屉 -->
<ExportAchievement <ExportAchievement
@closeDraw="closeDraw"
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal" v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
:type="2" :type="2"
:targetId="datasource.projectId" :targetId="datasource.projectId"
:taskId="datasource.projectTaskId" :taskId="datasource.courseId"
:chapterId="datasource.stageId" /> :chapterId="datasource.stageId" />
</a-drawer> </a-drawer>
</template> </template>
@@ -320,7 +321,7 @@
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',9:'已完成'}[status] || '未开始'), customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',null:'进行中',2:'已完成'}[status] || '未开始'),
}, },
], ],
loadingData: true loadingData: true
@@ -368,6 +369,7 @@
// 获取数据 // 获取数据
function getData() { function getData() {
state.loadingData = true;
api.QueryExternalExamManageDetail({ api.QueryExternalExamManageDetail({
chapterId: props.datasource.stageId, chapterId: props.datasource.stageId,
pageNo: state.currentPage, pageNo: state.currentPage,
@@ -410,6 +412,11 @@
window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.stageId}&type=${2}&targetId=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}`) window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.stageId}&type=${2}&targetId=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}`)
} }
const closeDraw = (e) => {
console.log('我关闭了导入成绩弹框吗', e)
getData();
}
return { return {
...toRefs(state), ...toRefs(state),
selectProjectName, selectProjectName,
@@ -422,7 +429,8 @@
searchTableData, searchTableData,
reseatTableData, reseatTableData,
changePaginationStu, changePaginationStu,
exportData exportData,
closeDraw
}; };
}, },
}; };

View File

@@ -347,7 +347,7 @@ export default {
<div class="racona"> <div class="racona">
<span> <span>
{text.record.workScore || text.record.workScore == 0 {text.record.workScore || text.record.workScore == 0
? text.record.workScore ? text.record.workScore < 0 ?"-":text.record.workScore
: "-"} : "-"}
</span> </span>
</div> </div>

View File

@@ -115,10 +115,11 @@
</div> </div>
<!-- 导出成绩抽屉 --> <!-- 导出成绩抽屉 -->
<ExportAchievement <ExportAchievement
@closeDraw="closeDraw"
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal" v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
:type="1" :type="1"
:targetId="datasource.routerId" :targetId="datasource.routerId"
:taskId="datasource.routerTaskId" :taskId="datasource.courseId"
:chapterId="datasource.chapterId" /> :chapterId="datasource.chapterId" />
</a-drawer> </a-drawer>
</template> </template>
@@ -324,7 +325,7 @@
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',9:'已完成'}[status] || '未开始'), customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',null:'进行中',2:'已完成'}[status] || '未开始'),
}, },
], ],
loadingData: true loadingData: true
@@ -368,9 +369,14 @@
const clearLine = () => { const clearLine = () => {
state.selectedRowKeys = []; state.selectedRowKeys = [];
}; };
const closeDraw = (e) => {
console.log('我关闭了导入成绩弹框吗', e)
getData();
}
// 获取数据 // 获取数据
function getData() { function getData() {
state.loadingData = true;
api.QueryExternalExamManageDetail({ api.QueryExternalExamManageDetail({
chapterId: props.datasource.chapterId, chapterId: props.datasource.chapterId,
pageNo: state.currentPage, pageNo: state.currentPage,
@@ -425,7 +431,8 @@
searchTableData, searchTableData,
reseatTableData, reseatTableData,
changePaginationStu, changePaginationStu,
exportData exportData,
closeDraw
}; };
}, },
}; };

View File

@@ -341,7 +341,7 @@ export default {
<div class="racona"> <div class="racona">
<span> <span>
{text.record.workScore || text.record.workScore == 0 {text.record.workScore || text.record.workScore == 0
? text.record.workScore ? text.record.workScore < 0 ?"-":text.record.workScore
: "-"} : "-"}
</span> </span>
</div> </div>

View File

@@ -545,7 +545,7 @@
"> ">
<div class="opa"> <div class="opa">
<div class="opacation"> <div class="opacation">
<span v-if="element.type !== 5" style=" <span style="
color: #4ea6ff; color: #4ea6ff;
margin-right: 25px; margin-right: 25px;
cursor: pointer; cursor: pointer;
@@ -558,12 +558,6 @@
"> ">
编辑 编辑
</span> </span>
<span v-else style="
color: #4ea6ff;
margin-right: 55px;
cursor: pointer;
">
</span>
<span style="color: #4ea6ff; cursor: pointer" @click="showDeleteModal(element.id)"> <span style="color: #4ea6ff; cursor: pointer" @click="showDeleteModal(element.id)">
删除 删除
</span> </span>

View File

@@ -61,8 +61,7 @@
<div class="btn"> <div class="btn">
<button <button
:class="it.done ? 'btnoo' : 'btno'" :class="it.done ? 'btnoo' : 'btno'"
style="z-index: 999" style="z-index: 999">
>
已完成 已完成
</button> </button>
<button :class="it.done ? 'btntt' : 'btnt'">未完成</button> <button :class="it.done ? 'btntt' : 'btnt'">未完成</button>

View File

@@ -507,7 +507,7 @@
"> ">
<div class="opa"> <div class="opa">
<div class="opacation"> <div class="opacation">
<span v-if="element.type!==5" style=" <span style="
color: #4ea6ff; color: #4ea6ff;
margin-right: 25px; margin-right: 25px;
cursor: pointer; cursor: pointer;
@@ -520,14 +520,6 @@
"> ">
编辑 编辑
</span> </span>
<span
v-else
style="
color: #4ea6ff;
margin-right: 55px;
cursor: pointer;
">
</span>
<span style="color: #4ea6ff; cursor: pointer" @click="showDelete(element.id)"> <span style="color: #4ea6ff; cursor: pointer" @click="showDelete(element.id)">
删除 删除
</span> </span>

View File

@@ -963,6 +963,7 @@
<div class="right"> <div class="right">
<a-select <a-select
v-model:value="valuestu4" v-model:value="valuestu4"
@change="xsSelectChange"
style="width: 80px" style="width: 80px"
:options="rankxueshi" :options="rankxueshi"
></a-select> ></a-select>
@@ -973,7 +974,7 @@
<a-table <a-table
:columns="xueshitablecolumns" :columns="xueshitablecolumns"
:data-source="xueshitabledata" :data-source="xueshitabledata"
:loading="tableDataTotal === -1 ? true : false" :loading="studytimeRankLoading"
expandRowByClick="true" expandRowByClick="true"
:scroll="{ y: 330 }" :scroll="{ y: 330 }"
@expand="expandTable" @expand="expandTable"
@@ -2325,10 +2326,10 @@ export default {
valuestu3: 0, valuestu3: 0,
//学时排行 //学时排行
rankxueshi: [ rankxueshi: [
{ value: "学员", label: "学员" }, { value: 0, label: "学员" },
{ value: "小组", label: "小组" }, { value: 1, label: "小组" },
], ],
valuestu4: "学员", valuestu4: 0,
visible: false, //时间管理 visible: false, //时间管理
onlineVisible: false, //在线管理 onlineVisible: false, //在线管理
FaceVisivle: false, //面授管理 FaceVisivle: false, //面授管理
@@ -2531,83 +2532,32 @@ export default {
}, },
], ],
//学时排行表 //学时排行表
xueshitabledata: [ studytimeRankLoading:true,
{ xueshitabledata: [],
rank: "1",
name: "哈哈",
jd: "8",
},
{
rank: "2",
name: "哈哈",
jd: "70",
},
{
rank: "3",
name: "哈哈",
jd: "70",
},
{
rank: "4",
name: "哈哈",
jd: "70",
},
{
rank: "5",
name: "哈哈",
jd: "70",
},
{
rank: "6",
name: "哈哈",
jd: "70",
},
{
rank: "7",
name: "哈哈",
jd: "70",
},
{
rank: "8",
name: "哈哈",
jd: "70",
},
{
rank: "9",
name: "哈哈",
jd: "70",
},
{
rank: "10",
name: "哈哈",
jd: "70",
},
],
xueshitablecolumns: [ xueshitablecolumns: [
{ {
title: "排名", title: "排名",
dataIndex: "rank", dataIndex: "index",
key: "rank", key: "index",
width: 50, width: 50,
align: "center", align: "center",
className: "h", className: "h",
customRender: (text) => { customRender: (text) => {
if (text.record.rank == "1") { if (text.record.index == "1") {
return ( return (
<img <img
style={{ width: 24, height: 24 }} style={{ width: 24, height: 24 }}
src={require("../../assets/images/taskpage/one.png")} src={require("../../assets/images/taskpage/one.png")}
/> />
); );
} else if (text.record.rank == "2") { } else if (text.record.index == "2") {
return ( return (
<img <img
style={{ width: 24, height: 24 }} style={{ width: 24, height: 24 }}
src={require("../../assets/images/taskpage/two.png")} src={require("../../assets/images/taskpage/two.png")}
/> />
); );
} else if (text.record.rank == "3") { } else if (text.record.index == "3") {
return ( return (
<img <img
style={{ width: 24, height: 24 }} style={{ width: 24, height: 24 }}
@@ -2615,7 +2565,7 @@ export default {
/> />
); );
} else { } else {
return <div>{text.record.rank}</div>; return <div>{text.record.index}</div>;
} }
}, },
}, },
@@ -2630,8 +2580,8 @@ export default {
{ {
title: "时长", title: "时长",
dataIndex: "jd", dataIndex: "timeStr",
key: "jd", key: "timeStr",
width: 50, width: 50,
align: "center", align: "center",
className: "h", className: "h",
@@ -2811,7 +2761,11 @@ export default {
const jdSelectChange1 = (e) => { const jdSelectChange1 = (e) => {
console.log(e); console.log(e);
completionRank(); completionRank();
}; }
const xsSelectChange = (e) => {
console.log(e)
studytimeRank();
}
//项目积分榜单 //项目积分榜单
const scoreRank = (period, type) => { const scoreRank = (period, type) => {
state.scoreRankLoading = true; state.scoreRankLoading = true;
@@ -2827,7 +2781,7 @@ export default {
type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜
}); });
let obj = { let obj = {
projectId: 290, // 项目id projectId: state.projectId, // 项目id
name: "", // 名字,没有则传空字符串 name: "", // 名字,没有则传空字符串
startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳 startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳
endTime: state.rankEndTime ? state.rankEndTime : 0, endTime: state.rankEndTime ? state.rankEndTime : 0,
@@ -2866,9 +2820,9 @@ export default {
const completionRank = () => { const completionRank = () => {
state.processRankLoading = true; state.processRankLoading = true;
let obj = { let obj = {
projectId: 290, // 项目id projectId: state.projectId, // 项目id
startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳 startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳
endTime: state.rankEndTime ? state.rankEndTime : 0, endTime: state.rankEndTime?state.rankEndTime:0,
stageId: state.valuestu2, // 阶段ID stageId: state.valuestu2, // 阶段ID
type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜
}; };
@@ -2893,6 +2847,34 @@ export default {
}); });
}; };
// 项目学时榜单
const studytimeRank = () => {
state.studytimeRankLoading = true;
let obj = {
projectId: state.projectId, // 项目id
startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳
endTime: state.rankEndTime?state.rankEndTime:0,
type: Number(state.valuestu4), // 查询类型 0 学员积分榜 1 小组积分榜
}
console.log('我是获取得项目学时排行榜--》', obj)
api.studytimeRank(obj).then(res=>{
console.log('项目学时榜单获取',res)
if(res.data.datas){
state.xueshitabledata = res.data.datas;
state.studytimeRankLoading = false;
}else{
state.xueshitabledata = [];
state.studytimeRankLoading = false;
}
}).catch(err=>{
console.log(err)
state.xueshitabledata = [];
state.studytimeRankLoading = false;
})
}
// 排行榜 - end // 排行榜 - end
const levelList = reactive({ const levelList = reactive({
@@ -3644,6 +3626,9 @@ export default {
scoreRank(); scoreRank();
// 获取项目进度排行榜 // 获取项目进度排行榜
completionRank(); completionRank();
// 获取学时排行榜
studytimeRank();
} else if (e == 3) { } else if (e == 3) {
state.tabFlag = true; state.tabFlag = true;
} else { } else {
@@ -3700,6 +3685,8 @@ export default {
scoreRank(); scoreRank();
// 获取项目进度排行榜 // 获取项目进度排行榜
completionRank(); completionRank();
// 获取学时排行榜
studytimeRank();
}; };
//重置 //重置
const rankReset = () => { const rankReset = () => {
@@ -3712,6 +3699,8 @@ export default {
scoreRank(); scoreRank();
// 获取项目进度排行榜 // 获取项目进度排行榜
completionRank(); completionRank();
// 获取学时排行榜
studytimeRank();
}; };
// end -----排行榜----------------排行榜----------------------排行榜-----------排行榜---------- // end -----排行榜----------------排行榜----------------------排行榜-----------排行榜----------
@@ -5028,6 +5017,10 @@ export default {
completionRank, completionRank,
jdSelectChange, jdSelectChange,
jdSelectChange1, jdSelectChange1,
studytimeRank,
xsSelectChange
}; };
}, },
}; };