mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-22 17:26:46 +08:00
Merge branch 'develop' into manage-release
This commit is contained in:
@@ -368,7 +368,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_btns">
|
<div class="main_btns">
|
||||||
<button class="btn1" @click="closeDrawer">取消</button>
|
<button class="btn2" @click="closeDrawer">取消</button>
|
||||||
<button class="btn2" @click="confirm">确定</button>
|
<button class="btn2" @click="confirm">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_btns" style="background:#fff;">
|
<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>
|
<a-button class="btn2" html-type="submit" @click="confirm">确定</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -309,7 +309,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_btns">
|
<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>
|
<a-button class="btn2" @click="confirm">确定</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
添加组员
|
添加组员
|
||||||
</a-button></CommonStudent
|
</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="img3"></div>
|
||||||
<div class="wz">批量删除</div>
|
<div class="wz">批量删除</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnn">
|
<div class="btnn">
|
||||||
<button class="btn1" @click="closeDrawer">取消</button>
|
<button class="btn2" @click="closeDrawer">取消</button>
|
||||||
<button class="btn2" @click="closeDrawer">确定</button>
|
<button class="btn2" @click="closeDrawer">确定</button>
|
||||||
</div>
|
</div>
|
||||||
<!-- 批量删除的弹窗 -->
|
<!-- 批量删除的弹窗 -->
|
||||||
@@ -678,7 +678,7 @@ export default {
|
|||||||
.img2 {
|
.img2 {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
background-image: url(../../assets/images/courseManage/reset1.png);
|
background-image: url(../../assets/images/courseManage/reset0.png);
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
}
|
}
|
||||||
@@ -691,9 +691,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
background: #ffffff;
|
background: #4ea6ff;
|
||||||
|
|
||||||
color: #4ea6ff;
|
color: #fff;
|
||||||
border: 1px solid #4ea6ff;
|
border: 1px solid #4ea6ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -723,7 +723,7 @@ export default {
|
|||||||
.img2 {
|
.img2 {
|
||||||
width: 17px;
|
width: 17px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background-image: url(../../assets/images/coursewareManage/export.png);
|
background-image: url(../../assets/images/coursewareManage/export1.png);
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
}
|
}
|
||||||
@@ -731,7 +731,7 @@ export default {
|
|||||||
.img3 {
|
.img3 {
|
||||||
width: 17px;
|
width: 17px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background-image: url(../../assets/images/projectadd/delete.png);
|
background-image: url(../../assets/images/projectadd/delete1.png);
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
}
|
}
|
||||||
@@ -744,9 +744,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
background: #ffffff;
|
background: #4ea6ff;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
color: #4ea6ff;
|
color: #fff;
|
||||||
border: 1px solid #4ea6ff;
|
border: 1px solid #4ea6ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
style="margin-top: -10px; height: 160px;"
|
style="margin-top: -10px; height: 160px;"
|
||||||
/>
|
/>
|
||||||
<div class="btn-content" v-if="checkPer(permissions)">
|
<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 type="primary" @click="pubNotice" class="sure">
|
||||||
发布
|
发布
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<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">{{ rank.certNum || 0 }}</span>
|
<span class="nub1">{{ certificateNum || 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -168,6 +168,10 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
certificateNum: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="2">
|
<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>
|
<template #icon>
|
||||||
<img
|
<img
|
||||||
style="margin-right: 10px"
|
style="margin-right: 10px"
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<!-- 新加导入学员 批量换组 导出学习信息 -->
|
<!-- 新加导入学员 批量换组 导出学习信息 -->
|
||||||
<a-col :span="1.5" v-if="type === 1 || type === 2">
|
<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
|
<template #icon
|
||||||
><img
|
><img
|
||||||
style="margin-right: 10px"
|
style="margin-right: 10px"
|
||||||
@@ -110,23 +110,23 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col :span="1.5" v-if="type === 1">
|
<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-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="1.5" v-if="type === 1">
|
<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-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col :span="1.5" v-if="type === 2">
|
<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-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="1.5">
|
<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
|
<template #icon
|
||||||
><img
|
><img
|
||||||
style="margin-right: 10px"
|
style="margin-right: 10px"
|
||||||
@@ -136,24 +136,24 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="1.5" v-if="type === 2">
|
<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>
|
<template #icon></template>
|
||||||
批量调整关卡
|
批量调整关卡
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- 新加批量操作、导出、导出作业 -->
|
<!-- 新加批量操作、导出、导出作业 -->
|
||||||
<a-col :span="1.5" v-if="type === 3" class="batchOpera">
|
<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">
|
<div class="btn4_sub">
|
||||||
<span style="color: #4ea6ff; margin-right: 4px"> 批量操作 </span>
|
<span style="color: #fff; margin-right: 4px;"> 批量操作 </span>
|
||||||
<div
|
<div
|
||||||
class="b_zk"
|
class="b_zk"
|
||||||
:style="{ display: hideshow ? 'block' : 'none' }"
|
:style="{ display: hideshow ? 'block' : 'none', color: '#fff', lineHeight: '9px', transform: 'rotate(180deg)'}"
|
||||||
></div>
|
>^</div>
|
||||||
<div
|
<div
|
||||||
class="b_sq"
|
class="b_sq"
|
||||||
:style="{ display: hideshow ? 'none' : 'block' }"
|
:style="{ display: hideshow ? 'none' : 'block', color: '#fff', lineHeight: '12px'}"
|
||||||
></div>
|
>^</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="btn4_sup"
|
class="btn4_sup"
|
||||||
@@ -175,13 +175,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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="export"></div>
|
||||||
<div class="btnText">导出</div>
|
<div class="btnText">导出</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="stmm_btn btn5"
|
class="stmm_btn btn5"
|
||||||
style="margin-left: 15px"
|
style="margin-left: 15px;background: #4ea6ff; color: #fff;"
|
||||||
@click="exportHomeWorkShow"
|
@click="exportHomeWorkShow"
|
||||||
>
|
>
|
||||||
<div class="btnText">导出作业</div>
|
<div class="btnText">导出作业</div>
|
||||||
@@ -1004,7 +1004,7 @@ defineExpose({ getStuList, startLoading });
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.btnText {
|
.btnText {
|
||||||
color: #4ea6ff;
|
color: #fff;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
@@ -1025,14 +1025,14 @@ defineExpose({ getStuList, startLoading });
|
|||||||
.b_zk {
|
.b_zk {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
background-image: url("@/assets/images/coursewareManage/down.png");
|
// background-image: url("@/assets/images/coursewareManage/down.png");
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.b_sq {
|
.b_sq {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
background-image: url("@/assets/images/coursewareManage/up.png");
|
// background-image: url("@/assets/images/coursewareManage/up.png");
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1063,12 +1063,12 @@ defineExpose({ getStuList, startLoading });
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn4_tit:hover,
|
// .btn4_tit:hover,
|
||||||
.btn4_op1:hover,
|
// .btn4_op1:hover,
|
||||||
.btn4_op2:hover,
|
// .btn4_op2:hover,
|
||||||
.btn4_op3:hover {
|
// .btn4_op3:hover {
|
||||||
color: #4ea6ff;
|
// color: #4ea6ff;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1080,7 +1080,7 @@ defineExpose({ getStuList, startLoading });
|
|||||||
width: 17px;
|
width: 17px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
background-image: url("@/assets/images/coursewareManage/export.png");
|
background-image: url("@/assets/images/coursewareManage/export1.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,24 +28,12 @@ export function traverseArr(arr, traverseObj, saveOld = false) {
|
|||||||
return newArr;
|
return newArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const admin = [5, 6, 8, 9, 11, 12];
|
// const admin = [5, 6, 8, 9, 11, 12];
|
||||||
|
|
||||||
//检查 管理权和归属权
|
//检查 管理权和归属权
|
||||||
export function checkPer(per,createId) {
|
export function checkPer() {
|
||||||
if(createId && store?.state?.userInfo?.id === createId){
|
|
||||||
return true;
|
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
const adminOwner = [6, 9, 12];
|
const adminOwner = [6, 9, 12];
|
||||||
|
|
||||||
|
|||||||
@@ -284,7 +284,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="b_footer">
|
<div class="b_footer">
|
||||||
<div class="btn btn5" @click="of_exit1">
|
<div class="btn btn6" @click="of_exit1">
|
||||||
<div class="btnText">取消</div>
|
<div class="btnText">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<a-button
|
<a-button
|
||||||
@@ -1169,7 +1169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="items_btn">
|
<div class="items_btn">
|
||||||
<div class="cstm_btn btn5" @click="handleCancelStu">
|
<div class="cstm_btn btn6" @click="handleCancelStu">
|
||||||
<div class="btnText">取消</div>
|
<div class="btnText">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<a-button
|
<a-button
|
||||||
@@ -1590,7 +1590,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btnbox">
|
<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 class="btnText">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="del_btn btn2" @click="handleDeleteExit">
|
<div class="del_btn btn2" @click="handleDeleteExit">
|
||||||
@@ -4582,7 +4582,6 @@ export default defineComponent({
|
|||||||
getTableDate3();
|
getTableDate3();
|
||||||
};
|
};
|
||||||
const handleRestTable = () => {
|
const handleRestTable = () => {
|
||||||
debugger
|
|
||||||
state.kk_inputV1 = "";
|
state.kk_inputV1 = "";
|
||||||
state.kk_inputV2 = "";
|
state.kk_inputV2 = "";
|
||||||
state.selectTime = "";
|
state.selectTime = "";
|
||||||
|
|||||||
@@ -454,7 +454,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="m_btn">
|
<div class="m_btn">
|
||||||
<div class="btn btn5" @click="noEditClose">
|
<div class="btn btn6" @click="noEditClose">
|
||||||
<div class="btnText">取消</div>
|
<div class="btnText">取消</div>
|
||||||
</div>
|
</div>
|
||||||
<a-button
|
<a-button
|
||||||
@@ -510,7 +510,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<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>
|
<a-button class="samtn btn2" @click="closeLearnBgMore">确定</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1595,6 +1595,7 @@
|
|||||||
v-model:Seevisible="Seevisible"
|
v-model:Seevisible="Seevisible"
|
||||||
v-model:checkStuId="checkStuId"
|
v-model:checkStuId="checkStuId"
|
||||||
v-model:projectId="projectId"
|
v-model:projectId="projectId"
|
||||||
|
v-model:certificateNum="certificateNum"
|
||||||
/>
|
/>
|
||||||
<!-- 学员换组 -->
|
<!-- 学员换组 -->
|
||||||
<change-group
|
<change-group
|
||||||
@@ -2466,6 +2467,7 @@ export default {
|
|||||||
Stuvisible: false, //添加学员
|
Stuvisible: false, //添加学员
|
||||||
Importvisible: false, //导入学员
|
Importvisible: false, //导入学员
|
||||||
Seevisible: false, //查看学员
|
Seevisible: false, //查看学员
|
||||||
|
certificateNum: 0,
|
||||||
Changevisible: false, //学员换组
|
Changevisible: false, //学员换组
|
||||||
editHs: false, //编辑弹窗
|
editHs: false, //编辑弹窗
|
||||||
delete_hs: false, //删除弹窗
|
delete_hs: false, //删除弹窗
|
||||||
@@ -4716,6 +4718,7 @@ export default {
|
|||||||
state.editRecord = record;
|
state.editRecord = record;
|
||||||
}
|
}
|
||||||
function showStudent(record) {
|
function showStudent(record) {
|
||||||
|
state.certificateNum = record.certCount;
|
||||||
state.Seevisible = true;
|
state.Seevisible = true;
|
||||||
state.checkStuId = record.studentId;
|
state.checkStuId = record.studentId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,7 +243,7 @@
|
|||||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||||
>确定
|
>确定
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn1">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 更多背景图 v-model:visible="learnBgMore" -->
|
<!-- 更多背景图 v-model:visible="learnBgMore" -->
|
||||||
@@ -271,7 +271,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<button class="samtn btn1" @click="closeLearnBgMore">取消</button>
|
<button class="samtn btn2" @click="closeLearnBgMore">取消</button>
|
||||||
<button class="samtn btn2" @click="closeLearnBgMore">确定</button>
|
<button class="samtn btn2" @click="closeLearnBgMore">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ export default {
|
|||||||
let obj = {};
|
let obj = {};
|
||||||
if (key === 1) {
|
if (key === 1) {
|
||||||
let restList = traverseArr(item.assessmentSingleChoiceVoList, {
|
let restList = traverseArr(item.assessmentSingleChoiceVoList, {
|
||||||
|
ids:"id",
|
||||||
inputVal: "singleOptionName",
|
inputVal: "singleOptionName",
|
||||||
imgVal: "singleOptionPictureAddress",
|
imgVal: "singleOptionPictureAddress",
|
||||||
optionId: "singleOptionId",
|
optionId: "singleOptionId",
|
||||||
@@ -188,6 +189,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (key === 2) {
|
if (key === 2) {
|
||||||
let restList = traverseArr(item.multipleChoiceVoList, {
|
let restList = traverseArr(item.multipleChoiceVoList, {
|
||||||
|
ids:"id",
|
||||||
inputVal: "multipleOptionName",
|
inputVal: "multipleOptionName",
|
||||||
imgVal: "multipleOptionPictureAddress",
|
imgVal: "multipleOptionPictureAddress",
|
||||||
optionId: "multipleOptionId",
|
optionId: "multipleOptionId",
|
||||||
@@ -206,6 +208,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (key === 3) {
|
if (key === 3) {
|
||||||
obj = {
|
obj = {
|
||||||
|
ids: item.id,
|
||||||
type: key,
|
type: key,
|
||||||
valueAsk: item.assessmentQaTitle,
|
valueAsk: item.assessmentQaTitle,
|
||||||
valueAskDesc: item.assessmentQaDescribe,
|
valueAskDesc: item.assessmentQaDescribe,
|
||||||
@@ -215,6 +218,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (key === 4) {
|
if (key === 4) {
|
||||||
obj = {
|
obj = {
|
||||||
|
ids: item.id,
|
||||||
type: key,
|
type: key,
|
||||||
valuePin: item.assessmentScTitle,
|
valuePin: item.assessmentScTitle,
|
||||||
minScore: item.assessmentMinScore,
|
minScore: item.assessmentMinScore,
|
||||||
@@ -229,6 +233,7 @@ export default {
|
|||||||
itm.id = idx + 1;
|
itm.id = idx + 1;
|
||||||
return itm;
|
return itm;
|
||||||
});
|
});
|
||||||
|
console.log(resultArr)
|
||||||
return resultArr;
|
return resultArr;
|
||||||
};
|
};
|
||||||
// 转换成后端格式
|
// 转换成后端格式
|
||||||
@@ -238,6 +243,7 @@ export default {
|
|||||||
let obj = {};
|
let obj = {};
|
||||||
if (item[typeKey] === 1) {
|
if (item[typeKey] === 1) {
|
||||||
let restList = traverseArr(item.singleList, {
|
let restList = traverseArr(item.singleList, {
|
||||||
|
id:"ids",
|
||||||
singleOptionName: "inputVal",
|
singleOptionName: "inputVal",
|
||||||
singleOptionPictureAddress: "imgVal",
|
singleOptionPictureAddress: "imgVal",
|
||||||
singleOptionId: "optionId",
|
singleOptionId: "optionId",
|
||||||
@@ -261,6 +267,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (item[typeKey] === 2) {
|
if (item[typeKey] === 2) {
|
||||||
let restList = traverseArr(item.mutilList, {
|
let restList = traverseArr(item.mutilList, {
|
||||||
|
id:"ids",
|
||||||
multipleOptionName: "inputVal",
|
multipleOptionName: "inputVal",
|
||||||
multipleOptionPictureAddress: "imgVal",
|
multipleOptionPictureAddress: "imgVal",
|
||||||
multipleOptionId: "optionId",
|
multipleOptionId: "optionId",
|
||||||
@@ -284,6 +291,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (item[typeKey] === 3) {
|
if (item[typeKey] === 3) {
|
||||||
obj = {
|
obj = {
|
||||||
|
id:item.ids,
|
||||||
questionType: item[typeKey],
|
questionType: item[typeKey],
|
||||||
assessmentQaTitle: item.valueAsk,
|
assessmentQaTitle: item.valueAsk,
|
||||||
assessmentQaDescribe: item.valueAskDesc,
|
assessmentQaDescribe: item.valueAskDesc,
|
||||||
@@ -293,6 +301,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (item[typeKey] === 4) {
|
if (item[typeKey] === 4) {
|
||||||
obj = {
|
obj = {
|
||||||
|
id:item.ids,
|
||||||
questionType: item[typeKey],
|
questionType: item[typeKey],
|
||||||
assessmentScTitle: item.valuePin,
|
assessmentScTitle: item.valuePin,
|
||||||
assessmentMinScore: item.minScore,
|
assessmentMinScore: item.minScore,
|
||||||
@@ -312,6 +321,7 @@ export default {
|
|||||||
// 解散传值
|
// 解散传值
|
||||||
const parseItem = (arr) => {
|
const parseItem = (arr) => {
|
||||||
const filterComObj = filterCommon(arr, "questionType");
|
const filterComObj = filterCommon(arr, "questionType");
|
||||||
|
console.log(filterComObj)
|
||||||
let resultObj = {};
|
let resultObj = {};
|
||||||
for (let key in filterComObj) {
|
for (let key in filterComObj) {
|
||||||
if (key === "1") {
|
if (key === "1") {
|
||||||
@@ -478,9 +488,71 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 处理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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
arr1.push(obj1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
obj.assessmentScoringQuestionDtoList = arr1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(obj)
|
||||||
|
return obj
|
||||||
|
}
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
let resultPost = {};
|
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)) {
|
if (!checkVal(filterData)) {
|
||||||
return false;
|
return false;
|
||||||
@@ -489,7 +561,7 @@ export default {
|
|||||||
|
|
||||||
if (state.assessmentId) {
|
if (state.assessmentId) {
|
||||||
resultPost = {
|
resultPost = {
|
||||||
assessmentId: state.assessmentId,
|
id: state.assessmentId,
|
||||||
assessmentName: state.assessmentName,
|
assessmentName: state.assessmentName,
|
||||||
assessmentMark: state.valueMore,
|
assessmentMark: state.valueMore,
|
||||||
...filterData,
|
...filterData,
|
||||||
@@ -498,6 +570,7 @@ export default {
|
|||||||
"assessmentMaxScore",
|
"assessmentMaxScore",
|
||||||
"assessmentMinScore",
|
"assessmentMinScore",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
editResearchMessage(resultPost).then((res) => {
|
editResearchMessage(resultPost).then((res) => {
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="tagbox">
|
<div class="tagbox">
|
||||||
<div class="tagname">问答题</div>
|
<div class="tagname">问答题</div>
|
||||||
<div class="deleteop" @click="handleTypesDel(3)">
|
<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 class="del_text">删除题目</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="tagbox">
|
<div class="tagbox">
|
||||||
<div class="tagname">多选题</div>
|
<div class="tagname">多选题</div>
|
||||||
<div class="deleteop" @click="handleTypesDel(2)">
|
<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 class="del_text">删除题目</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -244,11 +244,11 @@ export default {
|
|||||||
height: 40px;
|
height: 40px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
border: 1px solid #4ea6ff;
|
background: #4ea6ff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
.del_text {
|
.del_text {
|
||||||
color: #4ea6ff;
|
color: #fff !important;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="tagbox">
|
<div class="tagbox">
|
||||||
<div class="tagname">评分题</div>
|
<div class="tagname">评分题</div>
|
||||||
<div class="deleteop" @click="handleTypesDel(4)">
|
<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 class="del_text">删除题目</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="tagbox">
|
<div class="tagbox">
|
||||||
<div class="tagname">单选题</div>
|
<div class="tagname">单选题</div>
|
||||||
<div class="deleteop" @click="handleTypesDel(1)">
|
<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 class="del_text">删除题目</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user