Merge branch 'pre-dev' into 'develop'

Pre dev

See merge request !44
This commit is contained in:
huangshengfa
2023-02-28 09:02:53 +08:00
29 changed files with 1306 additions and 608 deletions

2
.env
View File

@@ -33,4 +33,4 @@ VITE_BOE_CASS_DETAIL_URL=//u-pre.boe.com/pc/case/detail?id=
#考试 #考试
VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id= VITE_BOE_EXAM_DETAIL_URL=//u-pre.boe.com/pc/exam/test?id=
#h5的基本url #h5的基本url
VUE_APP_H5=//u-pre.boe.com/mobile/student-h5 VUE_APP_H5=//u-pre.boe.com/student-h5

View File

@@ -4,7 +4,9 @@ export const USER_LIST_PAGE = '/userbasic/user/list post'
export const USER_LIST = '/userbasic/user/searchList post' export const USER_LIST = '/userbasic/user/searchList post'
export const ORG_LIST = '/userbasic/org/list post' export const ORG_LIST = '/userbasic/org/list post'
export const ORG_CHILD_LIST = '/userbasic/org/info post' export const ORG_CHILD_LIST = '/userbasic/org/info post'
export const AUDIENCE_LIST = '/userbasic/audience/list post' // export const AUDIENCE_LIST = '/userbasic/audience/list post'
//当前用户可以查看的受众接口
export const AUDIENCE_LIST = '/userbasic/audience/userAudiencesFilter post'
export const USER_PERMISSION = '/userbasic/permission/listByUser post' export const USER_PERMISSION = '/userbasic/permission/listByUser post'
export const CASE_PAGE = '/systemapi/xboe/m/boe/cases/pagelist post formData' export const CASE_PAGE = '/systemapi/xboe/m/boe/cases/pagelist post formData'
export const EXAM_PAPER_PAGE = '/systemapi/xboe/m/exam/paper/querylist post formData' export const EXAM_PAPER_PAGE = '/systemapi/xboe/m/exam/paper/querylist post formData'

View File

