Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
yuping
2023-01-29 00:07:06 +08:00
12 changed files with 677 additions and 378 deletions

View File

@@ -521,71 +521,71 @@
:stage="stage"
:columns="tableDataFunc()"
>
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
@click="showStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
查看
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
@click="showStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
查看
</div>
<div
@click="setLevels(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div>
<div
@click="setLevels(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div>
</template>
</TableStudent>
<TableStudent
</template>
</TableStudent>
<TableStudent
v-else
:type="2"
:id="routerId"
:stage="stage"
:columns="tableDataFunc()"
>
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
@click="showStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
查看
<template #extension="{ data: { record } }">
<div style="display: flex">
<div
@click="showStudent(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
查看
</div>
<div
@click="setLevels(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div>
<div
@click="setLevels(record)"
style="
color: #4ea6ff;
font-size: 14px;
text-align: center;
margin-left: 20px;
cursor: pointer;
"
>
调整
</div>
</div>
</template>
</TableStudent>
</template>
</TableStudent>
</a-tab-pane>
<!-- 1211注释 待开放 -->
<a-tab-pane key="4" tab="设置">
@@ -851,7 +851,11 @@
>
<a
href="javascript:void(0);"
@click="downloadFile(item.response ? item.response.data : '')"
@click="
downloadFile(
item.response ? item.response.data : ''
)
"
style="margin-left: 5px"
>下载</a
>
@@ -900,8 +904,20 @@
></a-select>
</div>
<div class="btn">
<button class="sameb btn1" style="cursor:pointer;" @click="closeChangeModal">取消</button>
<button class="sameb btn2" style="cursor:pointer;" @click="changeLevel">确定</button>
<button
class="sameb btn1"
style="cursor: pointer"
@click="closeChangeModal"
>
取消
</button>
<button
class="sameb btn2"
style="cursor: pointer"
@click="changeLevel"
>
确定
</button>
</div>
</div>
</div>
@@ -1466,7 +1482,7 @@ export default {
closeDeleteAll: false,
curLevel: undefined,
curLevelName: "",
curStuID:"",
curStuID: "",
taskSyllabusActive: 0,
//在线管理等页面传递参数
showTimeText: "",
@@ -1546,9 +1562,9 @@ export default {
facestudent: "",
locationHref:
location.href.indexOf("http://") !== -1
? "http://111.231.196.214:12016/"
? "http://43.143.139.204:12016/"
: location.href.slice(0, location.href.indexOf("/m")) + "/upload/",
isreload: true
isreload: true,
});
const levelList = reactive({
@@ -2236,7 +2252,7 @@ export default {
})
.catch((err) => {
console.log(err);
// message.error("获取路径列表失败" + err);
// message.error("获取路径列表失败" + err);
});
};
@@ -2501,9 +2517,9 @@ export default {
// 共享文档文件下载
const downloadFile = (url) => {
console.log(url)
if(url){
window.open(url)
console.log(url);
if (url) {
window.open(url);
}
// if(url){
// const filename = '操作指南'
@@ -2520,55 +2536,57 @@ export default {
// }
// x.send()
// }
}
};
// 点击学员管理-查看学员操作
function showStudent(record) {
console.log(record)
console.log(record);
state.CheckStuvisible = true;
state.studentId = record.studentId;
}
// 调整关卡
function setLevels(record) {
console.log(record)
console.log(record);
state.curLevelName = record.currentStageName;
state.curStuID = record.id;
state.visiblene = true;
}
}
// 选择要调整的关卡
function selectProjectName4(e){
console.log(e)
function selectProjectName4(e) {
console.log(e);
state.curLevel = e;
}
// 点击确定 调整关卡
function changeLevel() {
state.isreload = false;
if(!state.curLevel){
message.error("请选择关卡")
return
if (!state.curLevel) {
message.error("请选择关卡");
return;
}
moveStudent({targetId: state.curLevel, ids: [state.curStuID]}).then(res => {
console.log(res)
state.visiblene = false;
message.destroy();
state.isreload = true;
message.success("调整关卡成功")
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
getStudent();
}).catch(err=>{
console.log(err)
state.visiblene = false;
message.error("调整关卡失败");
state.isreload = true;
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
})
moveStudent({ targetId: state.curLevel, ids: [state.curStuID] })
.then((res) => {
console.log(res);
state.visiblene = false;
message.destroy();
state.isreload = true;
message.success("调整关卡成功");
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
getStudent();
})
.catch((err) => {
console.log(err);
state.visiblene = false;
message.error("调整关卡失败");
state.isreload = true;
state.curLevel = undefined;
state.curStuID = "";
state.curLevelName = "";
});
}
return {
@@ -2640,7 +2658,7 @@ export default {
showStudent,
setLevels,
selectProjectName4,
changeLevel
changeLevel,
};
},
};