# Conflicts:
#	package-lock.json
This commit is contained in:
dongruihua
2023-02-23 09:15:04 +08:00
22 changed files with 264 additions and 466 deletions

View File

@@ -16,6 +16,7 @@
"@wangeditor/editor-for-vue": "^5.1.12", "@wangeditor/editor-for-vue": "^5.1.12",
"ant-design-vue": "^3.2.12", "ant-design-vue": "^3.2.12",
"axios": "^1.1.3", "axios": "^1.1.3",
"babel-eslint": "^10.1.0",
"core-js": "^3.8.3", "core-js": "^3.8.3",
"dayjs": "^1.11.6", "dayjs": "^1.11.6",
"echarts": "^5.4.1", "echarts": "^5.4.1",

View File

@@ -26,7 +26,7 @@
</div> </div>
<div class="endtime" style="margin-left: 64px">签到时间{{beginTime}}</div> <div class="endtime" style="margin-left: 64px">签到时间{{beginTime}}</div>
<!-- <div class="endtime" style="margin-left: 40px">签退时间{{endTime}}</div> --> <div class="endtime" style="margin-left: 40px">签退时间{{endTime}}</div>
</div> </div>
<div class="search"> <div class="search">

View File

@@ -293,7 +293,7 @@ const disabledDate = (current) => {
}; };
const disabledRangeTime = () => ({ const disabledRangeTime = () => ({
disabledHours: () => range(0, 24).splice(4, 20), // disabledHours: () => range(0, 24).splice(4, 20),
disabledMinutes: () => range(30, 60), disabledMinutes: () => range(30, 60),
disabledSeconds: () => [55, 56], disabledSeconds: () => [55, 56],
}); });

View File

@@ -153,7 +153,7 @@ const disabledDate = (current) => {
}; };
const disabledRangeTime = () => ({ const disabledRangeTime = () => ({
disabledHours: () => range(0, 24).splice(4, 20), // disabledHours: () => range(0, 24).splice(4, 20),
disabledMinutes: () => range(30, 60), disabledMinutes: () => range(30, 60),
disabledSeconds: () => [55, 56], disabledSeconds: () => [55, 56],
}); });

View File

@@ -452,7 +452,7 @@ const disabledDate = (current) => {
}; };
const disabledRangeTime = () => ({ const disabledRangeTime = () => ({
disabledHours: () => range(0, 24).splice(4, 20), // disabledHours: () => range(0, 24).splice(4, 20),
disabledMinutes: () => range(30, 60), disabledMinutes: () => range(30, 60),
disabledSeconds: () => [55, 56], disabledSeconds: () => [55, 56],
}); });

View File

