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

This commit is contained in:
yujicun
2023-03-24 09:27:07 +08:00
17 changed files with 117 additions and 56 deletions

2
.env
View File

@@ -39,3 +39,5 @@ VUE_APP_H5=//u-pre.boe.com/student-h5
VUE_APP_AVATAR_PATH=/upload/
# 旧版管理员界面
VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html
# 批量面授报名模板
VUE_APP_FACE_STUDENT_TEMPLATE=批量面授报名模版-1673963663229.xlsx

View File

@@ -14,3 +14,5 @@ VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=coursefile/外部考试学员成绩导入
VUE_APP_ONLINE_CLASS_URL=//u-pre.boe.com/mobile/pages/study/courseStudy?id=
VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=
VUE_APP_EXAM_DETAIL_URL=//u-pre.boe.com/mobile/pages/exam/exam?id=
# 批量面授报名模板
VUE_APP_FACE_STUDENT_TEMPLATE=coursefile/批量面授报名模版-1679595849719.xlsx

View File

@@ -30,3 +30,5 @@ VUE_APP_FILE_PATH=/upload/boe/file/
VUE_APP_AVATAR_PATH=/upload/
# 旧版管理员界面
VUE_APP_OLD_MANAGE=//u.boe.com/resource/index.html
# 批量面授报名模板
VUE_APP_FACE_STUDENT_TEMPLATE=/file/批量面授报名模版-1679595925822.xlsx

View File

@@ -26,3 +26,5 @@ VUE_APP_H5=//u.boe.com/student-h5-release
VUE_APP_AVATAR_PATH=/upload/
# 旧版管理员界面
VUE_APP_OLD_MANAGE=//u-pre.boe.com/resource/index.html
# 批量面授报名模板
VUE_APP_FACE_STUDENT_TEMPLATE=批量面授报名模版-1673963663229.xlsx

View File

@@ -33,7 +33,7 @@ import {USER_PERMISSION} from "@/api/ThirdApi";
const store = useStore();
const isLogin = ref(false);
console.log("版本2.2.5------------");
console.log("版本2.2.6------------");
// 监听关闭浏览器
let time1 = ref(0);

View File

@@ -51,9 +51,8 @@ http.interceptors.response.use(
(response) => {
// console.log('response', response)
const {
data: {code, msg, show},
data: {code, msg ,show},
} = response;
console.log('code', code)
if (code === 0 || code === 200) {
return response;
}
@@ -65,7 +64,7 @@ http.interceptors.response.use(
localStorage.removeItem('refreshPage')
return Promise.reject(response);
}
show && message.error(msg);
show ? message.error(msg):message.error('系统接口数据异常,请联系管理员');
console.log("api %o", msg);
return Promise.reject(response);
},

View File

@@ -1,6 +1,8 @@
import {isRef, reactive, ref, toRefs, unref, watch, watchEffect} from "vue";
import {getCookieForName, throttle} from "@/api/method";
import JSONBigInt from "json-bigint";
import router from "@/router";
import {message} from "ant-design-vue";
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
@@ -346,5 +348,18 @@ export async function request(_url, params) {
return res.text();
}).then(res => {
return JSONBigIntStr.parse(res);
}).then(res => {
if (res.code === 0 || res.code === 200) {
return res;
}
if (res.code === 1000) {
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ?
router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) :
(window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath))
localStorage.removeItem('refreshPage')
return Promise.reject(res);
}
res.show ? message.error(res.msg):message.error('系统接口数据异常,请联系管理员');
return Promise.reject(res);
});
}

View File

@@ -65,7 +65,7 @@
<span style="margin-right: 3px">讨论设置</span>
</div>
<div class="btnbox">
<a-checkbox v-model:checked="formData.discussSettings" @click="formData.discussSettings = !formData.discussSettings">允许评论</a-checkbox>
<a-checkbox v-model:checked="formData.discussSettings" @click="discussSettings">允许评论</a-checkbox>
</div>
</div>
</div>
@@ -136,10 +136,14 @@ function openDrawer(i, row) {
console.log(i,row)
row && (formData.value = {...row.info});
(i >= 0) && (taskIndex.value = i);
row && (formData.value.discussSettings = row.info.discussSettings === "false" ? false : true);
row && (formData.value.discussSettings = row.info.discussSettings === "false" || row.info.discussSettings === false ? false : true);
visible.value = true
}
const discussSettings = () => {
formData.value.discussSettings = !formData.value.discussSettings;
}
defineExpose({openDrawer})
</script>
<style lang="scss">