@@ -38,6 +38,24 @@
</div> </div>
</template> </template>
<template #title>审核管理</template> <template #title>审核管理</template>
<a-menu-item key="sub10-5">
<span
:class="{
circleActive: selectedKeys[0] === 'sub10-5',
circle: selectedKeys[0]!=='sub10-5',
}"
></span>
<router-link to="/TobeOnlineReviewed">待审核在线课</router-link>
</a-menu-item>
<a-menu-item key="sub10-6">
<span
:class="{
circleActive: selectedKeys[0] === 'sub10-6',
circle: selectedKeys[0]!=='sub10-6',
}"
></span>
<router-link to="/OnlineReviewed">已审核在线课</router-link>
</a-menu-item>
<a-menu-item key="sub10-1" v-if="checkMenu('coursereviewedn')"> <a-menu-item key="sub10-1" v-if="checkMenu('coursereviewedn')">
<span <span
:class="{ :class="{

View File

@@ -1,23 +1,33 @@
<template> <template>
<a-drawer :visible="AAvisible" class="largeDrawerStyle" placement="right" width="80%" <a-drawer
@after-visible-change="afterVisibleChange"> :visible="AAvisible"
class="largeDrawerStyle"
placement="right"
width="80%"
@after-visible-change="afterVisibleChange"
>
<div class="drawerMain"> <div class="drawerMain">
<div class="header"> <div class="header">
<div class="headerTitle">{{ datasource.type == 6 ? "直播" : "活动" }}考勤</div> <div class="headerTitle">
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png" {{ datasource.type == 6 ? "直播" : "活动" }}考勤
@click="closeDrawer" /> </div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
</div> </div>
<div class="centermain"> <div class="centermain">
<div class="titl"> <div class="titl">
<div class="endtime"> <div class="endtime">
起止时间{{ 起止时间{{ datasource.startTime ? datasource.startTime : "-" }}
datasource.startTime ? datasource.startTime : "-"
}}
{{ datasource.endTime ? datasource.endTime : "-" }} {{ datasource.endTime ? datasource.endTime : "-" }}
</div> </div>
<div class="endtime" style="margin-left: 64px">签到时间{{ beginTime }} {{ endTime }}</div> <div class="endtime" style="margin-left: 64px">
签到时间{{ beginTime }} {{ endTime }}
</div>
<!--<div class="endtime" style="margin-left: 40px">签退时间{{ endTime }}</div>--> <!--<div class="endtime" style="margin-left: 40px">签退时间{{ endTime }}</div>-->
</div> </div>
@@ -25,8 +35,12 @@
<div class="leftchoose"> <div class="leftchoose">
<div class="namecon" style="margin-right: 30px"> <div class="namecon" style="margin-right: 30px">
<div class="name">姓名</div> <div class="name">姓名</div>
<a-input v-model:value="name" style="width: 270px; height: 40px; border-radius: 8px" placeholder="请输入姓名" <a-input
maxlength="20" /> v-model:value="name"
style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名"
maxlength="20"
/>
</div> </div>
<!-- <div class="namecon" style="margin-right: 30px"> <!-- <div class="namecon" style="margin-right: 30px">
<div class="name">考勤</div> <div class="name">考勤</div>
@@ -45,14 +59,24 @@
<div class="namecon"> <div class="namecon">
<div class="name">签到状态</div> <div class="name">签到状态</div>
<div class="select"> <div class="select">
<a-select v-model:value="projectName2" style="width: 160px" placeholder="请选择" :options="projectNameList2" <a-select
@change="selectProjectName2" allowClear></a-select> v-model:value="projectName2"
style="width: 160px"
placeholder="请选择"
:options="projectNameList2"
@change="selectProjectName2"
allowClear
></a-select>
</div> </div>
</div> </div>
</div> </div>
<div class="btns"> <div class="btns">
<div class="btn btn1" style="margin-right: 20px" @click="searchTaskList"> <div
class="btn btn1"
style="margin-right: 20px"
@click="searchTaskList"
>
<div class="img1"></div> <div class="img1"></div>
<div class="wz">搜索</div> <div class="wz">搜索</div>
</div> </div>
@@ -89,11 +113,18 @@
</div> --> </div> -->
<div class="tableBox" style="margin-top: 30px"> <div class="tableBox" style="margin-top: 30px">
<a-table style="border: 1px solid #f2f6fe" :columns="tableDataFunc()" :data-source="tableData" <a-table
:loading="tableDataTotalLoading" :scroll="{ x: 1300 }" :pagination="false" :row-selection="{ style="border: 1px solid #f2f6fe"
:columns="tableDataFunc()"
:data-source="tableData"
:loading="tableDataTotalLoading"
:scroll="{ x: 1300 }"
:pagination="false"
:row-selection="{
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" /> }"
/>
</div> </div>
</div> </div>
<div class="btnn"> <div class="btnn">
@@ -103,7 +134,13 @@
</div> </div>
</a-drawer> </a-drawer>
<!-- 批量签到弹窗 --> <!-- 批量签到弹窗 -->
<a-modal v-model:visible="qdModal" :footer="null" :closable="closeCopy" wrapClassName="CopyModal" centered="true"> <a-modal
v-model:visible="qdModal"
:footer="null"
:closable="closeCopy"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -128,7 +165,13 @@
</a-modal> </a-modal>
<!-- 单独签到弹窗 --> <!-- 单独签到弹窗 -->
<a-modal v-model:visible="singleqdModal" :footer="null" :closable="closeCopy" wrapClassName="CopyModal" centered="true"> <a-modal
v-model:visible="singleqdModal"
:footer="null"
:closable="closeCopy"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -152,7 +195,13 @@
</div> </div>
</a-modal> </a-modal>
<!-- 单独签退弹窗 --> <!-- 单独签退弹窗 -->
<a-modal v-model:visible="singleqtModal" :footer="null" :closable="closeCopy" wrapClassName="CopyModal" centered="true"> <a-modal
v-model:visible="singleqtModal"
:footer="null"
:closable="closeCopy"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -176,7 +225,13 @@
</div> </div>
</a-modal> </a-modal>
<!-- 单独请假弹窗 --> <!-- 单独请假弹窗 -->
<a-modal v-model:visible="singleqjModal" :footer="null" :closable="closeCopy" wrapClassName="CopyModal" centered="true"> <a-modal
v-model:visible="singleqjModal"
:footer="null"
:closable="closeCopy"
wrapClassName="CopyModal"
centered="true"
>
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -203,8 +258,12 @@
<SignQR v-model:signQRvisible="signQRvisible" /> <SignQR v-model:signQRvisible="signQRvisible" />
<!-- 二维码弹窗 --> <!-- 二维码弹窗 -->
<two-dimensional-code v-model:codevisible="codevisible" :codeInfo="codeInfo" :index="codeIndex" <two-dimensional-code
:type="codeType == 1 ? '课程二维码' : codeType == 2 ? '签到二维码' : ''" /> v-model:codevisible="codevisible"
:codeInfo="codeInfo"
:index="codeIndex"
:type="codeType == 1 ? '课程二维码' : codeType == 2 ? '签到二维码' : ''"
/>
<!-- 二维码弹窗 --> <!-- 二维码弹窗 -->
</template> </template>
@@ -219,7 +278,7 @@ export default {
name: "ActiveAttendance", name: "ActiveAttendance",
components: { components: {
SignQR, SignQR,
TwoDimensionalCode TwoDimensionalCode,
}, },
props: { props: {
AAvisible: { AAvisible: {
@@ -239,7 +298,7 @@ export default {
types: { types: {
type: Number, type: Number,
default: null, default: null,
} },
}, },
setup(props, ctx) { setup(props, ctx) {
@@ -267,7 +326,7 @@ export default {
id: 2, id: 2,
value: "2", value: "2",
label: "请假", label: "请假",
} },
], ],
projectNameList2: [ projectNameList2: [
{ {
@@ -279,7 +338,7 @@ export default {
id: 2, id: 2,
value: "2", value: "2",
label: "异常", label: "异常",
} },
], ],
selectedRowKeys: [], selectedRowKeys: [],
tableData: [ tableData: [
@@ -295,7 +354,7 @@ export default {
signIn: false, //签到 signIn: false, //签到
signOut: false, //签退 signOut: false, //签退
leave: false, //请假 leave: false, //请假
} },
], ],
options: [ options: [
{ {
@@ -393,9 +452,12 @@ export default {
const getTableData = () => { const getTableData = () => {
// debugger // debugger
console.log('当前是项目还是路径图 1 项目 2 路径图', props) console.log("当前是项目还是路径图 1 项目 2 路径图", props);
console.log('当前是项目还是路径图 1 项目 2 路径图', props.types) console.log("当前是项目还是路径图 1 项目 2 路径图", props.types);
if (props.datasource.type == 6 && props.types == 2 || props.datasource.type == 9 && props.types == 2) { if (
(props.datasource.type == 6 && props.types == 2) ||
(props.datasource.type == 9 && props.types == 2)
) {
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
console.log("我是传递的查询参数", { console.log("我是传递的查询参数", {
pageNo: state.currentPage, pageNo: state.currentPage,
@@ -425,10 +487,11 @@ export default {
.then((res) => { .then((res) => {
console.log(res); console.log(res);
if (res.status == 200) { if (res.status == 200) {
let keyarr = [] let keyarr = [];
for (let i = 0; i < res.data.data.records.length; i++) { for (let i = 0; i < res.data.data.records.length; i++) {
res.data.data.records[i].key = res.data.data.records[i].studentId res.data.data.records[i].key =
keyarr.push(res.data.data.records[i]) res.data.data.records[i].studentId;
keyarr.push(res.data.data.records[i]);
} }
state.tableData = keyarr; state.tableData = keyarr;
state.tableDataTotal = res.data.data.total; state.tableDataTotal = res.data.data.total;
@@ -440,7 +503,10 @@ export default {
state.tableDataTotalLoading = false; state.tableDataTotalLoading = false;
state.tableData = []; state.tableData = [];
}); });
} else if (props.datasource.type == 6 && props.types == 1 || props.datasource.type == 9 && props.types == 1) { } else if (
(props.datasource.type == 6 && props.types == 1) ||
(props.datasource.type == 9 && props.types == 1)
) {
// 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可 // 此处为获取评估学员的接口 - 如后续还有用到此接口的公共任务可直接在if里面加||判断即可
console.log("我是传递的查询参数", { console.log("我是传递的查询参数", {
pageNo: state.currentPage, pageNo: state.currentPage,
@@ -452,7 +518,7 @@ export default {
taskType: props.datasource.type, taskType: props.datasource.type,
status: state.projectName, status: state.projectName,
studentName: state.name, studentName: state.name,
signStatus: state.projectName2 signStatus: state.projectName2,
}); });
api api
.AssessmentManagementMessage({ .AssessmentManagementMessage({
@@ -465,15 +531,16 @@ export default {
taskType: props.datasource.type, taskType: props.datasource.type,
status: state.projectName, status: state.projectName,
studentName: state.name, studentName: state.name,
signStatus: state.projectName2 signStatus: state.projectName2,
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
if (res.status == 200) { if (res.status == 200) {
let keyarr = [] let keyarr = [];
for (let i = 0; i < res.data.data.records.length; i++) { for (let i = 0; i < res.data.data.records.length; i++) {
res.data.data.records[i].key = res.data.data.records[i].studentId res.data.data.records[i].key =
keyarr.push(res.data.data.records[i]) res.data.data.records[i].studentId;
keyarr.push(res.data.data.records[i]);
} }
state.tableData = keyarr; state.tableData = keyarr;
state.tableDataTotal = res.data.data.total; state.tableDataTotal = res.data.data.total;
@@ -538,7 +605,7 @@ export default {
taskType: Number(props.datasource.type), taskType: Number(props.datasource.type),
type: 1, type: 1,
}; };
console.log(obj) console.log(obj);
state.tableDataTotalLoading = true; state.tableDataTotalLoading = true;
api api
@@ -571,7 +638,10 @@ export default {
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.studentUserNo ? text.record.studentUserNo : "-"}</span> <span>
{" "}
{text.record.studentUserNo ? text.record.studentUserNo : "-"}
</span>
</div> </div>
); );
}, },
@@ -587,7 +657,10 @@ export default {
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.studentName ? text.record.studentName : "-"}</span> <span>
{" "}
{text.record.studentName ? text.record.studentName : "-"}
</span>
</div> </div>
); );
}, },
@@ -603,7 +676,12 @@ export default {
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.studentDepartName ? text.record.studentDepartName : "-"}</span> <span>
{" "}
{text.record.studentDepartName
? text.record.studentDepartName
: "-"}
</span>
</div> </div>
); );
}, },
@@ -619,7 +697,12 @@ export default {
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.studentJobName ? text.record.studentJobName : "-"}</span> <span>
{" "}
{text.record.studentJobName
? text.record.studentJobName
: "-"}
</span>
</div> </div>
); );
}, },
@@ -634,7 +717,10 @@ export default {
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span> {text.record.signTime ? text.record.signTime : "-"}</span> <span>
{" "}
{text.record.signTime ? text.record.signTime : "-"}
</span>
</div> </div>
); );
}, },
@@ -671,7 +757,18 @@ export default {
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<span>{text.record.signStatus == null && new Date().getTime() > new Date(state.endTime).getTime() ? "异常" : text.record.signStatus ? "正常" : text.record.leaveStatus ? "异常" : text.record.signStatus == null ? "-" : "异常"}</span> <span>
{text.record.signStatus == null &&
new Date().getTime() > new Date(state.endTime).getTime()
? "异常"
: text.record.signStatus
? "正常"
: text.record.leaveStatus
? "异常"
: text.record.signStatus == null
? "-"
: "异常"}
</span>
</div> </div>
); );
}, },
@@ -685,15 +782,23 @@ export default {
align: "center", align: "center",
customRender: (value) => { customRender: (value) => {
return ( return (
<div class="opa" style='display:flex;justify-content:center;align-items:center;'> <div
class="opa"
style="display:flex;justify-content:center;align-items:center;"
>
<div <div
onClick={() => { onClick={() => {
{/* debugger */ } {
/* debugger */
}
console.log("点击签到", value); console.log("点击签到", value);
// 获取当前时间 // 获取当前时间
{/* showsingleqdModal(); */ } {
{/* AttendanceSign */ } /* showsingleqdModal(); */
}
{
/* AttendanceSign */
}
let obj1 = { let obj1 = {
courseId: Number(props.datasource.courseId), courseId: Number(props.datasource.courseId),
@@ -713,33 +818,42 @@ export default {
type: 2, type: 2,
}; };
// 1是项目 2路径图 3开课 // 1是项目 2路径图 3开课
console.log(obj1, obj2) console.log(obj1, obj2);
state.tableDataTotalLoading = true; state.tableDataTotalLoading = true;
api.AttendanceSign(props.types === '1' ? obj1 : obj2).then(res => { api
console.log('res----签到是否成功', res) .AttendanceSign(props.types === "1" ? obj1 : obj2)
message.destroy() .then((res) => {
message.info('签到成功') console.log("res----签到是否成功", res);
message.destroy();
message.info("签到成功");
getTableData(); getTableData();
}).catch(err => {
state.tableDataTotalLoading = false;
console.log(err)
}) })
.catch((err) => {
state.tableDataTotalLoading = false;
console.log(err);
});
}} }}
style="display:flex;justify-content:center;align-items:center;margin-right:12px;cursor:pointer;"> style="display:flex;justify-content:center;align-items:center;margin-right:12px;cursor:pointer;"
{value.record.signStatus ? >
<div style='width:16px;height:16px;margin-right:6px;border-radius:16px;border:1px solid #ccc;display:flex;justify-content:center;align-items:center;'> {value.record.signStatus ? (
<div style='width:8px;height:8px;border-radius:8px;background:#4ea6ff;'></div> <div style="width:16px;height:16px;margin-right:6px;border-radius:16px;border:1px solid #ccc;display:flex;justify-content:center;align-items:center;">
</div> : <div style="width:8px;height:8px;border-radius:8px;background:#4ea6ff;"></div>
<div style='width:16px;height:16px;margin-right:6px;border-radius:16px;border:1px solid #ccc;'></div> </div>
} ) : (
<div style="width:16px;height:16px;margin-right:6px;border-radius:16px;border:1px solid #ccc;"></div>
)}
<div>签到</div> <div>签到</div>
</div> </div>
<div <div
onClick={() => { onClick={() => {
console.log("点击请假", value); console.log("点击请假", value);
{/* showsingleqjModal(); */ } {
/* showsingleqjModal(); */
}
{/* AttendanceLeave */ } {
/* AttendanceLeave */
}
let obj = { let obj = {
courseId: Number(props.datasource.courseId), courseId: Number(props.datasource.courseId),
routerId: Number(props.datasource.routerId), routerId: Number(props.datasource.routerId),
@@ -756,30 +870,35 @@ export default {
taskType: Number(props.datasource.type), taskType: Number(props.datasource.type),
type: 2, type: 2,
}; };
console.log(obj, obj2) console.log(obj, obj2);
state.tableDataTotalLoading = true; state.tableDataTotalLoading = true;
api.AttendanceLeave(props.types == 1 ? obj : obj2).then(res => { api
console.log('res----请假是否成功', res) .AttendanceLeave(props.types == 1 ? obj : obj2)
message.destroy() .then((res) => {
message.info('请假成功') console.log("res----请假是否成功", res);
message.destroy();
message.info("请假成功");
getTableData(); getTableData();
}).catch(err => {
state.tableDataTotalLoading = false;
console.log(err)
}) })
.catch((err) => {
state.tableDataTotalLoading = false;
console.log(err);
});
}} }}
style="display:flex;justify-content:center;align-items:center;cursor:pointer;"> style="display:flex;justify-content:center;align-items:center;cursor:pointer;"
{value.record.leaveStatus ? >
<div style='width:16px;height:16px;margin-right:6px;border-radius:16px;border:1px solid #ccc;display:flex;justify-content:center;align-items:center;'> {value.record.leaveStatus ? (
<div style='width:8px;height:8px;border-radius:8px;background:#4ea6ff;'></div> <div style="width:16px;height:16px;margin-right:6px;border-radius:16px;border:1px solid #ccc;display:flex;justify-content:center;align-items:center;">
</div> : <div style="width:8px;height:8px;border-radius:8px;background:#4ea6ff;"></div>
<div style='width:16px;height:16px;margin-right:6px;border-radius:16px;border:1px solid #ccc;'></div> </div>
} ) : (
<div style="width:16px;height:16px;margin-right:6px;border-radius:16px;border:1px solid #ccc;"></div>
)}
<div>请假</div> <div>请假</div>
</div> </div>
</div> </div>
) );
} },
}, },
]; ];
return columns; return columns;
@@ -791,9 +910,9 @@ export default {
}; };
const showqdModal = () => { const showqdModal = () => {
if (state.selectedStudents.length == 0) { if (state.selectedStudents.length == 0) {
message.destroy() message.destroy();
message.error('请选择学员') message.error("请选择学员");
return return;
} }
state.qdModal = true; state.qdModal = true;
}; };
@@ -820,14 +939,16 @@ export default {
state.singleqjModal = false; state.singleqjModal = false;
}; };
const signQR = () => { const signQR = () => {
console.log("props.datasource", props.datasource);
state.codevisible = true; state.codevisible = true;
state.codeInfo = { state.codeInfo = {
title: "【签到】二维码", title: "【签到】二维码",
name: props.datasource?.name, name: props.datasource?.name,
url: url:
process.env.VUE_APP_BASE_API + process.env.VUE_APP_BASE_API +
`/admin/student/studentSign?taskId=${props.datasource.id `/admin/student/studentSign?taskId=${props.datasource.id}&taskType=${
}&taskType=${props.datasource.type}&type=${2}`, props.datasource.type
}&type=${2}`,
}; };
console.log("codeInfo", state.codeInfo); console.log("codeInfo", state.codeInfo);
state.codeIndex = 0; state.codeIndex = 0;
@@ -855,20 +976,21 @@ export default {
// 导出数据 // 导出数据
function exportTaskStu() { function exportTaskStu() {
{/* debugger */ } {
console.log("props.datasource此处的taskId 应该是router_task 表中主键", props.datasource); /* debugger */
}
console.log(
"props.datasource此处的taskId 应该是router_task 表中主键",
props.datasource
);
console.log("props.datasource", props.datasource); console.log("props.datasource", props.datasource);
if (props.types == 2) { if (props.types == 2) {
window.open( window.open(
`${process.env.VUE_APP_BASE_API `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId}&type=2&pid=${props.datasource.routerId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
}/admin/student/exportTaskStudent?currentStageId=${props.datasource.chapterId
}&type=2&pid=${props.datasource.routerId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
); );
} else { } else {
window.open( window.open(
`${process.env.VUE_APP_BASE_API `${process.env.VUE_APP_BASE_API}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId}&type=1&pid=${props.datasource.projectId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
}/admin/student/exportTaskStudent?currentStageId=${props.datasource.stageId
}&type=1&pid=${props.datasource.projectId}&thirdType=1&taskId=${props.datasource.id}&taskType=${props.datasource.type}`
); );
} }
@@ -911,7 +1033,7 @@ export default {
batchSign, batchSign,
searchTaskList, searchTaskList,
resetTaskList, resetTaskList,
exportTaskStu exportTaskStu,
}; };
}, },
}; };
@@ -1165,7 +1287,11 @@ 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

@@ -5,7 +5,7 @@
<a-drawer <a-drawer
:visible="visible" :visible="visible"
class="drawerStyle addrefDrawer" class="drawerStyle addrefDrawer"
width="80%" width="800"
placement="right" placement="right"
> >
<div class="drawerMain"> <div class="drawerMain">

View File

@@ -258,6 +258,7 @@ const formData = ref({
assessmentId: "", assessmentId: "",
assessmentName: "", assessmentName: "",
livePlayback: "", livePlayback: "",
liveExplain: ""
}); });
const emit = defineEmits({}); const emit = defineEmits({});
const taskIndex = ref(-1); const taskIndex = ref(-1);
@@ -375,9 +376,9 @@ async function confirm() {
} else { } else {
const data = props.taskList[taskIndex.value]; const data = props.taskList[taskIndex.value];
data.name = formData.value.liveName; data.name = formData.value.liveName;
data.info = formData.value; data.info = {...formData.value};
data.duration = dayjs(formData.value.liveEndTime).diff(formData.value.liveStartTime, 'minutes') data.duration = dayjs(formData.value.liveEndTime).diff(formData.value.liveStartTime, 'minutes')
console.log(data)
} }
emit("update:taskList", [...props.taskList]); emit("update:taskList", [...props.taskList]);
closeDrawer(); closeDrawer();

View File

@@ -156,6 +156,7 @@ export default {
score: item.score, score: item.score,
type: "完成任务", type: "完成任务",
from: item.source == "" ? "-" : item.source, from: item.source == "" ? "-" : item.source,
typeDesc: item.typeDesc
}; };
array.push(obj); array.push(obj);
}); });

View File

@@ -195,7 +195,7 @@ export default {
console.log('我是传递过来的参数2', props.basicdata) console.log('我是传递过来的参数2', props.basicdata)
api.QueryAssessmentDetail({ api.QueryAssessmentDetail({
"assessmentSubmitId": props.datasource.assessmentSubmitId?props.datasource.assessmentSubmitId:props.datasource.assessmentResultIds, "assessmentSubmitId": props.datasource.assessmentSubmitId?props.datasource.assessmentSubmitId:props.datasource.assessmentResultIds,
"courseId": props.basicdata.id, "courseId": props.datasource.courseId,
"studentId": props.datasource.studentId "studentId": props.datasource.studentId
}).then(res=>{ }).then(res=>{
console.log(res) console.log(res)

View File

@@ -169,13 +169,13 @@ export default {
}, },
{ {
id: 2, id: 2,
value: "10", value: "9",
label: "未通过", label: "已完成",
}, },
{ {
id: 3, id: 3,
value: "1", value: "1",
label: "已通过", label: "进行中",
}, },
], ],
selectedRowKeys: [], selectedRowKeys: [],
@@ -190,7 +190,7 @@ export default {
title: "工号", title: "工号",
dataIndex: "studentCode", dataIndex: "studentCode",
key: "studentCode", key: "studentCode",
width: 60, width: 120,
align: "center", align: "center",
className: "h head", className: "h head",
customRender: (text) => { customRender: (text) => {
@@ -305,7 +305,7 @@ export default {
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'), customRender: ({record:{status}}) => ({1:'进行中',0:'未开始',9:'已完成'}[status] || '未开始'),
}, },
{ {
title: "操作", title: "操作",
@@ -318,14 +318,14 @@ export default {
customRender: (text) => { customRender: (text) => {
return ( return (
<div class="racona"> <div class="racona">
<a {text.record.status == '0' ? "查看答卷" :
onClick={()=>{ <a onClick={()=>{
state.studentKid = text.record.studentKid; state.studentKid = text.record.studentKid;
state.datasource = text.record; state.datasource = text.record;
state.CAvisible = true; state.CAvisible = true;
}}> }}> 查看答卷 </a>
查看答卷 }
</a>
</div> </div>
); );
}, },
@@ -377,11 +377,10 @@ export default {
}; };
batchSendMessage(obj).then(res => { batchSendMessage(obj).then(res => {
console.log(res) console.log(res)
message.success("成功"); message.success("催促" + props.title + "成功");
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
message.success("催促" + props.title + "成功");
}; };
//导入成绩 //导入成绩
const showEScoreModal = () => { const showEScoreModal = () => {
@@ -399,7 +398,7 @@ export default {
pageNo: state.currentPage, pageNo: state.currentPage,
pageSize: state.pageSize, pageSize: state.pageSize,
chapterId: props.datasource.chapterId, chapterId: props.datasource.chapterId,
type: 2, type: 1,
taskId: props.datasource.courseId, taskId: props.datasource.courseId,
targetId: props.datasource.projectId targetId: props.datasource.projectId
}).then(res=>{ }).then(res=>{

View File

@@ -371,12 +371,11 @@
'chapterId': props.datasource.chapterId,//阶段或关卡Id 'chapterId': props.datasource.chapterId,//阶段或关卡Id
}; };
batchSendMessage(obj).then(res => { batchSendMessage(obj).then(res => {
message.success("催促" + props.title + "成功");
console.log(res) console.log(res)
message.success("成功");
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
message.success("催促" + props.title + "成功");
}; };
//导入成绩 //导入成绩
const showEScoreModal = () => { const showEScoreModal = () => {

View File

@@ -495,7 +495,7 @@ export default {
function exportTaskStu() { function exportTaskStu() {
if(props.datasource.type==1){ if(props.datasource.type==1){
{/* 在线课导出 */} {/* 在线课导出 */}
window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?chapterId=${props.datasource.chapterId}&type=${1}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}`) window.open(`${process.env.VUE_APP_BASE_API}/admin/online/manage/exportOnline?chapterId=${props.datasource.stageId}&type=${1}&targetId=${props.datasource.projectId}&taskId=${props.datasource.courseId}`)
}else if(props.datasource.type==11){ }else if(props.datasource.type==11){
{/* 评估导出 */} {/* 评估导出 */}
window.open(`${process.env.VUE_APP_BASE_API}admin/assessment/manage/exportAssessmentMessage?chapterId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`) window.open(`${process.env.VUE_APP_BASE_API}admin/assessment/manage/exportAssessmentMessage?chapterId=${props.datasource.stageId}&type=${1}&pid=${props.datasource.projectId}&courseId=${props.datasource.courseId}&taskId=${props.datasource.id}&taskType=${props.datasource.type}`)

View File

@@ -360,7 +360,7 @@
"studentName": state.name, "studentName": state.name,
"targetId":props.datasource.projectId, "targetId":props.datasource.projectId,
"taskId": props.datasource.courseId, "taskId": props.datasource.courseId,
"type": 2 "type": 1
}); });
api.QueryVoteManagementDetail({ api.QueryVoteManagementDetail({
"pageNo": state.currentPage, "pageNo": state.currentPage,
@@ -370,7 +370,7 @@
"studentName": state.name, "studentName": state.name,
"targetId":props.datasource.routerId, "targetId":props.datasource.routerId,
"taskId": props.datasource.courseId, "taskId": props.datasource.courseId,
"type": 2 "type": 1
}).then(res=>{ }).then(res=>{
console.log('投票数据获取', res) console.log('投票数据获取', res)
if(res.data.code==200){ if(res.data.code==200){

View File

@@ -128,16 +128,19 @@
</div>--> </div>-->
</div> </div>
</a-drawer> </a-drawer>
<view-assess v-model:Assessvisible="Assessvisible" :datasource="evalDataSource" :evalName="datasource.info?.assessmentName"
:basicdata="datasource.info" />
</template> </template>
<script> <script>
import { toRefs, reactive, onMounted, onUnmounted } from "vue"; import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import ViewAssess from "../ViewAssess";
// import * as api from "../../../api/index"; // import * as api from "../../../api/index";
import * as api from "../../../api/indexTaskManage"; import * as api from "../../../api/indexTaskManage";
export default { export default {
name: "RouterCommonManage", name: "RouterCommonManage",
components: { ViewAssess },
props: { props: {
CommonModelVisible: { CommonModelVisible: {
type: Boolean, type: Boolean,
@@ -200,6 +203,8 @@ export default {
], ],
tabledata: [], tabledata: [],
tableDataTotalLoading: true, // 表格loading加载配置 tableDataTotalLoading: true, // 表格loading加载配置
evalDataSource: "",
Assessvisible: false
}); });
const tableDataFunc = () => { const tableDataFunc = () => {
const columns = [ const columns = [
@@ -317,9 +322,42 @@ export default {
}, },
}, },
]; ];
let obj = {
title: "操作",
dataIndex: "finishStatus",
key: "finishStatus",
width: 60,
align: "center",
ellipsis: true,
className: "h",
customRender: (text) => {
return (
<div class="racona">
<a
onClick={()=>{
console.log('iyiy', text.record)
showassess(text.record);
}}>查看</a>
</div>
);
},
}
{/* 评估查看操作 */}
if(props.datasource.type==11){
columns.push(obj)
}
return columns; return columns;
}; };
{/* 查看评估弹框 */}
const showassess = (data) => {
state.evalDataSource = data;
state.Assessvisible = true;
};
const closeDrawer = () => { const closeDrawer = () => {
ctx.emit("update:CommonModelVisible", false); ctx.emit("update:CommonModelVisible", false);
state.currentPage = 1; state.currentPage = 1;
@@ -477,6 +515,7 @@ export default {
...toRefs(state), ...toRefs(state),
selectProjectName, selectProjectName,
closeDrawer, closeDrawer,
showassess,
afterVisibleChange, afterVisibleChange,
tableDataFunc, tableDataFunc,
godie, godie,

View File

@@ -376,11 +376,10 @@
}; };
batchSendMessage(obj).then(res => { batchSendMessage(obj).then(res => {
console.log(res) console.log(res)
message.success("成功"); message.success("催促" + props.title + "成功");
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
message.success("催促" + props.title + "成功");
}; };
//导入成绩 //导入成绩
const showEScoreModal = () => { const showEScoreModal = () => {

View File

@@ -286,7 +286,7 @@ export default {
align: "center", align: "center",
ellipsis: true, ellipsis: true,
className: "h", className: "h",
customRender: ({ record: { finishStatus } }) => ({ 1: '通过', 2: '未通过' }[finishStatus] || '未开始'), customRender: ({record:{finishStatus}}) => ({1:'已完成',0:'未开始',9:'已完成'}[finishStatus] || '未开始'),
}, },
{ {
title: "操作", title: "操作",
@@ -299,7 +299,7 @@ export default {
customRender: (text) => { customRender: (text) => {
{/* debugger */ } {/* debugger */ }
console.log("text" + text.record) console.log("text" + text.record)
if (text.record.finishStatus === 1 || text.record.finishStatus === 2) { if (text.record.finishStatus === 1 || text.record.finishStatus === 9) {
return ( return (
<div class="racona"> <div class="racona">
<a-button <a-button
@@ -378,11 +378,10 @@ export default {
}; };
batchSendMessage(obj).then(res => { batchSendMessage(obj).then(res => {
console.log(res) console.log(res)
message.success("成功"); message.success("催促" + props.title + "成功");
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
message.success("催促" + props.title + "成功");
}; };
//导入成绩 //导入成绩
const showEScoreModal = () => { const showEScoreModal = () => {
@@ -400,7 +399,7 @@ export default {
pageNo: state.currentPage, pageNo: state.currentPage,
pageSize: state.pageSize, pageSize: state.pageSize,
chapterId: props.datasource.chapterId, chapterId: props.datasource.chapterId,
type: 1, type: 2,
taskId: props.datasource.courseId, taskId: props.datasource.courseId,
targetId: props.datasource.routerId targetId: props.datasource.routerId
}).then(res => { }).then(res => {

View File

@@ -85,7 +85,8 @@
<div class="tab2"> <div class="tab2">
<a-form-item label="组织:"> <a-form-item label="组织:">
<a-input v-model:value="searchOrgName.keyword" <a-input v-model:value="searchOrgName.keyword"
style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织" @click="orgValue"/> style="width: 230px; height: 40px; border-radius: 8px" placeholder="请输入组织"
@click="orgValue"/>
<a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px"> <a-button type="primary" @click="searchOrg" style="margin-left: 20px; border-radius: 4px">
<template #icon> <template #icon>
<SearchOutlined/> <SearchOutlined/>
@@ -97,7 +98,8 @@
</a-form-item> </a-form-item>
</div> </div>
<div class="boeTree"> <div class="boeTree">
<a-tree v-model:selectedKeys="selectedOrgKeys" :tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange" <a-tree v-model:selectedKeys="selectedOrgKeys"
:tree-data="searchOrgName.keyword ? orgData : treeOrgData" @select="onOrgSelectChange"
:loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{ :loading="orgOrgLoading" :load-data="onLoadOrgData" :fieldNames="{
children: 'treeChildList', children: 'treeChildList',
key: 'id', key: 'id',
@@ -112,7 +114,8 @@
<div :style="{ height: screenHeight - 235 + 'px' }"> <div :style="{ height: screenHeight - 235 + 'px' }">
<div> <div>
<a-form-item label="受众名称:"> <a-form-item label="受众名称:">
<a-input v-model:value="audienceName.keyword" style="width: 260px; height: 40px; border-radius: 8px" <a-input v-model:value="audienceName.keyword"
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>
@@ -267,7 +270,8 @@
<div class="inher"> <div class="inher">
<!-- <div class="cur">当前关卡关卡2</div> --> <!-- <div class="cur">当前关卡关卡2</div> -->
<div class="select"> <div class="select">
<a-select style="width: 400px" :placeholder="type === 1 ? '选择阶段' : '选择关卡'" v-model:value="selectsData.stageId" <a-select style="width: 400px" :placeholder="type === 1 ? '选择阶段' : '选择关卡'"
v-model:value="selectsData.stageId"
className="cus-select"> className="cus-select">
<a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id">{{ item.name || "默认" }} <a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id">{{ item.name || "默认" }}
</a-select-option> </a-select-option>
@@ -278,7 +282,7 @@
<button class="sameb btn1" @click="closeChangeModal" style="cursor: pointer"> <button class="sameb btn1" @click="closeChangeModal" style="cursor: pointer">
取消 取消
</button> </button>
<button class="sameb btn2" @click="handleStageOk" style="cursor: pointer"> <button class="sameb btn2" @click="handleDialogOk" style="cursor: pointer">
确定 确定
</button> </button>
</div> </div>
@@ -303,6 +307,7 @@ import {
// addGroupMember, // addGroupMember,
getStuPage, getStuPage,
} from "@/api/index1"; } from "@/api/index1";
import dialog from "@/utils/dialog";
// import { getProjStu } from "@/api/indexProjStu"; // import { getProjStu } from "@/api/indexProjStu";
const emit = defineEmits({}); const emit = defineEmits({});
const props = defineProps({ const props = defineProps({
@@ -357,7 +362,7 @@ const props = defineProps({
default: null, default: null,
}, },
}); });
console.log("props.activeKey1" + props.activeKey1) console.log("props.activeKey1" + props.activeKey1);
// 获取项目学员; // 获取项目学员;
const procurrentPage = ref(1); const procurrentPage = ref(1);
const projectList = ref([]); const projectList = ref([]);
@@ -391,7 +396,6 @@ const getStu = () => {
console.log("获取项目学员", obj); console.log("获取项目学员", obj);
getStuPage(obj).then((res) => { getStuPage(obj).then((res) => {
console.log("获取项目学员", res); console.log("获取项目学员", res);
if (res.data.code === 200) {
let arr = res.data.data.records; let arr = res.data.data.records;
let array = []; let array = [];
arr.map((value) => { arr.map((value) => {
@@ -408,7 +412,6 @@ const getStu = () => {
}); });
projectList.value = array; projectList.value = array;
projectListTotal.value = res.data.data.total; projectListTotal.value = res.data.data.total;
}
}); });
}; };
getStu(); getStu();
@@ -416,6 +419,7 @@ const projectChangePagination = (page) => {
procurrentPage.value = page; procurrentPage.value = page;
getStu(); getStu();
}; };
function onProjectSelectChange(e, l) { function onProjectSelectChange(e, l) {
console.log("eeeee", e, l); console.log("eeeee", e, l);
projectSelectKeys.value = e; projectSelectKeys.value = e;
@@ -672,14 +676,14 @@ function stuDel(i) {
const selectedOrgKeys = ref([]); const selectedOrgKeys = ref([]);
watch(selectedOrgKeys, () => { watch(selectedOrgKeys, () => {
console.log('selectedKeys', selectedOrgKeys); console.log("selectedKeys", selectedOrgKeys);
}); });
function orgDel(i) { function orgDel(i) {
console.log(selectedOrgKeys.value) console.log(selectedOrgKeys.value);
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id) orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id);
selectedOrgKeys.value.splice(i, 1) selectedOrgKeys.value.splice(i, 1);
selectsData.value.deptList.splice(i, 1) selectsData.value.deptList.splice(i, 1);
} }
function AuditDel(i) { function AuditDel(i) {
@@ -779,6 +783,14 @@ const submitAuth = () => {
} }
}; };
function handleDialogOk() {
if (selectsData.value.groupList.length || selectsData.value.deptList.length) {
dialog({ content: "您选择了组织或受众,此添加为异步添加,请稍后手动刷新学员!", ok: handleStageOk });
return;
}
handleStageOk();
}
function handleStageOk() { function handleStageOk() {
// debugger // debugger
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人 // 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
@@ -786,27 +798,28 @@ function handleStageOk() {
if (props.groupMemberCount !== null) { // 只有添加组员的时候判断 if (props.groupMemberCount !== null) { // 只有添加组员的时候判断
let selectMember = 0; let selectMember = 0;
if (activeKey.value === 4) { // 项目内选人 if (activeKey.value === 4) { // 项目内选人
selectMember = selectsData.value.projectMemberList.length selectMember = selectsData.value.projectMemberList.length;
} else if (activeKey.value === 1) {
selectMember = selectsData.value.studentList.length
} else if (activeKey.value === 2) {
selectMember = selectsData.value.groupList.length
} else if (activeKey.value === 3) {
selectMember = selectsData.value.deptList.length
}
if (props.groupMemberCount < selectMember + Number(props.groupMemberNumber)) {
return message.warning("添加小组学员超过最大值");
}
// 判断是否是组长,组长不能添加
const leaderArray = selectsData.value.projectMemberList.filter(item => item.isLeader === '1');
if (leaderArray.length > 0) {
return message.warning("当前选中学员"+leaderArray[0].realName+"已是小组长,请勿重复选择。");
}
// 对选中的人员进行判断是否已经分组了 // 对选中的人员进行判断是否已经分组了
let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null); let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null);
if (haveGroupNum.length > 0) { if (haveGroupNum.length > 0) {
message.warning("部分学员已经有小组,再次添加会被添加到当前小组."); message.warning("部分学员已经有小组,再次添加会被添加到当前小组.");
} }
} else if (activeKey.value === 1) {
selectMember = selectsData.value.studentList.length;
} else if (activeKey.value === 2) {
selectMember = selectsData.value.groupList.length;
} else if (activeKey.value === 3) {
selectMember = selectsData.value.deptList.length;
}
if (props.groupMemberCount < selectMember + Number(props.groupMemberNumber)) {
return message.warning("添加小组学员超过最大值");
}
// 判断是否是组长,组长不能添加
const leaderArray = selectsData.value.projectMemberList.filter(item => item.isLeader === "1");
if (leaderArray.length > 0) {
return message.warning("当前选中学员" + leaderArray[0].realName + "已是小组长,请勿重复选择。");
}
} }
} }
stageVisible.value = false; stageVisible.value = false;

View File

@@ -96,11 +96,42 @@
</a-drawer> </a-drawer>
<a-button @click="openDrawer" type="link"><slot></slot></a-button> <a-button @click="openDrawer" type="link"><slot></slot></a-button>
</div> </div>
<!-- 删除弹窗 -->
<a-modal
v-model:visible="deleteModalVisible"
:footer="null"
wrapClassName="deleteModal1"
centered="true"
>
<div class="delete">
<div class="del_header"></div>
<div class="del_main">
<div class="header">
<div class="icon"></div>
<span>提示</span>
<div class="close_exit" @click="closeSameModal"></div>
</div>
<div class="body">
<span>确定删除?</span>
<span style="margin-top: 20px">数据删除后不可恢复!</span>
</div>
<div class="del_btnbox">
<div class="del_btn btn1" @click="closeSameModal">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2" @click="sureSameModal">
<div class="btnText">确定</div>
</div>
</div>
</div>
</div>
</a-modal>
</template> </template>
<script setup> <script setup>
import { import {
computed, computed,
createVNode, // createVNode,
defineProps, defineProps,
defineExpose, defineExpose,
ref, ref,
@@ -109,8 +140,8 @@ import {
import { usePage } from "@/api/request"; import { usePage } from "@/api/request";
import { STUDENT_LIST } from "@/api/apis"; import { STUDENT_LIST } from "@/api/apis";
import { delStudentList } from "@/api/index1"; import { delStudentList } from "@/api/index1";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue"; // import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { Modal } from "ant-design-vue"; // import { Modal } from "ant-design-vue";
const props = defineProps({ const props = defineProps({
type: Number, type: Number,
@@ -220,22 +251,41 @@ function search() {
searchParams.value.studentName = searchName.value; searchParams.value.studentName = searchName.value;
searchParams.value.pageNo = 1; searchParams.value.pageNo = 1;
} }
const deleteModalVisible = ref(false);
const deleteId = ref(null);
function del(id) { function del(id) {
Modal.confirm({ deleteModalVisible.value = true;
title: () => "确定删除?", deleteId.value = id;
icon: () => createVNode(ExclamationCircleOutlined), // Modal.confirm({
content: () => "数据删除后不可恢复!", // title: () => "确定删除?",
okText: () => "确定", // icon: () => createVNode(ExclamationCircleOutlined),
okType: "danger", // content: () => "数据删除后不可恢复!",
cancelText: () => "取消", // okText: () => "确定",
onOk() { // okType: "danger",
if (id) { // cancelText: () => "取消",
// onOk() {
// if (id) {
// loading.value = true;
// delStudentList({ ids: [id] }).then(() => searchStu());
// }
// },
// });
}
//确定删除
const sureSameModal = () => {
if (deleteId.value) {
loading.value = true; loading.value = true;
delStudentList({ ids: [id] }).then(() => searchStu()); delStudentList({ ids: [deleteId.value] }).then(() => searchStu());
} deleteModalVisible.value = false;
},
});
} }
};
//取消
const closeSameModal = () => {
deleteModalVisible.value = false;
deleteId.value = null;
};
const closeDrawer = () => { const closeDrawer = () => {
visiable.value = false; visiable.value = false;
@@ -511,4 +561,133 @@ defineExpose({
} }
} }
} }
.deleteModal1 {
.ant-modal {
width: 424px !important;
height: 258px !important;
.ant-modal-content {
width: 424px !important;
height: 258px !important;
.ant-modal-body {
width: 424px !important;
height: 258px !important;
padding: 0 !important;
.delete {
z-index: 999;
width: 424px;
height: 258px;
background: #ffffff;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
border-radius: 4px;
// position: absolute;
// left: 50%;
// top: 10%;
// transform: translate(-50%, -50%);
.del_header {
position: absolute;
width: calc(100%);
height: 68px;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
}
.del_main {
width: 100%;
position: relative;
.header {
display: flex;
align-items: center;
padding-top: 20px;
padding-left: 26px;
font-size: 16px;
.icon {
width: 16px;
height: 16px;
margin-right: 10px;
background-image: url(@/assets/images/taskpage/gan.png);
background-size: 100% 100%;
}
.close_exit {
position: absolute;
right: 42px;
cursor: pointer;
width: 20px;
height: 20px;
background-image: url(@/assets/images/coursewareManage/close.png);
background-size: 100% 100%;
}
}
.body {
width: 100%;
margin: 34px auto 56px auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
// background-color: red;
position: relative;
.back {
position: absolute;
top: 30px;
font-size: 12px;
font-weight: 400;
color: #666666;
}
}
.del_btnbox {
display: flex;
margin: 30px auto;
justify-content: center;
.del_btn {
width: 100px;
height: 40px;
background: rgba(64, 158, 255, 0);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 40px;
}
}
.btn1 {
border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff;
margin-right: 14px;
}
.btn2 {
background-color: #4ea6ff;
color: #ffffff;
}
}
}
}
}
}
.ant-modal-close-x {
display: none;
}
}
}
</style> </style>

View File

@@ -354,14 +354,45 @@
:courseId="id" :courseId="id"
:courseType="type" :courseType="type"
/> />
<!-- 删除弹窗 -->
<a-modal
v-model:visible="deleteModalVisible"
:footer="null"
wrapClassName="deleteModal1"
centered="true"
>
<div class="delete">
<div class="del_header"></div>
<div class="del_main">
<div class="header">
<div class="icon"></div>
<span>提示</span>
<div class="close_exit" @click="closeSameModal"></div>
</div>
<div class="body">
<span>确定删除?</span>
<span style="margin-top: 20px">数据删除后不可恢复</span>
</div>
<div class="del_btnbox">
<div class="del_btn btn1" @click="closeSameModal">
<div class="btnText">取消</div>
</div>
<div class="del_btn btn2" @click="sureSameModal">
<div class="btnText">确定</div>
</div>
</div>
</div>
</div>
</a-modal>
</template> </template>
<script setup> <script setup>
import { computed, createVNode, defineProps, onMounted, ref, watch } from "vue"; import { computed, defineProps, onMounted, ref, watch } from "vue";
import { delStudentList, getStuPage, batchUpdateStatus } from "@/api/index1"; import { delStudentList, getStuPage, batchUpdateStatus } from "@/api/index1";
import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue"; import ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
import CommonStudent from "@/components/student/CommonStudent"; import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue"; import ChangeLevelModal from "./ChangeLevelModal.vue";
import { message, Modal } from "ant-design-vue"; import { message } from "ant-design-vue";
// import { topStudent } from "../../api/indexProjStu"; // import { topStudent } from "../../api/indexProjStu";
import SeeStu from "../../components/drawers/SeeStu"; import SeeStu from "../../components/drawers/SeeStu";
import EScore from "../drawers/ExportScore.vue"; import EScore from "../drawers/ExportScore.vue";
@@ -369,7 +400,7 @@ import OrgClass from "@/components/project/OrgClass";
import ExportHomeWork from "../Modals/ExportHomeWork.vue"; import ExportHomeWork from "../Modals/ExportHomeWork.vue";
import * as api from "../../api/index1"; import * as api from "../../api/index1";
import ImpStu from "../drawers/AddLevelImportStu"; import ImpStu from "../drawers/AddLevelImportStu";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue"; // import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { checkPer } from "@/utils/utils"; import { checkPer } from "@/utils/utils";
const props = defineProps({ const props = defineProps({
@@ -581,7 +612,7 @@ function exportTaskStuRouter() {
onMounted(() => { onMounted(() => {
// debugger // debugger
console.log("props.activeKey1" + props.activeKey1) console.log("props.activeKey1" + props.activeKey1);
getStuList(); getStuList();
}); });
watch(props.isgetStudent, () => { watch(props.isgetStudent, () => {
@@ -652,26 +683,43 @@ function bathDel() {
delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList()); delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList());
} }
const deleteModalVisible = ref(false);
const deleteId = ref(null);
function del(id, row) { function del(id, row) {
if (row.isLeader === "1") { if (row.isLeader === "1") {
return message.warning("" + row.name + "是小组长,请勿删除!"); return message.warning("" + row.name + "是小组长,请勿删除!");
} }
deleteModalVisible.value = true;
Modal.confirm({ deleteId.value = id;
title: () => "确定删除?", // Modal.confirm({
icon: () => createVNode(ExclamationCircleOutlined), // title: () => "确定删除?",
content: () => "数据删除后不可恢复!", // icon: () => createVNode(ExclamationCircleOutlined),
okText: () => "确定", // content: () => "数据删除后不可恢复!",
okType: "danger", // okText: () => "确定",
cancelText: () => "取消", // okType: "danger",
onOk() { // class: "deleteModal",
if (id) { // cancelText: () => "取消",
// onOk() {
// if (id) {
// tableData.value.loading = true;
// delStudentList({ ids: [id] }).then(() => getStuList());
// }
// },
// });
}
//确定删除
const sureSameModal = () => {
if (deleteId.value) {
tableData.value.loading = true; tableData.value.loading = true;
delStudentList({ ids: [id] }).then(() => getStuList()); delStudentList({ ids: [deleteId.value] }).then(() => getStuList());
} deleteModalVisible.value = false;
},
});
} }
};
//取消
const closeSameModal = () => {
deleteModalVisible.value = false;
deleteId.value = null;
};
function submitCall(flag) { function submitCall(flag) {
tableData.value.loading = true; tableData.value.loading = true;
@@ -1022,6 +1070,135 @@ defineExpose({ getStuList, startLoading });
} }
} }
.deleteModal1 {
.ant-modal {
width: 424px !important;
height: 258px !important;
.ant-modal-content {
width: 424px !important;
height: 258px !important;
.ant-modal-body {
width: 424px !important;
height: 258px !important;
padding: 0 !important;
.delete {
z-index: 999;
width: 424px;
height: 258px;
background: #ffffff;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
border-radius: 4px;
// position: absolute;
// left: 50%;
// top: 10%;
// transform: translate(-50%, -50%);
.del_header {
position: absolute;
width: calc(100%);
height: 68px;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
}
.del_main {
width: 100%;
position: relative;
.header {
display: flex;
align-items: center;
padding-top: 20px;
padding-left: 26px;
font-size: 16px;
.icon {
width: 16px;
height: 16px;
margin-right: 10px;
background-image: url(@/assets/images/taskpage/gan.png);
background-size: 100% 100%;
}
.close_exit {
position: absolute;
right: 42px;
cursor: pointer;
width: 20px;
height: 20px;
background-image: url(@/assets/images/coursewareManage/close.png);
background-size: 100% 100%;
}
}
.body {
width: 100%;
margin: 34px auto 56px auto;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
// background-color: red;
position: relative;
.back {
position: absolute;
top: 30px;
font-size: 12px;
font-weight: 400;
color: #666666;
}
}
.del_btnbox {
display: flex;
margin: 30px auto;
justify-content: center;
.del_btn {
width: 100px;
height: 40px;
background: rgba(64, 158, 255, 0);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 40px;
}
}
.btn1 {
border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff;
margin-right: 14px;
}
.btn2 {
background-color: #4ea6ff;
color: #ffffff;
}
}
}
}
}
}
.ant-modal-close-x {
display: none;
}
}
}
/*.delete { /*.delete {
z-index: 9999; z-index: 9999;
width: 424px; width: 424px;

View File

@@ -13,7 +13,7 @@
<div class="delete" @click="handleDel">删除</div> <div class="delete" @click="handleDel">删除</div>
</div> </div>
<div class="name uploadContent"> <div class="name uploadContent">
<a-upload v-show="!formData.imgVal" class="in uploadBtn" :show-upload-list="false" :before-upload="beforeUpload"> <a-upload v-show="!formData.optionPictureAddress" class="in uploadBtn" :show-upload-list="false" :before-upload="beforeUpload">
<div class="addimg">+添加图片</div> <div class="addimg">+添加图片</div>
</a-upload> </a-upload>
<div v-show="formData.optionPictureAddress" class="picture" style="position: relative"> <div v-show="formData.optionPictureAddress" class="picture" style="position: relative">

View File

@@ -1,4 +1,4 @@
import store from '@/store' import store from "@/store";
export function traverseArr(arr, traverseObj, saveOld = false) { export function traverseArr(arr, traverseObj, saveOld = false) {
const newArr = []; const newArr = [];
@@ -28,26 +28,32 @@ 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) { export function checkPer(per) {
if (store?.state?.userInfo?.roleList.some(t => t.code === 'learning-admin')) { if (store?.state?.userInfo?.roleList.some(t => t.code === "learning-admin")) {
return true return true;
} }
if (!per) { if (!per) {
return false return false;
} }
return (per + "").split(',').some(t => admin.some(s => s == t)) return (per + "").split(",").some(t => admin.some(s => s == t));
}
const adminOwner = [6,9,12]
//单独检查是否有归属权
export function checkOwner(per) {
return (per + "").split(',').some(t => adminOwner.some(s => s == t))
}
export function checkMenu(path='') {
return store?.state?.menus.some(t => path.split(',').some(s=>'/'+s===t));
} }
const adminOwner = [6, 9, 12];
//单独检查是否有归属权
export function checkOwner(per) {
if (!per) {
return true;
}
return (per + "").split(",").some(t => adminOwner.some(s => s == t));
}
export function checkMenu(path = "") {
return store?.state?.menus.some(t => path.split(",").some(s => "/" + s === t));
}
export function deepClone(obj) { export function deepClone(obj) {
let result = typeof obj.splice === "function" ? [] : {}; let result = typeof obj.splice === "function" ? [] : {};

View File

@@ -330,10 +330,7 @@
>提交审核 >提交审核
</a-button> </a-button>
<a-button <a-button
v-if=" v-if="record.auditStatus === 2 && checkPer(record.permissions)"
(record.auditStatus === 0 || record.auditStatus === -1) &&
checkPer(record.permissions)
"
@click="() => handleEdit(record, String(record.courseform))" @click="() => handleEdit(record, String(record.courseform))"
type="link" type="link"
>编辑 >编辑
@@ -366,7 +363,12 @@
type="link" type="link"
>管理 >管理
</a-button> </a-button>
<DropDown v-if="checkPer(record.permissions) && checkOwner(record.permissions)" value="授权"> <DropDown
v-if="
checkPer(record.permissions) && checkOwner(record.permissions)
"
value="授权"
>
<OwnerTableModelStudent :types="[10, 11, 12]" :id="record.id" <OwnerTableModelStudent :types="[10, 11, 12]" :id="record.id"
>权限名单</OwnerTableModelStudent >权限名单</OwnerTableModelStudent
> >
@@ -383,7 +385,7 @@
> >
<a-button <a-button
v-if=" v-if="
(record.auditStatus === 3 || record.auditStatus === 2) && record.auditStatus === 3 &&
record.status && record.status &&
checkPer(record.permissions) checkPer(record.permissions)
" "

View File

@@ -210,8 +210,8 @@
<div class="item" style="align-items: center;margin-top: 20px;"> <div class="item" style="align-items: center;margin-top: 20px;">
<div class="left">审核结果</div> <div class="left">审核结果</div>
<div class="rig" style="margin-left: 10px;"> <div class="rig" style="margin-left: 10px;">
<a-tag v-if="transferCompletedModel.result==-1" color="red">拒绝</a-tag> <a-tag v-if="transferCompletedModel.result=='审核拒绝'" color="red">拒绝</a-tag>
<a-tag v-if="transferCompletedModel.result==2" color="green">通过</a-tag> <a-tag v-if="transferCompletedModel.result=='审核通过'" color="green">通过</a-tag>
</div> </div>
</div> </div>
<div class="item" style="margin-top: 20px"> <div class="item" style="margin-top: 20px">
@@ -318,7 +318,7 @@ export default {
key: "name", key: "name",
align: "center", align: "center",
ellipsis: true, ellipsis: true,
width: "20%", width: "22%",
}, },
{ {
title: "类型", title: "类型",
@@ -360,13 +360,15 @@ export default {
{/* 转审人名字 转审结果 转审备注 转审时间 */} {/* 转审人名字 转审结果 转审备注 转审时间 */}
showTransferInvitationAudit( showTransferInvitationAudit(
value.record.invitedTeacherName, value.record.invitedTeacherName,
value.record.intvitedAuditResult, value.record.invitedAuditResult,
value.record.intvitedAuditBackup, value.record.invitedAuditBackup,
value.record.intvitedAuditTime value.record.invitedAuditTime
) )
}} }}
style="cursor:pointer;" style="cursor:pointer;"
color="green">转审完成</a-tag>:"" color="green">转审完成</a-tag>:
value.record.inviteAuditStatus==3?
value.record.invitedMsg :""
} }
</div> </div>
); );
@@ -388,7 +390,6 @@ export default {
ellipsis: true, ellipsis: true,
width: "10%", width: "10%",
}, },
{ {
title: "操作", title: "操作",
dataIndex: "opt", dataIndex: "opt",
@@ -780,7 +781,12 @@ export default {
time: item.processTime, time: item.processTime,
createrId: item.createId, createrId: item.createId,
offId: item.id, offId: item.id,
inviteAuditStatus: item.inviteAuditStatus inviteAuditStatus: item.inviteAuditStatus,
invitedMsg: item.invitedMsg,
invitedTeacherName: item.invitedTeacherName,
invitedAuditResult: item.invitedAuditResult,
invitedAuditBackup: item.invitedAuditBackup,
invitedAuditTime: item.invitedAuditTime
}; };
array.push(obj); array.push(obj);
}); });

View File

@@ -0,0 +1,56 @@
<template>
<div class="courseManage">
<iframe
id="iframe"
style="width: 100%; height: 100%"
:src="iframeUrl + '/iframe/course/reviewed'"
frameborder="0"
name="myframe"
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>
</div>
</template>
<script setup>
import {iframeUrl} from "@/api/method";
</script>
<style lang="scss">
.courseManage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.btnn {
height: 72px;
width: 100%;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
color: #4ea6ff;
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
}
}
</style>

View File

@@ -0,0 +1,56 @@
<template>
<div class="courseManage">
<iframe
id="iframe"
style="width: 100%; height: 100%"
:src="iframeUrl + '/iframe/course/noapproved'"
frameborder="0"
name="myframe"
security="restricted"
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
></iframe>
</div>
</template>
<script setup>
import {iframeUrl} from "@/api/method";
</script>
<style lang="scss">
.courseManage {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.btnn {
height: 72px;
width: 100%;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
border: 1px solid #4ea6ff;
border-radius: 8px;
color: #4ea6ff;
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;
height: 40px;
background: #4ea6ff;
border-radius: 8px;
border: 0;
margin-left: 15px;
color: #fff;
}
}
</style>

View File

@@ -4,7 +4,7 @@
<div class="left clearfix"> <div class="left clearfix">
<div class="leftmain"> <div class="leftmain">
<div class="tit" style="margin-left: 18px">关卡</div> <div class="tit" style="margin-left: 18px">关卡</div>
<div class="btn btn3" @click="showModal()" style="margin-left: 19px"> <div class="btn btn3" @click="showModal({},'add')" style="margin-left: 19px">
<div class="search"></div> <div class="search"></div>
<div class="btnText">添加关卡</div> <div class="btnText">添加关卡</div>
</div> </div>
@@ -33,7 +33,7 @@
</div> </div>
</div> </div>
</a-popover> </a-popover>
<div class="imgIcon" @click="showModal(element)"></div> <div class="imgIcon" @click="showModal(element,'edit')"></div>
</div> </div>
<div class="boxs_right"> <div class="boxs_right">
<div class="imgIcon" @click="deleteChapter"></div> <div class="imgIcon" @click="deleteChapter"></div>
@@ -376,6 +376,7 @@ import dialog from "@/utils/dialog";
const {query: {routerId}} = useRoute(); const {query: {routerId}} = useRoute();
const modal = ref(false) const modal = ref(false)
const ischapterEdit = ref(false)
const visiblene = ref(false) const visiblene = ref(false)
const cancleLoading = ref(false) const cancleLoading = ref(false)
const confirmLoading = ref(false) const confirmLoading = ref(false)
@@ -408,7 +409,16 @@ watch(() => routerInfo.value.chapterList, () => {
}) })
}, {deep: true}) }, {deep: true})
const showModal = () => { const showModal = (e,type) => {
ischapterEdit.value = (type === "edit");
console.log(ischapterEdit.value)
if(type == 'edit'){
console.log("关卡信息:" + e.name);
formValue.value = e;//回传修改的信息
}else{
//关卡信息初始化
formValue.value = {};
}
modal.value = true; modal.value = true;
}; };
const closeModal = () => { const closeModal = () => {
@@ -420,10 +430,16 @@ const editChapter = () => {
if (!formValue.value.name) { if (!formValue.value.name) {
return message.warning("请输入关卡名称"); return message.warning("请输入关卡名称");
} }
if(ischapterEdit.value){
routerInfo.value.chapterList = [{...formValue.value, draftTaskList: []}];
}
else{
routerInfo.value.chapterList.push({...formValue.value, draftTaskList: []}) routerInfo.value.chapterList.push({...formValue.value, draftTaskList: []})
}
formValue.value = {draftTaskList: []} formValue.value = {draftTaskList: []}
closeModal() closeModal()
}; };
//删除关卡 //删除关卡
const deleteChapter = () => { const deleteChapter = () => {
dialog({ dialog({
@@ -2156,5 +2172,6 @@ const cancelStorage = async () => {
.footBox { .footBox {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
z-index: 999;
} }
</style> </style>

View File

@@ -1148,7 +1148,7 @@ export default defineComponent({
projectTaskId: 0, projectTaskId: 0,
projectTemplateId: localStorage.getItem("projectTemplateId"), projectTemplateId: localStorage.getItem("projectTemplateId"),
stageId: 0, stageId: 0,
type: 0, type: 0
}; };
api api
.editTask(obj) .editTask(obj)
@@ -1292,13 +1292,15 @@ export default defineComponent({
// 设置上传图片开关 // 设置上传图片开关
const checkedClose = (data, a) => { const checkedClose = (data, a) => {
console.log(data, a); console.log(data, a);
console.log("模板id" + projectTemplateId);
console.log("开关数据:" + JSON.stringify(data) + "====" + JSON.stringify(a))
state.attachSwitch = data; state.attachSwitch = data;
// 更新开关状态 // 更新开关状态
api api
.templateEdit({ .templateEdit({
sourceBelongId: state.projectInfo.sourceBelongId, sourceBelongId: state.projectInfo.sourceBelongId,
projectTemplateId: localStorage.getItem("projectTemplateId"), projectTemplateId: projectTemplateId,
attachSwitch: state.attachSwitch ? 1 : -1, attachSwitch: state.attachSwitch ? 1 : -1,
}) })
.then((res) => { .then((res) => {

View File

@@ -1679,5 +1679,6 @@ const cancelStorage = async () => {
.footBox { .footBox {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
z-index: 999;
} }
</style> </style>

View File

@@ -262,7 +262,6 @@
</div> --> </div> -->
</div> </div>
</div> </div>
<!-- 概览(无数据) -->
<!-- 概览(有数据) --> <!-- 概览(有数据) -->
<div v-if="hasTask"> <div v-if="hasTask">
<div class="onerow"> <div class="onerow">
@@ -2909,10 +2908,7 @@ export default {
let objtl = { let objtl = {
projectId: state.projectId, projectId: state.projectId,
}; };
apitl apitl.getProjectDetail(objtl).then((res) => {
.getProjectDetail(objtl)
.then((res) => {
if (res.status == 200) {
console.log("阶段列表", res); console.log("阶段列表", res);
for (let i = 0; i < res.data.data.stageList.length; i++) { for (let i = 0; i < res.data.data.stageList.length; i++) {
for ( for (
@@ -2927,7 +2923,7 @@ export default {
} }
} }
levelList.stageList = res.data.data.stageList; levelList.stageList = res.data.data.stageList;
if (levelList.stageList.length == 1) { if (levelList.stageList.length === 1) {
// 无解段任务 // 无解段任务
state.rankjieduan = [{ value: 0, label: "无阶段" }]; state.rankjieduan = [{ value: 0, label: "无阶段" }];
state.valuestu2 = 0; state.valuestu2 = 0;
@@ -2948,10 +2944,6 @@ export default {
state.valuestu2 = arrStage[0].value; state.valuestu2 = arrStage[0].value;
state.choosedStageName = levelList.stageList[0].name; state.choosedStageName = levelList.stageList[0].name;
} }
console.log(
"----------------------------------->",
res.data.data.stageList
);
//暂时传个固定的id用 到时候看数据里面是否有在更换 //暂时传个固定的id用 到时候看数据里面是否有在更换
// state.projectTaskId = res.data.data.stageList[0].taskList[0].projectTaskId // state.projectTaskId = res.data.data.stageList[0].taskList[0].projectTaskId
let leng = res.data.data.stageList.length; let leng = res.data.data.stageList.length;
@@ -2959,17 +2951,13 @@ export default {
let taskarr = res.data.data.stageList; let taskarr = res.data.data.stageList;
console.log("11-22-33", taskarr); console.log("11-22-33", taskarr);
if (taskarr.length == 1) { if (taskarr.length == 1) {
if (taskarr[0].stageId == "0") { if (taskarr[0].id == "0") {
taskarr[0].name = "无阶段任务"; taskarr[0].name = "无阶段任务";
} }
} }
state.taskSyllabus = taskarr; state.taskSyllabus = taskarr;
} }
}
}) })
.catch((err) => {
console.log("获取任务列表失败", err);
});
}; };
//学员学员管理渲染 //学员学员管理渲染
// const getTableDate = () => { // const getTableDate = () => {
@@ -3728,7 +3716,7 @@ export default {
gangw: value.userInfoBo.jobName, //岗位 gangw: value.userInfoBo.jobName, //岗位
completeStageCnt: value.completeStageCnt, //当前完成阶段数 completeStageCnt: value.completeStageCnt, //当前完成阶段数
totalStageCnt: value.totalStageCnt, //总阶段数 totalStageCnt: value.totalStageCnt, //总阶段数
excellent: value.topFlag == 1 ? true : false, //是否优秀学员 excellent: value.topFlag == 1, //是否优秀学员
progress: value.completeStageCnt + "/" + value.totalStageCnt, progress: value.completeStageCnt + "/" + value.totalStageCnt,
putin: putin:
value.source == 0 value.source == 0
@@ -3910,6 +3898,8 @@ export default {
state.hasTask = !!res.data.data?.stageList.some( state.hasTask = !!res.data.data?.stageList.some(
({ taskList }) => taskList.length ({ taskList }) => taskList.length
); );
console.log(111111111111);
console.log(state.hasTask);
// state.attach = info.attach; // state.attach = info.attach;
// state.templateId = info.templateId; // state.templateId = info.templateId;
state.sourceBelong = state.sourceBelong =

View File

@@ -8,7 +8,7 @@
<img src="../../assets/images/projectadd/right.png" style="margin-left: 10px; cursor: pointer" <img src="../../assets/images/projectadd/right.png" style="margin-left: 10px; cursor: pointer"
@click="showCancel" v-show="projectInfo.stageList[0].id != '0'" /> @click="showCancel" v-show="projectInfo.stageList[0].id != '0'" />
</div> </div>
<div class="btn btn3" @click="showModal" style="margin-left: 19px"> <div class="btn btn3" @click="showModal({}, 'add')" style="margin-left: 19px">
<div class="search"></div> <div class="search"></div>
<div class="btnText">添加阶段</div> <div class="btnText">添加阶段</div>
</div> </div>
@@ -17,8 +17,7 @@
group="stage" animation="500" v-if="JSON.stringify(projectInfo.stageList[0].taskTemplateList[0]) != '{}'"> group="stage" animation="500" v-if="JSON.stringify(projectInfo.stageList[0].taskTemplateList[0]) != '{}'">
<template #item="{ element, index }"> <template #item="{ element, index }">
<div class="items" v-if="element.id !== '0' && !element.deleted" <div class="items" v-if="element.id !== '0' && !element.deleted"
:class="activeIndex === index ? 'active' : ''" :class="activeIndex === index ? 'active' : ''" @click="changeStageIndex(index)">
@click="changeStageIndex(index)">
<div class="items1"> <div class="items1">
<div class="boxs_left"> <div class="boxs_left">
<a-popover placement="topLeft" trigger="click"> <a-popover placement="topLeft" trigger="click">
@@ -34,7 +33,7 @@
<span style="font-size: 12px; color: #ffffff">说明</span> <span style="font-size: 12px; color: #ffffff">说明</span>
</div> </div>
</a-popover> </a-popover>
<div class="imgIcon" @click="showModal(index)"></div> <div class="imgIcon" @click="showModal(element, 'edit')"></div>
</div> </div>
<div class="boxs_right"> <div class="boxs_right">
<div class="imgIcon" @click="showDeleteStage(index)"></div> <div class="imgIcon" @click="showDeleteStage(index)"></div>
@@ -184,8 +183,7 @@
</div> </div>
</div> </div>
<Draggable v-model="projectInfo.stageList[activeIndex].taskTemplateList" chosenClass="chosen" <Draggable v-model="projectInfo.stageList[activeIndex].taskTemplateList" chosenClass="chosen"
ghostClass="ghost" ghostClass="ghost" forceFallback="true" group="task" animation="500">
forceFallback="true" group="task" animation="500">
<template #item="{ element, index }"> <template #item="{ element, index }">
<div style=" <div style="
height: 50px; height: 50px;
@@ -230,9 +228,8 @@
<div style="width: 120px; text-align: center"> <div style="width: 120px; text-align: center">
<div class="opat"> <div class="opat">
<div class="opacationt clearfix"> <div class="opacationt clearfix">
<a-switch style="margin-left: -50px; margin-top: 3px" <a-switch style="margin-left: -50px; margin-top: 3px" v-model:checked="element.flag"
v-model:checked="element.flag" size="small" size="small" active-color="red" />
active-color="red"/>
<div class="showt clearfix"> <div class="showt clearfix">
<div class="bi" :style="{ 'z-index': element.flag ? 999 : 998, }">必修</div> <div class="bi" :style="{ 'z-index': element.flag ? 999 : 998, }">必修</div>
<div class="xuan">选修</div> <div class="xuan">选修</div>
@@ -281,7 +278,7 @@
<div class="footbtn"> <div class="footbtn">
<div class="btnbox"> <div class="btnbox">
<a-button class="btn btn2" @click="submitStorage" :loading="templateLoading">确定11</a-button> <a-button class="btn btn2" @click="submitStorage" :loading="templateLoading">确定</a-button>
<a-button class="btn btn1" @click="cancelStorage" :loading="cancleLoading">取消</a-button> <a-button class="btn btn1" @click="cancelStorage" :loading="cancleLoading">取消</a-button>
</div> </div>
</div> </div>
@@ -360,8 +357,7 @@
</a-modal> </a-modal>
</div> </div>
<!-- 确认添加阶段弹窗 --> <!-- 确认添加阶段弹窗 -->
<a-modal v-model:visible="confirmModal" :footer="null" wrapClassName="ConfirmModal" <a-modal v-model:visible="confirmModal" :footer="null" wrapClassName="ConfirmModal" centered="true">
centered="true">
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -385,8 +381,7 @@
</div> </div>
</a-modal> </a-modal>
<!-- 确认取消阶段弹窗 --> <!-- 确认取消阶段弹窗 -->
<a-modal v-model:visible="cancelModal" :footer="null" wrapClassName="ConfirmModal" <a-modal v-model:visible="cancelModal" :footer="null" wrapClassName="ConfirmModal" centered="true">
centered="true">
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -410,8 +405,7 @@
</div> </div>
</a-modal> </a-modal>
<!-- 确认删除任务弹窗 --> <!-- 确认删除任务弹窗 -->
<a-modal v-model:visible="deleteModal" :footer="null" wrapClassName="ConfirmModal" <a-modal v-model:visible="deleteModal" :footer="null" wrapClassName="ConfirmModal" centered="true">
centered="true">
<div class="delete"> <div class="delete">
<div class="del_header"></div> <div class="del_header"></div>
<div class="del_main"> <div class="del_main">
@@ -458,8 +452,7 @@
</div> </div>
</a-modal> </a-modal>
<!-- 移动任务到阶段 --> <!-- 移动任务到阶段 -->
<a-modal style="padding: 0" v-model:visible="visiblene" :footer="null" :centered="true" <a-modal style="padding: 0" v-model:visible="visiblene" :footer="null" :centered="true" wrapClassName="moveModal">
wrapClassName="moveModal">
<div class="con"> <div class="con">
<div class="header"> <div class="header">
<div class="inhe"> <div class="inhe">
@@ -537,6 +530,7 @@ const deAll = ref(false);
const deleteModal = ref(false); const deleteModal = ref(false);
const confirmModal = ref(false); const confirmModal = ref(false);
const stage = ref(false); const stage = ref(false);
const ischapterEdit = ref(false);//修改阶段标志
const cancelModal = ref(false); const cancelModal = ref(false);
const deleteStageModal = ref(false); const deleteStageModal = ref(false);
const templateLoading = ref(false); const templateLoading = ref(false);
@@ -615,7 +609,8 @@ const closeChangeModal = () => {
}; };
//移动任务到阶段 //移动任务到阶段
const moveTask = () => { const moveTask = () => {
projectInfo.value.stageList[moveChapterIndex.value].taskTemplateList.push(...projectInfo.value.projectTemplateInfo.value.stageList[activeIndex.value].taskTemplateList.filter(t => t.checked).map((t) => ({ console.log("移动到阶段:" + JSON.stringify(projectInfo.value));
projectInfo.value.stageList[moveChapterIndex.value].taskTemplateList.push(...projectInfo.value.stageList[activeIndex.value].taskTemplateList.filter(t => t.checked).map((t) => ({
...t, ...t,
checked: false checked: false
}))); })));
@@ -640,7 +635,15 @@ const closeModal = () => {
stage.value = false stage.value = false
}; };
//显示添加阶段弹窗 //显示添加阶段弹窗
const showModal = () => { const showModal = (e, type) => {
ischapterEdit.value = (type === "edit");
console.log(ischapterEdit.value)
if (type == 'edit') {
console.log("阶段信息:" + e.name);
formValue.value = e;//回传修改的信息
} else {
formValue.value = {};
}
stage.value = true stage.value = true
}; };
@@ -650,14 +653,20 @@ function editStage() {
message.warning("请输入阶段名称!"); message.warning("请输入阶段名称!");
return return
} }
//是否修改阶段2023-02-27add
if (ischapterEdit.value) {//修改
projectInfo.value.stageList[activeIndex.value] = formValue.value;
} else {//添加
projectInfo.value.stageList.push({ ...formValue.value })
}
//替换 默认阶段 //替换 默认阶段
if (projectInfo.value.stageList.length === 1 && projectInfo.value.stageList[0].id === '0') { if (projectInfo.value.stageList.length === 1 && projectInfo.value.stageList[0].id === '0') {
formValue.value.taskTemplateList = [...projectInfo.value.stageList[0].taskTemplateList] formValue.value.taskTemplateList = [...projectInfo.value.stageList[0].taskTemplateList]
projectInfo.value.stageList.push({...formValue.value}) console.log("修改后的阶段信息:" + JSON.stringify(projectInfo.value.stageList[activeIndex.value]))
projectInfo.value.stageList.splice(0, 1) projectInfo.value.stageList.splice(0, 1)
} else { } else {
projectInfo.value.stageList.push({...formValue.value})
activeIndex.value = activeIndex.value + 1 activeIndex.value = activeIndex.value + 1
console.log("activeIndex.value" + activeIndex.value);
} }
formValue.value = { taskTemplateList: [] } formValue.value = { taskTemplateList: [] }
stage.value = false stage.value = false
@@ -674,13 +683,14 @@ const closeDeleteStage = () => {
}; };
//删除阶段 //删除阶段
const deleteStage = () => { const deleteStage = () => {
console.log(12345); console.log("删除阶段前的数据:" + JSON.stringify(projectInfo.value));
if (projectInfo.value.stageList.length === 1) { if (projectInfo.value.stageList.length === 1) {
projectInfo.value.stageList = [{ id: '0', stageId: '0', name: '', remark: '', taskTemplateList: [] }]; projectInfo.value.stageList = [{ id: '0', stageId: '0', name: '', remark: '', taskTemplateList: [] }];
deleteStageModal.value = false; deleteStageModal.value = false;
return return
} }
projectInfo.value.stageList.splice(activeIndex.value, 1); projectInfo.value.stageList[activeIndex.value].deleted = true;
console.log("删除阶段后的数据:" + JSON.stringify(projectInfo.value));
activeIndex.value = activeIndex.value - 1; activeIndex.value = activeIndex.value - 1;
deleteStageModal.value = false; deleteStageModal.value = false;
}; };