@@ -20,6 +20,7 @@
<div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;"> <div style="display: flex; flex-direction: row; padding-top: 0px; margin-top: 20px; margin-left: 32px;">
<div> <div>
<button <button
:disabled="taskIndex >= 0"
style="width: 100px; cursor: pointer;" style="width: 100px; cursor: pointer;"
@click="changeOuter(1)" @click="changeOuter(1)"
:class="formData.examType === 1 ? 'outer' : 'notOuter'" :class="formData.examType === 1 ? 'outer' : 'notOuter'"
@@ -27,6 +28,7 @@
系统考试 系统考试
</button> </button>
<button <button
:disabled="taskIndex >= 0"
style="width: 100px; cursor: pointer;" style="width: 100px; cursor: pointer;"
@click="changeOuter(2)" @click="changeOuter(2)"
:class="formData.examType === 2 ? 'outer' : 'notOuter'" :class="formData.examType === 2 ? 'outer' : 'notOuter'"
@@ -54,6 +56,7 @@
style="width: 400px; height: 40px; border-radius: 8px" style="width: 400px; height: 40px; border-radius: 8px"
placeholder="请输入考试名称" placeholder="请输入考试名称"
:maxlength="20" :maxlength="20"
:disabled="taskIndex >= 0"
/> />
</div> </div>
</div> </div>
@@ -68,14 +71,14 @@
</div> </div>
<span style="margin-right: 3px">选择试卷</span> <span style="margin-right: 3px">选择试卷</span>
</div> </div>
<s-test v-model:id="formData.examinationTestId" v-model:name="formData.examinationTestName"> <s-test v-model:id="formData.examinationPaperId" v-model:name="formData.examinationTestName">
<div class="btnbox"> <div class="btnbox">
<button class="xkbtn" style="margin:0"> <button class="xkbtn" style="margin:0" :disabled="taskIndex >= 0">
{{ formData.examinationTestId ? "重选" : "选择" }}试卷 {{ formData.examinationPaperId ? "重选" : "选择" }}试卷
</button> </button>
</div> </div>
</s-test> </s-test>
<div v-if="formData.examinationTestId"> <div v-if="formData.examinationPaperId">
<a-tag closable color="processing" @close="delTag" :closeIcon="true"> <a-tag closable color="processing" @close="delTag" :closeIcon="true">
<span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span> <span style="font-size: 14px; line-height: 33px">{{ formData.examinationTestName }}</span>
</a-tag> </a-tag>
@@ -117,6 +120,7 @@
</div> </div>
<div class="select"> <div class="select">
<a-input-number <a-input-number
:disabled="taskIndex >= 0"
:min="0" :min="0"
:max="300" :max="300"
:precision="0" :precision="0"
@@ -138,6 +142,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input <a-input
:disabled="taskIndex >= 0"
v-model:value="formData.passLine" v-model:value="formData.passLine"
type="number" type="number"
style="width: 400px; height: 40px; border-radius: 8px" style="width: 400px; height: 40px; border-radius: 8px"
@@ -152,6 +157,7 @@
</div> </div>
<div class="textarea"> <div class="textarea">
<a-textarea <a-textarea
:disabled="taskIndex >= 0"
v-model:value="formData.examinationExplain" v-model:value="formData.examinationExplain"
placeholder="请输入考试说明" placeholder="请输入考试说明"
allow-clear allow-clear
@@ -170,6 +176,7 @@
<div class="timerbox"> <div class="timerbox">
<span>允许重复考试</span> <span>允许重复考试</span>
<a-input-number <a-input-number
:disabled="taskIndex >= 0"
:min="-1" :min="-1"
:max="300" :max="300"
:precision="0" :precision="0"
@@ -194,6 +201,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="taskIndex >= 0"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="formData.showAnswers" v-model:value="formData.showAnswers"
> >
@@ -208,6 +216,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="taskIndex >= 0"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="formData.showAnalysis" v-model:value="formData.showAnalysis"
> >
@@ -222,6 +231,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="taskIndex >= 0"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="formData.scoringModel" v-model:value="formData.scoringModel"
> >
@@ -238,6 +248,7 @@
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group <a-radio-group
:disabled="taskIndex >= 0"
style="margin-right: 12px" style="margin-right: 12px"
v-model:value="formData.questionArrangement" v-model:value="formData.questionArrangement"
> >
@@ -328,7 +339,7 @@ const props = defineProps({
const visible = ref(false) const visible = ref(false)
const initValue = { const initValue = {
examinationName: '', examinationName: '',
examinationTestId: '', examinationPaperId: '',
examinationStartTime: '', examinationStartTime: '',
examinationEndTime: '', examinationEndTime: '',
examinationDuration: '', examinationDuration: '',
@@ -349,7 +360,7 @@ const innerRule = {
message: '请输入考试名称', message: '请输入考试名称',
}, },
], ],
examinationTestId: [ examinationPaperId: [
{ {
required: true, required: true,
message: '请输入选择试卷', message: '请输入选择试卷',
@@ -451,7 +462,7 @@ function openDrawer(i, row) {
} }
const delTag = () => { const delTag = () => {
formData.value.examinationTestId = ''; formData.value.examinationPaperId = '';
formData.value.examinationTestName = ''; formData.value.examinationTestName = '';
} }

View File

@@ -22,8 +22,8 @@
<img src="../../assets/images/studentimg/character.png" /> <img src="../../assets/images/studentimg/character.png" />
</div> </div>
<div class="stumation"> <div class="stumation">
<div class="stuname">{{pro.routerInfo.name}}</div> <div class="stuname">{{pro==null?"":pro.routerInfo.name}}</div>
<div class="stugangw">{{pro.routerInfo.organizationName?pro.routerInfo.organizationName:"" + '-' + pro.routerInfo.jobName?pro.routerInfo.jobName:""}}</div> <div class="stugangw">{{pro==null?"":pro.routerInfo.organizationName?pro.routerInfo.organizationName:"" + '-' + pro==null?"":pro.routerInfo.jobName?pro.routerInfo.jobName:""}}</div>
</div> </div>
<div class="sortbox"> <div class="sortbox">
<div class="sortname">进度排名</div> <div class="sortname">进度排名</div>
@@ -43,8 +43,8 @@
<div class="sortbox" style="margin-left: 34px"> <div class="sortbox" style="margin-left: 34px">
<div class="sortname">完成必修</div> <div class="sortname">完成必修</div>
<div class="sortnub"> <div class="sortnub">
<span class="nub1">{{pro.currentReqCnt}}</span> <span class="nub1">{{pro==null?"":pro.currentReqCnt}}</span>
<span class="total">/{{pro.totalReqCnt}}</span> <span class="total">/{{pro==null?"":pro.totalReqCnt}}</span>
</div> </div>
</div> </div>
<a-divider <a-divider
@@ -57,18 +57,18 @@
<div class="sortbox" style="margin-left: 34px"> <div class="sortbox" style="margin-left: 34px">
<div class="sortname">已修证书</div> <div class="sortname">已修证书</div>
<div class="sortnub"> <div class="sortnub">
<span class="nub1">{{pro.routerInfo.certCnt?pro.routerInfo.certCnt:0}}</span> <span class="nub1">{{pro==null?"":pro.routerInfo.certCnt?pro.routerInfo.certCnt:0}}</span>
</div> </div>
</div> </div>
</div> </div>
<div class="secondrow"> <!-- <div class="secondrow">
<div class="rowleft">{{ pro.name }}</div> <div class="rowleft">{{ pro.name }}</div> -->
<!-- <div class="rowbox" @click="showProMess"> <!-- <div class="rowbox" @click="showProMess">
<div class="shuom">说明</div> <div class="shuom">说明</div>
<div><img src="../../assets/images/studentimg/chak.png" /></div> <div><img src="../../assets/images/studentimg/chak.png" /></div>
</div> --> </div> -->
</div> <!-- </div> -->
<div v-for="(item) in pro.chapterList" class="mainbox" <!-- <div v-for="(item) in pro.chapterList" class="mainbox"
style="margin-top: 15px; height: 56px" style="margin-top: 15px; height: 56px"
:key="item.chapterId"> :key="item.chapterId">
<div class="rowtitle" @click="changeDown"> <div class="rowtitle" @click="changeDown">
@@ -99,7 +99,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
<div class="mainbox"> <div class="mainbox">
<a-collapse v-model:activeKey="stageListActive"> <a-collapse v-model:activeKey="stageListActive">
@@ -115,7 +115,7 @@
<div></div> <div></div>
</template> </template>
<a-collapse-panel <a-collapse-panel
v-for="value in pro.chapterList" v-for="value in pro==null?[]:pro.chapterList"
:key="value.chapterId" :key="value.chapterId"
:header="value.chapterName" :header="value.chapterName"
@@ -169,7 +169,7 @@
: item.type === 12 : item.type === 12
? require('../../assets/images/leveladd/tou.png') ? require('../../assets/images/leveladd/tou.png')
: item.type === 13 : item.type === 13
? require('../../assets/images/leveladd/diao.png') ? require('../../assets/images/leveladd/xiangmu.png')
: null : null
" "
/> />
@@ -266,8 +266,8 @@ export default {
const getStuProgress = () => { const getStuProgress = () => {
state.loading = true state.loading = true
let obj = { let obj = {
routerId:props.routerId, routerId:props.routerId==null?props.studentId:props.routerId
studentId:props.studentId // routerId:props.studentId
} }
stuProgress(obj).then(res => { stuProgress(obj).then(res => {
console.log("查询当前学员进度信息success",res) console.log("查询当前学员进度信息success",res)
@@ -296,6 +296,7 @@ export default {
"测评", "测评",
"评估", "评估",
"投票", "投票",
"项目",
]; ];
return typeRules[type]; return typeRules[type];
} }

View File

@@ -225,6 +225,7 @@ export default {
}, },
}, },
setup(props, ctx) { setup(props, ctx) {
debugger
const state = reactive({ const state = reactive({
fileType: ["xls", "xlsx"], fileType: ["xls", "xlsx"],
importHomeWork: importHomeWork:

View File

@@ -8,7 +8,7 @@
> >
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div class="headerTitle">组员名单1</div> <div class="headerTitle">组员名单</div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png" src="../../assets/images/basicinfo/close.png"
@@ -498,7 +498,7 @@ export default {
let obj = { let obj = {
projectGroupId: props.chooseGroupId, projectGroupId: props.chooseGroupId,
projectId: props.projectId, projectId: props.projectId,
studentIds: state.selectedRows, ids: state.selectedRows,
}; };
console.log("删除小组学员obj", obj); console.log("删除小组学员obj", obj);
delGroupStudent(obj) delGroupStudent(obj)

View File

@@ -110,6 +110,8 @@
? require('../../assets/images/leveladd/tou.png') ? require('../../assets/images/leveladd/tou.png')
: item.course === '评估' : item.course === '评估'
? require('../../assets/images/leveladd/diao.png') ? require('../../assets/images/leveladd/diao.png')
: item.course === '项目'
? require('../../assets/images/leveladd/xiangmu.png')
: null : null
" /> " />
</div> </div>

View File

@@ -348,8 +348,8 @@ export default {
currentStageId: props.datasource.stageId, currentStageId: props.datasource.stageId,
type: 1, type: 1,
pid: props.datasource.projectId, pid: props.datasource.projectId,
taskId: props.datasource.projectTaskId, taskId: props.datasource.id,
taskType: props.datasource.type, taskType: props.datasource.type,
status: state.projectName, status: state.projectName,
studentName: state.name, studentName: state.name,
}); });
@@ -360,8 +360,8 @@ export default {
currentStageId: props.datasource.stageId, currentStageId: props.datasource.stageId,
type: 1, type: 1,
pid: props.datasource.projectId, pid: props.datasource.projectId,
taskId: props.datasource.projectTaskId, taskId: props.datasource.id,
taskType: props.datasource.type, taskType: props.datasource.type,
status: state.projectName, status: state.projectName,
studentName: state.name, studentName: state.name,
}) })
@@ -409,9 +409,9 @@ export default {
// 处理在线课字段和表格中字段保持一致 // 处理在线课字段和表格中字段保持一致
let obj = { let obj = {
studentUserNo: res.data.data.studyDetailList[i].studentCode, studentUserNo: res.data.data.studyDetailList[i].studentCode,
studentName: res.data.data.studyDetailList[i].studentName, studentName: res.data.data.studyDetailList[i].studentName,
studentDepartName: res.data.data.studyDetailList[i].studentDepartName, studentDepartName: res.data.data.studyDetailList[i].studentDepartName,
studentJobName: res.data.data.studyDetailList[i].studentJobName, studentJobName: res.data.data.studyDetailList[i].studentJobName,
lastStudyTime: res.data.data.studyDetailList[i].finishedTime, lastStudyTime: res.data.data.studyDetailList[i].finishedTime,
finishStatus: res.data.data.studyDetailList[i].status?res.data.data.studyDetailList[i].status:0 finishStatus: res.data.data.studyDetailList[i].status?res.data.data.studyDetailList[i].status:0
} }
@@ -709,4 +709,4 @@ export default {
} }
} }
</style> </style>

View File

@@ -61,7 +61,7 @@
<div class="wz">催促考试</div> <div class="wz">催促考试</div>
</div>--> </div>-->
<div class="btn btn2" @click="exportData"> <div class="btn btn2" @click="exportData">
<div class="img2"></div> <div class="img2"></div>
<div class="wz">导出数据</div> <div class="wz">导出数据</div>
</div> </div>
<!-- <div class="btn btn2" @click="showEScoreModal"> <!-- <div class="btn btn2" @click="showEScoreModal">
@@ -333,18 +333,39 @@ export default {
ellipsis: true, ellipsis: true,
className: "h", className: "h",
customRender: (text) => { customRender: (text) => {
return ( debugger
<div class="racona"> console.log("text"+text.record)
<a if (text.record.finishStatus===1 || text.record.finishStatus===2) {
onClick={()=>{ return (
state.studentKid = text.record.studentKid; <div class="racona">
state.datasource = text.record; <a-button
state.CAvisible = true; type="link"
}}> onClick={()=>{
查看答卷 state.studentKid = text.record.studentKid;
</a> state.datasource = text.record;
state.CAvisible = true;
}}>
查看答卷
</a-button>
</div>
);
}else {
return (
<div class="racona">
<a-button
type="link"
disabled
onClick={()=>{
state.studentKid = text.record.studentKid;
state.datasource = text.record;
state.CAvisible = true;
}}>
查看答卷
</a-button>
</div> </div>
); );
}
}, },
}, },
], ],
@@ -409,7 +430,7 @@ export default {
state.loadingData = false; state.loadingData = false;
}) })
} }
// 搜索 // 搜索
function searchTableData() { function searchTableData() {
state.currentPage = 1; state.currentPage = 1;
@@ -419,7 +440,7 @@ export default {
// 重置 // 重置
function reseatTableData() { function reseatTableData() {
state.loadingData = true; state.loadingData = true;
state.currentPage = 1; state.currentPage = 1;
state.name = ''; state.name = '';
state.projectName = undefined; state.projectName = undefined;
getData(); getData();

View File

@@ -100,24 +100,29 @@ const selectGroup = (e, v) => {
}; };
//确认换组 //确认换组
const changeGroup = (item) => { const changeGroup = (item) => {
debugger
console.log("换组", selectGroupId.value, item); console.log("换组", selectGroupId.value, item);
let obj = { props.checkgroupStuId.forEach(stu => {
groupId: selectGroupId.value, let obj = {
groupName: selectGroupName.value, groupId: selectGroupId.value,
studentId: props.checkgroupStuId, groupName: selectGroupName.value,
}; studentId: stu,
console.log("换组obj", obj); };
api console.log("换组obj", obj);
.changeGroupByStudentId(obj) api
.then((res) => { .changeGroupByStudentId(obj)
console.log("换组成功", res); .then((res) => {
if (res.data.code === 200) { console.log("换组成功", res);
message.success("换组成功"); if (res.data.code === 200) {
} message.success("换组成功");
}) closeChangeModal();
.catch((err) => { }
console.log("换组失败", err); })
}); .catch((err) => {
console.log("换组失败", err);
});
})
}; };
</script> </script>
@@ -240,4 +245,4 @@ const changeGroup = (item) => {
} }
} }
} }
</style> </style>