View File

@@ -21,7 +21,7 @@
<iframe
id="iframe"
style="width: 100%; height: 100%;"
:src="iframeUrl + '/exam/viewanswer?id=' + datasource.answerId "
:src="iframeUrl + '/exam/viewanswer?id=' + answerId?answerId:datasource.answerId "
frameborder="0"
name="myframe"
security="restricted"
@@ -54,6 +54,10 @@ export default {
default: function () {
return {};
},
},
answerId:{
type: String,
default: "",
}
},
setup(props,ctx){

View File

@@ -22,17 +22,14 @@
style="border: 1px solid #f2f6fe"
:columns="tablecolumns"
:data-source="tabledata"
:loading="tableDataTotal === -1 ? true : false"
@expand="expandTable"
:pagination="false"
/>
<div class="pa">
<a-pagination
v-if="tableDataTotal > 10"
:showSizeChanger="false"
showQuickJumper="true"
hideOnSinglePage="true"
:showQuickJumper="true"
:hideOnSinglePage="true"
:pageSize="pageSize"
:current="currentPage"
:total="tableDataTotal"
@@ -138,7 +135,7 @@ export default {
studentScoreList(obj).then((res) => {
console.log("dede", res.data.data);
let result = res.data.data;
state.tableDataTotal = result.pageSize;
state.tableDataTotal = result.total;
if (result.pageSize > 0) {
setTable(result.rows);
}

View File

@@ -18,13 +18,11 @@
/>
</div>
<div class="main">
<div class="minatitl">
<div class="up1" style="font-weight: bolder">导入小组长</div>
<!--<div class="up2" @click="downTemplate" style="cursor: pointer">-->
<!--模板-->
<!--</div>-->
<div class="up1" v-if="templateUrl">
请下载
<a :href="templateUrl" target="_blank">模版</a>
按要求填写并导入
</div>
<div class="up1">请先导出小组填写小组长按要求填写数据并导入</div>
<div class="upload">
<div class="text">上传</div>
<div class="right">
@@ -65,7 +63,7 @@
<div class="curloading">
<div style="color: #387df7; margin-left: 20px; cursor: pointer"
v-if="file.uploadState?.status === 'FAILED'" @click="downloadErrorData(file.uploadState?.url)">
下载失败数据1
下载失败数据
</div>
</div>
</div>
@@ -129,10 +127,6 @@ const closeDrawer = () => {
function openDrawer() {
visible.value = true
}
//
// function downTemplate() {
// window.open(process.env.VUE_APP_BASE_API + props.templateUrl);
// }
function downloadErrorData(url) {
window.open(process.env.VUE_APP_FILE_PATH + url)

View File

@@ -121,7 +121,7 @@
</div>
</div>
</a-drawer>
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="answerDatasource"/>
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="answerDatasource" :answerId="answerId"/>
<!-- 查看作业抽屉 -->
<CKWork
v-model:CWvisible="CWvisible"
@@ -340,10 +340,11 @@ const batchFinish = () => {
};
const answerDatasource = ref(props.datasource);
const answerId = ref('');
const showExamAnswer = (answerId) => {
console.log(answerDatasource.value)
console.log(answerDatasource.value,answerId)
answerDatasource.value.answerId = answerId;
answerId.value = answerId;
CAvisible.value = true;
};

View File

@@ -85,10 +85,17 @@
<div
class="btn btn1"
style="margin-right: 20px"
@click="qrcodeVisible()"
@click="qrcodeVisibleSign()"
>
<div class="wz">签到二维码</div>
</div>
<div
class="btn btn1"
style="margin-right: 20px"
@click="qrcodeVisible()"
>
<div class="wz">开课二维码</div>
</div>
<CommonStudent
:type="3"
:isGroup="true"
@@ -103,7 +110,7 @@
添加学员
</a-button>
</CommonStudent>
<CommonImport title="导入学员" :template-url="stuTemplateUrl" :data="{ targetId: offcoursePlanId, type:3 }" :url="`/admin/student/importStudent`" name="uploadFile">
<CommonImport @change="change" title="导入学员" :template-url="stuTemplateUrl" :data="{ targetId: offcoursePlanId, type:3 }" :url="`/admin/student/importStudent`" name="uploadFile">
<div class="btn btn1" style="margin-right: 20px;margin-left: 20px">
<div class="img1"></div>
<div class="wz">导入学员</div>
@@ -370,12 +377,29 @@ function resetStudentPage() {
//二维码
const qrcodeVisible = () => {
qrCode({
title: "【签到】二维码",
title: "【开课】二维码",
name: props.datasource?.name,
// url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${props.datasource.id}&taskType=${props.datasource.type}&type=${props.type}`,
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/stu/project/redirectDetail?courseId=${data.value[coursePlanIndex.value]?.id}`,
});
};
// 签到二维码
const qrcodeVisibleSign = () => {
qrCode({
title: "【签到】二维码",
name: props.datasource?.name,
// url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${props.datasource.id}&taskType=${props.datasource.type}&type=${props.type}`,
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${data.value[coursePlanIndex.value]?.id}&taskType=${2}&type=${3}`,
});
};
const change = (e) => {
console.log(e)
if(e==="end"){
// 请求刷新数据
tableRef.value.fetch();
}
}
</script>

View File

@@ -374,7 +374,7 @@ const member = ref(false);
const dept = ref(false);
const projectStuTableRef = ref();
const stuTableRef = ref();
const projectParams = ref({ pid: props.infoId, type: props.infoType });
const projectParams = ref({ pid: props.infoId, type: props.infoType, studentName:"" });
const getProjectStu = () => projectStuTableRef.value.fetch();
const resetProjectStu = () => {
@@ -544,6 +544,8 @@ const orgRowSelection = computed(() => ({
const closeDrawer = () => {
deleteDepSelect();
audienceName.value.keyword = "";
auditTableRef.value.reset({ keyword: "" })
projectParams.value.studentName = "";
projectStuTableRef.value.reset();
visiable.value = false;
@@ -607,9 +609,16 @@ function onOrgSelectChange(e, l) {
deptList.value = l.selectedNodes;
}
const resetStu = () => stuTableRef.value.reset({ keyword: "", departId: null });
const resetStu = () => {
nameSearch.value.keyword = "";
stuTableRef.value.reset({ keyword: "", departId: null })
};
//清空选择部门信息
const deleteDepSelect = () => {
projectParams.value.studentName = "";
projectStuTableRef.value.reset();
audienceName.value.keyword = "";
auditTableRef.value.reset({ keyword: "" })
selectedOrgKeys.value = [];
projectSelectKeys.value = [];
};
@@ -618,7 +627,10 @@ const resetOrg = () => {
searchOrgName.value = { keyword: "", page: 1, pageSize: 10 };
};
//重置受众
const resetAudienceInfo = () => auditTableRef.value.reset({ keyword: "" });
const resetAudienceInfo = () => {
audienceName.value.keyword = "";
auditTableRef.value.reset({ keyword: "" })
};
//确定添加授权
const submitAuth = () => {

View File

@@ -1053,17 +1053,9 @@
<span style="margin-right: 3px">签到设置</span>
</div>
<div class="b_input">
<a-radio-group v-model:value="xjkkradioV1">
<a-radio :value="0" @click="clear_xjkkradioV1">
<span style="color: #6d7584; margin-right: 30px">
是否允许未报名的学员签到
</span>
</a-radio>
<!--
<a-radio :value="1" @click="clear_xjkkradioV1">
<span style="color: #6d7584">签到是否需要口令</span>
</a-radio>-->
</a-radio-group>
<a-checkbox v-model:checked="xjkkradioV1">
<span style="color: #6d7584">是否允许未报名的学员签到</span>
</a-checkbox>
</div>
</div>
@@ -1797,6 +1789,15 @@ const columns2 = [
customRender: ({ record: { courseName, routerName } }) =>
courseName || routerName || "开课",
},
{
title: "是否开课学员",
dataIndex: "infoType",
key: "infoType",
ellipsis: true,
width: "10%",
align: "center",
customRender: ({ record: { infoType } }) => infoType ===1 ? '是':'否'
},
{
title: "学习时间",
dataIndex: "lastStudyTime",
@@ -2570,7 +2571,7 @@ export default defineComponent({
kkinputV1: "",
kkinputV2: "",
//新建开课
xjkkradioV1: "",
xjkkradioV1: false,
completeType: "",
xjkkinputV1: "",
onceName: "",
@@ -3620,7 +3621,7 @@ export default defineComponent({
state.attach = "";
state.kk_eidt = false;
state.xjkkradioV1 = "";
state.xjkkradioV1 = false;
state.completeType = "";
state.xjkkinputV1 = "";
state.onceName = "";
@@ -3679,7 +3680,7 @@ export default defineComponent({
testId: state.examInfo.examinationName ? state.EditTestId : 0,
homeWorkId: state.EditWorkId,
name: state.xjkkinputV1,
signFlag: state.xjkkradioV1 === 0 ? 1 : 0, //是否允许未报名的签到:1是0否
signFlag: state.xjkkradioV1 ? 1 : 0, //是否允许未报名的签到:1是0否
// signWordFlag: state.xjkkradioV1 === 1 ? 1 : 0, //签到是否需要口令:1是0否
teacherId: state.member.value,
teacher: state.member.name,
@@ -3762,7 +3763,7 @@ export default defineComponent({
state.afterStartValue = item.afterStart; //考勤 开始后
if (item.signFlag === 1) {
//是否允许未报名的签到:1是0否
state.xjkkradioV1 = 0;
state.xjkkradioV1 = true;
}
state.member = { value: item.teacherId, name: item.teacher };
state.cstm_hs = true;
@@ -3999,7 +4000,7 @@ export default defineComponent({
};
const clear_xjkkradioV1 = (value) => {
if (value != "") {
state.xjkkradioV1 = "";
state.xjkkradioV1 = false;
}
};
const clear_xjkkradioV2 = (value) => {

View File

@@ -325,7 +325,7 @@
<div style="flex: 1">
<div class="onerow">
<div class="taskmain">任务大纲</div>
<ImpoterGroupLeader title="批量面授报名" :data="{targetId:routerId,type:2}" :url="`/admin/offcourse/importCourse`" :template-url="`/admin/router/exportTaskCoursePlan/${routerId}?type=1&taskType=2&thirdType=3`">
<ImpoterGroupLeader title="批量面授报名" :data="{targetId:routerId,type:2}" :url="`/admin/offcourse/importCourse`" :template-url="templateUrl">
<button class="btn">批量面授报名</button>
</ImpoterGroupLeader>
<router-link
@@ -1691,6 +1691,7 @@ export default {
isreload: true,
TaskFaceImpStuvisible: false,
uploadAction: process.env.VUE_APP_BASE_API + "/file/uploadunlimit",
templateUrl:process.env.VUE_APP_FILE_PATH+process.env.VUE_APP_FACE_STUDENT_TEMPLATE
});
const levelList = reactive({

View File

@@ -463,7 +463,7 @@
title="批量面授报名"
:data="{ targetId: projectId, type: 1 }"
:url="`/admin/offcourse/importCourse`"
:template-url="`/admin/project/exportTaskCoursePlan/${projectId}?type=1&taskType=2&thirdType=3`"
:template-url="templateUrl"
>
<button class="btn">批量面授报名</button>
</ImpoterGroupLeader>
@@ -816,9 +816,9 @@
<span class="btn1text">导出小组</span>
</div>
<ImpoterGroupLeader
title="导入小组长"
:data="{ targetId: projectId, type: 1 }"
:url="`/admin/studentGroup/importGroup`"
:template-url="`/admin/studentGroup/exportGroup/${projectId}`"
>
<div class="btn1">
<span class="btn1text">导入小组长</span>
@@ -2842,6 +2842,7 @@ export default {
certificatelist: [],
fileUrl: process.env.VUE_APP_FILE_PATH,
uploadAction: process.env.VUE_APP_BASE_API + "/file/uploadunlimit",
templateUrl:process.env.VUE_APP_FILE_PATH+process.env.VUE_APP_FACE_STUDENT_TEMPLATE
});
// 排行榜 - start
// 积分排行榜 Top10