mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 10:56:46 +08:00
修改522
This commit is contained in:
@@ -133,7 +133,7 @@ export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', o
|
||||
//获取用户登录
|
||||
export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true })
|
||||
//公共信息---------------------------------------------------
|
||||
|
||||
export const courseData =(obj)=> http.post("/admin/offcourse/allPlanList",obj);
|
||||
//添加项目学员
|
||||
export const addStudentProject = (obj) => http.post('/admin/project/addStudent', obj)
|
||||
//添加课程学员
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<span style="margin-right: 3px">面授时间</span>
|
||||
</div>
|
||||
<div class="select fitems">
|
||||
<a-range-picker
|
||||
<!-- <a-range-picker
|
||||
style="width: 88%; height: 40px; border-radius: 8px"
|
||||
:show-time="{ format: 'HH:mm' }"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
@@ -135,6 +135,28 @@
|
||||
separator="至"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
:disabled="editBeginClass"
|
||||
/> -->
|
||||
<a-date-picker
|
||||
style="width: 41%; height: 40px; border-radius: 8px"
|
||||
:show-time="{ format: 'HH:mm' }"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
valueFormat="YYYY-MM-DD HH:mm"
|
||||
v-model:value="dateTime[0]"
|
||||
@change="timeChange"
|
||||
:placeholder="' 开始时间'"
|
||||
:disabled="editBeginClass"
|
||||
/>
|
||||
<span style="margin: 0 10px;">至</span>
|
||||
<!-- 第二个日期选择器,用于结束时间 -->
|
||||
<a-date-picker
|
||||
style="width: 41%; height: 40px; border-radius: 8px"
|
||||
:show-time="{ format: 'HH:mm' }"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
valueFormat="YYYY-MM-DD HH:mm"
|
||||
v-model:value="dateTime[1]"
|
||||
@change="timeChangeEnd"
|
||||
:placeholder="' 结束时间'"
|
||||
:disabled="editBeginClass"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -530,12 +552,13 @@ const formDataRule = {
|
||||
const { validate } = Form.useForm(formData, formDataRule);
|
||||
const durationText = computed(() => dateTime.value?.length?dayjs(dateTime.value[1]).diff(dayjs(dateTime.value[0]),'minute'):'请输入持续时间');
|
||||
function timeChange(time, timeStr) {
|
||||
formData.value.beginTime = timeStr[0];
|
||||
formData.value.endTime = timeStr[1];
|
||||
formData.value.beginTime = timeStr;
|
||||
// formData.value.duration = durationText.value
|
||||
// formData.value.duration || (formData.value.duration = dayjs(timeStr[1]).diff(dayjs(timeStr[0]),'minute'))
|
||||
}
|
||||
|
||||
function timeChangeEnd(time,timeStr){
|
||||
formData.value.endTime = timeStr;
|
||||
}
|
||||
function search() {
|
||||
tableRef.value.fetch();
|
||||
}
|
||||
@@ -569,6 +592,7 @@ const createNewCourse = () => {
|
||||
type: props.type,
|
||||
offcourseId: params.value.offcourseId,
|
||||
draftTaskId: params.value.draftTaskId,
|
||||
name:courseName.value
|
||||
});
|
||||
dateTime.value = [];
|
||||
validated.value = 0;
|
||||
@@ -602,6 +626,10 @@ async function coursePlanConfirm() {
|
||||
message.info('讲师费已进入审批阶段,无法编辑')
|
||||
return
|
||||
}
|
||||
if(dateTime.value.length<2){
|
||||
message.info('请选择开始时间和结束时间')
|
||||
return
|
||||
}
|
||||
await validate().catch(({ errorFields }) => {
|
||||
message.warning(errorFields[0].errors.join());
|
||||
throw Error("数据校验不通过");
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@click="qrcodeVisibleSign()"
|
||||
:class="{ 'notClick': courseSelectRows.length > 0 }"
|
||||
>
|
||||
<div class="wz">签到二维码</div>
|
||||
</div>
|
||||
@@ -94,6 +95,7 @@
|
||||
style="margin-right: 20px"
|
||||
v-if="data[coursePlanIndex]?.assessmentId"
|
||||
@click="qrcodeAssement()"
|
||||
:class="{ 'notClick': courseSelectRows.length > 0 }"
|
||||
>
|
||||
<div class="wz">评估二维码</div>
|
||||
</div>
|
||||
@@ -101,6 +103,7 @@
|
||||
class="btn btn1"
|
||||
style="margin-right: 20px"
|
||||
@click="qrcodeVisible()"
|
||||
:class="{ 'notClick': courseSelectRows.length > 0 }"
|
||||
>
|
||||
<div class="wz">开课二维码</div>
|
||||
</div>
|
||||
@@ -112,14 +115,14 @@
|
||||
:infoType="type"
|
||||
@finash="submitCall"
|
||||
>
|
||||
<a-button class="cus-btn" style="background: #4ea6ff; color: #fff">
|
||||
<a-button :class="{ 'notClick': courseSelectRows.length > 0 }" :disabled="courseSelectRows.length>0" class="cus-btn" style="background: #4ea6ff; color: #fff">
|
||||
<template #icon><img style="margin-right: 10px" src="../../../assets/images/courseManage/add0.png"/>
|
||||
</template>
|
||||
添加学员
|
||||
</a-button>
|
||||
</CommonStudent>
|
||||
<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="btn btn1" style="margin-right: 20px;margin-left: 20px" :class="{ 'notClick': courseSelectRows.length > 0 }">
|
||||
<div class="img1"></div>
|
||||
<div class="wz">导入学员</div>
|
||||
</div>
|
||||
@@ -127,18 +130,18 @@
|
||||
<div class="btn btn1" @click="batchSign" style="margin-right: 20px">
|
||||
<div class="wz">批量签到</div>
|
||||
</div>
|
||||
<div class="btn btn1" @click="exportTaskStu" style="margin-right: 20px">
|
||||
<div class="btn btn1" @click="exportTaskStu" style="margin-right: 20px" :class="{ 'notClick': courseSelectRows.length > 0 }">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出签到数据</div>
|
||||
</div>
|
||||
<div class="btn btn1" @click="exportAssessment" v-if="data[coursePlanIndex]?.assessmentId">
|
||||
<div class="btn btn1" @click="exportAssessment" v-if="data[coursePlanIndex]?.assessmentId" :class="{ 'notClick': courseSelectRows.length > 0 }">
|
||||
<div class="img2"></div>
|
||||
<div class="wz">导出评估数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tableBox" style="margin-top: 30px">
|
||||
<BaseTable ref="tableRef" :url="STUDENT_LIST" v-model:params="params" :columns="columns" :init="false"
|
||||
v-model:selectedRows="courseSelectRows"
|
||||
v-model:selectedRows="courseSelectRows" :showSizeChanger="true"
|
||||
type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -424,18 +427,21 @@ const qrcodeVisible = () => {
|
||||
const qrcodeVisibleSign = () => {
|
||||
qrCode({
|
||||
title: "【签到】二维码",
|
||||
name: openCourseName.value?openCourseName.value:data.value[0]?.name,
|
||||
name: openCourseName.value?openCourseName.value:data.value[0]?.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 qrcodeAssement = () =>{
|
||||
console.log(data,'data')
|
||||
qrCode({
|
||||
title: "【评估】二维码",
|
||||
name: data.value[coursePlanIndex.value]?.assessmentName,
|
||||
// name: data.value[coursePlanIndex.value]?.assessmentName + '课程评估',
|
||||
name: openCourseName.value?openCourseName.value:data.value[0]?.name + '课程评估',
|
||||
url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${data.value[coursePlanIndex.value]?.id}&type=3&infoId=${data.value[coursePlanIndex.value]?.id}&courseId=${data.value[coursePlanIndex.value].assessmentId}&chapterOrStageId=0`,
|
||||
});
|
||||
const a = {url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${data.value[coursePlanIndex.value]?.id}&type=3&infoId=${data.value[coursePlanIndex.value]?.id}&courseId=${data.value[coursePlanIndex.value].assessmentId}&chapterOrStageId=0`}
|
||||
console.log(a,'aaaa')
|
||||
}
|
||||
|
||||
const change = (e) => {
|
||||
@@ -449,6 +455,17 @@ const change = (e) => {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.notClick{
|
||||
cursor: pointer;
|
||||
pointer-events: none;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #3b3c3c !important;
|
||||
border-radius: 8px;
|
||||
color: #fff !important;
|
||||
background-color: #3b3c3c !important;
|
||||
}
|
||||
|
||||
.me {
|
||||
.ant-modal-body {
|
||||
padding: 0px;
|
||||
|
||||
@@ -45,9 +45,13 @@ const id = computed(() => {
|
||||
});
|
||||
|
||||
const emit = defineEmits({});
|
||||
|
||||
const secondItem = store.state.project_level.find((e, index) => index === 1);
|
||||
const options = computed(() =>
|
||||
store.state.project_level.map((e) => ({
|
||||
store.state.project_level
|
||||
.sort((a, b) => parseInt(b.value) - parseInt(a.value))
|
||||
.filter((e) => e != secondItem)
|
||||
.concat(secondItem)
|
||||
.map((e) => ({
|
||||
value: parseInt(e.value),
|
||||
label: e.name,
|
||||
}))
|
||||
|
||||
@@ -641,9 +641,26 @@
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
@click="showCodeModel(item)"
|
||||
v-if="item.type !== 2"
|
||||
>
|
||||
二维码
|
||||
</div>
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
@click="qrcodeVisible(item)"
|
||||
v-if="item.type == 2"
|
||||
>
|
||||
签到二维码
|
||||
</div>
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer"
|
||||
@click="qrcodeAssement(item)"
|
||||
v-if="item.type == 2"
|
||||
>
|
||||
评估二维码
|
||||
</div>
|
||||
<div
|
||||
class="operation"
|
||||
style="cursor: pointer; margin-right: 10px"
|
||||
@@ -1653,13 +1670,13 @@
|
||||
:createId="createId"
|
||||
/>
|
||||
<!-- 面授学员抽屉 -->
|
||||
<RouterFaceStu
|
||||
:permissions="permissions"
|
||||
:createId="createId"
|
||||
v-model:FSvisible="FSvisible"
|
||||
:datasource="facestudent"
|
||||
:type="1"
|
||||
/>
|
||||
<RouterFaceStu
|
||||
:permissions="permissions"
|
||||
:createId="createId"
|
||||
v-model:FSvisible="FSvisible"
|
||||
:datasource="facestudent"
|
||||
:type="1"
|
||||
/>
|
||||
<!-- 活动直播考勤抽屉 -->
|
||||
<active-attendance
|
||||
:permissions="permissions"
|
||||
@@ -2321,10 +2338,13 @@ import TrainClass from "@/components/project/TrainClass";
|
||||
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||
import TableStudent from "@/components/student/TableStudent";
|
||||
import TableCertificateStudent from "@/components/student/TableCertificateStudent";
|
||||
import { getStuPage } from "@/api/index1";
|
||||
import { getStuPage,courseData } from "@/api/index1";
|
||||
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
|
||||
import { checkPer,fixDoublePer } from "@/utils/utils";
|
||||
import ImpoterGroupLeader from "@/components/drawers/project/ImpoterGroupLeader.vue";
|
||||
import qrCode from "@/utils/qrCode";
|
||||
import {COURSE_PLAN_LIST} from "@/api/apis";
|
||||
import {useRequest} from "@/api/request";
|
||||
export default {
|
||||
name: "taskPage",
|
||||
components: {
|
||||
@@ -2361,6 +2381,38 @@ export default {
|
||||
ImpoterGroupLeader,
|
||||
},
|
||||
setup() {
|
||||
const qrcodeVisible = async (item)=>{
|
||||
console.log(item,'item')
|
||||
const planParams = {
|
||||
type: 1,
|
||||
offcourseId: item.courseId,
|
||||
taskId: item.id
|
||||
};
|
||||
courseData(planParams).then((res)=>{
|
||||
qrCode({
|
||||
title: "【签到】二维码",
|
||||
name: res.data.data[0].name + '课程签到',
|
||||
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${res.data.data[0].id}&taskType=${2}&type=${3}`,
|
||||
});
|
||||
})
|
||||
}
|
||||
const qrcodeAssement = async (item)=>{
|
||||
const planParams = {
|
||||
type: 1,
|
||||
offcourseId: item.courseId,
|
||||
taskId: item.id
|
||||
};
|
||||
courseData(planParams).then((res)=>{
|
||||
const assessment = res.data.data[0];
|
||||
console.log(assessment,'assessment')
|
||||
qrCode({
|
||||
title: "【评估】二维码",
|
||||
name: res.data.data[0].name + '课程评估',
|
||||
url: `${location.protocol}//${location.host}/student-h5/investigatpage?id=${res.data.data[0].id}&type=3&infoId=${res.data.data[0].id}&courseId=${res.data.data[0].assessmentId}&chapterOrStageId=0`,
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
const store = useStore();
|
||||
const route = useRoute();
|
||||
const headers = { token: getCookieForName("token") };
|
||||
@@ -5037,7 +5089,11 @@ export default {
|
||||
studytimeRank,
|
||||
xsSelectChange,
|
||||
changePagination,
|
||||
handleChangeGroupLeader
|
||||
handleChangeGroupLeader,
|
||||
qrcodeVisible,
|
||||
qrcodeAssement,
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user