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=
#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 ORG_LIST = '/userbasic/org/list 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 CASE_PAGE = '/systemapi/xboe/m/boe/cases/pagelist post formData'
export const EXAM_PAPER_PAGE = '/systemapi/xboe/m/exam/paper/querylist post formData'

View File

@@ -38,6 +38,24 @@
</div>
</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')">
<span
:class="{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -495,7 +495,7 @@ export default {
function exportTaskStu() {
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){
{/* 评估导出 */}
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,
"targetId":props.datasource.projectId,
"taskId": props.datasource.courseId,
"type": 2
"type": 1
});
api.QueryVoteManagementDetail({
"pageNo": state.currentPage,
@@ -370,7 +370,7 @@
"studentName": state.name,
"targetId":props.datasource.routerId,
"taskId": props.datasource.courseId,
"type": 2
"type": 1
}).then(res=>{
console.log('投票数据获取', res)
if(res.data.code==200){

View File

@@ -128,16 +128,19 @@
</div>-->
</div>
</a-drawer>
<view-assess v-model:Assessvisible="Assessvisible" :datasource="evalDataSource" :evalName="datasource.info?.assessmentName"
:basicdata="datasource.info" />
</template>
<script>
import { toRefs, reactive, onMounted, onUnmounted } from "vue";
import { message } from "ant-design-vue";
import ViewAssess from "../ViewAssess";
// import * as api from "../../../api/index";
import * as api from "../../../api/indexTaskManage";
export default {
name: "RouterCommonManage",
components: { ViewAssess },
props: {
CommonModelVisible: {
type: Boolean,
@@ -200,6 +203,8 @@ export default {
],
tabledata: [],
tableDataTotalLoading: true, // 表格loading加载配置
evalDataSource: "",
Assessvisible: false
});
const tableDataFunc = () => {
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;
};
{/* 查看评估弹框 */}
const showassess = (data) => {
state.evalDataSource = data;
state.Assessvisible = true;
};
const closeDrawer = () => {
ctx.emit("update:CommonModelVisible", false);
state.currentPage = 1;
@@ -477,6 +515,7 @@ export default {
...toRefs(state),
selectProjectName,
closeDrawer,
showassess,
afterVisibleChange,
tableDataFunc,
godie,

View File

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

View File

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

View File

@@ -9,7 +9,7 @@
{{ { 1: "添加学员", 2: "添加学员", 3: "添加学员" }[type] || title }}
</div>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer" />
@click="closeDrawer"/>
</div>
<div style="display: flex; overflow-x: auto; overflow-y: auto">
<div class="tabs" style="min-width: 800px">
@@ -19,10 +19,10 @@
<div>
<a-form-item label="姓名:">
<a-input v-model:value="proStudentName" style="width: 260px; height: 40px; border-radius: 8px"
placeholder="请输入姓名" />
placeholder="请输入姓名"/>
<a-button type="primary" @click="getStu" style="margin-left: 20px; border-radius: 4px">
<template #icon>
<SearchOutlined />
<SearchOutlined/>
</template>
搜索
</a-button>
@@ -33,7 +33,7 @@
<div class="tableBox tabb">
<a-table style="border: 1px solid #f2f6fe; width: 800px" row-key="id" :columns="stuColumns"
:data-source="projectList" :loading="projectListTotal" :pagination="projectPagination"
:row-selection="projectRowSelection" />
:row-selection="projectRowSelection"/>
</div>
</div>
</a-tab-pane>
@@ -42,10 +42,10 @@
<div class="tab1">
<a-form-item label="姓名">
<a-input v-model:value="nameSearch.keyword" style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入姓名" @change="peopleName" />
placeholder="请输入姓名" @change="peopleName"/>
<a-button type="primary" @click="onSearchStu" style="margin-left: 20px; border-radius: 4px">
<template #icon>
<SearchOutlined />
<SearchOutlined/>
</template>
搜索
</a-button>
@@ -75,7 +75,7 @@
border: 1px solid #f0f0f0;
">
<a-table :columns="stuColumns" :data-source="stuData" :pagination="stuPagination"
:loading="stuLoading" row-key="id" :row-selection="stuRowSelection" />
:loading="stuLoading" row-key="id" :row-selection="stuRowSelection"/>
</div>
</div>
</div>
@@ -85,10 +85,11 @@
<div class="tab2">
<a-form-item label="组织:">
<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">
<template #icon>
<SearchOutlined />
<SearchOutlined/>
</template>
搜索
</a-button>
@@ -97,7 +98,8 @@
</a-form-item>
</div>
<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="{
children: 'treeChildList',
key: 'id',
@@ -112,11 +114,12 @@
<div :style="{ height: screenHeight - 235 + 'px' }">
<div>
<a-form-item label="受众名称:">
<a-input v-model:value="audienceName.keyword" style="width: 260px; height: 40px; border-radius: 8px"
placeholder="请输入受众名称" />
<a-input v-model:value="audienceName.keyword"
style="width: 260px; height: 40px; border-radius: 8px"
placeholder="请输入受众名称"/>
<a-button type="primary" @click="searchAudi" style="margin-left: 20px; border-radius: 4px">
<template #icon>
<SearchOutlined />
<SearchOutlined/>
</template>
搜索
</a-button>
@@ -127,7 +130,7 @@
<div class="tableBox tabb">
<a-table style="border: 1px solid #f2f6fe; width: 800px" row-key="id" :columns="audiColums"
:data-source="audiData" :loading="audiLoading" :pagination="auditPagination"
:row-selection="auditRowSelection" />
:row-selection="auditRowSelection"/>
</div>
</div>
</a-tab-pane>
@@ -267,18 +270,19 @@
<div class="inher">
<!-- <div class="cur">当前关卡关卡2</div> -->
<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">
<a-select-option v-for="(item, i) in stageIds" :key="i" :value="item.id">{{ item.name || "默认" }}
</a-select-option>
</a-select>
</div>
<span style="color: #999999; margin-left: 10px"><minus-circle-outlined />已在其他关卡的学员不会被添加到该关卡</span>
<span style="color: #999999; margin-left: 10px"><minus-circle-outlined/>已在其他关卡的学员不会被添加到该关卡</span>
<div class="btn" style="margin-top: 50px">
<button class="sameb btn1" @click="closeChangeModal" style="cursor: pointer">
取消
</button>
<button class="sameb btn2" @click="handleStageOk" style="cursor: pointer">
<button class="sameb btn2" @click="handleDialogOk" style="cursor: pointer">
确定
</button>
</div>
@@ -288,9 +292,9 @@
</a-modal>
</template>
<script setup>
import { message } from "ant-design-vue";
import { computed, defineEmits, defineProps, ref, watch } from "vue";
import { boeRequest, useBoeApi, useBoeApiPage } from "@/api/request";
import {message} from "ant-design-vue";
import {computed, defineEmits, defineProps, ref, watch} from "vue";
import {boeRequest, useBoeApi, useBoeApiPage} from "@/api/request";
import {
AUDIENCE_LIST,
ORG_CHILD_LIST,
@@ -303,6 +307,7 @@ import {
// addGroupMember,
getStuPage,
} from "@/api/index1";
import dialog from "@/utils/dialog";
// import { getProjStu } from "@/api/indexProjStu";
const emit = defineEmits({});
const props = defineProps({
@@ -357,7 +362,7 @@ const props = defineProps({
default: null,
},
});
console.log("props.activeKey1" + props.activeKey1)
console.log("props.activeKey1" + props.activeKey1);
// 获取项目学员;
const procurrentPage = ref(1);
const projectList = ref([]);
@@ -391,7 +396,6 @@ const getStu = () => {
console.log("获取项目学员", obj);
getStuPage(obj).then((res) => {
console.log("获取项目学员", res);
if (res.data.code === 200) {
let arr = res.data.data.records;
let array = [];
arr.map((value) => {
@@ -408,7 +412,6 @@ const getStu = () => {
});
projectList.value = array;
projectListTotal.value = res.data.data.total;
}
});
};
getStu();
@@ -416,6 +419,7 @@ const projectChangePagination = (page) => {
procurrentPage.value = page;
getStu();
};
function onProjectSelectChange(e, l) {
console.log("eeeee", e, l);
projectSelectKeys.value = e;
@@ -672,14 +676,14 @@ function stuDel(i) {
const selectedOrgKeys = ref([]);
watch(selectedOrgKeys, () => {
console.log('selectedKeys', selectedOrgKeys);
console.log("selectedKeys", selectedOrgKeys);
});
function orgDel(i) {
console.log(selectedOrgKeys.value)
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id)
selectedOrgKeys.value.splice(i, 1)
selectsData.value.deptList.splice(i, 1)
console.log(selectedOrgKeys.value);
orgSelectKeys.value = orgSelectKeys.value.filter(e => e !== selectsData.value.deptList[i].id);
selectedOrgKeys.value.splice(i, 1);
selectsData.value.deptList.splice(i, 1);
}
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() {
// debugger
// 判断添加人数是否已超过限制人数 限制 = 本次添加的人 + 原有的人
@@ -786,27 +798,28 @@ function handleStageOk() {
if (props.groupMemberCount !== null) { // 只有添加组员的时候判断
let selectMember = 0;
if (activeKey.value === 4) { // 项目内选人
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+"已是小组长,请勿重复选择。");
}
selectMember = selectsData.value.projectMemberList.length;
// 对选中的人员进行判断是否已经分组了
let haveGroupNum = selectsData.value.projectMemberList.filter(item => item.groupId !== null);
if (haveGroupNum.length > 0) {
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;

View File

@@ -96,11 +96,42 @@
</a-drawer>
<a-button @click="openDrawer" type="link"><slot></slot></a-button>
</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>
<script setup>
import {
computed,
createVNode,
// createVNode,
defineProps,
defineExpose,
ref,
@@ -109,8 +140,8 @@ import {
import { usePage } from "@/api/request";
import { STUDENT_LIST } from "@/api/apis";
import { delStudentList } from "@/api/index1";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { Modal } from "ant-design-vue";
// import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
// import { Modal } from "ant-design-vue";
const props = defineProps({
type: Number,
@@ -220,23 +251,42 @@ function search() {
searchParams.value.studentName = searchName.value;
searchParams.value.pageNo = 1;
}
const deleteModalVisible = ref(false);
const deleteId = ref(null);
function del(id) {
Modal.confirm({
title: () => "确定删除?",
icon: () => createVNode(ExclamationCircleOutlined),
content: () => "数据删除后不可恢复!",
okText: () => "确定",
okType: "danger",
cancelText: () => "取消",
onOk() {
if (id) {
loading.value = true;
delStudentList({ ids: [id] }).then(() => searchStu());
}
},
});
deleteModalVisible.value = true;
deleteId.value = id;
// Modal.confirm({
// title: () => "确定删除?",
// icon: () => createVNode(ExclamationCircleOutlined),
// content: () => "数据删除后不可恢复!",
// okText: () => "确定",
// okType: "danger",
// cancelText: () => "取消",
// onOk() {
// if (id) {
// loading.value = true;
// delStudentList({ ids: [id] }).then(() => searchStu());
// }
// },
// });
}
//确定删除
const sureSameModal = () => {
if (deleteId.value) {
loading.value = true;
delStudentList({ ids: [deleteId.value] }).then(() => searchStu());
deleteModalVisible.value = false;
}
};
//取消
const closeSameModal = () => {
deleteModalVisible.value = false;
deleteId.value = null;
};
const closeDrawer = () => {
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>

View File

@@ -354,14 +354,45 @@
:courseId="id"
: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>
<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 ChangeGroupModal from "@/components/student/ChangeGroupModal.vue";
import CommonStudent from "@/components/student/CommonStudent";
import ChangeLevelModal from "./ChangeLevelModal.vue";
import { message, Modal } from "ant-design-vue";
import { message } from "ant-design-vue";
// import { topStudent } from "../../api/indexProjStu";
import SeeStu from "../../components/drawers/SeeStu";
import EScore from "../drawers/ExportScore.vue";
@@ -369,7 +400,7 @@ import OrgClass from "@/components/project/OrgClass";
import ExportHomeWork from "../Modals/ExportHomeWork.vue";
import * as api from "../../api/index1";
import ImpStu from "../drawers/AddLevelImportStu";
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
// import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
import { checkPer } from "@/utils/utils";
const props = defineProps({
@@ -378,7 +409,7 @@ const props = defineProps({
type: String,
default: "",
},
activeKey:{
activeKey: {
type: String,
default: "",
},
@@ -581,7 +612,7 @@ function exportTaskStuRouter() {
onMounted(() => {
// debugger
console.log("props.activeKey1" + props.activeKey1)
console.log("props.activeKey1" + props.activeKey1);
getStuList();
});
watch(props.isgetStudent, () => {
@@ -652,26 +683,43 @@ function bathDel() {
delStudentList({ ids: stuSelectKeys.value }).then(() => getStuList());
}
const deleteModalVisible = ref(false);
const deleteId = ref(null);
function del(id, row) {
if (row.isLeader === "1") {
return message.warning("" + row.name + "是小组长,请勿删除!");
}
Modal.confirm({
title: () => "确定删除?",
icon: () => createVNode(ExclamationCircleOutlined),
content: () => "数据删除后不可恢复!",
okText: () => "确定",
okType: "danger",
cancelText: () => "取消",
onOk() {
if (id) {
tableData.value.loading = true;
delStudentList({ ids: [id] }).then(() => getStuList());
}
},
});
deleteModalVisible.value = true;
deleteId.value = id;
// Modal.confirm({
// title: () => "确定删除?",
// icon: () => createVNode(ExclamationCircleOutlined),
// content: () => "数据删除后不可恢复!",
// okText: () => "确定",
// okType: "danger",
// class: "deleteModal",
// cancelText: () => "取消",
// onOk() {
// if (id) {
// tableData.value.loading = true;
// delStudentList({ ids: [id] }).then(() => getStuList());
// }
// },
// });
}
//确定删除
const sureSameModal = () => {
if (deleteId.value) {
tableData.value.loading = true;
delStudentList({ ids: [deleteId.value] }).then(() => getStuList());
deleteModalVisible.value = false;
}
};
//取消
const closeSameModal = () => {
deleteModalVisible.value = false;
deleteId.value = null;
};
function submitCall(flag) {
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 {
z-index: 9999;
width: 424px;

View File

@@ -13,7 +13,7 @@
<div class="delete" @click="handleDel">删除</div>
</div>
<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>
</a-upload>
<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) {
const newArr = [];
@@ -28,26 +28,32 @@ export function traverseArr(arr, traverseObj, saveOld = false) {
return newArr;
}
const admin = [5, 6, 8, 9, 11, 12]
const admin = [5, 6, 8, 9, 11, 12];
//检查 管理权和归属权
export function checkPer(per) {
if (store?.state?.userInfo?.roleList.some(t => t.code === 'learning-admin')) {
return true
if (store?.state?.userInfo?.roleList.some(t => t.code === "learning-admin")) {
return true;
}
if (!per) {
return false
return false;
}
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));
return (per + "").split(",").some(t => admin.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) {
let result = typeof obj.splice === "function" ? [] : {};

View File

@@ -330,10 +330,7 @@
>提交审核
</a-button>
<a-button
v-if="
(record.auditStatus === 0 || record.auditStatus === -1) &&
checkPer(record.permissions)
"
v-if="record.auditStatus === 2 && checkPer(record.permissions)"
@click="() => handleEdit(record, String(record.courseform))"
type="link"
>编辑
@@ -366,7 +363,12 @@
type="link"
>管理
</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
>
@@ -383,7 +385,7 @@
>
<a-button
v-if="
(record.auditStatus === 3 || record.auditStatus === 2) &&
record.auditStatus === 3 &&
record.status &&
checkPer(record.permissions)
"
@@ -1731,7 +1733,7 @@ import FJUpload from "@/components/common/FJUpload";
import { updateStudent } from "@/api/indexProjStu";
import { useStore } from "vuex";
import DropDown from "@/components/common/DropDown";
import { checkPer,checkOwner } from "@/utils/utils";
import { checkPer, checkOwner } from "@/utils/utils";
import dayjs from "dayjs";
//列表表格

View File

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

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="leftmain">
<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="btnText">添加关卡</div>
</div>
@@ -33,7 +33,7 @@
</div>
</div>
</a-popover>
<div class="imgIcon" @click="showModal(element)"></div>
<div class="imgIcon" @click="showModal(element,'edit')"></div>
</div>
<div class="boxs_right">
<div class="imgIcon" @click="deleteChapter"></div>
@@ -376,6 +376,7 @@ import dialog from "@/utils/dialog";
const {query: {routerId}} = useRoute();
const modal = ref(false)
const ischapterEdit = ref(false)
const visiblene = ref(false)
const cancleLoading = ref(false)
const confirmLoading = ref(false)
@@ -408,7 +409,16 @@ watch(() => routerInfo.value.chapterList, () => {
})
}, {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;
};
const closeModal = () => {
@@ -420,10 +430,16 @@ const editChapter = () => {
if (!formValue.value.name) {
return message.warning("请输入关卡名称");
}
if(ischapterEdit.value){
routerInfo.value.chapterList = [{...formValue.value, draftTaskList: []}];
}
else{
routerInfo.value.chapterList.push({...formValue.value, draftTaskList: []})
}
formValue.value = {draftTaskList: []}
closeModal()
};
//删除关卡
const deleteChapter = () => {
dialog({
@@ -2156,5 +2172,6 @@ const cancelStorage = async () => {
.footBox {
position: fixed;
bottom: 0;
z-index: 999;
}
</style>

View File

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

View File

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

View File

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

View File

@@ -8,17 +8,16 @@
<img src="../../assets/images/projectadd/right.png" style="margin-left: 10px; cursor: pointer"
@click="showCancel" v-show="projectInfo.stageList[0].id != '0'" />
</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="btnText">添加阶段</div>
</div>
<div class="maincon" style="background-color: #fff">
<Draggable v-model="projectInfo.stageList" chosenClass="chosen" ghostClass="ghost" forceFallback="true"
group="stage" animation="500" v-if="JSON.stringify(projectInfo.stageList[0].taskTemplateList[0]) != '{}'">
<template #item="{ element,index }" >
<div class="items" v-if="element.id !=='0' && !element.deleted"
:class="activeIndex === index ? 'active' : ''"
@click="changeStageIndex(index)">
<template #item="{ element, index }">
<div class="items" v-if="element.id !== '0' && !element.deleted"
:class="activeIndex === index ? 'active' : ''" @click="changeStageIndex(index)">
<div class="items1">
<div class="boxs_left">
<a-popover placement="topLeft" trigger="click">
@@ -34,7 +33,7 @@
<span style="font-size: 12px; color: #ffffff">说明</span>
</div>
</a-popover>
<div class="imgIcon" @click="showModal(index)"></div>
<div class="imgIcon" @click="showModal(element, 'edit')"></div>
</div>
<div class="boxs_right">
<div class="imgIcon" @click="showDeleteStage(index)"></div>
@@ -66,7 +65,7 @@
<div class="filt">
<div class="le">
<div class="leftimg">
<img class="img" :src="projectInfo?.projectTemplateInfo?.picUrl"/>
<img class="img" :src="projectInfo?.projectTemplateInfo?.picUrl" />
</div>
<div class="imgfor">
<div class="forz" style="font-weight: 700">
@@ -75,21 +74,21 @@
</div>
</div>
<div class="rightt">
<!-- <div class="select" style="margin-right:90px;">-->
<!-- <span>学习模式</span>-->
<!-- <span-->
<!-- style="border: 1px solid rgba(0, 0, 0, 0.25);width: 120px;height: 38px; border-radius: 10px;text-align: center;line-height: 38px;">-->
<!-- {{ projectInfo?.projectTemplateInfo?.unlockMode === 1 ? '自由学习模式' : '闯关模式' }}-->
<!-- </span>-->
<!-- <unlock-mode :routerInfo="projectInfo.projectTemplateInfo" :types="2">-->
<!-- <a-button type="primary" size="large" style="margin-left:10px;border-radius: 10px;">切换模式-->
<!-- </a-button>-->
<!-- </unlock-mode>-->
<!-- </div>-->
<!-- <div class="select" style="margin-right:90px;">-->
<!-- <span>学习模式</span>-->
<!-- <span-->
<!-- style="border: 1px solid rgba(0, 0, 0, 0.25);width: 120px;height: 38px; border-radius: 10px;text-align: center;line-height: 38px;">-->
<!-- {{ projectInfo?.projectTemplateInfo?.unlockMode === 1 ? '自由学习模式' : '闯关模式' }}-->
<!-- </span>-->
<!-- <unlock-mode :routerInfo="projectInfo.projectTemplateInfo" :types="2">-->
<!-- <a-button type="primary" size="large" style="margin-left:10px;border-radius: 10px;">切换模式-->
<!-- </a-button>-->
<!-- </unlock-mode>-->
<!-- </div>-->
<div class="line"></div>
<router-link :to="{ path: `/libraryAdd`, query: { projectId: route.query.projectId } }">
<div style="display: flex">
<img class="img2" src="../../assets/images/leveladd/back.png"/>
<img class="img2" src="../../assets/images/leveladd/back.png" />
<div class="return">返回</div>
</div>
</router-link>
@@ -97,13 +96,13 @@
</div>
</div>
<div class="mid">
<div class="item" v-for="(value,key) in TASK_TYPE" :key="key">
<div v-if="key!=13">
<component :is="value.component" :ref="el=>courseRef['el'+key]=el" :type="key"
<div class="item" v-for="(value, key) in TASK_TYPE" :key="key">
<div v-if="key != 13">
<component :is="value.component" :ref="el => courseRef['el' + key] = el" :type="key"
v-model:task-list="projectInfo.stageList[activeIndex].taskTemplateList">
<div class="itcon">
<div class="img">
<img :src="value.img"/>
<img :src="value.img" />
</div>
<div class="text">{{ value.name }}</div>
</div>
@@ -122,7 +121,7 @@
移动任务到阶段
</button>
<div class="edit" @click="showdeAll">
<img class="editimg" src="../../assets/images/projectadd/delete.png"/>
<img class="editimg" src="../../assets/images/projectadd/delete.png" />
<span class="editext">批量删除</span>
</div>
</div>
@@ -173,7 +172,7 @@
: selectAll === 1
? require('../../assets/images/selectAll.png')
: require('../../assets/images/select.png')
" @click="selectRowAll"/>
" @click="selectRowAll" />
<div style="margin-top: 2px; margin-left: 8px">类型</div>
</div>
<div style="width: 120px; text-align: center">任务名称</div>
@@ -184,9 +183,8 @@
</div>
</div>
<Draggable v-model="projectInfo.stageList[activeIndex].taskTemplateList" chosenClass="chosen"
ghostClass="ghost"
forceFallback="true" group="task" animation="500">
<template #item="{ element,index }">
ghostClass="ghost" forceFallback="true" group="task" animation="500">
<template #item="{ element, index }">
<div style="
height: 50px;
display: flex;
@@ -230,11 +228,10 @@
<div style="width: 120px; text-align: center">
<div class="opat">
<div class="opacationt clearfix">
<a-switch style="margin-left: -50px; margin-top: 3px"
v-model:checked="element.flag" size="small"
active-color="red"/>
<a-switch style="margin-left: -50px; margin-top: 3px" v-model:checked="element.flag"
size="small" active-color="red" />
<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>
</div>
@@ -254,7 +251,7 @@
color: #4ea6ff;
margin-right: 25px;
cursor: pointer;
" @click="editTaskForType(element,index)">
" @click="editTaskForType(element, index)">
编辑
</span>
<span v-else style="
@@ -281,7 +278,7 @@
<div class="footbtn">
<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>
</div>
</div>
@@ -301,19 +298,19 @@
<span class="headerLeftText" style="font-size: 16px">编辑/添加阶段</span>
</div>
<div style="cursor: pointer; margin-right: 32px" @click="closeModal">
<img style="width: 22px; height: 22px" src="../../assets/images/basicinfo/close22.png"/>
<img style="width: 22px; height: 22px" src="../../assets/images/basicinfo/close22.png" />
</div>
</div>
<div class="modalMain" style="width: 100%">
<div class="name">
<div class="namebox">
<div>
<img src="@/assets/images/coursewareManage/asterisk.png" alt=""/>
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
</div>
<div class="inname">阶段名称</div>
</div>
<div class="in">
<a-input v-model:value="formValue.name" show-count :maxlength="20" placeholder="请输入阶段名称"/>
<a-input v-model:value="formValue.name" show-count :maxlength="20" placeholder="请输入阶段名称" />
</div>
</div>
<div class="name" style="display: flex; align-items: flex-start">
@@ -322,7 +319,7 @@
</div>
<div class="intext" style="margin-left: 14px">
<a-textarea v-model:value="formValue.remark" style="height: 88px" show-count :maxlength="100"
placeholder="请输入阶段说明"/>
placeholder="请输入阶段说明" />
</div>
</div>
<div style="
@@ -360,8 +357,7 @@
</a-modal>
</div>
<!-- 确认添加阶段弹窗 -->
<a-modal v-model:visible="confirmModal" :footer="null" wrapClassName="ConfirmModal"
centered="true">
<a-modal v-model:visible="confirmModal" :footer="null" wrapClassName="ConfirmModal" centered="true">
<div class="delete">
<div class="del_header"></div>
<div class="del_main">
@@ -385,8 +381,7 @@
</div>
</a-modal>
<!-- 确认取消阶段弹窗 -->
<a-modal v-model:visible="cancelModal" :footer="null" wrapClassName="ConfirmModal"
centered="true">
<a-modal v-model:visible="cancelModal" :footer="null" wrapClassName="ConfirmModal" centered="true">
<div class="delete">
<div class="del_header"></div>
<div class="del_main">
@@ -410,8 +405,7 @@
</div>
</a-modal>
<!-- 确认删除任务弹窗 -->
<a-modal v-model:visible="deleteModal" :footer="null" wrapClassName="ConfirmModal"
centered="true">
<a-modal v-model:visible="deleteModal" :footer="null" wrapClassName="ConfirmModal" centered="true">
<div class="delete">
<div class="del_header"></div>
<div class="del_main">
@@ -458,8 +452,7 @@
</div>
</a-modal>
<!-- 移动任务到阶段 -->
<a-modal style="padding: 0" v-model:visible="visiblene" :footer="null" :centered="true"
wrapClassName="moveModal">
<a-modal style="padding: 0" v-model:visible="visiblene" :footer="null" :centered="true" wrapClassName="moveModal">
<div class="con">
<div class="header">
<div class="inhe">
@@ -475,7 +468,7 @@
</div>
<div class="select">
<a-select v-model:value="moveChapterIndex" style="width: 100%" placeholder="请选择阶段" allowClear
:options="projectInfo.stageList.map(({name:label},value)=>({label,value,disabled:value===activeIndex}))"></a-select>
:options="projectInfo.stageList.map(({ name: label }, value) => ({ label, value, disabled: value === activeIndex }))"></a-select>
</div>
<div class="btn">
<button style="cursor: pointer" class="sameb btn1" @click="closeChangeModal">
@@ -521,14 +514,14 @@
</template>
<script setup>
import {computed, onMounted, onUnmounted, ref, watch,} from "vue";
import {message} from "ant-design-vue";
import { computed, onMounted, onUnmounted, ref, watch, } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/indexTemplate";
import Draggable from "vuedraggable";
import {useRoute} from "vue-router";
import {TASK_TYPE} from "@/utils/const";
import {request} from "@/api/request";
import {PROJECT_TEMPLATE_DETAIL_MODIFY} from "@/api/apis";
import { useRoute } from "vue-router";
import { TASK_TYPE } from "@/utils/const";
import { request } from "@/api/request";
import { PROJECT_TEMPLATE_DETAIL_MODIFY } from "@/api/apis";
const route = useRoute();
const courseRef = ref({})
@@ -537,13 +530,14 @@ const deAll = ref(false);
const deleteModal = ref(false);
const confirmModal = ref(false);
const stage = ref(false);
const ischapterEdit = ref(false);//修改阶段标志
const cancelModal = ref(false);
const deleteStageModal = ref(false);
const templateLoading = ref(false);
const cancleLoading = ref(false);
const projectInfo = ref({
stageList: [{
"id":"0",
"id": "0",
taskTemplateList: [{
}]
}],
@@ -554,7 +548,7 @@ const projectInfo = ref({
const activeIndex = ref(0);
const moveChapterIndex = ref(0);
const deleteIndex = ref(0);
const formValue = ref({taskTemplateList: []});
const formValue = ref({ taskTemplateList: [] });
const selectAll = computed(() => {
@@ -575,7 +569,7 @@ watch(() => projectInfo.value.stageList, () => {
s.sort = j
})
})
}, {deep: true})
}, { deep: true })
function changeStageIndex(index) {
activeIndex.value = index
@@ -585,9 +579,9 @@ function changeStageIndex(index) {
const getTask = async () => {
await api.templateEditDetail(route.query.projectId).then((res) => {
projectInfo.value = res.data.data
if(projectInfo.value.stageList.length == 0){
if (projectInfo.value.stageList.length == 0) {
projectInfo.value.stageList = [{
"id":"0",
"id": "0",
taskTemplateList: []
}]
}
@@ -615,7 +609,8 @@ const closeChangeModal = () => {
};
//移动任务到阶段
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,
checked: false
})));
@@ -640,7 +635,15 @@ const closeModal = () => {
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
};
@@ -650,16 +653,22 @@ function editStage() {
message.warning("请输入阶段名称!");
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') {
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)
} else {
projectInfo.value.stageList.push({...formValue.value})
activeIndex.value = activeIndex.value + 1
console.log("activeIndex.value" + activeIndex.value);
}
formValue.value = {taskTemplateList: []}
formValue.value = { taskTemplateList: [] }
stage.value = false
}
@@ -674,14 +683,15 @@ const closeDeleteStage = () => {
};
//删除阶段
const deleteStage = () => {
console.log(12345);
console.log("删除阶段前的数据:" + JSON.stringify(projectInfo.value));
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;
return
}
projectInfo.value.stageList.splice(activeIndex.value, 1);
activeIndex.value = activeIndex.value-1;
projectInfo.value.stageList[activeIndex.value].deleted = true;
console.log("删除阶段后的数据:" + JSON.stringify(projectInfo.value));
activeIndex.value = activeIndex.value - 1;
deleteStageModal.value = false;
};
onMounted(() => {
@@ -1670,7 +1680,7 @@ const cancelStorage = async () => {
padding-left: 60px !important;
}
.ant-table-thead > tr > th {
.ant-table-thead>tr>th {
background-color: rgba(239, 244, 252, 1);
}
@@ -1678,7 +1688,7 @@ const cancelStorage = async () => {
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;
}