mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-07 01:46:43 +08:00
feat:合并
This commit is contained in:
@@ -15,6 +15,8 @@ export const RouterEditTask = (obj) => http.post('/admin/router/editTask',obj)
|
||||
export const RouterDeleteTask = (obj) => http.post('/admin/router/deleteTask',obj);
|
||||
// 删除项目任务
|
||||
export const ProjectDeleteTask = (obj) => http.delete('/admin/project/deleteTask',obj);
|
||||
// 发布路径下的全部关卡和任务
|
||||
export const releaseRouter = (obj)=> http.post('/admin/router/release',obj);
|
||||
// 判断当前在线课是否已经添加到该路径图下
|
||||
export const IsExistence = (obj) => http.post('/admin/router/queryTaskDoesItExist',obj);
|
||||
// 判断当前在线课是否已经添加到该项目下
|
||||
|
||||
@@ -18,10 +18,10 @@ export const editProj = (obj) => http.post('/admin/project/edit', obj)
|
||||
export const editTask = (obj) => http.post('/admin/router/editTask', obj)
|
||||
|
||||
//项目里获取项目积分规则
|
||||
export const scoreRule = (obj) => http.get('/admin/project/scoreRule', { params: obj })
|
||||
export const scoreRule = (obj) => http.get('/points/project/rule', { params: obj })
|
||||
|
||||
//项目里设置项目积分规则
|
||||
export const setScoreRule = (obj) => http.post('/admin/project/setScoreRule', obj)
|
||||
export const setScoreRule = (obj) => http.post('/points/project/rule/edit', obj)
|
||||
|
||||
//面授课开课列表
|
||||
export const planList = (obj) => http.post('/admin/offcourse/planList', obj)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
@openChange="onOpenChange"
|
||||
@select="selectItem"
|
||||
>
|
||||
<a-sub-menu key="sub10" @titleClick="titleClick">
|
||||
<a-sub-menu v-if="checkMenu('coursereviewedn,coursereviewed,projectreviewedn,projectreviewed')" key="sub10" @titleClick="titleClick">
|
||||
<template #icon>
|
||||
<div class="imgBox">
|
||||
<img
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #title>审核管理</template>
|
||||
<a-menu-item key="sub10-1">
|
||||
<a-menu-item key="sub10-1" v-if="checkMenu('coursereviewedn')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub10-1' ? true : false,
|
||||
@@ -46,7 +46,7 @@
|
||||
></span>
|
||||
<router-link to="/coursereviewedn">待审核课程</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub10-2">
|
||||
<a-menu-item key="sub10-2" v-if="checkMenu('coursereviewed')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub10-2' ? true : false,
|
||||
@@ -55,7 +55,7 @@
|
||||
></span>
|
||||
<router-link to="/coursereviewed">已审核课程</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub10-3">
|
||||
<a-menu-item key="sub10-3" v-if="checkMenu('projectreviewedn')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub10-3' ? true : false,
|
||||
@@ -64,7 +64,7 @@
|
||||
></span>
|
||||
<router-link to="/projectreviewedn">待审核项目</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub10-4">
|
||||
<a-menu-item key="sub10-4" v-if="checkMenu('projectreviewed')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub10-4' ? true : false,
|
||||
@@ -75,7 +75,7 @@
|
||||
</a-menu-item>
|
||||
</a-sub-menu>
|
||||
|
||||
<a-menu-item key="sub1" @titleClick="titleClick">
|
||||
<a-menu-item key="sub1" @titleClick="titleClick" v-if="checkMenu('learningpath')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 20px; height: 18px"
|
||||
@@ -85,7 +85,7 @@
|
||||
<router-link to="/learningpath">学习路径图</router-link>
|
||||
</a-menu-item>
|
||||
|
||||
<a-sub-menu key="sub2" @titleClick="titleClick">
|
||||
<a-sub-menu key="sub2" @titleClick="titleClick" v-if="checkMenu('projectmanage,templatelibrary')">
|
||||
<template #icon>
|
||||
<div class="imgBox">
|
||||
<img
|
||||
@@ -95,7 +95,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #title>项目中心</template>
|
||||
<a-menu-item key="sub2-1">
|
||||
<a-menu-item key="sub2-1" v-if="checkMenu('projectmanage')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub2-1' ? true : false,
|
||||
@@ -104,7 +104,7 @@
|
||||
></span>
|
||||
<router-link to="/projectmanage">项目</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub2-2">
|
||||
<a-menu-item key="sub2-2" v-if="checkMenu('templatelibrary')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub2-2' ? true : false,
|
||||
@@ -115,7 +115,7 @@
|
||||
</a-menu-item>
|
||||
</a-sub-menu>
|
||||
|
||||
<a-sub-menu key="sub3">
|
||||
<a-sub-menu key="sub3" v-if="checkMenu('coursewaremanage,onlinemanage,coursemanage')">
|
||||
<template #icon>
|
||||
<div class="imgBox">
|
||||
<img
|
||||
@@ -125,7 +125,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #title>课程库</template>
|
||||
<a-menu-item key="sub3-1">
|
||||
<a-menu-item key="sub3-1" v-if="checkMenu('coursewaremanage')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub3-1' ? true : false,
|
||||
@@ -134,7 +134,7 @@
|
||||
></span>
|
||||
<router-link to="/coursewaremanage">面授管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub3-2">
|
||||
<a-menu-item key="sub3-2" v-if="checkMenu('onlinemanage')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub3-2' ? true : false,
|
||||
@@ -143,7 +143,7 @@
|
||||
></span>
|
||||
<router-link to="/onlinemanage">在线管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub3-3">
|
||||
<a-menu-item key="sub3-3" v-if="checkMenu('coursemanage')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub3-3' ? true : false,
|
||||
@@ -163,7 +163,7 @@
|
||||
</div>
|
||||
<span>考试中心</span>
|
||||
</a-menu-item> -->
|
||||
<a-menu-item key="sub5" @titleClick="titleClick">
|
||||
<a-menu-item key="sub5" @titleClick="titleClick" v-if="checkMenu('researchmanage')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 16px; height: 16px"
|
||||
@@ -213,7 +213,7 @@
|
||||
<!-- <router-link to="/systemmanage">系统管理</router-link> -->
|
||||
<!-- </a-menu-item> -->
|
||||
|
||||
<a-sub-menu key="sub11" @titleClick="titleClick">
|
||||
<a-sub-menu key="sub11" @titleClick="titleClick" v-if="checkMenu('questionmanage,papermanage,examinationcenter')">
|
||||
<template #icon>
|
||||
<div class="imgBox">
|
||||
<img
|
||||
@@ -223,7 +223,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #title>考试</template>
|
||||
<a-menu-item key="sub11-1">
|
||||
<a-menu-item key="sub11-1" v-if="checkMenu('questionmanage')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub11-1' ? true : false,
|
||||
@@ -232,7 +232,7 @@
|
||||
></span>
|
||||
<router-link to="/questionmanage">试题管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub11-2">
|
||||
<a-menu-item key="sub11-2" v-if="checkMenu('papermanage')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub11-2' ? true : false,
|
||||
@@ -241,7 +241,7 @@
|
||||
></span>
|
||||
<router-link to="/papermanage">试卷管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub11-3">
|
||||
<a-menu-item key="sub11-3" v-if="checkMenu('examinationcenter')">
|
||||
<span
|
||||
:class="{
|
||||
circleActive: selectedKeys[0] === 'sub11-3' ? true : false,
|
||||
@@ -251,7 +251,7 @@
|
||||
<router-link to="/examinationcenter">考试管理</router-link>
|
||||
</a-menu-item>
|
||||
</a-sub-menu>
|
||||
<a-menu-item key="sub12" @titleClick="titleClick">
|
||||
<a-menu-item key="sub12" @titleClick="titleClick" v-if="checkMenu('casemanage')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 20px; height: 20px"
|
||||
@@ -260,7 +260,7 @@
|
||||
</div>
|
||||
<router-link to="/casemanage">案例管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub13" @titleClick="titleClick">
|
||||
<a-menu-item key="sub13" @titleClick="titleClick" v-if="checkMenu('articlemanage')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 20px; height: 20px"
|
||||
@@ -269,7 +269,7 @@
|
||||
</div>
|
||||
<router-link to="/articlemanage">文章管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub14" @titleClick="titleClick">
|
||||
<a-menu-item key="sub14" @titleClick="titleClick" v-if="checkMenu('qamanage')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 20px; height: 20px"
|
||||
@@ -278,7 +278,7 @@
|
||||
</div>
|
||||
<router-link to="/qamanage">问答管理</router-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="sub15" @titleClick="titleClick">
|
||||
<a-menu-item key="sub15" @titleClick="titleClick" v-if="checkMenu('download')">
|
||||
<div class="imgBox">
|
||||
<img
|
||||
style="width: 20px; height: 20px"
|
||||
@@ -364,6 +364,7 @@
|
||||
import { reactive, toRefs, onMounted, onUnmounted, watch } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useStore } from "vuex";
|
||||
import { checkMenu } from "@/utils/utils";
|
||||
export default {
|
||||
name: "NavLeft",
|
||||
setup() {
|
||||
@@ -671,6 +672,7 @@ export default {
|
||||
});
|
||||
return {
|
||||
...toRefs(state),
|
||||
checkMenu,
|
||||
onOpenChange,
|
||||
selectItem,
|
||||
packUp,
|
||||
|
||||
633
src/components/drawers/ExportAchievement.vue
Normal file
633
src/components/drawers/ExportAchievement.vue
Normal file
@@ -0,0 +1,633 @@
|
||||
<!-- 外部考试-导入成绩 -->
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="eScorevisibleExternalExternal"
|
||||
class="drawerStyle ExportScoreExternalExternal"
|
||||
placement="right"
|
||||
width="700px"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">导入成绩</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<div class="minatitl">
|
||||
<div class="up1">请下载</div>
|
||||
<div class="up2" @click="downTemplate" style="cursor: pointer">
|
||||
模板
|
||||
</div>
|
||||
<div class="up1">,按要求填写数据并导入</div>
|
||||
</div>
|
||||
<div class="upload">
|
||||
<div class="text">上传:</div>
|
||||
<div class="right">
|
||||
<div style="height: 176px; margin-bottom: 20px">
|
||||
<a-upload-dragger
|
||||
v-model:fileList="fileList"
|
||||
:action="importHomeWork"
|
||||
name="uploadFile"
|
||||
:multiple="true"
|
||||
@change="handleChange"
|
||||
:showUploadList="false"
|
||||
:data="{
|
||||
type: type,
|
||||
targetId: Number(id),
|
||||
}"
|
||||
>
|
||||
<p class="ant-upload-drag-icon">
|
||||
<inbox-outlined></inbox-outlined>
|
||||
</p>
|
||||
<p class="ant-upload-text">点击或将文件拖拽到此处上传</p>
|
||||
<p class="ant-upload-hint">支持扩展名:.xls/.xlsx</p>
|
||||
</a-upload-dragger>
|
||||
</div>
|
||||
<!-- <div class="load">
|
||||
<div class="cloud"></div>
|
||||
<div class="tip">点击或将文件拖拽到此处上传</div>
|
||||
<div class="tipz">支持扩展名:.xls/.xlsx</div>
|
||||
</div> -->
|
||||
<div class="loadstate">
|
||||
<div
|
||||
class="loadborder"
|
||||
v-if="uploadpercent < 100 && uploadpercent !== -1"
|
||||
>
|
||||
<div class="content">
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div class="stateloading">正在上传</div>
|
||||
</div>
|
||||
<a-progress :percent="uploadpercent" />
|
||||
<!-- <div class="prog">
|
||||
<div class="inprogloading"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="curloading">
|
||||
<!-- <div class="cur">55%</div> -->
|
||||
<!-- <div class="cancel" style="margin-left: 20px">暂停</div>
|
||||
<div class="cancel" style="margin-left: 15px">取消</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="loadborder" v-if="uploadErr">
|
||||
<div class="content">
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div class="statedefeat">上传失败</div>
|
||||
</div>
|
||||
<a-progress :percent="uploadpercent" />
|
||||
<!-- <div class="prog">
|
||||
<div class="inprogdefeat"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="curloading">
|
||||
<!-- <div class="cur">55%</div> -->
|
||||
<div
|
||||
style="color: #387df7; margin-left: 20px; cursor: pointer"
|
||||
>
|
||||
下载失败数据
|
||||
</div>
|
||||
<!-- <div class="cancel" style="margin-left: 20px">暂停</div>
|
||||
<div class="cancel" style="margin-left: 15px">取消</div> -->
|
||||
</div>
|
||||
<div
|
||||
class="defeat"
|
||||
style="display: flex; align-items: center"
|
||||
>
|
||||
<div style="color: #ff7474">
|
||||
{{ succNum }}条数据导入成功,{{ errNum }}条数据导入失败
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- v-if="uploadpercent === 100" -->
|
||||
<div class="loadborder" v-if="uploadpercent === 100">
|
||||
<div class="content">
|
||||
<div class="img"></div>
|
||||
<div class="timebox">
|
||||
<div class="timetop">
|
||||
<div class="tit">{{ fileName }}</div>
|
||||
<div class="statesucce">上传成功</div>
|
||||
</div>
|
||||
<a-progress :percent="uploadpercent" />
|
||||
<!-- <div class="prog">
|
||||
<div class="inprogsucce"></div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="curloading">
|
||||
<!-- <div class="cur">100%</div> -->
|
||||
<div
|
||||
class="cancel"
|
||||
style="margin-left: 20px; cursor: pointer"
|
||||
@click="removeUpload"
|
||||
>
|
||||
删除
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="errNum">
|
||||
<div class="downloadErr" @click="downloadEeeorData">
|
||||
下载失败数据
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="uploadpercent === 100"
|
||||
class="defeat"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 500px;
|
||||
height: 40px;
|
||||
"
|
||||
:style="{
|
||||
background: errNum
|
||||
? 'rgba(255, 116, 116, 0.1)'
|
||||
: 'rgba(53, 174, 105, 0.1)',
|
||||
border: errNum ? '1px solid #ff7474' : '1px solid #35AE69',
|
||||
}"
|
||||
>
|
||||
<img
|
||||
style="width: 14px; height: 14px; margin-left: 16px"
|
||||
:src="
|
||||
errNum
|
||||
? require('../../assets/images/err.png')
|
||||
: require('../../assets/images/success.png')
|
||||
"
|
||||
/>
|
||||
<div
|
||||
style="margin-left: 8px"
|
||||
:style="{ color: errNum ? '#ff7474' : 'rgba(0,0,0,0.65)' }"
|
||||
>
|
||||
{{ succNum }}条数据导入成功,{{ errNum }}条数据导入失败
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 加载动画 -->
|
||||
<div class="aeLoading" :style="{ display: addLoading ? 'flex' : 'none' }">
|
||||
<a-spin :spinning="addLoading" tip="" />
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import {reactive, toRefs} from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import * as api from "../../api/index1";
|
||||
import { BATCH_IMPORT_SCORE } from "@/api/config";
|
||||
export default {
|
||||
name: "EScore",
|
||||
props: {
|
||||
eScorevisibleExternalExternal: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
//type=1 项目 type=2 路径图
|
||||
type: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
id: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
pid: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
searchTaskList: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
fileType: ["xls", "xlsx"],
|
||||
importHomeWork:
|
||||
process.env.VUE_APP_BASE_API + "/admin/student/importHomeWork",
|
||||
uploadpercent: -1,
|
||||
uploadErr: false, //上传失败
|
||||
addLoading: false,
|
||||
fileList: [],
|
||||
succNum: 0, //成功数据数
|
||||
errNum: 0, //失败数据数
|
||||
downloadErrUrl: null, //下载失败数据
|
||||
fileName: "",
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:eScorevisibleExternalExternal", false);
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
state.uploadErr = false; //上传失败
|
||||
};
|
||||
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
if(bool){
|
||||
console.log('当前是 1 项目 2 路径图', props.type)
|
||||
}
|
||||
};
|
||||
|
||||
//上传文件
|
||||
const handleChange = (info) => {
|
||||
if (info) {
|
||||
var FileExt = info.file.name.replace(/.+\./, "");
|
||||
if (["xls", "xlsx"].indexOf(FileExt.toLowerCase()) === -1) {
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
message.destroy();
|
||||
message.error("请上传正确的文件格式");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
state.addLoading = true;
|
||||
state.uploadpercent = parseInt(info.file.percent);
|
||||
console.log("我是文件上传的进度---------->", info.file.percent);
|
||||
const status = info.file.status;
|
||||
if (status !== "uploading") {
|
||||
// console.log(info.file, info.fileList);
|
||||
}
|
||||
if (status === "done") {
|
||||
state.fileName = info.file.name;
|
||||
let i = 0;
|
||||
let timer = setInterval(() => {
|
||||
let uid = info.file.response.data;
|
||||
api
|
||||
.getImportStatus(uid)
|
||||
.then((res) => {
|
||||
console.log("查询导入状态", res);
|
||||
if (res.data.code === 200) {
|
||||
if (res.data.data.status !== "START") {
|
||||
i++;
|
||||
if (i === 1) {
|
||||
message.destroy();
|
||||
message.success(`${info.file.name}上传成功`);
|
||||
state.addLoading = false;
|
||||
props.searchTaskList && props.searchTaskList();
|
||||
}
|
||||
state.succNum = res.data.data.successNum;
|
||||
state.errNum = res.data.data.failedNum;
|
||||
state.downloadErrUrl = res.data.data.url;
|
||||
console.log("props.getStudent", props.getStudent);
|
||||
clearInterval(timer);
|
||||
}
|
||||
}else{
|
||||
state.addLoading = false;
|
||||
message.destroy();
|
||||
message.error(`文件导入超时`);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
state.addLoading = false;
|
||||
clearInterval(timer);
|
||||
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}上传失败`);
|
||||
}
|
||||
};
|
||||
const beforeUpload = (file) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
// const isJpgOrPng =
|
||||
// file.name.indexOf(".xlsx") !== "-1" ||
|
||||
// file.name.indexOf(".xls") !== "-1";
|
||||
|
||||
// if (!isJpgOrPng) {
|
||||
// message.destroy();
|
||||
// message.error("仅支持xls、xlsx格式!");
|
||||
// return reject(false);
|
||||
// }
|
||||
const formData = new FormData();
|
||||
formData.append("uploadFile", file);
|
||||
// let progress = { percent: 1 };
|
||||
|
||||
// const intervalId = setInterval(() => {
|
||||
// if (progress.percent < 100) {
|
||||
// progress.percent++;
|
||||
// file.onProgress(progress);
|
||||
// } else {
|
||||
// clearInterval(intervalId);
|
||||
// }
|
||||
// }, 100);
|
||||
api.batchImportScore(formData).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
console.log("上传成功", res);
|
||||
return reject(true);
|
||||
}
|
||||
});
|
||||
return reject(false);
|
||||
});
|
||||
};
|
||||
const handleUpload = (e) => {
|
||||
console.log("handleUpload", e);
|
||||
};
|
||||
|
||||
//删除
|
||||
const removeUpload = () => {
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
state.uploadErr = false; //上传失败
|
||||
state.succNum = 0;
|
||||
state.errNum = 0;
|
||||
state.downloadErrUrl = null;
|
||||
state.addLoading = false;
|
||||
};
|
||||
// 下载失败数据
|
||||
const downloadEeeorData = () => {
|
||||
if (state.downloadErrUrl !== "") {
|
||||
window.open(process.env.VUE_APP_FILE_PATH + state.downloadErrUrl);
|
||||
}
|
||||
};
|
||||
function downTemplate() {
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportHomeWorkTemplate?taskId=${props.id || ''}&type=${props.type || ''}&pid=${props.pid || ''}&thirdType=3`);
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
handleChange,
|
||||
downTemplate,
|
||||
BATCH_IMPORT_SCORE,
|
||||
beforeUpload,
|
||||
handleUpload,
|
||||
removeUpload,
|
||||
downloadEeeorData,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.ExportScoreExternalExternal {
|
||||
.drawerMain {
|
||||
min-width: 600px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
margin-bottom: 20px;
|
||||
flex-shrink: 0;
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
// margin-left: 24px;
|
||||
}
|
||||
}
|
||||
.main {
|
||||
overflow-y: auto;
|
||||
.minatitl {
|
||||
display: flex;
|
||||
.up1 {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.up2 {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
.upload {
|
||||
margin-top: 32px;
|
||||
display: flex;
|
||||
.text {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.right {
|
||||
margin-left: 6px;
|
||||
.load {
|
||||
width: 500px;
|
||||
height: 176px;
|
||||
background: #f5f9fd;
|
||||
border-radius: 4px;
|
||||
// opacity: 0.3;
|
||||
border: 1px dashed #caddfd;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
.cloud {
|
||||
margin-top: 52px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background-image: url(../../assets/images/basicinfo/cloud.png);
|
||||
}
|
||||
.tip {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
margin-top: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tipz {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.loadstate {
|
||||
width: 500px;
|
||||
margin-bottom: 100px;
|
||||
|
||||
.loadborder {
|
||||
width: 500px;
|
||||
height: 173px;
|
||||
border-radius: 4px;
|
||||
border: 1px dashed #eaeaea;
|
||||
margin-bottom: 30px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.content {
|
||||
display: flex;
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
.defeat {
|
||||
width: 400px;
|
||||
position: absolute;
|
||||
left: 46px;
|
||||
top: 38px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.img {
|
||||
width: 30px;
|
||||
height: 34px;
|
||||
background-image: url(../../assets/images/basicinfo/exl.png);
|
||||
}
|
||||
.timebox {
|
||||
margin-left: 15px;
|
||||
margin-top: -5px;
|
||||
.timetop {
|
||||
display: flex;
|
||||
width: 262px;
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 8px;
|
||||
.tit {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.stateloading {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #4ea6ff;
|
||||
}
|
||||
.statedefeat {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #ff7474;
|
||||
}
|
||||
.statesucce {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #35ae69;
|
||||
}
|
||||
}
|
||||
.prog {
|
||||
width: 262px;
|
||||
height: 5px;
|
||||
background: #eaf1fe;
|
||||
border-radius: 4px;
|
||||
.inprogloading {
|
||||
width: 55%;
|
||||
height: 5px;
|
||||
border-radius: 4px;
|
||||
|
||||
background: #4ea6ff;
|
||||
}
|
||||
//下载失败条
|
||||
.inprogdefeat {
|
||||
width: 55%;
|
||||
height: 5px;
|
||||
border-radius: 4px;
|
||||
|
||||
background: #ff7474;
|
||||
}
|
||||
//下载成功条
|
||||
.inprogsucce {
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
border-radius: 4px;
|
||||
|
||||
background: #57c887;
|
||||
}
|
||||
}
|
||||
}
|
||||
.curloading {
|
||||
margin-left: 15px;
|
||||
margin-top: 15px;
|
||||
display: flex;
|
||||
.cur {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.cancel {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
}
|
||||
}
|
||||
}
|
||||
.downloadErr {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #387df7;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
margin-left: 66px;
|
||||
margin-top: 16px;
|
||||
position: absolute;
|
||||
bottom: 28;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
|
||||
<script>
|
||||
import StuScoreDetail from "../../components/drawers/StuScoreDetail";
|
||||
import { reactive, toRefs, computed, onMounted } from "vue";
|
||||
import { reactive, toRefs, onMounted } from "vue";
|
||||
import * as api from "../../api/index1";
|
||||
// import { message } from "ant-design-vue";
|
||||
import { scoreRule } from "../../api/indexTaskadd"; //获取项目积分规则
|
||||
@@ -427,7 +427,8 @@ export default {
|
||||
searchNameValue: null, //学员获取的姓名
|
||||
checkStuId: null,
|
||||
proId: null,
|
||||
startTime: (new Date(new Date(new Date().toLocaleDateString()).getTime())).getTime().toString()
|
||||
startTime: (new Date(new Date(new Date().toLocaleDateString()).getTime())).getTime().toString(),
|
||||
scoresum: 0
|
||||
});
|
||||
const getTableData = () => {
|
||||
let datas = state.tabledataStu;
|
||||
@@ -450,23 +451,7 @@ export default {
|
||||
});
|
||||
state.tabledataStu = datas;
|
||||
};
|
||||
const scoresum = computed(() => {
|
||||
// console.log(Object.prototype.toString.call(Number(state.score1)));
|
||||
// if (Object.prototype.toString.call(state.score1) !== "[object Number]") {
|
||||
// message.destroy();
|
||||
// return message.warning("请输入合法数字");
|
||||
// }
|
||||
return (
|
||||
Number(state.score1) +
|
||||
Number(state.done3) +
|
||||
Number(state.four2) +
|
||||
Number(state.four5) +
|
||||
Number(state.five2) +
|
||||
Number(state.six1) +
|
||||
Number(state.seven1) +
|
||||
Number(state.seven2)
|
||||
);
|
||||
});
|
||||
|
||||
getTableData();
|
||||
|
||||
const tabsChange = (e) => {
|
||||
@@ -559,55 +544,60 @@ export default {
|
||||
const editRule = () => {
|
||||
console.log(props.projectId);
|
||||
let obj = {
|
||||
courseScore: state.score1,
|
||||
examItem: [
|
||||
projectId: Number(props.projectId),
|
||||
datas:[
|
||||
{
|
||||
id: 0,
|
||||
projectId: props.projectId,
|
||||
numLimit: 0,
|
||||
score: state.five2,
|
||||
scoreLimit: state.five1,
|
||||
type: 3,
|
||||
"type": 1,
|
||||
"pointsCount": Number(state.score1),
|
||||
"typeDesc": "完成【必修/选修】获得%p积分",
|
||||
"typeDescConfig": ""
|
||||
},
|
||||
],
|
||||
|
||||
homeworkItem: [
|
||||
//有名次要求的提交作业
|
||||
{
|
||||
id: 0,
|
||||
projectId: props.projectId,
|
||||
numLimit: state.four3,
|
||||
score: state.four5,
|
||||
scoreLimit: state.four4,
|
||||
type: 2,
|
||||
"type": 2,
|
||||
"pointsCount": Number(state.done3),
|
||||
"typeDesc": "完成作业成绩不低于%d分获得%p积分",
|
||||
"typeDescConfig": state.done2
|
||||
},
|
||||
//无名次要求的提交作业
|
||||
{
|
||||
id: 0,
|
||||
projectId: props.projectId,
|
||||
numLimit: 0,
|
||||
score: state.done3,
|
||||
scoreLimit: state.done2,
|
||||
type: 2,
|
||||
"type": 3,
|
||||
"pointsCount": Number(state.four2),
|
||||
"typeDesc": "前%d名学完在线课程获得%p积分",
|
||||
"typeDescConfig": state.four1
|
||||
},
|
||||
],
|
||||
leaderScore: state.seven1,
|
||||
projectId: props.projectId,
|
||||
signScore: state.six1,
|
||||
topCompleteCourseItem: [
|
||||
{
|
||||
id: 0,
|
||||
projectId: props.projectId,
|
||||
numLimit: state.four1,
|
||||
score: state.four2,
|
||||
scoreLimit: 0,
|
||||
type: 1,
|
||||
"type": 4,
|
||||
"pointsCount": Number(state.four5),
|
||||
"typeDesc": "前%d名提交作业且成绩不低于%d分获得%p积分",
|
||||
"typeDescConfig": state.four3 + ';' + state.four4
|
||||
},
|
||||
],
|
||||
topStudentScore: state.seven2,
|
||||
totalScore: scoresum.value,
|
||||
{
|
||||
"type": 5,
|
||||
"pointsCount": Number(state.five2),
|
||||
"typeDesc": "考试成绩高于%d分获得%p积分",
|
||||
"typeDescConfig": state.five1
|
||||
},
|
||||
{
|
||||
"type": 6,
|
||||
"pointsCount": Number(state.six1),
|
||||
"typeDesc": "考勤正常学员获得%p积分",
|
||||
"typeDescConfig": ""
|
||||
},
|
||||
{
|
||||
"type": 7,
|
||||
"pointsCount": Number(state.seven1),
|
||||
"typeDesc": "成为小组长获得%p积分",
|
||||
"typeDescConfig": ""
|
||||
},
|
||||
{
|
||||
"type": 8,
|
||||
"pointsCount": Number(state.seven2),
|
||||
"typeDesc": "优秀学员可获得%p积分",
|
||||
"typeDescConfig": ""
|
||||
}
|
||||
]
|
||||
};
|
||||
console.log(obj);
|
||||
|
||||
console.log('我是修改积分规则传递得参数', obj);
|
||||
setScoreRule(obj)
|
||||
.then((res) => {
|
||||
console.log(res.data, "修改成功");
|
||||
@@ -689,21 +679,30 @@ export default {
|
||||
.then((res) => {
|
||||
console.log("获取了项目积分规则", res.data.data);
|
||||
let result = res.data.data;
|
||||
scoresum.value = result.totalScore; //Write operation failed: computed value is readonly
|
||||
state.seven1 = result.leaderScore;
|
||||
state.score1 = result.courseScore;
|
||||
state.done2 = result.homeworkItem[1].scoreLimit;
|
||||
state.done3 = result.homeworkItem[1].score;
|
||||
state.four1 = result.topCompleteCourseItem[0].numLimit;
|
||||
state.four2 = result.topCompleteCourseItem[0].score;
|
||||
state.four3 = result.homeworkItem[0].numLimit;
|
||||
state.four4 = result.homeworkItem[0].scoreLimit;
|
||||
state.four5 = result.homeworkItem[0].score;
|
||||
state.five1 = result.examItem[0].scoreLimit;
|
||||
state.five2 = result.examItem[0].score;
|
||||
state.six1 = result.signScore;
|
||||
state.seven1 = result.leaderScore;
|
||||
state.seven2 = result.topStudentScore;
|
||||
//Write operation failed: computed value is readonly 总积分
|
||||
|
||||
state.scoresum = Number(result[0].pointsCount) + Number(result[1].pointsCount) + Number(result[2].pointsCount) + Number(result[3].pointsCount) + Number(result[4].pointsCount) + Number(result[5].pointsCount) + Number(result[6].pointsCount) + Number(result[7].pointsCount)
|
||||
|
||||
state.score1 = result[0].pointsCount;
|
||||
|
||||
state.done2 = result[1].typeDescConfig;
|
||||
state.done3 = result[1].pointsCount;
|
||||
|
||||
state.four1 = result[2].typeDescConfig;
|
||||
state.four2 = result[2].pointsCount;
|
||||
|
||||
state.four3 = result[3].typeDescConfig.slice(0,result[3].typeDescConfig.indexOf(';'));
|
||||
state.four4 = result[3].typeDescConfig.slice(result[3].typeDescConfig.indexOf(';')+1);
|
||||
state.four5 = result[3].pointsCount;
|
||||
|
||||
state.five1 = result[4].typeDescConfig;
|
||||
state.five2 = result[4].pointsCount;
|
||||
|
||||
state.six1 = result[5].pointsCount;
|
||||
|
||||
state.seven1 = result[6].pointsCount;
|
||||
|
||||
state.seven2 = result[7].pointsCount;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取项目积分规则失败了", err);
|
||||
@@ -721,7 +720,6 @@ export default {
|
||||
tabsChange,
|
||||
scoreRank,
|
||||
editRule,
|
||||
scoresum,
|
||||
getStu,
|
||||
setStuData,
|
||||
changePagination,
|
||||
|
||||
705
src/components/drawers/project/ProjectExternalExamManage.vue
Normal file
705
src/components/drawers/project/ProjectExternalExamManage.vue
Normal file
@@ -0,0 +1,705 @@
|
||||
<!-- 外部考试 -->
|
||||
<template>
|
||||
<a-drawer
|
||||
v-if="TMvisibleExternal"
|
||||
:visible="TMvisibleExternal"
|
||||
class="drawerStyle ProjectExternalExamManage"
|
||||
placement="right"
|
||||
width="80%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">【考试】{{ title }}</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<!-- <div class="endtime">起止时间:{{datasource.startTime}} ~ {{datasource.endTime}}</div> -->
|
||||
<div class="search">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">姓名:</div>
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
style="width: 200px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="datasource.type !==5" class="namecon" style="margin-right: 50px">
|
||||
<div class="name">任务状态:</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="projectName"
|
||||
style="width: 170px"
|
||||
placeholder="请选择"
|
||||
:options="projectNameList"
|
||||
@change="selectProjectName"
|
||||
allowClear
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@click="searchTableData"
|
||||
>
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="reseatTableData">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px">
|
||||
<!--
|
||||
<div class="btn btn1" @click="godie" style="margin-right: 20px">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">催促考试</div>
|
||||
</div>-->
|
||||
<div class="btn btn2" @click="exportData">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出数据</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="showEScoreModal">
|
||||
<div class="wz">导入成绩</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="line">
|
||||
<div class="inline">
|
||||
<div class="left">
|
||||
<div class="img"></div>
|
||||
<div class="text" style="margin-left: 10px">已选择</div>
|
||||
<div class="text2">{{ selectedRowKeys.length }}</div>
|
||||
<div class="text">项</div>
|
||||
<div class="text3">列表选项总计:</div>
|
||||
<div class="text4">{{ tableDataTotal }}条</div>
|
||||
</div>
|
||||
<div class="right" @click="clearLine">清空</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="tableBox" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="loadingData"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
/>
|
||||
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
v-if="tableDataTotal > 10"
|
||||
@change="changePaginationStu"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="btnn">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 导出成绩抽屉 -->
|
||||
<ExportAchievement v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal" :type="1" />
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import ExportAchievement from "../ExportAchievement.vue";
|
||||
import * as api from '../../../api/indexTaskManage';
|
||||
|
||||
// import * as api from "../../../api/index";
|
||||
export default {
|
||||
name: "ProjectExternalExamManage",
|
||||
components: {
|
||||
ExportAchievement,
|
||||
},
|
||||
props: {
|
||||
TMvisibleExternal: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
projectTaskId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
datasource: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
name: "",
|
||||
open: false,
|
||||
projectName: undefined,
|
||||
projectNameList: [
|
||||
{
|
||||
id: 1,
|
||||
value: "0",
|
||||
label: "未开始",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: "10",
|
||||
label: "未通过",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
value: "1",
|
||||
label: "已通过",
|
||||
},
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
eScorevisibleExternalExternal: false, //导入成绩抽屉
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 0,
|
||||
tabledata: [],
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
width: 60,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
width: 50,
|
||||
align: "left",
|
||||
className: "h head",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentName?text.record.studentName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "所在部门",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentDepartName?text.record.studentDepartName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "所在岗位",
|
||||
dataIndex: "studentJobName",
|
||||
key: "studentJobName",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentJobName?text.record.studentJobName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "考试次数",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.num?text.record.num:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "成绩",
|
||||
dataIndex: "examinationScore",
|
||||
key: "examinationScore",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.examinationScore?text.record.examinationScore:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "examinationSubmitTime",
|
||||
key: "examinationSubmitTime",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.examinationSubmitTime?text.record.examinationSubmitTime:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "任务状态",
|
||||
dataIndex: "finishStatus",
|
||||
key: "finishStatus",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'),
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:TMvisibleExternal", false);
|
||||
state.name = "";
|
||||
state.projectName = undefined;
|
||||
state.selectedRowKeys = [];
|
||||
state.currentPage = 1;
|
||||
state.tabledata = [];
|
||||
};
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
state.loadingData = true;
|
||||
getData();
|
||||
}
|
||||
};
|
||||
const selectProjectName = (value) => {
|
||||
state.projectName = value;
|
||||
};
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log('表格前方选中项目', selectedRowKeys)
|
||||
if (selectedRowKeys.length > 2) {
|
||||
return;
|
||||
}
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
};
|
||||
|
||||
//催促学员学习
|
||||
const godie = () => {
|
||||
message.destroy();
|
||||
message.success("催促" + props.title + "成功");
|
||||
};
|
||||
//导入成绩
|
||||
const showEScoreModal = () => {
|
||||
state.eScorevisibleExternalExternal = true;
|
||||
};
|
||||
//表头清空
|
||||
const clearLine = () => {
|
||||
state.selectedRowKeys = [];
|
||||
};
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
api.AssessmentManagementMessage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.stageId,
|
||||
type: 1,
|
||||
pid: props.datasource.projectId,
|
||||
taskId: props.datasource.projectTaskId,
|
||||
taskType: props.datasource.type,
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
}).then(res=>{
|
||||
state.tabledata = res.data.data.records;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.loadingData = false;
|
||||
})
|
||||
}
|
||||
// 搜索
|
||||
function searchTableData() {
|
||||
state.loadingData = true;
|
||||
getData();
|
||||
}
|
||||
// 重置
|
||||
function reseatTableData() {
|
||||
state.loadingData = true;
|
||||
state.currentPage = 1;
|
||||
state.name = '';
|
||||
state.projectName = undefined;
|
||||
getData();
|
||||
}
|
||||
|
||||
//分页
|
||||
const changePaginationStu = (page) => {
|
||||
state.loadingData = true;
|
||||
state.currentPage = page;
|
||||
getData();
|
||||
};
|
||||
|
||||
{/* 导出数据 */}
|
||||
function exportData() {
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}&taskType=${props.datasource.type}`)
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
onSelectChange,
|
||||
godie,
|
||||
clearLine,
|
||||
showEScoreModal,
|
||||
searchTableData,
|
||||
reseatTableData,
|
||||
changePaginationStu,
|
||||
exportData
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.ProjectExternalExamManage {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding-right: 10px;
|
||||
.endtime {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20px;
|
||||
|
||||
.namecon {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.name {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../../assets/images/courseManage/search0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../../assets/images/courseManage/reset1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #4ea6ff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
color: #4ea6ff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnss {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../../assets/images/basicinfo/call.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.img2 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../../assets/images/coursewareManage/export.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #4ea6ff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
margin-right: 20px;
|
||||
color: #4ea6ff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background-color: #e9f6fe;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #c3e6fc;
|
||||
|
||||
.inline {
|
||||
width: 95%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 14px;
|
||||
height: 15px;
|
||||
background-image: url(../../../assets/images/leveladd/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999ba3;
|
||||
}
|
||||
|
||||
.text2 {
|
||||
color: #4ea6ff;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.text3 {
|
||||
color: #999ba3;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
.ant-table-selection-column {
|
||||
padding: 0px !important;
|
||||
}
|
||||
.ant-pagination-item,
|
||||
.ant-pagination-prev,
|
||||
.ant-pagination-next,
|
||||
.ant-pagination-options {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1) !important;
|
||||
}
|
||||
.ant-table-selection-column {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.head {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
.studentopea1 {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
line-height: 22px;
|
||||
padding-right: 8px;
|
||||
border-right: 1px solid #e9e9e9;
|
||||
cursor: pointer;
|
||||
}
|
||||
.studentopea2 {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
line-height: 22px;
|
||||
padding-right: 8px;
|
||||
padding-left: 8px;
|
||||
border-right: 1px solid #e9e9e9;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pa {
|
||||
margin-top: 15px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -0,0 +1,734 @@
|
||||
<!-- 外部考试 管理抽屉 -->
|
||||
<template>
|
||||
<a-drawer
|
||||
v-if="ExaminationExaminaModelVisible"
|
||||
:visible="ExaminationExaminaModelVisible"
|
||||
class="drawerStyle RouterExaminationExternalManage"
|
||||
placement="right"
|
||||
width="80%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="header">
|
||||
<div class="headerTitle">【考试】{{ title }}</div>
|
||||
<img
|
||||
style="width: 29px; height: 29px; cursor: pointer"
|
||||
src="../../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="main">
|
||||
<!-- <div class="endtime">起止时间:{{datasource.startTime}} ~ {{datasource.endTime}}</div> -->
|
||||
<div class="search">
|
||||
<div class="namecon" style="margin-right: 30px">
|
||||
<div class="name">姓名:</div>
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
style="width: 200px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="datasource.type !==5" class="namecon" style="margin-right: 50px">
|
||||
<div class="name">任务状态:</div>
|
||||
<div class="select">
|
||||
<a-select
|
||||
v-model:value="projectName"
|
||||
style="width: 200px"
|
||||
placeholder="请选择"
|
||||
:options="projectNameList"
|
||||
@change="selectProjectName"
|
||||
allowClear
|
||||
></a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@click="searchTableData"
|
||||
>
|
||||
<div class="img1"></div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="reseatTableData">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnss" style="margin-top: 20px">
|
||||
<!-- <div class="btn btn1" @click="godie" style="margin-right: 20px">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">催促考试</div>
|
||||
</div>-->
|
||||
<div class="btn btn2" @click="exportData">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出数据</div>
|
||||
</div>
|
||||
<div class="btn btn2" @click="showEScoreModal">
|
||||
<div class="wz">导入成绩</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="line">
|
||||
<div class="inline">
|
||||
<div class="left">
|
||||
<div class="img"></div>
|
||||
<div class="text" style="margin-left: 10px">已选择</div>
|
||||
<div class="text2">{{ selectedRowKeys.length }}</div>
|
||||
<div class="text">项</div>
|
||||
<div class="text3">列表选项总计:</div>
|
||||
<div class="text4">{{ tableDataTotal }}条</div>
|
||||
</div>
|
||||
<div class="right" @click="clearLine">清空</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="tableBox" style="margin-top: 20px; margin-bottom: 100px">
|
||||
<a-table
|
||||
style="border: 1px solid #f2f6fe"
|
||||
:columns="tablecolumns"
|
||||
:data-source="tabledata"
|
||||
:loading="loadingData"
|
||||
:scroll="{ x: 900 }"
|
||||
:pagination="false"
|
||||
/>
|
||||
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
:showSizeChanger="false"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
v-if="tableDataTotal > 10"
|
||||
@change="changePaginationStu"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div class="btnn">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>-->
|
||||
</div>
|
||||
<!-- 导出成绩抽屉 -->
|
||||
<ExportAchievement v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal" :type="2" />
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import ExportAchievement from "../ExportAchievement.vue";
|
||||
import * as api from '../../../api/indexTaskManage';
|
||||
|
||||
// import * as api from "../../../api/index";
|
||||
export default {
|
||||
name: "RouterExaminationManage",
|
||||
components: {
|
||||
ExportAchievement,
|
||||
},
|
||||
props: {
|
||||
ExaminationExaminaModelVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
levelName: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
projectTaskId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
datasource: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
name: "",
|
||||
open: false,
|
||||
projectName: undefined,
|
||||
projectNameList: [
|
||||
{
|
||||
id: 1,
|
||||
value: "0",
|
||||
label: "未开始",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: "10",
|
||||
label: "未通过",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
value: "1",
|
||||
label: "已通过",
|
||||
},
|
||||
],
|
||||
selectedRowKeys: [],
|
||||
eScorevisibleExternalExternal: false, //导入成绩抽屉
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
tableDataTotal: 0,
|
||||
tabledata: [],
|
||||
tablecolumns: [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
width: 120,
|
||||
align: "center",
|
||||
className: "h head",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "姓名",
|
||||
dataIndex: "studentName",
|
||||
key: "studentName",
|
||||
width: 50,
|
||||
align: "center",
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentName?text.record.studentName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "所在部门",
|
||||
dataIndex: "studentDepartName",
|
||||
key: "studentDepartName",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentDepartName?text.record.studentDepartName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "所在岗位",
|
||||
dataIndex: "studentJobName",
|
||||
key: "studentJobName",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentJobName?text.record.studentJobName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "学员关卡",
|
||||
dataIndex: "currentStageId",
|
||||
key: "currentStageId",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: () => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {props.levelName}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "考试次数",
|
||||
dataIndex: "num",
|
||||
key: "num",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.num?text.record.num:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "成绩",
|
||||
dataIndex: "score",
|
||||
key: "score",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.examinationScore?text.record.examinationScore:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "examinationSubmitTime",
|
||||
key: "examinationSubmitTime",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.examinationSubmitTime?text.record.examinationSubmitTime:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "任务状态",
|
||||
dataIndex: "finishStatus",
|
||||
key: "finishStatus",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'),
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:ExaminationExaminaModelVisible", false);
|
||||
state.name = "";
|
||||
state.projectName = undefined;
|
||||
state.selectedRowKeys = [];
|
||||
state.currentPage = 1;
|
||||
state.tabledata = [];
|
||||
};
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
state.loadingData = true;
|
||||
getData();
|
||||
}
|
||||
};
|
||||
const selectProjectName = (value) => {
|
||||
state.projectName = value;
|
||||
};
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
console.log('表格前方选中项目', selectedRowKeys)
|
||||
if (selectedRowKeys.length > 2) {
|
||||
return;
|
||||
}
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
};
|
||||
|
||||
//催促学员学习
|
||||
const godie = () => {
|
||||
message.destroy();
|
||||
message.success("催促" + props.title + "成功");
|
||||
};
|
||||
//导入成绩
|
||||
const showEScoreModal = () => {
|
||||
state.eScorevisibleExternalExternal = true;
|
||||
};
|
||||
//表头清空
|
||||
const clearLine = () => {
|
||||
state.selectedRowKeys = [];
|
||||
};
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
api.AssessmentManagementMessage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.chapterId,
|
||||
type: 2,
|
||||
pid: props.datasource.routerId,
|
||||
taskId: props.datasource.routerTaskId,
|
||||
taskType: props.datasource.type,
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
}).then(res=>{
|
||||
state.tabledata = res.data.data.records;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.loadingData = false;
|
||||
})
|
||||
}
|
||||
// 搜索
|
||||
function searchTableData() {
|
||||
state.currentPage = 1;
|
||||
state.loadingData = true;
|
||||
getData();
|
||||
}
|
||||
// 重置
|
||||
function reseatTableData() {
|
||||
state.loadingData = true;
|
||||
state.currentPage = 1;
|
||||
state.name = '';
|
||||
state.projectName = undefined;
|
||||
getData();
|
||||
}
|
||||
|
||||
//分页
|
||||
const changePaginationStu = (page) => {
|
||||
state.loadingData = true;
|
||||
state.currentPage = page;
|
||||
getData();
|
||||
};
|
||||
|
||||
{/* 导出数据 */}
|
||||
function exportData() {
|
||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=${2}&pid=${props.datasource.routerId}&taskId=${props.datasource.routerTaskId}&taskType=${props.datasource.type}`)
|
||||
|
||||
{/* api.ExportExam({
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"targetId": props.datasource.routerId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
}) */}
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
onSelectChange,
|
||||
godie,
|
||||
clearLine,
|
||||
showEScoreModal,
|
||||
searchTableData,
|
||||
reseatTableData,
|
||||
changePaginationStu,
|
||||
exportData
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.RouterExaminationExternalManage {
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.header {
|
||||
height: 73px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
padding-right: 10px;
|
||||
.endtime {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.search {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20px;
|
||||
|
||||
.namecon {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.name {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../../assets/images/courseManage/search0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../../assets/images/courseManage/reset1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #4ea6ff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
|
||||
color: #4ea6ff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnss {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
height: 40px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.img1 {
|
||||
width: 15px;
|
||||
height: 17px;
|
||||
background-image: url(../../../assets/images/basicinfo/call.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
.img2 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../../assets/images/coursewareManage/export.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
background: #4ea6ff;
|
||||
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
margin-right: 20px;
|
||||
color: #4ea6ff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background-color: #e9f6fe;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
border: 1px solid #c3e6fc;
|
||||
|
||||
.inline {
|
||||
width: 95%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 14px;
|
||||
height: 15px;
|
||||
background-image: url(../../../assets/images/leveladd/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #999ba3;
|
||||
}
|
||||
|
||||
.text2 {
|
||||
color: #4ea6ff;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.text3 {
|
||||
color: #999ba3;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tableBox {
|
||||
.ant-table-selection-column {
|
||||
padding: 0px !important;
|
||||
}
|
||||
.ant-pagination-item,
|
||||
.ant-pagination-prev,
|
||||
.ant-pagination-next,
|
||||
.ant-pagination-options {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.ant-table-thead > tr > th {
|
||||
background-color: rgba(239, 244, 252, 1) !important;
|
||||
}
|
||||
.ant-table-selection-column {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
th.h {
|
||||
background-color: #eff4fc !important;
|
||||
}
|
||||
|
||||
.head {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
|
||||
.studentopea1 {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
line-height: 22px;
|
||||
padding-right: 8px;
|
||||
border-right: 1px solid #e9e9e9;
|
||||
cursor: pointer;
|
||||
}
|
||||
.studentopea2 {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #387df7;
|
||||
line-height: 22px;
|
||||
padding-right: 8px;
|
||||
padding-left: 8px;
|
||||
border-right: 1px solid #e9e9e9;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pa {
|
||||
margin-top: 15px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -203,8 +203,8 @@
|
||||
const columns = [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentCode",
|
||||
key: "studentCode",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -212,7 +212,7 @@
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentCode?text.record.studentCode:"-"}</span>
|
||||
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -316,8 +316,8 @@
|
||||
},
|
||||
{
|
||||
title: "进度",
|
||||
dataIndex: "process",
|
||||
key: "process",
|
||||
dataIndex: "taskProcess",
|
||||
key: "taskProcess",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -325,15 +325,15 @@
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.process?text.record.process:"-"}</span>
|
||||
<span> {text.record.taskProcess?text.record.taskProcess:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "finishEdTime",
|
||||
key: "finishEdTime",
|
||||
dataIndex: "lastStudyTime",
|
||||
key: "lastStudyTime",
|
||||
width: "15%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -341,7 +341,7 @@
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.finishEdTime?text.record.finishEdTime:"-"}</span>
|
||||
<span> {text.record.lastStudyTime?text.record.lastStudyTime:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -357,7 +357,7 @@
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.finishStatus == 1 || text.record.finishStatus == 0 || text.record.finishStatus==null ? "未开始" :text.record.finishStatus == 2 ?"进行中":text.record.finishStatus == 3 ? "已完成" :"未完成"}</span>
|
||||
<span> {!text.record.finishStatus? "未开始" :text.record.finishStatus == 2 ?"进行中":text.record.finishStatus == 1 ? "已完成" :"未完成"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -420,35 +420,30 @@
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
if(props.datasource.type == 13){
|
||||
console.log("我是传递的查询参数", {
|
||||
"courseId": props.datasource.courseId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"status": state.projectName,
|
||||
"studentName": state.name
|
||||
});
|
||||
api.QueryProjectManageDetail({
|
||||
"courseId": props.datasource.courseId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"status": state.projectName,
|
||||
"studentName": state.name
|
||||
}).then(res=>{
|
||||
console.log('投票数据获取', res)
|
||||
if(res.data.code==200){
|
||||
state.tableDataTotalLoading = false;
|
||||
state.tabledata = res.data.data.rows;
|
||||
state.courseID = props.datasource.courseId;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
}
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
state.tableDataTotalLoading = false;
|
||||
state.tabledata = [];
|
||||
})
|
||||
if(props.datasource.type === 13){
|
||||
api
|
||||
.AssessmentManagementMessage({
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
currentStageId: props.datasource.chapterId,
|
||||
type: 2,
|
||||
pid: props.datasource.routerId,
|
||||
taskId: props.datasource.routerTaskId,
|
||||
taskType: props.datasource.type,
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
})
|
||||
.then((res) => {
|
||||
state.tableDataTotalLoading = false;
|
||||
let newData = [];
|
||||
for (let i = 0; i < res.data.data.records.length; i++) {
|
||||
res.data.data.records[i].key = res.data.data.records[i].id;
|
||||
newData.push(res.data.data.records[i]);
|
||||
}
|
||||
state.tabledata = newData;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.courseID = props.datasource.courseId;
|
||||
})
|
||||
}else{
|
||||
state.tableDataTotalLoading = false;
|
||||
state.tabledata = [];
|
||||
|
||||
@@ -33,6 +33,7 @@ export default createStore({
|
||||
pathmapPic: [],//学习路径背景图
|
||||
memberInitInfo: [],//学员默认
|
||||
sysType: [],//学员默认
|
||||
menus:[]
|
||||
},
|
||||
getters: {},
|
||||
mutations: {
|
||||
|
||||
@@ -39,6 +39,12 @@ export function checkPer(per) {
|
||||
}
|
||||
return (per + "").split(',').some(t => admin.some(s => s == t))
|
||||
}
|
||||
export function checkMenu(path='') {
|
||||
// return store?.state?.menus.some(t => path.includes(t));
|
||||
console.log(path)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
export function deepClone(obj) {
|
||||
let result = typeof obj.splice === "function" ? [] : {};
|
||||
|
||||
@@ -1268,14 +1268,23 @@
|
||||
/>
|
||||
<!-- 面授管理抽屉 结束-->
|
||||
|
||||
<!-- 考试管理抽屉 开始-->
|
||||
<!-- 系统考试管理抽屉 开始-->
|
||||
<router-examination-manage
|
||||
v-model:ExaminationModelVisible="examinationModelVisible"
|
||||
:title="examinationModelVisibleTitle"
|
||||
:datasource="examinationData"
|
||||
:levelName="examLevelName"
|
||||
/>
|
||||
<!-- 考试管理抽屉 结束-->
|
||||
<!-- 系统考试管理抽屉 结束-->
|
||||
|
||||
<!-- 外部考试管理抽屉 开始-->
|
||||
<router-examination-external-manage
|
||||
v-model:ExaminationExaminaModelVisible="examinationExaminaModelVisible"
|
||||
:title="examinationModelVisibleTitle"
|
||||
:datasource="examinationData"
|
||||
:levelName="examLevelName"
|
||||
/>
|
||||
<!-- 外部考试管理抽屉 结束-->
|
||||
|
||||
<!-- 测评管理抽屉 开始-->
|
||||
<router-evaluation-manage
|
||||
@@ -1353,6 +1362,7 @@ import { getStuPage, moveStudent } from "@/api/index1";
|
||||
|
||||
import RouterFaceTeachManage from "../../components/drawers/router/RouterFaceTeachManage";
|
||||
import RouterExaminationManage from "../../components/drawers/router/RouterExaminationManage";
|
||||
import RouterExaminationExternalManage from "../../components/drawers/router/RouterExaminationExternalManage";
|
||||
import RouterEvaluationManage from "../../components/drawers/router/RouterEvaluationManage";
|
||||
import RouterHomeworkManage from "../../components/drawers/router/RouterHomeworkManage";
|
||||
import RouterCommonManage from "../../components/drawers/router/RouterCommonManage";
|
||||
@@ -1379,6 +1389,7 @@ export default {
|
||||
|
||||
RouterFaceTeachManage,
|
||||
RouterExaminationManage,
|
||||
RouterExaminationExternalManage,
|
||||
RouterEvaluationManage,
|
||||
RouterHomeworkManage,
|
||||
RouterCommonManage,
|
||||
@@ -1558,6 +1569,7 @@ export default {
|
||||
pjModelVisible: false,
|
||||
faceTeachModelVisible: false,
|
||||
examinationModelVisible: false,
|
||||
examinationExaminaModelVisible: false,
|
||||
evaluationModelVisible: false,
|
||||
homeworkModelVisible: false,
|
||||
commonModelVisible: false,
|
||||
@@ -1877,8 +1889,14 @@ export default {
|
||||
// 考试点击管理弹框
|
||||
const examinationModel = (data, levelname) => {
|
||||
console.log(data);
|
||||
if(data.startTime==null && data.endTime==null){
|
||||
// 外部考试
|
||||
state.examinationExaminaModelVisible = true;
|
||||
}else{
|
||||
// 系统考试
|
||||
state.examinationModelVisible = true;
|
||||
}
|
||||
state.examLevelName = levelname;
|
||||
state.examinationModelVisible = true;
|
||||
state.examinationModelVisibleTitle = data.name;
|
||||
state.examinationData = data;
|
||||
// 考试弹框名称 RouterExaminationManage
|
||||
|
||||
@@ -861,7 +861,7 @@ import AddRef from "../../components/drawers/AddRef.vue";
|
||||
import AddProject from "../../components/drawers/AddProject.vue";
|
||||
import AddFaceteach from "../../components/drawers/AddFaceteach.vue";
|
||||
import * as api from "../../api/indexLevel";
|
||||
import { GetRouterDetail, changeChapterSort, changeTasklistSort } from "../../api/indexTask";
|
||||
import { GetRouterDetail, changeChapterSort, changeTasklistSort, releaseRouter } from "../../api/indexTask";
|
||||
import { message } from "ant-design-vue";
|
||||
import { storage } from "../../api/storage";
|
||||
import { deleteStudyTask } from "../../api/indexStudy";
|
||||
@@ -899,6 +899,7 @@ export default {
|
||||
routerId: storage.get("routerId")
|
||||
? JSON.parse(storage.get("routerId"))
|
||||
: null,
|
||||
routerDetail: null,
|
||||
level: [
|
||||
// {
|
||||
// chapterId: "1",
|
||||
@@ -1028,6 +1029,7 @@ export default {
|
||||
state.value1 = element.name;
|
||||
state.value2 = element.remark;
|
||||
state.updateChapterID = element.chapterId;
|
||||
|
||||
}
|
||||
};
|
||||
const closeModal = () => {
|
||||
@@ -1071,8 +1073,7 @@ export default {
|
||||
remark: state.value2,
|
||||
routerId: state.routerId,
|
||||
};
|
||||
api
|
||||
.editChapter(obj)
|
||||
api.editChapter(obj)
|
||||
.then((res) => {
|
||||
console.log("创建成功", res);
|
||||
// setTimeout(() => {
|
||||
@@ -1147,6 +1148,7 @@ export default {
|
||||
console.log(res)
|
||||
if (res.data.code === 200) {
|
||||
message.success('关卡顺序已修改')
|
||||
getDetail()
|
||||
}
|
||||
// getDetail()
|
||||
})
|
||||
@@ -1163,6 +1165,7 @@ export default {
|
||||
console.log(res)
|
||||
if (res.data.code === 200) {
|
||||
message.success('任务顺序已修改')
|
||||
getDetail()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -1299,14 +1302,15 @@ export default {
|
||||
state.picUrl = res.data.data.routerInfo.picUrl;
|
||||
state.unlockMode = res.data.data.routerInfo.unlockMode
|
||||
state.unlockMode = state.unlockMode ? state.unlockMode : 1
|
||||
console.log('学习模式', state.unlockMode)
|
||||
// console.log('学习模式', state.unlockMode)
|
||||
state.routerInfo = res.data.data.routerInfo
|
||||
//增加两个字段
|
||||
state.level.forEach((item) => {
|
||||
item["value"] = item.chapterId;
|
||||
item["label"] = item.name;
|
||||
});
|
||||
console.log("路径图详情", res);
|
||||
console.log("路径图详情", res.data.data);
|
||||
state.routerDetail = res.data.data
|
||||
if (state.level.length > 0) {
|
||||
let chapter = localStorage.getItem("chapterId")
|
||||
? JSON.parse(localStorage.getItem("chapterId"))
|
||||
@@ -1749,12 +1753,25 @@ export default {
|
||||
message.success("暂存成功");
|
||||
};
|
||||
//确定
|
||||
// 确定,将当前暂存的草稿发布
|
||||
//
|
||||
const submitStorage = () => {
|
||||
// 发布'
|
||||
// let obj = {}
|
||||
console.log(state.routerDetail)
|
||||
releaseRouter(state.routerDetail).then(res => {
|
||||
// console.log("发布",res.data.data)
|
||||
if (res.data.code === 200) {
|
||||
message.success("关卡和任务数据已保存,将返回上一页")
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
path: "/leveladd",
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// router.push({
|
||||
// path: "/leveladd",
|
||||
// });
|
||||
};
|
||||
//取消
|
||||
const cancelStorage = () => {
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<a-button v-if="record.status===1 && record.type===3 && checkPer(record.permissions)" @click="showRecallReviewModal(record.projectId)" type="link">撤回审核</a-button>
|
||||
<a-button v-if="record.status===2 && record.type===3 && checkPer(record.permissions)" @click="push(record)" type="link">发布</a-button>
|
||||
<a-button v-if="record.status===3 && record.type===3 && checkPer(record.permissions)" @click="showBackModal(record.projectId)" type="link">撤回发布</a-button>
|
||||
<a-button v-if="record.status!==3 && record.type===3" @click="baseInfo(record)" type="link">管理</a-button>
|
||||
<a-button v-if="record.type===3" @click="baseInfo(record)" type="link">管理</a-button>
|
||||
<DropDown v-if="checkPer(record.permissions)" value="授权">
|
||||
<OwnerTableModelStudent :types="[4,5,6]" :id="record.projectId" :type="6">权限名单</OwnerTableModelStudent>
|
||||
<CommonStudent :type="4" :id="record.projectId" title="查看权">查看权</CommonStudent>
|
||||
|
||||
@@ -1424,13 +1424,20 @@
|
||||
:title="showWorkText"
|
||||
:projectTaskInfo="projectTaskInfo"
|
||||
/>
|
||||
<!-- 考试管理抽屉 -->
|
||||
<!-- 系统考试管理抽屉 -->
|
||||
<ProjectExamManage
|
||||
v-model:TMvisible="TMvisible"
|
||||
:title="showTestText"
|
||||
:projectTaskId="projectTaskId"
|
||||
:datasource="examData"
|
||||
/>
|
||||
<!-- 外部考试管理抽屉 -->
|
||||
<ProjectExternalExamManage
|
||||
v-model:TMvisibleExternal="TMvisibleExternal"
|
||||
:title="showTestText"
|
||||
:projectTaskId="projectTaskId"
|
||||
:datasource="examData"
|
||||
/>
|
||||
<!-- 投票管理抽屉 -->
|
||||
<ProjectVoteManage
|
||||
v-model:ProjectVoteModelVisible="projectVoteModelVisible"
|
||||
@@ -2086,6 +2093,7 @@ import ProjectFaceTaskManage from "../../components/drawers/project/ProjectFaceT
|
||||
import ProjectOnlineManage from "../../components/drawers/project/ProjectOnlineManage";
|
||||
import ProjectHomeWorkManage from "../../components/drawers/project/ProjectHomeWorkManage";
|
||||
import ProjectExamManage from "../../components/drawers/project/ProjectExamManage";
|
||||
import ProjectExternalExamManage from "../../components/drawers/project/ProjectExternalExamManage";
|
||||
import ProjectEvalManage from "../../components/drawers/project/ProjectEvalManage";
|
||||
import AddCertificate from "../../components/drawers/project/AddCertificate";
|
||||
import CreateCertificate from "../../components/drawers/project/CreateCertificate";
|
||||
@@ -2145,6 +2153,7 @@ export default {
|
||||
ProjectOnlineManage,
|
||||
ProjectHomeWorkManage,
|
||||
ProjectExamManage,
|
||||
ProjectExternalExamManage,
|
||||
ProjectEvalManage,
|
||||
SubsetManage,
|
||||
MemberList,
|
||||
@@ -2318,7 +2327,8 @@ export default {
|
||||
AAvisible: false, //活动考勤
|
||||
Wvisible: false, //作业管理
|
||||
projectVoteModelVisible: false, // 投票管理
|
||||
TMvisible: false, //考试管理
|
||||
TMvisible: false, //系统考试管理
|
||||
TMvisibleExternal: false, // 外部考试管理
|
||||
Evalvisible: false, //测评管理
|
||||
ACertificate: false, //证书添加
|
||||
ACertificateEdit: false, //是否是编辑证书
|
||||
@@ -3189,10 +3199,19 @@ export default {
|
||||
};
|
||||
//考试管理的抽屉
|
||||
const showTest = (name, id, data) => {
|
||||
state.examData = data;
|
||||
state.TMvisible = true;
|
||||
state.showTestText = name;
|
||||
state.projectTaskId = id;
|
||||
if(data.startTime==null && data.endTime==null){
|
||||
// 外部考试抽屉显示
|
||||
state.TMvisibleExternal = true;
|
||||
state.examData = data;
|
||||
state.showTestText = name;
|
||||
state.projectTaskId = id;
|
||||
}else{
|
||||
// 系统考试抽屉显示
|
||||
state.TMvisible = true;
|
||||
state.examData = data;
|
||||
state.showTestText = name;
|
||||
state.projectTaskId = id;
|
||||
}
|
||||
};
|
||||
//测评抽屉
|
||||
const showEval = (name, id, type, datasource) => {
|
||||
|
||||
Reference in New Issue
Block a user