View File

@@ -897,14 +897,16 @@ const submitAuth = () => {
}; };
function handleStageOk() { function handleStageOk() {
// 判断添加人数是否已超过限制人数 // 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
if (props.groupMemberCount < selectsData.value.projectMemberList.length + props.groupMemberNumber) { if(props.type === 1){
return message.warning("添加小组学员超过最大值"); if (props.groupMemberCount < selectsData.value.studentList.length + props.groupMemberNumber) {
} return message.warning("添加小组学员超过最大值");
// 对选中的人员进行判断是否已经分组了 }
let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null); // 对选中的人员进行判断是否已经分组了
if (haveGroupNum.length > 0) { let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null);
message.warning("部分学员已经有小组,再次添加会被添加到当前小组."); if (haveGroupNum.length > 0) {
message.warning("部分学员已经有小组,再次添加会被添加到当前小组.");
}
} }
stageVisible.value = false; stageVisible.value = false;
visiable.value = false; visiable.value = false;

View File

@@ -233,7 +233,8 @@
> >
<a-button <a-button
v-if="checkPer(permissions)" v-if="checkPer(permissions)"
@click="del(record.id)" :disabled="record.isLeader === '1' "
@click="del(record.id,record)"
type="link" type="link"
danger danger
>删除</a-button >删除</a-button
@@ -254,8 +255,8 @@
<!-- 换组弹窗 --> <!-- 换组弹窗 -->
<ChangeGroupModal <ChangeGroupModal
v-model:changegroupV="checkgroupParam.changegroupV" v-model:changegroupV="checkgroupParam.changegroupV"
:groupList="checkgroupParam.checkgroupList" :groupList="groupList"
:checkgroupStuId="checkgroupParam.checkgroupStuId" :checkgroupStuId="stuSelectKeys"
/> />
<!-- 批量调整关卡弹窗 --> <!-- 批量调整关卡弹窗 -->
<!-- 取消学员弹窗 --> <!-- 取消学员弹窗 -->
@@ -393,6 +394,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: null, default: null,
}, },
groupList: {
type: Array,
default: () => [],
}
}); });
const topFlagList = ref([ const topFlagList = ref([
{ {
@@ -532,6 +537,7 @@ const tableData = ref({
loading: false, loading: false,
}); });
const stuRowSelection = computed(() => ({ const stuRowSelection = computed(() => ({
columnWidth: 20, columnWidth: 20,
selectedRowKeys: stuSelectKeys.value, selectedRowKeys: stuSelectKeys.value,
@@ -541,6 +547,8 @@ const stuRowSelection = computed(() => ({
//显示学员换组弹窗 //显示学员换组弹窗
function showChangeGroupModal() { function showChangeGroupModal() {
const d = props.groupList
console.log("d"+d)
// debugger // debugger
checkgroupParam.value.changegroupV = true; checkgroupParam.value.changegroupV = true;
} }
@@ -608,6 +616,8 @@ function getStuList() {
}); });
} }
function reset() { function reset() {
tableParam.value.studentName = ""; tableParam.value.studentName = "";
tableParam.value.groupName = ""; //学员小组 tableParam.value.groupName = ""; //学员小组
@@ -622,11 +632,20 @@ function bathDel() {
message.destroy(); message.destroy();
return message.warning("请先选中学员"); return message.warning("请先选中学员");
} }
// 判断选择的人员中是否有小组长
let arr = [...tableData.value.list].filter(x => [...stuSelectKeys.value].some(id => id === x.id)).filter(item => item.isLeader === '1');
if (arr.length > 0) {
return message.warning("选择人员中:"+arr[0].studentName + "是小组长,请勿删除!");
}
tableData.value.loading = true; tableData.value.loading = true;
delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList()); delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList());
} }
function del(id) { function del(id,row) {
if (row.isLeader === '1') {
return message.warning(""+row.name + "是小组长,请勿删除!");
}
Modal.confirm({ Modal.confirm({
title: () => "确定删除?", title: () => "确定删除?",
icon: () => createVNode(ExclamationCircleOutlined), icon: () => createVNode(ExclamationCircleOutlined),

View File

@@ -54,7 +54,6 @@
<a-range-picker <a-range-picker
:show-time="{ format: 'HH:mm' }" :show-time="{ format: 'HH:mm' }"
:disabled-date="disabledDate" :disabled-date="disabledDate"
:disabled-time="disabledRangeTime"
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
style="width: 424px" style="width: 424px"
v-model:value="dateTime" v-model:value="dateTime"
@@ -74,16 +73,14 @@
<span>创建投票题干</span> <span>创建投票题干</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<CreateVote v-model:options="formData.voteStemDtoList" :list="formData.voteStemDtoList"> <CreateVote v-model:options="formData.voteStemDtoList">
<button class="xkbtn"> <button class="xkbtn">
{{ formData.voteStemDtoList.length ? "编辑" : "创建" }}投票题干 {{ formData.voteStemDtoList.length ? "编辑" : "创建" }}投票题干
</button> </button>
</CreateVote> </CreateVote>
<div v-if="formData.voteStemDtoList.length"> <div v-if="formData.voteStemDtoList.length">
<a-tag closable color="processing" @close="handleDel"> <a-tag closable color="processing" @close="handleDel">
<span style="font-size: 14px; line-height: 33px"> <span style="font-size: 14px; line-height: 33px">删除投票题干</span>
删除投票题干
</span>
</a-tag> </a-tag>
</div> </div>
</div> </div>
@@ -168,14 +165,6 @@ const closeDrawer = () => {
resetFields() resetFields()
}; };
const range = (start, end) => {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
};
function timeChange(time, timeStr) { function timeChange(time, timeStr) {
formData.value.voteStartTime = timeStr[0] formData.value.voteStartTime = timeStr[0]
formData.value.voteEndTime = timeStr[1] formData.value.voteEndTime = timeStr[1]
@@ -185,13 +174,6 @@ const disabledDate = (current) => {
return current && current < dayjs().startOf('day'); return current && current < dayjs().startOf('day');
}; };
const disabledRangeTime = () => ({
disabledHours: () => range(0, 24).splice(4, 20),
disabledMinutes: () => range(30, 60),
disabledSeconds: () => [55, 56],
});
async function confirm() { async function confirm() {
await validate().catch(({errorFields}) => { await validate().catch(({errorFields}) => {
message.warning(errorFields[0].errors.join()); message.warning(errorFields[0].errors.join());
@@ -223,133 +205,6 @@ function handleDel() {
defineExpose({openDrawer}) defineExpose({openDrawer})
// 限制文件格式上传
// const beforeUpload = (file) => {
// if (file.type.indexOf("sheet") == -1) {
// message.destroy();
// message.error("请上传正确的文件格式");
//
// state.fileList = [];
// return false;
// }
//
// const formData = new FormData();
// formData.append("uploadFile", file);
// baseVoteupload(formData).then((res) => {
// if (res.data.code === 200) {
// state.basevote = res.data.data;
// }
// });
// return false;
// };
//
// //删除题干信息接口
// const dleVoteStem = () => {
// api.deleteVoteStem({voteStemId: state.voteId}).then(() => {
// message.success("删除题干信息成功");
// });
// };
//
// //根据投票id获取投票信息
// const queryVoteInfo = () => {
// api.queryVoteDetailById(props.EditVoteId)
// .then((res) => {
// state.inputV1 = res.data.data.voteName;
// state.textV1 = res.data.data.voteExplain;
// state.baseVote = res.data.data.baseVote;
// state.ascriptionId = res.data.data.ascriptionId;
// state.voteId = res.data.data.id;
// state.time = [
// dayjs(res.data.data.voteStartTime, "YYYY-MM-DD HH:mm"),
// dayjs(res.data.data.voteEndTime, "YYYY-MM-DD HH:mm"),
// ];
// })
// };
// const updateToTask = (res) => {
// console.log("props.isLevel=====", props.isLevel);
// if (props.isLevel == 1) {
// if (!props.isactive) {
// message.destroy();
// return message.warning("请先选中关卡");
// }
// RouterEditTask({
// chapterId: props.isactive,
// courseId: res.data.data.id,
// name: res.data.data.voteName,
// routerId: props.routerId,
// routerTaskId: props.routerTaskId || 0,
// type: 12,
// id: props.taskIdDraft
// }).then(() => {
// ctx.emit("changeData", false);
// state.addLoading = false;
// })
// } else if (props.isLevel == 2) {
// apiTask.addTask({
// courseId: res.data.data.id,
// name: res.data.data.voteName,
// projectId: props.projectId,
// projectTaskId: props.projectTaskId || 0,
// stageId: props.chooseStageId || 0,
// type: 12,
// id: props.taskIdDraft
// })
// .then(() => {
// ctx.emit("changeData", false);
// })
// } else if (props.isLevel == 3) {
// addTempTask({
// courseId: res.data.data.id,
// name: res.data.data.voteName,
// projectTemplateId: props.projectTemplateId,
// projectTaskId: props.projectTaskId || 0,
// stageId: props.chooseStageId || 0,
// type: 12,
// id: props.taskIdDraft
// })
// .then(() => {
// ctx.emit("changeData", false);
// //message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
// })
// }
// };
// //修改投票信息接口
// const updateVoteInfo = () => {
//
// if (state.time) {
// state.startTime = dayjs(state.time[0]).format("YYYY-MM-DD HH:mm:ss");
// state.endTime = dayjs(state.time[1]).format("YYYY-MM-DD HH:mm:ss");
// }
// let obj = {
// voteName: state.inputV1,
// voteStartTime: dayjs(state.time[0]).format("YYYY-MM-DD HH:mm:ss"),
// voteEndTime: dayjs(state.time[1]).format("YYYY-MM-DD HH:mm:ss"),
// id: state.voteId,
// voteExplain: state.textV1,
// };
// api.editVote(obj).then(async (res) => {
// await updateToTask(res);
// closeDrawer();
// message.destroy();
// message.success(props.edit ? "修改投票信息成功" : "添加投票信息成功");
// })
// };
// const queryStem = () => {
// state.addStemVisible = true;
// };
// const closeStem = () => {
// state.addStemVisible = false;
// };
// const handlelog = (e) => {
// state.ballotId = null;
// console.log(e);
// };
//
// function downloadTemplate() {
// window.open("/manageApi/投票基础数据模版.xlsx");
// }
</script> </script>
<style lang="scss"> <style lang="scss">
.ConfirmModal { .ConfirmModal {

View File

@@ -34,37 +34,37 @@
</div> </div>
</div> </div>
</div> </div>
<div v-for="(_, index) in formData.list" :key="index"> <div v-for="(item, index) in formData" :key="index+Math.random()">
<VoteQuestion v-model:item="formData[index]" :index="index" @del="itemDel"/> <VoteQuestion v-if="!item.deleted" :item="item" :index="index" @del="itemDel"/>
</div> </div>
<div class="footer"> <div class="footer">
<div class="btn"> <div class="btn">
<a-button <a-button
type="primary" type="primary"
ghost
style=" style="
width: 100px; width: 100px;
height: 40px; height: 40px;
border-radius: 8px; border-radius: 8px;
"
@click="closeDrawer"
>
取消
</a-button>
<a-button
type="primary"
style="
margin-left: 14px;
width: 100px;
height: 40px;
border-radius: 8px;
background-color: #4ea6ff; background-color: #4ea6ff;
" "
@click="confirm" @click="confirm"
> >
保存 保存
</a-button> </a-button>
<a-button
type="primary"
ghost
style="
width: 100px;
height: 40px;
margin-left: 14px;
border-radius: 8px;
"
@click="closeDrawer"
>
取消
</a-button>
</div> </div>
</div> </div>
</div> </div>
@@ -73,64 +73,58 @@
<script setup> <script setup>
import {defineEmits, defineProps, ref, watch} from "vue"; import {defineEmits, defineProps, ref, watch} from "vue";
import VoteQuestion from "./VoteQuestion.vue"; import VoteQuestion from "./VoteQuestion.vue";
import {message} from "ant-design-vue";
const prop = defineProps({ const props = defineProps({
options: [], options: []
list: []
}) })
const emit = defineEmits({})
const formData = ref({list: [{}]})
const initData = ref({list: [{}]})
console.log(prop.options.length); const emit = defineEmits({})
const formData = ref(props.options && props.options.length ? [...props.options] : [{
voteStemName: '',
optionDetailList: []
}])
const visible = ref(false) const visible = ref(false)
function openDrawer() { watch(() => props.options.length, () => {
formData.value = props.options && props.options.length ? [...props.options] : [{
if (prop.options.length > 0) { voteStemName: '',
optionDetailList: []
for(let i in initData.value) { }]
console.log(formData.value[i]) })
if (initData.value[i].valueSingle != formData.value[i].valueSingle) {
console.log('不等于')
formData.value[i].valueSingle = initData.value[i].valueSingle
}
}
}else { function openDrawer() {
formData.value.list = []
setTimeout(() =>{
formData.value.list = [{}]
}, 100)
}
visible.value = true visible.value = true
} }
watch(formData.value, () => {
console.log('111',formData.value)
})
const closeDrawer = () => { const closeDrawer = () => {
console.log('formData',formData.value)
// formData.value = JSON.parse(JSON.stringify(initData.value));
visible.value = false visible.value = false
formData.value = props.options && props.options.length ? [...props.options] : [{
voteStemName: '',
optionDetailList: []
}]
}; };
async function confirm() { async function confirm() {
console.log('confirm'); console.log(formData.value)
initData.value = JSON.parse(JSON.stringify(formData.value)); if (formData.value.some(t => !t.voteStemName && !t.deleted)) {
emit('update:options', formData.value.list) message.warning('请输入题干名称')
// closeDrawer() return
}
visible.value = false visible.value = false
emit('update:options', formData.value)
} }
function handleAdd() { function handleAdd() {
formData.value.list.push({}) formData.value.push({
voteStemName: '',
optionDetailList: []
})
} }
function itemDel(i) { function itemDel(i) {
formData.value.list.splice(i, 1) formData.value[i].deleted = true
} }
</script> </script>

View File

@@ -15,7 +15,7 @@
</div> </div>
<div class="in"> <div class="in">
<a-input <a-input
v-model:value="formData.valueSingle" v-model:value="formData.voteStemName"
placeholder="请输入题干名称" placeholder="请输入题干名称"
show-count show-count
:maxlength="20" :maxlength="20"
@@ -23,13 +23,9 @@
/> />
</div> </div>
</div> </div>
<VoteQuestionItem <div v-for="(item, index) in formData.optionDetailList" :key="index+Math.random()">
:key="index" <VoteQuestionItem v-if="!item.deleted" :item="item" :index="index" @del="delItem"/>
v-for="(_, index) in formData.optionDetailList" </div>
v-model:item="formData.optionDetailList[index]"
:index="index"
@del="delItem"
/>
<div class="name"> <div class="name">
<div class="in" style="margin-left: 85px; margin-bottom: 20px"> <div class="in" style="margin-left: 85px; margin-bottom: 20px">
<a-button <a-button
@@ -57,13 +53,12 @@ const props = defineProps({
item: {} item: {}
}) })
const emit = defineEmits({}) const emit = defineEmits(['del'])
const formData = ref({optionDetailList: []}) const formData = ref(props.item)
watch(formData.value, () => { watch(props, () => {
console.log(formData.value) formData.value = props.item
emit('update:item', formData.value)
}) })
function handleSingleAdd() { function handleSingleAdd() {
@@ -71,61 +66,13 @@ function handleSingleAdd() {
} }
function delItem(i) { function delItem(i) {
formData.value.optionDetailList.splice(i, 1) formData.value.optionDetailList[i].deleted = true
} }
function handleDel() { function handleDel() {
emit("del", props.index); emit("del", props.index);
} }
// const handleTypesDel = () => {
// emit("del", {id: curItem.value.id, curItem: curItem.value});
// };
//
// const handleSingleAdd = () => {
// curItem.value.optionDetailList.push({
// id: curItem.value.optionDetailList.length + 1,
// inputVal: "",
// imgVal: "",
// });
// };
// const imgSrc = ({id, src}) => {
// curItem.value.optionDetailList.forEach((item) => {
// if (item.id === id) {
// item.imgVal = src;
// }
// });
// };
// const delImg = ({id}) => {
// curItem.value.optionDetailList.forEach((item) => {
// if (item.id === id) {
// item.imgVal = "";
// }
// });
// };
// const del = ({id, optionId}) => {
// if (optionId) {
// api.deleteVoteStemOption(optionId).then((res) => {
// if (res.data.code === 200) {
// virtualDel(id);
// }
// });
// } else {
// virtualDel(id);
// }
// };
// const virtualDel = (id) => {
// // 前端删除
// curItem.value.optionDetailList.forEach((item, index) => {
// if (item.id === id) {
// curItem.value.optionDetailList.splice(index, 1);
// }
// });
// curItem.value.optionDetailList.map((item, index) => {
// item.id = index + 1;
// });
// };
</script> </script>
<style lang="scss"> <style lang="scss">
.researchadd { .researchadd {

View File

@@ -8,7 +8,7 @@
</div> </div>
<div class="in"> <div class="in">
<a-input <a-input
v-model:value="formData.name" v-model:value="formData.optionName"
show-count show-count
:maxlength="30" :maxlength="30"
style="border-radius: 8px" style="border-radius: 8px"
@@ -22,12 +22,11 @@
v-show="!formData.imgVal" v-show="!formData.imgVal"
class="in uploadBtn" class="in uploadBtn"
:show-upload-list="false" :show-upload-list="false"
:before-upload="beforeUpload"
> >
<div class="addimg">+添加图片{{ index }}</div> <div class="addimg">+添加图片{{ index }}</div>
</a-upload> </a-upload>
<div v-show="formData.imgVal" class="picture" style="position: relative"> <div v-show="formData.optionPictureAddress" class="picture" style="position: relative">
<img class="pictureimg" :src="formData.imgVal"/> <img class="pictureimg" :src="formData.optionPictureAddress"/>
<div class="picturename" v-show="hasImgName">{{ hasImgName }}</div> <div class="picturename" v-show="hasImgName">{{ hasImgName }}</div>
<img <img
style=" style="
@@ -46,19 +45,15 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import {defineEmits, defineProps, ref, watch} from "vue"; import {defineEmits, defineProps, ref} from "vue";
const props = defineProps({ const props = defineProps({
item: {}, item: {},
index: Number index: Number
}) })
const emit = defineEmits({}) const emit = defineEmits(['del'])
const formData = ref({}) const formData = ref(props.item)
watch(formData.value, () => {
emit('update:item', formData.value)
})
function handleDel() { function handleDel() {
emit('del', props.index) emit('del', props.index)

View File

@@ -59,7 +59,7 @@
class="nameimg" class="nameimg"
src="../../assets/images/basicinfo/asterisk.png" src="../../assets/images/basicinfo/asterisk.png"
/> />
<div class="inname">封面图</div> <div class="inname">封面图2</div>
</div> </div>
<div class="in select" style="flex: 1; display: flex"> <div class="in select" style="flex: 1; display: flex">
<div <div
@@ -324,12 +324,25 @@
<div class="topc">封面图</div> <div class="topc">封面图</div>
</div> </div>
<div class="imagesBox"> <div class="imagesBox">
<div <!-- <div
@click="() => (projectInfo.picUrl = src.value)" @click="() => (projectInfo.picUrl = src.value)"
v-for="item in projectPic" v-for="item in projectPic"
:key="item.code" :key="item.code"
class="learnBgItem" class="learnBgItem"
> > -->
<div
@click="chooseImg2(item)"
v-for="item in projectPic"
:key="item.code"
class="learnBgItem"
:style="{
border:
pathBgId === item.code
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
'background-image': 'url(' + item.value.split(',')[0] + ')',
}"
>
<!-- <img class="im" :src="item.source" /> --> <!-- <img class="im" :src="item.source" /> -->
</div> </div>
</div> </div>

View File

@@ -712,6 +712,7 @@
:columns="stuColumns" :columns="stuColumns"
:stage="stage" :stage="stage"
:visable="tabFlag" :visable="tabFlag"
:groupList="groupList"
> >
<template #extension="{ data: { record } }"> <template #extension="{ data: { record } }">
<a-button @click="showStudent(record)" type="link" <a-button @click="showStudent(record)" type="link"
@@ -747,7 +748,7 @@
</div> </div>
</div> </div>
<div class="second2" v-if="checkPer(permissions)"> <div class="second2" v-if="checkPer(permissions)">
<div class="btn1" @click="showModal2(1, null)"> <div class="btn1" @click="showModal2()">
<img src="../../assets/images/courseManage/add0.png" /> <img src="../../assets/images/courseManage/add0.png" />
<span class="btn1text">创建小组</span> <span class="btn1text">创建小组</span>
</div> </div>
@@ -769,7 +770,7 @@
<div class="groupmain"> <div class="groupmain">
<div <div
class="groupbox" class="groupbox"
v-for="item in groupList" v-for="item in groupPageList"
:key="item.projectGroupId" :key="item.projectGroupId"
> >
<div style="width: 90%"> <div style="width: 90%">
@@ -781,12 +782,12 @@
>. . .</span >. . .</span
> >
<div class="moreItems" v-if="checkPer(permissions)"> <div class="moreItems" v-if="checkPer(permissions)">
<div class="sammo" @click="showModal2(2, item)"> <div class="sammo" @click="showModal2(item)">
编辑 编辑
</div> </div>
<div <div
class="sammo" class="sammo"
@click="deleteGroupBtn(item.projectGroupId)" @click="deleteGroupBtn(item.id)"
> >
删除 删除
</div> </div>
@@ -796,13 +797,13 @@
<div class="leader">组长:{{ item.leaderName }}</div> <div class="leader">组长:{{ item.leaderName }}</div>
<div class="grocenter"> <div class="grocenter">
<div class="leader1">进度</div> <div class="leader1">进度</div>
<a-progress :percent="item.completeRatio" /> <a-progress :percent="(item.completeRatio || 0) * 100" />
</div> </div>
<div <div
class="grofooter" class="grofooter"
@click=" @click="
showMemberList( showMemberList(
item.projectGroupId, item.id,
item.groupName, item.groupName,
item.groupMemberCount item.groupMemberCount
) )
@@ -1645,7 +1646,7 @@
> >
<div class="headerLeft" style="margin-left: 32px"> <div class="headerLeft" style="margin-left: 32px">
<span class="headerLeftText" style="font-size: 16px">{{ <span class="headerLeftText" style="font-size: 16px">{{
stuMemberClassify === 1 ? "创建小组" : "编辑小组" !groupInfo?.id ? "创建小组" : "编辑小组"
}}</span> }}</span>
</div> </div>
<div style="cursor: pointer; margin-right: 32px" @click="closeModal2"> <div style="cursor: pointer; margin-right: 32px" @click="closeModal2">
@@ -1666,7 +1667,7 @@
<div class="inname">小组名称:</div> <div class="inname">小组名称:</div>
<div class="in"> <div class="in">
<a-input <a-input
v-model:value="valueaddg" v-model:value="groupInfo.groupName"
placeholder="请输入小组名称" placeholder="请输入小组名称"
style="border-radius: 8px; height: 40px" style="border-radius: 8px; height: 40px"
:maxlength="100" :maxlength="100"
@@ -1688,7 +1689,7 @@
:max="300" :max="300"
:precision="0" :precision="0"
style="width: 395px; height: 40px; border-radius: 8px" style="width: 395px; height: 40px; border-radius: 8px"
v-model:value="groupNumber" v-model:value="groupInfo.groupMemberCount"
></a-input-number> ></a-input-number>
</div> </div>
</div> </div>
@@ -1702,14 +1703,9 @@
<div class="inname">小组长:</div> <div class="inname">小组长:</div>
<div class="in"> <div class="in">
<ProjectManager <ProjectManager
v-model:value="stuGroupId" v-model:value="groupInfo.leaderId"
v-model:name="stuGroupName" v-model:name="groupInfo.leaderName"
></ProjectManager> ></ProjectManager>
<!-- <a-input
v-model:value="valueaddm"
placeholder="请输入小组长"
style="border-radius: 8px; height: 40px"
/> -->
</div> </div>
</div> </div>
<div class="pubtn"> <div class="pubtn">
@@ -2389,6 +2385,8 @@ export default {
inputValue3: 5, inputValue3: 5,
valueaddm: "", //创建小组输入小组长 valueaddm: "", //创建小组输入小组长
valueaddg: "", //创建小组输入名称 valueaddg: "", //创建小组输入名称
groupInfo: {leaderName:'',leaderId:''}, //创建小组
groupPageList: [], //小组列表
groupNumber: 0, //组员人数 groupNumber: 0, //组员人数
valuestun: "", //学员管理姓名 valuestun: "", //学员管理姓名
valuegood: "", valuegood: "",
@@ -3019,42 +3017,30 @@ export default {
console.log("点击换组", record.studentId); console.log("点击换组", record.studentId);
state.checkgroupStuId = record.studentId; state.checkgroupStuId = record.studentId;
}; };
const showModal2 = (classify, item) => { const showModal2 = (item) => {
state.stuMemberClassify = classify;
state.projectGroupId =
item && item.projectGroupId ? item.projectGroupId : null;
state.stugroup = true; state.stugroup = true;
console.log("item", item); state.groupInfo = item || {};
if (item) {
state.valueaddg = item.groupName;
state.groupNumber = item.groupMemberCount;
state.stuGroupName = item.leaderName;
state.stuGroupId = item.leaderId;
}
console.log("编辑小组item", item);
}; };
const closeModal2 = () => { const closeModal2 = () => {
state.stugroup = false; state.stugroup = false;
state.valueaddg = null; state.groupInfo = {};
state.groupNumber = 0;
state.stuGroupName = null;
state.stuGroupId = null;
state.projectGroupId = null;
state.stuMemberClassify = null;
}; };
//点击确定创建小组 //点击确定创建小组
const createG = () => { const createG = () => {
if ( if(!state.groupInfo.groupName){
state.stuGroupName == "" || return message.warning("请输入小组名称");
state.valueaddg == "" ||
state.groupNumber == null
) {
message.destroy();
return message.warning("请输入必填项");
} else {
createGroup();
closeModal2();
} }
if(!state.groupInfo.leaderId){
return message.warning("请选择小组长");
}
if(!state.groupInfo.leaderName){
return message.warning("请选择小组长");
}
if(!state.groupInfo.groupMemberCount){
return message.warning("请输入组员数量");
}
createGroup();
closeModal2();
}; };
const showFaceIn = () => { const showFaceIn = () => {
state.TaskFaceImpStuvisible = true; state.TaskFaceImpStuvisible = true;
@@ -3468,7 +3454,7 @@ export default {
<a-select-option value="删除" label="删除"> <a-select-option value="删除" label="删除">
<div <div
onClick={() => { onClick={() => {
// console.log("点击了111", text); {/* console.log("点击了111", text); */}
showDeleteOne(text.record.studentId); showDeleteOne(text.record.studentId);
}} }}
> >
@@ -3684,12 +3670,12 @@ export default {
data.map((value) => { data.map((value) => {
let obj = { let obj = {
projectId: value.projectId, //项目id projectId: value.projectId, //项目id
projectGroupId: value.projectGroupId, //小组id projectGroupId: value.id, //小组id
groupName: value.groupName, //小组名称 groupName: value.groupName, //小组名称
leaderId: value.leaderId, //组长id leaderId: value.leaderId, //组长id
leaderName: value.leaderName, //组长名称 leaderName: value.leaderName, //组长名称
groupMemberCount: value.groupMemberCount, //组员人数 groupMemberCount: value.groupMemberCount, //组员人数 == 1 ? "指定添加" : "随机分组",
source: value.source == 1 ? "指定添加" : "随机分组", source: value.source ,
completeTaskCnt: value.completeTaskCnt, //完成任务数 completeTaskCnt: value.completeTaskCnt, //完成任务数
totalTaskCnt: value.totalTaskCnt, //累计任务数 totalTaskCnt: value.totalTaskCnt, //累计任务数
completeRatio: value.completeRatio ? value.completeRatio : 0, //完成比例 completeRatio: value.completeRatio ? value.completeRatio : 0, //完成比例
@@ -3854,78 +3840,22 @@ export default {
pageSize: 10, pageSize: 10,
projectId: state.projectId, projectId: state.projectId,
}; };
getGroupList(objf) getGroupList(objf).then((res) => {state.groupPageList = res.data.data.rows})
.then((res) => {
console.log(res.data.data.rows, "获取小组列表成功");
if (res.data.code === 200) {
let arr = res.data.data.rows;
setGroupList(arr);
}
// let leng = res.data.data.rows.length;
// if (leng > 0) {
// }
})
.catch((err) => {
console.log(err, "获取列表失败");
});
}; };
//删除小组 //删除小组
const deleteGroupBtn = (projectGroupId) => { const deleteGroupBtn = (projectGroupId) => {
deleteGroup({ deleteGroup({projectGroupId}).then(() => {
projectGroupId: projectGroupId,
}).then((res) => {
console.log("删除小组成功", res);
message.success("删除小组成功"); message.success("删除小组成功");
getGroup(); getGroup();
}); });
}; };
//创建小组 //创建小组
const createGroup = () => { const createGroup = async () => {
//新建 const id = state.groupInfo.id
if (state.stuMemberClassify === 1) { await editGroup({...state.groupInfo,projectId:state.projectId})
let obj = { message.success(id?'小组编辑成功':"小组创建成功");
groupName: state.valueaddg, getGroup();
groupMemberCount: state.groupNumber, getStu();
leaderId: state.stuGroupId,
leaderName: state.stuGroupName,
// projectGroupId: 0,
projectId: state.projectId,
};
console.log("小组创建obj", obj);
editGroup(obj)
.then((res) => {
console.log("小组创建成功", res);
message.success("小组创建成功");
getGroup();
getStu();
})
.catch((err) => {
console.log("小组创建失败", err);
message.warning("小组创建失败");
});
}
//编辑
if (state.stuMemberClassify === 2) {
let obj = {
groupName: state.valueaddg,
groupMemberCount: state.groupNumber,
leaderId: state.stuGroupId,
leaderName: state.stuGroupName,
projectGroupId: state.projectGroupId,
projectId: state.projectId,
};
console.log("编辑小组obj", obj);
editGroup(obj)
.then((res) => {
console.log("小组编辑成功", res);
message.success("小组编辑成功");
getGroup();
})
.catch((err) => {
console.log("小组编辑失败", err);
message.warning("小组编辑失败");
});
}
}; };
//搜索小组重置 //搜索小组重置
const resetGroupName = () => { const resetGroupName = () => {
@@ -7497,4 +7427,4 @@ export default {
} }
} }
} }
</style> </style>

View File

@@ -15,7 +15,8 @@ module.exports = defineConfig({
port: 8070, port: 8070,
proxy: { proxy: {
"/manageApi": { "/manageApi": {
target: 'http:' + process.env.VUE_APP_PROXY_URL, // target: 'http:' + process.env.VUE_APP_PROXY_URL,
target: 'http://localhost:30001',
changeOrigin: true, //表示是否改变原域名 changeOrigin: true, //表示是否改变原域名
pathRewrite: { pathRewrite: {
// "^/manageApi": "", // "^/manageApi": "",