mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
feat:增加学习路径图 项目管理模块
This commit is contained in:
@@ -43,3 +43,6 @@ export const AttendanceLeave = (obj) => http.post('/stu/task/attendance/leave',
|
||||
|
||||
// 直播考勤签到
|
||||
export const AttendanceSign = (obj) => http.post('/stu/task/attendance/sign', obj)
|
||||
|
||||
// 查询项目管理的信息
|
||||
export const QueryProjectManageDetail = (obj) => http.post('/project/management/queryProjectManageDetail', obj)
|
||||
@@ -112,10 +112,11 @@
|
||||
</div>-->
|
||||
</div>
|
||||
</a-drawer>
|
||||
<CVote
|
||||
v-model:CVvisible="CVvisible"
|
||||
:voteID="voteID"
|
||||
:courseID="courseID"
|
||||
<!-- 学员查看抽屉 -->
|
||||
<check-stu
|
||||
v-model:CheckStuvisible="CheckStuvisible"
|
||||
v-model:routerId="routerId"
|
||||
v-model:studentId="studentId"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -124,12 +125,12 @@
|
||||
import { message } from "ant-design-vue";
|
||||
// import * as api from "../../../api/index";
|
||||
import * as api from "../../../api/indexTaskManage";
|
||||
import CVote from "../CheckVote.vue"
|
||||
import CheckStu from "../CheckStu";
|
||||
|
||||
export default {
|
||||
name: "RouterProjectManage",
|
||||
components:{
|
||||
CVote,
|
||||
CheckStu,
|
||||
},
|
||||
props: {
|
||||
PjModelVisible: {
|
||||
@@ -185,25 +186,25 @@
|
||||
id: 3,
|
||||
value: "3",
|
||||
label: "已完成",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
value: "4",
|
||||
label: "未完成",
|
||||
},
|
||||
}
|
||||
],
|
||||
tabledata: [],
|
||||
tableDataTotalLoading: true, // 表格loading加载配置
|
||||
CVvisible:false, //查看投票抽屉
|
||||
voteID: "",
|
||||
courseID: ""
|
||||
courseID: "",
|
||||
|
||||
|
||||
routerId: '',
|
||||
studentId: '',
|
||||
CheckStuvisible: false,
|
||||
});
|
||||
const tableDataFunc = () => {
|
||||
const columns = [
|
||||
{
|
||||
title: "工号",
|
||||
dataIndex: "studentUserNo",
|
||||
key: "studentUserNo",
|
||||
dataIndex: "studentCode",
|
||||
key: "studentCode",
|
||||
width: "20%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -211,7 +212,7 @@
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.studentUserNo?text.record.studentUserNo:"-"}</span>
|
||||
<span> {text.record.studentCode?text.record.studentCode:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -267,24 +268,72 @@
|
||||
},
|
||||
{
|
||||
title: "学员关卡",
|
||||
dataIndex: "chapterName",
|
||||
key: "chapterName",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.chapterName?text.record.chapterName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "当前阶段",
|
||||
dataIndex: "currentStageName",
|
||||
key: "currentStageName",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: () => {
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {props.levelName}</span>
|
||||
<span> {text.record.currentStageName?text.record.currentStageName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "当前任务",
|
||||
dataIndex: "currentTaskName",
|
||||
key: "currentTaskName",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.currentTaskName?text.record.currentTaskName:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "进度",
|
||||
dataIndex: "process",
|
||||
key: "process",
|
||||
width: "10%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.process?text.record.process:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "完成时间",
|
||||
dataIndex: "lastStudyTime",
|
||||
key: "lastStudyTime",
|
||||
dataIndex: "finishEdTime",
|
||||
key: "finishEdTime",
|
||||
width: "15%",
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
@@ -292,7 +341,7 @@
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<span> {text.record.lastStudyTime?text.record.lastStudyTime:"-"}</span>
|
||||
<span> {text.record.finishEdTime?text.record.finishEdTime:"-"}</span>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -327,20 +376,13 @@
|
||||
style="color:#387df7;cursor:pointer"
|
||||
onClick={
|
||||
() => {
|
||||
if(value.record.finishStatus !== 3){
|
||||
message.destroy()
|
||||
message.error("当前任务未完成")
|
||||
return
|
||||
}
|
||||
{/* 当前投票提交的ID 用来查看投票详情 */}
|
||||
console.log(value.record.voteSubmitId);
|
||||
state.voteID = value.record.voteSubmitId;
|
||||
state.CVvisible = true;
|
||||
{/* 当前学员 用来查看学员详情 */}
|
||||
state.routerId = value.record.routerId;
|
||||
state.studentId = value.record.studentId;
|
||||
state.CheckStuvisible = true;
|
||||
console.log(value);
|
||||
}}>
|
||||
{value.record.finishStatus == 3 ?
|
||||
<span style='color:#387df7;'> 查看 </span>
|
||||
:
|
||||
<span style='color:#999;'> 查看 </span>}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
@@ -359,8 +401,9 @@
|
||||
const afterVisibleChange = (bol) => {
|
||||
if (bol == true) {
|
||||
console.log("当前是什么类型", props.datasource.type);
|
||||
console.log("当前是什么类型", props.datasource);
|
||||
state.tableDataTotalLoading = true;
|
||||
{/* getData(); */}
|
||||
getData();
|
||||
}
|
||||
};
|
||||
const selectProjectName = (value) => {
|
||||
@@ -377,51 +420,34 @@
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
if(props.datasource.type == 12){
|
||||
if(props.datasource.type == 13){
|
||||
console.log("我是传递的查询参数", {
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"chapterId": props.datasource.stageId=="0"?"":props.datasource.stageId,
|
||||
"status": state.projectName,
|
||||
"studentName": state.name,
|
||||
"targetId":props.datasource.projectId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
});
|
||||
api.QueryVoteManagementDetail({
|
||||
"courseId": props.datasource.courseId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"status": state.projectName,
|
||||
"studentName": state.name,
|
||||
"targetId":props.datasource.routerId,
|
||||
"taskId": props.datasource.courseId,
|
||||
"type": 1
|
||||
"studentName": state.name
|
||||
});
|
||||
api.QueryProjectManageDetail({
|
||||
"courseId": props.datasource.courseId,
|
||||
"pageNo": state.currentPage,
|
||||
"pageSize": state.pageSize,
|
||||
"chapterId": props.datasource.chapterId,
|
||||
"status": state.projectName,
|
||||
"studentName": state.name
|
||||
}).then(res=>{
|
||||
console.log('投票数据获取', res)
|
||||
if(res.data.code==200){
|
||||
state.tableDataTotalLoading = false;
|
||||
let newData = []
|
||||
for(let i=0;i<res.data.data.rows.length;i++){
|
||||
// 处理在线课字段和表格中字段保持一致
|
||||
let obj = {
|
||||
studentUserNo: res.data.data.rows[i].studentCode,
|
||||
studentName: res.data.data.rows[i].studentName,
|
||||
studentDepartName: res.data.data.rows[i].studentDepartName,
|
||||
studentJobName: res.data.data.rows[i].studentJobName,
|
||||
lastStudyTime: res.data.data.rows[i].submitTime,
|
||||
finishStatus: res.data.data.rows[i].status?res.data.data.rows[i].status:0,
|
||||
voteSubmitId: res.data.data.rows[i].voteSubmitId
|
||||
}
|
||||
newData.push(obj)
|
||||
}
|
||||
state.tabledata = newData;
|
||||
state.tabledata = res.data.data.rows;
|
||||
state.courseID = props.datasource.courseId;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
}
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
state.tableDataTotalLoading = false;
|
||||
state.tabledata = [];
|
||||
})
|
||||
}else{
|
||||
state.tableDataTotalLoading = false;
|
||||
@@ -453,8 +479,8 @@
|
||||
|
||||
// 导出数据
|
||||
function exportTaskStu() {
|
||||
console.log(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.routerTaskId}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/vote/manage/export/vote?type=${1}&voteId=${props.datasource.routerTaskId}`)
|
||||
console.log(`${process.env.VUE_APP_BASE_API}/project/management/exportProjectManage?courseId=${props.datasource.courseId}`)
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/project/management/exportProjectManage?courseId=${props.datasource.courseId}`)
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -477,8 +503,13 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.ant-drawer-content-wrapper {
|
||||
max-width: 80% !important;
|
||||
}
|
||||
|
||||
.RouterProjectManage {
|
||||
// overflow-x: auto;
|
||||
max-width: auto;
|
||||
.drawerMain {
|
||||
min-width: 550px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
|
||||
@@ -1388,7 +1388,6 @@ export default {
|
||||
const router = useRouter();
|
||||
// const store = useStore();
|
||||
const state = reactive({
|
||||
pjModelVisible: false,
|
||||
hasTask: false,
|
||||
stage: [],
|
||||
statess: [],
|
||||
|
||||
Reference in New Issue
Block a user