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