mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-07 01:46:43 +08:00
修改错乱代码
This commit is contained in:
@@ -148,7 +148,7 @@
|
||||
@blur="onBlurStart"
|
||||
@focus="onFocusStart"
|
||||
@select="onDateSelect"
|
||||
:open.sync="openStart"
|
||||
:open="openStart"
|
||||
@ok="onOkStart"
|
||||
ref="datePicker"
|
||||
/>
|
||||
@@ -174,7 +174,7 @@
|
||||
</div>
|
||||
|
||||
<div class="cstm_items" style="align-items: baseline;">
|
||||
<div class="signbox">
|
||||
<div class="signbox" style="position: relative;top: -5px;">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
@@ -194,8 +194,8 @@
|
||||
<a-input-number :min="0" @change="inputWeightChange(index)" v-model:value="item.weight" placeholder="%"/>
|
||||
<span style="margin-top: 10px;width: 34px;">权重</span>
|
||||
<div style="display: flex;">
|
||||
<a-button shape="circle" class="btn-circle btn-add" @click="inputAdd">+</a-button>
|
||||
<a-button shape="circle" class="btn-circle" @click="inputRemove(index)" :disabled="formData.offteachers.length == 1">-</a-button>
|
||||
<a-button v-if="index===0" shape="circle" class="btn-circle btn-add" @click="inputAdd">+</a-button>
|
||||
<a-button shape="circle" class="btn-circle" @click="inputRemove(index)" :disabled="formData.offteachers.length == 1"><template #icon><delete-outlined class="custom-icon"/></template></a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -437,6 +437,7 @@ import { validateName } from "@/api/index1";
|
||||
import moment from 'moment';
|
||||
import * as api from "../../api/indexTaskadd";
|
||||
import {useRoute} from "vue-router";
|
||||
import { DeleteOutlined } from '@ant-design/icons-vue';
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
});
|
||||
@@ -655,8 +656,8 @@ function timeChange(timeStr) {
|
||||
function onDateSelect(date) {
|
||||
const month = String(date.$M+1).padStart(2, '0')
|
||||
const day = String(date.$D).padStart(2, '0')
|
||||
const hour = String(date.$D).padStart(2, '0')
|
||||
const minute = String(date.$D).padStart(2, '0')
|
||||
const hour = String(date.$H).padStart(2, '0')
|
||||
const minute = String(date.$m).padStart(2, '0')
|
||||
dateTime.value[0]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute
|
||||
}
|
||||
const openStart = ref(false)
|
||||
@@ -693,8 +694,8 @@ function onBlurEnd(e){
|
||||
function onDateEnd(date) {
|
||||
const month = String(date.$M+1).padStart(2, '0')
|
||||
const day = String(date.$D).padStart(2, '0')
|
||||
const hour = String(date.$D).padStart(2, '0')
|
||||
const minute = String(date.$D).padStart(2, '0')
|
||||
const hour = String(date.$H).padStart(2, '0')
|
||||
const minute = String(date.$m).padStart(2, '0')
|
||||
dateTime.value[1]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute
|
||||
}
|
||||
function onFocusEnd(){
|
||||
@@ -740,8 +741,9 @@ const confirm = async()=>{
|
||||
projectInfo.value = res.data.data
|
||||
});
|
||||
request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value });
|
||||
projectInfo.value.projectInfo.status=3
|
||||
request(PROJECT_RELEASE, {projectId: route.query.projectId})
|
||||
if(projectInfo.value.projectInfo.status==3){
|
||||
request(PROJECT_RELEASE, {projectId: route.query.projectId})
|
||||
}
|
||||
emit('call-parent-method');
|
||||
}
|
||||
|
||||
@@ -753,7 +755,7 @@ const createNewCourse = () => {
|
||||
draftTaskId: params.value.draftTaskId,
|
||||
name:courseName.value
|
||||
});
|
||||
dateTime.value = [moment().format('YYYY-MM-DD HH:mm'),moment().format('YYYY-MM-DD HH:mm')];
|
||||
dateTime.value = [moment().format('YYYY-MM-DD HH:mm'),''];
|
||||
validated.value = 0;
|
||||
onceName.value = "";
|
||||
formData.value.offteachers = [
|
||||
@@ -858,8 +860,9 @@ async function coursePlanConfirm() {
|
||||
projectInfo.value = res.data.data
|
||||
});
|
||||
request(PROJECT_DETAIL_MODIFY, { ...projectInfo.value });
|
||||
projectInfo.value.projectInfo.status=3
|
||||
request(PROJECT_RELEASE, {projectId: route.query.projectId})
|
||||
if(projectInfo.value.projectInfo.status==3){
|
||||
request(PROJECT_RELEASE, {projectId: route.query.projectId})
|
||||
}
|
||||
emit('call-parent-method');
|
||||
handleCancelStu();
|
||||
tableRef.value.fetch();
|
||||
@@ -914,6 +917,11 @@ const changevalue = (e) => {
|
||||
const logT = () => {
|
||||
formData.value.examInfo = {};
|
||||
};
|
||||
const removePG = () => {
|
||||
formData.value.assessmentId = null;
|
||||
formData.value.assessmentName = "";
|
||||
// state.isEvaluate = "0";
|
||||
};
|
||||
|
||||
defineExpose({ openDrawer });
|
||||
</script>
|
||||
@@ -1378,6 +1386,7 @@ defineExpose({ openDrawer });
|
||||
border-radius: 8px !important;
|
||||
border: 1px solid #C7CBD2 !important;
|
||||
margin: 0 10px 0 10px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
}
|
||||
.btn-add{
|
||||
@@ -1387,6 +1396,12 @@ defineExpose({ openDrawer });
|
||||
text-align: center;
|
||||
line-height: 100%;
|
||||
margin-top: 5px;
|
||||
.custom-icon{
|
||||
font-size: 20px;
|
||||
svg{
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
span{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -439,23 +439,87 @@ function resetStudentPage() {
|
||||
|
||||
//二维码
|
||||
const qrcodeVisible = () => {
|
||||
qrCode({
|
||||
title: "【开课】二维码",
|
||||
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}/stu/project/redirectDetail?courseId=${data.value[coursePlanIndex.value]?.id}`,
|
||||
});
|
||||
// const startName = openCourseName.value?openCourseName.value:data.value[0]?.name
|
||||
// if(data.value){
|
||||
// qrCode({
|
||||
// title: "【开课】二维码",
|
||||
// name: startName,
|
||||
// // 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}`,
|
||||
// });
|
||||
// }else{
|
||||
// const errorMessage = `二维码生成失败,请联系运维人员 ,参数{ name : ${startName},url:${data.value[coursePlanIndex.value]?.id}}`
|
||||
// message.error(errorMessage);
|
||||
// }
|
||||
let startName;
|
||||
if (openCourseName.value) {
|
||||
startName = openCourseName.value;
|
||||
} else if (Array.isArray(data.value) && data.value.length > 0 && data.value[0]?.name) {
|
||||
startName = data.value[0].name;
|
||||
} else {
|
||||
const errorMessage = '二维码生成失败,请联系运维人员 ,参数{ name : 课程名称未找到,url:未指定}'
|
||||
message.error(errorMessage);
|
||||
return;
|
||||
}
|
||||
let courseId;
|
||||
if (Array.isArray(data.value) && coursePlanIndex.value !== undefined && data.value[coursePlanIndex.value]?.id) {
|
||||
courseId = data.value[coursePlanIndex.value].id;
|
||||
} else {
|
||||
const errorMessage = `二维码生成失败,请联系运维人员 ,参数{ name : ${startName},url:未找到}`;
|
||||
message.error(errorMessage);
|
||||
return;
|
||||
}
|
||||
if (courseId && startName) {
|
||||
qrCode({
|
||||
title: "【开课】二维码",
|
||||
name: startName,
|
||||
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/stu/project/redirectDetail?courseId=${courseId}`,
|
||||
});
|
||||
}
|
||||
};
|
||||
// 签到二维码
|
||||
const qrcodeVisibleSign = () => {
|
||||
qrCode({
|
||||
title: "【签到】二维码",
|
||||
courseName: props.courseName + '项目',
|
||||
createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '),
|
||||
name: openCourseName.value?openCourseName.value:data.value[coursePlanIndex.value]?.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 signName = openCourseName.value?openCourseName.value:data.value[coursePlanIndex.value]?.name
|
||||
// if(data.value){
|
||||
// qrCode({
|
||||
// title: "【签到】二维码",
|
||||
// courseName: props.courseName + '项目',
|
||||
// createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '),
|
||||
// name: signName + '课程签到',
|
||||
// // 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}`,
|
||||
// });
|
||||
// }else{
|
||||
// const errorMessage = `二维码生成失败,请联系运维人员 ,参数{ name : ${signName},url:${data.value[coursePlanIndex.value]?.id}}`
|
||||
// message.error(errorMessage);
|
||||
// }
|
||||
let signName;
|
||||
if (openCourseName.value) {
|
||||
signName = openCourseName.value;
|
||||
} else if (Array.isArray(data.value) && data.value.length > 0 && coursePlanIndex.value !== undefined && data.value[coursePlanIndex.value]?.name) {
|
||||
signName = data.value[coursePlanIndex.value].name;
|
||||
} else {
|
||||
const errorMessage = '二维码生成失败,请联系运维人员 ,参数{ name : 签到课程名称未找到,url:未指定}'
|
||||
message.error(errorMessage);
|
||||
return;
|
||||
}
|
||||
let taskId;
|
||||
if (Array.isArray(data.value) && data.value.length > 0 && coursePlanIndex.value !== undefined && data.value[coursePlanIndex.value]?.id) {
|
||||
taskId = data.value[coursePlanIndex.value].id;
|
||||
} else {
|
||||
const errorMessage = `二维码生成失败,请联系运维人员 ,参数{ name : ${signName},url:未找到}`;
|
||||
message.error(errorMessage);
|
||||
return;
|
||||
}
|
||||
if (taskId && signName) {
|
||||
qrCode({
|
||||
title: "【签到】二维码",
|
||||
courseName: props.courseName + '项目',
|
||||
createName: data.value[coursePlanIndex.value].offteachers.map(teacher => teacher.teacherName).join(', '),
|
||||
name: signName + '课程签到',
|
||||
url: `${location.protocol}//${location.host}${process.env.VUE_APP_BASE_API}/admin/student/studentSign?taskId=${taskId}&taskType=${2}&type=${3}`,
|
||||
});
|
||||
}
|
||||
};
|
||||
const qrcodeAssement = () =>{
|
||||
qrCode({
|
||||
|
||||
@@ -85,7 +85,7 @@ watch(props, () => {
|
||||
isExistName.value = true;
|
||||
}
|
||||
modelV.value.value = props.value;
|
||||
});
|
||||
},{immediate: true});
|
||||
|
||||
watch(() => modelV.value.value, () => {
|
||||
emit("update:validated", 1);
|
||||
|
||||
@@ -1015,7 +1015,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="cstm_items" style="align-items: baseline;">
|
||||
<div class="signbox">
|
||||
<div class="signbox" style="position: relative;top: -5px">
|
||||
<div class="sign">
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
@@ -1040,8 +1040,8 @@
|
||||
<a-input-number :min="0" @change="inputWeightChange(index)" v-model:value="item.weight" placeholder="%"/>
|
||||
<span style="margin-top: 10px;width: 34px;">权重</span>
|
||||
<div style="display: flex;">
|
||||
<a-button shape="circle" class="btn-circle btn-add" @click="inputAdd">+</a-button>
|
||||
<a-button shape="circle" class="btn-circle" @click="inputRemove(index)" :disabled="offteachers.length == 1">-</a-button>
|
||||
<a-button v-if="index===0" shape="circle" class="btn-circle btn-add" @click="inputAdd">+</a-button>
|
||||
<a-button shape="circle" class="btn-circle" @click="inputRemove(index)" :disabled="offteachers.length == 1"><delete-outlined class="custom-icon"/></a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1814,6 +1814,7 @@ import DropDown from "@/components/common/DropDown";
|
||||
import { checkPer, checkOwner } from "@/utils/utils";
|
||||
import dayjs from "dayjs";
|
||||
import {duration} from "moment";
|
||||
import { DeleteOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
//列表表格
|
||||
|
||||
@@ -2236,6 +2237,7 @@ export default defineComponent({
|
||||
// },
|
||||
addOnlineCourse,
|
||||
TwoDimensionalCode,
|
||||
DeleteOutlined
|
||||
},
|
||||
setup() {
|
||||
const CourseModalRef = ref(null);
|
||||
@@ -2898,8 +2900,8 @@ export default defineComponent({
|
||||
function onDateSelect(date) {
|
||||
const month = String(date.$M+1).padStart(2, '0')
|
||||
const day = String(date.$D).padStart(2, '0')
|
||||
const hour = String(date.$D).padStart(2, '0')
|
||||
const minute = String(date.$D).padStart(2, '0')
|
||||
const hour = String(date.$H).padStart(2, '0')
|
||||
const minute = String(date.$m).padStart(2, '0')
|
||||
state.xjkkinputV3[0]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute
|
||||
}
|
||||
const openStart = ref(false)
|
||||
@@ -2927,8 +2929,8 @@ function onFocusStart(){
|
||||
function onDateEnd(date) {
|
||||
const month = String(date.$M+1).padStart(2, '0')
|
||||
const day = String(date.$D).padStart(2, '0')
|
||||
const hour = String(date.$D).padStart(2, '0')
|
||||
const minute = String(date.$D).padStart(2, '0')
|
||||
const hour = String(date.$H).padStart(2, '0')
|
||||
const minute = String(date.$m).padStart(2, '0')
|
||||
state.xjkkinputV3[1]=date.$y+'-'+month+'-'+day+' '+hour+':'+minute
|
||||
}
|
||||
const openEnd = ref(false)
|
||||
@@ -3812,7 +3814,7 @@ function onFocusEnd(){
|
||||
teacherName: "",
|
||||
weight: '',
|
||||
}]
|
||||
state.xjkkinputV3 = [moment().format('YYYY-MM-DD HH:mm'),moment().format('YYYY-MM-DD HH:mm')]
|
||||
state.xjkkinputV3 = [moment().format('YYYY-MM-DD HH:mm'),'']
|
||||
state.cstm_hs = true;
|
||||
};
|
||||
const handleCancelStu = () => {
|
||||
@@ -5761,6 +5763,7 @@ function onFocusEnd(){
|
||||
border-radius: 8px !important;
|
||||
border: 1px solid #C7CBD2 !important;
|
||||
margin: 0 10px 0 10px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
.btn-add{
|
||||
margin: 0 10px 0 10px;
|
||||
@@ -5769,6 +5772,12 @@ function onFocusEnd(){
|
||||
text-align: center;
|
||||
line-height: 100%;
|
||||
margin-top: 5px;
|
||||
.custom-icon{
|
||||
font-size: 20px;
|
||||
svg{
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
span{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -999,7 +999,7 @@
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="5" tab="项目积分">
|
||||
<a-tab-pane key="5" tab="项目积分" v-if="rankFlag">
|
||||
<ProjectScore
|
||||
v-if="activeKey == '5'"
|
||||
:permissions="permissions"
|
||||
|
||||
Reference in New Issue
Block a user