Merge branch 'pre-dev' into 'develop'

Pre dev

See merge request !24
This commit is contained in:
huangshengfa
2022-12-21 19:34:22 +08:00
16 changed files with 2277 additions and 2113 deletions

View File

@@ -44,7 +44,7 @@ export default defineComponent({
const store = useStore(); const store = useStore();
const isLogin = ref(false); const isLogin = ref(false);
// console.log("router", router.getRoutes(), route); // console.log("router", router.getRoutes(), route);
console.log("版本0.9.20------------"); console.log("版本1.0------------");
const routes = computed(() => { const routes = computed(() => {
return router.getRoutes().filter((e) => e.meta?.isLink); return router.getRoutes().filter((e) => e.meta?.isLink);
}); });

View File

@@ -236,7 +236,7 @@ const setCookie = (name, value, perpetual) => {
console.log('存储token到cookie') console.log('存储token到cookie')
let exdate = new Date() let exdate = new Date()
exdate.setDate(perpetual * 24 * 60 * 60 * 1000) //exdate.setDate(exdate.getDate() + 365) exdate.setDate(perpetual * 24 * 60 * 60 * 1000) //exdate.setDate(exdate.getDate() + 365)
document.cookie = name + '=' + value + ';expires=' + exdate.toGMTString() document.cookie = `${name}=${value};expires=${exdate.toGMTString()};path=/`
//永久有效 //永久有效
//document.cookie = name + '=' + value + ';expires=' + 'Fri, 31 Dec 9999 23:59:59 GMT' //document.cookie = name + '=' + value + ';expires=' + 'Fri, 31 Dec 9999 23:59:59 GMT'
} }

View File

@@ -64,7 +64,6 @@
:pagination="false" :pagination="false"
/>--> />-->
<a-table <a-table
class="ant-table-striped" class="ant-table-striped"
:row-class-name=" :row-class-name="
(_record, index) => (index % 2 === 1 ? 'table-striped' : null) (_record, index) => (index % 2 === 1 ? 'table-striped' : null)
@@ -92,7 +91,8 @@
class="pagination" class="pagination"
@change="handelChangePage" @change="handelChangePage"
/> />
</div></div> </div>
</div>
</div> </div>
</div> </div>
<div class="main_btns"> <div class="main_btns">
@@ -171,7 +171,7 @@ export default {
time: undefined, time: undefined,
caseId: null, caseId: null,
caseName: "", caseName: "",
isClick: false isClick: false,
}); });
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:addcaseVisible", false); ctx.emit("update:addcaseVisible", false);
@@ -218,6 +218,7 @@ export default {
} }
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
state.apiTaskList = selectedRows; state.apiTaskList = selectedRows;
console.log("selectedRows", selectedRows);
}; };
const handelChangePage = (page, pageSize) => { const handelChangePage = (page, pageSize) => {
state.selectedRowKeys = []; state.selectedRowKeys = [];
@@ -282,8 +283,8 @@ export default {
} }
if (state.isClick) { if (state.isClick) {
message.destroy(); message.destroy();
message.error('请勿频繁点击') message.error("请勿频繁点击");
return return;
} }
state.isClick = true; state.isClick = true;
for (let i = 0; i < state.apiTaskList.length; i++) { for (let i = 0; i < state.apiTaskList.length; i++) {
@@ -310,8 +311,8 @@ export default {
} else if (props.isLevel == 2) { } else if (props.isLevel == 2) {
if (state.isClick) { if (state.isClick) {
message.destroy(); message.destroy();
message.error('请勿频繁点击') message.error("请勿频繁点击");
return return;
} }
state.isClick = true; state.isClick = true;
for (let i = 0; i < state.apiTaskList.length; i++) { for (let i = 0; i < state.apiTaskList.length; i++) {
@@ -340,8 +341,8 @@ export default {
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
if (state.isClick) { if (state.isClick) {
message.destroy(); message.destroy();
message.error('请勿频繁点击') message.error("请勿频繁点击");
return return;
} }
state.isClick = true; state.isClick = true;
for (let i = 0; i < state.apiTaskList.length; i++) { for (let i = 0; i < state.apiTaskList.length; i++) {
@@ -350,7 +351,9 @@ export default {
courseId: Number(state.apiTaskList[i].casesId), courseId: Number(state.apiTaskList[i].casesId),
name: state.apiTaskList[i].title, name: state.apiTaskList[i].title,
projectTaskId: props.projectTaskId, projectTaskId: props.projectTaskId,
projectTemplateId: Number(localStorage.getItem("projectTemplateId")), projectTemplateId: Number(
localStorage.getItem("projectTemplateId")
),
stageId: Number(props.chooseStageId) || 0, stageId: Number(props.chooseStageId) || 0,
type: 3, type: 3,
}) })

View File

@@ -1,12 +1,21 @@
<template> <template>
<a-drawer :visible="addonlineVisible" class="drawerStyle addonlineDrawer" width="80%" title="添加在线" placement="right" <a-drawer
@after-visible-change="afterVisibleChange"> :visible="addonlineVisible"
class="drawerStyle addonlineDrawer"
width="80%"
title="添加在线"
placement="right"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div v-if="edit" class="headerTitle">编辑在线</div> <div v-if="edit" class="headerTitle">编辑在线</div>
<div v-else class="headerTitle">添加在线</div> <div v-else class="headerTitle">添加在线</div>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png" <img
@click="closeDrawer" /> style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div> </div>
<div class="contentMain"> <div class="contentMain">
<div class="main_items"> <div class="main_items">
@@ -14,16 +23,19 @@
<div class="mii_ipt"> <div class="mii_ipt">
<div class="ipt_name"></div> <div class="ipt_name"></div>
<div class="fi_input"> <div class="fi_input">
<a-input v-model:value="inputV1" style=" <a-input
v-model:value="inputV1"
style="
width: 280px; width: 280px;
height: 40px; height: 40px;
border-radius: 8px; border-radius: 8px;
padding-right: 49px; padding-right: 49px;
" placeholder="请输入课程名称" maxlength="20" /> "
placeholder="请输入课程名称"
maxlength="20"
/>
<div class="inp_num" style="position: absolute; right: 7px"> <div class="inp_num" style="position: absolute; right: 7px">
<span style="color: #c7cbd2"> <span style="color: #c7cbd2"> </span>
</span>
</div> </div>
</div> </div>
</div> </div>
@@ -79,19 +91,34 @@
<!-- 编辑的表格 --> <!-- 编辑的表格 -->
<div> <div>
<div> <div>
<a-table class="ant-table-striped" :row-class-name=" <a-table
class="ant-table-striped"
:row-class-name="
(_record, index) => (index % 2 === 1 ? 'table-striped' : null) (_record, index) => (index % 2 === 1 ? 'table-striped' : null)
" :row-selection="{ "
:row-selection="{
type: 'radio', type: 'radio',
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :columns="tableDataFunc()" :data-source="tableData" :loading="tableDataTotal === -1 ? true : false" }"
:pagination="false" /> :columns="tableDataFunc()"
<div class="tableBox" style="margin-top:85px;"> :data-source="tableData"
:loading="tableDataTotal === -1 ? true : false"
:pagination="false"
/>
<div class="tableBox" style="margin-top: 85px">
<div class="pa"> <div class="pa">
<a-pagination v-if="tableDataTotal > 10" :showSizeChanger="false" showQuickJumper="true" <a-pagination
hideOnSinglePage="true" :pageSize="pageSize" :current="currentPage" :total="tableDataTotal" v-if="tableDataTotal > 10"
class="pagination" @change="handelChangePage" /> :showSizeChanger="false"
showQuickJumper="true"
hideOnSinglePage="true"
:pageSize="pageSize"
:current="currentPage"
:total="tableDataTotal"
class="pagination"
@change="handelChangePage"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -232,7 +259,7 @@ export default {
pageSize: 10, pageSize: 10,
choicecourse: true, choicecourse: true,
ddLoading: false, ddLoading: false,
isClick: false isClick: false,
}); });
const ChoiceCourse = () => { const ChoiceCourse = () => {
state.choicecourse = false; state.choicecourse = false;
@@ -256,9 +283,7 @@ export default {
} }
}; };
//TODO 根据id 获取在线课信息 //TODO 根据id 获取在线课信息
const getOnlineById = () => { const getOnlineById = () => {};
}
const tableDataFunc = () => { const tableDataFunc = () => {
const columns = [ const columns = [
// { // {
@@ -317,6 +342,7 @@ export default {
return columns; return columns;
}; };
const onSelectChange = (selectedRowKeys, selectedRows) => { const onSelectChange = (selectedRowKeys, selectedRows) => {
console.log("selectedRows", selectedRows);
state.selectedRowKeys = selectedRowKeys; state.selectedRowKeys = selectedRowKeys;
state.addOnlineList = selectedRows; state.addOnlineList = selectedRows;
console.log(selectedRowKeys, selectedRows); console.log(selectedRowKeys, selectedRows);
@@ -357,7 +383,9 @@ export default {
createTime: value.sysCreateTime, createTime: value.sysCreateTime,
publishTime: value.publishTime, publishTime: value.publishTime,
courseId: Number(value.onlineClassesId), courseId: Number(value.onlineClassesId),
studyTime: value.studyTime,
}; };
// console.log("objobjobjobj", obj, value);
array.push(obj); array.push(obj);
} }
}); });
@@ -458,8 +486,8 @@ export default {
console.log("需要查询的在线课ID", l_data_id); console.log("需要查询的在线课ID", l_data_id);
if (state.isClick) { if (state.isClick) {
message.destroy(); message.destroy();
message.error('请勿频繁点击') message.error("请勿频繁点击");
return return;
} }
state.isClick = true; state.isClick = true;
IsExistence({ IsExistence({
@@ -487,7 +515,7 @@ export default {
return; return;
} else { } else {
state.addOnlineList.map((value) => { state.addOnlineList.map((value) => {
console.log(value); console.log("要添加的在线课任务", value);
RouterEditTask({ RouterEditTask({
chapterId: Number(props.isactive), chapterId: Number(props.isactive),
courseId: value.num, courseId: value.num,
@@ -495,6 +523,7 @@ export default {
routerId: props.routerId, routerId: props.routerId,
routerTaskId: props.routerTaskId || 0, routerTaskId: props.routerTaskId || 0,
type: 1, type: 1,
duration: value.studyTime,
}) })
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
@@ -533,8 +562,8 @@ export default {
console.log("需要查询的在线课ID", p_data_id); console.log("需要查询的在线课ID", p_data_id);
if (state.isClick) { if (state.isClick) {
message.destroy(); message.destroy();
message.error('请勿频繁点击') message.error("请勿频繁点击");
return return;
} }
state.isClick = true; state.isClick = true;
IsExistenceProject({ IsExistenceProject({
@@ -569,6 +598,7 @@ export default {
projectTaskId: props.projectTaskId || 0, projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0, stageId: props.chooseStageId || 0,
type: 1, type: 1,
duration: value.studyTime,
}) })
.then(() => { .then(() => {
message.destroy(); message.destroy();
@@ -589,7 +619,6 @@ export default {
console.log(err); console.log(err);
}); });
} else if (props.isLevel == 3) { } else if (props.isLevel == 3) {
let p_data = state.addOnlineList; let p_data = state.addOnlineList;
let p_data_id = []; let p_data_id = [];
p_data.map((item) => { p_data.map((item) => {
@@ -598,8 +627,8 @@ export default {
console.log("需要查询的在线课ID", p_data_id); console.log("需要查询的在线课ID", p_data_id);
if (state.isClick) { if (state.isClick) {
message.destroy(); message.destroy();
message.error('请勿频繁点击') message.error("请勿频繁点击");
return return;
} }
state.isClick = true; state.isClick = true;
IsExistenceProjectTemplate({ IsExistenceProjectTemplate({
@@ -625,8 +654,7 @@ export default {
return; return;
} else { } else {
state.addOnlineList.map((value) => { state.addOnlineList.map((value) => {
console.log(props, props.projectTemplateId, props.projectTaskId);
console.log(props, props.projectTemplateId, props.projectTaskId)
addTempTask({ addTempTask({
courseId: value.num, courseId: value.num,
name: value.name, name: value.name,
@@ -634,24 +662,28 @@ export default {
projectTaskId: props.projectTaskId || 0, projectTaskId: props.projectTaskId || 0,
stageId: props.chooseStageId || 0, stageId: props.chooseStageId || 0,
type: 1, type: 1,
duration: value.studyTime,
}) })
.then((res) => { .then((res) => {
console.log('新增或者编辑在线课', res) console.log("新增或者编辑在线课", res);
message.destroy(); message.destroy();
message.success(`${props.edit ? "编辑" : "新增"}模板库任务成功`); message.success(
`${props.edit ? "编辑" : "新增"}模板库任务成功`
);
ctx.emit("changeData", false); ctx.emit("changeData", false);
closeDrawer(); closeDrawer();
state.isClick = false; state.isClick = false;
}) })
.catch(() => { .catch(() => {
message.destroy(); message.destroy();
message.error(`${props.edit ? "编辑" : "新增"}模板库任务失败`); message.error(
`${props.edit ? "编辑" : "新增"}模板库任务失败`
);
state.isClick = false; state.isClick = false;
}); });
}) });
} }
}); });
} }
//if(state.addOnlineList.Target==undefined){ //if(state.addOnlineList.Target==undefined){
// closeDrawer(); // closeDrawer();
@@ -674,9 +706,7 @@ export default {
state.currentPage = 1; state.currentPage = 1;
getAllOnlineText(); getAllOnlineText();
}; };
onMounted(() => { onMounted(() => {});
});
return { return {
...toRefs(state), ...toRefs(state),
afterVisibleChange, afterVisibleChange,
@@ -878,7 +908,9 @@ export default {
background-color: #eff4fc !important; background-color: #eff4fc !important;
} }
.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td { .ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd; background: #f6f9fd;
} }

View File

@@ -1,11 +1,19 @@
<template> <template>
<a-drawer :visible="addtestVisible" class="drawerStyle addtestDrawer" width="80%" placement="right" <a-drawer
@after-visible-change="afterVisibleChange"> :visible="addtestVisible"
class="drawerStyle addtestDrawer"
width="80%"
placement="right"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div class="headerTitle">{{ edit ? "编辑" : "添加" }}考试</div> <div class="headerTitle">{{ edit ? "编辑" : "添加" }}考试</div>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png" <img
@click="closeDrawer2" /> style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer2"
/>
</div> </div>
<!-- 2022-11-30注释 后面放开 修改div的padding-topL:32 --> <!-- 2022-11-30注释 后面放开 修改div的padding-topL:32 -->
<div style="display: flex; flex-direction: row; padding-top: 0px"> <div style="display: flex; flex-direction: row; padding-top: 0px">
@@ -31,20 +39,30 @@
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="signbox">
<div class="sign"> <div class="sign">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" /> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div> </div>
<span style="margin-right: 3px">考试名称</span> <span style="margin-right: 3px">考试名称</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input v-model:value="test.examinationName" style="width: 400px; height: 40px; border-radius: 8px" <a-input
placeholder="请输入考试名称" :maxlength="20" /> v-model:value="test.examinationName"
style="width: 400px; height: 40px; border-radius: 8px"
placeholder="请输入考试名称"
:maxlength="20"
/>
</div> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="signbox">
<div class="sign"> <div class="sign">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" /> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div> </div>
<span style="margin-right: 3px">选择试卷</span> <span style="margin-right: 3px">选择试卷</span>
</div> </div>
@@ -62,8 +80,11 @@
</div> </div>
<!-- 选择面授侧弹窗 --> <!-- 选择面授侧弹窗 -->
<div> <div>
<sel-facet v-model:selfacetVisible="selfacetvisible" v-model:chooseCourse="chooseCourse" <sel-facet
v-model:chooseCourseName="chooseCourseName" /> v-model:selfacetVisible="selfacetvisible"
v-model:chooseCourse="chooseCourse"
v-model:chooseCourseName="chooseCourseName"
/>
</div> </div>
<!-- 选择面授侧弹窗 --> <!-- 选择面授侧弹窗 -->
</div> </div>
@@ -71,25 +92,41 @@
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="signbox">
<div class="sign"> <div class="sign">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" /> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div> </div>
<span style="margin-right: 3px">考试时间</span> <span style="margin-right: 3px">考试时间</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-range-picker style="width: 400px; height: 40px; border-radius: 8px" show-time format="YYYY/MM/DD HH:mm" <a-range-picker
v-model:value="test.chooseTime" :placeholder="[' 开始时间', ' 结束时间']" /> style="width: 400px; height: 40px; border-radius: 8px"
show-time
format="YYYY/MM/DD HH:mm"
v-model:value="test.chooseTime"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="signbox">
<div class="sign"> <div class="sign">
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" /> <img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div> </div>
<span style="margin-right: 3px">考试时长</span> <span style="margin-right: 3px">考试时长</span>
</div> </div>
<div class="select"> <div class="select">
<a-input-number :min="0" :max="300" :precision="0" style="width: 400px; height: 40px; border-radius: 8px" <a-input-number
v-model:value="test.examinationDuration"></a-input-number> :min="0"
:max="300"
:precision="0"
style="width: 400px; height: 40px; border-radius: 8px"
v-model:value="test.examinationDuration"
></a-input-number>
<span style="color: #999999; margin-left: 8px">分钟</span> <span style="color: #999999; margin-left: 8px">分钟</span>
</div> </div>
</div> </div>
@@ -98,8 +135,14 @@
<span style="margin-right: 3px">考试说明</span> <span style="margin-right: 3px">考试说明</span>
</div> </div>
<div class="textarea"> <div class="textarea">
<a-textarea v-model:value="test.examinationExplain" placeholder="请输入考试说明" allow-clear show-count <a-textarea
:maxlength="200" :rows="6" /> v-model:value="test.examinationExplain"
placeholder="请输入考试说明"
allow-clear
show-count
:maxlength="200"
:rows="6"
/>
</div> </div>
</div> </div>
<div class="main_item2"> <div class="main_item2">
@@ -110,13 +153,21 @@
<div class="setbox"> <div class="setbox">
<div class="timerbox"> <div class="timerbox">
<span>允许重复考试</span> <span>允许重复考试</span>
<a-input-number :min="-1" :max="300" :precision="0" style=" <a-input-number
:min="-1"
:max="300"
:precision="0"
style="
width: 100px; width: 100px;
height: 32px; height: 32px;
border-radius: 8px; border-radius: 8px;
overflow: hidden; overflow: hidden;
" v-model:value="test.examinationLimit"></a-input-number> "
<span style="color: #999999; margin-left: 8px">,-1表示无限制</span> v-model:value="test.examinationLimit"
></a-input-number>
<span style="color: #999999; margin-left: 8px"
>,-1表示无限制</span
>
</div> </div>
</div> </div>
</div> </div>
@@ -127,10 +178,15 @@
<span style="margin-right: 3px">显示答案</span> <span style="margin-right: 3px">显示答案</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group style="margin-right: 12px" v-model:value="test.showAnswers"> <a-radio-group
<a-radio v-model:checked="checked" :value="1" @click="cloradio1">允许查看 style="margin-right: 12px"
v-model:value="test.showAnswers"
>
<a-radio v-model:checked="checked" :value="1" @click="cloradio1"
>允许查看
</a-radio> </a-radio>
<a-radio v-model:checked="checked" :value="2" @click="cloradio1">不允许查看 <a-radio v-model:checked="checked" :value="2" @click="cloradio1"
>不允许查看
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
@@ -140,10 +196,15 @@
<span style="margin-right: 3px">显示解析</span> <span style="margin-right: 3px">显示解析</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group style="margin-right: 12px" v-model:value="test.showAnalysis"> <a-radio-group
<a-radio v-model:checked="checked" :value="1" @click="cloradio2">允许查看 style="margin-right: 12px"
v-model:value="test.showAnalysis"
>
<a-radio v-model:checked="checked" :value="1" @click="cloradio2"
>允许查看
</a-radio> </a-radio>
<a-radio v-model:checked="checked" :value="2" @click="cloradio2">不允许查看 <a-radio v-model:checked="checked" :value="2" @click="cloradio2"
>不允许查看
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
@@ -153,21 +214,35 @@
<span style="margin-right: 3px">评分模式</span> <span style="margin-right: 3px">评分模式</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group style="margin-right: 12px" v-model:value="test.scoringModel"> <a-radio-group
<a-radio v-model:checked="checked" :value="1" @click="cloradio3">最高一次 style="margin-right: 12px"
v-model:value="test.scoringModel"
>
<a-radio v-model:checked="checked" :value="1" @click="cloradio3"
>最高一次
</a-radio> </a-radio>
<a-radio v-model:checked="checked" :value="2" @click="cloradio3">最后一次 <a-radio v-model:checked="checked" :value="2" @click="cloradio3"
>最后一次
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
</div> </div>
<div class="main_item"> <div class="main_item">
<div class="signbox"> <div class="signbox">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 3px">及格线</span> <span style="margin-right: 3px">及格线</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-input v-model:value="test.passLine" type="number" <a-input
style="width: 400px; height: 40px; border-radius: 8px" /> v-model:value="test.passLine"
type="number"
style="width: 400px; height: 40px; border-radius: 8px"
/>
<span style="color: #999999; margin-left: 8px"></span> <span style="color: #999999; margin-left: 8px"></span>
</div> </div>
@@ -178,14 +253,33 @@
<span style="margin-right: 3px">试题排列</span> <span style="margin-right: 3px">试题排列</span>
</div> </div>
<div class="btnbox"> <div class="btnbox">
<a-radio-group style="margin-right: 12px" v-model:value="test.questionArrangement"> <a-radio-group
<a-radio v-model:checked="checked" :value="1" @click="cloradio4">试题乱序 style="margin-right: 12px"
v-model:value="test.questionArrangement"
>
<a-radio
v-model:checked="checked"
:value="1"
@click="cloradio4"
>试题乱序
</a-radio> </a-radio>
<a-radio v-model:checked="checked" :value="2" @click="cloradio4">选项乱序 <a-radio
v-model:checked="checked"
:value="2"
@click="cloradio4"
>选项乱序
</a-radio> </a-radio>
<a-radio v-model:checked="checked" :value="3" @click="cloradio4">全部乱序 <a-radio
v-model:checked="checked"
:value="3"
@click="cloradio4"
>全部乱序
</a-radio> </a-radio>
<a-radio v-model:checked="checked" :value="4" @click="cloradio4">不乱序 <a-radio
v-model:checked="checked"
:value="4"
@click="cloradio4"
>不乱序
</a-radio> </a-radio>
</a-radio-group> </a-radio-group>
</div> </div>
@@ -309,7 +403,10 @@ export default {
}, },
], ],
}); });
state.test.showAnswers = 1;
state.test.showAnalysis = 1;
state.test.scoringModel = 2;
state.test.questionArrangement = 4;
const clearAll = () => { const clearAll = () => {
state.test = {}; state.test = {};
}; };
@@ -389,6 +486,10 @@ export default {
message.destroy(); message.destroy();
return message.warning("请输入考试时长"); return message.warning("请输入考试时长");
} }
if (!state.test.passLine) {
message.destroy();
return message.warning("请输入及格线");
}
state.addLoading = true; state.addLoading = true;
console.log("test", state.test); console.log("test", state.test);
@@ -400,10 +501,13 @@ export default {
// new Date(state.test.$slotschooseTime[1].$d).getTime() / 1000, // new Date(state.test.$slotschooseTime[1].$d).getTime() / 1000,
// "Y-M-D h:m" // "Y-M-D h:m"
// ); // );
state.test.examinationStartTime = dayjs(state.test.chooseTime[0]).format("YYYY-MM-DD HH:mm"), (state.test.examinationStartTime = dayjs(state.test.chooseTime[0]).format(
"YYYY-MM-DD HH:mm"
state.test.examinationEndTime = dayjs(state.test.chooseTime[1]).format("YYYY-MM-DD HH:mm"), )),
state.test.examinationPaperId = state.paperId; (state.test.examinationEndTime = dayjs(state.test.chooseTime[1]).format(
"YYYY-MM-DD HH:mm"
)),
(state.test.examinationPaperId = state.paperId);
//TODO缺少paperName字段 //TODO缺少paperName字段
state.test.examinationTestName = state.paperName; state.test.examinationTestName = state.paperName;
@@ -764,7 +868,9 @@ export default {
background-color: #eff4fc !important; background-color: #eff4fc !important;
} }
.ant-table-tbody>tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)>td { .ant-table-tbody
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
> td {
background: #f6f9fd; background: #f6f9fd;
} }

View File

@@ -185,8 +185,8 @@ export default {
assessmentId: info.assessmentId, assessmentId: info.assessmentId,
name: info.assessmentName, name: info.assessmentName,
num: num, num: num,
creator: info.createUser ? info.createUser : "-", creator: info.createUserName ? info.createUserName : "-",
time: dayjs(info.createTime).format("YYYY-MM-DD"), time: dayjs(info.createTime).format("YYYY-MM-DD HH:mm"),
}; };
//更新讨论信息 //更新讨论信息
state.assessment = obj; state.assessment = obj;
@@ -277,8 +277,8 @@ export default {
assessmentId: value.assessmentId, assessmentId: value.assessmentId,
num: num, num: num,
name: value.assessmentName ? value.assessmentName : "-", name: value.assessmentName ? value.assessmentName : "-",
creator: value.createUser ? value.createUser : "-", creator: value.createUserName ? value.createUserName : "-",
time: dayjs(value.createTime).format("YYYY-MM-DD"), time: dayjs(value.createTime).format("YYYY-MM-DD HH:mm"),
}; };
array.push(obj); array.push(obj);
}); });

View File

@@ -202,8 +202,8 @@ export default {
assessmentId: value.assessmentId, assessmentId: value.assessmentId,
num: num, num: num,
name: value.assessmentName ? value.assessmentName : "-", name: value.assessmentName ? value.assessmentName : "-",
creator: value.createUser ? value.createUser : "-", creator: value.createUserName ? value.createUserName : "-",
time: dayjs(value.createTime).format("YYYY-MM-DD"), time: dayjs(value.createTime).format("YYYY-MM-DD HH:mm"),
}; };
array.push(obj); array.push(obj);
}); });

