mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
feat:合并
This commit is contained in:
@@ -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 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);
|
||||
//项目基础信息-----------------------------------
|
||||
|
||||
@@ -23,3 +23,5 @@ export const queryExaminationAloneExtendList = (obj) => http.post('/examination/
|
||||
export const examinationTaskSave = (obj) => http.post('/examination/examinationTaskSave', obj);
|
||||
//编辑考试信息
|
||||
export const updateExamination = (obj) => http.post('/examination/updateExamination', obj);
|
||||
//编辑外部考试信息
|
||||
export const updateExternalExam = (obj) => http.post('/external/exam/updateExternalExam', obj);
|
||||
|
||||
@@ -17,6 +17,27 @@
|
||||
</div>
|
||||
<!-- 2022-11-30注释 后面放开 修改div的padding-topL:32 -->
|
||||
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
|
||||
|
||||
<div v-if="edit">
|
||||
<button
|
||||
v-if="isOuter == 1"
|
||||
style="width: 100px; cursor: pointer;"
|
||||
@click="changeOuter(1)"
|
||||
:class="[isOuter == 1 ? 'outer' : 'notOuter']"
|
||||
>
|
||||
系统考试
|
||||
</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)"
|
||||
@@ -34,6 +55,8 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="isOuter==1" class="contentMain">
|
||||
<div class="main_left">
|
||||
<div class="main_item">
|
||||
@@ -48,6 +71,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
:disabled="edit"
|
||||
v-model:value="test.examinationName"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入考试名称"
|
||||
@@ -67,11 +91,11 @@
|
||||
<span style="margin-right: 3px">选择试卷:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn" @click="selectTest">
|
||||
<button :disabled="edit" class="xkbtn" @click="selectTest">
|
||||
{{ chooseCourse ? "重选" : "选择" }}试卷
|
||||
</button>
|
||||
<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">{{
|
||||
paperName
|
||||
}}</span>
|
||||
@@ -122,6 +146,7 @@
|
||||
</div>
|
||||
<div class="select">
|
||||
<a-input-number
|
||||
:disabled="edit"
|
||||
:min="0"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
@@ -143,6 +168,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
:disabled="edit"
|
||||
v-model:value="test.passLine"
|
||||
type="number"
|
||||
style="width: 400px; height: 40px; border-radius: 8px"
|
||||
@@ -157,6 +183,7 @@
|
||||
</div>
|
||||
<div class="textarea">
|
||||
<a-textarea
|
||||
:disabled="edit"
|
||||
v-model:value="test.examinationExplain"
|
||||
placeholder="请输入考试说明"
|
||||
allow-clear
|
||||
@@ -175,6 +202,7 @@
|
||||
<div class="timerbox">
|
||||
<span>允许重复考试:</span>
|
||||
<a-input-number
|
||||
:disabled="edit"
|
||||
:min="-1"
|
||||
:max="300"
|
||||
:precision="0"
|
||||
@@ -200,6 +228,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
:disabled="edit"
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.showAnswers"
|
||||
>
|
||||
@@ -218,6 +247,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
:disabled="edit"
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.showAnalysis"
|
||||
>
|
||||
@@ -236,6 +266,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
:disabled="edit"
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.scoringModel"
|
||||
>
|
||||
@@ -256,6 +287,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-radio-group
|
||||
:disabled="edit"
|
||||
style="margin-right: 12px"
|
||||
v-model:value="test.questionArrangement"
|
||||
>
|
||||
@@ -366,6 +398,8 @@ import {message} from "ant-design-vue";
|
||||
import {
|
||||
createExamination,
|
||||
queryExaminationDetailById,
|
||||
updateExamination,
|
||||
updateExternalExam
|
||||
} from "@/api/indexExam";
|
||||
// updateExamination,
|
||||
import STest from "./SelectTest.vue";
|
||||
@@ -496,6 +530,12 @@ export default {
|
||||
scoringModel: 2,
|
||||
questionArrangement: 4,
|
||||
};
|
||||
|
||||
state.test1 = {
|
||||
externalName: '',
|
||||
source: '',
|
||||
externalExplain: null
|
||||
}
|
||||
};
|
||||
|
||||
const closeDrawer = () => {
|
||||
@@ -522,7 +562,7 @@ export default {
|
||||
console.log("props", props);
|
||||
if (props.addtestVisible && props.EditTestId && props.EditTestId >0) {
|
||||
// 该页面显示同时 edit为true 时,发送查询请求,
|
||||
// queryTest();
|
||||
queryTest();
|
||||
}
|
||||
if (bool) {
|
||||
state.test.showAnswers = 1;
|
||||
@@ -541,6 +581,19 @@ export default {
|
||||
const queryTest = () => {
|
||||
queryExaminationDetailById({examinationId: props.EditTestId})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
// 判断获取的考试
|
||||
if(res.data.data.examType==2){
|
||||
state.isOuter = 2;
|
||||
// 外部考试
|
||||
state.test1 = {
|
||||
externalName: res.data.data.examinationName,
|
||||
source: res.data.data.source,
|
||||
externalExplain: res.data.data.examinationExplain
|
||||
}
|
||||
}else{
|
||||
// 系统考试
|
||||
state.isOuter = 1;
|
||||
state.test = res.data.data;
|
||||
state.test.showAnswers = Number(state.test.showAnswers);
|
||||
state.test.showAnalysis = Number(state.test.showAnalysis);
|
||||
@@ -557,6 +610,7 @@ export default {
|
||||
state.paperId = state.test.examinationTestId;
|
||||
|
||||
console.log("querytest", state.test);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
//message.error(`查询失败`);
|
||||
@@ -630,18 +684,18 @@ export default {
|
||||
|
||||
|
||||
|
||||
// if (props.EditTestId > 0) {
|
||||
// // 编辑任务
|
||||
// updateExamination(state.test)
|
||||
// .then(async (res) => {
|
||||
// await updateTask(res);
|
||||
// // closeDrawer();
|
||||
// })
|
||||
// .catch(() => {
|
||||
// message.destroy();
|
||||
// message.error(`编辑失败`);
|
||||
// });
|
||||
// } else {
|
||||
if (props.EditTestId > 0) {
|
||||
// 编辑任务
|
||||
updateExamination(state.test)
|
||||
.then(async (res) => {
|
||||
await updateTask(res);
|
||||
// closeDrawer();
|
||||
})
|
||||
.catch(() => {
|
||||
message.destroy();
|
||||
message.error(`编辑失败`);
|
||||
});
|
||||
} else {
|
||||
// 创建任务
|
||||
createExamination(state.test)
|
||||
.then(async (res) => {
|
||||
@@ -652,7 +706,7 @@ export default {
|
||||
message.destroy();
|
||||
message.error(`创建失败`);
|
||||
});
|
||||
// }
|
||||
}
|
||||
}else{
|
||||
// 创建外部考试
|
||||
console.log('我是点了外部考试')
|
||||
@@ -687,15 +741,35 @@ export default {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (props.EditTestId > 0) {
|
||||
console.log('我要开始编辑外部考试任务了 啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊')
|
||||
let obj = {
|
||||
examinationId:props.EditTestId,
|
||||
examinationName:state.test1.externalName,
|
||||
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)
|
||||
console.log('新建外部考试返回的参数',res)
|
||||
// 添加更新到任务
|
||||
await updateTask1(res);
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
// 系统考试
|
||||
const updateTask = (res) => {
|
||||
@@ -711,6 +785,7 @@ export default {
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
let editObj1 = {
|
||||
examType: 1,
|
||||
chapterId: props.isactive,
|
||||
duration: res.data.data.examinationDuration,
|
||||
courseId: res.data.data.examinationId,
|
||||
@@ -732,6 +807,7 @@ export default {
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
let editObj = {
|
||||
examType: 1,
|
||||
courseId: res.data.data.examinationId,
|
||||
duration: res.data.data.examinationDuration,
|
||||
name: res.data.data.examinationName,
|
||||
@@ -753,6 +829,7 @@ export default {
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
addTempTask({
|
||||
examType: 1,
|
||||
courseId: res.data.data.examinationId,
|
||||
duration: res.data.data.examinationDuration,
|
||||
name: res.data.data.examinationName,
|
||||
@@ -775,9 +852,9 @@ export default {
|
||||
};
|
||||
// 外部考试
|
||||
const updateTask1 = (res) => {
|
||||
state.EditTestId = res.data.data.externalId;
|
||||
state.EditTestId = res.data.data.examinationId;
|
||||
if (props.faceLevel) {
|
||||
state.EditTestId = res.data.data.externalId;
|
||||
state.EditTestId = res.data.data.examinationId;
|
||||
state.paperName = "";
|
||||
closeDrawer();
|
||||
} else {
|
||||
@@ -787,9 +864,10 @@ export default {
|
||||
return message.warning("请先选中关卡");
|
||||
}
|
||||
let editObj1 = {
|
||||
examType: 2,
|
||||
chapterId: props.isactive,
|
||||
courseId: res.data.data.externalId,
|
||||
name: res.data.data.externalName,
|
||||
courseId: res.data.data.examinationId,
|
||||
name: res.data.data.examinationName,
|
||||
routerId: props.routerId,
|
||||
routerTaskId: props.routerTaskId || 0,
|
||||
type: 5,
|
||||
@@ -807,8 +885,9 @@ export default {
|
||||
});
|
||||
} else if (props.isLevel == 2) {
|
||||
let editObj = {
|
||||
courseId: res.data.data.externalId,
|
||||
name: res.data.data.externalName,
|
||||
examType: 2,
|
||||
courseId: res.data.data.examinationId,
|
||||
name: res.data.data.examinationName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId || 0,
|
||||
@@ -827,8 +906,9 @@ export default {
|
||||
});
|
||||
} else if (props.isLevel == 3) {
|
||||
addTempTask({
|
||||
courseId: res.data.data.externalId,
|
||||
name: res.data.data.externalName,
|
||||
examType: 2,
|
||||
courseId: res.data.data.examinationId,
|
||||
name: res.data.data.examinationName,
|
||||
projectTemplateId: props.projectTemplateId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId || 0,
|
||||
|
||||
@@ -47,20 +47,19 @@
|
||||
<span class="total">/{{pro.totalReqCnt}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <a-divider
|
||||
<a-divider
|
||||
type="vertical"
|
||||
style="
|
||||
height: 49px;
|
||||
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="sortname">已修证书</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{pro.certCnt}}</span>
|
||||
<span class="nub1">{{pro.certCnt?pro.certCnt:0}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="secondrow">
|
||||
<div class="rowleft">{{ pro.name }}</div>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
:showUploadList="false"
|
||||
:data="{
|
||||
type: type,
|
||||
targetId: Number(id),
|
||||
targetId: Number(targetId),
|
||||
chapterId:chapterId,
|
||||
taskId:taskId
|
||||
}"
|
||||
@@ -235,7 +235,7 @@
|
||||
const state = reactive({
|
||||
fileType: ["xls", "xlsx"],
|
||||
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,
|
||||
uploadErr: false, //上传失败
|
||||
addLoading: false,
|
||||
@@ -250,6 +250,7 @@
|
||||
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("closeDraw",true);
|
||||
ctx.emit("update:eScorevisibleExternalExternal", false);
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
@@ -286,6 +287,13 @@
|
||||
if (status === "done") {
|
||||
state.fileName = info.file.name;
|
||||
let i = 0;
|
||||
let timeouts = setTimeout(() => {
|
||||
clearInterval(timer)
|
||||
state.addLoading = false;
|
||||
message.destroy();
|
||||
message.error(`文件导入超时`);
|
||||
}, 30000);
|
||||
|
||||
let timer = setInterval(() => {
|
||||
let uid = info.file.response.data;
|
||||
api
|
||||
@@ -306,25 +314,18 @@
|
||||
state.downloadErrUrl = res.data.data.url;
|
||||
console.log("props.getStudent", props.getStudent);
|
||||
clearInterval(timer);
|
||||
clearTimeout(timeouts);
|
||||
}
|
||||
}else{
|
||||
state.addLoading = false;
|
||||
message.destroy();
|
||||
message.error(`文件导入超时`);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
state.addLoading = false;
|
||||
clearInterval(timer);
|
||||
clearTimeout(timeouts);
|
||||
console.log("查询导入状态失败", err);
|
||||
});
|
||||
}, 500);
|
||||
setTimeout(() => {
|
||||
clearInterval(timer)
|
||||
state.addLoading = false;
|
||||
message.destroy();
|
||||
message.error(`文件导入超时`);
|
||||
}, 30000);
|
||||
|
||||
} else if (status === "error") {
|
||||
state.uploadErr = true;
|
||||
message.error(`${info.file.name}上传失败`);
|
||||
|
||||
@@ -48,22 +48,21 @@
|
||||
<span class="total">/{{ totalReqCnt }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
|
||||
<a-divider
|
||||
type="vertical"
|
||||
style="
|
||||
height: 49px;
|
||||
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="sortname">已修证书</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{ certCnt }}</span>
|
||||
<span class="nub1">{{ certCnt?certCnt:0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
<div class="secondrow">
|
||||
<div class="rowleft">{{ name }}</div>
|
||||
|
||||
@@ -116,10 +116,11 @@
|
||||
</div>
|
||||
<!-- 导出成绩抽屉 -->
|
||||
<ExportAchievement
|
||||
@closeDraw="closeDraw"
|
||||
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
|
||||
:type="2"
|
||||
:targetId="datasource.projectId"
|
||||
:taskId="datasource.projectTaskId"
|
||||
:taskId="datasource.courseId"
|
||||
:chapterId="datasource.stageId" />
|
||||
</a-drawer>
|
||||
</template>
|
||||
@@ -320,7 +321,7 @@
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',9:'已完成'}[status] || '未开始'),
|
||||
customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',null:'进行中',2:'已完成'}[status] || '未开始'),
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
@@ -368,6 +369,7 @@
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
state.loadingData = true;
|
||||
api.QueryExternalExamManageDetail({
|
||||
chapterId: props.datasource.stageId,
|
||||
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}`)
|
||||
}
|
||||
|
||||
const closeDraw = (e) => {
|
||||
console.log('我关闭了导入成绩弹框吗', e)
|
||||
getData();
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -422,7 +429,8 @@
|
||||
searchTableData,
|
||||
reseatTableData,
|
||||
changePaginationStu,
|
||||
exportData
|
||||
exportData,
|
||||
closeDraw
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -347,7 +347,7 @@ export default {
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.workScore || text.record.workScore == 0
|
||||
? text.record.workScore
|
||||
? text.record.workScore < 0 ?"-":text.record.workScore
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -115,10 +115,11 @@
|
||||
</div>
|
||||
<!-- 导出成绩抽屉 -->
|
||||
<ExportAchievement
|
||||
@closeDraw="closeDraw"
|
||||
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
|
||||
:type="1"
|
||||
:targetId="datasource.routerId"
|
||||
:taskId="datasource.routerTaskId"
|
||||
:taskId="datasource.courseId"
|
||||
:chapterId="datasource.chapterId" />
|
||||
</a-drawer>
|
||||
</template>
|
||||
@@ -324,7 +325,7 @@
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',9:'已完成'}[status] || '未开始'),
|
||||
customRender: ({record:{status}}) => ({0:'未开始',1:'进行中',null:'进行中',2:'已完成'}[status] || '未开始'),
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
@@ -368,9 +369,14 @@
|
||||
const clearLine = () => {
|
||||
state.selectedRowKeys = [];
|
||||
};
|
||||
const closeDraw = (e) => {
|
||||
console.log('我关闭了导入成绩弹框吗', e)
|
||||
getData();
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
state.loadingData = true;
|
||||
api.QueryExternalExamManageDetail({
|
||||
chapterId: props.datasource.chapterId,
|
||||
pageNo: state.currentPage,
|
||||
@@ -425,7 +431,8 @@
|
||||
searchTableData,
|
||||
reseatTableData,
|
||||
changePaginationStu,
|
||||
exportData
|
||||
exportData,
|
||||
closeDraw
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -341,7 +341,7 @@ export default {
|
||||
<div class="racona">
|
||||
<span>
|
||||
{text.record.workScore || text.record.workScore == 0
|
||||
? text.record.workScore
|
||||
? text.record.workScore < 0 ?"-":text.record.workScore
|
||||
: "-"}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -545,7 +545,7 @@
|
||||
">
|
||||
<div class="opa">
|
||||
<div class="opacation">
|
||||
<span v-if="element.type !== 5" style="
|
||||
<span style="
|
||||
color: #4ea6ff;
|
||||
margin-right: 25px;
|
||||
cursor: pointer;
|
||||
@@ -558,12 +558,6 @@
|
||||
">
|
||||
编辑
|
||||
</span>
|
||||
<span v-else style="
|
||||
color: #4ea6ff;
|
||||
margin-right: 55px;
|
||||
cursor: pointer;
|
||||
">
|
||||
</span>
|
||||
<span style="color: #4ea6ff; cursor: pointer" @click="showDeleteModal(element.id)">
|
||||
删除
|
||||
</span>
|
||||
|
||||
@@ -61,8 +61,7 @@
|
||||
<div class="btn">
|
||||
<button
|
||||
:class="it.done ? 'btnoo' : 'btno'"
|
||||
style="z-index: 999"
|
||||
>
|
||||
style="z-index: 999">
|
||||
已完成
|
||||
</button>
|
||||
<button :class="it.done ? 'btntt' : 'btnt'">未完成</button>
|
||||
|
||||
@@ -507,7 +507,7 @@
|
||||
">
|
||||
<div class="opa">
|
||||
<div class="opacation">
|
||||
<span v-if="element.type!==5" style="
|
||||
<span style="
|
||||
color: #4ea6ff;
|
||||
margin-right: 25px;
|
||||
cursor: pointer;
|
||||
@@ -520,14 +520,6 @@
|
||||
">
|
||||
编辑
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
style="
|
||||
color: #4ea6ff;
|
||||
margin-right: 55px;
|
||||
cursor: pointer;
|
||||
">
|
||||
</span>
|
||||
<span style="color: #4ea6ff; cursor: pointer" @click="showDelete(element.id)">
|
||||
删除
|
||||
</span>
|
||||
|
||||
@@ -963,6 +963,7 @@
|
||||
<div class="right">
|
||||
<a-select
|
||||
v-model:value="valuestu4"
|
||||
@change="xsSelectChange"
|
||||
style="width: 80px"
|
||||
:options="rankxueshi"
|
||||
></a-select>
|
||||
@@ -973,7 +974,7 @@
|
||||
<a-table
|
||||
:columns="xueshitablecolumns"
|
||||
:data-source="xueshitabledata"
|
||||
:loading="tableDataTotal === -1 ? true : false"
|
||||
:loading="studytimeRankLoading"
|
||||
expandRowByClick="true"
|
||||
:scroll="{ y: 330 }"
|
||||
@expand="expandTable"
|
||||
@@ -2325,10 +2326,10 @@ export default {
|
||||
valuestu3: 0,
|
||||
//学时排行
|
||||
rankxueshi: [
|
||||
{ value: "学员", label: "学员" },
|
||||
{ value: "小组", label: "小组" },
|
||||
{ value: 0, label: "学员" },
|
||||
{ value: 1, label: "小组" },
|
||||
],
|
||||
valuestu4: "学员",
|
||||
valuestu4: 0,
|
||||
visible: false, //时间管理
|
||||
onlineVisible: false, //在线管理
|
||||
FaceVisivle: false, //面授管理
|
||||
@@ -2531,83 +2532,32 @@ export default {
|
||||
},
|
||||
],
|
||||
//学时排行表
|
||||
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",
|
||||
},
|
||||
],
|
||||
studytimeRankLoading:true,
|
||||
xueshitabledata: [],
|
||||
xueshitablecolumns: [
|
||||
{
|
||||
title: "排名",
|
||||
dataIndex: "rank",
|
||||
key: "rank",
|
||||
dataIndex: "index",
|
||||
key: "index",
|
||||
width: 50,
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
if (text.record.rank == "1") {
|
||||
if (text.record.index == "1") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
src={require("../../assets/images/taskpage/one.png")}
|
||||
/>
|
||||
);
|
||||
} else if (text.record.rank == "2") {
|
||||
} else if (text.record.index == "2") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
src={require("../../assets/images/taskpage/two.png")}
|
||||
/>
|
||||
);
|
||||
} else if (text.record.rank == "3") {
|
||||
} else if (text.record.index == "3") {
|
||||
return (
|
||||
<img
|
||||
style={{ width: 24, height: 24 }}
|
||||
@@ -2615,7 +2565,7 @@ export default {
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return <div>{text.record.rank}</div>;
|
||||
return <div>{text.record.index}</div>;
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -2630,8 +2580,8 @@ export default {
|
||||
|
||||
{
|
||||
title: "时长",
|
||||
dataIndex: "jd",
|
||||
key: "jd",
|
||||
dataIndex: "timeStr",
|
||||
key: "timeStr",
|
||||
width: 50,
|
||||
align: "center",
|
||||
className: "h",
|
||||
@@ -2811,7 +2761,11 @@ export default {
|
||||
const jdSelectChange1 = (e) => {
|
||||
console.log(e);
|
||||
completionRank();
|
||||
};
|
||||
}
|
||||
const xsSelectChange = (e) => {
|
||||
console.log(e)
|
||||
studytimeRank();
|
||||
}
|
||||
//项目积分榜单
|
||||
const scoreRank = (period, type) => {
|
||||
state.scoreRankLoading = true;
|
||||
@@ -2827,7 +2781,7 @@ export default {
|
||||
type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜
|
||||
});
|
||||
let obj = {
|
||||
projectId: 290, // 项目id
|
||||
projectId: state.projectId, // 项目id
|
||||
name: "", // 名字,没有则传空字符串
|
||||
startTime: state.rankStartTime ? state.rankStartTime : 0, // 数据查询的起始时间 10位时间戳
|
||||
endTime: state.rankEndTime ? state.rankEndTime : 0,
|
||||
@@ -2866,7 +2820,7 @@ export default {
|
||||
const completionRank = () => {
|
||||
state.processRankLoading = true;
|
||||
let obj = {
|
||||
projectId: 290, // 项目id
|
||||
projectId: state.projectId, // 项目id
|
||||
startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳
|
||||
endTime: state.rankEndTime?state.rankEndTime:0,
|
||||
stageId: state.valuestu2, // 阶段ID
|
||||
@@ -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
|
||||
|
||||
const levelList = reactive({
|
||||
@@ -3644,6 +3626,9 @@ export default {
|
||||
scoreRank();
|
||||
// 获取项目进度排行榜
|
||||
completionRank();
|
||||
// 获取学时排行榜
|
||||
studytimeRank();
|
||||
|
||||
} else if (e == 3) {
|
||||
state.tabFlag = true;
|
||||
} else {
|
||||
@@ -3700,6 +3685,8 @@ export default {
|
||||
scoreRank();
|
||||
// 获取项目进度排行榜
|
||||
completionRank();
|
||||
// 获取学时排行榜
|
||||
studytimeRank();
|
||||
};
|
||||
//重置
|
||||
const rankReset = () => {
|
||||
@@ -3712,6 +3699,8 @@ export default {
|
||||
scoreRank();
|
||||
// 获取项目进度排行榜
|
||||
completionRank();
|
||||
// 获取学时排行榜
|
||||
studytimeRank();
|
||||
};
|
||||
|
||||
// end -----排行榜----------------排行榜----------------------排行榜-----------排行榜----------
|
||||
@@ -5028,6 +5017,10 @@ export default {
|
||||
completionRank,
|
||||
jdSelectChange,
|
||||
jdSelectChange1,
|
||||
|
||||
studytimeRank,
|
||||
xsSelectChange
|
||||
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user