mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 02:46:45 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -10,7 +10,7 @@ VUE_APP_BOE_API_URL=//u.boe.com
|
||||
|
||||
VUE_APP_IFRAME_URL=//u.boe.com/pc/iframe
|
||||
VUE_APP_IFRAME_STUDENT_URL=//u.boe.com/pc/loading
|
||||
VUE_APP_IFRAME_TEACHER_URL=//u-pre.boe.com/pc/need/waitaudit
|
||||
VUE_APP_IFRAME_TEACHER_URL=//u.boe.com/pc/need/waitaudit
|
||||
|
||||
VUE_APP_COURSE_STUDY=//u.boe.com/pc/course/studyindex?id=
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ VUE_APP_BOE_API_URL=//u.boe.com
|
||||
|
||||
VUE_APP_IFRAME_URL=//u.boe.com/pc-release/iframe
|
||||
VUE_APP_IFRAME_STUDENT_URL=//u.boe.com/pc-release/loading
|
||||
VUE_APP_IFRAME_TEACHER_URL=//u-pre.boe.com/pc-release/need/waitaudit
|
||||
VUE_APP_IFRAME_TEACHER_URL=//u.boe.com/pc-release/need/waitaudit
|
||||
|
||||
VUE_APP_COURSE_STUDY=//u.boe.com/pc-release/course/studyindex?id=
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ export const addStudentCourse = (obj) => http.post("/admin/offcourse/addStudent"
|
||||
// 获取组织结构树
|
||||
export const orgtree = () => http.get("/org/tree");
|
||||
export const saveStu = obj => http.post("/admin/student/addStudent", obj);
|
||||
export const getAllStudentByProjectId = obj => http.get("/admin/student/getAllStudentByProjectId", { params: obj });
|
||||
export const moveStudent = obj => http.post("/admin/student/moveStudent", obj);
|
||||
export const getStuPage = obj => http.get("/admin/student/getStudent", { params: obj });
|
||||
export const delStudentList = obj => http.post("/admin/student/delStudent", obj);
|
||||
@@ -176,7 +177,7 @@ export const exportHomeWork = (obj) => http.get('/admin/student/exportHomeWork',
|
||||
export const exportHomeWorkTemplate = (obj) => http.get('/admin/student/exportHomeWorkTemplate', { params: obj })
|
||||
//签到
|
||||
export const attendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj)
|
||||
//请假
|
||||
//请假
|
||||
export const attendanceLeave = (obj) => http.post('/stu/task/attendance/leave', obj)
|
||||
|
||||
//批量标记完成
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="confirm">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns" style="background:#fff;">
|
||||
<a-button class="btn1" @click="closeDrawer">取消</a-button>
|
||||
<a-button class="btn2" @click="closeDrawer">取消</a-button>
|
||||
<a-button class="btn2" html-type="submit" @click="confirm">确定</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -309,7 +309,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_btns">
|
||||
<a-button class="btn1" @click="closeDrawer">取消</a-button>
|
||||
<a-button class="btn2" @click="closeDrawer">取消</a-button>
|
||||
<a-button class="btn2" @click="confirm">确定</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
添加组员
|
||||
</a-button></CommonStudent
|
||||
>
|
||||
<div class="btn btn2" @click="showModal" v-if="checkPer(permissions,createId)">
|
||||
<div class="btn btn2" @click="showModal" v-if="checkPer(permissions,createId)" style="margin-left:16px;">
|
||||
<div class="img3"></div>
|
||||
<div class="wz">批量删除</div>
|
||||
</div>
|
||||
@@ -124,7 +124,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
<!-- 批量删除的弹窗 -->
|
||||
@@ -678,7 +678,7 @@ export default {
|
||||
.img2 {
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
background-image: url(../../assets/images/courseManage/reset1.png);
|
||||
background-image: url(../../assets/images/courseManage/reset0.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
@@ -691,9 +691,9 @@ export default {
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
background: #4ea6ff;
|
||||
|
||||
color: #4ea6ff;
|
||||
color: #fff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
}
|
||||
@@ -723,7 +723,7 @@ export default {
|
||||
.img2 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../assets/images/coursewareManage/export.png);
|
||||
background-image: url(../../assets/images/coursewareManage/export1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
@@ -731,7 +731,7 @@ export default {
|
||||
.img3 {
|
||||
width: 17px;
|
||||
height: 16px;
|
||||
background-image: url(../../assets/images/projectadd/delete.png);
|
||||
background-image: url(../../assets/images/projectadd/delete1.png);
|
||||
background-size: 100% 100%;
|
||||
margin-right: 7px;
|
||||
}
|
||||
@@ -744,9 +744,9 @@ export default {
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background: #ffffff;
|
||||
background: #4ea6ff;
|
||||
margin-right: 20px;
|
||||
color: #4ea6ff;
|
||||
color: #fff;
|
||||
border: 1px solid #4ea6ff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
style="margin-top: -10px; height: 160px;"
|
||||
/>
|
||||
<div class="btn-content" v-if="checkPer(permissions)">
|
||||
<a-button class="cancel" @click="handleCancel">取消</a-button>
|
||||
<a-button type="primary" class="cancel" @click="handleCancel">取消</a-button>
|
||||
<a-button type="primary" @click="pubNotice" class="sure">
|
||||
发布
|
||||
</a-button>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="sortbox" style="margin-left: 34px">
|
||||
<div class="sortname">已修证书</div>
|
||||
<div class="sortnub">
|
||||
<span class="nub1">{{ rank.certNum || 0 }}</span>
|
||||
<span class="nub1">{{ certificateNum || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -168,6 +168,10 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
certificateNum: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const state = reactive({
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div style="display: flex; overflow-x: auto; overflow-y: auto">
|
||||
<div class="tabs" style="min-width: 800px">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane v-if="isGroup" :key="4" tab="项目内学员1">
|
||||
<a-tab-pane v-if="isGroup" :key="4" tab="项目内学员">
|
||||
<div :style="{ height: screenHeight - 235 + 'px' }">
|
||||
<div>
|
||||
<a-form-item label="姓名:">
|
||||
@@ -304,6 +304,7 @@ import {
|
||||
} from "@/api/ThirdApi";
|
||||
import {
|
||||
saveStu,
|
||||
getAllStudentByProjectId,
|
||||
// addGroupMember,
|
||||
getStuPage,
|
||||
} from "@/api/index1";
|
||||
@@ -366,6 +367,7 @@ console.log("props.activeKey1" + props.activeKey1);
|
||||
// 获取项目学员;
|
||||
const procurrentPage = ref(1);
|
||||
const projectList = ref([]);
|
||||
const allProjectStudent = ref([]);
|
||||
const proStudentName = ref("");
|
||||
const projectListTotal = ref(-1);
|
||||
const projectPageSize = ref(10);
|
||||
@@ -384,6 +386,16 @@ const projectRowSelection = computed(() => ({
|
||||
onChange: onProjectSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
}));
|
||||
|
||||
const getAllStudent = () => {
|
||||
let params = {
|
||||
projectId:props.id
|
||||
};
|
||||
getAllStudentByProjectId(params).then(res => {
|
||||
allProjectStudent.value = res.data.data;
|
||||
})
|
||||
};
|
||||
getAllStudent();
|
||||
const getStu = () => {
|
||||
let obj = {
|
||||
studentName: proStudentName.value,
|
||||
@@ -811,15 +823,16 @@ function handleStageOk() {
|
||||
}
|
||||
} else if (activeKey.value === 1) {
|
||||
selectMember = selectsData.value.studentList.length;
|
||||
|
||||
|
||||
let arr = [...allProjectStudent.value].filter(x => [...selectsData.value.studentList].some(y => y.id === x.studentId));
|
||||
if (arr.length > 0) {
|
||||
message.warning("部分学员已经有小组,再次添加会被添加到当前小组.");
|
||||
}
|
||||
} else if (activeKey.value === 2) {
|
||||
selectMember = selectsData.value.groupList.length;
|
||||
} else if (activeKey.value === 3) {
|
||||
selectMember = selectsData.value.deptList.length;
|
||||
}
|
||||
|
||||
|
||||
if (props.groupMemberCount < selectMember + Number(props.groupMemberNumber)) {
|
||||
return message.warning("添加小组学员超过最大值");
|
||||
}
|
||||
@@ -839,7 +852,7 @@ function handleStageOk() {
|
||||
stageId: selectsData.value.stageId,
|
||||
groupIds: selectsData.value.groupList?.map((e) => e.id),
|
||||
studentList: selectsData.value.studentList.concat(
|
||||
selectsData.value.projectMemberList
|
||||
selectsData.value.projectMemberList
|
||||
),
|
||||
groupName: props.groupName,
|
||||
groupId: props.groupId,
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-button class="cus-btn white" style="width: 100px" @click="reset">
|
||||
<a-button class="cus-btn" style="width: 100px;background: #4ea6ff; color: #fff;" @click="reset">
|
||||
<template #icon>
|
||||
<img
|
||||
style="margin-right: 10px"
|
||||
@@ -99,7 +99,7 @@
|
||||
</a-col>
|
||||
<!-- 新加导入学员 批量换组 导出学习信息 -->
|
||||
<a-col :span="1.5" v-if="type === 1 || type === 2">
|
||||
<a-button class="cus-btn white" @click="showImpStu">
|
||||
<a-button class="cus-btn" @click="showImpStu" style="background: #4ea6ff; color: #fff">
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
@@ -110,23 +110,23 @@
|
||||
</a-col>
|
||||
|
||||
<a-col :span="1.5" v-if="type === 1">
|
||||
<a-button class="cus-btn white" @click="showChangeGroupModal">
|
||||
<a-button class="cus-btn" @click="showChangeGroupModal" style="background: #4ea6ff; color: #fff">
|
||||
批量换组
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col :span="1.5" v-if="type === 1">
|
||||
<a-button class="cus-btn white" @click="exportTaskStu">
|
||||
<a-button class="cus-btn" @click="exportTaskStu" style="background: #4ea6ff; color: #fff">
|
||||
导出学习信息
|
||||
</a-button>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="1.5" v-if="type === 2">
|
||||
<a-button class="cus-btn white" @click="exportTaskStuRouter">
|
||||
<a-button class="cus-btn" @click="exportTaskStuRouter" style="background: #4ea6ff; color: #fff">
|
||||
导出学习信息
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col :span="1.5">
|
||||
<a-button class="cus-btn white" @click="bathDel">
|
||||
<a-button class="cus-btn" @click="bathDel" style="background: #4ea6ff; color: #fff">
|
||||
<template #icon
|
||||
><img
|
||||
style="margin-right: 10px"
|
||||
@@ -136,24 +136,24 @@
|
||||
</a-button>
|
||||
</a-col>
|
||||
<a-col :span="1.5" v-if="type === 2">
|
||||
<a-button class="cus-btn white" @click="showChangeModal">
|
||||
<a-button class="cus-btn" @click="showChangeModal" style="background: #4ea6ff; color: #fff">
|
||||
<template #icon></template>
|
||||
批量调整关卡
|
||||
</a-button>
|
||||
</a-col>
|
||||
<!-- 新加批量操作、导出、导出作业 -->
|
||||
<a-col :span="1.5" v-if="type === 3" class="batchOpera">
|
||||
<div class="stmm_btn btn4" @click="hideShow">
|
||||
<div class="stmm_btn btn4" @click="hideShow" style="background: #4ea6ff">
|
||||
<div class="btn4_sub">
|
||||
<span style="color: #4ea6ff; margin-right: 4px"> 批量操作 </span>
|
||||
<span style="color: #fff; margin-right: 4px;"> 批量操作 </span>
|
||||
<div
|
||||
class="b_zk"
|
||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
||||
></div>
|
||||
:style="{ display: hideshow ? 'block' : 'none', color: '#fff', lineHeight: '9px', transform: 'rotate(180deg)'}"
|
||||
>^</div>
|
||||
<div
|
||||
class="b_sq"
|
||||
:style="{ display: hideshow ? 'none' : 'block' }"
|
||||
></div>
|
||||
:style="{ display: hideshow ? 'none' : 'block', color: '#fff', lineHeight: '12px'}"
|
||||
>^</div>
|
||||
</div>
|
||||
<div
|
||||
class="btn4_sup"
|
||||
@@ -175,13 +175,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stmm_btn btn5" @click="exportStu">
|
||||
<div class="stmm_btn btn5" @click="exportStu" style="background: #4ea6ff; color: #fff;">
|
||||
<div class="export"></div>
|
||||
<div class="btnText">导出</div>
|
||||
</div>
|
||||
<div
|
||||
class="stmm_btn btn5"
|
||||
style="margin-left: 15px"
|
||||
style="margin-left: 15px;background: #4ea6ff; color: #fff;"
|
||||
@click="exportHomeWorkShow"
|
||||
>
|
||||
<div class="btnText">导出作业</div>
|
||||
@@ -1004,7 +1004,7 @@ defineExpose({ getStuList, startLoading });
|
||||
cursor: pointer;
|
||||
|
||||
.btnText {
|
||||
color: #4ea6ff;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
@@ -1025,14 +1025,14 @@ defineExpose({ getStuList, startLoading });
|
||||
.b_zk {
|
||||
width: 10px;
|
||||
height: 8px;
|
||||
background-image: url("@/assets/images/coursewareManage/down.png");
|
||||
// background-image: url("@/assets/images/coursewareManage/down.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.b_sq {
|
||||
width: 10px;
|
||||
height: 8px;
|
||||
background-image: url("@/assets/images/coursewareManage/up.png");
|
||||
// background-image: url("@/assets/images/coursewareManage/up.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
@@ -1063,12 +1063,12 @@ defineExpose({ getStuList, startLoading });
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn4_tit:hover,
|
||||
.btn4_op1:hover,
|
||||
.btn4_op2:hover,
|
||||
.btn4_op3:hover {
|
||||
color: #4ea6ff;
|
||||
}
|
||||
// .btn4_tit:hover,
|
||||
// .btn4_op1:hover,
|
||||
// .btn4_op2:hover,
|
||||
// .btn4_op3:hover {
|
||||
// color: #4ea6ff;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1080,7 +1080,7 @@ defineExpose({ getStuList, startLoading });
|
||||
width: 17px;
|
||||
height: 18px;
|
||||
margin-right: 5px;
|
||||
background-image: url("@/assets/images/coursewareManage/export.png");
|
||||
background-image: url("@/assets/images/coursewareManage/export1.png");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,23 +28,11 @@ export function traverseArr(arr, traverseObj, saveOld = false) {
|
||||
return newArr;
|
||||
}
|
||||
|
||||
const admin = [5, 6, 8, 9, 11, 12];
|
||||
// const admin = [5, 6, 8, 9, 11, 12];
|
||||
|
||||
//检查 管理权和归属权
|
||||
export function checkPer(per,createId) {
|
||||
if(createId && store?.state?.userInfo?.id === createId){
|
||||
return true;
|
||||
}
|
||||
if (store?.state?.userInfo?.roleList.some(t => t.code === "system-admin")) {
|
||||
return true;
|
||||
}
|
||||
if (store?.state?.userInfo?.isHrbp) {
|
||||
return true;
|
||||
}
|
||||
if (!per) {
|
||||
return false;
|
||||
}
|
||||
return (per + "").split(",").some(t => admin.some(s => s == t));
|
||||
export function checkPer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
const adminOwner = [6, 9, 12];
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="b_footer">
|
||||
<div class="btn btn5" @click="of_exit1">
|
||||
<div class="btn btn6" @click="of_exit1">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<a-button
|
||||
@@ -1169,7 +1169,7 @@
|
||||
</div>
|
||||
|
||||
<div class="items_btn">
|
||||
<div class="cstm_btn btn5" @click="handleCancelStu">
|
||||
<div class="cstm_btn btn6" @click="handleCancelStu">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<a-button
|
||||
@@ -1590,7 +1590,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1" @click="delete_exit1">
|
||||
<div class="del_btn btn2" @click="delete_exit1">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2" @click="handleDeleteExit">
|
||||
@@ -3798,11 +3798,11 @@ export default defineComponent({
|
||||
dataIndex: "studentBandDesc",
|
||||
key: "7",
|
||||
align: "center",
|
||||
customRender: (record) => {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span>
|
||||
{record.studentBandDesc ? record.studentBandDesc : "-"}
|
||||
{text.record.studentBandDesc ? text.record.studentBandDesc : "-"}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
@@ -4582,7 +4582,6 @@ export default defineComponent({
|
||||
getTableDate3();
|
||||
};
|
||||
const handleRestTable = () => {
|
||||
debugger
|
||||
state.kk_inputV1 = "";
|
||||
state.kk_inputV2 = "";
|
||||
state.selectTime = "";
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="m_btn">
|
||||
<div class="btn btn5" @click="noEditClose">
|
||||
<div class="btn btn6" @click="noEditClose">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<a-button
|
||||
@@ -510,7 +510,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="samtn btn1" @click="closeLearnBgMore">取消</button>
|
||||
<button class="samtn btn2" @click="closeLearnBgMore">取消</button>
|
||||
<a-button class="samtn btn2" @click="closeLearnBgMore">确定</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
</div>
|
||||
<div class="proright">
|
||||
<div class="pronub" style="margin-left: 142px">
|
||||
{{ stageOverviewList[choosedStageIndex]?.totalTaskCnt }}
|
||||
{{ stageOverviewList[choosedStageIndex]?.completeTaskCnt }}
|
||||
</div>
|
||||
<div class="proright1">
|
||||
<span class="textpro">阶段任务总数</span>
|
||||
@@ -1595,6 +1595,7 @@
|
||||
v-model:Seevisible="Seevisible"
|
||||
v-model:checkStuId="checkStuId"
|
||||
v-model:projectId="projectId"
|
||||
v-model:certificateNum="certificateNum"
|
||||
/>
|
||||
<!-- 学员换组 -->
|
||||
<change-group
|
||||
@@ -2466,6 +2467,7 @@ export default {
|
||||
Stuvisible: false, //添加学员
|
||||
Importvisible: false, //导入学员
|
||||
Seevisible: false, //查看学员
|
||||
certificateNum: 0,
|
||||
Changevisible: false, //学员换组
|
||||
editHs: false, //编辑弹窗
|
||||
delete_hs: false, //删除弹窗
|
||||
@@ -4716,6 +4718,7 @@ export default {
|
||||
state.editRecord = record;
|
||||
}
|
||||
function showStudent(record) {
|
||||
state.certificateNum = record.certCount;
|
||||
state.Seevisible = true;
|
||||
state.checkStuId = record.studentId;
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||
>确定
|
||||
</a-button>
|
||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||
<a-button @click="backPage" class="btn1">取消</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 更多背景图 v-model:visible="learnBgMore" -->
|
||||
@@ -271,7 +271,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="samtn btn1" @click="closeLearnBgMore">取消</button>
|
||||
<button class="samtn btn2" @click="closeLearnBgMore">取消</button>
|
||||
<button class="samtn btn2" @click="closeLearnBgMore">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,25 +22,25 @@
|
||||
:key="index + new Date().getTime()"
|
||||
>
|
||||
<ResearchAddSingle
|
||||
v-if="item.type === 1"
|
||||
v-if="item.type === 1 && item.deleted!==true"
|
||||
:item="item"
|
||||
:assessmentId="assessmentId"
|
||||
@del="handleDel"
|
||||
/>
|
||||
<ResearchAddMulti
|
||||
v-if="item.type === 2"
|
||||
v-if="item.type === 2 && item.deleted!==true"
|
||||
:item="item"
|
||||
:assessmentId="assessmentId"
|
||||
@del="handleDel"
|
||||
/>
|
||||
<ResearchAddAsk
|
||||
v-if="item.type === 3"
|
||||
v-if="item.type === 3 && item.deleted!==true"
|
||||
:item="item"
|
||||
:assessmentId="assessmentId"
|
||||
@del="handleDel"
|
||||
/>
|
||||
<ResearchAddPin
|
||||
v-if="item.type === 4"
|
||||
v-if="item.type === 4 && item.deleted!==true"
|
||||
:item="item"
|
||||
:assessmentId="assessmentId"
|
||||
@del="handleDel"
|
||||
@@ -109,8 +109,8 @@ import {
|
||||
queryResearchDetailById,
|
||||
editResearchMessage,
|
||||
createResearch,
|
||||
deleteChoiceQuestion,
|
||||
deleteQuestionScAndQa,
|
||||
// deleteChoiceQuestion,
|
||||
// deleteQuestionScAndQa,
|
||||
} from "@/api/indexResearch";
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {message} from "ant-design-vue";
|
||||
@@ -157,6 +157,7 @@ export default {
|
||||
...res.scoringQuestionVoList,
|
||||
];
|
||||
sortBy(renderArr, "orderNumber"); //序号
|
||||
console.log(renderArr)
|
||||
state.allFormsData = parseData(renderArr, "questionType"); //类型
|
||||
}
|
||||
};
|
||||
@@ -170,6 +171,8 @@ export default {
|
||||
let obj = {};
|
||||
if (key === 1) {
|
||||
let restList = traverseArr(item.assessmentSingleChoiceVoList, {
|
||||
ids:"id",
|
||||
deleted:"deleted",
|
||||
inputVal: "singleOptionName",
|
||||
imgVal: "singleOptionPictureAddress",
|
||||
optionId: "singleOptionId",
|
||||
@@ -188,6 +191,8 @@ export default {
|
||||
}
|
||||
if (key === 2) {
|
||||
let restList = traverseArr(item.multipleChoiceVoList, {
|
||||
ids:"id",
|
||||
deleted:"deleted",
|
||||
inputVal: "multipleOptionName",
|
||||
imgVal: "multipleOptionPictureAddress",
|
||||
optionId: "multipleOptionId",
|
||||
@@ -206,6 +211,8 @@ export default {
|
||||
}
|
||||
if (key === 3) {
|
||||
obj = {
|
||||
ids: item.id,
|
||||
deleted:item.deleted,
|
||||
type: key,
|
||||
valueAsk: item.assessmentQaTitle,
|
||||
valueAskDesc: item.assessmentQaDescribe,
|
||||
@@ -215,6 +222,8 @@ export default {
|
||||
}
|
||||
if (key === 4) {
|
||||
obj = {
|
||||
ids: item.id,
|
||||
deleted:item.deleted,
|
||||
type: key,
|
||||
valuePin: item.assessmentScTitle,
|
||||
minScore: item.assessmentMinScore,
|
||||
@@ -229,6 +238,7 @@ export default {
|
||||
itm.id = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
console.log(resultArr)
|
||||
return resultArr;
|
||||
};
|
||||
// 转换成后端格式
|
||||
@@ -238,6 +248,8 @@ export default {
|
||||
let obj = {};
|
||||
if (item[typeKey] === 1) {
|
||||
let restList = traverseArr(item.singleList, {
|
||||
id:"ids",
|
||||
deleted:"deleted",
|
||||
singleOptionName: "inputVal",
|
||||
singleOptionPictureAddress: "imgVal",
|
||||
singleOptionId: "optionId",
|
||||
@@ -261,6 +273,8 @@ export default {
|
||||
}
|
||||
if (item[typeKey] === 2) {
|
||||
let restList = traverseArr(item.mutilList, {
|
||||
id:"ids",
|
||||
deleted:"deleted",
|
||||
multipleOptionName: "inputVal",
|
||||
multipleOptionPictureAddress: "imgVal",
|
||||
multipleOptionId: "optionId",
|
||||
@@ -284,6 +298,8 @@ export default {
|
||||
}
|
||||
if (item[typeKey] === 3) {
|
||||
obj = {
|
||||
id:item.ids,
|
||||
deleted:item.deleted,
|
||||
questionType: item[typeKey],
|
||||
assessmentQaTitle: item.valueAsk,
|
||||
assessmentQaDescribe: item.valueAskDesc,
|
||||
@@ -293,6 +309,8 @@ export default {
|
||||
}
|
||||
if (item[typeKey] === 4) {
|
||||
obj = {
|
||||
id:item.ids,
|
||||
deleted:item.deleted,
|
||||
questionType: item[typeKey],
|
||||
assessmentScTitle: item.valuePin,
|
||||
assessmentMinScore: item.minScore,
|
||||
@@ -312,6 +330,7 @@ export default {
|
||||
// 解散传值
|
||||
const parseItem = (arr) => {
|
||||
const filterComObj = filterCommon(arr, "questionType");
|
||||
console.log(filterComObj)
|
||||
let resultObj = {};
|
||||
for (let key in filterComObj) {
|
||||
if (key === "1") {
|
||||
@@ -415,72 +434,161 @@ export default {
|
||||
};
|
||||
|
||||
const handleDel = ({ id, type, curItem }) => {
|
||||
|
||||
// 接口删除
|
||||
// if (state.assessmentId && (curItem.orderNumber || curItem.optionId)) {
|
||||
// if (type === 1) {
|
||||
// deleteChoiceQuestion({
|
||||
// assessmentId: state.assessmentId,
|
||||
// questionType: "1",
|
||||
// orderNumber: curItem.orderNumber,
|
||||
// }).then((res) => {
|
||||
// if (res.data.code === 200) {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// if (type === 2) {
|
||||
// deleteChoiceQuestion({
|
||||
// assessmentId: state.assessmentId,
|
||||
// questionType: "2",
|
||||
// orderNumber: curItem.orderNumber,
|
||||
// }).then((res) => {
|
||||
// if (res.data.code === 200) {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// if (type === 3) {
|
||||
// deleteQuestionScAndQa({
|
||||
// assessmentId: state.assessmentId,
|
||||
// questionType: "3",
|
||||
// optionId: curItem.optionId,
|
||||
// }).then((res) => {
|
||||
// if (res.data.code === 200) {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// if (type === 4) {
|
||||
// deleteQuestionScAndQa({
|
||||
// assessmentId: state.assessmentId,
|
||||
// questionType: "4",
|
||||
// optionId: curItem.optionId,
|
||||
// }).then((res) => {
|
||||
// if (res.data.code === 200) {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// } else {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
if (state.assessmentId && (curItem.orderNumber || curItem.optionId)) {
|
||||
if (type === 1) {
|
||||
deleteChoiceQuestion({
|
||||
assessmentId: state.assessmentId,
|
||||
questionType: "1",
|
||||
orderNumber: curItem.orderNumber,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
virtualDel(id);
|
||||
}
|
||||
});
|
||||
virtualDel(id);
|
||||
}
|
||||
if (type === 2) {
|
||||
deleteChoiceQuestion({
|
||||
assessmentId: state.assessmentId,
|
||||
questionType: "2",
|
||||
orderNumber: curItem.orderNumber,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
virtualDel(id);
|
||||
}
|
||||
});
|
||||
virtualDel(id);
|
||||
}
|
||||
if (type === 3) {
|
||||
deleteQuestionScAndQa({
|
||||
assessmentId: state.assessmentId,
|
||||
questionType: "3",
|
||||
optionId: curItem.optionId,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
virtualDel(id);
|
||||
}
|
||||
});
|
||||
virtualDel(id);
|
||||
}
|
||||
if (type === 4) {
|
||||
deleteQuestionScAndQa({
|
||||
assessmentId: state.assessmentId,
|
||||
questionType: "4",
|
||||
optionId: curItem.optionId,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
virtualDel(id);
|
||||
}
|
||||
});
|
||||
virtualDel(id);
|
||||
}
|
||||
} else {
|
||||
virtualDel(id);
|
||||
}
|
||||
};
|
||||
const virtualDel = (id) => {
|
||||
// 前端删除
|
||||
// state.allFormsData.forEach((item, index) => {
|
||||
// if (item.id === id) {
|
||||
// state.allFormsData.splice(index, 1);
|
||||
// }
|
||||
// });
|
||||
// state.allFormsData.map((item, index) => {
|
||||
// item.id = index + 1;
|
||||
// return item;
|
||||
// });
|
||||
// 前端删除
|
||||
state.allFormsData.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
state.allFormsData.splice(index, 1);
|
||||
state.allFormsData[index].deleted = true;
|
||||
}
|
||||
});
|
||||
state.allFormsData.map((item, index) => {
|
||||
item.id = index + 1;
|
||||
return item;
|
||||
});
|
||||
};
|
||||
|
||||
// 处理id为空的字段
|
||||
const formatID = (data) => {
|
||||
let obj = {}
|
||||
for(let i in data){
|
||||
if(i=="assessmentSingleChoiceDtoList"){
|
||||
let arr1 = []
|
||||
for(let k=0;k<data[i].length;k++){
|
||||
if(data[i][k].id!==undefined){
|
||||
arr1.push(data[i][k])
|
||||
}else{
|
||||
let obj1 = {...data[i][k]}
|
||||
delete obj1.id
|
||||
delete obj1.deleted
|
||||
arr1.push(obj1)
|
||||
}
|
||||
}
|
||||
obj.assessmentSingleChoiceDtoList = arr1;
|
||||
}
|
||||
if(i=="assessmentMultipleChoiceDtoList"){
|
||||
let arr1 = []
|
||||
for(let k=0;k<data[i].length;k++){
|
||||
if(data[i][k].id!==undefined){
|
||||
arr1.push(data[i][k])
|
||||
}else{
|
||||
let obj1 = {...data[i][k]}
|
||||
delete obj1.id
|
||||
delete obj1.deleted
|
||||
arr1.push(obj1)
|
||||
}
|
||||
}
|
||||
obj.assessmentMultipleChoiceDtoList = arr1;
|
||||
}
|
||||
if(i=="assessmentEssayQuestionDtoList"){
|
||||
let arr1 = []
|
||||
for(let k=0;k<data[i].length;k++){
|
||||
if(data[i][k].id!==undefined){
|
||||
arr1.push(data[i][k])
|
||||
}else{
|
||||
let obj1 = {...data[i][k]}
|
||||
delete obj1.id
|
||||
delete obj1.deleted
|
||||
arr1.push(obj1)
|
||||
}
|
||||
}
|
||||
obj.assessmentEssayQuestionDtoList = arr1;
|
||||
}
|
||||
if(i=="assessmentScoringQuestionDtoList"){
|
||||
let arr1 = []
|
||||
for(let k=0;k<data[i].length;k++){
|
||||
if(data[i][k].id!==undefined){
|
||||
arr1.push(data[i][k])
|
||||
}else{
|
||||
let obj1 = {...data[i][k]}
|
||||
delete obj1.id
|
||||
delete obj1.deleted
|
||||
arr1.push(obj1)
|
||||
}
|
||||
}
|
||||
obj.assessmentScoringQuestionDtoList = arr1;
|
||||
}
|
||||
}
|
||||
console.log(obj)
|
||||
return obj
|
||||
}
|
||||
const handleSave = () => {
|
||||
let resultPost = {};
|
||||
let filterData = parseItem(restData(state.allFormsData, "type"));
|
||||
let filterData = formatID(parseItem(restData(state.allFormsData, "type")));
|
||||
// 处理id为undefined得字段
|
||||
console.log('mmmmmmmmm------->',filterData)
|
||||
// 校验
|
||||
if (!checkVal(filterData)) {
|
||||
return false;
|
||||
@@ -489,7 +597,7 @@ export default {
|
||||
|
||||
if (state.assessmentId) {
|
||||
resultPost = {
|
||||
assessmentId: state.assessmentId,
|
||||
id: state.assessmentId,
|
||||
assessmentName: state.assessmentName,
|
||||
assessmentMark: state.valueMore,
|
||||
...filterData,
|
||||
@@ -498,6 +606,7 @@ export default {
|
||||
"assessmentMaxScore",
|
||||
"assessmentMinScore",
|
||||
]);
|
||||
|
||||
editResearchMessage(resultPost).then((res) => {
|
||||
state.loading = false;
|
||||
if (res.data.code === 200) {
|
||||
@@ -576,6 +685,9 @@ export default {
|
||||
}
|
||||
console.log("CountNum");
|
||||
console.log(CountNum);
|
||||
if(CountNum>100){
|
||||
CountNum = 100;
|
||||
}
|
||||
if (CountNum !== 100) {
|
||||
message.error("当前权重设置是百分制 请重新配置");
|
||||
return false;
|
||||
|
||||
@@ -65,29 +65,68 @@
|
||||
:pagination="false"
|
||||
>
|
||||
<template #operation="{ record }">
|
||||
<a-space style="padding-right:10px">
|
||||
<a-button v-if="record.releaseStatus === '1' && checkPer(record.permissions)"
|
||||
@click=" handleOper(record,'push')" type="link">发布
|
||||
<a-space style="padding-right: 10px">
|
||||
<a-button
|
||||
v-if="
|
||||
record.releaseStatus === '1' && checkPer(record.permissions)
|
||||
"
|
||||
@click="handleOper(record, 'push')"
|
||||
type="link"
|
||||
>发布
|
||||
</a-button>
|
||||
<a-button v-if="record.releaseStatus === '1' && checkPer(record.permissions)"
|
||||
@click=" editOper(record)" type="link">编辑
|
||||
<a-button
|
||||
v-if="
|
||||
record.releaseStatus === '1' && checkPer(record.permissions)
|
||||
"
|
||||
@click="editOper(record)"
|
||||
type="link"
|
||||
>编辑
|
||||
</a-button>
|
||||
<a-button v-if="record.releaseStatus === '1' && checkPer(record.permissions)"
|
||||
@click=" handleEditPage(record.id)" type="link">基础信息
|
||||
<a-button
|
||||
v-if="
|
||||
record.releaseStatus === '1' && checkPer(record.permissions)
|
||||
"
|
||||
@click="handleEditPage(record.id)"
|
||||
type="link"
|
||||
>基础信息
|
||||
</a-button>
|
||||
<a-button v-if="record.releaseStatus === '2' && checkPer(record.permissions)"
|
||||
@click=" toManage(record.id, record)" type="link">管理
|
||||
<a-button
|
||||
v-if="
|
||||
record.releaseStatus === '2' && checkPer(record.permissions)
|
||||
"
|
||||
@click="toManage(record.id, record)"
|
||||
type="link"
|
||||
>管理
|
||||
</a-button>
|
||||
<a-button v-if="checkPer(record.permissions)" @click=" handleOper(record,'copy')" type="link">复制
|
||||
<a-button
|
||||
v-if="checkPer(record.permissions)"
|
||||
@click="handleOper(record, 'copy')"
|
||||
type="link"
|
||||
>复制
|
||||
</a-button>
|
||||
<a-button v-if="record.releaseStatus === '2' && checkPer(record.permissions)"
|
||||
@click="() => handleOper(record,'withdraw')" type="link">撤回
|
||||
<a-button
|
||||
v-if="
|
||||
record.releaseStatus === '2' && checkPer(record.permissions)
|
||||
"
|
||||
@click="() => handleOper(record, 'withdraw')"
|
||||
type="link"
|
||||
>撤回
|
||||
</a-button>
|
||||
<a-button v-if="record.releaseStatus === '2' && checkPer(record.permissions)"
|
||||
@click=" handleOper(record,'end')" type="link">结束
|
||||
<a-button
|
||||
v-if="
|
||||
record.releaseStatus === '2' && checkPer(record.permissions)
|
||||
"
|
||||
@click="handleOper(record, 'end')"
|
||||
type="link"
|
||||
>结束
|
||||
</a-button>
|
||||
<a-button v-if="record.releaseStatus !== '2' && checkPer(record.permissions)"
|
||||
@click=" handleOper(record,'del')" type="link">删除
|
||||
<a-button
|
||||
v-if="
|
||||
record.releaseStatus !== '2' && checkPer(record.permissions)
|
||||
"
|
||||
@click="handleOper(record, 'del')"
|
||||
type="link"
|
||||
>删除
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -115,7 +154,7 @@
|
||||
>
|
||||
<div class="out">
|
||||
<div class="top">
|
||||
<img class="topimg" src="../../assets/images/courseManage/add1.png"/>
|
||||
<img class="topimg" src="../../assets/images/courseManage/add1.png" />
|
||||
<div class="topc">{{ !formData.id ? "创建" : "编辑" }}评估</div>
|
||||
<div
|
||||
style="margin-left: 500px; cursor: pointer"
|
||||
@@ -145,25 +184,33 @@
|
||||
</div>
|
||||
<div class="btn">
|
||||
<button class="samtn btn2" @click="handleCancel">取消</button>
|
||||
<a-button class="samtn btn2" @click="handleNext" :loading="formData.validated===1">
|
||||
<a-button
|
||||
class="samtn btn2"
|
||||
@click="handleNext"
|
||||
:loading="formData.validated === 1"
|
||||
>
|
||||
{{ !formData.id ? "下一步" : "确定" }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal
|
||||
>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref,onMounted} from "vue";
|
||||
import {createResearch, deleteResearch, editAssessmentName, editReleaseStatus,} from "@/api/indexResearch";
|
||||
import {checkPer} from "@/utils/utils";
|
||||
import {Form, message} from "ant-design-vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import {
|
||||
createResearch,
|
||||
deleteResearch,
|
||||
editAssessmentName,
|
||||
editReleaseStatus,
|
||||
} from "@/api/indexResearch";
|
||||
import { checkPer } from "@/utils/utils";
|
||||
import { Form, message } from "ant-design-vue";
|
||||
import NameInput from "@/components/project/NameInput";
|
||||
import {useRowsPage} from "@/api/request";
|
||||
import {ASSESSMENT_PAGE} from "@/api/apis";
|
||||
import {useRouter} from "vue-router";
|
||||
import { useRowsPage } from "@/api/request";
|
||||
import { ASSESSMENT_PAGE } from "@/api/apis";
|
||||
import { useRouter } from "vue-router";
|
||||
import dialog from "@/utils/dialog";
|
||||
|
||||
const router = useRouter();
|
||||
@@ -279,7 +326,7 @@ onMounted(() => {
|
||||
// 是否需要触发新建弹框
|
||||
let str = location.href;
|
||||
let isOpen = str.includes("openCreate=true");
|
||||
if(isOpen){
|
||||
if (isOpen) {
|
||||
newNext.value = true;
|
||||
}
|
||||
});
|
||||
@@ -297,10 +344,16 @@ const rulesRef = ref({
|
||||
});
|
||||
|
||||
const { resetFields } = Form.useForm(searchData, {});
|
||||
const { resetFields: resetFormFields, validate } = Form.useForm(formData, rulesRef);
|
||||
const { resetFields: resetFormFields, validate } = Form.useForm(
|
||||
formData,
|
||||
rulesRef
|
||||
);
|
||||
|
||||
const { data, total, loading, fetch } = useRowsPage(ASSESSMENT_PAGE, searchData.value);
|
||||
const handle = record => ({
|
||||
const { data, total, loading, fetch } = useRowsPage(
|
||||
ASSESSMENT_PAGE,
|
||||
searchData.value
|
||||
);
|
||||
const handle = (record) => ({
|
||||
push: () => {
|
||||
message.info("发布成功!");
|
||||
record.releaseStatus = "2";
|
||||
@@ -324,10 +377,58 @@ const handle = record => ({
|
||||
},
|
||||
copy: async () => {
|
||||
loading.value = true;
|
||||
message.info("删除成功!");
|
||||
await createResearch({ ...record, assessmentName: record.assessmentName + "(1)" });
|
||||
message.info("复制成功!");
|
||||
record.id = null;
|
||||
|
||||
if (record.essayQuestionVoList) {
|
||||
record.essayQuestionVoList.forEach((item) => {
|
||||
item.id = null;
|
||||
});
|
||||
}
|
||||
//多选题
|
||||
let assessmentMultipleChoiceDtoList = [];
|
||||
if (record.multipleStemVoList) {
|
||||
record.multipleStemVoList.forEach((item) => {
|
||||
item.multipleChoiceVoList.forEach((a) => {
|
||||
a.id = null;
|
||||
assessmentMultipleChoiceDtoList.push(a);
|
||||
});
|
||||
});
|
||||
}
|
||||
if (record.scoringQuestionVoList) {
|
||||
record.scoringQuestionVoList.forEach((item) => {
|
||||
item.id = null;
|
||||
});
|
||||
}
|
||||
//单选题
|
||||
let assessmentSingleChoiceDtoList = [];
|
||||
if (record.singleStemVoList) {
|
||||
record.singleStemVoList.forEach((item) => {
|
||||
item.assessmentSingleChoiceVoList.forEach((a) => {
|
||||
a.id = null;
|
||||
assessmentSingleChoiceDtoList.push(a);
|
||||
});
|
||||
});
|
||||
}
|
||||
console.log("record", record);
|
||||
console.log("复制传参", {
|
||||
...record,
|
||||
assessmentName: record.assessmentName + "(1)",
|
||||
});
|
||||
let newObj = {
|
||||
assessmentEssayQuestionDtoList: record.essayQuestionVoList,
|
||||
assessmentMultipleChoiceDtoList: assessmentMultipleChoiceDtoList,
|
||||
assessmentScoringQuestionDtoList: record.scoringQuestionVoList,
|
||||
assessmentSingleChoiceDtoList: assessmentSingleChoiceDtoList,
|
||||
assessmentMark: record.assessmentMark,
|
||||
};
|
||||
console.log("newObj", newObj);
|
||||
await createResearch({
|
||||
...newObj,
|
||||
assessmentName: record.assessmentName + "(1)",
|
||||
});
|
||||
fetch();
|
||||
}
|
||||
},
|
||||
});
|
||||
const handleMsg = {
|
||||
push: "您确定要发布此评估吗",
|
||||
@@ -379,7 +480,10 @@ function handleEditPage(id) {
|
||||
}
|
||||
|
||||
function toManage(id, record) {
|
||||
router.push({ path: `/managepage/${id}`, query: { createName:record.createName, createTime:record.createTime } });
|
||||
router.push({
|
||||
path: `/managepage/${id}`,
|
||||
query: { createName: record.createName, createTime: record.createTime },
|
||||
});
|
||||
}
|
||||
|
||||
const handleNext = async () => {
|
||||
@@ -392,12 +496,18 @@ const handleNext = async () => {
|
||||
return;
|
||||
}
|
||||
if (!formData.value.id) {
|
||||
router.push({ path: "/researchadd", query: { name: formData.value.assessmentName } });
|
||||
router.push({
|
||||
path: "/researchadd",
|
||||
query: { name: formData.value.assessmentName },
|
||||
});
|
||||
} else {
|
||||
newNext.value = false
|
||||
newNext.value = false;
|
||||
loading.value = true;
|
||||
message.info("编辑成功!");
|
||||
await editAssessmentName({ assessmentId: formData.value.id, assessmentName: formData.value.assessmentName });
|
||||
await editAssessmentName({
|
||||
assessmentId: formData.value.id,
|
||||
assessmentName: formData.value.assessmentName,
|
||||
});
|
||||
fetch();
|
||||
}
|
||||
};
|
||||
@@ -448,8 +558,8 @@ const handleNext = async () => {
|
||||
height: 68px;
|
||||
|
||||
background: linear-gradient(
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -736,8 +846,8 @@ const handleNext = async () => {
|
||||
}
|
||||
|
||||
.ant-table-tbody
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||
> td {
|
||||
background: #f6f9fd;
|
||||
}
|
||||
}
|
||||
@@ -805,8 +915,8 @@ const handleNext = async () => {
|
||||
width: calc(100%);
|
||||
height: 40px;
|
||||
background: linear-gradient(
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="tagbox">
|
||||
<div class="tagname">问答题</div>
|
||||
<div class="deleteop" @click="handleTypesDel(3)">
|
||||
<div><img src="../../../assets/images/projectadd/delete.png" /></div>
|
||||
<div><img src="../../../assets/images/projectadd/delete1.png" /></div>
|
||||
<div class="del_text">删除题目</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- 评估管理-创建评估页面 -->
|
||||
<template>
|
||||
<div class="itemRow">
|
||||
<div class="itemRow" v-if="!item.deleted">
|
||||
<div class="options">
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="tagbox">
|
||||
<div class="tagname">多选题</div>
|
||||
<div class="deleteop" @click="handleTypesDel(2)">
|
||||
<div><img src="../../../assets/images/projectadd/delete.png" /></div>
|
||||
<div><img src="../../../assets/images/projectadd/delete1.png" /></div>
|
||||
<div class="del_text">删除题目</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,7 +56,7 @@
|
||||
<script>
|
||||
import { ref } from "vue";
|
||||
import ResearchAddItem from "./ResearchAddItem.vue";
|
||||
import { deleteChoiceQuestion } from "@/api/indexResearch";
|
||||
// import { deleteChoiceQuestion } from "@/api/indexResearch";
|
||||
|
||||
export default {
|
||||
name: "ResearchAddMulti",
|
||||
@@ -110,30 +110,40 @@ export default {
|
||||
};
|
||||
const delMutil = ({ id, optionId }) => {
|
||||
// 接口删除
|
||||
// if (assessmentId.value && optionId) {
|
||||
// deleteChoiceQuestion({
|
||||
// assessmentId: assessmentId.value,
|
||||
// questionType: "2",
|
||||
// optionId,
|
||||
// }).then((res) => {
|
||||
// if (res.data.code === 200) {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
if (assessmentId.value && optionId) {
|
||||
deleteChoiceQuestion({
|
||||
assessmentId: assessmentId.value,
|
||||
questionType: "2",
|
||||
optionId,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
virtualDel(id);
|
||||
}
|
||||
});
|
||||
virtualDel(id);
|
||||
} else {
|
||||
virtualDel(id);
|
||||
}
|
||||
};
|
||||
const virtualDel = (id) => {
|
||||
// 前端删除
|
||||
// curItem.value.mutilList.forEach((item, index) => {
|
||||
// if (item.id === id) {
|
||||
// curItem.value.mutilList.splice(index, 1);
|
||||
// }
|
||||
// });
|
||||
// curItem.value.mutilList.map((item, index) => {
|
||||
// item.id = index + 1;
|
||||
// });
|
||||
curItem.value.mutilList.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
curItem.value.mutilList.splice(index, 1);
|
||||
curItem.value.mutilList[index].deleted = true;
|
||||
}
|
||||
});
|
||||
curItem.value.mutilList.map((item, index) => {
|
||||
item.id = index + 1;
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -244,11 +254,11 @@ export default {
|
||||
height: 40px;
|
||||
margin-top: 20px;
|
||||
margin-right: 30px;
|
||||
border: 1px solid #4ea6ff;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
.del_text {
|
||||
color: #4ea6ff;
|
||||
color: #fff !important;
|
||||
font-size: 14px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="tagbox">
|
||||
<div class="tagname">评分题</div>
|
||||
<div class="deleteop" @click="handleTypesDel(4)">
|
||||
<div><img src="../../../assets/images/projectadd/delete.png" /></div>
|
||||
<div><img src="../../../assets/images/projectadd/delete1.png" /></div>
|
||||
<div class="del_text">删除题目</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="tagbox">
|
||||
<div class="tagname">单选题</div>
|
||||
<div class="deleteop" @click="handleTypesDel(1)">
|
||||
<div><img src="../../../assets/images/projectadd/delete.png" /></div>
|
||||
<div><img src="../../../assets/images/projectadd/delete1.png" /></div>
|
||||
<div class="del_text">删除题目</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -56,7 +56,7 @@
|
||||
<script>
|
||||
import { ref } from "vue";
|
||||
import ResearchAddItem from "./ResearchAddItem.vue";
|
||||
import { deleteChoiceQuestion } from "@/api/indexResearch";
|
||||
// import { deleteChoiceQuestion } from "@/api/indexResearch";
|
||||
|
||||
export default {
|
||||
name: "ResearchAddSingle",
|
||||
@@ -104,32 +104,44 @@ export default {
|
||||
}
|
||||
});
|
||||
};
|
||||
const del = ({ id, optionId }) => {
|
||||
const del = ({ id, optionId}) => {
|
||||
// 接口删除
|
||||
// if (assessmentId.value && optionId) {
|
||||
// deleteChoiceQuestion({
|
||||
// assessmentId: assessmentId.value,
|
||||
// questionType: "1",
|
||||
// optionId,
|
||||
// }).then((res) => {
|
||||
// if (res.data.code === 200) {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// virtualDel(id);
|
||||
// }
|
||||
if (assessmentId.value && optionId) {
|
||||
deleteChoiceQuestion({
|
||||
assessmentId: assessmentId.value,
|
||||
questionType: "1",
|
||||
optionId,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
virtualDel(id);
|
||||
}
|
||||
});
|
||||
virtualDel(id);
|
||||
} else {
|
||||
virtualDel(id);
|
||||
}
|
||||
};
|
||||
const virtualDel = (id) => {
|
||||
// 前端删除
|
||||
// curItem.value.singleList.forEach((item, index) => {
|
||||
// if (item.id === id) {
|
||||
// curItem.value.singleList.splice(index, 1);
|
||||
// }
|
||||
// });
|
||||
// curItem.value.singleList.map((item, index) => {
|
||||
// item.id = index + 1;
|
||||
// });
|
||||
|
||||
// 前端删除
|
||||
curItem.value.singleList.forEach((item, index) => {
|
||||
if (item.id === id) {
|
||||
curItem.value.singleList.splice(index, 1);
|
||||
curItem.value.singleList[index].deleted = true;
|
||||
}
|
||||
});
|
||||
curItem.value.singleList.map((item, index) => {
|
||||
item.id = index + 1;
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user