View File

@@ -54,7 +54,7 @@
onChange: onSelectChange, onChange: onSelectChange,
}" }"
/> />
<div class="tableBox" style="margin-top:85px;"> <div class="tableBox" style="margin-top: 85px">
<div class="pa"> <div class="pa">
<a-pagination <a-pagination
v-if="tableDataTotal > 10" v-if="tableDataTotal > 10"
@@ -67,7 +67,8 @@
class="pagination" class="pagination"
@change="changePagination" @change="changePagination"
/> />
</div></div> </div>
</div>
</div> </div>
</div> </div>
<div class="main_btns"> <div class="main_btns">
@@ -230,12 +231,12 @@ export default {
const getAllEvalText = () => { const getAllEvalText = () => {
let objael = { let objael = {
keyword: state.inputV1, keyword: state.inputV1,
}; };
api api
.choiceEvaluation(objael) .choiceEvaluation(objael)
.then((res) => { .then((res) => {
state.tableDataTotal = 9; state.tableDataTotal = 9;
// console.log("测评列表", res.data.data);
getTableDataList(res.data.data); getTableDataList(res.data.data);
}) })
.catch(() => {}); .catch(() => {});

View File

@@ -4,14 +4,14 @@
<div class="CommonStudent"> <div class="CommonStudent">
<a-drawer <a-drawer
:visible="visiable" :visible="visiable"
class="drawerStyle ProjCheckship" class="drawerStyle ProjCheckship CommonStudent"
placement="right" placement="right"
width="60%" width="60%"
> >
<div class="drawerMain" id="ProjCheckship"> <div class="drawerMain" id="ProjCheckship" style="">
<div class="header"> <div class="header">
<div class="headerTitle"> <div class="headerTitle">
{{ {1: '添加学员', 2: '添加学员', 3: '添加学员'}[type] || '' }} {{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || "" }}
</div> </div>
<img <img
style="width: 29px; height: 29px; cursor: pointer" style="width: 29px; height: 29px; cursor: pointer"
@@ -19,8 +19,8 @@
@click="closeDrawer" @click="closeDrawer"
/> />
</div> </div>
<div style="width:100%;display: grid;grid-template-columns: 750px auto;"> <div style="display: flex; overflow-x: auto; overflow-y: auto">
<div class="tabs" style="min-height:800px;"> <div class="tabs" style="min-width: 800px">
<a-tabs v-model:activeKey="activeKey"> <a-tabs v-model:activeKey="activeKey">
<a-tab-pane :key="1" tab="快速选人"> <a-tab-pane :key="1" tab="快速选人">
<div :style="{ height: screenHeight - 235 + 'px' }"> <div :style="{ height: screenHeight - 235 + 'px' }">
@@ -31,19 +31,35 @@
style="width: 270px; height: 40px; border-radius: 8px" style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名" placeholder="请输入姓名"
/> />
<a-button type="primary" @click="onSearchStu" style="margin-left: 20px;border-radius: 4px"> <a-button
type="primary"
@click="onSearchStu"
style="margin-left: 20px; border-radius: 4px"
>
<template #icon> <template #icon>
<SearchOutlined /> <SearchOutlined />
</template> </template>
搜索 搜索
</a-button> </a-button>
<a-button @click="resetStu" style="margin-left: 20px;border-radius: 4px">重置</a-button> <a-button
@click="resetStu"
style="margin-left: 20px; border-radius: 4px"
>重置</a-button
>
</a-form-item> </a-form-item>
</div> </div>
<div class="chooseLeft" style="display: grid;grid-template-columns: 250px auto"> <div
<div :style="{ height: screenHeight - 180 + 'px' ,overflowY:'auto'}" class="chooseLeft"
style="border: 1px solid #f0f0f0; ;"> style="display: grid; grid-template-columns: 250px auto"
<div class="tree" style="margin: 10px 4px 220px 10px;"> >
<div
:style="{
height: screenHeight - 180 + 'px',
overflowY: 'auto',
}"
style="border: 1px solid #f0f0f0"
>
<div class="tree" style="margin: 10px 4px 220px 10px">
<a-tree <a-tree
allow-clear allow-clear
tree-default-expand-all tree-default-expand-all
@@ -59,7 +75,13 @@
</a-tree> </a-tree>
</div> </div>
</div> </div>
<div class="tableBox tabb" style="margin: 0px 4px 120px 10px; border: 1px solid #f0f0f0;"> <div
class="tableBox tabb"
style="
margin: 0px 4px 120px 10px;
border: 1px solid #f0f0f0;
"
>
<a-table <a-table
:columns="stuColumns" :columns="stuColumns"
:data-source="stuData" :data-source="stuData"
@@ -111,9 +133,7 @@
<!-- </div>--> <!-- </div>-->
<!-- </a-tab-pane>--> <!-- </a-tab-pane>-->
<a-tab-pane :key="3" tab="受众关联"> <a-tab-pane :key="3" tab="受众关联">
<div <div :style="{ height: screenHeight - 235 + 'px' }">
:style="{ height: screenHeight - 235 + 'px' }"
>
<div> <div>
<a-form-item label="受众名称:"> <a-form-item label="受众名称:">
<a-input <a-input
@@ -121,13 +141,21 @@
style="width: 260px; height: 40px; border-radius: 8px" style="width: 260px; height: 40px; border-radius: 8px"
placeholder="请输入受众名称" placeholder="请输入受众名称"
/> />
<a-button type="primary" @click="searchAudi" style="margin-left: 20px;border-radius: 4px"> <a-button
type="primary"
@click="searchAudi"
style="margin-left: 20px; border-radius: 4px"
>
<template #icon> <template #icon>
<SearchOutlined /> <SearchOutlined />
</template> </template>
搜索 搜索
</a-button> </a-button>
<a-button @click="resetAudienceInfo" style="margin-left: 20px;border-radius: 4px">重置</a-button> <a-button
@click="resetAudienceInfo"
style="margin-left: 20px; border-radius: 4px"
>重置</a-button
>
</a-form-item> </a-form-item>
</div> </div>
<div class="tableBox tabb"> <div class="tableBox tabb">
@@ -145,13 +173,11 @@
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
<div class="right1"> <div class="right1" style="min-width: 200px">
<div class="onerow"> <div class="onerow">
<div class="onleft"> <div class="onleft">
<div class="already">已选</div> <div class="already">已选</div>
</div> </div>
</div> </div>
<div <div
class="selecteds" class="selecteds"
@@ -173,17 +199,20 @@
<div class="ch" @click="stuDel(i)"></div> <div class="ch" @click="stuDel(i)"></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div v-if="!person && selectsData.studentList.length >10" class="ifsw"> <div
<div @click="person = !person" class=sw>查看更多></div> v-if="!person && selectsData.studentList.length > 10"
class="ifsw"
>
<div @click="person = !person" class="“sw”">查看更多></div>
</div> </div>
<div v-if="person && selectsData.studentList.length >10" class="ifsw"> <div
v-if="person && selectsData.studentList.length > 10"
class="ifsw"
>
<div @click="person = !person" class="sw">收起&lt;</div> <div @click="person = !person" class="sw">收起&lt;</div>
</div> </div>
<!--组织--> <!--组织-->
<!-- <div class="dept">添加组织</div>--> <!-- <div class="dept">添加组织</div>-->
<!-- <div v-for="(item,i) in selectsData.deptList" >--> <!-- <div v-for="(item,i) in selectsData.deptList" >-->
@@ -206,8 +235,6 @@
<!-- </div>--> <!-- </div>-->
<!-- <div v-if="!dept && selectsData.deptList.length >10" class="ifsw"><div @click="dept = !dept" class=sw>查看更多></div></div>--> <!-- <div v-if="!dept && selectsData.deptList.length >10" class="ifsw"><div @click="dept = !dept" class=sw>查看更多></div></div>-->
<!-- <div v-if="dept && selectsData.deptList.length >10" class="ifsw" ><div @click="dept = !dept" class="sw"> 收起&lt; </div></div>--> <!-- <div v-if="dept && selectsData.deptList.length >10" class="ifsw" ><div @click="dept = !dept" class="sw"> 收起&lt; </div></div>-->
<!--受众--> <!--受众-->
<div class="group">受众关联</div> <div class="group">受众关联</div>
<div v-for="(item, i) in selectsData.groupList"> <div v-for="(item, i) in selectsData.groupList">
@@ -224,18 +251,17 @@
<div class="ch2" @click="AuditDel(i)"></div> <div class="ch2" @click="AuditDel(i)"></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div v-if="!group && selectsData.groupList.length >10" class="ifsw"> <div
<div @click="group = !group" class=sw>查看更多></div> v-if="!group && selectsData.groupList.length > 10"
class="ifsw"
>
<div @click="group = !group" class="“sw”">查看更多></div>
</div> </div>
<div v-if="group && selectsData.groupList > 10" class="ifsw"> <div v-if="group && selectsData.groupList > 10" class="ifsw">
<div @click="group = !group" class="sw">收起&lt;</div> <div @click="group = !group" class="sw">收起&lt;</div>
</div> </div>
</div> </div>
</div> </div>
<!-- <div style="padding:100px 0 0 20px;display: grid;grid-template-rows: auto auto auto;"> <!-- <div style="padding:100px 0 0 20px;display: grid;grid-template-rows: auto auto auto;">
@@ -243,7 +269,6 @@
<div style="margin-top: 20px">快速选人</div> <div style="margin-top: 20px">快速选人</div>
// eslint-disable-next-line vue/require-v-for-key // eslint-disable-next-line vue/require-v-for-key
<div v-for="(item,i) in selectsData.studentList" > <div v-for="(item,i) in selectsData.studentList" >
<a-tag v-if="i < 10" :closable="true" color="#4ea6ff" @close="stuDel(i)" <a-tag v-if="i < 10" :closable="true" color="#4ea6ff" @close="stuDel(i)"
:key="i" style="margin-top:20px"> :key="i" style="margin-top:20px">
{{ item.realName }} {{ item.realName }}
@@ -252,7 +277,6 @@
style="margin-top:20px"> style="margin-top:20px">
{{ item.realName }} {{ item.realName }}
</a-tag> </a-tag>
<div></div> <div></div>
</div> </div>
</div> </div>
@@ -283,14 +307,22 @@
<slot></slot> <slot></slot>
</div> </div>
</div> </div>
<a-modal v-model:visible="stageVisible" width="1000px" title="选择阶段" @ok="handleStageOk"> <a-modal
v-model:visible="stageVisible"
width="1000px"
title="选择阶段"
@ok="handleStageOk"
>
<div> <div>
{{ type === 1 ? '选择阶段' : '选择关卡' }} {{ type === 1 ? "选择阶段" : "选择关卡" }}
<a-select style="width: 150px" :placeholder="type===1?'选择阶段':'选择关卡'" v-model:value="selectsData.stageId" <a-select
className="cus-select"> style="width: 150px"
<a-select-option v-for="(item,i) in stageIds" :key="i" :value="item.id">{{ :placeholder="type === 1 ? '选择阶段' : '选择关卡'"
item.name || '默认' v-model:value="selectsData.stageId"
}} className="cus-select"
>
<a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id"
>{{ item.name || "默认" }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</div> </div>
@@ -302,81 +334,76 @@ import {useStore} from "vuex";
import { useBoeApiPage } from "@/api/request"; import { useBoeApiPage } from "@/api/request";
import { AUDIENCE_LIST, USER_LIST } from "@/api/ThirdApi"; import { AUDIENCE_LIST, USER_LIST } from "@/api/ThirdApi";
import { saveStu } from "@/api/index1"; import { saveStu } from "@/api/index1";
const store = useStore(); const store = useStore();
const emit = defineEmits({}) const emit = defineEmits({});
const props = defineProps({ const props = defineProps({
type: Number, type: Number,
id: String, id: String,
stage: { stage: {
type: Array, type: Array,
default: () => [] default: () => [],
} },
}) });
const person = ref(false) const person = ref(false);
// const dept =ref(false) // const dept =ref(false)
const group = ref(false) const group = ref(false);
const visiable = ref(false) const visiable = ref(false);
const activeKey = ref(1) const activeKey = ref(1);
const stageVisible = ref(false) const stageVisible = ref(false);
const selectsData = ref({ const selectsData = ref({
stageId: '', stageId: "",
studentList: [], studentList: [],
deptList: [], deptList: [],
groupList: [] groupList: [],
}) });
const nameSearch = ref({ const nameSearch = ref({
keyword: '', keyword: "",
departId: null, departId: null,
page: 1, page: 1,
pageSize: 10 pageSize: 10,
}) });
const audienceName = ref({ const audienceName = ref({
keyword: '', keyword: "",
page: 1, page: 1,
pageSize: 10 pageSize: 10,
}) });
// const searchOrgName = ref({ // const searchOrgName = ref({
// keyword: '', // keyword: '',
// page: 1, // page: 1,
// pageSize: 10 // pageSize: 10
// }) // })
const stageIds = computed(() => props.stage);
const stageIds = computed(() => props.stage)
const { const {
data: stuData, data: stuData,
fetch: searchStu, fetch: searchStu,
page: stuPageNo, page: stuPageNo,
pageSize: stuPageSize, pageSize: stuPageSize,
loading: stuLoading, loading: stuLoading,
total: stuTotal total: stuTotal,
} = useBoeApiPage(USER_LIST, nameSearch.value, { } = useBoeApiPage(USER_LIST, nameSearch.value, {
init: false, init: false,
result: res => res.result.userInfoList, result: (res) => res.result.userInfoList,
totalPage: res => res.result.totalPage, totalPage: (res) => res.result.totalPage,
total: res => res.result.totalElement total: (res) => res.result.totalElement,
}) });
// const { // const {
// data: orgData, // data: orgData,
// fetch: searchOrg, // fetch: searchOrg,
// } = useBoeApi(ORG_LIST, searchOrgName.value) // } = useBoeApi(ORG_LIST, searchOrgName.value)
const { const {
data: audiData, data: audiData,
fetch: searchAudi, fetch: searchAudi,
page: audiPageNo, page: audiPageNo,
pageSize: audiPageSize, pageSize: audiPageSize,
loading: audiLoading, loading: audiLoading,
total: audiTotal total: audiTotal,
} = useBoeApiPage(AUDIENCE_LIST, audienceName.value, { } = useBoeApiPage(AUDIENCE_LIST, audienceName.value, {
init: true, init: true,
result: res => res.result.audienceList.map(e => ({...e, id: e.id + ''})), result: (res) =>
totalPage: res => res.result.totalPage, res.result.audienceList.map((e) => ({ ...e, id: e.id + "" })),
total: res => res.result.totalElement totalPage: (res) => res.result.totalPage,
}) total: (res) => res.result.totalElement,
});
const stuColumns = ref([ const stuColumns = ref([
{ {
title: "姓名", title: "姓名",
@@ -414,7 +441,7 @@ const stuColumns = ref([
className: "h", className: "h",
ellipsis: true, ellipsis: true,
}, },
]) ]);
const audiColums = ref([ const audiColums = ref([
{ {
title: "受众名称", title: "受众名称",
@@ -441,142 +468,125 @@ const audiColums = ref([
align: "center", align: "center",
className: "h", className: "h",
}, },
]) ]);
const stuSelectKeys = ref([]) const stuSelectKeys = ref([]);
const orgSelectKeys = ref([]) const orgSelectKeys = ref([]);
const auditSelectKeys = ref([]) const auditSelectKeys = ref([]);
const screenHeight = ref(document.body.clientHeight) const screenHeight = ref(document.body.clientHeight);
const stuRowSelection = computed(() => ({ const stuRowSelection = computed(() => ({
columnWidth: 20, columnWidth: 20,
selectedRowKeys: stuSelectKeys.value, selectedRowKeys: stuSelectKeys.value,
onChange: onStuSelectChange, onChange: onStuSelectChange,
preserveSelectedRowKeys: true, preserveSelectedRowKeys: true,
})) }));
const orgRowSelection = computed(() => ({ const orgRowSelection = computed(() => ({
columnWidth: 20, columnWidth: 20,
selectedRowKeys: orgSelectKeys.value, selectedRowKeys: orgSelectKeys.value,
onChange: onOrgSelectChange, onChange: onOrgSelectChange,
preserveSelectedRowKeys: true, preserveSelectedRowKeys: true,
})) }));
const stuPagination = computed(() => ({ const stuPagination = computed(() => ({
total: stuTotal.value, total: stuTotal.value,
showSizeChanger: false, showSizeChanger: false,
current: stuPageNo.value, current: stuPageNo.value,
pageSize: stuPageSize.value, pageSize: stuPageSize.value,
onChange: changePagination onChange: changePagination,
})) }));
const auditPagination = computed(() => ({ const auditPagination = computed(() => ({
total: audiTotal.value, total: audiTotal.value,
showSizeChanger: false, showSizeChanger: false,
current: audiPageNo.value, current: audiPageNo.value,
pageSize: audiPageSize.value, pageSize: audiPageSize.value,
onChange: auditChangePagination onChange: auditChangePagination,
})) }));
const auditRowSelection = computed(() => ({ const auditRowSelection = computed(() => ({
columnWidth: 20, columnWidth: 20,
selectedRowKeys: auditSelectKeys.value, selectedRowKeys: auditSelectKeys.value,
onChange: onAuditSelectChange, onChange: onAuditSelectChange,
preserveSelectedRowKeys: true, preserveSelectedRowKeys: true,
})) }));
const closeDrawer = () => { const closeDrawer = () => {
visiable.value = false visiable.value = false;
}; };
const openDrawer = () => { const openDrawer = () => {
visiable.value = true visiable.value = true;
}; };
//获取组织树 //获取组织树
const treeData = computed(() => { const treeData = computed(() => {
return store.state.orgtreeList ? store.state.orgtreeList : []; return store.state.orgtreeList ? store.state.orgtreeList : [];
}); });
function onSearchStu() { function onSearchStu() {
nameSearch.value.page = 1 nameSearch.value.page = 1;
searchStu() searchStu();
} }
function stuStuOrgSelect(e) { function stuStuOrgSelect(e) {
nameSearch.value.departId = e.join('') nameSearch.value.departId = e.join("");
searchStu() searchStu();
} }
function stuDel(i) { function stuDel(i) {
stuSelectKeys.value = stuSelectKeys.value.filter(e => e !== selectsData.value.studentList[i].id) stuSelectKeys.value = stuSelectKeys.value.filter(
selectsData.value.studentList.splice(i, 1) (e) => e !== selectsData.value.studentList[i].id
);
selectsData.value.studentList.splice(i, 1);
} }
// function orgDel(i) { // function orgDel(i) {
// orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id) // orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
// selectsData.value.deptList.splice(i, 1) // selectsData.value.deptList.splice(i, 1)
// } // }
function AuditDel(i) { function AuditDel(i) {
auditSelectKeys.value = auditSelectKeys.value.filter(e => e !== selectsData.value.groupList[i].id) auditSelectKeys.value = auditSelectKeys.value.filter(
selectsData.value.groupList.splice(i, 1) (e) => e !== selectsData.value.groupList[i].id
);
selectsData.value.groupList.splice(i, 1);
} }
// function orgSelect(key, obj) { // function orgSelect(key, obj) {
// console.log(obj) // console.log(obj)
//request(ORG_CHILD_LIST, {orgId: null}).then(res => { //request(ORG_CHILD_LIST, {orgId: null}).then(res => {
//console.log(res.result) //console.log(res.result)
//}) //})
//} //}
function onStuSelectChange(e, l) { function onStuSelectChange(e, l) {
stuSelectKeys.value = e stuSelectKeys.value = e;
selectsData.value.studentList = l selectsData.value.studentList = l;
} }
function onOrgSelectChange(e, l) { function onOrgSelectChange(e, l) {
orgRowSelection.value = e orgRowSelection.value = e;
selectsData.value.deptList = l.selectedNodes selectsData.value.deptList = l.selectedNodes;
} }
function onAuditSelectChange(e, l) { function onAuditSelectChange(e, l) {
auditSelectKeys.value = e auditSelectKeys.value = e;
selectsData.value.groupList = l selectsData.value.groupList = l;
} }
// const stuDepartmentSelect = (e) => { // const stuDepartmentSelect = (e) => {
// nameSearch.value.orgId = e.join('') // nameSearch.value.orgId = e.join('')
// searchStu() // searchStu()
// }; // };
//分页获取学员 //分页获取学员
const changePagination = (page) => { const changePagination = (page) => {
nameSearch.value.page = page; nameSearch.value.page = page;
searchStu() searchStu();
}; };
const auditChangePagination = (page) => { const auditChangePagination = (page) => {
audienceName.value.page = page; audienceName.value.page = page;
searchAudi() searchAudi();
}; };
//重置 //重置
const resetStu = () => { const resetStu = () => {
deleteDepSelect(); deleteDepSelect();
nameSearch.value = {keyword: '', page: 1, pageSize: 10} nameSearch.value = { keyword: "", page: 1, pageSize: 10 };
}; };
//清空选择部门信息 //清空选择部门信息
const deleteDepSelect = () => { const deleteDepSelect = () => {
stuSelectKeys.value = [] stuSelectKeys.value = [];
}; };
//重置组织 //重置组织
// const resetOrg = () => { // const resetOrg = () => {
// searchOrgName.value = {keyword: '', page: 1, pageSize: 10} // searchOrgName.value = {keyword: '', page: 1, pageSize: 10}
// }; // };
//重置受众 //重置受众
const resetAudienceInfo = () => { const resetAudienceInfo = () => {
audienceName.value = {keyword: '', page: 1, pageSize: 10} audienceName.value = { keyword: "", page: 1, pageSize: 10 };
}; };
//全部清除 //全部清除
// const deleteAll = () => { // const deleteAll = () => {
// selectsData.value = { // selectsData.value = {
@@ -588,57 +598,52 @@ const resetAudienceInfo = () => {
//确定添加授权 //确定添加授权
const submitAuth = () => { const submitAuth = () => {
if (props.type === 2) { if (props.type === 2) {
stageVisible.value = true stageVisible.value = true;
} else { } else {
handleStageOk() handleStageOk();
} }
}; };
function handleStageOk() { function handleStageOk() {
stageVisible.value = false stageVisible.value = false;
visiable.value = false visiable.value = false;
emit('finash', false) emit("finash", false);
saveStu({ saveStu({
targetId: props.id, targetId: props.id,
type: props.type, type: props.type,
deptIds: selectsData.value.deptList?.map(e => e.id), deptIds: selectsData.value.deptList?.map((e) => e.id),
stageId: selectsData.value.stageId, stageId: selectsData.value.stageId,
groupIds: selectsData.value.groupList?.map(e => e.id), groupIds: selectsData.value.groupList?.map((e) => e.id),
studentList: selectsData.value.studentList studentList: selectsData.value.studentList,
}).then(() => { }).then(() => {
emit('finash', true) emit("finash", true);
}) });
} }
watch(visiable, () => { watch(visiable, () => {
stuSelectKeys.value = [] stuSelectKeys.value = [];
orgSelectKeys.value = [] orgSelectKeys.value = [];
auditSelectKeys.value = [] auditSelectKeys.value = [];
stuData.value = [] stuData.value = [];
audienceName.value.keyword = '' audienceName.value.keyword = "";
audienceName.value.page = 1 audienceName.value.page = 1;
audienceName.value.pageSize = 10 audienceName.value.pageSize = 10;
selectsData.value = { selectsData.value = {
stageId: '', stageId: "",
studentList: [], studentList: [],
deptList: [], deptList: [],
groupList: [] groupList: [],
} };
searchAudi() searchAudi();
}) });
</script> </script>
<style lang="scss"> <style lang="scss">
.CommonStudent { .CommonStudent {
.ant-btn-primary { .ant-btn-primary {
background-color: #4ea6ff !important; background-color: #4ea6ff !important;
} }
.cus-select { .cus-select {
height: 40px; height: 40px;
border-radius: 8px; border-radius: 8px;
} }
.tableBox .ant-table-row .ant-table-cell { .tableBox .ant-table-row .ant-table-cell {
height: 48px; height: 48px;
font-size: 14px; font-size: 14px;
@@ -647,25 +652,18 @@ watch(visiable, () => {
line-height: 29px; line-height: 29px;
padding: 0px; padding: 0px;
} }
.tableBox .ant-table-thead tr th { .tableBox .ant-table-thead tr th {
font-size: 14px; font-size: 14px;
} }
.ant-tabs-tabpane { .ant-tabs-tabpane {
height: 100%; height: 100%;
} }
.ant-tabs { .ant-tabs {
overflow: visible; overflow: visible;
} }
}
.right1 { .right1 {
border-left: 1px solid #f2f6fe; border-left: 1px solid #f2f6fe;
width: 100%;
margin-left: 20px; margin-left: 20px;
.onerow { .onerow {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -700,7 +698,6 @@ watch(visiable, () => {
font-weight: 500; font-weight: 500;
} }
} }
.clbox { .clbox {
margin-right: 50px; margin-right: 50px;
display: flex; display: flex;
@@ -711,7 +708,6 @@ watch(visiable, () => {
height: 32px; height: 32px;
border-radius: 4px; border-radius: 4px;
background: #4ea6ff; background: #4ea6ff;
.colose { .colose {
width: 16px; width: 16px;
height: 16px; height: 16px;
@@ -722,25 +718,21 @@ watch(visiable, () => {
background-size: 100%; background-size: 100%;
margin-right: 4px; margin-right: 4px;
} }
.allclear { .allclear {
color: rgba(255, 255, 255, 1); color: rgba(255, 255, 255, 1);
font-size: 14px; font-size: 14px;
} }
} }
} }
.selecteds { .selecteds {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-left: 32px; margin-left: 32px;
.person { .person {
width: 100%; width: 100%;
margin-top: 20px; margin-top: 20px;
border-top: 1px solid #f2f6fe; border-top: 1px solid #f2f6fe;
} }
.chose { .chose {
width: 64px; width: 64px;
height: 24px; height: 24px;
@@ -754,7 +746,6 @@ watch(visiable, () => {
color: rgba(56, 139, 225, 1); color: rgba(56, 139, 225, 1);
font-size: 12px; font-size: 12px;
position: relative; position: relative;
.ch { .ch {
position: absolute; position: absolute;
width: 18px; width: 18px;
@@ -764,14 +755,12 @@ watch(visiable, () => {
top: -8px; top: -8px;
} }
} }
.ifsw { .ifsw {
display: flex; display: flex;
align-items: end; align-items: end;
justify-content: center; justify-content: center;
color: #4ea6ff; color: #4ea6ff;
} }
.sw { .sw {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -781,13 +770,11 @@ watch(visiable, () => {
margin-top: 23px; margin-top: 23px;
margin-left: 10px; margin-left: 10px;
} }
.dept { .dept {
width: 100%; width: 100%;
margin-top: 30px; margin-top: 30px;
border-top: 1px solid #f2f6fe; border-top: 1px solid #f2f6fe;
} }
.chose1 { .chose1 {
//width: 90px; //width: 90px;
height: 24px; height: 24px;
@@ -801,13 +788,11 @@ watch(visiable, () => {
color: rgba(56, 139, 225, 1); color: rgba(56, 139, 225, 1);
font-size: 12px; font-size: 12px;
position: relative; position: relative;
.span { .span {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.ch1 { .ch1 {
position: absolute; position: absolute;
width: 18px; width: 18px;
@@ -817,13 +802,11 @@ watch(visiable, () => {
top: -8px; top: -8px;
} }
} }
.group { .group {
width: 100%; width: 100%;
margin-top: 30px; margin-top: 30px;
border-top: 1px solid #f2f6fe; border-top: 1px solid #f2f6fe;
} }
.chose2 { .chose2 {
//width: 120px; //width: 120px;
height: 24px; height: 24px;
@@ -837,13 +820,11 @@ watch(visiable, () => {
color: rgba(56, 139, 225, 1); color: rgba(56, 139, 225, 1);
font-size: 12px; font-size: 12px;
position: relative; position: relative;
.span { .span {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.ch2 { .ch2 {
position: absolute; position: absolute;
width: 18px; width: 18px;
@@ -855,5 +836,5 @@ watch(visiable, () => {
} }
} }
} }
}
</style> </style>

View File

@@ -6,7 +6,7 @@
style="padding-left: 20px; margin-right: 0px" style="padding-left: 20px; margin-right: 0px"
> >
<a-col> <a-col>
<a-form-item title="姓名:" @click="getStuList"> <a-form-item title="姓名:" >
<a-input <a-input
class="cus-input" class="cus-input"
v-model:value="tableParam.studentName" v-model:value="tableParam.studentName"
@@ -15,7 +15,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col> <a-col>
<a-button class="cus-btn" style="width: 100px"> <a-button class="cus-btn" style="width: 100px" @click="getStuList">
<template #icon> <template #icon>
<img <img
style="margin-right: 10px" style="margin-right: 10px"
@@ -63,12 +63,12 @@
批量删除 批量删除
</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 white" @click="showChangeModal">
<template #icon></template> <template #icon></template>
批量调整关卡 批量调整关卡
</a-button> </a-button>
</a-col> </a-col> -->
</a-row> </a-row>
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<a-table <a-table
@@ -117,6 +117,7 @@ import { computed, defineProps, onMounted, ref, watch } from "vue";
import { delStudentList, getStuPage } from "@/api/index1"; import { delStudentList, getStuPage } from "@/api/index1";
import CommonStudent from "@/components/student/CommonStudent"; import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue"; import ChangeLevelModal from "./ChangeLevelModal.vue";
import { message } from "ant-design-vue";
const props = defineProps({ const props = defineProps({
type: Number, type: Number,
id: String, id: String,
@@ -232,9 +233,16 @@ function getStuList() {
}); });
} }
function reset() {} function reset() {
tableParam.value.studentName="";
}
function bathDel() { function bathDel() {
if( stuSelectKeys.value &&
stuSelectKeys.value.length == 0){
message.destroy();
return message.warning("请先选中学员");
}
stuSelectKeys.value && stuSelectKeys.value &&
stuSelectKeys.value.length && stuSelectKeys.value.length &&
delStudentList({ delStudentList({
@@ -259,10 +267,10 @@ function submitCall(flag) {
} }
//调整关卡 //调整关卡
const visiblene = ref(false); // const visiblene = ref(false);
const showChangeModal = () => { // const showChangeModal = () => {
visiblene.value = true; // visiblene.value = true;
}; // };
</script> </script>
<style> <style>
.studentopea1 { .studentopea1 {

View File

@@ -143,7 +143,6 @@
placeholder="请输入课程名称" placeholder="请输入课程名称"
v-model:value="xzinputV1" v-model:value="xzinputV1"
v-model:validate="validate" v-model:validate="validate"
:maxlength="20" :maxlength="20"
show-count show-count
:type="2" :type="2"
@@ -226,7 +225,8 @@
</div> </div>
<a-radio-group v-model:value="valueE1"> <a-radio-group v-model:value="valueE1">
<div class="bc_box"> <div class="bc_box">
<div class="bc_boxl"> <!-- 2022-12-21 隐藏 后面放开 lixiaoge -->
<!-- <div class="bc_boxl">
<div class="ol_checkbox" @click="expectOnline"> <div class="ol_checkbox" @click="expectOnline">
<a-radio <a-radio
v-model:checked="checked" v-model:checked="checked"
@@ -237,7 +237,7 @@
线上 线上
</a-radio> </a-radio>
</div> </div>
</div> </div> -->
<div class="bc_boxr"> <div class="bc_boxr">
<div class="ol_checkbox"> <div class="ol_checkbox">
<a-radio <a-radio
@@ -364,7 +364,6 @@
placeholder="请输入课程名称" placeholder="请输入课程名称"
v-model:value="qdms_inputV1" v-model:value="qdms_inputV1"
v-model:validate="validate" v-model:validate="validate"
:maxlength="20" :maxlength="20"
show-count show-count
:type="2" :type="2"
@@ -2278,7 +2277,11 @@
<span>{{ currentPlanItem.teacher }}</span> <span>{{ currentPlanItem.teacher }}</span>
</div> </div>
<div class="stmm_i5"> <div class="stmm_i5">
<TableStudent :type="3" :id="offcoursePlanId" :columns="stuColumns"> <TableStudent
:type="3"
:id="offcoursePlanId"
:columns="stuColumns"
>
<!-- <template #extension = "data">--> <!-- <template #extension = "data">-->
<!-- <div style="display: flex">--> <!-- <div style="display: flex">-->
<!-- <button @click="handlJoinStu(data)">成绩录入</button>--> <!-- <button @click="handlJoinStu(data)">成绩录入</button>-->
@@ -4659,7 +4662,6 @@ export default defineComponent({
console.log("state.validate", state.validate); console.log("state.validate", state.validate);
if (!state.validate) { if (!state.validate) {
message.destroy(); message.destroy();
return message.warning("该课程名称已存在"); return message.warning("该课程名称已存在");

View File

@@ -206,7 +206,8 @@
<router-link to="/leveladd"> <router-link to="/leveladd">
<div style="display: flex"> <div style="display: flex">
<img <img
class="img2" style="margin-right:22px;" class="img2"
style="margin-right: 22px"
src="../../assets/images/leveladd/back.png" src="../../assets/images/leveladd/back.png"
/> />
<div class="return">返回</div> <div class="return">返回</div>
@@ -688,7 +689,7 @@
</div> </div>
</div> </div>
<div style="width: 87px; text-align: center"> <div style="width: 87px; text-align: center">
{{ element.cretime }}分钟 {{ element.cretime ? element.cretime + "分钟" : "-" }}
</div> </div>
<div <div
style=" style="
@@ -1313,9 +1314,9 @@ export default {
console.log("删除关卡成功", res); console.log("删除关卡成功", res);
message.destroy(); message.destroy();
message.success("删除关卡成功"); message.success("删除关卡成功");
let chapter = localStorage.getItem("chapterId") let chapter = localStorage.getItem("chapterId");
if (state.deleteChapterId == chapter) { if (state.deleteChapterId == chapter) {
localStorage.removeItem("chapterId") localStorage.removeItem("chapterId");
} }
closeDeleteChapter(); closeDeleteChapter();
getDetail(); getDetail();
@@ -1324,7 +1325,6 @@ export default {
message.success("至少保留一个关卡"); message.success("至少保留一个关卡");
closeDeleteChapter(); closeDeleteChapter();
} }
}) })
.catch((err) => { .catch((err) => {
console.log("删除关卡失败", err); console.log("删除关卡失败", err);
@@ -1418,13 +1418,16 @@ export default {
state.chooseProjectList = JSON.stringify(state.level[i].taskList); state.chooseProjectList = JSON.stringify(state.level[i].taskList);
console.log("state.level[i].taskList", state.level[i].taskList); console.log("state.level[i].taskList", state.level[i].taskList);
state.level[i].taskList.forEach((element) => { state.level[i].taskList.forEach((element) => {
// console.log("element", element); console.log("element", element);
let obj = { let obj = {
id: element.routerTaskId, id: element.routerTaskId,
key: element.routerTaskId, key: element.routerTaskId,
lei: checkType(element.type), lei: checkType(element.type),
creater: element.name, creater: element.name,
cretime: element.duration, cretime:
element.duration || element.duration == 0
? element.duration
: "-",
checked1: element.flag, checked1: element.flag,
routerTaskId: element.routerTaskId, routerTaskId: element.routerTaskId,
courseId: element.courseId, courseId: element.courseId,
@@ -1853,7 +1856,7 @@ export default {
let obj = { let obj = {
chapterId: ele.chapterId, chapterId: ele.chapterId,
courseId: ele.courseId, courseId: ele.courseId,
duration: ele.cretime, duration: ele.cretime == "-" ? 0 : ele.cretime,
flag: ele.checked1, flag: ele.checked1,
name: ele.creater, name: ele.creater,
routerId: ele.routerId, routerId: ele.routerId,

View File

@@ -332,7 +332,7 @@
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-tab-pane> </a-tab-pane>
<!--
<a-tab-pane key="3" tab="项目积分"> <a-tab-pane key="3" tab="项目积分">
<div class="split"></div> <div class="split"></div>
<div class="projectscore"> <div class="projectscore">
@@ -478,6 +478,8 @@
</div> </div>
</div> </div>
</a-tab-pane> </a-tab-pane>
-->
<a-tab-pane key="4" tab="设置"> <a-tab-pane key="4" tab="设置">
<div class="split"></div> <div class="split"></div>
<a-tabs> <a-tabs>

View File

@@ -461,7 +461,6 @@ export default {
} }
const createProject = async () => { const createProject = async () => {
state.loading = true
console.log("保存", state.projectInfo); console.log("保存", state.projectInfo);
if (!validate(state.projectInfo, errorMsgs)) { if (!validate(state.projectInfo, errorMsgs)) {
return; return;
@@ -485,6 +484,7 @@ export default {
} }
state.projectInfo.type = 3; state.projectInfo.type = 3;
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0; state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
state.loading = true
api.createProject(state.projectInfo).then((res) => { api.createProject(state.projectInfo).then((res) => {
state.loading = false state.loading = false
state.projectInfo.projectId || state.projectInfo.projectId ||

View File

@@ -437,9 +437,7 @@
</div> </div>
</div> </div>
--> --></div>
</div>
<div class="boom"> <div class="boom">
<div class="boomcen"> <div class="boomcen">
<div class="onerow"> <div class="onerow">
@@ -632,7 +630,11 @@
</div> </div>
</div> </div>
<div style="width: 87px; text-align: center"> <div style="width: 87px; text-align: center">
{{ element.cretime }}分钟 {{
element.cretime
? element.cretime + "分钟"
: "-"
}}
</div> </div>
<div <div
style=" style="
@@ -1026,7 +1028,7 @@
<div class="close_exit" @click="closeDeleteStage"></div> <div class="close_exit" @click="closeDeleteStage"></div>
</div> </div>
<div class="body"> <div class="body">
<span style="width:320px;display:flex;justify-content:center;align-items:center;">{{level.length==1?"当前阶段为第一阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?":"您确定要删除此阶段"}}</span> <span style="width:320px;display:flex;justify-content:center;align-items:center;">{{level.length==1?"当前为最后一个阶段,删除后任务将被移出,为无阶段模式,确认删除阶段吗?":"您确定要删除此阶段"}}</span>
</div> </div>
<div class="del_btnbox"> <div class="del_btnbox">
<div class="del_btn btn1" @click="closeDeleteStage"> <div class="del_btn btn1" @click="closeDeleteStage">
@@ -1096,6 +1098,7 @@ export default {
projectId: route.query.projectId, projectId: route.query.projectId,
chooseStageId: null, chooseStageId: null,
removeStageId: null, removeStageId: null,
onceChoice: true,
edit: false, edit: false,
isLevel: 2, //学习路径1项目2模板库3 isLevel: 2, //学习路径1项目2模板库3
// isRefEdit: 1, //外链编辑 // isRefEdit: 1, //外链编辑
@@ -1222,7 +1225,8 @@ export default {
? "投票" ? "投票"
: "-", : "-",
creater: value.name, creater: value.name,
cretime: value.duration ? value.duration : "-", cretime:
value.duration || value.duration == 0 ? value.duration : "-",
checked1: value.flag ? true : false, checked1: value.flag ? true : false,
checked: false, //是否选中类型 checked: false, //是否选中类型
courseId: value.courseId, courseId: value.courseId,
@@ -1253,7 +1257,8 @@ export default {
array.push(obj); array.push(obj);
} }
}); });
state.level = array; console.log(array)
state.level = array.sort((a,b)=>{ return a.id - b.id });
}; };
const tableDataFunc = () => { const tableDataFunc = () => {
@@ -1391,6 +1396,20 @@ export default {
}; };
await api.getTask(obj).then((res) => { await api.getTask(obj).then((res) => {
console.log("22222", res.data.data.stageList); console.log("22222", res.data.data.stageList);
if(state.onceChoice){
let data = res.data.data.stageList;
state.onceChoice = false;
let arraynew = []
for(let i=0;i<data.length;i++){
if(data[i].stageId!=='0'){
arraynew.push(data[i])
}
}
console.log(arraynew)
state.chooseStageId = Number(arraynew[arraynew.length-1].stageId);
}
state.projectTitle = res.data.data.projectInfo.name; state.projectTitle = res.data.data.projectInfo.name;
state.picUrl = res.data.data.projectInfo.picUrl; state.picUrl = res.data.data.projectInfo.picUrl;
state.stageList = res.data.data.stageList; state.stageList = res.data.data.stageList;
@@ -1620,7 +1639,7 @@ export default {
const showDeleteStage = (id) => { const showDeleteStage = (id) => {
state.deleteStageId = id; state.deleteStageId = id;
state.deleteStageModal = true; state.deleteStageModal = true;
console.log(state.level) console.log(state.level);
}; };
//关闭删除阶段弹窗 //关闭删除阶段弹窗
const closeDeleteStage = () => { const closeDeleteStage = () => {
@@ -1759,12 +1778,12 @@ export default {
// 删除所有阶段 // 删除所有阶段
const removeAllLevel = () => { const removeAllLevel = () => {
// state.cancelModal = false; // state.cancelModal = false;
console.log(state.level) console.log(state.level);
let removeArr = state.level; let removeArr = state.level;
for (let i = 0; i < removeArr.length; i++) { for (let i = 0; i < removeArr.length; i++) {
let obj = { let obj = {
stageId: removeArr[i].id stageId: removeArr[i].id,
} };
apistage apistage
.deleteStage(obj) .deleteStage(obj)
.then((res) => { .then((res) => {
@@ -1787,7 +1806,7 @@ export default {
} }
}); });
} }
} };
//选择单个任务 //选择单个任务
const changeRow = (e) => { const changeRow = (e) => {
@@ -1993,7 +2012,7 @@ export default {
temporaryStorage, temporaryStorage,
submitStorage, submitStorage,
cancelStorage, cancelStorage,
removeAllLevel removeAllLevel,
}; };
}, },
}; };

View File

@@ -455,7 +455,6 @@
</div> </div>
</div> </div>
--> -->
</div> </div>
<div class="boom"> <div class="boom">
<div class="boomcen"> <div class="boomcen">
@@ -649,7 +648,7 @@
</div> </div>
</div> </div>
<div style="width: 87px; text-align: center"> <div style="width: 87px; text-align: center">
{{ element.cretime }}分钟 {{ element.cretime ? element.cretime + "分钟" : "-" }}
</div> </div>
<div <div
style=" style="
@@ -1389,7 +1388,7 @@ export default {
? "投票" ? "投票"
: "-", : "-",
creater: value.name, creater: value.name,
cretime: Number(value.duration) > 0 ? value.duration : "-", cretime: value.duration || value.duration == 0 ? value.duration : "-",
checked1: value.flag ? true : false, checked1: value.flag ? true : false,
checked: false, //是否选中类型 checked: false, //是否选中类型
courseId: value.courseId, courseId: value.courseId,
@@ -1407,7 +1406,11 @@ export default {
let data = tableData; let data = tableData;
let array = []; let array = [];
data.map((value) => { data.map((value) => {
console.log("dd",Number(value.templateStageId) ,Number(value.templateStageId) > 0); console.log(
"dd",
Number(value.templateStageId),
Number(value.templateStageId) > 0
);
if (Number(value.templateStageId) > 0) { if (Number(value.templateStageId) > 0) {
let obj = { let obj = {
id: value.templateStageId, id: value.templateStageId,
@@ -1626,16 +1629,15 @@ export default {
//获取任务列表 //获取任务列表
const getTask = async () => { const getTask = async () => {
await api await api
.templateDetail(localStorage.getItem("projectTemplateId")).then((res) => { .templateDetail(localStorage.getItem("projectTemplateId"))
.then((res) => {
console.log("22222", res.data.data.stageList); console.log("22222", res.data.data.stageList);
state.projectTitle = res.data.data.projectTemplateInfo.name; state.projectTitle = res.data.data.projectTemplateInfo.name;
state.picUrl = res.data.data.projectTemplateInfo.picUrl; state.picUrl = res.data.data.projectTemplateInfo.picUrl;
state.stageList = res.data.data.stageList; state.stageList = res.data.data.stageList;
getStageData(res.data.data.stageList); getStageData(res.data.data.stageList);
updateStageChoosd(); updateStageChoosd();
}); });
}; };
@@ -1659,9 +1661,15 @@ export default {
getTableData(state.stageList[0].taskList); getTableData(state.stageList[0].taskList);
return; return;
} }
console.log(state.chooseStageId,state.stageList.find((e) => e.templateStageId == state.chooseStageId)?.taskList,state.stageList); console.log(
state.chooseStageId,
state.stageList.find((e) => e.templateStageId == state.chooseStageId)
?.taskList,
state.stageList
);
getTableData( getTableData(
state.stageList.find((e) => e.templateStageId == state.chooseStageId)?.taskList state.stageList.find((e) => e.templateStageId == state.chooseStageId)
?.taskList
); );
} }
@@ -1959,7 +1967,6 @@ export default {
if (final != null) { if (final != null) {
getTableData(final.taskList); getTableData(final.taskList);
} }
}; };
//选择单个任务 //选择单个任务